@oxygen-agent/cli 1.982.3 → 1.987.20
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/functions-commands.js +21 -5
- package/dist/help.d.ts +21 -0
- package/dist/help.js +93 -0
- package/dist/index.js +322 -57
- package/dist/ugc-commands.d.ts +3 -6
- package/dist/ugc-commands.js +2 -1200
- package/node_modules/@oxygen/cli-ugc/dist/commands.d.ts +3 -0
- package/node_modules/@oxygen/cli-ugc/dist/commands.js +1178 -0
- package/node_modules/@oxygen/cli-ugc/dist/field-parser.d.ts +7 -0
- package/node_modules/@oxygen/cli-ugc/dist/field-parser.js +25 -0
- package/node_modules/@oxygen/cli-ugc/dist/index.d.ts +14 -0
- package/node_modules/@oxygen/cli-ugc/dist/index.js +5 -0
- package/node_modules/@oxygen/cli-ugc/package.json +15 -0
- package/node_modules/@oxygen/formula/dist/expression.js +14 -1
- package/node_modules/@oxygen/formula/dist/formula-functions.js +71 -1
- package/node_modules/@oxygen/formula/dist/index.d.ts +1 -0
- package/node_modules/@oxygen/formula/dist/index.js +1 -0
- package/node_modules/@oxygen/formula/dist/value-cleaners.d.ts +69 -0
- package/node_modules/@oxygen/formula/dist/value-cleaners.js +374 -0
- package/node_modules/@oxygen/shared/dist/billing.d.ts +27 -27
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +29 -4
- package/node_modules/@oxygen/shared/dist/column-output-fields.js +12 -4
- package/node_modules/@oxygen/shared/dist/copilot-playbooks.d.ts +18 -0
- package/node_modules/@oxygen/shared/dist/copilot-playbooks.js +43 -0
- package/node_modules/@oxygen/shared/dist/copilot-skills.d.ts +15 -0
- package/node_modules/@oxygen/shared/dist/copilot-skills.generated.d.ts +31 -0
- package/node_modules/@oxygen/shared/dist/copilot-skills.generated.js +41 -0
- package/node_modules/@oxygen/shared/dist/copilot-skills.js +6 -0
- package/node_modules/@oxygen/shared/dist/index.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/index.js +1 -0
- package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.d.ts +15 -0
- package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.js +26 -4
- package/node_modules/@oxygen/shared/dist/langfuse.d.ts +12 -1
- package/node_modules/@oxygen/shared/dist/langfuse.js +48 -8
- package/node_modules/@oxygen/shared/dist/research-output-contract.d.ts +33 -1
- package/node_modules/@oxygen/shared/dist/research-output-contract.js +64 -2
- package/node_modules/@oxygen/shared/dist/sequence-crm-events.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/sequence-hubspot-sync.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/sequences.d.ts +26 -0
- package/node_modules/@oxygen/shared/dist/sequences.js +24 -0
- package/node_modules/@oxygen/shared/dist/version.js +1 -1
- package/node_modules/@oxygen/shared/package.json +10 -0
- package/node_modules/@oxygen/workflows/dist/graph/manifest-schema.d.ts +15 -15
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -3,12 +3,28 @@ import { parseJsonObject } from "./cli-values.js";
|
|
|
3
3
|
import { requestOxygen } from "./http-client.js";
|
|
4
4
|
export function registerFunctionsCommands(program, handle) {
|
|
5
5
|
const functions = program.command("functions")
|
|
6
|
-
.description("
|
|
7
|
-
.addHelpText("after", "\nDraft edits are isolated. Publishing updates future invocations of every caller; queued, in-flight and past runs retain their captured version. Existing caller caps never increase automatically.\nFlow: draft → describe → publish → bind → columns run --dry-run → approved run → runs.\nA bound Function executes on its own published execution table and writes named outputs back to the calling table. The call stays visible from the caller: `table-runs list --table <caller> --status all` lists the run, and the binding column's cell holds the outcome (status, outputs, credits, invocation and run ids). Address a Function by id, slug, or the display name shown by `functions list`.\nWorked example with commands: `oxygen skills install --skill oxygen-gtm --project`, then read its recipes/callable-tables.md.\n");
|
|
8
|
-
functions.command("list").description("List the Function library,
|
|
6
|
+
.description("Browse OXYGEN's ready-made Functions (work email, mobile phone, company funding stage, ...), favourite them, bind them to a table, or create, edit and publish your own Functions backed by ordinary Tables.")
|
|
7
|
+
.addHelpText("after", "\nOXYGEN-managed Functions are pre-built and priced: `functions list --managed` shows each one with its per-row credit estimate before you attach it. Attaching (`functions bind`) is free; only `columns run` spends, after a dry run. A managed Function is read-only; `functions duplicate <function>` gives you an editable copy.\nDraft edits are isolated. Publishing updates future invocations of every caller; queued, in-flight and past runs retain their captured version. Existing caller caps never increase automatically.\nFlow: draft → describe → publish → bind → columns run --dry-run → approved run → runs.\nA bound Function executes on its own published execution table and writes named outputs back to the calling table. The call stays visible from the caller: `table-runs list --table <caller> --status all` lists the run, and the binding column's cell holds the outcome (status, outputs, credits, invocation and run ids). Address a Function by id, slug, or the display name shown by `functions list`.\nWorked example with commands: `oxygen skills install --skill oxygen-gtm --project`, then read its recipes/callable-tables.md.\n");
|
|
8
|
+
functions.command("list").description("List the Function library: OXYGEN-managed Functions with their per-row credit estimate, plus your workspace's own drafts and published Functions (up to 500).")
|
|
9
|
+
.option("--managed", "Only OXYGEN-managed Functions (pre-built, priced, read-only; duplicate to customize).")
|
|
10
|
+
.option("--favorites", "Only the Functions you favourited (`functions favorite <function>`).")
|
|
9
11
|
.option("--json", "Print a JSON envelope.")
|
|
10
|
-
.action((options) => handle("functions list", options, () =>
|
|
11
|
-
|
|
12
|
+
.action((options) => handle("functions list", options, () => {
|
|
13
|
+
if (options.managed && options.favorites)
|
|
14
|
+
throw new OxygenError("invalid_request", "Pass --managed or --favorites, not both.", { exitCode: 1 });
|
|
15
|
+
const filter = options.managed ? "managed" : options.favorites ? "favorites" : null;
|
|
16
|
+
return requestOxygen(filter ? `/api/cli/functions?${new URLSearchParams({ filter })}` : "/api/cli/functions");
|
|
17
|
+
}));
|
|
18
|
+
for (const [command, label] of [["favorite", "Favourite a Function so it appears under `functions list --favorites` and the Favorites tab; per user, per workspace."], ["unfavorite", "Remove a Function from your favourites."]]) {
|
|
19
|
+
functions.command(`${command} <function>`).description(label)
|
|
20
|
+
.option("--json", "Print a JSON envelope.")
|
|
21
|
+
.action((ref, options) => handle(`functions ${command}`, options, () => requestOxygen("/api/cli/functions", { method: "POST", body: { operation: command, function: ref } })));
|
|
22
|
+
}
|
|
23
|
+
functions.command("duplicate <function>").description("Copy a Function's steps into a new editable draft of your own (same inputs and outputs, no rows). The way to customize an OXYGEN-managed Function.")
|
|
24
|
+
.option("--name <name>", "Display name for the copy. Defaults to '<source> (copy)'.")
|
|
25
|
+
.option("--json", "Print a JSON envelope.")
|
|
26
|
+
.action((ref, options) => handle("functions duplicate", options, () => requestOxygen("/api/cli/functions", { method: "POST", body: { operation: "duplicate", function: ref, ...(options.name ? { display_name: options.name } : {}) } })));
|
|
27
|
+
functions.command("describe <function>").description("Inspect a Function's inputs, outputs, steps, per-row credit estimate, caps, and whether it is OXYGEN-managed or your own draft/published version.")
|
|
12
28
|
.option("--json", "Print a JSON envelope.")
|
|
13
29
|
.action((ref, options) => handle("functions describe", options, () => requestOxygen(`/api/cli/functions?${new URLSearchParams({ function: ref })}`)));
|
|
14
30
|
functions.command("draft [function]").description("Create a Function draft, or save an existing Function's draft; executes nothing.")
|
package/dist/help.d.ts
CHANGED
|
@@ -1,2 +1,23 @@
|
|
|
1
1
|
import type { Command } from "commander";
|
|
2
2
|
export declare function applyOxygenHelp(program: Command, binaryName: string): void;
|
|
3
|
+
/**
|
|
4
|
+
* Turn commander's own edit-distance suggester on for EVERY command.
|
|
5
|
+
*
|
|
6
|
+
* It defaults to on, but `copyInheritedSettings` only runs for children created
|
|
7
|
+
* through `.command()`; the hundreds of subcommands this CLI registers with
|
|
8
|
+
* `.addCommand(new Command(...))` carry whatever their own constructor set.
|
|
9
|
+
* Walking the tree makes the setting a property of the whole surface rather
|
|
10
|
+
* than of how each command happened to be built, the same reason
|
|
11
|
+
* `installCommanderExitOverride` recurses.
|
|
12
|
+
*/
|
|
13
|
+
export declare function enableCommandSuggestions(command: Command): void;
|
|
14
|
+
/**
|
|
15
|
+
* The extra line printed after `error: unknown command '<x>'`.
|
|
16
|
+
*
|
|
17
|
+
* Commander's message names what is wrong and nothing a user can do next. This
|
|
18
|
+
* resolves the command they were actually inside, offers the synonym or unique
|
|
19
|
+
* prefix match commander cannot reach, and always names the exact `--help` that
|
|
20
|
+
* lists the real subcommands. Returns null when argv does not describe an
|
|
21
|
+
* unknown subcommand (an unknown OPTION has its own handling).
|
|
22
|
+
*/
|
|
23
|
+
export declare function unknownCommandHint(program: Command, argv: readonly string[]): string | null;
|
package/dist/help.js
CHANGED
|
@@ -139,6 +139,10 @@ export function applyOxygenHelp(program, binaryName) {
|
|
|
139
139
|
` 2. ${binaryName} skills install --json load the skills that teach the GTM loops (automatic after login)`,
|
|
140
140
|
" Add --project to keep the skills inside the current project, including confined agent sessions.",
|
|
141
141
|
` 3. ${binaryName} context resolve --json load workspace context before operating primitives`,
|
|
142
|
+
// A new workspace's first sessions are onboarding, and the consultant guide is
|
|
143
|
+
// a served skill an agent has to be TOLD about: nothing else on a first-touch
|
|
144
|
+
// surface named it (blind eval, 2026-09-16).
|
|
145
|
+
` New or thin workspace? load the onboarding consultant first: ${binaryName} skills get oxygen-onboarding --json`,
|
|
142
146
|
` 4. ${binaryName} capabilities search "<goal>" --json route the goal, then hydrate one exact command`,
|
|
143
147
|
` ${binaryName} commands search "<term>" --json find a command by name or purpose instead of dumping the manifest`,
|
|
144
148
|
` 5. ${binaryName} recipes list --json choose a play from the Recipe catalog for your goal`,
|
|
@@ -155,3 +159,92 @@ export function applyOxygenHelp(program, binaryName) {
|
|
|
155
159
|
`Exit codes: ${exitCodeLine}`,
|
|
156
160
|
].join("\n"));
|
|
157
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Turn commander's own edit-distance suggester on for EVERY command.
|
|
164
|
+
*
|
|
165
|
+
* It defaults to on, but `copyInheritedSettings` only runs for children created
|
|
166
|
+
* through `.command()`; the hundreds of subcommands this CLI registers with
|
|
167
|
+
* `.addCommand(new Command(...))` carry whatever their own constructor set.
|
|
168
|
+
* Walking the tree makes the setting a property of the whole surface rather
|
|
169
|
+
* than of how each command happened to be built, the same reason
|
|
170
|
+
* `installCommanderExitOverride` recurses.
|
|
171
|
+
*/
|
|
172
|
+
export function enableCommandSuggestions(command) {
|
|
173
|
+
command.showSuggestionAfterError(true);
|
|
174
|
+
for (const child of command.commands)
|
|
175
|
+
enableCommandSuggestions(child);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Verbs a user reaches for that this CLI spells differently.
|
|
179
|
+
*
|
|
180
|
+
* Commander's suggester is edit distance only, so it fires for a typo
|
|
181
|
+
* (`describ` → `describe`) and never for a synonym: `get` is seven edits from
|
|
182
|
+
* `describe`, so `oxygen tables get` answered `error: unknown command 'get'`
|
|
183
|
+
* and stopped there with nothing to try next (blind user eval, 2026-09-17).
|
|
184
|
+
* Values are candidate real subcommand names, best first; only names the
|
|
185
|
+
* command actually has are ever offered.
|
|
186
|
+
*/
|
|
187
|
+
const COMMAND_SYNONYMS = {
|
|
188
|
+
get: ["describe", "show", "view", "status", "preview"],
|
|
189
|
+
show: ["describe", "get", "list", "preview"],
|
|
190
|
+
view: ["describe", "preview", "show", "get"],
|
|
191
|
+
info: ["describe", "status", "show"],
|
|
192
|
+
inspect: ["describe", "preview", "show"],
|
|
193
|
+
read: ["describe", "query", "export", "get"],
|
|
194
|
+
ls: ["list"],
|
|
195
|
+
all: ["list"],
|
|
196
|
+
new: ["create", "add"],
|
|
197
|
+
make: ["create", "add"],
|
|
198
|
+
rm: ["delete", "remove", "archive"],
|
|
199
|
+
del: ["delete", "remove", "archive"],
|
|
200
|
+
remove: ["delete", "archive"],
|
|
201
|
+
destroy: ["delete", "archive"],
|
|
202
|
+
edit: ["update", "set", "rename"],
|
|
203
|
+
modify: ["update", "set"],
|
|
204
|
+
exec: ["run", "start", "call"],
|
|
205
|
+
execute: ["run", "start", "call"],
|
|
206
|
+
find: ["search", "query", "list"],
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* The extra line printed after `error: unknown command '<x>'`.
|
|
210
|
+
*
|
|
211
|
+
* Commander's message names what is wrong and nothing a user can do next. This
|
|
212
|
+
* resolves the command they were actually inside, offers the synonym or unique
|
|
213
|
+
* prefix match commander cannot reach, and always names the exact `--help` that
|
|
214
|
+
* lists the real subcommands. Returns null when argv does not describe an
|
|
215
|
+
* unknown subcommand (an unknown OPTION has its own handling).
|
|
216
|
+
*/
|
|
217
|
+
export function unknownCommandHint(program, argv) {
|
|
218
|
+
let current = program;
|
|
219
|
+
let path = program.name();
|
|
220
|
+
for (const token of argv) {
|
|
221
|
+
// Options and their values are commander's business; only the command path
|
|
222
|
+
// is walked here.
|
|
223
|
+
if (token.startsWith("-"))
|
|
224
|
+
break;
|
|
225
|
+
const child = current.commands.find((candidate) => candidate.name() === token || candidate.aliases().includes(token));
|
|
226
|
+
if (child) {
|
|
227
|
+
current = child;
|
|
228
|
+
path = `${path} ${token}`;
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
if (current.commands.length === 0)
|
|
232
|
+
return null;
|
|
233
|
+
return buildUnknownCommandHint(current, path, token);
|
|
234
|
+
}
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
function buildUnknownCommandHint(parent, path, token) {
|
|
238
|
+
const names = parent.commands.map((command) => command.name()).filter((name) => name !== "help");
|
|
239
|
+
const lower = token.toLowerCase();
|
|
240
|
+
const synonym = (COMMAND_SYNONYMS[lower] ?? []).find((candidate) => names.includes(candidate));
|
|
241
|
+
// A unique prefix is the other guess commander cannot make: `tables desc`
|
|
242
|
+
// scores too far from `describe` on edit distance, but it names exactly one
|
|
243
|
+
// command.
|
|
244
|
+
const prefixMatches = names.filter((name) => name.startsWith(lower));
|
|
245
|
+
const suggestion = synonym ?? (prefixMatches.length === 1 ? prefixMatches[0] : null);
|
|
246
|
+
const helpLine = `Run \`${path} --help\` for the ${names.length} subcommands of \`${path}\`.`;
|
|
247
|
+
return suggestion
|
|
248
|
+
? `Hint: \`${path}\` has no \`${token}\`. Did you mean \`${path} ${suggestion}\`? ${helpLine}`
|
|
249
|
+
: `Hint: \`${path}\` has no \`${token}\`. ${helpLine}`;
|
|
250
|
+
}
|