deepline 0.3.351 → 0.3.353
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/gtm.ts +1 -1
- package/dist/bundling-sources/sdk/src/index.ts +1 -20
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +2 -14
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-input-contract.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/tool-categories.ts +19 -0
- package/dist/bundling-sources/shared_libs/plays/tool-category-descriptions.ts +1 -1
- package/dist/cli/{auth-NQLQ5QBV.mjs → auth-FVIZVTCB.mjs} +4 -4
- package/dist/cli/auth-GJZ3S4QH.js +31 -0
- package/dist/cli/{billing-AZCBAJ6Q.js → billing-NWL7KQPZ.js} +73 -73
- package/dist/cli/{billing-AXSNXOTN.mjs → billing-PYTYGWPG.mjs} +4 -4
- package/dist/cli/{chunk-73J3BGJ3.js → chunk-2UWRFDI4.js} +60 -60
- package/dist/cli/{chunk-BR3XFSXN.mjs → chunk-37F4EUJA.mjs} +161 -1848
- package/dist/cli/{chunk-QD7W3OBA.js → chunk-55XOA2VW.js} +8 -8
- package/dist/cli/{chunk-URBPUPJS.mjs → chunk-BVHUTDCW.mjs} +5 -5
- package/dist/cli/{chunk-J5NA2TTX.js → chunk-C374C22Y.js} +2 -2
- package/dist/cli/{chunk-QOYD2THS.mjs → chunk-CQQ5N4YO.mjs} +2 -2
- package/dist/cli/{chunk-OF4N5X7Z.mjs → chunk-CXMSK2VV.mjs} +2 -2
- package/dist/cli/{chunk-7BGGBA4V.mjs → chunk-D477W2OQ.mjs} +4 -4
- package/dist/cli/{chunk-CFALTV4O.mjs → chunk-DY253DRK.mjs} +2 -2
- package/dist/cli/{chunk-L7YXXM5W.js → chunk-EDEO7NG4.js} +1 -1
- package/dist/cli/{chunk-GVESPYSY.mjs → chunk-ERFN2QY4.mjs} +1 -102
- package/dist/cli/{chunk-LVEDPCLJ.js → chunk-GEJDBXXM.js} +1 -102
- package/dist/cli/{chunk-H5JUSKHB.mjs → chunk-GFLHAA2O.mjs} +1 -1
- package/dist/cli/{chunk-BOOZ7D7V.js → chunk-HU4SUDWU.js} +567 -2254
- package/dist/cli/{chunk-WOHBA5PV.js → chunk-IF75RD6U.js} +1 -1
- package/dist/cli/{chunk-IKC7EPDS.mjs → chunk-IVGFLYQ6.mjs} +1 -1
- package/dist/cli/{chunk-NUD2WO3E.js → chunk-JHPVZR6F.js} +4 -4
- package/dist/cli/{chunk-DBWASDYS.mjs → chunk-LLI4RITH.mjs} +27 -3
- package/dist/cli/{chunk-ICZTTYDS.js → chunk-M4UPRX3M.js} +40 -16
- package/dist/cli/{chunk-TAC3JIFE.mjs → chunk-MI6ZP7XI.mjs} +1 -1
- package/dist/cli/{chunk-BKOYPUK2.js → chunk-NFEQHNDQ.js} +26 -26
- package/dist/cli/{chunk-CIDP2FSO.js → chunk-NPU4SMKT.js} +9 -9
- package/dist/cli/{chunk-AQQFVUDI.mjs → chunk-NZNUDZDW.mjs} +2 -2
- package/dist/cli/{chunk-7ZAG2XG5.js → chunk-R2T4HQ64.js} +6 -6
- package/dist/cli/{chunk-HUZXWOSK.mjs → chunk-R4RG4FV5.mjs} +1 -1
- package/dist/cli/{chunk-XFTGWGZ5.mjs → chunk-RRDCBCRI.mjs} +1 -1
- package/dist/cli/{chunk-722274AA.mjs → chunk-U3FUXTIB.mjs} +1 -1
- package/dist/cli/{chunk-BWFUBETD.js → chunk-VALAAQQM.js} +48 -48
- package/dist/cli/{chunk-WY5N3SSC.js → chunk-XI5IMY45.js} +2 -2
- package/dist/cli/{chunk-SDLFAGQS.js → chunk-Z6LVVOOJ.js} +15 -15
- package/dist/cli/{chunk-JV6GFIQQ.js → chunk-ZCCXX55K.js} +45 -45
- package/dist/cli/{chunk-GT5HPOM3.mjs → chunk-ZDEO3EGW.mjs} +1 -1
- package/dist/cli/{client-NTEDBLQK.mjs → client-IH7I5D7T.mjs} +3 -3
- package/dist/cli/client-Z6BCEGFA.js +20 -0
- package/dist/cli/{csv-SSSPKSKU.mjs → csv-G5WXNCLQ.mjs} +3 -3
- package/dist/cli/{csv-6PZZ4ARC.js → csv-TJIWKUCX.js} +12 -12
- package/dist/cli/{db-3YL7YWTM.js → db-3DCS2JXS.js} +29 -29
- package/dist/cli/{db-XEVVDWOP.mjs → db-EBHV2MGE.mjs} +4 -4
- package/dist/cli/{describe-XZNQXFXD.js → describe-5XKBPWD7.js} +16 -16
- package/dist/cli/{describe-YZ365BKT.mjs → describe-QUOLGZKH.mjs} +9 -9
- package/dist/cli/{executions-ZAV7YCQC.mjs → executions-EERWIJ5I.mjs} +4 -4
- package/dist/cli/{executions-WBTIT2RU.js → executions-NYIOENKH.js} +6 -6
- package/dist/cli/{feedback-NOYG63QE.mjs → feedback-4RYJJCYL.mjs} +3 -3
- package/dist/cli/{feedback-PRVJ26X7.js → feedback-Z2I5MQYZ.js} +7 -7
- package/dist/cli/{git-AOSMM4US.mjs → git-EMU7AKX3.mjs} +4 -4
- package/dist/cli/git-QYQ5ZFIG.js +23 -0
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-RTNAEYVF.js → legacy-noops-BEUYYRSU.js} +7 -7
- package/dist/cli/{legacy-noops-T6DKTGZY.mjs → legacy-noops-HHLNM523.mjs} +4 -4
- package/dist/cli/{monitors-QIR3T2QR.mjs → monitors-BVJSHUV4.mjs} +7 -7
- package/dist/cli/{monitors-7ERJ4277.js → monitors-KQXLMPZ4.js} +96 -96
- package/dist/cli/{org-7P46IVVU.js → org-HRYNVOUH.js} +60 -60
- package/dist/cli/{org-WNRQQZNP.mjs → org-KSROOKSJ.mjs} +4 -4
- package/dist/cli/play-CRHUA45Q.js +153 -0
- package/dist/cli/{play-57XTHKER.mjs → play-PGFW6PFE.mjs} +8 -8
- package/dist/cli/{providers-USRX4UVZ.js → providers-BJM725CV.js} +7 -7
- package/dist/cli/{providers-ET6UBGWJ.mjs → providers-EUKJK6ZE.mjs} +4 -4
- package/dist/cli/{quickstart-OGZ7BZKS.mjs → quickstart-72JYHUJC.mjs} +3 -3
- package/dist/cli/{quickstart-BPPQFMWI.js → quickstart-FEERYTYY.js} +5 -5
- package/dist/cli/{search-MZARI5XA.mjs → search-LUAIOM56.mjs} +5 -5
- package/dist/cli/search-X25S2U54.js +26 -0
- package/dist/cli/{secrets-O6XG35SA.js → secrets-J65QCH57.js} +13 -13
- package/dist/cli/{secrets-WMUJ6PB4.mjs → secrets-YYFRYS2Z.mjs} +4 -4
- package/dist/cli/{sessions-LCHVGXMV.js → sessions-FWUUEK6V.js} +5 -5
- package/dist/cli/{sessions-EYALESPC.mjs → sessions-WBA67YYT.mjs} +4 -4
- package/dist/cli/{settings-25YT2IQK.js → settings-I7AZ4JVI.js} +74 -74
- package/dist/cli/{settings-LUGKMDDX.mjs → settings-RUMTSUE5.mjs} +7 -7
- package/dist/cli/{setup-KSRA3V42.mjs → setup-BHRRNT5C.mjs} +6 -6
- package/dist/cli/{setup-AKZWHNKU.js → setup-R3IUFNDP.js} +41 -41
- package/dist/cli/{skills-VJJIB4F5.mjs → skills-EKD5O7GQ.mjs} +4 -4
- package/dist/cli/skills-OOZ5SDVB.js +28 -0
- package/dist/cli/{tools-NYQD3VSU.mjs → tools-L5OA2343.mjs} +6 -6
- package/dist/cli/tools-MYH33NTL.js +40 -0
- package/dist/cli/update-EWNPE3NF.js +28 -0
- package/dist/cli/{update-GU4TALAI.mjs → update-UUHL6FER.mjs} +6 -6
- package/dist/cli/{workflow-TFOUWNEJ.js → workflow-7NBSG5OT.js} +15 -15
- package/dist/cli/{workflow-T4VNPJA4.mjs → workflow-V24VHOQT.mjs} +5 -5
- package/dist/{client-4DbE-U6e.d.ts → client-Chzd2LFo.d.ts} +1 -25
- package/dist/{client-DIJpwhl-.d.mts → client-jV6bQunU.d.mts} +1 -25
- package/dist/helpers.d.mts +1 -1
- package/dist/helpers.d.ts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +25 -39
- package/dist/index.mjs +23 -37
- package/dist/install-integrity.json +83 -83
- package/dist/monitor-fleet-contract.js +3 -3
- package/dist/monitor-fleet-contract.mjs +2 -2
- package/dist/monitor-input-contract.js +2 -2
- package/dist/monitor-input-contract.mjs +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/bundling-sources/shared_libs/plays/bootstrap-routes.ts +0 -127
- package/dist/cli/auth-YTDZKDCB.js +0 -31
- package/dist/cli/client-3GCQER5K.js +0 -20
- package/dist/cli/git-ZI4H72YR.js +0 -23
- package/dist/cli/play-QIX7RZ74.js +0 -153
- package/dist/cli/search-P447HWLU.js +0 -26
- package/dist/cli/skills-GYWMMOFQ.js +0 -28
- package/dist/cli/tools-HN6E2AH6.js +0 -40
- package/dist/cli/update-IIEKVC75.js +0 -28
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkR2T4HQ64js = require('./chunk-R2T4HQ64.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunk7ZAG2XG5js = require('./chunk-7ZAG2XG5.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkJHPVZR6Fjs = require('./chunk-JHPVZR6F.js');
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
|
|
@@ -52,7 +52,7 @@ function statusBannerLine(value) {
|
|
|
52
52
|
return `Service notice: ${banner.message}`;
|
|
53
53
|
}
|
|
54
54
|
function envFilePath(baseUrl) {
|
|
55
|
-
return
|
|
55
|
+
return _chunkJHPVZR6Fjs.hostEnvFilePath.call(void 0, baseUrl);
|
|
56
56
|
}
|
|
57
57
|
function normalizeAuthScope(value) {
|
|
58
58
|
if (!value || value === "global") return "global";
|
|
@@ -65,7 +65,7 @@ function parseAuthScope(args) {
|
|
|
65
65
|
}
|
|
66
66
|
function pendingClaimPath(baseUrl, scope) {
|
|
67
67
|
if (scope === "folder") {
|
|
68
|
-
const target =
|
|
68
|
+
const target = _chunkJHPVZR6Fjs.resolveProjectPinTarget.call(void 0, );
|
|
69
69
|
if (!target.ok) {
|
|
70
70
|
throw new Error(
|
|
71
71
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -75,10 +75,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
75
75
|
}
|
|
76
76
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
77
77
|
}
|
|
78
|
-
return `${
|
|
78
|
+
return `${_chunkJHPVZR6Fjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunkJHPVZR6Fjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
82
82
|
}
|
|
83
83
|
function savePendingClaim(baseUrl, claim) {
|
|
84
84
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -180,21 +180,21 @@ function parseRegisterWaitMode(args) {
|
|
|
180
180
|
function shouldWaitForRegisterClaim(mode) {
|
|
181
181
|
if (mode === "yes") return true;
|
|
182
182
|
if (mode === "no") return false;
|
|
183
|
-
return
|
|
183
|
+
return _chunkJHPVZR6Fjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
184
184
|
}
|
|
185
185
|
function saveEnvValues(values, baseUrl, scope) {
|
|
186
186
|
const filtered = {
|
|
187
|
-
...values[
|
|
188
|
-
...values[
|
|
189
|
-
...values[
|
|
190
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
187
|
+
...values[_chunkJHPVZR6Fjs.HOST_URL_ENV] ? { [_chunkJHPVZR6Fjs.HOST_URL_ENV]: values[_chunkJHPVZR6Fjs.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunkJHPVZR6Fjs.API_KEY_ENV] ? { [_chunkJHPVZR6Fjs.API_KEY_ENV]: values[_chunkJHPVZR6Fjs.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunkJHPVZR6Fjs.ACTIVE_ORG_ID_ENV] ? { [_chunkJHPVZR6Fjs.ACTIVE_ORG_ID_ENV]: values[_chunkJHPVZR6Fjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkJHPVZR6Fjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkJHPVZR6Fjs.ACTIVE_ORG_NAME_ENV]: values[_chunkJHPVZR6Fjs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
191
191
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
192
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
192
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkJHPVZR6Fjs.FEATURES_ENV) ? { [_chunkJHPVZR6Fjs.FEATURES_ENV]: values[_chunkJHPVZR6Fjs.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunkJHPVZR6Fjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunkJHPVZR6Fjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
function activeOrgEnvValues(data) {
|
|
@@ -202,21 +202,21 @@ function activeOrgEnvValues(data) {
|
|
|
202
202
|
if (!orgId) return {};
|
|
203
203
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
204
204
|
return {
|
|
205
|
-
[
|
|
206
|
-
[
|
|
207
|
-
...
|
|
205
|
+
[_chunkJHPVZR6Fjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunkJHPVZR6Fjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunkJHPVZR6Fjs.featureEnvValues.call(void 0, data)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
211
211
|
const headers = {
|
|
212
212
|
"Content-Type": "application/json",
|
|
213
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
213
|
+
"User-Agent": `deepline-ts-sdk/${_chunkJHPVZR6Fjs.SDK_VERSION}`,
|
|
214
214
|
"X-Deepline-Client-Family": "sdk",
|
|
215
215
|
"X-Deepline-CLI-Family": "sdk",
|
|
216
|
-
"X-Deepline-Agent-Runtime":
|
|
217
|
-
"X-Deepline-CLI-Version":
|
|
218
|
-
"X-Deepline-SDK-Version":
|
|
219
|
-
"X-Deepline-API-Contract":
|
|
216
|
+
"X-Deepline-Agent-Runtime": _chunkJHPVZR6Fjs.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunkJHPVZR6Fjs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunkJHPVZR6Fjs.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunkJHPVZR6Fjs.SDK_API_CONTRACT
|
|
220
220
|
};
|
|
221
221
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
222
222
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -254,7 +254,7 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
254
254
|
throw lastError instanceof Error ? lastError : new Error(String(lastError));
|
|
255
255
|
}
|
|
256
256
|
async function reportSetupCompleted(input) {
|
|
257
|
-
const apiKey = input.authScope === "folder" ?
|
|
257
|
+
const apiKey = input.authScope === "folder" ? _chunkJHPVZR6Fjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkJHPVZR6Fjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
258
258
|
if (!apiKey) return;
|
|
259
259
|
try {
|
|
260
260
|
await httpJson(
|
|
@@ -351,7 +351,7 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
async function handleRegister(args) {
|
|
354
|
-
const baseUrl =
|
|
354
|
+
const baseUrl = _chunkJHPVZR6Fjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
355
355
|
let orgName = "";
|
|
356
356
|
let orgId = "";
|
|
357
357
|
let agentName = "";
|
|
@@ -406,19 +406,19 @@ async function handleRegister(args) {
|
|
|
406
406
|
});
|
|
407
407
|
saveEnvValues(
|
|
408
408
|
{
|
|
409
|
-
[
|
|
409
|
+
[_chunkJHPVZR6Fjs.HOST_URL_ENV]: baseUrl
|
|
410
410
|
},
|
|
411
411
|
baseUrl,
|
|
412
412
|
authScope
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
415
|
if (claimUrl) {
|
|
416
|
-
const shouldOpen = waitMode !== "no" &&
|
|
416
|
+
const shouldOpen = waitMode !== "no" && _chunkJHPVZR6Fjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
417
417
|
console.log(
|
|
418
418
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
419
419
|
);
|
|
420
420
|
console.log(` ${claimUrl}`);
|
|
421
|
-
if (shouldOpen)
|
|
421
|
+
if (shouldOpen) _chunkR2T4HQ64js.openInBrowser.call(void 0, claimUrl);
|
|
422
422
|
}
|
|
423
423
|
if (data.cli_message) {
|
|
424
424
|
console.log(String(data.cli_message));
|
|
@@ -461,8 +461,8 @@ async function handleRegister(args) {
|
|
|
461
461
|
if (apiKey) {
|
|
462
462
|
saveEnvValues(
|
|
463
463
|
{
|
|
464
|
-
[
|
|
465
|
-
[
|
|
464
|
+
[_chunkJHPVZR6Fjs.HOST_URL_ENV]: baseUrl,
|
|
465
|
+
[_chunkJHPVZR6Fjs.API_KEY_ENV]: apiKey,
|
|
466
466
|
...activeOrgEnvValues(statusData)
|
|
467
467
|
},
|
|
468
468
|
baseUrl,
|
|
@@ -484,7 +484,7 @@ async function handleRegister(args) {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
async function handleWait(args) {
|
|
487
|
-
const baseUrl =
|
|
487
|
+
const baseUrl = _chunkJHPVZR6Fjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
488
488
|
let timeoutSeconds = 300;
|
|
489
489
|
let requestedScope;
|
|
490
490
|
if (args.includes("--auth-scope")) {
|
|
@@ -508,7 +508,7 @@ async function handleWait(args) {
|
|
|
508
508
|
const authScope = resumed.scope;
|
|
509
509
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _11 => _11.claimToken]), () => ( ""));
|
|
510
510
|
if (!pendingClaim) {
|
|
511
|
-
const scopedApiKey = authScope === "folder" ?
|
|
511
|
+
const scopedApiKey = authScope === "folder" ? _chunkJHPVZR6Fjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkJHPVZR6Fjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
512
512
|
if (scopedApiKey) {
|
|
513
513
|
console.log("Already connected.");
|
|
514
514
|
return EXIT_OK;
|
|
@@ -551,8 +551,8 @@ async function handleWait(args) {
|
|
|
551
551
|
if (apiKey) {
|
|
552
552
|
saveEnvValues(
|
|
553
553
|
{
|
|
554
|
-
[
|
|
555
|
-
[
|
|
554
|
+
[_chunkJHPVZR6Fjs.HOST_URL_ENV]: baseUrl,
|
|
555
|
+
[_chunkJHPVZR6Fjs.API_KEY_ENV]: apiKey,
|
|
556
556
|
...activeOrgEnvValues(data)
|
|
557
557
|
},
|
|
558
558
|
baseUrl,
|
|
@@ -576,9 +576,9 @@ async function handleWait(args) {
|
|
|
576
576
|
return EXIT_AUTH;
|
|
577
577
|
}
|
|
578
578
|
async function handleStatus(args) {
|
|
579
|
-
const baseUrl =
|
|
579
|
+
const baseUrl = _chunkJHPVZR6Fjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
580
580
|
const reveal = args.includes("--reveal");
|
|
581
|
-
const jsonOutput =
|
|
581
|
+
const jsonOutput = _chunkR2T4HQ64js.argsWantJson.call(void 0, args);
|
|
582
582
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
583
583
|
let authScope = null;
|
|
584
584
|
if (hasExplicitAuthScope) {
|
|
@@ -618,14 +618,14 @@ async function handleStatus(args) {
|
|
|
618
618
|
};
|
|
619
619
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
620
620
|
}
|
|
621
|
-
const apiKey = authScope === "folder" ?
|
|
621
|
+
const apiKey = authScope === "folder" ? _chunkJHPVZR6Fjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkJHPVZR6Fjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkJHPVZR6Fjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
622
622
|
if (!apiKey) {
|
|
623
623
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
624
624
|
baseUrl,
|
|
625
625
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
626
626
|
);
|
|
627
627
|
if (pendingClaim) {
|
|
628
|
-
|
|
628
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
629
629
|
{
|
|
630
630
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
631
631
|
status: "pending",
|
|
@@ -646,7 +646,7 @@ async function handleStatus(args) {
|
|
|
646
646
|
);
|
|
647
647
|
return EXIT_OK;
|
|
648
648
|
}
|
|
649
|
-
|
|
649
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
650
650
|
{
|
|
651
651
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
652
652
|
status: "not connected",
|
|
@@ -679,7 +679,7 @@ async function handleStatus(args) {
|
|
|
679
679
|
}
|
|
680
680
|
);
|
|
681
681
|
if (status === 401 || status === 403) {
|
|
682
|
-
|
|
682
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
683
683
|
{
|
|
684
684
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
685
685
|
status: "unauthorized",
|
|
@@ -706,7 +706,7 @@ async function handleStatus(args) {
|
|
|
706
706
|
console.error(`Auth status error (status ${status}).`);
|
|
707
707
|
return EXIT_SERVER;
|
|
708
708
|
}
|
|
709
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
709
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkJHPVZR6Fjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
710
710
|
clearSatisfiedPendingClaim(
|
|
711
711
|
baseUrl,
|
|
712
712
|
resolvedAuthScope,
|
|
@@ -734,28 +734,28 @@ async function handleStatus(args) {
|
|
|
734
734
|
if (apiKeyResp) {
|
|
735
735
|
saveEnvValues(
|
|
736
736
|
{
|
|
737
|
-
[
|
|
738
|
-
[
|
|
737
|
+
[_chunkJHPVZR6Fjs.HOST_URL_ENV]: baseUrl,
|
|
738
|
+
[_chunkJHPVZR6Fjs.API_KEY_ENV]: apiKeyResp,
|
|
739
739
|
...activeOrgEnvValues(data)
|
|
740
740
|
},
|
|
741
741
|
baseUrl,
|
|
742
742
|
resolvedAuthScope
|
|
743
743
|
);
|
|
744
744
|
if (resolvedAuthScope === "folder") {
|
|
745
|
-
const target =
|
|
745
|
+
const target = _chunkJHPVZR6Fjs.resolveProjectPinTarget.call(void 0, );
|
|
746
746
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
747
747
|
} else {
|
|
748
748
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
752
|
-
saveEnvValues(
|
|
751
|
+
} else if (resolvedAuthScope === "folder" || _chunkJHPVZR6Fjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
752
|
+
saveEnvValues(_chunkJHPVZR6Fjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
753
753
|
}
|
|
754
|
-
|
|
754
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
755
755
|
{
|
|
756
756
|
...payload,
|
|
757
|
-
...
|
|
758
|
-
command_context:
|
|
757
|
+
..._chunkJHPVZR6Fjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
758
|
+
command_context: _chunkJHPVZR6Fjs.resolveCliCommandContext.call(void 0,
|
|
759
759
|
{ baseUrl, apiKey },
|
|
760
760
|
resolvedAuthScope
|
|
761
761
|
)
|
|
@@ -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 _chunk2UWRFDI4js = require('./chunk-2UWRFDI4.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 = _chunk2UWRFDI4js.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,
|
|
@@ -1,17 +1,17 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkXI5IMY45js = require('./chunk-XI5IMY45.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk2UWRFDI4js = require('./chunk-2UWRFDI4.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkR2T4HQ64js = require('./chunk-R2T4HQ64.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkJHPVZR6Fjs = require('./chunk-JHPVZR6F.js');
|
|
15
15
|
|
|
16
16
|
// src/cli/commands/update.ts
|
|
17
17
|
var _child_process = require('child_process');
|
|
@@ -489,7 +489,7 @@ function normalizedNpmPrefix(value) {
|
|
|
489
489
|
}
|
|
490
490
|
function resolveNpmGlobalPrefix(env) {
|
|
491
491
|
try {
|
|
492
|
-
const plan =
|
|
492
|
+
const plan = _chunk2UWRFDI4js.resolveShellSpawn.call(void 0, "npm", ["prefix", "-g"], process.platform, env);
|
|
493
493
|
const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
|
|
494
494
|
encoding: "utf8",
|
|
495
495
|
env,
|
|
@@ -545,8 +545,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
545
545
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
546
546
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
547
547
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
548
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
549
|
-
const npmGlobalInstallFlags =
|
|
548
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkXI5IMY45js.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
549
|
+
const npmGlobalInstallFlags = _chunkXI5IMY45js.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
550
550
|
const args = installPrefix ? [
|
|
551
551
|
"install",
|
|
552
552
|
"-g",
|
|
@@ -556,7 +556,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
556
556
|
packageSpec
|
|
557
557
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
558
558
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
559
|
-
_optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) ||
|
|
559
|
+
_optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) || _chunkJHPVZR6Fjs.autoDetectBaseUrl.call(void 0, )
|
|
560
560
|
);
|
|
561
561
|
return {
|
|
562
562
|
kind: "npm-global",
|
|
@@ -703,7 +703,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
703
703
|
function runCommand(command, args, env = process.env) {
|
|
704
704
|
return new Promise((resolveResult) => {
|
|
705
705
|
let output = "";
|
|
706
|
-
const plan =
|
|
706
|
+
const plan = _chunk2UWRFDI4js.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
707
707
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
708
708
|
stdio: ["inherit", "pipe", "pipe"],
|
|
709
709
|
shell: plan.shell,
|
|
@@ -1079,14 +1079,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1079
1079
|
throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
|
|
1080
1080
|
}
|
|
1081
1081
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1082
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1082
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkJHPVZR6Fjs.autoDetectBaseUrl));
|
|
1083
1083
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1084
1084
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1085
1085
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1086
1086
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1087
1087
|
process.stdout.write = (() => true);
|
|
1088
1088
|
try {
|
|
1089
|
-
const exitCode = await
|
|
1089
|
+
const exitCode = await _chunk2UWRFDI4js.runSkillsCommand.call(void 0, { json: true });
|
|
1090
1090
|
if (exitCode !== 0) {
|
|
1091
1091
|
throw new Error(
|
|
1092
1092
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1157,11 +1157,11 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1157
1157
|
]
|
|
1158
1158
|
};
|
|
1159
1159
|
if (options.json && !options.executeWithJson) {
|
|
1160
|
-
|
|
1160
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1161
1161
|
return 0;
|
|
1162
1162
|
}
|
|
1163
1163
|
if (options.printCommand) {
|
|
1164
|
-
|
|
1164
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
1165
1165
|
{
|
|
1166
1166
|
...plan,
|
|
1167
1167
|
render: {
|
|
@@ -1174,7 +1174,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1174
1174
|
return 0;
|
|
1175
1175
|
}
|
|
1176
1176
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1177
|
-
|
|
1177
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1178
1178
|
return 0;
|
|
1179
1179
|
}
|
|
1180
1180
|
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
@@ -1204,7 +1204,7 @@ To retry with full installer output, run: deepline skills --json
|
|
|
1204
1204
|
);
|
|
1205
1205
|
}
|
|
1206
1206
|
if (options.executeWithJson && options.json) {
|
|
1207
|
-
|
|
1207
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
1208
1208
|
{
|
|
1209
1209
|
ok: true,
|
|
1210
1210
|
pinnedVersion
|