deepline 0.3.372 → 0.3.374
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.
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +1 -53
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +15 -23
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +65 -3
- package/dist/bundling-sources/shared_libs/plays/email-status.ts +95 -0
- package/dist/bundling-sources/shared_libs/plays/extractor-targets.ts +14 -0
- package/dist/bundling-sources/shared_libs/plays/field-catalog.ts +253 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +2 -0
- package/dist/cli/auth-IFXXXZP6.js +33 -0
- package/dist/cli/{auth-ODSACXLF.mjs → auth-YGCDA4WG.mjs} +4 -4
- package/dist/cli/{billing-OPIOZLAN.mjs → billing-3ZLR3CJU.mjs} +4 -4
- package/dist/cli/{billing-4ERXY2DZ.js → billing-ZXRKPD5D.js} +73 -73
- package/dist/cli/{chunk-XSPAI6MF.mjs → chunk-2DAWTVNN.mjs} +2 -2
- package/dist/cli/{chunk-E5UD3JDQ.js → chunk-3VN4FTE3.js} +289 -5
- package/dist/cli/{chunk-VVFH745L.js → chunk-3XKAOV74.js} +6 -6
- package/dist/cli/{chunk-N5TPMNTT.js → chunk-53PZA4EP.js} +8 -8
- package/dist/cli/{chunk-BFLPCGOR.mjs → chunk-62IBVKWB.mjs} +1 -1
- package/dist/cli/{chunk-2RC5JQ3C.mjs → chunk-A62HBMHY.mjs} +1 -1
- package/dist/cli/{chunk-3GK3SH3G.mjs → chunk-E6BZWURC.mjs} +200 -13
- package/dist/cli/{chunk-KC2YOJTU.mjs → chunk-FT6O2ZVJ.mjs} +319 -115
- package/dist/cli/{chunk-5HYD3GMS.mjs → chunk-GT6KGIWV.mjs} +3 -3
- package/dist/cli/{chunk-RUYZAREB.js → chunk-HC5L6KGE.js} +9 -9
- package/dist/cli/{chunk-JAERLCMH.mjs → chunk-IZVGMVNX.mjs} +1 -1
- package/dist/cli/{chunk-ML2ZY7YD.js → chunk-JK547IDB.js} +4 -4
- package/dist/cli/{chunk-D6O3NJHX.js → chunk-MOBOAZMA.js} +60 -60
- package/dist/cli/{chunk-DONL233W.mjs → chunk-MQ5UW5AZ.mjs} +4 -4
- package/dist/cli/{chunk-MIMV5LTU.mjs → chunk-NNYQ24O5.mjs} +1 -1
- package/dist/cli/{chunk-DM5QUZJR.js → chunk-NOSIMGZV.js} +1 -1
- package/dist/cli/{chunk-AQFA7HMN.js → chunk-O7KJYX7R.js} +15 -15
- package/dist/cli/{chunk-U3W7E5WT.mjs → chunk-OS7GXARW.mjs} +27 -15
- package/dist/cli/{chunk-BVUGPOU3.mjs → chunk-OYTPVM2R.mjs} +2 -2
- package/dist/cli/{chunk-EFJL5FCU.js → chunk-PCYCNZLR.js} +8 -8
- package/dist/cli/{chunk-6MDAGRZP.js → chunk-RT5ICJ5V.js} +2 -2
- package/dist/cli/{chunk-GZQKUFM5.js → chunk-RXR7A2MX.js} +26 -26
- package/dist/cli/{chunk-4LIUZ4QR.mjs → chunk-SBB27CIJ.mjs} +2 -2
- package/dist/cli/{chunk-RJ7JJMQO.js → chunk-T35LCTC7.js} +266 -254
- package/dist/cli/{chunk-IUWPC5K6.js → chunk-TZTGK5JQ.js} +50 -50
- package/dist/cli/{chunk-FGHRRJ3D.mjs → chunk-VZSVYNZH.mjs} +1 -1
- package/dist/cli/{chunk-WJWO74MM.js → chunk-X5V2QTDR.js} +390 -186
- package/dist/cli/{chunk-JB6ERQUV.mjs → chunk-Y6VOGHF2.mjs} +284 -0
- package/dist/cli/{chunk-3CTB7V5F.mjs → chunk-YFFH6NDU.mjs} +2 -2
- package/dist/cli/{chunk-2JRRXXTA.js → chunk-YPVTQRUM.js} +201 -14
- package/dist/cli/client-O6IEMURJ.js +20 -0
- package/dist/cli/{client-KF2J754U.mjs → client-TV254HC4.mjs} +3 -3
- package/dist/cli/{csv-UL3MCD5D.mjs → csv-VEHHRUG4.mjs} +3 -3
- package/dist/cli/{csv-UJ3M7NFP.js → csv-WSRTANXI.js} +12 -12
- package/dist/cli/{db-SIOWA63T.mjs → db-BH25DX2G.mjs} +4 -4
- package/dist/cli/{db-444XYOTV.js → db-JXZNMFCE.js} +29 -29
- package/dist/cli/{describe-RRBESS3S.js → describe-N2OBGVJM.js} +61 -32
- package/dist/cli/{describe-GI5GHAKO.mjs → describe-TMBECHTX.mjs} +46 -17
- package/dist/cli/{executions-ERXZUOL5.js → executions-TX5CQF66.js} +6 -6
- package/dist/cli/{executions-4YDP6BXI.mjs → executions-Y4HQHYSO.mjs} +4 -4
- package/dist/cli/{feedback-3M7D7DZQ.js → feedback-ASEJ5A7I.js} +7 -7
- package/dist/cli/{feedback-CPWQL5LU.mjs → feedback-W7SRXYSP.mjs} +3 -3
- package/dist/cli/{git-XN6C3TJZ.mjs → git-2W7CZZRC.mjs} +4 -4
- package/dist/cli/git-SSSOIQ2L.js +23 -0
- package/dist/cli/index.js +81 -81
- package/dist/cli/index.mjs +32 -32
- package/dist/cli/{legacy-noops-5XDGOFWH.js → legacy-noops-NJYAAGBY.js} +7 -7
- package/dist/cli/{legacy-noops-KXQ6TFFL.mjs → legacy-noops-TXMPY3P7.mjs} +4 -4
- package/dist/cli/{monitors-33IU5JR6.mjs → monitors-G4L65QGQ.mjs} +4 -4
- package/dist/cli/{monitors-KH22PDOC.js → monitors-YLKTQ57D.js} +85 -85
- package/dist/cli/{org-MHYMWUEP.mjs → org-BCHOWKIA.mjs} +4 -4
- package/dist/cli/{org-X4NSLQG5.js → org-ENXO2A33.js} +64 -64
- package/dist/cli/{play-LCZKHKW2.mjs → play-JBY7HUYN.mjs} +8 -8
- package/dist/cli/play-SSJ3PO4D.js +155 -0
- package/dist/cli/{providers-J6LWCF5R.js → providers-GWFX3E7C.js} +7 -7
- package/dist/cli/{providers-L5FJTSEA.mjs → providers-JV2DZG43.mjs} +4 -4
- package/dist/cli/{quickstart-NE3BTWGL.mjs → quickstart-AIXURXZQ.mjs} +3 -3
- package/dist/cli/{quickstart-OOPFA4MX.js → quickstart-CASPK7F4.js} +5 -5
- package/dist/cli/{search-DBXOEOIE.mjs → search-DYQB7LHK.mjs} +5 -5
- package/dist/cli/search-N7K6A2YV.js +26 -0
- package/dist/cli/{secrets-WPMU7UBD.js → secrets-AZQG2E4U.js} +13 -13
- package/dist/cli/{secrets-U2MLWZH2.mjs → secrets-RQZPIPO5.mjs} +4 -4
- package/dist/cli/{sessions-WYNC4AUE.mjs → sessions-3FJJDMBB.mjs} +4 -4
- package/dist/cli/{sessions-YYZ3UJDS.js → sessions-ZY6RBYD4.js} +5 -5
- package/dist/cli/{settings-WQDFX3X6.js → settings-GXKWNR5V.js} +74 -74
- package/dist/cli/{settings-FQZSHFC6.mjs → settings-UNZDQGSE.mjs} +7 -7
- package/dist/cli/{setup-JKYJT35S.mjs → setup-PIRXJ2KJ.mjs} +6 -6
- package/dist/cli/{setup-DKYVNDTM.js → setup-UURZD4YO.js} +41 -41
- package/dist/cli/skills-4OUZLKTW.js +28 -0
- package/dist/cli/{skills-VHVCJJJY.mjs → skills-B4AQEIAF.mjs} +4 -4
- package/dist/cli/tools-MIZS5UN6.js +40 -0
- package/dist/cli/{tools-E23PU7KM.mjs → tools-UMGQKUSW.mjs} +8 -8
- package/dist/cli/update-3CO7LA4M.js +28 -0
- package/dist/cli/{update-4A4VU6CW.mjs → update-SFUTMEKL.mjs} +6 -6
- package/dist/cli/{workflow-WB2USWAA.js → workflow-CDAJCMT7.js} +15 -15
- package/dist/cli/{workflow-2ZR2ECTG.mjs → workflow-ON6XVW36.mjs} +5 -5
- package/dist/{client-Cw0e2Uec.d.mts → client-Cn-txrXv.d.mts} +1 -1
- package/dist/{client-CwdiawoG.d.ts → client-fPoIN-3V.d.ts} +1 -1
- package/dist/{compiler-manifest-DgdW0q0b.d.mts → compiler-manifest-CY2v8ab0.d.mts} +2 -0
- package/dist/{compiler-manifest-DgdW0q0b.d.ts → compiler-manifest-CY2v8ab0.d.ts} +2 -0
- package/dist/{index-C3nQQTI-.d.mts → index-B9fBZH1g.d.mts} +1 -1
- package/dist/{index-CEYQAfS0.d.ts → index-BZ6uzZJl.d.ts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +79 -249
- package/dist/index.mjs +10 -180
- package/dist/install-integrity.json +85 -84
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-4SXMV3CD.js +0 -33
- package/dist/cli/client-UUNLXOHF.js +0 -20
- package/dist/cli/git-ITSCNUVB.js +0 -23
- package/dist/cli/play-4QRPOBWW.js +0 -155
- package/dist/cli/search-UGQDBP76.js +0 -26
- package/dist/cli/skills-VBQMXDAX.js +0 -28
- package/dist/cli/tools-ACEJZMJD.js +0 -40
- package/dist/cli/update-V5KMYHVE.js +0 -28
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunk3XKAOV74js = require('./chunk-3XKAOV74.js');
|
|
8
|
+
require('./chunk-JK547IDB.js');
|
|
9
9
|
require('./chunk-XNYIZMNQ.js');
|
|
10
10
|
require('./chunk-7P5AA3SN.js');
|
|
11
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-NOSIMGZV.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 :
|
|
129
|
+
return (verbose ? value : _chunk3XKAOV74js.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 :
|
|
139
|
+
const display = verbose ? raw : _chunk3XKAOV74js.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 =
|
|
159
|
+
const allRows = _chunk3XKAOV74js.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
|
-
|
|
172
|
+
_chunk3XKAOV74js.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(
|
|
181
|
+
process.stdout.write(_chunk3XKAOV74js.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
|
-
|
|
196
|
+
_chunk3XKAOV74js.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
|
-
${
|
|
439
|
+
${_chunk3XKAOV74js.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
|
-
|
|
490
|
+
_chunk3XKAOV74js.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
|
-
|
|
526
|
+
_chunk3XKAOV74js.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-
|
|
7
|
+
} from "./chunk-A62HBMHY.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-
|
|
19
|
+
} from "./chunk-NNYQ24O5.mjs";
|
|
20
20
|
import {
|
|
21
21
|
CustomerDbQueryOutcomeUnknownError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VZSVYNZH.mjs";
|
|
23
23
|
import "./chunk-DLIRSHV6.mjs";
|
|
24
24
|
import {
|
|
25
25
|
DeeplineError
|
|
26
26
|
} from "./chunk-NXGCO4JB.mjs";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-IZVGMVNX.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
|
|
7
|
+
var _chunkHC5L6KGEjs = require('./chunk-HC5L6KGE.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
|
|
19
|
+
var _chunk3XKAOV74js = require('./chunk-3XKAOV74.js');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkJK547IDBjs = require('./chunk-JK547IDB.js');
|
|
23
23
|
require('./chunk-XNYIZMNQ.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
27
|
-
require('./chunk-
|
|
27
|
+
require('./chunk-NOSIMGZV.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 =
|
|
51
|
-
const responseColumns =
|
|
50
|
+
const rows = _chunk3XKAOV74js.dataExportRows.call(void 0, customerDbRows(result));
|
|
51
|
+
const responseColumns = _chunk3XKAOV74js.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
|
|
97
|
+
return _chunk3XKAOV74js.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
|
|
119
|
+
const text = error instanceof _chunkJK547IDBjs.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
|
|
127
|
-
error instanceof
|
|
126
|
+
...error instanceof _chunkJK547IDBjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
127
|
+
error instanceof _chunkJK547IDBjs.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
|
|
135
|
+
...error instanceof _chunkJK547IDBjs.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
|
-
|
|
150
|
+
_chunk3XKAOV74js.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 ||
|
|
191
|
+
const jsonOutput = explicitJsonOutput || _chunk3XKAOV74js.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
|
-
|
|
202
|
+
_chunk3XKAOV74js.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
|
-
|
|
218
|
+
_chunk3XKAOV74js.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:
|
|
228
|
+
text: _chunk3XKAOV74js.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 =
|
|
237
|
+
const content = _chunk3XKAOV74js.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
|
-
|
|
244
|
+
_chunk3XKAOV74js.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
|
-
|
|
260
|
+
_chunk3XKAOV74js.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
|
-
|
|
275
|
+
_chunk3XKAOV74js.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 =
|
|
349
|
+
const plan = _chunkHC5L6KGEjs.planCustomerDbQuery.call(void 0, query);
|
|
350
350
|
if (options.dryRun) {
|
|
351
|
-
|
|
351
|
+
_chunk3XKAOV74js.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 ||
|
|
364
|
+
{ json: options.json || _chunk3XKAOV74js.shouldEmitJson.call(void 0, ) }
|
|
365
365
|
);
|
|
366
366
|
return 0;
|
|
367
367
|
}
|
|
368
|
-
const client = new (0,
|
|
368
|
+
const client = new (0, _chunkHC5L6KGEjs.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
|
|
378
|
-
|
|
377
|
+
if (error instanceof _chunkJK547IDBjs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunk3XKAOV74js.shouldEmitJson.call(void 0, ))) {
|
|
378
|
+
_chunk3XKAOV74js.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 =
|
|
427
|
-
const client = new (0,
|
|
426
|
+
const jsonOutput = _chunk3XKAOV74js.argsWantJson.call(void 0, args);
|
|
427
|
+
const client = new (0, _chunkHC5L6KGEjs.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
|
-
|
|
443
|
+
_chunk3XKAOV74js.printCommandEnvelope.call(void 0,
|
|
444
444
|
{
|
|
445
445
|
command: "db repair",
|
|
446
446
|
status: result.status,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await 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
|
|
3
|
+
var _chunkT35LCTC7js = require('./chunk-T35LCTC7.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkX5V2QTDRjs = require('./chunk-X5V2QTDR.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -13,19 +13,20 @@ var _chunkWJWO74MMjs = require('./chunk-WJWO74MM.js');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
var _chunkYPVTQRUMjs = require('./chunk-YPVTQRUM.js');
|
|
17
18
|
require('./chunk-AID3OYVJ.js');
|
|
18
19
|
require('./chunk-QGKPTBRR.js');
|
|
19
20
|
require('./chunk-3KC45UVF.js');
|
|
20
21
|
require('./chunk-5JLQPVNX.js');
|
|
21
|
-
require('./chunk-
|
|
22
|
-
require('./chunk-
|
|
22
|
+
require('./chunk-53PZA4EP.js');
|
|
23
|
+
require('./chunk-RXR7A2MX.js');
|
|
23
24
|
require('./chunk-GEJDBXXM.js');
|
|
24
|
-
require('./chunk-
|
|
25
|
+
require('./chunk-3VN4FTE3.js');
|
|
25
26
|
require('./chunk-5O4B6AUN.js');
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
var
|
|
29
|
+
var _chunkHC5L6KGEjs = require('./chunk-HC5L6KGE.js');
|
|
29
30
|
require('./chunk-S6R3OX7B.js');
|
|
30
31
|
require('./chunk-LA46MMTL.js');
|
|
31
32
|
require('./chunk-AYHLUHE5.js');
|
|
@@ -33,13 +34,13 @@ require('./chunk-QJBJZVG6.js');
|
|
|
33
34
|
require('./chunk-WJYPBHTE.js');
|
|
34
35
|
|
|
35
36
|
|
|
36
|
-
var
|
|
37
|
-
require('./chunk-
|
|
37
|
+
var _chunk3XKAOV74js = require('./chunk-3XKAOV74.js');
|
|
38
|
+
require('./chunk-JK547IDB.js');
|
|
38
39
|
require('./chunk-XNYIZMNQ.js');
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
42
|
-
require('./chunk-
|
|
43
|
+
require('./chunk-NOSIMGZV.js');
|
|
43
44
|
require('./chunk-OG64RBAC.js');
|
|
44
45
|
require('./chunk-COGTRVWW.js');
|
|
45
46
|
|
|
@@ -65,11 +66,11 @@ async function found(lookup) {
|
|
|
65
66
|
async function describeAnything(name, options, onMissing) {
|
|
66
67
|
const maintainedOnly = options.prebuilt === true || options.tool === true;
|
|
67
68
|
const wants = (filter) => (!options.kinds || options.kinds.includes(filter)) && !(maintainedOnly && filter === "custom");
|
|
68
|
-
const client = new (0,
|
|
69
|
+
const client = new (0, _chunkHC5L6KGEjs.DeeplineClient)();
|
|
69
70
|
const play = async (reference) => {
|
|
70
71
|
const record2 = await client.describePlay(reference);
|
|
71
72
|
return {
|
|
72
|
-
described:
|
|
73
|
+
described: _chunkT35LCTC7js.describedPlay.call(void 0, record2),
|
|
73
74
|
record: { ...record2 },
|
|
74
75
|
schemas: {
|
|
75
76
|
inputSchema: _nullishCoalesce(record2.inputSchema, () => ( null)),
|
|
@@ -79,10 +80,16 @@ async function describeAnything(name, options, onMissing) {
|
|
|
79
80
|
};
|
|
80
81
|
const tool = async () => {
|
|
81
82
|
const record2 = await _asyncNullishCoalesce(options.fetchedTool, async () => ( await client.getTool(name)));
|
|
83
|
+
const { byok } = record2;
|
|
82
84
|
return {
|
|
83
|
-
described:
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
described: {
|
|
86
|
+
..._chunkX5V2QTDRjs.describedTool.call(void 0, record2, name),
|
|
87
|
+
// Shown when asked for, or when the tool runs only on your own
|
|
88
|
+
// credentials; a server that does not report it shows as unknown.
|
|
89
|
+
...options.byok || _optionalChain([byok, 'optionalAccess', _ => _.required]) === true ? { byok: _nullishCoalesce(byok, () => ( {})) } : {}
|
|
90
|
+
},
|
|
91
|
+
record: _chunkX5V2QTDRjs.toolMetadataJsonForDescribe.call(void 0, record2, name),
|
|
92
|
+
schemas: _chunkX5V2QTDRjs.publicToolSchemas.call(void 0, record2)
|
|
86
93
|
};
|
|
87
94
|
};
|
|
88
95
|
const sources = name.includes("/") ? [{ kinds: ["prebuilts", "custom"], find: () => play(name) }] : [
|
|
@@ -113,6 +120,7 @@ async function describeAnything(name, options, onMissing) {
|
|
|
113
120
|
const note = shadows ? `Showing your workspace play "${name}". It has the same name as a Deepline ${shadows.kind.replace("_", " ")}; see that one with: ${shadows.describeCommand}` : null;
|
|
114
121
|
const verbose = options.verbose === true;
|
|
115
122
|
const json = options.json === true;
|
|
123
|
+
const fields = (_nullishCoalesce(options.fields, () => ( ""))).split(",").map((name2) => name2.trim()).filter(Boolean);
|
|
116
124
|
const named = options.cliExample === true || options.playExample === true;
|
|
117
125
|
const shown = options.example !== false;
|
|
118
126
|
const {
|
|
@@ -131,34 +139,46 @@ async function describeAnything(name, options, onMissing) {
|
|
|
131
139
|
},
|
|
132
140
|
lines: [
|
|
133
141
|
`${described.id} [${described.kind.replace("_", " ")}]`,
|
|
134
|
-
...
|
|
142
|
+
..._chunkYPVTQRUMjs.schemaLines.call(void 0, described, {
|
|
143
|
+
full: true,
|
|
144
|
+
secondary: true,
|
|
145
|
+
...fields.length ? { fields } : {}
|
|
146
|
+
})
|
|
135
147
|
]
|
|
136
148
|
} : {
|
|
137
149
|
envelope: {
|
|
138
150
|
...summary,
|
|
139
|
-
inputs: inputs.map(
|
|
140
|
-
outputs: outputs.map(
|
|
141
|
-
...described.rowInputs ? { rowInputs: described.rowInputs.map(
|
|
142
|
-
...described.rowOutputs ? { rowOutputs: described.rowOutputs.map(
|
|
143
|
-
runExamples:
|
|
151
|
+
inputs: inputs.map(_chunkYPVTQRUMjs.topLevelField),
|
|
152
|
+
outputs: outputs.map(_chunkYPVTQRUMjs.topLevelField),
|
|
153
|
+
...described.rowInputs ? { rowInputs: described.rowInputs.map(_chunkYPVTQRUMjs.topLevelField) } : {},
|
|
154
|
+
...described.rowOutputs ? { rowOutputs: described.rowOutputs.map(_chunkYPVTQRUMjs.topLevelField) } : {},
|
|
155
|
+
runExamples: _chunkYPVTQRUMjs.examples.call(void 0, described, { verbose }),
|
|
144
156
|
...shadows ? { shadows, note } : {}
|
|
145
157
|
},
|
|
146
158
|
lines: [
|
|
147
159
|
...note ? [`Note: ${note}`, ""] : [],
|
|
148
|
-
...
|
|
160
|
+
..._chunkYPVTQRUMjs.describedLines.call(void 0, described, {
|
|
149
161
|
cli: shown && (!named || options.cliExample === true),
|
|
150
162
|
play: shown && (!named || options.playExample === true),
|
|
151
163
|
explain: named,
|
|
152
164
|
verbose,
|
|
153
|
-
fullSchema: options.fullSchema === true
|
|
165
|
+
fullSchema: options.fullSchema === true,
|
|
166
|
+
...fields.length ? { fields } : {}
|
|
154
167
|
})
|
|
155
168
|
]
|
|
156
169
|
};
|
|
157
|
-
const
|
|
170
|
+
const fullRecord = options.fullRecord === true || options.fullSchema === true;
|
|
171
|
+
const envelope = options.schemaOnly ? view.envelope : fullRecord ? (
|
|
158
172
|
// The shared keys lead; where the kind's own record has the same key,
|
|
159
173
|
// its value stands, so callers of the older commands read what they did.
|
|
160
174
|
{ ...view.envelope, ...record }
|
|
161
|
-
)
|
|
175
|
+
) : {
|
|
176
|
+
..._chunkYPVTQRUMjs.describedJson.call(void 0, described, {
|
|
177
|
+
secondary: verbose || fields.length > 0,
|
|
178
|
+
verbose
|
|
179
|
+
}),
|
|
180
|
+
...shadows ? { shadows, note } : {}
|
|
181
|
+
};
|
|
162
182
|
const text = `${view.lines.join("\n")}
|
|
163
183
|
`;
|
|
164
184
|
if (options.out) {
|
|
@@ -167,18 +187,18 @@ async function describeAnything(name, options, onMissing) {
|
|
|
167
187
|
` : text;
|
|
168
188
|
_fs.writeFileSync.call(void 0, path, content);
|
|
169
189
|
const bytes = Buffer.byteLength(content);
|
|
170
|
-
|
|
190
|
+
_chunk3XKAOV74js.printCommandEnvelope.call(void 0,
|
|
171
191
|
{ path, bytes },
|
|
172
192
|
{ json, text: `Wrote ${path} (${bytes} bytes)
|
|
173
193
|
` }
|
|
174
194
|
);
|
|
175
195
|
return 0;
|
|
176
196
|
}
|
|
177
|
-
|
|
197
|
+
_chunk3XKAOV74js.printCommandEnvelope.call(void 0, envelope, { json, text });
|
|
178
198
|
return 0;
|
|
179
199
|
}
|
|
180
200
|
function registerDescribeCommand(program) {
|
|
181
|
-
|
|
201
|
+
_chunkYPVTQRUMjs.addDescribeOptions.call(void 0, program.command("describe <name>")).description(
|
|
182
202
|
"Describe anything search returns: a tool, monitor type, or play."
|
|
183
203
|
).addHelpText(
|
|
184
204
|
"after",
|
|
@@ -199,17 +219,26 @@ What it prints:
|
|
|
199
219
|
|
|
200
220
|
Examples in the output:
|
|
201
221
|
(default) required inputs filled in, first output read
|
|
202
|
-
--verbose every input filled in, every output read
|
|
222
|
+
--verbose every input filled in, every output read; also shows
|
|
223
|
+
secondary fields
|
|
203
224
|
--cli-example only the CLI example, with how inputs and outputs work
|
|
204
225
|
--play-example only the in-play example, with how inputs and outputs work
|
|
205
226
|
--no-example no examples
|
|
206
227
|
|
|
207
228
|
Schema size and format:
|
|
208
|
-
|
|
229
|
+
Secondary fields (diagnostics, attempt logs, echoes of input) are left out
|
|
230
|
+
by default; the output names them, and --verbose shows them.
|
|
231
|
+
--fields email,miss_reason shows only the fields you name, plus every
|
|
232
|
+
required input, and names the rest. Use it when you know what you need.
|
|
233
|
+
A schema over ${_chunkYPVTQRUMjs.SCHEMA_LINE_LIMIT} lines is folded: deeper objects show only their field
|
|
209
234
|
names. A shape used more than once is printed once under Types.
|
|
210
235
|
--full-schema the normal output, with the schema not folded
|
|
211
236
|
--schema-only only the schema, not folded, and nothing else
|
|
212
|
-
--json
|
|
237
|
+
--json the same facts as JSON: fields keyed by name, with what
|
|
238
|
+
each means and, for a tool, where it is in the result;
|
|
239
|
+
secondary fields are named in "hidden"
|
|
240
|
+
--json --full-schema the whole catalog record, as tools describe and
|
|
241
|
+
plays describe print it
|
|
213
242
|
--schema-only --json
|
|
214
243
|
only the input and output JSON Schemas; use this for a
|
|
215
244
|
program, or for a schema too large to read
|