@oxygen-agent/cli 1.987.20 → 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.
- package/README.md +1 -1
- package/dist/admin-primary-providers-render.d.ts +0 -2
- package/dist/admin-primary-providers-render.js +1 -1
- package/dist/browser-login.js +1 -4
- package/dist/command-manifest.d.ts +3 -2
- package/dist/command-manifest.js +10 -0
- package/dist/credentials.d.ts +1 -1
- package/dist/functions-commands.js +6 -2
- package/dist/help.d.ts +8 -0
- package/dist/help.js +46 -0
- package/dist/index.js +1569 -123
- package/dist/knowledge-mirror.d.ts +2 -2
- package/dist/runtime.d.ts +0 -15
- package/dist/runtime.js +1 -1
- package/dist/session.d.ts +4 -3
- package/dist/skills.d.ts +8 -7
- package/dist/skills.js +24 -10
- package/dist/transcript.d.ts +2 -1
- package/dist/util.d.ts +1 -1
- package/dist/util.js +1 -3
- package/node_modules/@oxygen/formula/dist/coerce.d.ts +10 -0
- package/node_modules/@oxygen/formula/dist/coerce.js +10 -0
- package/node_modules/@oxygen/formula/dist/formula-functions.js +65 -0
- package/node_modules/@oxygen/formula/dist/hash.d.ts +19 -0
- package/node_modules/@oxygen/formula/dist/hash.js +199 -0
- package/node_modules/@oxygen/formula/dist/value-cleaners.d.ts +6 -1
- package/node_modules/@oxygen/formula/dist/value-cleaners.js +10 -26
- package/node_modules/@oxygen/shared/dist/array-utils.d.ts +5 -0
- package/node_modules/@oxygen/shared/dist/array-utils.js +11 -0
- package/node_modules/@oxygen/shared/dist/billing.d.ts +78 -22
- package/node_modules/@oxygen/shared/dist/billing.js +150 -40
- package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +17 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +89 -16
- package/node_modules/@oxygen/shared/dist/column-autofill.d.ts +52 -0
- package/node_modules/@oxygen/shared/dist/column-autofill.js +80 -0
- package/node_modules/@oxygen/shared/dist/column-output-fields.js +2 -6
- package/node_modules/@oxygen/shared/dist/company-enrichment-fields.d.ts +108 -0
- package/node_modules/@oxygen/shared/dist/company-enrichment-fields.js +545 -0
- package/node_modules/@oxygen/shared/dist/copilot-skills.generated.d.ts +2 -2
- package/node_modules/@oxygen/shared/dist/copilot-skills.generated.js +2 -2
- package/node_modules/@oxygen/shared/dist/deploy-env.d.ts +74 -0
- package/node_modules/@oxygen/shared/dist/deploy-env.js +82 -0
- package/node_modules/@oxygen/shared/dist/dnc-rules.d.ts +130 -0
- package/node_modules/@oxygen/shared/dist/dnc-rules.js +221 -0
- package/node_modules/@oxygen/shared/dist/enrichment-intents.d.ts +103 -0
- package/node_modules/@oxygen/shared/dist/enrichment-intents.js +819 -0
- package/node_modules/@oxygen/shared/dist/error-message.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/error-message.js +3 -0
- package/node_modules/@oxygen/shared/dist/error-redaction.js +1 -3
- package/node_modules/@oxygen/shared/dist/external-write-policy.d.ts +33 -0
- package/node_modules/@oxygen/shared/dist/external-write-policy.js +68 -0
- package/node_modules/@oxygen/shared/dist/format-percent.d.ts +8 -0
- package/node_modules/@oxygen/shared/dist/format-percent.js +13 -0
- package/node_modules/@oxygen/shared/dist/freemail-domains.d.ts +81 -0
- package/node_modules/@oxygen/shared/dist/freemail-domains.js +157 -0
- package/node_modules/@oxygen/shared/dist/future-signup-lifecycle-projection.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/future-signup-lifecycle-projection.js +1 -1
- package/node_modules/@oxygen/shared/dist/index.d.ts +13 -0
- package/node_modules/@oxygen/shared/dist/index.js +13 -0
- package/node_modules/@oxygen/shared/dist/json-path.js +1 -3
- package/node_modules/@oxygen/shared/dist/knowledge-bases.js +1 -3
- package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.d.ts +2 -2
- package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.js +2 -2
- package/node_modules/@oxygen/shared/dist/langfuse.js +9 -0
- package/node_modules/@oxygen/shared/dist/linkedin-countries.d.ts +32 -0
- package/node_modules/@oxygen/shared/dist/linkedin-countries.js +359 -0
- package/node_modules/@oxygen/shared/dist/log-sink-selector.d.ts +39 -0
- package/node_modules/@oxygen/shared/dist/log-sink-selector.js +56 -0
- package/node_modules/@oxygen/shared/dist/log.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/log.js +6 -1
- package/node_modules/@oxygen/shared/dist/object-storage.d.ts +17 -0
- package/node_modules/@oxygen/shared/dist/object-storage.js +21 -0
- package/node_modules/@oxygen/shared/dist/otlp-log-sink.d.ts +54 -0
- package/node_modules/@oxygen/shared/dist/otlp-log-sink.js +213 -0
- package/node_modules/@oxygen/shared/dist/plan-capabilities.js +1 -0
- package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +23 -22
- package/node_modules/@oxygen/shared/dist/plan-limits.js +45 -18
- package/node_modules/@oxygen/shared/dist/pricing-sheet.d.ts +48 -41
- package/node_modules/@oxygen/shared/dist/pricing-sheet.js +36 -25
- package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.d.ts +22 -22
- package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.js +40 -34
- package/node_modules/@oxygen/shared/dist/product-analytics-environment.js +9 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-events.d.ts +15 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-events.js +15 -0
- package/node_modules/@oxygen/shared/dist/rate-window.d.ts +5 -0
- package/node_modules/@oxygen/shared/dist/rate-window.js +8 -0
- package/node_modules/@oxygen/shared/dist/research-output-contract.js +1 -3
- package/node_modules/@oxygen/shared/dist/search-vocab.js +4 -5
- package/node_modules/@oxygen/shared/dist/select-options.js +6 -1
- package/node_modules/@oxygen/shared/dist/sequence-failures.js +1 -5
- package/node_modules/@oxygen/shared/dist/sequences.d.ts +23 -0
- package/node_modules/@oxygen/shared/dist/sequences.js +110 -4
- package/node_modules/@oxygen/shared/dist/spend-safety.d.ts +22 -10
- package/node_modules/@oxygen/shared/dist/spend-safety.js +15 -21
- package/node_modules/@oxygen/shared/dist/sql-rows.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/sql-rows.js +3 -0
- package/node_modules/@oxygen/shared/dist/telemetry.js +9 -1
- package/node_modules/@oxygen/shared/dist/type-guards.d.ts +22 -0
- package/node_modules/@oxygen/shared/dist/type-guards.js +35 -0
- package/node_modules/@oxygen/shared/dist/value-readers.d.ts +21 -0
- package/node_modules/@oxygen/shared/dist/value-readers.js +59 -0
- package/node_modules/@oxygen/shared/dist/version.js +1 -1
- package/node_modules/@oxygen/shared/package.json +50 -0
- package/node_modules/@oxygen/workflows/dist/graph/expression.js +2 -5
- package/node_modules/@oxygen/workflows/dist/graph/params.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ function pct(value) {
|
|
|
47
47
|
return `${Math.round(parsed * 100)}%`;
|
|
48
48
|
}
|
|
49
49
|
/** Age of an ISO stamp as a short human span, measured against `now`. */
|
|
50
|
-
|
|
50
|
+
function ago(iso, now = new Date()) {
|
|
51
51
|
const raw = str(iso);
|
|
52
52
|
if (!raw)
|
|
53
53
|
return "never";
|
package/dist/browser-login.js
CHANGED
|
@@ -2,7 +2,7 @@ import { execFileSync } from "node:child_process";
|
|
|
2
2
|
import { randomBytes, timingSafeEqual } from "node:crypto";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
import { hostname } from "node:os";
|
|
5
|
-
import { OXYGEN_VERSION, OxygenError, deriveCliLoginConfirmationCode } from "@oxygen/shared";
|
|
5
|
+
import { OXYGEN_VERSION, OxygenError, deriveCliLoginConfirmationCode, sleep } from "@oxygen/shared";
|
|
6
6
|
import { requestOxygen } from "./http-client.js";
|
|
7
7
|
import { readErrorMessage } from "./util.js";
|
|
8
8
|
const CALLBACK_HOST = "127.0.0.1";
|
|
@@ -133,9 +133,6 @@ function safeHostname() {
|
|
|
133
133
|
return undefined;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
function sleep(ms) {
|
|
137
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
138
|
-
}
|
|
139
136
|
export async function createBrowserLoginSession(apiUrl) {
|
|
140
137
|
const state = randomBytes(32).toString("base64url");
|
|
141
138
|
let settled = false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Command } from "commander";
|
|
2
|
-
|
|
2
|
+
type CommandManifestFlag = {
|
|
3
3
|
flags: string;
|
|
4
4
|
description: string;
|
|
5
5
|
required: boolean;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type CommandManifestArgument = {
|
|
8
8
|
name: string;
|
|
9
9
|
required: boolean;
|
|
10
10
|
description: string;
|
|
@@ -46,3 +46,4 @@ export declare function getCommandManifestEntry(manifest: CommandManifest, exact
|
|
|
46
46
|
invoke: string;
|
|
47
47
|
}) | null;
|
|
48
48
|
export declare function suggestCommandNames(manifest: CommandManifest, query: string, limit?: number): string[];
|
|
49
|
+
export {};
|
package/dist/command-manifest.js
CHANGED
|
@@ -37,6 +37,16 @@ const MUTATING_VERBS = new Set([
|
|
|
37
37
|
// recurring write, and --run can connect newly eligible mailboxes immediately.
|
|
38
38
|
"auto-enroll",
|
|
39
39
|
"backfill",
|
|
40
|
+
// `dashboards widgets refresh` calls a provider and bills the workspace. It is
|
|
41
|
+
// currently the only `refresh` leaf; the default (mutates:false) would
|
|
42
|
+
// advertise the one dashboard command that spends money as a read, to every
|
|
43
|
+
// agent and in the public CLI reference.
|
|
44
|
+
"refresh",
|
|
45
|
+
// Exact hyphenated leaf, because the `backfill` entry above matches the whole
|
|
46
|
+
// leaf token and never `crm-backfill`. `suppressions crm-backfill --live`
|
|
47
|
+
// creates CRM person records for everyone on the do-not-contact list, so the
|
|
48
|
+
// default (mutates:false) would advertise a bulk workspace write as a read.
|
|
49
|
+
"crm-backfill",
|
|
40
50
|
// A noun leaf, so the default would advertise `projects color` — a tenant
|
|
41
51
|
// write — to every agent as a read. `decide` is the same case.
|
|
42
52
|
"color",
|
package/dist/credentials.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare function defaultApiUrl(env?: NodeJS.ProcessEnv): string;
|
|
|
34
34
|
* look identical, and a drifted profile turns a prod-labelled binary into a report
|
|
35
35
|
* about dev that reads as a production outage (OXY-4091).
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
type CliEndpointContext = {
|
|
38
38
|
apiUrl: string;
|
|
39
39
|
/** Active profile name, or null when no named profile supplied the credentials. */
|
|
40
40
|
profile: string | null;
|
|
@@ -47,11 +47,15 @@ export function registerFunctionsCommands(program, handle) {
|
|
|
47
47
|
functions.command("rename <function> <name>").description("Rename a Function while preserving its identity, callers and published execution.")
|
|
48
48
|
.option("--json", "Print a JSON envelope.")
|
|
49
49
|
.action((ref, name, options) => handle("functions rename", options, () => requestOxygen("/api/cli/functions", { method: "POST", body: { operation: "rename", function: ref, display_name: name } })));
|
|
50
|
-
functions.command("delete <function>").description("Preview removal from the Function library; preserves backing tables, rows and run history. Connected callers or active runs block deletion.")
|
|
51
|
-
.addHelpText("after", "\
|
|
50
|
+
functions.command("delete <function>").description("Preview removal from the Function library, then remove it with --yes; preserves backing tables, rows and run history. Connected callers or active runs block deletion. Works on an OXYGEN-managed Function too: it leaves this workspace's library and is not seeded back.")
|
|
51
|
+
.addHelpText("after", "\nDeleting your own Function is final: there is no restore, unlike `tables delete`. To reuse the logic, `tables duplicate` the backing Table and draft a new Function from the copy.\nDeleting an OXYGEN-managed Function only removes it from THIS workspace; `functions restore` brings OXYGEN's ready-made Functions back.\n")
|
|
52
52
|
.option("--yes", "Confirm removal of this Function after reviewing its callers.")
|
|
53
53
|
.option("--json", "Print a JSON envelope.")
|
|
54
54
|
.action((ref, options) => handle("functions delete", options, () => requestOxygen("/api/cli/functions", { method: "POST", body: { operation: "delete", function: ref, approved: options.yes === true } })));
|
|
55
|
+
functions.command("restore").description("Put back the OXYGEN-managed Functions this workspace deleted. They are rebuilt at the current catalog version in the background; `functions list --managed` shows them as they land.")
|
|
56
|
+
.option("--catalog-id <id...>", "Restore only these catalog entries (the managed.catalogId from `functions describe`). Defaults to every removed one.")
|
|
57
|
+
.option("--json", "Print a JSON envelope.")
|
|
58
|
+
.action((options) => handle("functions restore", options, () => requestOxygen("/api/cli/functions", { method: "POST", body: { operation: "restore_managed", ...(options.catalogId?.length ? { catalog_ids: options.catalogId } : {}) } })));
|
|
55
59
|
functions.command("bind <table> <function>").description("Add a Function column with explicit input/output mappings and a caller credit cap. Create each mapped output column on the caller table first with `columns add`; bind rejects an output mapped to a column the caller table does not have.")
|
|
56
60
|
.requiredOption("--inputs-json <json>", "Object mapping Function input keys to caller column keys.")
|
|
57
61
|
.requiredOption("--outputs-json <json>", "Object mapping Function output keys to existing caller column keys.")
|
package/dist/help.d.ts
CHANGED
|
@@ -20,4 +20,12 @@ export declare function enableCommandSuggestions(command: Command): void;
|
|
|
20
20
|
* lists the real subcommands. Returns null when argv does not describe an
|
|
21
21
|
* unknown subcommand (an unknown OPTION has its own handling).
|
|
22
22
|
*/
|
|
23
|
+
/**
|
|
24
|
+
* Hint for `error: unknown option '--filter'`. Commander's own suggester stops
|
|
25
|
+
* at three edits, so `--filter` never reaches `--filter-json`; a flag that is a
|
|
26
|
+
* prefix of exactly one option on that command (or of which exactly one option
|
|
27
|
+
* is a prefix) names it. Returns null when commander's output already says it
|
|
28
|
+
* all, or when the flag is not a long option.
|
|
29
|
+
*/
|
|
30
|
+
export declare function unknownOptionHint(program: Command, argv: readonly string[], message: string): string | null;
|
|
23
31
|
export declare function unknownCommandHint(program: Command, argv: readonly string[]): string | null;
|
package/dist/help.js
CHANGED
|
@@ -214,6 +214,52 @@ const COMMAND_SYNONYMS = {
|
|
|
214
214
|
* lists the real subcommands. Returns null when argv does not describe an
|
|
215
215
|
* unknown subcommand (an unknown OPTION has its own handling).
|
|
216
216
|
*/
|
|
217
|
+
/**
|
|
218
|
+
* Hint for `error: unknown option '--filter'`. Commander's own suggester stops
|
|
219
|
+
* at three edits, so `--filter` never reaches `--filter-json`; a flag that is a
|
|
220
|
+
* prefix of exactly one option on that command (or of which exactly one option
|
|
221
|
+
* is a prefix) names it. Returns null when commander's output already says it
|
|
222
|
+
* all, or when the flag is not a long option.
|
|
223
|
+
*/
|
|
224
|
+
export function unknownOptionHint(program, argv, message) {
|
|
225
|
+
const flag = /unknown option '(--[^']+)'/.exec(message)?.[1];
|
|
226
|
+
if (!flag)
|
|
227
|
+
return null;
|
|
228
|
+
const [command, path] = resolveCommandPath(program, argv);
|
|
229
|
+
const longs = new Set();
|
|
230
|
+
for (let current = command; current; current = current.parent) {
|
|
231
|
+
for (const option of current.options)
|
|
232
|
+
if (option.long)
|
|
233
|
+
longs.add(option.long);
|
|
234
|
+
}
|
|
235
|
+
const bare = flag.split("=")[0].toLowerCase();
|
|
236
|
+
if (longs.has(bare))
|
|
237
|
+
return null;
|
|
238
|
+
const candidates = [...longs].filter((long) => long.startsWith(bare) || bare.startsWith(long));
|
|
239
|
+
const helpLine = `Run \`${path} --help\` for its options.`;
|
|
240
|
+
if (candidates.length === 1) {
|
|
241
|
+
return `Hint: \`${path}\` has no \`${bare}\`. Did you mean \`${candidates[0]}\`? ${helpLine}`;
|
|
242
|
+
}
|
|
243
|
+
if (candidates.length > 1 && candidates.length <= 4) {
|
|
244
|
+
return `Hint: \`${path}\` has no \`${bare}\`. Did you mean one of ${candidates.map((c) => `\`${c}\``).join(", ")}? ${helpLine}`;
|
|
245
|
+
}
|
|
246
|
+
return `Hint: \`${path}\` has no \`${bare}\`. ${helpLine}`;
|
|
247
|
+
}
|
|
248
|
+
/** Walk the command path in argv (stopping at the first option) and return the deepest command with its printable path. */
|
|
249
|
+
function resolveCommandPath(program, argv) {
|
|
250
|
+
let current = program;
|
|
251
|
+
let path = program.name();
|
|
252
|
+
for (const token of argv) {
|
|
253
|
+
if (token.startsWith("-"))
|
|
254
|
+
break;
|
|
255
|
+
const child = current.commands.find((candidate) => candidate.name() === token || candidate.aliases().includes(token));
|
|
256
|
+
if (!child)
|
|
257
|
+
break;
|
|
258
|
+
current = child;
|
|
259
|
+
path = `${path} ${token}`;
|
|
260
|
+
}
|
|
261
|
+
return [current, path];
|
|
262
|
+
}
|
|
217
263
|
export function unknownCommandHint(program, argv) {
|
|
218
264
|
let current = program;
|
|
219
265
|
let path = program.name();
|