deepline 0.3.525 → 0.3.526
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 +98 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +14 -5
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure-class.ts +98 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-inventory.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +39 -0
- package/dist/cli/{auth-TH3VGYBK.mjs → auth-JATW5XZE.mjs} +5 -5
- package/dist/cli/auth-L2POG3LL.js +43 -0
- package/dist/cli/{billing-TWKVUFU2.js → billing-TSHBJIJS.js} +82 -82
- package/dist/cli/{billing-CMHFI2LN.mjs → billing-UT5LIESH.mjs} +7 -7
- package/dist/cli/{chunk-ZWFTHEPT.mjs → chunk-26ULNPQ7.mjs} +2 -2
- package/dist/cli/{chunk-OWQF6WVH.mjs → chunk-2GJW4RAQ.mjs} +61 -1
- package/dist/cli/{chunk-CZNEQMJR.mjs → chunk-2JNX3MDG.mjs} +1 -1
- package/dist/cli/{chunk-QR7VYYNM.js → chunk-3MYI3IXW.js} +7 -7
- package/dist/cli/{chunk-5JFAQUZS.js → chunk-3ZEV5BS5.js} +26 -26
- package/dist/cli/{chunk-NB2ECLQE.js → chunk-46HEYGLY.js} +9 -9
- package/dist/cli/{chunk-CKTRQSRA.js → chunk-477PXM65.js} +22 -22
- package/dist/cli/{chunk-WGRDOPAK.mjs → chunk-6COGHW7B.mjs} +2 -2
- package/dist/cli/{chunk-ESWM2JW4.js → chunk-6DHEV6IA.js} +2 -2
- package/dist/cli/{chunk-TO72GW5I.js → chunk-6H56LKJB.js} +16 -16
- package/dist/cli/{chunk-NO4URKKT.mjs → chunk-6JMWATX5.mjs} +5 -5
- package/dist/cli/{chunk-5BSGWIQD.mjs → chunk-77RAGJIZ.mjs} +2 -2
- package/dist/cli/{chunk-LE537GBC.js → chunk-7COEN3IR.js} +138 -78
- package/dist/cli/{chunk-WEYFSBAD.mjs → chunk-7FCD34YS.mjs} +18 -11
- package/dist/cli/{chunk-4UWXFXQF.js → chunk-B33J4YCC.js} +3 -3
- package/dist/cli/{chunk-7OF3A4KJ.mjs → chunk-BFH3DJYV.mjs} +84 -57
- package/dist/cli/{chunk-EP6YH6QJ.mjs → chunk-BVITYMBK.mjs} +2 -2
- package/dist/cli/{chunk-DYS3KWYF.js → chunk-BYEF4RBX.js} +11 -11
- package/dist/cli/{chunk-UXF3ODJJ.mjs → chunk-C3EW6I65.mjs} +1 -1
- package/dist/cli/{chunk-LXKH4MKH.js → chunk-CDP3LMDT.js} +6 -6
- package/dist/cli/{chunk-KBOSALBI.js → chunk-CYN2AHR6.js} +6 -6
- package/dist/cli/{chunk-OXFIJYN3.mjs → chunk-D2XMFXFM.mjs} +6 -6
- package/dist/cli/{chunk-AVDEYOVP.js → chunk-D5OEUPPM.js} +98 -98
- package/dist/cli/{chunk-YC7FKAJ4.mjs → chunk-DY2AT3JQ.mjs} +10 -10
- package/dist/cli/{chunk-N4MMU3QF.js → chunk-ED2N4NRI.js} +16 -16
- package/dist/cli/{chunk-7C4F4TLR.mjs → chunk-EEYZLTXX.mjs} +1 -1
- package/dist/cli/{chunk-CQSANB3V.js → chunk-F5KFGF45.js} +5 -5
- package/dist/cli/{chunk-2WFVLOB7.js → chunk-FMPGWAIR.js} +1 -1
- package/dist/cli/{chunk-KPINGHIF.mjs → chunk-HPACLONQ.mjs} +2 -2
- package/dist/cli/{chunk-TXSBPBHB.mjs → chunk-IMP7WR22.mjs} +5 -5
- package/dist/cli/{chunk-RMZ6CISE.mjs → chunk-IWLDJQGV.mjs} +3 -3
- package/dist/cli/{chunk-P62LON53.js → chunk-J5OXJ4JI.js} +2 -2
- package/dist/cli/{chunk-UQYKSOGO.mjs → chunk-MQB25LMV.mjs} +5 -5
- package/dist/cli/{chunk-KEZ3KBWW.js → chunk-O7WUATQC.js} +97 -70
- package/dist/cli/{chunk-V2GN4PLK.js → chunk-RZJWHL7L.js} +5 -5
- package/dist/cli/{chunk-NRBCETWL.js → chunk-SCLRGDF4.js} +44 -44
- package/dist/cli/{chunk-V65J64FL.js → chunk-SJ6KUCGM.js} +53 -53
- package/dist/cli/{chunk-MHBSRNI7.js → chunk-TBQC2XS3.js} +41 -41
- package/dist/cli/{chunk-JVWSIA2V.mjs → chunk-TCLJXJAG.mjs} +4 -4
- package/dist/cli/{chunk-ETHVJ2ZE.mjs → chunk-TVHDWS5U.mjs} +1 -1
- package/dist/cli/{chunk-U4M32NFS.mjs → chunk-TXJW6RIM.mjs} +1 -1
- package/dist/cli/{chunk-LAMGJQDY.mjs → chunk-U6OUX47C.mjs} +2 -2
- package/dist/cli/{chunk-S5LUY3KJ.js → chunk-UTCGCES2.js} +7 -7
- package/dist/cli/{chunk-VYIAWAKJ.mjs → chunk-UUIC2JFZ.mjs} +1 -1
- package/dist/cli/{chunk-WA3FG7DH.js → chunk-UWCEBS7F.js} +14 -14
- package/dist/cli/{chunk-MRUFGOJR.js → chunk-WBY3R55B.js} +2 -2
- package/dist/cli/{chunk-TFEGJEYO.js → chunk-WITNIMLE.js} +3 -3
- package/dist/cli/{chunk-CWRL6IQP.js → chunk-WL6GAZBD.js} +18 -11
- package/dist/cli/{chunk-CLTL7ZJI.mjs → chunk-WOLY6SU4.mjs} +1 -1
- package/dist/cli/{chunk-GCLNX72G.mjs → chunk-XVIMOB2U.mjs} +2 -2
- package/dist/cli/{chunk-IMO3HXWZ.mjs → chunk-Y47OCS5V.mjs} +1 -1
- package/dist/cli/{chunk-M43ZYNDA.mjs → chunk-YNFPZVII.mjs} +5 -5
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-OO554TPX.mjs → csv-4BLFRED6.mjs} +4 -4
- package/dist/cli/{csv-5JHWVJ5N.js → csv-KSJB5Z3M.js} +13 -13
- package/dist/cli/{db-CYQJ4OXF.js → db-G7Z5CKO2.js} +27 -27
- package/dist/cli/{db-SQKJ6RKU.mjs → db-OVW6C3DV.mjs} +6 -6
- package/dist/cli/describe-KMYR2JBC.js +50 -0
- package/dist/cli/{describe-N7AKTUQV.mjs → describe-OEFTD7WQ.mjs} +18 -18
- package/dist/cli/{executions-F34DORW6.mjs → executions-7ZKQ4ZU3.mjs} +6 -6
- package/dist/cli/{executions-K7EGCRKX.js → executions-O7USCBCW.js} +8 -8
- package/dist/cli/{feedback-GQHKCS66.mjs → feedback-KUBL5E3I.mjs} +61 -13
- package/dist/cli/{feedback-NOQVCA3Q.js → feedback-Y55WCRIQ.js} +65 -17
- package/dist/cli/{git-2EEITXDB.mjs → git-C6ZAU5JA.mjs} +5 -5
- package/dist/cli/git-NBVQ3VGW.js +25 -0
- package/dist/cli/index.js +145 -145
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{legacy-noops-JHMY5XRB.mjs → legacy-noops-MUXD4HRC.mjs} +6 -6
- package/dist/cli/{legacy-noops-RFNHQ7RG.js → legacy-noops-OVWX4KB3.js} +9 -9
- package/dist/cli/{monitors-RDMP6SPZ.mjs → monitors-2ZSGBY52.mjs} +7 -7
- package/dist/cli/{monitors-UKRZ4BDK.js → monitors-3QVYGYWA.js} +100 -100
- package/dist/cli/{org-RF3G4KMB.mjs → org-RDSPE5FB.mjs} +6 -6
- package/dist/cli/{org-OX7TYTHV.js → org-S6Z3SDLI.js} +86 -86
- package/dist/cli/{pages-FBM3MGSP.mjs → pages-K5DSMHLJ.mjs} +6 -6
- package/dist/cli/{pages-MKQT5LFV.js → pages-VUWF2OR7.js} +18 -18
- package/dist/cli/{play-YWC2UORM.mjs → play-PZLXOYEX.mjs} +18 -18
- package/dist/cli/{play-OOVX2DMV.js → play-SQOJTUFC.js} +317 -317
- package/dist/cli/{providers-3PEQESIU.mjs → providers-AMIGP3D4.mjs} +6 -6
- package/dist/cli/{providers-2CGZYLER.js → providers-FZBEPUOI.js} +9 -9
- package/dist/cli/{quickstart-KVB36SOW.mjs → quickstart-HNOQKGOF.mjs} +4 -4
- package/dist/cli/{quickstart-6AANHKQZ.js → quickstart-QIHZDBGM.js} +6 -6
- package/dist/cli/{run-NJ7WV5TK.js → run-IQGM3TO2.js} +41 -41
- package/dist/cli/{run-QC23NRKO.mjs → run-JDW6BDNT.mjs} +23 -23
- package/dist/cli/search-BNWRL3YY.js +33 -0
- package/dist/cli/{search-7BMFFZI2.mjs → search-DMVUKJ23.mjs} +8 -8
- package/dist/cli/{search-output-CALZ4ZI2.mjs → search-output-5UAPUUHH.mjs} +4 -4
- package/dist/cli/{search-output-XC2AVBFX.js → search-output-UUW6UNHF.js} +6 -6
- package/dist/cli/{secrets-7ZHA57DI.mjs → secrets-46KSTPFN.mjs} +6 -6
- package/dist/cli/{secrets-VHU4B2D4.js → secrets-U532KN24.js} +15 -15
- package/dist/cli/sessions-JZUONXH4.js +22 -0
- package/dist/cli/sessions-RUNWYHYX.mjs +22 -0
- package/dist/cli/{settings-AVY4NNHI.mjs → settings-56L3WHCY.mjs} +13 -13
- package/dist/cli/{settings-WV77QJGD.js → settings-O2A37FFA.js} +86 -86
- package/dist/cli/{setup-GE5TLTC4.js → setup-ETFSMSCH.js} +50 -50
- package/dist/cli/{setup-AOUJ3RMU.mjs → setup-Q27X6JZY.mjs} +10 -10
- package/dist/cli/skills-IKDJ5JDN.js +37 -0
- package/dist/cli/{skills-FVWO2G66.mjs → skills-WFQRZL4D.mjs} +8 -8
- package/dist/cli/tools-B735AA67.js +57 -0
- package/dist/cli/{tools-URE655B4.mjs → tools-EV6CKJOX.mjs} +17 -17
- package/dist/cli/update-CNNURAM3.js +35 -0
- package/dist/cli/{update-5B4G4345.mjs → update-KIPPFVCH.mjs} +10 -10
- package/dist/cli/{views-IC762HEQ.js → views-DNZ2HFTA.js} +18 -18
- package/dist/cli/{views-GSECJ5IK.mjs → views-LMJXWD4N.mjs} +6 -6
- package/dist/cli/{workflow-6UQM565I.mjs → workflow-3XKUQ73U.mjs} +7 -7
- package/dist/cli/{workflow-EME7ZEOV.js → workflow-ZUDTIOK6.js} +17 -17
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +107 -106
- 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/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-K7PMRXNG.js +0 -43
- package/dist/cli/describe-PASXOL3R.js +0 -50
- package/dist/cli/git-UU4YFJ2Q.js +0 -25
- package/dist/cli/search-NH4DTXUK.js +0 -33
- package/dist/cli/sessions-2TE5JWVP.js +0 -18
- package/dist/cli/sessions-YYULWFZE.mjs +0 -18
- package/dist/cli/skills-OL7LD6QX.js +0 -37
- package/dist/cli/tools-VQ5JO6DI.js +0 -57
- package/dist/cli/update-7ZOIOTZN.js +0 -35
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-ZPGGW27Q.mjs";
|
|
18
18
|
import {
|
|
19
19
|
SDK_RELEASE
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EEYZLTXX.mjs";
|
|
21
21
|
|
|
22
22
|
// src/version.ts
|
|
23
23
|
var SDK_VERSION = SDK_RELEASE.version;
|
|
@@ -25,7 +25,9 @@ var SDK_API_MAJOR = SDK_RELEASE.contracts.api.currentMajor;
|
|
|
25
25
|
var SDK_API_CONTRACT = SDK_RELEASE.contracts.api.legacyWireIds[0] ?? `api-v${SDK_API_MAJOR}`;
|
|
26
26
|
|
|
27
27
|
// src/agent-runtime.ts
|
|
28
|
+
import { readdirSync, statSync } from "fs";
|
|
28
29
|
import { homedir } from "os";
|
|
30
|
+
import { basename, join } from "path";
|
|
29
31
|
var EXPLICIT_AGENT_RUNTIMES = /* @__PURE__ */ new Set([
|
|
30
32
|
"claude_code",
|
|
31
33
|
"claude_cowork",
|
|
@@ -65,6 +67,61 @@ function agentSessionIdFromEnvironment(env = process.env, agentRuntime) {
|
|
|
65
67
|
}
|
|
66
68
|
return null;
|
|
67
69
|
}
|
|
70
|
+
var SESSION_UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
71
|
+
function isAgentSessionId(value) {
|
|
72
|
+
return SESSION_UUID_RE.test(value);
|
|
73
|
+
}
|
|
74
|
+
function coworkSessionHome(env = process.env, cwd = process.cwd()) {
|
|
75
|
+
const home = env.HOME?.trim() || homedir();
|
|
76
|
+
const path = home === "/sessions" ? cwd : home;
|
|
77
|
+
return path.match(/^\/sessions\/(?!\.\.?(?:\/|$))[^/]+/)?.[0] ?? null;
|
|
78
|
+
}
|
|
79
|
+
function claudeProjectsRoots(env = process.env, cwd = process.cwd()) {
|
|
80
|
+
const roots = [];
|
|
81
|
+
const configDir = env.CLAUDE_CONFIG_DIR?.trim();
|
|
82
|
+
if (configDir) roots.push(join(configDir, "projects"));
|
|
83
|
+
const coworkHome = coworkSessionHome(env, cwd);
|
|
84
|
+
if (coworkHome) roots.push(coworkProjectsRoot(coworkHome));
|
|
85
|
+
roots.push(join(env.HOME?.trim() || homedir(), ".claude", "projects"));
|
|
86
|
+
return [...new Set(roots)];
|
|
87
|
+
}
|
|
88
|
+
function coworkProjectsRoot(coworkHome) {
|
|
89
|
+
return join(coworkHome, "mnt", ".claude", "projects");
|
|
90
|
+
}
|
|
91
|
+
function coworkTranscriptFromEnvironment(env = process.env, cwd = process.cwd()) {
|
|
92
|
+
const coworkHome = coworkSessionHome(env, cwd);
|
|
93
|
+
if (!coworkHome) return null;
|
|
94
|
+
const root = coworkProjectsRoot(coworkHome);
|
|
95
|
+
let newest = null;
|
|
96
|
+
for (const project of readDirectoryNames(root)) {
|
|
97
|
+
for (const fileName of readDirectoryNames(join(root, project))) {
|
|
98
|
+
const sessionId = basename(fileName, ".jsonl");
|
|
99
|
+
if (!fileName.endsWith(".jsonl") || !SESSION_UUID_RE.test(sessionId)) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
const filePath = join(root, project, fileName);
|
|
103
|
+
let mtimeMs;
|
|
104
|
+
try {
|
|
105
|
+
const stat = statSync(filePath);
|
|
106
|
+
if (!stat.isFile()) continue;
|
|
107
|
+
mtimeMs = stat.mtimeMs;
|
|
108
|
+
} catch {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (!newest || mtimeMs > newest.mtimeMs) {
|
|
112
|
+
newest = { sessionId, filePath, mtimeMs };
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return newest ? { sessionId: newest.sessionId, filePath: newest.filePath } : null;
|
|
117
|
+
}
|
|
118
|
+
function readDirectoryNames(dir) {
|
|
119
|
+
try {
|
|
120
|
+
return readdirSync(dir);
|
|
121
|
+
} catch {
|
|
122
|
+
return [];
|
|
123
|
+
}
|
|
124
|
+
}
|
|
68
125
|
function isCoworkLikeSandbox() {
|
|
69
126
|
const pluginMode = truthyEnv("DEEPLINE_PLUGIN_MODE");
|
|
70
127
|
const claudeRemote = truthyEnv("CLAUDE_CODE_REMOTE");
|
|
@@ -974,6 +1031,9 @@ export {
|
|
|
974
1031
|
RUNTIME_ENVIRONMENT_TOKEN_HEADER,
|
|
975
1032
|
RETAINED_PIPELINE_RECEIVERS_HEADER,
|
|
976
1033
|
agentSessionIdFromEnvironment,
|
|
1034
|
+
isAgentSessionId,
|
|
1035
|
+
claudeProjectsRoots,
|
|
1036
|
+
coworkTranscriptFromEnvironment,
|
|
977
1037
|
detectAgentRuntime,
|
|
978
1038
|
deploymentProtectionHeaders,
|
|
979
1039
|
fetchWithDeploymentProtection,
|
|
@@ -31,7 +31,7 @@ var _chunkPMH4GLMDjs = require('./chunk-PMH4GLMD.js');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunk7COEN3IRjs = require('./chunk-7COEN3IR.js');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
var _chunkT2N3B7IQjs = require('./chunk-T2N3B7IQ.js');
|
|
@@ -674,7 +674,7 @@ var ToolCalls = class {
|
|
|
674
674
|
idempotencyKey,
|
|
675
675
|
onResponse: (response2) => {
|
|
676
676
|
lastResponse = null;
|
|
677
|
-
atomicToolsSupported = response2.headers.get(
|
|
677
|
+
atomicToolsSupported = response2.headers.get(_chunk7COEN3IRjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
678
678
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
679
679
|
if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
|
|
680
680
|
try {
|
|
@@ -1060,8 +1060,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
const receivers = _optionalChain([env, 'access', _55 => _55.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]);
|
|
1062
1062
|
return {
|
|
1063
|
-
[
|
|
1064
|
-
...receivers ? { [
|
|
1063
|
+
[_chunk7COEN3IRjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1064
|
+
...receivers ? { [_chunk7COEN3IRjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1065
1065
|
};
|
|
1066
1066
|
}
|
|
1067
1067
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1132,7 +1132,7 @@ var PlayClient = class {
|
|
|
1132
1132
|
return _chunk2KHUFWTKjs.startPlayRun.call(void 0,
|
|
1133
1133
|
this.http,
|
|
1134
1134
|
resolved.request,
|
|
1135
|
-
_optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1135
|
+
_optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunk7COEN3IRjs.SDK_API_MAJOR) } : headers,
|
|
1136
1136
|
options
|
|
1137
1137
|
);
|
|
1138
1138
|
}
|
|
@@ -3229,7 +3229,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3229
3229
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3230
3230
|
);
|
|
3231
3231
|
}
|
|
3232
|
-
return { [
|
|
3232
|
+
return { [_chunk7COEN3IRjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3233
3233
|
}
|
|
3234
3234
|
function sleep(ms) {
|
|
3235
3235
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -4156,7 +4156,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4156
4156
|
);
|
|
4157
4157
|
const headers = _optionalChain([options, 'optionalAccess', _188 => _188.cliAdmission]) ? {
|
|
4158
4158
|
...runtimeHeaders,
|
|
4159
|
-
"X-Deepline-API-Major": String(
|
|
4159
|
+
"X-Deepline-API-Major": String(_chunk7COEN3IRjs.SDK_API_MAJOR)
|
|
4160
4160
|
} : runtimeHeaders;
|
|
4161
4161
|
const http = this.http;
|
|
4162
4162
|
let submitted = false;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkUTCGCES2js = require('./chunk-UTCGCES2.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkWITNIMLEjs = require('./chunk-WITNIMLE.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 } = _chunkUTCGCES2js.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
|
+
_chunkUTCGCES2js.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 } = _chunkUTCGCES2js.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
|
+
_chunkUTCGCES2js.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 } = _chunkUTCGCES2js.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
|
+
_chunkUTCGCES2js.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 } = _chunkUTCGCES2js.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 } = _chunkUTCGCES2js.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
|
+
_chunkUTCGCES2js.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 } = _chunkUTCGCES2js.getAuthedHttpClient.call(void 0, );
|
|
224
224
|
const payload = await http.get(
|
|
225
225
|
`/api/v2/play-projects/${encodeURIComponent(id)}`
|
|
226
226
|
);
|
|
227
|
-
|
|
227
|
+
_chunkUTCGCES2js.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 } = _chunkUTCGCES2js.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
|
+
_chunkUTCGCES2js.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 } = _chunkUTCGCES2js.getAuthedHttpClient.call(void 0, );
|
|
268
268
|
await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
|
|
269
|
-
|
|
269
|
+
_chunkUTCGCES2js.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 = _chunkWITNIMLEjs.resolveBaseUrlOnly.call(void 0, );
|
|
290
290
|
const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
|
|
291
|
-
const opened =
|
|
292
|
-
|
|
291
|
+
const opened = _chunkUTCGCES2js.openInBrowser.call(void 0, connectUrl);
|
|
292
|
+
_chunkUTCGCES2js.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 } = _chunkUTCGCES2js.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
|
+
_chunkUTCGCES2js.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 } = _chunkUTCGCES2js.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
|
+
_chunkUTCGCES2js.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 } = _chunkUTCGCES2js.getAuthedHttpClient.call(void 0, );
|
|
391
391
|
const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
|
|
392
|
-
|
|
392
|
+
_chunkUTCGCES2js.printCommandEnvelope.call(void 0,
|
|
393
393
|
{
|
|
394
394
|
cancelled: payload.cancelled,
|
|
395
395
|
deployment: payload.deployment,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk3MYI3IXWjs = require('./chunk-3MYI3IXW.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk2KHUFWTKjs = require('./chunk-2KHUFWTK.js');
|
|
@@ -11,7 +11,7 @@ var _chunk2KHUFWTKjs = require('./chunk-2KHUFWTK.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkUTCGCES2js = require('./chunk-UTCGCES2.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
|
|
@@ -581,7 +581,7 @@ function parseInputFlagValue(raw) {
|
|
|
581
581
|
return raw;
|
|
582
582
|
}
|
|
583
583
|
function parsePlayRunOptions(args, initialInput = null) {
|
|
584
|
-
const selection =
|
|
584
|
+
const selection = _chunkUTCGCES2js.parseJsonFields.call(void 0, args, "run");
|
|
585
585
|
args = selection.args;
|
|
586
586
|
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--json] [--full] [--<input> value]\n Runs use the Absurd CJS runtime.\n --header '<name>: <value>' may repeat; each is sent on every request for this run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and deepline.dataset guidance.";
|
|
587
587
|
let filePath = null;
|
|
@@ -593,7 +593,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
593
593
|
let revisionSelector = null;
|
|
594
594
|
const watch = !args.includes("--no-wait");
|
|
595
595
|
const dryRun = args.includes("--dry-run");
|
|
596
|
-
let jsonOutput = dryRun ?
|
|
596
|
+
let jsonOutput = dryRun ? _chunkUTCGCES2js.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkUTCGCES2js.argsWantJson.call(void 0, args);
|
|
597
597
|
const fullJson = args.includes("--full");
|
|
598
598
|
const force = args.includes("--force") || args.includes("--from-start");
|
|
599
599
|
const forceToolRefresh = args.includes("--force-tool-refresh") || args.includes("--refresh-cache");
|
|
@@ -656,7 +656,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
656
656
|
"--log-level requires one of: debug, info, warn, error."
|
|
657
657
|
);
|
|
658
658
|
}
|
|
659
|
-
const parsed =
|
|
659
|
+
const parsed = _chunk3MYI3IXWjs.parseLogLevel.call(void 0, value);
|
|
660
660
|
if (!parsed) {
|
|
661
661
|
throw new Error(
|
|
662
662
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -974,7 +974,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
974
974
|
const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
|
|
975
975
|
(arg) => arg === "--log-level" || arg.startsWith("--log-level=")
|
|
976
976
|
);
|
|
977
|
-
let logLevel = options.logLevel === void 0 ? base.logLevel :
|
|
977
|
+
let logLevel = options.logLevel === void 0 ? base.logLevel : _chunk3MYI3IXWjs.parseLogLevel.call(void 0, options.logLevel);
|
|
978
978
|
if (!logLevel)
|
|
979
979
|
throw new Error("--log-level requires one of: debug, info, warn, error.");
|
|
980
980
|
const debugAlias = options.logs || options.debug === true || inputArgs.some(
|
|
@@ -988,13 +988,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
988
988
|
if (debugAlias || debugMapLatency && logLevel === "info")
|
|
989
989
|
logLevel = "debug";
|
|
990
990
|
const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
|
|
991
|
-
const jsonFields = options.json === void 0 ? base.jsonFields :
|
|
992
|
-
[...fullJson ? ["--full"] : [], ...
|
|
991
|
+
const jsonFields = options.json === void 0 ? base.jsonFields : _chunkUTCGCES2js.parseJsonFields.call(void 0,
|
|
992
|
+
[...fullJson ? ["--full"] : [], ..._chunkUTCGCES2js.jsonFieldArgs.call(void 0, options.json)],
|
|
993
993
|
"run"
|
|
994
994
|
).fields;
|
|
995
995
|
const watch = options.wait === false ? false : base.watch;
|
|
996
996
|
const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
|
|
997
|
-
const jsonOutput = dryRun || !watch ? explicitJson ||
|
|
997
|
+
const jsonOutput = dryRun || !watch ? explicitJson || _chunkUTCGCES2js.argsWantJson.call(void 0, []) : explicitJson;
|
|
998
998
|
const verboseLogs = Boolean(
|
|
999
999
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
1000
1000
|
);
|
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk6H56LKJBjs = require('./chunk-6H56LKJB.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkSCLRGDF4js = require('./chunk-SCLRGDF4.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkUTCGCES2js = require('./chunk-UTCGCES2.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkWITNIMLEjs = require('./chunk-WITNIMLE.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunk7COEN3IRjs = require('./chunk-7COEN3IR.js');
|
|
22
22
|
|
|
23
23
|
// src/cli/compatibility-catalog.ts
|
|
24
24
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -45,7 +45,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
45
45
|
async function reportAutoUpdateEvent(input) {
|
|
46
46
|
let apiKey = "";
|
|
47
47
|
try {
|
|
48
|
-
apiKey =
|
|
48
|
+
apiKey = _chunkWITNIMLEjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
49
49
|
} catch (e2) {
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
@@ -61,15 +61,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
61
61
|
headers: {
|
|
62
62
|
Authorization: `Bearer ${apiKey}`,
|
|
63
63
|
"Content-Type": "application/json",
|
|
64
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
64
|
+
"User-Agent": `deepline-ts-sdk/${_chunk7COEN3IRjs.SDK_VERSION}`,
|
|
65
65
|
"X-Deepline-Client-Family": "sdk",
|
|
66
66
|
"X-Deepline-CLI-Family": "sdk",
|
|
67
|
-
"X-Deepline-CLI-Version":
|
|
68
|
-
"X-Deepline-SDK-Version":
|
|
67
|
+
"X-Deepline-CLI-Version": _chunk7COEN3IRjs.SDK_VERSION,
|
|
68
|
+
"X-Deepline-SDK-Version": _chunk7COEN3IRjs.SDK_VERSION
|
|
69
69
|
},
|
|
70
70
|
body: JSON.stringify({
|
|
71
71
|
event: input.event,
|
|
72
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
72
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunk7COEN3IRjs.SDK_VERSION,
|
|
73
73
|
target_version: input.response.latest,
|
|
74
74
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
75
75
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -88,13 +88,13 @@ function envTruthy(name) {
|
|
|
88
88
|
return value === "1" || value === "true" || value === "yes";
|
|
89
89
|
}
|
|
90
90
|
function shouldSkipSelfUpdate(policy) {
|
|
91
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
91
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunk6H56LKJBjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkSCLRGDF4js.isCiEnvironment.call(void 0, );
|
|
92
92
|
}
|
|
93
93
|
function isDowngradeAutoUpdateResponse(response) {
|
|
94
94
|
const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
|
|
95
|
-
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) ||
|
|
95
|
+
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunk7COEN3IRjs.SDK_VERSION;
|
|
96
96
|
if (!target) return false;
|
|
97
|
-
return
|
|
97
|
+
return _chunk6H56LKJBjs.compareUpdateVersions.call(void 0, target, current) < 0;
|
|
98
98
|
}
|
|
99
99
|
function relaunchCurrentCommand(plan, runtime = {}) {
|
|
100
100
|
return new Promise((resolve) => {
|
|
@@ -147,7 +147,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
147
147
|
}
|
|
148
148
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
149
149
|
const target = response.latest;
|
|
150
|
-
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ||
|
|
150
|
+
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunk7COEN3IRjs.SDK_VERSION;
|
|
151
151
|
process.stderr.write(
|
|
152
152
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
153
153
|
`
|
|
@@ -155,21 +155,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
155
155
|
return false;
|
|
156
156
|
}
|
|
157
157
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
158
|
-
const plan =
|
|
158
|
+
const plan = _chunk6H56LKJBjs.resolveUpdatePlan.call(void 0, {
|
|
159
159
|
packageSpec,
|
|
160
160
|
requireVerifiedNpmOwnership: true,
|
|
161
161
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
162
162
|
});
|
|
163
|
-
if (!
|
|
163
|
+
if (!_chunk6H56LKJBjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
164
164
|
return false;
|
|
165
165
|
}
|
|
166
166
|
if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
167
167
|
deferredAutoUpdate = async () => {
|
|
168
168
|
await applyAutoUpdate(response, baseUrl, plan, "next_command");
|
|
169
169
|
};
|
|
170
|
-
if (
|
|
170
|
+
if (_chunkUTCGCES2js.isJsonOutputMode.call(void 0, )) {
|
|
171
171
|
const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
|
|
172
|
-
|
|
172
|
+
_chunkUTCGCES2js.addJsonNotice.call(void 0, {
|
|
173
173
|
code: "sdk_update_queued",
|
|
174
174
|
message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
|
|
175
175
|
});
|
|
@@ -182,7 +182,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
182
182
|
return true;
|
|
183
183
|
}
|
|
184
184
|
async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
185
|
-
if (!
|
|
185
|
+
if (!_chunk6H56LKJBjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
|
|
186
186
|
const autoUpdate = response.auto_update;
|
|
187
187
|
const label = _optionalChain([autoUpdate, 'optionalAccess', _32 => _32.reason]) === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : _optionalChain([autoUpdate, 'optionalAccess', _33 => _33.reason]) === "deprecated" ? "is deprecated and will update automatically" : _optionalChain([autoUpdate, 'optionalAccess', _34 => _34.required]) ? "requires an update" : "has an update available and will update automatically";
|
|
188
188
|
process.stderr.write(
|
|
@@ -195,7 +195,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
195
195
|
event: "started",
|
|
196
196
|
installKind: plan.kind
|
|
197
197
|
});
|
|
198
|
-
const updateResult = await
|
|
198
|
+
const updateResult = await _chunk6H56LKJBjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
199
199
|
if (updateResult.status === "skipped_previous_failure") {
|
|
200
200
|
void reportAutoUpdateEvent({
|
|
201
201
|
baseUrl,
|
|
@@ -233,7 +233,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
233
233
|
exitCode: 0
|
|
234
234
|
});
|
|
235
235
|
try {
|
|
236
|
-
await
|
|
236
|
+
await _chunkSCLRGDF4js.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
237
237
|
mode: "detached",
|
|
238
238
|
update: _optionalChain([response, 'access', _36 => _36.skills, 'optionalAccess', _37 => _37.requires_cli_update]) ? void 0 : response.skills,
|
|
239
239
|
afterCliUpdate: {
|
|
@@ -260,7 +260,7 @@ var _crypto = require('crypto');
|
|
|
260
260
|
var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
|
|
261
261
|
var activeToolExecuteCommand = null;
|
|
262
262
|
function progressLine(line) {
|
|
263
|
-
if (!
|
|
263
|
+
if (!_chunkUTCGCES2js.isJsonOutputMode.call(void 0, )) console.error(line);
|
|
264
264
|
}
|
|
265
265
|
function beginToolExecuteCommand() {
|
|
266
266
|
if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoDetectBaseUrl,
|
|
3
3
|
resolveApiKeyForBaseUrl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TXJW6RIM.mjs";
|
|
5
5
|
import {
|
|
6
6
|
SDK_VERSION,
|
|
7
7
|
agentSessionIdFromEnvironment,
|
|
8
8
|
deploymentProtectionHeaders,
|
|
9
9
|
detectAgentRuntime
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2GJW4RAQ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
DeeplineError
|
|
13
13
|
} from "./chunk-ZPGGW27Q.mjs";
|
|
@@ -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; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSCLRGDF4js = require('./chunk-SCLRGDF4.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/npm-script-policy.ts
|
|
6
6
|
var _child_process = require('child_process');
|
|
@@ -13,7 +13,7 @@ function npmSupportsAllowScripts(version) {
|
|
|
13
13
|
}
|
|
14
14
|
function readNpmVersion(env) {
|
|
15
15
|
try {
|
|
16
|
-
const plan =
|
|
16
|
+
const plan = _chunkSCLRGDF4js.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
|
|
17
17
|
const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
|
|
18
18
|
encoding: "utf8",
|
|
19
19
|
env,
|