@oxygen-agent/cli 1.1010.721 → 1.1010.905
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/auto-update.d.ts +129 -0
- package/dist/auto-update.js +392 -0
- package/dist/command-manifest.js +14 -0
- package/dist/credentials.d.ts +2 -0
- package/dist/credentials.js +6 -3
- package/dist/functions-commands.js +1 -1
- package/dist/http-client.js +28 -4
- package/dist/index.js +583 -145
- package/dist/run-wait.d.ts +3 -1
- package/dist/run-wait.js +19 -5
- package/dist/streamed-file-import.d.ts +58 -0
- package/dist/streamed-file-import.js +115 -0
- package/dist/update.d.ts +29 -0
- package/dist/update.js +62 -16
- package/dist/workflow-plan-limit-notices.d.ts +8 -0
- package/dist/workflow-plan-limit-notices.js +28 -0
- package/node_modules/@oxygen/cli-ugc/dist/commands.js +3 -3
- package/node_modules/@oxygen/shared/dist/billing-anchors.d.ts +17 -0
- package/node_modules/@oxygen/shared/dist/billing-anchors.js +27 -0
- package/node_modules/@oxygen/shared/dist/billing.d.ts +191 -35
- package/node_modules/@oxygen/shared/dist/billing.js +333 -42
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +55 -5
- 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/cost-estimate-view.d.ts +50 -0
- package/node_modules/@oxygen/shared/dist/cost-estimate-view.js +90 -0
- package/node_modules/@oxygen/shared/dist/cost-estimate.d.ts +167 -0
- package/node_modules/@oxygen/shared/dist/cost-estimate.js +361 -0
- package/node_modules/@oxygen/shared/dist/credit-gate.d.ts +26 -0
- package/node_modules/@oxygen/shared/dist/credit-gate.js +65 -0
- package/node_modules/@oxygen/shared/dist/email-deliverability-policy.d.ts +51 -0
- package/node_modules/@oxygen/shared/dist/email-deliverability-policy.js +101 -0
- package/node_modules/@oxygen/shared/dist/email-hard-bounce.d.ts +3 -1
- package/node_modules/@oxygen/shared/dist/email-hard-bounce.js +3 -3
- package/node_modules/@oxygen/shared/dist/error-redaction.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/error-redaction.js +1 -1
- package/node_modules/@oxygen/shared/dist/feature-gates.d.ts +4 -0
- package/node_modules/@oxygen/shared/dist/feature-gates.js +5 -0
- package/node_modules/@oxygen/shared/dist/file-import.d.ts +13 -1
- package/node_modules/@oxygen/shared/dist/file-import.js +33 -6
- package/node_modules/@oxygen/shared/dist/hosted-ai.d.ts +73 -3
- package/node_modules/@oxygen/shared/dist/hosted-ai.js +246 -24
- package/node_modules/@oxygen/shared/dist/import-limits.d.ts +25 -1
- package/node_modules/@oxygen/shared/dist/import-limits.js +35 -2
- package/node_modules/@oxygen/shared/dist/index.d.ts +2 -22
- package/node_modules/@oxygen/shared/dist/index.js +2 -42
- package/node_modules/@oxygen/shared/dist/object-storage.d.ts +9 -0
- package/node_modules/@oxygen/shared/dist/object-storage.js +17 -0
- package/node_modules/@oxygen/shared/dist/operational-telemetry.d.ts +41 -0
- package/node_modules/@oxygen/shared/dist/operational-telemetry.js +55 -0
- package/node_modules/@oxygen/shared/dist/plan-band.d.ts +117 -1
- package/node_modules/@oxygen/shared/dist/plan-band.js +175 -10
- package/node_modules/@oxygen/shared/dist/plan-capabilities.d.ts +77 -7
- package/node_modules/@oxygen/shared/dist/plan-capabilities.js +87 -7
- package/node_modules/@oxygen/shared/dist/plan-limits-view.d.ts +219 -0
- package/node_modules/@oxygen/shared/dist/plan-limits-view.js +330 -0
- package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +204 -6
- package/node_modules/@oxygen/shared/dist/plan-limits.js +197 -15
- package/node_modules/@oxygen/shared/dist/pricing-sheet.d.ts +80 -36
- package/node_modules/@oxygen/shared/dist/pricing-sheet.js +80 -31
- package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.d.ts +38 -20
- package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.js +47 -34
- package/node_modules/@oxygen/shared/dist/provider-http-error.d.ts +10 -0
- package/node_modules/@oxygen/shared/dist/provider-http-error.js +27 -0
- package/node_modules/@oxygen/shared/dist/repricing.d.ts +127 -0
- package/node_modules/@oxygen/shared/dist/repricing.js +407 -6
- package/node_modules/@oxygen/shared/dist/semver.d.ts +21 -0
- package/node_modules/@oxygen/shared/dist/semver.js +41 -0
- package/node_modules/@oxygen/shared/dist/sending-limits.d.ts +5 -7
- package/node_modules/@oxygen/shared/dist/sending-limits.js +10 -16
- package/node_modules/@oxygen/shared/dist/sending-seats.d.ts +18 -15
- package/node_modules/@oxygen/shared/dist/sending-seats.js +22 -17
- package/node_modules/@oxygen/shared/dist/spend-safety.d.ts +57 -8
- package/node_modules/@oxygen/shared/dist/spend-safety.js +64 -11
- package/node_modules/@oxygen/shared/dist/stripe-price-catalog.d.ts +15 -7
- package/node_modules/@oxygen/shared/dist/stripe-price-catalog.js +18 -5
- package/node_modules/@oxygen/shared/dist/table-capacity.d.ts +34 -5
- package/node_modules/@oxygen/shared/dist/table-capacity.js +25 -8
- package/node_modules/@oxygen/shared/dist/telemetry-export-observer.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/telemetry-export-observer.js +13 -5
- package/node_modules/@oxygen/shared/dist/telemetry-resource.d.ts +40 -0
- package/node_modules/@oxygen/shared/dist/telemetry-resource.js +35 -0
- package/node_modules/@oxygen/shared/dist/telemetry.js +5 -0
- package/node_modules/@oxygen/shared/dist/ugc.d.ts +15 -0
- package/node_modules/@oxygen/shared/dist/ugc.js +29 -0
- package/node_modules/@oxygen/shared/dist/version.d.ts +1 -3
- 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 +14 -27
- package/node_modules/@oxygen/shared/dist/workspace-file-storage.d.ts +5 -0
- package/node_modules/@oxygen/shared/dist/workspace-file-storage.js +5 -0
- package/node_modules/@oxygen/workflows/dist/graph/manifest-schema.d.ts +3 -3
- package/node_modules/@oxygen/workflows/dist/graph/types.d.ts +15 -1
- package/node_modules/@oxygen/workflows/dist/graph/types.js +15 -1
- package/node_modules/@oxygen/workflows/dist/index.d.ts +45 -0
- package/node_modules/@oxygen/workflows/dist/index.js +152 -2
- package/node_modules/@oxygen/workflows/dist/usage-estimate.d.ts +10 -1
- package/node_modules/@oxygen/workflows/dist/usage-estimate.js +33 -29
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
// Static automation
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// honest projection
|
|
1
|
+
// Static automation usage estimation shared by the web workflow page and the
|
|
2
|
+
// worker scheduler's admission gate. The unit is the workflow STEP: every step a
|
|
3
|
+
// live run executes bills one (repricing 2026-09, decision 6.1) and rows written
|
|
4
|
+
// inside a run are free (decision 6.2), so a row-writing step costs one step
|
|
5
|
+
// however many rows it writes. The per-run count derived from a manifest is a
|
|
6
|
+
// FLOOR, never a projection: recipe code emits one step per checkpoint (loops
|
|
7
|
+
// multiply) and a retried attempt bills again. Surfaces present these numbers as
|
|
8
|
+
// minimums; observed run history is the honest projection
|
|
9
|
+
// (projectObservedAutomationUsage below).
|
|
9
10
|
import { loopBodyNodeIds } from "./graph/topology.js";
|
|
10
11
|
import { isWorkflowGraphManifest, workflowGraphNodeKindBills, MAX_WORKFLOW_LOOP_ITERATIONS, } from "./graph/types.js";
|
|
11
|
-
const ROW_FANOUT_TOOL_IDS = new Set(["oxygen.rows_upsert"]);
|
|
12
12
|
function isRecord(value) {
|
|
13
13
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
14
14
|
}
|
|
@@ -64,21 +64,6 @@ function manifestHasDynamicRuntimeActions(manifest) {
|
|
|
64
64
|
return graph.nodes.some((node) => node.hasRecipe
|
|
65
65
|
|| (node.kind === "loop" && !node.disabled && declaredLoopIterations(node.maxIterations) === null));
|
|
66
66
|
}
|
|
67
|
-
function manifestWritesRowsPerRun(manifest) {
|
|
68
|
-
if (!isRecord(manifest))
|
|
69
|
-
return false;
|
|
70
|
-
const steps = Array.isArray(manifest.steps) ? manifest.steps : null;
|
|
71
|
-
if (steps) {
|
|
72
|
-
return steps.some((step) => isRecord(step) && step.kind === "tool" && typeof step.tool === "string" && ROW_FANOUT_TOOL_IDS.has(step.tool));
|
|
73
|
-
}
|
|
74
|
-
const graph = readWorkflowGraph(manifest);
|
|
75
|
-
if (graph) {
|
|
76
|
-
return graph.nodes.some((node) => (node.kind === "tool" && typeof node.tool === "string" && ROW_FANOUT_TOOL_IDS.has(node.tool))
|
|
77
|
-
|| node.recipeTools.some((tool) => ROW_FANOUT_TOOL_IDS.has(tool)));
|
|
78
|
-
}
|
|
79
|
-
const toolsUsed = Array.isArray(manifest.tools_used) ? manifest.tools_used : [];
|
|
80
|
-
return toolsUsed.some((tool) => typeof tool === "string" && ROW_FANOUT_TOOL_IDS.has(tool));
|
|
81
|
-
}
|
|
82
67
|
function readWorkflowGraph(manifest) {
|
|
83
68
|
if (!isWorkflowGraphManifest(manifest))
|
|
84
69
|
return null;
|
|
@@ -194,7 +179,7 @@ export function estimateWorkflowAutomationUsage(manifest, cron) {
|
|
|
194
179
|
scheduledRunsPer30Days,
|
|
195
180
|
scheduledActionsPer30DaysFloor: scheduledRunsPer30Days === null ? null : scheduledRunsPer30Days * actionsPerRunFloor,
|
|
196
181
|
dynamicRuntimeActions: manifestHasDynamicRuntimeActions(manifest),
|
|
197
|
-
perRowFanout:
|
|
182
|
+
perRowFanout: false,
|
|
198
183
|
};
|
|
199
184
|
}
|
|
200
185
|
// Fixed 30-day month, minute and hour fields treated independently; timezone
|
|
@@ -279,8 +264,15 @@ const MINUTES_PER_30_DAYS = 43_200;
|
|
|
279
264
|
// Cadence-vs-allowance arithmetic for a cron trigger, using the manifest FLOOR
|
|
280
265
|
// (see the header): the cheapest run this workflow can physically have. A
|
|
281
266
|
// verdict of "impossible" is therefore a lower bound that already overruns the
|
|
282
|
-
//
|
|
283
|
-
//
|
|
267
|
+
// allowance — the real run cost is only ever higher (recipe checkpoints, loops
|
|
268
|
+
// over run-time collections and retries add steps).
|
|
269
|
+
//
|
|
270
|
+
// On the credit basis the allowance is the plan's monthly credits OR the
|
|
271
|
+
// balance the workspace can spend, whichever is larger (proposal P-65): at 0.05
|
|
272
|
+
// a step an every-minute, 5-step cron costs 10,800 credits a month, more than
|
|
273
|
+
// the $99 plan includes, and a workspace that funded that from top-ups must be
|
|
274
|
+
// able to arm it. The fire-time gate charges against the balance, so a funded
|
|
275
|
+
// cron is never paused mid-month either.
|
|
284
276
|
//
|
|
285
277
|
// Returns null when the question is not decidable or not meaningful:
|
|
286
278
|
// no cron (on-demand), an unparseable cron, an unlimited allowance, or overage
|
|
@@ -299,6 +291,16 @@ export function assessCronCadenceViability(input) {
|
|
|
299
291
|
&& input.includedCredits > 0
|
|
300
292
|
? input.includedCredits
|
|
301
293
|
: null;
|
|
294
|
+
const spendableCredits = typeof input.spendableCredits === "number"
|
|
295
|
+
&& Number.isFinite(input.spendableCredits)
|
|
296
|
+
&& input.spendableCredits > 0
|
|
297
|
+
? input.spendableCredits
|
|
298
|
+
: null;
|
|
299
|
+
// A plan without monthly credits (free) is never judged here: its crons run on
|
|
300
|
+
// the balance and the fire-time gate is their only stop, as before.
|
|
301
|
+
const allowanceCredits = includedCredits === null
|
|
302
|
+
? null
|
|
303
|
+
: Math.max(includedCredits, spendableCredits ?? 0);
|
|
302
304
|
// Prefer a real action quota when the plan still has one; otherwise derive the
|
|
303
305
|
// equivalent action budget from monthly credits.
|
|
304
306
|
const basis = input.includedActions === null
|
|
@@ -306,8 +308,8 @@ export function assessCronCadenceViability(input) {
|
|
|
306
308
|
: "plan_action_quota";
|
|
307
309
|
const includedActions = basis === "plan_action_quota"
|
|
308
310
|
? input.includedActions
|
|
309
|
-
: (
|
|
310
|
-
? Math.floor(
|
|
311
|
+
: (allowanceCredits !== null && creditsPerAction !== null
|
|
312
|
+
? Math.floor(allowanceCredits / creditsPerAction)
|
|
311
313
|
: null);
|
|
312
314
|
if (includedActions === null)
|
|
313
315
|
return null;
|
|
@@ -327,6 +329,8 @@ export function assessCronCadenceViability(input) {
|
|
|
327
329
|
floorShareOfIncluded: floorActionsPer30Days / includedActions,
|
|
328
330
|
basis,
|
|
329
331
|
includedCredits: basis === "plan_monthly_credits" ? includedCredits : null,
|
|
332
|
+
spendableCredits: basis === "plan_monthly_credits" ? spendableCredits : null,
|
|
333
|
+
allowanceCredits: basis === "plan_monthly_credits" ? allowanceCredits : null,
|
|
330
334
|
floorCreditsPer30Days: basis === "plan_monthly_credits" && creditsPerAction !== null
|
|
331
335
|
? Math.round(floorActionsPer30Days * creditsPerAction * 1000) / 1000
|
|
332
336
|
: null,
|