@nodaro/cli 1.6.0 → 1.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/dist/index.js +17 -9
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var require_package = __commonJS({
|
|
|
29
29
|
"package.json"(exports$1, module) {
|
|
30
30
|
module.exports = {
|
|
31
31
|
name: "@nodaro/cli",
|
|
32
|
-
version: "1.
|
|
32
|
+
version: "1.8.0",
|
|
33
33
|
description: "Command-line interface for Nodaro \u2014 list and run workflows, inspect jobs and executions, manage projects from the terminal.",
|
|
34
34
|
type: "module",
|
|
35
35
|
license: "Apache-2.0",
|
|
@@ -70,8 +70,8 @@ var require_package = __commonJS({
|
|
|
70
70
|
"@inquirer/confirm": "^6.0.12",
|
|
71
71
|
"@inquirer/input": "^5.0.12",
|
|
72
72
|
"@inquirer/select": "^5.1.4",
|
|
73
|
-
"@nodaro/sdk": "^1.
|
|
74
|
-
"@nodaro/shared": "^1.
|
|
73
|
+
"@nodaro/sdk": "^1.12.0",
|
|
74
|
+
"@nodaro/shared": "^1.24.0",
|
|
75
75
|
commander: "^12.1.0",
|
|
76
76
|
picocolors: "^1.1.1",
|
|
77
77
|
"@nodaro/prompts": "^1.5.0"
|
|
@@ -373,6 +373,7 @@ function maskToken(token) {
|
|
|
373
373
|
if (token.length <= 12) return "****";
|
|
374
374
|
return token.slice(0, 8) + "\u2026" + token.slice(-4);
|
|
375
375
|
}
|
|
376
|
+
var CLI_VERSION = "1.8.0" ;
|
|
376
377
|
function buildClient(profileName) {
|
|
377
378
|
const { name, profile } = getProfile(profileName);
|
|
378
379
|
if (!profile) {
|
|
@@ -382,7 +383,11 @@ function buildClient(profileName) {
|
|
|
382
383
|
}
|
|
383
384
|
return createClient({
|
|
384
385
|
baseUrl: profile.baseUrl,
|
|
385
|
-
auth: new StaticTokenAuth(profile.token)
|
|
386
|
+
auth: new StaticTokenAuth(profile.token),
|
|
387
|
+
// Without this the CLI is indistinguishable from any other SDK consumer:
|
|
388
|
+
// it IS an SDK consumer, so it would otherwise report `sdk/<sdk version>`
|
|
389
|
+
// and every CLI-created job would be filed under the wrong surface.
|
|
390
|
+
clientLabel: `cli/${CLI_VERSION}`
|
|
386
391
|
});
|
|
387
392
|
}
|
|
388
393
|
function handleError(err) {
|
|
@@ -1509,14 +1514,17 @@ function commonWizardFields(opts) {
|
|
|
1509
1514
|
aspectRatio: opts.aspectRatio,
|
|
1510
1515
|
duration: opts.duration,
|
|
1511
1516
|
llmModel: opts.llmModel,
|
|
1512
|
-
reasoningEffort: opts.reasoningEffort
|
|
1517
|
+
reasoningEffort: opts.reasoningEffort,
|
|
1518
|
+
advancedMode: opts.advanced,
|
|
1519
|
+
temperature: opts.temperature,
|
|
1520
|
+
maxTokens: opts.maxTokens
|
|
1513
1521
|
};
|
|
1514
1522
|
}
|
|
1515
1523
|
function promptCommand() {
|
|
1516
1524
|
const cmd = new Command("prompt").description(
|
|
1517
1525
|
"AI prompt wizard \u2014 analyze, generate, and enhance prompts for generation nodes"
|
|
1518
1526
|
);
|
|
1519
|
-
cmd.command("wizard").description("interactive: answer guided questions and get an optimized prompt").option("--node-type <type>", "target node type (omit for an interactive picker)").option("--prompt <text>", "your rough idea (optional)").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--profile <name>").action(async (opts) => {
|
|
1527
|
+
cmd.command("wizard").description("interactive: answer guided questions and get an optimized prompt").option("--node-type <type>", "target node type (omit for an interactive picker)").option("--prompt <text>", "your rough idea (optional)").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--advanced", "Gemini models only: run on the provider's own API so --temperature/--max-tokens/the full reasoning range apply. Bills one credit tier up.").option("--temperature <n>", "Sampling temperature (only with --advanced)", parseFloat).option("--max-tokens <n>", "Output token cap (only with --advanced)", (v) => parseInt(v, 10)).option("--profile <name>").action(async (opts) => {
|
|
1520
1528
|
try {
|
|
1521
1529
|
if (!isInteractive()) {
|
|
1522
1530
|
warn("`prompt wizard` needs an interactive terminal \u2014 use `prompt analyze` + `prompt generate`, or `prompt enhance`, in scripts.");
|
|
@@ -1566,7 +1574,7 @@ function promptCommand() {
|
|
|
1566
1574
|
handleError(err);
|
|
1567
1575
|
}
|
|
1568
1576
|
});
|
|
1569
|
-
cmd.command("analyze").description("return guided questions for a rough prompt idea").requiredOption("--node-type <type>").option("--prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--profile <name>").option("--json").action(async (opts) => {
|
|
1577
|
+
cmd.command("analyze").description("return guided questions for a rough prompt idea").requiredOption("--node-type <type>").option("--prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--advanced", "Gemini models only: run on the provider's own API so --temperature/--max-tokens/the full reasoning range apply. Bills one credit tier up.").option("--temperature <n>", "Sampling temperature (only with --advanced)", parseFloat).option("--max-tokens <n>", "Output token cap (only with --advanced)", (v) => parseInt(v, 10)).option("--profile <name>").option("--json").action(async (opts) => {
|
|
1570
1578
|
try {
|
|
1571
1579
|
const client = buildClient(opts.profile);
|
|
1572
1580
|
const { jobId, questions } = await client.promptHelper.analyze({
|
|
@@ -1591,7 +1599,7 @@ function promptCommand() {
|
|
|
1591
1599
|
handleError(err);
|
|
1592
1600
|
}
|
|
1593
1601
|
});
|
|
1594
|
-
cmd.command("generate").description("build an optimized prompt from --selection category=value flags").requiredOption("--node-type <type>").option("--selection <pairs...>", "category=value (repeat); custom answers are wizard-only", collectVariadic).option("--original-prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--profile <name>").option("--json").action(async (opts) => {
|
|
1602
|
+
cmd.command("generate").description("build an optimized prompt from --selection category=value flags").requiredOption("--node-type <type>").option("--selection <pairs...>", "category=value (repeat); custom answers are wizard-only", collectVariadic).option("--original-prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--advanced", "Gemini models only: run on the provider's own API so --temperature/--max-tokens/the full reasoning range apply. Bills one credit tier up.").option("--temperature <n>", "Sampling temperature (only with --advanced)", parseFloat).option("--max-tokens <n>", "Output token cap (only with --advanced)", (v) => parseInt(v, 10)).option("--profile <name>").option("--json").action(async (opts) => {
|
|
1595
1603
|
try {
|
|
1596
1604
|
const client = buildClient(opts.profile);
|
|
1597
1605
|
const selections = parseSelectionPairs(opts.selection);
|
|
@@ -1611,7 +1619,7 @@ function promptCommand() {
|
|
|
1611
1619
|
handleError(err);
|
|
1612
1620
|
}
|
|
1613
1621
|
});
|
|
1614
|
-
cmd.command("enhance").description("rewrite a rough idea into one optimized prompt (no questions)").requiredOption("--node-type <type>").option("--prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--profile <name>").option("--json").action(async (opts) => {
|
|
1622
|
+
cmd.command("enhance").description("rewrite a rough idea into one optimized prompt (no questions)").requiredOption("--node-type <type>").option("--prompt <text>").option("--provider <name>").option("--style <name>").option("--aspect-ratio <ratio>").option("--duration <seconds>", "clip duration in seconds", (v) => parseInt(v, 10)).option("--llm-model <id>").option("--reasoning-effort <level>", "reasoning effort: none|low|medium|high|xhigh|max (model-dependent)").option("--advanced", "Gemini models only: run on the provider's own API so --temperature/--max-tokens/the full reasoning range apply. Bills one credit tier up.").option("--temperature <n>", "Sampling temperature (only with --advanced)", parseFloat).option("--max-tokens <n>", "Output token cap (only with --advanced)", (v) => parseInt(v, 10)).option("--profile <name>").option("--json").action(async (opts) => {
|
|
1615
1623
|
try {
|
|
1616
1624
|
const client = buildClient(opts.profile);
|
|
1617
1625
|
const result = await client.promptHelper.enhance({
|