deepline 0.3.581 → 0.3.583
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +4 -4
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +53 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +69 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +33 -4
- package/dist/cli/{agents-VDQSVDSM.mjs → agents-G344SPW2.mjs} +68 -4
- package/dist/cli/{agents-UDTRMWPA.js → agents-ZPDXVPEE.js} +95 -31
- package/dist/cli/{auth-SRN5FXUQ.mjs → auth-V66RP2A6.mjs} +5 -5
- package/dist/cli/auth-VU6VIPVY.js +44 -0
- package/dist/cli/{billing-PR2SIEJM.mjs → billing-BTMGZJCR.mjs} +9 -9
- package/dist/cli/{billing-HGHIOFSA.js → billing-ROYUQF67.js} +105 -105
- package/dist/cli/{chunk-7VOSQARZ.js → chunk-23LYXVI4.js} +6 -6
- package/dist/cli/{chunk-JQK42HZQ.js → chunk-2D5YISAL.js} +2 -2
- package/dist/cli/{chunk-RA3BWUTD.mjs → chunk-2QIVGZKS.mjs} +5 -5
- package/dist/cli/{chunk-WS5ZX4RB.mjs → chunk-43MKV6E4.mjs} +3 -3
- package/dist/cli/{chunk-5XVDZVCR.js → chunk-6GYGMWQV.js} +8 -8
- package/dist/cli/{chunk-KDITCSPN.mjs → chunk-6S3OAJCJ.mjs} +19 -0
- package/dist/cli/{chunk-EHTD65FE.mjs → chunk-72MEXMSH.mjs} +1 -1
- package/dist/cli/{chunk-CN4MXBZ3.js → chunk-73IZARR5.js} +13 -13
- package/dist/cli/{chunk-ULU4MEXN.mjs → chunk-7AFTLM74.mjs} +2 -2
- package/dist/cli/{chunk-VTPMBOHZ.mjs → chunk-ACS6BYE5.mjs} +2 -2
- package/dist/cli/{chunk-MSCYYFLY.js → chunk-AHQDUMDM.js} +20 -20
- package/dist/cli/{chunk-CDIMI54H.mjs → chunk-AXKFZIXC.mjs} +2 -2
- package/dist/cli/{chunk-2MIJMDGF.mjs → chunk-AXOQ2FMS.mjs} +1 -1
- package/dist/cli/{chunk-6U3THMRI.js → chunk-BUMCOVBP.js} +5 -5
- package/dist/cli/{chunk-ZTKLJADJ.mjs → chunk-C233ZRNX.mjs} +4 -4
- package/dist/cli/{chunk-INRXX4SX.js → chunk-C7UCDL2K.js} +41 -41
- package/dist/cli/{chunk-ZAKNDIK7.js → chunk-CCC3NIYB.js} +9 -9
- package/dist/cli/{chunk-N5VJVVVV.mjs → chunk-DNYFNOWG.mjs} +5 -5
- package/dist/cli/{chunk-VVENTTSA.mjs → chunk-EHV52KUV.mjs} +1 -1
- package/dist/cli/{chunk-WCNJSZHC.mjs → chunk-GFX6CDAB.mjs} +5 -5
- package/dist/cli/{chunk-J6ITN2X6.js → chunk-GQHZV7EQ.js} +7 -7
- package/dist/cli/{chunk-SNYH4QY2.js → chunk-H4BYWEV5.js} +4 -4
- package/dist/cli/{chunk-DZMQV5FL.mjs → chunk-H7F3ROT3.mjs} +2 -2
- package/dist/cli/{chunk-3FMGBMT3.mjs → chunk-HOGRT5X6.mjs} +1 -1
- package/dist/cli/{chunk-LJZESBNY.js → chunk-HYT5B2NL.js} +2 -2
- package/dist/cli/{chunk-INXRW5AF.mjs → chunk-J54DMFV5.mjs} +2 -2
- package/dist/cli/{chunk-OVJWDFIL.mjs → chunk-JQT3SHXL.mjs} +1 -1
- package/dist/cli/{chunk-46EBSUZF.mjs → chunk-K6GDSCFL.mjs} +3 -3
- package/dist/cli/{chunk-YTPXKG4C.mjs → chunk-KSXBLXLV.mjs} +1 -1
- package/dist/cli/{chunk-Y36SQMSN.js → chunk-LHD3HOYN.js} +19 -0
- package/dist/cli/{chunk-WVFDPC4K.mjs → chunk-LVJAHM2I.mjs} +3 -3
- package/dist/cli/{chunk-CNRPE3AE.js → chunk-MEAWK5G7.js} +53 -53
- package/dist/cli/{chunk-3LP7J63L.js → chunk-MFPHCUHK.js} +5 -5
- package/dist/cli/{chunk-ALXIC5U5.mjs → chunk-N5RCXI3M.mjs} +5 -5
- package/dist/cli/{chunk-E5ITZIWK.js → chunk-N5XRUZRS.js} +16 -16
- package/dist/cli/{chunk-BDNQDWGI.mjs → chunk-P2YNTAGL.mjs} +2 -2
- package/dist/cli/{chunk-E2EGQNOS.js → chunk-PGUK5VPC.js} +2 -2
- package/dist/cli/{chunk-VWPM4OIC.js → chunk-PULU5YGX.js} +20 -20
- package/dist/cli/{chunk-P5ZZY4RM.mjs → chunk-PVDP3AZY.mjs} +4 -4
- package/dist/cli/{chunk-PLGJG5FX.js → chunk-QGOHEJVJ.js} +5 -5
- package/dist/cli/{chunk-BQL34VOQ.js → chunk-QPN662ZP.js} +100 -100
- package/dist/cli/{chunk-KO6OLYSD.js → chunk-RO2LTLJA.js} +48 -48
- package/dist/cli/{chunk-VNW454PP.mjs → chunk-ROWROMXD.mjs} +1 -1
- package/dist/cli/{chunk-Z3MJX3PP.mjs → chunk-U6BTY4WS.mjs} +1 -1
- package/dist/cli/{chunk-FXSDDEAR.js → chunk-VH45GV3T.js} +1 -1
- package/dist/cli/{chunk-2RLMHWXW.js → chunk-VXDKL434.js} +3 -3
- package/dist/cli/{chunk-SZ76UE7C.mjs → chunk-VXEZKZU4.mjs} +11 -11
- package/dist/cli/{chunk-A4IOPFEJ.js → chunk-W3ECB7GC.js} +3 -3
- package/dist/cli/{chunk-E5O4CMHZ.mjs → chunk-W5WLWRKL.mjs} +2 -2
- package/dist/cli/{chunk-O5FIWG2O.js → chunk-WAZR72D5.js} +26 -26
- package/dist/cli/{chunk-VJR4CKYJ.js → chunk-WUVDJSZE.js} +23 -23
- package/dist/cli/{chunk-BULUFFST.js → chunk-YRNWA2IL.js} +15 -15
- package/dist/cli/{chunk-IT3F7P6O.js → chunk-ZFJNIZHI.js} +10 -10
- package/dist/cli/{chunk-3I6GA5QW.mjs → chunk-ZHIJA4MW.mjs} +1 -1
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-6WUNDV77.js +22 -0
- package/dist/cli/{concurrent-runs-help-Z27MIIH3.mjs → concurrent-runs-help-A2Y33OQ5.mjs} +6 -6
- package/dist/cli/{csv-4YFTMVWQ.mjs → csv-PS74WVXE.mjs} +4 -4
- package/dist/cli/{csv-4TP36F5O.js → csv-TKSR2LFV.js} +13 -13
- package/dist/cli/{db-U5KR6SYI.mjs → db-EXLBRZ7K.mjs} +6 -6
- package/dist/cli/{db-L5EGGO72.js → db-R6GOM4VC.js} +27 -27
- package/dist/cli/describe-CA2FL2OS.js +50 -0
- package/dist/cli/{describe-LZXXSQ26.mjs → describe-JJBXFPVQ.mjs} +18 -18
- package/dist/cli/{executions-VZKRFDGM.js → executions-474U7R3Y.js} +8 -8
- package/dist/cli/{executions-ZWEC5DDR.mjs → executions-5PEODJQG.mjs} +6 -6
- package/dist/cli/{feedback-HXQTHXEZ.mjs → feedback-QUQVRDBD.mjs} +6 -6
- package/dist/cli/{feedback-BTJIJCQF.js → feedback-URTCAOXP.js} +14 -14
- package/dist/cli/{git-P6A45MMT.mjs → git-AQF23KKU.mjs} +5 -5
- package/dist/cli/git-WJ4V2B4T.js +26 -0
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-4POM2CJ3.mjs → integrations-5POBI72U.mjs} +7 -7
- package/dist/cli/{integrations-VSJQBRFS.js → integrations-NMFOOSS4.js} +29 -29
- package/dist/cli/{legacy-noops-I65MIKH2.mjs → legacy-noops-6YVCOSFO.mjs} +6 -6
- package/dist/cli/{legacy-noops-QOJGSGVO.js → legacy-noops-V75T5LHV.js} +9 -9
- package/dist/cli/{mcp-TGY6SRAC.mjs → mcp-7WEYQ5V7.mjs} +4 -4
- package/dist/cli/{mcp-WTKBSLSD.js → mcp-N6GYXCUQ.js} +24 -24
- package/dist/cli/{monitors-TLWVEXW6.js → monitors-HW4H4PE5.js} +100 -100
- package/dist/cli/{monitors-E2ENT4RY.mjs → monitors-TAK4M5Y4.mjs} +7 -7
- package/dist/cli/{org-J2LGW5ZR.mjs → org-3C2RN36N.mjs} +6 -6
- package/dist/cli/{org-PZPJJU7K.js → org-FULXOXNE.js} +121 -121
- package/dist/cli/{outcomes-TMJDASU5.mjs → outcomes-4KRZL6OL.mjs} +6 -6
- package/dist/cli/{outcomes-Z6ZNBJ3U.js → outcomes-O3HDQWGN.js} +14 -14
- package/dist/cli/{play-ZOOC57X4.js → play-HA4RGX7T.js} +336 -336
- package/dist/cli/{play-S3Z24HUS.mjs → play-ZTRWUODW.mjs} +19 -19
- package/dist/cli/{providers-O4Y2YBS7.js → providers-DXMKWBZN.js} +9 -9
- package/dist/cli/{providers-ETD6YLFL.mjs → providers-FAKWWJE2.mjs} +6 -6
- package/dist/cli/{quickstart-NZALIRBP.js → quickstart-MA74UPNI.js} +6 -6
- package/dist/cli/{quickstart-QZX32Y5T.mjs → quickstart-YWGBTW77.mjs} +4 -4
- package/dist/cli/{run-5UXSWJ7N.js → run-4DXSGXRB.js} +44 -44
- package/dist/cli/{run-HCVBRE2P.mjs → run-QHCYMSBP.mjs} +23 -23
- package/dist/cli/{search-Z247K76U.mjs → search-N4ZOK5XX.mjs} +7 -7
- package/dist/cli/search-V765JH2H.js +32 -0
- package/dist/cli/{search-output-XFKEGUJA.js → search-output-D5VAC52B.js} +6 -6
- package/dist/cli/{search-output-XCJI3XRA.mjs → search-output-F2OYLVK2.mjs} +4 -4
- package/dist/cli/{secrets-VUQLTUTM.js → secrets-3KETOTDS.js} +15 -15
- package/dist/cli/{secrets-7JZXHLRU.mjs → secrets-LD4FVAQI.mjs} +6 -6
- package/dist/cli/{sessions-UNGJ342N.mjs → sessions-LPLI4Z4O.mjs} +6 -6
- package/dist/cli/sessions-XC65OMDS.js +23 -0
- package/dist/cli/{settings-67TIT4MZ.mjs → settings-NCGPJG3Z.mjs} +12 -12
- package/dist/cli/{settings-WG5YNHC5.js → settings-NFBTCOMB.js} +85 -85
- package/dist/cli/{setup-IYUNW5ZP.js → setup-ATBSUSH4.js} +49 -49
- package/dist/cli/{setup-KMAAJOZM.mjs → setup-NH6MRYXZ.mjs} +9 -9
- package/dist/cli/skills-4NQBTGOL.js +37 -0
- package/dist/cli/{skills-UVS4DODN.mjs → skills-ITPBPIXD.mjs} +7 -7
- package/dist/cli/{tools-B42JY4BX.mjs → tools-2XZPR65V.mjs} +17 -17
- package/dist/cli/tools-ZVOFATX2.js +57 -0
- package/dist/cli/update-QME3KPOP.js +37 -0
- package/dist/cli/{update-EBYZZ7BW.mjs → update-VFB22FWO.mjs} +9 -9
- package/dist/cli/{views-QK3AFD2D.mjs → views-MRN3HWTG.mjs} +6 -6
- package/dist/cli/{views-DOUEKLEV.js → views-WJUZOQM2.js} +21 -21
- package/dist/cli/{workflow-UBJPGRKF.mjs → workflow-A6P7YV5W.mjs} +42 -18
- package/dist/cli/{workflow-TAKT2T7A.js → workflow-Q4JFBTVH.js} +53 -29
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +116 -116
- 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-UYQHRHYR.js +0 -44
- package/dist/cli/concurrent-runs-help-QWDTLZUX.js +0 -22
- package/dist/cli/describe-G3SUS76P.js +0 -50
- package/dist/cli/git-QU673DBV.js +0 -26
- package/dist/cli/search-T3SLR55O.js +0 -32
- package/dist/cli/sessions-GHW2H7N2.js +0 -23
- package/dist/cli/skills-JVLCEUBF.js +0 -37
- package/dist/cli/tools-ETA3BJNM.js +0 -57
- package/dist/cli/update-XZEBQCEY.js +0 -37
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7AFTLM74.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
saveHostEnvValues,
|
|
23
23
|
saveProjectDeeplineEnvValues,
|
|
24
24
|
storedHostApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-U6BTY4WS.mjs";
|
|
26
26
|
import {
|
|
27
27
|
SDK_API_CONTRACT,
|
|
28
28
|
SDK_VERSION,
|
|
29
29
|
connectionFailureMessage,
|
|
30
30
|
detectAgentRuntime,
|
|
31
31
|
networkCauseCode
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AXOQ2FMS.mjs";
|
|
33
33
|
import {
|
|
34
34
|
DeeplineError
|
|
35
35
|
} from "./chunk-Z3A2S3QM.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkPULU5YGXjs = require('./chunk-PULU5YGX.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -22,14 +22,14 @@ var _chunkVWPM4OICjs = require('./chunk-VWPM4OIC.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkVXDKL434js = require('./chunk-VXDKL434.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkH4BYWEV5js = require('./chunk-H4BYWEV5.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
|
|
@@ -60,7 +60,7 @@ function statusBannerLine(value) {
|
|
|
60
60
|
return `Service notice: ${banner.message}`;
|
|
61
61
|
}
|
|
62
62
|
function envFilePath(baseUrl) {
|
|
63
|
-
return
|
|
63
|
+
return _chunkVXDKL434js.hostEnvFilePath.call(void 0, baseUrl);
|
|
64
64
|
}
|
|
65
65
|
function normalizeAuthScope(value) {
|
|
66
66
|
if (!value || value === "global") return "global";
|
|
@@ -73,7 +73,7 @@ function parseAuthScope(args) {
|
|
|
73
73
|
}
|
|
74
74
|
function pendingClaimPath(baseUrl, scope) {
|
|
75
75
|
if (scope === "folder") {
|
|
76
|
-
const target =
|
|
76
|
+
const target = _chunkVXDKL434js.resolveProjectPinTarget.call(void 0, );
|
|
77
77
|
if (!target.ok) {
|
|
78
78
|
throw new Error(
|
|
79
79
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -83,10 +83,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
83
83
|
}
|
|
84
84
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
85
85
|
}
|
|
86
|
-
return `${
|
|
86
|
+
return `${_chunkVXDKL434js.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
87
87
|
}
|
|
88
88
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
89
|
-
return `${
|
|
89
|
+
return `${_chunkVXDKL434js.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
90
90
|
}
|
|
91
91
|
function savePendingClaim(baseUrl, claim) {
|
|
92
92
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -191,21 +191,21 @@ function parseRegisterWaitMode(args) {
|
|
|
191
191
|
function shouldWaitForRegisterClaim(mode) {
|
|
192
192
|
if (mode === "yes") return true;
|
|
193
193
|
if (mode === "no") return false;
|
|
194
|
-
return
|
|
194
|
+
return _chunkH4BYWEV5js.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
195
195
|
}
|
|
196
196
|
function saveEnvValues(values, baseUrl, scope) {
|
|
197
197
|
const filtered = {
|
|
198
|
-
...values[
|
|
199
|
-
...values[
|
|
200
|
-
...values[
|
|
201
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
198
|
+
...values[_chunkVXDKL434js.HOST_URL_ENV] ? { [_chunkVXDKL434js.HOST_URL_ENV]: values[_chunkVXDKL434js.HOST_URL_ENV] } : {},
|
|
199
|
+
...values[_chunkVXDKL434js.API_KEY_ENV] ? { [_chunkVXDKL434js.API_KEY_ENV]: values[_chunkVXDKL434js.API_KEY_ENV] } : {},
|
|
200
|
+
...values[_chunkVXDKL434js.ACTIVE_ORG_ID_ENV] ? { [_chunkVXDKL434js.ACTIVE_ORG_ID_ENV]: values[_chunkVXDKL434js.ACTIVE_ORG_ID_ENV] } : {},
|
|
201
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkVXDKL434js.ACTIVE_ORG_NAME_ENV) ? { [_chunkVXDKL434js.ACTIVE_ORG_NAME_ENV]: values[_chunkVXDKL434js.ACTIVE_ORG_NAME_ENV] } : {},
|
|
202
202
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
203
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
203
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkVXDKL434js.FEATURES_ENV) ? { [_chunkVXDKL434js.FEATURES_ENV]: values[_chunkVXDKL434js.FEATURES_ENV] } : {}
|
|
204
204
|
};
|
|
205
205
|
if (scope === "folder") {
|
|
206
|
-
|
|
206
|
+
_chunkVXDKL434js.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
207
207
|
} else {
|
|
208
|
-
|
|
208
|
+
_chunkVXDKL434js.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
function activeOrgEnvValues(data) {
|
|
@@ -213,21 +213,21 @@ function activeOrgEnvValues(data) {
|
|
|
213
213
|
if (!orgId) return {};
|
|
214
214
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
215
215
|
return {
|
|
216
|
-
[
|
|
217
|
-
[
|
|
218
|
-
...
|
|
216
|
+
[_chunkVXDKL434js.ACTIVE_ORG_ID_ENV]: orgId,
|
|
217
|
+
[_chunkVXDKL434js.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
218
|
+
..._chunkVXDKL434js.featureEnvValues.call(void 0, data)
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
222
222
|
const headers = {
|
|
223
223
|
"Content-Type": "application/json",
|
|
224
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
224
|
+
"User-Agent": `deepline-ts-sdk/${_chunkH4BYWEV5js.SDK_VERSION}`,
|
|
225
225
|
"X-Deepline-Client-Family": "sdk",
|
|
226
226
|
"X-Deepline-CLI-Family": "sdk",
|
|
227
|
-
"X-Deepline-Agent-Runtime":
|
|
228
|
-
"X-Deepline-CLI-Version":
|
|
229
|
-
"X-Deepline-SDK-Version":
|
|
230
|
-
"X-Deepline-API-Contract":
|
|
227
|
+
"X-Deepline-Agent-Runtime": _chunkH4BYWEV5js.detectAgentRuntime.call(void 0, ),
|
|
228
|
+
"X-Deepline-CLI-Version": _chunkH4BYWEV5js.SDK_VERSION,
|
|
229
|
+
"X-Deepline-SDK-Version": _chunkH4BYWEV5js.SDK_VERSION,
|
|
230
|
+
"X-Deepline-API-Contract": _chunkH4BYWEV5js.SDK_API_CONTRACT
|
|
231
231
|
};
|
|
232
232
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
233
233
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -266,10 +266,10 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
266
266
|
if (failure.name === "AbortError" || failure.name === "TimeoutError") {
|
|
267
267
|
throw failure;
|
|
268
268
|
}
|
|
269
|
-
const causeCode =
|
|
269
|
+
const causeCode = _chunkH4BYWEV5js.networkCauseCode.call(void 0, failure);
|
|
270
270
|
throw Object.assign(
|
|
271
271
|
new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
272
|
-
|
|
272
|
+
_chunkH4BYWEV5js.connectionFailureMessage.call(void 0, new URL(url).origin, failure),
|
|
273
273
|
void 0,
|
|
274
274
|
"NETWORK_ERROR",
|
|
275
275
|
causeCode ? { causeCode } : void 0
|
|
@@ -286,7 +286,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
286
286
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
287
287
|
}
|
|
288
288
|
async function reportSetupCompleted(input) {
|
|
289
|
-
const apiKey = input.authScope === "folder" ?
|
|
289
|
+
const apiKey = input.authScope === "folder" ? _chunkVXDKL434js.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkVXDKL434js.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
290
290
|
if (!apiKey) return;
|
|
291
291
|
try {
|
|
292
292
|
await httpJson(
|
|
@@ -415,7 +415,7 @@ function endClaimPollOnRefusal(status, data, baseUrl, authScope) {
|
|
|
415
415
|
return EXIT_SERVER;
|
|
416
416
|
}
|
|
417
417
|
async function handleRegister(args, options) {
|
|
418
|
-
const baseUrl =
|
|
418
|
+
const baseUrl = _chunkVXDKL434js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
419
419
|
let orgName = "";
|
|
420
420
|
let orgId = "";
|
|
421
421
|
let agentName = "";
|
|
@@ -486,14 +486,14 @@ async function handleRegister(args, options) {
|
|
|
486
486
|
savePendingClaim(baseUrl, pendingClaim);
|
|
487
487
|
saveEnvValues(
|
|
488
488
|
{
|
|
489
|
-
[
|
|
489
|
+
[_chunkVXDKL434js.HOST_URL_ENV]: baseUrl
|
|
490
490
|
},
|
|
491
491
|
baseUrl,
|
|
492
492
|
authScope
|
|
493
493
|
);
|
|
494
494
|
}
|
|
495
495
|
if (claimUrl && !_optionalChain([options, 'optionalAccess', _16 => _16.delegatedApproval])) {
|
|
496
|
-
const shouldOpen = waitMode !== "no" &&
|
|
496
|
+
const shouldOpen = waitMode !== "no" && _chunkH4BYWEV5js.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
497
497
|
console.log(" Open this approval page in your browser:");
|
|
498
498
|
console.log(` ${claimUrl}`);
|
|
499
499
|
if (pendingClaim.device) {
|
|
@@ -501,7 +501,7 @@ async function handleRegister(args, options) {
|
|
|
501
501
|
` Click Approve if the page shows ${pendingClaim.device.userCode}.`
|
|
502
502
|
);
|
|
503
503
|
}
|
|
504
|
-
const opened = shouldOpen &&
|
|
504
|
+
const opened = shouldOpen && _chunkPULU5YGXjs.openInBrowser.call(void 0, claimUrl) === "opened";
|
|
505
505
|
if (claimToken && pendingClaim.approvalLinkReporting) {
|
|
506
506
|
await reportApprovalLinkShown(
|
|
507
507
|
baseUrl,
|
|
@@ -554,8 +554,8 @@ async function handleRegister(args, options) {
|
|
|
554
554
|
if (apiKey) {
|
|
555
555
|
saveEnvValues(
|
|
556
556
|
{
|
|
557
|
-
[
|
|
558
|
-
[
|
|
557
|
+
[_chunkVXDKL434js.HOST_URL_ENV]: baseUrl,
|
|
558
|
+
[_chunkVXDKL434js.API_KEY_ENV]: apiKey,
|
|
559
559
|
...activeOrgEnvValues(statusData)
|
|
560
560
|
},
|
|
561
561
|
baseUrl,
|
|
@@ -577,7 +577,7 @@ async function handleRegister(args, options) {
|
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
async function handleWait(args, options) {
|
|
580
|
-
const baseUrl =
|
|
580
|
+
const baseUrl = _chunkVXDKL434js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
581
581
|
let timeoutSeconds = 300;
|
|
582
582
|
let requestedScope;
|
|
583
583
|
if (args.includes("--auth-scope")) {
|
|
@@ -601,7 +601,7 @@ async function handleWait(args, options) {
|
|
|
601
601
|
const authScope = resumed.scope;
|
|
602
602
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _18 => _18.claimToken]), () => ( ""));
|
|
603
603
|
if (!pendingClaim) {
|
|
604
|
-
const scopedApiKey = authScope === "folder" ?
|
|
604
|
+
const scopedApiKey = authScope === "folder" ? _chunkVXDKL434js.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkVXDKL434js.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
605
605
|
if (scopedApiKey) {
|
|
606
606
|
if (!_optionalChain([options, 'optionalAccess', _19 => _19.quiet])) console.log("Already connected.");
|
|
607
607
|
return EXIT_OK;
|
|
@@ -664,8 +664,8 @@ async function handleWait(args, options) {
|
|
|
664
664
|
if (apiKey) {
|
|
665
665
|
saveEnvValues(
|
|
666
666
|
{
|
|
667
|
-
[
|
|
668
|
-
[
|
|
667
|
+
[_chunkVXDKL434js.HOST_URL_ENV]: baseUrl,
|
|
668
|
+
[_chunkVXDKL434js.API_KEY_ENV]: apiKey,
|
|
669
669
|
...activeOrgEnvValues(data)
|
|
670
670
|
},
|
|
671
671
|
baseUrl,
|
|
@@ -695,8 +695,8 @@ async function handleWait(args, options) {
|
|
|
695
695
|
return EXIT_AUTH;
|
|
696
696
|
}
|
|
697
697
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
698
|
-
const baseUrl =
|
|
699
|
-
const apiKey =
|
|
698
|
+
const baseUrl = _chunkVXDKL434js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
699
|
+
const apiKey = _chunkVXDKL434js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
700
700
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
701
701
|
try {
|
|
702
702
|
const { status, data } = await httpJson(
|
|
@@ -719,9 +719,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
721
|
async function handleStatus(args) {
|
|
722
|
-
const baseUrl =
|
|
722
|
+
const baseUrl = _chunkVXDKL434js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
723
723
|
const reveal = args.includes("--reveal");
|
|
724
|
-
const jsonOutput =
|
|
724
|
+
const jsonOutput = _chunkPULU5YGXjs.argsWantJson.call(void 0, args);
|
|
725
725
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
726
726
|
let authScope = null;
|
|
727
727
|
if (hasExplicitAuthScope) {
|
|
@@ -762,14 +762,14 @@ async function handleStatus(args) {
|
|
|
762
762
|
};
|
|
763
763
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
764
764
|
}
|
|
765
|
-
const apiKey = authScope === "folder" ?
|
|
765
|
+
const apiKey = authScope === "folder" ? _chunkVXDKL434js.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkVXDKL434js.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkVXDKL434js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
766
766
|
if (!apiKey) {
|
|
767
767
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
768
768
|
baseUrl,
|
|
769
769
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
770
770
|
);
|
|
771
771
|
if (pendingClaim) {
|
|
772
|
-
|
|
772
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
773
773
|
{
|
|
774
774
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
775
775
|
status: "pending",
|
|
@@ -799,7 +799,7 @@ async function handleStatus(args) {
|
|
|
799
799
|
);
|
|
800
800
|
return EXIT_OK;
|
|
801
801
|
}
|
|
802
|
-
|
|
802
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
803
803
|
{
|
|
804
804
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
805
805
|
status: "not connected",
|
|
@@ -832,7 +832,7 @@ async function handleStatus(args) {
|
|
|
832
832
|
}
|
|
833
833
|
);
|
|
834
834
|
if (status === 401 || status === 403) {
|
|
835
|
-
|
|
835
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
836
836
|
{
|
|
837
837
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
838
838
|
status: "unauthorized",
|
|
@@ -859,7 +859,7 @@ async function handleStatus(args) {
|
|
|
859
859
|
console.error(`Auth status error (status ${status}).`);
|
|
860
860
|
return EXIT_SERVER;
|
|
861
861
|
}
|
|
862
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
862
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkVXDKL434js.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
863
863
|
clearSatisfiedPendingClaim(
|
|
864
864
|
baseUrl,
|
|
865
865
|
resolvedAuthScope,
|
|
@@ -887,28 +887,28 @@ async function handleStatus(args) {
|
|
|
887
887
|
if (apiKeyResp) {
|
|
888
888
|
saveEnvValues(
|
|
889
889
|
{
|
|
890
|
-
[
|
|
891
|
-
[
|
|
890
|
+
[_chunkVXDKL434js.HOST_URL_ENV]: baseUrl,
|
|
891
|
+
[_chunkVXDKL434js.API_KEY_ENV]: apiKeyResp,
|
|
892
892
|
...activeOrgEnvValues(data)
|
|
893
893
|
},
|
|
894
894
|
baseUrl,
|
|
895
895
|
resolvedAuthScope
|
|
896
896
|
);
|
|
897
897
|
if (resolvedAuthScope === "folder") {
|
|
898
|
-
const target =
|
|
898
|
+
const target = _chunkVXDKL434js.resolveProjectPinTarget.call(void 0, );
|
|
899
899
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
900
900
|
} else {
|
|
901
901
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
905
|
-
saveEnvValues(
|
|
904
|
+
} else if (resolvedAuthScope === "folder" || _chunkVXDKL434js.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
905
|
+
saveEnvValues(_chunkVXDKL434js.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
906
906
|
}
|
|
907
|
-
|
|
907
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
908
908
|
{
|
|
909
909
|
...payload,
|
|
910
|
-
...
|
|
911
|
-
command_context:
|
|
910
|
+
..._chunkH4BYWEV5js.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
911
|
+
command_context: _chunkVXDKL434js.resolveCliCommandContext.call(void 0,
|
|
912
912
|
{ baseUrl, apiKey },
|
|
913
913
|
resolvedAuthScope
|
|
914
914
|
)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunk6GYGMWQVjs = require('./chunk-6GYGMWQV.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkVXDKL434js = require('./chunk-VXDKL434.js');
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
|
-
var DeeplineClient2 = class extends
|
|
10
|
+
var DeeplineClient2 = class extends _chunk6GYGMWQVjs.DeeplineClient {
|
|
11
11
|
constructor(options) {
|
|
12
|
-
const config =
|
|
13
|
-
super(config, new (0,
|
|
12
|
+
const config = _chunkVXDKL434js.resolveConfig.call(void 0, options);
|
|
13
|
+
super(config, new (0, _chunkVXDKL434js.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
seedToolListScript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VXEZKZU4.mjs";
|
|
4
4
|
import {
|
|
5
5
|
addDescribeOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JQT3SHXL.mjs";
|
|
7
7
|
import {
|
|
8
8
|
describeLookupsFor,
|
|
9
9
|
describeName,
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
} from "./chunk-SECFDB27.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeeplineClient
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-P2YNTAGL.mjs";
|
|
18
18
|
import {
|
|
19
19
|
failureReportHeaders,
|
|
20
20
|
isFailureReportingDisabled,
|
|
21
21
|
printCommandEnvelope
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7AFTLM74.mjs";
|
|
23
23
|
import {
|
|
24
24
|
autoDetectBaseUrl,
|
|
25
25
|
resolveApiKeyForBaseUrl,
|
|
26
26
|
resolveCliDashboardOrgId
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-U6BTY4WS.mjs";
|
|
28
28
|
|
|
29
29
|
// src/cli/commands/describe.ts
|
|
30
30
|
import { writeFileSync } from "fs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQPN662ZPjs = require('./chunk-QPN662ZP.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkGQHZV7EQjs = require('./chunk-GQHZV7EQ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -14,17 +14,17 @@ var _chunkS2YKIWCDjs = require('./chunk-S2YKIWCD.js');
|
|
|
14
14
|
var _chunkMOZDEYQCjs = require('./chunk-MOZDEYQC.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkMFPHCUHKjs = require('./chunk-MFPHCUHK.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkPULU5YGXjs = require('./chunk-PULU5YGX.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkVXDKL434js = require('./chunk-VXDKL434.js');
|
|
28
28
|
|
|
29
29
|
// src/cli/commands/describe.ts
|
|
30
30
|
var _fs = require('fs');
|
|
@@ -33,14 +33,14 @@ var _path = require('path');
|
|
|
33
33
|
// src/cli/doc-read-reporting.ts
|
|
34
34
|
var REPORT_TIMEOUT_MS = 1e3;
|
|
35
35
|
async function reportDocRead(docId) {
|
|
36
|
-
if (
|
|
36
|
+
if (_chunkPULU5YGXjs.isFailureReportingDisabled.call(void 0, )) return;
|
|
37
37
|
try {
|
|
38
|
-
const baseUrl =
|
|
39
|
-
const apiKey =
|
|
38
|
+
const baseUrl = _chunkVXDKL434js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
39
|
+
const apiKey = _chunkVXDKL434js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
40
40
|
if (!apiKey) return;
|
|
41
41
|
await fetch(new URL("/api/v2/telemetry/doc-read", baseUrl), {
|
|
42
42
|
method: "POST",
|
|
43
|
-
headers:
|
|
43
|
+
headers: _chunkPULU5YGXjs.failureReportHeaders.call(void 0, apiKey),
|
|
44
44
|
body: JSON.stringify({ doc_id: docId }),
|
|
45
45
|
signal: AbortSignal.timeout(REPORT_TIMEOUT_MS)
|
|
46
46
|
});
|
|
@@ -53,22 +53,22 @@ function nothingNamed(name) {
|
|
|
53
53
|
return `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`;
|
|
54
54
|
}
|
|
55
55
|
function findNamed2(name, options) {
|
|
56
|
-
return _chunkS2YKIWCDjs.findNamed.call(void 0, name, options, cliDescribeLookups(new (0,
|
|
56
|
+
return _chunkS2YKIWCDjs.findNamed.call(void 0, name, options, cliDescribeLookups(new (0, _chunkMFPHCUHKjs.DeeplineClient)()));
|
|
57
57
|
}
|
|
58
58
|
function cliDescribeLookups(client) {
|
|
59
59
|
return {
|
|
60
60
|
..._chunkS2YKIWCDjs.describeLookupsFor.call(void 0, client),
|
|
61
|
-
dashboardOrgId:
|
|
61
|
+
dashboardOrgId: _chunkVXDKL434js.resolveCliDashboardOrgId.call(void 0, client.baseUrl)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
async function describeAnything(name, options, onMissing) {
|
|
65
|
-
const client = new (0,
|
|
65
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
66
66
|
const lookups = cliDescribeLookups(client);
|
|
67
67
|
const outcome = await _chunkS2YKIWCDjs.describeName.call(void 0, name, options, {
|
|
68
68
|
...lookups,
|
|
69
69
|
// `tools describe` has already fetched the tool for its compatibility check.
|
|
70
70
|
tool: async (toolName) => _nullishCoalesce(options.fetchedTool, () => ( lookups.tool(toolName))),
|
|
71
|
-
seedStarterScript:
|
|
71
|
+
seedStarterScript: _chunkQPN662ZPjs.seedToolListScript
|
|
72
72
|
});
|
|
73
73
|
if (outcome.status === "missing") {
|
|
74
74
|
if (onMissing) return onMissing();
|
|
@@ -97,18 +97,18 @@ function deliver(envelope, lines, { json, out }) {
|
|
|
97
97
|
` : text;
|
|
98
98
|
_fs.writeFileSync.call(void 0, path, content);
|
|
99
99
|
const bytes = Buffer.byteLength(content);
|
|
100
|
-
|
|
100
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
101
101
|
{ path, bytes },
|
|
102
102
|
{ json, text: `Wrote ${path} (${bytes} bytes)
|
|
103
103
|
` }
|
|
104
104
|
);
|
|
105
105
|
return 0;
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, envelope, { json, text });
|
|
108
108
|
return 0;
|
|
109
109
|
}
|
|
110
110
|
function registerDescribeCommand(program) {
|
|
111
|
-
|
|
111
|
+
_chunkGQHZV7EQjs.addDescribeOptions.call(void 0, program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
|
|
112
112
|
"Describe anything search returns: a tool, monitor type, or play."
|
|
113
113
|
).addHelpText(
|
|
114
114
|
"after",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZHIJA4MW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-U6BTY4WS.mjs";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
10
|
var DeeplineClient2 = class extends DeeplineClient {
|
|
@@ -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(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkPULU5YGXjs = require('./chunk-PULU5YGX.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/maintenance-policy.ts
|
|
6
6
|
var _commander = require('commander');
|
|
@@ -33,7 +33,7 @@ function recordCliTrace(event) {
|
|
|
33
33
|
sinceStartMs: now - cliTraceStartedAt,
|
|
34
34
|
...event
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
_chunkPULU5YGXjs.writeRawStderr.call(void 0, `[cli-trace] ${JSON.stringify(payload)}
|
|
37
37
|
`);
|
|
38
38
|
}
|
|
39
39
|
async function traceCliSpan(phase, fields, run) {
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkVXDKL434js = require('./chunk-VXDKL434.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkH4BYWEV5js = require('./chunk-H4BYWEV5.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -331,7 +331,7 @@ function buildEnvironmentContext() {
|
|
|
331
331
|
node_version: process.version,
|
|
332
332
|
runtime: "Node.js",
|
|
333
333
|
hostname: _os.hostname.call(void 0, ),
|
|
334
|
-
agent_runtime:
|
|
334
|
+
agent_runtime: _chunkH4BYWEV5js.detectAgentRuntime.call(void 0, )
|
|
335
335
|
};
|
|
336
336
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
337
337
|
const normalized = _optionalChain([process, 'access', _6 => _6.env, 'access', _7 => _7[key], 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()]);
|
|
@@ -352,18 +352,18 @@ function buildEnvironmentContext() {
|
|
|
352
352
|
return context;
|
|
353
353
|
}
|
|
354
354
|
function failureReportHeaders(apiKey) {
|
|
355
|
-
const agentSessionId =
|
|
355
|
+
const agentSessionId = _chunkH4BYWEV5js.agentSessionIdFromEnvironment.call(void 0, );
|
|
356
356
|
return {
|
|
357
|
-
...
|
|
357
|
+
..._chunkH4BYWEV5js.deploymentProtectionHeaders.call(void 0, ),
|
|
358
358
|
...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
|
|
359
359
|
Authorization: `Bearer ${apiKey}`,
|
|
360
360
|
"Content-Type": "application/json",
|
|
361
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
361
|
+
"User-Agent": `deepline-ts-sdk/${_chunkH4BYWEV5js.SDK_VERSION}`,
|
|
362
362
|
"X-Deepline-Client-Family": "sdk",
|
|
363
363
|
"X-Deepline-CLI-Family": "sdk",
|
|
364
|
-
"X-Deepline-Agent-Runtime":
|
|
365
|
-
"X-Deepline-CLI-Version":
|
|
366
|
-
"X-Deepline-SDK-Version":
|
|
364
|
+
"X-Deepline-Agent-Runtime": _chunkH4BYWEV5js.detectAgentRuntime.call(void 0, ),
|
|
365
|
+
"X-Deepline-CLI-Version": _chunkH4BYWEV5js.SDK_VERSION,
|
|
366
|
+
"X-Deepline-SDK-Version": _chunkH4BYWEV5js.SDK_VERSION
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
369
|
async function postFailureReport(input) {
|
|
@@ -391,7 +391,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
391
391
|
if (isFailureReportingDisabled()) return false;
|
|
392
392
|
let apiKey = "";
|
|
393
393
|
try {
|
|
394
|
-
apiKey =
|
|
394
|
+
apiKey = _chunkVXDKL434js.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
395
395
|
} catch (e2) {
|
|
396
396
|
return false;
|
|
397
397
|
}
|
|
@@ -418,7 +418,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
418
418
|
failure_code: failureCode2,
|
|
419
419
|
failure_stage: failureStage,
|
|
420
420
|
error_body: "Automatic Deepline skills installation failed.",
|
|
421
|
-
cli_version:
|
|
421
|
+
cli_version: _chunkH4BYWEV5js.SDK_VERSION,
|
|
422
422
|
context: {
|
|
423
423
|
environment: buildEnvironmentContext(),
|
|
424
424
|
skills_sync: {
|
|
@@ -538,7 +538,7 @@ function buildFailureReport(input) {
|
|
|
538
538
|
failure_kind: failureKind,
|
|
539
539
|
failure_code: code,
|
|
540
540
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
541
|
-
cli_version:
|
|
541
|
+
cli_version: _chunkH4BYWEV5js.SDK_VERSION,
|
|
542
542
|
context: {
|
|
543
543
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
544
544
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -558,8 +558,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
558
558
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
559
559
|
const exitCode = resolvedExitCode(input);
|
|
560
560
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
561
|
-
const baseUrl =
|
|
562
|
-
const apiKey =
|
|
561
|
+
const baseUrl = _chunkVXDKL434js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
562
|
+
const apiKey = _chunkVXDKL434js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
563
563
|
if (!apiKey) return false;
|
|
564
564
|
return postFailureReport({
|
|
565
565
|
baseUrl,
|
|
@@ -914,8 +914,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
914
914
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
915
915
|
var defaultBrowserCommandRunner = childProcess;
|
|
916
916
|
function getAuthedHttpClient() {
|
|
917
|
-
const config =
|
|
918
|
-
return { config, http: new (0,
|
|
917
|
+
const config = _chunkVXDKL434js.resolveConfig.call(void 0, );
|
|
918
|
+
return { config, http: new (0, _chunkVXDKL434js.HttpClient)(config) };
|
|
919
919
|
}
|
|
920
920
|
function stableOsUserId() {
|
|
921
921
|
try {
|
|
@@ -1256,7 +1256,7 @@ function collectLocalEnvInfo() {
|
|
|
1256
1256
|
os: `${process.platform} ${process.arch}`,
|
|
1257
1257
|
node_version: process.version,
|
|
1258
1258
|
home_dir: homeDir,
|
|
1259
|
-
agent_runtime:
|
|
1259
|
+
agent_runtime: _chunkH4BYWEV5js.detectAgentRuntime.call(void 0, )
|
|
1260
1260
|
};
|
|
1261
1261
|
const env = process.env;
|
|
1262
1262
|
const optional = {
|
|
@@ -1503,9 +1503,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
function withAgentCommandContext(value) {
|
|
1505
1505
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
1506
|
-
return
|
|
1506
|
+
return _chunkH4BYWEV5js.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
1507
1507
|
...valueRecord,
|
|
1508
|
-
command_context:
|
|
1508
|
+
command_context: _chunkVXDKL434js.resolveCliCommandContext.call(void 0, )
|
|
1509
1509
|
} : value;
|
|
1510
1510
|
}
|
|
1511
1511
|
function printJson(value, fields, options = {}) {
|
|
@@ -1677,7 +1677,7 @@ function errorToJsonPayload(error) {
|
|
|
1677
1677
|
...upstreamResponse ? { upstreamResponse } : {},
|
|
1678
1678
|
...Object.keys(details).length > 0 ? { details } : {}
|
|
1679
1679
|
};
|
|
1680
|
-
const retry = cliRetryGuidance(payloadError,
|
|
1680
|
+
const retry = cliRetryGuidance(payloadError, _chunkH4BYWEV5js.readToolFailureHint.call(void 0, error));
|
|
1681
1681
|
return {
|
|
1682
1682
|
ok: false,
|
|
1683
1683
|
status: "failed",
|