deepline 0.3.343 → 0.3.345

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 (96) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +9 -1
  3. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +240 -66
  4. package/dist/bundling-sources/shared_libs/plays/csv-text-repair.ts +145 -0
  5. package/dist/cli/auth-4HCZZPZH.js +31 -0
  6. package/dist/cli/{auth-IPOSX2NV.mjs → auth-YQSQYS2V.mjs} +4 -4
  7. package/dist/cli/{billing-CWTZDAOC.mjs → billing-HA75G3SK.mjs} +4 -4
  8. package/dist/cli/{billing-ZZKX4IFS.js → billing-JRP2ZFMV.js} +71 -71
  9. package/dist/cli/{chunk-JGW7AR5N.js → chunk-2OTDDG2J.js} +2 -2
  10. package/dist/cli/{chunk-UJFBO6QV.mjs → chunk-3XKBPPP7.mjs} +2 -2
  11. package/dist/cli/{chunk-ELZ4HEPQ.js → chunk-4INBT3OR.js} +225 -225
  12. package/dist/cli/{chunk-CVIAYYLR.mjs → chunk-5QPHJFNN.mjs} +2 -2
  13. package/dist/cli/{chunk-RB2ELEQ5.mjs → chunk-AW2G44QA.mjs} +4 -4
  14. package/dist/cli/{chunk-ZQFYR6NT.mjs → chunk-DOPNLW2H.mjs} +6 -6
  15. package/dist/cli/{chunk-FM36CTMM.js → chunk-EEPFLZ7V.js} +9 -9
  16. package/dist/cli/{chunk-U5L6FIIL.mjs → chunk-EWYAS4WD.mjs} +1 -1
  17. package/dist/cli/{chunk-ERFIHZXT.js → chunk-FBUWH67Y.js} +48 -48
  18. package/dist/cli/{chunk-XOX3Y5OP.js → chunk-FDH572QX.js} +45 -45
  19. package/dist/cli/{chunk-LY33N2W6.mjs → chunk-GGRQBO3S.mjs} +2 -2
  20. package/dist/cli/{chunk-JS7JVUZZ.js → chunk-IT6MAYZ3.js} +8 -8
  21. package/dist/cli/{chunk-IPEE3DIV.js → chunk-ITOJRSOU.js} +112 -24
  22. package/dist/cli/{chunk-W6LB26RC.mjs → chunk-JDSRPSES.mjs} +1 -1
  23. package/dist/cli/{chunk-RDXH4KXG.js → chunk-KXFPDFUO.js} +26 -26
  24. package/dist/cli/{chunk-QV2WIEUP.mjs → chunk-MLO7ZGSH.mjs} +2 -2
  25. package/dist/cli/{chunk-AUB3AW3P.js → chunk-MO6QJPEB.js} +4 -4
  26. package/dist/cli/{chunk-WBXTRZAX.mjs → chunk-N3GUUSDO.mjs} +1 -1
  27. package/dist/cli/{chunk-2Y2QZJBT.mjs → chunk-NTIWTBEH.mjs} +94 -6
  28. package/dist/cli/{chunk-KLEZD6JX.mjs → chunk-S3JKJL44.mjs} +5 -5
  29. package/dist/cli/{chunk-DEDNTNXS.mjs → chunk-TAX3OOC6.mjs} +1 -1
  30. package/dist/cli/{chunk-ZGIXGBKF.js → chunk-TDW3RU7S.js} +15 -15
  31. package/dist/cli/{chunk-FSNKEEBA.js → chunk-UJCHR3J3.js} +1 -1
  32. package/dist/cli/{chunk-63UBRDGC.js → chunk-URPZWUVN.js} +60 -60
  33. package/dist/cli/{chunk-BCF43TLG.js → chunk-WRTLSH6R.js} +8 -8
  34. package/dist/cli/{chunk-GISYO3JA.mjs → chunk-YGQ4AIK7.mjs} +3 -3
  35. package/dist/cli/{client-7ZUYHDCL.mjs → client-VKQGBPZ5.mjs} +3 -3
  36. package/dist/cli/client-VOXK5Z4D.js +20 -0
  37. package/dist/cli/{csv-7BL43EOB.js → csv-UNP7KAXF.js} +12 -12
  38. package/dist/cli/{csv-6CFRU4CQ.mjs → csv-ZFMAI2HY.mjs} +3 -3
  39. package/dist/cli/{db-RUKRHPBV.mjs → db-C5YWXRLY.mjs} +4 -4
  40. package/dist/cli/{db-EJETRBBT.js → db-LDLXC2JQ.js} +29 -29
  41. package/dist/cli/{describe-N46DGDQ4.js → describe-FO62H2CB.js} +15 -15
  42. package/dist/cli/{describe-AVBCGKX4.mjs → describe-UYNKJV6T.mjs} +8 -8
  43. package/dist/cli/{executions-OPBBBSDT.js → executions-DIADSK2E.js} +6 -6
  44. package/dist/cli/{executions-FCTCQYY3.mjs → executions-JYKV3GQJ.mjs} +4 -4
  45. package/dist/cli/{feedback-XY7F7FF6.mjs → feedback-4UEJJFRL.mjs} +3 -3
  46. package/dist/cli/{feedback-RSPSGS2W.js → feedback-YBO47O7G.js} +7 -7
  47. package/dist/cli/{git-ZQ534TRG.mjs → git-A6DPLCMU.mjs} +4 -4
  48. package/dist/cli/git-FPC5VIIK.js +23 -0
  49. package/dist/cli/index.js +79 -79
  50. package/dist/cli/index.mjs +31 -31
  51. package/dist/cli/{legacy-noops-WCLAYQNO.js → legacy-noops-F6TJLZV2.js} +7 -7
  52. package/dist/cli/{legacy-noops-S4Q4TBKQ.mjs → legacy-noops-HCAOJI7X.mjs} +4 -4
  53. package/dist/cli/{monitors-UD6C7YUQ.js → monitors-B5QFSFK7.js} +85 -85
  54. package/dist/cli/{monitors-7EONZILI.mjs → monitors-XYP7XNCT.mjs} +4 -4
  55. package/dist/cli/{org-EGED4FVT.js → org-NMWNBQZI.js} +60 -60
  56. package/dist/cli/{org-SPZF2UBU.mjs → org-O5VBVLSP.mjs} +4 -4
  57. package/dist/cli/play-D2SCAJXG.js +153 -0
  58. package/dist/cli/{play-KXWJX7RB.mjs → play-Z2STHYQB.mjs} +7 -7
  59. package/dist/cli/{providers-HWGPSJZ7.js → providers-BAPO54GE.js} +7 -7
  60. package/dist/cli/{providers-P2MRBKX2.mjs → providers-WGIJLFBZ.mjs} +4 -4
  61. package/dist/cli/{quickstart-CL4AB46M.js → quickstart-JGRMJ6M4.js} +5 -5
  62. package/dist/cli/{quickstart-VEEHUU7O.mjs → quickstart-LL6KUMJ5.mjs} +3 -3
  63. package/dist/cli/{search-D7CLJLVU.mjs → search-P7BVN4OI.mjs} +5 -5
  64. package/dist/cli/search-UNJN5P72.js +26 -0
  65. package/dist/cli/{secrets-ZDW4MTJL.mjs → secrets-5JHLILQD.mjs} +4 -4
  66. package/dist/cli/{secrets-NGB5OD2W.js → secrets-QUBFPBE5.js} +13 -13
  67. package/dist/cli/{sessions-HYUYIAHB.mjs → sessions-3BYS3WQZ.mjs} +4 -4
  68. package/dist/cli/{sessions-MTN3SBTL.js → sessions-TATDTEY6.js} +5 -5
  69. package/dist/cli/{settings-X43X7H54.js → settings-SLFYXPRP.js} +74 -74
  70. package/dist/cli/{settings-RMABGZ6N.mjs → settings-TXWQLO34.mjs} +7 -7
  71. package/dist/cli/{setup-QEM6U5TO.js → setup-A3CXCYRI.js} +41 -41
  72. package/dist/cli/{setup-N7KUH3AM.mjs → setup-XTAW2JS2.mjs} +6 -6
  73. package/dist/cli/{skills-H3STANPK.mjs → skills-P323CMPH.mjs} +4 -4
  74. package/dist/cli/skills-ZOUUC72T.js +28 -0
  75. package/dist/cli/{tools-FSEOJNTY.mjs → tools-FMSH7Z7I.mjs} +6 -6
  76. package/dist/cli/tools-O7TLYHFT.js +40 -0
  77. package/dist/cli/update-3LT6YSIP.js +28 -0
  78. package/dist/cli/{update-6BUK4OLS.mjs → update-CGKRTVOD.mjs} +6 -6
  79. package/dist/cli/{workflow-Q7RJGAKL.mjs → workflow-2DVIYBLG.mjs} +5 -5
  80. package/dist/cli/{workflow-4GZCYDZS.js → workflow-EFOSJKW7.js} +15 -15
  81. package/dist/index.js +6 -6
  82. package/dist/index.mjs +3 -3
  83. package/dist/install-integrity.json +75 -74
  84. package/dist/release.d.mts +1 -1
  85. package/dist/release.d.ts +1 -1
  86. package/dist/release.js +2 -2
  87. package/dist/release.mjs +1 -1
  88. package/package.json +1 -1
  89. package/dist/cli/auth-J2C5CQ7M.js +0 -31
  90. package/dist/cli/client-CCDQC7ZY.js +0 -20
  91. package/dist/cli/git-DZTOBIUF.js +0 -23
  92. package/dist/cli/play-5MDIQGCF.js +0 -153
  93. package/dist/cli/search-6H77HQL3.js +0 -26
  94. package/dist/cli/skills-7H2OD626.js +0 -28
  95. package/dist/cli/tools-UYW5T5PU.js +0 -40
  96. package/dist/cli/update-K743Q4EF.js +0 -28
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkAUB3AW3Pjs = require('./chunk-AUB3AW3P.js');
6
+ var _chunkMO6QJPEBjs = require('./chunk-MO6QJPEB.js');
7
7
 
8
8
 
9
9
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
@@ -131,20 +131,109 @@ var _os = require('os');
131
131
  var _path = require('path');
132
132
  var _child_process = require('child_process'); var childProcess = _interopRequireWildcard(_child_process);
133
133
  var _sync = require('csv-parse/sync');
134
+
135
+ // ../plays/csv-text-repair.ts
136
+ var CP1252_HIGH_TO_BYTE = /* @__PURE__ */ new Map([
137
+ [8364, 128],
138
+ [8218, 130],
139
+ [402, 131],
140
+ [8222, 132],
141
+ [8230, 133],
142
+ [8224, 134],
143
+ [8225, 135],
144
+ [710, 136],
145
+ [8240, 137],
146
+ [352, 138],
147
+ [8249, 139],
148
+ [338, 140],
149
+ [381, 142],
150
+ [8216, 145],
151
+ [8217, 146],
152
+ [8220, 147],
153
+ [8221, 148],
154
+ [8226, 149],
155
+ [8211, 150],
156
+ [8212, 151],
157
+ [732, 152],
158
+ [8482, 153],
159
+ [353, 154],
160
+ [8250, 155],
161
+ [339, 156],
162
+ [382, 158],
163
+ [376, 159]
164
+ ]);
165
+ var MAC_ROMAN_HIGH = "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7";
166
+ var MAC_ROMAN_TO_BYTE = new Map(
167
+ [...MAC_ROMAN_HIGH].map((ch, i) => [ch.codePointAt(0), 128 + i])
168
+ );
169
+ var STRICT_UTF8 = new TextDecoder("utf-8", { fatal: true });
170
+ function cp1252Byte(code) {
171
+ if (code < 256) return code;
172
+ return _nullishCoalesce(CP1252_HIGH_TO_BYTE.get(code), () => ( null));
173
+ }
174
+ function macRomanByte(code) {
175
+ if (code < 128) return code;
176
+ return _nullishCoalesce(MAC_ROMAN_TO_BYTE.get(code), () => ( null));
177
+ }
178
+ function decodeAs(run, toByte) {
179
+ const bytes = new Uint8Array(run.length);
180
+ let i = 0;
181
+ for (const ch of run) {
182
+ const byte = toByte(ch.codePointAt(0));
183
+ if (byte === null) return null;
184
+ bytes[i++] = byte;
185
+ }
186
+ if (!bytes.subarray(0, i).some((b) => b >= 194 && b <= 244)) return null;
187
+ try {
188
+ return STRICT_UTF8.decode(bytes.subarray(0, i));
189
+ } catch (e) {
190
+ return null;
191
+ }
192
+ }
193
+ var NON_ASCII_RUN = /[^\u0000-\u007f]+/g;
194
+ function repairMisdecodedText(value) {
195
+ if (!/[^\u0000-\u007f]/.test(value)) return value;
196
+ let changed = false;
197
+ const repaired = value.replace(NON_ASCII_RUN, (run) => {
198
+ const fixed = _nullishCoalesce(decodeAs(run, cp1252Byte), () => ( decodeAs(run, macRomanByte)));
199
+ if (fixed === null || fixed === run) return run;
200
+ changed = true;
201
+ return fixed;
202
+ });
203
+ return changed ? repaired : value;
204
+ }
205
+ function repairRecordText(record) {
206
+ for (const key of Object.keys(record)) {
207
+ const value = record[key];
208
+ if (typeof value === "string") {
209
+ record[key] = repairMisdecodedText(value);
210
+ }
211
+ }
212
+ return record;
213
+ }
214
+ function csvInputTextOptions() {
215
+ return {
216
+ bom: true,
217
+ columns: (header) => header.map(repairMisdecodedText),
218
+ on_record: repairRecordText
219
+ };
220
+ }
221
+
222
+ // src/cli/utils.ts
134
223
  var _sync3 = require('csv-stringify/sync');
135
224
  var BROWSER_OPEN_COOLDOWN_MS = 3e4;
136
225
  var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
137
226
  var defaultBrowserCommandRunner = childProcess;
138
227
  function getAuthedHttpClient() {
139
- const config = _chunkAUB3AW3Pjs.resolveConfig.call(void 0, );
140
- return { config, http: new (0, _chunkAUB3AW3Pjs.HttpClient)(config) };
228
+ const config = _chunkMO6QJPEBjs.resolveConfig.call(void 0, );
229
+ return { config, http: new (0, _chunkMO6QJPEBjs.HttpClient)(config) };
141
230
  }
142
231
  function stableOsUserId() {
143
232
  try {
144
233
  const info = _os.userInfo.call(void 0, );
145
234
  if (typeof info.uid === "number") return `uid-${info.uid}`;
146
235
  if (info.username) return `user-${info.username}`;
147
- } catch (e) {
236
+ } catch (e2) {
148
237
  }
149
238
  return "unknown-user";
150
239
  }
@@ -171,7 +260,7 @@ function claimBrowserOpen(now = Date.now(), stateDir, targetUrl) {
171
260
  try {
172
261
  _fs.mkdirSync.call(void 0, lockPath, { mode: 448 });
173
262
  locked = true;
174
- } catch (e2) {
263
+ } catch (e3) {
175
264
  return false;
176
265
  }
177
266
  let lastOpenedAt = 0;
@@ -200,7 +289,7 @@ function claimBrowserOpen(now = Date.now(), stateDir, targetUrl) {
200
289
  { encoding: "utf-8", mode: 384 }
201
290
  );
202
291
  return true;
203
- } catch (e3) {
292
+ } catch (e4) {
204
293
  return true;
205
294
  } finally {
206
295
  if (locked) {
@@ -212,7 +301,7 @@ function extractUrlHost(raw) {
212
301
  try {
213
302
  const parsed = new URL(raw.includes("://") ? raw : `https://${raw}`);
214
303
  return parsed.port ? `${parsed.hostname.toLowerCase()}:${parsed.port}` : parsed.hostname.toLowerCase();
215
- } catch (e4) {
304
+ } catch (e5) {
216
305
  return "";
217
306
  }
218
307
  }
@@ -233,7 +322,7 @@ function browserAppNameFromBundleId(bundleId) {
233
322
  function currentOsUsername() {
234
323
  try {
235
324
  return _os.userInfo.call(void 0, ).username || "";
236
- } catch (e5) {
325
+ } catch (e6) {
237
326
  return "";
238
327
  }
239
328
  }
@@ -249,7 +338,7 @@ function readMacosUserHome(runner = defaultBrowserCommandRunner) {
249
338
  const match = String(output).match(/NFSHomeDirectory:\s*(.+)\s*$/m);
250
339
  const home = _optionalChain([match, 'optionalAccess', _ => _[1], 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]);
251
340
  if (home) return home;
252
- } catch (e6) {
341
+ } catch (e7) {
253
342
  }
254
343
  }
255
344
  return _os.homedir.call(void 0, );
@@ -283,7 +372,7 @@ function readDefaultMacBrowserBundleId(runner = defaultBrowserCommandRunner) {
283
372
  return "";
284
373
  };
285
374
  return pickBundle("https") || pickBundle("http");
286
- } catch (e7) {
375
+ } catch (e8) {
287
376
  return "";
288
377
  }
289
378
  }
@@ -399,7 +488,7 @@ function hasOnlyHeadlessMacosBrowserInstances(appName, runner = defaultBrowserCo
399
488
  return lines.every(
400
489
  (line) => line.includes("--headless") || line.includes("--no-startup-window")
401
490
  );
402
- } catch (e8) {
491
+ } catch (e9) {
403
492
  return false;
404
493
  }
405
494
  }
@@ -413,7 +502,7 @@ function openNewVisibleMacosBrowserInstance(appName, targetUrl, runner = default
413
502
  }
414
503
  );
415
504
  return true;
416
- } catch (e9) {
505
+ } catch (e10) {
417
506
  return false;
418
507
  }
419
508
  }
@@ -435,7 +524,7 @@ function openUrlMacos(targetUrl, allowFocus, runner = defaultBrowserCommandRunne
435
524
  stdio: "ignore"
436
525
  });
437
526
  return true;
438
- } catch (e10) {
527
+ } catch (e11) {
439
528
  return false;
440
529
  }
441
530
  }
@@ -464,7 +553,7 @@ function openInBrowser(url, options = {}) {
464
553
  }
465
554
  childProcess.execFileSync("xdg-open", [targetUrl], { stdio: "ignore" });
466
555
  return "opened";
467
- } catch (e11) {
556
+ } catch (e12) {
468
557
  return "failed";
469
558
  }
470
559
  }
@@ -477,7 +566,7 @@ function collectLocalEnvInfo() {
477
566
  os: `${process.platform} ${process.arch}`,
478
567
  node_version: process.version,
479
568
  home_dir: homeDir,
480
- agent_runtime: _chunkAUB3AW3Pjs.detectAgentRuntime.call(void 0, )
569
+ agent_runtime: _chunkMO6QJPEBjs.detectAgentRuntime.call(void 0, )
481
570
  };
482
571
  const env = process.env;
483
572
  const optional = {
@@ -504,11 +593,10 @@ function collectLocalEnvInfo() {
504
593
  function readCsvRows(csvPath) {
505
594
  const raw = _fs.readFileSync.call(void 0, _path.resolve.call(void 0, csvPath), "utf-8");
506
595
  return _sync.parse.call(void 0, raw, {
507
- // `csv-parse` otherwise treats a BOM before an opening quote as a field
508
- // value, then rejects the quote as invalid. A UTF-8 BOM is a valid file
509
- // prefix and must not become part of the first column name either.
510
- bom: true,
511
- columns: true,
596
+ // Strips the UTF-8 BOM (`csv-parse` otherwise treats one before an opening
597
+ // quote as a field value) and repairs mis-decoded UTF-8 in headers and
598
+ // cells, matching what the Play runtime does with the same file.
599
+ ...csvInputTextOptions(),
512
600
  skip_empty_lines: true
513
601
  });
514
602
  }
@@ -576,7 +664,7 @@ function csvSafeJsonString(value) {
576
664
  try {
577
665
  const serialized = JSON.stringify(value, csvSafeJsonReplacer);
578
666
  return _nullishCoalesce(serialized, () => ( null));
579
- } catch (e12) {
667
+ } catch (e13) {
580
668
  return String(value);
581
669
  }
582
670
  }
@@ -590,7 +678,7 @@ function parseMaybeJsonObject(value) {
590
678
  }
591
679
  try {
592
680
  return JSON.parse(trimmed);
593
- } catch (e13) {
681
+ } catch (e14) {
594
682
  return value;
595
683
  }
596
684
  }
@@ -725,9 +813,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
725
813
  }
726
814
  function withAgentCommandContext(value) {
727
815
  const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
728
- return _chunkAUB3AW3Pjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
816
+ return _chunkMO6QJPEBjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
729
817
  ...valueRecord,
730
- command_context: _chunkAUB3AW3Pjs.resolveCliCommandContext.call(void 0, )
818
+ command_context: _chunkMO6QJPEBjs.resolveCliCommandContext.call(void 0, )
731
819
  } : value;
732
820
  }
733
821
  function printJson(value, fields) {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-DLIRSHV6.mjs";
5
5
  import {
6
6
  SDK_RELEASE
7
- } from "./chunk-U5L6FIIL.mjs";
7
+ } from "./chunk-EWYAS4WD.mjs";
8
8
  import {
9
9
  DeeplineError,
10
10
  TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkIPEE3DIVjs = require('./chunk-IPEE3DIV.js');
5
+ var _chunkITOJRSOUjs = require('./chunk-ITOJRSOU.js');
6
6
 
7
7
 
8
- var _chunkAUB3AW3Pjs = require('./chunk-AUB3AW3P.js');
8
+ var _chunkMO6QJPEBjs = require('./chunk-MO6QJPEB.js');
9
9
 
10
10
  // src/cli/commands/git.ts
11
11
  function shellQuote(value) {
@@ -32,11 +32,11 @@ function renderDeployment(deployment) {
32
32
  return `${deployment.id} ${source} (${kind}) - ${deployment.status}${suffix}`;
33
33
  }
34
34
  async function handleList(options) {
35
- const { http } = _chunkIPEE3DIVjs.getAuthedHttpClient.call(void 0, );
35
+ const { http } = _chunkITOJRSOUjs.getAuthedHttpClient.call(void 0, );
36
36
  const payload = await http.get(
37
37
  `/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
38
38
  );
39
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
39
+ _chunkITOJRSOUjs.printCommandEnvelope.call(void 0,
40
40
  {
41
41
  projects: payload.projects,
42
42
  count: payload.projects.length,
@@ -73,7 +73,7 @@ function describeInstallationStatus(installation) {
73
73
  }
74
74
  }
75
75
  async function handleStatus(options) {
76
- const { http } = _chunkIPEE3DIVjs.getAuthedHttpClient.call(void 0, );
76
+ const { http } = _chunkITOJRSOUjs.getAuthedHttpClient.call(void 0, );
77
77
  const payload = await http.get("/api/v2/github/installation");
78
78
  const installation = payload.installation;
79
79
  const others = (_nullishCoalesce(payload.installations, () => ( []))).filter(
@@ -136,7 +136,7 @@ async function handleStatus(options) {
136
136
  )
137
137
  );
138
138
  }
139
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
139
+ _chunkITOJRSOUjs.printCommandEnvelope.call(void 0,
140
140
  {
141
141
  installation,
142
142
  installations: _nullishCoalesce(payload.installations, () => ( [])),
@@ -147,10 +147,10 @@ async function handleStatus(options) {
147
147
  );
148
148
  }
149
149
  async function handleRepos(options) {
150
- const { http } = _chunkIPEE3DIVjs.getAuthedHttpClient.call(void 0, );
150
+ const { http } = _chunkITOJRSOUjs.getAuthedHttpClient.call(void 0, );
151
151
  const query = options.installation ? `?installationId=${encodeURIComponent(options.installation)}` : "";
152
152
  const payload = await http.get(`/api/v2/github/repos${query}`);
153
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
153
+ _chunkITOJRSOUjs.printCommandEnvelope.call(void 0,
154
154
  {
155
155
  installation: payload.installation,
156
156
  repositories: payload.repositories,
@@ -171,7 +171,7 @@ async function handleRepos(options) {
171
171
  }
172
172
  async function resolveRepoId(repo, installation) {
173
173
  if (/^\d+$/.test(repo)) return Number(repo);
174
- const { http } = _chunkIPEE3DIVjs.getAuthedHttpClient.call(void 0, );
174
+ const { http } = _chunkITOJRSOUjs.getAuthedHttpClient.call(void 0, );
175
175
  const query = installation ? `?installationId=${encodeURIComponent(installation)}` : "";
176
176
  const payload = await http.get(
177
177
  `/api/v2/github/repos${query}`
@@ -188,7 +188,7 @@ async function resolveRepoId(repo, installation) {
188
188
  }
189
189
  async function handleLink(repo, options) {
190
190
  const repoId = await resolveRepoId(repo, options.installation);
191
- const { http } = _chunkIPEE3DIVjs.getAuthedHttpClient.call(void 0, );
191
+ const { http } = _chunkITOJRSOUjs.getAuthedHttpClient.call(void 0, );
192
192
  const payload = await http.post("/api/v2/play-projects", {
193
193
  repoId,
194
194
  ...options.installation !== void 0 ? { installationId: options.installation } : {},
@@ -197,7 +197,7 @@ async function handleLink(repo, options) {
197
197
  ...options.branch !== void 0 ? { productionBranch: options.branch } : {},
198
198
  ...options.prChecks !== void 0 ? { checkOnPullRequest: options.prChecks } : {}
199
199
  });
200
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
200
+ _chunkITOJRSOUjs.printCommandEnvelope.call(void 0,
201
201
  {
202
202
  project: payload.project,
203
203
  render: {
@@ -220,11 +220,11 @@ async function handleLink(repo, options) {
220
220
  );
221
221
  }
222
222
  async function handleGet(id, options) {
223
- const { http } = _chunkIPEE3DIVjs.getAuthedHttpClient.call(void 0, );
223
+ const { http } = _chunkITOJRSOUjs.getAuthedHttpClient.call(void 0, );
224
224
  const payload = await http.get(
225
225
  `/api/v2/play-projects/${encodeURIComponent(id)}`
226
226
  );
227
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
227
+ _chunkITOJRSOUjs.printCommandEnvelope.call(void 0,
228
228
  {
229
229
  project: payload.project,
230
230
  render: {
@@ -240,7 +240,7 @@ async function handleGet(id, options) {
240
240
  );
241
241
  }
242
242
  async function handleSet(id, options) {
243
- const { http } = _chunkIPEE3DIVjs.getAuthedHttpClient.call(void 0, );
243
+ const { http } = _chunkITOJRSOUjs.getAuthedHttpClient.call(void 0, );
244
244
  const payload = await http.patch(
245
245
  `/api/v2/play-projects/${encodeURIComponent(id)}`,
246
246
  {
@@ -251,7 +251,7 @@ async function handleSet(id, options) {
251
251
  ...options.disabled !== void 0 ? { disabled: options.disabled } : {}
252
252
  }
253
253
  );
254
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
254
+ _chunkITOJRSOUjs.printCommandEnvelope.call(void 0,
255
255
  {
256
256
  project: payload.project,
257
257
  render: {
@@ -264,9 +264,9 @@ async function handleSet(id, options) {
264
264
  );
265
265
  }
266
266
  async function handleUnlink(id, options) {
267
- const { http } = _chunkIPEE3DIVjs.getAuthedHttpClient.call(void 0, );
267
+ const { http } = _chunkITOJRSOUjs.getAuthedHttpClient.call(void 0, );
268
268
  await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
269
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
269
+ _chunkITOJRSOUjs.printCommandEnvelope.call(void 0,
270
270
  {
271
271
  ok: true,
272
272
  id,
@@ -286,10 +286,10 @@ async function handleUnlink(id, options) {
286
286
  );
287
287
  }
288
288
  async function handleConnect(options) {
289
- const baseUrl = _chunkAUB3AW3Pjs.resolveBaseUrlOnly.call(void 0, );
289
+ const baseUrl = _chunkMO6QJPEBjs.resolveBaseUrlOnly.call(void 0, );
290
290
  const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
291
- const opened = _chunkIPEE3DIVjs.openInBrowser.call(void 0, connectUrl);
292
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
291
+ const opened = _chunkITOJRSOUjs.openInBrowser.call(void 0, connectUrl);
292
+ _chunkITOJRSOUjs.printCommandEnvelope.call(void 0,
293
293
  {
294
294
  connectUrl,
295
295
  browser: opened,
@@ -311,7 +311,7 @@ async function handleConnect(options) {
311
311
  );
312
312
  }
313
313
  async function handleDeploymentsList(options) {
314
- const { http } = _chunkIPEE3DIVjs.getAuthedHttpClient.call(void 0, );
314
+ const { http } = _chunkITOJRSOUjs.getAuthedHttpClient.call(void 0, );
315
315
  const query = new URLSearchParams();
316
316
  if (options.repo) query.set("projectId", options.repo);
317
317
  if (options.limit) query.set("limit", options.limit);
@@ -319,7 +319,7 @@ async function handleDeploymentsList(options) {
319
319
  const payload = await http.get(
320
320
  `/api/v2/deployments${suffix}`
321
321
  );
322
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
322
+ _chunkITOJRSOUjs.printCommandEnvelope.call(void 0,
323
323
  {
324
324
  deployments: payload.deployments,
325
325
  count: payload.deployments.length,
@@ -363,12 +363,12 @@ function renderDeploymentMonitorLines(results) {
363
363
  ]);
364
364
  }
365
365
  async function handleDeploymentGet(id, options) {
366
- const { http } = _chunkIPEE3DIVjs.getAuthedHttpClient.call(void 0, );
366
+ const { http } = _chunkITOJRSOUjs.getAuthedHttpClient.call(void 0, );
367
367
  const payload = await http.get(`/api/v2/deployments/${encodeURIComponent(id)}`);
368
368
  const playLines = renderDeploymentPlayLines(payload.deployment.results);
369
369
  const monitorLines = renderDeploymentMonitorLines(payload.deployment.results);
370
370
  const repository = _nullishCoalesce(_optionalChain([payload, 'access', _10 => _10.project, 'optionalAccess', _11 => _11.repoFullName]), () => ( payload.deployment.repoFullName));
371
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
371
+ _chunkITOJRSOUjs.printCommandEnvelope.call(void 0,
372
372
  {
373
373
  deployment: payload.deployment,
374
374
  project: payload.project,
@@ -387,9 +387,9 @@ async function handleDeploymentGet(id, options) {
387
387
  );
388
388
  }
389
389
  async function handleDeploymentCancel(id, options) {
390
- const { http } = _chunkIPEE3DIVjs.getAuthedHttpClient.call(void 0, );
390
+ const { http } = _chunkITOJRSOUjs.getAuthedHttpClient.call(void 0, );
391
391
  const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
392
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
392
+ _chunkITOJRSOUjs.printCommandEnvelope.call(void 0,
393
393
  {
394
394
  cancelled: payload.cancelled,
395
395
  deployment: payload.deployment,
@@ -2,7 +2,7 @@ import {
2
2
  argsWantJson,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-2Y2QZJBT.mjs";
5
+ } from "./chunk-NTIWTBEH.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-W6LB26RC.mjs";
28
+ } from "./chunk-JDSRPSES.mjs";
29
29
 
30
30
  // src/cli/commands/auth.ts
31
31
  import {
@@ -4,7 +4,7 @@
4
4
  var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
5
5
 
6
6
 
7
- var _chunkFSNKEEBAjs = require('./chunk-FSNKEEBA.js');
7
+ var _chunkUJCHR3J3js = require('./chunk-UJCHR3J3.js');
8
8
 
9
9
 
10
10
 
@@ -743,9 +743,9 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
743
743
  }
744
744
 
745
745
  // src/version.ts
746
- var SDK_VERSION = _chunkFSNKEEBAjs.SDK_RELEASE.version;
747
- var SDK_API_MAJOR = _chunkFSNKEEBAjs.SDK_RELEASE.contracts.api.currentMajor;
748
- var SDK_API_CONTRACT = _nullishCoalesce(_chunkFSNKEEBAjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
746
+ var SDK_VERSION = _chunkUJCHR3J3js.SDK_RELEASE.version;
747
+ var SDK_API_MAJOR = _chunkUJCHR3J3js.SDK_RELEASE.contracts.api.currentMajor;
748
+ var SDK_API_CONTRACT = _nullishCoalesce(_chunkUJCHR3J3js.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
749
749
 
750
750
  // src/agent-runtime.ts
751
751
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveShellSpawn
3
- } from "./chunk-UJFBO6QV.mjs";
3
+ } from "./chunk-3XKBPPP7.mjs";
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  import { spawnSync } from "child_process";
@@ -3,7 +3,7 @@ import {
3
3
  detectAgentRuntime,
4
4
  resolveCliCommandContext,
5
5
  resolveConfig
6
- } from "./chunk-W6LB26RC.mjs";
6
+ } from "./chunk-JDSRPSES.mjs";
7
7
  import {
8
8
  DeeplineError
9
9
  } from "./chunk-NXGCO4JB.mjs";
@@ -131,6 +131,95 @@ import { homedir, tmpdir, userInfo } from "os";
131
131
  import { dirname, join, resolve } from "path";
132
132
  import * as childProcess from "child_process";
133
133
  import { parse } from "csv-parse/sync";
134
+
135
+ // ../plays/csv-text-repair.ts
136
+ var CP1252_HIGH_TO_BYTE = /* @__PURE__ */ new Map([
137
+ [8364, 128],
138
+ [8218, 130],
139
+ [402, 131],
140
+ [8222, 132],
141
+ [8230, 133],
142
+ [8224, 134],
143
+ [8225, 135],
144
+ [710, 136],
145
+ [8240, 137],
146
+ [352, 138],
147
+ [8249, 139],
148
+ [338, 140],
149
+ [381, 142],
150
+ [8216, 145],
151
+ [8217, 146],
152
+ [8220, 147],
153
+ [8221, 148],
154
+ [8226, 149],
155
+ [8211, 150],
156
+ [8212, 151],
157
+ [732, 152],
158
+ [8482, 153],
159
+ [353, 154],
160
+ [8250, 155],
161
+ [339, 156],
162
+ [382, 158],
163
+ [376, 159]
164
+ ]);
165
+ var MAC_ROMAN_HIGH = "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7";
166
+ var MAC_ROMAN_TO_BYTE = new Map(
167
+ [...MAC_ROMAN_HIGH].map((ch, i) => [ch.codePointAt(0), 128 + i])
168
+ );
169
+ var STRICT_UTF8 = new TextDecoder("utf-8", { fatal: true });
170
+ function cp1252Byte(code) {
171
+ if (code < 256) return code;
172
+ return CP1252_HIGH_TO_BYTE.get(code) ?? null;
173
+ }
174
+ function macRomanByte(code) {
175
+ if (code < 128) return code;
176
+ return MAC_ROMAN_TO_BYTE.get(code) ?? null;
177
+ }
178
+ function decodeAs(run, toByte) {
179
+ const bytes = new Uint8Array(run.length);
180
+ let i = 0;
181
+ for (const ch of run) {
182
+ const byte = toByte(ch.codePointAt(0));
183
+ if (byte === null) return null;
184
+ bytes[i++] = byte;
185
+ }
186
+ if (!bytes.subarray(0, i).some((b) => b >= 194 && b <= 244)) return null;
187
+ try {
188
+ return STRICT_UTF8.decode(bytes.subarray(0, i));
189
+ } catch {
190
+ return null;
191
+ }
192
+ }
193
+ var NON_ASCII_RUN = /[^\u0000-\u007f]+/g;
194
+ function repairMisdecodedText(value) {
195
+ if (!/[^\u0000-\u007f]/.test(value)) return value;
196
+ let changed = false;
197
+ const repaired = value.replace(NON_ASCII_RUN, (run) => {
198
+ const fixed = decodeAs(run, cp1252Byte) ?? decodeAs(run, macRomanByte);
199
+ if (fixed === null || fixed === run) return run;
200
+ changed = true;
201
+ return fixed;
202
+ });
203
+ return changed ? repaired : value;
204
+ }
205
+ function repairRecordText(record) {
206
+ for (const key of Object.keys(record)) {
207
+ const value = record[key];
208
+ if (typeof value === "string") {
209
+ record[key] = repairMisdecodedText(value);
210
+ }
211
+ }
212
+ return record;
213
+ }
214
+ function csvInputTextOptions() {
215
+ return {
216
+ bom: true,
217
+ columns: (header) => header.map(repairMisdecodedText),
218
+ on_record: repairRecordText
219
+ };
220
+ }
221
+
222
+ // src/cli/utils.ts
134
223
  import { stringify } from "csv-stringify/sync";
135
224
  var BROWSER_OPEN_COOLDOWN_MS = 3e4;
136
225
  var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
@@ -504,11 +593,10 @@ function collectLocalEnvInfo() {
504
593
  function readCsvRows(csvPath) {
505
594
  const raw = readFileSync(resolve(csvPath), "utf-8");
506
595
  return parse(raw, {
507
- // `csv-parse` otherwise treats a BOM before an opening quote as a field
508
- // value, then rejects the quote as invalid. A UTF-8 BOM is a valid file
509
- // prefix and must not become part of the first column name either.
510
- bom: true,
511
- columns: true,
596
+ // Strips the UTF-8 BOM (`csv-parse` otherwise treats one before an opening
597
+ // quote as a field value) and repairs mis-decoded UTF-8 in headers and
598
+ // cells, matching what the Play runtime does with the same file.
599
+ ...csvInputTextOptions(),
512
600
  skip_empty_lines: true
513
601
  });
514
602
  }
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  recentSearchRef,
12
12
  registerDeprecatedSearchCommand
13
- } from "./chunk-GISYO3JA.mjs";
13
+ } from "./chunk-YGQ4AIK7.mjs";
14
14
  import {
15
15
  extractSummaryFields,
16
16
  projectRowOutput,
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  DeeplineClient,
24
24
  validateExecutionIdempotencyKey
25
- } from "./chunk-DEDNTNXS.mjs";
25
+ } from "./chunk-TAX3OOC6.mjs";
26
26
  import {
27
27
  beginToolExecuteCommand,
28
28
  getToolExecuteInvocationId,
@@ -36,11 +36,11 @@ import {
36
36
  printJsonError,
37
37
  renderCommandEnvelopeText,
38
38
  shouldEmitJson
39
- } from "./chunk-2Y2QZJBT.mjs";
39
+ } from "./chunk-NTIWTBEH.mjs";
40
40
  import {
41
41
  resolveConfig,
42
42
  sdkCliStateDirPath
43
- } from "./chunk-W6LB26RC.mjs";
43
+ } from "./chunk-JDSRPSES.mjs";
44
44
  import {
45
45
  playToolListGetterMode
46
46
  } from "./chunk-NTVTZAVZ.mjs";
@@ -1029,7 +1029,7 @@ Examples:
1029
1029
  process.exitCode = await narrowView();
1030
1030
  return;
1031
1031
  }
1032
- const { describeAnything } = await import("./describe-AVBCGKX4.mjs");
1032
+ const { describeAnything } = await import("./describe-UYNKJV6T.mjs");
1033
1033
  process.exitCode = await describeAnything(
1034
1034
  toolId,
1035
1035
  { ...options, kinds: ["tools", "monitors"], fetchedTool: metadata },
@@ -15,7 +15,7 @@ import {
15
15
  RETAINED_PIPELINE_RECEIVERS_HEADER,
16
16
  RUNTIME_ENVIRONMENT_TOKEN_HEADER,
17
17
  resolveConfig
18
- } from "./chunk-W6LB26RC.mjs";
18
+ } from "./chunk-JDSRPSES.mjs";
19
19
  import {
20
20
  PLAY_RUNTIME_BACKENDS,
21
21
  RAW_V2_TOOL_RESPONSE_CONTRACT,