deepline 0.3.438 → 0.3.440
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/client.ts +23 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-execution-relay.ts +8 -4
- package/dist/cli/{auth-UDRY6ZL5.mjs → auth-KBORTFO6.mjs} +4 -4
- package/dist/cli/auth-LXI5K7V6.js +40 -0
- package/dist/cli/{billing-7QTUCC3F.js → billing-RE5WN7IQ.js} +73 -73
- package/dist/cli/{billing-3PTMADUE.mjs → billing-VJSUCB5I.mjs} +4 -4
- package/dist/cli/{chunk-R4MGS7YD.mjs → chunk-2GNX6SCO.mjs} +24 -0
- package/dist/cli/{chunk-GSDUURVH.mjs → chunk-42YHEY2R.mjs} +2 -2
- package/dist/cli/{chunk-3BQVWQXZ.js → chunk-4GHEUG6W.js} +20 -20
- package/dist/cli/{chunk-K4WKKNGY.js → chunk-4RKPT6IE.js} +2 -2
- package/dist/cli/{chunk-3ZGIJPAC.js → chunk-ATTUUPIU.js} +8 -8
- package/dist/cli/{chunk-S5AVEKTO.js → chunk-BBYGXP2I.js} +6 -6
- package/dist/cli/{chunk-CLDL6HJ4.js → chunk-CI56TXRS.js} +35 -35
- package/dist/cli/{chunk-CO67TF3J.mjs → chunk-CWFN7MUU.mjs} +42 -10
- package/dist/cli/{chunk-K4EHBVYV.js → chunk-DM6Q634K.js} +24 -0
- package/dist/cli/{chunk-IREQVEGX.js → chunk-EPABMF45.js} +6 -6
- package/dist/cli/{chunk-GIRJGHC3.js → chunk-FGTKAXRJ.js} +93 -80
- package/dist/cli/{chunk-3G2MZM7B.js → chunk-GFEWNYQ4.js} +2 -2
- package/dist/cli/{chunk-MOVWT3Z3.js → chunk-GJI7C2OU.js} +8 -8
- package/dist/cli/{chunk-64GPTXJV.mjs → chunk-GOHOTLUV.mjs} +3 -3
- package/dist/cli/{chunk-QUAV2FSK.mjs → chunk-GRAEERVE.mjs} +3 -3
- package/dist/cli/{chunk-QG7LM24G.mjs → chunk-GWC7OBRD.mjs} +2 -2
- package/dist/cli/{chunk-EBGHNXSH.js → chunk-HNMQSS7P.js} +1 -1
- package/dist/cli/{chunk-2OTCHLWC.mjs → chunk-K23LXA4N.mjs} +1 -1
- package/dist/cli/{chunk-ODGVHGHI.js → chunk-M6WSQZHP.js} +52 -52
- package/dist/cli/{chunk-SJBJYNJ3.mjs → chunk-NIR2UK5V.mjs} +1 -1
- package/dist/cli/{chunk-AGX3XMPN.mjs → chunk-O7PC3VOI.mjs} +1 -1
- package/dist/cli/{chunk-KQJMCYFP.js → chunk-OOVQITRM.js} +50 -50
- package/dist/cli/{chunk-2KDFL6IV.mjs → chunk-OX5JAD3D.mjs} +4 -4
- package/dist/cli/{chunk-GBIWLNWI.mjs → chunk-PCNOULRB.mjs} +14 -1
- package/dist/cli/{chunk-IAQ73HVZ.js → chunk-R2P756BJ.js} +16 -16
- package/dist/cli/{chunk-PEFUJDEQ.mjs → chunk-R7GGDUOM.mjs} +3 -3
- package/dist/cli/{chunk-3G7KUJ63.mjs → chunk-RAJP44MZ.mjs} +1 -1
- package/dist/cli/{chunk-LZRYLCV3.mjs → chunk-T6XBX45B.mjs} +5 -5
- package/dist/cli/{chunk-HWTAT726.js → chunk-V2ZITVZA.js} +26 -26
- package/dist/cli/{chunk-ALWQKQQ6.mjs → chunk-V74O7X2X.mjs} +2 -2
- package/dist/cli/{chunk-OSQEFBQA.js → chunk-VXQQZV4A.js} +4 -4
- package/dist/cli/{chunk-G6HUOVZ4.mjs → chunk-XL4FJX7J.mjs} +1 -1
- package/dist/cli/{chunk-OVLP7546.js → chunk-Z7SKBAOU.js} +113 -81
- package/dist/cli/{chunk-DGGQXHAO.mjs → chunk-ZLD46RSR.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-K5PMPLNS.js → csv-L64ECPD5.js} +12 -12
- package/dist/cli/{csv-ZU2VMGYN.mjs → csv-MP3WOYPE.mjs} +3 -3
- package/dist/cli/{db-GJR5NDMX.mjs → db-FOV7GHXS.mjs} +4 -4
- package/dist/cli/{db-7CZ73PYG.js → db-RZJK6LGN.js} +25 -25
- package/dist/cli/{describe-NS2RAE5K.mjs → describe-R2BEQHVZ.mjs} +12 -12
- package/dist/cli/{describe-YNVJ76T6.js → describe-WWENJAG2.js} +16 -16
- package/dist/cli/describe-core.d.mts +1 -1
- package/dist/cli/describe-core.d.ts +1 -1
- package/dist/cli/{executions-EKWO3HR7.js → executions-3LFEK56I.js} +6 -6
- package/dist/cli/{executions-7VW6WOHA.mjs → executions-C5WO6TGN.mjs} +4 -4
- package/dist/cli/{feedback-DTMRRZNI.js → feedback-EMWUZ4LV.js} +7 -7
- package/dist/cli/{feedback-I4AKIIFP.mjs → feedback-K6OAZUQ4.mjs} +3 -3
- package/dist/cli/git-2BW2UDK6.js +24 -0
- package/dist/cli/{git-H7RW4ILW.mjs → git-DJLL3OCZ.mjs} +4 -4
- package/dist/cli/index.js +135 -135
- package/dist/cli/index.mjs +37 -37
- package/dist/cli/{legacy-noops-BJCSECN6.js → legacy-noops-57SRSZ7M.js} +7 -7
- package/dist/cli/{legacy-noops-2LJGABEO.mjs → legacy-noops-EAJG56KP.mjs} +4 -4
- package/dist/cli/{monitors-75ZYK5QN.mjs → monitors-FHTQ6227.mjs} +4 -4
- package/dist/cli/{monitors-YXIETS5O.js → monitors-OI57AAIG.js} +84 -84
- package/dist/cli/{org-TIQTG57G.js → org-26EHPBKF.js} +66 -66
- package/dist/cli/{org-5BYA54D5.mjs → org-YGHFZTWJ.mjs} +4 -4
- package/dist/cli/{play-3HDMONS3.mjs → play-KBKWTIXK.mjs} +10 -10
- package/dist/cli/{play-MG6PQTZX.js → play-PXGYS4DH.js} +283 -283
- package/dist/cli/{providers-VTU5QFEY.js → providers-IZYBWI6M.js} +7 -7
- package/dist/cli/{providers-ZRI33AVX.mjs → providers-YPFEVK5C.mjs} +4 -4
- package/dist/cli/{quickstart-E2GZQ7C5.js → quickstart-RBCTFLI3.js} +5 -5
- package/dist/cli/{quickstart-GLKJVPGF.mjs → quickstart-SJ2M56CV.mjs} +3 -3
- package/dist/cli/search-5CFJRSGN.js +30 -0
- package/dist/cli/{search-WA7MLHXA.mjs → search-PSPZTTKR.mjs} +5 -5
- package/dist/cli/{secrets-UZCAPRNH.mjs → secrets-BCS4FE5D.mjs} +4 -4
- package/dist/cli/{secrets-FJ2FFPR6.js → secrets-XIWKYXGD.js} +13 -13
- package/dist/cli/{sessions-RGT3OFG3.mjs → sessions-L3UEERFX.mjs} +4 -4
- package/dist/cli/{sessions-GSB77ETF.js → sessions-YX2AJF5I.js} +5 -5
- package/dist/cli/{settings-5TWU54SW.mjs → settings-SFFP7AR5.mjs} +8 -8
- package/dist/cli/{settings-LOFO3Z7X.js → settings-X2GMYBE7.js} +75 -75
- package/dist/cli/{setup-HUAD7RTY.js → setup-4ERUKDQ5.js} +42 -42
- package/dist/cli/{setup-ECTNKMOF.mjs → setup-QIHAXFBL.mjs} +7 -7
- package/dist/cli/{skills-APEJV5NK.mjs → skills-BYNSDIKJ.mjs} +5 -5
- package/dist/cli/skills-EOPZVMJS.js +29 -0
- package/dist/cli/{tools-56FHN4LC.mjs → tools-PQSMCIA7.mjs} +12 -12
- package/dist/cli/tools-UEZW4OD7.js +44 -0
- package/dist/cli/update-6TOZCQ4Y.js +31 -0
- package/dist/cli/{update-HEN6P35K.mjs → update-BI4E6UXI.mjs} +7 -7
- package/dist/cli/{workflow-VYCNZHZ7.js → workflow-52P63K65.js} +15 -15
- package/dist/cli/{workflow-P7XPHC5B.mjs → workflow-PMRFMZVP.mjs} +5 -5
- package/dist/{client-uX4RCcOS.d.ts → client-9nH8tx4R.d.ts} +9 -0
- package/dist/{client-jgdWPXpp.d.mts → client-Doml68vC.d.mts} +9 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +82 -82
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +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/cli/auth-7MV6G26U.js +0 -40
- package/dist/cli/git-F7XXAE3T.js +0 -24
- package/dist/cli/search-FWZCKD3Y.js +0 -30
- package/dist/cli/skills-M6AIJHCI.js +0 -29
- package/dist/cli/tools-4CNXP3XD.js +0 -44
- package/dist/cli/update-US3AAEVC.js +0 -31
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkBBYGXP2Ijs = require('./chunk-BBYGXP2I.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkS5AVEKTOjs = require('./chunk-S5AVEKTO.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkVXQQZV4Ajs = require('./chunk-VXQQZV4A.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 _chunkVXQQZV4Ajs.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 = _chunkVXQQZV4Ajs.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 `${_chunkVXQQZV4Ajs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunkVXQQZV4Ajs.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 _chunkVXQQZV4Ajs.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[_chunkVXQQZV4Ajs.HOST_URL_ENV] ? { [_chunkVXQQZV4Ajs.HOST_URL_ENV]: values[_chunkVXQQZV4Ajs.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunkVXQQZV4Ajs.API_KEY_ENV] ? { [_chunkVXQQZV4Ajs.API_KEY_ENV]: values[_chunkVXQQZV4Ajs.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunkVXQQZV4Ajs.ACTIVE_ORG_ID_ENV] ? { [_chunkVXQQZV4Ajs.ACTIVE_ORG_ID_ENV]: values[_chunkVXQQZV4Ajs.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkVXQQZV4Ajs.ACTIVE_ORG_NAME_ENV) ? { [_chunkVXQQZV4Ajs.ACTIVE_ORG_NAME_ENV]: values[_chunkVXQQZV4Ajs.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, _chunkVXQQZV4Ajs.FEATURES_ENV) ? { [_chunkVXQQZV4Ajs.FEATURES_ENV]: values[_chunkVXQQZV4Ajs.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunkVXQQZV4Ajs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunkVXQQZV4Ajs.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
|
+
[_chunkVXQQZV4Ajs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunkVXQQZV4Ajs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunkVXQQZV4Ajs.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/${_chunkVXQQZV4Ajs.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": _chunkVXQQZV4Ajs.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunkVXQQZV4Ajs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunkVXQQZV4Ajs.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunkVXQQZV4Ajs.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()]);
|
|
@@ -262,7 +262,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
262
262
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
263
263
|
}
|
|
264
264
|
async function reportSetupCompleted(input) {
|
|
265
|
-
const apiKey = input.authScope === "folder" ?
|
|
265
|
+
const apiKey = input.authScope === "folder" ? _chunkVXQQZV4Ajs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkVXQQZV4Ajs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
266
266
|
if (!apiKey) return;
|
|
267
267
|
try {
|
|
268
268
|
await httpJson(
|
|
@@ -359,7 +359,7 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
async function handleRegister(args) {
|
|
362
|
-
const baseUrl =
|
|
362
|
+
const baseUrl = _chunkVXQQZV4Ajs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
363
363
|
let orgName = "";
|
|
364
364
|
let orgId = "";
|
|
365
365
|
let agentName = "";
|
|
@@ -414,19 +414,19 @@ async function handleRegister(args) {
|
|
|
414
414
|
});
|
|
415
415
|
saveEnvValues(
|
|
416
416
|
{
|
|
417
|
-
[
|
|
417
|
+
[_chunkVXQQZV4Ajs.HOST_URL_ENV]: baseUrl
|
|
418
418
|
},
|
|
419
419
|
baseUrl,
|
|
420
420
|
authScope
|
|
421
421
|
);
|
|
422
422
|
}
|
|
423
423
|
if (claimUrl) {
|
|
424
|
-
const shouldOpen = waitMode !== "no" &&
|
|
424
|
+
const shouldOpen = waitMode !== "no" && _chunkVXQQZV4Ajs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
425
425
|
console.log(
|
|
426
426
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
427
427
|
);
|
|
428
428
|
console.log(` ${claimUrl}`);
|
|
429
|
-
if (shouldOpen)
|
|
429
|
+
if (shouldOpen) _chunkBBYGXP2Ijs.openInBrowser.call(void 0, claimUrl);
|
|
430
430
|
}
|
|
431
431
|
if (data.cli_message) {
|
|
432
432
|
console.log(String(data.cli_message));
|
|
@@ -469,8 +469,8 @@ async function handleRegister(args) {
|
|
|
469
469
|
if (apiKey) {
|
|
470
470
|
saveEnvValues(
|
|
471
471
|
{
|
|
472
|
-
[
|
|
473
|
-
[
|
|
472
|
+
[_chunkVXQQZV4Ajs.HOST_URL_ENV]: baseUrl,
|
|
473
|
+
[_chunkVXQQZV4Ajs.API_KEY_ENV]: apiKey,
|
|
474
474
|
...activeOrgEnvValues(statusData)
|
|
475
475
|
},
|
|
476
476
|
baseUrl,
|
|
@@ -492,7 +492,7 @@ async function handleRegister(args) {
|
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
async function handleWait(args) {
|
|
495
|
-
const baseUrl =
|
|
495
|
+
const baseUrl = _chunkVXQQZV4Ajs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
496
496
|
let timeoutSeconds = 300;
|
|
497
497
|
let requestedScope;
|
|
498
498
|
if (args.includes("--auth-scope")) {
|
|
@@ -516,7 +516,7 @@ async function handleWait(args) {
|
|
|
516
516
|
const authScope = resumed.scope;
|
|
517
517
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _12 => _12.claimToken]), () => ( ""));
|
|
518
518
|
if (!pendingClaim) {
|
|
519
|
-
const scopedApiKey = authScope === "folder" ?
|
|
519
|
+
const scopedApiKey = authScope === "folder" ? _chunkVXQQZV4Ajs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkVXQQZV4Ajs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
520
520
|
if (scopedApiKey) {
|
|
521
521
|
console.log("Already connected.");
|
|
522
522
|
return EXIT_OK;
|
|
@@ -559,8 +559,8 @@ async function handleWait(args) {
|
|
|
559
559
|
if (apiKey) {
|
|
560
560
|
saveEnvValues(
|
|
561
561
|
{
|
|
562
|
-
[
|
|
563
|
-
[
|
|
562
|
+
[_chunkVXQQZV4Ajs.HOST_URL_ENV]: baseUrl,
|
|
563
|
+
[_chunkVXQQZV4Ajs.API_KEY_ENV]: apiKey,
|
|
564
564
|
...activeOrgEnvValues(data)
|
|
565
565
|
},
|
|
566
566
|
baseUrl,
|
|
@@ -584,8 +584,8 @@ async function handleWait(args) {
|
|
|
584
584
|
return EXIT_AUTH;
|
|
585
585
|
}
|
|
586
586
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
587
|
-
const baseUrl =
|
|
588
|
-
const apiKey =
|
|
587
|
+
const baseUrl = _chunkVXQQZV4Ajs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
588
|
+
const apiKey = _chunkVXQQZV4Ajs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
589
589
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
590
590
|
try {
|
|
591
591
|
const { status, data } = await httpJson(
|
|
@@ -608,9 +608,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
async function handleStatus(args) {
|
|
611
|
-
const baseUrl =
|
|
611
|
+
const baseUrl = _chunkVXQQZV4Ajs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
612
612
|
const reveal = args.includes("--reveal");
|
|
613
|
-
const jsonOutput =
|
|
613
|
+
const jsonOutput = _chunkBBYGXP2Ijs.argsWantJson.call(void 0, args);
|
|
614
614
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
615
615
|
let authScope = null;
|
|
616
616
|
if (hasExplicitAuthScope) {
|
|
@@ -651,14 +651,14 @@ async function handleStatus(args) {
|
|
|
651
651
|
};
|
|
652
652
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
653
653
|
}
|
|
654
|
-
const apiKey = authScope === "folder" ?
|
|
654
|
+
const apiKey = authScope === "folder" ? _chunkVXQQZV4Ajs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkVXQQZV4Ajs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkVXQQZV4Ajs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
655
655
|
if (!apiKey) {
|
|
656
656
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
657
657
|
baseUrl,
|
|
658
658
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
659
659
|
);
|
|
660
660
|
if (pendingClaim) {
|
|
661
|
-
|
|
661
|
+
_chunkBBYGXP2Ijs.printCommandEnvelope.call(void 0,
|
|
662
662
|
{
|
|
663
663
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
664
664
|
status: "pending",
|
|
@@ -679,7 +679,7 @@ async function handleStatus(args) {
|
|
|
679
679
|
);
|
|
680
680
|
return EXIT_OK;
|
|
681
681
|
}
|
|
682
|
-
|
|
682
|
+
_chunkBBYGXP2Ijs.printCommandEnvelope.call(void 0,
|
|
683
683
|
{
|
|
684
684
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
685
685
|
status: "not connected",
|
|
@@ -712,7 +712,7 @@ async function handleStatus(args) {
|
|
|
712
712
|
}
|
|
713
713
|
);
|
|
714
714
|
if (status === 401 || status === 403) {
|
|
715
|
-
|
|
715
|
+
_chunkBBYGXP2Ijs.printCommandEnvelope.call(void 0,
|
|
716
716
|
{
|
|
717
717
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
718
718
|
status: "unauthorized",
|
|
@@ -739,7 +739,7 @@ async function handleStatus(args) {
|
|
|
739
739
|
console.error(`Auth status error (status ${status}).`);
|
|
740
740
|
return EXIT_SERVER;
|
|
741
741
|
}
|
|
742
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
742
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkVXQQZV4Ajs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
743
743
|
clearSatisfiedPendingClaim(
|
|
744
744
|
baseUrl,
|
|
745
745
|
resolvedAuthScope,
|
|
@@ -767,28 +767,28 @@ async function handleStatus(args) {
|
|
|
767
767
|
if (apiKeyResp) {
|
|
768
768
|
saveEnvValues(
|
|
769
769
|
{
|
|
770
|
-
[
|
|
771
|
-
[
|
|
770
|
+
[_chunkVXQQZV4Ajs.HOST_URL_ENV]: baseUrl,
|
|
771
|
+
[_chunkVXQQZV4Ajs.API_KEY_ENV]: apiKeyResp,
|
|
772
772
|
...activeOrgEnvValues(data)
|
|
773
773
|
},
|
|
774
774
|
baseUrl,
|
|
775
775
|
resolvedAuthScope
|
|
776
776
|
);
|
|
777
777
|
if (resolvedAuthScope === "folder") {
|
|
778
|
-
const target =
|
|
778
|
+
const target = _chunkVXQQZV4Ajs.resolveProjectPinTarget.call(void 0, );
|
|
779
779
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
780
780
|
} else {
|
|
781
781
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
785
|
-
saveEnvValues(
|
|
784
|
+
} else if (resolvedAuthScope === "folder" || _chunkVXQQZV4Ajs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
785
|
+
saveEnvValues(_chunkVXQQZV4Ajs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
786
786
|
}
|
|
787
|
-
|
|
787
|
+
_chunkBBYGXP2Ijs.printCommandEnvelope.call(void 0,
|
|
788
788
|
{
|
|
789
789
|
...payload,
|
|
790
|
-
...
|
|
791
|
-
command_context:
|
|
790
|
+
..._chunkVXQQZV4Ajs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
791
|
+
command_context: _chunkVXQQZV4Ajs.resolveCliCommandContext.call(void 0,
|
|
792
792
|
{ baseUrl, apiKey },
|
|
793
793
|
resolvedAuthScope
|
|
794
794
|
)
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
resolveUpdatePlan,
|
|
5
5
|
runAutomaticUpdatePlan,
|
|
6
6
|
shouldRunCliAutoUpdate
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-T6XBX45B.mjs";
|
|
8
8
|
import {
|
|
9
9
|
isCiEnvironment
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GOHOTLUV.mjs";
|
|
11
11
|
import {
|
|
12
12
|
addJsonNotice,
|
|
13
13
|
isJsonOutputMode
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-K23LXA4N.mjs";
|
|
15
15
|
import {
|
|
16
16
|
SDK_VERSION,
|
|
17
17
|
resolveApiKeyForBaseUrl
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XL4FJX7J.mjs";
|
|
19
19
|
|
|
20
20
|
// src/cli/compatibility-catalog.ts
|
|
21
21
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
RUNTIME_ENVIRONMENT_TOKEN_HEADER,
|
|
29
29
|
SDK_API_MAJOR,
|
|
30
30
|
resolveConfig
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-XL4FJX7J.mjs";
|
|
32
32
|
import {
|
|
33
33
|
CustomerDbQueryOutcomeUnknownError
|
|
34
34
|
} from "./chunk-MAMVGOSC.mjs";
|
|
@@ -5181,6 +5181,19 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
5181
5181
|
credentials
|
|
5182
5182
|
});
|
|
5183
5183
|
}
|
|
5184
|
+
/** Start provider OAuth and return the URL to open in a browser. */
|
|
5185
|
+
async startIntegrationOAuth(provider, options = {}) {
|
|
5186
|
+
const scopes = options.scopes?.map((scope) => scope.trim()).filter(Boolean);
|
|
5187
|
+
if (scopes !== void 0 && scopes.length === 0) {
|
|
5188
|
+
throw new Error("scopes must contain at least one OAuth scope.");
|
|
5189
|
+
}
|
|
5190
|
+
return this.http.post("/api/v2/integrations/connect", {
|
|
5191
|
+
provider,
|
|
5192
|
+
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
5193
|
+
...scopes !== void 0 ? { scopes } : {},
|
|
5194
|
+
...options.optionalScopes !== void 0 ? { optional_scopes: options.optionalScopes } : {}
|
|
5195
|
+
});
|
|
5196
|
+
}
|
|
5184
5197
|
/** Start the Slack OAuth flow required by product notifications. */
|
|
5185
5198
|
async connectNotificationSlack(options) {
|
|
5186
5199
|
return this.http.post("/api/v2/integrations/connect", {
|
|
@@ -1,19 +1,19 @@
|
|
|
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 _chunkGFEWNYQ4js = require('./chunk-GFEWNYQ4.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkCI56TXRSjs = require('./chunk-CI56TXRS.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkM6WSQZHPjs = require('./chunk-M6WSQZHP.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkBBYGXP2Ijs = require('./chunk-BBYGXP2I.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkVXQQZV4Ajs = require('./chunk-VXQQZV4A.js');
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/update.ts
|
|
19
19
|
var _child_process = require('child_process');
|
|
@@ -495,7 +495,7 @@ function normalizedNpmPrefix(value) {
|
|
|
495
495
|
}
|
|
496
496
|
function resolveNpmGlobalPrefix(env) {
|
|
497
497
|
try {
|
|
498
|
-
const plan =
|
|
498
|
+
const plan = _chunkM6WSQZHPjs.resolveShellSpawn.call(void 0,
|
|
499
499
|
"npm",
|
|
500
500
|
["prefix", "-g"],
|
|
501
501
|
process.platform,
|
|
@@ -556,8 +556,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
556
556
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
557
557
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
558
558
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
559
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
560
|
-
const npmGlobalInstallFlags =
|
|
559
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkGFEWNYQ4js.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
560
|
+
const npmGlobalInstallFlags = _chunkGFEWNYQ4js.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
561
561
|
const args = installPrefix ? [
|
|
562
562
|
"install",
|
|
563
563
|
"-g",
|
|
@@ -567,7 +567,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
567
567
|
packageSpec
|
|
568
568
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
569
569
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
570
|
-
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) ||
|
|
570
|
+
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunkVXQQZV4Ajs.autoDetectBaseUrl.call(void 0, )
|
|
571
571
|
);
|
|
572
572
|
return {
|
|
573
573
|
kind: "npm-global",
|
|
@@ -816,7 +816,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
816
816
|
function runCommand(command, args, env = process.env) {
|
|
817
817
|
return new Promise((resolveResult) => {
|
|
818
818
|
let output = "";
|
|
819
|
-
const plan =
|
|
819
|
+
const plan = _chunkM6WSQZHPjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
820
820
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
821
821
|
stdio: ["inherit", "pipe", "pipe"],
|
|
822
822
|
shell: plan.shell,
|
|
@@ -1199,14 +1199,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1199
1199
|
throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
|
|
1200
1200
|
}
|
|
1201
1201
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1202
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1202
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkVXQQZV4Ajs.autoDetectBaseUrl));
|
|
1203
1203
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1204
1204
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1205
1205
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1206
1206
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1207
1207
|
process.stdout.write = (() => true);
|
|
1208
1208
|
try {
|
|
1209
|
-
const exitCode = await
|
|
1209
|
+
const exitCode = await _chunkCI56TXRSjs.runSkillsCommand.call(void 0, { json: true });
|
|
1210
1210
|
if (exitCode !== 0) {
|
|
1211
1211
|
throw new Error(
|
|
1212
1212
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1277,11 +1277,11 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1277
1277
|
]
|
|
1278
1278
|
};
|
|
1279
1279
|
if (options.json && !options.executeWithJson) {
|
|
1280
|
-
|
|
1280
|
+
_chunkBBYGXP2Ijs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1281
1281
|
return 0;
|
|
1282
1282
|
}
|
|
1283
1283
|
if (options.printCommand) {
|
|
1284
|
-
|
|
1284
|
+
_chunkBBYGXP2Ijs.printCommandEnvelope.call(void 0,
|
|
1285
1285
|
{
|
|
1286
1286
|
...plan,
|
|
1287
1287
|
render: {
|
|
@@ -1294,7 +1294,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1294
1294
|
return 0;
|
|
1295
1295
|
}
|
|
1296
1296
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1297
|
-
|
|
1297
|
+
_chunkBBYGXP2Ijs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1298
1298
|
return 0;
|
|
1299
1299
|
}
|
|
1300
1300
|
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
@@ -1324,7 +1324,7 @@ To retry with full installer output, run: deepline skills
|
|
|
1324
1324
|
);
|
|
1325
1325
|
}
|
|
1326
1326
|
if (options.executeWithJson && options.json) {
|
|
1327
|
-
|
|
1327
|
+
_chunkBBYGXP2Ijs.printCommandEnvelope.call(void 0,
|
|
1328
1328
|
{
|
|
1329
1329
|
ok: true,
|
|
1330
1330
|
pinnedVersion
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
} from "./chunk-LJ5747UC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DeeplineClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PCNOULRB.mjs";
|
|
7
7
|
import {
|
|
8
8
|
printCommandEnvelope,
|
|
9
9
|
renderCommandEnvelopeText
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-K23LXA4N.mjs";
|
|
11
11
|
import {
|
|
12
12
|
resolveConfig,
|
|
13
13
|
sdkCliStateDirPath
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-XL4FJX7J.mjs";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__toESM
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
npmSupportsAllowScripts,
|
|
3
3
|
readNpmVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-O7PC3VOI.mjs";
|
|
5
5
|
import {
|
|
6
6
|
runSkillsCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GRAEERVE.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveShellSpawn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GOHOTLUV.mjs";
|
|
11
11
|
import {
|
|
12
12
|
printCommandEnvelope
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-K23LXA4N.mjs";
|
|
14
14
|
import {
|
|
15
15
|
autoDetectBaseUrl
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XL4FJX7J.mjs";
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/update.ts
|
|
19
19
|
import { spawn, spawnSync } from "child_process";
|