deepline 0.3.328 → 0.3.330

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.
Files changed (124) hide show
  1. package/dist/bundling-sources/sdk/src/billing-idempotency.ts +24 -0
  2. package/dist/bundling-sources/sdk/src/client.ts +22 -22
  3. package/dist/bundling-sources/sdk/src/index.ts +1 -0
  4. package/dist/bundling-sources/sdk/src/play.ts +55 -45
  5. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/types.ts +16 -0
  7. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
  8. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +31 -15
  10. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +22 -4
  11. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +29 -11
  12. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +145 -19
  13. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -10
  14. package/dist/bundling-sources/shared_libs/plays/dataset.ts +3 -0
  15. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +59 -10
  16. package/dist/cli/{auth-ANHHABWT.mjs → auth-A4XQ3KMW.mjs} +4 -4
  17. package/dist/cli/auth-XJJYQESF.js +31 -0
  18. package/dist/cli/{billing-R6NYYO6G.mjs → billing-634WZLKG.mjs} +36 -14
  19. package/dist/cli/{billing-GGVKLFE6.js → billing-WLHXYC5Z.js} +101 -79
  20. package/dist/cli/{chunk-ZND34HL7.mjs → chunk-3QZ22IZO.mjs} +4 -4
  21. package/dist/cli/{chunk-UDIPEHNJ.js → chunk-46IVSO6O.js} +141 -11
  22. package/dist/cli/{chunk-GZV5F6CL.mjs → chunk-56RM5AQF.mjs} +79 -26
  23. package/dist/cli/{chunk-UM4ZE3P7.mjs → chunk-5W636CDP.mjs} +2 -2
  24. package/dist/cli/{chunk-W6WV6UME.js → chunk-63W4744F.js} +563 -555
  25. package/dist/cli/{chunk-OOLIEDIJ.mjs → chunk-6VBXS43D.mjs} +2 -2
  26. package/dist/cli/{chunk-B2R66UTW.mjs → chunk-7DGZCMXQ.mjs} +1 -1
  27. package/dist/cli/{chunk-7DDNACAQ.js → chunk-7FWHOKNS.js} +26 -26
  28. package/dist/cli/{chunk-YIY74KUF.mjs → chunk-EV4QJE4J.mjs} +1 -1
  29. package/dist/cli/{chunk-2HKPAZVJ.js → chunk-FKKNYKDY.js} +14 -3
  30. package/dist/cli/{chunk-DNYRAZSK.js → chunk-FLIABSY6.js} +48 -48
  31. package/dist/cli/{chunk-O5GPNPOC.js → chunk-GHHLLEZK.js} +4 -4
  32. package/dist/cli/{chunk-ZFKUVDOM.js → chunk-GKZZ32EV.js} +60 -60
  33. package/dist/cli/{chunk-LJWC5HSO.js → chunk-GS7GA7PI.js} +15 -15
  34. package/dist/cli/{chunk-7R6KQSFA.mjs → chunk-GTBS6LQH.mjs} +38 -22
  35. package/dist/cli/{chunk-2FPVWL4W.js → chunk-LNDGT7NV.js} +119 -66
  36. package/dist/cli/{chunk-SMGNDW7O.mjs → chunk-LQ5DD2UF.mjs} +2 -2
  37. package/dist/cli/{chunk-WWVE4HFN.mjs → chunk-MBI3BVSQ.mjs} +1 -1
  38. package/dist/cli/{chunk-KP7W5NO6.mjs → chunk-NTVTZAVZ.mjs} +13 -2
  39. package/dist/cli/{chunk-XVKQ6D4K.js → chunk-O2L46S3I.js} +2 -2
  40. package/dist/cli/{chunk-BC7FMQ2G.mjs → chunk-PH2N6GC7.mjs} +1 -1
  41. package/dist/cli/{chunk-6ENR652E.mjs → chunk-SDSS4OTO.mjs} +77 -69
  42. package/dist/cli/{chunk-YFCHBN3C.mjs → chunk-SZCUJ4AL.mjs} +1 -1
  43. package/dist/cli/{chunk-AGH6YP2T.js → chunk-UQV5M6HN.js} +3 -3
  44. package/dist/cli/{chunk-7MABE3ZK.mjs → chunk-VFC6CZLF.mjs} +135 -5
  45. package/dist/cli/{chunk-DNMV2L7Q.js → chunk-WHKTRZ3J.js} +6 -6
  46. package/dist/cli/{chunk-Y4LXIUHX.js → chunk-XUNMVZOW.js} +1 -1
  47. package/dist/cli/{chunk-LEEXRXQQ.js → chunk-YFP4UH2Y.js} +6 -6
  48. package/dist/cli/{chunk-ITFUZEHE.js → chunk-YGFQ7YSM.js} +51 -35
  49. package/dist/cli/{chunk-AKKQ26RX.mjs → chunk-ZYPFCBW5.mjs} +1 -1
  50. package/dist/cli/client-3CREIHGC.js +20 -0
  51. package/dist/cli/{client-ZABA5NMD.mjs → client-WYFGEJOX.mjs} +3 -3
  52. package/dist/cli/{csv-VECE3PWX.mjs → csv-BDZSDXLU.mjs} +3 -3
  53. package/dist/cli/{csv-4ZK5ZJAJ.js → csv-THMQDXCJ.js} +12 -12
  54. package/dist/cli/{db-UJPCDBV7.js → db-5BQJOZG7.js} +29 -29
  55. package/dist/cli/{db-6VE4OEWW.mjs → db-R2LTNLFM.mjs} +4 -4
  56. package/dist/cli/{describe-CFUZZ326.js → describe-F4G5H3SC.js} +17 -17
  57. package/dist/cli/{describe-W6X5G4JR.mjs → describe-WECII7FS.mjs} +10 -10
  58. package/dist/cli/{executions-AI4DTQQL.js → executions-HJRVD4M6.js} +6 -6
  59. package/dist/cli/{executions-ZZWB75DF.mjs → executions-HPRIRB73.mjs} +4 -4
  60. package/dist/cli/{feedback-IM5Z6T5K.mjs → feedback-5VVW5WW7.mjs} +3 -3
  61. package/dist/cli/{feedback-FYSNSYUU.js → feedback-GHGDH43D.js} +6 -6
  62. package/dist/cli/{git-YNYTK3YW.mjs → git-BBXML2UJ.mjs} +4 -4
  63. package/dist/cli/git-NNEBLRVP.js +23 -0
  64. package/dist/cli/index.js +79 -79
  65. package/dist/cli/index.mjs +31 -31
  66. package/dist/cli/{legacy-noops-4DTMYYUY.mjs → legacy-noops-IALOUAGL.mjs} +4 -4
  67. package/dist/cli/{legacy-noops-PHJE2XFK.js → legacy-noops-VNZZ3VVT.js} +7 -7
  68. package/dist/cli/{monitors-27JP76WE.js → monitors-MLP6IA2R.js} +85 -85
  69. package/dist/cli/{monitors-HUP4MVWJ.mjs → monitors-VDEB2FKS.mjs} +4 -4
  70. package/dist/cli/{org-RHVDMUKN.js → org-N6ADDGEV.js} +60 -60
  71. package/dist/cli/{org-L3B2RR4U.mjs → org-SDSSKY42.mjs} +4 -4
  72. package/dist/cli/play-UTIPBVDQ.js +153 -0
  73. package/dist/cli/{play-UXIJVYNF.mjs → play-VSTVY6PM.mjs} +9 -9
  74. package/dist/cli/{providers-VL6VY56M.js → providers-TJ42O6NN.js} +7 -7
  75. package/dist/cli/{providers-FABWTNKR.mjs → providers-UKC7KD3W.mjs} +4 -4
  76. package/dist/cli/{quickstart-IIPZ6DSY.js → quickstart-7S7NMCMX.js} +5 -5
  77. package/dist/cli/{quickstart-OA54A4IE.mjs → quickstart-WSKATNHJ.mjs} +3 -3
  78. package/dist/cli/{search-YDK4V2EW.mjs → search-6OS6VVCJ.mjs} +5 -5
  79. package/dist/cli/search-Y6UGKL5C.js +26 -0
  80. package/dist/cli/{secrets-JGU7ZRUW.js → secrets-GWLYB2KD.js} +13 -13
  81. package/dist/cli/{secrets-4MQF6RF6.mjs → secrets-QTTR5R5M.mjs} +4 -4
  82. package/dist/cli/{sessions-PTHOMSZ5.mjs → sessions-Q7MY5YYI.mjs} +4 -4
  83. package/dist/cli/{sessions-I7ZZYSYW.js → sessions-SUURWTVX.js} +5 -5
  84. package/dist/cli/{settings-X4ENSGNK.mjs → settings-3D5YDD2B.mjs} +7 -7
  85. package/dist/cli/{settings-ZUUBKIG6.js → settings-W4DYMYFA.js} +74 -74
  86. package/dist/cli/{setup-4UM6FCZL.mjs → setup-5F5OGYKW.mjs} +6 -6
  87. package/dist/cli/{setup-6L576TQE.js → setup-NIUADTDP.js} +41 -41
  88. package/dist/cli/skills-SHUL5UT7.js +28 -0
  89. package/dist/cli/{skills-U3BS5KUI.mjs → skills-TV3ORUIG.mjs} +4 -4
  90. package/dist/cli/tools-GNIVV4OF.js +40 -0
  91. package/dist/cli/{tools-O4PX6UVB.mjs → tools-YSZWAFKO.mjs} +7 -6
  92. package/dist/cli/{update-OHWSK2WN.mjs → update-FJAMLGLT.mjs} +6 -6
  93. package/dist/cli/update-U3XGY6IT.js +28 -0
  94. package/dist/cli/{workflow-QWTZBLT3.js → workflow-C6ZCM5S4.js} +15 -15
  95. package/dist/cli/{workflow-RVMGBMLX.mjs → workflow-HDHBYC7S.mjs} +5 -5
  96. package/dist/{client-wiWPZhnI.d.mts → client-D5XOQKsA.d.mts} +20 -1
  97. package/dist/{client-DHq8dJ56.d.ts → client-l-IoLh8Z.d.ts} +20 -1
  98. package/dist/{compiler-manifest-9TkZ_ykI.d.mts → compiler-manifest-82q4jtfQ.d.mts} +44 -17
  99. package/dist/{compiler-manifest-9TkZ_ykI.d.ts → compiler-manifest-82q4jtfQ.d.ts} +44 -17
  100. package/dist/{index-B-5_Xhud.d.mts → index-BPbW2XHF.d.mts} +1 -1
  101. package/dist/{index-ykksoEyR.d.ts → index-k0rquHIm.d.ts} +1 -1
  102. package/dist/index.d.mts +14 -8
  103. package/dist/index.d.ts +14 -8
  104. package/dist/index.js +194 -69
  105. package/dist/index.mjs +162 -37
  106. package/dist/install-integrity.json +85 -84
  107. package/dist/plays/bundle-play-file.d.mts +3 -3
  108. package/dist/plays/bundle-play-file.d.ts +3 -3
  109. package/dist/plays/bundle-play-file.mjs +2 -2
  110. package/dist/plays/run-request.d.mts +2 -2
  111. package/dist/plays/run-request.d.ts +2 -2
  112. package/dist/release.d.mts +1 -1
  113. package/dist/release.d.ts +1 -1
  114. package/dist/release.js +2 -2
  115. package/dist/release.mjs +1 -1
  116. package/package.json +2 -1
  117. package/dist/cli/auth-EKRB4GMP.js +0 -31
  118. package/dist/cli/client-55BDB4LE.js +0 -20
  119. package/dist/cli/git-VWXH6LCP.js +0 -23
  120. package/dist/cli/play-UKH4VFPF.js +0 -153
  121. package/dist/cli/search-JD2VTR4A.js +0 -26
  122. package/dist/cli/skills-TLPNCERR.js +0 -28
  123. package/dist/cli/tools-26JTFFU4.js +0 -39
  124. package/dist/cli/update-35RRCU2G.js +0 -28
@@ -10,11 +10,11 @@ import {
10
10
  } from "./chunk-EDWJY6T4.mjs";
11
11
  import {
12
12
  registerDeprecatedSearchCommand
13
- } from "./chunk-7MABE3ZK.mjs";
13
+ } from "./chunk-VFC6CZLF.mjs";
14
14
  import {
15
15
  handleDeploymentGet,
16
16
  handleDeploymentsList
17
- } from "./chunk-UM4ZE3P7.mjs";
17
+ } from "./chunk-5W636CDP.mjs";
18
18
  import {
19
19
  PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY,
20
20
  PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER,
@@ -39,7 +39,7 @@ import {
39
39
  normalizeRunEventOperationRequest,
40
40
  parseLogLevel,
41
41
  playInputExampleArgs
42
- } from "./chunk-7R6KQSFA.mjs";
42
+ } from "./chunk-GTBS6LQH.mjs";
43
43
  import {
44
44
  CSV_DATA_INPUT_KEY,
45
45
  buildNamedPlayRunRequest,
@@ -70,11 +70,12 @@ import {
70
70
  printCompactJson,
71
71
  printJson,
72
72
  printJsonError,
73
- renderCommandEnvelopeText
74
- } from "./chunk-B2R66UTW.mjs";
73
+ renderCommandEnvelopeText,
74
+ shouldEmitJson
75
+ } from "./chunk-7DGZCMXQ.mjs";
75
76
  import {
76
77
  fetchWithDeploymentProtection
77
- } from "./chunk-WWVE4HFN.mjs";
78
+ } from "./chunk-MBI3BVSQ.mjs";
78
79
  import {
79
80
  PLAY_DEFAULT_EXPORT,
80
81
  extractDefinedPlayName,
@@ -82,7 +83,7 @@ import {
82
83
  listPlayFileExports,
83
84
  parsePlaySourceForAnalysis,
84
85
  resolveEnabledExecutionProfile
85
- } from "./chunk-YIY74KUF.mjs";
86
+ } from "./chunk-EV4QJE4J.mjs";
86
87
  import {
87
88
  DeeplineError
88
89
  } from "./chunk-NXGCO4JB.mjs";
@@ -5180,10 +5181,13 @@ function generateProviderSourceBlock(input) {
5180
5181
  input: ${inputName},
5181
5182
  description: ${jsString(`Seed ${input.entity} rows from ${input.provider}.`)},
5182
5183
  });
5183
- // extractedLists.${getter}.get() returns a dataset handle of provider-shaped rows. Do not assume canonical fields;
5184
+ // extractedLists.${getter}.get() returns provider-shaped rows. Do not assume canonical fields;
5184
5185
  // inspect source_${input.index}.extractedLists.${getter}.keys or the provider output schema, then map explicitly below.
5185
- const sourceRowsDataset_${input.index} = ${accessorExpression(`source_${input.index}.extractedLists`, getter)}.get();
5186
- const sourceRows_${input.index} = (await sourceRowsDataset_${input.index}.peek(limit)) as ${input.collectionType}[];`;
5186
+ const sourceList_${input.index} = ${accessorExpression(`source_${input.index}.extractedLists`, getter)}.get();
5187
+ // Legacy admitted Plays use a dataset getter; the new contract returns an ordinary array.
5188
+ const sourceRows_${input.index} = (Array.isArray(sourceList_${input.index})
5189
+ ? sourceList_${input.index}.slice(0, limit)
5190
+ : await sourceList_${input.index}.peek(limit)) as ${input.collectionType}[];`;
5187
5191
  }
5188
5192
  function generateProviderSourceRowsBlock(input) {
5189
5193
  const blocks = input.source.values.map(
@@ -5857,6 +5861,55 @@ function registerRunHistoryCommand(runs) {
5857
5861
  ).action(handleRunsHistory);
5858
5862
  }
5859
5863
 
5864
+ // src/cli/operations/runs-rerun.ts
5865
+ async function runRunsRerunCommand(runId, options) {
5866
+ const idempotencyKey = options.idempotencyKey?.trim();
5867
+ if (options.idempotencyKey !== void 0 && (!idempotencyKey || options.idempotencyKey.startsWith("--"))) {
5868
+ console.error("--idempotency-key requires a non-empty value.");
5869
+ return 1;
5870
+ }
5871
+ let inputOverrides;
5872
+ if (options.inputOverrides !== void 0) {
5873
+ if (!options.inputOverrides || options.inputOverrides.startsWith("--")) {
5874
+ console.error("--input-overrides requires a JSON object.");
5875
+ return 1;
5876
+ }
5877
+ try {
5878
+ const parsed = JSON.parse(options.inputOverrides);
5879
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || Object.values(parsed).some(
5880
+ (entry) => entry !== null && !["string", "number", "boolean"].includes(typeof entry) || typeof entry === "number" && !Number.isFinite(entry)
5881
+ )) {
5882
+ throw new Error("expected scalar values");
5883
+ }
5884
+ inputOverrides = parsed;
5885
+ } catch {
5886
+ console.error(
5887
+ "--input-overrides must be a JSON object of scalar values."
5888
+ );
5889
+ return 1;
5890
+ }
5891
+ }
5892
+ const result = await new DeeplineClient().runs.rerun(runId, {
5893
+ ...idempotencyKey === void 0 ? {} : { idempotencyKey },
5894
+ ...inputOverrides === void 0 ? {} : { inputOverrides }
5895
+ });
5896
+ if (shouldEmitJson(options.json)) {
5897
+ printCommandEnvelope(result, { json: true });
5898
+ } else {
5899
+ console.log(
5900
+ result.deduplicated === true ? `
5901
+ Rerun already exists for ${runId} (matched by idempotency key): ${result.runId}` : `
5902
+ Rerun started from ${runId}${inputOverrides ? " with input overrides" : ""}.`
5903
+ );
5904
+ console.log(` inspect: deepline runs get ${result.runId} --json`);
5905
+ console.log(` original input: deepline runs get ${result.runId} --input`);
5906
+ console.log(
5907
+ result.deduplicated === true ? " No new run was started. Use a different --idempotency-key to start another rerun." : ` This is a fresh run using the original input${inputOverrides ? " with the supplied field overrides" : ""} and pinned revision. Normal tool receipt reuse still applies.`
5908
+ );
5909
+ }
5910
+ return 0;
5911
+ }
5912
+
5860
5913
  // ../play-data-plane/column-names.ts
5861
5914
  var POSTGRES_IDENTIFIER_MAX_BYTES = 63;
5862
5915
  var HASH_SUFFIX_LENGTH = 10;
@@ -15541,59 +15594,15 @@ async function handleRunsRerun(args) {
15541
15594
  console.error(error instanceof Error ? error.message : usage2);
15542
15595
  return 1;
15543
15596
  }
15544
- let idempotencyKey;
15545
- let inputOverrides;
15597
+ const options = { json: argsWantJson(args) };
15546
15598
  for (let index = 0; index < args.length; index += 1) {
15547
15599
  if (args[index] === "--idempotency-key") {
15548
- const value = args[index + 1];
15549
- if (!value || value.startsWith("--") || !value.trim()) {
15550
- console.error("--idempotency-key requires a non-empty value.");
15551
- return 1;
15552
- }
15553
- idempotencyKey = value.trim();
15554
- index += 1;
15600
+ options.idempotencyKey = args[++index] ?? "";
15555
15601
  } else if (args[index] === "--input-overrides") {
15556
- const value = args[index + 1];
15557
- if (!value || value.startsWith("--")) {
15558
- console.error("--input-overrides requires a JSON object.");
15559
- return 1;
15560
- }
15561
- try {
15562
- const parsed = JSON.parse(value);
15563
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || Object.values(parsed).some(
15564
- (entry) => entry !== null && !["string", "number", "boolean"].includes(typeof entry) || typeof entry === "number" && !Number.isFinite(entry)
15565
- )) {
15566
- throw new Error("expected scalar values");
15567
- }
15568
- inputOverrides = parsed;
15569
- } catch {
15570
- console.error(
15571
- "--input-overrides must be a JSON object of scalar values."
15572
- );
15573
- return 1;
15574
- }
15575
- index += 1;
15602
+ options.inputOverrides = args[++index] ?? "";
15576
15603
  }
15577
15604
  }
15578
- const result = await new DeeplineClient().runs.rerun(runId, {
15579
- ...idempotencyKey ? { idempotencyKey } : {},
15580
- ...inputOverrides ? { inputOverrides } : {}
15581
- });
15582
- if (argsWantJson(args)) {
15583
- printCommandEnvelope(result, { json: true });
15584
- } else {
15585
- console.log(
15586
- result.deduplicated === true ? `
15587
- Rerun already exists for ${runId} (matched by idempotency key): ${result.runId}` : `
15588
- Rerun started from ${runId}${inputOverrides ? " with input overrides" : ""}.`
15589
- );
15590
- console.log(` inspect: deepline runs get ${result.runId} --json`);
15591
- console.log(` original input: deepline runs get ${result.runId} --input`);
15592
- console.log(
15593
- result.deduplicated === true ? " No new run was started. Use a different --idempotency-key to start another rerun." : ` This is a fresh run using the original input${inputOverrides ? " with the supplied field overrides" : ""} and pinned revision. Normal tool receipt reuse still applies.`
15594
- );
15595
- }
15596
- return 0;
15605
+ return runRunsRerunCommand(runId, options);
15597
15606
  }
15598
15607
  async function handleRunsList(args) {
15599
15608
  const usage2 = "Usage: deepline runs list [--play <play-name>] [--node <mermaid-node-id>] [--status <status>] [--limit <count>] [--offset <count>] [--json]";
@@ -15675,13 +15684,14 @@ Active runs: ${next.running}`
15675
15684
  ...offset !== void 0 ? { offset } : {}
15676
15685
  });
15677
15686
  const runs = page.runs.map((run) => ({
15687
+ id: run.workflowId,
15678
15688
  runId: run.workflowId,
15679
15689
  // `workflowId` is the legacy SDK name for the same public Deepline run
15680
15690
  // identity. Keep it during the compatibility window, but never label the
15681
15691
  // duplicate as a Temporal/runtime id.
15682
15692
  workflowId: run.workflowId,
15683
15693
  // Retain the runtime identifier for existing JSON consumers. It is not a
15684
- // stable Deepline run id; `runId` above is the canonical public id.
15694
+ // stable Deepline run id; `id` above is the canonical public id.
15685
15695
  temporalRunId: run.runId ?? null,
15686
15696
  parentRunId: run.parentRunId ?? null,
15687
15697
  rootRunId: run.rootRunId ?? null,
@@ -15702,12 +15712,12 @@ Active runs: ${next.running}`
15702
15712
  playName ? `No runs found for ${playName}.` : `No runs found for status ${statusFilter}.`
15703
15713
  ] : runs.map((run) => {
15704
15714
  const lines2 = [
15705
- `${run.runId} ${run.status}`,
15715
+ `${run.id} ${run.status}`,
15706
15716
  ` created: ${formatTimestamp(run.createdAt)}`,
15707
15717
  ` started: ${formatTimestamp(run.startedAt)}`,
15708
15718
  ` finished: ${formatTimestamp(run.finishedAt)}`,
15709
15719
  ` credits: ${typeof run.billingTotalCredits === "number" && Number.isFinite(run.billingTotalCredits) ? formatCreditAmount2(run.billingTotalCredits) : "\u2014"}`,
15710
- ` inspect: deepline runs get ${run.runId} --json`
15720
+ ` inspect: deepline runs get ${run.id} --json`
15711
15721
  ];
15712
15722
  if (run.parentRunId) lines2.push(` parent: ${run.parentRunId}`);
15713
15723
  if (run.rootRunId) lines2.push(` root: ${run.rootRunId}`);
@@ -15744,7 +15754,7 @@ Active runs: ${next.running}`
15744
15754
  ...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
15745
15755
  next: {
15746
15756
  page: nextPage,
15747
- get: runs[0]?.runId ? `deepline runs get ${runs[0].runId} --json` : null
15757
+ get: runs[0]?.id ? `deepline runs get ${runs[0].id} --json` : null
15748
15758
  },
15749
15759
  render: { sections: [{ title: "runs", lines }] }
15750
15760
  },
@@ -18146,7 +18156,7 @@ Examples:
18146
18156
  process.exitCode = await ownView();
18147
18157
  return;
18148
18158
  }
18149
- const { describeAnything } = await import("./describe-W6X5G4JR.mjs");
18159
+ const { describeAnything } = await import("./describe-WECII7FS.mjs");
18150
18160
  process.exitCode = await describeAnything(
18151
18161
  name,
18152
18162
  {
@@ -18478,12 +18488,7 @@ Examples:
18478
18488
  "--input-overrides <json>",
18479
18489
  "Override existing scalar fields in the retained input for this rerun"
18480
18490
  ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (runId, options) => {
18481
- process.exitCode = await handleRunsRerun([
18482
- runId,
18483
- ...options.idempotencyKey ? ["--idempotency-key", options.idempotencyKey] : [],
18484
- ...options.inputOverrides ? ["--input-overrides", options.inputOverrides] : [],
18485
- ...options.json ? ["--json"] : []
18486
- ]);
18491
+ process.exitCode = await runRunsRerunCommand(runId, options);
18487
18492
  });
18488
18493
  runs.command("list").description("List play runs.").addHelpText(
18489
18494
  "after",
@@ -18494,6 +18499,9 @@ Notes:
18494
18499
  Use the exact qualified Play reference, such as workspace/my-play or prebuilt/my-play.
18495
18500
  --offset requires --play; narrow status-only lists with a Play reference to paginate.
18496
18501
  Common statuses include running, completed, failed, and stopped.
18502
+ JSON runs[].id is the public ID accepted by runs get, watch, export, and stop.
18503
+ runId and workflowId are compatibility aliases; temporalRunId is not the public ID.
18504
+ Use the ID returned by plays run for your execution, not the latest inventory entry.
18497
18505
 
18498
18506
  Examples:
18499
18507
  deepline runs list --play my-play
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
49
49
  // getters keep their established compatibility behavior.
50
50
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
51
51
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
52
- version: "0.3.328",
52
+ version: "0.3.330",
53
53
  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.",
54
54
  packageCapabilities: {
55
55
  updatePreferences: 1
@@ -3,7 +3,7 @@
3
3
  var _chunk3KC45UVFjs = require('./chunk-3KC45UVF.js');
4
4
 
5
5
 
6
- var _chunk2HKPAZVJjs = require('./chunk-2HKPAZVJ.js');
6
+ var _chunkFKKNYKDYjs = require('./chunk-FKKNYKDY.js');
7
7
 
8
8
 
9
9
 
@@ -54,7 +54,7 @@ function buildPlayContractCompatibility(input) {
54
54
  artifactVersion: PLAY_ARTIFACT_VERSION,
55
55
  runtimeBackend: _nullishCoalesce(_optionalChain([input, 'optionalAccess', _ => _.runtimeBackend]), () => ( null)),
56
56
  toolErrorSchemaVersion: _nullishCoalesce(_optionalChain([input, 'optionalAccess', _2 => _2.toolErrorSchemaVersion]), () => ( _chunk7P5AA3SNjs.TOOL_EXECUTION_ERROR_SCHEMA_VERSION)),
57
- authoringContractEdition: _nullishCoalesce(_optionalChain([input, 'optionalAccess', _3 => _3.authoringContractEdition]), () => ( _chunk2HKPAZVJjs.PLAY_AUTHORING_CONTRACT_EDITION)),
57
+ authoringContractEdition: _nullishCoalesce(_optionalChain([input, 'optionalAccess', _3 => _3.authoringContractEdition]), () => ( _chunkFKKNYKDYjs.PLAY_AUTHORING_CONTRACT_EDITION)),
58
58
  toolResponseContract: _nullishCoalesce(_optionalChain([input, 'optionalAccess', _4 => _4.toolResponseContract]), () => ( _chunkS6R3OX7Bjs.RAW_V2_TOOL_RESPONSE_CONTRACT)),
59
59
  toolResponseReceiptRevision: _chunkS6R3OX7Bjs.normalizeToolResponseReceiptRevision.call(void 0,
60
60
  _nullishCoalesce(_optionalChain([input, 'optionalAccess', _5 => _5.toolResponseReceiptRevision]), () => ( _chunkS6R3OX7Bjs.RAW_V2_TOOL_RESPONSE_RECEIPT_REVISION))
@@ -2729,7 +2729,7 @@ async function bundlePlayFile(filePath, options) {
2729
2729
  analysis.graphHash = sha256(
2730
2730
  `${analysis.graphHash}
2731
2731
  entry-export:${exportName}
2732
- authoring-contract-edition:${_chunk2HKPAZVJjs.PLAY_AUTHORING_CONTRACT_EDITION}`
2732
+ authoring-contract-edition:${_chunkFKKNYKDYjs.PLAY_AUTHORING_CONTRACT_EDITION}`
2733
2733
  );
2734
2734
  const sourceFiles = Object.fromEntries(
2735
2735
  Object.entries(analysis.sourceFiles).map(([sourcePath, sourceCode]) => [
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-7R6KQSFA.mjs";
3
+ } from "./chunk-GTBS6LQH.mjs";
4
4
  import {
5
- printCommandEnvelope
6
- } from "./chunk-B2R66UTW.mjs";
5
+ printCommandEnvelope,
6
+ renderCommandEnvelopeText
7
+ } from "./chunk-7DGZCMXQ.mjs";
7
8
  import {
8
9
  resolveConfig,
9
10
  sdkCliStateDirPath
10
- } from "./chunk-WWVE4HFN.mjs";
11
+ } from "./chunk-MBI3BVSQ.mjs";
11
12
 
12
13
  // src/cli/search-ref.ts
13
14
  import { mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -36,6 +37,132 @@ function recentSearchRef() {
36
37
  }
37
38
  }
38
39
 
40
+ // src/cli/text-table.ts
41
+ import { getBorderCharacters, table } from "table";
42
+ function formatTextTable(rows, columns) {
43
+ if (columns.length === 0) return "";
44
+ const data = [
45
+ columns.map((column) => column.header),
46
+ ...rows.map((row) => columns.map((column) => column.value(row)))
47
+ ];
48
+ return table(data, {
49
+ border: getBorderCharacters("void"),
50
+ drawHorizontalLine: () => false,
51
+ columnDefault: { paddingLeft: 0, paddingRight: 2 },
52
+ columns: columns.map((column, index) => ({
53
+ alignment: column.alignment ?? "left",
54
+ // table@6's word wrapper counts UTF-16 characters instead of display
55
+ // cells. Use its display-width-safe character wrapper for Unicode;
56
+ // unbounded identifiers never need wrapping in the first place.
57
+ wrapWord: column.width !== void 0 && data.every((row) => new RegExp("^\\p{ASCII}*$", "u").test(row[index])),
58
+ ...column.width === void 0 ? {} : { width: column.width }
59
+ }))
60
+ }).split("\n").map((line) => line.trimEnd()).join("\n").trimEnd();
61
+ }
62
+
63
+ // src/cli/search-output.ts
64
+ function clipSummary(value) {
65
+ const characters = Array.from(value.replace(/\s+/gu, " ").trim());
66
+ return characters.length <= 78 ? characters.join("") : `${characters.slice(0, 77).join("")}\u2026`;
67
+ }
68
+ function pricingDisplay(item) {
69
+ const pricing = item.pricing;
70
+ if (!pricing)
71
+ return { cost: item.kind === "tool" ? "unknown" : "\u2014", notes: [] };
72
+ const range = pricing.estimatedRange;
73
+ if (range && item.billingSource !== "own_provider_credentials") {
74
+ return {
75
+ cost: `${range.minCreditsPerUnit}\u2013${range.maxCreditsPerUnit}/${pricing.unit} (estimate)`,
76
+ notes: [range.scope]
77
+ };
78
+ }
79
+ const observed = pricing.observedReference;
80
+ if (observed) {
81
+ return {
82
+ cost: `${observed.creditsPerCall}/call (observed)`,
83
+ notes: [
84
+ `Observed reference: ${observed.sampleSize} call(s), ${observed.observedAt}; ${observed.inputMode} Not a quote.`
85
+ ]
86
+ };
87
+ }
88
+ if (item.billingSource === "own_provider_credentials") {
89
+ return {
90
+ cost: "0 (own credentials)",
91
+ notes: ["Your provider quota still applies."]
92
+ };
93
+ }
94
+ const display = pricing.displayText ?? "";
95
+ const rate = display.match(
96
+ /^([\d.,]+) Deepline credits(?: \/ \$[\d.,]+)? per (call|result|page)( \(estimate\))?$/
97
+ );
98
+ if (rate)
99
+ return {
100
+ cost: `${rate[1]}/${rate[2]}${rate[3] ?? ""}${pricing.summary || pricing.details?.length ? "*" : ""}`,
101
+ notes: []
102
+ };
103
+ if (pricing.creditsPerUnit === 0 && /^Free\b/.test(display)) {
104
+ return { cost: "0 (free)", notes: [] };
105
+ }
106
+ if (!display || display === "Pricing unavailable.")
107
+ return { cost: "unknown", notes: [] };
108
+ return {
109
+ cost: pricing.unit === "usage" ? "usage-based" : "variable",
110
+ notes: display ? [clipSummary(display)] : []
111
+ };
112
+ }
113
+ function searchRow(item) {
114
+ const { cost, notes } = pricingDisplay(item);
115
+ if (item.credentialStatus === "requires_connection") {
116
+ notes.push("Requires your credentials \u2014 not connected (connect to use).");
117
+ } else if (item.connected === false && item.credentialStatus === "managed") {
118
+ notes.push("Temporarily unavailable.");
119
+ }
120
+ return {
121
+ id: item.id,
122
+ kind: item.kind,
123
+ cost,
124
+ summary: clipSummary(item.description ?? ""),
125
+ notes
126
+ };
127
+ }
128
+ function renderSearchResults(result) {
129
+ if (result.results.length === 0)
130
+ return renderCommandEnvelopeText(result);
131
+ const rows = result.results.map(searchRow);
132
+ const kinds = new Set(rows.map((row) => row.kind));
133
+ const onlyTools = kinds.size === 1 && kinds.has("tool");
134
+ const columns = [
135
+ { header: onlyTools ? "TOOL" : "ID", value: (row) => row.id },
136
+ ...!onlyTools ? [{ header: "KIND", value: (row) => row.kind }] : [],
137
+ { header: "CREDITS", value: (row) => row.cost, alignment: "right" },
138
+ { header: "SUMMARY", value: (row) => row.summary }
139
+ ];
140
+ const render = result.render;
141
+ const title = render?.sections?.[0]?.title ?? `${result.total ?? rows.length} matches \u2014 showing ${rows.length}`;
142
+ const remaining = {
143
+ sections: render?.sections?.slice(1),
144
+ actions: render?.actions
145
+ };
146
+ const followUps = remaining.sections?.length || remaining.actions?.length ? `
147
+ ${renderCommandEnvelopeText({ render: remaining })}` : "";
148
+ const notes = rows.flatMap(
149
+ (row) => row.notes.map((note) => ` ${row.id}: ${note}`)
150
+ );
151
+ const details = [
152
+ ...notes.length ? ["Notes", ...notes, ""] : [],
153
+ ...rows.some((row) => row.cost.endsWith("*")) ? [
154
+ "* Additional pricing conditions apply; see full pricing before execution."
155
+ ] : [],
156
+ "Full descriptions and pricing: deepline tools describe <toolId> or search --json."
157
+ ].join("\n");
158
+ return `${title}
159
+
160
+ ${formatTextTable(rows, columns)}
161
+
162
+ ${details}
163
+ ${followUps}`;
164
+ }
165
+
39
166
  // src/cli/commands/search.ts
40
167
  var SEARCH_TYPES = [
41
168
  "tools",
@@ -112,7 +239,8 @@ async function runSearch(queryInput, options, types, exclude = []) {
112
239
  if (searchRef) rememberSearchRef(searchRef);
113
240
  pointAtDescribe(result);
114
241
  printCommandEnvelope(result, {
115
- json: options.json === true
242
+ json: options.json === true,
243
+ text: renderSearchResults(result)
116
244
  });
117
245
  return 0;
118
246
  }
@@ -166,6 +294,8 @@ Notes:
166
294
  materially improves ranking, especially for short queries.
167
295
  Search prints a readable result list by default, piped or not, and that is
168
296
  the recommended form. Pass --json only when a program parses the result.
297
+ Readable prices are Deepline credits with a per-row unit. Estimates and
298
+ observed historical charges are labelled; usage-based prices are not quotes.
169
299
 
170
300
  Examples:
171
301
  deepline search "find work email"
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkO5GPNPOCjs = require('./chunk-O5GPNPOC.js');
6
+ var _chunkGHHLLEZKjs = require('./chunk-GHHLLEZK.js');
7
7
 
8
8
 
9
9
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
@@ -136,8 +136,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
136
136
  var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
137
137
  var defaultBrowserCommandRunner = childProcess;
138
138
  function getAuthedHttpClient() {
139
- const config = _chunkO5GPNPOCjs.resolveConfig.call(void 0, );
140
- return { config, http: new (0, _chunkO5GPNPOCjs.HttpClient)(config) };
139
+ const config = _chunkGHHLLEZKjs.resolveConfig.call(void 0, );
140
+ return { config, http: new (0, _chunkGHHLLEZKjs.HttpClient)(config) };
141
141
  }
142
142
  function stableOsUserId() {
143
143
  try {
@@ -477,7 +477,7 @@ function collectLocalEnvInfo() {
477
477
  os: `${process.platform} ${process.arch}`,
478
478
  node_version: process.version,
479
479
  home_dir: homeDir,
480
- agent_runtime: _chunkO5GPNPOCjs.detectAgentRuntime.call(void 0, )
480
+ agent_runtime: _chunkGHHLLEZKjs.detectAgentRuntime.call(void 0, )
481
481
  };
482
482
  const env = process.env;
483
483
  const optional = {
@@ -725,9 +725,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
725
725
  }
726
726
  function withAgentCommandContext(value) {
727
727
  const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
728
- return _chunkO5GPNPOCjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
728
+ return _chunkGHHLLEZKjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
729
729
  ...valueRecord,
730
- command_context: _chunkO5GPNPOCjs.resolveCliCommandContext.call(void 0, )
730
+ command_context: _chunkGHHLLEZKjs.resolveCliCommandContext.call(void 0, )
731
731
  } : value;
732
732
  }
733
733
  function printJson(value, fields) {
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
49
49
  // getters keep their established compatibility behavior.
50
50
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
51
51
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
52
- version: "0.3.328",
52
+ version: "0.3.330",
53
53
  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.",
54
54
  packageCapabilities: {
55
55
  updatePreferences: 1
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkDNMV2L7Qjs = require('./chunk-DNMV2L7Q.js');
4
+ var _chunkWHKTRZ3Jjs = require('./chunk-WHKTRZ3J.js');
5
5
 
6
6
  // src/cli/commands/sessions.ts
7
7
 
@@ -420,7 +420,7 @@ function buildSessionUploadContent(raw) {
420
420
  return { encodedContent: encoded, needsChunking: true };
421
421
  }
422
422
  async function uploadPayload(path, payload) {
423
- const { http } = _chunkDNMV2L7Qjs.getAuthedHttpClient.call(void 0, );
423
+ const { http } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
424
424
  return await http.post(path, payload);
425
425
  }
426
426
  async function uploadChunkedSessions(sessions, options) {
@@ -452,7 +452,7 @@ async function uploadChunkedSessions(sessions, options) {
452
452
  environments: sessions.map(() => detectShellContext()),
453
453
  ...options.rating ? { rating: options.rating } : {}
454
454
  });
455
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
455
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
456
456
  {
457
457
  ...response,
458
458
  ok: true,
@@ -481,7 +481,7 @@ async function handleSessionsSend(options) {
481
481
  filename: _path.basename.call(void 0, filePath),
482
482
  ...rating ? { rating } : {}
483
483
  });
484
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
484
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
485
485
  {
486
486
  ...response2,
487
487
  ok: true,
@@ -530,7 +530,7 @@ async function handleSessionsSend(options) {
530
530
  environment: detectShellContext(),
531
531
  ...rating ? { rating } : {}
532
532
  });
533
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
533
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
534
534
  {
535
535
  ...response,
536
536
  ok: true,
@@ -635,7 +635,7 @@ ${refreshMeta}
635
635
  </body>
636
636
  </html>`;
637
637
  _fs.writeFileSync.call(void 0, outputPath, html, "utf8");
638
- _chunkDNMV2L7Qjs.printCommandEnvelope.call(void 0,
638
+ _chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
639
639
  {
640
640
  ok: true,
641
641
  file: outputPath,