@oxygen-agent/cli 1.1011.97 → 1.1011.288
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 +25 -5
- package/dist/column-run-notices.d.ts +16 -0
- package/dist/column-run-notices.js +57 -0
- package/dist/command-manifest.js +10 -1
- package/dist/help.d.ts +27 -1
- package/dist/help.js +112 -29
- package/dist/http-client.js +8 -0
- package/dist/index.js +348 -127
- package/node_modules/@oxygen/cli-ugc/dist/commands.js +20 -69
- package/node_modules/@oxygen/shared/dist/byok-connect.d.ts +6 -4
- package/node_modules/@oxygen/shared/dist/byok-connect.js +11 -4
- package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +127 -1
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +286 -24
- package/node_modules/@oxygen/shared/dist/collab.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/collab.js +12 -0
- package/node_modules/@oxygen/shared/dist/column-decision.js +7 -3
- package/node_modules/@oxygen/shared/dist/column-output-fields.js +45 -3
- package/node_modules/@oxygen/shared/dist/company-enrichment-fields.d.ts +20 -13
- package/node_modules/@oxygen/shared/dist/company-enrichment-fields.js +29 -13
- package/node_modules/@oxygen/shared/dist/contracts/sender-limits.js +1 -1
- package/node_modules/@oxygen/shared/dist/copilot-skills.generated.d.ts +2 -2
- package/node_modules/@oxygen/shared/dist/copilot-skills.generated.js +2 -2
- package/node_modules/@oxygen/shared/dist/credit-guidance.js +12 -1
- package/node_modules/@oxygen/shared/dist/enrichment-intents.d.ts +37 -0
- package/node_modules/@oxygen/shared/dist/enrichment-intents.js +79 -44
- package/node_modules/@oxygen/shared/dist/linkedin-url.d.ts +7 -0
- package/node_modules/@oxygen/shared/dist/linkedin-url.js +9 -0
- package/node_modules/@oxygen/shared/dist/log.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/log.js +15 -0
- package/node_modules/@oxygen/shared/dist/operational-telemetry.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/operational-telemetry.js +6 -2
- package/node_modules/@oxygen/shared/dist/otlp-log-sink.d.ts +7 -3
- package/node_modules/@oxygen/shared/dist/otlp-log-sink.js +22 -1
- package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +3 -7
- package/node_modules/@oxygen/shared/dist/plan-limits.js +2 -14
- package/node_modules/@oxygen/shared/dist/sending-schedule.d.ts +39 -0
- package/node_modules/@oxygen/shared/dist/sending-schedule.js +41 -0
- package/node_modules/@oxygen/shared/dist/sequence-lifecycle.d.ts +19 -0
- package/node_modules/@oxygen/shared/dist/sequence-lifecycle.js +20 -0
- package/node_modules/@oxygen/shared/dist/sequence-sender-variables.d.ts +35 -0
- package/node_modules/@oxygen/shared/dist/sequence-sender-variables.js +63 -0
- package/node_modules/@oxygen/shared/dist/sequences.d.ts +13 -7
- package/node_modules/@oxygen/shared/dist/sequences.js +26 -0
- package/node_modules/@oxygen/shared/dist/signup-lead-payload.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/signup-lead-payload.js +5 -0
- package/node_modules/@oxygen/shared/dist/social-post-metrics-series.js +1 -15
- package/node_modules/@oxygen/shared/dist/standard-webhooks.d.ts +51 -0
- package/node_modules/@oxygen/shared/dist/standard-webhooks.js +124 -0
- package/node_modules/@oxygen/shared/dist/tags.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/tags.js +13 -1
- package/node_modules/@oxygen/shared/dist/ugc.d.ts +11 -7
- package/node_modules/@oxygen/shared/dist/ugc.js +14 -6
- 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/zoned-time.d.ts +39 -0
- package/node_modules/@oxygen/shared/dist/zoned-time.js +81 -0
- package/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wall-clock time in an IANA time zone, converted to instants DST-correctly.
|
|
3
|
+
*
|
|
4
|
+
* Publishing's publish-time contract rides on this on every surface: an ISO
|
|
5
|
+
* date-time with `Z` or an offset is that exact instant, and one without is
|
|
6
|
+
* wall-clock time in the post's timezone, read with the offset in force at that
|
|
7
|
+
* local time. 09:00 Europe/Berlin is 07:00Z in October and 08:00Z in December.
|
|
8
|
+
*/
|
|
9
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
10
|
+
/**
|
|
11
|
+
* Is `zone` an IANA time zone this runtime resolves (`Europe/Berlin`, `UTC`)?
|
|
12
|
+
* A bare offset (`+02:00`) is refused although Intl accepts it: it never moves
|
|
13
|
+
* for daylight saving, so a schedule kept in it drifts an hour for half the year.
|
|
14
|
+
*/
|
|
15
|
+
export function isValidTimeZone(zone) {
|
|
16
|
+
const value = zone.trim();
|
|
17
|
+
if (!value || /^[+-]/.test(value))
|
|
18
|
+
return false;
|
|
19
|
+
try {
|
|
20
|
+
new Intl.DateTimeFormat("en-US", { timeZone: value });
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/** `timeZone`'s offset from UTC at `instant`, in milliseconds (Berlin in July: 7,200,000). */
|
|
28
|
+
export function zoneOffsetMs(instant, timeZone) {
|
|
29
|
+
const parts = new Intl.DateTimeFormat("en-US", {
|
|
30
|
+
timeZone,
|
|
31
|
+
hourCycle: "h23",
|
|
32
|
+
year: "numeric",
|
|
33
|
+
month: "2-digit",
|
|
34
|
+
day: "2-digit",
|
|
35
|
+
hour: "2-digit",
|
|
36
|
+
minute: "2-digit",
|
|
37
|
+
second: "2-digit",
|
|
38
|
+
}).formatToParts(instant);
|
|
39
|
+
const read = (type) => Number(parts.find((part) => part.type === type)?.value ?? 0);
|
|
40
|
+
const asUtc = Date.UTC(read("year"), read("month") - 1, read("day"), read("hour"), read("minute"), read("second"));
|
|
41
|
+
return asUtc - Math.floor(instant.getTime() / 1000) * 1000;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The instant a wall-clock time in `timeZone` names. A time the zone repeats (the
|
|
45
|
+
* autumn fall-back hour) resolves to its first occurrence; a time it skips (the
|
|
46
|
+
* spring-forward gap) resolves past the gap by its length, as a clock would read
|
|
47
|
+
* it: 02:30 Europe/Berlin on 2026-03-29 is 03:30 CEST.
|
|
48
|
+
*/
|
|
49
|
+
export function zonedWallClockToInstant(wall, timeZone) {
|
|
50
|
+
const asUtc = Date.UTC(wall.year, wall.month - 1, wall.day, wall.hour, wall.minute, wall.second, wall.millisecond);
|
|
51
|
+
const before = zoneOffsetMs(new Date(asUtc - DAY_MS), timeZone);
|
|
52
|
+
const after = zoneOffsetMs(new Date(asUtc + DAY_MS), timeZone);
|
|
53
|
+
// Each offset in force around that day names one candidate; a candidate is real
|
|
54
|
+
// when the zone maps it back to this same wall-clock time.
|
|
55
|
+
const real = [...new Set([before, after])]
|
|
56
|
+
.map((offset) => asUtc - offset)
|
|
57
|
+
.filter((instant) => zoneOffsetMs(new Date(instant), timeZone) === asUtc - instant)
|
|
58
|
+
.sort((left, right) => left - right);
|
|
59
|
+
return new Date(real[0] ?? asUtc - before);
|
|
60
|
+
}
|
|
61
|
+
// YYYY-MM-DD, optionally THH:MM[:SS[.fff]], and nothing after it: no Z, no offset.
|
|
62
|
+
const LOCAL_ISO_DATE_TIME = /^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2})(?:[.,](\d{1,9}))?)?)?$/;
|
|
63
|
+
/**
|
|
64
|
+
* Parse an ISO date-time: with `Z` or an offset it is that instant; without one
|
|
65
|
+
* it is wall-clock time in `timeZone` (DST-correct). Null when it names no real
|
|
66
|
+
* date-time. Anything that is not ISO-shaped keeps `Date`'s own parsing.
|
|
67
|
+
*/
|
|
68
|
+
export function parseDateTimeInZone(value, timeZone) {
|
|
69
|
+
const text = value.trim();
|
|
70
|
+
const local = LOCAL_ISO_DATE_TIME.exec(text);
|
|
71
|
+
if (!local) {
|
|
72
|
+
const instant = new Date(text);
|
|
73
|
+
return Number.isFinite(instant.getTime()) ? instant : null;
|
|
74
|
+
}
|
|
75
|
+
const [year, month, day, hour, minute, second] = local.slice(1, 7).map((part) => Number(part ?? 0));
|
|
76
|
+
const millisecond = local[7] ? Math.floor(Number(`0.${local[7]}`) * 1000) : 0;
|
|
77
|
+
const daysInMonth = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
78
|
+
if (month < 1 || month > 12 || day < 1 || day > daysInMonth || hour > 23 || minute > 59 || second > 59)
|
|
79
|
+
return null;
|
|
80
|
+
return zonedWallClockToInstant({ year, month, day, hour, minute, second, millisecond }, timeZone);
|
|
81
|
+
}
|