@oxygen-agent/cli 1.1014.1874 → 1.1014.1997
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 +1 -1
- package/dist/auto-update.js +3 -3
- package/dist/cli-install.d.ts +65 -0
- package/dist/cli-install.js +165 -0
- package/dist/commands/billing.js +1 -1
- package/dist/commands/managed-inboxes.js +6 -2
- package/dist/commands/sequences.js +1 -1
- package/dist/commands/subscriptions.js +7 -5
- package/dist/update.d.ts +4 -57
- package/dist/update.js +17 -163
- package/node_modules/@oxygen/shared/dist/billing.d.ts +5 -1
- package/node_modules/@oxygen/shared/dist/billing.js +5 -1
- package/node_modules/@oxygen/shared/dist/capability-discovery-skill-audiences.generated.d.ts +30 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery-skill-audiences.generated.js +33 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery-skills.d.ts +39 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery-skills.js +86 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery-types.d.ts +93 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery-types.js +1 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +12 -258
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +123 -3700
- package/node_modules/@oxygen/shared/dist/capability-intents/agency-directory.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/agency-directory.rules.js +5 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/agents.d.ts +10 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/agents.js +53 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/agents.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/agents.rules.js +25 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.d.ts +31 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.js +70 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.rules.js +85 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.d.ts +9 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.js +54 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.rules.js +28 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-integrations.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-integrations.rules.js +23 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.d.ts +43 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.js +90 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.rules.js +58 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-whatsapp.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-whatsapp.rules.js +14 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/geo.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/geo.rules.js +9 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/index.generated.d.ts +365 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/index.generated.js +90 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.d.ts +20 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.js +37 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.rules.js +43 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.d.ts +4 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.js +26 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.rules.js +42 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/messages.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/messages.js +16 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/messages.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/messages.rules.js +68 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/normalize.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/normalize.js +4 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.js +23 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.rules.js +25 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/posts.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/posts.js +12 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/posts.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/posts.rules.js +20 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/publishing.d.ts +86 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/publishing.js +135 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/publishing.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/publishing.rules.js +89 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.d.ts +7 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.js +85 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.rules.js +28 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/recipes.d.ts +7 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/recipes.js +73 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/recipes.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/recipes.rules.js +36 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/records.d.ts +86 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/records.js +240 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/records.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/records.rules.js +71 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.d.ts +27 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.js +67 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.rules.js +115 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sequences.d.ts +71 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sequences.js +150 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sequences.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sequences.rules.js +149 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/signals.d.ts +42 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/signals.js +42 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/signals.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/signals.rules.js +47 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.d.ts +60 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.js +94 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.rules.js +94 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tables.d.ts +196 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tables.js +394 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tables.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tables.rules.js +384 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tags.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tags.rules.js +5 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/visual-rendering.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/visual-rendering.rules.js +8 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workflows.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workflows.js +20 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workflows.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workflows.rules.js +90 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.d.ts +59 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.js +121 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.rules.js +58 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/ads.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/ads.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/agency-directory.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/agency-directory.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/agents.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/agents.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/billing-and-budgets.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/billing-and-budgets.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/collaboration.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/collaboration.js +39 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-integrations.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-integrations.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-linkedin.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-linkedin.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-whatsapp.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-whatsapp.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/dashboards.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/dashboards.js +28 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/discovery-and-skills.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/discovery-and-skills.js +22 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/geo.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/geo.js +13 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/index.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/index.js +64 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/knowledge-graph.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/knowledge-graph.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/linkedin-public-research.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/linkedin-public-research.js +18 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/messages.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/messages.js +21 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/observability.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/observability.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/onboarding-and-copilot.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/onboarding-and-copilot.js +23 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/platform-operations.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/platform-operations.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/posts.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/posts.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/publishing.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/publishing.js +20 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/recipes.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/recipes.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/records.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/records.js +20 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sending-infrastructure.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sending-infrastructure.js +42 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sequences.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sequences.js +32 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/signals.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/signals.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sourcing-and-provider-tools.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sourcing-and-provider-tools.js +21 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/support-and-feedback.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/support-and-feedback.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/tables.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/tables.js +34 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/tags.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/tags.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/visual-rendering.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/visual-rendering.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/workflows.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/workflows.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/workspace-access.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/workspace-access.js +26 -0
- package/node_modules/@oxygen/shared/dist/contracts/connectors.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/customer-operations.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/contracts/operations/agent-sessions.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/agent-sessions.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/browser.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/browser.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/clay-migration.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/clay-migration.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/connectors.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/connectors.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/geo.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/geo.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/guided-activation.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/guided-activation.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/index.generated.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/index.generated.js +26 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/reply-oxygent.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/reply-oxygent.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/sender-limits.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/sender-limits.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/table-feed-update.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/table-feed-update.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/teammates.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/teammates.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-pages.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-pages.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-skills.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-skills.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations.js +7 -15
- package/node_modules/@oxygen/shared/dist/contracts/sender-limits.js +1 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage-lock.js +33 -22
- package/node_modules/@oxygen/shared/dist/diagnostics.js +11 -8
- package/node_modules/@oxygen/shared/dist/first-month-offer-window.d.ts +3 -0
- package/node_modules/@oxygen/shared/dist/first-month-offer.d.ts +15 -7
- package/node_modules/@oxygen/shared/dist/first-month-offer.js +23 -9
- package/node_modules/@oxygen/shared/dist/guided-activation.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/listed-website-platforms.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/listed-website-platforms.js +23 -1
- package/node_modules/@oxygen/shared/dist/log.d.ts +4 -0
- package/node_modules/@oxygen/shared/dist/log.js +4 -0
- package/node_modules/@oxygen/shared/dist/onboarding-leads.d.ts +67 -0
- package/node_modules/@oxygen/shared/dist/onboarding-leads.js +78 -0
- package/node_modules/@oxygen/shared/dist/onboarding-research.d.ts +19 -0
- package/node_modules/@oxygen/shared/dist/onboarding-research.js +33 -0
- package/node_modules/@oxygen/shared/dist/otlp-log-sink.js +20 -0
- package/node_modules/@oxygen/shared/dist/plan-capabilities.js +1 -1
- package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +2 -2
- package/node_modules/@oxygen/shared/dist/plan-limits.js +6 -7
- package/node_modules/@oxygen/shared/dist/sending-domain-faults.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/sending-domain-faults.js +1 -1
- package/node_modules/@oxygen/shared/dist/tenant-migration-names.d.ts +5 -0
- package/node_modules/@oxygen/shared/dist/tenant-migration-names.js +8 -0
- 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/workflows/dist/graph/lint.d.ts +1 -1
- package/node_modules/@oxygen/workflows/dist/graph/lint.js +4 -3
- package/node_modules/@oxygen/workflows/dist/index.d.ts +2 -59
- package/node_modules/@oxygen/workflows/dist/index.js +4 -904
- package/node_modules/@oxygen/workflows/dist/manifest-validation.d.ts +75 -0
- package/node_modules/@oxygen/workflows/dist/manifest-validation.js +903 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/auto-update.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
2
2
|
import { type CliEndpoint } from "./runtime.js";
|
|
3
|
-
import { type UpdateOptions } from "./
|
|
3
|
+
import { type UpdateOptions } from "./cli-install.js";
|
|
4
4
|
export declare const AUTO_UPDATE_DISABLE_ENV = "OXYGEN_NO_AUTO_UPDATE";
|
|
5
5
|
/** Set on the re-run after a floor-driven update; stops a second attempt. */
|
|
6
6
|
export declare const AUTO_UPDATED_FROM_ENV = "OXYGEN_CLI_AUTO_UPDATED";
|
package/dist/auto-update.js
CHANGED
|
@@ -7,7 +7,7 @@ import { isVersionGreater, parseSemver } from "@oxygen/shared/semver";
|
|
|
7
7
|
import { OXYGEN_VERSION } from "@oxygen/shared/version";
|
|
8
8
|
import { resolveConfigDir } from "./credentials.js";
|
|
9
9
|
import { resolveCliBinaryName, resolveCliUpdateGuidance } from "./runtime.js";
|
|
10
|
-
import { detectCliInstall,
|
|
10
|
+
import { detectCliInstall, installCliPackage, readInstalledCliVersion } from "./cli-install.js";
|
|
11
11
|
// The npm `oxygen` CLI keeps itself current in two ways:
|
|
12
12
|
//
|
|
13
13
|
// 1. Floor rejection (reactive). When the API refuses this CLI with
|
|
@@ -162,7 +162,7 @@ export async function recoverFromCliFloorRejection(error, endpoint, runtime = {}
|
|
|
162
162
|
const minimum = readMinimumCliVersion(error);
|
|
163
163
|
stderr(`[oxygen] CLI ${OXYGEN_VERSION} is older than this API accepts${minimum ? ` (minimum ${minimum})` : ""}; updating automatically...\n`);
|
|
164
164
|
const now = runtime.now ?? (() => new Date());
|
|
165
|
-
const update = runtime.update ?? ((options) =>
|
|
165
|
+
const update = runtime.update ?? ((options) => installCliPackage(options, { env }));
|
|
166
166
|
const state = readAutoUpdateState(env);
|
|
167
167
|
const fail = (reason, extra = {}) => {
|
|
168
168
|
writeAutoUpdateState({
|
|
@@ -314,7 +314,7 @@ export async function runBackgroundUpdate(runtime = {}) {
|
|
|
314
314
|
writeAutoUpdateState(checked, env);
|
|
315
315
|
return { action: "up_to_date", latest };
|
|
316
316
|
}
|
|
317
|
-
const update = runtime.update ?? ((options) =>
|
|
317
|
+
const update = runtime.update ?? ((options) => installCliPackage(options, { env }));
|
|
318
318
|
try {
|
|
319
319
|
await update({ json: true, skipSkillsInstall: true, package: `${CLI_PACKAGE_NAME}@${latest}` });
|
|
320
320
|
const installed = readInstalledVersion(runtime);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
type SpawnResult = ReturnType<typeof spawnSync>;
|
|
3
|
+
type SpawnSyncLike = (command: string, args: string[], options: {
|
|
4
|
+
encoding: BufferEncoding;
|
|
5
|
+
env: NodeJS.ProcessEnv;
|
|
6
|
+
stdio: "inherit" | ["ignore", "pipe", "pipe"];
|
|
7
|
+
windowsHide: boolean;
|
|
8
|
+
windowsVerbatimArguments?: boolean;
|
|
9
|
+
}) => SpawnResult;
|
|
10
|
+
export type UpdateOptions = {
|
|
11
|
+
json?: boolean;
|
|
12
|
+
package?: string;
|
|
13
|
+
dryRun?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Leave the skills refresh to the newly installed binary. An automatic update
|
|
16
|
+
* runs inside the OLD process, which the API may be refusing outright — its
|
|
17
|
+
* own skills request would be rejected for the very version being replaced.
|
|
18
|
+
*/
|
|
19
|
+
skipSkillsInstall?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type CliInstallResult = {
|
|
22
|
+
current_version: string;
|
|
23
|
+
/** Read back from the installed package after npm finished; null when unknown. */
|
|
24
|
+
installed_version?: string | null;
|
|
25
|
+
package: string;
|
|
26
|
+
command: string;
|
|
27
|
+
dry_run: boolean;
|
|
28
|
+
updated: boolean;
|
|
29
|
+
};
|
|
30
|
+
export type CliInstallRuntime = {
|
|
31
|
+
env?: NodeJS.ProcessEnv;
|
|
32
|
+
platform?: NodeJS.Platform;
|
|
33
|
+
argv?: readonly string[];
|
|
34
|
+
modulePath?: string;
|
|
35
|
+
spawnSync?: SpawnSyncLike;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Replace the running CLI package with npm. The skills refresh that `oxygen
|
|
39
|
+
* update` adds on top lives in update.ts; the automatic update paths call this
|
|
40
|
+
* directly, since they always leave that refresh to the new binary.
|
|
41
|
+
*/
|
|
42
|
+
export declare function installCliPackage(options: UpdateOptions, runtime?: CliInstallRuntime): Promise<CliInstallResult>;
|
|
43
|
+
export type CliInstall =
|
|
44
|
+
/** `npm install -g`: npm can replace it in place with `--prefix`. */
|
|
45
|
+
{
|
|
46
|
+
kind: "global";
|
|
47
|
+
prefix: string;
|
|
48
|
+
packageDir: string;
|
|
49
|
+
}
|
|
50
|
+
/** A project's own node_modules (npx, `npm install` in a directory, a pinned capsule). */
|
|
51
|
+
| {
|
|
52
|
+
kind: "local";
|
|
53
|
+
projectDir: string;
|
|
54
|
+
packageDir: string;
|
|
55
|
+
}
|
|
56
|
+
/** Running from a source checkout. */
|
|
57
|
+
| {
|
|
58
|
+
kind: "source";
|
|
59
|
+
};
|
|
60
|
+
export declare function detectCliInstall(modulePath: string): CliInstall;
|
|
61
|
+
export declare function detectCliInstallPrefixFromPath(modulePath: string): string | null;
|
|
62
|
+
/** The version npm actually left on disk for the running package. */
|
|
63
|
+
export declare function readInstalledCliVersion(packageDir: string): string | null;
|
|
64
|
+
export declare function resolveNpmExecutables(platform?: NodeJS.Platform): string[];
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// The npm side of updating the CLI: where the running package is installed and
|
|
2
|
+
// how to replace it. A leaf below update.ts (which adds the skills refresh) and
|
|
3
|
+
// auto-update.ts (whose floor recovery runs inside requestOxygen), so the HTTP
|
|
4
|
+
// client never reaches the skills installer that itself calls the HTTP client.
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
import { readFileSync } from "node:fs";
|
|
7
|
+
import { join } from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
10
|
+
import { OXYGEN_VERSION } from "@oxygen/shared/version";
|
|
11
|
+
import { resolveCliBinaryName } from "./runtime.js";
|
|
12
|
+
import { readOption } from "./util.js";
|
|
13
|
+
import { quoteWindowsCmdArg } from "./windows-shim.js";
|
|
14
|
+
const DEFAULT_CLI_PACKAGE_SPEC = "@oxygen-agent/cli@latest";
|
|
15
|
+
/**
|
|
16
|
+
* Replace the running CLI package with npm. The skills refresh that `oxygen
|
|
17
|
+
* update` adds on top lives in update.ts; the automatic update paths call this
|
|
18
|
+
* directly, since they always leave that refresh to the new binary.
|
|
19
|
+
*/
|
|
20
|
+
// skipcq: JS-R1005 — handles platform/install-mode/dry-run combinations end-to-end
|
|
21
|
+
export async function installCliPackage(options, runtime = {}) {
|
|
22
|
+
const env = runtime.env ?? process.env;
|
|
23
|
+
const platform = runtime.platform ?? process.platform;
|
|
24
|
+
const spawn = runtime.spawnSync ?? spawnSync;
|
|
25
|
+
const packageSpec = readOption(options.package) ?? DEFAULT_CLI_PACKAGE_SPEC;
|
|
26
|
+
const modulePath = runtime.modulePath ?? fileURLToPath(import.meta.url);
|
|
27
|
+
const install = detectCliInstall(modulePath);
|
|
28
|
+
const prefix = install.kind === "global" ? install.prefix : null;
|
|
29
|
+
const args = prefix
|
|
30
|
+
? ["install", "-g", "--prefix", prefix, packageSpec]
|
|
31
|
+
: ["install", "-g", packageSpec];
|
|
32
|
+
// The command string is for human display (printed in dry-run / success
|
|
33
|
+
// output). Quote args that contain shell-significant characters so a
|
|
34
|
+
// copy-paste of the line works on install prefixes with spaces.
|
|
35
|
+
const command = ["npm", ...args].map(quoteForDisplay).join(" ");
|
|
36
|
+
if (!options.dryRun)
|
|
37
|
+
assertUpdatableInstall(install, env, runtime.argv ?? process.argv);
|
|
38
|
+
if (options.dryRun) {
|
|
39
|
+
return {
|
|
40
|
+
current_version: OXYGEN_VERSION,
|
|
41
|
+
package: packageSpec,
|
|
42
|
+
command,
|
|
43
|
+
dry_run: true,
|
|
44
|
+
updated: false,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const attemptedExecutables = [];
|
|
48
|
+
let lastResult = null;
|
|
49
|
+
for (const invocation of resolveNpmInvocations(args, platform, env)) {
|
|
50
|
+
attemptedExecutables.push(invocation.label);
|
|
51
|
+
const result = spawn(invocation.executable, invocation.args, {
|
|
52
|
+
encoding: "utf8",
|
|
53
|
+
env,
|
|
54
|
+
stdio: options.json ? ["ignore", "pipe", "pipe"] : "inherit",
|
|
55
|
+
windowsHide: true,
|
|
56
|
+
// We pre-quote args for `cmd /d /s /c`; Node must not re-escape them
|
|
57
|
+
// or the install prefix path ends up with literal `"` characters
|
|
58
|
+
// baked in (see scripts/ci/cli-package-smoke.mjs for the same fix).
|
|
59
|
+
...(platform === "win32" ? { windowsVerbatimArguments: true } : {}),
|
|
60
|
+
});
|
|
61
|
+
lastResult = result;
|
|
62
|
+
if (result.error && isMissingExecutableError(result.error))
|
|
63
|
+
continue;
|
|
64
|
+
if (!result.error && result.status === 0) {
|
|
65
|
+
return {
|
|
66
|
+
current_version: OXYGEN_VERSION,
|
|
67
|
+
installed_version: install.kind === "global" ? readInstalledCliVersion(install.packageDir) : null,
|
|
68
|
+
package: packageSpec,
|
|
69
|
+
command,
|
|
70
|
+
dry_run: false,
|
|
71
|
+
updated: true,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
const result = lastResult;
|
|
77
|
+
throw new OxygenError("cli_update_failed", "Unable to update the Oxygen CLI.", {
|
|
78
|
+
details: {
|
|
79
|
+
command,
|
|
80
|
+
package: packageSpec,
|
|
81
|
+
exit_code: result?.status ?? null,
|
|
82
|
+
reason: result?.error instanceof Error ? result.error.message : null,
|
|
83
|
+
stderr: typeof result?.stderr === "string" && result.stderr.trim() ? result.stderr.trim().slice(0, 4000) : null,
|
|
84
|
+
attempted_executables: attemptedExecutables,
|
|
85
|
+
},
|
|
86
|
+
exitCode: 1,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
export function detectCliInstall(modulePath) {
|
|
90
|
+
const normalizedPath = modulePath.replace(/\\/g, "/");
|
|
91
|
+
const markers = [
|
|
92
|
+
"/node_modules/@oxygen-agent/cli/dist/",
|
|
93
|
+
"/node_modules/@oxygen/cli/dist/",
|
|
94
|
+
];
|
|
95
|
+
for (const marker of markers) {
|
|
96
|
+
const markerIndex = normalizedPath.lastIndexOf(marker);
|
|
97
|
+
if (markerIndex === -1)
|
|
98
|
+
continue;
|
|
99
|
+
const packageParent = normalizedPath.slice(0, markerIndex);
|
|
100
|
+
const packageDir = normalizedPath.slice(0, markerIndex + marker.length - "/dist/".length);
|
|
101
|
+
if (packageParent.endsWith("/lib")) {
|
|
102
|
+
return { kind: "global", prefix: packageParent.slice(0, -"/lib".length), packageDir };
|
|
103
|
+
}
|
|
104
|
+
// npm's Windows global layout has no lib/: <prefix>\node_modules.
|
|
105
|
+
if (/^[A-Za-z]:\//.test(normalizedPath))
|
|
106
|
+
return { kind: "global", prefix: packageParent, packageDir };
|
|
107
|
+
// Anywhere else, `npm install -g --prefix <dir>` writes <dir>/lib/node_modules — a
|
|
108
|
+
// different tree from the one running — and reports success while nothing changed.
|
|
109
|
+
return { kind: "local", projectDir: packageParent, packageDir };
|
|
110
|
+
}
|
|
111
|
+
return { kind: "source" };
|
|
112
|
+
}
|
|
113
|
+
export function detectCliInstallPrefixFromPath(modulePath) {
|
|
114
|
+
const install = detectCliInstall(modulePath);
|
|
115
|
+
return install.kind === "global" ? install.prefix : null;
|
|
116
|
+
}
|
|
117
|
+
/** The version npm actually left on disk for the running package. */
|
|
118
|
+
export function readInstalledCliVersion(packageDir) {
|
|
119
|
+
try {
|
|
120
|
+
const parsed = JSON.parse(readFileSync(join(packageDir, "package.json"), "utf8"));
|
|
121
|
+
return typeof parsed.version === "string" ? parsed.version : null;
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function assertUpdatableInstall(install, env, argv) {
|
|
128
|
+
if (resolveCliBinaryName(env, argv) === "oxygen-dev") {
|
|
129
|
+
throw new OxygenError("cli_update_unsupported_install", "oxygen-dev is built from the dev branch, not installed from npm. "
|
|
130
|
+
+ "Rebuild it with `npm run install-dev-cli` from the latest dev checkout.", { details: { install: "dev_build", update_command: "npm run install-dev-cli" }, exitCode: 1 });
|
|
131
|
+
}
|
|
132
|
+
if (install.kind === "local") {
|
|
133
|
+
throw new OxygenError("cli_update_unsupported_install", `This Oxygen CLI runs from a project-local install in ${install.projectDir}, which \`oxygen update\` cannot replace. `
|
|
134
|
+
+ "Run `npm install @oxygen-agent/cli@latest` in that directory, or install globally with "
|
|
135
|
+
+ "`npm install -g @oxygen-agent/cli`.", {
|
|
136
|
+
details: {
|
|
137
|
+
install: "local",
|
|
138
|
+
install_dir: install.projectDir,
|
|
139
|
+
update_command: "npm install @oxygen-agent/cli@latest",
|
|
140
|
+
},
|
|
141
|
+
exitCode: 1,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
export function resolveNpmExecutables(platform = process.platform) {
|
|
146
|
+
return platform === "win32" ? ["cmd.exe"] : ["npm"];
|
|
147
|
+
}
|
|
148
|
+
function isMissingExecutableError(error) {
|
|
149
|
+
return error.code === "ENOENT";
|
|
150
|
+
}
|
|
151
|
+
function resolveNpmInvocations(args, platform, env) {
|
|
152
|
+
if (platform !== "win32")
|
|
153
|
+
return [{ executable: "npm", args, label: "npm" }];
|
|
154
|
+
const shell = env.ComSpec?.trim() || "cmd.exe";
|
|
155
|
+
return [{
|
|
156
|
+
executable: shell,
|
|
157
|
+
args: ["/d", "/s", "/c", ["npm", ...args].map(quoteWindowsCmdArg).join(" ")],
|
|
158
|
+
label: shell,
|
|
159
|
+
}];
|
|
160
|
+
}
|
|
161
|
+
function quoteForDisplay(value) {
|
|
162
|
+
if (/^[A-Za-z0-9_@+=:,./-]+$/.test(value))
|
|
163
|
+
return value;
|
|
164
|
+
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
165
|
+
}
|
package/dist/commands/billing.js
CHANGED
|
@@ -62,7 +62,7 @@ export function registerBillingFamily(program, handleAsyncAction, billingDocsUrl
|
|
|
62
62
|
.command("billing")
|
|
63
63
|
.description("Plan and managed credit commands. Credits reserved but not yet charged are listed hold by hold with `billing usage --meter holds`. Spend splits into FLEXIBLE (ad-hoc: enrichment, AI, automation — drawn from your free-to-spend balance) and FIXED recurring per-resource monthly commitments blocked out of it; see `billing commitments`. THREE CLOCKS, deliberately different: the CREDIT CYCLE that `billing allowance` reports against (your plan's monthly grant window); each resource's own COMMITMENT RENEWAL, anchored to the day you connected it, so `billing commitments --json` next_due_at rarely matches the cycle end; and your SUBSCRIPTION PERIOD in `billing balance` (annual plans span many credit cycles). A number from one clock will not reconcile against another. On a plan that pays for several workspaces, `billing usage --group-by workspace` totals what each one spent. To price a month of outreach before building it (leads, enrichment, sequence steps, senders), run `billing estimate`. Failed-payment grace, suspension, and recovery: " + billingDocsUrl + ".")
|
|
64
64
|
.addCommand(new Command("change")
|
|
65
|
-
.description("Create an approval link (`approval_url`) to start or change a plan; no charge or plan change until confirmation. First purchase needs an admin/owner; existing-plan changes allow any unrestricted member. Compare all six prices, credits and yearly terms with `billing balance` first. Use --interval year --term year to pay the full discounted year upfront: the $99 plan costs $990 per year before tax. Credits arrive monthly during the paid year. On a workspace that has never had a plan, the Checkout for any monthly plan from $
|
|
65
|
+
.description("Create an approval link (`approval_url`) to start or change a plan; no charge or plan change until confirmation. First purchase needs an admin/owner; existing-plan changes allow any unrestricted member. Compare all six prices, credits and yearly terms with `billing balance` first. Use --interval year --term year to pay the full discounted year upfront: the $99 plan costs $990 per year before tax. Credits arrive monthly during the paid year. On a workspace that has never had a plan, the Checkout for any monthly plan from $49 up carries the first-month offer, half its first month, while its 24-hour window is open (`offer`; `billing balance` lists every size under `first_month_offer.plans`): `amount_due_now` is then the discounted first month and `next_invoice_total` the regular price, both before tax. Creating that Checkout starts the window if nothing has started it yet. `first_month_offer` says whether the offer covers the chosen plan (`applies`) and names the plan it does cover (`plan`, the $99 plan by default: $49 for its first month); a term it misses (yearly) still gets its own Checkout, so relay the offer before the human pays. Prepaid yearly upgrades apply immediately with proration; downgrades and switching to monthly wait until the paid year ends. Switching from monthly to yearly starts at the next paid-period boundary. Existing yearly installment plans keep their payments until conversion at the yearly commitment end. Omit interval and term to preserve the current contract. For an existing subscription, a yearly preview returns charges, start and term-end dates; nothing changes until separate confirmation.")
|
|
66
66
|
.requiredOption("--to <plan>",
|
|
67
67
|
// Derived from the catalog, never retyped: this help text is the only
|
|
68
68
|
// place a customer's agent learns which plans exist, and it named
|
|
@@ -86,7 +86,7 @@ function buildManagedInboxMailboxes(options, forms) {
|
|
|
86
86
|
export function registerManagedInboxesFamily(program, handleAsyncAction) {
|
|
87
87
|
program.addCommand(new Command("managed-inboxes")
|
|
88
88
|
.addCommand(new Command("recover")
|
|
89
|
-
.description("Restore a cancelled managed subscription using its original addresses and domain. Find candidates with managed-inboxes list --status cancelled --json. Without --approved, performs a read-only preview at 0 credits: eligibility, upfront credits, recurring charges and a quote_id. Review the preview, then use --approved --quote <id> --max-credits <n>. Interrupted provider attempts are inspected before any repeat. After provider recovery, verify sending authorization and warmup for the exact recovered mailboxes. If warmup is disabled, preview enrollment and review its scope and costs before approving it.")
|
|
89
|
+
.description("Restore a cancelled managed subscription using its original addresses and domain, or adopt the inboxes the provider revived on a failed order (managed-inboxes verify lists them as vendor_revived_mailboxes). Find candidates with managed-inboxes list --status cancelled --json. Without --approved, performs a read-only preview at 0 credits: eligibility, upfront credits, recurring charges and a quote_id. Review the preview, then use --approved --quote <id> --max-credits <n>. Interrupted provider attempts are inspected before any repeat. After provider recovery, verify sending authorization and warmup for the exact recovered mailboxes. If warmup is disabled, preview enrollment and review its scope and costs before approving it.")
|
|
90
90
|
.argument("<domain>", "The cancelled managed sending domain")
|
|
91
91
|
.option("--approved", "Execute the reviewed recovery quote", false)
|
|
92
92
|
.option("--quote <id>", "quote_id from the recovery preview")
|
|
@@ -223,7 +223,7 @@ export function registerManagedInboxesFamily(program, handleAsyncAction) {
|
|
|
223
223
|
});
|
|
224
224
|
}))
|
|
225
225
|
.addCommand(new Command("add-inboxes")
|
|
226
|
-
.description("Add mailboxes to a managed domain you ALREADY own — no new domain is registered and there is NO domain registration charge, only the extra inboxes' monthly rate (plus their add-ons). WITHOUT --approved this prints a priced PREVIEW with a quote_id and orders nothing; re-run with --approved --quote <id> to place the order. When the standing OXYGEN Warm-up add-on is enabled and available, preview and approved responses carry `warmup_activation` for only the exact newly added `mailboxes`, with `scope=warmup_only`; it is null when warmup is disabled or unavailable. For InboxKit, Google carries `transport=inboxkit_managed_google_handoff`; Microsoft/Azure carries `transport=inboxkit_sequencer_export`. Both carry `mailbox_credentials_required=false` and `native_send_oauth_separate=true`, so managed warm-up needs no customer-supplied OAuth or mailbox password. Google retrieves the existing managed credential only during activation and never persists or returns it; Microsoft/Azure uses native export. Native sending authorization is separate and may still be required before OXYGEN can send. Verify each exact address with `mailboxes oauth-health --json`; InboxKit's unattended Google domain approval usually lands within minutes and the worker keeps retrying, so a waiting row is not a reason to ask the customer to sign in. The quote authorizes automatic OXYGEN Warm-up activation after provisioning, so do not run a second warmup approval. Capped per domain by the
|
|
226
|
+
.description("Add mailboxes to a managed domain you ALREADY own — no new domain is registered and there is NO domain registration charge, only the extra inboxes' monthly rate (plus their add-ons). WITHOUT --approved this prints a priced PREVIEW with a quote_id and orders nothing; re-run with --approved --quote <id> to place the order. When the standing OXYGEN Warm-up add-on is enabled and available, preview and approved responses carry `warmup_activation` for only the exact newly added `mailboxes`, with `scope=warmup_only`; it is null when warmup is disabled or unavailable. For InboxKit, Google carries `transport=inboxkit_managed_google_handoff`; Microsoft/Azure carries `transport=inboxkit_sequencer_export`. Both carry `mailbox_credentials_required=false` and `native_send_oauth_separate=true`, so managed warm-up needs no customer-supplied OAuth or mailbox password. Google retrieves the existing managed credential only during activation and never persists or returns it; Microsoft/Azure uses native export. Native sending authorization is separate and may still be required before OXYGEN can send. Verify each exact address with `mailboxes oauth-health --json`; InboxKit's unattended Google domain approval usually lands within minutes and the worker keeps retrying, so a waiting row is not a reason to ask the customer to sign in. The quote authorizes automatic OXYGEN Warm-up activation after provisioning, so do not run a second warmup approval. Capped per domain by the domain's saved inbox limit, if any, and the platform it was bought on (5 google/microsoft, 100 azure), COUNTING the inboxes already on it; --max-per-domain changes the saved limit with this order. To register a NEW domain use `managed-inboxes subscribe` instead.")
|
|
227
227
|
.argument("[domain]", "A managed domain this workspace already owns (e.g. send.acme.com). May also be passed as --domain.")
|
|
228
228
|
.option("--domain <domain>", "The managed inbox domain (alternative to the positional argument).")
|
|
229
229
|
.option("--sender <id>", "Sender profile id (from `oxygen senders profiles list`) that OWNS every mailbox in this order: its first name, last name, and profile picture are stamped on each one, so you never retype them. A sender profile is one person's sending identity — their LinkedIn/WhatsApp accounts and email inboxes under one name and photo. One sender can own several natural addresses on the same domain (see --locals); do not invent people or pad a requested count with numbered aliases. Any first_name/last_name/profile_picture_url in --mailboxes/--file is dropped for the sender's own values.")
|
|
@@ -232,6 +232,7 @@ export function registerManagedInboxesFamily(program, handleAsyncAction) {
|
|
|
232
232
|
.option("--file <path>", "Path to a JSON file { \"mailboxes\": [...] } (alternative to --mailboxes).")
|
|
233
233
|
.addOption(new Option("--count <n>", "Retired: choose natural addresses with --locals and --sender.").hideHelp())
|
|
234
234
|
.addOption(new Option("--prefix <base>", "Retired: provide reviewed natural local parts through --locals or --mailboxes.").hideHelp())
|
|
235
|
+
.option("--max-per-domain <n>", "Raise or lower this domain's saved inbox limit with the order (e.g. 3), counting existing, pending and historical addresses; never above the platform cap. The preview shows the old and new limit and saves nothing; repeat it with --approved.")
|
|
235
236
|
.option("--approved", "Place the order (requires --quote). Without it, a priced preview is returned.")
|
|
236
237
|
.option("--quote <id>", "The quote_id from a fresh preview. Required with --approved.")
|
|
237
238
|
.option("--json", "Print a JSON envelope.")
|
|
@@ -240,6 +241,8 @@ export function registerManagedInboxesFamily(program, handleAsyncAction) {
|
|
|
240
241
|
const domain = requireDomainArg(domainArg, options.domain);
|
|
241
242
|
const mailboxes = buildManagedInboxMailboxes(options, { countPrefix: true });
|
|
242
243
|
const quote = readOption(options.quote);
|
|
244
|
+
// Parsed here so a typo is refused, not sent as null and silently dropped.
|
|
245
|
+
const maxPerDomain = readPositiveInt(options.maxPerDomain);
|
|
243
246
|
// Refuse locally rather than spending a round trip on a PAID path: the
|
|
244
247
|
// route requires the quote that priced this exact expansion, so
|
|
245
248
|
// `--approved` alone can only ever come back as a 400.
|
|
@@ -257,6 +260,7 @@ export function registerManagedInboxesFamily(program, handleAsyncAction) {
|
|
|
257
260
|
// sugar, so the server sees exactly one shape and the preview it
|
|
258
261
|
// prices is the list that gets ordered.
|
|
259
262
|
mailboxes,
|
|
263
|
+
...(maxPerDomain !== undefined ? { max_mailboxes_per_domain: maxPerDomain } : {}),
|
|
260
264
|
...(options.approved ? { approved: true } : {}),
|
|
261
265
|
...(quote ? { quote_id: quote } : {}),
|
|
262
266
|
},
|
|
@@ -2050,7 +2050,7 @@ export function registerSequencesFamily(program, handleAsyncAction) {
|
|
|
2050
2050
|
.argument("<sequence>", "Sequence id or slug.")
|
|
2051
2051
|
.option("--approved", "Approve and activate live. Without this flag, returns a preview only, including copy_preview rendered samples and blockers.")
|
|
2052
2052
|
.option("--max-credits <n>", "Optional credit ceiling (0 or more); 0 approves no credit spend and is refused when AI-written comments bill per draft. Guided LinkedIn also needs a positive action ceiling and the exact launch review.")
|
|
2053
|
-
.option("--max-live-sends <n>", "Total live-send and CRM-write ceiling across channels, including LinkedIn invites/messages (positive integer). Required for email, WhatsApp, or crm_task steps; guided LinkedIn binds its positive cap in launch_review.")
|
|
2053
|
+
.option("--max-live-sends <n>", "Total live-send and CRM-write ceiling across channels, including LinkedIn invites/messages (positive integer). Required for email, WhatsApp, or crm_task steps; guided LinkedIn binds its positive cap in launch_review. For a sending-domain newsletter pass the preview's sending_domain.max_sends, which covers the whole audience.")
|
|
2054
2054
|
.option("--launch-review-json <json>", "Guided onboarding: echo the exact preview.launch_review (digest, expiry, positive action ceiling and nonnegative credit cap). Changed inputs require a new preview.")
|
|
2055
2055
|
.option("--launch-review-file <path>", "Read the exact launch_review object from a JSON file instead of --launch-review-json.")
|
|
2056
2056
|
.option("--at <time>", "Schedule a draft's start: an ISO timestamp with a timezone (2026-11-02T09:00:00Z) or \"in 30m\" / \"in 2h\" / \"in 3d\", at most 30 days ahead. With --approved it activates now and sends nothing before then (lifecycle scheduled); cancel with `sequences unschedule`.")
|
|
@@ -129,7 +129,7 @@ async function runSubscriptionsImport(options) {
|
|
|
129
129
|
const evidence = evidenceBody(options);
|
|
130
130
|
const chunks = chunkContactImport(entries);
|
|
131
131
|
let last = {};
|
|
132
|
-
const totals = { received: 0, created: 0, updated: 0, unchanged: 0, kept_cleaned: 0, people_written: 0, people_matched: 0 };
|
|
132
|
+
const totals = { received: 0, created: 0, updated: 0, unchanged: 0, kept_cleaned: 0, kept_unsubscribed: 0, people_written: 0, people_matched: 0 };
|
|
133
133
|
const invalid = [];
|
|
134
134
|
let offset = 0;
|
|
135
135
|
for (const chunk of chunks) {
|
|
@@ -161,6 +161,8 @@ async function runSubscriptionsImport(options) {
|
|
|
161
161
|
changed: written > 0,
|
|
162
162
|
effect_outcome: written > 0 ? (invalid.length > 0 ? "partial" : "applied") : totals.received === 0 ? "no_data" : "no_change",
|
|
163
163
|
message: `${written} of ${totals.received} addresses changed on ${list} in ${chunks.length} call(s)`
|
|
164
|
+
+ (totals.kept_unsubscribed > 0 ? `; ${totals.kept_unsubscribed} who unsubscribed stayed unsubscribed` : "")
|
|
165
|
+
+ (totals.kept_cleaned > 0 ? `; ${totals.kept_cleaned} cleaned by a complaint or bounce stayed off` : "")
|
|
164
166
|
+ (ignored.length > 0 ? `; columns that are not contact properties were skipped: ${ignored.join(", ")}` : "")
|
|
165
167
|
+ ".",
|
|
166
168
|
};
|
|
@@ -329,7 +331,7 @@ export function registerSubscriptionsFamily(program, handleAsyncAction) {
|
|
|
329
331
|
await handleAsyncAction("subscriptions get", options, () => requestOxygen(`/api/cli/subscriptions?${new URLSearchParams({ email }).toString()}`));
|
|
330
332
|
}))
|
|
331
333
|
.addCommand(addEvidenceFlags(new Command("set")
|
|
332
|
-
.description("Set one address's status on one list and record the consent event. Subscribing needs evidence.")
|
|
334
|
+
.description("Set one address's status on one list and record the consent event. Subscribing needs evidence. An address that unsubscribed or was cleaned cannot be subscribed again here, whatever the evidence: only they can, from the preference page linked in any newsletter they received.")
|
|
333
335
|
.argument("<email>", "Email address.")
|
|
334
336
|
.requiredOption("--list <key-or-id>", "Subscription list key or id.")
|
|
335
337
|
.requiredOption("--status <status>", "subscribed, unsubscribed, pending or cleaned.")
|
|
@@ -339,7 +341,7 @@ export function registerSubscriptionsFamily(program, handleAsyncAction) {
|
|
|
339
341
|
await handleAsyncAction("subscriptions set", options, () => runSubscriptionsSet(email, options));
|
|
340
342
|
}))
|
|
341
343
|
.addCommand(addEvidenceFlags(new Command("import")
|
|
342
|
-
.description("Import addresses onto one list under one consent evidence record. --file is JSON (emails or { email, first_name, last_name, properties }) or CSV with an email column; first_name, last_name and contact-property columns go to each person on Records People (created or matched by email). Large files are sent in batches. Addresses cleaned by a complaint or hard bounce
|
|
344
|
+
.description("Import addresses onto one list under one consent evidence record. --file is JSON (emails or { email, first_name, last_name, properties }) or CSV with an email column; first_name, last_name and contact-property columns go to each person on Records People (created or matched by email). Large files are sent in batches. Addresses that unsubscribed or were cleaned by a complaint or hard bounce keep that status and are counted (kept_unsubscribed, kept_cleaned); invalid rows are reported by index.")
|
|
343
345
|
.requiredOption("--list <key-or-id>", "Subscription list key or id.")
|
|
344
346
|
.requiredOption("--file <path>", "JSON or CSV file of addresses.")
|
|
345
347
|
.requiredOption("--source <source>", "Where these addresses came from, e.g. webinar_2026_10.")
|
|
@@ -381,7 +383,7 @@ function registerContactsCommands(handleAsyncAction) {
|
|
|
381
383
|
await handleAsyncAction("subscriptions contacts list", options, () => runContactsList(options));
|
|
382
384
|
}))
|
|
383
385
|
.addCommand(addEvidenceFlags(addContactFieldFlags(new Command("add")
|
|
384
|
-
.description("Add one contact to a list by hand, with consent evidence (--note says where consent came from), and write its name and properties to Records People.")
|
|
386
|
+
.description("Add one contact to a list by hand, with consent evidence (--note says where consent came from), and write its name and properties to Records People. An address that unsubscribed or was cleaned is refused and nothing is written.")
|
|
385
387
|
.argument("<email>", "Email address."))
|
|
386
388
|
.option("--status <status>", "Status to set (default subscribed).")
|
|
387
389
|
.option("--source <source>", "Where this contact came from (default manual).")
|
|
@@ -398,7 +400,7 @@ function registerContactsCommands(handleAsyncAction) {
|
|
|
398
400
|
await handleAsyncAction("subscriptions contacts edit", options, () => runContactsEdit(email, options));
|
|
399
401
|
}))
|
|
400
402
|
.addCommand(new Command("remove")
|
|
401
|
-
.description("Remove a contact from a list. Its consent history is kept and its Records person is untouched; to stop mail but keep it listed, use subscriptions set --status unsubscribed.")
|
|
403
|
+
.description("Remove a subscribed or pending contact from a list. Its consent history is kept and its Records person is untouched; to stop mail but keep it listed, use subscriptions set --status unsubscribed. An unsubscribed or cleaned contact cannot be removed: it stays as the list's record of the opt-out.")
|
|
402
404
|
.argument("<email>", "Email address.")
|
|
403
405
|
.requiredOption("--list <key-or-id>", "Subscription list key or id.")
|
|
404
406
|
.option("--json", "Print a JSON envelope.")
|
package/dist/update.d.ts
CHANGED
|
@@ -1,62 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type CliInstallResult, type CliInstallRuntime, type UpdateOptions } from "./cli-install.js";
|
|
2
2
|
import { type AutomaticSkillsInstallResult, type ExecFileSyncLike, type SkillsSourceRuntime } from "./skills.js";
|
|
3
|
-
type
|
|
4
|
-
type
|
|
5
|
-
encoding: BufferEncoding;
|
|
6
|
-
env: NodeJS.ProcessEnv;
|
|
7
|
-
stdio: "inherit" | ["ignore", "pipe", "pipe"];
|
|
8
|
-
windowsHide: boolean;
|
|
9
|
-
windowsVerbatimArguments?: boolean;
|
|
10
|
-
}) => SpawnResult;
|
|
11
|
-
export type UpdateOptions = {
|
|
12
|
-
json?: boolean;
|
|
13
|
-
package?: string;
|
|
14
|
-
dryRun?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Leave the skills refresh to the newly installed binary. An automatic update
|
|
17
|
-
* runs inside the OLD process, which the API may be refusing outright — its
|
|
18
|
-
* own skills request would be rejected for the very version being replaced.
|
|
19
|
-
*/
|
|
20
|
-
skipSkillsInstall?: boolean;
|
|
21
|
-
};
|
|
22
|
-
type UpdateResult = {
|
|
23
|
-
current_version: string;
|
|
24
|
-
/** Read back from the installed package after npm finished; null when unknown. */
|
|
25
|
-
installed_version?: string | null;
|
|
26
|
-
package: string;
|
|
27
|
-
command: string;
|
|
28
|
-
dry_run: boolean;
|
|
29
|
-
updated: boolean;
|
|
3
|
+
export { detectCliInstall, detectCliInstallPrefixFromPath, readInstalledCliVersion, resolveNpmExecutables, type CliInstall, type UpdateOptions, } from "./cli-install.js";
|
|
4
|
+
type UpdateResult = CliInstallResult & {
|
|
30
5
|
skills_install: AutomaticSkillsInstallResult;
|
|
31
6
|
};
|
|
32
|
-
export declare function updateCli(options: UpdateOptions, runtime?: {
|
|
33
|
-
env?: NodeJS.ProcessEnv;
|
|
34
|
-
platform?: NodeJS.Platform;
|
|
35
|
-
argv?: readonly string[];
|
|
36
|
-
modulePath?: string;
|
|
37
|
-
spawnSync?: SpawnSyncLike;
|
|
7
|
+
export declare function updateCli(options: UpdateOptions, runtime?: CliInstallRuntime & {
|
|
38
8
|
execFileSync?: ExecFileSyncLike;
|
|
39
9
|
} & SkillsSourceRuntime): Promise<UpdateResult>;
|
|
40
|
-
export type CliInstall =
|
|
41
|
-
/** `npm install -g`: npm can replace it in place with `--prefix`. */
|
|
42
|
-
{
|
|
43
|
-
kind: "global";
|
|
44
|
-
prefix: string;
|
|
45
|
-
packageDir: string;
|
|
46
|
-
}
|
|
47
|
-
/** A project's own node_modules (npx, `npm install` in a directory, a pinned capsule). */
|
|
48
|
-
| {
|
|
49
|
-
kind: "local";
|
|
50
|
-
projectDir: string;
|
|
51
|
-
packageDir: string;
|
|
52
|
-
}
|
|
53
|
-
/** Running from a source checkout. */
|
|
54
|
-
| {
|
|
55
|
-
kind: "source";
|
|
56
|
-
};
|
|
57
|
-
export declare function detectCliInstall(modulePath: string): CliInstall;
|
|
58
|
-
export declare function detectCliInstallPrefixFromPath(modulePath: string): string | null;
|
|
59
|
-
/** The version npm actually left on disk for the running package. */
|
|
60
|
-
export declare function readInstalledCliVersion(packageDir: string): string | null;
|
|
61
|
-
export declare function resolveNpmExecutables(platform?: NodeJS.Platform): string[];
|
|
62
|
-
export {};
|