@oxygen-agent/cli 1.1014.135 → 1.1014.618
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 +27 -19
- package/dist/cli-output.d.ts +12 -0
- package/dist/cli-output.js +395 -0
- package/dist/cli-paths.d.ts +1 -0
- package/dist/cli-paths.js +3 -0
- package/dist/cli-profile-context.d.ts +3 -0
- package/dist/cli-profile-context.js +13 -0
- package/dist/command-manifest.d.ts +15 -0
- package/dist/command-manifest.js +23 -1
- package/dist/command-support.d.ts +438 -0
- package/dist/command-support.js +1610 -0
- package/dist/commands/action-column.d.ts +3 -0
- package/dist/commands/action-column.js +43 -0
- package/dist/commands/activation.d.ts +3 -0
- package/dist/commands/activation.js +24 -0
- package/dist/commands/admin.d.ts +3 -0
- package/dist/commands/admin.js +347 -0
- package/dist/commands/ads.d.ts +3 -0
- package/dist/commands/ads.js +62 -0
- package/dist/commands/agent.d.ts +3 -0
- package/dist/commands/agent.js +274 -0
- package/dist/commands/api-keys.d.ts +3 -0
- package/dist/commands/api-keys.js +77 -0
- package/dist/commands/approvals.d.ts +3 -0
- package/dist/commands/approvals.js +518 -0
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.js +230 -0
- package/dist/commands/billing.d.ts +3 -0
- package/dist/commands/billing.js +357 -0
- package/dist/commands/blueprints.d.ts +3 -0
- package/dist/commands/blueprints.js +312 -0
- package/dist/commands/budget.d.ts +3 -0
- package/dist/commands/budget.js +55 -0
- package/dist/commands/callables.d.ts +3 -0
- package/dist/commands/callables.js +111 -0
- package/dist/commands/capabilities.d.ts +3 -0
- package/dist/commands/capabilities.js +44 -0
- package/dist/commands/cells.d.ts +3 -0
- package/dist/commands/cells.js +94 -0
- package/dist/commands/columns.d.ts +3 -0
- package/dist/commands/columns.js +1628 -0
- package/dist/commands/commands.d.ts +3 -0
- package/dist/commands/commands.js +45 -0
- package/dist/commands/comments.d.ts +3 -0
- package/dist/commands/comments.js +188 -0
- package/dist/commands/companies.d.ts +3 -0
- package/dist/commands/companies.js +312 -0
- package/dist/commands/connections.d.ts +3 -0
- package/dist/commands/connections.js +39 -0
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.js +170 -0
- package/dist/commands/copilot.d.ts +3 -0
- package/dist/commands/copilot.js +565 -0
- package/dist/commands/crm.d.ts +3 -0
- package/dist/commands/crm.js +1669 -0
- package/dist/commands/custom-integrations.d.ts +3 -0
- package/dist/commands/custom-integrations.js +140 -0
- package/dist/commands/dashboards.d.ts +3 -0
- package/dist/commands/dashboards.js +240 -0
- package/dist/commands/db.d.ts +3 -0
- package/dist/commands/db.js +190 -0
- package/dist/commands/deliverability.d.ts +3 -0
- package/dist/commands/deliverability.js +90 -0
- package/dist/commands/directory.d.ts +3 -0
- package/dist/commands/directory.js +101 -0
- package/dist/commands/domains.d.ts +3 -0
- package/dist/commands/domains.js +604 -0
- package/dist/commands/egress.d.ts +3 -0
- package/dist/commands/egress.js +130 -0
- package/dist/commands/email.d.ts +3 -0
- package/dist/commands/email.js +49 -0
- package/dist/commands/engagement.d.ts +3 -0
- package/dist/commands/engagement.js +189 -0
- package/dist/commands/enrich-column.d.ts +3 -0
- package/dist/commands/enrich-column.js +149 -0
- package/dist/commands/enrichment.d.ts +3 -0
- package/dist/commands/enrichment.js +49 -0
- package/dist/commands/feedback.d.ts +3 -0
- package/dist/commands/feedback.js +96 -0
- package/dist/commands/feeds.d.ts +3 -0
- package/dist/commands/feeds.js +486 -0
- package/dist/commands/find.d.ts +3 -0
- package/dist/commands/find.js +159 -0
- package/dist/commands/followers.d.ts +3 -0
- package/dist/commands/followers.js +39 -0
- package/dist/commands/formulas.d.ts +3 -0
- package/dist/commands/formulas.js +43 -0
- package/dist/commands/home.d.ts +3 -0
- package/dist/commands/home.js +22 -0
- package/dist/commands/inbox.d.ts +3 -0
- package/dist/commands/inbox.js +779 -0
- package/dist/commands/integrations.d.ts +3 -0
- package/dist/commands/integrations.js +290 -0
- package/dist/commands/knowledge.d.ts +3 -0
- package/dist/commands/knowledge.js +874 -0
- package/dist/commands/lead-sourcing.d.ts +3 -0
- package/dist/commands/lead-sourcing.js +52 -0
- package/dist/commands/limits.d.ts +3 -0
- package/dist/commands/limits.js +54 -0
- package/dist/commands/linkedin.d.ts +3 -0
- package/dist/commands/linkedin.js +275 -0
- package/dist/commands/login.d.ts +3 -0
- package/dist/commands/login.js +347 -0
- package/dist/commands/logout.d.ts +3 -0
- package/dist/commands/logout.js +12 -0
- package/dist/commands/mailboxes.d.ts +3 -0
- package/dist/commands/mailboxes.js +1290 -0
- package/dist/commands/managed-inboxes.d.ts +3 -0
- package/dist/commands/managed-inboxes.js +361 -0
- package/dist/commands/messages.d.ts +3 -0
- package/dist/commands/messages.js +78 -0
- package/dist/commands/notetaker.d.ts +3 -0
- package/dist/commands/notetaker.js +79 -0
- package/dist/commands/observability.d.ts +3 -0
- package/dist/commands/observability.js +125 -0
- package/dist/commands/orgs.d.ts +3 -0
- package/dist/commands/orgs.js +237 -0
- package/dist/commands/people.d.ts +3 -0
- package/dist/commands/people.js +353 -0
- package/dist/commands/posts.d.ts +3 -0
- package/dist/commands/posts.js +139 -0
- package/dist/commands/profiles.d.ts +3 -0
- package/dist/commands/profiles.js +250 -0
- package/dist/commands/projects.d.ts +3 -0
- package/dist/commands/projects.js +94 -0
- package/dist/commands/prompts.d.ts +3 -0
- package/dist/commands/prompts.js +84 -0
- package/dist/commands/publishing.d.ts +3 -0
- package/dist/commands/publishing.js +1419 -0
- package/dist/commands/recipes.d.ts +3 -0
- package/dist/commands/recipes.js +120 -0
- package/dist/commands/reviews.d.ts +3 -0
- package/dist/commands/reviews.js +75 -0
- package/dist/commands/rows.d.ts +3 -0
- package/dist/commands/rows.js +27 -0
- package/dist/commands/runs.d.ts +3 -0
- package/dist/commands/runs.js +37 -0
- package/dist/commands/search.d.ts +3 -0
- package/dist/commands/search.js +182 -0
- package/dist/commands/senders.d.ts +3 -0
- package/dist/commands/senders.js +393 -0
- package/dist/commands/sequences.d.ts +3 -0
- package/dist/commands/sequences.js +2322 -0
- package/dist/commands/session.d.ts +3 -0
- package/dist/commands/session.js +109 -0
- package/dist/commands/signals.d.ts +3 -0
- package/dist/commands/signals.js +289 -0
- package/dist/commands/signup-leads.d.ts +3 -0
- package/dist/commands/signup-leads.js +46 -0
- package/dist/commands/skills.d.ts +3 -0
- package/dist/commands/skills.js +50 -0
- package/dist/commands/sourcing.d.ts +3 -0
- package/dist/commands/sourcing.js +27 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.js +51 -0
- package/dist/commands/supabase.d.ts +3 -0
- package/dist/commands/supabase.js +128 -0
- package/dist/commands/support.d.ts +3 -0
- package/dist/commands/support.js +651 -0
- package/dist/commands/suppressions.d.ts +3 -0
- package/dist/commands/suppressions.js +577 -0
- package/dist/commands/table-ingestions.d.ts +3 -0
- package/dist/commands/table-ingestions.js +145 -0
- package/dist/commands/table-runs.d.ts +3 -0
- package/dist/commands/table-runs.js +277 -0
- package/dist/commands/tables.d.ts +3 -0
- package/dist/commands/tables.js +3492 -0
- package/dist/commands/tags.d.ts +3 -0
- package/dist/commands/tags.js +147 -0
- package/dist/commands/tools.d.ts +3 -0
- package/dist/commands/tools.js +246 -0
- package/dist/commands/update.d.ts +3 -0
- package/dist/commands/update.js +106 -0
- package/dist/commands/verify.d.ts +3 -0
- package/dist/commands/verify.js +27 -0
- package/dist/commands/viewers.d.ts +3 -0
- package/dist/commands/viewers.js +72 -0
- package/dist/commands/voice.d.ts +3 -0
- package/dist/commands/voice.js +351 -0
- package/dist/commands/whatsapp.d.ts +3 -0
- package/dist/commands/whatsapp.js +226 -0
- package/dist/commands/whoami.d.ts +3 -0
- package/dist/commands/whoami.js +110 -0
- package/dist/commands/worker.d.ts +3 -0
- package/dist/commands/worker.js +60 -0
- package/dist/commands/workflows.d.ts +3 -0
- package/dist/commands/workflows.js +1752 -0
- package/dist/commands/workspace.d.ts +3 -0
- package/dist/commands/workspace.js +94 -0
- package/dist/compact-list-flags.d.ts +7 -0
- package/dist/compact-list-flags.js +12 -0
- package/dist/crm-support-flags.js +14 -5
- package/dist/customer-operation-commands.js +8 -6
- package/dist/diagnostic-uploader.d.ts +3 -1
- package/dist/diagnostic-uploader.js +29 -8
- package/dist/help.d.ts +5 -0
- package/dist/help.js +22 -0
- package/dist/index.d.ts +98 -1
- package/dist/index.js +331 -30719
- package/dist/local-module-loader.d.ts +4 -0
- package/dist/local-module-loader.js +156 -0
- package/dist/visual-commands.js +9 -5
- package/node_modules/@oxygen/cli-ugc/dist/commands.js +2 -2
- package/node_modules/@oxygen/shared/dist/agent-session-schedule.d.ts +36 -0
- package/node_modules/@oxygen/shared/dist/agent-session-schedule.js +69 -0
- package/node_modules/@oxygen/shared/dist/agent-sessions.d.ts +14 -5
- package/node_modules/@oxygen/shared/dist/agent-sessions.js +14 -3
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +175 -14
- package/node_modules/@oxygen/shared/dist/compact-list-result.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/compact-list-result.js +27 -0
- package/node_modules/@oxygen/shared/dist/contracts/agent-sessions.d.ts +12 -1
- package/node_modules/@oxygen/shared/dist/contracts/agent-sessions.js +5 -2
- package/node_modules/@oxygen/shared/dist/contracts/browser-operations.js +4 -2
- package/node_modules/@oxygen/shared/dist/contracts/compact-list-reads.d.ts +57 -0
- package/node_modules/@oxygen/shared/dist/contracts/compact-list-reads.js +23 -0
- package/node_modules/@oxygen/shared/dist/contracts/crm-support.d.ts +52 -0
- package/node_modules/@oxygen/shared/dist/contracts/crm-support.js +43 -2
- package/node_modules/@oxygen/shared/dist/contracts/customer-operations.js +17 -14
- package/node_modules/@oxygen/shared/dist/contracts/knowledge-content-reads.js +1 -1
- package/node_modules/@oxygen/shared/dist/contracts/knowledge-proposal-reads.d.ts +49 -0
- package/node_modules/@oxygen/shared/dist/contracts/knowledge-proposal-reads.js +14 -0
- package/node_modules/@oxygen/shared/dist/contracts/knowledge-sync.js +1 -1
- package/node_modules/@oxygen/shared/dist/contracts/limits-read.js +60 -7
- package/node_modules/@oxygen/shared/dist/contracts/operations.d.ts +9 -1
- package/node_modules/@oxygen/shared/dist/contracts/operations.js +13 -5
- package/node_modules/@oxygen/shared/dist/contracts/publishing-reads.js +1 -1
- package/node_modules/@oxygen/shared/dist/contracts/teammates.d.ts +16 -0
- package/node_modules/@oxygen/shared/dist/contracts/teammates.js +115 -0
- package/node_modules/@oxygen/shared/dist/cost-estimate-view.js +21 -3
- package/node_modules/@oxygen/shared/dist/cost-estimate.d.ts +31 -1
- package/node_modules/@oxygen/shared/dist/cost-estimate.js +56 -15
- package/node_modules/@oxygen/shared/dist/diagnostic-credentials.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-credentials.js +2 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-lock.js +71 -44
- package/node_modules/@oxygen/shared/dist/diagnostic-spool.d.ts +18 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-spool.js +348 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage-failure.d.ts +10 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage-failure.js +42 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/diagnostic-storage.js +59 -213
- package/node_modules/@oxygen/shared/dist/diagnostics.js +3 -2
- package/node_modules/@oxygen/shared/dist/email-dsn.d.ts +16 -5
- package/node_modules/@oxygen/shared/dist/email-dsn.js +97 -1
- package/node_modules/@oxygen/shared/dist/emailguard-placement-probe.js +5 -0
- package/node_modules/@oxygen/shared/dist/enrichment-intents.js +4 -5
- package/node_modules/@oxygen/shared/dist/file-import.js +5 -2
- package/node_modules/@oxygen/shared/dist/hosted-ai.d.ts +30 -0
- package/node_modules/@oxygen/shared/dist/hosted-ai.js +20 -0
- package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.d.ts +6 -2
- package/node_modules/@oxygen/shared/dist/knowledge-seed-content.d.ts +17 -7
- package/node_modules/@oxygen/shared/dist/knowledge-seed-content.js +81 -17
- package/node_modules/@oxygen/shared/dist/langfuse.js +8 -4
- package/node_modules/@oxygen/shared/dist/mailbox-egress-ownership.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/mailbox-import.d.ts +6 -3
- package/node_modules/@oxygen/shared/dist/mailbox-import.js +9 -9
- package/node_modules/@oxygen/shared/dist/mcp-server-info.d.ts +8 -0
- package/node_modules/@oxygen/shared/dist/mcp-server-info.js +10 -0
- package/node_modules/@oxygen/shared/dist/object-storage.d.ts +10 -0
- package/node_modules/@oxygen/shared/dist/object-storage.js +14 -0
- package/node_modules/@oxygen/shared/dist/plan-limits-view.d.ts +5 -0
- package/node_modules/@oxygen/shared/dist/plan-limits-view.js +17 -1
- package/node_modules/@oxygen/shared/dist/pricing-sheet.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/pricing-sheet.js +1 -1
- package/node_modules/@oxygen/shared/dist/provider-selection.d.ts +15 -0
- package/node_modules/@oxygen/shared/dist/provider-selection.js +3 -0
- package/node_modules/@oxygen/shared/dist/repricing.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/repricing.js +2 -2
- package/node_modules/@oxygen/shared/dist/schedule-label.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/schedule-label.js +12 -0
- package/node_modules/@oxygen/shared/dist/sequence-failures.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/sequence-failures.js +20 -6
- package/node_modules/@oxygen/shared/dist/teammate-groups.d.ts +55 -0
- package/node_modules/@oxygen/shared/dist/teammate-groups.js +74 -0
- package/node_modules/@oxygen/shared/dist/teammate-messages.d.ts +52 -0
- package/node_modules/@oxygen/shared/dist/teammate-messages.js +88 -0
- package/node_modules/@oxygen/shared/dist/teammate-notes.d.ts +58 -0
- package/node_modules/@oxygen/shared/dist/teammate-notes.js +73 -0
- package/node_modules/@oxygen/shared/dist/teammate-routines.d.ts +95 -0
- package/node_modules/@oxygen/shared/dist/teammate-routines.js +266 -0
- package/node_modules/@oxygen/shared/dist/teammate-tasks.d.ts +56 -0
- package/node_modules/@oxygen/shared/dist/teammate-tasks.js +114 -0
- package/node_modules/@oxygen/shared/dist/teammates.d.ts +78 -0
- package/node_modules/@oxygen/shared/dist/teammates.js +140 -0
- package/node_modules/@oxygen/shared/dist/user-capability-routing.js +120 -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/shared/dist/visual-render.d.ts +9 -1
- package/node_modules/@oxygen/shared/dist/visual-render.js +12 -5
- package/node_modules/@oxygen/shared/dist/warmup-metrics.d.ts +5 -0
- package/node_modules/@oxygen/shared/dist/warmup-metrics.js +44 -0
- package/package.json +1 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { requestOxygen } from "../http-client.js";
|
|
2
|
+
import { readOption } from "../util.js";
|
|
3
|
+
import { Command, CommanderError, Option } from "commander";
|
|
4
|
+
export function registerDeliverabilityFamily(program, handleAsyncAction) {
|
|
5
|
+
program.addCommand(new Command("deliverability")
|
|
6
|
+
.description("External email deliverability: fleet reputation health and DIRECTIONAL inbox-placement (spam) tests via EmailGuard, Zapmail, or an explicitly configured OXYGEN placement evaluation pilot. Start with `placement-test list` and `placement-test get` to inspect existing results for 0 credits without creating or sending a test. For continuous EmailGuard account monitoring use `oxygen mailboxes emailguard connect`. Placement tests are approval-gated paid runs (managed bills Oxygen credits; own-key tests pay the in-force platform fee plus separate vendor charges — Zapmail bills your Zapmail wallet ~$2/test). OXYGEN placement evaluation is never auto-selected or generally available: it is a limited pilot with one 0-credit test for its configured eligible connected sender.")
|
|
7
|
+
.addCommand(new Command("placement-test")
|
|
8
|
+
.description("Inspect saved directional inbox-placement results with list/get (0 credits; no test email is sent). New tests use preview and approval through run/send.")
|
|
9
|
+
.addCommand(new Command("run")
|
|
10
|
+
.description("Create a placement test for one sending mailbox. Without --approved this returns a cost PREVIEW. EmailGuard creation returns exact seeds + phrase but sends nothing; next run `placement-test send <id>` to preview and approve that external email. Zapmail owns its probe delivery and completes async (2-24h). OXYGEN placement evaluation requires explicit --provider oxygen_placement plus --subject and --body, and is available only for the eligible connected sender enabled for the limited pilot. Its approval creates AND sends one probe with no separate send step: preview first, then re-run the same mailbox, provider, subject, and body with --approved --max-credits 0 --plan <plan_hash>.")
|
|
11
|
+
.argument("<mailbox>", "Sending mailbox address to test (e.g. ada@send.acme.com).")
|
|
12
|
+
.addOption(new Option("--provider <provider>", "Health provider: emailguard, zapmail, or oxygen_placement. Omit to auto-resolve EmailGuard/Zapmail. OXYGEN placement evaluation is never auto-selected and requires the sender enabled for the limited pilot.").choices(["emailguard", "zapmail", "oxygen_placement"])
|
|
13
|
+
.argParser((value) => {
|
|
14
|
+
const provider = value === "sendkit" ? "oxygen_placement" : value;
|
|
15
|
+
if (!["emailguard", "zapmail", "oxygen_placement"].includes(provider)) {
|
|
16
|
+
throw new CommanderError(2, "commander.invalidArgument", "Choose emailguard, zapmail, or oxygen_placement.");
|
|
17
|
+
}
|
|
18
|
+
return provider;
|
|
19
|
+
}))
|
|
20
|
+
.option("--subject <subject>", "Seed-message subject. Required with --provider oxygen_placement; Zapmail ignores it beyond labeling the test.")
|
|
21
|
+
.option("--body <text>", "Plain-text seed-message body. Required with --provider oxygen_placement; ignored by Zapmail.")
|
|
22
|
+
.option("--allow-paused-probe", "Opt in to one diagnostic probe while preserving campaign pause; repeat at both create and send approvals. Never permits disabled senders.")
|
|
23
|
+
.option("--approved", "Actually run the test (otherwise a preview is returned).")
|
|
24
|
+
.option("--max-credits <n>", "Credit cap the caller accepts (must be >= credits_required for managed runs).")
|
|
25
|
+
.option("--plan <hash>", "plan_hash from a fresh create preview (required with --approved).")
|
|
26
|
+
.option("--json", "Print a JSON envelope.")
|
|
27
|
+
.action(async (mailbox, options) => {
|
|
28
|
+
await handleAsyncAction("deliverability placement-test run", options, () => requestOxygen("/api/cli/deliverability/placement-tests", {
|
|
29
|
+
method: "POST",
|
|
30
|
+
body: {
|
|
31
|
+
mailbox,
|
|
32
|
+
...(readOption(options.provider)
|
|
33
|
+
? { provider: readOption(options.provider) }
|
|
34
|
+
: {}),
|
|
35
|
+
...(readOption(options.subject)
|
|
36
|
+
? { subject: readOption(options.subject) }
|
|
37
|
+
: {}),
|
|
38
|
+
...(readOption(options.body)
|
|
39
|
+
? { body_text: readOption(options.body) }
|
|
40
|
+
: {}),
|
|
41
|
+
...(options.approved ? { approved: true } : {}),
|
|
42
|
+
...(options.allowPausedProbe ? { allow_paused_probe: true } : {}),
|
|
43
|
+
...(readOption(options.maxCredits)
|
|
44
|
+
? {
|
|
45
|
+
max_credits: Number(readOption(options.maxCredits)),
|
|
46
|
+
}
|
|
47
|
+
: {}),
|
|
48
|
+
...(readOption(options.plan)
|
|
49
|
+
? { plan_hash: readOption(options.plan) }
|
|
50
|
+
: {}),
|
|
51
|
+
},
|
|
52
|
+
}));
|
|
53
|
+
}))
|
|
54
|
+
.addCommand(new Command("send")
|
|
55
|
+
.description("Preview or send the exact EmailGuard seed message for a provider-created test. Preview returns sender, all recipients, exact content, and plan_hash. Live send requires --approved --plan <hash>, costs 0 additional credits, and sends one message only.")
|
|
56
|
+
.argument("<id>", "Oxygen placement-test id returned by `placement-test run`.")
|
|
57
|
+
.option("--allow-paused-probe", "Opt in to one diagnostic probe while preserving campaign pause; repeat at both create and send approvals. Never permits disabled senders.")
|
|
58
|
+
.option("--approved", "Send the exact previewed seed message (otherwise preview only).")
|
|
59
|
+
.option("--plan <hash>", "plan_hash from a fresh send preview (required with --approved).")
|
|
60
|
+
.option("--json", "Print a JSON envelope.")
|
|
61
|
+
.action(async (id, options) => {
|
|
62
|
+
await handleAsyncAction("deliverability placement-test send", options, () => requestOxygen(`/api/cli/deliverability/placement-tests/${encodeURIComponent(id)}/send`, {
|
|
63
|
+
method: "POST",
|
|
64
|
+
body: {
|
|
65
|
+
...(options.approved ? { approved: true } : {}),
|
|
66
|
+
...(options.allowPausedProbe ? { allow_paused_probe: true } : {}),
|
|
67
|
+
...(readOption(options.plan)
|
|
68
|
+
? { plan_hash: readOption(options.plan) }
|
|
69
|
+
: {}),
|
|
70
|
+
},
|
|
71
|
+
}));
|
|
72
|
+
}))
|
|
73
|
+
.addCommand(new Command("list")
|
|
74
|
+
.description("Inspect recent directional inbox-placement tests, their status, results, and credits used, plus `pricing`: EmailGuard monitoring credits per inbox-month, two included tests per inbox per cycle, and the managed extra-test price in force. Covered tests cost no extra credits. The allowance resets each UTC calendar month; unused tests do not roll over. Own-key tests pay the quoted OXYGEN platform fee separately from provider charges. The returned web link opens Accounts; use get for an exact result link. Costs 0 credits and never creates or sends a test; active tests may refresh their observations.")
|
|
75
|
+
.option("--limit <n>", "Max rows (default 50, cap 200).")
|
|
76
|
+
.option("--json", "Print a JSON envelope.")
|
|
77
|
+
.action(async (options) => {
|
|
78
|
+
await handleAsyncAction("deliverability placement-test list", options, () => {
|
|
79
|
+
const limit = readOption(options.limit);
|
|
80
|
+
return requestOxygen(`/api/cli/deliverability/placement-tests${limit ? `?limit=${encodeURIComponent(limit)}` : ""}`);
|
|
81
|
+
});
|
|
82
|
+
}))
|
|
83
|
+
.addCommand(new Command("get")
|
|
84
|
+
.description("Inspect one saved directional inbox-placement test by id: status, seed counts, per-provider results, and a web result link. Costs 0 credits and never creates or sends a test; active tests may refresh their observations. Zapmail results land async (2-24h); keep polling while status is awaiting_results.")
|
|
85
|
+
.argument("<id>", "Placement test id.")
|
|
86
|
+
.option("--json", "Print a JSON envelope.")
|
|
87
|
+
.action(async (id, options) => {
|
|
88
|
+
await handleAsyncAction("deliverability placement-test get", options, () => requestOxygen(`/api/cli/deliverability/placement-tests/${encodeURIComponent(id)}`));
|
|
89
|
+
}))));
|
|
90
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ExtractedCommandActionHandler } from "../command-support.js";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
export declare function registerDirectoryFamily(program: Command, handleAsyncAction: ExtractedCommandActionHandler, directoryDocsUrl: string, billingDocsUrl: string): void;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { buildDirectoryProfileBody } from "../command-support.js";
|
|
2
|
+
import { requestOxygen } from "../http-client.js";
|
|
3
|
+
import { readOption } from "../util.js";
|
|
4
|
+
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
5
|
+
import { AGENCY_DIRECTORY_REGIONS, AGENCY_DIRECTORY_SERVICES } from "@oxygen/shared/directory";
|
|
6
|
+
import { Command } from "commander";
|
|
7
|
+
function directoryLogoMimeType(extension) {
|
|
8
|
+
switch (extension.toLowerCase()) {
|
|
9
|
+
case ".png":
|
|
10
|
+
return "image/png";
|
|
11
|
+
case ".jpg":
|
|
12
|
+
case ".jpeg":
|
|
13
|
+
return "image/jpeg";
|
|
14
|
+
case ".webp":
|
|
15
|
+
return "image/webp";
|
|
16
|
+
case ".svg":
|
|
17
|
+
return "image/svg+xml";
|
|
18
|
+
default:
|
|
19
|
+
throw new OxygenError("invalid_request", "--logo-file must be a .png, .jpg, .jpeg, .webp, or .svg image.", { exitCode: 1 });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async function uploadDirectoryLogo(logoPath) {
|
|
23
|
+
const fs = await import("node:fs/promises");
|
|
24
|
+
const path = await import("node:path");
|
|
25
|
+
const buffer = await fs.readFile(logoPath);
|
|
26
|
+
const form = new FormData();
|
|
27
|
+
form.append("file", new File([buffer], path.basename(logoPath), { type: directoryLogoMimeType(path.extname(logoPath)) }));
|
|
28
|
+
return await requestOxygen("/api/cli/directory/listing/logo", {
|
|
29
|
+
method: "POST",
|
|
30
|
+
formData: form,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export function registerDirectoryFamily(program, handleAsyncAction, directoryDocsUrl, billingDocsUrl) {
|
|
34
|
+
program
|
|
35
|
+
.command("directory")
|
|
36
|
+
.description("Manage this organization's public OXYGEN agency directory listing.")
|
|
37
|
+
.addHelpText("after", `\nPartner bonus: billing balance reports partner_bonus and may apply due plan grants or credit expiry. Billing policy: ${billingDocsUrl}#agency-partner-bonus\nDocs: ${directoryDocsUrl}\n`)
|
|
38
|
+
.addCommand(new Command("get")
|
|
39
|
+
.description("Read-only, 0 credits. Read the listing, publish state, and public/settings deep-links.")
|
|
40
|
+
.option("--json", "Print a JSON envelope.")
|
|
41
|
+
.action(async (options) => {
|
|
42
|
+
await handleAsyncAction("directory get", options, () => requestOxygen("/api/cli/directory/listing"));
|
|
43
|
+
}))
|
|
44
|
+
.addCommand(new Command("update")
|
|
45
|
+
.description("Update listing fields. Changes to a published listing are public immediately. Only invited organizations can edit.")
|
|
46
|
+
.option("--name <text>", "Agency display name.")
|
|
47
|
+
.option("--slug <slug>", "Public URL slug (lowercase letters, digits, dashes).")
|
|
48
|
+
.option("--logo-url <url>", "Logo image URL.")
|
|
49
|
+
.option("--tagline <text>", "One-line pitch shown on the directory card.")
|
|
50
|
+
.option("--description <text>", "Full profile description (plain text; blank lines separate paragraphs).")
|
|
51
|
+
.option("--description-file <path>", "Path to a plain-text file with the description.")
|
|
52
|
+
.option("--website <url>", "Company website URL.")
|
|
53
|
+
.option("--company-linkedin <url>", "Company LinkedIn page URL.")
|
|
54
|
+
.option("--founders-json <json>", "JSON array of founding-team members: [{\"name\", \"title\", \"linkedin_url\"}].")
|
|
55
|
+
.option("--booking-url <url>", "Book-a-call URL (Cal.com, Calendly, ...).")
|
|
56
|
+
.option("--contact-email <email>", "Public contact email.")
|
|
57
|
+
.option("--logo-file <path>", "Upload a local png/jpeg/webp/svg logo instead of passing --logo-url.")
|
|
58
|
+
.option("--services <csv>", `Comma-separated services from the curated set: ${AGENCY_DIRECTORY_SERVICES.join(", ")}.`)
|
|
59
|
+
.option("--regions <csv>", `Comma-separated regions from the curated set: ${AGENCY_DIRECTORY_REGIONS.join(", ")}.`)
|
|
60
|
+
.option("--profile-json <json>", "JSON object with any listing fields; flags override it. Use null values to clear fields.")
|
|
61
|
+
.option("--json", "Print a JSON envelope.")
|
|
62
|
+
.action(async (options) => {
|
|
63
|
+
await handleAsyncAction("directory update", options, async () => {
|
|
64
|
+
const logoPath = readOption(options.logoFile);
|
|
65
|
+
const uploaded = logoPath ? await uploadDirectoryLogo(logoPath) : null;
|
|
66
|
+
const profile = await buildDirectoryProfileBody(options);
|
|
67
|
+
if (Object.keys(profile).length === 0 && uploaded)
|
|
68
|
+
return uploaded;
|
|
69
|
+
return requestOxygen("/api/cli/directory/listing/update", {
|
|
70
|
+
method: "POST",
|
|
71
|
+
body: { profile },
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}))
|
|
75
|
+
.addCommand(new Command("publish")
|
|
76
|
+
.description("Publish at https://oxygen-agent.com/agencies. Requires a tagline, description, and at least one contact method (website, booking link, email, or LinkedIn).")
|
|
77
|
+
.option("--json", "Print a JSON envelope.")
|
|
78
|
+
.action(async (options) => {
|
|
79
|
+
await handleAsyncAction("directory publish", options, () => requestOxygen("/api/cli/directory/listing/publish", { method: "POST", body: {} }));
|
|
80
|
+
}))
|
|
81
|
+
.addCommand(new Command("unpublish")
|
|
82
|
+
.description("Remove the listing from the public directory (keeps the draft editable).")
|
|
83
|
+
.option("--json", "Print a JSON envelope.")
|
|
84
|
+
.action(async (options) => {
|
|
85
|
+
await handleAsyncAction("directory unpublish", options, () => requestOxygen("/api/cli/directory/listing/unpublish", { method: "POST", body: {} }));
|
|
86
|
+
}))
|
|
87
|
+
.addCommand(new Command("apply")
|
|
88
|
+
.description("Apply to be listed in the public agency directory (reviewed by the OXYGEN team).")
|
|
89
|
+
.option("--message <text>", "What you do, who you serve, and how you use OXYGEN for client work.")
|
|
90
|
+
.option("--website <url>", "Your agency website URL.")
|
|
91
|
+
.option("--json", "Print a JSON envelope.")
|
|
92
|
+
.action(async (options) => {
|
|
93
|
+
await handleAsyncAction("directory apply", options, () => requestOxygen("/api/cli/directory/apply", {
|
|
94
|
+
method: "POST",
|
|
95
|
+
body: {
|
|
96
|
+
...(readOption(options.message) ? { message: readOption(options.message) } : {}),
|
|
97
|
+
...(readOption(options.website) ? { website: readOption(options.website) } : {}),
|
|
98
|
+
},
|
|
99
|
+
}));
|
|
100
|
+
}));
|
|
101
|
+
}
|