deepline 0.3.375 → 0.3.377
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +56 -4
- package/dist/cli/{auth-U3Y7DTIG.mjs → auth-3SJMD5GS.mjs} +4 -4
- package/dist/cli/auth-C54HQ3XR.js +35 -0
- package/dist/cli/{billing-P2DNRAND.js → billing-IN4CGRX5.js} +73 -73
- package/dist/cli/{billing-TKARGBO3.mjs → billing-N4PYTCSM.mjs} +4 -4
- package/dist/cli/{chunk-IG3GOO4T.mjs → chunk-3H5U7XCU.mjs} +1 -1
- package/dist/cli/{chunk-LZUWGLM4.js → chunk-4T62V4WC.js} +2 -2
- package/dist/cli/{chunk-ZFWU5V2A.mjs → chunk-7EEPWHRK.mjs} +6 -6
- package/dist/cli/{chunk-ZHXPNJQI.mjs → chunk-ATK45XHI.mjs} +1 -1
- package/dist/cli/{chunk-CUIBDSSS.js → chunk-BBONZ7CN.js} +8 -8
- package/dist/cli/{chunk-NVXMPGM4.js → chunk-CEUIAIUI.js} +57 -57
- package/dist/cli/{chunk-HSIVHAZA.mjs → chunk-CUKV3EXY.mjs} +3 -3
- package/dist/cli/{chunk-M2HVNJ47.js → chunk-D3GRDNJO.js} +60 -60
- package/dist/cli/{chunk-MPQSBHMA.mjs → chunk-DW7BDVZY.mjs} +4 -4
- package/dist/cli/{chunk-QEEIEHGV.mjs → chunk-FVFKLSMD.mjs} +2 -2
- package/dist/cli/{chunk-DAG4ZBTJ.js → chunk-GPM3AZXB.js} +9 -9
- package/dist/cli/{chunk-HP4BE43N.js → chunk-HYMVGRZP.js} +50 -50
- package/dist/cli/{chunk-MTBQEND4.js → chunk-IHXLIPY3.js} +15 -15
- package/dist/cli/{chunk-4GP56LRE.mjs → chunk-JMDMPIGV.mjs} +1 -1
- package/dist/cli/{chunk-F5CU5ALX.js → chunk-KHZQCKZ6.js} +26 -26
- package/dist/cli/{chunk-ADSZGPYZ.js → chunk-LJCC26EK.js} +1 -1
- package/dist/cli/{chunk-Z4ARN4X3.mjs → chunk-M2RT2YVB.mjs} +2 -2
- package/dist/cli/{chunk-STYH5U6W.mjs → chunk-MDMP2VS2.mjs} +12 -8
- package/dist/cli/{chunk-B3TQIJ6L.mjs → chunk-OEVLOA6Y.mjs} +1 -1
- package/dist/cli/{chunk-KK4XPUVA.js → chunk-ON7BSEMT.js} +8 -8
- package/dist/cli/{chunk-MKS7C3YR.mjs → chunk-OWJRRGZH.mjs} +2 -2
- package/dist/cli/{chunk-M5QDOHLG.mjs → chunk-SHPLCIOL.mjs} +1 -1
- package/dist/cli/{chunk-GN5QM2BB.js → chunk-SQPNP3IQ.js} +6 -6
- package/dist/cli/{chunk-B2LFDTXZ.mjs → chunk-VB6KECLU.mjs} +75 -7
- package/dist/cli/{chunk-SJVJZOPT.mjs → chunk-VD6KRRST.mjs} +2 -2
- package/dist/cli/{chunk-HEF6UDGA.js → chunk-VEUTINSL.js} +240 -236
- package/dist/cli/{chunk-IQTHRG6E.js → chunk-Y72FFPX5.js} +4 -4
- package/dist/cli/{chunk-DHTG5CCI.js → chunk-ZMVJSS6N.js} +81 -13
- package/dist/cli/{csv-3FTYTEJ3.mjs → csv-747TCRJS.mjs} +3 -3
- package/dist/cli/{csv-WAEVGKHF.js → csv-JHBQL7PV.js} +12 -12
- package/dist/cli/{db-HUGGFIVS.mjs → db-42NBKURO.mjs} +4 -4
- package/dist/cli/{db-UDMDGNKO.js → db-FGCCQJ64.js} +29 -29
- package/dist/cli/{describe-EOBOGTB5.mjs → describe-E6WVN74T.mjs} +11 -9
- package/dist/cli/{describe-SIAKZYRK.js → describe-PJYBUSVL.js} +30 -28
- package/dist/cli/{executions-HYYP27MG.js → executions-5P5ZJCRJ.js} +6 -6
- package/dist/cli/{executions-O6Z2HSLK.mjs → executions-UF7KP7B6.mjs} +4 -4
- package/dist/cli/{feedback-RRAMGMQV.mjs → feedback-BFXXUVXK.mjs} +3 -3
- package/dist/cli/{feedback-3DWSBHKS.js → feedback-S43D42JP.js} +7 -7
- package/dist/cli/git-C6PRTVHM.js +23 -0
- package/dist/cli/{git-KVAK7VOL.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-MQNCDMY7.mjs → legacy-noops-3ZEHUFE4.mjs} +4 -4
- package/dist/cli/{legacy-noops-V5GQXXUR.js → legacy-noops-SYWQBRUI.js} +7 -7
- package/dist/cli/{monitors-6FB63TDM.mjs → monitors-DAU53OC5.mjs} +4 -4
- package/dist/cli/{monitors-RFGQILPW.js → monitors-GTBPXIN7.js} +85 -85
- package/dist/cli/{org-TZPQDDVX.mjs → org-4TGDZ2ZL.mjs} +4 -4
- package/dist/cli/{org-L33EPH2E.js → org-G77WDHXX.js} +64 -64
- package/dist/cli/play-LNKMZFTI.js +155 -0
- package/dist/cli/{play-PU23OETO.mjs → play-OZV6FDMR.mjs} +8 -8
- package/dist/cli/{providers-QGQR6ZZF.mjs → providers-FPTHZSZH.mjs} +4 -4
- package/dist/cli/{providers-2RHIKO22.js → providers-GHS5B4FX.js} +7 -7
- package/dist/cli/{quickstart-24DQYBW7.mjs → quickstart-ADJZVPQR.mjs} +3 -3
- package/dist/cli/{quickstart-BGQVPI7W.js → quickstart-TGO5N665.js} +5 -5
- package/dist/cli/{search-EUN7YFMX.mjs → search-B7BRMMFR.mjs} +5 -5
- package/dist/cli/search-L6K36YWC.js +26 -0
- package/dist/cli/{secrets-OOHN6LNJ.mjs → secrets-A4UK4TMU.mjs} +4 -4
- package/dist/cli/{secrets-XL7GUTQA.js → secrets-FDREPCLL.js} +13 -13
- package/dist/cli/{sessions-SDN4C3YS.mjs → sessions-2UJPBSAV.mjs} +4 -4
- package/dist/cli/{sessions-FD5XB7M2.js → sessions-KQSHUEEV.js} +5 -5
- package/dist/cli/{settings-3MXRXYXI.mjs → settings-BZ5JTH67.mjs} +7 -7
- package/dist/cli/{settings-6ZEKVAYL.js → settings-XZSSJUSS.js} +74 -74
- package/dist/cli/{setup-DWTR6HNT.mjs → setup-DIQPCI6O.mjs} +6 -6
- package/dist/cli/{setup-VKQ5EJZR.js → setup-GQO2XQLS.js} +41 -41
- package/dist/cli/{skills-ISG5UUZW.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-JTC3DR6M.mjs → tools-NKGWJUGR.mjs} +7 -7
- package/dist/cli/{update-GMTVIHCG.mjs → update-I3H7FXIF.mjs} +6 -6
- package/dist/cli/update-IP3GCUVX.js +28 -0
- package/dist/cli/{workflow-2765Y3Y5.js → workflow-J3FZEW4S.js} +15 -15
- package/dist/cli/{workflow-3POT3VFY.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-B7CLYD7R.js +0 -35
- package/dist/cli/git-M36KWCCG.js +0 -23
- package/dist/cli/play-YR2XQARF.js +0 -155
- package/dist/cli/search-OHELMK6E.js +0 -26
- package/dist/cli/skills-6GFW4GCW.js +0 -28
- package/dist/cli/tools-LK4L6VCK.js +0 -40
- package/dist/cli/update-PSJLAW4Q.js +0 -28
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
addDescribeOptions,
|
|
3
3
|
recordPlayTermination,
|
|
4
4
|
schemaFields
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VB6KECLU.mjs";
|
|
6
6
|
import {
|
|
7
7
|
shellQuote
|
|
8
8
|
} from "./chunk-OVDNJAJN.mjs";
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
} from "./chunk-EDWJY6T4.mjs";
|
|
20
20
|
import {
|
|
21
21
|
registerDeprecatedSearchCommand
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CUKV3EXY.mjs";
|
|
23
23
|
import {
|
|
24
24
|
handleDeploymentGet,
|
|
25
25
|
handleDeploymentsList
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VD6KRRST.mjs";
|
|
27
27
|
import {
|
|
28
28
|
pinLocalPlayImports,
|
|
29
29
|
planLocalPlayExecution
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
normalizeRunEventOperationRequest,
|
|
43
43
|
parseLogLevel,
|
|
44
44
|
playInputExampleArgs
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-ATK45XHI.mjs";
|
|
46
46
|
import {
|
|
47
47
|
CSV_DATA_INPUT_KEY,
|
|
48
48
|
buildNamedPlayRunRequest,
|
|
@@ -75,10 +75,10 @@ import {
|
|
|
75
75
|
printJsonError,
|
|
76
76
|
renderCommandEnvelopeText,
|
|
77
77
|
shouldEmitJson
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-SHPLCIOL.mjs";
|
|
79
79
|
import {
|
|
80
80
|
fetchWithDeploymentProtection
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-JMDMPIGV.mjs";
|
|
82
82
|
import {
|
|
83
83
|
DeeplineError
|
|
84
84
|
} from "./chunk-NXGCO4JB.mjs";
|
|
@@ -15362,7 +15362,11 @@ function describedPlay(play) {
|
|
|
15362
15362
|
inputs: schemaFields(play.inputSchema),
|
|
15363
15363
|
outputs: schemaFields(play.outputSchema),
|
|
15364
15364
|
...rowInputs.length ? { rowInputs } : {},
|
|
15365
|
-
...
|
|
15365
|
+
...typeof csv.inputField === "string" ? { csvInput: csv.inputField } : {},
|
|
15366
|
+
...rowOutputs.length ? {
|
|
15367
|
+
rowOutputs,
|
|
15368
|
+
rowOutputsAddToSource: Object.keys(added).length > 0 || rowOutput.preservesSourceColumns === true
|
|
15369
|
+
} : {},
|
|
15366
15370
|
runner: {
|
|
15367
15371
|
via: "play",
|
|
15368
15372
|
reference,
|
|
@@ -16494,7 +16498,7 @@ Examples:
|
|
|
16494
16498
|
process.exitCode = await ownView();
|
|
16495
16499
|
return;
|
|
16496
16500
|
}
|
|
16497
|
-
const { describeAnything } = await import("./describe-
|
|
16501
|
+
const { describeAnything } = await import("./describe-E6WVN74T.mjs");
|
|
16498
16502
|
process.exitCode = await describeAnything(
|
|
16499
16503
|
name,
|
|
16500
16504
|
{
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGPM3AZXBjs = require('./chunk-GPM3AZXB.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkSQPNP3IQjs = require('./chunk-SQPNP3IQ.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkY72FFPX5js = require('./chunk-Y72FFPX5.js');
|
|
12
12
|
|
|
13
13
|
// src/cli/commands/search.ts
|
|
14
14
|
var _commander = require('commander');
|
|
@@ -18,7 +18,7 @@ var _fs = require('fs');
|
|
|
18
18
|
var _path = require('path');
|
|
19
19
|
var SEARCH_REF_TTL_MS = 15 * 6e4;
|
|
20
20
|
function lastSearchPath() {
|
|
21
|
-
return _path.join.call(void 0,
|
|
21
|
+
return _path.join.call(void 0, _chunkY72FFPX5js.sdkCliStateDirPath.call(void 0, _chunkY72FFPX5js.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
|
|
22
22
|
}
|
|
23
23
|
function rememberSearchRef(searchRef) {
|
|
24
24
|
try {
|
|
@@ -259,7 +259,7 @@ function searchRow(item) {
|
|
|
259
259
|
}
|
|
260
260
|
function renderSearchResults(result) {
|
|
261
261
|
if (result.results.length === 0)
|
|
262
|
-
return
|
|
262
|
+
return _chunkSQPNP3IQjs.renderCommandEnvelopeText.call(void 0, result);
|
|
263
263
|
const rows = result.results.map(searchRow);
|
|
264
264
|
const kinds = new Set(rows.map((row) => row.kind));
|
|
265
265
|
const onlyTools = kinds.size === 1 && kinds.has("tool");
|
|
@@ -283,7 +283,7 @@ function renderSearchResults(result) {
|
|
|
283
283
|
actions: _optionalChain([render, 'optionalAccess', _11 => _11.actions])
|
|
284
284
|
};
|
|
285
285
|
const followUps = _optionalChain([remaining, 'access', _12 => _12.sections, 'optionalAccess', _13 => _13.length]) || _optionalChain([remaining, 'access', _14 => _14.actions, 'optionalAccess', _15 => _15.length]) ? `
|
|
286
|
-
${
|
|
286
|
+
${_chunkSQPNP3IQjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
|
|
287
287
|
const notes = rows.flatMap(
|
|
288
288
|
(row) => row.notes.map((note) => ` ${row.id}: ${note}`)
|
|
289
289
|
);
|
|
@@ -360,7 +360,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
360
360
|
console.error(USAGE);
|
|
361
361
|
return 1;
|
|
362
362
|
}
|
|
363
|
-
const { search_ref: searchRef, ...result } = await new (0,
|
|
363
|
+
const { search_ref: searchRef, ...result } = await new (0, _chunkGPM3AZXBjs.DeeplineClient)().search({
|
|
364
364
|
query,
|
|
365
365
|
types,
|
|
366
366
|
exclude,
|
|
@@ -374,7 +374,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
374
374
|
});
|
|
375
375
|
if (searchRef) rememberSearchRef(searchRef);
|
|
376
376
|
pointAtDescribe(result);
|
|
377
|
-
|
|
377
|
+
_chunkSQPNP3IQjs.printCommandEnvelope.call(void 0, result, {
|
|
378
378
|
json: options.json === true,
|
|
379
379
|
text: renderSearchResults(result)
|
|
380
380
|
});
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SHPLCIOL.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
saveHostEnvValues,
|
|
26
26
|
saveProjectDeeplineEnvValues,
|
|
27
27
|
storedHostApiKey
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JMDMPIGV.mjs";
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
import {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkY72FFPX5js = require('./chunk-Y72FFPX5.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -225,8 +225,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
225
225
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
226
226
|
var defaultBrowserCommandRunner = childProcess;
|
|
227
227
|
function getAuthedHttpClient() {
|
|
228
|
-
const config =
|
|
229
|
-
return { config, http: new (0,
|
|
228
|
+
const config = _chunkY72FFPX5js.resolveConfig.call(void 0, );
|
|
229
|
+
return { config, http: new (0, _chunkY72FFPX5js.HttpClient)(config) };
|
|
230
230
|
}
|
|
231
231
|
function stableOsUserId() {
|
|
232
232
|
try {
|
|
@@ -566,7 +566,7 @@ function collectLocalEnvInfo() {
|
|
|
566
566
|
os: `${process.platform} ${process.arch}`,
|
|
567
567
|
node_version: process.version,
|
|
568
568
|
home_dir: homeDir,
|
|
569
|
-
agent_runtime:
|
|
569
|
+
agent_runtime: _chunkY72FFPX5js.detectAgentRuntime.call(void 0, )
|
|
570
570
|
};
|
|
571
571
|
const env = process.env;
|
|
572
572
|
const optional = {
|
|
@@ -813,9 +813,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
813
813
|
}
|
|
814
814
|
function withAgentCommandContext(value) {
|
|
815
815
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
816
|
-
return
|
|
816
|
+
return _chunkY72FFPX5js.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
817
817
|
...valueRecord,
|
|
818
|
-
command_context:
|
|
818
|
+
command_context: _chunkY72FFPX5js.resolveCliCommandContext.call(void 0, )
|
|
819
819
|
} : value;
|
|
820
820
|
}
|
|
821
821
|
function printJson(value, fields) {
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/cli/described.ts
|
|
6
6
|
var SHAPE = "{}";
|
|
7
|
+
var RECORD = "Record<string, ";
|
|
7
8
|
function featureLines(id, features) {
|
|
8
9
|
if (!features.length) return [];
|
|
9
10
|
const width = Math.max(...features.map(({ name }) => name.length));
|
|
@@ -75,6 +76,13 @@ function schemaType(schema) {
|
|
|
75
76
|
...item.fields ? { fields: item.fields } : {}
|
|
76
77
|
};
|
|
77
78
|
}
|
|
79
|
+
if (isRecord(schema.additionalProperties)) {
|
|
80
|
+
const value = schemaType(schema.additionalProperties);
|
|
81
|
+
return {
|
|
82
|
+
type: `${RECORD}${value.type}>${nullable}`,
|
|
83
|
+
...value.fields ? { fields: value.fields } : {}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
78
86
|
return {
|
|
79
87
|
type: types.filter((type) => type !== "null").join(" | ") + nullable || "unknown"
|
|
80
88
|
};
|
|
@@ -85,7 +93,6 @@ function schemaField(name, node, required) {
|
|
|
85
93
|
const example = [
|
|
86
94
|
schema.example,
|
|
87
95
|
schema.default,
|
|
88
|
-
Array.isArray(schema.enum) ? schema.enum[0] : void 0,
|
|
89
96
|
type === "string" ? NAMED_EXAMPLES[name.toLowerCase()] : void 0
|
|
90
97
|
].find((value) => value !== void 0);
|
|
91
98
|
return {
|
|
@@ -162,9 +169,20 @@ function rateLimitSummary(limits) {
|
|
|
162
169
|
}
|
|
163
170
|
function exampleValue(field) {
|
|
164
171
|
if (field.example !== void 0) return field.example;
|
|
172
|
+
if (field.type.startsWith(RECORD)) {
|
|
173
|
+
const value = field.type.slice(RECORD.length).replace(/>( \| null)?$/, "");
|
|
174
|
+
return { key: exampleValue({ ...field, type: value }) };
|
|
175
|
+
}
|
|
176
|
+
const literal = /^"(?:[^"\\]|\\.)*"/.exec(field.type);
|
|
177
|
+
if (literal) return JSON.parse(literal[0]);
|
|
165
178
|
const type = field.type.toLowerCase();
|
|
166
179
|
if (type.includes("[]")) return [];
|
|
167
|
-
if (type.startsWith(SHAPE)
|
|
180
|
+
if (type.startsWith(SHAPE)) {
|
|
181
|
+
return Object.fromEntries(
|
|
182
|
+
(field.fields ?? []).filter((child) => child.required).map((child) => [child.name, exampleValue(child)])
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
if (type.startsWith("object")) return {};
|
|
168
186
|
if (type.startsWith("integer") || type.startsWith("number")) return 1;
|
|
169
187
|
if (type.startsWith("boolean")) return true;
|
|
170
188
|
return "...";
|
|
@@ -220,12 +238,58 @@ function namedShapes(roots) {
|
|
|
220
238
|
}
|
|
221
239
|
return named;
|
|
222
240
|
}
|
|
241
|
+
function withRowInputs(described) {
|
|
242
|
+
const columns = described.rowInputs;
|
|
243
|
+
if (!columns?.length) return described.inputs;
|
|
244
|
+
const join = (...notes) => notes.filter(Boolean).join(" - ");
|
|
245
|
+
const first = columns[0].name;
|
|
246
|
+
return described.inputs.map((field) => {
|
|
247
|
+
if (field.name === described.csvInput) {
|
|
248
|
+
return {
|
|
249
|
+
...field,
|
|
250
|
+
type: `CsvInput<${SHAPE}>`,
|
|
251
|
+
fields: columns,
|
|
252
|
+
description: join(
|
|
253
|
+
field.description,
|
|
254
|
+
'Headers match these names ignoring case, spaces and punctuation ("LinkedIn URL" reads as linked_in_url); map any other header in columns.'
|
|
255
|
+
)
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
if (field.name === "columns") {
|
|
259
|
+
return {
|
|
260
|
+
...field,
|
|
261
|
+
type: SHAPE,
|
|
262
|
+
fields: columns.map(({ name }) => ({
|
|
263
|
+
name,
|
|
264
|
+
type: "string | string[]",
|
|
265
|
+
required: false
|
|
266
|
+
})),
|
|
267
|
+
description: join(
|
|
268
|
+
field.description,
|
|
269
|
+
`Your CSV header for a column, e.g. {"${first}": "My Header"}. CLI: --columns.${first} "My Header"`
|
|
270
|
+
)
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
return field;
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
function withRowOutputs(described) {
|
|
277
|
+
const columns = described.rowOutputs;
|
|
278
|
+
if (!columns?.length) return described.outputs;
|
|
279
|
+
const typed = (field) => ({
|
|
280
|
+
...field,
|
|
281
|
+
type: `PlayDataset<${SHAPE}>`,
|
|
282
|
+
fields: columns,
|
|
283
|
+
...described.rowOutputsAddToSource ? { spread: described.csvInput ?? "source row" } : {}
|
|
284
|
+
});
|
|
285
|
+
return described.outputs.some((field) => field.name === "rows") ? described.outputs.map(
|
|
286
|
+
(field) => field.name === "rows" ? typed(field) : field
|
|
287
|
+
) : [...described.outputs, typed({ name: "rows", type: "", required: true })];
|
|
288
|
+
}
|
|
223
289
|
function schemaBlocks(described, maxDepth, everyField = false) {
|
|
224
290
|
const sections = [
|
|
225
|
-
["Inputs:", described
|
|
226
|
-
["
|
|
227
|
-
["Outputs:", described.outputs],
|
|
228
|
-
["Columns added to each row:", described.rowOutputs ?? []],
|
|
291
|
+
["Inputs:", withRowInputs(described)],
|
|
292
|
+
["Outputs:", withRowOutputs(described)],
|
|
229
293
|
[
|
|
230
294
|
"Raw response, as declared (read it from result.toolResponse.rawV2; check one real response for its nesting):",
|
|
231
295
|
everyField ? described.rawResponse ?? [] : []
|
|
@@ -255,13 +319,17 @@ function schemaBlocks(described, maxDepth, everyField = false) {
|
|
|
255
319
|
];
|
|
256
320
|
}
|
|
257
321
|
if (depth >= maxDepth || field.summarized && !everyField) {
|
|
258
|
-
const names =
|
|
322
|
+
const names = [
|
|
323
|
+
...field.spread ? [`...${field.spread}`] : [],
|
|
324
|
+
...field.fields.map((child) => child.name)
|
|
325
|
+
].join(", ");
|
|
259
326
|
return [
|
|
260
327
|
`${start}${before}{ ${names} }${after},${comment([field.means, field.description])}`
|
|
261
328
|
];
|
|
262
329
|
}
|
|
263
330
|
return [
|
|
264
331
|
`${start}${before}{${comment([field.means, field.description])}`,
|
|
332
|
+
...field.spread ? [`${indent} ...${field.spread},`] : [],
|
|
265
333
|
...field.fields.flatMap(
|
|
266
334
|
(child) => fieldLines(child, `${indent} `, depth + 1)
|
|
267
335
|
),
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SHPLCIOL.mjs";
|
|
6
6
|
import {
|
|
7
7
|
resolveBaseUrlOnly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JMDMPIGV.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|