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
@@ -2,7 +2,7 @@ import {
2
2
  addDescribeOptions,
3
3
  recordPlayTermination,
4
4
  schemaFields
5
- } from "./chunk-B2LFDTXZ.mjs";
5
+ } from "./chunk-VB6KECLU.mjs";
6
6
  import {
7
7
  shellQuote
8
8
  } from "./chunk-OVDNJAJN.mjs";
@@ -19,11 +19,11 @@ import {
19
19
  } from "./chunk-EDWJY6T4.mjs";
20
20
  import {
21
21
  registerDeprecatedSearchCommand
22
- } from "./chunk-HSIVHAZA.mjs";
22
+ } from "./chunk-CUKV3EXY.mjs";
23
23
  import {
24
24
  handleDeploymentGet,
25
25
  handleDeploymentsList
26
- } from "./chunk-SJVJZOPT.mjs";
26
+ } from "./chunk-VD6KRRST.mjs";
27
27
  import {
28
28
  pinLocalPlayImports,
29
29
  planLocalPlayExecution
@@ -42,7 +42,7 @@ import {
42
42
  normalizeRunEventOperationRequest,
43
43
  parseLogLevel,
44
44
  playInputExampleArgs
45
- } from "./chunk-ZHXPNJQI.mjs";
45
+ } from "./chunk-ATK45XHI.mjs";
46
46
  import {
47
47
  CSV_DATA_INPUT_KEY,
48
48
  buildNamedPlayRunRequest,
@@ -75,10 +75,10 @@ import {
75
75
  printJsonError,
76
76
  renderCommandEnvelopeText,
77
77
  shouldEmitJson
78
- } from "./chunk-M5QDOHLG.mjs";
78
+ } from "./chunk-SHPLCIOL.mjs";
79
79
  import {
80
80
  fetchWithDeploymentProtection
81
- } from "./chunk-4GP56LRE.mjs";
81
+ } from "./chunk-JMDMPIGV.mjs";
82
82
  import {
83
83
  DeeplineError
84
84
  } from "./chunk-NXGCO4JB.mjs";
@@ -15362,7 +15362,11 @@ function describedPlay(play) {
15362
15362
  inputs: schemaFields(play.inputSchema),
15363
15363
  outputs: schemaFields(play.outputSchema),
15364
15364
  ...rowInputs.length ? { rowInputs } : {},
15365
- ...rowOutputs.length ? { rowOutputs } : {},
15365
+ ...typeof csv.inputField === "string" ? { csvInput: csv.inputField } : {},
15366
+ ...rowOutputs.length ? {
15367
+ rowOutputs,
15368
+ rowOutputsAddToSource: Object.keys(added).length > 0 || rowOutput.preservesSourceColumns === true
15369
+ } : {},
15366
15370
  runner: {
15367
15371
  via: "play",
15368
15372
  reference,
@@ -16494,7 +16498,7 @@ Examples:
16494
16498
  process.exitCode = await ownView();
16495
16499
  return;
16496
16500
  }
16497
- const { describeAnything } = await import("./describe-EOBOGTB5.mjs");
16501
+ const { describeAnything } = await import("./describe-E6WVN74T.mjs");
16498
16502
  process.exitCode = await describeAnything(
16499
16503
  name,
16500
16504
  {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveShellSpawn
3
- } from "./chunk-QEEIEHGV.mjs";
3
+ } from "./chunk-FVFKLSMD.mjs";
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  import { 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 _chunkDAG4ZBTJjs = require('./chunk-DAG4ZBTJ.js');
3
+ var _chunkGPM3AZXBjs = require('./chunk-GPM3AZXB.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkGN5QM2BBjs = require('./chunk-GN5QM2BB.js');
7
+ var _chunkSQPNP3IQjs = require('./chunk-SQPNP3IQ.js');
8
8
 
9
9
 
10
10
 
11
- var _chunkIQTHRG6Ejs = require('./chunk-IQTHRG6E.js');
11
+ var _chunkY72FFPX5js = require('./chunk-Y72FFPX5.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, _chunkIQTHRG6Ejs.sdkCliStateDirPath.call(void 0, _chunkIQTHRG6Ejs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
21
+ return _path.join.call(void 0, _chunkY72FFPX5js.sdkCliStateDirPath.call(void 0, _chunkY72FFPX5js.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 _chunkGN5QM2BBjs.renderCommandEnvelopeText.call(void 0, result);
262
+ return _chunkSQPNP3IQjs.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
- ${_chunkGN5QM2BBjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
286
+ ${_chunkSQPNP3IQjs.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, _chunkDAG4ZBTJjs.DeeplineClient)().search({
363
+ const { search_ref: searchRef, ...result } = await new (0, _chunkGPM3AZXBjs.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
- _chunkGN5QM2BBjs.printCommandEnvelope.call(void 0, result, {
377
+ _chunkSQPNP3IQjs.printCommandEnvelope.call(void 0, result, {
378
378
  json: options.json === true,
379
379
  text: renderSearchResults(result)
380
380
  });
@@ -2,7 +2,7 @@ import {
2
2
  argsWantJson,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-M5QDOHLG.mjs";
5
+ } from "./chunk-SHPLCIOL.mjs";
6
6
  import {
7
7
  ACTIVE_ORG_ID_ENV,
8
8
  ACTIVE_ORG_NAME_ENV,
@@ -25,7 +25,7 @@ import {
25
25
  saveHostEnvValues,
26
26
  saveProjectDeeplineEnvValues,
27
27
  storedHostApiKey
28
- } from "./chunk-4GP56LRE.mjs";
28
+ } from "./chunk-JMDMPIGV.mjs";
29
29
 
30
30
  // src/cli/commands/auth.ts
31
31
  import {
@@ -3,7 +3,7 @@ import {
3
3
  detectAgentRuntime,
4
4
  resolveCliCommandContext,
5
5
  resolveConfig
6
- } from "./chunk-4GP56LRE.mjs";
6
+ } from "./chunk-JMDMPIGV.mjs";
7
7
  import {
8
8
  DeeplineError
9
9
  } from "./chunk-NXGCO4JB.mjs";
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkIQTHRG6Ejs = require('./chunk-IQTHRG6E.js');
6
+ var _chunkY72FFPX5js = require('./chunk-Y72FFPX5.js');
7
7
 
8
8
 
9
9
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
@@ -225,8 +225,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
225
225
  var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
226
226
  var defaultBrowserCommandRunner = childProcess;
227
227
  function getAuthedHttpClient() {
228
- const config = _chunkIQTHRG6Ejs.resolveConfig.call(void 0, );
229
- return { config, http: new (0, _chunkIQTHRG6Ejs.HttpClient)(config) };
228
+ const config = _chunkY72FFPX5js.resolveConfig.call(void 0, );
229
+ return { config, http: new (0, _chunkY72FFPX5js.HttpClient)(config) };
230
230
  }
231
231
  function stableOsUserId() {
232
232
  try {
@@ -566,7 +566,7 @@ function collectLocalEnvInfo() {
566
566
  os: `${process.platform} ${process.arch}`,
567
567
  node_version: process.version,
568
568
  home_dir: homeDir,
569
- agent_runtime: _chunkIQTHRG6Ejs.detectAgentRuntime.call(void 0, )
569
+ agent_runtime: _chunkY72FFPX5js.detectAgentRuntime.call(void 0, )
570
570
  };
571
571
  const env = process.env;
572
572
  const optional = {
@@ -813,9 +813,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
813
813
  }
814
814
  function withAgentCommandContext(value) {
815
815
  const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
816
- return _chunkIQTHRG6Ejs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
816
+ return _chunkY72FFPX5js.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
817
817
  ...valueRecord,
818
- command_context: _chunkIQTHRG6Ejs.resolveCliCommandContext.call(void 0, )
818
+ command_context: _chunkY72FFPX5js.resolveCliCommandContext.call(void 0, )
819
819
  } : value;
820
820
  }
821
821
  function printJson(value, fields) {
@@ -4,6 +4,7 @@ import {
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
+ (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 (!columns?.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 (!columns?.length) return described.outputs;
279
+ const typed = (field) => ({
280
+ ...field,
281
+ type: `PlayDataset<${SHAPE}>`,
282
+ fields: columns,
283
+ ...described.rowOutputsAddToSource ? { spread: 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:", described.rowInputs ?? []],
227
- ["Outputs:", described.outputs],
228
- ["Columns added to each row:", 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 ? 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
  ),
@@ -2,10 +2,10 @@ import {
2
2
  getAuthedHttpClient,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-M5QDOHLG.mjs";
5
+ } from "./chunk-SHPLCIOL.mjs";
6
6
  import {
7
7
  resolveBaseUrlOnly
8
- } from "./chunk-4GP56LRE.mjs";
8
+ } from "./chunk-JMDMPIGV.mjs";
9
9
 
10
10
  // src/cli/commands/git.ts
11
11
  function shellQuote(value) {