@oxygen-agent/cli 1.1043.4 → 1.1044.20
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/budget.js +3 -3
- package/node_modules/@oxygen/shared/dist/billing/plan-limits-view.js +1 -1
- package/node_modules/@oxygen/shared/dist/billing/repricing.js +1 -1
- package/node_modules/@oxygen/shared/dist/contracts/browser-operations.js +1 -0
- package/node_modules/@oxygen/shared/dist/onboarding/guided-activation.d.ts +12 -0
- package/node_modules/@oxygen/shared/dist/onboarding/guided-activation.js +2 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-events.d.ts +5 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-events.js +5 -0
- package/node_modules/@oxygen/shared/dist/sequences/sequences.d.ts +12 -0
- package/node_modules/@oxygen/shared/dist/sequences/sequences.js +27 -0
- package/node_modules/@oxygen/shared/dist/spend-safety.d.ts +9 -7
- package/node_modules/@oxygen/shared/dist/spend-safety.js +9 -7
- 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/budget.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
export function registerBudgetFamily(program, handleAsyncAction) {
|
|
7
7
|
program
|
|
8
8
|
.command("budget")
|
|
9
|
-
.description("Standing credit caps (org
|
|
9
|
+
.description("Standing credit caps (org monthly, table daily/monthly hard-blocks) beyond per-run max_credits.")
|
|
10
10
|
.addCommand(new Command("list")
|
|
11
11
|
.description("Read-only, 0 credits. List standing caps with each policy's current spend and remaining credits, plus plan defaults: the daily spend guard and per-run ceilings of one Agent run, trigger delivery or auto-run batch. Daily/monthly windows start at 00:00 UTC; spend counts preventive credit exposure: net reservations (including open holds) plus recorded workspace Workflow and BYOK fees, excluding proven duplicate settlement and linked admission transfers. Releases reduce only their own reserve in its UTC window. Fee accrual includes settled and unsettled work; unlinked transfers can count conservatively. Scoped caps currently measure workspace-wide spend. Every spend default: `oxygen limits show`.")
|
|
12
12
|
.option("--scope <scope>", `Filter by scope: ${formatPublicBudgetScopes()}.`)
|
|
@@ -24,9 +24,9 @@ export function registerBudgetFamily(program, handleAsyncAction) {
|
|
|
24
24
|
});
|
|
25
25
|
}))
|
|
26
26
|
.addCommand(new Command("set")
|
|
27
|
-
.description("Set, raise, or lower a standing credit cap (idempotent per scope+window). Daily/monthly windows start at 00:00 UTC and count net reservations plus workspace Workflow and BYOK fee accrual, excluding proven duplicate transfers; a member's credit limit counts only that person's own spend. Inspect current use with `oxygen budget list`.")
|
|
27
|
+
.description("Set, raise, or lower a standing credit cap (idempotent per scope+window). Daily/monthly windows start at 00:00 UTC and count net reservations plus workspace Workflow and BYOK fee accrual, excluding proven duplicate transfers; a member's credit limit counts only that person's own spend. An org cap takes --window monthly or per_run: there is no org daily cap. Inspect current use with `oxygen budget list`.")
|
|
28
28
|
.requiredOption("--scope <scope>", formatPublicBudgetScopes())
|
|
29
|
-
.requiredOption("--window <window>", "per_run, daily, or monthly.")
|
|
29
|
+
.requiredOption("--window <window>", "per_run, daily, or monthly; --scope org takes monthly or per_run.")
|
|
30
30
|
.requiredOption("--max-credits <credits>", "Cap in Oxygen credits; 0 only for --scope member, who then spends nothing.")
|
|
31
31
|
.option("--scope-id <id>", "Table id/slug for --scope table (or other scope id). Omit for a scope-wide cap.")
|
|
32
32
|
.option("--member <email>", "The member's email, for --scope member.")
|
|
@@ -320,7 +320,7 @@ export function planLimitsSpendDefaults(payload) {
|
|
|
320
320
|
value: guard.applies && typeof guard.block_credits === "number"
|
|
321
321
|
? `${formatLimitCredits(guard.block_credits)} (warns at ${formatLimitCredits(guard.warn_credits)})`
|
|
322
322
|
: guard.source === "explicit_org_daily_policy"
|
|
323
|
-
? "
|
|
323
|
+
? "Set for this workspace by OXYGEN"
|
|
324
324
|
: "—",
|
|
325
325
|
next: next === undefined || next === guard.block_credits ? null : formatLimitCredits(next),
|
|
326
326
|
scope: "Managed spend stops for the rest of the UTC day at this amount.",
|
|
@@ -409,7 +409,7 @@ export const FREE_ORG_DAILY_GUARD_BLOCK_CREDITS = defineRepricedValue({
|
|
|
409
409
|
slice: "S56",
|
|
410
410
|
decision: "L5.2",
|
|
411
411
|
unit: "credits_per_utc_day",
|
|
412
|
-
description: "Default daily spend guard on the free plan: managed spend past this in one UTC day is refused,
|
|
412
|
+
description: "Default daily spend guard on the free plan: managed spend past this in one UTC day is refused. It resets at 00:00 UTC, and any paid plan raises it.",
|
|
413
413
|
before: null,
|
|
414
414
|
after: 5_000,
|
|
415
415
|
});
|
|
@@ -137,5 +137,6 @@ export const BROWSER_OPERATIONS = [
|
|
|
137
137
|
operation("orgs.create", "/api/cli/orgs/create", "POST", "orgs create", "oxygen_workspace_create", "workspace", "Create a workspace for the authenticated person's account and begin native company setup. Workspace API keys cannot create personal workspaces.", { name: text(), company_domain: text("Company website or domain, or its LinkedIn company page URL when it has no website."), linkedin_profile_url: text("Creator's LinkedIn profile URL, separate from the company's page.") }, ["name", "company_domain"]),
|
|
138
138
|
operation("onboarding.complete", "/api/cli/onboarding/complete", "POST", "onboarding complete", "oxygen_onboarding_complete", "workspace", "Complete the active workspace's onboarding step and record its discovery-source choices. The referral choice requires source_referrer (who referred you); the other choice requires source_other.", { sources: arr(enumOf(["linkedin", "youtube", "x", "instagram", "tiktok", "google", "ai_assistant", "email", "referral", "word_of_mouth", "event", "other"])), source_other: text(), source_referrer: text(), redirect_url: text() }, ["sources"]),
|
|
139
139
|
operation("onboarding.finish", "/api/cli/onboarding/finish", "POST", "onboarding finish", "oxygen_onboarding_finish", "workspace", "Finish agent-led onboarding once a play is chosen: the onboarding Oxygent chat opens as an ordinary chat, without the Knowledge pane. If the chat holds your sent play, records your activation once. Spends nothing."),
|
|
140
|
+
operation("onboarding.guide", "/api/cli/onboarding/guide", "POST", "onboarding guide", "oxygen_onboarding_guide", "workspace", "Record where you are with the product guide that follows onboarding: active (seen), dismissed (hide it) or finished (its steps are done). Restarting onboarding brings it back. Spends nothing.", { state: enumOf(["active", "dismissed", "finished"]) }, ["state"]),
|
|
140
141
|
operation("onboarding.start", "/api/cli/onboarding/start", "POST", "onboarding start", "oxygen_onboarding_start", "workspace", "Answer onboarding's choice card. own_agent continues to connecting your own agent. copilot opens the Workspace Copilot with the onboarding conversation already started, billed in credits like any Copilot turn; choosing again reopens that conversation. restart (copilot) shows a finished onboarding again and asks the Oxygent to start over, as an ordinary send.", { path: enumOf(["own_agent", "copilot"]), play: text("A play slug carried to the install step."), restart: bool() }, ["path"], { spends: true }),
|
|
141
142
|
];
|
|
@@ -52,6 +52,9 @@ export type GuidedActivationReview = {
|
|
|
52
52
|
revision: string;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
+
/** Where a person is with the product guide that follows onboarding; absent until they see it. */
|
|
56
|
+
export declare const PRODUCT_GUIDE_STATES: readonly ["active", "dismissed", "finished"];
|
|
57
|
+
export type ProductGuideState = (typeof PRODUCT_GUIDE_STATES)[number];
|
|
55
58
|
export type GuidedActivation = {
|
|
56
59
|
id: string;
|
|
57
60
|
organization_id: string;
|
|
@@ -73,6 +76,15 @@ export type GuidedActivation = {
|
|
|
73
76
|
* and the research waits for the answer (current chat, 2026-11-11). Cleared when the research is claimed.
|
|
74
77
|
*/
|
|
75
78
|
company_pending?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* The product guide after onboarding (Tim, 2026-11-14): `active` once the person has
|
|
81
|
+
* seen its offer, `dismissed` when they hid it, `finished` once its steps were done.
|
|
82
|
+
* Restarting onboarding clears it, so the guide follows the next finish again.
|
|
83
|
+
*/
|
|
84
|
+
guide?: {
|
|
85
|
+
state: ProductGuideState;
|
|
86
|
+
at: string;
|
|
87
|
+
};
|
|
76
88
|
/** Agent-led onboarding's background research (Philipp, 2026-10-20): its hidden session and turn, then the chat turn that reported it. */
|
|
77
89
|
research?: GuidedOnboardingResearch;
|
|
78
90
|
} | null;
|
|
@@ -4,6 +4,8 @@ import { isProductionData } from "../deploy-env.js";
|
|
|
4
4
|
export const GUIDED_ACTIVATION_PURPOSES = ["lead_scan", "morning_briefing"];
|
|
5
5
|
export const GUIDED_ACTIVATION_POINTERS = ["knowledge", "first_leads_table", "sequence", "sender", "oxygent", "direct_chat", "scan_routine", "briefing_routine"];
|
|
6
6
|
export const GUIDED_ACTIVATION_REVISIONS = ["configuration", "sequence", "audience", "recipients", "sender", "copy", "knowledge", "schedule", "authority"];
|
|
7
|
+
/** Where a person is with the product guide that follows onboarding; absent until they see it. */
|
|
8
|
+
export const PRODUCT_GUIDE_STATES = ["active", "dismissed", "finished"];
|
|
7
9
|
/** Production requires the explicit all-workspace rollout; the DEV pilot keeps its own switch. */
|
|
8
10
|
export function guidedActivationEnabled(env = process.env) {
|
|
9
11
|
if (env.OXYGEN_DEPLOY_ENV === "selfhost-prod")
|
|
@@ -50,6 +50,11 @@ export declare const PRODUCT_EVENTS: {
|
|
|
50
50
|
* server trace in SigNoz. Once per page visit, a handful per signup.
|
|
51
51
|
*/
|
|
52
52
|
readonly AGENT_ONBOARDING_ATTEMPTED: "agent_onboarding_attempted";
|
|
53
|
+
/**
|
|
54
|
+
* The product guide after onboarding (2026-11-14): `state` is active (its offer
|
|
55
|
+
* was seen), dismissed (hidden) or finished (its four steps done). Once per change.
|
|
56
|
+
*/
|
|
57
|
+
readonly PRODUCT_GUIDE_STATE_CHANGED: "product_guide_state_changed";
|
|
53
58
|
/**
|
|
54
59
|
* The prescribed first play (inbound-led outbound), walked on ANY surface.
|
|
55
60
|
*
|
|
@@ -50,6 +50,11 @@ export const PRODUCT_EVENTS = {
|
|
|
50
50
|
* server trace in SigNoz. Once per page visit, a handful per signup.
|
|
51
51
|
*/
|
|
52
52
|
AGENT_ONBOARDING_ATTEMPTED: "agent_onboarding_attempted",
|
|
53
|
+
/**
|
|
54
|
+
* The product guide after onboarding (2026-11-14): `state` is active (its offer
|
|
55
|
+
* was seen), dismissed (hidden) or finished (its four steps done). Once per change.
|
|
56
|
+
*/
|
|
57
|
+
PRODUCT_GUIDE_STATE_CHANGED: "product_guide_state_changed",
|
|
53
58
|
/**
|
|
54
59
|
* The prescribed first play (inbound-led outbound), walked on ANY surface.
|
|
55
60
|
*
|
|
@@ -153,6 +153,18 @@ export declare function callPhoneForLead(phone: string): string | null;
|
|
|
153
153
|
* channels can never disagree about which column holds the number.
|
|
154
154
|
*/
|
|
155
155
|
export declare function callPhoneFromRow(rowValues: Record<string, unknown> | null | undefined, phoneColumnKey?: string | null): string | null;
|
|
156
|
+
/** Row columns read, in order, for a lead's timezone when the Sequence names none. */
|
|
157
|
+
export declare const SEQUENCE_TIMEZONE_COLUMN_KEYS: readonly ["timezone", "time_zone"];
|
|
158
|
+
/**
|
|
159
|
+
* A lead's IANA timezone for a call task, from its row_values: the Sequence's
|
|
160
|
+
* recipient-timezone column first, then SEQUENCE_TIMEZONE_COLUMN_KEYS.
|
|
161
|
+
*
|
|
162
|
+
* Only an Area/Location name counts ("Europe/Berlin"). Intl also resolves
|
|
163
|
+
* abbreviations, and reads "BST" as Bangladesh and "IST" as India, so a lead in
|
|
164
|
+
* London would pass the calling window at 04:30. Everything else counts as
|
|
165
|
+
* absent and the window keeps failing closed.
|
|
166
|
+
*/
|
|
167
|
+
export declare function callTimezoneFromRow(rowValues: Record<string, unknown> | null | undefined, timezoneColumnKey?: string | null): string | null;
|
|
156
168
|
/**
|
|
157
169
|
* A per-step / per-sequence send window. `days` are ISO weekdays (1=Mon … 7=Sun)
|
|
158
170
|
* on which sends are allowed; `start`/`end` are "HH:MM" local times. The window
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OxygenError } from "../cli-result.js";
|
|
2
2
|
import { hashVariantKey, renderTemplate, spintaxSyntaxIssues, templateColumnKeys, } from "./template.js";
|
|
3
3
|
import { isRecord } from "../type-guards.js";
|
|
4
|
+
import { isValidTimeZone } from "../zoned-time.js";
|
|
4
5
|
import { LINKEDIN_INVITE_NOTE_LIMIT } from "./linkedin-sequences.js";
|
|
5
6
|
/**
|
|
6
7
|
* Multichannel sequence DSL — the shared contract validated identically by CLI,
|
|
@@ -296,6 +297,32 @@ export function callPhoneFromRow(rowValues, phoneColumnKey) {
|
|
|
296
297
|
}
|
|
297
298
|
return null;
|
|
298
299
|
}
|
|
300
|
+
/** Row columns read, in order, for a lead's timezone when the Sequence names none. */
|
|
301
|
+
export const SEQUENCE_TIMEZONE_COLUMN_KEYS = ["timezone", "time_zone"];
|
|
302
|
+
/**
|
|
303
|
+
* A lead's IANA timezone for a call task, from its row_values: the Sequence's
|
|
304
|
+
* recipient-timezone column first, then SEQUENCE_TIMEZONE_COLUMN_KEYS.
|
|
305
|
+
*
|
|
306
|
+
* Only an Area/Location name counts ("Europe/Berlin"). Intl also resolves
|
|
307
|
+
* abbreviations, and reads "BST" as Bangladesh and "IST" as India, so a lead in
|
|
308
|
+
* London would pass the calling window at 04:30. Everything else counts as
|
|
309
|
+
* absent and the window keeps failing closed.
|
|
310
|
+
*/
|
|
311
|
+
export function callTimezoneFromRow(rowValues, timezoneColumnKey) {
|
|
312
|
+
if (!rowValues)
|
|
313
|
+
return null;
|
|
314
|
+
const keys = timezoneColumnKey ? [timezoneColumnKey, ...SEQUENCE_TIMEZONE_COLUMN_KEYS] : [...SEQUENCE_TIMEZONE_COLUMN_KEYS];
|
|
315
|
+
for (const key of keys) {
|
|
316
|
+
const value = rowValues[key];
|
|
317
|
+
if (typeof value !== "string")
|
|
318
|
+
continue;
|
|
319
|
+
const zone = value.trim();
|
|
320
|
+
// Etc/GMT+1 and SystemV/EST5 are fixed offsets, never a lead's zone.
|
|
321
|
+
if (zone.includes("/") && !/^(etc|systemv)\//i.test(zone) && isValidTimeZone(zone))
|
|
322
|
+
return zone;
|
|
323
|
+
}
|
|
324
|
+
return null;
|
|
325
|
+
}
|
|
299
326
|
/**
|
|
300
327
|
* Base content + up to this many alternates per A/B step (base counts as
|
|
301
328
|
* variant "a", so the ceiling is "a"–"z" — Instantly-class A/Z testing).
|
|
@@ -65,11 +65,12 @@ export type ByokProviderDailyCapEnforcementMode = "observe_only" | "enforced";
|
|
|
65
65
|
*/
|
|
66
66
|
export declare function resolveByokProviderDailyCapEnforcementMode(configured?: string | undefined): ByokProviderDailyCapEnforcementMode;
|
|
67
67
|
/**
|
|
68
|
-
* Implicit org-level DAILY budget guard, evaluated
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
68
|
+
* Implicit org-level DAILY budget guard, evaluated when the plan has finite
|
|
69
|
+
* positive monthly credits and no org-scope daily budget policy stands in for
|
|
70
|
+
* it. Expressed as a MULTIPLE of the plan's monthly grant spent in one UTC day:
|
|
71
|
+
* warn past WARN_MULTIPLE, hard-block at BLOCK_MULTIPLE. An org-daily policy
|
|
72
|
+
* row fully suppresses the implicit pair; customers cannot set one since
|
|
73
|
+
* 2026-11-14 (`budget set` refuses it), so that row is a staff setting.
|
|
73
74
|
*
|
|
74
75
|
* This is a runaway-loop backstop, NOT a spend ceiling. The available balance is
|
|
75
76
|
* the real bound on what a workspace can spend, and legitimate single-day work
|
|
@@ -100,8 +101,9 @@ export declare function resolveByokProviderDailyCapEnforcementMode(configured?:
|
|
|
100
101
|
* only move the wall; excluding commitments removes it for the case that was
|
|
101
102
|
* never a loop.
|
|
102
103
|
*
|
|
103
|
-
* This applies ONLY to the implicit default. An
|
|
104
|
-
*
|
|
104
|
+
* This applies ONLY to the implicit default. An explicit org-daily policy row
|
|
105
|
+
* is a real spend ceiling that counts everything. That is why customers can no
|
|
106
|
+
* longer set one: a ceiling below one renewal held it unpaid (T-437).
|
|
105
107
|
*
|
|
106
108
|
* The monthly reservation renewals of the 2026-09 repricing (connected sending
|
|
107
109
|
* mailboxes, deliverability units, connected accounts and phone numbers, dedicated
|
|
@@ -81,11 +81,12 @@ export function resolveByokProviderDailyCapEnforcementMode(configured = process.
|
|
|
81
81
|
return configured === "enforce" ? "enforced" : "observe_only";
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
* Implicit org-level DAILY budget guard, evaluated
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
84
|
+
* Implicit org-level DAILY budget guard, evaluated when the plan has finite
|
|
85
|
+
* positive monthly credits and no org-scope daily budget policy stands in for
|
|
86
|
+
* it. Expressed as a MULTIPLE of the plan's monthly grant spent in one UTC day:
|
|
87
|
+
* warn past WARN_MULTIPLE, hard-block at BLOCK_MULTIPLE. An org-daily policy
|
|
88
|
+
* row fully suppresses the implicit pair; customers cannot set one since
|
|
89
|
+
* 2026-11-14 (`budget set` refuses it), so that row is a staff setting.
|
|
89
90
|
*
|
|
90
91
|
* This is a runaway-loop backstop, NOT a spend ceiling. The available balance is
|
|
91
92
|
* the real bound on what a workspace can spend, and legitimate single-day work
|
|
@@ -116,8 +117,9 @@ export function resolveByokProviderDailyCapEnforcementMode(configured = process.
|
|
|
116
117
|
* only move the wall; excluding commitments removes it for the case that was
|
|
117
118
|
* never a loop.
|
|
118
119
|
*
|
|
119
|
-
* This applies ONLY to the implicit default. An
|
|
120
|
-
*
|
|
120
|
+
* This applies ONLY to the implicit default. An explicit org-daily policy row
|
|
121
|
+
* is a real spend ceiling that counts everything. That is why customers can no
|
|
122
|
+
* longer set one: a ceiling below one renewal held it unpaid (T-437).
|
|
121
123
|
*
|
|
122
124
|
* The monthly reservation renewals of the 2026-09 repricing (connected sending
|
|
123
125
|
* mailboxes, deliverability units, connected accounts and phone numbers, dedicated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const OXYGEN_BUILD_VERSION = "1.
|
|
1
|
+
export declare const OXYGEN_BUILD_VERSION = "1.1044.20";
|
|
@@ -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.1044.20";
|
|
@@ -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.1014.
|
|
52
|
+
export const OXYGEN_MINIMUM_CLI_VERSION = "1.1014.913";
|
|
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";
|