deepline 0.3.423 → 0.3.425
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/client.ts +13 -6
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +11 -1
- package/dist/bundling-sources/shared_libs/monitors/inventory-reconciliation.ts +38 -4
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +12 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-control-plane-capability.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +10 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +201 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +42 -5
- package/dist/bundling-sources/shared_libs/monitors/provider-webhook-monitor-runtime.ts +5 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/cli/auth-PTKVFEIT.js +40 -0
- package/dist/cli/{auth-L7Q53QKK.mjs → auth-RF5WGHBC.mjs} +4 -4
- package/dist/cli/{billing-QNP6YGI2.js → billing-E4G4QVR5.js} +73 -73
- package/dist/cli/{billing-IH7AKDR2.mjs → billing-P4RUJ4UT.mjs} +4 -4
- package/dist/cli/{chunk-2F5ULM2F.js → chunk-2ACYJZHU.js} +1 -1
- package/dist/cli/{chunk-FJRFSBWO.mjs → chunk-2J2I5A7K.mjs} +4 -4
- package/dist/cli/{chunk-RAL75ND3.js → chunk-53DTOGNJ.js} +2 -2
- package/dist/cli/{chunk-EWWWOKX2.js → chunk-7F6KTNUP.js} +6 -6
- package/dist/cli/{chunk-QN6DG4JO.mjs → chunk-BFVDDMRH.mjs} +2 -2
- package/dist/cli/{chunk-4WT5RISA.js → chunk-CSP5CXTC.js} +20 -20
- package/dist/cli/{chunk-S6KG7JCR.mjs → chunk-E7RPU3VG.mjs} +2 -2
- package/dist/cli/{chunk-44US3EL2.mjs → chunk-FDM3BUIB.mjs} +5 -5
- package/dist/cli/{chunk-OPI7UCQG.mjs → chunk-HT3UBTXV.mjs} +1 -1
- package/dist/cli/{chunk-2U3AMRHF.js → chunk-IJPWBQEA.js} +8 -8
- package/dist/cli/{chunk-YCHR57TD.js → chunk-J6FKYOFB.js} +35 -35
- package/dist/cli/{chunk-YNT7PJND.mjs → chunk-MWR452MP.mjs} +3 -3
- package/dist/cli/{chunk-OZLMMMZH.js → chunk-NC5DYZ36.js} +6 -6
- package/dist/cli/{chunk-6FFORGD2.mjs → chunk-NUET45RU.mjs} +1 -1
- package/dist/cli/{chunk-NFIZ5YED.mjs → chunk-ODO6ZIHB.mjs} +2 -2
- package/dist/cli/{chunk-IW5QK3K6.mjs → chunk-P7SNOFPA.mjs} +3 -3
- package/dist/cli/{chunk-DRK6FYJU.js → chunk-RH2N5JUT.js} +26 -26
- package/dist/cli/{chunk-MHG3NND4.mjs → chunk-RTFXD5ZX.mjs} +3 -3
- package/dist/cli/{chunk-XSERB7H2.mjs → chunk-S5FCTT3E.mjs} +1 -1
- package/dist/cli/{chunk-PQ4G6MKI.js → chunk-SBPPCMZD.js} +16 -16
- package/dist/cli/{chunk-W42SSVM7.js → chunk-U42S2GAF.js} +4 -4
- package/dist/cli/{chunk-PH4BP6KM.mjs → chunk-UDRNGM3S.mjs} +2 -2
- package/dist/cli/{chunk-AVOBDFQ5.js → chunk-UXLJZ4XQ.js} +10 -10
- package/dist/cli/{chunk-QWJJMQNE.mjs → chunk-VYO6TLWN.mjs} +1 -1
- package/dist/cli/{chunk-ARTGL3FM.mjs → chunk-WNXYRODJ.mjs} +1 -1
- package/dist/cli/{chunk-WJO7KIFT.js → chunk-WZLGL37A.js} +50 -50
- package/dist/cli/{chunk-JDAXVQV7.mjs → chunk-XC3J4P5W.mjs} +1 -1
- package/dist/cli/{chunk-H662SHPT.mjs → chunk-XLEA2CGA.mjs} +8 -8
- package/dist/cli/{chunk-5DGR3TB6.js → chunk-XN25EAP6.js} +2 -2
- package/dist/cli/{chunk-NA6SGG7X.js → chunk-XO5RJ3PF.js} +79 -79
- package/dist/cli/{chunk-MMI2DXCW.js → chunk-XSC2FG4V.js} +8 -8
- package/dist/cli/{chunk-OMWO2JLC.js → chunk-ZYUKNQO4.js} +52 -52
- package/dist/cli/{csv-GF7VRES5.js → csv-P32NU7IS.js} +12 -12
- package/dist/cli/{csv-5KW7M6ZS.mjs → csv-XKCR2MB6.mjs} +3 -3
- package/dist/cli/{db-AEDXKB4F.js → db-AHFQJ7ZN.js} +25 -25
- package/dist/cli/{db-NN4JQAC4.mjs → db-ZJQPREBZ.mjs} +4 -4
- package/dist/cli/{describe-RX6VROHQ.mjs → describe-IZNT6RGY.mjs} +12 -12
- package/dist/cli/{describe-5RLXW332.js → describe-YE2WIS23.js} +16 -16
- package/dist/cli/describe-core.d.mts +1 -1
- package/dist/cli/describe-core.d.ts +1 -1
- package/dist/cli/{executions-PGIGFDDS.js → executions-EZDFYAWW.js} +6 -6
- package/dist/cli/{executions-EJZ34VUB.mjs → executions-WLRZODFZ.mjs} +4 -4
- package/dist/cli/{feedback-L2ODMANV.js → feedback-A62XZMY2.js} +7 -7
- package/dist/cli/{feedback-6MWOKE7H.mjs → feedback-M6TNBIUP.mjs} +3 -3
- package/dist/cli/git-62FZH46U.js +24 -0
- package/dist/cli/{git-456RF3AT.mjs → git-XYDEA57G.mjs} +4 -4
- package/dist/cli/index.js +131 -131
- package/dist/cli/index.mjs +36 -36
- package/dist/cli/{legacy-noops-MDPB3MIS.js → legacy-noops-D34K4LWU.js} +7 -7
- package/dist/cli/{legacy-noops-ZPRBXQDE.mjs → legacy-noops-S4XSVXIN.mjs} +4 -4
- package/dist/cli/{monitors-TXKR5XYW.js → monitors-VUSDOVGA.js} +97 -91
- package/dist/cli/{monitors-ZLP6A7FT.mjs → monitors-YDHQJMMQ.mjs} +17 -11
- package/dist/cli/{org-YZ62BIGM.mjs → org-EF7Q22GZ.mjs} +4 -4
- package/dist/cli/{org-73SQ3AT2.js → org-IRWGFW3I.js} +64 -64
- package/dist/cli/{play-M75EBXEV.js → play-D54PEGMK.js} +283 -283
- package/dist/cli/{play-VCYQKCKF.mjs → play-Y4O3WFYH.mjs} +10 -10
- package/dist/cli/{providers-GIINJPWQ.js → providers-2NPEOE22.js} +7 -7
- package/dist/cli/{providers-JLA6LST3.mjs → providers-PX672XRG.mjs} +4 -4
- package/dist/cli/{quickstart-HHHLYCHT.js → quickstart-3XXUIDVF.js} +5 -5
- package/dist/cli/{quickstart-AHCU75GG.mjs → quickstart-KSFYOZGU.mjs} +3 -3
- package/dist/cli/{search-5GACUIAX.mjs → search-DIATDWNB.mjs} +5 -5
- package/dist/cli/search-TW7PGWYR.js +30 -0
- package/dist/cli/{secrets-S2NBKAEN.mjs → secrets-HSZNYSHN.mjs} +4 -4
- package/dist/cli/{secrets-PI7IPCOE.js → secrets-S7J53N4D.js} +13 -13
- package/dist/cli/{sessions-IBKYGTBD.mjs → sessions-BLJ5AZ2O.mjs} +4 -4
- package/dist/cli/{sessions-BK4CSRFS.js → sessions-ECOJWISN.js} +5 -5
- package/dist/cli/{settings-JY6UN4KO.mjs → settings-4X2OSKMC.mjs} +8 -8
- package/dist/cli/{settings-2G7TUDM7.js → settings-BMKHMIN2.js} +75 -75
- package/dist/cli/{setup-R424FIBF.js → setup-GOT6Y2E3.js} +42 -42
- package/dist/cli/{setup-HS5X3OSN.mjs → setup-NUEJ22OI.mjs} +7 -7
- package/dist/cli/skills-DCOMWBDX.js +29 -0
- package/dist/cli/{skills-UIBUDTGN.mjs → skills-FCLEKW4O.mjs} +5 -5
- package/dist/cli/{tools-SB4FREB6.mjs → tools-IVCHIOIY.mjs} +12 -12
- package/dist/cli/tools-OAYJGYL7.js +44 -0
- package/dist/cli/update-2DBL37AU.js +31 -0
- package/dist/cli/{update-NJSUE2YU.mjs → update-Y5RO5LSX.mjs} +7 -7
- package/dist/cli/{workflow-HBG76XYX.mjs → workflow-CSVQCXJZ.mjs} +5 -5
- package/dist/cli/{workflow-3AZWZ4J3.js → workflow-XGN3FZAE.js} +15 -15
- package/dist/{client-BTUOYGID.d.mts → client-BcfFWD4Z.d.mts} +9 -6
- package/dist/{client-C668iUhZ.d.ts → client-DH-fmT69.d.ts} +9 -6
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +80 -80
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- 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-SUNY477Y.js +0 -40
- package/dist/cli/git-2ZDCRTBD.js +0 -24
- package/dist/cli/search-W2PGBXQO.js +0 -30
- package/dist/cli/skills-M3RZAN4A.js +0 -29
- package/dist/cli/tools-K2GII2PA.js +0 -44
- package/dist/cli/update-C2ORJRXN.js +0 -31
|
@@ -1,6 +1,6 @@
|
|
|
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; } var _class;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk7F6KTNUPjs = require('./chunk-7F6KTNUP.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -17,13 +17,13 @@ var _chunkEWWWOKX2js = require('./chunk-EWWWOKX2.js');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkU42S2GAFjs = require('./chunk-U42S2GAF.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunk2ACYJZHUjs = require('./chunk-2ACYJZHU.js');
|
|
27
27
|
|
|
28
28
|
// src/compat.ts
|
|
29
29
|
var _crypto = require('crypto');
|
|
@@ -58,7 +58,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
58
58
|
return value === "1" || value === "true" || value === "yes";
|
|
59
59
|
}
|
|
60
60
|
function sdkCompatibilityCachePath(baseUrl, homeDir = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.HOME, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) || _os.homedir.call(void 0, )) {
|
|
61
|
-
return _path.join.call(void 0,
|
|
61
|
+
return _path.join.call(void 0, _chunkU42S2GAFjs.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
62
62
|
}
|
|
63
63
|
function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'access', _11 => _11.env, 'access', _12 => _12.HOME, 'optionalAccess', _13 => _13.trim, 'call', _14 => _14()]) || _os.homedir.call(void 0, )) {
|
|
64
64
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -66,9 +66,9 @@ function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'acc
|
|
|
66
66
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
67
67
|
return JSON.stringify({
|
|
68
68
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
69
|
-
version:
|
|
70
|
-
apiContract:
|
|
71
|
-
apiMajor:
|
|
69
|
+
version: _chunkU42S2GAFjs.SDK_VERSION,
|
|
70
|
+
apiContract: _chunkU42S2GAFjs.SDK_API_CONTRACT,
|
|
71
|
+
apiMajor: _chunkU42S2GAFjs.SDK_API_MAJOR,
|
|
72
72
|
command: _optionalChain([command, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()]) || null,
|
|
73
73
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
74
74
|
});
|
|
@@ -76,8 +76,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
76
76
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
77
77
|
return JSON.stringify({
|
|
78
78
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
79
|
-
version:
|
|
80
|
-
apiContract:
|
|
79
|
+
version: _chunkU42S2GAFjs.SDK_VERSION,
|
|
80
|
+
apiContract: _chunkU42S2GAFjs.SDK_API_CONTRACT,
|
|
81
81
|
command: _optionalChain([command, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]) || null
|
|
82
82
|
});
|
|
83
83
|
}
|
|
@@ -102,7 +102,7 @@ function isSavedWithin(savedAt, windowMs, now) {
|
|
|
102
102
|
}
|
|
103
103
|
var UPDATE_ADVISORY_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
104
104
|
function claimUpdateAdvisory(baseUrl, now = Date.now()) {
|
|
105
|
-
const path = _path.join.call(void 0,
|
|
105
|
+
const path = _path.join.call(void 0, _chunkU42S2GAFjs.sdkCliStateDirPath.call(void 0, baseUrl), "update-advisory.json");
|
|
106
106
|
try {
|
|
107
107
|
const { shownAt } = JSON.parse(_fs.readFileSync.call(void 0, path, "utf8"));
|
|
108
108
|
if (isSavedWithin(shownAt, UPDATE_ADVISORY_INTERVAL_MS, now)) return false;
|
|
@@ -186,7 +186,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
186
186
|
);
|
|
187
187
|
try {
|
|
188
188
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
189
|
-
url.searchParams.set("version",
|
|
189
|
+
url.searchParams.set("version", _chunkU42S2GAFjs.SDK_VERSION);
|
|
190
190
|
if (_optionalChain([options, 'access', _27 => _27.command, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()])) {
|
|
191
191
|
url.searchParams.set("command", options.command.trim());
|
|
192
192
|
}
|
|
@@ -194,7 +194,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
194
194
|
url.searchParams.set("skills_version", _nullishCoalesce(options.skillsVersion, () => ( "")));
|
|
195
195
|
url.searchParams.set(
|
|
196
196
|
"skills_cli_capability",
|
|
197
|
-
String(
|
|
197
|
+
String(_chunk2ACYJZHUjs.SDK_RELEASE.packageCapabilities.skillsGuidance)
|
|
198
198
|
);
|
|
199
199
|
}
|
|
200
200
|
if (options.catalog) {
|
|
@@ -206,14 +206,14 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
206
206
|
const response = await fetch(url, {
|
|
207
207
|
method: "GET",
|
|
208
208
|
headers: {
|
|
209
|
-
...
|
|
210
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
211
|
-
"X-Deepline-SDK-Version":
|
|
212
|
-
"X-Deepline-API-Major": String(
|
|
213
|
-
"X-Deepline-API-Contract":
|
|
209
|
+
..._chunkU42S2GAFjs.deploymentProtectionHeaders.call(void 0, ),
|
|
210
|
+
"User-Agent": `deepline-ts-sdk/${_chunkU42S2GAFjs.SDK_VERSION}`,
|
|
211
|
+
"X-Deepline-SDK-Version": _chunkU42S2GAFjs.SDK_VERSION,
|
|
212
|
+
"X-Deepline-API-Major": String(_chunkU42S2GAFjs.SDK_API_MAJOR),
|
|
213
|
+
"X-Deepline-API-Contract": _chunkU42S2GAFjs.SDK_API_CONTRACT,
|
|
214
214
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
215
215
|
"X-Deepline-CLI-Auto-Update-Capability": SDK_CLI_AUTO_UPDATE_CAPABILITY,
|
|
216
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
216
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkU42S2GAFjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {},
|
|
217
217
|
..._optionalChain([options, 'access', _30 => _30.catalog, 'optionalAccess', _31 => _31.cliInvocationId]) ? { "X-Deepline-CLI-Invocation-ID": options.catalog.cliInvocationId } : {}
|
|
218
218
|
},
|
|
219
219
|
signal: controller.signal
|
|
@@ -374,7 +374,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
374
374
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
375
375
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
376
376
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
377
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
377
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkU42S2GAFjs.DEFAULT_SKILL_AGENTS));
|
|
378
378
|
const values = {
|
|
379
379
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
380
380
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -413,7 +413,7 @@ var CliProgress = (_class = class {
|
|
|
413
413
|
|
|
414
414
|
// --json output is one JSON document: progress never renders under it.
|
|
415
415
|
constructor(enabled) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);
|
|
416
|
-
this.enabled = enabled && !
|
|
416
|
+
this.enabled = enabled && !_chunk7F6KTNUPjs.isJsonOutputMode.call(void 0, );
|
|
417
417
|
}
|
|
418
418
|
phase(message) {
|
|
419
419
|
if (!this.enabled || this.lastMessage === message) {
|
|
@@ -438,7 +438,7 @@ var CliProgress = (_class = class {
|
|
|
438
438
|
this.settle("\u2717");
|
|
439
439
|
}
|
|
440
440
|
writeLogLine(line) {
|
|
441
|
-
if (
|
|
441
|
+
if (_chunk7F6KTNUPjs.isJsonOutputMode.call(void 0, )) return;
|
|
442
442
|
if (!this.enabled) {
|
|
443
443
|
process.stderr.write(`${line}
|
|
444
444
|
`);
|
|
@@ -740,7 +740,7 @@ function buildEnvironmentContext() {
|
|
|
740
740
|
node_version: process.version,
|
|
741
741
|
runtime: "Node.js",
|
|
742
742
|
hostname: _os.hostname.call(void 0, ),
|
|
743
|
-
agent_runtime:
|
|
743
|
+
agent_runtime: _chunkU42S2GAFjs.detectAgentRuntime.call(void 0, )
|
|
744
744
|
};
|
|
745
745
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
746
746
|
const normalized = _optionalChain([process, 'access', _60 => _60.env, 'access', _61 => _61[key], 'optionalAccess', _62 => _62.trim, 'call', _63 => _63()]);
|
|
@@ -762,15 +762,15 @@ function buildEnvironmentContext() {
|
|
|
762
762
|
}
|
|
763
763
|
function failureReportHeaders(apiKey) {
|
|
764
764
|
return {
|
|
765
|
-
...
|
|
765
|
+
..._chunkU42S2GAFjs.deploymentProtectionHeaders.call(void 0, ),
|
|
766
766
|
Authorization: `Bearer ${apiKey}`,
|
|
767
767
|
"Content-Type": "application/json",
|
|
768
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
768
|
+
"User-Agent": `deepline-ts-sdk/${_chunkU42S2GAFjs.SDK_VERSION}`,
|
|
769
769
|
"X-Deepline-Client-Family": "sdk",
|
|
770
770
|
"X-Deepline-CLI-Family": "sdk",
|
|
771
|
-
"X-Deepline-Agent-Runtime":
|
|
772
|
-
"X-Deepline-CLI-Version":
|
|
773
|
-
"X-Deepline-SDK-Version":
|
|
771
|
+
"X-Deepline-Agent-Runtime": _chunkU42S2GAFjs.detectAgentRuntime.call(void 0, ),
|
|
772
|
+
"X-Deepline-CLI-Version": _chunkU42S2GAFjs.SDK_VERSION,
|
|
773
|
+
"X-Deepline-SDK-Version": _chunkU42S2GAFjs.SDK_VERSION
|
|
774
774
|
};
|
|
775
775
|
}
|
|
776
776
|
async function postFailureReport(input) {
|
|
@@ -798,7 +798,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
798
798
|
if (isFailureReportingDisabled()) return false;
|
|
799
799
|
let apiKey = "";
|
|
800
800
|
try {
|
|
801
|
-
apiKey =
|
|
801
|
+
apiKey = _chunkU42S2GAFjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
802
802
|
} catch (e9) {
|
|
803
803
|
return false;
|
|
804
804
|
}
|
|
@@ -825,7 +825,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
825
825
|
failure_code: failureCode2,
|
|
826
826
|
failure_stage: failureStage,
|
|
827
827
|
error_body: "Automatic Deepline skills installation failed.",
|
|
828
|
-
cli_version:
|
|
828
|
+
cli_version: _chunkU42S2GAFjs.SDK_VERSION,
|
|
829
829
|
context: {
|
|
830
830
|
environment: buildEnvironmentContext(),
|
|
831
831
|
skills_sync: {
|
|
@@ -945,7 +945,7 @@ function buildFailureReport(input) {
|
|
|
945
945
|
failure_kind: failureKind,
|
|
946
946
|
failure_code: code,
|
|
947
947
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
948
|
-
cli_version:
|
|
948
|
+
cli_version: _chunkU42S2GAFjs.SDK_VERSION,
|
|
949
949
|
context: {
|
|
950
950
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
951
951
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -965,8 +965,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
965
965
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
966
966
|
const exitCode = resolvedExitCode(input);
|
|
967
967
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
968
|
-
const baseUrl =
|
|
969
|
-
const apiKey =
|
|
968
|
+
const baseUrl = _chunkU42S2GAFjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
969
|
+
const apiKey = _chunkU42S2GAFjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
970
970
|
if (!apiKey) return false;
|
|
971
971
|
return postFailureReport({
|
|
972
972
|
baseUrl,
|
|
@@ -1003,25 +1003,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
1003
1003
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
1004
1004
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
1005
1005
|
function shouldSkipSkillsSync() {
|
|
1006
|
-
if (
|
|
1006
|
+
if (_chunkU42S2GAFjs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
1007
1007
|
return true;
|
|
1008
1008
|
}
|
|
1009
1009
|
const value = _optionalChain([process, 'access', _84 => _84.env, 'access', _85 => _85.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _86 => _86.trim, 'call', _87 => _87(), 'access', _88 => _88.toLowerCase, 'call', _89 => _89()]);
|
|
1010
1010
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
1011
1011
|
}
|
|
1012
1012
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
1013
|
-
return _path.join.call(void 0,
|
|
1013
|
+
return _path.join.call(void 0, _chunkU42S2GAFjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
1014
1014
|
}
|
|
1015
1015
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
1016
1016
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
1017
|
-
var agentLeaseSegment =
|
|
1017
|
+
var agentLeaseSegment = _chunkU42S2GAFjs.skillsAgentPathSegment;
|
|
1018
1018
|
function sortedLeaseAgents(agents) {
|
|
1019
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
1019
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkU42S2GAFjs.KNOWN_SKILL_AGENTS] : agents;
|
|
1020
1020
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
1021
1021
|
}
|
|
1022
1022
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
1023
1023
|
return _path.join.call(void 0,
|
|
1024
|
-
|
|
1024
|
+
_chunkU42S2GAFjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1025
1025
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
1026
1026
|
);
|
|
1027
1027
|
}
|
|
@@ -1180,7 +1180,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
1180
1180
|
constructor(baseUrl, error) {
|
|
1181
1181
|
const detail = error instanceof Error ? error.message : String(error);
|
|
1182
1182
|
super(
|
|
1183
|
-
`Could not save skills state in ${
|
|
1183
|
+
`Could not save skills state in ${_chunkU42S2GAFjs.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
1184
1184
|
);
|
|
1185
1185
|
this.name = "SkillsStateUnavailableError";
|
|
1186
1186
|
}
|
|
@@ -1265,7 +1265,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1265
1265
|
}
|
|
1266
1266
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1267
1267
|
return _path.join.call(void 0,
|
|
1268
|
-
|
|
1268
|
+
_chunkU42S2GAFjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1269
1269
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1270
1270
|
);
|
|
1271
1271
|
}
|
|
@@ -1299,8 +1299,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1299
1299
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1300
1300
|
}
|
|
1301
1301
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1302
|
-
if (shouldSkipSkillsSync() ||
|
|
1303
|
-
const agents =
|
|
1302
|
+
if (shouldSkipSkillsSync() || _chunkU42S2GAFjs.hasActivePluginSkills.call(void 0, )) return;
|
|
1303
|
+
const agents = _chunkU42S2GAFjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1304
1304
|
if (agents.length === 0) return;
|
|
1305
1305
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1306
1306
|
}
|
|
@@ -1316,7 +1316,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1318
1318
|
return _path.join.call(void 0,
|
|
1319
|
-
|
|
1319
|
+
_chunkU42S2GAFjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1320
1320
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1321
1321
|
);
|
|
1322
1322
|
}
|
|
@@ -1345,7 +1345,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1345
1345
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1346
1346
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1347
1347
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1348
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _93 => _93.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
1348
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _93 => _93.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkU42S2GAFjs.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1349
1349
|
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _94 => _94.bunx]) === "missing" && probes.npx === "missing" ? "neither `bunx` nor `npx` was found on PATH. Make one available." : `installer version check failed for ${Object.entries(_nullishCoalesce(probes, () => ( {}))).filter(([, result]) => result === "failed").map(([command]) => `\`${command}\``).join(" and ")}. Check those commands with --version.`;
|
|
1350
1350
|
notice(
|
|
1351
1351
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -1433,7 +1433,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1433
1433
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1434
1434
|
}
|
|
1435
1435
|
function isDefaultAgentSet(agents) {
|
|
1436
|
-
return agents.length ===
|
|
1436
|
+
return agents.length === _chunkU42S2GAFjs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkU42S2GAFjs.DEFAULT_SKILL_AGENTS[index]);
|
|
1437
1437
|
}
|
|
1438
1438
|
function safeSkillFilePath(value) {
|
|
1439
1439
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1590,10 +1590,10 @@ async function fetchSkillsUpdate(baseUrl, localVersion) {
|
|
|
1590
1590
|
method: "POST",
|
|
1591
1591
|
headers: { "Content-Type": "application/json" },
|
|
1592
1592
|
body: JSON.stringify({
|
|
1593
|
-
sdk_cli: { version:
|
|
1593
|
+
sdk_cli: { version: _chunkU42S2GAFjs.SDK_VERSION },
|
|
1594
1594
|
skills: {
|
|
1595
1595
|
version: localVersion,
|
|
1596
|
-
capability:
|
|
1596
|
+
capability: _chunk2ACYJZHUjs.SDK_RELEASE.packageCapabilities.skillsGuidance
|
|
1597
1597
|
}
|
|
1598
1598
|
}),
|
|
1599
1599
|
signal: controller.signal
|
|
@@ -1632,7 +1632,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
function noInstallerProbePath(baseUrl) {
|
|
1634
1634
|
return _path.join.call(void 0,
|
|
1635
|
-
|
|
1635
|
+
_chunkU42S2GAFjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1636
1636
|
"skills-sync-no-installer-unknown.json"
|
|
1637
1637
|
);
|
|
1638
1638
|
}
|
|
@@ -1711,7 +1711,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1711
1711
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1712
1712
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1713
1713
|
}
|
|
1714
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1714
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkU42S2GAFjs.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1715
1715
|
const commands = [];
|
|
1716
1716
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1717
1717
|
if (probes.bunx === "available") {
|
|
@@ -1863,11 +1863,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1863
1863
|
}
|
|
1864
1864
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1865
1865
|
if (shouldSkipSkillsSync()) return;
|
|
1866
|
-
const usingPluginSkills =
|
|
1866
|
+
const usingPluginSkills = _chunkU42S2GAFjs.hasActivePluginSkills.call(void 0, );
|
|
1867
1867
|
if (usingPluginSkills) {
|
|
1868
1868
|
return;
|
|
1869
1869
|
}
|
|
1870
|
-
const agents =
|
|
1870
|
+
const agents = _chunkU42S2GAFjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1871
1871
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1872
1872
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1873
1873
|
}
|
|
@@ -1895,7 +1895,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1895
1895
|
return;
|
|
1896
1896
|
}
|
|
1897
1897
|
try {
|
|
1898
|
-
const localVersion =
|
|
1898
|
+
const localVersion = _chunkU42S2GAFjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1899
1899
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1900
1900
|
needsUpdate: options.update.needs_update,
|
|
1901
1901
|
remoteVersion: options.update.remote.version
|
|
@@ -2061,7 +2061,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
2061
2061
|
}
|
|
2062
2062
|
}
|
|
2063
2063
|
runLegacySkillsCleanup(agents);
|
|
2064
|
-
if (!
|
|
2064
|
+
if (!_chunkU42S2GAFjs.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
2065
2065
|
notice(
|
|
2066
2066
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
2067
2067
|
);
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunk7F6KTNUPjs = require('./chunk-7F6KTNUP.js');
|
|
8
|
+
require('./chunk-U42S2GAF.js');
|
|
9
9
|
require('./chunk-NPBJI7RE.js');
|
|
10
10
|
require('./chunk-XNYIZMNQ.js');
|
|
11
11
|
require('./chunk-PPDBRJRW.js');
|
|
12
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-2ACYJZHU.js');
|
|
13
13
|
require('./chunk-OG64RBAC.js');
|
|
14
14
|
require('./chunk-COGTRVWW.js');
|
|
15
15
|
|
|
@@ -127,7 +127,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
127
127
|
column.length,
|
|
128
128
|
...rows.map((row) => {
|
|
129
129
|
const value = _nullishCoalesce(row[column], () => ( ""));
|
|
130
|
-
return (verbose ? value :
|
|
130
|
+
return (verbose ? value : _chunk7F6KTNUPjs.clip.call(void 0, value, 42)).length;
|
|
131
131
|
})
|
|
132
132
|
)
|
|
133
133
|
])
|
|
@@ -137,7 +137,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
137
137
|
const body = rows.map(
|
|
138
138
|
(row) => columns.map((column) => {
|
|
139
139
|
const raw = _nullishCoalesce(row[column], () => ( ""));
|
|
140
|
-
const display = verbose ? raw :
|
|
140
|
+
const display = verbose ? raw : _chunk7F6KTNUPjs.clip.call(void 0, raw, 42);
|
|
141
141
|
return display.padEnd(widths[column]);
|
|
142
142
|
}).join(" | ")
|
|
143
143
|
);
|
|
@@ -157,7 +157,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
157
157
|
{ exitCode: 2 }
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
|
-
const allRows =
|
|
160
|
+
const allRows = _chunk7F6KTNUPjs.readCsvRows.call(void 0, csvPath);
|
|
161
161
|
const [rowStart, rowEnd] = parseRowRange(options.rows);
|
|
162
162
|
const rows = options.summary && options.rows === void 0 ? allRows : selectRows(allRows, rowStart, rowEnd);
|
|
163
163
|
const { rows: selected, columns } = selectColumns(
|
|
@@ -170,7 +170,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
170
170
|
if (options.summary) {
|
|
171
171
|
const summaries = summarizeColumns(selected, columns);
|
|
172
172
|
if (format === "json") {
|
|
173
|
-
|
|
173
|
+
_chunk7F6KTNUPjs.printJson.call(void 0, {
|
|
174
174
|
rows: summaries,
|
|
175
175
|
total_rows: selected.length,
|
|
176
176
|
source_total_rows: allRows.length
|
|
@@ -179,7 +179,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
179
179
|
}
|
|
180
180
|
const displayRows = summaryDisplayRows(summaries);
|
|
181
181
|
if (format === "csv") {
|
|
182
|
-
process.stdout.write(
|
|
182
|
+
process.stdout.write(_chunk7F6KTNUPjs.csvStringFromRows.call(void 0, displayRows));
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
185
|
process.stdout.write(
|
|
@@ -194,7 +194,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
196
|
if (format === "json") {
|
|
197
|
-
|
|
197
|
+
_chunk7F6KTNUPjs.printJson.call(void 0, {
|
|
198
198
|
rows: selected.map((row, index) => ({ __row: rowStart + index, ...row }))
|
|
199
199
|
});
|
|
200
200
|
return;
|
|
@@ -437,7 +437,7 @@ async function handleCsvRenderStart(options) {
|
|
|
437
437
|
if (log) {
|
|
438
438
|
detail = `
|
|
439
439
|
CSV render log:
|
|
440
|
-
${
|
|
440
|
+
${_chunk7F6KTNUPjs.clip.call(void 0, log, 2e3)}`;
|
|
441
441
|
}
|
|
442
442
|
} catch (e7) {
|
|
443
443
|
}
|
|
@@ -488,7 +488,7 @@ async function handleCsvRenderStatus(options) {
|
|
|
488
488
|
if (payload.pid) lines.push(`Render PID: ${payload.pid}`);
|
|
489
489
|
if (payload.url) lines.push(`Render URL: ${payload.url}`);
|
|
490
490
|
lines.push(`Render Health: ${payload.health_status}`);
|
|
491
|
-
|
|
491
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0, payload, {
|
|
492
492
|
json: options.json,
|
|
493
493
|
text: `${lines.join("\n")}
|
|
494
494
|
`
|
|
@@ -524,7 +524,7 @@ async function handleCsvRenderStop(options) {
|
|
|
524
524
|
};
|
|
525
525
|
const text = stopped.length > 0 ? `Stopped CSV render process(es): ${stopped.join(" ")}
|
|
526
526
|
` : "No running CSV render process found.\n";
|
|
527
|
-
|
|
527
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
528
528
|
}
|
|
529
529
|
async function handleCsvRender(action, options) {
|
|
530
530
|
const normalized = _nullishCoalesce(action, () => ( "start"));
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
printCommandEnvelope,
|
|
5
5
|
printJson,
|
|
6
6
|
readCsvRows
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-VYO6TLWN.mjs";
|
|
8
|
+
import "./chunk-S5FCTT3E.mjs";
|
|
9
9
|
import "./chunk-MAMVGOSC.mjs";
|
|
10
10
|
import "./chunk-DLIRSHV6.mjs";
|
|
11
11
|
import "./chunk-E4IXDAZI.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-XC3J4P5W.mjs";
|
|
13
13
|
import "./chunk-WZYKRD7T.mjs";
|
|
14
14
|
import "./chunk-KRD6H754.mjs";
|
|
15
15
|
|
|
@@ -4,7 +4,7 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkUXLJZ4XQjs = require('./chunk-UXLJZ4XQ.js');
|
|
8
8
|
require('./chunk-E4CABWXL.js');
|
|
9
9
|
require('./chunk-2H4EY7KH.js');
|
|
10
10
|
require('./chunk-KXMNM4AQ.js');
|
|
@@ -18,8 +18,8 @@ require('./chunk-XDVT3GOM.js');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
22
|
-
require('./chunk-
|
|
21
|
+
var _chunk7F6KTNUPjs = require('./chunk-7F6KTNUP.js');
|
|
22
|
+
require('./chunk-U42S2GAF.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _chunkNPBJI7REjs = require('./chunk-NPBJI7RE.js');
|
|
@@ -27,7 +27,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
|
|
30
|
-
require('./chunk-
|
|
30
|
+
require('./chunk-2ACYJZHU.js');
|
|
31
31
|
require('./chunk-OG64RBAC.js');
|
|
32
32
|
require('./chunk-COGTRVWW.js');
|
|
33
33
|
|
|
@@ -50,8 +50,8 @@ function formatCell(value) {
|
|
|
50
50
|
return text.length > 80 ? `${text.slice(0, 77)}...` : text;
|
|
51
51
|
}
|
|
52
52
|
function tableLines(result) {
|
|
53
|
-
const rows =
|
|
54
|
-
const responseColumns =
|
|
53
|
+
const rows = _chunk7F6KTNUPjs.dataExportRows.call(void 0, customerDbRows(result));
|
|
54
|
+
const responseColumns = _chunk7F6KTNUPjs.dataExportColumns.call(void 0,
|
|
55
55
|
rows,
|
|
56
56
|
customerDbColumnNames(result)
|
|
57
57
|
);
|
|
@@ -97,7 +97,7 @@ function tableLines(result) {
|
|
|
97
97
|
return lines;
|
|
98
98
|
}
|
|
99
99
|
function customerDbRows(result) {
|
|
100
|
-
return
|
|
100
|
+
return _chunk7F6KTNUPjs.recordRows.call(void 0, result.rows);
|
|
101
101
|
}
|
|
102
102
|
function customerDbColumnNames(result) {
|
|
103
103
|
return result.columns.map((column) => column.name).filter(Boolean);
|
|
@@ -150,7 +150,7 @@ function writeCustomerDbCsv(result, outPath) {
|
|
|
150
150
|
const resolved = _path.resolve.call(void 0, outPath);
|
|
151
151
|
_fs.writeFileSync.call(void 0,
|
|
152
152
|
resolved,
|
|
153
|
-
|
|
153
|
+
_chunk7F6KTNUPjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
|
|
154
154
|
"utf-8"
|
|
155
155
|
);
|
|
156
156
|
return resolved;
|
|
@@ -191,7 +191,7 @@ function dbQueryExportEnvelope(input) {
|
|
|
191
191
|
function renderDbQueryResult(result, query, options) {
|
|
192
192
|
const { sql, maxRows, operationKey } = query;
|
|
193
193
|
const { format, out: outPath, json: explicitJsonOutput = false } = options;
|
|
194
|
-
const jsonOutput = explicitJsonOutput ||
|
|
194
|
+
const jsonOutput = explicitJsonOutput || _chunk7F6KTNUPjs.shouldEmitJson.call(void 0, );
|
|
195
195
|
const toolPayload = JSON.stringify({
|
|
196
196
|
sql,
|
|
197
197
|
result_mode: "rows",
|
|
@@ -202,7 +202,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
202
202
|
if (format === "csv") {
|
|
203
203
|
if (outPath) {
|
|
204
204
|
const exportedPath = writeCustomerDbCsv(result, outPath);
|
|
205
|
-
|
|
205
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
206
206
|
dbQueryExportEnvelope({
|
|
207
207
|
result,
|
|
208
208
|
format,
|
|
@@ -218,7 +218,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
218
218
|
);
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
|
-
|
|
221
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
222
222
|
dbQueryExportEnvelope({
|
|
223
223
|
result,
|
|
224
224
|
format,
|
|
@@ -228,7 +228,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
228
228
|
}),
|
|
229
229
|
{
|
|
230
230
|
json: explicitJsonOutput,
|
|
231
|
-
text:
|
|
231
|
+
text: _chunk7F6KTNUPjs.dataExportCsvString.call(void 0,
|
|
232
232
|
customerDbRows(result),
|
|
233
233
|
customerDbColumnNames(result)
|
|
234
234
|
)
|
|
@@ -237,14 +237,14 @@ function renderDbQueryResult(result, query, options) {
|
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
239
|
if (format === "markdown") {
|
|
240
|
-
const content =
|
|
240
|
+
const content = _chunk7F6KTNUPjs.markdownTableFromRows.call(void 0,
|
|
241
241
|
customerDbRows(result),
|
|
242
242
|
customerDbColumnNames(result)
|
|
243
243
|
);
|
|
244
244
|
if (outPath) {
|
|
245
245
|
const exportedPath = _path.resolve.call(void 0, outPath);
|
|
246
246
|
_fs.writeFileSync.call(void 0, exportedPath, content, "utf-8");
|
|
247
|
-
|
|
247
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
248
248
|
dbQueryExportEnvelope({
|
|
249
249
|
result,
|
|
250
250
|
format,
|
|
@@ -260,7 +260,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
260
260
|
);
|
|
261
261
|
return;
|
|
262
262
|
}
|
|
263
|
-
|
|
263
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
264
264
|
dbQueryExportEnvelope({
|
|
265
265
|
result,
|
|
266
266
|
format,
|
|
@@ -275,7 +275,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
275
275
|
);
|
|
276
276
|
return;
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
279
279
|
{
|
|
280
280
|
...result,
|
|
281
281
|
next: {
|
|
@@ -349,9 +349,9 @@ async function runDbQueryCommand(options) {
|
|
|
349
349
|
...maxRows === void 0 ? {} : { maxRows },
|
|
350
350
|
...operationKey === void 0 ? {} : { operationKey }
|
|
351
351
|
};
|
|
352
|
-
const plan =
|
|
352
|
+
const plan = _chunkUXLJZ4XQjs.planCustomerDbQuery.call(void 0, query);
|
|
353
353
|
if (options.dryRun) {
|
|
354
|
-
|
|
354
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
355
355
|
{
|
|
356
356
|
dryRun: true,
|
|
357
357
|
...plan,
|
|
@@ -364,11 +364,11 @@ async function runDbQueryCommand(options) {
|
|
|
364
364
|
...out === void 0 ? {} : { file: _path.resolve.call(void 0, out) }
|
|
365
365
|
}
|
|
366
366
|
},
|
|
367
|
-
{ json: options.json ||
|
|
367
|
+
{ json: options.json || _chunk7F6KTNUPjs.shouldEmitJson.call(void 0, ) }
|
|
368
368
|
);
|
|
369
369
|
return 0;
|
|
370
370
|
}
|
|
371
|
-
const client = new (0,
|
|
371
|
+
const client = new (0, _chunkUXLJZ4XQjs.DeeplineClient)();
|
|
372
372
|
const result = await client.db.query(query);
|
|
373
373
|
renderDbQueryResult(result, query, {
|
|
374
374
|
format,
|
|
@@ -377,8 +377,8 @@ async function runDbQueryCommand(options) {
|
|
|
377
377
|
});
|
|
378
378
|
return 0;
|
|
379
379
|
} catch (error) {
|
|
380
|
-
if (error instanceof _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError && (options.json ||
|
|
381
|
-
|
|
380
|
+
if (error instanceof _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunk7F6KTNUPjs.shouldEmitJson.call(void 0, ))) {
|
|
381
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
382
382
|
{
|
|
383
383
|
ok: false,
|
|
384
384
|
error: {
|
|
@@ -426,8 +426,8 @@ function dbRepairPlainText(result) {
|
|
|
426
426
|
async function handleDbRepair(args) {
|
|
427
427
|
const providerIndex = args.indexOf("--provider");
|
|
428
428
|
const provider = providerIndex >= 0 ? _optionalChain([args, 'access', _9 => _9[providerIndex + 1], 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]) : void 0;
|
|
429
|
-
const jsonOutput =
|
|
430
|
-
const client = new (0,
|
|
429
|
+
const jsonOutput = _chunk7F6KTNUPjs.argsWantJson.call(void 0, args);
|
|
430
|
+
const client = new (0, _chunkUXLJZ4XQjs.DeeplineClient)();
|
|
431
431
|
let result;
|
|
432
432
|
try {
|
|
433
433
|
result = await client.repairIngestionStorage(
|
|
@@ -443,7 +443,7 @@ async function handleDbRepair(args) {
|
|
|
443
443
|
console.error(errorMessage2(error));
|
|
444
444
|
return 1;
|
|
445
445
|
}
|
|
446
|
-
|
|
446
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
447
447
|
{
|
|
448
448
|
command: "db repair",
|
|
449
449
|
status: result.status,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
DeeplineClient,
|
|
6
6
|
planCustomerDbQuery
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NUET45RU.mjs";
|
|
8
8
|
import "./chunk-L2VKAASU.mjs";
|
|
9
9
|
import "./chunk-KCC3FKIW.mjs";
|
|
10
10
|
import "./chunk-EIMG75BT.mjs";
|
|
@@ -18,8 +18,8 @@ import {
|
|
|
18
18
|
printCommandEnvelope,
|
|
19
19
|
recordRows,
|
|
20
20
|
shouldEmitJson
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-VYO6TLWN.mjs";
|
|
22
|
+
import "./chunk-S5FCTT3E.mjs";
|
|
23
23
|
import {
|
|
24
24
|
CustomerDbQueryOutcomeUnknownError
|
|
25
25
|
} from "./chunk-MAMVGOSC.mjs";
|
|
@@ -27,7 +27,7 @@ import "./chunk-DLIRSHV6.mjs";
|
|
|
27
27
|
import {
|
|
28
28
|
DeeplineError
|
|
29
29
|
} from "./chunk-E4IXDAZI.mjs";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-XC3J4P5W.mjs";
|
|
31
31
|
import "./chunk-WZYKRD7T.mjs";
|
|
32
32
|
import "./chunk-KRD6H754.mjs";
|
|
33
33
|
|