@oxygen-agent/cli 1.982.3 → 1.1003.12

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 (127) hide show
  1. package/README.md +1 -1
  2. package/dist/admin-primary-providers-render.d.ts +0 -2
  3. package/dist/admin-primary-providers-render.js +1 -1
  4. package/dist/browser-login.js +1 -4
  5. package/dist/command-manifest.d.ts +3 -2
  6. package/dist/command-manifest.js +10 -0
  7. package/dist/credentials.d.ts +1 -1
  8. package/dist/functions-commands.js +27 -7
  9. package/dist/help.d.ts +29 -0
  10. package/dist/help.js +139 -0
  11. package/dist/index.js +1875 -164
  12. package/dist/knowledge-mirror.d.ts +2 -2
  13. package/dist/runtime.d.ts +0 -15
  14. package/dist/runtime.js +1 -1
  15. package/dist/session.d.ts +4 -3
  16. package/dist/skills.d.ts +8 -7
  17. package/dist/skills.js +24 -10
  18. package/dist/transcript.d.ts +2 -1
  19. package/dist/ugc-commands.d.ts +3 -6
  20. package/dist/ugc-commands.js +2 -1200
  21. package/dist/util.d.ts +1 -1
  22. package/dist/util.js +1 -3
  23. package/node_modules/@oxygen/cli-ugc/dist/commands.d.ts +3 -0
  24. package/node_modules/@oxygen/cli-ugc/dist/commands.js +1178 -0
  25. package/node_modules/@oxygen/cli-ugc/dist/field-parser.d.ts +7 -0
  26. package/node_modules/@oxygen/cli-ugc/dist/field-parser.js +25 -0
  27. package/node_modules/@oxygen/cli-ugc/dist/index.d.ts +14 -0
  28. package/node_modules/@oxygen/cli-ugc/dist/index.js +5 -0
  29. package/node_modules/@oxygen/cli-ugc/package.json +15 -0
  30. package/node_modules/@oxygen/formula/dist/coerce.d.ts +10 -0
  31. package/node_modules/@oxygen/formula/dist/coerce.js +10 -0
  32. package/node_modules/@oxygen/formula/dist/expression.js +14 -1
  33. package/node_modules/@oxygen/formula/dist/formula-functions.js +136 -1
  34. package/node_modules/@oxygen/formula/dist/hash.d.ts +19 -0
  35. package/node_modules/@oxygen/formula/dist/hash.js +199 -0
  36. package/node_modules/@oxygen/formula/dist/index.d.ts +1 -0
  37. package/node_modules/@oxygen/formula/dist/index.js +1 -0
  38. package/node_modules/@oxygen/formula/dist/value-cleaners.d.ts +74 -0
  39. package/node_modules/@oxygen/formula/dist/value-cleaners.js +358 -0
  40. package/node_modules/@oxygen/shared/dist/array-utils.d.ts +5 -0
  41. package/node_modules/@oxygen/shared/dist/array-utils.js +11 -0
  42. package/node_modules/@oxygen/shared/dist/billing.d.ts +103 -47
  43. package/node_modules/@oxygen/shared/dist/billing.js +150 -40
  44. package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +17 -0
  45. package/node_modules/@oxygen/shared/dist/capability-discovery.js +114 -16
  46. package/node_modules/@oxygen/shared/dist/column-autofill.d.ts +52 -0
  47. package/node_modules/@oxygen/shared/dist/column-autofill.js +80 -0
  48. package/node_modules/@oxygen/shared/dist/column-output-fields.js +14 -10
  49. package/node_modules/@oxygen/shared/dist/company-enrichment-fields.d.ts +108 -0
  50. package/node_modules/@oxygen/shared/dist/company-enrichment-fields.js +545 -0
  51. package/node_modules/@oxygen/shared/dist/copilot-playbooks.d.ts +18 -0
  52. package/node_modules/@oxygen/shared/dist/copilot-playbooks.js +43 -0
  53. package/node_modules/@oxygen/shared/dist/copilot-skills.d.ts +15 -0
  54. package/node_modules/@oxygen/shared/dist/copilot-skills.generated.d.ts +31 -0
  55. package/node_modules/@oxygen/shared/dist/copilot-skills.generated.js +41 -0
  56. package/node_modules/@oxygen/shared/dist/copilot-skills.js +6 -0
  57. package/node_modules/@oxygen/shared/dist/deploy-env.d.ts +74 -0
  58. package/node_modules/@oxygen/shared/dist/deploy-env.js +82 -0
  59. package/node_modules/@oxygen/shared/dist/dnc-rules.d.ts +130 -0
  60. package/node_modules/@oxygen/shared/dist/dnc-rules.js +221 -0
  61. package/node_modules/@oxygen/shared/dist/enrichment-intents.d.ts +103 -0
  62. package/node_modules/@oxygen/shared/dist/enrichment-intents.js +819 -0
  63. package/node_modules/@oxygen/shared/dist/error-message.d.ts +1 -0
  64. package/node_modules/@oxygen/shared/dist/error-message.js +3 -0
  65. package/node_modules/@oxygen/shared/dist/error-redaction.js +1 -3
  66. package/node_modules/@oxygen/shared/dist/external-write-policy.d.ts +33 -0
  67. package/node_modules/@oxygen/shared/dist/external-write-policy.js +68 -0
  68. package/node_modules/@oxygen/shared/dist/format-percent.d.ts +8 -0
  69. package/node_modules/@oxygen/shared/dist/format-percent.js +13 -0
  70. package/node_modules/@oxygen/shared/dist/freemail-domains.d.ts +81 -0
  71. package/node_modules/@oxygen/shared/dist/freemail-domains.js +157 -0
  72. package/node_modules/@oxygen/shared/dist/future-signup-lifecycle-projection.d.ts +1 -0
  73. package/node_modules/@oxygen/shared/dist/future-signup-lifecycle-projection.js +1 -1
  74. package/node_modules/@oxygen/shared/dist/index.d.ts +14 -0
  75. package/node_modules/@oxygen/shared/dist/index.js +14 -0
  76. package/node_modules/@oxygen/shared/dist/json-path.js +1 -3
  77. package/node_modules/@oxygen/shared/dist/knowledge-bases.js +1 -3
  78. package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.d.ts +17 -2
  79. package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.js +28 -6
  80. package/node_modules/@oxygen/shared/dist/langfuse.d.ts +12 -1
  81. package/node_modules/@oxygen/shared/dist/langfuse.js +57 -8
  82. package/node_modules/@oxygen/shared/dist/linkedin-countries.d.ts +32 -0
  83. package/node_modules/@oxygen/shared/dist/linkedin-countries.js +359 -0
  84. package/node_modules/@oxygen/shared/dist/log-sink-selector.d.ts +39 -0
  85. package/node_modules/@oxygen/shared/dist/log-sink-selector.js +56 -0
  86. package/node_modules/@oxygen/shared/dist/log.d.ts +1 -0
  87. package/node_modules/@oxygen/shared/dist/log.js +6 -1
  88. package/node_modules/@oxygen/shared/dist/object-storage.d.ts +17 -0
  89. package/node_modules/@oxygen/shared/dist/object-storage.js +21 -0
  90. package/node_modules/@oxygen/shared/dist/otlp-log-sink.d.ts +54 -0
  91. package/node_modules/@oxygen/shared/dist/otlp-log-sink.js +213 -0
  92. package/node_modules/@oxygen/shared/dist/plan-capabilities.js +1 -0
  93. package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +23 -22
  94. package/node_modules/@oxygen/shared/dist/plan-limits.js +45 -18
  95. package/node_modules/@oxygen/shared/dist/pricing-sheet.d.ts +48 -41
  96. package/node_modules/@oxygen/shared/dist/pricing-sheet.js +36 -25
  97. package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.d.ts +22 -22
  98. package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.js +40 -34
  99. package/node_modules/@oxygen/shared/dist/product-analytics-environment.js +9 -0
  100. package/node_modules/@oxygen/shared/dist/product-analytics-events.d.ts +15 -0
  101. package/node_modules/@oxygen/shared/dist/product-analytics-events.js +15 -0
  102. package/node_modules/@oxygen/shared/dist/rate-window.d.ts +5 -0
  103. package/node_modules/@oxygen/shared/dist/rate-window.js +8 -0
  104. package/node_modules/@oxygen/shared/dist/research-output-contract.d.ts +33 -1
  105. package/node_modules/@oxygen/shared/dist/research-output-contract.js +65 -5
  106. package/node_modules/@oxygen/shared/dist/search-vocab.js +4 -5
  107. package/node_modules/@oxygen/shared/dist/select-options.js +6 -1
  108. package/node_modules/@oxygen/shared/dist/sequence-crm-events.d.ts +1 -1
  109. package/node_modules/@oxygen/shared/dist/sequence-failures.js +1 -5
  110. package/node_modules/@oxygen/shared/dist/sequence-hubspot-sync.d.ts +1 -1
  111. package/node_modules/@oxygen/shared/dist/sequences.d.ts +49 -0
  112. package/node_modules/@oxygen/shared/dist/sequences.js +134 -4
  113. package/node_modules/@oxygen/shared/dist/spend-safety.d.ts +22 -10
  114. package/node_modules/@oxygen/shared/dist/spend-safety.js +15 -21
  115. package/node_modules/@oxygen/shared/dist/sql-rows.d.ts +1 -0
  116. package/node_modules/@oxygen/shared/dist/sql-rows.js +3 -0
  117. package/node_modules/@oxygen/shared/dist/telemetry.js +9 -1
  118. package/node_modules/@oxygen/shared/dist/type-guards.d.ts +22 -0
  119. package/node_modules/@oxygen/shared/dist/type-guards.js +35 -0
  120. package/node_modules/@oxygen/shared/dist/value-readers.d.ts +21 -0
  121. package/node_modules/@oxygen/shared/dist/value-readers.js +59 -0
  122. package/node_modules/@oxygen/shared/dist/version.js +1 -1
  123. package/node_modules/@oxygen/shared/package.json +60 -0
  124. package/node_modules/@oxygen/workflows/dist/graph/expression.js +2 -5
  125. package/node_modules/@oxygen/workflows/dist/graph/manifest-schema.d.ts +15 -15
  126. package/node_modules/@oxygen/workflows/dist/graph/params.js +1 -1
  127. package/package.json +6 -3
@@ -1,5 +1,5 @@
1
1
  export declare const GENERATED_MIRROR_FILE_HEADER = "<!-- generated by oxygen knowledge sync \u2014 local edits are overwritten -->";
2
- export type MirrorPageRecord = {
2
+ type MirrorPageRecord = {
3
3
  id: string;
4
4
  revision: number;
5
5
  /** sha256 hex of the exact bytes the server rendered and this client wrote. */
@@ -98,7 +98,7 @@ export declare function acquireMirrorLock(dir: string, options?: {
98
98
  export declare function releaseMirrorLock(dir: string): void;
99
99
  export declare function writeGeneratedIndexFile(dir: string, index: MirrorIndexSnapshot): void;
100
100
  export declare function writeGeneratedLogFile(dir: string, entries: MirrorLogEntry[]): void;
101
- export type MirrorPushCandidate = {
101
+ type MirrorPushCandidate = {
102
102
  slug: string;
103
103
  /** dirty = tracked page whose local bytes drifted; new = untracked local file. */
104
104
  kind: "dirty" | "new";
package/dist/runtime.d.ts CHANGED
@@ -1,20 +1,5 @@
1
1
  declare const DEV_CLI_BINARY = "oxygen-dev";
2
2
  declare const PROD_CLI_BINARY = "oxygen";
3
- /**
4
- * Pins a terminal to a *host*, not to a profile label.
5
- *
6
- * `OXYGEN_PROFILE=default` was the guard prescribed after the last profile drift
7
- * (OXY-4081), and it cannot work: `default` is a name, and `login` writes an
8
- * `apiUrl` into whatever name is active — so the profile called `default` became
9
- * dev and the pin followed it there (OXY-4109). Every credit balance, ticket, and
10
- * whoami then came back from dev looking exactly like a healthy production answer.
11
- *
12
- * The invariant that a staff runbook actually needs is the host it dialed. Set
13
- * `OXYGEN_REQUIRE_API_URL=https://oxygen-agent.com` and any command that resolves
14
- * somewhere else refuses to run instead of quietly answering from the wrong
15
- * environment.
16
- */
17
- export declare const REQUIRED_API_URL_ENV = "OXYGEN_REQUIRE_API_URL";
18
3
  export type CliBinaryName = typeof DEV_CLI_BINARY | typeof PROD_CLI_BINARY;
19
4
  /**
20
5
  * Where a command actually sent its request, and what put it there.
package/dist/runtime.js CHANGED
@@ -17,7 +17,7 @@ const PROD_CLI_BINARY = "oxygen";
17
17
  * somewhere else refuses to run instead of quietly answering from the wrong
18
18
  * environment.
19
19
  */
20
- export const REQUIRED_API_URL_ENV = "OXYGEN_REQUIRE_API_URL";
20
+ const REQUIRED_API_URL_ENV = "OXYGEN_REQUIRE_API_URL";
21
21
  export function resolveCliBinaryName(env = process.env, argv = process.argv) {
22
22
  const explicit = normalizeBinaryName(env.OXYGEN_CLI_BINARY ?? env.OXYGEN_CLI_NAME);
23
23
  if (explicit)
package/dist/session.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  export type SessionStepStatus = "pending" | "running" | "completed" | "error" | "skipped";
2
- export type SessionStep = {
2
+ type SessionStep = {
3
3
  label: string;
4
4
  status: SessionStepStatus;
5
5
  startedAt: string | null;
6
6
  completedAt: string | null;
7
7
  };
8
- export type SessionStatusMessage = {
8
+ type SessionStatusMessage = {
9
9
  id: string;
10
10
  message: string;
11
11
  stepIndex: number | null;
12
12
  createdAt: string;
13
13
  };
14
- export type SessionOutput = {
14
+ type SessionOutput = {
15
15
  id: string;
16
16
  type: "csv" | "file" | "table";
17
17
  path: string | null;
@@ -54,3 +54,4 @@ export declare function addSessionOutput(input: {
54
54
  export declare function getSessionUsage(input: {
55
55
  sessionId?: string | null;
56
56
  }): Record<string, unknown>;
57
+ export {};
package/dist/skills.d.ts CHANGED
@@ -7,7 +7,8 @@ export type SkillsInstallOptions = {
7
7
  apiUrl?: string;
8
8
  agents?: string | string[];
9
9
  skill?: string;
10
- project?: boolean;
10
+ /** `true` for the current directory, or the project directory to install into. */
11
+ project?: boolean | string;
11
12
  copy?: boolean;
12
13
  };
13
14
  export type SkillsListOptions = {
@@ -33,12 +34,6 @@ export type AutomaticSkillsInstallResult = {
33
34
  details?: unknown;
34
35
  };
35
36
  };
36
- export type SkillsAccessResponse = {
37
- base_url: string;
38
- index_url: string;
39
- expires_at: string;
40
- skills_version?: string;
41
- };
42
37
  export type SkillsInstallSource = {
43
38
  authenticated: boolean;
44
39
  /** Base URL handed to `npx skills add` (tokenized when authenticated). */
@@ -72,6 +67,12 @@ options: SkillsInstallOptions, runtime?: {
72
67
  execFileSync?: ExecFileSyncLike;
73
68
  spawnSync?: SpawnSyncLike;
74
69
  } & SkillsSourceRuntime): Promise<Record<string, unknown>>;
70
+ /**
71
+ * `--project` is a bare flag for the current directory, or names the project
72
+ * directory to install into. `--project .` used to fail with "too many
73
+ * arguments" (2026-09-16 blind baseline) because the flag took no value.
74
+ */
75
+ export declare function resolveSkillProjectDir(project: boolean | string | undefined): string | null;
75
76
  export declare function runAutomaticSkillsInstall(options?: {
76
77
  apiUrl?: string;
77
78
  env?: NodeJS.ProcessEnv;
package/dist/skills.js CHANGED
@@ -2,7 +2,7 @@ import { spawnSync } from "node:child_process";
2
2
  import { existsSync, mkdirSync, mkdtempSync, readdirSync, rmSync, writeFileSync } from "node:fs";
3
3
  import { homedir, tmpdir } from "node:os";
4
4
  import { dirname, join, resolve } from "node:path";
5
- import { OxygenError, inferUserCapabilityRoute, serializeCapabilityRoute, toFailure, } from "@oxygen/shared";
5
+ import { OxygenError, errorMessage, inferUserCapabilityRoute, serializeCapabilityRoute, toFailure, } from "@oxygen/shared";
6
6
  import { defaultApiUrl, loadCredentials, normalizeApiUrl } from "./credentials.js";
7
7
  import { requestOxygen } from "./http-client.js";
8
8
  import { isRecord, readOption } from "./util.js";
@@ -226,7 +226,8 @@ options, runtime = {}) {
226
226
  const env = runtime.env ?? process.env;
227
227
  const platform = runtime.platform ?? process.platform;
228
228
  const spawn = runtime.spawnSync ?? wrapExecFileSync(runtime.execFileSync) ?? spawnSync;
229
- const installLocations = resolveSkillInstallLocations(agents, options.project === true, env);
229
+ const projectDir = resolveSkillProjectDir(options.project);
230
+ const installLocations = resolveSkillInstallLocations(agents, projectDir, env);
230
231
  // The vendored installer writes immediately once spawned. Tell humans and
231
232
  // agents the exact destination first so a default global install is never a
232
233
  // surprise, while keeping stdout as one stable JSON envelope under --json.
@@ -268,6 +269,8 @@ options, runtime = {}) {
268
269
  const result = spawn(invocation.executable, invocation.args, {
269
270
  encoding: "utf8",
270
271
  env,
272
+ // A project install lands relative to the installer's working directory.
273
+ ...(projectDir ? { cwd: projectDir } : {}),
271
274
  stdio: ["ignore", "pipe", "pipe"],
272
275
  windowsHide: true,
273
276
  ...(platform === "win32" ? { windowsVerbatimArguments: true } : {}),
@@ -342,11 +345,25 @@ options, runtime = {}) {
342
345
  summary: summarizeInstallOutcome(agents.length, skippedAgents.length, 0),
343
346
  };
344
347
  }
345
- function resolveSkillInstallLocations(agents, project, env) {
348
+ /**
349
+ * `--project` is a bare flag for the current directory, or names the project
350
+ * directory to install into. `--project .` used to fail with "too many
351
+ * arguments" (2026-09-16 blind baseline) because the flag took no value.
352
+ */
353
+ export function resolveSkillProjectDir(project) {
354
+ if (project === true)
355
+ return process.cwd();
356
+ if (typeof project === "string" && project.trim())
357
+ return resolve(project.trim());
358
+ return null;
359
+ }
360
+ function resolveSkillInstallLocations(agents, projectDir, env) {
361
+ const project = projectDir !== null;
362
+ const base = projectDir ?? process.cwd();
346
363
  const projectRoots = {
347
- codex: resolve(".agents", "skills"),
348
- "claude-code": resolve(".claude", "skills"),
349
- cursor: resolve(".agents", "skills"),
364
+ codex: resolve(base, ".agents", "skills"),
365
+ "claude-code": resolve(base, ".claude", "skills"),
366
+ cursor: resolve(base, ".agents", "skills"),
350
367
  };
351
368
  const globalRoots = {
352
369
  codex: join(env.CODEX_HOME?.trim() || join(homedir(), ".codex"), "skills"),
@@ -356,7 +373,7 @@ function resolveSkillInstallLocations(agents, project, env) {
356
373
  const roots = project ? projectRoots : globalRoots;
357
374
  return agents.map((agent) => ({
358
375
  agent,
359
- path: roots[agent] ?? (project ? resolve(".agents", "skills") : join(homedir(), ".agents", "skills")),
376
+ path: roots[agent] ?? (project ? resolve(base, ".agents", "skills") : join(homedir(), ".agents", "skills")),
360
377
  }));
361
378
  }
362
379
  /**
@@ -448,9 +465,6 @@ function stagingFailure(stage, details) {
448
465
  exitCode: 1,
449
466
  });
450
467
  }
451
- function errorMessage(error) {
452
- return error instanceof Error ? error.message : String(error);
453
- }
454
468
  // Best-effort resolution of a skill's declared prerequisite skills from the
455
469
  // index. Any failure (unreachable index, parse error, unknown skill) yields no
456
470
  // dependencies so a dependency lookup can never block or fail an install.
@@ -1,4 +1,4 @@
1
- export type TranscriptSource = "claude_code" | "codex" | "cursor" | "file";
1
+ type TranscriptSource = "claude_code" | "codex" | "cursor" | "file";
2
2
  export type CapturedTranscript = {
3
3
  source: TranscriptSource;
4
4
  session_id: string | null;
@@ -19,3 +19,4 @@ export declare class TranscriptCaptureError extends Error {
19
19
  }
20
20
  export declare function captureCurrentTranscript(options?: CaptureOptions): CapturedTranscript | null;
21
21
  export declare function collectFeedbackEnvironment(): Record<string, string>;
22
+ export {};
@@ -1,6 +1,3 @@
1
- import { Command } from "commander";
2
- type Handle = (command: string, options: {
3
- json?: boolean;
4
- }, action: () => Promise<unknown>) => Promise<void>;
5
- export declare function registerUgcCommands(program: Command, handle: Handle): void;
6
- export {};
1
+ import type { Command } from "commander";
2
+ import { type UgcCommandDependencies } from "@oxygen/cli-ugc";
3
+ export declare function registerUgcCommands(program: Command, handle: UgcCommandDependencies["handle"]): void;