deepline 0.3.272 → 0.3.274

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
@@ -1966,7 +1966,7 @@ configureProxyFromEnv();
1966
1966
  var import_promises16 = require("fs/promises");
1967
1967
  var import_node_path35 = require("path");
1968
1968
  var import_node_os20 = require("os");
1969
- var import_commander6 = require("commander");
1969
+ var import_commander7 = require("commander");
1970
1970
 
1971
1971
  // ../plays/trigger-config-route.ts
1972
1972
  function playTriggerConfigPath(playName) {
@@ -3512,7 +3512,7 @@ var SDK_RELEASE = {
3512
3512
  // getters keep their established compatibility behavior.
3513
3513
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3514
3514
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3515
- version: "0.3.272",
3515
+ version: "0.3.274",
3516
3516
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
3517
3517
  packageCapabilities: {
3518
3518
  updatePreferences: 1
@@ -7295,7 +7295,7 @@ var DeeplineClient = class _DeeplineClient {
7295
7295
  }
7296
7296
  playRunCommand(play) {
7297
7297
  const target = play.reference || play.name;
7298
- return `deepline plays run ${target}${playInputExampleArgs(play.inputSchema)} --watch`;
7298
+ return `deepline plays run ${target}${playInputExampleArgs(play.inputSchema)}`;
7299
7299
  }
7300
7300
  starterPlayPath(play) {
7301
7301
  const target = play.reference || play.name;
@@ -7856,7 +7856,7 @@ var DeeplineClient = class _DeeplineClient {
7856
7856
  * Convenience wrapper around {@link registerPlayArtifact} plus
7857
7857
  * {@link startPlayRun}. This is the canonical file-backed path used by wrappers.
7858
7858
  * The returned id can be passed to {@link getPlayStatus} to retrieve the same
7859
- * durable `{ result }` object that the CLI prints after `--watch` completes.
7859
+ * durable `{ result }` object that the CLI prints after `plays run` completes.
7860
7860
  *
7861
7861
  * @param code - Source string fallback; the bundled artifact should be passed in `options.artifact`
7862
7862
  * @param csvPath - Path to input CSV file, or `null`
@@ -7977,7 +7977,7 @@ var DeeplineClient = class _DeeplineClient {
7977
7977
  * Get the current status of a play execution.
7978
7978
  *
7979
7979
  * Internal/advanced primitive. Public callers should usually prefer
7980
- * {@link runPlay}, {@link PlayJob.get}, or `deepline plays run --watch`.
7980
+ * {@link runPlay}, {@link PlayJob.get}, or `deepline plays run`.
7981
7981
  *
7982
7982
  * @param workflowId - Play-run id from {@link startPlayRun}
7983
7983
  * @returns Current status with progress logs and partial results
@@ -8368,7 +8368,7 @@ var DeeplineClient = class _DeeplineClient {
8368
8368
  );
8369
8369
  return { ...response, runs: response.runs ?? [] };
8370
8370
  }
8371
- /** Read batches rather than silently truncating a long key list. */
8371
+ /** Read retained tool results without executing tools, preserving supplied key order and batching 100 keys per request. Obtain keys from exported evidence or execution metadata; each key must be nonempty, at most 2,048 characters and contain no CR, LF or NUL. Missing/expired results have an explicit per-key error. */
8372
8372
  async getRunReceipts(runId, options) {
8373
8373
  if (!options.keys.length || options.keys.some(
8374
8374
  (key) => typeof key !== "string" || !key.trim() || key.length > 2048 || /[\r\n\0]/.test(key)
@@ -8424,7 +8424,7 @@ var DeeplineClient = class _DeeplineClient {
8424
8424
  );
8425
8425
  }
8426
8426
  /**
8427
- * Fetch persisted logs for a run using the public runs resource model.
8427
+ * Read a run's retained text tail (default 200), full retained stream (`all`), or terminal failure window (`failed`, at most 20). These are existing reads; sampling and retention loss cannot be recovered. See [run logs and events](run-events.md) for structured search and payload retrieval.
8428
8428
  *
8429
8429
  * This is the SDK equivalent of:
8430
8430
  *
@@ -8503,7 +8503,7 @@ var DeeplineClient = class _DeeplineClient {
8503
8503
  ...probe.logsTruncated ? { logsTruncated: true } : {}
8504
8504
  };
8505
8505
  }
8506
- /** Search bounded, structured runtime history without requiring a run id. */
8506
+ /** Read structured history across the active organization without requiring a run ID. Defaults to the last hour, newest first; use the returned cursor and exact time bounds to continue. See [run logs and events](run-events.md) for all kinds, indexed fields, payloads and SDK/API response types. */
8507
8507
  async searchRunEvents(options = {}) {
8508
8508
  const now = Date.now();
8509
8509
  const params = new URLSearchParams({
@@ -14885,7 +14885,7 @@ Examples:
14885
14885
  var import_promises12 = require("fs/promises");
14886
14886
  var import_node_os10 = require("os");
14887
14887
  var import_node_path20 = require("path");
14888
- var import_commander3 = require("commander");
14888
+ var import_commander4 = require("commander");
14889
14889
 
14890
14890
  // ../plays/settings-contract.ts
14891
14891
  var import_zod = require("zod");
@@ -15663,6 +15663,244 @@ function registerPlayTriggerConfigCommands(plays) {
15663
15663
  // src/cli/commands/play.ts
15664
15664
  var import_node_crypto7 = require("crypto");
15665
15665
 
15666
+ // src/cli/run-logs-help.ts
15667
+ var EVENT_DETAILS = {
15668
+ "run.created": {
15669
+ emittedBy: "Run admission",
15670
+ payloadFields: ["status", "playName", "runtimeBackend"]
15671
+ },
15672
+ "run.started": {
15673
+ emittedBy: "Execution coordinator",
15674
+ payloadFields: ["playName", "runtimeBackend"]
15675
+ },
15676
+ "run.waiting": {
15677
+ emittedBy: "Durable wait handling",
15678
+ payloadFields: ["waitKind", "waitUntil"]
15679
+ },
15680
+ "run.resumed": { emittedBy: "Durable wait handling", payloadFields: [] },
15681
+ "run.completed": {
15682
+ emittedBy: "Run finalization",
15683
+ payloadFields: ["result", "resultSummary", "terminalWorkCounterSegment"]
15684
+ },
15685
+ "run.failed": {
15686
+ emittedBy: "Run finalization",
15687
+ payloadFields: [
15688
+ "error",
15689
+ "result",
15690
+ "resultSummary",
15691
+ "terminalWorkCounterSegment"
15692
+ ]
15693
+ },
15694
+ "run.cancelled": {
15695
+ emittedBy: "Run cancellation",
15696
+ payloadFields: ["error", "result"]
15697
+ },
15698
+ "step.started": {
15699
+ emittedBy: "Managed step execution",
15700
+ payloadFields: ["stepId", "label", "kind", "artifactTableNamespace"]
15701
+ },
15702
+ "step.progress": {
15703
+ emittedBy: "Managed step execution",
15704
+ payloadFields: ["stepId", "label", "kind", "status", "progress"]
15705
+ },
15706
+ "step.completed": {
15707
+ emittedBy: "Managed step execution",
15708
+ payloadFields: ["stepId", "label", "kind", "artifactTableNamespace"]
15709
+ },
15710
+ "step.failed": {
15711
+ emittedBy: "Managed step execution",
15712
+ payloadFields: [
15713
+ "stepId",
15714
+ "label",
15715
+ "kind",
15716
+ "error",
15717
+ "artifactTableNamespace"
15718
+ ]
15719
+ },
15720
+ "step.skipped": {
15721
+ emittedBy: "Managed step execution",
15722
+ payloadFields: ["stepId", "label", "kind", "artifactTableNamespace"]
15723
+ },
15724
+ "log.appended": {
15725
+ emittedBy: "ctx.log and runtime/coordinator messages",
15726
+ payloadFields: [
15727
+ "lines",
15728
+ "lineContexts",
15729
+ "producerAttempt",
15730
+ "channelOffset",
15731
+ "logsTruncated"
15732
+ ]
15733
+ },
15734
+ "dataset.lifecycle": {
15735
+ emittedBy: "Managed dataset storage",
15736
+ payloadFields: [
15737
+ "datasetId",
15738
+ "path",
15739
+ "tableNamespace",
15740
+ "phase",
15741
+ "persistedRows",
15742
+ "succeededRows",
15743
+ "failedRows",
15744
+ "complete",
15745
+ "bornFrom"
15746
+ ]
15747
+ },
15748
+ "activity.observed": {
15749
+ emittedBy: "Managed provider/dataset/runner activity",
15750
+ payloadFields: ["observation"]
15751
+ },
15752
+ "work.counters": {
15753
+ emittedBy: "Runtime work accounting",
15754
+ payloadFields: [
15755
+ "attempt",
15756
+ "invocationSeq",
15757
+ "segmentId",
15758
+ "logicalCalls",
15759
+ "providerRequests",
15760
+ "provider429s",
15761
+ "final"
15762
+ ]
15763
+ }
15764
+ };
15765
+ var RUN_LOGS_KIND_HELP = [
15766
+ ...Object.entries(RUN_EVENT_KIND_CATALOG).map(([kind, descriptor]) => ({
15767
+ kind,
15768
+ description: descriptor.description,
15769
+ ...EVENT_DETAILS[kind]
15770
+ })),
15771
+ ...Object.entries(RUN_RECEIPT_SEARCH_KIND_CATALOG).map(
15772
+ ([kind, descriptor]) => ({
15773
+ kind,
15774
+ description: descriptor.description,
15775
+ emittedBy: "Durable work receipt settlement",
15776
+ payloadFields: ["status", "output", "error", "errorPayload"]
15777
+ })
15778
+ ),
15779
+ {
15780
+ kind: RUN_EVENT_SEARCH_FALLBACK_KIND,
15781
+ description: "Fallback for an observation without a recognized event type.",
15782
+ emittedBy: "Event indexing",
15783
+ payloadFields: []
15784
+ }
15785
+ ];
15786
+ var SECTIONS = [
15787
+ {
15788
+ title: "Choose the read",
15789
+ paragraphs: [
15790
+ "These commands read existing evidence; they do not start a run or execute a provider. Replace <run-id>, <play-name> and other angle-bracket values with identifiers returned by the CLI.",
15791
+ "Text logs: runs logs <run-id> returns the last 200 retained lines by default. --out writes the full retained stream to a local file. --log-level filters text severity; debug includes all retained levels. --failed reads only a terminal-failed run\u2019s last 20 retained lines and reports retention limitations.",
15792
+ "Event search: omit the run ID, or add any of --since, --until, --play, --kind, --where, --payloads, --cursor, --runtime-namespace or --runtime-backend. A supplied run ID then narrows the search. --limit and --json alone do not switch a run\u2019s text logs to event search. Text-only flags --out, --failed and --log-level cannot be combined with event search.",
15793
+ "Current status and returned output selectors: runs get <run-id> --json. Live observation: runs watch <run-id>. Dataset rows: runs export <run-id> --dataset <returned-selector> --out rows.csv. A referenced tool response: runs receipt <run-id> --key <returned-receipt-key> --json. Read each command\u2019s --help for its options."
15794
+ ],
15795
+ commands: [
15796
+ "deepline runs logs <run-id> --json",
15797
+ "deepline runs logs <run-id> --out run.log --json",
15798
+ "deepline runs logs --kind run.failed --json",
15799
+ "deepline runs logs --kind step.failed --payloads --json",
15800
+ "deepline runs logs --kind receipt.failed --payloads --json"
15801
+ ]
15802
+ },
15803
+ {
15804
+ title: "Search window and pagination",
15805
+ paragraphs: [
15806
+ "Search defaults to the last hour, newest first. Use explicit ISO UTC --since and --until values for reproducible queries; the maximum lookback is seven days. Default page size is 100 events; --limit accepts 1\u2013200. With --payloads, default and maximum are 10 events, with 16 MiB total payload data.",
15807
+ "JSON returns events[], returnedCount, since, until, nextCursor and next.logs. Run the returned next.logs command to continue with the same filters and UTC window; nextCursor is opaque. A bounded page or an empty result does not establish whole-run coverage or application health."
15808
+ ],
15809
+ commands: [
15810
+ "deepline runs logs <run-id> --kind log.appended --json",
15811
+ "deepline runs logs --play <play-name> --since <UTC-start> --until <UTC-end> --json"
15812
+ ]
15813
+ },
15814
+ {
15815
+ title: "Fields you can filter with --where",
15816
+ paragraphs: [
15817
+ "Identity strings: orgId, runId, playName, runtimeScope. These come from authenticated execution state; filters only narrow your authorized organization/runtime. Preview reads require the existing runtime credential and an authorized --runtime-namespace; --runtime-backend selects daytona or modal.",
15818
+ "Event string: kind. Optional strings: source, stepId, stepKind, status, datasetId, phase, provider, operation. Optional positive integer: producerAttempt. These fields exist only when recorded; inspect a returned event before filtering on an optional field.",
15819
+ 'stepId/stepKind describe recorded step work; datasetId/phase describe dataset lifecycle (registered, available, failed). provider/operation appear on typed provider activity.observed events, not every receipt or provider call. status is the recorded status or activity state when present: run.completed and step.completed do not imply status == "completed". Select lifecycle outcomes with --kind.',
15820
+ "context.<key> matches an authored flat scalar log field: string, number or boolean. Context cannot override event identity. Missing fields do not match. --where supports only $.field == literal predicates joined with &&, at most eight predicates and 512 bytes. No OR, ranges, wildcards, nested payload paths or text search. Time uses --since/--until; level and message are not --where fields.",
15821
+ 'Wrap the entire predicate in single shell quotes so $ and && reach the CLI unchanged. Inside it, strings use double quotes; numbers and booleans are unquoted. Types must match: 2 differs from "2", false differs from "false". Examples use illustrative recorded values; use your own step IDs, dataset IDs, provider/operation names and authored context. The context examples assume ctx.log recorded companyId: "acme_123", attempt: 2 and cached: false.'
15822
+ ],
15823
+ commands: [
15824
+ "# Failed retained work with its stored error/result",
15825
+ `deepline runs logs --kind receipt.failed --where '$.status == "failed"' --payloads --json`,
15826
+ "# Failure details for one named step",
15827
+ `deepline runs logs --kind step.failed --where '$.stepId == "company-lookup"' --payloads --json`,
15828
+ "# Typed provider observations matching both fields",
15829
+ `deepline runs logs --kind activity.observed --where '$.provider == "apollo" && $.operation == "company_lookup"' --json`,
15830
+ "# Failed lifecycle transitions for one dataset",
15831
+ `deepline runs logs --kind dataset.lifecycle --where '$.datasetId == "companies" && $.phase == "failed"' --payloads --json`,
15832
+ "# Authored string context on log lines",
15833
+ `deepline runs logs --kind log.appended --where '$.context.companyId == "acme_123"' --json`,
15834
+ "# Authored number and boolean context, both required to match",
15835
+ "deepline runs logs --kind log.appended --where '$.context.attempt == 2 && $.context.cached == false' --json",
15836
+ "# Known producer identity within one run",
15837
+ `deepline runs logs <run-id> --where '$.source == "worker" && $.producerAttempt == 1' --json`
15838
+ ]
15839
+ },
15840
+ {
15841
+ title: "What you get back",
15842
+ paragraphs: [
15843
+ "Search events include eventId, occurredAt, ingestedAt, kind, runId, playName, level and message. The CLI puts indexed fields directly on each events[] entry; SDK/API responses keep them under searchDoc. Log search message is a preview (up to 2,048 characters); use text logs or --out for full retained lines.",
15844
+ "--payloads adds eventPayload for stored canonical events: lifecycle, step details/errors, activity observations, dataset transitions and work counters. Receipt matches instead hydrate payload with status, output, error and errorPayload. An event without a receipt does not promise a tool response; retained payloads may be unavailable. Neither --where nor event search indexes request/response bodies.",
15845
+ "Search does not expose a receipt key or storage reference. To retrieve a specific retained tool response with runs receipt, use the receipt key returned in the run\u2019s exported evidence or tool execution metadata. For full row data, follow runs get output/export actions; dataset.lifecycle contains metadata, not all dataset rows.",
15846
+ "The catalog lists known searchable kinds, including receipt outcomes and the runtime.event fallback. Use the exact dotted name with --kind. Future stored kinds can also be queried; this list is not a CLI validation allowlist. Events are observations, not a count of billed provider calls.",
15847
+ "Catalog payload fields are possible producer fields, not required fields or --where paths. Canonical eventPayload uses type for the dotted event kind; its kind field, when present on a step, becomes indexed stepKind. Indexed log entries describe individual lines rather than reproducing the original lines batch.",
15848
+ "Canonical event envelopes carry runId, type, occurredAt (producer milliseconds), source, optional seq and optional producer-owned payload. Search occurredAt/ingestedAt are UTC timestamp strings. source identifies the recorded producer; producerAttempt is present only when known.",
15849
+ "activity.observed stores observation with activityId, stepId, target, state and observedAt. Targets describe provider, dataset, lease, runner, step or capacity work. State kinds are active, queued, waiting, retrying, scheduled, completed or failed; retry/wait detail stays in the payload. work.counters contains aggregate logicalCalls, providerRequests and provider429s, not per-call responses."
15850
+ ],
15851
+ commands: []
15852
+ }
15853
+ ];
15854
+ var RETENTION = [
15855
+ "Event/log/receipt search shares the PlanetScale index. New runs marked runEventStore=planet_scale retain accepted event/log history in PlanetScale; Convex keeps current run/control state and eligible saved-Play rollup facts. Older unmarked runs retain their existing readers. No backfill is implied.",
15856
+ "Search retention is seven days; receipt payload retention is independent. Logs reflect accepted, retained lines: runtime sampling and truncation can omit original console output. Read returned retention/sampling warnings; an export contains the full retained stream, not suppressed lines."
15857
+ ];
15858
+ function wrapParagraph(text, indent2 = 2) {
15859
+ const lines = [];
15860
+ const padding = " ".repeat(indent2);
15861
+ let line = padding;
15862
+ for (const word of text.split(" ")) {
15863
+ if (line.length + word.length > 80 && line.trim()) {
15864
+ lines.push(line.trimEnd());
15865
+ line = padding;
15866
+ }
15867
+ line += `${word} `;
15868
+ }
15869
+ lines.push(line.trimEnd());
15870
+ return lines.join("\n");
15871
+ }
15872
+ function renderRunLogsHelp() {
15873
+ const section = ({
15874
+ title,
15875
+ paragraphs,
15876
+ commands
15877
+ }) => [
15878
+ `${title}:`,
15879
+ ...paragraphs.flatMap((paragraph) => [wrapParagraph(paragraph), ""]),
15880
+ ...commands.length ? [" Common commands:", ...commands.map((command) => ` ${command}`)] : [],
15881
+ ""
15882
+ ];
15883
+ return [
15884
+ "",
15885
+ ...section(SECTIONS[0]),
15886
+ "Known --kind values (complete catalog):",
15887
+ ...RUN_LOGS_KIND_HELP.flatMap(
15888
+ ({ kind, description, emittedBy, payloadFields }) => [
15889
+ ` ${kind}`,
15890
+ wrapParagraph(description, 4),
15891
+ wrapParagraph(
15892
+ `Recorded by: ${emittedBy}. Payload fields: ${kind === RUN_EVENT_SEARCH_FALLBACK_KIND ? "producer-specific fields; inspect the returned payload" : payloadFields.join(", ") || "event envelope only"}.`,
15893
+ 4
15894
+ )
15895
+ ]
15896
+ ),
15897
+ "",
15898
+ ...SECTIONS.slice(1).flatMap(section),
15899
+ "Storage and retention:",
15900
+ ...RETENTION.flatMap((paragraph) => [wrapParagraph(paragraph), ""])
15901
+ ].join("\n");
15902
+ }
15903
+
15666
15904
  // ../play-runtime/run-execution-state.ts
15667
15905
  function assertNeverState(value, what) {
15668
15906
  throw new Error(`Unhandled ${what}: ${JSON.stringify(value)}`);
@@ -16466,6 +16704,7 @@ ${JSON.stringify(value, null, 2)}` : `${key}: ${String(value)}`
16466
16704
  var import_node_fs13 = require("fs");
16467
16705
  var import_promises11 = require("fs/promises");
16468
16706
  var import_node_path19 = require("path");
16707
+ var import_commander3 = require("commander");
16469
16708
 
16470
16709
  // src/cli/commands/plays/bootstrap.ts
16471
16710
  var import_node_fs8 = require("fs");
@@ -16820,7 +17059,7 @@ Example: deepline plays bootstrap people-email --from csv:data/leads.csv --using
16820
17059
  `Unknown plays bootstrap template: ${rawTemplate}
16821
17060
  Supported templates: ${formatPlayBootstrapTemplates()}|${MONITOR_BOOTSTRAP_TEMPLATE}` + (looksLikePlayReference ? `
16822
17061
 
16823
- "${rawTemplate}" looks like an existing play reference or file, not a bootstrap template. Do not run plays bootstrap on prebuilt/<play-name>. Use "deepline plays run ${rawTemplate} --input '{...}' --watch" to run it directly, "deepline plays describe ${rawTemplate} --json" to inspect its contract, or "deepline plays get ${rawTemplate} --source --out scratchpad.play.ts" to clone/edit it.` : "")
17062
+ "${rawTemplate}" looks like an existing play reference or file, not a bootstrap template. Do not run plays bootstrap on prebuilt/<play-name>. Use "deepline plays run ${rawTemplate} --input '{...}'" to run it directly, "deepline plays describe ${rawTemplate} --json" to inspect its contract, or "deepline plays get ${rawTemplate} --source --out scratchpad.play.ts" to clone/edit it.` : "")
16824
17063
  );
16825
17064
  }
16826
17065
  return rawTemplate;
@@ -17589,7 +17828,7 @@ function playUsesMapBackedRuntime(play) {
17589
17828
  }
17590
17829
  function assertComposablePlayRoute(input2) {
17591
17830
  if (!input2.playRef || !playUsesMapBackedRuntime(input2.play)) return;
17592
- const runCommand2 = input2.play?.runCommand?.trim() || `deepline plays run ${input2.playRef} --input '{...}' --watch`;
17831
+ const runCommand2 = input2.play?.runCommand?.trim() || `deepline plays run ${input2.playRef} --input '{...}'`;
17593
17832
  throw new PlayBootstrapValidationError(
17594
17833
  `Cannot use ${input2.stageLabel} play:${input2.playRef} in plays bootstrap composition: the selected play is dataset-backed/direct-run-only. Child plays that use ctx.dataset() own durable table state and must be run directly, exported, or validated as their own play instead of wrapped with ctx.runPlay. Run it directly first: ${runCommand2}`
17595
17834
  );
@@ -17631,14 +17870,14 @@ function generatePlaySourceRowsBlock(input2) {
17631
17870
  sourcePlay: input2.sourcePlay
17632
17871
  })) {
17633
17872
  const sourcePlay = input2.sourcePlay;
17634
- const runCommand2 = sourcePlay?.runCommand?.trim() || `deepline plays run ${input2.source.value} --input '{...}' --watch`;
17873
+ const runCommand2 = sourcePlay?.runCommand?.trim() || `deepline plays run ${input2.source.value} --input '{...}'`;
17635
17874
  return `// Source play ${input2.source.value} is dataset-backed/direct-run-only, so this generated play is stage 2.
17636
17875
  // Stage 1:
17637
17876
  // ${runCommand2}
17638
17877
  // Stage 2:
17639
17878
  // deepline runs export <stage-1-run-id> --dataset 'result.rows' --out source-export.csv
17640
17879
  // Stage 3:
17641
- // deepline plays run <this-file.play.ts> --input '{"sourceCsv":"source-export.csv","limit":${input2.sourcePlay ? "5" : "5"}}' --watch
17880
+ // deepline plays run <this-file.play.ts> --input '{"sourceCsv":"source-export.csv","limit":${input2.sourcePlay ? "5" : "5"}}'
17642
17881
  const sourceDataset = await ctx.csv<${input2.collectionType}>(input.sourceCsv ?? './source-export.csv');
17643
17882
  const ${input2.collection}: ${input2.collectionType}[] = await sourceDataset.peek(limit);`;
17644
17883
  }
@@ -18118,7 +18357,7 @@ Notes:
18118
18357
  Examples:
18119
18358
  deepline plays bootstrap people-email --from csv:data/leads.csv --using play:prebuilt/name-and-domain-to-email-waterfall --limit 5 --out email-flow.play.ts
18120
18359
  deepline plays check email-flow.play.ts
18121
- deepline plays run email-flow.play.ts --input '{"limit":5}' --watch
18360
+ deepline plays run email-flow.play.ts --input '{"limit":5}'
18122
18361
 
18123
18362
  deepline plays bootstrap people-email --from provider:dropleads_search_people --using providers:hunter_email_finder,leadmagic_email_finder --limit 5 --out prospecting.play.ts
18124
18363
  deepline plays bootstrap company-people-email --from provider:crustdata_companydb_search --people play:prebuilt/company-to-contact --email play:prebuilt/name-and-domain-to-email-waterfall --limit 5 --out account-contacts.play.ts
@@ -28053,7 +28292,7 @@ function buildPlayReferenceNotFoundMessage(input2) {
28053
28292
  lines.push("", ` ${suggestion.reference}`);
28054
28293
  if (input2.command === "run") {
28055
28294
  lines.push(
28056
- ` deepline plays run ${suggestion.reference} --input '{...}' --watch`
28295
+ ` deepline plays run ${suggestion.reference} --input '{...}'`
28057
28296
  );
28058
28297
  } else if (input2.command === "get") {
28059
28298
  lines.push(` deepline plays get ${suggestion.reference} --json`);
@@ -31377,7 +31616,9 @@ function buildOrdinaryPlayRunCommand(options, resolvedRevisionId) {
31377
31616
  }
31378
31617
  if (options.open) parts.push("--open");
31379
31618
  if (options.fullJson) parts.push("--full");
31380
- if (options.jsonOutput && options.emitLogs) parts.push("--logs");
31619
+ if (options.jsonOutput && options.emitLogs) {
31620
+ parts.push("--log-level", "debug");
31621
+ }
31381
31622
  if (options.jsonOutput) parts.push("--json");
31382
31623
  return parts.join(" ");
31383
31624
  }
@@ -32461,7 +32702,7 @@ function parsePlayRunOptions(args) {
32461
32702
  }
32462
32703
  if (arg === "--tail") {
32463
32704
  throw new Error(
32464
- "--tail is removed for `plays run`; use `--watch` to stream completion output."
32705
+ "--tail is removed for `plays run`; run waits and streams completion output by default."
32465
32706
  );
32466
32707
  }
32467
32708
  continue;
@@ -35091,7 +35332,7 @@ async function handlePlayList(args) {
35091
35332
  ` cost estimate: ${formatPlayCostEstimate(play.costEstimate)}`
35092
35333
  );
35093
35334
  }
35094
- lines.push(` run: deepline plays run ${reference} --watch`);
35335
+ lines.push(` run: deepline plays run ${reference}`);
35095
35336
  }
35096
35337
  if (page.hasMore) {
35097
35338
  lines.push("List truncated \u2014 more plays are available.");
@@ -35913,7 +36154,6 @@ Run and retrieve results:
35913
36154
  2. Start and follow a new run: deepline plays run workflow.play.ts --csv contacts.csv
35914
36155
  This example requires input.csv. Use the selected Play's actual input fields.
35915
36156
  Run waits and shows progress by default; --no-wait returns immediately.
35916
- --watch and --wait are redundant compatibility aliases for the default.
35917
36157
  3. Read its overview: deepline runs get <run-id> --json
35918
36158
  4. Export complete rows: deepline runs export <run-id> --dataset <returned-selector> --out results.csv
35919
36159
  If disconnected, attach to the SAME run with deepline runs tail <run-id>.
@@ -36002,8 +36242,7 @@ Notes:
36002
36242
  Named plays run the live saved revision.
36003
36243
  File args accept local paths; the CLI stages files before submit.
36004
36244
  By default, run waits for completion and prints logs, previews, stats, and
36005
- next commands. --watch and --wait are accepted compatibility aliases for the
36006
- default behavior. Use --no-wait only when you intentionally want
36245
+ next commands. Use --no-wait only when you intentionally want
36007
36246
  a fire-and-forget run id.
36008
36247
  --run-id-file writes the durable run id to a versioned JSON file as soon as
36009
36248
  the server accepts the run. The destination must not already exist.
@@ -36073,12 +36312,29 @@ Examples:
36073
36312
  ).option(
36074
36313
  "--fixture-behavior <json>",
36075
36314
  "Internal/testing: fixture response behavior JSON object or @file path"
36076
- ).option("--watch", "Compatibility alias; run waits by default").option("--wait", "Compatibility alias; run waits by default").option("--no-wait", "Start the run and return immediately").option(
36315
+ ).addOption(
36316
+ new import_commander3.Option(
36317
+ "--watch",
36318
+ "Compatibility alias; run waits by default"
36319
+ ).hideHelp()
36320
+ ).addOption(
36321
+ new import_commander3.Option(
36322
+ "--wait",
36323
+ "Compatibility alias; run waits by default"
36324
+ ).hideHelp()
36325
+ ).option("--no-wait", "Start the run and return immediately").option(
36077
36326
  "--run-id-file <path>",
36078
36327
  "Atomically write the accepted run id to a new JSON file"
36079
- ).option("--logs", "Compatibility alias for --log-level debug").option(
36080
- "--debug [value]",
36081
- "Compatibility alias for --log-level debug when bare; --debug <value> remains legacy Play input.debug"
36328
+ ).addOption(
36329
+ new import_commander3.Option(
36330
+ "--logs",
36331
+ "Compatibility alias for --log-level debug"
36332
+ ).hideHelp()
36333
+ ).addOption(
36334
+ new import_commander3.Option(
36335
+ "--debug [value]",
36336
+ "Compatibility alias for --log-level debug when bare; --debug <value> remains legacy Play input.debug"
36337
+ ).hideHelp()
36082
36338
  ).option(
36083
36339
  "--log-level <level>",
36084
36340
  "Minimum live log severity: debug, info (default), warn, or error"
@@ -36760,9 +37016,8 @@ Notes:
36760
37016
  logs for persisted log history. In human output, --compact prints
36761
37017
  deduplicated step transitions and progress. --json emits one terminal
36762
37018
  package. --jsonl emits canonical watched events as JSON Lines and ends with
36763
- the same compact package shape as runs get --json. The tail command remains
36764
- an alias. --log-level
36765
- filters the rendered customer-safe runtime log lines; debug includes runtime
37019
+ the same compact package shape as runs get --json. --log-level filters the
37020
+ rendered customer-safe runtime log lines; debug includes runtime
36766
37021
  and receipt diagnostics and writes them to stderr alongside JSON output.
36767
37022
 
36768
37023
  Examples:
@@ -36778,7 +37033,17 @@ Examples:
36778
37033
  ).option(
36779
37034
  "--compact",
36780
37035
  "Show deduplicated human step transitions and progress"
36781
- ).option("--logs", "Compatibility alias for --log-level debug").option("--debug", "Compatibility alias for --log-level debug").option(
37036
+ ).addOption(
37037
+ new import_commander3.Option(
37038
+ "--logs",
37039
+ "Compatibility alias for --log-level debug"
37040
+ ).hideHelp()
37041
+ ).addOption(
37042
+ new import_commander3.Option(
37043
+ "--debug",
37044
+ "Compatibility alias for --log-level debug"
37045
+ ).hideHelp()
37046
+ ).option(
36782
37047
  "--log-level <level>",
36783
37048
  "Minimum severity: debug, info (default), warn, or error"
36784
37049
  ).action(async (runId, options) => {
@@ -36794,51 +37059,31 @@ Examples:
36794
37059
  });
36795
37060
  runs.command("logs [runId]").description(
36796
37061
  "Fetch one run\u2019s logs or search recent runtime events across runs."
36797
- ).addHelpText(
36798
- "after",
36799
- `
36800
- Notes:
36801
- Prints a bounded recent log preview by default. Use --out to write the full
36802
- retained stream to a local file. Use --log-level to filter by severity;
36803
- default debug preserves the complete historical stream.
36804
-
36805
- Search flags read the org-scoped event index (last hour by default, at most
36806
- seven days). Org, run, Play, runtime scope and known attempt identity are
36807
- attached automatically. --where accepts equality joined with && for orgId,
36808
- runId, playName, runtimeScope, producerAttempt, kind, status, source, stepId,
36809
- stepKind, datasetId, phase, provider, operation, and scalar context.<key>.
36810
- Filters only narrow the authenticated org/runtime scope. Provider and
36811
- operation come from typed provider activity observations; this does not
36812
- index request/response bodies or promise one event per provider call. --payloads
36813
- includes full result data in this command, capped at ten events and 16 MiB.
36814
-
36815
- Event, log, and receipt search share one PlanetScale index. For runs marked
36816
- runEventStore=planet_scale, PlanetScale owns full event/log history; Convex
36817
- keeps the live run snapshot, admission fence, and eligible saved-Play rollup
36818
- facts. Marked-run log bodies are not copied into Convex. Unmarked legacy runs
36819
- keep their existing Convex event history and Run Log Stream.
36820
- Known --kind values: ${RUN_EVENT_SEARCH_KIND_VALUES.join(", ")}.
36821
-
36822
- Examples:
36823
- deepline runs logs play/my-play/run/20260501t000000-000
36824
- deepline runs logs play/my-play/run/20260501t000000-000 --limit 500
36825
- deepline runs logs play/my-play/run/20260501t000000-000 --failed --json
36826
- deepline runs logs play/my-play/run/20260501t000000-000 --log-level error
36827
- deepline runs logs play/my-play/run/20260501t000000-000 --out run.log --log-level debug --json
36828
- deepline runs logs --since 2026-09-29T00:00:00Z --kind step.failed --json
36829
- deepline runs logs --kind activity.observed --where '$.provider == "apollo" && $.operation == "company_lookup"' --json
36830
- deepline runs logs --play my-play --where '$.context.companyId == "acme_123"' --json
36831
- deepline runs logs --where '$.status == "failed"' --payloads --play my-play --json
36832
- `
36833
- ).option("--limit <count>", "Maximum log lines or search events to print").option("--out <path>", "Write the full retained log stream to a file").option("--failed", "Show the bounded terminal-failure log window").option(
37062
+ ).addHelpText("after", renderRunLogsHelp()).option(
37063
+ "--limit <count>",
37064
+ "Text tail: default 200; search: default 100, max 200 (10 with --payloads)"
37065
+ ).option("--out <path>", "Write the full retained log stream to a file").option("--failed", "Show the bounded terminal-failure log window").option(
36834
37066
  "--log-level <level>",
36835
37067
  "Minimum severity: debug (default), info, warn, or error"
36836
- ).option("--logs", "Compatibility alias for --log-level debug").option("--debug", "Compatibility alias for --log-level debug").option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--since <timestamp>", "Search events since this UTC timestamp").option("--until <timestamp>", "Search events before this UTC timestamp").option("--play <name>", "Filter events by Play name").option("--kind <kind>", "Filter events by kind").option(
37068
+ ).addOption(
37069
+ new import_commander3.Option(
37070
+ "--logs",
37071
+ "Compatibility alias for --log-level debug"
37072
+ ).hideHelp()
37073
+ ).addOption(
37074
+ new import_commander3.Option(
37075
+ "--debug",
37076
+ "Compatibility alias for --log-level debug"
37077
+ ).hideHelp()
37078
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--since <timestamp>", "Search events since this UTC timestamp").option("--until <timestamp>", "Search events before this UTC timestamp").option("--play <name>", "Filter events by Play name").option(
37079
+ "--kind <kind>",
37080
+ "Search one exact event kind; complete catalog below"
37081
+ ).option(
36837
37082
  "--where <jsonpath>",
36838
- 'Bound JSONPath equality over event fields (for example $.provider == "apollo" && $.operation == "company_lookup")'
37083
+ "Search indexed fields with == and &&; field types and availability below"
36839
37084
  ).option(
36840
37085
  "--payloads",
36841
- "Include full stored payloads (up to 10 events and 16 MiB)"
37086
+ "Search with canonical eventPayload or receipt payload; max 10 events, 16 MiB"
36842
37087
  ).option("--cursor <token>", "Continue a bounded event search").option(
36843
37088
  "--runtime-namespace <name>",
36844
37089
  "Search an explicitly authorized Preview namespace"
@@ -37162,11 +37407,11 @@ async function handlePlaySharePublish(args) {
37162
37407
  ok: false,
37163
37408
  code: "NO_SUCCESSFUL_RUN",
37164
37409
  message,
37165
- next: `deepline plays run ${name} --wait`
37410
+ next: `deepline plays run ${name}`
37166
37411
  });
37167
37412
  } else {
37168
37413
  console.error(message);
37169
- console.error(` deepline plays run ${name} --wait`);
37414
+ console.error(` deepline plays run ${name}`);
37170
37415
  }
37171
37416
  return 7;
37172
37417
  }
@@ -42152,7 +42397,7 @@ function registerEnrichCommand(program) {
42152
42397
  "--open",
42153
42398
  "Open the generated play page in a browser after the run starts."
42154
42399
  ).addOption(
42155
- new import_commander3.Option(
42400
+ new import_commander4.Option(
42156
42401
  "--no-open [legacy-value]",
42157
42402
  "Removed legacy option"
42158
42403
  ).hideHelp()
@@ -42542,7 +42787,7 @@ function registerExecutionsCommands(program) {
42542
42787
  }
42543
42788
 
42544
42789
  // src/cli/commands/feedback.ts
42545
- var import_commander4 = require("commander");
42790
+ var import_commander5 = require("commander");
42546
42791
  var import_node_fs14 = require("fs");
42547
42792
  async function handleFeedback(text, options) {
42548
42793
  const message = resolveFeedbackText(text, options.file);
@@ -42608,7 +42853,7 @@ Notes:
42608
42853
  to submit the report.
42609
42854
 
42610
42855
  Examples:
42611
- deepline feedback send "plays run failed after upload" --command "deepline plays run my.play.ts --watch" --error-outcome terminal
42856
+ deepline feedback send "plays run failed after upload" --command "deepline plays run my.play.ts" --error-outcome terminal
42612
42857
  deepline feedback send "unexpected billing output" --payload '{"command":"billing usage"}' --json
42613
42858
  `
42614
42859
  );
@@ -42620,10 +42865,10 @@ Examples:
42620
42865
  deepline feedback send --file incident.md --requested --json
42621
42866
  cat incident.md | deepline feedback send --requested --json
42622
42867
  deepline feedback send "tools search returned stale results" --requested --json
42623
- deepline feedback send "plays run failed after upload" --command "deepline plays run my.play.ts --watch" --error-outcome terminal
42868
+ deepline feedback send "plays run failed after upload" --command "deepline plays run my.play.ts" --error-outcome terminal
42624
42869
  `
42625
42870
  ).argument("[text]", "Feedback text").option("--file <path>", "Read feedback text from a file, or - for stdin").option("--command <command>", "Command that reproduced the issue").option("--payload <payload>", "JSON or plain-text payload for the repro").addOption(
42626
- new import_commander4.Option(
42871
+ new import_commander5.Option(
42627
42872
  "--error-outcome <outcome>",
42628
42873
  "Error impact on the task: terminal or continued"
42629
42874
  ).choices(["terminal", "continued"])
@@ -53868,7 +54113,7 @@ Examples:
53868
54113
  }
53869
54114
 
53870
54115
  // src/cli/commands/tools.ts
53871
- var import_commander5 = require("commander");
54116
+ var import_commander6 = require("commander");
53872
54117
  var import_node_fs28 = require("fs");
53873
54118
  var import_node_os19 = require("os");
53874
54119
  var import_node_path33 = require("path");
@@ -54878,7 +55123,7 @@ function isMissingToolMetadataError(error) {
54878
55123
  function playAliasToolErrorMessage(toolId, play) {
54879
55124
  const playName = play.reference ?? play.name;
54880
55125
  return `${toolId} is a play, not a tool.
54881
- Use: deepline plays run ${playName} --input '{...}' --watch
55126
+ Use: deepline plays run ${playName} --input '{...}'
54882
55127
  Inspect its schema with: deepline plays describe ${playName} --json`;
54883
55128
  }
54884
55129
  function printPlayAliasToolError(toolId, play) {
@@ -54910,11 +55155,11 @@ function playRunCommandForTool(tool, toolId, input2) {
54910
55155
  const playReference = playReferenceForTool(tool);
54911
55156
  if (!playReference) return playSearchCommandForToolId(toolId);
54912
55157
  const inputArg = input2 === void 0 ? "'{...}'" : `'${JSON.stringify(input2)}'`;
54913
- return `deepline plays run ${playReference} --input ${inputArg} --watch`;
55158
+ return `deepline plays run ${playReference} --input ${inputArg}`;
54914
55159
  }
54915
55160
  function playLikeToolExecuteErrorMessage(toolId, tool) {
54916
55161
  const playReference = tool ? playReferenceForTool(tool) : null;
54917
- const nextStep = playReference ? `Use: deepline plays run ${playReference} --input '{...}' --watch` : `Find the maintained workflow with: ${playSearchCommandForToolId(toolId)}`;
55162
+ const nextStep = playReference ? `Use: deepline plays run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${playSearchCommandForToolId(toolId)}`;
54918
55163
  return [
54919
55164
  `${toolId} is a workflow/play entry, not an atomic provider tool.`,
54920
55165
  nextStep,
@@ -55090,12 +55335,12 @@ Examples:
55090
55335
  "--examples-only",
55091
55336
  "Only print runnable examples and sample payloads"
55092
55337
  ).option("--getters-only", "Only print extracted list/value getters").addOption(
55093
- new import_commander5.Option(
55338
+ new import_commander6.Option(
55094
55339
  "--compact",
55095
55340
  "Compatibility alias for the default compact view"
55096
55341
  ).hideHelp()
55097
55342
  ).addOption(
55098
- new import_commander5.Option(
55343
+ new import_commander6.Option(
55099
55344
  "--contract-json",
55100
55345
  "Compatibility alias for compact contract JSON"
55101
55346
  ).hideHelp()
@@ -58110,7 +58355,7 @@ async function main() {
58110
58355
  if (printStartupPhase) {
58111
58356
  progress?.phase("loading deepline cli");
58112
58357
  }
58113
- const program = new import_commander6.Command();
58358
+ const program = new import_commander7.Command();
58114
58359
  program.name("deepline").description(
58115
58360
  "Deepline CLI \u2014 GTM enrichment tools, plays, and runs from your terminal."
58116
58361
  ).version(SDK_VERSION, "-v, --version", "Show version").exitOverride().showHelpAfterError().showSuggestionAfterError(true).addHelpText(