deepline 0.3.375 → 0.3.377

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 (93) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +56 -4
  3. package/dist/cli/{auth-U3Y7DTIG.mjs → auth-3SJMD5GS.mjs} +4 -4
  4. package/dist/cli/auth-C54HQ3XR.js +35 -0
  5. package/dist/cli/{billing-P2DNRAND.js → billing-IN4CGRX5.js} +73 -73
  6. package/dist/cli/{billing-TKARGBO3.mjs → billing-N4PYTCSM.mjs} +4 -4
  7. package/dist/cli/{chunk-IG3GOO4T.mjs → chunk-3H5U7XCU.mjs} +1 -1
  8. package/dist/cli/{chunk-LZUWGLM4.js → chunk-4T62V4WC.js} +2 -2
  9. package/dist/cli/{chunk-ZFWU5V2A.mjs → chunk-7EEPWHRK.mjs} +6 -6
  10. package/dist/cli/{chunk-ZHXPNJQI.mjs → chunk-ATK45XHI.mjs} +1 -1
  11. package/dist/cli/{chunk-CUIBDSSS.js → chunk-BBONZ7CN.js} +8 -8
  12. package/dist/cli/{chunk-NVXMPGM4.js → chunk-CEUIAIUI.js} +57 -57
  13. package/dist/cli/{chunk-HSIVHAZA.mjs → chunk-CUKV3EXY.mjs} +3 -3
  14. package/dist/cli/{chunk-M2HVNJ47.js → chunk-D3GRDNJO.js} +60 -60
  15. package/dist/cli/{chunk-MPQSBHMA.mjs → chunk-DW7BDVZY.mjs} +4 -4
  16. package/dist/cli/{chunk-QEEIEHGV.mjs → chunk-FVFKLSMD.mjs} +2 -2
  17. package/dist/cli/{chunk-DAG4ZBTJ.js → chunk-GPM3AZXB.js} +9 -9
  18. package/dist/cli/{chunk-HP4BE43N.js → chunk-HYMVGRZP.js} +50 -50
  19. package/dist/cli/{chunk-MTBQEND4.js → chunk-IHXLIPY3.js} +15 -15
  20. package/dist/cli/{chunk-4GP56LRE.mjs → chunk-JMDMPIGV.mjs} +1 -1
  21. package/dist/cli/{chunk-F5CU5ALX.js → chunk-KHZQCKZ6.js} +26 -26
  22. package/dist/cli/{chunk-ADSZGPYZ.js → chunk-LJCC26EK.js} +1 -1
  23. package/dist/cli/{chunk-Z4ARN4X3.mjs → chunk-M2RT2YVB.mjs} +2 -2
  24. package/dist/cli/{chunk-STYH5U6W.mjs → chunk-MDMP2VS2.mjs} +12 -8
  25. package/dist/cli/{chunk-B3TQIJ6L.mjs → chunk-OEVLOA6Y.mjs} +1 -1
  26. package/dist/cli/{chunk-KK4XPUVA.js → chunk-ON7BSEMT.js} +8 -8
  27. package/dist/cli/{chunk-MKS7C3YR.mjs → chunk-OWJRRGZH.mjs} +2 -2
  28. package/dist/cli/{chunk-M5QDOHLG.mjs → chunk-SHPLCIOL.mjs} +1 -1
  29. package/dist/cli/{chunk-GN5QM2BB.js → chunk-SQPNP3IQ.js} +6 -6
  30. package/dist/cli/{chunk-B2LFDTXZ.mjs → chunk-VB6KECLU.mjs} +75 -7
  31. package/dist/cli/{chunk-SJVJZOPT.mjs → chunk-VD6KRRST.mjs} +2 -2
  32. package/dist/cli/{chunk-HEF6UDGA.js → chunk-VEUTINSL.js} +240 -236
  33. package/dist/cli/{chunk-IQTHRG6E.js → chunk-Y72FFPX5.js} +4 -4
  34. package/dist/cli/{chunk-DHTG5CCI.js → chunk-ZMVJSS6N.js} +81 -13
  35. package/dist/cli/{csv-3FTYTEJ3.mjs → csv-747TCRJS.mjs} +3 -3
  36. package/dist/cli/{csv-WAEVGKHF.js → csv-JHBQL7PV.js} +12 -12
  37. package/dist/cli/{db-HUGGFIVS.mjs → db-42NBKURO.mjs} +4 -4
  38. package/dist/cli/{db-UDMDGNKO.js → db-FGCCQJ64.js} +29 -29
  39. package/dist/cli/{describe-EOBOGTB5.mjs → describe-E6WVN74T.mjs} +11 -9
  40. package/dist/cli/{describe-SIAKZYRK.js → describe-PJYBUSVL.js} +30 -28
  41. package/dist/cli/{executions-HYYP27MG.js → executions-5P5ZJCRJ.js} +6 -6
  42. package/dist/cli/{executions-O6Z2HSLK.mjs → executions-UF7KP7B6.mjs} +4 -4
  43. package/dist/cli/{feedback-RRAMGMQV.mjs → feedback-BFXXUVXK.mjs} +3 -3
  44. package/dist/cli/{feedback-3DWSBHKS.js → feedback-S43D42JP.js} +7 -7
  45. package/dist/cli/git-C6PRTVHM.js +23 -0
  46. package/dist/cli/{git-KVAK7VOL.mjs → git-TNNTQ5IJ.mjs} +4 -4
  47. package/dist/cli/index.js +82 -82
  48. package/dist/cli/index.mjs +32 -32
  49. package/dist/cli/{legacy-noops-MQNCDMY7.mjs → legacy-noops-3ZEHUFE4.mjs} +4 -4
  50. package/dist/cli/{legacy-noops-V5GQXXUR.js → legacy-noops-SYWQBRUI.js} +7 -7
  51. package/dist/cli/{monitors-6FB63TDM.mjs → monitors-DAU53OC5.mjs} +4 -4
  52. package/dist/cli/{monitors-RFGQILPW.js → monitors-GTBPXIN7.js} +85 -85
  53. package/dist/cli/{org-TZPQDDVX.mjs → org-4TGDZ2ZL.mjs} +4 -4
  54. package/dist/cli/{org-L33EPH2E.js → org-G77WDHXX.js} +64 -64
  55. package/dist/cli/play-LNKMZFTI.js +155 -0
  56. package/dist/cli/{play-PU23OETO.mjs → play-OZV6FDMR.mjs} +8 -8
  57. package/dist/cli/{providers-QGQR6ZZF.mjs → providers-FPTHZSZH.mjs} +4 -4
  58. package/dist/cli/{providers-2RHIKO22.js → providers-GHS5B4FX.js} +7 -7
  59. package/dist/cli/{quickstart-24DQYBW7.mjs → quickstart-ADJZVPQR.mjs} +3 -3
  60. package/dist/cli/{quickstart-BGQVPI7W.js → quickstart-TGO5N665.js} +5 -5
  61. package/dist/cli/{search-EUN7YFMX.mjs → search-B7BRMMFR.mjs} +5 -5
  62. package/dist/cli/search-L6K36YWC.js +26 -0
  63. package/dist/cli/{secrets-OOHN6LNJ.mjs → secrets-A4UK4TMU.mjs} +4 -4
  64. package/dist/cli/{secrets-XL7GUTQA.js → secrets-FDREPCLL.js} +13 -13
  65. package/dist/cli/{sessions-SDN4C3YS.mjs → sessions-2UJPBSAV.mjs} +4 -4
  66. package/dist/cli/{sessions-FD5XB7M2.js → sessions-KQSHUEEV.js} +5 -5
  67. package/dist/cli/{settings-3MXRXYXI.mjs → settings-BZ5JTH67.mjs} +7 -7
  68. package/dist/cli/{settings-6ZEKVAYL.js → settings-XZSSJUSS.js} +74 -74
  69. package/dist/cli/{setup-DWTR6HNT.mjs → setup-DIQPCI6O.mjs} +6 -6
  70. package/dist/cli/{setup-VKQ5EJZR.js → setup-GQO2XQLS.js} +41 -41
  71. package/dist/cli/{skills-ISG5UUZW.mjs → skills-6ZJBKK6M.mjs} +4 -4
  72. package/dist/cli/skills-VSIYWK7T.js +28 -0
  73. package/dist/cli/tools-L7A6ITNQ.js +40 -0
  74. package/dist/cli/{tools-JTC3DR6M.mjs → tools-NKGWJUGR.mjs} +7 -7
  75. package/dist/cli/{update-GMTVIHCG.mjs → update-I3H7FXIF.mjs} +6 -6
  76. package/dist/cli/update-IP3GCUVX.js +28 -0
  77. package/dist/cli/{workflow-2765Y3Y5.js → workflow-J3FZEW4S.js} +15 -15
  78. package/dist/cli/{workflow-3POT3VFY.mjs → workflow-XFRG5G5H.mjs} +5 -5
  79. package/dist/index.js +6 -6
  80. package/dist/index.mjs +3 -3
  81. package/dist/install-integrity.json +74 -74
  82. package/dist/release.d.mts +1 -1
  83. package/dist/release.d.ts +1 -1
  84. package/dist/release.js +2 -2
  85. package/dist/release.mjs +1 -1
  86. package/package.json +1 -1
  87. package/dist/cli/auth-B7CLYD7R.js +0 -35
  88. package/dist/cli/git-M36KWCCG.js +0 -23
  89. package/dist/cli/play-YR2XQARF.js +0 -155
  90. package/dist/cli/search-OHELMK6E.js +0 -26
  91. package/dist/cli/skills-6GFW4GCW.js +0 -28
  92. package/dist/cli/tools-LK4L6VCK.js +0 -40
  93. package/dist/cli/update-PSJLAW4Q.js +0 -28
@@ -14,7 +14,7 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
14
14
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
15
15
 
16
16
 
17
- var _chunkADSZGPYZjs = require('./chunk-ADSZGPYZ.js');
17
+ var _chunkLJCC26EKjs = require('./chunk-LJCC26EK.js');
18
18
 
19
19
  // src/errors.ts
20
20
  var CustomerDbQueryOutcomeUnknownError = (_class = class extends _chunk7P5AA3SNjs.DeeplineError {
@@ -743,9 +743,9 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
743
743
  }
744
744
 
745
745
  // src/version.ts
746
- var SDK_VERSION = _chunkADSZGPYZjs.SDK_RELEASE.version;
747
- var SDK_API_MAJOR = _chunkADSZGPYZjs.SDK_RELEASE.contracts.api.currentMajor;
748
- var SDK_API_CONTRACT = _nullishCoalesce(_chunkADSZGPYZjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
746
+ var SDK_VERSION = _chunkLJCC26EKjs.SDK_RELEASE.version;
747
+ var SDK_API_MAJOR = _chunkLJCC26EKjs.SDK_RELEASE.contracts.api.currentMajor;
748
+ var SDK_API_CONTRACT = _nullishCoalesce(_chunkLJCC26EKjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
749
749
 
750
750
  // src/agent-runtime.ts
751
751
 
@@ -4,6 +4,7 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
4
4
 
5
5
  // src/cli/described.ts
6
6
  var SHAPE = "{}";
7
+ var RECORD = "Record<string, ";
7
8
  function featureLines(id, features) {
8
9
  if (!features.length) return [];
9
10
  const width = Math.max(...features.map(({ name }) => name.length));
@@ -75,6 +76,13 @@ function schemaType(schema) {
75
76
  ...item.fields ? { fields: item.fields } : {}
76
77
  };
77
78
  }
79
+ if (isRecord(schema.additionalProperties)) {
80
+ const value = schemaType(schema.additionalProperties);
81
+ return {
82
+ type: `${RECORD}${value.type}>${nullable}`,
83
+ ...value.fields ? { fields: value.fields } : {}
84
+ };
85
+ }
78
86
  return {
79
87
  type: types.filter((type) => type !== "null").join(" | ") + nullable || "unknown"
80
88
  };
@@ -85,7 +93,6 @@ function schemaField(name, node, required) {
85
93
  const example = [
86
94
  schema.example,
87
95
  schema.default,
88
- Array.isArray(schema.enum) ? schema.enum[0] : void 0,
89
96
  type === "string" ? NAMED_EXAMPLES[name.toLowerCase()] : void 0
90
97
  ].find((value) => value !== void 0);
91
98
  return {
@@ -162,9 +169,20 @@ function rateLimitSummary(limits) {
162
169
  }
163
170
  function exampleValue(field) {
164
171
  if (field.example !== void 0) return field.example;
172
+ if (field.type.startsWith(RECORD)) {
173
+ const value = field.type.slice(RECORD.length).replace(/>( \| null)?$/, "");
174
+ return { key: exampleValue({ ...field, type: value }) };
175
+ }
176
+ const literal = /^"(?:[^"\\]|\\.)*"/.exec(field.type);
177
+ if (literal) return JSON.parse(literal[0]);
165
178
  const type = field.type.toLowerCase();
166
179
  if (type.includes("[]")) return [];
167
- if (type.startsWith(SHAPE) || type.startsWith("object")) return {};
180
+ if (type.startsWith(SHAPE)) {
181
+ return Object.fromEntries(
182
+ (_nullishCoalesce(field.fields, () => ( []))).filter((child) => child.required).map((child) => [child.name, exampleValue(child)])
183
+ );
184
+ }
185
+ if (type.startsWith("object")) return {};
168
186
  if (type.startsWith("integer") || type.startsWith("number")) return 1;
169
187
  if (type.startsWith("boolean")) return true;
170
188
  return "...";
@@ -220,12 +238,58 @@ function namedShapes(roots) {
220
238
  }
221
239
  return named;
222
240
  }
241
+ function withRowInputs(described) {
242
+ const columns = described.rowInputs;
243
+ if (!_optionalChain([columns, 'optionalAccess', _ => _.length])) return described.inputs;
244
+ const join = (...notes) => notes.filter(Boolean).join(" - ");
245
+ const first = columns[0].name;
246
+ return described.inputs.map((field) => {
247
+ if (field.name === described.csvInput) {
248
+ return {
249
+ ...field,
250
+ type: `CsvInput<${SHAPE}>`,
251
+ fields: columns,
252
+ description: join(
253
+ field.description,
254
+ 'Headers match these names ignoring case, spaces and punctuation ("LinkedIn URL" reads as linked_in_url); map any other header in columns.'
255
+ )
256
+ };
257
+ }
258
+ if (field.name === "columns") {
259
+ return {
260
+ ...field,
261
+ type: SHAPE,
262
+ fields: columns.map(({ name }) => ({
263
+ name,
264
+ type: "string | string[]",
265
+ required: false
266
+ })),
267
+ description: join(
268
+ field.description,
269
+ `Your CSV header for a column, e.g. {"${first}": "My Header"}. CLI: --columns.${first} "My Header"`
270
+ )
271
+ };
272
+ }
273
+ return field;
274
+ });
275
+ }
276
+ function withRowOutputs(described) {
277
+ const columns = described.rowOutputs;
278
+ if (!_optionalChain([columns, 'optionalAccess', _2 => _2.length])) return described.outputs;
279
+ const typed = (field) => ({
280
+ ...field,
281
+ type: `PlayDataset<${SHAPE}>`,
282
+ fields: columns,
283
+ ...described.rowOutputsAddToSource ? { spread: _nullishCoalesce(described.csvInput, () => ( "source row")) } : {}
284
+ });
285
+ return described.outputs.some((field) => field.name === "rows") ? described.outputs.map(
286
+ (field) => field.name === "rows" ? typed(field) : field
287
+ ) : [...described.outputs, typed({ name: "rows", type: "", required: true })];
288
+ }
223
289
  function schemaBlocks(described, maxDepth, everyField = false) {
224
290
  const sections = [
225
- ["Inputs:", described.inputs],
226
- ["CSV columns read from each row:", _nullishCoalesce(described.rowInputs, () => ( []))],
227
- ["Outputs:", described.outputs],
228
- ["Columns added to each row:", _nullishCoalesce(described.rowOutputs, () => ( []))],
291
+ ["Inputs:", withRowInputs(described)],
292
+ ["Outputs:", withRowOutputs(described)],
229
293
  [
230
294
  "Raw response, as declared (read it from result.toolResponse.rawV2; check one real response for its nesting):",
231
295
  everyField ? _nullishCoalesce(described.rawResponse, () => ( [])) : []
@@ -255,13 +319,17 @@ function schemaBlocks(described, maxDepth, everyField = false) {
255
319
  ];
256
320
  }
257
321
  if (depth >= maxDepth || field.summarized && !everyField) {
258
- const names = field.fields.map((child) => child.name).join(", ");
322
+ const names = [
323
+ ...field.spread ? [`...${field.spread}`] : [],
324
+ ...field.fields.map((child) => child.name)
325
+ ].join(", ");
259
326
  return [
260
327
  `${start}${before}{ ${names} }${after},${comment([field.means, field.description])}`
261
328
  ];
262
329
  }
263
330
  return [
264
331
  `${start}${before}{${comment([field.means, field.description])}`,
332
+ ...field.spread ? [`${indent} ...${field.spread},`] : [],
265
333
  ...field.fields.flatMap(
266
334
  (child) => fieldLines(child, `${indent} `, depth + 1)
267
335
  ),
@@ -351,7 +419,7 @@ function schemaLines(described, view) {
351
419
  ];
352
420
  }
353
421
  if (view.full) return schemaBlocks(described, Infinity, true);
354
- const raw = _optionalChain([described, 'access', _ => _.rawResponse, 'optionalAccess', _2 => _2.length]) ? [
422
+ const raw = _optionalChain([described, 'access', _3 => _3.rawResponse, 'optionalAccess', _4 => _4.length]) ? [
355
423
  "",
356
424
  `Other response fields (${described.rawResponse.map((field) => field.name).join(", ")}) are in result.toolResponse.rawV2. --full-schema lists them.`
357
425
  ] : [];
@@ -476,15 +544,15 @@ function jsonFields(fields, options) {
476
544
  return [
477
545
  field.name,
478
546
  {
479
- type: field.type.replace(SHAPE, _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _3 => _3.name]), () => ( "object"))),
547
+ type: field.type.replace(SHAPE, _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _5 => _5.name]), () => ( "object"))),
480
548
  ...options.input ? { required: field.required } : {},
481
549
  ...field.means ? { means: field.means } : {},
482
550
  ...field.example !== void 0 ? { example: field.example } : {},
483
- ...field.description && field.description !== _optionalChain([shape, 'optionalAccess', _4 => _4.description]) ? { description: field.description } : {},
551
+ ...field.description && field.description !== _optionalChain([shape, 'optionalAccess', _6 => _6.description]) ? { description: field.description } : {},
484
552
  ...field.secondary ? { secondary: true } : {},
485
553
  ...field.read ? { read: field.read } : {},
486
554
  ...field.in ? { in: field.in } : {},
487
- ..._optionalChain([field, 'access', _5 => _5.paths, 'optionalAccess', _6 => _6.length]) ? { paths: field.paths } : {},
555
+ ..._optionalChain([field, 'access', _7 => _7.paths, 'optionalAccess', _8 => _8.length]) ? { paths: field.paths } : {},
488
556
  ...field.fields && !shape ? { fields: jsonFields(field.fields, options) } : {}
489
557
  }
490
558
  ];
@@ -505,7 +573,7 @@ function describedJson(described, view) {
505
573
  const used = /* @__PURE__ */ new Set();
506
574
  const blocks = Object.fromEntries(
507
575
  sections.flatMap(
508
- ([key, fields, input]) => _optionalChain([fields, 'optionalAccess', _7 => _7.length]) ? [
576
+ ([key, fields, input]) => _optionalChain([fields, 'optionalAccess', _9 => _9.length]) ? [
509
577
  [
510
578
  key,
511
579
  jsonFields(fields, {
@@ -539,7 +607,7 @@ function describedJson(described, view) {
539
607
  ...described.cost ? { cost: described.cost } : {},
540
608
  ...described.rateLimit ? { rateLimit: described.rateLimit } : {},
541
609
  ...described.byok ? { byok: described.byok } : {},
542
- ..._optionalChain([described, 'access', _8 => _8.features, 'optionalAccess', _9 => _9.length]) ? { features: described.features } : {},
610
+ ..._optionalChain([described, 'access', _10 => _10.features, 'optionalAccess', _11 => _11.length]) ? { features: described.features } : {},
543
611
  ...described.guidance.length ? { guidance: described.guidance } : {},
544
612
  ...blocks,
545
613
  ...used.size ? { types } : {},
@@ -4,11 +4,11 @@ import {
4
4
  printCommandEnvelope,
5
5
  printJson,
6
6
  readCsvRows
7
- } from "./chunk-M5QDOHLG.mjs";
8
- import "./chunk-4GP56LRE.mjs";
7
+ } from "./chunk-SHPLCIOL.mjs";
8
+ import "./chunk-JMDMPIGV.mjs";
9
9
  import "./chunk-DLIRSHV6.mjs";
10
10
  import "./chunk-NXGCO4JB.mjs";
11
- import "./chunk-IG3GOO4T.mjs";
11
+ import "./chunk-3H5U7XCU.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 _chunkGN5QM2BBjs = require('./chunk-GN5QM2BB.js');
8
- require('./chunk-IQTHRG6E.js');
7
+ var _chunkSQPNP3IQjs = require('./chunk-SQPNP3IQ.js');
8
+ require('./chunk-Y72FFPX5.js');
9
9
  require('./chunk-XNYIZMNQ.js');
10
10
  require('./chunk-7P5AA3SN.js');
11
- require('./chunk-ADSZGPYZ.js');
11
+ require('./chunk-LJCC26EK.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 : _chunkGN5QM2BBjs.clip.call(void 0, value, 42)).length;
129
+ return (verbose ? value : _chunkSQPNP3IQjs.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 : _chunkGN5QM2BBjs.clip.call(void 0, raw, 42);
139
+ const display = verbose ? raw : _chunkSQPNP3IQjs.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 = _chunkGN5QM2BBjs.readCsvRows.call(void 0, csvPath);
159
+ const allRows = _chunkSQPNP3IQjs.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
- _chunkGN5QM2BBjs.printJson.call(void 0, {
172
+ _chunkSQPNP3IQjs.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(_chunkGN5QM2BBjs.csvStringFromRows.call(void 0, displayRows));
181
+ process.stdout.write(_chunkSQPNP3IQjs.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
- _chunkGN5QM2BBjs.printJson.call(void 0, {
196
+ _chunkSQPNP3IQjs.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
- ${_chunkGN5QM2BBjs.clip.call(void 0, log, 2e3)}`;
439
+ ${_chunkSQPNP3IQjs.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
- _chunkGN5QM2BBjs.printCommandEnvelope.call(void 0, payload, {
490
+ _chunkSQPNP3IQjs.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
- _chunkGN5QM2BBjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
526
+ _chunkSQPNP3IQjs.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-ZHXPNJQI.mjs";
7
+ } from "./chunk-ATK45XHI.mjs";
8
8
  import "./chunk-6IKARAYD.mjs";
9
9
  import "./chunk-CBVIJSHF.mjs";
10
10
  import {
@@ -16,15 +16,15 @@ import {
16
16
  printCommandEnvelope,
17
17
  recordRows,
18
18
  shouldEmitJson
19
- } from "./chunk-M5QDOHLG.mjs";
19
+ } from "./chunk-SHPLCIOL.mjs";
20
20
  import {
21
21
  CustomerDbQueryOutcomeUnknownError
22
- } from "./chunk-4GP56LRE.mjs";
22
+ } from "./chunk-JMDMPIGV.mjs";
23
23
  import "./chunk-DLIRSHV6.mjs";
24
24
  import {
25
25
  DeeplineError
26
26
  } from "./chunk-NXGCO4JB.mjs";
27
- import "./chunk-IG3GOO4T.mjs";
27
+ import "./chunk-3H5U7XCU.mjs";
28
28
  import "./chunk-WZYKRD7T.mjs";
29
29
  import "./chunk-KRD6H754.mjs";
30
30
 
@@ -4,7 +4,7 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkDAG4ZBTJjs = require('./chunk-DAG4ZBTJ.js');
7
+ var _chunkGPM3AZXBjs = require('./chunk-GPM3AZXB.js');
8
8
  require('./chunk-S6R3OX7B.js');
9
9
  require('./chunk-LA46MMTL.js');
10
10
 
@@ -16,15 +16,15 @@ require('./chunk-LA46MMTL.js');
16
16
 
17
17
 
18
18
 
19
- var _chunkGN5QM2BBjs = require('./chunk-GN5QM2BB.js');
19
+ var _chunkSQPNP3IQjs = require('./chunk-SQPNP3IQ.js');
20
20
 
21
21
 
22
- var _chunkIQTHRG6Ejs = require('./chunk-IQTHRG6E.js');
22
+ var _chunkY72FFPX5js = require('./chunk-Y72FFPX5.js');
23
23
  require('./chunk-XNYIZMNQ.js');
24
24
 
25
25
 
26
26
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
27
- require('./chunk-ADSZGPYZ.js');
27
+ require('./chunk-LJCC26EK.js');
28
28
  require('./chunk-OG64RBAC.js');
29
29
  require('./chunk-COGTRVWW.js');
30
30
 
@@ -47,8 +47,8 @@ function formatCell(value) {
47
47
  return text.length > 80 ? `${text.slice(0, 77)}...` : text;
48
48
  }
49
49
  function tableLines(result) {
50
- const rows = _chunkGN5QM2BBjs.dataExportRows.call(void 0, customerDbRows(result));
51
- const responseColumns = _chunkGN5QM2BBjs.dataExportColumns.call(void 0,
50
+ const rows = _chunkSQPNP3IQjs.dataExportRows.call(void 0, customerDbRows(result));
51
+ const responseColumns = _chunkSQPNP3IQjs.dataExportColumns.call(void 0,
52
52
  rows,
53
53
  customerDbColumnNames(result)
54
54
  );
@@ -94,7 +94,7 @@ function tableLines(result) {
94
94
  return lines;
95
95
  }
96
96
  function customerDbRows(result) {
97
- return _chunkGN5QM2BBjs.recordRows.call(void 0, result.rows);
97
+ return _chunkSQPNP3IQjs.recordRows.call(void 0, result.rows);
98
98
  }
99
99
  function customerDbColumnNames(result) {
100
100
  return result.columns.map((column) => column.name).filter(Boolean);
@@ -116,15 +116,15 @@ function collectErrorText(value) {
116
116
  ].filter(Boolean).join("\n");
117
117
  }
118
118
  function formatDbQueryError(sql, error) {
119
- const text = error instanceof _chunkIQTHRG6Ejs.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
119
+ const text = error instanceof _chunkY72FFPX5js.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
120
120
  const lower = text.toLowerCase();
121
121
  const referencesStorage = /"storage"\.|storage\./i.test(sql);
122
122
  const runIdColumnMissing = /column\s+"?run_id"?\s+does not exist/i.test(text) || /run_id.*does not exist/i.test(lower);
123
123
  const relationMissing = /relation\s+["']?[^"']*storage[^"']*["']?\s+does not exist/i.test(text) || /42p01/i.test(text);
124
124
  if (referencesStorage && relationMissing) {
125
125
  return [
126
- ...error instanceof _chunkIQTHRG6Ejs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
127
- error instanceof _chunkIQTHRG6Ejs.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
126
+ ...error instanceof _chunkY72FFPX5js.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
127
+ error instanceof _chunkY72FFPX5js.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
128
128
  "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.",
129
129
  "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`.",
130
130
  `Original error: ${errorMessage(error)}`
@@ -132,7 +132,7 @@ function formatDbQueryError(sql, error) {
132
132
  }
133
133
  if (referencesStorage && runIdColumnMissing) {
134
134
  return [
135
- ...error instanceof _chunkIQTHRG6Ejs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
135
+ ...error instanceof _chunkY72FFPX5js.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
136
136
  "Customer DB query failed: storage dataset tables use `_run_id`, not `run_id`.",
137
137
  "Prefer `deepline runs export <run-id> --dataset result.rows --out rows.csv` unless you are doing deep table debugging.",
138
138
  `Original error: ${errorMessage(error)}`
@@ -147,7 +147,7 @@ function writeCustomerDbCsv(result, outPath) {
147
147
  const resolved = _path.resolve.call(void 0, outPath);
148
148
  _fs.writeFileSync.call(void 0,
149
149
  resolved,
150
- _chunkGN5QM2BBjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
150
+ _chunkSQPNP3IQjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
151
151
  "utf-8"
152
152
  );
153
153
  return resolved;
@@ -188,7 +188,7 @@ function dbQueryExportEnvelope(input) {
188
188
  function renderDbQueryResult(result, query, options) {
189
189
  const { sql, maxRows, operationKey } = query;
190
190
  const { format, out: outPath, json: explicitJsonOutput = false } = options;
191
- const jsonOutput = explicitJsonOutput || _chunkGN5QM2BBjs.shouldEmitJson.call(void 0, );
191
+ const jsonOutput = explicitJsonOutput || _chunkSQPNP3IQjs.shouldEmitJson.call(void 0, );
192
192
  const toolPayload = JSON.stringify({
193
193
  sql,
194
194
  result_mode: "rows",
@@ -199,7 +199,7 @@ function renderDbQueryResult(result, query, options) {
199
199
  if (format === "csv") {
200
200
  if (outPath) {
201
201
  const exportedPath = writeCustomerDbCsv(result, outPath);
202
- _chunkGN5QM2BBjs.printCommandEnvelope.call(void 0,
202
+ _chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
203
203
  dbQueryExportEnvelope({
204
204
  result,
205
205
  format,
@@ -215,7 +215,7 @@ function renderDbQueryResult(result, query, options) {
215
215
  );
216
216
  return;
217
217
  }
218
- _chunkGN5QM2BBjs.printCommandEnvelope.call(void 0,
218
+ _chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
219
219
  dbQueryExportEnvelope({
220
220
  result,
221
221
  format,
@@ -225,7 +225,7 @@ function renderDbQueryResult(result, query, options) {
225
225
  }),
226
226
  {
227
227
  json: explicitJsonOutput,
228
- text: _chunkGN5QM2BBjs.dataExportCsvString.call(void 0,
228
+ text: _chunkSQPNP3IQjs.dataExportCsvString.call(void 0,
229
229
  customerDbRows(result),
230
230
  customerDbColumnNames(result)
231
231
  )
@@ -234,14 +234,14 @@ function renderDbQueryResult(result, query, options) {
234
234
  return;
235
235
  }
236
236
  if (format === "markdown") {
237
- const content = _chunkGN5QM2BBjs.markdownTableFromRows.call(void 0,
237
+ const content = _chunkSQPNP3IQjs.markdownTableFromRows.call(void 0,
238
238
  customerDbRows(result),
239
239
  customerDbColumnNames(result)
240
240
  );
241
241
  if (outPath) {
242
242
  const exportedPath = _path.resolve.call(void 0, outPath);
243
243
  _fs.writeFileSync.call(void 0, exportedPath, content, "utf-8");
244
- _chunkGN5QM2BBjs.printCommandEnvelope.call(void 0,
244
+ _chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
245
245
  dbQueryExportEnvelope({
246
246
  result,
247
247
  format,
@@ -257,7 +257,7 @@ function renderDbQueryResult(result, query, options) {
257
257
  );
258
258
  return;
259
259
  }
260
- _chunkGN5QM2BBjs.printCommandEnvelope.call(void 0,
260
+ _chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
261
261
  dbQueryExportEnvelope({
262
262
  result,
263
263
  format,
@@ -272,7 +272,7 @@ function renderDbQueryResult(result, query, options) {
272
272
  );
273
273
  return;
274
274
  }
275
- _chunkGN5QM2BBjs.printCommandEnvelope.call(void 0,
275
+ _chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
276
276
  {
277
277
  ...result,
278
278
  next: {
@@ -346,9 +346,9 @@ async function runDbQueryCommand(options) {
346
346
  ...maxRows === void 0 ? {} : { maxRows },
347
347
  ...operationKey === void 0 ? {} : { operationKey }
348
348
  };
349
- const plan = _chunkDAG4ZBTJjs.planCustomerDbQuery.call(void 0, query);
349
+ const plan = _chunkGPM3AZXBjs.planCustomerDbQuery.call(void 0, query);
350
350
  if (options.dryRun) {
351
- _chunkGN5QM2BBjs.printCommandEnvelope.call(void 0,
351
+ _chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
352
352
  {
353
353
  dryRun: true,
354
354
  ...plan,
@@ -361,11 +361,11 @@ async function runDbQueryCommand(options) {
361
361
  ...out === void 0 ? {} : { file: _path.resolve.call(void 0, out) }
362
362
  }
363
363
  },
364
- { json: options.json || _chunkGN5QM2BBjs.shouldEmitJson.call(void 0, ) }
364
+ { json: options.json || _chunkSQPNP3IQjs.shouldEmitJson.call(void 0, ) }
365
365
  );
366
366
  return 0;
367
367
  }
368
- const client = new (0, _chunkDAG4ZBTJjs.DeeplineClient)();
368
+ const client = new (0, _chunkGPM3AZXBjs.DeeplineClient)();
369
369
  const result = await client.db.query(query);
370
370
  renderDbQueryResult(result, query, {
371
371
  format,
@@ -374,8 +374,8 @@ async function runDbQueryCommand(options) {
374
374
  });
375
375
  return 0;
376
376
  } catch (error) {
377
- if (error instanceof _chunkIQTHRG6Ejs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkGN5QM2BBjs.shouldEmitJson.call(void 0, ))) {
378
- _chunkGN5QM2BBjs.printCommandEnvelope.call(void 0,
377
+ if (error instanceof _chunkY72FFPX5js.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkSQPNP3IQjs.shouldEmitJson.call(void 0, ))) {
378
+ _chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
379
379
  {
380
380
  ok: false,
381
381
  error: {
@@ -423,8 +423,8 @@ function dbRepairPlainText(result) {
423
423
  async function handleDbRepair(args) {
424
424
  const providerIndex = args.indexOf("--provider");
425
425
  const provider = providerIndex >= 0 ? _optionalChain([args, 'access', _9 => _9[providerIndex + 1], 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]) : void 0;
426
- const jsonOutput = _chunkGN5QM2BBjs.argsWantJson.call(void 0, args);
427
- const client = new (0, _chunkDAG4ZBTJjs.DeeplineClient)();
426
+ const jsonOutput = _chunkSQPNP3IQjs.argsWantJson.call(void 0, args);
427
+ const client = new (0, _chunkGPM3AZXBjs.DeeplineClient)();
428
428
  let result;
429
429
  try {
430
430
  result = await client.repairIngestionStorage(
@@ -440,7 +440,7 @@ async function handleDbRepair(args) {
440
440
  console.error(errorMessage2(error));
441
441
  return 1;
442
442
  }
443
- _chunkGN5QM2BBjs.printCommandEnvelope.call(void 0,
443
+ _chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
444
444
  {
445
445
  command: "db repair",
446
446
  status: result.status,
@@ -3,10 +3,10 @@ import {
3
3
  formatModelDescription,
4
4
  publicToolSchemas,
5
5
  toolMetadataJsonForDescribe
6
- } from "./chunk-ZFWU5V2A.mjs";
6
+ } from "./chunk-7EEPWHRK.mjs";
7
7
  import {
8
8
  describedPlay
9
- } from "./chunk-STYH5U6W.mjs";
9
+ } from "./chunk-MDMP2VS2.mjs";
10
10
  import {
11
11
  SCHEMA_LINE_LIMIT,
12
12
  addDescribeOptions,
@@ -16,19 +16,19 @@ import {
16
16
  examples,
17
17
  schemaLines,
18
18
  topLevelField
19
- } from "./chunk-B2LFDTXZ.mjs";
19
+ } from "./chunk-VB6KECLU.mjs";
20
20
  import "./chunk-OVDNJAJN.mjs";
21
21
  import "./chunk-DSWSEHRX.mjs";
22
22
  import "./chunk-H7HIDGZ7.mjs";
23
23
  import "./chunk-EDWJY6T4.mjs";
24
- import "./chunk-HSIVHAZA.mjs";
25
- import "./chunk-SJVJZOPT.mjs";
24
+ import "./chunk-CUKV3EXY.mjs";
25
+ import "./chunk-VD6KRRST.mjs";
26
26
  import "./chunk-Y6VOGHF2.mjs";
27
27
  import "./chunk-ERFN2QY4.mjs";
28
28
  import "./chunk-7E66A24V.mjs";
29
29
  import {
30
30
  DeeplineClient
31
- } from "./chunk-ZHXPNJQI.mjs";
31
+ } from "./chunk-ATK45XHI.mjs";
32
32
  import "./chunk-6IKARAYD.mjs";
33
33
  import "./chunk-CBVIJSHF.mjs";
34
34
  import "./chunk-WXLOW623.mjs";
@@ -36,13 +36,13 @@ import "./chunk-UFS752TU.mjs";
36
36
  import "./chunk-GAMFK2ZP.mjs";
37
37
  import {
38
38
  printCommandEnvelope
39
- } from "./chunk-M5QDOHLG.mjs";
40
- import "./chunk-4GP56LRE.mjs";
39
+ } from "./chunk-SHPLCIOL.mjs";
40
+ import "./chunk-JMDMPIGV.mjs";
41
41
  import "./chunk-DLIRSHV6.mjs";
42
42
  import {
43
43
  DeeplineError
44
44
  } from "./chunk-NXGCO4JB.mjs";
45
- import "./chunk-IG3GOO4T.mjs";
45
+ import "./chunk-3H5U7XCU.mjs";
46
46
  import "./chunk-WZYKRD7T.mjs";
47
47
  import "./chunk-KRD6H754.mjs";
48
48
 
@@ -231,6 +231,8 @@ async function describeAnything(name, options, onMissing) {
231
231
  outputs,
232
232
  rowInputs: _rowInputs,
233
233
  rowOutputs: _rowOutputs,
234
+ rowOutputsAddToSource: _rowOutputsAddToSource,
235
+ csvInput: _csvInput,
234
236
  ...summary
235
237
  } = described;
236
238
  const view = options.schemaOnly ? {