deepline 0.3.393 → 0.3.394

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 (122) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +477 -10
  3. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +5 -1
  4. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-policy.ts +28 -0
  5. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +251 -0
  6. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +12 -1
  7. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +10 -0
  8. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +25 -16
  9. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +1 -0
  10. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +69 -22
  11. package/dist/bundling-sources/shared_libs/plays/core.ts +1 -1
  12. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +18 -0
  13. package/dist/cli/auth-IHKISLJQ.js +39 -0
  14. package/dist/cli/{auth-5PXHA232.mjs → auth-OSXDAVCF.mjs} +4 -4
  15. package/dist/cli/{billing-JFB2XLSO.js → billing-EKLYOXUY.js} +75 -75
  16. package/dist/cli/{billing-Z2N7ZAGM.mjs → billing-ZNNKX3UR.mjs} +4 -4
  17. package/dist/cli/{chunk-OXNOAD6Y.js → chunk-2MDDA7A4.js} +26 -26
  18. package/dist/cli/{chunk-PTDECJGP.js → chunk-354JCXA2.js} +50 -50
  19. package/dist/cli/{chunk-RKMB3N7K.mjs → chunk-3HU47EGZ.mjs} +48 -9
  20. package/dist/cli/{chunk-6I73X254.mjs → chunk-3HWALOL2.mjs} +1 -1
  21. package/dist/cli/{chunk-VIQJIX2P.js → chunk-4P27AXEA.js} +65 -65
  22. package/dist/cli/{chunk-UOGZUA24.mjs → chunk-5BB2RGAX.mjs} +18 -8
  23. package/dist/cli/{chunk-RWHWF5ZJ.js → chunk-6YAUMG27.js} +1 -1
  24. package/dist/cli/{chunk-HLEESTCH.mjs → chunk-BP33SIZF.mjs} +1 -1
  25. package/dist/cli/{chunk-CDFH2DYL.js → chunk-CS6RAIVY.js} +4 -4
  26. package/dist/cli/{chunk-2HAD745V.js → chunk-E23BQ5SC.js} +9 -9
  27. package/dist/cli/{chunk-LMMEAMA7.mjs → chunk-FJGW5GXU.mjs} +1 -1
  28. package/dist/cli/{chunk-Q26LUSQ2.mjs → chunk-JHIJIHFB.mjs} +1 -1
  29. package/dist/cli/{chunk-PWSWAN7Q.js → chunk-KB4SDX5S.js} +48 -9
  30. package/dist/cli/{chunk-M7Y7JYZX.js → chunk-KGNTKMRG.js} +6 -6
  31. package/dist/cli/{chunk-4XX6443T.js → chunk-KI635JN4.js} +59 -59
  32. package/dist/cli/{chunk-Z3OOZM5L.js → chunk-KIUMEOM5.js} +8 -8
  33. package/dist/cli/{chunk-KIYU2TGL.mjs → chunk-M57J2SK4.mjs} +2 -2
  34. package/dist/cli/{chunk-FQ6VHPW4.mjs → chunk-MFB2VKBO.mjs} +2 -2
  35. package/dist/cli/{chunk-MS6GUPBB.js → chunk-MH73HMPV.js} +3 -3
  36. package/dist/cli/{chunk-AARX5L4B.js → chunk-MLPU5SMZ.js} +2 -2
  37. package/dist/cli/{chunk-5PRVMXKB.mjs → chunk-NR3DFKNF.mjs} +1 -1
  38. package/dist/cli/{chunk-W4WOMXR3.js → chunk-QIQBYKLB.js} +15 -15
  39. package/dist/cli/{chunk-VIWE6WRK.js → chunk-RBJYWRCF.js} +260 -250
  40. package/dist/cli/{chunk-LZPCDB7U.mjs → chunk-TJI2EN6K.mjs} +1 -1
  41. package/dist/cli/{chunk-4TCT77UF.js → chunk-URWF7NGQ.js} +6 -1
  42. package/dist/cli/{chunk-5KWKZIQR.mjs → chunk-UXFSWG3Q.mjs} +4 -4
  43. package/dist/cli/{chunk-L2SYLGRP.js → chunk-VK6FYZLP.js} +8 -8
  44. package/dist/cli/{chunk-7HR7BGZL.mjs → chunk-X63FDZJZ.mjs} +3 -3
  45. package/dist/cli/{chunk-4PT2VA3A.mjs → chunk-XRQ2AQL7.mjs} +2 -2
  46. package/dist/cli/{chunk-STNYIMIV.mjs → chunk-XXUDVEXK.mjs} +6 -6
  47. package/dist/cli/{chunk-PQSA443V.mjs → chunk-ZI2ZNDJK.mjs} +6 -1
  48. package/dist/cli/{chunk-2LGC4EFT.mjs → chunk-ZYBGA4AR.mjs} +3 -3
  49. package/dist/cli/command-docs.js +2 -2
  50. package/dist/cli/command-docs.mjs +1 -1
  51. package/dist/cli/{csv-KJWZHKCH.mjs → csv-5AXRB35H.mjs} +3 -3
  52. package/dist/cli/{csv-P3Z3YE7H.js → csv-LU7O75WE.js} +12 -12
  53. package/dist/cli/{db-NCM4CQIS.mjs → db-7XP5UWEW.mjs} +4 -4
  54. package/dist/cli/{db-NUZGJNQC.js → db-F7YTFKVM.js} +29 -29
  55. package/dist/cli/{describe-YGSEN5WC.js → describe-FRH32RDV.js} +20 -20
  56. package/dist/cli/{describe-WT6MM2GO.mjs → describe-K4ES5LIL.mjs} +10 -10
  57. package/dist/cli/{executions-XS2IPJ4W.mjs → executions-IEHEHJUO.mjs} +4 -4
  58. package/dist/cli/{executions-PCOLHN7Q.js → executions-RZV5XPT2.js} +6 -6
  59. package/dist/cli/{feedback-4MSH7TFU.js → feedback-3P65QTX3.js} +7 -7
  60. package/dist/cli/{feedback-CCLTS5SV.mjs → feedback-FPUVZBAN.mjs} +3 -3
  61. package/dist/cli/{git-K2DHPMPC.mjs → git-GLVVP7TY.mjs} +4 -4
  62. package/dist/cli/git-MFFAWVVX.js +23 -0
  63. package/dist/cli/index.js +95 -95
  64. package/dist/cli/index.mjs +33 -33
  65. package/dist/cli/{legacy-noops-B5S4AR3P.mjs → legacy-noops-3MOI6NBM.mjs} +4 -4
  66. package/dist/cli/{legacy-noops-GPNOPFXV.js → legacy-noops-XKSGZR7Q.js} +7 -7
  67. package/dist/cli/{monitors-JLMAIPRG.mjs → monitors-FTBGNEFG.mjs} +4 -4
  68. package/dist/cli/{monitors-ZAWD7NSN.js → monitors-NZ2DYNST.js} +85 -85
  69. package/dist/cli/{org-P2KN4CES.js → org-MCKDQXIV.js} +64 -64
  70. package/dist/cli/{org-T3JTHP4G.mjs → org-V2J5RBCN.mjs} +4 -4
  71. package/dist/cli/{play-NK6BLRGL.mjs → play-AJFGME3B.mjs} +9 -9
  72. package/dist/cli/play-WLSN2EO2.js +158 -0
  73. package/dist/cli/{providers-5QRZN3DT.js → providers-2JEZ2264.js} +7 -7
  74. package/dist/cli/{providers-3NQRA7IT.mjs → providers-I6RQJZFZ.mjs} +4 -4
  75. package/dist/cli/{quickstart-PIA2JGPV.mjs → quickstart-BIDQDMO4.mjs} +3 -3
  76. package/dist/cli/{quickstart-R7NUZGNW.js → quickstart-GJ2RPDU3.js} +5 -5
  77. package/dist/cli/search-5VN4YD4I.js +27 -0
  78. package/dist/cli/{search-AIDIIGLY.mjs → search-ELRXFWG5.mjs} +5 -5
  79. package/dist/cli/{secrets-BT3PGMWN.js → secrets-53IT6VXD.js} +13 -13
  80. package/dist/cli/{secrets-OQNHL45O.mjs → secrets-SQXGZXIC.mjs} +4 -4
  81. package/dist/cli/{sessions-SF7WJPJP.mjs → sessions-2X5QF7SL.mjs} +4 -4
  82. package/dist/cli/{sessions-EYXWOSWK.js → sessions-CAV5M77Y.js} +5 -5
  83. package/dist/cli/{settings-BA3GHBOD.js → settings-532WNAZO.js} +74 -74
  84. package/dist/cli/{settings-Y57JTFDD.mjs → settings-7P67VGCJ.mjs} +7 -7
  85. package/dist/cli/{setup-RERXYC66.js → setup-6L2VSUWJ.js} +41 -41
  86. package/dist/cli/{setup-7GR5GBHA.mjs → setup-QGGBV2LE.mjs} +6 -6
  87. package/dist/cli/{skills-SJWIQAV5.mjs → skills-3FE62WBG.mjs} +4 -4
  88. package/dist/cli/skills-S6NPZAN7.js +28 -0
  89. package/dist/cli/tools-647RLXQS.js +41 -0
  90. package/dist/cli/{tools-ZF3JXPNL.mjs → tools-DMR25DEF.mjs} +7 -7
  91. package/dist/cli/{update-FFFYQAOJ.mjs → update-6RZMHJZP.mjs} +6 -6
  92. package/dist/cli/update-WVTSC3EM.js +28 -0
  93. package/dist/cli/{workflow-XVFEEGAS.mjs → workflow-L2DQRE6R.mjs} +5 -5
  94. package/dist/cli/{workflow-SZJVQH4T.js → workflow-TX4F2PIX.js} +15 -15
  95. package/dist/{client-DU5dtHDy.d.mts → client-BktIPdIj.d.mts} +1 -1
  96. package/dist/{client-mCE88hC4.d.ts → client-C3O1Ipf3.d.ts} +1 -1
  97. package/dist/{compiler-manifest-DE4RdAiY.d.ts → compiler-manifest-DLxUY5kI.d.mts} +65 -11
  98. package/dist/{compiler-manifest-DE4RdAiY.d.mts → compiler-manifest-DLxUY5kI.d.ts} +65 -11
  99. package/dist/{index-Bi-f7HFT.d.ts → index-B_GM9E3q.d.ts} +1 -1
  100. package/dist/{index-BI6nWgaV.d.mts → index-SCb0NvDb.d.mts} +1 -1
  101. package/dist/index.d.mts +5 -5
  102. package/dist/index.d.ts +5 -5
  103. package/dist/index.js +7 -7
  104. package/dist/index.mjs +4 -4
  105. package/dist/install-integrity.json +85 -84
  106. package/dist/plays/bundle-play-file.d.mts +3 -3
  107. package/dist/plays/bundle-play-file.d.ts +3 -3
  108. package/dist/plays/bundle-play-file.mjs +2 -2
  109. package/dist/plays/run-request.d.mts +2 -2
  110. package/dist/plays/run-request.d.ts +2 -2
  111. package/dist/release.d.mts +1 -1
  112. package/dist/release.d.ts +1 -1
  113. package/dist/release.js +2 -2
  114. package/dist/release.mjs +1 -1
  115. package/package.json +1 -1
  116. package/dist/cli/auth-P3MVDTXM.js +0 -39
  117. package/dist/cli/git-RNM45FX4.js +0 -23
  118. package/dist/cli/play-PDXR6JFB.js +0 -158
  119. package/dist/cli/search-QRWL7MFM.js +0 -27
  120. package/dist/cli/skills-V7EY75HB.js +0 -28
  121. package/dist/cli/tools-H5HLBCHH.js +0 -41
  122. package/dist/cli/update-472HA3LT.js +0 -28
@@ -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.393",
52
+ version: "0.3.394",
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,
@@ -693,7 +693,12 @@ Authoring rules:
693
693
  Dataset handles are async: await rows.count(), rows.first(),
694
694
  rows.peek(n), rows.materialize(n), or for await. Array methods on a
695
695
  handle fail [[cli:plays check]][[mcp:deepline_check_play]].
696
- Tool calls: rowCtx.tools.execute({ id, tool, input, description }). Read
696
+ Tool calls: rowCtx.tools.execute({ id, tool, input, description,
697
+ staleAfterSeconds }). In authoring edition 11, choose freshness explicitly:
698
+ 0 for fresh logical work, a positive integer for the maximum reusable
699
+ result age in seconds, or null for indefinite result reuse. A matching
700
+ completed operation receipt can still recover that operation after resume.
701
+ Read
697
702
  results through the getters [[cli:describe]][[mcp:deepline_describe_tool]] lists:
698
703
  result.extractedValues.<name>.get() and
699
704
  result.extractedLists.<name>.get(). A field with no getter is under
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  npmSupportsAllowScripts,
3
3
  readNpmVersion
4
- } from "./chunk-HLEESTCH.mjs";
4
+ } from "./chunk-BP33SIZF.mjs";
5
5
  import {
6
6
  resolveShellSpawn,
7
7
  runSkillsCommand
8
- } from "./chunk-7HR7BGZL.mjs";
8
+ } from "./chunk-X63FDZJZ.mjs";
9
9
  import {
10
10
  printCommandEnvelope
11
- } from "./chunk-5PRVMXKB.mjs";
11
+ } from "./chunk-NR3DFKNF.mjs";
12
12
  import {
13
13
  autoDetectBaseUrl
14
- } from "./chunk-LMMEAMA7.mjs";
14
+ } from "./chunk-FJGW5GXU.mjs";
15
15
 
16
16
  // src/cli/commands/update.ts
17
17
  import { spawn, spawnSync } from "child_process";
@@ -1,14 +1,14 @@
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
- var _chunk2HAD745Vjs = require('./chunk-2HAD745V.js');
3
+ var _chunkE23BQ5SCjs = require('./chunk-E23BQ5SC.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkM7Y7JYZXjs = require('./chunk-M7Y7JYZX.js');
7
+ var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
8
8
 
9
9
 
10
10
 
11
- var _chunkCDFH2DYLjs = require('./chunk-CDFH2DYL.js');
11
+ var _chunkCS6RAIVYjs = require('./chunk-CS6RAIVY.js');
12
12
 
13
13
  // src/cli/commands/search.ts
14
14
  var _commander = require('commander');
@@ -18,7 +18,7 @@ var _fs = require('fs');
18
18
  var _path = require('path');
19
19
  var SEARCH_REF_TTL_MS = 15 * 6e4;
20
20
  function lastSearchPath() {
21
- return _path.join.call(void 0, _chunkCDFH2DYLjs.sdkCliStateDirPath.call(void 0, _chunkCDFH2DYLjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
21
+ return _path.join.call(void 0, _chunkCS6RAIVYjs.sdkCliStateDirPath.call(void 0, _chunkCS6RAIVYjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
22
22
  }
23
23
  function rememberSearchRef(searchRef) {
24
24
  try {
@@ -259,7 +259,7 @@ function searchRow(item) {
259
259
  }
260
260
  function renderSearchResults(result) {
261
261
  if (result.results.length === 0)
262
- return _chunkM7Y7JYZXjs.renderCommandEnvelopeText.call(void 0, result);
262
+ return _chunkKGNTKMRGjs.renderCommandEnvelopeText.call(void 0, result);
263
263
  const rows = result.results.map(searchRow);
264
264
  const kinds = new Set(rows.map((row) => row.kind));
265
265
  const onlyTools = kinds.size === 1 && kinds.has("tool");
@@ -283,7 +283,7 @@ function renderSearchResults(result) {
283
283
  actions: _optionalChain([render, 'optionalAccess', _11 => _11.actions])
284
284
  };
285
285
  const followUps = _optionalChain([remaining, 'access', _12 => _12.sections, 'optionalAccess', _13 => _13.length]) || _optionalChain([remaining, 'access', _14 => _14.actions, 'optionalAccess', _15 => _15.length]) ? `
286
- ${_chunkM7Y7JYZXjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
286
+ ${_chunkKGNTKMRGjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
287
287
  const notes = rows.flatMap(
288
288
  (row) => row.notes.map((note) => ` ${row.id}: ${note}`)
289
289
  );
@@ -360,7 +360,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
360
360
  console.error(USAGE);
361
361
  return 1;
362
362
  }
363
- const { search_ref: searchRef, ...result } = await new (0, _chunk2HAD745Vjs.DeeplineClient)().search({
363
+ const { search_ref: searchRef, ...result } = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().search({
364
364
  query,
365
365
  types,
366
366
  exclude,
@@ -374,7 +374,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
374
374
  });
375
375
  if (searchRef) rememberSearchRef(searchRef);
376
376
  pointAtDescribe(result);
377
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, result, {
377
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, result, {
378
378
  json: options.json === true,
379
379
  text: renderSearchResults(result)
380
380
  });
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-GAMFK2ZP.mjs";
4
4
  import {
5
5
  printCommandEnvelope
6
- } from "./chunk-5PRVMXKB.mjs";
6
+ } from "./chunk-NR3DFKNF.mjs";
7
7
  import {
8
8
  DEFAULT_SKILL_AGENTS,
9
9
  KNOWN_SKILL_AGENTS,
@@ -22,13 +22,13 @@ import {
22
22
  sdkCliStateDirPath,
23
23
  skillsAgentPathSegment,
24
24
  writeSdkSkillsLocalVersion
25
- } from "./chunk-LMMEAMA7.mjs";
25
+ } from "./chunk-FJGW5GXU.mjs";
26
26
  import {
27
27
  DeeplineError
28
28
  } from "./chunk-NXGCO4JB.mjs";
29
29
  import {
30
30
  SDK_RELEASE
31
- } from "./chunk-LZPCDB7U.mjs";
31
+ } from "./chunk-TJI2EN6K.mjs";
32
32
 
33
33
  // src/cli/commands/skills.ts
34
34
  import { spawn as spawn2 } from "child_process";
@@ -2,10 +2,10 @@ import {
2
2
  getAuthedHttpClient,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-5PRVMXKB.mjs";
5
+ } from "./chunk-NR3DFKNF.mjs";
6
6
  import {
7
7
  resolveBaseUrlOnly
8
- } from "./chunk-LMMEAMA7.mjs";
8
+ } from "./chunk-FJGW5GXU.mjs";
9
9
 
10
10
  // src/cli/commands/git.ts
11
11
  function shellQuote(value) {
@@ -13,7 +13,7 @@ import {
13
13
  observedMaxText,
14
14
  recentSearchRef,
15
15
  registerDeprecatedSearchCommand
16
- } from "./chunk-2LGC4EFT.mjs";
16
+ } from "./chunk-ZYBGA4AR.mjs";
17
17
  import {
18
18
  DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS,
19
19
  EMAIL_STATUS_JSON_SCHEMA,
@@ -27,11 +27,11 @@ import {
27
27
  } from "./chunk-KZZC33PY.mjs";
28
28
  import {
29
29
  playToolListGetterMode
30
- } from "./chunk-RKMB3N7K.mjs";
30
+ } from "./chunk-3HU47EGZ.mjs";
31
31
  import {
32
32
  DeeplineClient,
33
33
  validateExecutionIdempotencyKey
34
- } from "./chunk-Q26LUSQ2.mjs";
34
+ } from "./chunk-JHIJIHFB.mjs";
35
35
  import {
36
36
  stableStringify
37
37
  } from "./chunk-UBKA33KY.mjs";
@@ -48,11 +48,11 @@ import {
48
48
  printJsonError,
49
49
  renderCommandEnvelopeText,
50
50
  shouldEmitJson
51
- } from "./chunk-5PRVMXKB.mjs";
51
+ } from "./chunk-NR3DFKNF.mjs";
52
52
  import {
53
53
  resolveConfig,
54
54
  sdkCliStateDirPath
55
- } from "./chunk-LMMEAMA7.mjs";
55
+ } from "./chunk-FJGW5GXU.mjs";
56
56
  import {
57
57
  DeeplineError
58
58
  } from "./chunk-NXGCO4JB.mjs";
@@ -1188,7 +1188,7 @@ Examples:
1188
1188
  process.exitCode = await narrowView();
1189
1189
  return;
1190
1190
  }
1191
- const { describeAnything } = await import("./describe-WT6MM2GO.mjs");
1191
+ const { describeAnything } = await import("./describe-K4ES5LIL.mjs");
1192
1192
  process.exitCode = await describeAnything(
1193
1193
  toolId,
1194
1194
  {
@@ -693,7 +693,12 @@ Authoring rules:
693
693
  Dataset handles are async: await rows.count(), rows.first(),
694
694
  rows.peek(n), rows.materialize(n), or for await. Array methods on a
695
695
  handle fail [[cli:plays check]][[mcp:deepline_check_play]].
696
- Tool calls: rowCtx.tools.execute({ id, tool, input, description }). Read
696
+ Tool calls: rowCtx.tools.execute({ id, tool, input, description,
697
+ staleAfterSeconds }). In authoring edition 11, choose freshness explicitly:
698
+ 0 for fresh logical work, a positive integer for the maximum reusable
699
+ result age in seconds, or null for indefinite result reuse. A matching
700
+ completed operation receipt can still recover that operation after resume.
701
+ Read
697
702
  results through the getters [[cli:describe]][[mcp:deepline_describe_tool]] lists:
698
703
  result.extractedValues.<name>.get() and
699
704
  result.extractedLists.<name>.get(). A field with no getter is under
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-Q26LUSQ2.mjs";
3
+ } from "./chunk-JHIJIHFB.mjs";
4
4
  import {
5
5
  printCommandEnvelope,
6
6
  renderCommandEnvelopeText
7
- } from "./chunk-5PRVMXKB.mjs";
7
+ } from "./chunk-NR3DFKNF.mjs";
8
8
  import {
9
9
  resolveConfig,
10
10
  sdkCliStateDirPath
11
- } from "./chunk-LMMEAMA7.mjs";
11
+ } from "./chunk-FJGW5GXU.mjs";
12
12
 
13
13
  // src/cli/commands/search.ts
14
14
  import { Option } from "commander";
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunk4TCT77UFjs = require('./chunk-4TCT77UF.js');
9
+ var _chunkURWF7NGQjs = require('./chunk-URWF7NGQ.js');
10
10
  require('./chunk-COGTRVWW.js');
11
11
 
12
12
 
@@ -16,4 +16,4 @@ require('./chunk-COGTRVWW.js');
16
16
 
17
17
 
18
18
 
19
- exports.CLI_DOC_SURFACE = _chunk4TCT77UFjs.CLI_DOC_SURFACE; exports.COMMAND_DOCS = _chunk4TCT77UFjs.COMMAND_DOCS; exports.commandDocKey = _chunk4TCT77UFjs.commandDocKey; exports.helpDetailFromArgv = _chunk4TCT77UFjs.helpDetailFromArgv; exports.renderActionExplanation = _chunk4TCT77UFjs.renderActionExplanation; exports.renderCommandExplanation = _chunk4TCT77UFjs.renderCommandExplanation; exports.renderDocText = _chunk4TCT77UFjs.renderDocText;
19
+ exports.CLI_DOC_SURFACE = _chunkURWF7NGQjs.CLI_DOC_SURFACE; exports.COMMAND_DOCS = _chunkURWF7NGQjs.COMMAND_DOCS; exports.commandDocKey = _chunkURWF7NGQjs.commandDocKey; exports.helpDetailFromArgv = _chunkURWF7NGQjs.helpDetailFromArgv; exports.renderActionExplanation = _chunkURWF7NGQjs.renderActionExplanation; exports.renderCommandExplanation = _chunkURWF7NGQjs.renderCommandExplanation; exports.renderDocText = _chunkURWF7NGQjs.renderDocText;
@@ -6,7 +6,7 @@ import {
6
6
  renderActionExplanation,
7
7
  renderCommandExplanation,
8
8
  renderDocText
9
- } from "./chunk-PQSA443V.mjs";
9
+ } from "./chunk-ZI2ZNDJK.mjs";
10
10
  import "./chunk-KRD6H754.mjs";
11
11
  export {
12
12
  CLI_DOC_SURFACE,
@@ -4,11 +4,11 @@ import {
4
4
  printCommandEnvelope,
5
5
  printJson,
6
6
  readCsvRows
7
- } from "./chunk-5PRVMXKB.mjs";
8
- import "./chunk-LMMEAMA7.mjs";
7
+ } from "./chunk-NR3DFKNF.mjs";
8
+ import "./chunk-FJGW5GXU.mjs";
9
9
  import "./chunk-DLIRSHV6.mjs";
10
10
  import "./chunk-NXGCO4JB.mjs";
11
- import "./chunk-LZPCDB7U.mjs";
11
+ import "./chunk-TJI2EN6K.mjs";
12
12
  import "./chunk-WZYKRD7T.mjs";
13
13
  import "./chunk-KRD6H754.mjs";
14
14
 
@@ -4,11 +4,11 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkM7Y7JYZXjs = require('./chunk-M7Y7JYZX.js');
8
- require('./chunk-CDFH2DYL.js');
7
+ var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
8
+ require('./chunk-CS6RAIVY.js');
9
9
  require('./chunk-XNYIZMNQ.js');
10
10
  require('./chunk-7P5AA3SN.js');
11
- require('./chunk-RWHWF5ZJ.js');
11
+ require('./chunk-6YAUMG27.js');
12
12
  require('./chunk-OG64RBAC.js');
13
13
  require('./chunk-COGTRVWW.js');
14
14
 
@@ -126,7 +126,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
126
126
  column.length,
127
127
  ...rows.map((row) => {
128
128
  const value = _nullishCoalesce(row[column], () => ( ""));
129
- return (verbose ? value : _chunkM7Y7JYZXjs.clip.call(void 0, value, 42)).length;
129
+ return (verbose ? value : _chunkKGNTKMRGjs.clip.call(void 0, value, 42)).length;
130
130
  })
131
131
  )
132
132
  ])
@@ -136,7 +136,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
136
136
  const body = rows.map(
137
137
  (row) => columns.map((column) => {
138
138
  const raw = _nullishCoalesce(row[column], () => ( ""));
139
- const display = verbose ? raw : _chunkM7Y7JYZXjs.clip.call(void 0, raw, 42);
139
+ const display = verbose ? raw : _chunkKGNTKMRGjs.clip.call(void 0, raw, 42);
140
140
  return display.padEnd(widths[column]);
141
141
  }).join(" | ")
142
142
  );
@@ -156,7 +156,7 @@ async function handleCsvShow(path, options, command) {
156
156
  { exitCode: 2 }
157
157
  );
158
158
  }
159
- const allRows = _chunkM7Y7JYZXjs.readCsvRows.call(void 0, csvPath);
159
+ const allRows = _chunkKGNTKMRGjs.readCsvRows.call(void 0, csvPath);
160
160
  const [rowStart, rowEnd] = parseRowRange(options.rows);
161
161
  const rows = options.summary && options.rows === void 0 ? allRows : selectRows(allRows, rowStart, rowEnd);
162
162
  const { rows: selected, columns } = selectColumns(
@@ -169,7 +169,7 @@ async function handleCsvShow(path, options, command) {
169
169
  if (options.summary) {
170
170
  const summaries = summarizeColumns(selected, columns);
171
171
  if (format === "json") {
172
- _chunkM7Y7JYZXjs.printJson.call(void 0, {
172
+ _chunkKGNTKMRGjs.printJson.call(void 0, {
173
173
  rows: summaries,
174
174
  total_rows: selected.length,
175
175
  source_total_rows: allRows.length
@@ -178,7 +178,7 @@ async function handleCsvShow(path, options, command) {
178
178
  }
179
179
  const displayRows = summaryDisplayRows(summaries);
180
180
  if (format === "csv") {
181
- process.stdout.write(_chunkM7Y7JYZXjs.csvStringFromRows.call(void 0, displayRows));
181
+ process.stdout.write(_chunkKGNTKMRGjs.csvStringFromRows.call(void 0, displayRows));
182
182
  return;
183
183
  }
184
184
  process.stdout.write(
@@ -193,7 +193,7 @@ async function handleCsvShow(path, options, command) {
193
193
  return;
194
194
  }
195
195
  if (format === "json") {
196
- _chunkM7Y7JYZXjs.printJson.call(void 0, {
196
+ _chunkKGNTKMRGjs.printJson.call(void 0, {
197
197
  rows: selected.map((row, index) => ({ __row: rowStart + index, ...row }))
198
198
  });
199
199
  return;
@@ -436,7 +436,7 @@ async function handleCsvRenderStart(options) {
436
436
  if (log) {
437
437
  detail = `
438
438
  CSV render log:
439
- ${_chunkM7Y7JYZXjs.clip.call(void 0, log, 2e3)}`;
439
+ ${_chunkKGNTKMRGjs.clip.call(void 0, log, 2e3)}`;
440
440
  }
441
441
  } catch (e7) {
442
442
  }
@@ -487,7 +487,7 @@ async function handleCsvRenderStatus(options) {
487
487
  if (payload.pid) lines.push(`Render PID: ${payload.pid}`);
488
488
  if (payload.url) lines.push(`Render URL: ${payload.url}`);
489
489
  lines.push(`Render Health: ${payload.health_status}`);
490
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, {
490
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, {
491
491
  json: options.json,
492
492
  text: `${lines.join("\n")}
493
493
  `
@@ -523,7 +523,7 @@ async function handleCsvRenderStop(options) {
523
523
  };
524
524
  const text = stopped.length > 0 ? `Stopped CSV render process(es): ${stopped.join(" ")}
525
525
  ` : "No running CSV render process found.\n";
526
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
526
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
527
527
  }
528
528
  async function handleCsvRender(action, options) {
529
529
  const normalized = _nullishCoalesce(action, () => ( "start"));
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  DeeplineClient,
6
6
  planCustomerDbQuery
7
- } from "./chunk-Q26LUSQ2.mjs";
7
+ } from "./chunk-JHIJIHFB.mjs";
8
8
  import "./chunk-6IKARAYD.mjs";
9
9
  import "./chunk-JI2B4RZP.mjs";
10
10
  import "./chunk-UBKA33KY.mjs";
@@ -17,15 +17,15 @@ import {
17
17
  printCommandEnvelope,
18
18
  recordRows,
19
19
  shouldEmitJson
20
- } from "./chunk-5PRVMXKB.mjs";
20
+ } from "./chunk-NR3DFKNF.mjs";
21
21
  import {
22
22
  CustomerDbQueryOutcomeUnknownError
23
- } from "./chunk-LMMEAMA7.mjs";
23
+ } from "./chunk-FJGW5GXU.mjs";
24
24
  import "./chunk-DLIRSHV6.mjs";
25
25
  import {
26
26
  DeeplineError
27
27
  } from "./chunk-NXGCO4JB.mjs";
28
- import "./chunk-LZPCDB7U.mjs";
28
+ import "./chunk-TJI2EN6K.mjs";
29
29
  import "./chunk-WZYKRD7T.mjs";
30
30
  import "./chunk-KRD6H754.mjs";
31
31
 
@@ -4,7 +4,7 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
4
4
 
5
5
 
6
6
 
7
- var _chunk2HAD745Vjs = require('./chunk-2HAD745V.js');
7
+ var _chunkE23BQ5SCjs = require('./chunk-E23BQ5SC.js');
8
8
  require('./chunk-S6R3OX7B.js');
9
9
  require('./chunk-UHNDVD3P.js');
10
10
  require('./chunk-XDVT3GOM.js');
@@ -17,15 +17,15 @@ require('./chunk-XDVT3GOM.js');
17
17
 
18
18
 
19
19
 
20
- var _chunkM7Y7JYZXjs = require('./chunk-M7Y7JYZX.js');
20
+ var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
21
21
 
22
22
 
23
- var _chunkCDFH2DYLjs = require('./chunk-CDFH2DYL.js');
23
+ var _chunkCS6RAIVYjs = require('./chunk-CS6RAIVY.js');
24
24
  require('./chunk-XNYIZMNQ.js');
25
25
 
26
26
 
27
27
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
28
- require('./chunk-RWHWF5ZJ.js');
28
+ require('./chunk-6YAUMG27.js');
29
29
  require('./chunk-OG64RBAC.js');
30
30
  require('./chunk-COGTRVWW.js');
31
31
 
@@ -48,8 +48,8 @@ function formatCell(value) {
48
48
  return text.length > 80 ? `${text.slice(0, 77)}...` : text;
49
49
  }
50
50
  function tableLines(result) {
51
- const rows = _chunkM7Y7JYZXjs.dataExportRows.call(void 0, customerDbRows(result));
52
- const responseColumns = _chunkM7Y7JYZXjs.dataExportColumns.call(void 0,
51
+ const rows = _chunkKGNTKMRGjs.dataExportRows.call(void 0, customerDbRows(result));
52
+ const responseColumns = _chunkKGNTKMRGjs.dataExportColumns.call(void 0,
53
53
  rows,
54
54
  customerDbColumnNames(result)
55
55
  );
@@ -95,7 +95,7 @@ function tableLines(result) {
95
95
  return lines;
96
96
  }
97
97
  function customerDbRows(result) {
98
- return _chunkM7Y7JYZXjs.recordRows.call(void 0, result.rows);
98
+ return _chunkKGNTKMRGjs.recordRows.call(void 0, result.rows);
99
99
  }
100
100
  function customerDbColumnNames(result) {
101
101
  return result.columns.map((column) => column.name).filter(Boolean);
@@ -117,15 +117,15 @@ function collectErrorText(value) {
117
117
  ].filter(Boolean).join("\n");
118
118
  }
119
119
  function formatDbQueryError(sql, error) {
120
- const text = error instanceof _chunkCDFH2DYLjs.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
120
+ const text = error instanceof _chunkCS6RAIVYjs.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
121
121
  const lower = text.toLowerCase();
122
122
  const referencesStorage = /"storage"\.|storage\./i.test(sql);
123
123
  const runIdColumnMissing = /column\s+"?run_id"?\s+does not exist/i.test(text) || /run_id.*does not exist/i.test(lower);
124
124
  const relationMissing = /relation\s+["']?[^"']*storage[^"']*["']?\s+does not exist/i.test(text) || /42p01/i.test(text);
125
125
  if (referencesStorage && relationMissing) {
126
126
  return [
127
- ...error instanceof _chunkCDFH2DYLjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
128
- error instanceof _chunkCDFH2DYLjs.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
127
+ ...error instanceof _chunkCS6RAIVYjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
128
+ error instanceof _chunkCS6RAIVYjs.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
129
129
  "Play dataset tables are created only when the corresponding ctx.dataset(...).run(...) call executes. Pilot branches, early returns, and runs that fail before the dataset do not create that table.",
130
130
  "Use `deepline runs get <run-id> --full` to inspect returned dataset handles, then export them with `deepline runs export <run-id> --dataset result.rows --out rows.csv`.",
131
131
  `Original error: ${errorMessage(error)}`
@@ -133,7 +133,7 @@ function formatDbQueryError(sql, error) {
133
133
  }
134
134
  if (referencesStorage && runIdColumnMissing) {
135
135
  return [
136
- ...error instanceof _chunkCDFH2DYLjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
136
+ ...error instanceof _chunkCS6RAIVYjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
137
137
  "Customer DB query failed: storage dataset tables use `_run_id`, not `run_id`.",
138
138
  "Prefer `deepline runs export <run-id> --dataset result.rows --out rows.csv` unless you are doing deep table debugging.",
139
139
  `Original error: ${errorMessage(error)}`
@@ -148,7 +148,7 @@ function writeCustomerDbCsv(result, outPath) {
148
148
  const resolved = _path.resolve.call(void 0, outPath);
149
149
  _fs.writeFileSync.call(void 0,
150
150
  resolved,
151
- _chunkM7Y7JYZXjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
151
+ _chunkKGNTKMRGjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
152
152
  "utf-8"
153
153
  );
154
154
  return resolved;
@@ -189,7 +189,7 @@ function dbQueryExportEnvelope(input) {
189
189
  function renderDbQueryResult(result, query, options) {
190
190
  const { sql, maxRows, operationKey } = query;
191
191
  const { format, out: outPath, json: explicitJsonOutput = false } = options;
192
- const jsonOutput = explicitJsonOutput || _chunkM7Y7JYZXjs.shouldEmitJson.call(void 0, );
192
+ const jsonOutput = explicitJsonOutput || _chunkKGNTKMRGjs.shouldEmitJson.call(void 0, );
193
193
  const toolPayload = JSON.stringify({
194
194
  sql,
195
195
  result_mode: "rows",
@@ -200,7 +200,7 @@ function renderDbQueryResult(result, query, options) {
200
200
  if (format === "csv") {
201
201
  if (outPath) {
202
202
  const exportedPath = writeCustomerDbCsv(result, outPath);
203
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
203
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
204
204
  dbQueryExportEnvelope({
205
205
  result,
206
206
  format,
@@ -216,7 +216,7 @@ function renderDbQueryResult(result, query, options) {
216
216
  );
217
217
  return;
218
218
  }
219
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
219
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
220
220
  dbQueryExportEnvelope({
221
221
  result,
222
222
  format,
@@ -226,7 +226,7 @@ function renderDbQueryResult(result, query, options) {
226
226
  }),
227
227
  {
228
228
  json: explicitJsonOutput,
229
- text: _chunkM7Y7JYZXjs.dataExportCsvString.call(void 0,
229
+ text: _chunkKGNTKMRGjs.dataExportCsvString.call(void 0,
230
230
  customerDbRows(result),
231
231
  customerDbColumnNames(result)
232
232
  )
@@ -235,14 +235,14 @@ function renderDbQueryResult(result, query, options) {
235
235
  return;
236
236
  }
237
237
  if (format === "markdown") {
238
- const content = _chunkM7Y7JYZXjs.markdownTableFromRows.call(void 0,
238
+ const content = _chunkKGNTKMRGjs.markdownTableFromRows.call(void 0,
239
239
  customerDbRows(result),
240
240
  customerDbColumnNames(result)
241
241
  );
242
242
  if (outPath) {
243
243
  const exportedPath = _path.resolve.call(void 0, outPath);
244
244
  _fs.writeFileSync.call(void 0, exportedPath, content, "utf-8");
245
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
245
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
246
246
  dbQueryExportEnvelope({
247
247
  result,
248
248
  format,
@@ -258,7 +258,7 @@ function renderDbQueryResult(result, query, options) {
258
258
  );
259
259
  return;
260
260
  }
261
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
261
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
262
262
  dbQueryExportEnvelope({
263
263
  result,
264
264
  format,
@@ -273,7 +273,7 @@ function renderDbQueryResult(result, query, options) {
273
273
  );
274
274
  return;
275
275
  }
276
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
276
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
277
277
  {
278
278
  ...result,
279
279
  next: {
@@ -347,9 +347,9 @@ async function runDbQueryCommand(options) {
347
347
  ...maxRows === void 0 ? {} : { maxRows },
348
348
  ...operationKey === void 0 ? {} : { operationKey }
349
349
  };
350
- const plan = _chunk2HAD745Vjs.planCustomerDbQuery.call(void 0, query);
350
+ const plan = _chunkE23BQ5SCjs.planCustomerDbQuery.call(void 0, query);
351
351
  if (options.dryRun) {
352
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
352
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
353
353
  {
354
354
  dryRun: true,
355
355
  ...plan,
@@ -362,11 +362,11 @@ async function runDbQueryCommand(options) {
362
362
  ...out === void 0 ? {} : { file: _path.resolve.call(void 0, out) }
363
363
  }
364
364
  },
365
- { json: options.json || _chunkM7Y7JYZXjs.shouldEmitJson.call(void 0, ) }
365
+ { json: options.json || _chunkKGNTKMRGjs.shouldEmitJson.call(void 0, ) }
366
366
  );
367
367
  return 0;
368
368
  }
369
- const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
369
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
370
370
  const result = await client.db.query(query);
371
371
  renderDbQueryResult(result, query, {
372
372
  format,
@@ -375,8 +375,8 @@ async function runDbQueryCommand(options) {
375
375
  });
376
376
  return 0;
377
377
  } catch (error) {
378
- if (error instanceof _chunkCDFH2DYLjs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkM7Y7JYZXjs.shouldEmitJson.call(void 0, ))) {
379
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
378
+ if (error instanceof _chunkCS6RAIVYjs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkKGNTKMRGjs.shouldEmitJson.call(void 0, ))) {
379
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
380
380
  {
381
381
  ok: false,
382
382
  error: {
@@ -424,8 +424,8 @@ function dbRepairPlainText(result) {
424
424
  async function handleDbRepair(args) {
425
425
  const providerIndex = args.indexOf("--provider");
426
426
  const provider = providerIndex >= 0 ? _optionalChain([args, 'access', _9 => _9[providerIndex + 1], 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]) : void 0;
427
- const jsonOutput = _chunkM7Y7JYZXjs.argsWantJson.call(void 0, args);
428
- const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
427
+ const jsonOutput = _chunkKGNTKMRGjs.argsWantJson.call(void 0, args);
428
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
429
429
  let result;
430
430
  try {
431
431
  result = await client.repairIngestionStorage(
@@ -441,7 +441,7 @@ async function handleDbRepair(args) {
441
441
  console.error(errorMessage2(error));
442
442
  return 1;
443
443
  }
444
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
444
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
445
445
  {
446
446
  command: "db repair",
447
447
  status: result.status,