deepline 0.3.314 → 0.3.315
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 +12 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +28 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-binding-owner.ts +61 -11
- package/dist/cli/{auth-GWF55S3N.mjs → auth-OVWOO5NP.mjs} +4 -4
- package/dist/cli/auth-P2TTZU36.js +31 -0
- package/dist/cli/{billing-2YU6E2IF.js → billing-SRZL7UOH.js} +70 -70
- package/dist/cli/{billing-WWOJN7GV.mjs → billing-W3OXKWNE.mjs} +4 -4
- package/dist/cli/{chunk-VFRZG4OW.js → chunk-6BJACIVK.js} +1 -1
- package/dist/cli/{chunk-CPN2N6EZ.mjs → chunk-AO4IWPP7.mjs} +32 -8
- package/dist/cli/{chunk-25SPKKF2.mjs → chunk-AZWQJAQF.mjs} +1 -1
- package/dist/cli/{chunk-3CKNUJVZ.mjs → chunk-B473QUQU.mjs} +4 -4
- package/dist/cli/{chunk-ENQZV7NR.js → chunk-C5WSTXUB.js} +246 -222
- package/dist/cli/{chunk-YVMJTXEG.js → chunk-FGAK6FET.js} +26 -26
- package/dist/cli/{chunk-DR3S76BG.mjs → chunk-FTJQO757.mjs} +1 -1
- package/dist/cli/{chunk-JZZT4GAY.mjs → chunk-GK67FYMS.mjs} +5 -5
- package/dist/cli/{chunk-QB5MAFCU.mjs → chunk-HNKHMHJ7.mjs} +1 -1
- package/dist/cli/{chunk-IZTIBG7A.mjs → chunk-IGE7EJJY.mjs} +11 -1
- package/dist/cli/{chunk-3K6QD7Z3.mjs → chunk-JF4O5OMH.mjs} +1 -1
- package/dist/cli/{chunk-WTO3ITBC.mjs → chunk-L5TSFCJ6.mjs} +2 -2
- package/dist/cli/{chunk-JNUHGWB2.js → chunk-LOWURQMF.js} +50 -50
- package/dist/cli/{chunk-WDPRE6DU.js → chunk-OJP4FCCX.js} +48 -48
- package/dist/cli/{chunk-HTXZLCSP.mjs → chunk-OUIIYFG3.mjs} +2 -2
- package/dist/cli/{chunk-GSRDZD7R.js → chunk-OYJCNCUW.js} +2 -2
- package/dist/cli/{chunk-VBRO5QCI.js → chunk-PPONZ6IE.js} +15 -15
- package/dist/cli/{chunk-3A4LJUX6.mjs → chunk-R3IFZDJL.mjs} +2 -2
- package/dist/cli/{chunk-NG4WDOGN.js → chunk-SNFSO2AN.js} +6 -6
- package/dist/cli/{chunk-2Q2IKUL5.mjs → chunk-TQ3F77AC.mjs} +3 -3
- package/dist/cli/{chunk-VWW6VHQX.js → chunk-TQK662WG.js} +60 -60
- package/dist/cli/{chunk-OUHCJL5B.mjs → chunk-TZ5KUDPP.mjs} +1 -1
- package/dist/cli/{chunk-B5LUKLKH.js → chunk-URVZGYGG.js} +4 -4
- package/dist/cli/{chunk-MLEJ2FYH.js → chunk-VYK23G2C.js} +119 -109
- package/dist/cli/{chunk-ODEWOXWW.js → chunk-Y42UERUY.js} +6 -6
- package/dist/cli/{chunk-UZTTPEG2.js → chunk-YL42TF53.js} +6 -6
- package/dist/cli/client-CXFPFCIG.js +20 -0
- package/dist/cli/{client-EYGNDORT.mjs → client-WQ3J5BSH.mjs} +3 -3
- package/dist/cli/{csv-NZCN7SVV.mjs → csv-36ARCBNQ.mjs} +3 -3
- package/dist/cli/{csv-YOW5JMOH.js → csv-CENMEWDH.js} +12 -12
- package/dist/cli/{db-6BIYLZ6F.js → db-6DQZG6NB.js} +20 -20
- package/dist/cli/{db-HALJV3KY.mjs → db-JU7XLKQM.mjs} +4 -4
- package/dist/cli/{describe-KY2ZYGBR.mjs → describe-34ALEEFO.mjs} +8 -8
- package/dist/cli/{describe-WA6R2JSH.js → describe-VUD4AFBY.js} +15 -15
- package/dist/cli/{executions-NMCTN7XM.js → executions-H2UXS6FP.js} +6 -6
- package/dist/cli/{executions-CBOAN6KI.mjs → executions-H66BMN6N.mjs} +4 -4
- package/dist/cli/{feedback-FOMPE3DJ.mjs → feedback-Q7LXXLSH.mjs} +3 -3
- package/dist/cli/{feedback-ZZFDSCWS.js → feedback-YSYFQSAB.js} +6 -6
- package/dist/cli/git-SYFCYIFP.js +23 -0
- package/dist/cli/{git-YQR2NBCO.mjs → git-XV43NSWN.mjs} +4 -4
- package/dist/cli/index.js +74 -74
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-XH2TFFI6.js → legacy-noops-RGDW6SCA.js} +7 -7
- package/dist/cli/{legacy-noops-KMU6P3K4.mjs → legacy-noops-Z2DTZQN3.mjs} +4 -4
- package/dist/cli/{monitors-5M3BZ5OR.js → monitors-I75KZ2BP.js} +85 -85
- package/dist/cli/{monitors-2ONK5L3I.mjs → monitors-OFQ56O4S.mjs} +4 -4
- package/dist/cli/{org-6MKULUZI.js → org-75AH6RIB.js} +60 -60
- package/dist/cli/{org-LR5BMCGL.mjs → org-ZYMCU6XO.mjs} +4 -4
- package/dist/cli/{play-4NOSD7DW.mjs → play-BKXM76DV.mjs} +7 -7
- package/dist/cli/play-OKXUWPMO.js +152 -0
- package/dist/cli/{providers-UBGIKGCA.mjs → providers-GWG2WFIY.mjs} +4 -4
- package/dist/cli/{providers-UFJD3VKF.js → providers-Z77MM7ID.js} +7 -7
- package/dist/cli/{quickstart-KDUKQRUH.mjs → quickstart-BGVIV374.mjs} +3 -3
- package/dist/cli/{quickstart-KQZHZE6C.js → quickstart-I4RECIQC.js} +5 -5
- package/dist/cli/search-3KISUDDT.js +26 -0
- package/dist/cli/{search-4BVOOS5Q.mjs → search-TIKBP3RE.mjs} +5 -5
- package/dist/cli/{secrets-TVXZ3WJ3.js → secrets-SNGRI4KS.js} +13 -13
- package/dist/cli/{secrets-YGV23N3N.mjs → secrets-YCHKLWKC.mjs} +4 -4
- package/dist/cli/{sessions-G7ROUW35.mjs → sessions-IRDG6ZRX.mjs} +4 -4
- package/dist/cli/{sessions-RWIQWDFD.js → sessions-WXLADGDX.js} +5 -5
- package/dist/cli/{settings-TG3E2NR7.js → settings-72J4BVF6.js} +74 -74
- package/dist/cli/{settings-QZEVGCXE.mjs → settings-KZALJDXW.mjs} +7 -7
- package/dist/cli/{setup-HUXINKOH.mjs → setup-4KCA7ESV.mjs} +6 -6
- package/dist/cli/{setup-3KDUNEEE.js → setup-FFB3KLFD.js} +41 -41
- package/dist/cli/{skills-LHU3DB7J.mjs → skills-MQZPYUQ3.mjs} +4 -4
- package/dist/cli/skills-XGOK4GRW.js +28 -0
- package/dist/cli/tools-LEAJ7EPW.js +38 -0
- package/dist/cli/{tools-J5WQ33BB.mjs → tools-M3WKRZ5T.mjs} +6 -6
- package/dist/cli/{update-T6744RM7.mjs → update-QJMNYGNF.mjs} +6 -6
- package/dist/cli/update-ZN6LDUHS.js +28 -0
- package/dist/cli/{workflow-YF5SQJLG.js → workflow-35UUOZ5E.js} +15 -15
- package/dist/cli/{workflow-CG2B65HD.mjs → workflow-6T2EUFCN.mjs} +5 -5
- package/dist/{client-CtVdLZux.d.mts → client-CvpZsBqt.d.mts} +12 -0
- package/dist/{client-OBwghxPC.d.ts → client-Dh_4Ph1R.d.ts} +12 -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 +76 -76
- 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-QX2L4LPM.js +0 -31
- package/dist/cli/client-Z4VFNTUB.js +0 -20
- package/dist/cli/git-AC2ATBDK.js +0 -23
- package/dist/cli/play-U3CZ4F2W.js +0 -152
- package/dist/cli/search-Y7OTFRCI.js +0 -26
- package/dist/cli/skills-CO5YUWBK.js +0 -28
- package/dist/cli/tools-MWPT5X47.js +0 -38
- package/dist/cli/update-VVIJW7ZJ.js +0 -28
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkY42UERUYjs = require('./chunk-Y42UERUY.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkODEWOXWWjs = require('./chunk-ODEWOXWW.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkURVZGYGGjs = require('./chunk-URVZGYGG.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 _chunkURVZGYGGjs.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 = _chunkURVZGYGGjs.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 `${_chunkURVZGYGGjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunkURVZGYGGjs.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 _chunkURVZGYGGjs.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[_chunkURVZGYGGjs.HOST_URL_ENV] ? { [_chunkURVZGYGGjs.HOST_URL_ENV]: values[_chunkURVZGYGGjs.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunkURVZGYGGjs.API_KEY_ENV] ? { [_chunkURVZGYGGjs.API_KEY_ENV]: values[_chunkURVZGYGGjs.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunkURVZGYGGjs.ACTIVE_ORG_ID_ENV] ? { [_chunkURVZGYGGjs.ACTIVE_ORG_ID_ENV]: values[_chunkURVZGYGGjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkURVZGYGGjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkURVZGYGGjs.ACTIVE_ORG_NAME_ENV]: values[_chunkURVZGYGGjs.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, _chunkURVZGYGGjs.FEATURES_ENV) ? { [_chunkURVZGYGGjs.FEATURES_ENV]: values[_chunkURVZGYGGjs.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunkURVZGYGGjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunkURVZGYGGjs.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
|
+
[_chunkURVZGYGGjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunkURVZGYGGjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunkURVZGYGGjs.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/${_chunkURVZGYGGjs.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": _chunkURVZGYGGjs.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunkURVZGYGGjs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunkURVZGYGGjs.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunkURVZGYGGjs.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" ? _chunkURVZGYGGjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkURVZGYGGjs.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 = _chunkURVZGYGGjs.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
|
+
[_chunkURVZGYGGjs.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" && _chunkURVZGYGGjs.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) _chunkY42UERUYjs.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
|
+
[_chunkURVZGYGGjs.HOST_URL_ENV]: baseUrl,
|
|
465
|
+
[_chunkURVZGYGGjs.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 = _chunkURVZGYGGjs.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" ? _chunkURVZGYGGjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkURVZGYGGjs.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
|
+
[_chunkURVZGYGGjs.HOST_URL_ENV]: baseUrl,
|
|
555
|
+
[_chunkURVZGYGGjs.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 = _chunkURVZGYGGjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
580
580
|
const reveal = args.includes("--reveal");
|
|
581
|
-
const jsonOutput =
|
|
581
|
+
const jsonOutput = _chunkY42UERUYjs.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" ? _chunkURVZGYGGjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkURVZGYGGjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkURVZGYGGjs.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
|
+
_chunkY42UERUYjs.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
|
+
_chunkY42UERUYjs.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
|
+
_chunkY42UERUYjs.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, () => ( (_chunkURVZGYGGjs.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
|
+
[_chunkURVZGYGGjs.HOST_URL_ENV]: baseUrl,
|
|
744
|
+
[_chunkURVZGYGGjs.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 = _chunkURVZGYGGjs.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" || _chunkURVZGYGGjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
758
|
+
saveEnvValues(_chunkURVZGYGGjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
759
759
|
}
|
|
760
|
-
|
|
760
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
761
761
|
{
|
|
762
762
|
...payload,
|
|
763
|
-
...
|
|
764
|
-
command_context:
|
|
763
|
+
..._chunkURVZGYGGjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
764
|
+
command_context: _chunkURVZGYGGjs.resolveCliCommandContext.call(void 0,
|
|
765
765
|
{ baseUrl, apiKey },
|
|
766
766
|
resolvedAuthScope
|
|
767
767
|
)
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HNKHMHJ7.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
saveHostEnvValues,
|
|
26
26
|
saveProjectDeeplineEnvValues,
|
|
27
27
|
storedHostApiKey
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-AZWQJAQF.mjs";
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
import {
|
|
@@ -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 _chunkTQK662WGjs = require('./chunk-TQK662WG.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 = _chunkTQK662WGjs.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 _chunkOYJCNCUWjs = require('./chunk-OYJCNCUW.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkTQK662WGjs = require('./chunk-TQK662WG.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkY42UERUYjs = require('./chunk-Y42UERUY.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkURVZGYGGjs = require('./chunk-URVZGYGG.js');
|
|
15
15
|
|
|
16
16
|
// src/cli/commands/update.ts
|
|
17
17
|
var _child_process = require('child_process');
|
|
@@ -504,7 +504,7 @@ function normalizedNpmPrefix(value) {
|
|
|
504
504
|
}
|
|
505
505
|
function resolveNpmGlobalPrefix(env) {
|
|
506
506
|
try {
|
|
507
|
-
const plan =
|
|
507
|
+
const plan = _chunkTQK662WGjs.resolveShellSpawn.call(void 0, "npm", ["prefix", "-g"], process.platform, env);
|
|
508
508
|
const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
|
|
509
509
|
encoding: "utf8",
|
|
510
510
|
env,
|
|
@@ -560,8 +560,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
560
560
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
561
561
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
562
562
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
563
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
564
|
-
const npmGlobalInstallFlags =
|
|
563
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkOYJCNCUWjs.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
564
|
+
const npmGlobalInstallFlags = _chunkOYJCNCUWjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
565
565
|
const args = installPrefix ? [
|
|
566
566
|
"install",
|
|
567
567
|
"-g",
|
|
@@ -571,7 +571,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
571
571
|
packageSpec
|
|
572
572
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
573
573
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
574
|
-
_optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) ||
|
|
574
|
+
_optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) || _chunkURVZGYGGjs.autoDetectBaseUrl.call(void 0, )
|
|
575
575
|
);
|
|
576
576
|
return {
|
|
577
577
|
kind: "npm-global",
|
|
@@ -718,7 +718,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
718
718
|
function runCommand(command, args, env = process.env) {
|
|
719
719
|
return new Promise((resolveResult) => {
|
|
720
720
|
let output = "";
|
|
721
|
-
const plan =
|
|
721
|
+
const plan = _chunkTQK662WGjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
722
722
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
723
723
|
stdio: ["inherit", "pipe", "pipe"],
|
|
724
724
|
shell: plan.shell,
|
|
@@ -1094,14 +1094,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1094
1094
|
throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
|
|
1095
1095
|
}
|
|
1096
1096
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1097
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1097
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkURVZGYGGjs.autoDetectBaseUrl));
|
|
1098
1098
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1099
1099
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1100
1100
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1101
1101
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1102
1102
|
process.stdout.write = (() => true);
|
|
1103
1103
|
try {
|
|
1104
|
-
const exitCode = await
|
|
1104
|
+
const exitCode = await _chunkTQK662WGjs.runSkillsCommand.call(void 0, { json: true });
|
|
1105
1105
|
if (exitCode !== 0) {
|
|
1106
1106
|
throw new Error(
|
|
1107
1107
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1172,11 +1172,11 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1172
1172
|
]
|
|
1173
1173
|
};
|
|
1174
1174
|
if (options.json && !options.executeWithJson) {
|
|
1175
|
-
|
|
1175
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1176
1176
|
return 0;
|
|
1177
1177
|
}
|
|
1178
1178
|
if (options.printCommand) {
|
|
1179
|
-
|
|
1179
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
1180
1180
|
{
|
|
1181
1181
|
...plan,
|
|
1182
1182
|
render: {
|
|
@@ -1189,7 +1189,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1189
1189
|
return 0;
|
|
1190
1190
|
}
|
|
1191
1191
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1192
|
-
|
|
1192
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1193
1193
|
return 0;
|
|
1194
1194
|
}
|
|
1195
1195
|
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
@@ -1219,7 +1219,7 @@ To retry with full installer output, run: deepline skills --json
|
|
|
1219
1219
|
);
|
|
1220
1220
|
}
|
|
1221
1221
|
if (options.executeWithJson && options.json) {
|
|
1222
|
-
|
|
1222
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
1223
1223
|
{
|
|
1224
1224
|
ok: true,
|
|
1225
1225
|
pinnedVersion
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HNKHMHJ7.mjs";
|
|
6
6
|
import {
|
|
7
7
|
resolveBaseUrlOnly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AZWQJAQF.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -1,7 +1,7 @@
|
|
|
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 _chunkY42UERUYjs = require('./chunk-Y42UERUY.js');
|
|
5
5
|
|
|
6
6
|
// src/cli/commands/sessions.ts
|
|
7
7
|
|
|
@@ -420,7 +420,7 @@ function buildSessionUploadContent(raw) {
|
|
|
420
420
|
return { encodedContent: encoded, needsChunking: true };
|
|
421
421
|
}
|
|
422
422
|
async function uploadPayload(path, payload) {
|
|
423
|
-
const { http } =
|
|
423
|
+
const { http } = _chunkY42UERUYjs.getAuthedHttpClient.call(void 0, );
|
|
424
424
|
return await http.post(path, payload);
|
|
425
425
|
}
|
|
426
426
|
async function uploadChunkedSessions(sessions, options) {
|
|
@@ -452,7 +452,7 @@ async function uploadChunkedSessions(sessions, options) {
|
|
|
452
452
|
environments: sessions.map(() => detectShellContext()),
|
|
453
453
|
...options.rating ? { rating: options.rating } : {}
|
|
454
454
|
});
|
|
455
|
-
|
|
455
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
456
456
|
{
|
|
457
457
|
...response,
|
|
458
458
|
ok: true,
|
|
@@ -481,7 +481,7 @@ async function handleSessionsSend(options) {
|
|
|
481
481
|
filename: _path.basename.call(void 0, filePath),
|
|
482
482
|
...rating ? { rating } : {}
|
|
483
483
|
});
|
|
484
|
-
|
|
484
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
485
485
|
{
|
|
486
486
|
...response2,
|
|
487
487
|
ok: true,
|
|
@@ -530,7 +530,7 @@ async function handleSessionsSend(options) {
|
|
|
530
530
|
environment: detectShellContext(),
|
|
531
531
|
...rating ? { rating } : {}
|
|
532
532
|
});
|
|
533
|
-
|
|
533
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
534
534
|
{
|
|
535
535
|
...response,
|
|
536
536
|
ok: true,
|
|
@@ -635,7 +635,7 @@ ${refreshMeta}
|
|
|
635
635
|
</body>
|
|
636
636
|
</html>`;
|
|
637
637
|
_fs.writeFileSync.call(void 0, outputPath, html, "utf8");
|
|
638
|
-
|
|
638
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
639
639
|
{
|
|
640
640
|
ok: true,
|
|
641
641
|
file: outputPath,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IGE7EJJY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
printCommandEnvelope
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HNKHMHJ7.mjs";
|
|
7
7
|
import {
|
|
8
8
|
resolveConfig,
|
|
9
9
|
sdkCliStateDirPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AZWQJAQF.mjs";
|
|
11
11
|
|
|
12
12
|
// src/cli/search-ref.ts
|
|
13
13
|
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|