deepline 0.3.376 → 0.3.377
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/cli/{auth-MLCDUTJY.mjs → auth-3SJMD5GS.mjs} +4 -4
- package/dist/cli/auth-C54HQ3XR.js +35 -0
- package/dist/cli/{billing-IONI4V7P.js → billing-IN4CGRX5.js} +73 -73
- package/dist/cli/{billing-OUGNDBL4.mjs → billing-N4PYTCSM.mjs} +4 -4
- package/dist/cli/{chunk-7LX2G2PU.mjs → chunk-3H5U7XCU.mjs} +1 -1
- package/dist/cli/{chunk-6EYTKUDI.js → chunk-4T62V4WC.js} +2 -2
- package/dist/cli/{chunk-VNBAOWN3.mjs → chunk-7EEPWHRK.mjs} +6 -6
- package/dist/cli/{chunk-H7SLESX6.mjs → chunk-ATK45XHI.mjs} +1 -1
- package/dist/cli/{chunk-Y4MXBE3V.js → chunk-BBONZ7CN.js} +8 -8
- package/dist/cli/{chunk-Y5W5IIA4.js → chunk-CEUIAIUI.js} +57 -57
- package/dist/cli/{chunk-GMRWUGXB.mjs → chunk-CUKV3EXY.mjs} +3 -3
- package/dist/cli/{chunk-47X6MQ7J.js → chunk-D3GRDNJO.js} +60 -60
- package/dist/cli/{chunk-V7ZREPSD.mjs → chunk-DW7BDVZY.mjs} +4 -4
- package/dist/cli/{chunk-SPZNLE2D.mjs → chunk-FVFKLSMD.mjs} +2 -2
- package/dist/cli/{chunk-ETUV6RRK.js → chunk-GPM3AZXB.js} +9 -9
- package/dist/cli/{chunk-34KUUN3Z.js → chunk-HYMVGRZP.js} +50 -50
- package/dist/cli/{chunk-4V2Q3JO6.js → chunk-IHXLIPY3.js} +15 -15
- package/dist/cli/{chunk-HDB4GAWY.mjs → chunk-JMDMPIGV.mjs} +1 -1
- package/dist/cli/{chunk-KHZ6WEVF.js → chunk-KHZQCKZ6.js} +26 -26
- package/dist/cli/{chunk-7ZZSGV4A.js → chunk-LJCC26EK.js} +1 -1
- package/dist/cli/{chunk-VL5ERG22.mjs → chunk-M2RT2YVB.mjs} +2 -2
- package/dist/cli/{chunk-L6OSOKS6.mjs → chunk-MDMP2VS2.mjs} +12 -8
- package/dist/cli/{chunk-5HJHTZI6.mjs → chunk-OEVLOA6Y.mjs} +1 -1
- package/dist/cli/{chunk-ZXFGA2VK.js → chunk-ON7BSEMT.js} +8 -8
- package/dist/cli/{chunk-YXQ7SRL3.mjs → chunk-OWJRRGZH.mjs} +2 -2
- package/dist/cli/{chunk-MHRDXS7J.mjs → chunk-SHPLCIOL.mjs} +1 -1
- package/dist/cli/{chunk-QSH5CHRI.js → chunk-SQPNP3IQ.js} +6 -6
- package/dist/cli/{chunk-UE2UHYT3.mjs → chunk-VB6KECLU.mjs} +57 -6
- package/dist/cli/{chunk-UABI2T3Z.mjs → chunk-VD6KRRST.mjs} +2 -2
- package/dist/cli/{chunk-5HDB7XXT.js → chunk-VEUTINSL.js} +240 -236
- package/dist/cli/{chunk-N6KIEYZV.js → chunk-Y72FFPX5.js} +4 -4
- package/dist/cli/{chunk-A6ZTYKYF.js → chunk-ZMVJSS6N.js} +63 -12
- package/dist/cli/{csv-NITSP7QJ.mjs → csv-747TCRJS.mjs} +3 -3
- package/dist/cli/{csv-LPC7BGZ2.js → csv-JHBQL7PV.js} +12 -12
- package/dist/cli/{db-JVDYEXNC.mjs → db-42NBKURO.mjs} +4 -4
- package/dist/cli/{db-WGD54UKM.js → db-FGCCQJ64.js} +29 -29
- package/dist/cli/{describe-SVMLA6SN.mjs → describe-E6WVN74T.mjs} +11 -9
- package/dist/cli/{describe-GA7LSJRY.js → describe-PJYBUSVL.js} +30 -28
- package/dist/cli/{executions-P47HEI4N.js → executions-5P5ZJCRJ.js} +6 -6
- package/dist/cli/{executions-CXBJDGMU.mjs → executions-UF7KP7B6.mjs} +4 -4
- package/dist/cli/{feedback-34OSXUQ2.mjs → feedback-BFXXUVXK.mjs} +3 -3
- package/dist/cli/{feedback-GWKWE5CU.js → feedback-S43D42JP.js} +7 -7
- package/dist/cli/git-C6PRTVHM.js +23 -0
- package/dist/cli/{git-YAROF6D3.mjs → git-TNNTQ5IJ.mjs} +4 -4
- package/dist/cli/index.js +82 -82
- package/dist/cli/index.mjs +32 -32
- package/dist/cli/{legacy-noops-2G55OKIU.mjs → legacy-noops-3ZEHUFE4.mjs} +4 -4
- package/dist/cli/{legacy-noops-MDZQL3QH.js → legacy-noops-SYWQBRUI.js} +7 -7
- package/dist/cli/{monitors-KUGKMABN.mjs → monitors-DAU53OC5.mjs} +4 -4
- package/dist/cli/{monitors-X7QYWFSP.js → monitors-GTBPXIN7.js} +85 -85
- package/dist/cli/{org-CNBBAN4W.mjs → org-4TGDZ2ZL.mjs} +4 -4
- package/dist/cli/{org-6XL3IBT2.js → org-G77WDHXX.js} +64 -64
- package/dist/cli/play-LNKMZFTI.js +155 -0
- package/dist/cli/{play-33ZMPAR5.mjs → play-OZV6FDMR.mjs} +8 -8
- package/dist/cli/{providers-3OSQNFPE.mjs → providers-FPTHZSZH.mjs} +4 -4
- package/dist/cli/{providers-5POAURDT.js → providers-GHS5B4FX.js} +7 -7
- package/dist/cli/{quickstart-QICTOOW6.mjs → quickstart-ADJZVPQR.mjs} +3 -3
- package/dist/cli/{quickstart-LQGPDJTS.js → quickstart-TGO5N665.js} +5 -5
- package/dist/cli/{search-HBIX4SF4.mjs → search-B7BRMMFR.mjs} +5 -5
- package/dist/cli/search-L6K36YWC.js +26 -0
- package/dist/cli/{secrets-6MRGZPHT.mjs → secrets-A4UK4TMU.mjs} +4 -4
- package/dist/cli/{secrets-QKPBNQ3E.js → secrets-FDREPCLL.js} +13 -13
- package/dist/cli/{sessions-NODY2OW4.mjs → sessions-2UJPBSAV.mjs} +4 -4
- package/dist/cli/{sessions-NP7BLZD2.js → sessions-KQSHUEEV.js} +5 -5
- package/dist/cli/{settings-JCEIOTNL.mjs → settings-BZ5JTH67.mjs} +7 -7
- package/dist/cli/{settings-42QHXUB2.js → settings-XZSSJUSS.js} +74 -74
- package/dist/cli/{setup-3QR4RGMG.mjs → setup-DIQPCI6O.mjs} +6 -6
- package/dist/cli/{setup-5XXWP54Y.js → setup-GQO2XQLS.js} +41 -41
- package/dist/cli/{skills-U4OMXLNS.mjs → skills-6ZJBKK6M.mjs} +4 -4
- package/dist/cli/skills-VSIYWK7T.js +28 -0
- package/dist/cli/tools-L7A6ITNQ.js +40 -0
- package/dist/cli/{tools-45OROEZQ.mjs → tools-NKGWJUGR.mjs} +7 -7
- package/dist/cli/{update-2XCRMJ4R.mjs → update-I3H7FXIF.mjs} +6 -6
- package/dist/cli/update-IP3GCUVX.js +28 -0
- package/dist/cli/{workflow-47P4LQNC.js → workflow-J3FZEW4S.js} +15 -15
- package/dist/cli/{workflow-7X3GCOPY.mjs → workflow-XFRG5G5H.mjs} +5 -5
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +74 -74
- 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-BTFXJQLT.js +0 -35
- package/dist/cli/git-MIPISCON.js +0 -23
- package/dist/cli/play-3CM3P2DS.js +0 -155
- package/dist/cli/search-A2YLJ4I5.js +0 -26
- package/dist/cli/skills-4JJEAA66.js +0 -28
- package/dist/cli/tools-FDCFSA7W.js +0 -40
- package/dist/cli/update-VYL4TXIE.js +0 -28
|
@@ -14,7 +14,7 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
14
14
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkLJCC26EKjs = require('./chunk-LJCC26EK.js');
|
|
18
18
|
|
|
19
19
|
// src/errors.ts
|
|
20
20
|
var CustomerDbQueryOutcomeUnknownError = (_class = class extends _chunk7P5AA3SNjs.DeeplineError {
|
|
@@ -743,9 +743,9 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
|
743
743
|
}
|
|
744
744
|
|
|
745
745
|
// src/version.ts
|
|
746
|
-
var SDK_VERSION =
|
|
747
|
-
var SDK_API_MAJOR =
|
|
748
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
746
|
+
var SDK_VERSION = _chunkLJCC26EKjs.SDK_RELEASE.version;
|
|
747
|
+
var SDK_API_MAJOR = _chunkLJCC26EKjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
748
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunkLJCC26EKjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
749
749
|
|
|
750
750
|
// src/agent-runtime.ts
|
|
751
751
|
|
|
@@ -93,7 +93,6 @@ function schemaField(name, node, required) {
|
|
|
93
93
|
const example = [
|
|
94
94
|
schema.example,
|
|
95
95
|
schema.default,
|
|
96
|
-
Array.isArray(schema.enum) ? schema.enum[0] : void 0,
|
|
97
96
|
type === "string" ? NAMED_EXAMPLES[name.toLowerCase()] : void 0
|
|
98
97
|
].find((value) => value !== void 0);
|
|
99
98
|
return {
|
|
@@ -174,6 +173,8 @@ function exampleValue(field) {
|
|
|
174
173
|
const value = field.type.slice(RECORD.length).replace(/>( \| null)?$/, "");
|
|
175
174
|
return { key: exampleValue({ ...field, type: value }) };
|
|
176
175
|
}
|
|
176
|
+
const literal = /^"(?:[^"\\]|\\.)*"/.exec(field.type);
|
|
177
|
+
if (literal) return JSON.parse(literal[0]);
|
|
177
178
|
const type = field.type.toLowerCase();
|
|
178
179
|
if (type.includes("[]")) return [];
|
|
179
180
|
if (type.startsWith(SHAPE)) {
|
|
@@ -237,12 +238,58 @@ function namedShapes(roots) {
|
|
|
237
238
|
}
|
|
238
239
|
return named;
|
|
239
240
|
}
|
|
241
|
+
function withRowInputs(described) {
|
|
242
|
+
const columns = described.rowInputs;
|
|
243
|
+
if (!_optionalChain([columns, 'optionalAccess', _ => _.length])) return described.inputs;
|
|
244
|
+
const join = (...notes) => notes.filter(Boolean).join(" - ");
|
|
245
|
+
const first = columns[0].name;
|
|
246
|
+
return described.inputs.map((field) => {
|
|
247
|
+
if (field.name === described.csvInput) {
|
|
248
|
+
return {
|
|
249
|
+
...field,
|
|
250
|
+
type: `CsvInput<${SHAPE}>`,
|
|
251
|
+
fields: columns,
|
|
252
|
+
description: join(
|
|
253
|
+
field.description,
|
|
254
|
+
'Headers match these names ignoring case, spaces and punctuation ("LinkedIn URL" reads as linked_in_url); map any other header in columns.'
|
|
255
|
+
)
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
if (field.name === "columns") {
|
|
259
|
+
return {
|
|
260
|
+
...field,
|
|
261
|
+
type: SHAPE,
|
|
262
|
+
fields: columns.map(({ name }) => ({
|
|
263
|
+
name,
|
|
264
|
+
type: "string | string[]",
|
|
265
|
+
required: false
|
|
266
|
+
})),
|
|
267
|
+
description: join(
|
|
268
|
+
field.description,
|
|
269
|
+
`Your CSV header for a column, e.g. {"${first}": "My Header"}. CLI: --columns.${first} "My Header"`
|
|
270
|
+
)
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
return field;
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
function withRowOutputs(described) {
|
|
277
|
+
const columns = described.rowOutputs;
|
|
278
|
+
if (!_optionalChain([columns, 'optionalAccess', _2 => _2.length])) return described.outputs;
|
|
279
|
+
const typed = (field) => ({
|
|
280
|
+
...field,
|
|
281
|
+
type: `PlayDataset<${SHAPE}>`,
|
|
282
|
+
fields: columns,
|
|
283
|
+
...described.rowOutputsAddToSource ? { spread: _nullishCoalesce(described.csvInput, () => ( "source row")) } : {}
|
|
284
|
+
});
|
|
285
|
+
return described.outputs.some((field) => field.name === "rows") ? described.outputs.map(
|
|
286
|
+
(field) => field.name === "rows" ? typed(field) : field
|
|
287
|
+
) : [...described.outputs, typed({ name: "rows", type: "", required: true })];
|
|
288
|
+
}
|
|
240
289
|
function schemaBlocks(described, maxDepth, everyField = false) {
|
|
241
290
|
const sections = [
|
|
242
|
-
["Inputs:", described
|
|
243
|
-
["
|
|
244
|
-
["Outputs:", described.outputs],
|
|
245
|
-
["Columns added to each row:", _nullishCoalesce(described.rowOutputs, () => ( []))],
|
|
291
|
+
["Inputs:", withRowInputs(described)],
|
|
292
|
+
["Outputs:", withRowOutputs(described)],
|
|
246
293
|
[
|
|
247
294
|
"Raw response, as declared (read it from result.toolResponse.rawV2; check one real response for its nesting):",
|
|
248
295
|
everyField ? _nullishCoalesce(described.rawResponse, () => ( [])) : []
|
|
@@ -272,13 +319,17 @@ function schemaBlocks(described, maxDepth, everyField = false) {
|
|
|
272
319
|
];
|
|
273
320
|
}
|
|
274
321
|
if (depth >= maxDepth || field.summarized && !everyField) {
|
|
275
|
-
const names =
|
|
322
|
+
const names = [
|
|
323
|
+
...field.spread ? [`...${field.spread}`] : [],
|
|
324
|
+
...field.fields.map((child) => child.name)
|
|
325
|
+
].join(", ");
|
|
276
326
|
return [
|
|
277
327
|
`${start}${before}{ ${names} }${after},${comment([field.means, field.description])}`
|
|
278
328
|
];
|
|
279
329
|
}
|
|
280
330
|
return [
|
|
281
331
|
`${start}${before}{${comment([field.means, field.description])}`,
|
|
332
|
+
...field.spread ? [`${indent} ...${field.spread},`] : [],
|
|
282
333
|
...field.fields.flatMap(
|
|
283
334
|
(child) => fieldLines(child, `${indent} `, depth + 1)
|
|
284
335
|
),
|
|
@@ -368,7 +419,7 @@ function schemaLines(described, view) {
|
|
|
368
419
|
];
|
|
369
420
|
}
|
|
370
421
|
if (view.full) return schemaBlocks(described, Infinity, true);
|
|
371
|
-
const raw = _optionalChain([described, 'access',
|
|
422
|
+
const raw = _optionalChain([described, 'access', _3 => _3.rawResponse, 'optionalAccess', _4 => _4.length]) ? [
|
|
372
423
|
"",
|
|
373
424
|
`Other response fields (${described.rawResponse.map((field) => field.name).join(", ")}) are in result.toolResponse.rawV2. --full-schema lists them.`
|
|
374
425
|
] : [];
|
|
@@ -493,15 +544,15 @@ function jsonFields(fields, options) {
|
|
|
493
544
|
return [
|
|
494
545
|
field.name,
|
|
495
546
|
{
|
|
496
|
-
type: field.type.replace(SHAPE, _nullishCoalesce(_optionalChain([shape, 'optionalAccess',
|
|
547
|
+
type: field.type.replace(SHAPE, _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _5 => _5.name]), () => ( "object"))),
|
|
497
548
|
...options.input ? { required: field.required } : {},
|
|
498
549
|
...field.means ? { means: field.means } : {},
|
|
499
550
|
...field.example !== void 0 ? { example: field.example } : {},
|
|
500
|
-
...field.description && field.description !== _optionalChain([shape, 'optionalAccess',
|
|
551
|
+
...field.description && field.description !== _optionalChain([shape, 'optionalAccess', _6 => _6.description]) ? { description: field.description } : {},
|
|
501
552
|
...field.secondary ? { secondary: true } : {},
|
|
502
553
|
...field.read ? { read: field.read } : {},
|
|
503
554
|
...field.in ? { in: field.in } : {},
|
|
504
|
-
..._optionalChain([field, 'access',
|
|
555
|
+
..._optionalChain([field, 'access', _7 => _7.paths, 'optionalAccess', _8 => _8.length]) ? { paths: field.paths } : {},
|
|
505
556
|
...field.fields && !shape ? { fields: jsonFields(field.fields, options) } : {}
|
|
506
557
|
}
|
|
507
558
|
];
|
|
@@ -522,7 +573,7 @@ function describedJson(described, view) {
|
|
|
522
573
|
const used = /* @__PURE__ */ new Set();
|
|
523
574
|
const blocks = Object.fromEntries(
|
|
524
575
|
sections.flatMap(
|
|
525
|
-
([key, fields, input]) => _optionalChain([fields, 'optionalAccess',
|
|
576
|
+
([key, fields, input]) => _optionalChain([fields, 'optionalAccess', _9 => _9.length]) ? [
|
|
526
577
|
[
|
|
527
578
|
key,
|
|
528
579
|
jsonFields(fields, {
|
|
@@ -556,7 +607,7 @@ function describedJson(described, view) {
|
|
|
556
607
|
...described.cost ? { cost: described.cost } : {},
|
|
557
608
|
...described.rateLimit ? { rateLimit: described.rateLimit } : {},
|
|
558
609
|
...described.byok ? { byok: described.byok } : {},
|
|
559
|
-
..._optionalChain([described, 'access',
|
|
610
|
+
..._optionalChain([described, 'access', _10 => _10.features, 'optionalAccess', _11 => _11.length]) ? { features: described.features } : {},
|
|
560
611
|
...described.guidance.length ? { guidance: described.guidance } : {},
|
|
561
612
|
...blocks,
|
|
562
613
|
...used.size ? { types } : {},
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
printCommandEnvelope,
|
|
5
5
|
printJson,
|
|
6
6
|
readCsvRows
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-SHPLCIOL.mjs";
|
|
8
|
+
import "./chunk-JMDMPIGV.mjs";
|
|
9
9
|
import "./chunk-DLIRSHV6.mjs";
|
|
10
10
|
import "./chunk-NXGCO4JB.mjs";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-3H5U7XCU.mjs";
|
|
12
12
|
import "./chunk-WZYKRD7T.mjs";
|
|
13
13
|
import "./chunk-KRD6H754.mjs";
|
|
14
14
|
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunkSQPNP3IQjs = require('./chunk-SQPNP3IQ.js');
|
|
8
|
+
require('./chunk-Y72FFPX5.js');
|
|
9
9
|
require('./chunk-XNYIZMNQ.js');
|
|
10
10
|
require('./chunk-7P5AA3SN.js');
|
|
11
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-LJCC26EK.js');
|
|
12
12
|
require('./chunk-OG64RBAC.js');
|
|
13
13
|
require('./chunk-COGTRVWW.js');
|
|
14
14
|
|
|
@@ -126,7 +126,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
126
126
|
column.length,
|
|
127
127
|
...rows.map((row) => {
|
|
128
128
|
const value = _nullishCoalesce(row[column], () => ( ""));
|
|
129
|
-
return (verbose ? value :
|
|
129
|
+
return (verbose ? value : _chunkSQPNP3IQjs.clip.call(void 0, value, 42)).length;
|
|
130
130
|
})
|
|
131
131
|
)
|
|
132
132
|
])
|
|
@@ -136,7 +136,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
136
136
|
const body = rows.map(
|
|
137
137
|
(row) => columns.map((column) => {
|
|
138
138
|
const raw = _nullishCoalesce(row[column], () => ( ""));
|
|
139
|
-
const display = verbose ? raw :
|
|
139
|
+
const display = verbose ? raw : _chunkSQPNP3IQjs.clip.call(void 0, raw, 42);
|
|
140
140
|
return display.padEnd(widths[column]);
|
|
141
141
|
}).join(" | ")
|
|
142
142
|
);
|
|
@@ -156,7 +156,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
156
156
|
{ exitCode: 2 }
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
|
-
const allRows =
|
|
159
|
+
const allRows = _chunkSQPNP3IQjs.readCsvRows.call(void 0, csvPath);
|
|
160
160
|
const [rowStart, rowEnd] = parseRowRange(options.rows);
|
|
161
161
|
const rows = options.summary && options.rows === void 0 ? allRows : selectRows(allRows, rowStart, rowEnd);
|
|
162
162
|
const { rows: selected, columns } = selectColumns(
|
|
@@ -169,7 +169,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
169
169
|
if (options.summary) {
|
|
170
170
|
const summaries = summarizeColumns(selected, columns);
|
|
171
171
|
if (format === "json") {
|
|
172
|
-
|
|
172
|
+
_chunkSQPNP3IQjs.printJson.call(void 0, {
|
|
173
173
|
rows: summaries,
|
|
174
174
|
total_rows: selected.length,
|
|
175
175
|
source_total_rows: allRows.length
|
|
@@ -178,7 +178,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
178
178
|
}
|
|
179
179
|
const displayRows = summaryDisplayRows(summaries);
|
|
180
180
|
if (format === "csv") {
|
|
181
|
-
process.stdout.write(
|
|
181
|
+
process.stdout.write(_chunkSQPNP3IQjs.csvStringFromRows.call(void 0, displayRows));
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
184
|
process.stdout.write(
|
|
@@ -193,7 +193,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
195
|
if (format === "json") {
|
|
196
|
-
|
|
196
|
+
_chunkSQPNP3IQjs.printJson.call(void 0, {
|
|
197
197
|
rows: selected.map((row, index) => ({ __row: rowStart + index, ...row }))
|
|
198
198
|
});
|
|
199
199
|
return;
|
|
@@ -436,7 +436,7 @@ async function handleCsvRenderStart(options) {
|
|
|
436
436
|
if (log) {
|
|
437
437
|
detail = `
|
|
438
438
|
CSV render log:
|
|
439
|
-
${
|
|
439
|
+
${_chunkSQPNP3IQjs.clip.call(void 0, log, 2e3)}`;
|
|
440
440
|
}
|
|
441
441
|
} catch (e7) {
|
|
442
442
|
}
|
|
@@ -487,7 +487,7 @@ async function handleCsvRenderStatus(options) {
|
|
|
487
487
|
if (payload.pid) lines.push(`Render PID: ${payload.pid}`);
|
|
488
488
|
if (payload.url) lines.push(`Render URL: ${payload.url}`);
|
|
489
489
|
lines.push(`Render Health: ${payload.health_status}`);
|
|
490
|
-
|
|
490
|
+
_chunkSQPNP3IQjs.printCommandEnvelope.call(void 0, payload, {
|
|
491
491
|
json: options.json,
|
|
492
492
|
text: `${lines.join("\n")}
|
|
493
493
|
`
|
|
@@ -523,7 +523,7 @@ async function handleCsvRenderStop(options) {
|
|
|
523
523
|
};
|
|
524
524
|
const text = stopped.length > 0 ? `Stopped CSV render process(es): ${stopped.join(" ")}
|
|
525
525
|
` : "No running CSV render process found.\n";
|
|
526
|
-
|
|
526
|
+
_chunkSQPNP3IQjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
527
527
|
}
|
|
528
528
|
async function handleCsvRender(action, options) {
|
|
529
529
|
const normalized = _nullishCoalesce(action, () => ( "start"));
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
DeeplineClient,
|
|
6
6
|
planCustomerDbQuery
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ATK45XHI.mjs";
|
|
8
8
|
import "./chunk-6IKARAYD.mjs";
|
|
9
9
|
import "./chunk-CBVIJSHF.mjs";
|
|
10
10
|
import {
|
|
@@ -16,15 +16,15 @@ import {
|
|
|
16
16
|
printCommandEnvelope,
|
|
17
17
|
recordRows,
|
|
18
18
|
shouldEmitJson
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SHPLCIOL.mjs";
|
|
20
20
|
import {
|
|
21
21
|
CustomerDbQueryOutcomeUnknownError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JMDMPIGV.mjs";
|
|
23
23
|
import "./chunk-DLIRSHV6.mjs";
|
|
24
24
|
import {
|
|
25
25
|
DeeplineError
|
|
26
26
|
} from "./chunk-NXGCO4JB.mjs";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-3H5U7XCU.mjs";
|
|
28
28
|
import "./chunk-WZYKRD7T.mjs";
|
|
29
29
|
import "./chunk-KRD6H754.mjs";
|
|
30
30
|
|
|
@@ -4,7 +4,7 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkGPM3AZXBjs = require('./chunk-GPM3AZXB.js');
|
|
8
8
|
require('./chunk-S6R3OX7B.js');
|
|
9
9
|
require('./chunk-LA46MMTL.js');
|
|
10
10
|
|
|
@@ -16,15 +16,15 @@ require('./chunk-LA46MMTL.js');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkSQPNP3IQjs = require('./chunk-SQPNP3IQ.js');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkY72FFPX5js = require('./chunk-Y72FFPX5.js');
|
|
23
23
|
require('./chunk-XNYIZMNQ.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
27
|
-
require('./chunk-
|
|
27
|
+
require('./chunk-LJCC26EK.js');
|
|
28
28
|
require('./chunk-OG64RBAC.js');
|
|
29
29
|
require('./chunk-COGTRVWW.js');
|
|
30
30
|
|
|
@@ -47,8 +47,8 @@ function formatCell(value) {
|
|
|
47
47
|
return text.length > 80 ? `${text.slice(0, 77)}...` : text;
|
|
48
48
|
}
|
|
49
49
|
function tableLines(result) {
|
|
50
|
-
const rows =
|
|
51
|
-
const responseColumns =
|
|
50
|
+
const rows = _chunkSQPNP3IQjs.dataExportRows.call(void 0, customerDbRows(result));
|
|
51
|
+
const responseColumns = _chunkSQPNP3IQjs.dataExportColumns.call(void 0,
|
|
52
52
|
rows,
|
|
53
53
|
customerDbColumnNames(result)
|
|
54
54
|
);
|
|
@@ -94,7 +94,7 @@ function tableLines(result) {
|
|
|
94
94
|
return lines;
|
|
95
95
|
}
|
|
96
96
|
function customerDbRows(result) {
|
|
97
|
-
return
|
|
97
|
+
return _chunkSQPNP3IQjs.recordRows.call(void 0, result.rows);
|
|
98
98
|
}
|
|
99
99
|
function customerDbColumnNames(result) {
|
|
100
100
|
return result.columns.map((column) => column.name).filter(Boolean);
|
|
@@ -116,15 +116,15 @@ function collectErrorText(value) {
|
|
|
116
116
|
].filter(Boolean).join("\n");
|
|
117
117
|
}
|
|
118
118
|
function formatDbQueryError(sql, error) {
|
|
119
|
-
const text = error instanceof
|
|
119
|
+
const text = error instanceof _chunkY72FFPX5js.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
|
|
120
120
|
const lower = text.toLowerCase();
|
|
121
121
|
const referencesStorage = /"storage"\.|storage\./i.test(sql);
|
|
122
122
|
const runIdColumnMissing = /column\s+"?run_id"?\s+does not exist/i.test(text) || /run_id.*does not exist/i.test(lower);
|
|
123
123
|
const relationMissing = /relation\s+["']?[^"']*storage[^"']*["']?\s+does not exist/i.test(text) || /42p01/i.test(text);
|
|
124
124
|
if (referencesStorage && relationMissing) {
|
|
125
125
|
return [
|
|
126
|
-
...error instanceof
|
|
127
|
-
error instanceof
|
|
126
|
+
...error instanceof _chunkY72FFPX5js.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
127
|
+
error instanceof _chunkY72FFPX5js.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
|
|
128
128
|
"Play dataset tables are created only when the corresponding ctx.dataset(...).run(...) call executes. Pilot branches, early returns, and runs that fail before the dataset do not create that table.",
|
|
129
129
|
"Use `deepline runs get <run-id> --full` to inspect returned dataset handles, then export them with `deepline runs export <run-id> --dataset result.rows --out rows.csv`.",
|
|
130
130
|
`Original error: ${errorMessage(error)}`
|
|
@@ -132,7 +132,7 @@ function formatDbQueryError(sql, error) {
|
|
|
132
132
|
}
|
|
133
133
|
if (referencesStorage && runIdColumnMissing) {
|
|
134
134
|
return [
|
|
135
|
-
...error instanceof
|
|
135
|
+
...error instanceof _chunkY72FFPX5js.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
136
136
|
"Customer DB query failed: storage dataset tables use `_run_id`, not `run_id`.",
|
|
137
137
|
"Prefer `deepline runs export <run-id> --dataset result.rows --out rows.csv` unless you are doing deep table debugging.",
|
|
138
138
|
`Original error: ${errorMessage(error)}`
|
|
@@ -147,7 +147,7 @@ function writeCustomerDbCsv(result, outPath) {
|
|
|
147
147
|
const resolved = _path.resolve.call(void 0, outPath);
|
|
148
148
|
_fs.writeFileSync.call(void 0,
|
|
149
149
|
resolved,
|
|
150
|
-
|
|
150
|
+
_chunkSQPNP3IQjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
|
|
151
151
|
"utf-8"
|
|
152
152
|
);
|
|
153
153
|
return resolved;
|
|
@@ -188,7 +188,7 @@ function dbQueryExportEnvelope(input) {
|
|
|
188
188
|
function renderDbQueryResult(result, query, options) {
|
|
189
189
|
const { sql, maxRows, operationKey } = query;
|
|
190
190
|
const { format, out: outPath, json: explicitJsonOutput = false } = options;
|
|
191
|
-
const jsonOutput = explicitJsonOutput ||
|
|
191
|
+
const jsonOutput = explicitJsonOutput || _chunkSQPNP3IQjs.shouldEmitJson.call(void 0, );
|
|
192
192
|
const toolPayload = JSON.stringify({
|
|
193
193
|
sql,
|
|
194
194
|
result_mode: "rows",
|
|
@@ -199,7 +199,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
199
199
|
if (format === "csv") {
|
|
200
200
|
if (outPath) {
|
|
201
201
|
const exportedPath = writeCustomerDbCsv(result, outPath);
|
|
202
|
-
|
|
202
|
+
_chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
|
|
203
203
|
dbQueryExportEnvelope({
|
|
204
204
|
result,
|
|
205
205
|
format,
|
|
@@ -215,7 +215,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
215
215
|
);
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
|
-
|
|
218
|
+
_chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
|
|
219
219
|
dbQueryExportEnvelope({
|
|
220
220
|
result,
|
|
221
221
|
format,
|
|
@@ -225,7 +225,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
225
225
|
}),
|
|
226
226
|
{
|
|
227
227
|
json: explicitJsonOutput,
|
|
228
|
-
text:
|
|
228
|
+
text: _chunkSQPNP3IQjs.dataExportCsvString.call(void 0,
|
|
229
229
|
customerDbRows(result),
|
|
230
230
|
customerDbColumnNames(result)
|
|
231
231
|
)
|
|
@@ -234,14 +234,14 @@ function renderDbQueryResult(result, query, options) {
|
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
236
|
if (format === "markdown") {
|
|
237
|
-
const content =
|
|
237
|
+
const content = _chunkSQPNP3IQjs.markdownTableFromRows.call(void 0,
|
|
238
238
|
customerDbRows(result),
|
|
239
239
|
customerDbColumnNames(result)
|
|
240
240
|
);
|
|
241
241
|
if (outPath) {
|
|
242
242
|
const exportedPath = _path.resolve.call(void 0, outPath);
|
|
243
243
|
_fs.writeFileSync.call(void 0, exportedPath, content, "utf-8");
|
|
244
|
-
|
|
244
|
+
_chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
|
|
245
245
|
dbQueryExportEnvelope({
|
|
246
246
|
result,
|
|
247
247
|
format,
|
|
@@ -257,7 +257,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
257
257
|
);
|
|
258
258
|
return;
|
|
259
259
|
}
|
|
260
|
-
|
|
260
|
+
_chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
|
|
261
261
|
dbQueryExportEnvelope({
|
|
262
262
|
result,
|
|
263
263
|
format,
|
|
@@ -272,7 +272,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
272
272
|
);
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
|
-
|
|
275
|
+
_chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
|
|
276
276
|
{
|
|
277
277
|
...result,
|
|
278
278
|
next: {
|
|
@@ -346,9 +346,9 @@ async function runDbQueryCommand(options) {
|
|
|
346
346
|
...maxRows === void 0 ? {} : { maxRows },
|
|
347
347
|
...operationKey === void 0 ? {} : { operationKey }
|
|
348
348
|
};
|
|
349
|
-
const plan =
|
|
349
|
+
const plan = _chunkGPM3AZXBjs.planCustomerDbQuery.call(void 0, query);
|
|
350
350
|
if (options.dryRun) {
|
|
351
|
-
|
|
351
|
+
_chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
|
|
352
352
|
{
|
|
353
353
|
dryRun: true,
|
|
354
354
|
...plan,
|
|
@@ -361,11 +361,11 @@ async function runDbQueryCommand(options) {
|
|
|
361
361
|
...out === void 0 ? {} : { file: _path.resolve.call(void 0, out) }
|
|
362
362
|
}
|
|
363
363
|
},
|
|
364
|
-
{ json: options.json ||
|
|
364
|
+
{ json: options.json || _chunkSQPNP3IQjs.shouldEmitJson.call(void 0, ) }
|
|
365
365
|
);
|
|
366
366
|
return 0;
|
|
367
367
|
}
|
|
368
|
-
const client = new (0,
|
|
368
|
+
const client = new (0, _chunkGPM3AZXBjs.DeeplineClient)();
|
|
369
369
|
const result = await client.db.query(query);
|
|
370
370
|
renderDbQueryResult(result, query, {
|
|
371
371
|
format,
|
|
@@ -374,8 +374,8 @@ async function runDbQueryCommand(options) {
|
|
|
374
374
|
});
|
|
375
375
|
return 0;
|
|
376
376
|
} catch (error) {
|
|
377
|
-
if (error instanceof
|
|
378
|
-
|
|
377
|
+
if (error instanceof _chunkY72FFPX5js.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkSQPNP3IQjs.shouldEmitJson.call(void 0, ))) {
|
|
378
|
+
_chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
|
|
379
379
|
{
|
|
380
380
|
ok: false,
|
|
381
381
|
error: {
|
|
@@ -423,8 +423,8 @@ function dbRepairPlainText(result) {
|
|
|
423
423
|
async function handleDbRepair(args) {
|
|
424
424
|
const providerIndex = args.indexOf("--provider");
|
|
425
425
|
const provider = providerIndex >= 0 ? _optionalChain([args, 'access', _9 => _9[providerIndex + 1], 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]) : void 0;
|
|
426
|
-
const jsonOutput =
|
|
427
|
-
const client = new (0,
|
|
426
|
+
const jsonOutput = _chunkSQPNP3IQjs.argsWantJson.call(void 0, args);
|
|
427
|
+
const client = new (0, _chunkGPM3AZXBjs.DeeplineClient)();
|
|
428
428
|
let result;
|
|
429
429
|
try {
|
|
430
430
|
result = await client.repairIngestionStorage(
|
|
@@ -440,7 +440,7 @@ async function handleDbRepair(args) {
|
|
|
440
440
|
console.error(errorMessage2(error));
|
|
441
441
|
return 1;
|
|
442
442
|
}
|
|
443
|
-
|
|
443
|
+
_chunkSQPNP3IQjs.printCommandEnvelope.call(void 0,
|
|
444
444
|
{
|
|
445
445
|
command: "db repair",
|
|
446
446
|
status: result.status,
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
formatModelDescription,
|
|
4
4
|
publicToolSchemas,
|
|
5
5
|
toolMetadataJsonForDescribe
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7EEPWHRK.mjs";
|
|
7
7
|
import {
|
|
8
8
|
describedPlay
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MDMP2VS2.mjs";
|
|
10
10
|
import {
|
|
11
11
|
SCHEMA_LINE_LIMIT,
|
|
12
12
|
addDescribeOptions,
|
|
@@ -16,19 +16,19 @@ import {
|
|
|
16
16
|
examples,
|
|
17
17
|
schemaLines,
|
|
18
18
|
topLevelField
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VB6KECLU.mjs";
|
|
20
20
|
import "./chunk-OVDNJAJN.mjs";
|
|
21
21
|
import "./chunk-DSWSEHRX.mjs";
|
|
22
22
|
import "./chunk-H7HIDGZ7.mjs";
|
|
23
23
|
import "./chunk-EDWJY6T4.mjs";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-CUKV3EXY.mjs";
|
|
25
|
+
import "./chunk-VD6KRRST.mjs";
|
|
26
26
|
import "./chunk-Y6VOGHF2.mjs";
|
|
27
27
|
import "./chunk-ERFN2QY4.mjs";
|
|
28
28
|
import "./chunk-7E66A24V.mjs";
|
|
29
29
|
import {
|
|
30
30
|
DeeplineClient
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ATK45XHI.mjs";
|
|
32
32
|
import "./chunk-6IKARAYD.mjs";
|
|
33
33
|
import "./chunk-CBVIJSHF.mjs";
|
|
34
34
|
import "./chunk-WXLOW623.mjs";
|
|
@@ -36,13 +36,13 @@ import "./chunk-UFS752TU.mjs";
|
|
|
36
36
|
import "./chunk-GAMFK2ZP.mjs";
|
|
37
37
|
import {
|
|
38
38
|
printCommandEnvelope
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-
|
|
39
|
+
} from "./chunk-SHPLCIOL.mjs";
|
|
40
|
+
import "./chunk-JMDMPIGV.mjs";
|
|
41
41
|
import "./chunk-DLIRSHV6.mjs";
|
|
42
42
|
import {
|
|
43
43
|
DeeplineError
|
|
44
44
|
} from "./chunk-NXGCO4JB.mjs";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-3H5U7XCU.mjs";
|
|
46
46
|
import "./chunk-WZYKRD7T.mjs";
|
|
47
47
|
import "./chunk-KRD6H754.mjs";
|
|
48
48
|
|
|
@@ -231,6 +231,8 @@ async function describeAnything(name, options, onMissing) {
|
|
|
231
231
|
outputs,
|
|
232
232
|
rowInputs: _rowInputs,
|
|
233
233
|
rowOutputs: _rowOutputs,
|
|
234
|
+
rowOutputsAddToSource: _rowOutputsAddToSource,
|
|
235
|
+
csvInput: _csvInput,
|
|
234
236
|
...summary
|
|
235
237
|
} = described;
|
|
236
238
|
const view = options.schemaOnly ? {
|