deepline 0.3.395 → 0.3.397

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 (126) hide show
  1. package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -1
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
  4. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +2 -2
  5. package/dist/cli/{auth-NMQXZRS7.mjs → auth-AZJFXGKP.mjs} +5 -4
  6. package/dist/cli/auth-CZJQU7B5.js +40 -0
  7. package/dist/cli/{billing-Z4JTGUU3.js → billing-MQV5AGDJ.js} +77 -76
  8. package/dist/cli/{billing-5MVXZRS6.mjs → billing-MZAAUHGH.mjs} +6 -5
  9. package/dist/cli/{chunk-6D7A2FSL.mjs → chunk-2LDADJNO.mjs} +7 -107
  10. package/dist/cli/{chunk-UKU6JM3S.js → chunk-3VP34TAU.js} +8 -8
  11. package/dist/cli/{chunk-7XAM7KDW.mjs → chunk-4D745XZO.mjs} +21 -108
  12. package/dist/cli/chunk-7DRPTGCK.js +930 -0
  13. package/dist/cli/{chunk-ZMVJSS6N.js → chunk-BQR6UN3C.js} +62 -78
  14. package/dist/cli/{chunk-HRWUQJ4K.js → chunk-DQ65ZVHN.js} +6 -6
  15. package/dist/cli/{chunk-5VCZ3WRH.mjs → chunk-EIMG75BT.mjs} +1 -0
  16. package/dist/cli/{chunk-EFLQHJZ6.mjs → chunk-F3BUFYKE.mjs} +182 -1031
  17. package/dist/cli/chunk-FIVKWNMT.mjs +210 -0
  18. package/dist/cli/{describe-DBRY5BNK.mjs → chunk-HFYQBC2D.mjs} +51 -171
  19. package/dist/cli/chunk-HGFFYVXN.js +210 -0
  20. package/dist/cli/{chunk-VB6KECLU.mjs → chunk-IHG7UAHD.mjs} +63 -79
  21. package/dist/cli/{chunk-TO2MWPGR.js → chunk-IZ74ABSX.js} +1 -1
  22. package/dist/cli/{chunk-G4IWGRMK.mjs → chunk-J7ABTQQ7.mjs} +5 -3
  23. package/dist/cli/{chunk-LZLBR2SF.js → chunk-K33MXVXQ.js} +323 -1172
  24. package/dist/cli/{chunk-DRM3CMHL.js → chunk-KXMNM4AQ.js} +2 -1
  25. package/dist/cli/chunk-LJ5747UC.mjs +107 -0
  26. package/dist/cli/{chunk-BON3DRC6.mjs → chunk-MRXMMERY.mjs} +1 -1
  27. package/dist/cli/{chunk-7MVWUXOD.mjs → chunk-MV7QRALK.mjs} +3 -3
  28. package/dist/cli/{chunk-WCCKMLHL.mjs → chunk-MYPH2LUU.mjs} +2 -2
  29. package/dist/cli/{chunk-RDXFGPJU.js → chunk-NA4T3B62.js} +64 -272
  30. package/dist/cli/{chunk-BLYL3KOC.mjs → chunk-NOX2TCBP.mjs} +1 -1
  31. package/dist/cli/chunk-OSDXE27V.mjs +88 -0
  32. package/dist/cli/{chunk-R4XZO6Z5.js → chunk-PSGEDGLT.js} +28 -115
  33. package/dist/cli/chunk-Q2E4E4FJ.js +112 -0
  34. package/dist/cli/chunk-RFG3MRAC.js +286 -0
  35. package/dist/cli/{chunk-47M6HPGP.mjs → chunk-RNSWDKBM.mjs} +1 -1
  36. package/dist/cli/{chunk-56IFFVIB.js → chunk-RYW4HPSM.js} +21 -121
  37. package/dist/cli/{chunk-K5T3EN6D.js → chunk-SO7RUVTY.js} +26 -26
  38. package/dist/cli/{chunk-KZZC33PY.mjs → chunk-TXZVVBQZ.mjs} +63 -271
  39. package/dist/cli/{chunk-36ML3YKA.js → chunk-UVXBVUZQ.js} +15 -13
  40. package/dist/cli/{chunk-PZ5BZ76S.js → chunk-VTF4RRWJ.js} +50 -50
  41. package/dist/cli/{chunk-3TRY7KAC.mjs → chunk-W3HMGKMI.mjs} +2 -2
  42. package/dist/cli/{chunk-ZWH2TFA7.mjs → chunk-WM2QEHZL.mjs} +2 -2
  43. package/dist/cli/chunk-YHPYUZZX.mjs +112 -0
  44. package/dist/cli/chunk-YHZUZO3U.mjs +930 -0
  45. package/dist/cli/{chunk-UCXK2DS4.js → chunk-YLRME7MK.js} +15 -15
  46. package/dist/cli/{chunk-MYIBHORT.js → chunk-YSVORIEW.js} +2 -2
  47. package/dist/cli/{chunk-OCSG6X67.mjs → chunk-YUDKBQUD.mjs} +4 -4
  48. package/dist/cli/chunk-ZAAKSJAS.js +88 -0
  49. package/dist/cli/{chunk-VYLJJQ7Y.js → chunk-ZHUMDMOS.js} +65 -65
  50. package/dist/cli/chunk-ZM2YPJQJ.js +107 -0
  51. package/dist/cli/{csv-HTS5ZYQ4.js → csv-AQBQ5O3I.js} +13 -12
  52. package/dist/cli/{csv-SVOD5UBH.mjs → csv-MB7PJMYQ.mjs} +4 -3
  53. package/dist/cli/{db-7AP4P52N.js → db-JPUYC5RB.js} +31 -30
  54. package/dist/cli/{db-7QLNI3Q4.mjs → db-L5IEI2AU.mjs} +6 -5
  55. package/dist/cli/describe-6WT74AOR.js +164 -0
  56. package/dist/cli/describe-S6BFANVI.mjs +164 -0
  57. package/dist/cli/describe-core.d.mts +100 -0
  58. package/dist/cli/describe-core.d.ts +100 -0
  59. package/dist/cli/describe-core.js +18 -0
  60. package/dist/cli/describe-core.mjs +18 -0
  61. package/dist/cli/{executions-GRQXTB2P.js → executions-6TMQTFP4.js} +8 -7
  62. package/dist/cli/{executions-QNZTPNG4.mjs → executions-L7I2ZW4Z.mjs} +6 -5
  63. package/dist/cli/{feedback-JMCSR624.mjs → feedback-DSJ63HK6.mjs} +4 -3
  64. package/dist/cli/{feedback-ZOLA2KY7.js → feedback-XF7CQGMD.js} +8 -7
  65. package/dist/cli/{git-LJGL2IHS.mjs → git-C3ENM67D.mjs} +5 -4
  66. package/dist/cli/git-HYDZK2QR.js +24 -0
  67. package/dist/cli/index.js +96 -94
  68. package/dist/cli/index.mjs +41 -39
  69. package/dist/cli/{legacy-noops-YSCIR2SD.js → legacy-noops-B2NHWIVD.js} +8 -7
  70. package/dist/cli/{legacy-noops-F23PKVBN.mjs → legacy-noops-VFG2K6HK.mjs} +5 -4
  71. package/dist/cli/{monitors-WMZ6HJZX.js → monitors-ORFWOVZB.js} +87 -86
  72. package/dist/cli/{monitors-S4LOEL7W.mjs → monitors-TCEDBDGY.mjs} +6 -5
  73. package/dist/cli/{org-U3WA2NQM.mjs → org-45KREIKZ.mjs} +6 -5
  74. package/dist/cli/{org-PFHM5ZLY.js → org-T74CJESN.js} +66 -65
  75. package/dist/cli/{chunk-XMAPE2KH.mjs → play-MU7MYBIM.mjs} +78 -131
  76. package/dist/cli/{chunk-4KLCLLTO.js → play-XHK2LPON.js} +273 -326
  77. package/dist/cli/{providers-XYMHLKCA.js → providers-4MGQKYFD.js} +9 -8
  78. package/dist/cli/{providers-QBBRFBOH.mjs → providers-VYCXIJT5.mjs} +6 -5
  79. package/dist/cli/{quickstart-IYGD6ZY3.js → quickstart-47G3VEOT.js} +6 -5
  80. package/dist/cli/{quickstart-5JTDGISY.mjs → quickstart-H724EFM2.mjs} +4 -3
  81. package/dist/cli/search-3356ENLD.js +30 -0
  82. package/dist/cli/{search-X6W6GRHS.mjs → search-VQHXEFQ4.mjs} +8 -6
  83. package/dist/cli/{secrets-UHG6OQFD.js → secrets-ALLKCU35.js} +15 -14
  84. package/dist/cli/{secrets-N55B67H6.mjs → secrets-CPBNGA44.mjs} +6 -5
  85. package/dist/cli/{sessions-JTRSTDSS.mjs → sessions-7RSQB7IX.mjs} +5 -4
  86. package/dist/cli/sessions-FKGAY7WQ.js +16 -0
  87. package/dist/cli/{settings-Q24HRAQI.mjs → settings-UYSGV4IC.mjs} +9 -8
  88. package/dist/cli/{settings-ATX4U5AS.js → settings-Y5BI42P7.js} +76 -75
  89. package/dist/cli/{setup-77ZWLVHT.mjs → setup-L3ZBBTS4.mjs} +7 -6
  90. package/dist/cli/{setup-EJCNOUCE.js → setup-VXQPEU3E.js} +42 -41
  91. package/dist/cli/skills-DUZQTDTE.js +29 -0
  92. package/dist/cli/{skills-XIS5AWQI.mjs → skills-QHVDLSFE.mjs} +5 -4
  93. package/dist/cli/{tools-WCKLYEGQ.mjs → tools-LSCEK4K2.mjs} +16 -19
  94. package/dist/cli/tools-YWU5QOQ5.js +39 -0
  95. package/dist/cli/update-5LYQAI55.js +29 -0
  96. package/dist/cli/{update-UT5WANMV.mjs → update-CU22OTBM.mjs} +7 -6
  97. package/dist/cli/{workflow-226QYUN2.js → workflow-ERFLTRNX.js} +17 -16
  98. package/dist/cli/{workflow-ZMX3L4ML.mjs → workflow-KQARK5BZ.mjs} +7 -6
  99. package/dist/{client-hdFtwhTm.d.mts → client-D0j-_aaa.d.mts} +2 -1
  100. package/dist/{client-CivP-PAI.d.ts → client-DflfVyj6.d.ts} +2 -1
  101. package/dist/index.d.mts +2 -2
  102. package/dist/index.d.ts +2 -2
  103. package/dist/index.js +15 -11
  104. package/dist/index.mjs +19 -15
  105. package/dist/install-integrity.json +94 -80
  106. package/dist/plays/play-description.d.mts +1 -1
  107. package/dist/plays/play-description.d.ts +1 -1
  108. package/dist/plays/play-description.js +4 -2
  109. package/dist/plays/play-description.mjs +3 -1
  110. package/dist/plays/run-request.d.mts +1 -1
  111. package/dist/plays/run-request.d.ts +1 -1
  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 +6 -1
  117. package/dist/cli/auth-UYCOBAL5.js +0 -39
  118. package/dist/cli/describe-YKOE54ZO.js +0 -406
  119. package/dist/cli/git-EJQLRK27.js +0 -23
  120. package/dist/cli/play-AGSECQFN.mjs +0 -159
  121. package/dist/cli/play-BR2LWGXK.js +0 -159
  122. package/dist/cli/search-ZVSYH5GY.js +0 -28
  123. package/dist/cli/sessions-57L5MGHN.js +0 -15
  124. package/dist/cli/skills-SPXUBLII.js +0 -28
  125. package/dist/cli/tools-DBHUUZJX.js +0 -42
  126. package/dist/cli/update-VSNFXRHJ.js +0 -28
@@ -4,10 +4,10 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
4
4
 
5
5
 
6
6
 
7
- var _chunk36ML3YKAjs = require('./chunk-36ML3YKA.js');
7
+ var _chunkUVXBVUZQjs = require('./chunk-UVXBVUZQ.js');
8
8
  require('./chunk-S6R3OX7B.js');
9
9
  require('./chunk-UHNDVD3P.js');
10
- require('./chunk-DRM3CMHL.js');
10
+ require('./chunk-KXMNM4AQ.js');
11
11
  require('./chunk-XDVT3GOM.js');
12
12
 
13
13
 
@@ -18,15 +18,16 @@ require('./chunk-XDVT3GOM.js');
18
18
 
19
19
 
20
20
 
21
- var _chunkHRWUQJ4Kjs = require('./chunk-HRWUQJ4K.js');
21
+ var _chunkDQ65ZVHNjs = require('./chunk-DQ65ZVHN.js');
22
+ require('./chunk-RYW4HPSM.js');
22
23
 
23
24
 
24
- var _chunk56IFFVIBjs = require('./chunk-56IFFVIB.js');
25
+ var _chunkQ2E4E4FJjs = require('./chunk-Q2E4E4FJ.js');
25
26
  require('./chunk-XNYIZMNQ.js');
26
27
 
27
28
 
28
29
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
29
- require('./chunk-TO2MWPGR.js');
30
+ require('./chunk-IZ74ABSX.js');
30
31
  require('./chunk-OG64RBAC.js');
31
32
  require('./chunk-COGTRVWW.js');
32
33
 
@@ -49,8 +50,8 @@ function formatCell(value) {
49
50
  return text.length > 80 ? `${text.slice(0, 77)}...` : text;
50
51
  }
51
52
  function tableLines(result) {
52
- const rows = _chunkHRWUQJ4Kjs.dataExportRows.call(void 0, customerDbRows(result));
53
- const responseColumns = _chunkHRWUQJ4Kjs.dataExportColumns.call(void 0,
53
+ const rows = _chunkDQ65ZVHNjs.dataExportRows.call(void 0, customerDbRows(result));
54
+ const responseColumns = _chunkDQ65ZVHNjs.dataExportColumns.call(void 0,
54
55
  rows,
55
56
  customerDbColumnNames(result)
56
57
  );
@@ -96,7 +97,7 @@ function tableLines(result) {
96
97
  return lines;
97
98
  }
98
99
  function customerDbRows(result) {
99
- return _chunkHRWUQJ4Kjs.recordRows.call(void 0, result.rows);
100
+ return _chunkDQ65ZVHNjs.recordRows.call(void 0, result.rows);
100
101
  }
101
102
  function customerDbColumnNames(result) {
102
103
  return result.columns.map((column) => column.name).filter(Boolean);
@@ -118,15 +119,15 @@ function collectErrorText(value) {
118
119
  ].filter(Boolean).join("\n");
119
120
  }
120
121
  function formatDbQueryError(sql, error) {
121
- const text = error instanceof _chunk56IFFVIBjs.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
122
+ const text = error instanceof _chunkQ2E4E4FJjs.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
122
123
  const lower = text.toLowerCase();
123
124
  const referencesStorage = /"storage"\.|storage\./i.test(sql);
124
125
  const runIdColumnMissing = /column\s+"?run_id"?\s+does not exist/i.test(text) || /run_id.*does not exist/i.test(lower);
125
126
  const relationMissing = /relation\s+["']?[^"']*storage[^"']*["']?\s+does not exist/i.test(text) || /42p01/i.test(text);
126
127
  if (referencesStorage && relationMissing) {
127
128
  return [
128
- ...error instanceof _chunk56IFFVIBjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
129
- error instanceof _chunk56IFFVIBjs.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
129
+ ...error instanceof _chunkQ2E4E4FJjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
130
+ error instanceof _chunkQ2E4E4FJjs.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
130
131
  "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.",
131
132
  "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`.",
132
133
  `Original error: ${errorMessage(error)}`
@@ -134,7 +135,7 @@ function formatDbQueryError(sql, error) {
134
135
  }
135
136
  if (referencesStorage && runIdColumnMissing) {
136
137
  return [
137
- ...error instanceof _chunk56IFFVIBjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
138
+ ...error instanceof _chunkQ2E4E4FJjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
138
139
  "Customer DB query failed: storage dataset tables use `_run_id`, not `run_id`.",
139
140
  "Prefer `deepline runs export <run-id> --dataset result.rows --out rows.csv` unless you are doing deep table debugging.",
140
141
  `Original error: ${errorMessage(error)}`
@@ -149,7 +150,7 @@ function writeCustomerDbCsv(result, outPath) {
149
150
  const resolved = _path.resolve.call(void 0, outPath);
150
151
  _fs.writeFileSync.call(void 0,
151
152
  resolved,
152
- _chunkHRWUQJ4Kjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
153
+ _chunkDQ65ZVHNjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
153
154
  "utf-8"
154
155
  );
155
156
  return resolved;
@@ -190,7 +191,7 @@ function dbQueryExportEnvelope(input) {
190
191
  function renderDbQueryResult(result, query, options) {
191
192
  const { sql, maxRows, operationKey } = query;
192
193
  const { format, out: outPath, json: explicitJsonOutput = false } = options;
193
- const jsonOutput = explicitJsonOutput || _chunkHRWUQJ4Kjs.shouldEmitJson.call(void 0, );
194
+ const jsonOutput = explicitJsonOutput || _chunkDQ65ZVHNjs.shouldEmitJson.call(void 0, );
194
195
  const toolPayload = JSON.stringify({
195
196
  sql,
196
197
  result_mode: "rows",
@@ -201,7 +202,7 @@ function renderDbQueryResult(result, query, options) {
201
202
  if (format === "csv") {
202
203
  if (outPath) {
203
204
  const exportedPath = writeCustomerDbCsv(result, outPath);
204
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
205
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
205
206
  dbQueryExportEnvelope({
206
207
  result,
207
208
  format,
@@ -217,7 +218,7 @@ function renderDbQueryResult(result, query, options) {
217
218
  );
218
219
  return;
219
220
  }
220
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
221
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
221
222
  dbQueryExportEnvelope({
222
223
  result,
223
224
  format,
@@ -227,7 +228,7 @@ function renderDbQueryResult(result, query, options) {
227
228
  }),
228
229
  {
229
230
  json: explicitJsonOutput,
230
- text: _chunkHRWUQJ4Kjs.dataExportCsvString.call(void 0,
231
+ text: _chunkDQ65ZVHNjs.dataExportCsvString.call(void 0,
231
232
  customerDbRows(result),
232
233
  customerDbColumnNames(result)
233
234
  )
@@ -236,14 +237,14 @@ function renderDbQueryResult(result, query, options) {
236
237
  return;
237
238
  }
238
239
  if (format === "markdown") {
239
- const content = _chunkHRWUQJ4Kjs.markdownTableFromRows.call(void 0,
240
+ const content = _chunkDQ65ZVHNjs.markdownTableFromRows.call(void 0,
240
241
  customerDbRows(result),
241
242
  customerDbColumnNames(result)
242
243
  );
243
244
  if (outPath) {
244
245
  const exportedPath = _path.resolve.call(void 0, outPath);
245
246
  _fs.writeFileSync.call(void 0, exportedPath, content, "utf-8");
246
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
247
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
247
248
  dbQueryExportEnvelope({
248
249
  result,
249
250
  format,
@@ -259,7 +260,7 @@ function renderDbQueryResult(result, query, options) {
259
260
  );
260
261
  return;
261
262
  }
262
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
263
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
263
264
  dbQueryExportEnvelope({
264
265
  result,
265
266
  format,
@@ -274,7 +275,7 @@ function renderDbQueryResult(result, query, options) {
274
275
  );
275
276
  return;
276
277
  }
277
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
278
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
278
279
  {
279
280
  ...result,
280
281
  next: {
@@ -348,9 +349,9 @@ async function runDbQueryCommand(options) {
348
349
  ...maxRows === void 0 ? {} : { maxRows },
349
350
  ...operationKey === void 0 ? {} : { operationKey }
350
351
  };
351
- const plan = _chunk36ML3YKAjs.planCustomerDbQuery.call(void 0, query);
352
+ const plan = _chunkUVXBVUZQjs.planCustomerDbQuery.call(void 0, query);
352
353
  if (options.dryRun) {
353
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
354
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
354
355
  {
355
356
  dryRun: true,
356
357
  ...plan,
@@ -363,11 +364,11 @@ async function runDbQueryCommand(options) {
363
364
  ...out === void 0 ? {} : { file: _path.resolve.call(void 0, out) }
364
365
  }
365
366
  },
366
- { json: options.json || _chunkHRWUQJ4Kjs.shouldEmitJson.call(void 0, ) }
367
+ { json: options.json || _chunkDQ65ZVHNjs.shouldEmitJson.call(void 0, ) }
367
368
  );
368
369
  return 0;
369
370
  }
370
- const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
371
+ const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
371
372
  const result = await client.db.query(query);
372
373
  renderDbQueryResult(result, query, {
373
374
  format,
@@ -376,8 +377,8 @@ async function runDbQueryCommand(options) {
376
377
  });
377
378
  return 0;
378
379
  } catch (error) {
379
- if (error instanceof _chunk56IFFVIBjs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkHRWUQJ4Kjs.shouldEmitJson.call(void 0, ))) {
380
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
380
+ if (error instanceof _chunkQ2E4E4FJjs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkDQ65ZVHNjs.shouldEmitJson.call(void 0, ))) {
381
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
381
382
  {
382
383
  ok: false,
383
384
  error: {
@@ -425,8 +426,8 @@ function dbRepairPlainText(result) {
425
426
  async function handleDbRepair(args) {
426
427
  const providerIndex = args.indexOf("--provider");
427
428
  const provider = providerIndex >= 0 ? _optionalChain([args, 'access', _9 => _9[providerIndex + 1], 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]) : void 0;
428
- const jsonOutput = _chunkHRWUQJ4Kjs.argsWantJson.call(void 0, args);
429
- const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
429
+ const jsonOutput = _chunkDQ65ZVHNjs.argsWantJson.call(void 0, args);
430
+ const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
430
431
  let result;
431
432
  try {
432
433
  result = await client.repairIngestionStorage(
@@ -442,7 +443,7 @@ async function handleDbRepair(args) {
442
443
  console.error(errorMessage2(error));
443
444
  return 1;
444
445
  }
445
- _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
446
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
446
447
  {
447
448
  command: "db repair",
448
449
  status: result.status,
@@ -4,10 +4,10 @@ import {
4
4
  import {
5
5
  DeeplineClient,
6
6
  planCustomerDbQuery
7
- } from "./chunk-G4IWGRMK.mjs";
7
+ } from "./chunk-J7ABTQQ7.mjs";
8
8
  import "./chunk-6IKARAYD.mjs";
9
9
  import "./chunk-JI2B4RZP.mjs";
10
- import "./chunk-5VCZ3WRH.mjs";
10
+ import "./chunk-EIMG75BT.mjs";
11
11
  import "./chunk-UBKA33KY.mjs";
12
12
  import {
13
13
  argsWantJson,
@@ -18,15 +18,16 @@ import {
18
18
  printCommandEnvelope,
19
19
  recordRows,
20
20
  shouldEmitJson
21
- } from "./chunk-47M6HPGP.mjs";
21
+ } from "./chunk-RNSWDKBM.mjs";
22
+ import "./chunk-2LDADJNO.mjs";
22
23
  import {
23
24
  CustomerDbQueryOutcomeUnknownError
24
- } from "./chunk-6D7A2FSL.mjs";
25
+ } from "./chunk-YHPYUZZX.mjs";
25
26
  import "./chunk-DLIRSHV6.mjs";
26
27
  import {
27
28
  DeeplineError
28
29
  } from "./chunk-NXGCO4JB.mjs";
29
- import "./chunk-BON3DRC6.mjs";
30
+ import "./chunk-MRXMMERY.mjs";
30
31
  import "./chunk-WZYKRD7T.mjs";
31
32
  import "./chunk-KRD6H754.mjs";
32
33
 
@@ -0,0 +1,164 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunkK33MXVXQjs = require('./chunk-K33MXVXQ.js');
4
+
5
+
6
+ var _chunkZAAKSJASjs = require('./chunk-ZAAKSJAS.js');
7
+ require('./chunk-PSGEDGLT.js');
8
+
9
+
10
+
11
+ var _chunkRFG3MRACjs = require('./chunk-RFG3MRAC.js');
12
+ require('./chunk-7DRPTGCK.js');
13
+
14
+
15
+ var _chunkBQR6UN3Cjs = require('./chunk-BQR6UN3C.js');
16
+ require('./chunk-AID3OYVJ.js');
17
+ require('./chunk-ZM2YPJQJ.js');
18
+ require('./chunk-HGFFYVXN.js');
19
+ require('./chunk-NA4T3B62.js');
20
+ require('./chunk-KB4SDX5S.js');
21
+
22
+
23
+ var _chunkUVXBVUZQjs = require('./chunk-UVXBVUZQ.js');
24
+ require('./chunk-S6R3OX7B.js');
25
+ require('./chunk-UHNDVD3P.js');
26
+ require('./chunk-KXMNM4AQ.js');
27
+ require('./chunk-XDVT3GOM.js');
28
+ require('./chunk-QJBJZVG6.js');
29
+
30
+
31
+ var _chunkDQ65ZVHNjs = require('./chunk-DQ65ZVHN.js');
32
+ require('./chunk-RYW4HPSM.js');
33
+ require('./chunk-Q2E4E4FJ.js');
34
+ require('./chunk-XNYIZMNQ.js');
35
+ require('./chunk-7P5AA3SN.js');
36
+ require('./chunk-IZ74ABSX.js');
37
+ require('./chunk-OG64RBAC.js');
38
+ require('./chunk-COGTRVWW.js');
39
+
40
+ // src/cli/commands/describe.ts
41
+ var _fs = require('fs');
42
+ var _path = require('path');
43
+ async function describeAnything(name, options, onMissing) {
44
+ const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
45
+ const lookups = _chunkRFG3MRACjs.describeLookupsFor.call(void 0, client);
46
+ const outcome = await _chunkRFG3MRACjs.describeName.call(void 0, name, options, {
47
+ ...lookups,
48
+ // `tools describe` has already fetched the tool for its compatibility check.
49
+ tool: async (toolName) => _nullishCoalesce(options.fetchedTool, () => ( lookups.tool(toolName))),
50
+ seedStarterScript: _chunkK33MXVXQjs.seedToolListScript
51
+ });
52
+ if (outcome.status === "missing") {
53
+ if (onMissing) return onMissing();
54
+ console.error(
55
+ `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`
56
+ );
57
+ return 2;
58
+ }
59
+ if (outcome.status === "refused") {
60
+ console.error(outcome.message);
61
+ return outcome.exitCode;
62
+ }
63
+ return deliver(outcome.envelope, outcome.lines, {
64
+ json: options.json === true,
65
+ out: options.out
66
+ });
67
+ }
68
+ function deliver(envelope, lines, { json, out }) {
69
+ const text = `${lines.join("\n")}
70
+ `;
71
+ if (out) {
72
+ const path = _path.resolve.call(void 0, out);
73
+ const content = json ? `${JSON.stringify(envelope, null, 2)}
74
+ ` : text;
75
+ _fs.writeFileSync.call(void 0, path, content);
76
+ const bytes = Buffer.byteLength(content);
77
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
78
+ { path, bytes },
79
+ { json, text: `Wrote ${path} (${bytes} bytes)
80
+ ` }
81
+ );
82
+ return 0;
83
+ }
84
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0, envelope, { json, text });
85
+ return 0;
86
+ }
87
+ function registerDescribeCommand(program) {
88
+ _chunkZAAKSJASjs.addDescribeOptions.call(void 0, program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
89
+ "Describe anything search returns: a tool, monitor type, or play."
90
+ ).addHelpText(
91
+ "after",
92
+ `
93
+ What you can describe:
94
+ Any id deepline search returns: a tool id, a monitor type id, or a play name
95
+ or reference. You do not say which kind it is; tool ids, monitor type ids
96
+ and prebuilt play names never overlap.
97
+
98
+ When a name is taken twice:
99
+ A play your workspace created is shown instead of a Deepline tool, monitor
100
+ type or prebuilt play with the same name, and the output says so.
101
+ Pass --prebuilt (or --tool) to see the Deepline one.
102
+
103
+ What it prints:
104
+ The same sections for every kind: what it is, cost, inputs, outputs, then
105
+ an example of running it from the CLI and from inside a play.
106
+
107
+ Examples in the output:
108
+ (default) required inputs filled in, first output read
109
+ --verbose every input filled in, every output read; also shows
110
+ secondary fields
111
+ --cli-example only the CLI example, with how inputs and outputs work
112
+ --play-example only the in-play example, with how inputs and outputs work
113
+ --no-example no examples
114
+
115
+ Features:
116
+ A tool lists its features: parts with their own description, such as the
117
+ model an AI tool runs. --feature <name> describes one at its default value,
118
+ --feature <name>=<value> at another, e.g. --feature model=openai/gpt-5.6-luna.
119
+
120
+ Schema size and format:
121
+ Secondary fields (diagnostics, attempt logs, echoes of input) are left out
122
+ by default; the output names them, and --verbose shows them.
123
+ --fields email,miss_reason shows only the fields you name, plus every
124
+ required input, and names the rest. Use it when you know what you need.
125
+ A schema over ${_chunkBQR6UN3Cjs.SCHEMA_LINE_LIMIT} lines is folded: deeper objects show only their field
126
+ names. A shape used more than once is printed once under Types.
127
+ --full-schema the normal output, with the schema not folded
128
+ --schema-only only the schema, not folded, and nothing else
129
+ --json the same facts as JSON: fields keyed by name, with what
130
+ each means and, for a tool, where it is in the result;
131
+ secondary fields are named in "hidden"
132
+ --json --full-schema the whole catalog record, as tools describe and
133
+ plays describe print it
134
+ --schema-only --json
135
+ only the input and output JSON Schemas; use this for a
136
+ program, or for a schema too large to read
137
+ --out <path> save any of the above to a file instead of printing it
138
+
139
+ Play page:
140
+ For a play, the output ends with its play page URL (JSON: dashboardUrl).
141
+ --web-url print only that URL; with --json, {"dashboardUrl": ...}.
142
+ Fails for a tool or monitor type, which have no play page.
143
+
144
+ Older commands:
145
+ deepline tools describe and deepline plays describe are this command limited
146
+ to one kind. Their own flags still work: --pricing-only, --examples-only,
147
+ --model and --estimate-payload on tools; --json <fields> on plays.
148
+
149
+ Examples:
150
+ deepline describe hunter_email_verifier
151
+ deepline describe person-linkedin-to-email
152
+ deepline describe my-play --prebuilt
153
+ deepline describe ai_ark_people_search --full-schema
154
+ deepline describe prebuilt/person-to-email-batch --web-url
155
+ deepline describe ai_ark_people_search --schema-only --out schema.json
156
+ `
157
+ ).action(async (name, options) => {
158
+ process.exitCode = await describeAnything(name, options);
159
+ });
160
+ }
161
+
162
+
163
+
164
+ exports.describeAnything = describeAnything; exports.registerDescribeCommand = registerDescribeCommand;
@@ -0,0 +1,164 @@
1
+ import {
2
+ seedToolListScript
3
+ } from "./chunk-F3BUFYKE.mjs";
4
+ import {
5
+ addDescribeOptions
6
+ } from "./chunk-OSDXE27V.mjs";
7
+ import "./chunk-4D745XZO.mjs";
8
+ import {
9
+ describeLookupsFor,
10
+ describeName
11
+ } from "./chunk-HFYQBC2D.mjs";
12
+ import "./chunk-YHZUZO3U.mjs";
13
+ import {
14
+ SCHEMA_LINE_LIMIT
15
+ } from "./chunk-IHG7UAHD.mjs";
16
+ import "./chunk-OVDNJAJN.mjs";
17
+ import "./chunk-LJ5747UC.mjs";
18
+ import "./chunk-FIVKWNMT.mjs";
19
+ import "./chunk-TXZVVBQZ.mjs";
20
+ import "./chunk-3HU47EGZ.mjs";
21
+ import {
22
+ DeeplineClient
23
+ } from "./chunk-J7ABTQQ7.mjs";
24
+ import "./chunk-6IKARAYD.mjs";
25
+ import "./chunk-JI2B4RZP.mjs";
26
+ import "./chunk-EIMG75BT.mjs";
27
+ import "./chunk-UBKA33KY.mjs";
28
+ import "./chunk-WXLOW623.mjs";
29
+ import {
30
+ printCommandEnvelope
31
+ } from "./chunk-RNSWDKBM.mjs";
32
+ import "./chunk-2LDADJNO.mjs";
33
+ import "./chunk-YHPYUZZX.mjs";
34
+ import "./chunk-DLIRSHV6.mjs";
35
+ import "./chunk-NXGCO4JB.mjs";
36
+ import "./chunk-MRXMMERY.mjs";
37
+ import "./chunk-WZYKRD7T.mjs";
38
+ import "./chunk-KRD6H754.mjs";
39
+
40
+ // src/cli/commands/describe.ts
41
+ import { writeFileSync } from "fs";
42
+ import { resolve } from "path";
43
+ async function describeAnything(name, options, onMissing) {
44
+ const client = new DeeplineClient();
45
+ const lookups = describeLookupsFor(client);
46
+ const outcome = await describeName(name, options, {
47
+ ...lookups,
48
+ // `tools describe` has already fetched the tool for its compatibility check.
49
+ tool: async (toolName) => options.fetchedTool ?? lookups.tool(toolName),
50
+ seedStarterScript: seedToolListScript
51
+ });
52
+ if (outcome.status === "missing") {
53
+ if (onMissing) return onMissing();
54
+ console.error(
55
+ `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`
56
+ );
57
+ return 2;
58
+ }
59
+ if (outcome.status === "refused") {
60
+ console.error(outcome.message);
61
+ return outcome.exitCode;
62
+ }
63
+ return deliver(outcome.envelope, outcome.lines, {
64
+ json: options.json === true,
65
+ out: options.out
66
+ });
67
+ }
68
+ function deliver(envelope, lines, { json, out }) {
69
+ const text = `${lines.join("\n")}
70
+ `;
71
+ if (out) {
72
+ const path = resolve(out);
73
+ const content = json ? `${JSON.stringify(envelope, null, 2)}
74
+ ` : text;
75
+ writeFileSync(path, content);
76
+ const bytes = Buffer.byteLength(content);
77
+ printCommandEnvelope(
78
+ { path, bytes },
79
+ { json, text: `Wrote ${path} (${bytes} bytes)
80
+ ` }
81
+ );
82
+ return 0;
83
+ }
84
+ printCommandEnvelope(envelope, { json, text });
85
+ return 0;
86
+ }
87
+ function registerDescribeCommand(program) {
88
+ addDescribeOptions(program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
89
+ "Describe anything search returns: a tool, monitor type, or play."
90
+ ).addHelpText(
91
+ "after",
92
+ `
93
+ What you can describe:
94
+ Any id deepline search returns: a tool id, a monitor type id, or a play name
95
+ or reference. You do not say which kind it is; tool ids, monitor type ids
96
+ and prebuilt play names never overlap.
97
+
98
+ When a name is taken twice:
99
+ A play your workspace created is shown instead of a Deepline tool, monitor
100
+ type or prebuilt play with the same name, and the output says so.
101
+ Pass --prebuilt (or --tool) to see the Deepline one.
102
+
103
+ What it prints:
104
+ The same sections for every kind: what it is, cost, inputs, outputs, then
105
+ an example of running it from the CLI and from inside a play.
106
+
107
+ Examples in the output:
108
+ (default) required inputs filled in, first output read
109
+ --verbose every input filled in, every output read; also shows
110
+ secondary fields
111
+ --cli-example only the CLI example, with how inputs and outputs work
112
+ --play-example only the in-play example, with how inputs and outputs work
113
+ --no-example no examples
114
+
115
+ Features:
116
+ A tool lists its features: parts with their own description, such as the
117
+ model an AI tool runs. --feature <name> describes one at its default value,
118
+ --feature <name>=<value> at another, e.g. --feature model=openai/gpt-5.6-luna.
119
+
120
+ Schema size and format:
121
+ Secondary fields (diagnostics, attempt logs, echoes of input) are left out
122
+ by default; the output names them, and --verbose shows them.
123
+ --fields email,miss_reason shows only the fields you name, plus every
124
+ required input, and names the rest. Use it when you know what you need.
125
+ A schema over ${SCHEMA_LINE_LIMIT} lines is folded: deeper objects show only their field
126
+ names. A shape used more than once is printed once under Types.
127
+ --full-schema the normal output, with the schema not folded
128
+ --schema-only only the schema, not folded, and nothing else
129
+ --json the same facts as JSON: fields keyed by name, with what
130
+ each means and, for a tool, where it is in the result;
131
+ secondary fields are named in "hidden"
132
+ --json --full-schema the whole catalog record, as tools describe and
133
+ plays describe print it
134
+ --schema-only --json
135
+ only the input and output JSON Schemas; use this for a
136
+ program, or for a schema too large to read
137
+ --out <path> save any of the above to a file instead of printing it
138
+
139
+ Play page:
140
+ For a play, the output ends with its play page URL (JSON: dashboardUrl).
141
+ --web-url print only that URL; with --json, {"dashboardUrl": ...}.
142
+ Fails for a tool or monitor type, which have no play page.
143
+
144
+ Older commands:
145
+ deepline tools describe and deepline plays describe are this command limited
146
+ to one kind. Their own flags still work: --pricing-only, --examples-only,
147
+ --model and --estimate-payload on tools; --json <fields> on plays.
148
+
149
+ Examples:
150
+ deepline describe hunter_email_verifier
151
+ deepline describe person-linkedin-to-email
152
+ deepline describe my-play --prebuilt
153
+ deepline describe ai_ark_people_search --full-schema
154
+ deepline describe prebuilt/person-to-email-batch --web-url
155
+ deepline describe ai_ark_people_search --schema-only --out schema.json
156
+ `
157
+ ).action(async (name, options) => {
158
+ process.exitCode = await describeAnything(name, options);
159
+ });
160
+ }
161
+ export {
162
+ describeAnything,
163
+ registerDescribeCommand
164
+ };
@@ -0,0 +1,100 @@
1
+ /// <reference path="./text-imports.d.ts" />
2
+ import { T as ToolDefinition, D as DeeplineAgentModelDescription, P as PlayDescription, S as SearchType, a as DeeplineClient } from '../client-D0j-_aaa.mjs';
3
+ import '../compiler-manifest-DLxUY5kI.mjs';
4
+ import '@sinclair/typebox';
5
+ import 'zod';
6
+ import '../monitor-fleet-contract.mjs';
7
+
8
+ /**
9
+ * How `deepline describe` presents a tool: its contract, the JSON record,
10
+ * and the shared `Described` form. Pure, so the CLI and MCP describe a tool
11
+ * the same way; writing a starter Play to a local file is the caller's
12
+ * choice, passed in as `seedStarterScript`. Relative imports carry no `.js`
13
+ * suffix because the app compiles this module from source.
14
+ */
15
+ /** Writes a starter Play for a tool that returns a list; needs a local file. */
16
+ type SeedStarterScript = (input: {
17
+ toolId: string;
18
+ payload: Record<string, unknown>;
19
+ rows: Array<Record<string, unknown>>;
20
+ }) => SeededScript;
21
+ type CliToolMetadata = ToolDefinition & Record<string, unknown>;
22
+ type SeededScript = {
23
+ path: string;
24
+ sourceCode: string;
25
+ projectDir: string;
26
+ macCopyCommand: string;
27
+ windowsCopyCommand: string;
28
+ };
29
+
30
+ type FeatureDependencies = {
31
+ describeModel(model: string): Promise<DeeplineAgentModelDescription>;
32
+ };
33
+
34
+ /**
35
+ * `deepline describe` without a terminal: resolve a name to a tool, monitor
36
+ * type or play and build what describe shows for it. The CLI prints the
37
+ * result; MCP `deepline_describe` returns it. The lookups are the caller's,
38
+ * so each surface reads Deepline through its own authenticated client.
39
+ * Relative imports carry no `.js` suffix because the app compiles this
40
+ * module from source.
41
+ */
42
+ /** The `--type` name that selects each kind; `plays` is `prebuilts` plus `custom`. */
43
+ type KindFilter = Exclude<SearchType, 'plays'>;
44
+ type DescribeOptions = {
45
+ /** Set by `tools describe` and `plays describe` to limit what a name may be. */
46
+ kinds?: readonly KindFilter[];
47
+ /** The whole catalog record as JSON, as the older describe commands print it. */
48
+ fullRecord?: boolean;
49
+ prebuilt?: boolean;
50
+ tool?: boolean;
51
+ verbose?: boolean;
52
+ cliExample?: boolean;
53
+ playExample?: boolean;
54
+ /** False under `--no-example`. */
55
+ example?: boolean;
56
+ fullSchema?: boolean;
57
+ fields?: string;
58
+ schemaOnly?: boolean;
59
+ /** `name` or `name=value`: describe that one feature instead. */
60
+ feature?: string;
61
+ /** Only the play page URL; a tool or monitor type has none. */
62
+ webUrl?: boolean;
63
+ };
64
+ /** How describe reads Deepline. A lookup answers null when nothing has the name. */
65
+ type DescribeLookups = FeatureDependencies & {
66
+ play(reference: string): Promise<PlayDescription | null>;
67
+ tool(name: string): Promise<CliToolMetadata | null>;
68
+ /** The app origin play pages are served from. */
69
+ baseUrl: string;
70
+ /** Where a list tool's starter Play is written; only a local CLI has one. */
71
+ seedStarterScript?: SeedStarterScript;
72
+ };
73
+ /** Describe's lookups over an SDK client, as the CLI and MCP both read. */
74
+ declare function describeLookupsFor(client: Pick<DeeplineClient, 'describePlay' | 'getTool' | 'describeModel' | 'baseUrl'>): DescribeLookups;
75
+ /**
76
+ * What describe shows for a name: its JSON record and readable lines; that
77
+ * nothing has the name; or why the request cannot be answered, with the
78
+ * CLI's exit code.
79
+ */
80
+ type DescribeOutcome = {
81
+ status: 'described';
82
+ envelope: Record<string, unknown>;
83
+ lines: string[];
84
+ } | {
85
+ status: 'missing';
86
+ } | {
87
+ status: 'refused';
88
+ message: string;
89
+ exitCode: number;
90
+ };
91
+ /**
92
+ * Describe whatever `name` is: anything `deepline search` returns. Tool ids,
93
+ * monitor type ids and prebuilt play names never collide (the catalog build
94
+ * rejects a release where they do), so a bare name has at most one
95
+ * Deepline-maintained meaning. A play the workspace created under the same
96
+ * name wins unless `custom` is excluded, and the output says so.
97
+ */
98
+ declare function describeName(name: string, options: DescribeOptions, lookups: DescribeLookups): Promise<DescribeOutcome>;
99
+
100
+ export { type CliToolMetadata, type DescribeLookups, type DescribeOptions, type DescribeOutcome, type KindFilter, PlayDescription, describeLookupsFor, describeName };