@oxygen-agent/cli 1.1011.853 → 1.1011.974
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-lead-magnet-commands.d.ts +7 -0
- package/dist/admin-lead-magnet-commands.js +128 -0
- package/dist/command-manifest.js +11 -0
- package/dist/functions-commands.js +1 -1
- package/dist/index.js +179 -132
- package/dist/workspace-utility-flags.d.ts +7 -0
- package/dist/workspace-utility-flags.js +45 -0
- package/node_modules/@oxygen/shared/dist/billing-anchors.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/billing-anchors.js +7 -1
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +135 -4
- package/node_modules/@oxygen/shared/dist/contracts/browser-operations.js +3 -3
- package/node_modules/@oxygen/shared/dist/contracts/customer-operations.js +10 -8
- package/node_modules/@oxygen/shared/dist/contracts/limits-read.js +11 -1
- package/node_modules/@oxygen/shared/dist/contracts/schema.js +10 -6
- package/node_modules/@oxygen/shared/dist/contracts/spintax.d.ts +18 -0
- package/node_modules/@oxygen/shared/dist/contracts/spintax.js +11 -0
- package/node_modules/@oxygen/shared/dist/contracts/workspace-utilities.d.ts +162 -0
- package/node_modules/@oxygen/shared/dist/contracts/workspace-utilities.js +46 -0
- package/node_modules/@oxygen/shared/dist/credit-topup-review.d.ts +11 -0
- package/node_modules/@oxygen/shared/dist/credit-topup-review.js +3 -0
- package/node_modules/@oxygen/shared/dist/emailguard-placement-probe.d.ts +70 -0
- package/node_modules/@oxygen/shared/dist/emailguard-placement-probe.js +161 -0
- package/node_modules/@oxygen/shared/dist/future-signup-events.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/future-signup-events.js +4 -0
- package/node_modules/@oxygen/shared/dist/partner-coupon-bonus.d.ts +45 -0
- package/node_modules/@oxygen/shared/dist/partner-coupon-bonus.js +57 -0
- package/node_modules/@oxygen/shared/dist/table-filter-operators.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/table-filter-operators.js +50 -0
- package/node_modules/@oxygen/shared/dist/telemetry.js +4 -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/node_modules/@oxygen/workflows/dist/index.d.ts +1 -0
- package/node_modules/@oxygen/workflows/dist/index.js +1 -0
- package/node_modules/@oxygen/workflows/dist/recipe-timestamp.d.ts +22 -0
- package/node_modules/@oxygen/workflows/dist/recipe-timestamp.js +72 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const OXYGEN_BUILD_VERSION = "1.1011.
|
|
1
|
+
export declare const OXYGEN_BUILD_VERSION = "1.1011.974";
|
|
@@ -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.1011.
|
|
2
|
+
export const OXYGEN_BUILD_VERSION = "1.1011.974";
|
|
@@ -49,4 +49,4 @@ 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.
|
|
52
|
+
export const OXYGEN_MINIMUM_CLI_VERSION = "1.917.5";
|
|
@@ -6,6 +6,7 @@ export type { CanonicalWorkflowToolEffect } from "./tool-effects.js";
|
|
|
6
6
|
export * from "./graph/index.js";
|
|
7
7
|
export * from "./graph/lint.js";
|
|
8
8
|
export * from "./portable.js";
|
|
9
|
+
export { RECIPE_TIMESTAMP_MILLIS_SOURCE } from "./recipe-timestamp.js";
|
|
9
10
|
export declare const WORKFLOW_MANIFEST_VERSION = 1;
|
|
10
11
|
export declare const WORKFLOW_COMPILER_VERSION = "oxygen-workflows-v1";
|
|
11
12
|
export declare const DURABLE_RECIPE_COMPILER_VERSION = "oxygen-recipes-v2";
|
|
@@ -13,6 +13,7 @@ export * from "./event-dispatch.js";
|
|
|
13
13
|
export * from "./graph/index.js";
|
|
14
14
|
export * from "./graph/lint.js";
|
|
15
15
|
export * from "./portable.js";
|
|
16
|
+
export { RECIPE_TIMESTAMP_MILLIS_SOURCE } from "./recipe-timestamp.js";
|
|
16
17
|
export const WORKFLOW_MANIFEST_VERSION = 1;
|
|
17
18
|
export const WORKFLOW_COMPILER_VERSION = "oxygen-workflows-v1";
|
|
18
19
|
export const DURABLE_RECIPE_COMPILER_VERSION = "oxygen-recipes-v2";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recipe-source helpers that emitted template bundles embed verbatim.
|
|
3
|
+
*
|
|
4
|
+
* The durable recipe runtime removes `Date` from the sandbox's globals
|
|
5
|
+
* (`installRecipeGlobalGuards` in apps/worker/src/recipe-sandbox-runtime.ts)
|
|
6
|
+
* so a replayed run cannot read a different clock. A bundle that calls
|
|
7
|
+
* `Date.parse` therefore throws "Cannot read properties of undefined (reading
|
|
8
|
+
* 'parse')" on every live run: both HubSpot sequencer projection templates
|
|
9
|
+
* failed that way from the day they were armed. Timestamps inside a bundle are
|
|
10
|
+
* parsed here by arithmetic instead, and `ctx.now()` stays the only clock.
|
|
11
|
+
*
|
|
12
|
+
* `readTimestampMillis` accepts positive epoch milliseconds (number or digit
|
|
13
|
+
* string) and ISO-8601 dates / date-times. A date-time without a zone is read
|
|
14
|
+
* as UTC, which is what `Date.parse` gives in the UTC sandbox. Anything else
|
|
15
|
+
* returns null.
|
|
16
|
+
*
|
|
17
|
+
* It lives here rather than in apps/web because the worker's sandbox runner
|
|
18
|
+
* embeds the same source: a bundle compiled before this parser existed is
|
|
19
|
+
* frozen in its installed revision and still calls `Date.parse`, so the runner
|
|
20
|
+
* answers that one call with this parser instead of the host clock.
|
|
21
|
+
*/
|
|
22
|
+
export declare const RECIPE_TIMESTAMP_MILLIS_SOURCE: string;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recipe-source helpers that emitted template bundles embed verbatim.
|
|
3
|
+
*
|
|
4
|
+
* The durable recipe runtime removes `Date` from the sandbox's globals
|
|
5
|
+
* (`installRecipeGlobalGuards` in apps/worker/src/recipe-sandbox-runtime.ts)
|
|
6
|
+
* so a replayed run cannot read a different clock. A bundle that calls
|
|
7
|
+
* `Date.parse` therefore throws "Cannot read properties of undefined (reading
|
|
8
|
+
* 'parse')" on every live run: both HubSpot sequencer projection templates
|
|
9
|
+
* failed that way from the day they were armed. Timestamps inside a bundle are
|
|
10
|
+
* parsed here by arithmetic instead, and `ctx.now()` stays the only clock.
|
|
11
|
+
*
|
|
12
|
+
* `readTimestampMillis` accepts positive epoch milliseconds (number or digit
|
|
13
|
+
* string) and ISO-8601 dates / date-times. A date-time without a zone is read
|
|
14
|
+
* as UTC, which is what `Date.parse` gives in the UTC sandbox. Anything else
|
|
15
|
+
* returns null.
|
|
16
|
+
*
|
|
17
|
+
* It lives here rather than in apps/web because the worker's sandbox runner
|
|
18
|
+
* embeds the same source: a bundle compiled before this parser existed is
|
|
19
|
+
* frozen in its installed revision and still calls `Date.parse`, so the runner
|
|
20
|
+
* answers that one call with this parser instead of the host clock.
|
|
21
|
+
*/
|
|
22
|
+
export const RECIPE_TIMESTAMP_MILLIS_SOURCE = String.raw `
|
|
23
|
+
const RECIPE_ISO_TIMESTAMP = /^(\d{4})-(\d{2})-(\d{2})(?:[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:[.,](\d+))?)?(?:\s*([Zz]|[+-]\d{2}(?::?\d{2})?))?)?$/;
|
|
24
|
+
|
|
25
|
+
function recipeDaysInMonth(year, month) {
|
|
26
|
+
if (month === 2) return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0 ? 29 : 28;
|
|
27
|
+
return month === 4 || month === 6 || month === 9 || month === 11 ? 30 : 31;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function parseIsoTimestampMillis(text) {
|
|
31
|
+
const match = RECIPE_ISO_TIMESTAMP.exec(text);
|
|
32
|
+
if (!match) return null;
|
|
33
|
+
const year = Number(match[1]);
|
|
34
|
+
const month = Number(match[2]);
|
|
35
|
+
const day = Number(match[3]);
|
|
36
|
+
const hour = match[4] === undefined ? 0 : Number(match[4]);
|
|
37
|
+
const minute = match[5] === undefined ? 0 : Number(match[5]);
|
|
38
|
+
const second = match[6] === undefined ? 0 : Number(match[6]);
|
|
39
|
+
const millis = match[7] === undefined ? 0 : Number((match[7] + "00").slice(0, 3));
|
|
40
|
+
if (month < 1 || month > 12 || day < 1 || day > recipeDaysInMonth(year, month)) return null;
|
|
41
|
+
if (hour > 23 || minute > 59 || second > 59) return null;
|
|
42
|
+
let offsetMinutes = 0;
|
|
43
|
+
const zone = match[8];
|
|
44
|
+
if (zone && zone !== "Z" && zone !== "z") {
|
|
45
|
+
const digits = zone.slice(1).replace(":", "");
|
|
46
|
+
const zoneHours = Number(digits.slice(0, 2));
|
|
47
|
+
const zoneMinutes = digits.length > 2 ? Number(digits.slice(2)) : 0;
|
|
48
|
+
if (zoneHours > 23 || zoneMinutes > 59) return null;
|
|
49
|
+
offsetMinutes = (zone[0] === "-" ? -1 : 1) * (zoneHours * 60 + zoneMinutes);
|
|
50
|
+
}
|
|
51
|
+
// Days since 1970-01-01 in the proleptic Gregorian calendar
|
|
52
|
+
// (Howard Hinnant's days_from_civil).
|
|
53
|
+
const shiftedYear = month <= 2 ? year - 1 : year;
|
|
54
|
+
const era = Math.floor(shiftedYear / 400);
|
|
55
|
+
const yearOfEra = shiftedYear - era * 400;
|
|
56
|
+
const dayOfYear = Math.floor((153 * (month + (month > 2 ? -3 : 9)) + 2) / 5) + day - 1;
|
|
57
|
+
const dayOfEra = yearOfEra * 365 + Math.floor(yearOfEra / 4) - Math.floor(yearOfEra / 100) + dayOfYear;
|
|
58
|
+
const days = era * 146097 + dayOfEra - 719468;
|
|
59
|
+
return ((days * 24 + hour) * 60 + minute - offsetMinutes) * 60000 + second * 1000 + millis;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function readTimestampMillis(value) {
|
|
63
|
+
if (typeof value === "number" && Number.isFinite(value) && value > 0) return Math.trunc(value);
|
|
64
|
+
const candidate = typeof value === "string" ? value.trim() : "";
|
|
65
|
+
if (!candidate) return null;
|
|
66
|
+
if (/^\d+$/.test(candidate)) {
|
|
67
|
+
const numeric = Number(candidate);
|
|
68
|
+
return Number.isFinite(numeric) && numeric > 0 ? Math.trunc(numeric) : null;
|
|
69
|
+
}
|
|
70
|
+
return parseIsoTimestampMillis(candidate);
|
|
71
|
+
}
|
|
72
|
+
`.trim();
|