deepline 0.3.372 → 0.3.373
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/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-ODSACXLF.mjs → auth-7BMCDCRH.mjs} +4 -4
- package/dist/cli/auth-BWCNRUG3.js +33 -0
- package/dist/cli/{billing-4ERXY2DZ.js → billing-GKI7B4JF.js} +73 -73
- package/dist/cli/{billing-OPIOZLAN.mjs → billing-RZEHHMPU.mjs} +4 -4
- package/dist/cli/{chunk-E5UD3JDQ.js → chunk-3VN4FTE3.js} +289 -5
- package/dist/cli/{chunk-BVUGPOU3.mjs → chunk-6JCVL7CE.mjs} +2 -2
- package/dist/cli/{chunk-RJ7JJMQO.js → chunk-BM47AKUZ.js} +266 -254
- package/dist/cli/{chunk-DM5QUZJR.js → chunk-CLEB5KUZ.js} +1 -1
- package/dist/cli/{chunk-AQFA7HMN.js → chunk-D2CZ4Y5G.js} +15 -15
- package/dist/cli/{chunk-3GK3SH3G.mjs → chunk-E6BZWURC.mjs} +200 -13
- package/dist/cli/{chunk-RUYZAREB.js → chunk-E7MGPPM5.js} +9 -9
- package/dist/cli/{chunk-DONL233W.mjs → chunk-ECA6NQYL.mjs} +4 -4
- package/dist/cli/{chunk-GZQKUFM5.js → chunk-EYXSAB7O.js} +26 -26
- package/dist/cli/{chunk-MIMV5LTU.mjs → chunk-HNLXC5BP.mjs} +1 -1
- package/dist/cli/{chunk-6MDAGRZP.js → chunk-IHQQNWU4.js} +2 -2
- package/dist/cli/{chunk-FGHRRJ3D.mjs → chunk-IUYKSTWB.mjs} +1 -1
- package/dist/cli/{chunk-VVFH745L.js → chunk-JHUMUIU6.js} +6 -6
- package/dist/cli/{chunk-BFLPCGOR.mjs → chunk-JP2YA3AV.mjs} +1 -1
- package/dist/cli/{chunk-ML2ZY7YD.js → chunk-ND4BVWWZ.js} +4 -4
- package/dist/cli/{chunk-EFJL5FCU.js → chunk-NVZAZGHA.js} +8 -8
- package/dist/cli/{chunk-IUWPC5K6.js → chunk-ORBVXCTL.js} +50 -50
- package/dist/cli/{chunk-JAERLCMH.mjs → chunk-P5JPGZNI.mjs} +1 -1
- package/dist/cli/{chunk-KC2YOJTU.mjs → chunk-PZ26EKNC.mjs} +319 -115
- package/dist/cli/{chunk-U3W7E5WT.mjs → chunk-QSV76EMO.mjs} +27 -15
- package/dist/cli/{chunk-4LIUZ4QR.mjs → chunk-R6TPSZLN.mjs} +2 -2
- package/dist/cli/{chunk-N5TPMNTT.js → chunk-S5OTS6H5.js} +8 -8
- package/dist/cli/{chunk-XSPAI6MF.mjs → chunk-TB73PXE3.mjs} +2 -2
- package/dist/cli/{chunk-D6O3NJHX.js → chunk-W3H422KP.js} +60 -60
- package/dist/cli/{chunk-WJWO74MM.js → chunk-XJYUQBHY.js} +390 -186
- package/dist/cli/{chunk-3CTB7V5F.mjs → chunk-XMME4SCK.mjs} +2 -2
- package/dist/cli/{chunk-2RC5JQ3C.mjs → chunk-Y32GUTEN.mjs} +1 -1
- package/dist/cli/{chunk-JB6ERQUV.mjs → chunk-Y6VOGHF2.mjs} +284 -0
- package/dist/cli/{chunk-5HYD3GMS.mjs → chunk-YHHY2YHK.mjs} +3 -3
- package/dist/cli/{chunk-2JRRXXTA.js → chunk-YPVTQRUM.js} +201 -14
- package/dist/cli/{client-KF2J754U.mjs → client-FO6LMHT4.mjs} +3 -3
- package/dist/cli/client-KAWK7FJR.js +20 -0
- package/dist/cli/{csv-UL3MCD5D.mjs → csv-3FNCVMWA.mjs} +3 -3
- package/dist/cli/{csv-UJ3M7NFP.js → csv-NFQYQWWO.js} +12 -12
- package/dist/cli/{db-444XYOTV.js → db-CTLGRV3X.js} +29 -29
- package/dist/cli/{db-SIOWA63T.mjs → db-VA7HULGR.mjs} +4 -4
- package/dist/cli/{describe-GI5GHAKO.mjs → describe-GXGRMP2M.mjs} +46 -17
- package/dist/cli/{describe-RRBESS3S.js → describe-IUHOEPKY.js} +61 -32
- package/dist/cli/{executions-ERXZUOL5.js → executions-DSK3HRPU.js} +6 -6
- package/dist/cli/{executions-4YDP6BXI.mjs → executions-OZQDZQIK.mjs} +4 -4
- package/dist/cli/{feedback-3M7D7DZQ.js → feedback-KTMLMWKV.js} +7 -7
- package/dist/cli/{feedback-CPWQL5LU.mjs → feedback-ZOY7R4JD.mjs} +3 -3
- package/dist/cli/git-5P5FLEUC.js +23 -0
- package/dist/cli/{git-XN6C3TJZ.mjs → git-FIOI4IA2.mjs} +4 -4
- package/dist/cli/index.js +81 -81
- package/dist/cli/index.mjs +32 -32
- package/dist/cli/{legacy-noops-KXQ6TFFL.mjs → legacy-noops-KQZWSABN.mjs} +4 -4
- package/dist/cli/{legacy-noops-5XDGOFWH.js → legacy-noops-WXAYRQMQ.js} +7 -7
- package/dist/cli/{monitors-KH22PDOC.js → monitors-LPUCHRNJ.js} +85 -85
- package/dist/cli/{monitors-33IU5JR6.mjs → monitors-VHNWIF4V.mjs} +4 -4
- package/dist/cli/{org-X4NSLQG5.js → org-GWHWBCMD.js} +64 -64
- package/dist/cli/{org-MHYMWUEP.mjs → org-UW7NPGEY.mjs} +4 -4
- package/dist/cli/play-EVBIC7Z5.js +155 -0
- package/dist/cli/{play-LCZKHKW2.mjs → play-FNM2E66T.mjs} +8 -8
- package/dist/cli/{providers-J6LWCF5R.js → providers-6D6R3PWX.js} +7 -7
- package/dist/cli/{providers-L5FJTSEA.mjs → providers-XAZMYDWS.mjs} +4 -4
- package/dist/cli/{quickstart-OOPFA4MX.js → quickstart-HBUWBVH6.js} +5 -5
- package/dist/cli/{quickstart-NE3BTWGL.mjs → quickstart-OK65PGZL.mjs} +3 -3
- package/dist/cli/search-6ZY2XWP2.js +26 -0
- package/dist/cli/{search-DBXOEOIE.mjs → search-XY6JOTS2.mjs} +5 -5
- package/dist/cli/{secrets-WPMU7UBD.js → secrets-6CYCPK7T.js} +13 -13
- package/dist/cli/{secrets-U2MLWZH2.mjs → secrets-W2LDLU2W.mjs} +4 -4
- package/dist/cli/{sessions-YYZ3UJDS.js → sessions-GOYEKNTJ.js} +5 -5
- package/dist/cli/{sessions-WYNC4AUE.mjs → sessions-JAX7PGXU.mjs} +4 -4
- package/dist/cli/{settings-FQZSHFC6.mjs → settings-OACUQOCM.mjs} +7 -7
- package/dist/cli/{settings-WQDFX3X6.js → settings-QMFYFCT7.js} +74 -74
- package/dist/cli/{setup-JKYJT35S.mjs → setup-2KA5TZBZ.mjs} +6 -6
- package/dist/cli/{setup-DKYVNDTM.js → setup-36VOOGVA.js} +41 -41
- package/dist/cli/skills-6GPIEPTP.js +28 -0
- package/dist/cli/{skills-VHVCJJJY.mjs → skills-QY4BX5ZX.mjs} +4 -4
- package/dist/cli/tools-RTECP4WT.js +40 -0
- package/dist/cli/{tools-E23PU7KM.mjs → tools-UCB2QRVC.mjs} +8 -8
- package/dist/cli/{update-4A4VU6CW.mjs → update-327MHUO4.mjs} +6 -6
- package/dist/cli/update-WR65EHBN.js +28 -0
- package/dist/cli/{workflow-WB2USWAA.js → workflow-G7BU54KW.js} +15 -15
- package/dist/cli/{workflow-2ZR2ECTG.mjs → workflow-HJN4GA5A.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
|
@@ -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.
|
|
52
|
+
version: "0.3.373",
|
|
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
|
|
@@ -1,17 +1,17 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkIHQQNWU4js = require('./chunk-IHQQNWU4.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkW3H422KPjs = require('./chunk-W3H422KP.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkJHUMUIU6js = require('./chunk-JHUMUIU6.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkND4BVWWZjs = require('./chunk-ND4BVWWZ.js');
|
|
15
15
|
|
|
16
16
|
// src/cli/commands/update.ts
|
|
17
17
|
var _child_process = require('child_process');
|
|
@@ -489,7 +489,7 @@ function normalizedNpmPrefix(value) {
|
|
|
489
489
|
}
|
|
490
490
|
function resolveNpmGlobalPrefix(env) {
|
|
491
491
|
try {
|
|
492
|
-
const plan =
|
|
492
|
+
const plan = _chunkW3H422KPjs.resolveShellSpawn.call(void 0, "npm", ["prefix", "-g"], process.platform, env);
|
|
493
493
|
const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
|
|
494
494
|
encoding: "utf8",
|
|
495
495
|
env,
|
|
@@ -545,8 +545,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
545
545
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
546
546
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
547
547
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
548
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
549
|
-
const npmGlobalInstallFlags =
|
|
548
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkIHQQNWU4js.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
549
|
+
const npmGlobalInstallFlags = _chunkIHQQNWU4js.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
550
550
|
const args = installPrefix ? [
|
|
551
551
|
"install",
|
|
552
552
|
"-g",
|
|
@@ -556,7 +556,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
556
556
|
packageSpec
|
|
557
557
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
558
558
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
559
|
-
_optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) ||
|
|
559
|
+
_optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) || _chunkND4BVWWZjs.autoDetectBaseUrl.call(void 0, )
|
|
560
560
|
);
|
|
561
561
|
return {
|
|
562
562
|
kind: "npm-global",
|
|
@@ -703,7 +703,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
703
703
|
function runCommand(command, args, env = process.env) {
|
|
704
704
|
return new Promise((resolveResult) => {
|
|
705
705
|
let output = "";
|
|
706
|
-
const plan =
|
|
706
|
+
const plan = _chunkW3H422KPjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
707
707
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
708
708
|
stdio: ["inherit", "pipe", "pipe"],
|
|
709
709
|
shell: plan.shell,
|
|
@@ -1079,14 +1079,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1079
1079
|
throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
|
|
1080
1080
|
}
|
|
1081
1081
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1082
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1082
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkND4BVWWZjs.autoDetectBaseUrl));
|
|
1083
1083
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1084
1084
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1085
1085
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1086
1086
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1087
1087
|
process.stdout.write = (() => true);
|
|
1088
1088
|
try {
|
|
1089
|
-
const exitCode = await
|
|
1089
|
+
const exitCode = await _chunkW3H422KPjs.runSkillsCommand.call(void 0, { json: true });
|
|
1090
1090
|
if (exitCode !== 0) {
|
|
1091
1091
|
throw new Error(
|
|
1092
1092
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1157,11 +1157,11 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1157
1157
|
]
|
|
1158
1158
|
};
|
|
1159
1159
|
if (options.json && !options.executeWithJson) {
|
|
1160
|
-
|
|
1160
|
+
_chunkJHUMUIU6js.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1161
1161
|
return 0;
|
|
1162
1162
|
}
|
|
1163
1163
|
if (options.printCommand) {
|
|
1164
|
-
|
|
1164
|
+
_chunkJHUMUIU6js.printCommandEnvelope.call(void 0,
|
|
1165
1165
|
{
|
|
1166
1166
|
...plan,
|
|
1167
1167
|
render: {
|
|
@@ -1174,7 +1174,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1174
1174
|
return 0;
|
|
1175
1175
|
}
|
|
1176
1176
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1177
|
-
|
|
1177
|
+
_chunkJHUMUIU6js.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1178
1178
|
return 0;
|
|
1179
1179
|
}
|
|
1180
1180
|
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
@@ -1204,7 +1204,7 @@ To retry with full installer output, run: deepline skills
|
|
|
1204
1204
|
);
|
|
1205
1205
|
}
|
|
1206
1206
|
if (options.executeWithJson && options.json) {
|
|
1207
|
-
|
|
1207
|
+
_chunkJHUMUIU6js.printCommandEnvelope.call(void 0,
|
|
1208
1208
|
{
|
|
1209
1209
|
ok: true,
|
|
1210
1210
|
pinnedVersion
|
|
@@ -4,6 +4,21 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/cli/described.ts
|
|
6
6
|
var SHAPE = "{}";
|
|
7
|
+
function byokLines(byok) {
|
|
8
|
+
if (typeof byok.supported !== "boolean") {
|
|
9
|
+
return ["BYOK: unknown (this server does not report it)"];
|
|
10
|
+
}
|
|
11
|
+
if (!byok.supported) {
|
|
12
|
+
return [
|
|
13
|
+
"BYOK: not supported. Deepline runs this tool with its own credentials."
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
return [
|
|
17
|
+
byok.required === true ? "BYOK: required. This tool runs only on your own provider credentials." : "BYOK: supported (optional).",
|
|
18
|
+
...byok.setup ? [`Setup: ${byok.setup}`] : [],
|
|
19
|
+
...byok.setupUrl ? [`Connect: ${byok.setupUrl}`] : []
|
|
20
|
+
];
|
|
21
|
+
}
|
|
7
22
|
var SCHEMA_LINE_LIMIT = 100;
|
|
8
23
|
function isRecord(value) {
|
|
9
24
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -69,7 +84,9 @@ function schemaField(name, node, required) {
|
|
|
69
84
|
required,
|
|
70
85
|
...example !== void 0 ? { example } : {},
|
|
71
86
|
...typeof schema.description === "string" && schema.description ? { description: schema.description } : {},
|
|
72
|
-
...fields ? { fields } : {}
|
|
87
|
+
...fields ? { fields } : {},
|
|
88
|
+
...schema.secondary === true ? { secondary: true } : {},
|
|
89
|
+
...typeof schema.means === "string" ? { means: schema.means } : {}
|
|
73
90
|
};
|
|
74
91
|
}
|
|
75
92
|
function withoutRefs(node, root, depth = 0) {
|
|
@@ -167,6 +184,7 @@ function namedShapes(roots) {
|
|
|
167
184
|
under: field.name
|
|
168
185
|
};
|
|
169
186
|
entry.count += 1;
|
|
187
|
+
entry.shape ??= field.shape;
|
|
170
188
|
entry.descriptions.add(field.description ?? "");
|
|
171
189
|
seen.set(key, entry);
|
|
172
190
|
field.fields.forEach(visit);
|
|
@@ -175,12 +193,12 @@ function namedShapes(roots) {
|
|
|
175
193
|
const taken = /* @__PURE__ */ new Set();
|
|
176
194
|
const named = /* @__PURE__ */ new Map();
|
|
177
195
|
for (const [key, entry] of seen) {
|
|
178
|
-
if (entry.count < 2) continue;
|
|
196
|
+
if (entry.count < 2 && !entry.shape) continue;
|
|
179
197
|
const [description] = entry.descriptions.size === 1 ? [...entry.descriptions] : [""];
|
|
180
198
|
const title = (description ?? "").split(/[.:]/)[0].trim();
|
|
181
|
-
const base = pascalCase(
|
|
199
|
+
const base = entry.shape ?? (pascalCase(
|
|
182
200
|
title && title.split(/\s+/).length <= 3 ? title : entry.fields.length <= 3 ? entry.fields.map((field) => field.name).join(" ") : entry.under
|
|
183
|
-
) || "Shape";
|
|
201
|
+
) || "Shape");
|
|
184
202
|
let name = base;
|
|
185
203
|
for (let n = 2; taken.has(name); n += 1) name = `${base}${n}`;
|
|
186
204
|
taken.add(name);
|
|
@@ -213,23 +231,27 @@ function schemaBlocks(described, maxDepth, everyField = false) {
|
|
|
213
231
|
const example = field.example === void 0 ? void 0 : JSON.stringify(field.example);
|
|
214
232
|
const start = `${indent}${JSON.stringify(field.name)}${field.required ? "" : "?"}: `;
|
|
215
233
|
if (!field.fields) {
|
|
216
|
-
return [
|
|
234
|
+
return [
|
|
235
|
+
`${start}${field.type},${comment([field.means, example, field.description])}`
|
|
236
|
+
];
|
|
217
237
|
}
|
|
218
238
|
const [before, after] = field.type.split(SHAPE);
|
|
219
239
|
const shape = shapes.get(shapeKey(field.fields));
|
|
220
240
|
if (shape) {
|
|
221
241
|
if (!used.includes(shape)) used.push(shape);
|
|
222
242
|
const own = field.description === shape.description ? void 0 : field.description;
|
|
223
|
-
return [
|
|
243
|
+
return [
|
|
244
|
+
`${start}${before}${shape.name}${after},${comment([field.means, own])}`
|
|
245
|
+
];
|
|
224
246
|
}
|
|
225
247
|
if (depth >= maxDepth || field.summarized && !everyField) {
|
|
226
248
|
const names = field.fields.map((child) => child.name).join(", ");
|
|
227
249
|
return [
|
|
228
|
-
`${start}${before}{ ${names} }${after},${comment([field.description])}`
|
|
250
|
+
`${start}${before}{ ${names} }${after},${comment([field.means, field.description])}`
|
|
229
251
|
];
|
|
230
252
|
}
|
|
231
253
|
return [
|
|
232
|
-
`${start}${before}{${comment([field.description])}`,
|
|
254
|
+
`${start}${before}{${comment([field.means, field.description])}`,
|
|
233
255
|
...field.fields.flatMap(
|
|
234
256
|
(child) => fieldLines(child, `${indent} `, depth + 1)
|
|
235
257
|
),
|
|
@@ -255,8 +277,70 @@ function schemaBlocks(described, maxDepth, everyField = false) {
|
|
|
255
277
|
}
|
|
256
278
|
return [...lines, ...types.length ? ["", "Types:", ...types] : []];
|
|
257
279
|
}
|
|
258
|
-
function
|
|
259
|
-
|
|
280
|
+
function selectFields(described, wanted) {
|
|
281
|
+
const hidden = [];
|
|
282
|
+
const keep = (fields, isInput, path = []) => fields.flatMap((field) => {
|
|
283
|
+
const name = [...path, field.name];
|
|
284
|
+
if (!(isInput && field.required) && !wanted(field, path.length)) {
|
|
285
|
+
hidden.push(name.join("."));
|
|
286
|
+
return [];
|
|
287
|
+
}
|
|
288
|
+
return [
|
|
289
|
+
field.fields ? { ...field, fields: keep(field.fields, isInput, name) } : field
|
|
290
|
+
];
|
|
291
|
+
});
|
|
292
|
+
const inputs = keep(described.inputs, true);
|
|
293
|
+
const rowInputs = described.rowInputs && keep(described.rowInputs, true);
|
|
294
|
+
const outputs = keep(described.outputs, false);
|
|
295
|
+
const rowOutputs = described.rowOutputs && keep(described.rowOutputs, false);
|
|
296
|
+
return {
|
|
297
|
+
selected: {
|
|
298
|
+
...described,
|
|
299
|
+
inputs,
|
|
300
|
+
outputs,
|
|
301
|
+
...rowInputs ? { rowInputs } : {},
|
|
302
|
+
...rowOutputs ? { rowOutputs } : {}
|
|
303
|
+
},
|
|
304
|
+
hidden
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
function schemaLines(described, view) {
|
|
308
|
+
const count = (names) => `${names.length} ${names.length === 1 ? "field" : "fields"}`;
|
|
309
|
+
if (view.fields) {
|
|
310
|
+
const names = view.fields;
|
|
311
|
+
const { selected, hidden } = selectFields(
|
|
312
|
+
described,
|
|
313
|
+
(field, depth) => depth > 0 || names.includes(field.name)
|
|
314
|
+
);
|
|
315
|
+
const known = new Set(
|
|
316
|
+
[
|
|
317
|
+
described.inputs,
|
|
318
|
+
described.outputs,
|
|
319
|
+
described.rowInputs ?? [],
|
|
320
|
+
described.rowOutputs ?? []
|
|
321
|
+
].flatMap((fields) => fields.map((field) => field.name))
|
|
322
|
+
);
|
|
323
|
+
const unknown = names.filter((name) => !known.has(name));
|
|
324
|
+
return [
|
|
325
|
+
...schemaLines(selected, { full: true, secondary: true }),
|
|
326
|
+
...unknown.length ? ["", `No field named: ${unknown.join(", ")}.`] : [],
|
|
327
|
+
...hidden.length ? ["", `${count(hidden)} not shown: ${hidden.join(", ")}.`] : []
|
|
328
|
+
];
|
|
329
|
+
}
|
|
330
|
+
if (!view.full && !view.secondary) {
|
|
331
|
+
const { selected, hidden } = selectFields(
|
|
332
|
+
described,
|
|
333
|
+
(field) => !field.secondary
|
|
334
|
+
);
|
|
335
|
+
return [
|
|
336
|
+
...schemaLines(selected, { ...view, secondary: true }),
|
|
337
|
+
...hidden.length ? [
|
|
338
|
+
"",
|
|
339
|
+
`${count(hidden).replace(" ", " secondary ")} hidden: ${hidden.join(", ")}. --verbose shows ${hidden.length === 1 ? "it" : "them"}.`
|
|
340
|
+
] : []
|
|
341
|
+
];
|
|
342
|
+
}
|
|
343
|
+
if (view.full) return schemaBlocks(described, Infinity, true);
|
|
260
344
|
const raw = described.rawResponse?.length ? [
|
|
261
345
|
"",
|
|
262
346
|
`Other response fields (${described.rawResponse.map((field) => field.name).join(", ")}) are in result.toolResponse.rawV2. --full-schema lists them.`
|
|
@@ -284,7 +368,7 @@ function examples(described, options) {
|
|
|
284
368
|
const input = JSON.stringify(
|
|
285
369
|
Object.fromEntries(shown.map((field) => [field.name, exampleValue(field)]))
|
|
286
370
|
);
|
|
287
|
-
const read = options.verbose ? described.outputs : described.outputs.slice(0, 1);
|
|
371
|
+
const read = options.verbose ? described.outputs : described.outputs.filter((field) => !field.secondary).slice(0, 1);
|
|
288
372
|
const reads = (expression) => read.flatMap((field) => {
|
|
289
373
|
const source = expression(field);
|
|
290
374
|
return source ? [`const ${safeIdentifier(field.name)} = ${source};`] : [];
|
|
@@ -338,7 +422,17 @@ function describedLines(described, view) {
|
|
|
338
422
|
...described.cost ? [`Cost: ${described.cost}`] : [],
|
|
339
423
|
...described.guidance.map((line) => `Guidance: ${line}`),
|
|
340
424
|
...described.rateLimit ? [`Rate limit: ${described.rateLimit}`] : [],
|
|
341
|
-
...
|
|
425
|
+
...described.byok ? byokLines(described.byok) : [],
|
|
426
|
+
...schemaLines(described, {
|
|
427
|
+
full: view.fullSchema,
|
|
428
|
+
secondary: view.verbose,
|
|
429
|
+
...view.fields ? { fields: view.fields } : {}
|
|
430
|
+
}),
|
|
431
|
+
...section(
|
|
432
|
+
described.exclusive ? [
|
|
433
|
+
`Give "${described.exclusive.field}" or ${described.exclusive.with.map((name) => `"${name}"`).join(", ")}, not both: per-row values go in the CSV.`
|
|
434
|
+
] : []
|
|
435
|
+
),
|
|
342
436
|
...section(
|
|
343
437
|
view.cli ? [
|
|
344
438
|
"Run from the CLI:",
|
|
@@ -361,6 +455,88 @@ function describedLines(described, view) {
|
|
|
361
455
|
function topLevelField({ fields: _fields, ...field }) {
|
|
362
456
|
return { ...field, type: field.type.replace(SHAPE, "object") };
|
|
363
457
|
}
|
|
458
|
+
function jsonFields(fields, options) {
|
|
459
|
+
return Object.fromEntries(
|
|
460
|
+
fields.filter(
|
|
461
|
+
(field) => options.secondary || !field.secondary || options.input && field.required
|
|
462
|
+
).map((field) => {
|
|
463
|
+
const shape = field.fields && options.shapes.get(shapeKey(field.fields));
|
|
464
|
+
if (shape) options.used.add(shape);
|
|
465
|
+
return [
|
|
466
|
+
field.name,
|
|
467
|
+
{
|
|
468
|
+
type: field.type.replace(SHAPE, shape?.name ?? "object"),
|
|
469
|
+
...options.input ? { required: field.required } : {},
|
|
470
|
+
...field.means ? { means: field.means } : {},
|
|
471
|
+
...field.example !== void 0 ? { example: field.example } : {},
|
|
472
|
+
...field.description && field.description !== shape?.description ? { description: field.description } : {},
|
|
473
|
+
...field.secondary ? { secondary: true } : {},
|
|
474
|
+
...field.read ? { read: field.read } : {},
|
|
475
|
+
...field.in ? { in: field.in } : {},
|
|
476
|
+
...field.paths?.length ? { paths: field.paths } : {},
|
|
477
|
+
...field.fields && !shape ? { fields: jsonFields(field.fields, options) } : {}
|
|
478
|
+
}
|
|
479
|
+
];
|
|
480
|
+
})
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
function describedJson(described, view) {
|
|
484
|
+
const sections = [
|
|
485
|
+
["inputs", described.inputs, true],
|
|
486
|
+
["rowInputs", described.rowInputs, true],
|
|
487
|
+
["outputs", described.outputs, false],
|
|
488
|
+
["rowOutputs", described.rowOutputs, false]
|
|
489
|
+
];
|
|
490
|
+
const hidden = view.secondary ? [] : sections.flatMap(
|
|
491
|
+
([, fields, input]) => (fields ?? []).filter((field) => field.secondary && !(input && field.required)).map((field) => field.name)
|
|
492
|
+
);
|
|
493
|
+
const shapes = namedShapes(sections.flatMap(([, fields]) => fields ?? []));
|
|
494
|
+
const used = /* @__PURE__ */ new Set();
|
|
495
|
+
const blocks = Object.fromEntries(
|
|
496
|
+
sections.flatMap(
|
|
497
|
+
([key, fields, input]) => fields?.length ? [
|
|
498
|
+
[
|
|
499
|
+
key,
|
|
500
|
+
jsonFields(fields, {
|
|
501
|
+
input,
|
|
502
|
+
secondary: view.secondary,
|
|
503
|
+
shapes,
|
|
504
|
+
used
|
|
505
|
+
})
|
|
506
|
+
]
|
|
507
|
+
] : []
|
|
508
|
+
)
|
|
509
|
+
);
|
|
510
|
+
const types = {};
|
|
511
|
+
for (const shape of used) {
|
|
512
|
+
types[shape.name] = {
|
|
513
|
+
...shape.description ? { description: shape.description } : {},
|
|
514
|
+
fields: jsonFields(shape.fields, {
|
|
515
|
+
input: false,
|
|
516
|
+
secondary: true,
|
|
517
|
+
shapes,
|
|
518
|
+
used
|
|
519
|
+
})
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
const { cli, play } = examples(described, { verbose: view.verbose });
|
|
523
|
+
return {
|
|
524
|
+
kind: described.kind,
|
|
525
|
+
id: described.id,
|
|
526
|
+
...described.displayName ? { displayName: described.displayName } : {},
|
|
527
|
+
...described.description ? { description: described.description } : {},
|
|
528
|
+
...described.cost ? { cost: described.cost } : {},
|
|
529
|
+
...described.rateLimit ? { rateLimit: described.rateLimit } : {},
|
|
530
|
+
...described.byok ? { byok: described.byok } : {},
|
|
531
|
+
...described.guidance.length ? { guidance: described.guidance } : {},
|
|
532
|
+
...blocks,
|
|
533
|
+
...used.size ? { types } : {},
|
|
534
|
+
...described.exclusive ? { exclusive: described.exclusive } : {},
|
|
535
|
+
run: { cli, ...play ? { play } : {} },
|
|
536
|
+
...described.source ? { source: described.source } : {},
|
|
537
|
+
...hidden.length ? { hidden } : {}
|
|
538
|
+
};
|
|
539
|
+
}
|
|
364
540
|
|
|
365
541
|
// src/cli/execution-observation.ts
|
|
366
542
|
import { writeFileSync, renameSync } from "fs";
|
|
@@ -406,7 +582,7 @@ function addDescribeOptions(command, options = {}) {
|
|
|
406
582
|
"Show the Deepline tool or play, not a play your workspace created under the same name"
|
|
407
583
|
).option("--tool", "Same as --prebuilt").option(
|
|
408
584
|
"--verbose",
|
|
409
|
-
"
|
|
585
|
+
"Show secondary fields, and fill in every input and read every output in the examples"
|
|
410
586
|
).option(
|
|
411
587
|
"--cli-example",
|
|
412
588
|
"Show only the CLI example, and explain how it takes inputs and returns outputs"
|
|
@@ -416,6 +592,9 @@ function addDescribeOptions(command, options = {}) {
|
|
|
416
592
|
).option("--no-example", "Hide the run examples").option(
|
|
417
593
|
"--full-schema",
|
|
418
594
|
`Print every field: a long schema unfolded (over ${SCHEMA_LINE_LIMIT} lines), list rows, and a tool's raw response`
|
|
595
|
+
).option(
|
|
596
|
+
"--fields <names>",
|
|
597
|
+
"Show only these fields, comma-separated, plus every required input"
|
|
419
598
|
).option(
|
|
420
599
|
"-o, --out <path>",
|
|
421
600
|
"Save the output to this file instead of printing it"
|
|
@@ -426,6 +605,12 @@ function addDescribeOptions(command, options = {}) {
|
|
|
426
605
|
"Print only the schema, with every field, and nothing else"
|
|
427
606
|
);
|
|
428
607
|
}
|
|
608
|
+
if (options.byok !== false) {
|
|
609
|
+
command.option(
|
|
610
|
+
"--byok",
|
|
611
|
+
"For a tool, also show whether it can run on your own provider credentials, and how to connect them (always shown when it must)"
|
|
612
|
+
);
|
|
613
|
+
}
|
|
429
614
|
if (options.json !== false) {
|
|
430
615
|
command.option(
|
|
431
616
|
"--json",
|
|
@@ -436,6 +621,7 @@ function addDescribeOptions(command, options = {}) {
|
|
|
436
621
|
}
|
|
437
622
|
|
|
438
623
|
export {
|
|
624
|
+
byokLines,
|
|
439
625
|
SCHEMA_LINE_LIMIT,
|
|
440
626
|
schemaField,
|
|
441
627
|
schemaFields,
|
|
@@ -444,6 +630,7 @@ export {
|
|
|
444
630
|
examples,
|
|
445
631
|
describedLines,
|
|
446
632
|
topLevelField,
|
|
633
|
+
describedJson,
|
|
447
634
|
recordApiResponse,
|
|
448
635
|
recordPlayTermination,
|
|
449
636
|
addDescribeOptions
|
|
@@ -21,7 +21,7 @@ var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkND4BVWWZjs = require('./chunk-ND4BVWWZ.js');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -167,7 +167,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
167
167
|
if (error instanceof _chunk7P5AA3SNjs.DeeplineError && (_optionalChain([error, 'access', _2 => _2.code, 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
|
|
168
168
|
// lost connections and explicitly unknown transaction resolution.
|
|
169
169
|
/^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
|
|
170
|
-
throw new (0,
|
|
170
|
+
throw new (0, _chunkND4BVWWZjs.CustomerDbQueryOutcomeUnknownError)(
|
|
171
171
|
error,
|
|
172
172
|
plan.request.body.operation_key
|
|
173
173
|
);
|
|
@@ -175,7 +175,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
175
175
|
throw error;
|
|
176
176
|
}
|
|
177
177
|
if (!result || typeof result !== "object" || Array.isArray(result) || typeof result.command !== "string" || !Array.isArray(result.columns) || !Array.isArray(result.rows) || typeof result.truncated !== "boolean" || result.row_count !== null && (!Number.isSafeInteger(result.row_count) || result.row_count < 0) || !Number.isSafeInteger(result.row_count_returned) || result.row_count_returned < 0) {
|
|
178
|
-
throw new (0,
|
|
178
|
+
throw new (0, _chunkND4BVWWZjs.CustomerDbQueryOutcomeUnknownError)(
|
|
179
179
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
180
180
|
"The SQL response did not contain a valid result.",
|
|
181
181
|
200,
|
|
@@ -186,7 +186,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
186
186
|
}
|
|
187
187
|
const operation = result.operation;
|
|
188
188
|
if (input.operationKey !== void 0 && (!operation || operation.operation_key !== input.operationKey || !Number.isSafeInteger(operation.completed_at_ms) || operation.completed_at_ms < 0 || !["executed", "operation_recovery"].includes(operation.source))) {
|
|
189
|
-
throw new (0,
|
|
189
|
+
throw new (0, _chunkND4BVWWZjs.CustomerDbQueryOutcomeUnknownError)(
|
|
190
190
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
191
191
|
"The server did not confirm the original atomic SQL operation.",
|
|
192
192
|
200,
|
|
@@ -2910,8 +2910,8 @@ function runtimeSelectionHeaders(runtime) {
|
|
|
2910
2910
|
}
|
|
2911
2911
|
const receivers = _optionalChain([process, 'access', _104 => _104.env, 'access', _105 => _105.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _106 => _106.trim, 'call', _107 => _107()]);
|
|
2912
2912
|
return {
|
|
2913
|
-
[
|
|
2914
|
-
...receivers ? { [
|
|
2913
|
+
[_chunkND4BVWWZjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
2914
|
+
...receivers ? { [_chunkND4BVWWZjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
2915
2915
|
};
|
|
2916
2916
|
}
|
|
2917
2917
|
function isolatedCiRuntimeEventReadHeaders() {
|
|
@@ -2927,7 +2927,7 @@ function isolatedCiRuntimeEventReadHeaders() {
|
|
|
2927
2927
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
2928
2928
|
);
|
|
2929
2929
|
}
|
|
2930
|
-
return { [
|
|
2930
|
+
return { [_chunkND4BVWWZjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
2931
2931
|
}
|
|
2932
2932
|
function normalizeTestPolicyOverrides(value, source) {
|
|
2933
2933
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -3217,8 +3217,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3217
3217
|
* @throws {@link ConfigError} if no API key can be resolved from any source.
|
|
3218
3218
|
*/
|
|
3219
3219
|
constructor(options) {
|
|
3220
|
-
this.config =
|
|
3221
|
-
this.http = new (0,
|
|
3220
|
+
this.config = _chunkND4BVWWZjs.resolveConfig.call(void 0, options);
|
|
3221
|
+
this.http = new (0, _chunkND4BVWWZjs.HttpClient)(this.config);
|
|
3222
3222
|
this.toolCalls = new ToolCalls(
|
|
3223
3223
|
this.http,
|
|
3224
3224
|
this.config.timeout,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
npmSupportsAllowScripts,
|
|
3
3
|
readNpmVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JP2YA3AV.mjs";
|
|
5
5
|
import {
|
|
6
6
|
resolveShellSpawn,
|
|
7
7
|
runSkillsCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6JCVL7CE.mjs";
|
|
9
9
|
import {
|
|
10
10
|
printCommandEnvelope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HNLXC5BP.mjs";
|
|
12
12
|
import {
|
|
13
13
|
autoDetectBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IUYKSTWB.mjs";
|
|
15
15
|
|
|
16
16
|
// src/cli/commands/update.ts
|
|
17
17
|
import { spawn, spawnSync } from "child_process";
|