deepline 0.3.337 → 0.3.338
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/agent-runtime.ts +21 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +2 -2
- package/dist/cli/auth-LVTYDMEL.js +31 -0
- package/dist/cli/{auth-6EREYQBM.mjs → auth-MTF2TRBC.mjs} +4 -4
- package/dist/cli/{billing-VMXYQMW6.mjs → billing-HXXPKDYV.mjs} +4 -4
- package/dist/cli/{billing-HZBD5KW6.js → billing-OXEY6DAU.js} +71 -71
- package/dist/cli/{chunk-3OBY2AGM.js → chunk-5OHHWYOV.js} +45 -45
- package/dist/cli/{chunk-FY65AYHZ.mjs → chunk-6CEPAFCE.mjs} +4 -4
- package/dist/cli/{chunk-NC5ODEG7.js → chunk-7EQ3WFD2.js} +9 -9
- package/dist/cli/{chunk-HBM2UKEU.mjs → chunk-7WL23HDH.mjs} +1 -1
- package/dist/cli/{chunk-M7IN66XB.js → chunk-AHO5IXHM.js} +15 -15
- package/dist/cli/{chunk-6PGYQ6IG.js → chunk-BYIWZOSA.js} +6 -6
- package/dist/cli/{chunk-VXCRG4J7.mjs → chunk-CGVCELEC.mjs} +1 -1
- package/dist/cli/{chunk-HDI6GSRQ.js → chunk-CVSUI4Z2.js} +48 -48
- package/dist/cli/{chunk-GPN5QAN2.mjs → chunk-FBU4A2ZE.mjs} +2 -2
- package/dist/cli/{chunk-YSR4PFTZ.js → chunk-FOODYFMR.js} +1 -1
- package/dist/cli/{chunk-5WTJ73QU.js → chunk-FYR7GGUF.js} +225 -225
- package/dist/cli/{chunk-MHWEX6GA.js → chunk-HJEHCSFH.js} +8 -8
- package/dist/cli/{chunk-35JNW43E.mjs → chunk-ID5OGCLU.mjs} +3 -3
- package/dist/cli/{chunk-YQW2FPKQ.mjs → chunk-J47TX67H.mjs} +1 -1
- package/dist/cli/{chunk-4SRIWSEG.js → chunk-KLAWLBSP.js} +60 -60
- package/dist/cli/{chunk-QEBA4KXE.js → chunk-KRZDVQZH.js} +70 -28
- package/dist/cli/{chunk-5ERCVX2D.mjs → chunk-MIHJFRGP.mjs} +2 -2
- package/dist/cli/{chunk-2LHYWYHM.mjs → chunk-N3EOKUQV.mjs} +54 -12
- package/dist/cli/{chunk-TB6HY4BW.mjs → chunk-NHTICK5G.mjs} +2 -2
- package/dist/cli/{chunk-XFSDLHGS.js → chunk-NR5ILIKI.js} +2 -2
- package/dist/cli/{chunk-A75J52BM.js → chunk-NUJIZBLA.js} +89 -76
- package/dist/cli/{chunk-ZUB3LXOI.mjs → chunk-OTJMWSIK.mjs} +5 -5
- package/dist/cli/{chunk-7MRAPBWB.mjs → chunk-SSRGN56V.mjs} +1 -1
- package/dist/cli/{chunk-IYK6XS5X.mjs → chunk-UVGGJ2CV.mjs} +6 -6
- package/dist/cli/{chunk-NIXE5325.js → chunk-XWTEOTGL.js} +26 -26
- package/dist/cli/{chunk-NQ42LHHS.mjs → chunk-YMLGJ2B7.mjs} +14 -1
- package/dist/cli/{client-BLGAYJME.mjs → client-LXBODS53.mjs} +3 -3
- package/dist/cli/client-V4OIXTP6.js +20 -0
- package/dist/cli/{csv-43QTLWPN.mjs → csv-3346Z7MA.mjs} +3 -3
- package/dist/cli/{csv-6WIFI6WR.js → csv-5UMO4TMZ.js} +12 -12
- package/dist/cli/{db-NCERSUPL.mjs → db-HVAQDN7U.mjs} +4 -4
- package/dist/cli/{db-5XFKB76V.js → db-RBWIVEB3.js} +29 -29
- package/dist/cli/{describe-4DNSNQKM.js → describe-LAAOJYI2.js} +15 -15
- package/dist/cli/{describe-V4BPRUES.mjs → describe-OKSZOU3V.mjs} +8 -8
- package/dist/cli/{executions-GQ4C2FGI.js → executions-5WENZ6MO.js} +6 -6
- package/dist/cli/{executions-IGXMYAYA.mjs → executions-T56YNXAC.mjs} +4 -4
- package/dist/cli/{feedback-UVDBDHE4.mjs → feedback-RU4EKJYX.mjs} +8 -3
- package/dist/cli/{feedback-UFFCKVNH.js → feedback-YZILULGJ.js} +11 -6
- package/dist/cli/{git-XI6XRTIZ.mjs → git-LX7NYWDT.mjs} +4 -4
- package/dist/cli/git-XASJHFDR.js +23 -0
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-5Z3YLPCN.js → legacy-noops-K6W26TQA.js} +7 -7
- package/dist/cli/{legacy-noops-IUJOLPED.mjs → legacy-noops-SN44IUWD.mjs} +4 -4
- package/dist/cli/{monitors-KUS3ROXZ.mjs → monitors-BQ5SXRDD.mjs} +4 -4
- package/dist/cli/{monitors-TZAGTEID.js → monitors-R4D7X7PL.js} +85 -85
- package/dist/cli/{org-AHHROX6T.js → org-6GWQHHLF.js} +60 -60
- package/dist/cli/{org-SLIG47UE.mjs → org-RNR3CGVL.mjs} +4 -4
- package/dist/cli/play-2V2Y4P3P.js +153 -0
- package/dist/cli/{play-G4AQ2OZ5.mjs → play-CPG4HFXR.mjs} +7 -7
- package/dist/cli/{providers-PBFVQ2EP.js → providers-AP5NBYJF.js} +7 -7
- package/dist/cli/{providers-XQIQO6M3.mjs → providers-YEFPQW3K.mjs} +4 -4
- package/dist/cli/{quickstart-X6CLGXVG.js → quickstart-5D6WSPKU.js} +5 -5
- package/dist/cli/{quickstart-PCASXB6T.mjs → quickstart-IT43KYUN.mjs} +3 -3
- package/dist/cli/{search-ZTYQBKME.mjs → search-BVTZBNF3.mjs} +5 -5
- package/dist/cli/search-O66KVPGA.js +26 -0
- package/dist/cli/{secrets-IDF3FB7W.mjs → secrets-7HG77SLP.mjs} +4 -4
- package/dist/cli/{secrets-N3DWWVAY.js → secrets-L6Q2JJNX.js} +13 -13
- package/dist/cli/{sessions-ECDSBB7P.mjs → sessions-SSBDCVQN.mjs} +4 -4
- package/dist/cli/{sessions-SXXMNGUT.js → sessions-TNXYON2R.js} +5 -5
- package/dist/cli/{settings-IXHK6BAK.js → settings-4FKK3LUF.js} +74 -74
- package/dist/cli/{settings-FKARLN4C.mjs → settings-5L23COY7.mjs} +7 -7
- package/dist/cli/{setup-MJXYEE27.js → setup-EB5JLUFH.js} +41 -41
- package/dist/cli/{setup-LJG55UUU.mjs → setup-GXXWJFRV.mjs} +6 -6
- package/dist/cli/{skills-3IBFR2ZU.mjs → skills-ETEFVVPT.mjs} +4 -4
- package/dist/cli/skills-XFMWA4WX.js +28 -0
- package/dist/cli/tools-3TWNYKZY.js +40 -0
- package/dist/cli/{tools-ZJTHJHAD.mjs → tools-HDTU55RW.mjs} +6 -6
- package/dist/cli/update-AEBCM2LT.js +28 -0
- package/dist/cli/{update-ZN34FLDH.mjs → update-FR5QUV5I.mjs} +6 -6
- package/dist/cli/{workflow-LPCF7OMO.mjs → workflow-BE77YVLP.mjs} +5 -5
- package/dist/cli/{workflow-VLCSTKPW.js → workflow-OFWWX4ZP.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +74 -74
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-XS3LNSAH.js +0 -31
- package/dist/cli/client-ERDYIAWV.js +0 -20
- package/dist/cli/git-4ORFOHYQ.js +0 -23
- package/dist/cli/play-RRKTT3F2.js +0 -153
- package/dist/cli/search-QGFQSDJI.js +0 -26
- package/dist/cli/skills-RI3IZNWB.js +0 -28
- package/dist/cli/tools-NQJLSI4O.js +0 -40
- package/dist/cli/update-JY7TJJDL.js +0 -28
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkBYIWZOSAjs = require('./chunk-BYIWZOSA.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkNUJIZBLAjs = require('./chunk-NUJIZBLA.js');
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -32,11 +32,11 @@ function renderDeployment(deployment) {
|
|
|
32
32
|
return `${deployment.id} ${source} (${kind}) - ${deployment.status}${suffix}`;
|
|
33
33
|
}
|
|
34
34
|
async function handleList(options) {
|
|
35
|
-
const { http } =
|
|
35
|
+
const { http } = _chunkBYIWZOSAjs.getAuthedHttpClient.call(void 0, );
|
|
36
36
|
const payload = await http.get(
|
|
37
37
|
`/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
|
|
38
38
|
);
|
|
39
|
-
|
|
39
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
40
40
|
{
|
|
41
41
|
projects: payload.projects,
|
|
42
42
|
count: payload.projects.length,
|
|
@@ -73,7 +73,7 @@ function describeInstallationStatus(installation) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
async function handleStatus(options) {
|
|
76
|
-
const { http } =
|
|
76
|
+
const { http } = _chunkBYIWZOSAjs.getAuthedHttpClient.call(void 0, );
|
|
77
77
|
const payload = await http.get("/api/v2/github/installation");
|
|
78
78
|
const installation = payload.installation;
|
|
79
79
|
const others = (_nullishCoalesce(payload.installations, () => ( []))).filter(
|
|
@@ -136,7 +136,7 @@ async function handleStatus(options) {
|
|
|
136
136
|
)
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
140
140
|
{
|
|
141
141
|
installation,
|
|
142
142
|
installations: _nullishCoalesce(payload.installations, () => ( [])),
|
|
@@ -147,10 +147,10 @@ async function handleStatus(options) {
|
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
149
|
async function handleRepos(options) {
|
|
150
|
-
const { http } =
|
|
150
|
+
const { http } = _chunkBYIWZOSAjs.getAuthedHttpClient.call(void 0, );
|
|
151
151
|
const query = options.installation ? `?installationId=${encodeURIComponent(options.installation)}` : "";
|
|
152
152
|
const payload = await http.get(`/api/v2/github/repos${query}`);
|
|
153
|
-
|
|
153
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
154
154
|
{
|
|
155
155
|
installation: payload.installation,
|
|
156
156
|
repositories: payload.repositories,
|
|
@@ -171,7 +171,7 @@ async function handleRepos(options) {
|
|
|
171
171
|
}
|
|
172
172
|
async function resolveRepoId(repo, installation) {
|
|
173
173
|
if (/^\d+$/.test(repo)) return Number(repo);
|
|
174
|
-
const { http } =
|
|
174
|
+
const { http } = _chunkBYIWZOSAjs.getAuthedHttpClient.call(void 0, );
|
|
175
175
|
const query = installation ? `?installationId=${encodeURIComponent(installation)}` : "";
|
|
176
176
|
const payload = await http.get(
|
|
177
177
|
`/api/v2/github/repos${query}`
|
|
@@ -188,7 +188,7 @@ async function resolveRepoId(repo, installation) {
|
|
|
188
188
|
}
|
|
189
189
|
async function handleLink(repo, options) {
|
|
190
190
|
const repoId = await resolveRepoId(repo, options.installation);
|
|
191
|
-
const { http } =
|
|
191
|
+
const { http } = _chunkBYIWZOSAjs.getAuthedHttpClient.call(void 0, );
|
|
192
192
|
const payload = await http.post("/api/v2/play-projects", {
|
|
193
193
|
repoId,
|
|
194
194
|
...options.installation !== void 0 ? { installationId: options.installation } : {},
|
|
@@ -197,7 +197,7 @@ async function handleLink(repo, options) {
|
|
|
197
197
|
...options.branch !== void 0 ? { productionBranch: options.branch } : {},
|
|
198
198
|
...options.prChecks !== void 0 ? { checkOnPullRequest: options.prChecks } : {}
|
|
199
199
|
});
|
|
200
|
-
|
|
200
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
201
201
|
{
|
|
202
202
|
project: payload.project,
|
|
203
203
|
render: {
|
|
@@ -220,11 +220,11 @@ async function handleLink(repo, options) {
|
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
222
|
async function handleGet(id, options) {
|
|
223
|
-
const { http } =
|
|
223
|
+
const { http } = _chunkBYIWZOSAjs.getAuthedHttpClient.call(void 0, );
|
|
224
224
|
const payload = await http.get(
|
|
225
225
|
`/api/v2/play-projects/${encodeURIComponent(id)}`
|
|
226
226
|
);
|
|
227
|
-
|
|
227
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
228
228
|
{
|
|
229
229
|
project: payload.project,
|
|
230
230
|
render: {
|
|
@@ -240,7 +240,7 @@ async function handleGet(id, options) {
|
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
242
|
async function handleSet(id, options) {
|
|
243
|
-
const { http } =
|
|
243
|
+
const { http } = _chunkBYIWZOSAjs.getAuthedHttpClient.call(void 0, );
|
|
244
244
|
const payload = await http.patch(
|
|
245
245
|
`/api/v2/play-projects/${encodeURIComponent(id)}`,
|
|
246
246
|
{
|
|
@@ -251,7 +251,7 @@ async function handleSet(id, options) {
|
|
|
251
251
|
...options.disabled !== void 0 ? { disabled: options.disabled } : {}
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
|
-
|
|
254
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
255
255
|
{
|
|
256
256
|
project: payload.project,
|
|
257
257
|
render: {
|
|
@@ -264,9 +264,9 @@ async function handleSet(id, options) {
|
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
async function handleUnlink(id, options) {
|
|
267
|
-
const { http } =
|
|
267
|
+
const { http } = _chunkBYIWZOSAjs.getAuthedHttpClient.call(void 0, );
|
|
268
268
|
await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
|
|
269
|
-
|
|
269
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
270
270
|
{
|
|
271
271
|
ok: true,
|
|
272
272
|
id,
|
|
@@ -286,10 +286,10 @@ async function handleUnlink(id, options) {
|
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
288
|
async function handleConnect(options) {
|
|
289
|
-
const baseUrl =
|
|
289
|
+
const baseUrl = _chunkNUJIZBLAjs.resolveBaseUrlOnly.call(void 0, );
|
|
290
290
|
const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
|
|
291
|
-
const opened =
|
|
292
|
-
|
|
291
|
+
const opened = _chunkBYIWZOSAjs.openInBrowser.call(void 0, connectUrl);
|
|
292
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
293
293
|
{
|
|
294
294
|
connectUrl,
|
|
295
295
|
browser: opened,
|
|
@@ -311,7 +311,7 @@ async function handleConnect(options) {
|
|
|
311
311
|
);
|
|
312
312
|
}
|
|
313
313
|
async function handleDeploymentsList(options) {
|
|
314
|
-
const { http } =
|
|
314
|
+
const { http } = _chunkBYIWZOSAjs.getAuthedHttpClient.call(void 0, );
|
|
315
315
|
const query = new URLSearchParams();
|
|
316
316
|
if (options.repo) query.set("projectId", options.repo);
|
|
317
317
|
if (options.limit) query.set("limit", options.limit);
|
|
@@ -319,7 +319,7 @@ async function handleDeploymentsList(options) {
|
|
|
319
319
|
const payload = await http.get(
|
|
320
320
|
`/api/v2/deployments${suffix}`
|
|
321
321
|
);
|
|
322
|
-
|
|
322
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
323
323
|
{
|
|
324
324
|
deployments: payload.deployments,
|
|
325
325
|
count: payload.deployments.length,
|
|
@@ -363,12 +363,12 @@ function renderDeploymentMonitorLines(results) {
|
|
|
363
363
|
]);
|
|
364
364
|
}
|
|
365
365
|
async function handleDeploymentGet(id, options) {
|
|
366
|
-
const { http } =
|
|
366
|
+
const { http } = _chunkBYIWZOSAjs.getAuthedHttpClient.call(void 0, );
|
|
367
367
|
const payload = await http.get(`/api/v2/deployments/${encodeURIComponent(id)}`);
|
|
368
368
|
const playLines = renderDeploymentPlayLines(payload.deployment.results);
|
|
369
369
|
const monitorLines = renderDeploymentMonitorLines(payload.deployment.results);
|
|
370
370
|
const repository = _nullishCoalesce(_optionalChain([payload, 'access', _10 => _10.project, 'optionalAccess', _11 => _11.repoFullName]), () => ( payload.deployment.repoFullName));
|
|
371
|
-
|
|
371
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
372
372
|
{
|
|
373
373
|
deployment: payload.deployment,
|
|
374
374
|
project: payload.project,
|
|
@@ -387,9 +387,9 @@ async function handleDeploymentGet(id, options) {
|
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
389
|
async function handleDeploymentCancel(id, options) {
|
|
390
|
-
const { http } =
|
|
390
|
+
const { http } = _chunkBYIWZOSAjs.getAuthedHttpClient.call(void 0, );
|
|
391
391
|
const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
|
|
392
|
-
|
|
392
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
393
393
|
{
|
|
394
394
|
cancelled: payload.cancelled,
|
|
395
395
|
deployment: payload.deployment,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-DLIRSHV6.mjs";
|
|
5
5
|
import {
|
|
6
6
|
SDK_RELEASE
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CGVCELEC.mjs";
|
|
8
8
|
import {
|
|
9
9
|
DeeplineError,
|
|
10
10
|
TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
@@ -771,6 +771,18 @@ function normalizeAgentRuntime(value) {
|
|
|
771
771
|
if (explicit === "gemini_cli") return "gemini";
|
|
772
772
|
return EXPLICIT_AGENT_RUNTIMES.has(explicit) ? explicit : null;
|
|
773
773
|
}
|
|
774
|
+
var AGENT_SESSION_ID_VARIABLES = [
|
|
775
|
+
"CLAUDE_CODE_SESSION_ID",
|
|
776
|
+
"CODEX_SESSION_ID",
|
|
777
|
+
"CODEX_THREAD_ID"
|
|
778
|
+
];
|
|
779
|
+
function agentSessionIdFromEnvironment(env = process.env) {
|
|
780
|
+
for (const variable of AGENT_SESSION_ID_VARIABLES) {
|
|
781
|
+
const sessionId = env[variable]?.trim();
|
|
782
|
+
if (sessionId) return sessionId;
|
|
783
|
+
}
|
|
784
|
+
return null;
|
|
785
|
+
}
|
|
774
786
|
function isCoworkLikeSandbox2() {
|
|
775
787
|
const pluginMode = truthyEnv("DEEPLINE_PLUGIN_MODE");
|
|
776
788
|
const claudeRemote = truthyEnv("CLAUDE_CODE_REMOTE");
|
|
@@ -2007,6 +2019,7 @@ export {
|
|
|
2007
2019
|
SDK_VERSION,
|
|
2008
2020
|
SDK_API_MAJOR,
|
|
2009
2021
|
SDK_API_CONTRACT,
|
|
2022
|
+
agentSessionIdFromEnvironment,
|
|
2010
2023
|
detectAgentRuntime,
|
|
2011
2024
|
hasActivePluginSkills,
|
|
2012
2025
|
KNOWN_SKILL_AGENTS,
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
MONITOR_JOB_PHASES,
|
|
4
4
|
MONITOR_JOB_RECONCILIATION_STATES,
|
|
5
5
|
MONITOR_JOB_STATES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SSRGN56V.mjs";
|
|
7
7
|
import "./chunk-CBVIJSHF.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-YMLGJ2B7.mjs";
|
|
9
9
|
import "./chunk-DLIRSHV6.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-CGVCELEC.mjs";
|
|
11
11
|
import "./chunk-6IKARAYD.mjs";
|
|
12
12
|
import "./chunk-NXGCO4JB.mjs";
|
|
13
13
|
import "./chunk-WZYKRD7T.mjs";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk7EQ3WFD2js = require('./chunk-7EQ3WFD2.js');
|
|
7
|
+
require('./chunk-LA46MMTL.js');
|
|
8
|
+
require('./chunk-NUJIZBLA.js');
|
|
9
|
+
require('./chunk-XNYIZMNQ.js');
|
|
10
|
+
require('./chunk-FOODYFMR.js');
|
|
11
|
+
require('./chunk-S6R3OX7B.js');
|
|
12
|
+
require('./chunk-7P5AA3SN.js');
|
|
13
|
+
require('./chunk-OG64RBAC.js');
|
|
14
|
+
require('./chunk-COGTRVWW.js');
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.DeeplineClient = _chunk7EQ3WFD2js.DeeplineClient; exports.MONITOR_JOB_PHASES = _chunk7EQ3WFD2js.MONITOR_JOB_PHASES; exports.MONITOR_JOB_RECONCILIATION_STATES = _chunk7EQ3WFD2js.MONITOR_JOB_RECONCILIATION_STATES; exports.MONITOR_JOB_STATES = _chunk7EQ3WFD2js.MONITOR_JOB_STATES;
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
printCommandEnvelope,
|
|
5
5
|
printJson,
|
|
6
6
|
readCsvRows
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-J47TX67H.mjs";
|
|
8
|
+
import "./chunk-YMLGJ2B7.mjs";
|
|
9
9
|
import "./chunk-DLIRSHV6.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-CGVCELEC.mjs";
|
|
11
11
|
import "./chunk-NXGCO4JB.mjs";
|
|
12
12
|
import "./chunk-WZYKRD7T.mjs";
|
|
13
13
|
import "./chunk-KRD6H754.mjs";
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunkBYIWZOSAjs = require('./chunk-BYIWZOSA.js');
|
|
8
|
+
require('./chunk-NUJIZBLA.js');
|
|
9
9
|
require('./chunk-XNYIZMNQ.js');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-FOODYFMR.js');
|
|
11
11
|
require('./chunk-7P5AA3SN.js');
|
|
12
12
|
require('./chunk-OG64RBAC.js');
|
|
13
13
|
require('./chunk-COGTRVWW.js');
|
|
@@ -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 : _chunkBYIWZOSAjs.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 : _chunkBYIWZOSAjs.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 = _chunkBYIWZOSAjs.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
|
+
_chunkBYIWZOSAjs.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(_chunkBYIWZOSAjs.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
|
+
_chunkBYIWZOSAjs.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
|
+
${_chunkBYIWZOSAjs.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
|
+
_chunkBYIWZOSAjs.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
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
527
527
|
}
|
|
528
528
|
async function handleCsvRender(action, options) {
|
|
529
529
|
const normalized = _nullishCoalesce(action, () => ( "start"));
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
DeeplineClient,
|
|
6
6
|
planCustomerDbQuery
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SSRGN56V.mjs";
|
|
8
8
|
import "./chunk-CBVIJSHF.mjs";
|
|
9
9
|
import {
|
|
10
10
|
argsWantJson,
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
printCommandEnvelope,
|
|
16
16
|
recordRows,
|
|
17
17
|
shouldEmitJson
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-J47TX67H.mjs";
|
|
19
19
|
import {
|
|
20
20
|
CustomerDbQueryOutcomeUnknownError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YMLGJ2B7.mjs";
|
|
22
22
|
import "./chunk-DLIRSHV6.mjs";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-CGVCELEC.mjs";
|
|
24
24
|
import "./chunk-6IKARAYD.mjs";
|
|
25
25
|
import {
|
|
26
26
|
DeeplineError
|
|
@@ -4,7 +4,7 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk7EQ3WFD2js = require('./chunk-7EQ3WFD2.js');
|
|
8
8
|
require('./chunk-LA46MMTL.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -15,12 +15,12 @@ require('./chunk-LA46MMTL.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkBYIWZOSAjs = require('./chunk-BYIWZOSA.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkNUJIZBLAjs = require('./chunk-NUJIZBLA.js');
|
|
22
22
|
require('./chunk-XNYIZMNQ.js');
|
|
23
|
-
require('./chunk-
|
|
23
|
+
require('./chunk-FOODYFMR.js');
|
|
24
24
|
require('./chunk-S6R3OX7B.js');
|
|
25
25
|
|
|
26
26
|
|
|
@@ -47,8 +47,8 @@ function formatCell(value) {
|
|
|
47
47
|
return text.length > 80 ? `${text.slice(0, 77)}...` : text;
|
|
48
48
|
}
|
|
49
49
|
function tableLines(result) {
|
|
50
|
-
const rows =
|
|
51
|
-
const responseColumns =
|
|
50
|
+
const rows = _chunkBYIWZOSAjs.dataExportRows.call(void 0, customerDbRows(result));
|
|
51
|
+
const responseColumns = _chunkBYIWZOSAjs.dataExportColumns.call(void 0,
|
|
52
52
|
rows,
|
|
53
53
|
customerDbColumnNames(result)
|
|
54
54
|
);
|
|
@@ -94,7 +94,7 @@ function tableLines(result) {
|
|
|
94
94
|
return lines;
|
|
95
95
|
}
|
|
96
96
|
function customerDbRows(result) {
|
|
97
|
-
return
|
|
97
|
+
return _chunkBYIWZOSAjs.recordRows.call(void 0, result.rows);
|
|
98
98
|
}
|
|
99
99
|
function customerDbColumnNames(result) {
|
|
100
100
|
return result.columns.map((column) => column.name).filter(Boolean);
|
|
@@ -116,15 +116,15 @@ function collectErrorText(value) {
|
|
|
116
116
|
].filter(Boolean).join("\n");
|
|
117
117
|
}
|
|
118
118
|
function formatDbQueryError(sql, error) {
|
|
119
|
-
const text = error instanceof
|
|
119
|
+
const text = error instanceof _chunkNUJIZBLAjs.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
|
|
120
120
|
const lower = text.toLowerCase();
|
|
121
121
|
const referencesStorage = /"storage"\.|storage\./i.test(sql);
|
|
122
122
|
const runIdColumnMissing = /column\s+"?run_id"?\s+does not exist/i.test(text) || /run_id.*does not exist/i.test(lower);
|
|
123
123
|
const relationMissing = /relation\s+["']?[^"']*storage[^"']*["']?\s+does not exist/i.test(text) || /42p01/i.test(text);
|
|
124
124
|
if (referencesStorage && relationMissing) {
|
|
125
125
|
return [
|
|
126
|
-
...error instanceof
|
|
127
|
-
error instanceof
|
|
126
|
+
...error instanceof _chunkNUJIZBLAjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
127
|
+
error instanceof _chunkNUJIZBLAjs.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
|
|
128
128
|
"Play dataset tables are created only when the corresponding ctx.dataset(...).run(...) call executes. Pilot branches, early returns, and runs that fail before the dataset do not create that table.",
|
|
129
129
|
"Use `deepline runs get <run-id> --full --json` to inspect returned dataset handles, then export them with `deepline runs export <run-id> --dataset result.rows --out rows.csv`.",
|
|
130
130
|
`Original error: ${errorMessage(error)}`
|
|
@@ -132,7 +132,7 @@ function formatDbQueryError(sql, error) {
|
|
|
132
132
|
}
|
|
133
133
|
if (referencesStorage && runIdColumnMissing) {
|
|
134
134
|
return [
|
|
135
|
-
...error instanceof
|
|
135
|
+
...error instanceof _chunkNUJIZBLAjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
136
136
|
"Customer DB query failed: storage dataset tables use `_run_id`, not `run_id`.",
|
|
137
137
|
"Prefer `deepline runs export <run-id> --dataset result.rows --out rows.csv` unless you are doing deep table debugging.",
|
|
138
138
|
`Original error: ${errorMessage(error)}`
|
|
@@ -147,7 +147,7 @@ function writeCustomerDbCsv(result, outPath) {
|
|
|
147
147
|
const resolved = _path.resolve.call(void 0, outPath);
|
|
148
148
|
_fs.writeFileSync.call(void 0,
|
|
149
149
|
resolved,
|
|
150
|
-
|
|
150
|
+
_chunkBYIWZOSAjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
|
|
151
151
|
"utf-8"
|
|
152
152
|
);
|
|
153
153
|
return resolved;
|
|
@@ -188,7 +188,7 @@ function dbQueryExportEnvelope(input) {
|
|
|
188
188
|
function renderDbQueryResult(result, query, options) {
|
|
189
189
|
const { sql, maxRows, operationKey } = query;
|
|
190
190
|
const { format, out: outPath, json: explicitJsonOutput = false } = options;
|
|
191
|
-
const jsonOutput = explicitJsonOutput ||
|
|
191
|
+
const jsonOutput = explicitJsonOutput || _chunkBYIWZOSAjs.shouldEmitJson.call(void 0, );
|
|
192
192
|
const toolPayload = JSON.stringify({
|
|
193
193
|
sql,
|
|
194
194
|
result_mode: "rows",
|
|
@@ -199,7 +199,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
199
199
|
if (format === "csv") {
|
|
200
200
|
if (outPath) {
|
|
201
201
|
const exportedPath = writeCustomerDbCsv(result, outPath);
|
|
202
|
-
|
|
202
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
203
203
|
dbQueryExportEnvelope({
|
|
204
204
|
result,
|
|
205
205
|
format,
|
|
@@ -215,7 +215,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
215
215
|
);
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
|
-
|
|
218
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
219
219
|
dbQueryExportEnvelope({
|
|
220
220
|
result,
|
|
221
221
|
format,
|
|
@@ -225,7 +225,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
225
225
|
}),
|
|
226
226
|
{
|
|
227
227
|
json: explicitJsonOutput,
|
|
228
|
-
text:
|
|
228
|
+
text: _chunkBYIWZOSAjs.dataExportCsvString.call(void 0,
|
|
229
229
|
customerDbRows(result),
|
|
230
230
|
customerDbColumnNames(result)
|
|
231
231
|
)
|
|
@@ -234,14 +234,14 @@ function renderDbQueryResult(result, query, options) {
|
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
236
|
if (format === "markdown") {
|
|
237
|
-
const content =
|
|
237
|
+
const content = _chunkBYIWZOSAjs.markdownTableFromRows.call(void 0,
|
|
238
238
|
customerDbRows(result),
|
|
239
239
|
customerDbColumnNames(result)
|
|
240
240
|
);
|
|
241
241
|
if (outPath) {
|
|
242
242
|
const exportedPath = _path.resolve.call(void 0, outPath);
|
|
243
243
|
_fs.writeFileSync.call(void 0, exportedPath, content, "utf-8");
|
|
244
|
-
|
|
244
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
245
245
|
dbQueryExportEnvelope({
|
|
246
246
|
result,
|
|
247
247
|
format,
|
|
@@ -257,7 +257,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
257
257
|
);
|
|
258
258
|
return;
|
|
259
259
|
}
|
|
260
|
-
|
|
260
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
261
261
|
dbQueryExportEnvelope({
|
|
262
262
|
result,
|
|
263
263
|
format,
|
|
@@ -272,7 +272,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
272
272
|
);
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
|
-
|
|
275
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
276
276
|
{
|
|
277
277
|
...result,
|
|
278
278
|
next: {
|
|
@@ -346,9 +346,9 @@ async function runDbQueryCommand(options) {
|
|
|
346
346
|
...maxRows === void 0 ? {} : { maxRows },
|
|
347
347
|
...operationKey === void 0 ? {} : { operationKey }
|
|
348
348
|
};
|
|
349
|
-
const plan =
|
|
349
|
+
const plan = _chunk7EQ3WFD2js.planCustomerDbQuery.call(void 0, query);
|
|
350
350
|
if (options.dryRun) {
|
|
351
|
-
|
|
351
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
352
352
|
{
|
|
353
353
|
dryRun: true,
|
|
354
354
|
...plan,
|
|
@@ -361,11 +361,11 @@ async function runDbQueryCommand(options) {
|
|
|
361
361
|
...out === void 0 ? {} : { file: _path.resolve.call(void 0, out) }
|
|
362
362
|
}
|
|
363
363
|
},
|
|
364
|
-
{ json: options.json ||
|
|
364
|
+
{ json: options.json || _chunkBYIWZOSAjs.shouldEmitJson.call(void 0, ) }
|
|
365
365
|
);
|
|
366
366
|
return 0;
|
|
367
367
|
}
|
|
368
|
-
const client = new (0,
|
|
368
|
+
const client = new (0, _chunk7EQ3WFD2js.DeeplineClient)();
|
|
369
369
|
const result = await client.db.query(query);
|
|
370
370
|
renderDbQueryResult(result, query, {
|
|
371
371
|
format,
|
|
@@ -374,8 +374,8 @@ async function runDbQueryCommand(options) {
|
|
|
374
374
|
});
|
|
375
375
|
return 0;
|
|
376
376
|
} catch (error) {
|
|
377
|
-
if (error instanceof
|
|
378
|
-
|
|
377
|
+
if (error instanceof _chunkNUJIZBLAjs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkBYIWZOSAjs.shouldEmitJson.call(void 0, ))) {
|
|
378
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
379
379
|
{
|
|
380
380
|
ok: false,
|
|
381
381
|
error: {
|
|
@@ -423,8 +423,8 @@ function dbRepairPlainText(result) {
|
|
|
423
423
|
async function handleDbRepair(args) {
|
|
424
424
|
const providerIndex = args.indexOf("--provider");
|
|
425
425
|
const provider = providerIndex >= 0 ? _optionalChain([args, 'access', _9 => _9[providerIndex + 1], 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]) : void 0;
|
|
426
|
-
const jsonOutput =
|
|
427
|
-
const client = new (0,
|
|
426
|
+
const jsonOutput = _chunkBYIWZOSAjs.argsWantJson.call(void 0, args);
|
|
427
|
+
const client = new (0, _chunk7EQ3WFD2js.DeeplineClient)();
|
|
428
428
|
let result;
|
|
429
429
|
try {
|
|
430
430
|
result = await client.repairIngestionStorage(
|
|
@@ -440,7 +440,7 @@ async function handleDbRepair(args) {
|
|
|
440
440
|
console.error(errorMessage2(error));
|
|
441
441
|
return 1;
|
|
442
442
|
}
|
|
443
|
-
|
|
443
|
+
_chunkBYIWZOSAjs.printCommandEnvelope.call(void 0,
|
|
444
444
|
{
|
|
445
445
|
command: "db repair",
|
|
446
446
|
status: result.status,
|