@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.
Files changed (292) hide show
  1. package/README.md +1 -1
  2. package/dist/admin-primary-providers-render.js +27 -19
  3. package/dist/cli-output.d.ts +12 -0
  4. package/dist/cli-output.js +395 -0
  5. package/dist/cli-paths.d.ts +1 -0
  6. package/dist/cli-paths.js +3 -0
  7. package/dist/cli-profile-context.d.ts +3 -0
  8. package/dist/cli-profile-context.js +13 -0
  9. package/dist/command-manifest.d.ts +15 -0
  10. package/dist/command-manifest.js +23 -1
  11. package/dist/command-support.d.ts +438 -0
  12. package/dist/command-support.js +1610 -0
  13. package/dist/commands/action-column.d.ts +3 -0
  14. package/dist/commands/action-column.js +43 -0
  15. package/dist/commands/activation.d.ts +3 -0
  16. package/dist/commands/activation.js +24 -0
  17. package/dist/commands/admin.d.ts +3 -0
  18. package/dist/commands/admin.js +347 -0
  19. package/dist/commands/ads.d.ts +3 -0
  20. package/dist/commands/ads.js +62 -0
  21. package/dist/commands/agent.d.ts +3 -0
  22. package/dist/commands/agent.js +274 -0
  23. package/dist/commands/api-keys.d.ts +3 -0
  24. package/dist/commands/api-keys.js +77 -0
  25. package/dist/commands/approvals.d.ts +3 -0
  26. package/dist/commands/approvals.js +518 -0
  27. package/dist/commands/auth.d.ts +3 -0
  28. package/dist/commands/auth.js +230 -0
  29. package/dist/commands/billing.d.ts +3 -0
  30. package/dist/commands/billing.js +357 -0
  31. package/dist/commands/blueprints.d.ts +3 -0
  32. package/dist/commands/blueprints.js +312 -0
  33. package/dist/commands/budget.d.ts +3 -0
  34. package/dist/commands/budget.js +55 -0
  35. package/dist/commands/callables.d.ts +3 -0
  36. package/dist/commands/callables.js +111 -0
  37. package/dist/commands/capabilities.d.ts +3 -0
  38. package/dist/commands/capabilities.js +44 -0
  39. package/dist/commands/cells.d.ts +3 -0
  40. package/dist/commands/cells.js +94 -0
  41. package/dist/commands/columns.d.ts +3 -0
  42. package/dist/commands/columns.js +1628 -0
  43. package/dist/commands/commands.d.ts +3 -0
  44. package/dist/commands/commands.js +45 -0
  45. package/dist/commands/comments.d.ts +3 -0
  46. package/dist/commands/comments.js +188 -0
  47. package/dist/commands/companies.d.ts +3 -0
  48. package/dist/commands/companies.js +312 -0
  49. package/dist/commands/connections.d.ts +3 -0
  50. package/dist/commands/connections.js +39 -0
  51. package/dist/commands/context.d.ts +3 -0
  52. package/dist/commands/context.js +170 -0
  53. package/dist/commands/copilot.d.ts +3 -0
  54. package/dist/commands/copilot.js +565 -0
  55. package/dist/commands/crm.d.ts +3 -0
  56. package/dist/commands/crm.js +1669 -0
  57. package/dist/commands/custom-integrations.d.ts +3 -0
  58. package/dist/commands/custom-integrations.js +140 -0
  59. package/dist/commands/dashboards.d.ts +3 -0
  60. package/dist/commands/dashboards.js +240 -0
  61. package/dist/commands/db.d.ts +3 -0
  62. package/dist/commands/db.js +190 -0
  63. package/dist/commands/deliverability.d.ts +3 -0
  64. package/dist/commands/deliverability.js +90 -0
  65. package/dist/commands/directory.d.ts +3 -0
  66. package/dist/commands/directory.js +101 -0
  67. package/dist/commands/domains.d.ts +3 -0
  68. package/dist/commands/domains.js +604 -0
  69. package/dist/commands/egress.d.ts +3 -0
  70. package/dist/commands/egress.js +130 -0
  71. package/dist/commands/email.d.ts +3 -0
  72. package/dist/commands/email.js +49 -0
  73. package/dist/commands/engagement.d.ts +3 -0
  74. package/dist/commands/engagement.js +189 -0
  75. package/dist/commands/enrich-column.d.ts +3 -0
  76. package/dist/commands/enrich-column.js +149 -0
  77. package/dist/commands/enrichment.d.ts +3 -0
  78. package/dist/commands/enrichment.js +49 -0
  79. package/dist/commands/feedback.d.ts +3 -0
  80. package/dist/commands/feedback.js +96 -0
  81. package/dist/commands/feeds.d.ts +3 -0
  82. package/dist/commands/feeds.js +486 -0
  83. package/dist/commands/find.d.ts +3 -0
  84. package/dist/commands/find.js +159 -0
  85. package/dist/commands/followers.d.ts +3 -0
  86. package/dist/commands/followers.js +39 -0
  87. package/dist/commands/formulas.d.ts +3 -0
  88. package/dist/commands/formulas.js +43 -0
  89. package/dist/commands/home.d.ts +3 -0
  90. package/dist/commands/home.js +22 -0
  91. package/dist/commands/inbox.d.ts +3 -0
  92. package/dist/commands/inbox.js +779 -0
  93. package/dist/commands/integrations.d.ts +3 -0
  94. package/dist/commands/integrations.js +290 -0
  95. package/dist/commands/knowledge.d.ts +3 -0
  96. package/dist/commands/knowledge.js +874 -0
  97. package/dist/commands/lead-sourcing.d.ts +3 -0
  98. package/dist/commands/lead-sourcing.js +52 -0
  99. package/dist/commands/limits.d.ts +3 -0
  100. package/dist/commands/limits.js +54 -0
  101. package/dist/commands/linkedin.d.ts +3 -0
  102. package/dist/commands/linkedin.js +275 -0
  103. package/dist/commands/login.d.ts +3 -0
  104. package/dist/commands/login.js +347 -0
  105. package/dist/commands/logout.d.ts +3 -0
  106. package/dist/commands/logout.js +12 -0
  107. package/dist/commands/mailboxes.d.ts +3 -0
  108. package/dist/commands/mailboxes.js +1290 -0
  109. package/dist/commands/managed-inboxes.d.ts +3 -0
  110. package/dist/commands/managed-inboxes.js +361 -0
  111. package/dist/commands/messages.d.ts +3 -0
  112. package/dist/commands/messages.js +78 -0
  113. package/dist/commands/notetaker.d.ts +3 -0
  114. package/dist/commands/notetaker.js +79 -0
  115. package/dist/commands/observability.d.ts +3 -0
  116. package/dist/commands/observability.js +125 -0
  117. package/dist/commands/orgs.d.ts +3 -0
  118. package/dist/commands/orgs.js +237 -0
  119. package/dist/commands/people.d.ts +3 -0
  120. package/dist/commands/people.js +353 -0
  121. package/dist/commands/posts.d.ts +3 -0
  122. package/dist/commands/posts.js +139 -0
  123. package/dist/commands/profiles.d.ts +3 -0
  124. package/dist/commands/profiles.js +250 -0
  125. package/dist/commands/projects.d.ts +3 -0
  126. package/dist/commands/projects.js +94 -0
  127. package/dist/commands/prompts.d.ts +3 -0
  128. package/dist/commands/prompts.js +84 -0
  129. package/dist/commands/publishing.d.ts +3 -0
  130. package/dist/commands/publishing.js +1419 -0
  131. package/dist/commands/recipes.d.ts +3 -0
  132. package/dist/commands/recipes.js +120 -0
  133. package/dist/commands/reviews.d.ts +3 -0
  134. package/dist/commands/reviews.js +75 -0
  135. package/dist/commands/rows.d.ts +3 -0
  136. package/dist/commands/rows.js +27 -0
  137. package/dist/commands/runs.d.ts +3 -0
  138. package/dist/commands/runs.js +37 -0
  139. package/dist/commands/search.d.ts +3 -0
  140. package/dist/commands/search.js +182 -0
  141. package/dist/commands/senders.d.ts +3 -0
  142. package/dist/commands/senders.js +393 -0
  143. package/dist/commands/sequences.d.ts +3 -0
  144. package/dist/commands/sequences.js +2322 -0
  145. package/dist/commands/session.d.ts +3 -0
  146. package/dist/commands/session.js +109 -0
  147. package/dist/commands/signals.d.ts +3 -0
  148. package/dist/commands/signals.js +289 -0
  149. package/dist/commands/signup-leads.d.ts +3 -0
  150. package/dist/commands/signup-leads.js +46 -0
  151. package/dist/commands/skills.d.ts +3 -0
  152. package/dist/commands/skills.js +50 -0
  153. package/dist/commands/sourcing.d.ts +3 -0
  154. package/dist/commands/sourcing.js +27 -0
  155. package/dist/commands/status.d.ts +3 -0
  156. package/dist/commands/status.js +51 -0
  157. package/dist/commands/supabase.d.ts +3 -0
  158. package/dist/commands/supabase.js +128 -0
  159. package/dist/commands/support.d.ts +3 -0
  160. package/dist/commands/support.js +651 -0
  161. package/dist/commands/suppressions.d.ts +3 -0
  162. package/dist/commands/suppressions.js +577 -0
  163. package/dist/commands/table-ingestions.d.ts +3 -0
  164. package/dist/commands/table-ingestions.js +145 -0
  165. package/dist/commands/table-runs.d.ts +3 -0
  166. package/dist/commands/table-runs.js +277 -0
  167. package/dist/commands/tables.d.ts +3 -0
  168. package/dist/commands/tables.js +3492 -0
  169. package/dist/commands/tags.d.ts +3 -0
  170. package/dist/commands/tags.js +147 -0
  171. package/dist/commands/tools.d.ts +3 -0
  172. package/dist/commands/tools.js +246 -0
  173. package/dist/commands/update.d.ts +3 -0
  174. package/dist/commands/update.js +106 -0
  175. package/dist/commands/verify.d.ts +3 -0
  176. package/dist/commands/verify.js +27 -0
  177. package/dist/commands/viewers.d.ts +3 -0
  178. package/dist/commands/viewers.js +72 -0
  179. package/dist/commands/voice.d.ts +3 -0
  180. package/dist/commands/voice.js +351 -0
  181. package/dist/commands/whatsapp.d.ts +3 -0
  182. package/dist/commands/whatsapp.js +226 -0
  183. package/dist/commands/whoami.d.ts +3 -0
  184. package/dist/commands/whoami.js +110 -0
  185. package/dist/commands/worker.d.ts +3 -0
  186. package/dist/commands/worker.js +60 -0
  187. package/dist/commands/workflows.d.ts +3 -0
  188. package/dist/commands/workflows.js +1752 -0
  189. package/dist/commands/workspace.d.ts +3 -0
  190. package/dist/commands/workspace.js +94 -0
  191. package/dist/compact-list-flags.d.ts +7 -0
  192. package/dist/compact-list-flags.js +12 -0
  193. package/dist/crm-support-flags.js +14 -5
  194. package/dist/customer-operation-commands.js +8 -6
  195. package/dist/diagnostic-uploader.d.ts +3 -1
  196. package/dist/diagnostic-uploader.js +29 -8
  197. package/dist/help.d.ts +5 -0
  198. package/dist/help.js +22 -0
  199. package/dist/index.d.ts +98 -1
  200. package/dist/index.js +331 -30719
  201. package/dist/local-module-loader.d.ts +4 -0
  202. package/dist/local-module-loader.js +156 -0
  203. package/dist/visual-commands.js +9 -5
  204. package/node_modules/@oxygen/cli-ugc/dist/commands.js +2 -2
  205. package/node_modules/@oxygen/shared/dist/agent-session-schedule.d.ts +36 -0
  206. package/node_modules/@oxygen/shared/dist/agent-session-schedule.js +69 -0
  207. package/node_modules/@oxygen/shared/dist/agent-sessions.d.ts +14 -5
  208. package/node_modules/@oxygen/shared/dist/agent-sessions.js +14 -3
  209. package/node_modules/@oxygen/shared/dist/capability-discovery.js +175 -14
  210. package/node_modules/@oxygen/shared/dist/compact-list-result.d.ts +6 -0
  211. package/node_modules/@oxygen/shared/dist/compact-list-result.js +27 -0
  212. package/node_modules/@oxygen/shared/dist/contracts/agent-sessions.d.ts +12 -1
  213. package/node_modules/@oxygen/shared/dist/contracts/agent-sessions.js +5 -2
  214. package/node_modules/@oxygen/shared/dist/contracts/browser-operations.js +4 -2
  215. package/node_modules/@oxygen/shared/dist/contracts/compact-list-reads.d.ts +57 -0
  216. package/node_modules/@oxygen/shared/dist/contracts/compact-list-reads.js +23 -0
  217. package/node_modules/@oxygen/shared/dist/contracts/crm-support.d.ts +52 -0
  218. package/node_modules/@oxygen/shared/dist/contracts/crm-support.js +43 -2
  219. package/node_modules/@oxygen/shared/dist/contracts/customer-operations.js +17 -14
  220. package/node_modules/@oxygen/shared/dist/contracts/knowledge-content-reads.js +1 -1
  221. package/node_modules/@oxygen/shared/dist/contracts/knowledge-proposal-reads.d.ts +49 -0
  222. package/node_modules/@oxygen/shared/dist/contracts/knowledge-proposal-reads.js +14 -0
  223. package/node_modules/@oxygen/shared/dist/contracts/knowledge-sync.js +1 -1
  224. package/node_modules/@oxygen/shared/dist/contracts/limits-read.js +60 -7
  225. package/node_modules/@oxygen/shared/dist/contracts/operations.d.ts +9 -1
  226. package/node_modules/@oxygen/shared/dist/contracts/operations.js +13 -5
  227. package/node_modules/@oxygen/shared/dist/contracts/publishing-reads.js +1 -1
  228. package/node_modules/@oxygen/shared/dist/contracts/teammates.d.ts +16 -0
  229. package/node_modules/@oxygen/shared/dist/contracts/teammates.js +115 -0
  230. package/node_modules/@oxygen/shared/dist/cost-estimate-view.js +21 -3
  231. package/node_modules/@oxygen/shared/dist/cost-estimate.d.ts +31 -1
  232. package/node_modules/@oxygen/shared/dist/cost-estimate.js +56 -15
  233. package/node_modules/@oxygen/shared/dist/diagnostic-credentials.d.ts +2 -0
  234. package/node_modules/@oxygen/shared/dist/diagnostic-credentials.js +2 -0
  235. package/node_modules/@oxygen/shared/dist/diagnostic-lock.js +71 -44
  236. package/node_modules/@oxygen/shared/dist/diagnostic-spool.d.ts +18 -0
  237. package/node_modules/@oxygen/shared/dist/diagnostic-spool.js +348 -0
  238. package/node_modules/@oxygen/shared/dist/diagnostic-storage-failure.d.ts +10 -0
  239. package/node_modules/@oxygen/shared/dist/diagnostic-storage-failure.js +42 -0
  240. package/node_modules/@oxygen/shared/dist/diagnostic-storage.d.ts +1 -1
  241. package/node_modules/@oxygen/shared/dist/diagnostic-storage.js +59 -213
  242. package/node_modules/@oxygen/shared/dist/diagnostics.js +3 -2
  243. package/node_modules/@oxygen/shared/dist/email-dsn.d.ts +16 -5
  244. package/node_modules/@oxygen/shared/dist/email-dsn.js +97 -1
  245. package/node_modules/@oxygen/shared/dist/emailguard-placement-probe.js +5 -0
  246. package/node_modules/@oxygen/shared/dist/enrichment-intents.js +4 -5
  247. package/node_modules/@oxygen/shared/dist/file-import.js +5 -2
  248. package/node_modules/@oxygen/shared/dist/hosted-ai.d.ts +30 -0
  249. package/node_modules/@oxygen/shared/dist/hosted-ai.js +20 -0
  250. package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.d.ts +6 -2
  251. package/node_modules/@oxygen/shared/dist/knowledge-seed-content.d.ts +17 -7
  252. package/node_modules/@oxygen/shared/dist/knowledge-seed-content.js +81 -17
  253. package/node_modules/@oxygen/shared/dist/langfuse.js +8 -4
  254. package/node_modules/@oxygen/shared/dist/mailbox-egress-ownership.d.ts +1 -1
  255. package/node_modules/@oxygen/shared/dist/mailbox-import.d.ts +6 -3
  256. package/node_modules/@oxygen/shared/dist/mailbox-import.js +9 -9
  257. package/node_modules/@oxygen/shared/dist/mcp-server-info.d.ts +8 -0
  258. package/node_modules/@oxygen/shared/dist/mcp-server-info.js +10 -0
  259. package/node_modules/@oxygen/shared/dist/object-storage.d.ts +10 -0
  260. package/node_modules/@oxygen/shared/dist/object-storage.js +14 -0
  261. package/node_modules/@oxygen/shared/dist/plan-limits-view.d.ts +5 -0
  262. package/node_modules/@oxygen/shared/dist/plan-limits-view.js +17 -1
  263. package/node_modules/@oxygen/shared/dist/pricing-sheet.d.ts +1 -1
  264. package/node_modules/@oxygen/shared/dist/pricing-sheet.js +1 -1
  265. package/node_modules/@oxygen/shared/dist/provider-selection.d.ts +15 -0
  266. package/node_modules/@oxygen/shared/dist/provider-selection.js +3 -0
  267. package/node_modules/@oxygen/shared/dist/repricing.d.ts +1 -1
  268. package/node_modules/@oxygen/shared/dist/repricing.js +2 -2
  269. package/node_modules/@oxygen/shared/dist/schedule-label.d.ts +6 -0
  270. package/node_modules/@oxygen/shared/dist/schedule-label.js +12 -0
  271. package/node_modules/@oxygen/shared/dist/sequence-failures.d.ts +1 -0
  272. package/node_modules/@oxygen/shared/dist/sequence-failures.js +20 -6
  273. package/node_modules/@oxygen/shared/dist/teammate-groups.d.ts +55 -0
  274. package/node_modules/@oxygen/shared/dist/teammate-groups.js +74 -0
  275. package/node_modules/@oxygen/shared/dist/teammate-messages.d.ts +52 -0
  276. package/node_modules/@oxygen/shared/dist/teammate-messages.js +88 -0
  277. package/node_modules/@oxygen/shared/dist/teammate-notes.d.ts +58 -0
  278. package/node_modules/@oxygen/shared/dist/teammate-notes.js +73 -0
  279. package/node_modules/@oxygen/shared/dist/teammate-routines.d.ts +95 -0
  280. package/node_modules/@oxygen/shared/dist/teammate-routines.js +266 -0
  281. package/node_modules/@oxygen/shared/dist/teammate-tasks.d.ts +56 -0
  282. package/node_modules/@oxygen/shared/dist/teammate-tasks.js +114 -0
  283. package/node_modules/@oxygen/shared/dist/teammates.d.ts +78 -0
  284. package/node_modules/@oxygen/shared/dist/teammates.js +140 -0
  285. package/node_modules/@oxygen/shared/dist/user-capability-routing.js +120 -0
  286. package/node_modules/@oxygen/shared/dist/version.generated.d.ts +1 -1
  287. package/node_modules/@oxygen/shared/dist/version.generated.js +1 -1
  288. package/node_modules/@oxygen/shared/dist/visual-render.d.ts +9 -1
  289. package/node_modules/@oxygen/shared/dist/visual-render.js +12 -5
  290. package/node_modules/@oxygen/shared/dist/warmup-metrics.d.ts +5 -0
  291. package/node_modules/@oxygen/shared/dist/warmup-metrics.js +44 -0
  292. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ import { ExtractedCommandActionHandler } from "../command-support.js";
2
+ import { Command } from "commander";
3
+ export declare function registerRecipesFamily(program: Command, handleAsyncAction: ExtractedCommandActionHandler): void;
@@ -0,0 +1,120 @@
1
+ import { collectMultiple, parseJsonValue } from "../command-support.js";
2
+ import { requestOxygen } from "../http-client.js";
3
+ import { readOption } from "../util.js";
4
+ import { Command } from "commander";
5
+ export function registerRecipesFamily(program, handleAsyncAction) {
6
+ program
7
+ .command("recipes")
8
+ // Customers meet these as "plays" (the web app's Plays page and every
9
+ // copied play prompt), so that is the noun their agent types first. A
10
+ // production audit on 2026-10-04 saw all 33 blind runs open with
11
+ // `oxygen plays` and lose a call to "unknown command".
12
+ .alias("plays")
13
+ .description("GTM plays: proven motions with prerequisites, credit posture, and approval gates spelled out, to borrow from and adapt. Alias: `plays`. To design a motion for your company, use the oxygen-gtm-consultant skill: oxygen skills get oxygen-gtm-consultant --json.")
14
+ .addCommand(new Command("list")
15
+ .description("Find a GTM play for a goal: recipes ranked by relevance to your words; --view summary for a compact index. Filter by business-case category, journey stage, or audience.")
16
+ .argument("[query]", "Your goal in plain words, e.g. \"more pipeline from linkedin\" (ranked against title, trigger phrases, tags, and business case).")
17
+ .option("--category <category>", "Business-case category (e.g. start-here, pipeline-from-zero).")
18
+ .option("--stage <stage>", "Journey stage: day-1, day-7, day-30, or ongoing.")
19
+ .option("--audience <audience>", "founder, gtm-operator, or agency-operator.")
20
+ .option("--view <view>", "summary (compact index to choose a play from) or full (default: every field).")
21
+ .option("--limit <n>", "Return at most n recipes (1-50), after ranking.")
22
+ .option("--json", "Print a JSON envelope.")
23
+ .action(async (query, options) => {
24
+ await handleAsyncAction("recipes list", options, () => {
25
+ const params = new URLSearchParams();
26
+ if (query)
27
+ params.set("query", query);
28
+ const category = readOption(options.category);
29
+ if (category)
30
+ params.set("category", category);
31
+ const stage = readOption(options.stage);
32
+ if (stage)
33
+ params.set("stage", stage);
34
+ const audience = readOption(options.audience);
35
+ if (audience)
36
+ params.set("audience", audience);
37
+ const view = readOption(options.view);
38
+ if (view)
39
+ params.set("view", view);
40
+ const limit = readOption(options.limit);
41
+ if (limit)
42
+ params.set("limit", limit);
43
+ const qs = params.toString() ? `?${params.toString()}` : "";
44
+ return requestOxygen(`/api/cli/recipes${qs}`);
45
+ });
46
+ }))
47
+ .addCommand(new Command("show")
48
+ // `get` is what a naive agent reaches for first, because `workflows`,
49
+ // `knowledge page` and `table-ingestions` all use it and only `recipes`
50
+ // uses `show` (while `sequences` is the mirror image and rejects
51
+ // `show`). A blind user eval on 2026-09-13 burned two steps on
52
+ // `recipes get inbound-led-outbound` -> "unknown command 'get'".
53
+ // The catalog is the front door of the whole kit; it should not punish
54
+ // the guess the rest of the CLI teaches.
55
+ .alias("get")
56
+ .description("Show one recipe: its kit, the install status of each stage here, prerequisites, credits, approval gates, and the playbook body. Alias: `get`.")
57
+ .argument("<slug>", "Recipe slug, e.g. outbound-pilot-50.")
58
+ .option("--section <heading>", "Read one recipe heading instead of the whole playbook.")
59
+ .option("--json", "Print a JSON envelope.")
60
+ .action(async (slug, options) => {
61
+ await handleAsyncAction("recipes show", options, () => requestOxygen("/api/cli/recipes/get", {
62
+ method: "POST",
63
+ body: { slug, ...(readOption(options.section) ? { section: readOption(options.section) } : {}) },
64
+ }));
65
+ }))
66
+ .addCommand(new Command("install")
67
+ .description("Install a recipe into the workspace wiki as a playbook page (revisioned, retrieval-grounded, with per-version provenance).")
68
+ .argument("<slug>", "Recipe slug, e.g. outbound-pilot-50.")
69
+ .option("--slug <wiki_slug>", "Override the target wiki slug (default playbook-<recipe-slug>).")
70
+ .option("--draft", "Install as a draft page (drafts never ground AI actions until activated).")
71
+ .option("--force", "Overwrite a customized installed copy (edits survive as a page revision).")
72
+ .option("--json", "Print a JSON envelope.")
73
+ .action(async (slug, options) => {
74
+ await handleAsyncAction("recipes install", options, () => {
75
+ const body = { slug };
76
+ const wikiSlug = readOption(options.slug);
77
+ if (wikiSlug)
78
+ body.wiki_slug = wikiSlug;
79
+ if (options.draft)
80
+ body.draft = true;
81
+ if (options.force)
82
+ body.force = true;
83
+ return requestOxygen("/api/cli/recipes/install", { method: "POST", body });
84
+ });
85
+ }))
86
+ .addCommand(new Command("apply")
87
+ .description("Install a recipe's kit: every Blueprint stage in order under ONE approval — 0 credits, no provider calls, no external writes, every installed Workflow disabled until you arm it with its own credit cap. A stage whose Workflow is already active is left untouched. `--dry-run` preflights every stage into one combined forecast and writes nothing.")
88
+ .argument("<slug>", "Recipe slug, e.g. inbound-led-outbound.")
89
+ .option("--input-json <json>", "Stage inputs as a JSON object keyed by blueprint id, e.g. '{\"linkedin-profile-engager-monitor\":{\"profiles\":[\"https://www.linkedin.com/in/example\"],\"max_credits\":2200}}'.")
90
+ .option("--table-ref <blueprint.ref=table...>", "Bind a stage's table ref to an existing table id or slug, e.g. --table-ref linkedin-engager-tier-router.engaged_people=linkedin-engaged-people (repeatable).", collectMultiple, [])
91
+ .option("--dry-run", "Preflight every stage and print the combined forecast; installs nothing.")
92
+ .option("--json", "Print a JSON envelope.")
93
+ .action(async (slug, options) => {
94
+ const command = options.dryRun ? "recipes preflight" : "recipes apply";
95
+ await handleAsyncAction(command, options, () => {
96
+ const body = { slug };
97
+ const inputJson = readOption(options.inputJson);
98
+ if (inputJson)
99
+ body.inputs = parseJsonValue(inputJson, "--input-json");
100
+ const tableRefs = {};
101
+ for (const entry of options.tableRef ?? []) {
102
+ const eq = entry.indexOf("=");
103
+ const dot = entry.indexOf(".");
104
+ if (eq <= 0 || dot <= 0 || dot > eq) {
105
+ throw new Error(`--table-ref expects <blueprint>.<ref>=<table id or slug>, got "${entry}"`);
106
+ }
107
+ const blueprint = entry.slice(0, dot);
108
+ const ref = entry.slice(dot + 1, eq);
109
+ const table = entry.slice(eq + 1);
110
+ tableRefs[blueprint] = { ...(tableRefs[blueprint] ?? {}), [ref]: table };
111
+ }
112
+ if (Object.keys(tableRefs).length > 0)
113
+ body.table_refs = tableRefs;
114
+ return requestOxygen(options.dryRun ? "/api/cli/recipes/preflight" : "/api/cli/recipes/apply", {
115
+ method: "POST",
116
+ body,
117
+ });
118
+ });
119
+ }));
120
+ }
@@ -0,0 +1,3 @@
1
+ import { ExtractedCommandActionHandler } from "../command-support.js";
2
+ import { Command } from "commander";
3
+ export declare function registerReviewsFamily(program: Command, handleAsyncAction: ExtractedCommandActionHandler): void;
@@ -0,0 +1,75 @@
1
+ import { parseJsonValue } from "../command-support.js";
2
+ import { requestOxygen } from "../http-client.js";
3
+ import { readOption } from "../util.js";
4
+ import { Command } from "commander";
5
+ export function registerReviewsFamily(program, handleAsyncAction) {
6
+ // The deprecated `templates` alias tree was removed at its registry sunset
7
+ // (v1.290.0) — `oxygen prompts` has been canonical since v1.80.0.
8
+ program
9
+ .command("reviews")
10
+ .description("Human-in-the-loop reviews for AI-generated outreach messages.")
11
+ .addCommand(new Command("list")
12
+ .description("List message reviews.")
13
+ .option("--status <status>", "Filter by pending, accepted, rejected, or superseded.")
14
+ .option("--table <table_id>", "Filter by table id.")
15
+ .option("--limit <n>", "Max rows to return (default 50, max 200).")
16
+ .option("--json", "Print a JSON envelope.")
17
+ .action(async (options) => {
18
+ await handleAsyncAction("reviews list", options, () => {
19
+ const params = new URLSearchParams();
20
+ const status = readOption(options.status);
21
+ const table = readOption(options.table);
22
+ const limit = readOption(options.limit);
23
+ if (status)
24
+ params.set("status", status);
25
+ if (table)
26
+ params.set("table_id", table);
27
+ if (limit)
28
+ params.set("limit", limit);
29
+ const qs = params.toString() ? `?${params.toString()}` : "";
30
+ return requestOxygen(`/api/cli/message-reviews${qs}`);
31
+ });
32
+ }))
33
+ .addCommand(new Command("next")
34
+ .description("Read the oldest pending review.")
35
+ .option("--table <table_id>", "Filter by table id.")
36
+ .option("--json", "Print a JSON envelope.")
37
+ .action(async (options) => {
38
+ await handleAsyncAction("reviews next", options, () => {
39
+ const params = new URLSearchParams();
40
+ const table = readOption(options.table);
41
+ if (table)
42
+ params.set("table_id", table);
43
+ const qs = params.toString() ? `?${params.toString()}` : "";
44
+ return requestOxygen(`/api/cli/message-reviews/next${qs}`);
45
+ });
46
+ }))
47
+ .addCommand(new Command("accept")
48
+ .description("Accept a pending message review.")
49
+ .argument("<review_id>", "Message review UUID.")
50
+ .option("--json", "Print a JSON envelope.")
51
+ .action(async (reviewId, options) => {
52
+ await handleAsyncAction("reviews accept", options, () => requestOxygen("/api/cli/message-reviews/decide", {
53
+ method: "POST",
54
+ body: { id: reviewId, decision: "accept" },
55
+ }));
56
+ }))
57
+ .addCommand(new Command("reject")
58
+ .description("Reject a pending message review with optional highlights and auto-rerun.")
59
+ .argument("<review_id>", "Message review UUID.")
60
+ .option("--highlights-json <json>", "JSON array of {start,end,comment} highlight objects.")
61
+ .option("--auto-rerun", "Trigger a single-row rerun of the column after rejecting.")
62
+ .option("--json", "Print a JSON envelope.")
63
+ .action(async (reviewId, options) => {
64
+ await handleAsyncAction("reviews reject", options, () => {
65
+ const body = { id: reviewId, decision: "reject" };
66
+ const highlightsJson = readOption(options.highlightsJson);
67
+ if (highlightsJson) {
68
+ body.highlights = parseJsonValue(highlightsJson, "--highlights-json");
69
+ }
70
+ if (options.autoRerun)
71
+ body.auto_rerun = true;
72
+ return requestOxygen("/api/cli/message-reviews/decide", { method: "POST", body });
73
+ });
74
+ }));
75
+ }
@@ -0,0 +1,3 @@
1
+ import { ExtractedCommandActionHandler } from "../command-support.js";
2
+ import { Command } from "commander";
3
+ export declare function registerRowsFamily(program: Command, handleAsyncAction: ExtractedCommandActionHandler): void;
@@ -0,0 +1,27 @@
1
+ import { readPositiveInt } from "../cli-values.js";
2
+ import { requestOxygen } from "../http-client.js";
3
+ import { Command } from "commander";
4
+ export function registerRowsFamily(program, handleAsyncAction) {
5
+ program
6
+ .command("rows")
7
+ .description("Workspace row provenance commands.")
8
+ .addCommand(new Command("history")
9
+ .description("Show row change history.")
10
+ .argument("<table>", "Table id or slug.")
11
+ .argument("<row_id>", "Workspace row UUID.")
12
+ .option("--limit <n>", "Maximum changes to return. Defaults to 50.")
13
+ .option("--json", "Print a JSON envelope.")
14
+ .action(async (table, rowId, options) => {
15
+ await handleAsyncAction("rows history", options, () => {
16
+ const limit = readPositiveInt(options.limit);
17
+ return requestOxygen("/api/cli/tables/rows/history", {
18
+ method: "POST",
19
+ body: {
20
+ table,
21
+ row_id: rowId,
22
+ ...(limit ? { limit } : {}),
23
+ },
24
+ });
25
+ });
26
+ }));
27
+ }
@@ -0,0 +1,3 @@
1
+ import { ExtractedCommandActionHandler } from "../command-support.js";
2
+ import { Command } from "commander";
3
+ export declare function registerRunsFamily(program: Command, handleAsyncAction: ExtractedCommandActionHandler): void;
@@ -0,0 +1,37 @@
1
+ import { readPositiveInt } from "../cli-values.js";
2
+ import { requestOxygen } from "../http-client.js";
3
+ import { readOption } from "../util.js";
4
+ import { Command } from "commander";
5
+ export function registerRunsFamily(program, handleAsyncAction) {
6
+ program
7
+ .command("runs")
8
+ .description("Workspace run ledger and provenance. `runs list --table <table>` is one table's full run history: imports, row writes and column runs.")
9
+ .addCommand(new Command("list")
10
+ .description("List workspace runs, newest first; --table gives one table's full run history.")
11
+ .option("--table <table>", "One table's full run history (id, slug or table URL): imports, row writes, column runs and Function calls.")
12
+ .option("--limit <n>", "Maximum runs to return. Defaults to 50.")
13
+ .option("--json", "Print a JSON envelope.")
14
+ .action(async (options) => {
15
+ await handleAsyncAction("runs list", options, () => {
16
+ const limit = readPositiveInt(options.limit);
17
+ const params = new URLSearchParams();
18
+ const table = readOption(options.table);
19
+ if (table)
20
+ params.set("table", table);
21
+ if (limit)
22
+ params.set("limit", String(limit));
23
+ const query = params.toString();
24
+ return requestOxygen(`/api/cli/runs${query ? `?${query}` : ""}`);
25
+ });
26
+ }))
27
+ .addCommand(new Command("get")
28
+ .description("Get one run with events.")
29
+ .argument("<run_id>", "Run UUID.")
30
+ .option("--json", "Print a JSON envelope.")
31
+ .action(async (runId, options) => {
32
+ await handleAsyncAction("runs get", options, () => requestOxygen("/api/cli/runs/get", {
33
+ method: "POST",
34
+ body: { run_id: runId },
35
+ }));
36
+ }));
37
+ }
@@ -0,0 +1,3 @@
1
+ import { ExtractedCommandActionHandler } from "../command-support.js";
2
+ import { Command } from "commander";
3
+ export declare function registerSearchFamily(program: Command, handleAsyncAction: ExtractedCommandActionHandler): void;
@@ -0,0 +1,182 @@
1
+ import { parseJsonObject, readPositiveInt } from "../cli-values.js";
2
+ import { TABLE_INGESTION_WAIT_DEFAULT_INTERVAL_SECONDS, TABLE_INGESTION_WAIT_DEFAULT_TIMEOUT_SECONDS, buildGetSurfaceRunWaitConfig, isTerminalTableIngestionStatus, readCsvOption, readFileIfPresent, readPositiveNumber, readSearchPlanJson } from "../command-support.js";
3
+ import { requestOxygen } from "../http-client.js";
4
+ import { waitForCliRun } from "../run-wait.js";
5
+ import { readOption } from "../util.js";
6
+ import { OxygenError } from "@oxygen/shared/cli-result";
7
+ import { Command } from "commander";
8
+ // Company search has moved to the dedicated companies-search surface. The CLI rejects
9
+ // `oxygen search plan --kind company_search` client-side so a stale agent gets a typed,
10
+ // self-correcting error instead of an opaque server 400. Message mirrors
11
+ // COMPANY_SEARCH_MOVED_MESSAGE in @oxygen/tools (CLI does not import that package).
12
+ const COMPANY_SEARCH_MOVED_MESSAGE = "Company search is handled by the dedicated companies-search surface. Use: oxygen companies search plan --prompt \"<goal>\" (CLI) or oxygen_companies_search_plan (MCP).";
13
+ function assertNotCompanySearchKind(kind) {
14
+ if (readOption(kind) === "company_search") {
15
+ throw new OxygenError("use_companies_search", COMPANY_SEARCH_MOVED_MESSAGE, {
16
+ details: {
17
+ equivalent_cli: "oxygen companies search plan --prompt <goal>",
18
+ equivalent_mcp: "oxygen_companies_search_plan",
19
+ },
20
+ exitCode: 1,
21
+ });
22
+ }
23
+ }
24
+ // People search has moved to the dedicated people-search surface. The CLI rejects
25
+ // `oxygen search plan --kind people_search` client-side so a stale agent gets a typed,
26
+ // self-correcting error instead of an opaque server 400. Message mirrors
27
+ // PEOPLE_SEARCH_MOVED_MESSAGE in @oxygen/tools (CLI does not import that package).
28
+ const PEOPLE_SEARCH_MOVED_MESSAGE = "People search is handled by the dedicated people-search surface. Use: oxygen people search plan --prompt \"<goal>\" (CLI) or oxygen_people_search_plan (MCP).";
29
+ function assertNotPeopleSearchKind(kind) {
30
+ if (readOption(kind) === "people_search") {
31
+ throw new OxygenError("use_people_search", PEOPLE_SEARCH_MOVED_MESSAGE, {
32
+ details: {
33
+ equivalent_cli: "oxygen people search plan --prompt <goal>",
34
+ equivalent_mcp: "oxygen_people_search_plan",
35
+ },
36
+ exitCode: 1,
37
+ });
38
+ }
39
+ }
40
+ function waitForSearchRun(runId, options) {
41
+ return waitForCliRun(buildGetSurfaceRunWaitConfig({
42
+ runId,
43
+ endpoint: "/api/cli/search/runs",
44
+ requestedTimeoutSeconds: options.timeoutSeconds,
45
+ requestedIntervalSeconds: options.intervalSeconds,
46
+ // Search intentionally reuses the table-ingestion defaults and terminal
47
+ // predicate; the status set is identical (a naming-drift smell, not a bug).
48
+ defaultTimeoutSeconds: TABLE_INGESTION_WAIT_DEFAULT_TIMEOUT_SECONDS,
49
+ defaultIntervalSeconds: TABLE_INGESTION_WAIT_DEFAULT_INTERVAL_SECONDS,
50
+ isTerminal: isTerminalTableIngestionStatus,
51
+ runKey: "searchRun",
52
+ runIdKey: "searchRunId",
53
+ timeoutCode: "search_run_wait_timeout",
54
+ timeoutMessage: "Timed out waiting for search run to finish.",
55
+ timeoutDetailIdKey: "search_run_id",
56
+ }));
57
+ }
58
+ export function registerSearchFamily(program, handleAsyncAction) {
59
+ program
60
+ .command("search")
61
+ .description("Agent-operable people, signal, web, scrape, and local-business search jobs. For company search use 'oxygen companies search'; for hiring-based account discovery use 'oxygen companies search plan --prompt <goal> --source-intent hiring'.")
62
+ .addCommand(new Command("plan")
63
+ .description("Plan an Oxygen search or scrape route before running provider jobs.")
64
+ .requiredOption("--goal <file|text>", "Search/scrape goal text, or a local file path containing the goal.")
65
+ .option("--kind <kind>", "Route kind: signal_search, web_search, web_scrape, local_business_search, or source_specific_scrape. For people search use 'oxygen people search plan'; for company search use 'oxygen companies search plan'.")
66
+ .option("--target-count <n>", "Optional target row count.")
67
+ .option("--geography <text>", "Optional geography hint.")
68
+ .option("--known-urls <urls>", "Comma-separated known URLs for scrape routes.")
69
+ .option("--provider-hints <providers>", "Comma-separated provider hints.")
70
+ .option("--json", "Print a JSON envelope.")
71
+ .action(async (options) => {
72
+ await handleAsyncAction("search plan", options, () => {
73
+ assertNotCompanySearchKind(options.kind);
74
+ assertNotPeopleSearchKind(options.kind);
75
+ return requestOxygen("/api/cli/search/plan", {
76
+ method: "POST",
77
+ body: {
78
+ goal: readFileIfPresent(options.goal),
79
+ ...(readOption(options.kind) ? { kind: readOption(options.kind) } : {}),
80
+ ...(readPositiveInt(options.targetCount) ? { target_count: readPositiveInt(options.targetCount) } : {}),
81
+ ...(readOption(options.geography) ? { geography: readOption(options.geography) } : {}),
82
+ ...(readOption(options.knownUrls) ? { known_urls: readCsvOption(options.knownUrls) } : {}),
83
+ ...(readOption(options.providerHints) ? { provider_hints: readCsvOption(options.providerHints) } : {}),
84
+ },
85
+ });
86
+ });
87
+ }))
88
+ .addCommand(new Command("run")
89
+ .description("Preview or enqueue a durable table-backed search/scrape job from a search plan.")
90
+ .argument("<table>", "Target table id or slug for live runs.")
91
+ .requiredOption("--plan <file|json>", "Search plan JSON returned by oxygen search plan.")
92
+ .option("--route <route_id>", "Route id from the plan. Defaults to recommended_route_id.")
93
+ .requiredOption("--request-json <json>", "Provider request JSON for the selected route.")
94
+ .option("--mode <mode>", "dry_run or live. Defaults to dry_run.")
95
+ .option("--max-credits <n>", "Required credit ceiling for live runs.")
96
+ .option("--max-pages <n>", "Maximum provider pages to fetch. Defaults to the route's page cap.")
97
+ .option("--rows-path <path>", "Override route rows path.")
98
+ .option("--row-mapping-json <json>", "Override route row mapping.")
99
+ .option("--cursor-path <path>", "Override route cursor path.")
100
+ .option("--cursor-request-key <path>", "Override request key that receives the next cursor.")
101
+ .option("--upsert-key <key>", "Column key used to upsert instead of inserting.")
102
+ .option("--connection-id <connection_id>", "Optional provider integration connection id.")
103
+ .option("--json", "Print a JSON envelope.")
104
+ .action(async (table, options) => {
105
+ await handleAsyncAction("search run", options, () => requestOxygen("/api/cli/search/run", {
106
+ method: "POST",
107
+ body: {
108
+ table,
109
+ // Accepts the `search plan --json` envelope as-is, like the
110
+ // companies/people/signals runs do: the inner `data` is the plan.
111
+ plan: readSearchPlanJson(options.plan),
112
+ request: parseJsonObject(options.requestJson),
113
+ ...(readOption(options.route) ? { route_id: readOption(options.route) } : {}),
114
+ ...(readOption(options.mode) ? { mode: readOption(options.mode) } : {}),
115
+ ...(readPositiveNumber(options.maxCredits) ? { max_credits: readPositiveNumber(options.maxCredits) } : {}),
116
+ ...(readPositiveInt(options.maxPages) ? { max_pages: readPositiveInt(options.maxPages) } : {}),
117
+ ...(readOption(options.rowsPath) ? { rows_path: readOption(options.rowsPath) } : {}),
118
+ ...(options.rowMappingJson ? { row_mapping: parseJsonObject(options.rowMappingJson) } : {}),
119
+ ...(readOption(options.cursorPath) ? { cursor_path: readOption(options.cursorPath) } : {}),
120
+ ...(readOption(options.cursorRequestKey) ? { cursor_request_key: readOption(options.cursorRequestKey) } : {}),
121
+ ...(readOption(options.upsertKey) ? { upsert_key: readOption(options.upsertKey) } : {}),
122
+ ...(readOption(options.connectionId) ? { connection_id: readOption(options.connectionId) } : {}),
123
+ },
124
+ }));
125
+ }))
126
+ .addCommand(new Command("runs")
127
+ .description("Inspect and control durable search/scrape runs.")
128
+ .addCommand(new Command("get")
129
+ .description("Get one durable search/scrape run.")
130
+ .argument("<run_id>", "Search run UUID.")
131
+ .option("--json", "Print a JSON envelope.")
132
+ .action(async (runId, options) => {
133
+ await handleAsyncAction("search runs get", options, () => requestOxygen(`/api/cli/search/runs/${encodeURIComponent(runId)}`));
134
+ }))
135
+ .addCommand(new Command("items")
136
+ .description("List search/scrape run items.")
137
+ .argument("<run_id>", "Search run UUID.")
138
+ .option("--status <status>", "Filter by pending, leased, completed, failed, skipped, or canceled.")
139
+ .option("--limit <n>", "Maximum items to return. Defaults to 100.")
140
+ .option("--json", "Print a JSON envelope.")
141
+ .action(async (runId, options) => {
142
+ await handleAsyncAction("search runs items", options, () => {
143
+ const query = new URLSearchParams();
144
+ if (readOption(options.status))
145
+ query.set("status", readOption(options.status) ?? "");
146
+ const limit = readPositiveInt(options.limit);
147
+ if (limit)
148
+ query.set("limit", String(limit));
149
+ const suffix = query.toString() ? `?${query.toString()}` : "";
150
+ return requestOxygen(`/api/cli/search/runs/${encodeURIComponent(runId)}/items${suffix}`);
151
+ });
152
+ }))
153
+ .addCommand(new Command("wait")
154
+ .description("Poll a durable search/scrape run until it finishes.")
155
+ .argument("<run_id>", "Search run UUID.")
156
+ .option("--timeout-seconds <n>", "Maximum time to wait. Defaults to 600.")
157
+ .option("--interval-seconds <n>", "Polling interval. Defaults to 5.")
158
+ .option("--json", "Print a JSON envelope.")
159
+ .action(async (runId, options) => {
160
+ await handleAsyncAction("search runs wait", options, () => waitForSearchRun(runId, options));
161
+ }))
162
+ .addCommand(new Command("cancel")
163
+ .description("Request cancellation for a queued or running search/scrape run.")
164
+ .argument("<run_id>", "Search run UUID.")
165
+ .option("--json", "Print a JSON envelope.")
166
+ .action(async (runId, options) => {
167
+ await handleAsyncAction("search runs cancel", options, () => requestOxygen(`/api/cli/search/runs/${encodeURIComponent(runId)}/cancel`, {
168
+ method: "POST",
169
+ body: {},
170
+ }));
171
+ }))
172
+ .addCommand(new Command("retry-failed")
173
+ .description("Requeue failed search/scrape run items.")
174
+ .argument("<run_id>", "Search run UUID.")
175
+ .option("--json", "Print a JSON envelope.")
176
+ .action(async (runId, options) => {
177
+ await handleAsyncAction("search runs retry-failed", options, () => requestOxygen(`/api/cli/search/runs/${encodeURIComponent(runId)}/retry-failed`, {
178
+ method: "POST",
179
+ body: {},
180
+ }));
181
+ })));
182
+ }
@@ -0,0 +1,3 @@
1
+ import { ExtractedCommandActionHandler } from "../command-support.js";
2
+ import { Command } from "commander";
3
+ export declare function registerSendersFamily(program: Command, handleAsyncAction: ExtractedCommandActionHandler): void;