deepline 0.3.338 → 0.3.339
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/plays/bundling/index.ts +20 -7
- package/dist/cli/{auth-MTF2TRBC.mjs → auth-DLHLIJBP.mjs} +4 -4
- package/dist/cli/auth-M5OWKMLF.js +31 -0
- package/dist/cli/{billing-OXEY6DAU.js → billing-7UQXVLH2.js} +71 -71
- package/dist/cli/{billing-HXXPKDYV.mjs → billing-MLOOWHEX.mjs} +4 -4
- package/dist/cli/{chunk-FOODYFMR.js → chunk-2HTS4ZMF.js} +1 -1
- package/dist/cli/{chunk-NUJIZBLA.js → chunk-2OJGKWOX.js} +4 -4
- package/dist/cli/{chunk-XWTEOTGL.js → chunk-2UGEF3HR.js} +26 -26
- package/dist/cli/{chunk-OTJMWSIK.mjs → chunk-35IBDQNW.mjs} +5 -5
- package/dist/cli/{chunk-FYR7GGUF.js → chunk-6KKVUVA6.js} +293 -308
- package/dist/cli/{chunk-UVGGJ2CV.mjs → chunk-7CQBFUGN.mjs} +59 -74
- package/dist/cli/{chunk-HJEHCSFH.js → chunk-CI6TSINO.js} +8 -8
- package/dist/cli/{chunk-BYIWZOSA.js → chunk-DOGZHHO5.js} +6 -6
- package/dist/cli/{chunk-6CEPAFCE.mjs → chunk-FC4X6GQI.mjs} +4 -4
- package/dist/cli/{chunk-ID5OGCLU.mjs → chunk-FTV2LY4S.mjs} +3 -3
- package/dist/cli/{chunk-SSRGN56V.mjs → chunk-G5KDPFKG.mjs} +1 -1
- package/dist/cli/{chunk-7EQ3WFD2.js → chunk-G7DUWWKO.js} +9 -9
- package/dist/cli/{chunk-EV4QJE4J.mjs → chunk-IIOBMOMH.mjs} +18 -7
- package/dist/cli/{chunk-KLAWLBSP.js → chunk-ISV5JQ43.js} +60 -60
- package/dist/cli/{chunk-N3EOKUQV.mjs → chunk-JMKUKFQS.mjs} +2 -2
- package/dist/cli/{chunk-CGVCELEC.mjs → chunk-KGMWBR5S.mjs} +1 -1
- package/dist/cli/{chunk-YMLGJ2B7.mjs → chunk-KSHINNFC.mjs} +1 -1
- package/dist/cli/{chunk-FBU4A2ZE.mjs → chunk-MIMOIQXH.mjs} +2 -2
- package/dist/cli/{chunk-CVSUI4Z2.js → chunk-OAQ3JR4F.js} +48 -48
- package/dist/cli/{chunk-UQV5M6HN.js → chunk-OJVAVQLB.js} +18 -7
- package/dist/cli/{chunk-AHO5IXHM.js → chunk-OWNN6BDD.js} +15 -15
- package/dist/cli/{chunk-NHTICK5G.mjs → chunk-RI7LPAUP.mjs} +2 -2
- package/dist/cli/{chunk-NR5ILIKI.js → chunk-RKSYETCE.js} +2 -2
- package/dist/cli/{chunk-5OHHWYOV.js → chunk-RWPA6MGP.js} +45 -45
- package/dist/cli/{chunk-KRZDVQZH.js → chunk-S3WJ6LZJ.js} +8 -8
- package/dist/cli/{chunk-7WL23HDH.mjs → chunk-TJSLXGQ2.mjs} +1 -1
- package/dist/cli/{chunk-MIHJFRGP.mjs → chunk-TOB6N2QF.mjs} +2 -2
- package/dist/cli/{chunk-J47TX67H.mjs → chunk-YSM3GVSU.mjs} +1 -1
- package/dist/cli/client-7RSITSKJ.js +20 -0
- package/dist/cli/{client-LXBODS53.mjs → client-NVSE7EBL.mjs} +3 -3
- package/dist/cli/{csv-3346Z7MA.mjs → csv-FC2PSRSE.mjs} +3 -3
- package/dist/cli/{csv-5UMO4TMZ.js → csv-L7MQDTXX.js} +12 -12
- package/dist/cli/{db-RBWIVEB3.js → db-7WOBHZBZ.js} +29 -29
- package/dist/cli/{db-HVAQDN7U.mjs → db-G5HO22EN.mjs} +4 -4
- package/dist/cli/{describe-LAAOJYI2.js → describe-AWFEE2EE.js} +16 -16
- package/dist/cli/{describe-OKSZOU3V.mjs → describe-KCUL54J3.mjs} +9 -9
- package/dist/cli/{executions-5WENZ6MO.js → executions-MXEI32CR.js} +6 -6
- package/dist/cli/{executions-T56YNXAC.mjs → executions-TSEMNPMJ.mjs} +4 -4
- package/dist/cli/{feedback-YZILULGJ.js → feedback-EPVGGNT6.js} +7 -7
- package/dist/cli/{feedback-RU4EKJYX.mjs → feedback-R72V4O7H.mjs} +3 -3
- package/dist/cli/git-FZN5IHKS.js +23 -0
- package/dist/cli/{git-LX7NYWDT.mjs → git-GVFRGXZI.mjs} +4 -4
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-K6W26TQA.js → legacy-noops-3Q4O5QJT.js} +7 -7
- package/dist/cli/{legacy-noops-SN44IUWD.mjs → legacy-noops-4QF2EUUO.mjs} +4 -4
- package/dist/cli/{monitors-BQ5SXRDD.mjs → monitors-AWGYR66F.mjs} +4 -4
- package/dist/cli/{monitors-R4D7X7PL.js → monitors-RKV3XM5P.js} +85 -85
- package/dist/cli/{org-6GWQHHLF.js → org-DTERGBF7.js} +60 -60
- package/dist/cli/{org-RNR3CGVL.mjs → org-YMHTIEYB.mjs} +4 -4
- package/dist/cli/play-F7ZUV3HE.js +153 -0
- package/dist/cli/{play-CPG4HFXR.mjs → play-VRTGFHNX.mjs} +8 -8
- package/dist/cli/{providers-YEFPQW3K.mjs → providers-VJJSRFOV.mjs} +4 -4
- package/dist/cli/{providers-AP5NBYJF.js → providers-WIKQGBZQ.js} +7 -7
- package/dist/cli/{quickstart-5D6WSPKU.js → quickstart-BUXTOSWT.js} +5 -5
- package/dist/cli/{quickstart-IT43KYUN.mjs → quickstart-MJUJ3JM2.mjs} +3 -3
- package/dist/cli/search-5MYDHDTY.js +26 -0
- package/dist/cli/{search-BVTZBNF3.mjs → search-LAJ4V4OY.mjs} +5 -5
- package/dist/cli/{secrets-7HG77SLP.mjs → secrets-JGZRDC7K.mjs} +4 -4
- package/dist/cli/{secrets-L6Q2JJNX.js → secrets-UDB4XWHC.js} +13 -13
- package/dist/cli/{sessions-SSBDCVQN.mjs → sessions-5BPLCV4K.mjs} +4 -4
- package/dist/cli/{sessions-TNXYON2R.js → sessions-YO24QYTQ.js} +5 -5
- package/dist/cli/{settings-5L23COY7.mjs → settings-RMHY4XMX.mjs} +7 -7
- package/dist/cli/{settings-4FKK3LUF.js → settings-YLWSKW7F.js} +74 -74
- package/dist/cli/{setup-EB5JLUFH.js → setup-MVCAZC64.js} +41 -41
- package/dist/cli/{setup-GXXWJFRV.mjs → setup-MWD2WOPN.mjs} +6 -6
- package/dist/cli/{skills-ETEFVVPT.mjs → skills-7XXKMWN3.mjs} +4 -4
- package/dist/cli/skills-D7IDTAKN.js +28 -0
- package/dist/cli/tools-BH4LHBHV.js +40 -0
- package/dist/cli/{tools-HDTU55RW.mjs → tools-BM22TL5A.mjs} +6 -6
- package/dist/cli/update-BF2BPMYK.js +28 -0
- package/dist/cli/{update-FR5QUV5I.mjs → update-BLLLZRDG.mjs} +6 -6
- package/dist/cli/{workflow-BE77YVLP.mjs → workflow-EOMW666N.mjs} +5 -5
- package/dist/cli/{workflow-OFWWX4ZP.js → workflow-WG6QFCFL.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +76 -76
- package/dist/plays/bundle-play-file.mjs +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-LVTYDMEL.js +0 -31
- package/dist/cli/client-V4OIXTP6.js +0 -20
- package/dist/cli/git-XASJHFDR.js +0 -23
- package/dist/cli/play-2V2Y4P3P.js +0 -153
- package/dist/cli/search-O66KVPGA.js +0 -26
- package/dist/cli/skills-XFMWA4WX.js +0 -28
- package/dist/cli/tools-3TWNYKZY.js +0 -40
- package/dist/cli/update-AEBCM2LT.js +0 -28
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkDOGZHHO5js = require('./chunk-DOGZHHO5.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkBYIWZOSAjs = require('./chunk-BYIWZOSA.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunk2OJGKWOXjs = require('./chunk-2OJGKWOX.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 _chunk2OJGKWOXjs.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 = _chunk2OJGKWOXjs.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 `${_chunk2OJGKWOXjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunk2OJGKWOXjs.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 _chunk2OJGKWOXjs.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[_chunk2OJGKWOXjs.HOST_URL_ENV] ? { [_chunk2OJGKWOXjs.HOST_URL_ENV]: values[_chunk2OJGKWOXjs.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunk2OJGKWOXjs.API_KEY_ENV] ? { [_chunk2OJGKWOXjs.API_KEY_ENV]: values[_chunk2OJGKWOXjs.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunk2OJGKWOXjs.ACTIVE_ORG_ID_ENV] ? { [_chunk2OJGKWOXjs.ACTIVE_ORG_ID_ENV]: values[_chunk2OJGKWOXjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunk2OJGKWOXjs.ACTIVE_ORG_NAME_ENV) ? { [_chunk2OJGKWOXjs.ACTIVE_ORG_NAME_ENV]: values[_chunk2OJGKWOXjs.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, _chunk2OJGKWOXjs.FEATURES_ENV) ? { [_chunk2OJGKWOXjs.FEATURES_ENV]: values[_chunk2OJGKWOXjs.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunk2OJGKWOXjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunk2OJGKWOXjs.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
|
+
[_chunk2OJGKWOXjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunk2OJGKWOXjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunk2OJGKWOXjs.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/${_chunk2OJGKWOXjs.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": _chunk2OJGKWOXjs.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunk2OJGKWOXjs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunk2OJGKWOXjs.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunk2OJGKWOXjs.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" ? _chunk2OJGKWOXjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunk2OJGKWOXjs.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 = _chunk2OJGKWOXjs.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
|
+
[_chunk2OJGKWOXjs.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" && _chunk2OJGKWOXjs.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) _chunkDOGZHHO5js.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
|
+
[_chunk2OJGKWOXjs.HOST_URL_ENV]: baseUrl,
|
|
465
|
+
[_chunk2OJGKWOXjs.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 = _chunk2OJGKWOXjs.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" ? _chunk2OJGKWOXjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunk2OJGKWOXjs.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
|
+
[_chunk2OJGKWOXjs.HOST_URL_ENV]: baseUrl,
|
|
555
|
+
[_chunk2OJGKWOXjs.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 = _chunk2OJGKWOXjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
580
580
|
const reveal = args.includes("--reveal");
|
|
581
|
-
const jsonOutput =
|
|
581
|
+
const jsonOutput = _chunkDOGZHHO5js.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" ? _chunk2OJGKWOXjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunk2OJGKWOXjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunk2OJGKWOXjs.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
|
+
_chunkDOGZHHO5js.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
|
+
_chunkDOGZHHO5js.printCommandEnvelope.call(void 0,
|
|
650
650
|
{
|
|
651
651
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
652
652
|
status: "not connected",
|
|
@@ -682,7 +682,7 @@ async function handleStatus(args) {
|
|
|
682
682
|
}
|
|
683
683
|
);
|
|
684
684
|
if (status === 401 || status === 403) {
|
|
685
|
-
|
|
685
|
+
_chunkDOGZHHO5js.printCommandEnvelope.call(void 0,
|
|
686
686
|
{
|
|
687
687
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
688
688
|
status: "unauthorized",
|
|
@@ -712,7 +712,7 @@ async function handleStatus(args) {
|
|
|
712
712
|
console.error(`Auth status error (status ${status}).`);
|
|
713
713
|
return EXIT_SERVER;
|
|
714
714
|
}
|
|
715
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
715
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunk2OJGKWOXjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
716
716
|
clearSatisfiedPendingClaim(
|
|
717
717
|
baseUrl,
|
|
718
718
|
resolvedAuthScope,
|
|
@@ -740,28 +740,28 @@ async function handleStatus(args) {
|
|
|
740
740
|
if (apiKeyResp) {
|
|
741
741
|
saveEnvValues(
|
|
742
742
|
{
|
|
743
|
-
[
|
|
744
|
-
[
|
|
743
|
+
[_chunk2OJGKWOXjs.HOST_URL_ENV]: baseUrl,
|
|
744
|
+
[_chunk2OJGKWOXjs.API_KEY_ENV]: apiKeyResp,
|
|
745
745
|
...activeOrgEnvValues(data)
|
|
746
746
|
},
|
|
747
747
|
baseUrl,
|
|
748
748
|
resolvedAuthScope
|
|
749
749
|
);
|
|
750
750
|
if (resolvedAuthScope === "folder") {
|
|
751
|
-
const target =
|
|
751
|
+
const target = _chunk2OJGKWOXjs.resolveProjectPinTarget.call(void 0, );
|
|
752
752
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
753
753
|
} else {
|
|
754
754
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
758
|
-
saveEnvValues(
|
|
757
|
+
} else if (resolvedAuthScope === "folder" || _chunk2OJGKWOXjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
758
|
+
saveEnvValues(_chunk2OJGKWOXjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
759
759
|
}
|
|
760
|
-
|
|
760
|
+
_chunkDOGZHHO5js.printCommandEnvelope.call(void 0,
|
|
761
761
|
{
|
|
762
762
|
...payload,
|
|
763
|
-
...
|
|
764
|
-
command_context:
|
|
763
|
+
..._chunk2OJGKWOXjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
764
|
+
command_context: _chunk2OJGKWOXjs.resolveCliCommandContext.call(void 0,
|
|
765
765
|
{ baseUrl, apiKey },
|
|
766
766
|
resolvedAuthScope
|
|
767
767
|
)
|
|
@@ -2451,6 +2451,7 @@ async function analyzeSourceGraph(entryFile, adapter, exportName) {
|
|
|
2451
2451
|
const packages = /* @__PURE__ */ new Map();
|
|
2452
2452
|
const importedPlayDependencies = /* @__PURE__ */ new Map();
|
|
2453
2453
|
const visited = /* @__PURE__ */ new Set();
|
|
2454
|
+
const importViolations = [];
|
|
2454
2455
|
const visitFile = async (filePath) => {
|
|
2455
2456
|
const absolutePath = await normalizeLocalPath(filePath);
|
|
2456
2457
|
if (visited.has(absolutePath)) {
|
|
@@ -2521,23 +2522,26 @@ async function analyzeSourceGraph(entryFile, adapter, exportName) {
|
|
|
2521
2522
|
);
|
|
2522
2523
|
packages.set(packageImport.name, packageImport.version);
|
|
2523
2524
|
};
|
|
2524
|
-
|
|
2525
|
-
|
|
2525
|
+
for (const reference of findSourceImportReferences(sourceCode2)) {
|
|
2526
|
+
try {
|
|
2526
2527
|
await handleSpecifier(
|
|
2527
2528
|
reference.specifier,
|
|
2528
2529
|
reference.line,
|
|
2529
2530
|
reference.column,
|
|
2530
2531
|
reference.kind
|
|
2531
2532
|
);
|
|
2533
|
+
} catch (error) {
|
|
2534
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2535
|
+
importViolations.push(
|
|
2536
|
+
message.startsWith(":") ? `${absolutePath}${message}` : message
|
|
2537
|
+
);
|
|
2532
2538
|
}
|
|
2533
|
-
} catch (error) {
|
|
2534
|
-
if (error instanceof Error && error.message.startsWith(":")) {
|
|
2535
|
-
throw new Error(`${absolutePath}${error.message}`);
|
|
2536
|
-
}
|
|
2537
|
-
throw error;
|
|
2538
2539
|
}
|
|
2539
2540
|
};
|
|
2540
2541
|
await visitFile(absoluteEntryFile);
|
|
2542
|
+
if (importViolations.length > 0) {
|
|
2543
|
+
throw new AggregateError(importViolations, importViolations.join("\n"));
|
|
2544
|
+
}
|
|
2541
2545
|
const sourceCode = _nullishCoalesce(localFiles.get(absoluteEntryFile), () => ( ""));
|
|
2542
2546
|
const sourceHash = sha256(sourceCode);
|
|
2543
2547
|
const graphHash = sha256(
|
|
@@ -2894,6 +2898,13 @@ authoring-contract-edition:${_chunkFKKNYKDYjs.PLAY_AUTHORING_CONTRACT_EDITION}`
|
|
|
2894
2898
|
importedPlayDependencies: analysis.importedPlayDependencies
|
|
2895
2899
|
};
|
|
2896
2900
|
} catch (error) {
|
|
2901
|
+
if (error instanceof AggregateError) {
|
|
2902
|
+
return {
|
|
2903
|
+
success: false,
|
|
2904
|
+
filePath: absolutePath,
|
|
2905
|
+
errors: error.errors.map(String)
|
|
2906
|
+
};
|
|
2907
|
+
}
|
|
2897
2908
|
if (error && typeof error === "object" && "errors" in error) {
|
|
2898
2909
|
const errors = Array.isArray(error.errors) ? error.errors.map(formatEsbuildMessage) : ["Play bundling failed."];
|
|
2899
2910
|
return {
|
|
@@ -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 _chunkRKSYETCEjs = require('./chunk-RKSYETCE.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkISV5JQ43js = require('./chunk-ISV5JQ43.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkDOGZHHO5js = require('./chunk-DOGZHHO5.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk2OJGKWOXjs = require('./chunk-2OJGKWOX.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 = _chunkISV5JQ43js.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 ? _chunkRKSYETCEjs.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
549
|
+
const npmGlobalInstallFlags = _chunkRKSYETCEjs.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()]) || _chunk2OJGKWOXjs.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 = _chunkISV5JQ43js.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, () => ( _chunk2OJGKWOXjs.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 _chunkISV5JQ43js.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
|
+
_chunkDOGZHHO5js.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1161
1161
|
return 0;
|
|
1162
1162
|
}
|
|
1163
1163
|
if (options.printCommand) {
|
|
1164
|
-
|
|
1164
|
+
_chunkDOGZHHO5js.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
|
+
_chunkDOGZHHO5js.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
|
+
_chunkDOGZHHO5js.printCommandEnvelope.call(void 0,
|
|
1208
1208
|
{
|
|
1209
1209
|
ok: true,
|
|
1210
1210
|
pinnedVersion
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-GAMFK2ZP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
printCommandEnvelope
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YSM3GVSU.mjs";
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_SKILL_AGENTS,
|
|
9
9
|
KNOWN_SKILL_AGENTS,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
sdkCliStateDirPath,
|
|
23
23
|
skillsAgentPathSegment,
|
|
24
24
|
writeSdkSkillsLocalVersion
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KSHINNFC.mjs";
|
|
26
26
|
import {
|
|
27
27
|
DeeplineError
|
|
28
28
|
} from "./chunk-NXGCO4JB.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkISV5JQ43js = require('./chunk-ISV5JQ43.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 = _chunkISV5JQ43js.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,
|