deepline 0.3.530 → 0.3.532
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/monitors/fleets/limits.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +10 -8
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +95 -9
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-execution-relay.ts +139 -35
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +438 -38
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/runtime-topology.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machine-lifecycle.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-transient-retry.ts +279 -20
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +615 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +16 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +26 -8
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +27 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +317 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +129 -39
- package/dist/cli/auth-7YWTPQSQ.js +43 -0
- package/dist/cli/{auth-LRWNDQFT.mjs → auth-ZB3NN4E7.mjs} +5 -5
- package/dist/cli/{billing-5FDPWGCG.js → billing-32EF4HJM.js} +82 -82
- package/dist/cli/{billing-7T73MRYF.mjs → billing-5GGO7DQS.mjs} +7 -7
- package/dist/cli/{chunk-7WGMCOM6.js → chunk-2T7YE5UH.js} +2 -2
- package/dist/cli/{chunk-L4QR7CYL.js → chunk-2ZGZBN6D.js} +14 -14
- package/dist/cli/{chunk-J6XSBTEX.mjs → chunk-3NUYO5QO.mjs} +1 -1
- package/dist/cli/{chunk-MVF7ZBJX.mjs → chunk-47UF3DDN.mjs} +1 -1
- package/dist/cli/{chunk-2FLODRM2.js → chunk-4S3ONSLF.js} +13 -13
- package/dist/cli/{chunk-4WPIORJX.js → chunk-64CEFPF4.js} +1 -1
- package/dist/cli/{chunk-QI2LKPW5.mjs → chunk-6LBD6G6U.mjs} +2 -2
- package/dist/cli/{chunk-WWLIDAVT.js → chunk-7S3DJFW5.js} +11 -11
- package/dist/cli/{chunk-BVY4QRVT.mjs → chunk-AOAXIJL2.mjs} +82 -31
- package/dist/cli/{chunk-KUHH7RW4.js → chunk-AQHMHYXX.js} +44 -44
- package/dist/cli/{chunk-WAWOMHWO.mjs → chunk-B77ZRM6M.mjs} +2 -2
- package/dist/cli/{chunk-5B37ER3C.js → chunk-BQ2KAFVQ.js} +3 -3
- package/dist/cli/{chunk-VQMGCNX2.mjs → chunk-C6VCDDDD.mjs} +5 -5
- package/dist/cli/{chunk-3MAHDV5C.mjs → chunk-CRWX26LR.mjs} +1 -1
- package/dist/cli/{chunk-7E7CP5KA.js → chunk-CSMLW5VE.js} +4 -4
- package/dist/cli/{chunk-HCWPX2UP.mjs → chunk-DSNTHXR7.mjs} +2 -2
- package/dist/cli/{chunk-4VQ63Y6S.mjs → chunk-EJLCIQA4.mjs} +5 -5
- package/dist/cli/{chunk-7FCD34YS.mjs → chunk-EVXRQXNV.mjs} +3 -2
- package/dist/cli/{chunk-K4Y6CNFV.mjs → chunk-F2YLC4ZG.mjs} +1 -1
- package/dist/cli/{chunk-YI7QOP6L.js → chunk-FU4MMUGM.js} +16 -16
- package/dist/cli/{chunk-6NG3FRJB.mjs → chunk-GABQIZJR.mjs} +5 -5
- package/dist/cli/{chunk-V4EK7ZZX.js → chunk-GBVTSWL3.js} +98 -98
- package/dist/cli/{chunk-WYI3VMTO.js → chunk-H6OYTU2Y.js} +6 -6
- package/dist/cli/{chunk-C44RZGM5.js → chunk-HR2RDDAC.js} +26 -26
- package/dist/cli/{chunk-XNWS2WJG.mjs → chunk-HREGFD2I.mjs} +1 -1
- package/dist/cli/{chunk-GW76IDID.js → chunk-JJSJ47CA.js} +22 -22
- package/dist/cli/{chunk-32NTC5UD.js → chunk-KEE57BF2.js} +7 -7
- package/dist/cli/{chunk-SJQ7Z3NI.js → chunk-KQW27FSR.js} +132 -81
- package/dist/cli/{chunk-D7Y7I4EE.js → chunk-L5V5SLI7.js} +2 -2
- package/dist/cli/{chunk-VKVLJTW5.js → chunk-MHTKWZM3.js} +9 -9
- package/dist/cli/{chunk-EADHDZW2.js → chunk-NBIDYAN6.js} +6 -6
- package/dist/cli/{chunk-E6L3NEFV.js → chunk-NQDUXVBK.js} +41 -41
- package/dist/cli/{chunk-QWEPCX6L.mjs → chunk-O2A4C4WP.mjs} +2 -2
- package/dist/cli/{chunk-KEXGBXUG.js → chunk-O7JU5GUR.js} +5 -5
- package/dist/cli/{chunk-MVFKZQ7E.js → chunk-QZINISXP.js} +3 -3
- package/dist/cli/{chunk-YVLPGYRS.mjs → chunk-RRCSFOF3.mjs} +1 -1
- package/dist/cli/{chunk-A5MYJM4K.mjs → chunk-S2HHY26V.mjs} +2 -2
- package/dist/cli/{chunk-M4Q4LEMM.js → chunk-SMDX4BM5.js} +2 -2
- package/dist/cli/{chunk-5KX3TWBK.mjs → chunk-T2QY36E3.mjs} +1 -1
- package/dist/cli/{chunk-OUM2V7R6.mjs → chunk-TFWREZYG.mjs} +6 -6
- package/dist/cli/{chunk-QQ4LNSY5.mjs → chunk-THQPLSJD.mjs} +1 -1
- package/dist/cli/{chunk-MHR3XVJD.js → chunk-TS6XF2QP.js} +5 -5
- package/dist/cli/{chunk-WL6GAZBD.js → chunk-V6LUMGVI.js} +3 -2
- package/dist/cli/{chunk-5DJUNUHN.mjs → chunk-VCRCMK7M.mjs} +5 -5
- package/dist/cli/{chunk-VYSQ76RP.js → chunk-VHHD5D44.js} +7 -7
- package/dist/cli/{chunk-KI63L5H3.mjs → chunk-VIC2MI4W.mjs} +2 -2
- package/dist/cli/{chunk-ERMDXXP5.mjs → chunk-VN432I4S.mjs} +1 -1
- package/dist/cli/{chunk-LNZILMVK.mjs → chunk-VWEDIFHT.mjs} +4 -4
- package/dist/cli/{chunk-I2YXEHDO.mjs → chunk-VZKCZO4J.mjs} +3 -3
- package/dist/cli/{chunk-2LKVNWRA.mjs → chunk-W5KSUNTE.mjs} +10 -10
- package/dist/cli/{chunk-X547OW3I.js → chunk-WU33X2QL.js} +16 -16
- package/dist/cli/{chunk-2FLRKNME.mjs → chunk-YM6JAKYP.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-EFIEDJA2.js → csv-4JBCPMEH.js} +13 -13
- package/dist/cli/{csv-VY2S7KKV.mjs → csv-LM44ZFL3.mjs} +4 -4
- package/dist/cli/{db-D32CBDTN.mjs → db-IFJEGJ6M.mjs} +6 -6
- package/dist/cli/{db-3DLI5TYW.js → db-UVNXGK6L.js} +27 -27
- package/dist/cli/describe-AF73GGH6.js +50 -0
- package/dist/cli/{describe-6MYKK2P3.mjs → describe-TWTOPGII.mjs} +18 -18
- package/dist/cli/{executions-QG3DEEY3.js → executions-3I6RU7AO.js} +8 -8
- package/dist/cli/{executions-U6TPX4RX.mjs → executions-NEV2P5MX.mjs} +6 -6
- package/dist/cli/{feedback-YZ6H4VMQ.mjs → feedback-IO5ZAWKK.mjs} +6 -6
- package/dist/cli/{feedback-ZSPW6NXL.js → feedback-NHO56EWZ.js} +14 -14
- package/dist/cli/git-AOKC6WL3.js +25 -0
- package/dist/cli/{git-ENN72IK4.mjs → git-MQISNZ5F.mjs} +5 -5
- package/dist/cli/index.js +145 -145
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{legacy-noops-MNA6LWJU.mjs → legacy-noops-DNRJHNQB.mjs} +6 -6
- package/dist/cli/{legacy-noops-Q6EVYIGN.js → legacy-noops-SLAQE7HN.js} +9 -9
- package/dist/cli/{monitors-BUH54HXJ.js → monitors-JRNATYS2.js} +100 -100
- package/dist/cli/{monitors-KENWEEWC.mjs → monitors-NAX7SUAR.mjs} +7 -7
- package/dist/cli/{org-HWOHKYP3.mjs → org-34VCNPUD.mjs} +6 -6
- package/dist/cli/{org-AHWQJMV7.js → org-BHOREX5D.js} +86 -86
- package/dist/cli/{pages-Z5R7NYEF.js → pages-GB337AQG.js} +18 -18
- package/dist/cli/{pages-I7DYTCW6.mjs → pages-ZWVHNJOE.mjs} +6 -6
- package/dist/cli/{play-3LXZB4ED.js → play-DAUQ7OAO.js} +317 -317
- package/dist/cli/{play-ET7CRVWJ.mjs → play-GJ7OEYSB.mjs} +18 -18
- package/dist/cli/{providers-GZSAZVHZ.mjs → providers-KA2RKD6E.mjs} +6 -6
- package/dist/cli/{providers-ZV2E7NGX.js → providers-W7QY5FUK.js} +9 -9
- package/dist/cli/{quickstart-5746NBS2.mjs → quickstart-7KOAL3BD.mjs} +4 -4
- package/dist/cli/{quickstart-VJZAT4RY.js → quickstart-D4DPUR7R.js} +6 -6
- package/dist/cli/{run-WOQ6XMTT.mjs → run-AYJSQED7.mjs} +23 -23
- package/dist/cli/{run-WGUAVYZC.js → run-QFVN2WUQ.js} +41 -41
- package/dist/cli/search-JVCK5AB4.js +33 -0
- package/dist/cli/{search-NNPFJYEW.mjs → search-MEE7OV2B.mjs} +8 -8
- package/dist/cli/{search-output-65HDEEFS.mjs → search-output-G36JH6D6.mjs} +4 -4
- package/dist/cli/{search-output-K4ISMPKD.js → search-output-OW6UPOI6.js} +6 -6
- package/dist/cli/{secrets-NBKGWMF4.js → secrets-CJJQJUJC.js} +15 -15
- package/dist/cli/{secrets-RK44OV3X.mjs → secrets-OFNYIJT6.mjs} +6 -6
- package/dist/cli/{sessions-ULQJJN3J.mjs → sessions-B6VCVU4Z.mjs} +6 -6
- package/dist/cli/sessions-DXN6BQ7Q.js +22 -0
- package/dist/cli/{settings-IHNA7X3Y.js → settings-H4Q524LF.js} +86 -86
- package/dist/cli/{settings-V5ZRL2EF.mjs → settings-PPFLSXDP.mjs} +13 -13
- package/dist/cli/{setup-HTEBFMOQ.js → setup-SJAM7XHR.js} +78 -63
- package/dist/cli/{setup-54VZPJGM.mjs → setup-WI3WDRRE.mjs} +28 -13
- package/dist/cli/skills-6MNJK2VQ.js +37 -0
- package/dist/cli/{skills-3FCPWMHX.mjs → skills-QSRYGMG2.mjs} +8 -8
- package/dist/cli/tools-OT43MSZE.js +57 -0
- package/dist/cli/{tools-2NTDNUQT.mjs → tools-RUC4ULAD.mjs} +17 -17
- package/dist/cli/{update-25MTBTGU.mjs → update-DPWNL2UB.mjs} +10 -10
- package/dist/cli/update-PHOSO3TL.js +35 -0
- package/dist/cli/{views-37K4JNNS.js → views-CVDVQALA.js} +18 -18
- package/dist/cli/{views-OBE5LUSW.mjs → views-JP66QRA3.mjs} +6 -6
- package/dist/cli/{workflow-6YTIHHJH.js → workflow-JM6JUI7I.js} +17 -17
- package/dist/cli/{workflow-HAPCL4K6.mjs → workflow-MVTX2PY3.mjs} +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +108 -106
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-QFIXECQV.js +0 -43
- package/dist/cli/describe-U6HM52X6.js +0 -50
- package/dist/cli/git-OBV73OVY.js +0 -25
- package/dist/cli/search-IGHNMXI4.js +0 -33
- package/dist/cli/sessions-ZJNV4SEL.js +0 -22
- package/dist/cli/skills-ZCJ6FOOK.js +0 -37
- package/dist/cli/tools-Q75XC2BS.js +0 -57
- package/dist/cli/update-3G3GO7IE.js +0 -35
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkKEE57BF2js = require('./chunk-KEE57BF2.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -22,14 +22,14 @@ var _chunk32NTC5UDjs = require('./chunk-32NTC5UD.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkBQ2KAFVQjs = require('./chunk-BQ2KAFVQ.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkCSMLW5VEjs = require('./chunk-CSMLW5VE.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
|
|
@@ -60,7 +60,7 @@ function statusBannerLine(value) {
|
|
|
60
60
|
return `Service notice: ${banner.message}`;
|
|
61
61
|
}
|
|
62
62
|
function envFilePath(baseUrl) {
|
|
63
|
-
return
|
|
63
|
+
return _chunkBQ2KAFVQjs.hostEnvFilePath.call(void 0, baseUrl);
|
|
64
64
|
}
|
|
65
65
|
function normalizeAuthScope(value) {
|
|
66
66
|
if (!value || value === "global") return "global";
|
|
@@ -73,7 +73,7 @@ function parseAuthScope(args) {
|
|
|
73
73
|
}
|
|
74
74
|
function pendingClaimPath(baseUrl, scope) {
|
|
75
75
|
if (scope === "folder") {
|
|
76
|
-
const target =
|
|
76
|
+
const target = _chunkBQ2KAFVQjs.resolveProjectPinTarget.call(void 0, );
|
|
77
77
|
if (!target.ok) {
|
|
78
78
|
throw new Error(
|
|
79
79
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -83,10 +83,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
83
83
|
}
|
|
84
84
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
85
85
|
}
|
|
86
|
-
return `${
|
|
86
|
+
return `${_chunkBQ2KAFVQjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
87
87
|
}
|
|
88
88
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
89
|
-
return `${
|
|
89
|
+
return `${_chunkBQ2KAFVQjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
90
90
|
}
|
|
91
91
|
function savePendingClaim(baseUrl, claim) {
|
|
92
92
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -143,6 +143,7 @@ function readPendingAuthClaim(baseUrl, scope) {
|
|
|
143
143
|
orgName: typeof parsed.orgName === "string" ? parsed.orgName.trim() : void 0,
|
|
144
144
|
...parsed.approvalLinkReporting === true ? { approvalLinkReporting: true } : {},
|
|
145
145
|
...typeof parsed.signupWorkspaceId === "string" ? { signupWorkspaceId: parsed.signupWorkspaceId } : {},
|
|
146
|
+
...parsed.device && { device: parsed.device },
|
|
146
147
|
// The record's own scope, when it has one. `register` writes this field
|
|
147
148
|
// precisely so a resume can learn where the credential belongs; reading
|
|
148
149
|
// back the caller's argument instead made it decorative, and a record
|
|
@@ -190,21 +191,21 @@ function parseRegisterWaitMode(args) {
|
|
|
190
191
|
function shouldWaitForRegisterClaim(mode) {
|
|
191
192
|
if (mode === "yes") return true;
|
|
192
193
|
if (mode === "no") return false;
|
|
193
|
-
return
|
|
194
|
+
return _chunkCSMLW5VEjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
194
195
|
}
|
|
195
196
|
function saveEnvValues(values, baseUrl, scope) {
|
|
196
197
|
const filtered = {
|
|
197
|
-
...values[
|
|
198
|
-
...values[
|
|
199
|
-
...values[
|
|
200
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
198
|
+
...values[_chunkBQ2KAFVQjs.HOST_URL_ENV] ? { [_chunkBQ2KAFVQjs.HOST_URL_ENV]: values[_chunkBQ2KAFVQjs.HOST_URL_ENV] } : {},
|
|
199
|
+
...values[_chunkBQ2KAFVQjs.API_KEY_ENV] ? { [_chunkBQ2KAFVQjs.API_KEY_ENV]: values[_chunkBQ2KAFVQjs.API_KEY_ENV] } : {},
|
|
200
|
+
...values[_chunkBQ2KAFVQjs.ACTIVE_ORG_ID_ENV] ? { [_chunkBQ2KAFVQjs.ACTIVE_ORG_ID_ENV]: values[_chunkBQ2KAFVQjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
201
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkBQ2KAFVQjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkBQ2KAFVQjs.ACTIVE_ORG_NAME_ENV]: values[_chunkBQ2KAFVQjs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
201
202
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
202
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
203
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkBQ2KAFVQjs.FEATURES_ENV) ? { [_chunkBQ2KAFVQjs.FEATURES_ENV]: values[_chunkBQ2KAFVQjs.FEATURES_ENV] } : {}
|
|
203
204
|
};
|
|
204
205
|
if (scope === "folder") {
|
|
205
|
-
|
|
206
|
+
_chunkBQ2KAFVQjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
206
207
|
} else {
|
|
207
|
-
|
|
208
|
+
_chunkBQ2KAFVQjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
208
209
|
}
|
|
209
210
|
}
|
|
210
211
|
function activeOrgEnvValues(data) {
|
|
@@ -212,21 +213,21 @@ function activeOrgEnvValues(data) {
|
|
|
212
213
|
if (!orgId) return {};
|
|
213
214
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
214
215
|
return {
|
|
215
|
-
[
|
|
216
|
-
[
|
|
217
|
-
...
|
|
216
|
+
[_chunkBQ2KAFVQjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
217
|
+
[_chunkBQ2KAFVQjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
218
|
+
..._chunkBQ2KAFVQjs.featureEnvValues.call(void 0, data)
|
|
218
219
|
};
|
|
219
220
|
}
|
|
220
221
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
221
222
|
const headers = {
|
|
222
223
|
"Content-Type": "application/json",
|
|
223
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
224
|
+
"User-Agent": `deepline-ts-sdk/${_chunkCSMLW5VEjs.SDK_VERSION}`,
|
|
224
225
|
"X-Deepline-Client-Family": "sdk",
|
|
225
226
|
"X-Deepline-CLI-Family": "sdk",
|
|
226
|
-
"X-Deepline-Agent-Runtime":
|
|
227
|
-
"X-Deepline-CLI-Version":
|
|
228
|
-
"X-Deepline-SDK-Version":
|
|
229
|
-
"X-Deepline-API-Contract":
|
|
227
|
+
"X-Deepline-Agent-Runtime": _chunkCSMLW5VEjs.detectAgentRuntime.call(void 0, ),
|
|
228
|
+
"X-Deepline-CLI-Version": _chunkCSMLW5VEjs.SDK_VERSION,
|
|
229
|
+
"X-Deepline-SDK-Version": _chunkCSMLW5VEjs.SDK_VERSION,
|
|
230
|
+
"X-Deepline-API-Contract": _chunkCSMLW5VEjs.SDK_API_CONTRACT
|
|
230
231
|
};
|
|
231
232
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
232
233
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -265,10 +266,10 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
265
266
|
if (failure.name === "AbortError" || failure.name === "TimeoutError") {
|
|
266
267
|
throw failure;
|
|
267
268
|
}
|
|
268
|
-
const causeCode =
|
|
269
|
+
const causeCode = _chunkCSMLW5VEjs.networkCauseCode.call(void 0, failure);
|
|
269
270
|
throw Object.assign(
|
|
270
271
|
new (0, _chunkSQWET4SLjs.DeeplineError)(
|
|
271
|
-
|
|
272
|
+
_chunkCSMLW5VEjs.connectionFailureMessage.call(void 0, new URL(url).origin, failure),
|
|
272
273
|
void 0,
|
|
273
274
|
"NETWORK_ERROR",
|
|
274
275
|
causeCode ? { causeCode } : void 0
|
|
@@ -285,7 +286,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
285
286
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
286
287
|
}
|
|
287
288
|
async function reportSetupCompleted(input) {
|
|
288
|
-
const apiKey = input.authScope === "folder" ?
|
|
289
|
+
const apiKey = input.authScope === "folder" ? _chunkBQ2KAFVQjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkBQ2KAFVQjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
289
290
|
if (!apiKey) return;
|
|
290
291
|
try {
|
|
291
292
|
await httpJson(
|
|
@@ -352,7 +353,7 @@ function printDeeplineLogo() {
|
|
|
352
353
|
}
|
|
353
354
|
console.log("DEEPLINE");
|
|
354
355
|
}
|
|
355
|
-
async function claimInstallBonus(baseUrl, apiKey) {
|
|
356
|
+
async function claimInstallBonus(baseUrl, apiKey, quiet = false) {
|
|
356
357
|
try {
|
|
357
358
|
const { status, data } = await httpJson(
|
|
358
359
|
"POST",
|
|
@@ -360,7 +361,7 @@ async function claimInstallBonus(baseUrl, apiKey) {
|
|
|
360
361
|
apiKey,
|
|
361
362
|
{}
|
|
362
363
|
);
|
|
363
|
-
if (status !== 200) return;
|
|
364
|
+
if (status !== 200 || quiet) return;
|
|
364
365
|
const granted = typeof data.credits_granted === "number" ? data.credits_granted : 0;
|
|
365
366
|
const alreadyGranted = data.already_granted === true;
|
|
366
367
|
if (granted > 0) {
|
|
@@ -414,7 +415,7 @@ function endClaimPollOnRefusal(status, data, baseUrl, authScope) {
|
|
|
414
415
|
return EXIT_SERVER;
|
|
415
416
|
}
|
|
416
417
|
async function handleRegister(args, options) {
|
|
417
|
-
const baseUrl =
|
|
418
|
+
const baseUrl = _chunkBQ2KAFVQjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
418
419
|
let orgName = "";
|
|
419
420
|
let orgId = "";
|
|
420
421
|
let agentName = "";
|
|
@@ -446,6 +447,7 @@ async function handleRegister(args, options) {
|
|
|
446
447
|
if (orgName) payload.org_name = orgName;
|
|
447
448
|
if (orgId) payload.org_id = orgId;
|
|
448
449
|
if (agentName) payload.agent_name = agentName;
|
|
450
|
+
payload.authorization = "device";
|
|
449
451
|
const { status, data } = await httpJson(
|
|
450
452
|
"POST",
|
|
451
453
|
`${baseUrl}/api/v2/auth/cli/register`,
|
|
@@ -469,32 +471,46 @@ async function handleRegister(args, options) {
|
|
|
469
471
|
...data.approval_link_reporting === true ? { approvalLinkReporting: true } : {},
|
|
470
472
|
...signupWorkspaceId ? { signupWorkspaceId } : {}
|
|
471
473
|
};
|
|
474
|
+
if (typeof data.device_code === "string" && typeof data.user_code === "string" && typeof data.interval === "number" && data.interval > 0 && typeof data.claim_expires_at === "string") {
|
|
475
|
+
const expiresAt = Date.parse(data.claim_expires_at);
|
|
476
|
+
if (!Number.isFinite(expiresAt))
|
|
477
|
+
throw new Error("Invalid device authorization expiry.");
|
|
478
|
+
pendingClaim.device = {
|
|
479
|
+
code: data.device_code,
|
|
480
|
+
userCode: data.user_code,
|
|
481
|
+
intervalMs: data.interval * 1e3,
|
|
482
|
+
expiresAt
|
|
483
|
+
};
|
|
484
|
+
}
|
|
472
485
|
if (claimToken) {
|
|
473
486
|
savePendingClaim(baseUrl, pendingClaim);
|
|
474
487
|
saveEnvValues(
|
|
475
488
|
{
|
|
476
|
-
[
|
|
489
|
+
[_chunkBQ2KAFVQjs.HOST_URL_ENV]: baseUrl
|
|
477
490
|
},
|
|
478
491
|
baseUrl,
|
|
479
492
|
authScope
|
|
480
493
|
);
|
|
481
494
|
}
|
|
482
|
-
if (claimUrl) {
|
|
483
|
-
const shouldOpen = waitMode !== "no" &&
|
|
484
|
-
console.log(
|
|
485
|
-
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
486
|
-
);
|
|
495
|
+
if (claimUrl && !_optionalChain([options, 'optionalAccess', _16 => _16.delegatedApproval])) {
|
|
496
|
+
const shouldOpen = waitMode !== "no" && _chunkCSMLW5VEjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
497
|
+
console.log(" Open this approval page in your browser:");
|
|
487
498
|
console.log(` ${claimUrl}`);
|
|
488
|
-
if (
|
|
489
|
-
|
|
499
|
+
if (pendingClaim.device) {
|
|
500
|
+
console.log(
|
|
501
|
+
` Click Approve if the page shows ${pendingClaim.device.userCode}.`
|
|
502
|
+
);
|
|
503
|
+
}
|
|
504
|
+
const opened = shouldOpen && _chunkKEE57BF2js.openInBrowser.call(void 0, claimUrl) === "opened";
|
|
505
|
+
if (claimToken && pendingClaim.approvalLinkReporting) {
|
|
490
506
|
await reportApprovalLinkShown(
|
|
491
507
|
baseUrl,
|
|
492
508
|
pendingClaim,
|
|
493
|
-
|
|
509
|
+
opened ? "auto" : "manual"
|
|
494
510
|
);
|
|
495
511
|
}
|
|
496
512
|
}
|
|
497
|
-
if (data.cli_message) {
|
|
513
|
+
if (data.cli_message && !_optionalChain([options, 'optionalAccess', _17 => _17.delegatedApproval])) {
|
|
498
514
|
console.log(String(data.cli_message));
|
|
499
515
|
}
|
|
500
516
|
if (!shouldWaitForRegisterClaim(waitMode)) return EXIT_OK;
|
|
@@ -502,6 +518,10 @@ async function handleRegister(args, options) {
|
|
|
502
518
|
console.error("Missing claim token from register response.");
|
|
503
519
|
return EXIT_SERVER;
|
|
504
520
|
}
|
|
521
|
+
if (pendingClaim.device) {
|
|
522
|
+
console.error("Waiting for browser approval\u2026");
|
|
523
|
+
return handleWait(["--timeout", "900", "--auth-scope", authScope]);
|
|
524
|
+
}
|
|
505
525
|
while (true) {
|
|
506
526
|
const { status: s, data: statusData } = await httpJson(
|
|
507
527
|
"POST",
|
|
@@ -534,8 +554,8 @@ async function handleRegister(args, options) {
|
|
|
534
554
|
if (apiKey) {
|
|
535
555
|
saveEnvValues(
|
|
536
556
|
{
|
|
537
|
-
[
|
|
538
|
-
[
|
|
557
|
+
[_chunkBQ2KAFVQjs.HOST_URL_ENV]: baseUrl,
|
|
558
|
+
[_chunkBQ2KAFVQjs.API_KEY_ENV]: apiKey,
|
|
539
559
|
...activeOrgEnvValues(statusData)
|
|
540
560
|
},
|
|
541
561
|
baseUrl,
|
|
@@ -556,8 +576,8 @@ async function handleRegister(args, options) {
|
|
|
556
576
|
await sleep(2e3);
|
|
557
577
|
}
|
|
558
578
|
}
|
|
559
|
-
async function handleWait(args) {
|
|
560
|
-
const baseUrl =
|
|
579
|
+
async function handleWait(args, options) {
|
|
580
|
+
const baseUrl = _chunkBQ2KAFVQjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
561
581
|
let timeoutSeconds = 300;
|
|
562
582
|
let requestedScope;
|
|
563
583
|
if (args.includes("--auth-scope")) {
|
|
@@ -579,23 +599,32 @@ async function handleWait(args) {
|
|
|
579
599
|
const resumed = resolvePendingAuthClaimForResume(baseUrl, requestedScope);
|
|
580
600
|
const pendingClaim = resumed.claim;
|
|
581
601
|
const authScope = resumed.scope;
|
|
582
|
-
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess',
|
|
602
|
+
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _18 => _18.claimToken]), () => ( ""));
|
|
583
603
|
if (!pendingClaim) {
|
|
584
|
-
const scopedApiKey = authScope === "folder" ?
|
|
604
|
+
const scopedApiKey = authScope === "folder" ? _chunkBQ2KAFVQjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkBQ2KAFVQjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
585
605
|
if (scopedApiKey) {
|
|
586
|
-
console.log("Already connected.");
|
|
606
|
+
if (!_optionalChain([options, 'optionalAccess', _19 => _19.quiet])) console.log("Already connected.");
|
|
587
607
|
return EXIT_OK;
|
|
588
608
|
}
|
|
589
609
|
console.error("No pending approval. Run: deepline auth register");
|
|
590
610
|
return EXIT_AUTH;
|
|
591
611
|
}
|
|
592
|
-
const
|
|
612
|
+
const device = pendingClaim.device;
|
|
613
|
+
const deadline = Math.min(
|
|
614
|
+
Date.now() + timeoutSeconds * 1e3,
|
|
615
|
+
_nullishCoalesce(_optionalChain([device, 'optionalAccess', _20 => _20.expiresAt]), () => ( Infinity))
|
|
616
|
+
);
|
|
617
|
+
const interval = _nullishCoalesce(_optionalChain([device, 'optionalAccess', _21 => _21.intervalMs]), () => ( 2e3));
|
|
593
618
|
while (Date.now() < deadline) {
|
|
594
619
|
const { status, data } = await httpJson(
|
|
595
620
|
"POST",
|
|
596
621
|
`${baseUrl}/api/v2/auth/cli/status`,
|
|
597
622
|
null,
|
|
598
|
-
{
|
|
623
|
+
{
|
|
624
|
+
claim_token: claimToken,
|
|
625
|
+
reveal: true,
|
|
626
|
+
...device && { device_code: device.code }
|
|
627
|
+
},
|
|
599
628
|
Math.min(AUTH_HTTP_TIMEOUT_MS, Math.max(1, deadline - Date.now()))
|
|
600
629
|
);
|
|
601
630
|
if (status === 401 || status === 403) {
|
|
@@ -603,14 +632,26 @@ async function handleWait(args) {
|
|
|
603
632
|
console.error("Claim is invalid. Run: deepline auth register");
|
|
604
633
|
return EXIT_AUTH;
|
|
605
634
|
}
|
|
635
|
+
if (device && status === 404) {
|
|
636
|
+
clearPendingClaim(baseUrl, authScope);
|
|
637
|
+
console.error(
|
|
638
|
+
"This device code is unavailable. Run: deepline auth register"
|
|
639
|
+
);
|
|
640
|
+
return EXIT_AUTH;
|
|
641
|
+
}
|
|
606
642
|
if (status >= 500 || status === 0) {
|
|
607
|
-
await sleep(Math.min(
|
|
643
|
+
await sleep(Math.min(interval, Math.max(0, deadline - Date.now())));
|
|
608
644
|
continue;
|
|
609
645
|
}
|
|
610
646
|
if (status >= 400) {
|
|
611
647
|
return endClaimPollOnRefusal(status, data, baseUrl, authScope);
|
|
612
648
|
}
|
|
613
649
|
const state = String(data.status || "").toLowerCase();
|
|
650
|
+
if (data.code === "DEVICE_AUTHORIZATION_DENIED") {
|
|
651
|
+
clearPendingClaim(baseUrl, authScope);
|
|
652
|
+
console.error("Device access was denied. Run: deepline auth register");
|
|
653
|
+
return EXIT_AUTH;
|
|
654
|
+
}
|
|
614
655
|
if (data.code === "REQUESTED_WORKSPACE_NOT_IN_ACCOUNT") {
|
|
615
656
|
clearPendingClaim(baseUrl, authScope);
|
|
616
657
|
console.error(
|
|
@@ -623,15 +664,16 @@ async function handleWait(args) {
|
|
|
623
664
|
if (apiKey) {
|
|
624
665
|
saveEnvValues(
|
|
625
666
|
{
|
|
626
|
-
[
|
|
627
|
-
[
|
|
667
|
+
[_chunkBQ2KAFVQjs.HOST_URL_ENV]: baseUrl,
|
|
668
|
+
[_chunkBQ2KAFVQjs.API_KEY_ENV]: apiKey,
|
|
628
669
|
...activeOrgEnvValues(data)
|
|
629
670
|
},
|
|
630
671
|
baseUrl,
|
|
631
672
|
authScope
|
|
632
673
|
);
|
|
633
674
|
clearPendingClaim(baseUrl, authScope);
|
|
634
|
-
await
|
|
675
|
+
if (_optionalChain([options, 'optionalAccess', _22 => _22.quiet])) await claimInstallBonus(baseUrl, apiKey, true);
|
|
676
|
+
else await printClaimSuccessBanner(baseUrl, apiKey, data);
|
|
635
677
|
return EXIT_OK;
|
|
636
678
|
}
|
|
637
679
|
}
|
|
@@ -640,7 +682,12 @@ async function handleWait(args) {
|
|
|
640
682
|
console.error("That approval link expired. Run: deepline auth register");
|
|
641
683
|
return EXIT_AUTH;
|
|
642
684
|
}
|
|
643
|
-
await sleep(Math.min(
|
|
685
|
+
await sleep(Math.min(interval, Math.max(0, deadline - Date.now())));
|
|
686
|
+
}
|
|
687
|
+
if (device && Date.now() >= device.expiresAt) {
|
|
688
|
+
clearPendingClaim(baseUrl, authScope);
|
|
689
|
+
console.error("That device code expired. Run: deepline auth register");
|
|
690
|
+
return EXIT_AUTH;
|
|
644
691
|
}
|
|
645
692
|
console.error(
|
|
646
693
|
"Still pending. Approve the browser link, then run: deepline auth wait"
|
|
@@ -648,8 +695,8 @@ async function handleWait(args) {
|
|
|
648
695
|
return EXIT_AUTH;
|
|
649
696
|
}
|
|
650
697
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
651
|
-
const baseUrl =
|
|
652
|
-
const apiKey =
|
|
698
|
+
const baseUrl = _chunkBQ2KAFVQjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
699
|
+
const apiKey = _chunkBQ2KAFVQjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
653
700
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
654
701
|
try {
|
|
655
702
|
const { status, data } = await httpJson(
|
|
@@ -672,9 +719,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
672
719
|
}
|
|
673
720
|
}
|
|
674
721
|
async function handleStatus(args) {
|
|
675
|
-
const baseUrl =
|
|
722
|
+
const baseUrl = _chunkBQ2KAFVQjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
676
723
|
const reveal = args.includes("--reveal");
|
|
677
|
-
const jsonOutput =
|
|
724
|
+
const jsonOutput = _chunkKEE57BF2js.argsWantJson.call(void 0, args);
|
|
678
725
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
679
726
|
let authScope = null;
|
|
680
727
|
if (hasExplicitAuthScope) {
|
|
@@ -715,25 +762,34 @@ async function handleStatus(args) {
|
|
|
715
762
|
};
|
|
716
763
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
717
764
|
}
|
|
718
|
-
const apiKey = authScope === "folder" ?
|
|
765
|
+
const apiKey = authScope === "folder" ? _chunkBQ2KAFVQjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkBQ2KAFVQjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkBQ2KAFVQjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
719
766
|
if (!apiKey) {
|
|
720
767
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
721
768
|
baseUrl,
|
|
722
769
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
723
770
|
);
|
|
724
771
|
if (pendingClaim) {
|
|
725
|
-
|
|
772
|
+
_chunkKEE57BF2js.printCommandEnvelope.call(void 0,
|
|
726
773
|
{
|
|
727
774
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
728
775
|
status: "pending",
|
|
729
776
|
connected: false,
|
|
730
777
|
authorization_url: pendingClaim.claimUrl || null,
|
|
778
|
+
...pendingClaim.device && {
|
|
779
|
+
user_code: pendingClaim.device.userCode
|
|
780
|
+
},
|
|
731
781
|
next: "deepline auth wait",
|
|
732
782
|
render: {
|
|
733
783
|
sections: [
|
|
734
784
|
{
|
|
735
785
|
title: "auth status",
|
|
736
|
-
lines: [
|
|
786
|
+
lines: [
|
|
787
|
+
...hostLines,
|
|
788
|
+
"Status: pending",
|
|
789
|
+
...pendingClaim.device ? [
|
|
790
|
+
`Confirm this code in your browser: ${pendingClaim.device.userCode}`
|
|
791
|
+
] : []
|
|
792
|
+
]
|
|
737
793
|
}
|
|
738
794
|
],
|
|
739
795
|
actions: [{ label: "Run", command: "deepline auth wait" }]
|
|
@@ -743,7 +799,7 @@ async function handleStatus(args) {
|
|
|
743
799
|
);
|
|
744
800
|
return EXIT_OK;
|
|
745
801
|
}
|
|
746
|
-
|
|
802
|
+
_chunkKEE57BF2js.printCommandEnvelope.call(void 0,
|
|
747
803
|
{
|
|
748
804
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
749
805
|
status: "not connected",
|
|
@@ -776,7 +832,7 @@ async function handleStatus(args) {
|
|
|
776
832
|
}
|
|
777
833
|
);
|
|
778
834
|
if (status === 401 || status === 403) {
|
|
779
|
-
|
|
835
|
+
_chunkKEE57BF2js.printCommandEnvelope.call(void 0,
|
|
780
836
|
{
|
|
781
837
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
782
838
|
status: "unauthorized",
|
|
@@ -803,7 +859,7 @@ async function handleStatus(args) {
|
|
|
803
859
|
console.error(`Auth status error (status ${status}).`);
|
|
804
860
|
return EXIT_SERVER;
|
|
805
861
|
}
|
|
806
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
862
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkBQ2KAFVQjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
807
863
|
clearSatisfiedPendingClaim(
|
|
808
864
|
baseUrl,
|
|
809
865
|
resolvedAuthScope,
|
|
@@ -831,28 +887,28 @@ async function handleStatus(args) {
|
|
|
831
887
|
if (apiKeyResp) {
|
|
832
888
|
saveEnvValues(
|
|
833
889
|
{
|
|
834
|
-
[
|
|
835
|
-
[
|
|
890
|
+
[_chunkBQ2KAFVQjs.HOST_URL_ENV]: baseUrl,
|
|
891
|
+
[_chunkBQ2KAFVQjs.API_KEY_ENV]: apiKeyResp,
|
|
836
892
|
...activeOrgEnvValues(data)
|
|
837
893
|
},
|
|
838
894
|
baseUrl,
|
|
839
895
|
resolvedAuthScope
|
|
840
896
|
);
|
|
841
897
|
if (resolvedAuthScope === "folder") {
|
|
842
|
-
const target =
|
|
898
|
+
const target = _chunkBQ2KAFVQjs.resolveProjectPinTarget.call(void 0, );
|
|
843
899
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
844
900
|
} else {
|
|
845
901
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
846
902
|
}
|
|
847
903
|
}
|
|
848
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
849
|
-
saveEnvValues(
|
|
904
|
+
} else if (resolvedAuthScope === "folder" || _chunkBQ2KAFVQjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
905
|
+
saveEnvValues(_chunkBQ2KAFVQjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
850
906
|
}
|
|
851
|
-
|
|
907
|
+
_chunkKEE57BF2js.printCommandEnvelope.call(void 0,
|
|
852
908
|
{
|
|
853
909
|
...payload,
|
|
854
|
-
...
|
|
855
|
-
command_context:
|
|
910
|
+
..._chunkCSMLW5VEjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
911
|
+
command_context: _chunkBQ2KAFVQjs.resolveCliCommandContext.call(void 0,
|
|
856
912
|
{ baseUrl, apiKey },
|
|
857
913
|
resolvedAuthScope
|
|
858
914
|
)
|
|
@@ -918,9 +974,9 @@ Notes:
|
|
|
918
974
|
"after",
|
|
919
975
|
`
|
|
920
976
|
Notes:
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
977
|
+
Prints an approval URL and a code. You can open the URL on another device.
|
|
978
|
+
Confirm that the browser shows the same code before approving. In Cowork or
|
|
979
|
+
with --no-wait, finish with deepline auth wait after approval.
|
|
924
980
|
The saved API key is scoped to the selected workspace and host.
|
|
925
981
|
|
|
926
982
|
Examples:
|
|
@@ -960,15 +1016,10 @@ Examples:
|
|
|
960
1016
|
deepline auth wait --timeout 120
|
|
961
1017
|
deepline auth wait --auth-scope folder --timeout 120
|
|
962
1018
|
`
|
|
963
|
-
).option("--timeout <seconds>", "Maximum seconds to wait", "300").option(
|
|
964
|
-
"--auth-scope <scope>",
|
|
965
|
-
"Credential scope: global or folder",
|
|
966
|
-
"global"
|
|
967
|
-
).action(async (options) => {
|
|
1019
|
+
).option("--timeout <seconds>", "Maximum seconds to wait", "300").option("--auth-scope <scope>", "Read only folder or global pending auth").action(async (options) => {
|
|
968
1020
|
process.exitCode = await handleWait([
|
|
969
1021
|
...options.timeout ? ["--timeout", options.timeout] : [],
|
|
970
|
-
"--auth-scope",
|
|
971
|
-
String(_nullishCoalesce(options.authScope, () => ( "global")))
|
|
1022
|
+
...options.authScope ? ["--auth-scope", String(options.authScope)] : []
|
|
972
1023
|
]);
|
|
973
1024
|
});
|
|
974
1025
|
auth.command("status").description("Show the current CLI auth and workspace status.").addHelpText(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkKEE57BF2js = require('./chunk-KEE57BF2.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/feedback-preferences.ts
|
|
6
6
|
|
|
@@ -57,7 +57,7 @@ function rejectRestrictedFeedback(options) {
|
|
|
57
57
|
const code = restriction === "off" ? "FEEDBACK_DISABLED" : "FEEDBACK_APPROVAL_REQUIRED";
|
|
58
58
|
const message = restriction === "off" ? 'Feedback is in mode "off". Do not ask the user if they want to send feedback. Use --requested only if they explicitly request it without being prompted.' : "Ask the user if they wish to send feedback. If they agree, rerun the send command with --requested. To change the setting, run deepline settings feedback --help. Agents must get user approval before turning feedback on.";
|
|
59
59
|
if (options.json) {
|
|
60
|
-
|
|
60
|
+
_chunkKEE57BF2js.printCommandEnvelope.call(void 0,
|
|
61
61
|
{ ok: false, code, exitCode: 2, message },
|
|
62
62
|
{ json: true }
|
|
63
63
|
);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkVHHD5D44js = require('./chunk-VHHD5D44.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk2KHUFWTKjs = require('./chunk-2KHUFWTK.js');
|
|
@@ -11,7 +11,7 @@ var _chunk2KHUFWTKjs = require('./chunk-2KHUFWTK.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkKEE57BF2js = require('./chunk-KEE57BF2.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
|
|
@@ -581,7 +581,7 @@ function parseInputFlagValue(raw) {
|
|
|
581
581
|
return raw;
|
|
582
582
|
}
|
|
583
583
|
function parsePlayRunOptions(args, initialInput = null) {
|
|
584
|
-
const selection =
|
|
584
|
+
const selection = _chunkKEE57BF2js.parseJsonFields.call(void 0, args, "run");
|
|
585
585
|
args = selection.args;
|
|
586
586
|
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--json] [--full] [--<input> value]\n Runs use the Absurd CJS runtime.\n --header '<name>: <value>' may repeat; each is sent on every request for this run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and deepline.dataset guidance.";
|
|
587
587
|
let filePath = null;
|
|
@@ -593,7 +593,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
593
593
|
let revisionSelector = null;
|
|
594
594
|
const watch = !args.includes("--no-wait");
|
|
595
595
|
const dryRun = args.includes("--dry-run");
|
|
596
|
-
let jsonOutput = dryRun ?
|
|
596
|
+
let jsonOutput = dryRun ? _chunkKEE57BF2js.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkKEE57BF2js.argsWantJson.call(void 0, args);
|
|
597
597
|
const fullJson = args.includes("--full");
|
|
598
598
|
const force = args.includes("--force") || args.includes("--from-start");
|
|
599
599
|
const forceToolRefresh = args.includes("--force-tool-refresh") || args.includes("--refresh-cache");
|
|
@@ -656,7 +656,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
656
656
|
"--log-level requires one of: debug, info, warn, error."
|
|
657
657
|
);
|
|
658
658
|
}
|
|
659
|
-
const parsed =
|
|
659
|
+
const parsed = _chunkVHHD5D44js.parseLogLevel.call(void 0, value);
|
|
660
660
|
if (!parsed) {
|
|
661
661
|
throw new Error(
|
|
662
662
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -974,7 +974,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
974
974
|
const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
|
|
975
975
|
(arg) => arg === "--log-level" || arg.startsWith("--log-level=")
|
|
976
976
|
);
|
|
977
|
-
let logLevel = options.logLevel === void 0 ? base.logLevel :
|
|
977
|
+
let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkVHHD5D44js.parseLogLevel.call(void 0, options.logLevel);
|
|
978
978
|
if (!logLevel)
|
|
979
979
|
throw new Error("--log-level requires one of: debug, info, warn, error.");
|
|
980
980
|
const debugAlias = options.logs || options.debug === true || inputArgs.some(
|
|
@@ -988,13 +988,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
988
988
|
if (debugAlias || debugMapLatency && logLevel === "info")
|
|
989
989
|
logLevel = "debug";
|
|
990
990
|
const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
|
|
991
|
-
const jsonFields = options.json === void 0 ? base.jsonFields :
|
|
992
|
-
[...fullJson ? ["--full"] : [], ...
|
|
991
|
+
const jsonFields = options.json === void 0 ? base.jsonFields : _chunkKEE57BF2js.parseJsonFields.call(void 0,
|
|
992
|
+
[...fullJson ? ["--full"] : [], ..._chunkKEE57BF2js.jsonFieldArgs.call(void 0, options.json)],
|
|
993
993
|
"run"
|
|
994
994
|
).fields;
|
|
995
995
|
const watch = options.wait === false ? false : base.watch;
|
|
996
996
|
const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
|
|
997
|
-
const jsonOutput = dryRun || !watch ? explicitJson ||
|
|
997
|
+
const jsonOutput = dryRun || !watch ? explicitJson || _chunkKEE57BF2js.argsWantJson.call(void 0, []) : explicitJson;
|
|
998
998
|
const verboseLogs = Boolean(
|
|
999
999
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
1000
1000
|
);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSMDX4BM5js = require('./chunk-SMDX4BM5.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkAQHMHYXXjs = require('./chunk-AQHMHYXX.js');
|
|
9
9
|
|
|
10
10
|
// src/cli/play-run-admission.ts
|
|
11
11
|
function usesInlinePlayAdmission(command, args) {
|
|
@@ -18,11 +18,11 @@ function usesCliPlayAdmission(command, args) {
|
|
|
18
18
|
}
|
|
19
19
|
async function checkPlayRunCompatibility(baseUrl, maintenancePolicy = "configured", signal) {
|
|
20
20
|
_optionalChain([signal, 'optionalAccess', _ => _.throwIfAborted, 'call', _2 => _2()]);
|
|
21
|
-
if (maintenancePolicy !== "off")
|
|
22
|
-
const compatibility = await
|
|
21
|
+
if (maintenancePolicy !== "off") _chunkAQHMHYXXjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
22
|
+
const compatibility = await _chunkSMDX4BM5js.traceCliSpan.call(void 0,
|
|
23
23
|
"cli.sdk_compatibility",
|
|
24
24
|
{ baseUrl, command: "plays run" },
|
|
25
|
-
() =>
|
|
25
|
+
() => _chunkAQHMHYXXjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
26
26
|
command: "plays run",
|
|
27
27
|
persistCache: maintenancePolicy !== "off",
|
|
28
28
|
signal
|
|
@@ -30,7 +30,7 @@ async function checkPlayRunCompatibility(baseUrl, maintenancePolicy = "configure
|
|
|
30
30
|
);
|
|
31
31
|
_optionalChain([signal, 'optionalAccess', _3 => _3.throwIfAborted, 'call', _4 => _4()]);
|
|
32
32
|
if (compatibility.error) throw compatibility.error;
|
|
33
|
-
|
|
33
|
+
_chunkAQHMHYXXjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
34
34
|
quietAdvisory: true
|
|
35
35
|
});
|
|
36
36
|
}
|