deepline 0.1.22 → 0.1.24

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/cli/index.js CHANGED
@@ -266,7 +266,7 @@ function saveProjectDeeplineEnvValues(baseUrl, values, startDir = projectEnvStar
266
266
  }
267
267
 
268
268
  // src/version.ts
269
- var SDK_VERSION = "0.1.22";
269
+ var SDK_VERSION = "0.1.24";
270
270
  var SDK_API_CONTRACT = "2026-05-runs-v2";
271
271
 
272
272
  // ../shared_libs/play-runtime/coordinator-headers.ts
@@ -554,6 +554,19 @@ function sleep(ms) {
554
554
  // src/client.ts
555
555
  var TERMINAL_PLAY_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
556
556
  var INCLUDE_TOOL_METADATA_HEADER = "x-deepline-include-tool-metadata";
557
+ var COMPILE_MANIFEST_RETRY_DELAYS_MS = [250, 1e3];
558
+ function sleep2(ms) {
559
+ return new Promise((resolve8) => setTimeout(resolve8, ms));
560
+ }
561
+ function isTransientCompileManifestError(error) {
562
+ if (error instanceof DeeplineError && typeof error.statusCode === "number") {
563
+ return error.statusCode === 408 || error.statusCode === 425 || error.statusCode === 499 || error.statusCode >= 500 && error.statusCode < 600;
564
+ }
565
+ const message = error instanceof Error ? error.message : String(error);
566
+ return /fetch failed|connection (?:closed|reset|terminated)|socket hang up|econnreset|etimedout|eai_again|abort/i.test(
567
+ message
568
+ );
569
+ }
557
570
  function isRecord(value) {
558
571
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
559
572
  }
@@ -959,8 +972,22 @@ var DeeplineClient = class {
959
972
  });
960
973
  }
961
974
  async compilePlayManifest(input) {
962
- const response = await this.http.post("/api/v2/plays/compile-manifest", input);
963
- return response.compilerManifest;
975
+ const retryDelays = COMPILE_MANIFEST_RETRY_DELAYS_MS.slice(
976
+ 0,
977
+ Math.max(0, this.config.maxRetries)
978
+ );
979
+ for (let attempt = 0; ; attempt += 1) {
980
+ try {
981
+ const response = await this.http.post("/api/v2/plays/compile-manifest", input);
982
+ return response.compilerManifest;
983
+ } catch (error) {
984
+ const delayMs = retryDelays[attempt];
985
+ if (delayMs === void 0 || !isTransientCompileManifestError(error)) {
986
+ throw error;
987
+ }
988
+ await sleep2(delayMs);
989
+ }
990
+ }
964
991
  }
965
992
  /**
966
993
  * Check a bundled play artifact against the server's current play compiler.
@@ -2013,7 +2040,7 @@ function buildCandidateUrls2(url) {
2013
2040
  return [url];
2014
2041
  }
2015
2042
  }
2016
- function sleep2(ms) {
2043
+ function sleep3(ms) {
2017
2044
  return new Promise((resolve8) => setTimeout(resolve8, ms));
2018
2045
  }
2019
2046
  function printDeeplineLogo() {
@@ -2096,7 +2123,7 @@ async function handleRegister(args) {
2096
2123
  return EXIT_AUTH;
2097
2124
  }
2098
2125
  if (s >= 500 || s === 0 || s === 400) {
2099
- await sleep2(2e3);
2126
+ await sleep3(2e3);
2100
2127
  continue;
2101
2128
  }
2102
2129
  if (s >= 400) {
@@ -2120,7 +2147,7 @@ async function handleRegister(args) {
2120
2147
  console.log("That approval link expired. Please run: deepline auth register");
2121
2148
  return EXIT_AUTH;
2122
2149
  }
2123
- await sleep2(2e3);
2150
+ await sleep3(2e3);
2124
2151
  }
2125
2152
  }
2126
2153
  async function handleWait(args) {
@@ -2157,7 +2184,7 @@ async function handleWait(args) {
2157
2184
  return EXIT_AUTH;
2158
2185
  }
2159
2186
  if (status >= 500 || status === 0 || status === 400) {
2160
- await sleep2(2e3);
2187
+ await sleep3(2e3);
2161
2188
  continue;
2162
2189
  }
2163
2190
  if (status >= 400) {
@@ -2181,7 +2208,7 @@ async function handleWait(args) {
2181
2208
  console.error("That approval link expired. Run: deepline auth register");
2182
2209
  return EXIT_AUTH;
2183
2210
  }
2184
- await sleep2(2e3);
2211
+ await sleep3(2e3);
2185
2212
  }
2186
2213
  console.error("Still pending. Approve the browser link, then run: deepline auth wait");
2187
2214
  return EXIT_AUTH;
@@ -2321,18 +2348,48 @@ function registerAuthCommands(program) {
2321
2348
  `
2322
2349
  Common commands:
2323
2350
  deepline auth register
2351
+ deepline auth register --no-wait
2352
+ deepline auth wait --timeout 300
2324
2353
  deepline auth status
2325
2354
  deepline auth status --json
2355
+
2356
+ Notes:
2357
+ Registration opens a browser approval page by default. Use --no-wait in CI
2358
+ or agent runs, then finish with deepline auth wait.
2359
+ Auth status shows the target host and active workspace without printing secrets.
2326
2360
  `
2327
2361
  );
2328
- auth.command("register").description("Register this device and open the approval page in your browser.").option("--org-name <name>", "Workspace name to prefill").option("--agent-name <name>", "Agent name to register").option("--no-wait", "Return immediately after opening the approval page").action(async (options) => {
2362
+ auth.command("register").description("Register this device and open the approval page in your browser.").addHelpText(
2363
+ "after",
2364
+ `
2365
+ Notes:
2366
+ Opens a browser approval page and waits for approval unless --no-wait is set.
2367
+ The saved API key is scoped to the selected workspace and host.
2368
+
2369
+ Examples:
2370
+ deepline auth register
2371
+ deepline auth register --org-name Acme --agent-name local-cli
2372
+ deepline auth register --no-wait
2373
+ `
2374
+ ).option("--org-name <name>", "Workspace name to prefill").option("--agent-name <name>", "Agent name to register").option("--no-wait", "Return immediately after opening the approval page").action(async (options) => {
2329
2375
  process.exitCode = await handleRegister([
2330
2376
  ...options.orgName ? ["--org-name", options.orgName] : [],
2331
2377
  ...options.agentName ? ["--agent-name", options.agentName] : [],
2332
2378
  ...options.noWait || options.wait === false ? ["--no-wait"] : []
2333
2379
  ]);
2334
2380
  });
2335
- auth.command("wait").description("Wait for a pending browser approval and save the API key.").option("--timeout <seconds>", "Maximum seconds to wait", "300").action(async (options) => {
2381
+ auth.command("wait").description("Wait for a pending browser approval and save the API key.").addHelpText(
2382
+ "after",
2383
+ `
2384
+ Notes:
2385
+ Completes a previous deepline auth register --no-wait flow.
2386
+ Saves the approved API key into the host auth file.
2387
+
2388
+ Examples:
2389
+ deepline auth wait
2390
+ deepline auth wait --timeout 120
2391
+ `
2392
+ ).option("--timeout <seconds>", "Maximum seconds to wait", "300").action(async (options) => {
2336
2393
  process.exitCode = await handleWait([
2337
2394
  ...options.timeout ? ["--timeout", options.timeout] : []
2338
2395
  ]);
@@ -2486,15 +2543,116 @@ async function handleRedeemCode(code, options) {
2486
2543
  `);
2487
2544
  }
2488
2545
  function registerBillingCommands(program) {
2489
- const billing = program.command("billing").description("Inspect balance, usage, limits, and checkout flows.");
2490
- billing.command("balance").description("Show current billing balance.").option("--json", "Emit JSON output").action(handleBalance);
2491
- billing.command("usage").description("Show current usage plus recent calls.").option("--limit <n>", "Recent-call page size").option("--offset <n>", "Recent-call offset").option("--json", "Emit JSON output").action(handleUsage);
2492
- billing.command("limit").description("Show configured monthly limit state.").option("--json", "Emit JSON output").action(handleLimit);
2493
- billing.command("set-limit").description("Set monthly credit cap.").argument("<credits>", "Monthly credits limit").option("--json", "Emit JSON output").action(handleSetLimit);
2494
- billing.command("off").description("Disable monthly credit cap.").option("--json", "Emit JSON output").action(handleLimitOff);
2495
- billing.command("history").description("Export billing ledger history to CSV.").requiredOption("--time <window>", "Rolling time window: 1d, 1w, 1m, or 1y").option("--json", "Emit JSON output").action(handleHistory);
2496
- billing.command("checkout").description("Create a checkout session and optionally open it in your browser.").option("--tier <tierId>", "Named pricing tier").option("--credits <credits>", "Custom credit amount").option("--discount-code <code>", "Apply a discount code").option("--no-open", "Print the checkout URL without opening a browser").option("--json", "Emit JSON output").action(handleCheckout);
2497
- billing.command("redeem-code").description("Redeem a billing code.").requiredOption("--code <code>", "Code to redeem").option("--no-open", "Do not open a browser").option("--json", "Emit JSON output").action(({ code, ...options }) => handleRedeemCode(code, options));
2546
+ const billing = program.command("billing").description("Inspect balance, usage, limits, and checkout flows.").addHelpText(
2547
+ "after",
2548
+ `
2549
+ Concepts:
2550
+ Billing commands show Deepline credits, not raw provider spend.
2551
+ set-limit/off mutate the monthly workspace cap. checkout/redeem-code can open
2552
+ a browser unless --no-open is set.
2553
+
2554
+ Examples:
2555
+ deepline billing balance --json
2556
+ deepline billing usage --limit 20 --json
2557
+ deepline billing set-limit 500 --json
2558
+ deepline billing checkout --credits 1000 --no-open --json
2559
+ `
2560
+ );
2561
+ billing.command("balance").description("Show current billing balance.").addHelpText(
2562
+ "after",
2563
+ `
2564
+ Notes:
2565
+ Read-only. Shows the current Deepline credit balance for the active workspace.
2566
+
2567
+ Examples:
2568
+ deepline billing balance
2569
+ deepline billing balance --json
2570
+ `
2571
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleBalance);
2572
+ billing.command("usage").description("Show current usage plus recent calls.").addHelpText(
2573
+ "after",
2574
+ `
2575
+ Notes:
2576
+ Read-only. Shows last-30-day Deepline credit usage plus a bounded recent-call
2577
+ page. Use --limit/--offset to paginate the recent-call section.
2578
+
2579
+ Examples:
2580
+ deepline billing usage
2581
+ deepline billing usage --limit 50 --offset 50 --json
2582
+ `
2583
+ ).option("--limit <n>", "Recent-call page size").option("--offset <n>", "Recent-call offset").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleUsage);
2584
+ billing.command("limit").description("Show configured monthly limit state.").addHelpText(
2585
+ "after",
2586
+ `
2587
+ Notes:
2588
+ Read-only. Shows whether the monthly workspace cap is enabled and how many
2589
+ Deepline credits remain before the cap.
2590
+
2591
+ Examples:
2592
+ deepline billing limit
2593
+ deepline billing limit --json
2594
+ `
2595
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleLimit);
2596
+ billing.command("set-limit").description("Set monthly credit cap.").addHelpText(
2597
+ "after",
2598
+ `
2599
+ Notes:
2600
+ Mutates workspace billing settings. The argument is a Deepline credit amount,
2601
+ not dollars and not provider credits.
2602
+
2603
+ Examples:
2604
+ deepline billing set-limit 500
2605
+ deepline billing set-limit 500 --json
2606
+ `
2607
+ ).argument("<credits>", "Monthly credits limit").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleSetLimit);
2608
+ billing.command("off").description("Disable monthly credit cap.").addHelpText(
2609
+ "after",
2610
+ `
2611
+ Notes:
2612
+ Mutates workspace billing settings by removing the monthly Deepline credit cap.
2613
+
2614
+ Examples:
2615
+ deepline billing off
2616
+ deepline billing off --json
2617
+ `
2618
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleLimitOff);
2619
+ billing.command("history").description("Export billing ledger history to CSV.").addHelpText(
2620
+ "after",
2621
+ `
2622
+ Notes:
2623
+ Read-only server query that writes a local CSV file. With --json, stdout is a
2624
+ summary containing the output path and row count.
2625
+
2626
+ Examples:
2627
+ deepline billing history --time 1m
2628
+ deepline billing history --time 1y --json
2629
+ `
2630
+ ).requiredOption("--time <window>", "Rolling time window: 1d, 1w, 1m, or 1y").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleHistory);
2631
+ billing.command("checkout").description("Create a checkout session and optionally open it in your browser.").addHelpText(
2632
+ "after",
2633
+ `
2634
+ Notes:
2635
+ Creates a payment checkout session. Opens the checkout URL in a browser unless
2636
+ --no-open is set. Use --json for automation.
2637
+
2638
+ Examples:
2639
+ deepline billing checkout --tier pro
2640
+ deepline billing checkout --credits 1000 --no-open --json
2641
+ deepline billing checkout --credits 1000 --discount-code LAUNCH --no-open
2642
+ `
2643
+ ).option("--tier <tierId>", "Named pricing tier").option("--credits <credits>", "Custom credit amount").option("--discount-code <code>", "Apply a discount code").option("--no-open", "Print the checkout URL without opening a browser").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleCheckout);
2644
+ billing.command("redeem-code").description("Redeem a billing code.").addHelpText(
2645
+ "after",
2646
+ `
2647
+ Notes:
2648
+ Redeems a workspace billing code and may open a browser for completion unless
2649
+ --no-open is set.
2650
+
2651
+ Examples:
2652
+ deepline billing redeem-code --code ABC123
2653
+ deepline billing redeem-code --code ABC123 --no-open --json
2654
+ `
2655
+ ).requiredOption("--code <code>", "Code to redeem").option("--no-open", "Do not open a browser").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(({ code, ...options }) => handleRedeemCode(code, options));
2498
2656
  }
2499
2657
 
2500
2658
  // src/cli/dataset-stats.ts
@@ -2925,8 +3083,31 @@ async function handleCsvShow(options) {
2925
3083
  `);
2926
3084
  }
2927
3085
  function registerCsvCommands(program) {
2928
- const csv = program.command("csv").description("Inspect local CSV files.");
2929
- csv.command("show").description("Display rows from a CSV file in json, csv, or table form.").requiredOption("--csv <path>", "Input CSV path").option("--format <format>", "Output format: json, csv, or table", "json").option("--rows <range>", "Row range start:end", "0:19").option("--columns <names>", "Comma-separated column names to include").option("--summary", "Print a summary payload instead of row output").option("--verbose", "Do not truncate long values in table output").action(handleCsvShow);
3086
+ const csv = program.command("csv").description("Inspect local CSV files.").addHelpText(
3087
+ "after",
3088
+ `
3089
+ Notes:
3090
+ Local-only inspection helpers. These commands do not upload CSV files or call
3091
+ Deepline APIs.
3092
+
3093
+ Examples:
3094
+ deepline csv show --csv leads.csv --rows 0:10 --format table
3095
+ deepline csv show --csv leads.csv --summary
3096
+ `
3097
+ );
3098
+ csv.command("show").description("Display rows from a CSV file in json, csv, or table form.").addHelpText(
3099
+ "after",
3100
+ `
3101
+ Notes:
3102
+ Reads a local CSV path and prints a bounded row range. --rows uses inclusive
3103
+ start:end indexes, so 0:19 prints the first 20 rows. JSON is the default format.
3104
+
3105
+ Examples:
3106
+ deepline csv show --csv leads.csv
3107
+ deepline csv show --csv leads.csv --rows 20:39 --columns name,email --format table
3108
+ deepline csv show --csv leads.csv --summary
3109
+ `
3110
+ ).requiredOption("--csv <path>", "Input CSV path").option("--format <format>", "Output format: json, csv, or table", "json").option("--rows <range>", "Row range start:end", "0:19").option("--columns <names>", "Comma-separated column names to include").option("--summary", "Print a summary payload instead of row output").option("--verbose", "Do not truncate long values in table output").action(handleCsvShow);
2930
3111
  }
2931
3112
 
2932
3113
  // src/cli/commands/db.ts
@@ -3006,8 +3187,32 @@ async function handleDbQuery(args) {
3006
3187
  return 0;
3007
3188
  }
3008
3189
  function registerDbCommands(program) {
3009
- const db = program.command("db").alias("customer-db").description("Query the tenant customer database.");
3010
- db.command("query").alias("psql").description("Run SQL against the tenant customer database.").requiredOption("--sql <sql>", "SQL statement").option("--max-rows <n>", "Maximum returned rows").option("--json", "Emit raw JSON response").action(async (options) => {
3190
+ const db = program.command("db").alias("customer-db").description("Query the tenant customer database.").addHelpText(
3191
+ "after",
3192
+ `
3193
+ Notes:
3194
+ Runs SQL against the active workspace customer database through Deepline APIs.
3195
+ Results are bounded by the server and --max-rows. Use --json for stable output.
3196
+
3197
+ Examples:
3198
+ deepline db query --sql "select * from companies limit 20"
3199
+ deepline db query --sql "select domain, name from companies limit 20" --json
3200
+ deepline db query --sql "select * from contacts" --max-rows 100 --json
3201
+ `
3202
+ );
3203
+ db.command("query").alias("psql").description("Run SQL against the tenant customer database.").addHelpText(
3204
+ "after",
3205
+ `
3206
+ Notes:
3207
+ Requires --sql. Output is a compact table in a terminal and raw JSON with
3208
+ --json or when stdout is piped. The active auth workspace determines scope.
3209
+
3210
+ Examples:
3211
+ deepline db query --sql "select * from companies limit 20"
3212
+ deepline db query --sql "select domain, name from companies limit 20" --json
3213
+ deepline db psql --sql "select count(*) from contacts" --json
3214
+ `
3215
+ ).requiredOption("--sql <sql>", "SQL statement").option("--max-rows <n>", "Maximum returned rows").option("--json", "Emit raw JSON response. Also automatic when stdout is piped").action(async (options) => {
3011
3216
  process.exitCode = await handleDbQuery([
3012
3217
  "--sql",
3013
3218
  options.sql,
@@ -3033,9 +3238,29 @@ async function handleFeedback(text, options) {
3033
3238
  process.stdout.write("Feedback submitted. Thank you.\n");
3034
3239
  }
3035
3240
  function registerFeedbackCommands(program) {
3036
- const feedback = program.command("feedback").description("Submit CLI feedback to Deepline.");
3241
+ const feedback = program.command("feedback").description("Submit CLI feedback to Deepline.").addHelpText(
3242
+ "after",
3243
+ `
3244
+ Notes:
3245
+ Sends the feedback text plus local CLI environment info to Deepline support.
3246
+ Use --command and --payload to attach a reproducible command shape.
3247
+
3248
+ Examples:
3249
+ deepline feedback "plays run failed after upload" --command "deepline plays run my.play.ts --watch"
3250
+ deepline feedback "unexpected billing output" --payload '{"command":"billing usage"}' --json
3251
+ `
3252
+ );
3037
3253
  feedback.argument("<text>", "Feedback text").option("--command <command>", "Command that reproduced the issue").option("--payload <payload>", "JSON or plain-text payload for the repro").option("--json", "Emit JSON output").action(handleFeedback);
3038
- program.command("provide-feedback").description("Legacy alias for `deepline feedback`.").argument("<text>", "Feedback text").option("--command <command>", "Command that reproduced the issue").option("--payload <payload>", "JSON or plain-text payload for the repro").option("--json", "Emit JSON output").action(handleFeedback);
3254
+ program.command("provide-feedback").description("Legacy alias for `deepline feedback`.").addHelpText(
3255
+ "after",
3256
+ `
3257
+ Notes:
3258
+ Compatibility alias. Prefer deepline feedback in new scripts and docs.
3259
+
3260
+ Examples:
3261
+ deepline feedback "tools search returned stale results" --json
3262
+ `
3263
+ ).argument("<text>", "Feedback text").option("--command <command>", "Command that reproduced the issue").option("--payload <payload>", "JSON or plain-text payload for the repro").option("--json", "Emit JSON output").action(handleFeedback);
3039
3264
  }
3040
3265
 
3041
3266
  // src/cli/commands/org.ts
@@ -3115,9 +3340,43 @@ async function handleOrgSwitch(selection, options) {
3115
3340
  `);
3116
3341
  }
3117
3342
  function registerOrgCommands(program) {
3118
- const org = program.command("org").description("List and switch organizations.");
3119
- org.command("list").description("List your organizations.").option("--json", "Emit JSON output").action(handleOrgList);
3120
- org.command("switch [selection]").description("Switch to another organization and save the new API key in the host auth file.").option("--org-id <id>", "Switch using an explicit organization id").option("--json", "Emit JSON output").action(handleOrgSwitch);
3343
+ const org = program.command("org").description("List and switch organizations.").addHelpText(
3344
+ "after",
3345
+ `
3346
+ Notes:
3347
+ Organizations are workspaces. Switching organizations mutates the saved host
3348
+ auth file so later CLI commands target the selected workspace.
3349
+
3350
+ Examples:
3351
+ deepline org list --json
3352
+ deepline org switch 2
3353
+ deepline org switch --org-id org_123 --json
3354
+ `
3355
+ );
3356
+ org.command("list").description("List your organizations.").addHelpText(
3357
+ "after",
3358
+ `
3359
+ Notes:
3360
+ Read-only. Marks the active organization when the server returns that metadata.
3361
+
3362
+ Examples:
3363
+ deepline org list
3364
+ deepline org list --json
3365
+ `
3366
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleOrgList);
3367
+ org.command("switch [selection]").description("Switch to another organization and save the new API key in the host auth file.").addHelpText(
3368
+ "after",
3369
+ `
3370
+ Notes:
3371
+ Mutates the saved host auth file. Selection can be a list number, exact
3372
+ organization name, or organization id. Without a selection, prints choices.
3373
+
3374
+ Examples:
3375
+ deepline org switch
3376
+ deepline org switch 2
3377
+ deepline org switch --org-id org_123 --json
3378
+ `
3379
+ ).option("--org-id <id>", "Switch using an explicit organization id").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleOrgSwitch);
3121
3380
  }
3122
3381
 
3123
3382
  // src/cli/commands/play.ts
@@ -6059,7 +6318,7 @@ function parsePlayRunOptions(args) {
6059
6318
  let input = null;
6060
6319
  let revisionId = null;
6061
6320
  let revisionSelector = null;
6062
- const watch = args.includes("--watch");
6321
+ const watch = args.includes("--watch") || args.includes("--wait");
6063
6322
  let jsonOutput = watch ? args.includes("--json") : argsWantJson(args);
6064
6323
  const emitLogs = !jsonOutput || args.includes("--logs");
6065
6324
  const force = args.includes("--force");
@@ -6109,15 +6368,13 @@ function parsePlayRunOptions(args) {
6109
6368
  if (arg === "--watch") {
6110
6369
  continue;
6111
6370
  }
6371
+ if (arg === "--wait") {
6372
+ continue;
6373
+ }
6112
6374
  if (arg === "--json") {
6113
6375
  jsonOutput = true;
6114
6376
  continue;
6115
6377
  }
6116
- if (arg === "--wait") {
6117
- throw new Error(
6118
- "--wait is removed for `plays run`; use `--watch` to stream completion output."
6119
- );
6120
- }
6121
6378
  if (arg === "--tail") {
6122
6379
  throw new Error(
6123
6380
  "--tail is removed for `plays run`; use `--watch` to stream completion output."
@@ -7232,12 +7489,15 @@ Concepts:
7232
7489
  Plays are durable cloud workflows.
7233
7490
  Stable ctx.tools.execute({ id, tool, input }) calls are replay-safe.
7234
7491
  ctx.map adds row keys and row progress.
7492
+ Named play runs use the live revision unless --latest or --revision-id is set.
7493
+ Running a local file does not make it live; use set-live/publish explicitly.
7235
7494
 
7236
7495
  Common commands:
7237
7496
  deepline plays search email --json
7238
7497
  deepline plays describe person-linkedin-to-email --json
7239
7498
  deepline plays check my.play.ts
7240
7499
  deepline plays run my.play.ts --input '{"domain":"stripe.com"}' --watch
7500
+ deepline plays set-live my.play.ts --json
7241
7501
  deepline plays get person-linkedin-to-email --json
7242
7502
  `
7243
7503
  );
@@ -7267,9 +7527,11 @@ Notes:
7267
7527
  Unknown --foo and --foo.bar flags are treated as play input args.
7268
7528
  File args accept local paths; the CLI stages files before submit.
7269
7529
  --watch prints logs, previews, stats, and next commands.
7530
+ --wait is accepted as a compatibility alias for --watch.
7270
7531
  The play page opens in your browser as soon as the run starts; use --no-open
7271
7532
  to only print the URL.
7272
7533
  --force supersedes active runs; it does not bypass completed reuse.
7534
+ This command starts cloud work and may spend Deepline credits through tool calls.
7273
7535
 
7274
7536
  Idempotent execution:
7275
7537
  Stable tool call ids are the reuse key:
@@ -7294,6 +7556,7 @@ Idempotent execution:
7294
7556
 
7295
7557
  Examples:
7296
7558
  deepline plays run my.play.ts --input '{"domain":"stripe.com"}' --watch
7559
+ deepline plays run my.play.ts --input @input.json --wait --json
7297
7560
  deepline plays run person-linkedin-to-email --input '{"linkedin_url":"..."}' --watch
7298
7561
  deepline plays run enrich.play.ts --csv leads.csv --watch --out leads-enriched.csv
7299
7562
  deepline plays run cto-search.play.ts --limit 5 --watch
@@ -7305,7 +7568,7 @@ Examples:
7305
7568
  ).option(
7306
7569
  "--out <path>",
7307
7570
  "Write the completed row output to CSV; requires --watch"
7308
- ).option("--watch", "Stream logs until completion").option(
7571
+ ).option("--watch", "Stream logs until completion").option("--wait", "Alias for --watch; stream logs until completion").option(
7309
7572
  "--logs",
7310
7573
  "When output is non-interactive, stream play logs to stderr while waiting"
7311
7574
  ).option("--tail-timeout-ms <ms>", "Timeout while watching the run stream").option("--force", "Supersede any active runs for this play").option("--no-open", "Print the play page URL without opening a browser").option("--json", "Emit JSON output").action(async (target, options, command) => {
@@ -7328,7 +7591,7 @@ Examples:
7328
7591
  ...options.latest ? ["--latest"] : [],
7329
7592
  ...options.revisionId ? ["--revision-id", options.revisionId] : [],
7330
7593
  ...options.out ? ["--out", options.out] : [],
7331
- ...options.watch ? ["--watch"] : [],
7594
+ ...options.watch || options.wait ? ["--watch"] : [],
7332
7595
  ...options.logs ? ["--logs"] : [],
7333
7596
  ...options.tailTimeoutMs ? ["--tail-timeout-ms", options.tailTimeoutMs] : [],
7334
7597
  ...options.force ? ["--force"] : [],
@@ -7359,12 +7622,36 @@ Examples:
7359
7622
  ...options.out ? ["--out", options.out] : []
7360
7623
  ]);
7361
7624
  });
7362
- play.command("list").description("List saved and prebuilt plays.").option("--json", "Emit JSON output").action(async (options) => {
7625
+ play.command("list").description("List saved and prebuilt plays.").addHelpText(
7626
+ "after",
7627
+ `
7628
+ Notes:
7629
+ Inventory command for saved org plays and prebuilt plays. Use search for
7630
+ ranked discovery by task or schema.
7631
+
7632
+ Examples:
7633
+ deepline plays list
7634
+ deepline plays list --json
7635
+ deepline plays search email --origin prebuilt --json
7636
+ `
7637
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
7363
7638
  process.exitCode = await handlePlayList([
7364
7639
  ...options.json ? ["--json"] : []
7365
7640
  ]);
7366
7641
  });
7367
- play.command("search <query>").description("Search saved and prebuilt plays.").option("--origin <origin>", "Filter to prebuilt or owned plays").option("--compact", "Emit compact schemas").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (query, options) => {
7642
+ play.command("search <query>").description("Search saved and prebuilt plays.").addHelpText(
7643
+ "after",
7644
+ `
7645
+ Notes:
7646
+ Ranked discovery for workflows. Use --origin prebuilt or --origin owned when
7647
+ you need to narrow results. Use describe on a result before running it.
7648
+
7649
+ Examples:
7650
+ deepline plays search email
7651
+ deepline plays search "linkedin to email" --origin prebuilt --compact --json
7652
+ deepline plays describe person-linkedin-to-email --json
7653
+ `
7654
+ ).option("--origin <origin>", "Filter to prebuilt or owned plays").option("--compact", "Emit compact schemas").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (query, options) => {
7368
7655
  process.exitCode = await handlePlaySearch([
7369
7656
  query,
7370
7657
  ...options.origin ? ["--origin", options.origin] : [],
@@ -7390,13 +7677,53 @@ Examples:
7390
7677
  ...options.json ? ["--json"] : []
7391
7678
  ]);
7392
7679
  });
7393
- play.command("versions").description("List revisions for a named play.").option("--name <name>", "Saved play name").option("--json", "Emit JSON output").action(async (options) => {
7680
+ play.command("versions").description("List revisions for a named play.").addHelpText(
7681
+ "after",
7682
+ `
7683
+ Notes:
7684
+ Shows saved revisions for an org-owned play, including which revision is live
7685
+ when that metadata is available. Named runs use the live revision by default.
7686
+
7687
+ Examples:
7688
+ deepline plays versions --name my-play
7689
+ deepline plays versions --name my-play --json
7690
+ deepline plays run my-play --revision-id <revision-id> --watch
7691
+ `
7692
+ ).option("--name <name>", "Saved play name").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
7394
7693
  process.exitCode = await handlePlayVersions([
7395
7694
  ...options.name ? ["--name", options.name] : [],
7396
7695
  ...options.json ? ["--json"] : []
7397
7696
  ]);
7398
7697
  });
7399
- play.command("publish <target>").description("Bundle, validate, save, and publish a play.").option("--latest", "Promote the newest saved revision").option("--revision-id <id>", "Revision to promote").option("--json", "Emit JSON output").action(async (target, options) => {
7698
+ const addPublishHelp = (command) => command.addHelpText(
7699
+ "after",
7700
+ `
7701
+ Notes:
7702
+ Mutates cloud state. For a local file, this bundles, validates, saves a new
7703
+ revision, and promotes that revision live. For a saved play, --latest or
7704
+ --revision-id promotes an existing saved revision live.
7705
+ Running a local file with plays run does not publish it.
7706
+
7707
+ Examples:
7708
+ deepline plays set-live my.play.ts --json
7709
+ deepline plays set-live my-play --latest --json
7710
+ deepline plays set-live my-play --revision-id <revision-id> --json
7711
+ deepline plays publish my.play.ts --json
7712
+ `
7713
+ );
7714
+ addPublishHelp(
7715
+ play.command("publish <target>").description("Bundle, validate, save, and promote a play revision live.")
7716
+ ).option("--latest", "Promote the newest saved revision").option("--revision-id <id>", "Revision to promote").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (target, options) => {
7717
+ process.exitCode = await handlePlayPublish([
7718
+ target,
7719
+ ...options.latest ? ["--latest"] : [],
7720
+ ...options.revisionId ? ["--revision-id", options.revisionId] : [],
7721
+ ...options.json ? ["--json"] : []
7722
+ ]);
7723
+ });
7724
+ addPublishHelp(
7725
+ play.command("set-live <target>").description("Promote a local file or saved revision as the live play revision.")
7726
+ ).option("--latest", "Promote the newest saved revision").option("--revision-id <id>", "Revision to promote").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (target, options) => {
7400
7727
  process.exitCode = await handlePlayPublish([
7401
7728
  target,
7402
7729
  ...options.latest ? ["--latest"] : [],
@@ -7404,7 +7731,18 @@ Examples:
7404
7731
  ...options.json ? ["--json"] : []
7405
7732
  ]);
7406
7733
  });
7407
- play.command("delete <target>").description("Delete an org-owned play and its saved revisions/runs.").option("-y, --yes", "Confirm deletion").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (target, options) => {
7734
+ play.command("delete <target>").description("Delete an org-owned play and its saved revisions/runs.").addHelpText(
7735
+ "after",
7736
+ `
7737
+ Notes:
7738
+ Destructive mutation. Deletes an org-owned play plus saved revisions and run
7739
+ records. Prebuilt/read-only plays are refused. Use --yes for noninteractive runs.
7740
+
7741
+ Examples:
7742
+ deepline plays delete my-play
7743
+ deepline plays delete my-play --yes --json
7744
+ `
7745
+ ).option("-y, --yes", "Confirm deletion").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (target, options) => {
7408
7746
  process.exitCode = await handlePlayDelete([
7409
7747
  target,
7410
7748
  ...options.yes ? ["--yes"] : [],
@@ -7414,6 +7752,12 @@ Examples:
7414
7752
  const runs = program.command("runs").description("Inspect, tail, stop, and export play runs.").addHelpText(
7415
7753
  "after",
7416
7754
  `
7755
+ Concepts:
7756
+ A run is one execution instance of a play. It has status, progress, logs,
7757
+ preview output, recovery metadata, and optional full row export.
7758
+ tail reads the live stream. logs fetches persisted logs after the fact.
7759
+ stop mutates cloud state by requesting cancellation.
7760
+
7417
7761
  Examples:
7418
7762
  deepline runs get play/my-play/run/20260501t000000-000 --json
7419
7763
  deepline runs tail play/my-play/run/20260501t000000-000
@@ -7423,14 +7767,36 @@ Examples:
7423
7767
  deepline runs export play/my-play/run/20260501t000000-000 --out output.csv
7424
7768
  `
7425
7769
  );
7426
- runs.command("get <runId>").description("Get status, progress, outputs, errors, and recovery metadata for a play run.").option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--full", "Debug only: with --json, emit the raw status payload").action(async (runId, options) => {
7770
+ runs.command("get <runId>").description("Get status, progress, outputs, errors, and recovery metadata for a play run.").addHelpText(
7771
+ "after",
7772
+ `
7773
+ Notes:
7774
+ Full run status read. Use --full --json when debugging raw stream/status fields.
7775
+
7776
+ Examples:
7777
+ deepline runs get play/my-play/run/20260501t000000-000
7778
+ deepline runs get play/my-play/run/20260501t000000-000 --json
7779
+ deepline runs get play/my-play/run/20260501t000000-000 --full --json
7780
+ `
7781
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--full", "Debug only: with --json, emit the raw status payload").action(async (runId, options) => {
7427
7782
  process.exitCode = await handleRunGet([
7428
7783
  runId,
7429
7784
  ...options.json ? ["--json"] : [],
7430
7785
  ...options.full ? ["--full"] : []
7431
7786
  ]);
7432
7787
  });
7433
- runs.command("list").description("List play runs.").requiredOption("--play <name>", "Play name to filter runs").option("--status <status>", "Filter by run status").option("--compact", "Drop verbose fields from JSON output").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
7788
+ runs.command("list").description("List play runs.").addHelpText(
7789
+ "after",
7790
+ `
7791
+ Notes:
7792
+ Bounded inventory for a play's recent runs. Use --compact for agent loops.
7793
+ Common statuses include running, completed, failed, and stopped.
7794
+
7795
+ Examples:
7796
+ deepline runs list --play my-play
7797
+ deepline runs list --play my-play --status failed --compact --json
7798
+ `
7799
+ ).requiredOption("--play <name>", "Play name to filter runs").option("--status <status>", "Filter by run status").option("--compact", "Drop verbose fields from JSON output").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
7434
7800
  process.exitCode = await handleRunsList([
7435
7801
  "--play",
7436
7802
  options.play,
@@ -7439,14 +7805,37 @@ Examples:
7439
7805
  ...options.json ? ["--json"] : []
7440
7806
  ]);
7441
7807
  });
7442
- runs.command("tail <runId>").description("Read the canonical live stream for a play run.").option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--compact", "Drop verbose fields from JSON output").action(async (runId, options) => {
7808
+ runs.command("tail <runId>").description("Read the canonical live stream for a play run.").addHelpText(
7809
+ "after",
7810
+ `
7811
+ Notes:
7812
+ Streams live run events until the stream ends. Use get for current status and
7813
+ logs for persisted log history.
7814
+
7815
+ Examples:
7816
+ deepline runs tail play/my-play/run/20260501t000000-000
7817
+ deepline runs tail play/my-play/run/20260501t000000-000 --compact --json
7818
+ `
7819
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--compact", "Drop verbose fields from JSON output").action(async (runId, options) => {
7443
7820
  process.exitCode = await handleRunTail([
7444
7821
  runId,
7445
7822
  ...options.json ? ["--json"] : [],
7446
7823
  ...options.compact ? ["--compact"] : []
7447
7824
  ]);
7448
7825
  });
7449
- runs.command("logs <runId>").description("Fetch persisted logs for a play run.").option("--limit <count>", "Maximum recent log lines to print without --out", "200").option("--out <path>", "Write the full persisted log stream to a file").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (runId, options) => {
7826
+ runs.command("logs <runId>").description("Fetch persisted logs for a play run.").addHelpText(
7827
+ "after",
7828
+ `
7829
+ Notes:
7830
+ Prints a bounded recent log preview by default. Use --out to write the full
7831
+ persisted log stream to a local file.
7832
+
7833
+ Examples:
7834
+ deepline runs logs play/my-play/run/20260501t000000-000
7835
+ deepline runs logs play/my-play/run/20260501t000000-000 --limit 500
7836
+ deepline runs logs play/my-play/run/20260501t000000-000 --out run.log --json
7837
+ `
7838
+ ).option("--limit <count>", "Maximum recent log lines to print without --out", "200").option("--out <path>", "Write the full persisted log stream to a file").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (runId, options) => {
7450
7839
  process.exitCode = await handleRunLogs([
7451
7840
  runId,
7452
7841
  ...options.limit ? ["--limit", options.limit] : [],
@@ -7454,14 +7843,36 @@ Examples:
7454
7843
  ...options.json ? ["--json"] : []
7455
7844
  ]);
7456
7845
  });
7457
- runs.command("stop <runId>").description("Stop a play run.").option("--reason <text>", "Reason to include with the stop request").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (runId, options) => {
7846
+ runs.command("stop <runId>").description("Stop a play run.").addHelpText(
7847
+ "after",
7848
+ `
7849
+ Notes:
7850
+ Mutates cloud state by requesting cancellation for an active run. Already
7851
+ terminal runs are returned as no-ops by the server when applicable.
7852
+
7853
+ Examples:
7854
+ deepline runs stop play/my-play/run/20260501t000000-000 --reason "stale lock"
7855
+ deepline runs stop play/my-play/run/20260501t000000-000 --json
7856
+ `
7857
+ ).option("--reason <text>", "Reason to include with the stop request").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (runId, options) => {
7458
7858
  process.exitCode = await handleRunStop([
7459
7859
  runId,
7460
7860
  ...options.reason ? ["--reason", options.reason] : [],
7461
7861
  ...options.json ? ["--json"] : []
7462
7862
  ]);
7463
7863
  });
7464
- runs.command("export <runId>").description("Export the completed row output for a play run to CSV.").requiredOption("--out <path>", "Output CSV path").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (runId, options) => {
7864
+ runs.command("export <runId>").description("Export the completed row output for a play run to CSV.").addHelpText(
7865
+ "after",
7866
+ `
7867
+ Notes:
7868
+ Writes the completed row output to the requested local CSV path. Use runs get
7869
+ first when you need to confirm the run is complete or inspect preview output.
7870
+
7871
+ Examples:
7872
+ deepline runs export play/my-play/run/20260501t000000-000 --out output.csv
7873
+ deepline runs export play/my-play/run/20260501t000000-000 --out output.csv --json
7874
+ `
7875
+ ).requiredOption("--out <path>", "Output CSV path").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (runId, options) => {
7465
7876
  process.exitCode = await handleRunExport([
7466
7877
  runId,
7467
7878
  "--out",
@@ -7705,16 +8116,44 @@ Concepts:
7705
8116
 
7706
8117
  Common commands:
7707
8118
  deepline tools search email --json
7708
- deepline tools get hunter_email_verifier --json
8119
+ deepline tools describe hunter_email_verifier --json
7709
8120
  deepline tools call hunter_email_verifier --input '{"email":"a@b.com"}'
8121
+
8122
+ Output:
8123
+ Search/list output is bounded. Use describe for a compact contract and get for
8124
+ the full machine-readable metadata available for the tool.
7710
8125
  `
7711
8126
  );
7712
- tools.command("list").description("List available tools.").option("--json", "Emit JSON output").action(async (options) => {
8127
+ tools.command("list").description("List available tools.").addHelpText(
8128
+ "after",
8129
+ `
8130
+ Notes:
8131
+ Inventory command for known tool ids. Use search for ranked discovery by
8132
+ intent, aliases, descriptions, and schema fields.
8133
+
8134
+ Examples:
8135
+ deepline tools list
8136
+ deepline tools list --json
8137
+ deepline tools search email --json
8138
+ `
8139
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
7713
8140
  process.exitCode = await listTools([
7714
8141
  ...options.json ? ["--json"] : []
7715
8142
  ]);
7716
8143
  });
7717
- tools.command("search <query>").description("Search available tools.").option("--categories <categories>", "Comma-separated categories to filter ranked search").option("--search_terms <terms>", "Structured search terms for ranked search").option("--search-terms <terms>", "Structured search terms for ranked search").option("--search-mode <mode>", "Ranked search mode: v1 or v2").option("--include-search-debug", "Include ranked search debug metadata").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (query, options) => {
8144
+ tools.command("search <query>").description("Search available tools.").addHelpText(
8145
+ "after",
8146
+ `
8147
+ Notes:
8148
+ Ranked discovery for atomic provider/API operations. Results include tool ids
8149
+ that can be passed to deepline tools describe or deepline tools call.
8150
+
8151
+ Examples:
8152
+ deepline tools search email
8153
+ deepline tools search "company enrichment" --categories enrichment --json
8154
+ deepline tools search verifier --search-mode v2 --json
8155
+ `
8156
+ ).option("--categories <categories>", "Comma-separated categories to filter ranked search").option("--search_terms <terms>", "Structured search terms for ranked search").option("--search-terms <terms>", "Structured search terms for ranked search").option("--search-mode <mode>", "Ranked search mode: v1 or v2").option("--include-search-debug", "Include ranked search debug metadata").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (query, options) => {
7718
8157
  process.exitCode = await searchTools(query, {
7719
8158
  json: options.json,
7720
8159
  categories: options.categories,
@@ -7723,15 +8162,18 @@ Common commands:
7723
8162
  includeSearchDebug: Boolean(options.includeSearchDebug)
7724
8163
  });
7725
8164
  });
7726
- tools.command("get <toolId>").alias("describe").description("Show metadata for a tool.").addHelpText(
8165
+ const addToolMetadataCommand = (command, preferredExample) => command.description("Show metadata for a tool.").addHelpText(
7727
8166
  "after",
7728
8167
  `
7729
8168
  Notes:
7730
- Shows the tool contract, input schema, output schema, costs, aliases, and metadata.
8169
+ Shows the tool contract, input schema, output schema, Deepline cost, aliases,
8170
+ and metadata. describe is the preferred discovery verb; get is kept as a
8171
+ compatibility command for the same metadata surface.
7731
8172
 
7732
8173
  Examples:
7733
- deepline tools get hunter_email_verifier
7734
- deepline tools get hunter_email_verifier --json | jq '.inputSchema'
8174
+ deepline tools ${preferredExample} hunter_email_verifier
8175
+ deepline tools ${preferredExample} hunter_email_verifier --json | jq '.inputSchema'
8176
+ deepline tools call hunter_email_verifier --input '{"email":"a@b.com"}'
7735
8177
  `
7736
8178
  ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (toolId, options) => {
7737
8179
  process.exitCode = await getTool([
@@ -7739,12 +8181,16 @@ Examples:
7739
8181
  ...options.json ? ["--json"] : []
7740
8182
  ]);
7741
8183
  });
8184
+ addToolMetadataCommand(tools.command("describe <toolId>"), "describe");
8185
+ addToolMetadataCommand(tools.command("get <toolId>"), "get");
7742
8186
  tools.command("call <toolId>").alias("execute").alias("run").description("Execute a tool by id.").addHelpText(
7743
8187
  "after",
7744
8188
  `
7745
8189
  Notes:
7746
8190
  Use tools for one atomic provider/API operation. Use plays for composed workflows,
7747
8191
  waterfalls, row maps, checkpoints, and retries.
8192
+ Calling a provider-backed tool can spend Deepline credits. Use --json for the
8193
+ stable result payload and --full-output when debugging response metadata.
7748
8194
 
7749
8195
  Examples:
7750
8196
  deepline tools call hunter_email_verifier --input '{"email":"a@b.com"}'
@@ -8430,6 +8876,9 @@ function shouldPrintStartupPhase() {
8430
8876
  return false;
8431
8877
  }
8432
8878
  const args = process.argv.slice(2);
8879
+ if (args.includes("-h") || args.includes("--help")) {
8880
+ return false;
8881
+ }
8433
8882
  const command = args[0];
8434
8883
  const subcommand = args[1];
8435
8884
  return (command === "play" || command === "plays") && subcommand === "run";
@@ -8463,9 +8912,23 @@ Common commands:
8463
8912
  deepline plays run my.play.ts --input '{"domain":"stripe.com"}' --watch
8464
8913
  deepline tools call hunter_email_verifier --input '{"email":"a@b.com"}'
8465
8914
 
8915
+ Product model:
8916
+ Tools are atomic provider/API operations that may spend credits.
8917
+ Plays are durable workflows backed by source code or saved cloud revisions.
8918
+ Runs are execution instances with logs, status, outputs, and cancellation.
8919
+ Live plays are promoted revisions used by named play runs.
8920
+
8466
8921
  Output:
8467
8922
  Structured commands print human-readable output in a terminal and JSON when stdout is piped.
8468
8923
  Use --json to force JSON in an interactive terminal.
8924
+
8925
+ Safety:
8926
+ Commands that mutate state, open a browser, write files, stop work, or spend credits say so in their help.
8927
+ Use --no-open where available for CI and agent runs.
8928
+
8929
+ Exit codes:
8930
+ 0 success; 2 usage/local input error; 3 auth/permission error; 4 not found;
8931
+ 5 server/runtime/provider failure; 7 validation/check failed.
8469
8932
  `
8470
8933
  );
8471
8934
  program.hook("preAction", async (_thisCommand, actionCommand) => {
@@ -8500,7 +8963,17 @@ Output:
8500
8963
  registerCsvCommands(program);
8501
8964
  registerDbCommands(program);
8502
8965
  registerFeedbackCommands(program);
8503
- program.command("health").description("Check server health.").action(async () => {
8966
+ program.command("health").description("Check server health.").addHelpText(
8967
+ "after",
8968
+ `
8969
+ Notes:
8970
+ Read-only connectivity check for the configured Deepline host. Prints the raw
8971
+ server health payload as JSON.
8972
+
8973
+ Examples:
8974
+ deepline health
8975
+ `
8976
+ ).action(async () => {
8504
8977
  try {
8505
8978
  const client = new DeeplineClient();
8506
8979
  const data = await client.health();
@@ -8512,7 +8985,18 @@ Output:
8512
8985
  );
8513
8986
  }
8514
8987
  });
8515
- program.command("version").description("Show version.").action(() => {
8988
+ program.command("version").description("Show version.").addHelpText(
8989
+ "after",
8990
+ `
8991
+ Notes:
8992
+ Prints the SDK CLI package version. The top-level -v/--version flag returns
8993
+ the same version.
8994
+
8995
+ Examples:
8996
+ deepline version
8997
+ deepline --version
8998
+ `
8999
+ ).action(() => {
8516
9000
  process.stdout.write(`deepline ${SDK_VERSION}
8517
9001
  `);
8518
9002
  });