deepline 0.3.395 → 0.3.396
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/plays/play-description.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/cli/{auth-NMQXZRS7.mjs → auth-3LTD62VL.mjs} +4 -4
- package/dist/cli/auth-562JPKOM.js +39 -0
- package/dist/cli/{billing-5MVXZRS6.mjs → billing-DP7ZAJBO.mjs} +5 -5
- package/dist/cli/{billing-Z4JTGUU3.js → billing-PA5OXEM5.js} +76 -76
- package/dist/cli/{chunk-BLYL3KOC.mjs → chunk-23GAA3YO.mjs} +1 -1
- package/dist/cli/{chunk-LZLBR2SF.js → chunk-2VOLOWYZ.js} +1087 -1056
- package/dist/cli/{chunk-EFLQHJZ6.mjs → chunk-3T4MCB5R.mjs} +1026 -995
- package/dist/cli/{chunk-VB6KECLU.mjs → chunk-5WNJF2T3.mjs} +102 -36
- package/dist/cli/{chunk-UKU6JM3S.js → chunk-772W2SAU.js} +8 -8
- package/dist/cli/{chunk-K5T3EN6D.js → chunk-7Z66NHUC.js} +26 -26
- package/dist/cli/{chunk-WCCKMLHL.mjs → chunk-AUYXWELC.mjs} +2 -2
- package/dist/cli/{chunk-PZ5BZ76S.js → chunk-AVHLATII.js} +50 -50
- package/dist/cli/{chunk-MYIBHORT.js → chunk-DC6LTULT.js} +2 -2
- package/dist/cli/{chunk-5VCZ3WRH.mjs → chunk-EIMG75BT.mjs} +1 -0
- package/dist/cli/{chunk-TO2MWPGR.js → chunk-GNN4MY5X.js} +1 -1
- package/dist/cli/{chunk-OCSG6X67.mjs → chunk-I4T4XAA2.mjs} +4 -4
- package/dist/cli/{chunk-ZWH2TFA7.mjs → chunk-JCN4DHF7.mjs} +2 -2
- package/dist/cli/{chunk-R4XZO6Z5.js → chunk-KAEZNPUM.js} +23 -8
- package/dist/cli/{chunk-DRM3CMHL.js → chunk-KXMNM4AQ.js} +2 -1
- package/dist/cli/{chunk-3TRY7KAC.mjs → chunk-LOGGNW4H.mjs} +2 -2
- package/dist/cli/{chunk-RDXFGPJU.js → chunk-LWERJUKN.js} +218 -218
- package/dist/cli/{chunk-UCXK2DS4.js → chunk-ME6XRFLY.js} +15 -15
- package/dist/cli/{chunk-G4IWGRMK.mjs → chunk-MR6XCBQJ.mjs} +2 -2
- package/dist/cli/{chunk-BON3DRC6.mjs → chunk-NHB5YUCS.mjs} +1 -1
- package/dist/cli/{chunk-ZMVJSS6N.js → chunk-NSOTASOP.js} +101 -35
- package/dist/cli/{chunk-7XAM7KDW.mjs → chunk-QHGPA362.mjs} +18 -3
- package/dist/cli/{chunk-VYLJJQ7Y.js → chunk-RMTASUAK.js} +65 -65
- package/dist/cli/{chunk-HRWUQJ4K.js → chunk-RTO5QZWT.js} +6 -6
- package/dist/cli/{chunk-7MVWUXOD.mjs → chunk-TLQ3FZOC.mjs} +3 -3
- package/dist/cli/{chunk-56IFFVIB.js → chunk-V7UP2F4U.js} +4 -4
- package/dist/cli/{chunk-6D7A2FSL.mjs → chunk-VE3U3SQC.mjs} +1 -1
- package/dist/cli/{chunk-36ML3YKA.js → chunk-WQJJNIMQ.js} +13 -13
- package/dist/cli/{chunk-47M6HPGP.mjs → chunk-XKZXO7D3.mjs} +1 -1
- package/dist/cli/{csv-SVOD5UBH.mjs → csv-RLRR74RQ.mjs} +3 -3
- package/dist/cli/{csv-HTS5ZYQ4.js → csv-TF576S77.js} +12 -12
- package/dist/cli/{db-7AP4P52N.js → db-FDBJUTFO.js} +30 -30
- package/dist/cli/{db-7QLNI3Q4.mjs → db-XORGNBIC.mjs} +5 -5
- package/dist/cli/{describe-DBRY5BNK.mjs → describe-6O2ENKTP.mjs} +86 -68
- package/dist/cli/{describe-YKOE54ZO.js → describe-EFWNECHI.js} +100 -82
- package/dist/cli/{executions-GRQXTB2P.js → executions-SFYAXPF4.js} +7 -7
- package/dist/cli/{executions-QNZTPNG4.mjs → executions-YPP7WR77.mjs} +5 -5
- package/dist/cli/{feedback-ZOLA2KY7.js → feedback-5UZFYMGB.js} +7 -7
- package/dist/cli/{feedback-JMCSR624.mjs → feedback-RBGA5ARU.mjs} +3 -3
- package/dist/cli/git-5LDY5ZID.js +23 -0
- package/dist/cli/{git-LJGL2IHS.mjs → git-IRSAJEK2.mjs} +4 -4
- package/dist/cli/index.js +94 -94
- package/dist/cli/index.mjs +38 -38
- package/dist/cli/{legacy-noops-YSCIR2SD.js → legacy-noops-CVAOQY2F.js} +7 -7
- package/dist/cli/{legacy-noops-F23PKVBN.mjs → legacy-noops-NA7N6ZOU.mjs} +4 -4
- package/dist/cli/{monitors-WMZ6HJZX.js → monitors-4OMRXCXP.js} +86 -86
- package/dist/cli/{monitors-S4LOEL7W.mjs → monitors-ILZ2XHYG.mjs} +5 -5
- package/dist/cli/{org-U3WA2NQM.mjs → org-QDDXAE3J.mjs} +5 -5
- package/dist/cli/{org-PFHM5ZLY.js → org-YGNJDD2X.js} +65 -65
- package/dist/cli/{chunk-4KLCLLTO.js → play-L535H26U.js} +266 -323
- package/dist/cli/{chunk-XMAPE2KH.mjs → play-VT6OHB2D.mjs} +72 -129
- package/dist/cli/{providers-XYMHLKCA.js → providers-GPZ6PQAL.js} +8 -8
- package/dist/cli/{providers-QBBRFBOH.mjs → providers-KG4W5MPK.mjs} +5 -5
- package/dist/cli/{quickstart-5JTDGISY.mjs → quickstart-2JDGTXIG.mjs} +3 -3
- package/dist/cli/{quickstart-IYGD6ZY3.js → quickstart-UI27S5LO.js} +5 -5
- package/dist/cli/search-MGWROZ33.js +28 -0
- package/dist/cli/{search-X6W6GRHS.mjs → search-PW3RAUX7.mjs} +6 -6
- package/dist/cli/{secrets-N55B67H6.mjs → secrets-HNOMK5A2.mjs} +5 -5
- package/dist/cli/{secrets-UHG6OQFD.js → secrets-WFAXOUZE.js} +14 -14
- package/dist/cli/{sessions-57L5MGHN.js → sessions-366KROUA.js} +5 -5
- package/dist/cli/{sessions-JTRSTDSS.mjs → sessions-XLX3E5UO.mjs} +4 -4
- package/dist/cli/{settings-ATX4U5AS.js → settings-GADAG2UK.js} +75 -75
- package/dist/cli/{settings-Q24HRAQI.mjs → settings-YNZ4YKCH.mjs} +8 -8
- package/dist/cli/{setup-77ZWLVHT.mjs → setup-PSEHIUXO.mjs} +6 -6
- package/dist/cli/{setup-EJCNOUCE.js → setup-R5YO7GT6.js} +41 -41
- package/dist/cli/skills-JF2LPEGM.js +28 -0
- package/dist/cli/{skills-XIS5AWQI.mjs → skills-LTQBP6CZ.mjs} +4 -4
- package/dist/cli/tools-CP2PEFRN.js +34 -0
- package/dist/cli/{tools-WCKLYEGQ.mjs → tools-UAXDWU63.mjs} +11 -19
- package/dist/cli/update-HZHZOU6C.js +28 -0
- package/dist/cli/{update-UT5WANMV.mjs → update-SMNIBIMS.mjs} +6 -6
- package/dist/cli/{workflow-226QYUN2.js → workflow-AOQVZHMD.js} +16 -16
- package/dist/cli/{workflow-ZMX3L4ML.mjs → workflow-IKGMBGF6.mjs} +6 -6
- package/dist/{client-CivP-PAI.d.ts → client-Bgis7F6-.d.ts} +2 -1
- package/dist/{client-hdFtwhTm.d.mts → client-DiGl8ska.d.mts} +2 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -11
- package/dist/index.mjs +9 -9
- package/dist/install-integrity.json +78 -80
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/play-description.js +4 -2
- package/dist/plays/play-description.mjs +3 -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-UYCOBAL5.js +0 -39
- package/dist/cli/git-EJQLRK27.js +0 -23
- package/dist/cli/play-AGSECQFN.mjs +0 -159
- package/dist/cli/play-BR2LWGXK.js +0 -159
- package/dist/cli/search-ZVSYH5GY.js +0 -28
- package/dist/cli/skills-SPXUBLII.js +0 -28
- package/dist/cli/tools-DBHUUZJX.js +0 -42
- package/dist/cli/update-VSNFXRHJ.js +0 -28
- package/dist/cli/{chunk-KZZC33PY.mjs → chunk-H5KLUGY7.mjs} +214 -214
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkV7UP2F4Ujs = require('./chunk-V7UP2F4U.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -226,8 +226,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
226
226
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
227
227
|
var defaultBrowserCommandRunner = childProcess;
|
|
228
228
|
function getAuthedHttpClient() {
|
|
229
|
-
const config =
|
|
230
|
-
return { config, http: new (0,
|
|
229
|
+
const config = _chunkV7UP2F4Ujs.resolveConfig.call(void 0, );
|
|
230
|
+
return { config, http: new (0, _chunkV7UP2F4Ujs.HttpClient)(config) };
|
|
231
231
|
}
|
|
232
232
|
function stableOsUserId() {
|
|
233
233
|
try {
|
|
@@ -567,7 +567,7 @@ function collectLocalEnvInfo() {
|
|
|
567
567
|
os: `${process.platform} ${process.arch}`,
|
|
568
568
|
node_version: process.version,
|
|
569
569
|
home_dir: homeDir,
|
|
570
|
-
agent_runtime:
|
|
570
|
+
agent_runtime: _chunkV7UP2F4Ujs.detectAgentRuntime.call(void 0, )
|
|
571
571
|
};
|
|
572
572
|
const env = process.env;
|
|
573
573
|
const optional = {
|
|
@@ -814,9 +814,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
814
814
|
}
|
|
815
815
|
function withAgentCommandContext(value) {
|
|
816
816
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
817
|
-
return
|
|
817
|
+
return _chunkV7UP2F4Ujs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
818
818
|
...valueRecord,
|
|
819
|
-
command_context:
|
|
819
|
+
command_context: _chunkV7UP2F4Ujs.resolveCliCommandContext.call(void 0, )
|
|
820
820
|
} : value;
|
|
821
821
|
}
|
|
822
822
|
function printJson(value, fields) {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-GAMFK2ZP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
printCommandEnvelope
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XKZXO7D3.mjs";
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_SKILL_AGENTS,
|
|
9
9
|
KNOWN_SKILL_AGENTS,
|
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
sdkCliStateDirPath,
|
|
23
23
|
skillsAgentPathSegment,
|
|
24
24
|
writeSdkSkillsLocalVersion
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-VE3U3SQC.mjs";
|
|
26
26
|
import {
|
|
27
27
|
DeeplineError
|
|
28
28
|
} from "./chunk-NXGCO4JB.mjs";
|
|
29
29
|
import {
|
|
30
30
|
SDK_RELEASE
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-NHB5YUCS.mjs";
|
|
32
32
|
|
|
33
33
|
// src/cli/commands/skills.ts
|
|
34
34
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -14,7 +14,7 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
14
14
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkGNN4MY5Xjs = require('./chunk-GNN4MY5X.js');
|
|
18
18
|
|
|
19
19
|
// src/errors.ts
|
|
20
20
|
var CustomerDbQueryOutcomeUnknownError = (_class = class extends _chunk7P5AA3SNjs.DeeplineError {
|
|
@@ -744,9 +744,9 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
|
744
744
|
}
|
|
745
745
|
|
|
746
746
|
// src/version.ts
|
|
747
|
-
var SDK_VERSION =
|
|
748
|
-
var SDK_API_MAJOR =
|
|
749
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
747
|
+
var SDK_VERSION = _chunkGNN4MY5Xjs.SDK_RELEASE.version;
|
|
748
|
+
var SDK_API_MAJOR = _chunkGNN4MY5Xjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
749
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunkGNN4MY5Xjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
750
750
|
|
|
751
751
|
// src/agent-runtime.ts
|
|
752
752
|
|
|
@@ -17,7 +17,7 @@ var _chunkUHNDVD3Pjs = require('./chunk-UHNDVD3P.js');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkKXMNM4AQjs = require('./chunk-KXMNM4AQ.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ var _chunkDRM3CMHLjs = require('./chunk-DRM3CMHL.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkV7UP2F4Ujs = require('./chunk-V7UP2F4U.js');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
@@ -138,7 +138,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
138
138
|
if (error instanceof _chunk7P5AA3SNjs.DeeplineError && (_optionalChain([error, 'access', _ => _.code, 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
|
|
139
139
|
// lost connections and explicitly unknown transaction resolution.
|
|
140
140
|
/^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
|
|
141
|
-
throw new (0,
|
|
141
|
+
throw new (0, _chunkV7UP2F4Ujs.CustomerDbQueryOutcomeUnknownError)(
|
|
142
142
|
error,
|
|
143
143
|
plan.request.body.operation_key
|
|
144
144
|
);
|
|
@@ -146,7 +146,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
146
146
|
throw error;
|
|
147
147
|
}
|
|
148
148
|
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) {
|
|
149
|
-
throw new (0,
|
|
149
|
+
throw new (0, _chunkV7UP2F4Ujs.CustomerDbQueryOutcomeUnknownError)(
|
|
150
150
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
151
151
|
"The SQL response did not contain a valid result.",
|
|
152
152
|
200,
|
|
@@ -157,7 +157,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
157
157
|
}
|
|
158
158
|
const operation = result.operation;
|
|
159
159
|
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))) {
|
|
160
|
-
throw new (0,
|
|
160
|
+
throw new (0, _chunkV7UP2F4Ujs.CustomerDbQueryOutcomeUnknownError)(
|
|
161
161
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
162
162
|
"The server did not confirm the original atomic SQL operation.",
|
|
163
163
|
200,
|
|
@@ -2887,8 +2887,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
2887
2887
|
}
|
|
2888
2888
|
const receivers = _optionalChain([env, 'access', _97 => _97.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _98 => _98.trim, 'call', _99 => _99()]);
|
|
2889
2889
|
return {
|
|
2890
|
-
[
|
|
2891
|
-
...receivers ? { [
|
|
2890
|
+
[_chunkV7UP2F4Ujs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
2891
|
+
...receivers ? { [_chunkV7UP2F4Ujs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
2892
2892
|
};
|
|
2893
2893
|
}
|
|
2894
2894
|
function isolatedCiRuntimeEventReadHeaders(env) {
|
|
@@ -2904,7 +2904,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
2904
2904
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
2905
2905
|
);
|
|
2906
2906
|
}
|
|
2907
|
-
return { [
|
|
2907
|
+
return { [_chunkV7UP2F4Ujs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
2908
2908
|
}
|
|
2909
2909
|
function normalizeTestPolicyOverrides(value, source) {
|
|
2910
2910
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -3195,9 +3195,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3195
3195
|
* @throws {@link ConfigError} if no API key can be resolved from any source.
|
|
3196
3196
|
*/
|
|
3197
3197
|
constructor(options) {
|
|
3198
|
-
this.config =
|
|
3198
|
+
this.config = _chunkV7UP2F4Ujs.resolveConfig.call(void 0, options);
|
|
3199
3199
|
this.environment = _nullishCoalesce(this.config.environment, () => ( process.env));
|
|
3200
|
-
this.http = new (0,
|
|
3200
|
+
this.http = new (0, _chunkV7UP2F4Ujs.HttpClient)(this.config);
|
|
3201
3201
|
this.toolCalls = new ToolCalls(
|
|
3202
3202
|
this.http,
|
|
3203
3203
|
this.config.timeout,
|
|
@@ -5250,7 +5250,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5250
5250
|
}
|
|
5251
5251
|
);
|
|
5252
5252
|
const plays = (_nullishCoalesce(response.plays, () => ( []))).map(
|
|
5253
|
-
(play) =>
|
|
5253
|
+
(play) => _chunkKXMNM4AQjs.describePlayListItem.call(void 0, play, { ...options, pipeline: true })
|
|
5254
5254
|
);
|
|
5255
5255
|
if (scope === "prebuilt") {
|
|
5256
5256
|
return plays.filter(isPrebuiltPlayDescription);
|
|
@@ -5308,7 +5308,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5308
5308
|
*/
|
|
5309
5309
|
async describePlay(name, options = {}) {
|
|
5310
5310
|
if (options.pipeline) {
|
|
5311
|
-
return
|
|
5311
|
+
return _chunkKXMNM4AQjs.describePlayDetail.call(void 0,
|
|
5312
5312
|
await this.getPlay(name, { guidance: true }),
|
|
5313
5313
|
options
|
|
5314
5314
|
);
|
|
@@ -5319,7 +5319,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5319
5319
|
...options.compact ? { compact: "1" } : {}
|
|
5320
5320
|
});
|
|
5321
5321
|
const body = await this.http.get(`/api/v2/plays/${encodeURIComponent(name)}?${params.toString()}`);
|
|
5322
|
-
return "description" in body ? body.description :
|
|
5322
|
+
return "description" in body ? body.description : _chunkKXMNM4AQjs.describePlayDetail.call(void 0, body, options);
|
|
5323
5323
|
}
|
|
5324
5324
|
/**
|
|
5325
5325
|
* Clear run history and durable sheet/result data for a play without deleting
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
printCommandEnvelope,
|
|
5
5
|
printJson,
|
|
6
6
|
readCsvRows
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-XKZXO7D3.mjs";
|
|
8
|
+
import "./chunk-VE3U3SQC.mjs";
|
|
9
9
|
import "./chunk-DLIRSHV6.mjs";
|
|
10
10
|
import "./chunk-NXGCO4JB.mjs";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-NHB5YUCS.mjs";
|
|
12
12
|
import "./chunk-WZYKRD7T.mjs";
|
|
13
13
|
import "./chunk-KRD6H754.mjs";
|
|
14
14
|
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunkRTO5QZWTjs = require('./chunk-RTO5QZWT.js');
|
|
8
|
+
require('./chunk-V7UP2F4U.js');
|
|
9
9
|
require('./chunk-XNYIZMNQ.js');
|
|
10
10
|
require('./chunk-7P5AA3SN.js');
|
|
11
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-GNN4MY5X.js');
|
|
12
12
|
require('./chunk-OG64RBAC.js');
|
|
13
13
|
require('./chunk-COGTRVWW.js');
|
|
14
14
|
|
|
@@ -126,7 +126,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
126
126
|
column.length,
|
|
127
127
|
...rows.map((row) => {
|
|
128
128
|
const value = _nullishCoalesce(row[column], () => ( ""));
|
|
129
|
-
return (verbose ? value :
|
|
129
|
+
return (verbose ? value : _chunkRTO5QZWTjs.clip.call(void 0, value, 42)).length;
|
|
130
130
|
})
|
|
131
131
|
)
|
|
132
132
|
])
|
|
@@ -136,7 +136,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
136
136
|
const body = rows.map(
|
|
137
137
|
(row) => columns.map((column) => {
|
|
138
138
|
const raw = _nullishCoalesce(row[column], () => ( ""));
|
|
139
|
-
const display = verbose ? raw :
|
|
139
|
+
const display = verbose ? raw : _chunkRTO5QZWTjs.clip.call(void 0, raw, 42);
|
|
140
140
|
return display.padEnd(widths[column]);
|
|
141
141
|
}).join(" | ")
|
|
142
142
|
);
|
|
@@ -156,7 +156,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
156
156
|
{ exitCode: 2 }
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
|
-
const allRows =
|
|
159
|
+
const allRows = _chunkRTO5QZWTjs.readCsvRows.call(void 0, csvPath);
|
|
160
160
|
const [rowStart, rowEnd] = parseRowRange(options.rows);
|
|
161
161
|
const rows = options.summary && options.rows === void 0 ? allRows : selectRows(allRows, rowStart, rowEnd);
|
|
162
162
|
const { rows: selected, columns } = selectColumns(
|
|
@@ -169,7 +169,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
169
169
|
if (options.summary) {
|
|
170
170
|
const summaries = summarizeColumns(selected, columns);
|
|
171
171
|
if (format === "json") {
|
|
172
|
-
|
|
172
|
+
_chunkRTO5QZWTjs.printJson.call(void 0, {
|
|
173
173
|
rows: summaries,
|
|
174
174
|
total_rows: selected.length,
|
|
175
175
|
source_total_rows: allRows.length
|
|
@@ -178,7 +178,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
178
178
|
}
|
|
179
179
|
const displayRows = summaryDisplayRows(summaries);
|
|
180
180
|
if (format === "csv") {
|
|
181
|
-
process.stdout.write(
|
|
181
|
+
process.stdout.write(_chunkRTO5QZWTjs.csvStringFromRows.call(void 0, displayRows));
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
184
|
process.stdout.write(
|
|
@@ -193,7 +193,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
195
|
if (format === "json") {
|
|
196
|
-
|
|
196
|
+
_chunkRTO5QZWTjs.printJson.call(void 0, {
|
|
197
197
|
rows: selected.map((row, index) => ({ __row: rowStart + index, ...row }))
|
|
198
198
|
});
|
|
199
199
|
return;
|
|
@@ -436,7 +436,7 @@ async function handleCsvRenderStart(options) {
|
|
|
436
436
|
if (log) {
|
|
437
437
|
detail = `
|
|
438
438
|
CSV render log:
|
|
439
|
-
${
|
|
439
|
+
${_chunkRTO5QZWTjs.clip.call(void 0, log, 2e3)}`;
|
|
440
440
|
}
|
|
441
441
|
} catch (e7) {
|
|
442
442
|
}
|
|
@@ -487,7 +487,7 @@ async function handleCsvRenderStatus(options) {
|
|
|
487
487
|
if (payload.pid) lines.push(`Render PID: ${payload.pid}`);
|
|
488
488
|
if (payload.url) lines.push(`Render URL: ${payload.url}`);
|
|
489
489
|
lines.push(`Render Health: ${payload.health_status}`);
|
|
490
|
-
|
|
490
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, payload, {
|
|
491
491
|
json: options.json,
|
|
492
492
|
text: `${lines.join("\n")}
|
|
493
493
|
`
|
|
@@ -523,7 +523,7 @@ async function handleCsvRenderStop(options) {
|
|
|
523
523
|
};
|
|
524
524
|
const text = stopped.length > 0 ? `Stopped CSV render process(es): ${stopped.join(" ")}
|
|
525
525
|
` : "No running CSV render process found.\n";
|
|
526
|
-
|
|
526
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
527
527
|
}
|
|
528
528
|
async function handleCsvRender(action, options) {
|
|
529
529
|
const normalized = _nullishCoalesce(action, () => ( "start"));
|
|
@@ -4,10 +4,10 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkWQJJNIMQjs = require('./chunk-WQJJNIMQ.js');
|
|
8
8
|
require('./chunk-S6R3OX7B.js');
|
|
9
9
|
require('./chunk-UHNDVD3P.js');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-KXMNM4AQ.js');
|
|
11
11
|
require('./chunk-XDVT3GOM.js');
|
|
12
12
|
|
|
13
13
|
|
|
@@ -18,15 +18,15 @@ require('./chunk-XDVT3GOM.js');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkRTO5QZWTjs = require('./chunk-RTO5QZWT.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkV7UP2F4Ujs = require('./chunk-V7UP2F4U.js');
|
|
25
25
|
require('./chunk-XNYIZMNQ.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
29
|
-
require('./chunk-
|
|
29
|
+
require('./chunk-GNN4MY5X.js');
|
|
30
30
|
require('./chunk-OG64RBAC.js');
|
|
31
31
|
require('./chunk-COGTRVWW.js');
|
|
32
32
|
|
|
@@ -49,8 +49,8 @@ function formatCell(value) {
|
|
|
49
49
|
return text.length > 80 ? `${text.slice(0, 77)}...` : text;
|
|
50
50
|
}
|
|
51
51
|
function tableLines(result) {
|
|
52
|
-
const rows =
|
|
53
|
-
const responseColumns =
|
|
52
|
+
const rows = _chunkRTO5QZWTjs.dataExportRows.call(void 0, customerDbRows(result));
|
|
53
|
+
const responseColumns = _chunkRTO5QZWTjs.dataExportColumns.call(void 0,
|
|
54
54
|
rows,
|
|
55
55
|
customerDbColumnNames(result)
|
|
56
56
|
);
|
|
@@ -96,7 +96,7 @@ function tableLines(result) {
|
|
|
96
96
|
return lines;
|
|
97
97
|
}
|
|
98
98
|
function customerDbRows(result) {
|
|
99
|
-
return
|
|
99
|
+
return _chunkRTO5QZWTjs.recordRows.call(void 0, result.rows);
|
|
100
100
|
}
|
|
101
101
|
function customerDbColumnNames(result) {
|
|
102
102
|
return result.columns.map((column) => column.name).filter(Boolean);
|
|
@@ -118,15 +118,15 @@ function collectErrorText(value) {
|
|
|
118
118
|
].filter(Boolean).join("\n");
|
|
119
119
|
}
|
|
120
120
|
function formatDbQueryError(sql, error) {
|
|
121
|
-
const text = error instanceof
|
|
121
|
+
const text = error instanceof _chunkV7UP2F4Ujs.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
|
|
122
122
|
const lower = text.toLowerCase();
|
|
123
123
|
const referencesStorage = /"storage"\.|storage\./i.test(sql);
|
|
124
124
|
const runIdColumnMissing = /column\s+"?run_id"?\s+does not exist/i.test(text) || /run_id.*does not exist/i.test(lower);
|
|
125
125
|
const relationMissing = /relation\s+["']?[^"']*storage[^"']*["']?\s+does not exist/i.test(text) || /42p01/i.test(text);
|
|
126
126
|
if (referencesStorage && relationMissing) {
|
|
127
127
|
return [
|
|
128
|
-
...error instanceof
|
|
129
|
-
error instanceof
|
|
128
|
+
...error instanceof _chunkV7UP2F4Ujs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
129
|
+
error instanceof _chunkV7UP2F4Ujs.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
|
|
130
130
|
"Play dataset tables are created only when the corresponding ctx.dataset(...).run(...) call executes. Pilot branches, early returns, and runs that fail before the dataset do not create that table.",
|
|
131
131
|
"Use `deepline runs get <run-id> --full` to inspect returned dataset handles, then export them with `deepline runs export <run-id> --dataset result.rows --out rows.csv`.",
|
|
132
132
|
`Original error: ${errorMessage(error)}`
|
|
@@ -134,7 +134,7 @@ function formatDbQueryError(sql, error) {
|
|
|
134
134
|
}
|
|
135
135
|
if (referencesStorage && runIdColumnMissing) {
|
|
136
136
|
return [
|
|
137
|
-
...error instanceof
|
|
137
|
+
...error instanceof _chunkV7UP2F4Ujs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
138
138
|
"Customer DB query failed: storage dataset tables use `_run_id`, not `run_id`.",
|
|
139
139
|
"Prefer `deepline runs export <run-id> --dataset result.rows --out rows.csv` unless you are doing deep table debugging.",
|
|
140
140
|
`Original error: ${errorMessage(error)}`
|
|
@@ -149,7 +149,7 @@ function writeCustomerDbCsv(result, outPath) {
|
|
|
149
149
|
const resolved = _path.resolve.call(void 0, outPath);
|
|
150
150
|
_fs.writeFileSync.call(void 0,
|
|
151
151
|
resolved,
|
|
152
|
-
|
|
152
|
+
_chunkRTO5QZWTjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
|
|
153
153
|
"utf-8"
|
|
154
154
|
);
|
|
155
155
|
return resolved;
|
|
@@ -190,7 +190,7 @@ function dbQueryExportEnvelope(input) {
|
|
|
190
190
|
function renderDbQueryResult(result, query, options) {
|
|
191
191
|
const { sql, maxRows, operationKey } = query;
|
|
192
192
|
const { format, out: outPath, json: explicitJsonOutput = false } = options;
|
|
193
|
-
const jsonOutput = explicitJsonOutput ||
|
|
193
|
+
const jsonOutput = explicitJsonOutput || _chunkRTO5QZWTjs.shouldEmitJson.call(void 0, );
|
|
194
194
|
const toolPayload = JSON.stringify({
|
|
195
195
|
sql,
|
|
196
196
|
result_mode: "rows",
|
|
@@ -201,7 +201,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
201
201
|
if (format === "csv") {
|
|
202
202
|
if (outPath) {
|
|
203
203
|
const exportedPath = writeCustomerDbCsv(result, outPath);
|
|
204
|
-
|
|
204
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
205
205
|
dbQueryExportEnvelope({
|
|
206
206
|
result,
|
|
207
207
|
format,
|
|
@@ -217,7 +217,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
217
217
|
);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
|
|
220
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
221
221
|
dbQueryExportEnvelope({
|
|
222
222
|
result,
|
|
223
223
|
format,
|
|
@@ -227,7 +227,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
227
227
|
}),
|
|
228
228
|
{
|
|
229
229
|
json: explicitJsonOutput,
|
|
230
|
-
text:
|
|
230
|
+
text: _chunkRTO5QZWTjs.dataExportCsvString.call(void 0,
|
|
231
231
|
customerDbRows(result),
|
|
232
232
|
customerDbColumnNames(result)
|
|
233
233
|
)
|
|
@@ -236,14 +236,14 @@ function renderDbQueryResult(result, query, options) {
|
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
238
|
if (format === "markdown") {
|
|
239
|
-
const content =
|
|
239
|
+
const content = _chunkRTO5QZWTjs.markdownTableFromRows.call(void 0,
|
|
240
240
|
customerDbRows(result),
|
|
241
241
|
customerDbColumnNames(result)
|
|
242
242
|
);
|
|
243
243
|
if (outPath) {
|
|
244
244
|
const exportedPath = _path.resolve.call(void 0, outPath);
|
|
245
245
|
_fs.writeFileSync.call(void 0, exportedPath, content, "utf-8");
|
|
246
|
-
|
|
246
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
247
247
|
dbQueryExportEnvelope({
|
|
248
248
|
result,
|
|
249
249
|
format,
|
|
@@ -259,7 +259,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
259
259
|
);
|
|
260
260
|
return;
|
|
261
261
|
}
|
|
262
|
-
|
|
262
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
263
263
|
dbQueryExportEnvelope({
|
|
264
264
|
result,
|
|
265
265
|
format,
|
|
@@ -274,7 +274,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
274
274
|
);
|
|
275
275
|
return;
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
278
278
|
{
|
|
279
279
|
...result,
|
|
280
280
|
next: {
|
|
@@ -348,9 +348,9 @@ async function runDbQueryCommand(options) {
|
|
|
348
348
|
...maxRows === void 0 ? {} : { maxRows },
|
|
349
349
|
...operationKey === void 0 ? {} : { operationKey }
|
|
350
350
|
};
|
|
351
|
-
const plan =
|
|
351
|
+
const plan = _chunkWQJJNIMQjs.planCustomerDbQuery.call(void 0, query);
|
|
352
352
|
if (options.dryRun) {
|
|
353
|
-
|
|
353
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
354
354
|
{
|
|
355
355
|
dryRun: true,
|
|
356
356
|
...plan,
|
|
@@ -363,11 +363,11 @@ async function runDbQueryCommand(options) {
|
|
|
363
363
|
...out === void 0 ? {} : { file: _path.resolve.call(void 0, out) }
|
|
364
364
|
}
|
|
365
365
|
},
|
|
366
|
-
{ json: options.json ||
|
|
366
|
+
{ json: options.json || _chunkRTO5QZWTjs.shouldEmitJson.call(void 0, ) }
|
|
367
367
|
);
|
|
368
368
|
return 0;
|
|
369
369
|
}
|
|
370
|
-
const client = new (0,
|
|
370
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
371
371
|
const result = await client.db.query(query);
|
|
372
372
|
renderDbQueryResult(result, query, {
|
|
373
373
|
format,
|
|
@@ -376,8 +376,8 @@ async function runDbQueryCommand(options) {
|
|
|
376
376
|
});
|
|
377
377
|
return 0;
|
|
378
378
|
} catch (error) {
|
|
379
|
-
if (error instanceof
|
|
380
|
-
|
|
379
|
+
if (error instanceof _chunkV7UP2F4Ujs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkRTO5QZWTjs.shouldEmitJson.call(void 0, ))) {
|
|
380
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
381
381
|
{
|
|
382
382
|
ok: false,
|
|
383
383
|
error: {
|
|
@@ -425,8 +425,8 @@ function dbRepairPlainText(result) {
|
|
|
425
425
|
async function handleDbRepair(args) {
|
|
426
426
|
const providerIndex = args.indexOf("--provider");
|
|
427
427
|
const provider = providerIndex >= 0 ? _optionalChain([args, 'access', _9 => _9[providerIndex + 1], 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]) : void 0;
|
|
428
|
-
const jsonOutput =
|
|
429
|
-
const client = new (0,
|
|
428
|
+
const jsonOutput = _chunkRTO5QZWTjs.argsWantJson.call(void 0, args);
|
|
429
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
430
430
|
let result;
|
|
431
431
|
try {
|
|
432
432
|
result = await client.repairIngestionStorage(
|
|
@@ -442,7 +442,7 @@ async function handleDbRepair(args) {
|
|
|
442
442
|
console.error(errorMessage2(error));
|
|
443
443
|
return 1;
|
|
444
444
|
}
|
|
445
|
-
|
|
445
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
446
446
|
{
|
|
447
447
|
command: "db repair",
|
|
448
448
|
status: result.status,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
DeeplineClient,
|
|
6
6
|
planCustomerDbQuery
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MR6XCBQJ.mjs";
|
|
8
8
|
import "./chunk-6IKARAYD.mjs";
|
|
9
9
|
import "./chunk-JI2B4RZP.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-EIMG75BT.mjs";
|
|
11
11
|
import "./chunk-UBKA33KY.mjs";
|
|
12
12
|
import {
|
|
13
13
|
argsWantJson,
|
|
@@ -18,15 +18,15 @@ import {
|
|
|
18
18
|
printCommandEnvelope,
|
|
19
19
|
recordRows,
|
|
20
20
|
shouldEmitJson
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XKZXO7D3.mjs";
|
|
22
22
|
import {
|
|
23
23
|
CustomerDbQueryOutcomeUnknownError
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VE3U3SQC.mjs";
|
|
25
25
|
import "./chunk-DLIRSHV6.mjs";
|
|
26
26
|
import {
|
|
27
27
|
DeeplineError
|
|
28
28
|
} from "./chunk-NXGCO4JB.mjs";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-NHB5YUCS.mjs";
|
|
30
30
|
import "./chunk-WZYKRD7T.mjs";
|
|
31
31
|
import "./chunk-KRD6H754.mjs";
|
|
32
32
|
|