deepline 0.3.396 → 0.3.398

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 (118) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +2 -2
  3. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +50 -26
  4. package/dist/cli/auth-3GA2ASQF.js +40 -0
  5. package/dist/cli/{auth-3LTD62VL.mjs → auth-7ZBPAAZU.mjs} +5 -4
  6. package/dist/cli/{billing-DP7ZAJBO.mjs → billing-QTWEEL27.mjs} +5 -4
  7. package/dist/cli/{billing-PA5OXEM5.js → billing-WHP3YMNQ.js} +76 -75
  8. package/dist/cli/{chunk-I4T4XAA2.mjs → chunk-2QC2T7E3.mjs} +4 -4
  9. package/dist/cli/{chunk-3T4MCB5R.mjs → chunk-52HHMLRM.mjs} +89 -969
  10. package/dist/cli/{chunk-ME6XRFLY.js → chunk-6CBU7W56.js} +15 -15
  11. package/dist/cli/{chunk-LOGGNW4H.mjs → chunk-6DVXLWPB.mjs} +2 -2
  12. package/dist/cli/{chunk-AUYXWELC.mjs → chunk-6HXULNTW.mjs} +2 -2
  13. package/dist/cli/chunk-7DRPTGCK.js +930 -0
  14. package/dist/cli/{chunk-TLQ3FZOC.mjs → chunk-ATDUVJCW.mjs} +3 -3
  15. package/dist/cli/{chunk-23GAA3YO.mjs → chunk-AWQNG55D.mjs} +1 -1
  16. package/dist/cli/{chunk-NSOTASOP.js → chunk-BQR6UN3C.js} +1 -83
  17. package/dist/cli/{chunk-XKZXO7D3.mjs → chunk-CH6EFAJ3.mjs} +1 -1
  18. package/dist/cli/{chunk-KAEZNPUM.js → chunk-CTZJLQ7A.js} +13 -115
  19. package/dist/cli/{chunk-AVHLATII.js → chunk-FDAMQFQ7.js} +50 -50
  20. package/dist/cli/chunk-FIVKWNMT.mjs +210 -0
  21. package/dist/cli/{chunk-7Z66NHUC.js → chunk-G6BP55EP.js} +26 -26
  22. package/dist/cli/{chunk-GNN4MY5X.js → chunk-HFDBZXMV.js} +1 -1
  23. package/dist/cli/{describe-6O2ENKTP.mjs → chunk-HFYQBC2D.mjs} +22 -160
  24. package/dist/cli/chunk-HGFFYVXN.js +210 -0
  25. package/dist/cli/{chunk-5WNJF2T3.mjs → chunk-IHG7UAHD.mjs} +1 -83
  26. package/dist/cli/{chunk-QHGPA362.mjs → chunk-IJU5YQSF.mjs} +6 -108
  27. package/dist/cli/{chunk-772W2SAU.js → chunk-J4WYPANC.js} +8 -8
  28. package/dist/cli/{chunk-V7UP2F4U.js → chunk-JU3PF7WM.js} +21 -121
  29. package/dist/cli/{chunk-MR6XCBQJ.mjs → chunk-LCRQKI7D.mjs} +4 -2
  30. package/dist/cli/chunk-LJ5747UC.mjs +107 -0
  31. package/dist/cli/{chunk-LWERJUKN.js → chunk-NA4T3B62.js} +7 -215
  32. package/dist/cli/{chunk-WQJJNIMQ.js → chunk-NUBIAJI2.js} +11 -9
  33. package/dist/cli/chunk-OSDXE27V.mjs +88 -0
  34. package/dist/cli/{chunk-RMTASUAK.js → chunk-OU2RZYVS.js} +65 -65
  35. package/dist/cli/{chunk-JCN4DHF7.mjs → chunk-OVUFHUMG.mjs} +2 -2
  36. package/dist/cli/chunk-Q2E4E4FJ.js +112 -0
  37. package/dist/cli/{chunk-2VOLOWYZ.js → chunk-Q3FNSWJG.js} +293 -1173
  38. package/dist/cli/{chunk-NHB5YUCS.mjs → chunk-QP2TRM7M.mjs} +1 -1
  39. package/dist/cli/{describe-EFWNECHI.js → chunk-RFG3MRAC.js} +37 -175
  40. package/dist/cli/{chunk-RTO5QZWT.js → chunk-S22ZQZMU.js} +6 -6
  41. package/dist/cli/{chunk-H5KLUGY7.mjs → chunk-TXZVVBQZ.mjs} +1 -209
  42. package/dist/cli/{chunk-DC6LTULT.js → chunk-U46S43LV.js} +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-ZAAKSJAS.js +88 -0
  46. package/dist/cli/{chunk-VE3U3SQC.mjs → chunk-ZJ7HLJRF.mjs} +7 -107
  47. package/dist/cli/chunk-ZM2YPJQJ.js +107 -0
  48. package/dist/cli/{csv-TF576S77.js → csv-NM25BBX7.js} +13 -12
  49. package/dist/cli/{csv-RLRR74RQ.mjs → csv-TSBHKVNU.mjs} +4 -3
  50. package/dist/cli/{db-FDBJUTFO.js → db-GBDNQJF3.js} +30 -29
  51. package/dist/cli/{db-XORGNBIC.mjs → db-JQN6SYLK.mjs} +5 -4
  52. package/dist/cli/describe-ETTGW5LT.mjs +164 -0
  53. package/dist/cli/describe-NVLINP5A.js +164 -0
  54. package/dist/cli/describe-core.d.mts +100 -0
  55. package/dist/cli/describe-core.d.ts +100 -0
  56. package/dist/cli/describe-core.js +18 -0
  57. package/dist/cli/describe-core.mjs +18 -0
  58. package/dist/cli/{executions-YPP7WR77.mjs → executions-6S4KIVEY.mjs} +5 -4
  59. package/dist/cli/{executions-SFYAXPF4.js → executions-IH5JUPIT.js} +7 -6
  60. package/dist/cli/{feedback-5UZFYMGB.js → feedback-ER375ZCB.js} +8 -7
  61. package/dist/cli/{feedback-RBGA5ARU.mjs → feedback-PGOZLNXU.mjs} +4 -3
  62. package/dist/cli/{git-IRSAJEK2.mjs → git-7SBFCM52.mjs} +5 -4
  63. package/dist/cli/git-W6DBPLZO.js +24 -0
  64. package/dist/cli/index.js +93 -91
  65. package/dist/cli/index.mjs +35 -33
  66. package/dist/cli/{legacy-noops-CVAOQY2F.js → legacy-noops-IOEF2SB7.js} +8 -7
  67. package/dist/cli/{legacy-noops-NA7N6ZOU.mjs → legacy-noops-Q4UQIOQN.mjs} +5 -4
  68. package/dist/cli/{monitors-4OMRXCXP.js → monitors-NZ2J4YGD.js} +86 -85
  69. package/dist/cli/{monitors-ILZ2XHYG.mjs → monitors-RZYBFY3Z.mjs} +5 -4
  70. package/dist/cli/{org-YGNJDD2X.js → org-ERUOT4B2.js} +65 -64
  71. package/dist/cli/{org-QDDXAE3J.mjs → org-JLSEM6GG.mjs} +5 -4
  72. package/dist/cli/{play-L535H26U.js → play-7TUO7YNG.js} +251 -247
  73. package/dist/cli/{play-VT6OHB2D.mjs → play-Z73VC7YR.mjs} +19 -15
  74. package/dist/cli/{providers-KG4W5MPK.mjs → providers-7HIII2PW.mjs} +5 -4
  75. package/dist/cli/{providers-GPZ6PQAL.js → providers-ABKBK2C7.js} +8 -7
  76. package/dist/cli/{quickstart-UI27S5LO.js → quickstart-JBG5RTFZ.js} +6 -5
  77. package/dist/cli/{quickstart-2JDGTXIG.mjs → quickstart-QQAOCPCZ.mjs} +4 -3
  78. package/dist/cli/{search-PW3RAUX7.mjs → search-MT2Q64WC.mjs} +7 -5
  79. package/dist/cli/search-QMQBC6SV.js +30 -0
  80. package/dist/cli/{secrets-WFAXOUZE.js → secrets-MEW6LLU5.js} +14 -13
  81. package/dist/cli/{secrets-HNOMK5A2.mjs → secrets-ZFJPIT6B.mjs} +5 -4
  82. package/dist/cli/{sessions-XLX3E5UO.mjs → sessions-F2KVVZ2Z.mjs} +5 -4
  83. package/dist/cli/sessions-TBPU4S6M.js +16 -0
  84. package/dist/cli/{settings-GADAG2UK.js → settings-6VDZ6G5V.js} +75 -74
  85. package/dist/cli/{settings-YNZ4YKCH.mjs → settings-LUDDM7HO.mjs} +8 -7
  86. package/dist/cli/{setup-R5YO7GT6.js → setup-IP2KTFYO.js} +42 -41
  87. package/dist/cli/{setup-PSEHIUXO.mjs → setup-MCEY473G.mjs} +7 -6
  88. package/dist/cli/skills-EVIIEX6N.js +29 -0
  89. package/dist/cli/{skills-LTQBP6CZ.mjs → skills-KMJ3CY4O.mjs} +5 -4
  90. package/dist/cli/tools-KNLHQ3L6.js +39 -0
  91. package/dist/cli/{tools-UAXDWU63.mjs → tools-WY3PLUA7.mjs} +13 -8
  92. package/dist/cli/update-LVADY5YE.js +29 -0
  93. package/dist/cli/{update-SMNIBIMS.mjs → update-XBV52OFM.mjs} +7 -6
  94. package/dist/cli/{workflow-IKGMBGF6.mjs → workflow-5N5HMYDY.mjs} +6 -5
  95. package/dist/cli/{workflow-AOQVZHMD.js → workflow-CO7XWS4D.js} +16 -15
  96. package/dist/{client-DiGl8ska.d.mts → client-D0j-_aaa.d.mts} +1 -1
  97. package/dist/{client-Bgis7F6-.d.ts → client-DflfVyj6.d.ts} +1 -1
  98. package/dist/index.d.mts +2 -2
  99. package/dist/index.d.ts +2 -2
  100. package/dist/index.js +14 -10
  101. package/dist/index.mjs +19 -15
  102. package/dist/install-integrity.json +92 -76
  103. package/dist/plays/play-description.d.mts +1 -1
  104. package/dist/plays/play-description.d.ts +1 -1
  105. package/dist/plays/run-request.d.mts +1 -1
  106. package/dist/plays/run-request.d.ts +1 -1
  107. package/dist/release.d.mts +1 -1
  108. package/dist/release.d.ts +1 -1
  109. package/dist/release.js +2 -2
  110. package/dist/release.mjs +1 -1
  111. package/package.json +6 -1
  112. package/dist/cli/auth-562JPKOM.js +0 -39
  113. package/dist/cli/git-5LDY5ZID.js +0 -23
  114. package/dist/cli/search-MGWROZ33.js +0 -28
  115. package/dist/cli/sessions-366KROUA.js +0 -15
  116. package/dist/cli/skills-JF2LPEGM.js +0 -28
  117. package/dist/cli/tools-CP2PEFRN.js +0 -34
  118. package/dist/cli/update-HZHZOU6C.js +0 -28
@@ -0,0 +1,210 @@
1
+ // src/tool-output.ts
2
+ import {
3
+ closeSync,
4
+ mkdirSync,
5
+ openSync,
6
+ writeFileSync,
7
+ writeSync
8
+ } from "fs";
9
+ import { homedir } from "os";
10
+ import { dirname, join } from "path";
11
+ function isPlainObject(value) {
12
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
13
+ }
14
+ function getByDottedPath(root, dottedPath) {
15
+ let current = root;
16
+ for (const segment of String(dottedPath || "").split(".").filter(Boolean)) {
17
+ if (!isPlainObject(current) || !(segment in current)) {
18
+ return null;
19
+ }
20
+ current = current[segment];
21
+ }
22
+ return current;
23
+ }
24
+ function normalizeRows(value) {
25
+ if (!Array.isArray(value)) return null;
26
+ return value.map((entry) => {
27
+ if (isPlainObject(entry)) return entry;
28
+ return { value: entry };
29
+ });
30
+ }
31
+ function columnsForRows(rows) {
32
+ const seen = /* @__PURE__ */ new Set();
33
+ const columns = [];
34
+ for (const row of rows) {
35
+ for (const key of Object.keys(row)) {
36
+ if (!seen.has(key)) {
37
+ seen.add(key);
38
+ columns.push(key);
39
+ }
40
+ }
41
+ }
42
+ return columns;
43
+ }
44
+ function candidateRoots(payload) {
45
+ const roots = [
46
+ { path: null, value: payload }
47
+ ];
48
+ if (isPlainObject(payload) && isPlainObject(payload.toolResponse)) {
49
+ roots.push({ path: "toolResponse", value: payload.toolResponse });
50
+ if (Object.prototype.hasOwnProperty.call(payload.toolResponse, "raw")) {
51
+ roots.push({
52
+ path: "toolResponse.raw",
53
+ value: payload.toolResponse.raw
54
+ });
55
+ }
56
+ }
57
+ if (isPlainObject(payload) && isPlainObject(payload.output)) {
58
+ roots.push({ path: "output", value: payload.output });
59
+ if (Object.prototype.hasOwnProperty.call(payload.output, "body")) {
60
+ roots.push({ path: "output.body", value: payload.output.body });
61
+ }
62
+ }
63
+ if (isPlainObject(payload) && isPlainObject(payload.result)) {
64
+ roots.push({ path: "result", value: payload.result });
65
+ if (isPlainObject(payload.result.data)) {
66
+ roots.push({ path: "result.data", value: payload.result.data });
67
+ }
68
+ }
69
+ return roots;
70
+ }
71
+ function findBestArrayCandidate(value, pathPrefix = "", depth = 0) {
72
+ if (depth > 5) return null;
73
+ const directRows = normalizeRows(value);
74
+ const hasObjectRow = directRows?.some(
75
+ (row) => Object.keys(row).some((key) => key !== "value")
76
+ ) ?? false;
77
+ let best = directRows && directRows.length > 0 && hasObjectRow ? { path: pathPrefix, rows: directRows } : null;
78
+ if (!isPlainObject(value)) {
79
+ return best;
80
+ }
81
+ for (const [key, child] of Object.entries(value)) {
82
+ const childPath = pathPrefix ? `${pathPrefix}.${key}` : key;
83
+ const candidate = findBestArrayCandidate(child, childPath, depth + 1);
84
+ if (!candidate) continue;
85
+ if (!best || candidate.rows.length > best.rows.length) {
86
+ best = candidate;
87
+ }
88
+ }
89
+ return best;
90
+ }
91
+ function tryConvertToList(payload, options) {
92
+ const listExtractorPaths = Array.isArray(options?.listExtractorPaths) ? options?.listExtractorPaths.filter(
93
+ (entry) => typeof entry === "string" && entry.trim().length > 0
94
+ ) : [];
95
+ if (listExtractorPaths.length > 0) {
96
+ let emptyMatch = null;
97
+ for (const root of candidateRoots(payload)) {
98
+ for (const extractorPath of listExtractorPaths) {
99
+ const resolved = getByDottedPath(root.value, extractorPath);
100
+ const rows = normalizeRows(resolved);
101
+ if (!rows) {
102
+ continue;
103
+ }
104
+ const sourcePath = root.path ? `${root.path}.${extractorPath}` : extractorPath;
105
+ if (rows.length > 0) {
106
+ return { rows, strategy: "configured_paths", sourcePath };
107
+ }
108
+ emptyMatch ??= { rows, strategy: "configured_paths", sourcePath };
109
+ }
110
+ }
111
+ if (emptyMatch) {
112
+ return emptyMatch;
113
+ }
114
+ }
115
+ const roots = candidateRoots(payload);
116
+ const v2Raw = roots.find((root) => root.path === "toolResponse.raw");
117
+ for (const root of v2Raw ? [v2Raw] : roots) {
118
+ const candidate = findBestArrayCandidate(root.value, root.path ?? "");
119
+ if (!candidate || candidate.rows.length === 0) continue;
120
+ return {
121
+ rows: candidate.rows,
122
+ strategy: "auto_detected",
123
+ sourcePath: candidate.path || root.path
124
+ };
125
+ }
126
+ return null;
127
+ }
128
+ function projectRowOutput(conversion) {
129
+ return {
130
+ rows: conversion.rows,
131
+ rowCount: conversion.rows.length,
132
+ columns: columnsForRows(conversion.rows),
133
+ previewRows: conversion.rows.slice(0, 5),
134
+ strategy: conversion.strategy,
135
+ sourcePath: conversion.sourcePath
136
+ };
137
+ }
138
+ function ensureOutputDir() {
139
+ const outputDir = join(homedir(), ".local", "share", "deepline", "data");
140
+ mkdirSync(outputDir, { recursive: true });
141
+ return outputDir;
142
+ }
143
+ function writeJsonOutputFile(payload, stem) {
144
+ const outputDir = ensureOutputDir();
145
+ const outputPath = join(outputDir, `${stem}_${Date.now()}.json`);
146
+ writeFileSync(outputPath, JSON.stringify(payload, null, 2), "utf-8");
147
+ return outputPath;
148
+ }
149
+ function writeCsvOutputFile(rows, stem, options) {
150
+ const outputPath = options?.outPath ? options.outPath : join(ensureOutputDir(), `${stem}_${Date.now()}.csv`);
151
+ mkdirSync(dirname(outputPath), { recursive: true });
152
+ const columns = columnsForRows(rows);
153
+ const escapeCell = (value) => {
154
+ const normalized = value == null ? "" : typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? String(value) : JSON.stringify(value);
155
+ if (/[",\n]/.test(normalized)) {
156
+ return `"${normalized.replace(/"/g, '""')}"`;
157
+ }
158
+ return normalized;
159
+ };
160
+ const fd = openSync(outputPath, "w");
161
+ try {
162
+ writeSync(fd, `${columns.map(escapeCell).join(",")}
163
+ `);
164
+ for (const row of rows) {
165
+ writeSync(
166
+ fd,
167
+ `${columns.map((column) => escapeCell(row[column])).join(",")}
168
+ `
169
+ );
170
+ }
171
+ } finally {
172
+ closeSync(fd);
173
+ }
174
+ const previewRows = rows.slice(0, 5);
175
+ const previewColumns = columns.slice(0, 5);
176
+ const preview = [
177
+ previewColumns.join(","),
178
+ ...previewRows.map(
179
+ (row) => previewColumns.map((column) => escapeCell(row[column])).join(",")
180
+ )
181
+ ].join("\n");
182
+ return {
183
+ path: outputPath,
184
+ rowCount: rows.length,
185
+ columns,
186
+ preview
187
+ };
188
+ }
189
+ function extractSummaryFields(payload) {
190
+ const candidates = candidateRoots(payload);
191
+ for (const candidate of candidates) {
192
+ if (!isPlainObject(candidate.value)) continue;
193
+ const summaryEntries = Object.entries(candidate.value).filter(
194
+ ([, value]) => {
195
+ return value == null || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
196
+ }
197
+ );
198
+ if (summaryEntries.length === 0) continue;
199
+ return Object.fromEntries(summaryEntries);
200
+ }
201
+ return {};
202
+ }
203
+
204
+ export {
205
+ tryConvertToList,
206
+ projectRowOutput,
207
+ writeJsonOutputFile,
208
+ writeCsvOutputFile,
209
+ extractSummaryFields
210
+ };
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkRTO5QZWTjs = require('./chunk-RTO5QZWT.js');
5
+ var _chunkS22ZQZMUjs = require('./chunk-S22ZQZMU.js');
6
6
 
7
7
 
8
- var _chunkV7UP2F4Ujs = require('./chunk-V7UP2F4U.js');
8
+ var _chunkJU3PF7WMjs = require('./chunk-JU3PF7WM.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 } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
35
+ const { http } = _chunkS22ZQZMUjs.getAuthedHttpClient.call(void 0, );
36
36
  const payload = await http.get(
37
37
  `/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
38
38
  );
39
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
39
+ _chunkS22ZQZMUjs.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 } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
76
+ const { http } = _chunkS22ZQZMUjs.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
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
139
+ _chunkS22ZQZMUjs.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 } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
150
+ const { http } = _chunkS22ZQZMUjs.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
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
153
+ _chunkS22ZQZMUjs.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 } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
174
+ const { http } = _chunkS22ZQZMUjs.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 } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
191
+ const { http } = _chunkS22ZQZMUjs.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
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
200
+ _chunkS22ZQZMUjs.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 } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
223
+ const { http } = _chunkS22ZQZMUjs.getAuthedHttpClient.call(void 0, );
224
224
  const payload = await http.get(
225
225
  `/api/v2/play-projects/${encodeURIComponent(id)}`
226
226
  );
227
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
227
+ _chunkS22ZQZMUjs.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 } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
243
+ const { http } = _chunkS22ZQZMUjs.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
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
254
+ _chunkS22ZQZMUjs.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 } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
267
+ const { http } = _chunkS22ZQZMUjs.getAuthedHttpClient.call(void 0, );
268
268
  await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
269
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
269
+ _chunkS22ZQZMUjs.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 = _chunkV7UP2F4Ujs.resolveBaseUrlOnly.call(void 0, );
289
+ const baseUrl = _chunkJU3PF7WMjs.resolveBaseUrlOnly.call(void 0, );
290
290
  const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
291
- const opened = _chunkRTO5QZWTjs.openInBrowser.call(void 0, connectUrl);
292
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
291
+ const opened = _chunkS22ZQZMUjs.openInBrowser.call(void 0, connectUrl);
292
+ _chunkS22ZQZMUjs.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 } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
314
+ const { http } = _chunkS22ZQZMUjs.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
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
322
+ _chunkS22ZQZMUjs.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 } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
366
+ const { http } = _chunkS22ZQZMUjs.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
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
371
+ _chunkS22ZQZMUjs.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 } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
390
+ const { http } = _chunkS22ZQZMUjs.getAuthedHttpClient.call(void 0, );
391
391
  const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
392
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
392
+ _chunkS22ZQZMUjs.printCommandEnvelope.call(void 0,
393
393
  {
394
394
  cancelled: payload.cancelled,
395
395
  deployment: payload.deployment,
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
49
49
  // getters keep their established compatibility behavior.
50
50
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
51
51
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
52
- version: "0.3.396",
52
+ version: "0.3.398",
53
53
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
54
54
  packageCapabilities: {
55
55
  updatePreferences: 1,
@@ -2,12 +2,9 @@ import {
2
2
  describedTool,
3
3
  formatModelDescription,
4
4
  publicToolSchemas,
5
- seedToolListScript,
6
5
  toolMetadataJsonForDescribe
7
- } from "./chunk-3T4MCB5R.mjs";
6
+ } from "./chunk-YHZUZO3U.mjs";
8
7
  import {
9
- SCHEMA_LINE_LIMIT,
10
- addDescribeOptions,
11
8
  buildPlayDashboardUrl,
12
9
  byokLines,
13
10
  describedJson,
@@ -16,34 +13,10 @@ import {
16
13
  examples,
17
14
  schemaLines,
18
15
  topLevelField
19
- } from "./chunk-5WNJF2T3.mjs";
20
- import "./chunk-OVDNJAJN.mjs";
21
- import "./chunk-QHGPA362.mjs";
22
- import "./chunk-H5KLUGY7.mjs";
23
- import "./chunk-3HU47EGZ.mjs";
24
- import {
25
- DeeplineClient
26
- } from "./chunk-MR6XCBQJ.mjs";
27
- import "./chunk-6IKARAYD.mjs";
28
- import "./chunk-JI2B4RZP.mjs";
29
- import "./chunk-EIMG75BT.mjs";
30
- import "./chunk-UBKA33KY.mjs";
31
- import "./chunk-WXLOW623.mjs";
32
- import {
33
- printCommandEnvelope
34
- } from "./chunk-XKZXO7D3.mjs";
35
- import "./chunk-VE3U3SQC.mjs";
36
- import "./chunk-DLIRSHV6.mjs";
16
+ } from "./chunk-IHG7UAHD.mjs";
37
17
  import {
38
18
  DeeplineError
39
19
  } from "./chunk-NXGCO4JB.mjs";
40
- import "./chunk-NHB5YUCS.mjs";
41
- import "./chunk-WZYKRD7T.mjs";
42
- import "./chunk-KRD6H754.mjs";
43
-
44
- // src/cli/commands/describe.ts
45
- import { writeFileSync } from "fs";
46
- import { resolve } from "path";
47
20
 
48
21
  // src/cli/tool-features.ts
49
22
  var VIEWS = {
@@ -115,6 +88,24 @@ var FILTER_OF = {
115
88
  prebuilt_play: "prebuilts",
116
89
  custom_play: "custom"
117
90
  };
91
+ async function found(lookup) {
92
+ try {
93
+ return await lookup;
94
+ } catch (error) {
95
+ if (error instanceof DeeplineError && (error.statusCode === 404 || error.code === "PLAY_NOT_FOUND" || error.code === "NOT_FOUND")) {
96
+ return null;
97
+ }
98
+ throw error;
99
+ }
100
+ }
101
+ function describeLookupsFor(client) {
102
+ return {
103
+ play: (reference) => found(client.describePlay(reference)),
104
+ tool: (name) => found(client.getTool(name)),
105
+ describeModel: (model) => client.describeModel(model),
106
+ baseUrl: client.baseUrl
107
+ };
108
+ }
118
109
  async function describeName(name, options, lookups) {
119
110
  const maintainedOnly = options.prebuilt === true || options.tool === true;
120
111
  const wants = (filter) => (!options.kinds || options.kinds.includes(filter)) && !(maintainedOnly && filter === "custom");
@@ -289,136 +280,7 @@ async function describeName(name, options, lookups) {
289
280
  return { status: "described", envelope, lines: view.lines };
290
281
  }
291
282
 
292
- // src/cli/commands/describe.ts
293
- async function found(lookup) {
294
- try {
295
- return await lookup;
296
- } catch (error) {
297
- if (error instanceof DeeplineError && (error.statusCode === 404 || error.code === "PLAY_NOT_FOUND" || error.code === "NOT_FOUND")) {
298
- return null;
299
- }
300
- throw error;
301
- }
302
- }
303
- async function describeAnything(name, options, onMissing) {
304
- const client = new DeeplineClient();
305
- const outcome = await describeName(name, options, {
306
- play: (reference) => found(client.describePlay(reference)),
307
- tool: async (toolName) => options.fetchedTool ?? await found(client.getTool(toolName)),
308
- describeModel: (model) => client.describeModel(model),
309
- baseUrl: client.baseUrl,
310
- seedStarterScript: seedToolListScript
311
- });
312
- if (outcome.status === "missing") {
313
- if (onMissing) return onMissing();
314
- console.error(
315
- `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`
316
- );
317
- return 2;
318
- }
319
- if (outcome.status === "refused") {
320
- console.error(outcome.message);
321
- return outcome.exitCode;
322
- }
323
- return deliver(outcome.envelope, outcome.lines, {
324
- json: options.json === true,
325
- out: options.out
326
- });
327
- }
328
- function deliver(envelope, lines, { json, out }) {
329
- const text = `${lines.join("\n")}
330
- `;
331
- if (out) {
332
- const path = resolve(out);
333
- const content = json ? `${JSON.stringify(envelope, null, 2)}
334
- ` : text;
335
- writeFileSync(path, content);
336
- const bytes = Buffer.byteLength(content);
337
- printCommandEnvelope(
338
- { path, bytes },
339
- { json, text: `Wrote ${path} (${bytes} bytes)
340
- ` }
341
- );
342
- return 0;
343
- }
344
- printCommandEnvelope(envelope, { json, text });
345
- return 0;
346
- }
347
- function registerDescribeCommand(program) {
348
- addDescribeOptions(program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
349
- "Describe anything search returns: a tool, monitor type, or play."
350
- ).addHelpText(
351
- "after",
352
- `
353
- What you can describe:
354
- Any id deepline search returns: a tool id, a monitor type id, or a play name
355
- or reference. You do not say which kind it is; tool ids, monitor type ids
356
- and prebuilt play names never overlap.
357
-
358
- When a name is taken twice:
359
- A play your workspace created is shown instead of a Deepline tool, monitor
360
- type or prebuilt play with the same name, and the output says so.
361
- Pass --prebuilt (or --tool) to see the Deepline one.
362
-
363
- What it prints:
364
- The same sections for every kind: what it is, cost, inputs, outputs, then
365
- an example of running it from the CLI and from inside a play.
366
-
367
- Examples in the output:
368
- (default) required inputs filled in, first output read
369
- --verbose every input filled in, every output read; also shows
370
- secondary fields
371
- --cli-example only the CLI example, with how inputs and outputs work
372
- --play-example only the in-play example, with how inputs and outputs work
373
- --no-example no examples
374
-
375
- Features:
376
- A tool lists its features: parts with their own description, such as the
377
- model an AI tool runs. --feature <name> describes one at its default value,
378
- --feature <name>=<value> at another, e.g. --feature model=openai/gpt-5.6-luna.
379
-
380
- Schema size and format:
381
- Secondary fields (diagnostics, attempt logs, echoes of input) are left out
382
- by default; the output names them, and --verbose shows them.
383
- --fields email,miss_reason shows only the fields you name, plus every
384
- required input, and names the rest. Use it when you know what you need.
385
- A schema over ${SCHEMA_LINE_LIMIT} lines is folded: deeper objects show only their field
386
- names. A shape used more than once is printed once under Types.
387
- --full-schema the normal output, with the schema not folded
388
- --schema-only only the schema, not folded, and nothing else
389
- --json the same facts as JSON: fields keyed by name, with what
390
- each means and, for a tool, where it is in the result;
391
- secondary fields are named in "hidden"
392
- --json --full-schema the whole catalog record, as tools describe and
393
- plays describe print it
394
- --schema-only --json
395
- only the input and output JSON Schemas; use this for a
396
- program, or for a schema too large to read
397
- --out <path> save any of the above to a file instead of printing it
398
-
399
- Play page:
400
- For a play, the output ends with its play page URL (JSON: dashboardUrl).
401
- --web-url print only that URL; with --json, {"dashboardUrl": ...}.
402
- Fails for a tool or monitor type, which have no play page.
403
-
404
- Older commands:
405
- deepline tools describe and deepline plays describe are this command limited
406
- to one kind. Their own flags still work: --pricing-only, --examples-only,
407
- --model and --estimate-payload on tools; --json <fields> on plays.
408
-
409
- Examples:
410
- deepline describe hunter_email_verifier
411
- deepline describe person-linkedin-to-email
412
- deepline describe my-play --prebuilt
413
- deepline describe ai_ark_people_search --full-schema
414
- deepline describe prebuilt/person-to-email-batch --web-url
415
- deepline describe ai_ark_people_search --schema-only --out schema.json
416
- `
417
- ).action(async (name, options) => {
418
- process.exitCode = await describeAnything(name, options);
419
- });
420
- }
421
283
  export {
422
- describeAnything,
423
- registerDescribeCommand
284
+ describeLookupsFor,
285
+ describeName
424
286
  };