@withone/cli 2.7.1 → 2.8.0
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 -0
- package/dist/index.js +13 -1
- package/package.json +1 -1
- package/skills/one/SKILL.md +1 -0
package/README.md
CHANGED
|
@@ -269,6 +269,7 @@ one actions find shopify "list products" -t knowledge
|
|
|
269
269
|
- **`--task`** describes the whole job in one line, in general terms. Agents are asked to send it with every find, since it helps tell similar actions apart.
|
|
270
270
|
- **`-t knowledge`** searches the catalog for writing code and building flows and relays, which includes the platform's own (passthrough) endpoints; the default is the catalog for running actions now.
|
|
271
271
|
- **`--ai-model`** names the model running the CLI (e.g. `claude-sonnet-5`), recorded with the find beside the CLI and the harness that launched it, so the account's usage can report which model asked. Agents are asked to send it with every find.
|
|
272
|
+
- An answer to a find without `--task` or `--ai-model` carries a `hint` field (a dim line for humans) asking for them on the next find. Both stay optional.
|
|
272
273
|
- **`--no-knowledge`** lists the chosen actions (actionId, title, method, path) without fetching their documentation; load it later with `one actions load <actionId>`.
|
|
273
274
|
|
|
274
275
|
Each intent's answer gives the action(s) to use with their docs, any actions also needed beside them, a **substitute** when the model was unsure (use one or the other, never both), and a few alternatives, then says once how to execute. Always read the docs before executing. The access settings from `one config` apply: an action they refuse is never offered.
|
package/dist/index.js
CHANGED
|
@@ -3005,6 +3005,14 @@ var EXECUTE_GUIDE = `Run an action with:
|
|
|
3005
3005
|
Connection keys come from \`one --agent list\`. Put each value where the action's documentation says it goes: path variables (placeholders like {userId}) in --path-vars, query parameters in --query-params, the request body in -d. Never put path variables or query parameters in -d.`;
|
|
3006
3006
|
var FindArgsError = class extends Error {
|
|
3007
3007
|
};
|
|
3008
|
+
function findHint(task, aiModel) {
|
|
3009
|
+
const missing = [
|
|
3010
|
+
task?.trim() ? null : '--task "<the whole job in one line, in general terms, without names, addresses, IDs or message text>"',
|
|
3011
|
+
aiModel?.trim() ? null : '--ai-model "<your model name>"'
|
|
3012
|
+
].filter((m) => m !== null);
|
|
3013
|
+
if (missing.length === 0) return void 0;
|
|
3014
|
+
return `Send ${missing.join(" and ")} with every find: the task helps tell similar actions apart, and both are recorded with the find.`;
|
|
3015
|
+
}
|
|
3008
3016
|
function actionHeading(action) {
|
|
3009
3017
|
return `${action.title} \xB7 \`${action.method.toUpperCase()} ${action.path}\` \xB7 actionId: \`${action.actionId}\``;
|
|
3010
3018
|
}
|
|
@@ -3444,13 +3452,16 @@ async function actionsFindCommand(pairs, options) {
|
|
|
3444
3452
|
settings,
|
|
3445
3453
|
{ knowledgeCatalog: options.type === "knowledge", knowledge: options.knowledge !== false }
|
|
3446
3454
|
);
|
|
3455
|
+
const hint = findHint(options.task, options.aiModel);
|
|
3447
3456
|
if (isAgentMode()) {
|
|
3448
|
-
json(result);
|
|
3457
|
+
json(hint ? { ...result, hint } : result);
|
|
3449
3458
|
return;
|
|
3450
3459
|
}
|
|
3451
3460
|
spinner.stop("Found");
|
|
3452
3461
|
console.log();
|
|
3453
3462
|
console.log(renderFind(result));
|
|
3463
|
+
if (hint) console.log(`
|
|
3464
|
+
${pc7.dim(hint)}`);
|
|
3454
3465
|
console.log();
|
|
3455
3466
|
} catch (error2) {
|
|
3456
3467
|
spinner.stop("Find failed");
|
|
@@ -10939,6 +10950,7 @@ One call for the whole task: one platform and intent pair per operation, on any
|
|
|
10939
10950
|
- **\`--task\`**: send it with every find. It is the whole job in one line, **in general terms**: what it does, without names, addresses, IDs, or message text. It helps tell similar actions apart.
|
|
10940
10951
|
- **\`-t knowledge\`** searches the catalog for writing code and building flows and relays, which includes the platform's own (passthrough) endpoints; the default, \`-t execute\`, is the catalog for running actions now. Knowledge-only mode always uses \`knowledge\`.
|
|
10941
10952
|
- **\`--ai-model\`**: send it with every find. Your model name as you know it (e.g. \`claude-sonnet-5\`), recorded with the find; leave it out only if you do not know which model you are.
|
|
10953
|
+
- A find answer sent without either carries a **\`hint\`** naming what was missing: add it on your next find.
|
|
10942
10954
|
- **\`--no-knowledge\`** (optional) lists the chosen actions without their documentation, when only the actionIds are needed. Load the documentation with \`actions load\` before executing.
|
|
10943
10955
|
|
|
10944
10956
|
In \`--agent\` mode:
|
package/package.json
CHANGED
package/skills/one/SKILL.md
CHANGED
|
@@ -85,6 +85,7 @@ one --agent actions find <platform> "<intent>" [<platform> "<intent>" ...] --tas
|
|
|
85
85
|
- **`--task`**: send it with every find. It is the whole job in one line, **in general terms**: `"email a weather report to a contact"`, without names, addresses, IDs, or message text. It helps tell similar actions apart.
|
|
86
86
|
- **`-t knowledge`** searches the catalog for writing code and building flows and relays (it includes the platform's own passthrough endpoints); the default, `-t execute`, is the catalog for running actions now.
|
|
87
87
|
- **`--ai-model`**: send it with every find. Your model name as you know it (e.g. `claude-sonnet-5`), recorded with the find; leave it out only if you do not know which model you are.
|
|
88
|
+
- A find answer sent without either carries a **`hint`** naming what was missing: add it on your next find.
|
|
88
89
|
- **`--no-knowledge`** (optional): list the chosen actions without their documentation, when you only need the actionIds. Load the documentation with `actions load` before executing.
|
|
89
90
|
- Platform names are lowercase; multi-word names use dashes: `gmail`, `hubspot`, `ship-station`, `google-calendar`.
|
|
90
91
|
|