deepline 0.3.553 → 0.3.554
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/cli/{auth-I3QAU4RV.mjs → auth-HJUNW7T2.mjs} +5 -5
- package/dist/cli/auth-SP6SKZJZ.js +44 -0
- package/dist/cli/{billing-YGFFVAIC.js → billing-4TSA5HEC.js} +102 -102
- package/dist/cli/{billing-3IC54OQQ.mjs → billing-SJYRJAQ2.mjs} +9 -9
- package/dist/cli/{chunk-2B5B5KAW.js → chunk-2HMN5H54.js} +53 -50
- package/dist/cli/{chunk-72V4PDH5.mjs → chunk-2ORPFQUA.mjs} +3 -3
- package/dist/cli/{chunk-BVDKFS2T.js → chunk-2OVHNHCF.js} +2 -2
- package/dist/cli/{chunk-Z7AOIHFE.mjs → chunk-33WRQSQ2.mjs} +4 -0
- package/dist/cli/{chunk-HVI55MTK.js → chunk-3IKGZ4CG.js} +20 -10
- package/dist/cli/{chunk-INEMTYMT.mjs → chunk-3Z4VFCXO.mjs} +7 -7
- package/dist/cli/{chunk-HEBO3XNZ.js → chunk-4DOFGIEJ.js} +12 -12
- package/dist/cli/{chunk-LFOERUQY.mjs → chunk-52Q5KETX.mjs} +1 -1
- package/dist/cli/{chunk-AGLR6QVN.js → chunk-5CYZHOKI.js} +4 -4
- package/dist/cli/{chunk-HSJ6X2AQ.mjs → chunk-62AUAWQV.mjs} +4 -4
- package/dist/cli/{chunk-NDNHYONK.mjs → chunk-62HWJXST.mjs} +2 -2
- package/dist/cli/{chunk-QI5S5HWB.mjs → chunk-6EXOAT6T.mjs} +2 -2
- package/dist/cli/{chunk-Y6SP3JMI.js → chunk-7OWI736E.js} +30 -30
- package/dist/cli/{chunk-DZA7RFGL.mjs → chunk-B6HO2XWH.mjs} +13 -13
- package/dist/cli/{chunk-A7DLBE5K.mjs → chunk-BOZAP2EM.mjs} +10 -7
- package/dist/cli/chunk-BVXIGOBZ.js +32 -0
- package/dist/cli/{chunk-QG6JIWUL.mjs → chunk-D6Z6POKE.mjs} +5 -5
- package/dist/cli/{chunk-4BFTDNHU.mjs → chunk-DSKSFFK2.mjs} +1 -1
- package/dist/cli/{chunk-JLGP5XAJ.js → chunk-DUBXUAAO.js} +5 -5
- package/dist/cli/{chunk-IMX7J4DU.js → chunk-E74KGKFZ.js} +5 -5
- package/dist/cli/{chunk-YUA6HA6D.js → chunk-ECHKAC7M.js} +2 -2
- package/dist/cli/{chunk-IH6GDNKW.js → chunk-EN5NHCCQ.js} +17 -17
- package/dist/cli/{chunk-CAEBJOYU.mjs → chunk-F7CMRKSK.mjs} +1 -1
- package/dist/cli/{chunk-SBH4CKPN.js → chunk-FBAFX43W.js} +10 -10
- package/dist/cli/{chunk-GAVZ4EOD.mjs → chunk-FXQ3JKE3.mjs} +1 -1
- package/dist/cli/{chunk-55F6HNOY.mjs → chunk-GA2M3G3Y.mjs} +4 -4
- package/dist/cli/{chunk-Q6Z6N3A7.js → chunk-GHT2NDL7.js} +9 -9
- package/dist/cli/{chunk-WOCHZCUJ.js → chunk-GRZENGNE.js} +2 -2
- package/dist/cli/{chunk-7O6J6A7P.js → chunk-IVZKMJUK.js} +4 -0
- package/dist/cli/{chunk-SG3LUONJ.mjs → chunk-KVBQY4ST.mjs} +2 -2
- package/dist/cli/{chunk-AGIQDA2T.mjs → chunk-KZHBDMGF.mjs} +2 -2
- package/dist/cli/{chunk-TFEXSHPM.js → chunk-LY5MMXFF.js} +28 -14
- package/dist/cli/{chunk-RTV4RF7N.js → chunk-M7STM3MZ.js} +26 -26
- package/dist/cli/{chunk-7GEMELKI.js → chunk-OPTV7D2V.js} +431 -330
- package/dist/cli/{chunk-CACFJODG.js → chunk-OVEYWO4H.js} +8 -8
- package/dist/cli/{chunk-4HYNMXXF.mjs → chunk-PC2FTUCP.mjs} +2 -2
- package/dist/cli/{chunk-4747TPLV.js → chunk-PQQMPUCZ.js} +3 -3
- package/dist/cli/{chunk-45OAVGU6.mjs → chunk-Q7ACILL2.mjs} +2 -2
- package/dist/cli/{chunk-RMNOZKRI.mjs → chunk-RBBTCYQB.mjs} +3 -3
- package/dist/cli/{chunk-7YRJ5UC4.js → chunk-RTHMGSZX.js} +20 -20
- package/dist/cli/{chunk-OTV2UUKW.mjs → chunk-S6W6SJ6E.mjs} +1 -1
- package/dist/cli/chunk-STXDSVQZ.mjs +32 -0
- package/dist/cli/{chunk-UEVKMZLR.mjs → chunk-TGUQET3O.mjs} +14 -4
- package/dist/cli/{chunk-74RES4DS.js → chunk-TJ6HLN56.js} +5 -5
- package/dist/cli/{chunk-IUOGII7D.js → chunk-TOO3YM5N.js} +6 -6
- package/dist/cli/{chunk-UVQJYV76.mjs → chunk-UBBYHB2B.mjs} +2 -2
- package/dist/cli/{chunk-AGICYWGN.mjs → chunk-UC4BDZKI.mjs} +2 -2
- package/dist/cli/{chunk-6NE3RRRY.js → chunk-UNNOZKRT.js} +1 -1
- package/dist/cli/{chunk-FM7LPUPA.js → chunk-UOT7HPBH.js} +41 -41
- package/dist/cli/{chunk-DP2VH7CO.js → chunk-UYCZFQYQ.js} +11 -11
- package/dist/cli/{chunk-MLABYI4M.js → chunk-VIUUTEHY.js} +3 -3
- package/dist/cli/{chunk-LH5PZKER.mjs → chunk-VLO5NFH2.mjs} +1 -1
- package/dist/cli/{chunk-JJGWHITQ.mjs → chunk-VQ75KX7G.mjs} +2 -2
- package/dist/cli/{chunk-3NTP2OSG.js → chunk-VV4XGZ24.js} +13 -13
- package/dist/cli/{chunk-LRDHPOZW.js → chunk-W6CZDTIR.js} +53 -53
- package/dist/cli/{chunk-7SERLBNR.js → chunk-WL7P32PI.js} +20 -20
- package/dist/cli/{chunk-4SMCFQ23.mjs → chunk-XD3MFTHA.mjs} +1 -1
- package/dist/cli/{chunk-E7WZOX2A.mjs → chunk-XFZX6FNM.mjs} +20 -6
- package/dist/cli/{chunk-DP64MD6U.mjs → chunk-XU6QNM4D.mjs} +1 -1
- package/dist/cli/{chunk-TN4TY6TT.mjs → chunk-YCOGPOUX.mjs} +2 -2
- package/dist/cli/{chunk-XLIHTJVM.js → chunk-YQKCH4R7.js} +20 -20
- package/dist/cli/{chunk-Z6XPSHKM.mjs → chunk-YY55NYAH.mjs} +133 -32
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{concurrent-runs-help-DNV2X5AZ.mjs → concurrent-runs-help-O3Q5IPLF.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-ZFRZWX5V.js +22 -0
- package/dist/cli/{csv-SA6ELJY6.js → csv-4ZQ2RATI.js} +13 -13
- package/dist/cli/{csv-ZXZGHWOM.mjs → csv-Y3BFPEM6.mjs} +4 -4
- package/dist/cli/{db-A54SP6AD.mjs → db-3JYY4JNN.mjs} +7 -7
- package/dist/cli/{db-JHFEIQBU.js → db-VEIFS4M7.js} +29 -29
- package/dist/cli/describe-EVJ4MFVU.mjs +50 -0
- package/dist/cli/describe-FG625QPF.js +50 -0
- package/dist/cli/describe-core.js +5 -5
- package/dist/cli/describe-core.mjs +4 -4
- package/dist/cli/{executions-TLFZRHBJ.js → executions-HPZXOOVX.js} +8 -8
- package/dist/cli/{executions-HL2M2DFU.mjs → executions-PCXZKEHM.mjs} +6 -6
- package/dist/cli/{feedback-QMBTNXVG.mjs → feedback-Y6VKZNY6.mjs} +6 -6
- package/dist/cli/{feedback-5UEX5UZK.js → feedback-ZKFHFVL6.js} +14 -14
- package/dist/cli/git-RUBMALLH.js +26 -0
- package/dist/cli/{git-LKGXVIVC.mjs → git-UMPR2QYC.mjs} +5 -5
- package/dist/cli/index.js +147 -147
- package/dist/cli/index.mjs +46 -46
- package/dist/cli/{integrations-6RUTLMN7.js → integrations-3GQCTRTF.js} +15 -15
- package/dist/cli/{integrations-FGGRVUJ7.mjs → integrations-V3TM6XAB.mjs} +7 -7
- package/dist/cli/{legacy-noops-YIPRMVXZ.mjs → legacy-noops-JZBUD7ZE.mjs} +6 -6
- package/dist/cli/{legacy-noops-J3Z7QRWZ.js → legacy-noops-VYCO7NGW.js} +9 -9
- package/dist/cli/{mcp-6LWFP7RW.js → mcp-4OIWTCE6.js} +24 -24
- package/dist/cli/{mcp-CHDYFO7F.mjs → mcp-PH4KZ76P.mjs} +4 -4
- package/dist/cli/{monitors-STM6A7OU.js → monitors-E2A6VPBY.js} +100 -100
- package/dist/cli/{monitors-UGRY2BXI.mjs → monitors-SSMGIDGX.mjs} +7 -7
- package/dist/cli/{org-3SYOUQCX.mjs → org-SFDKSK5D.mjs} +6 -6
- package/dist/cli/{org-ZOBSNSIB.js → org-WUDZGWBT.js} +121 -121
- package/dist/cli/{outcomes-Z3P2JE67.mjs → outcomes-QT7LQBPK.mjs} +6 -6
- package/dist/cli/{outcomes-H4YYAT5X.js → outcomes-Y7SZTLSL.js} +14 -14
- package/dist/cli/{play-SN5YWLS7.mjs → play-EK7KSFPL.mjs} +21 -21
- package/dist/cli/{play-SM4CW2GS.js → play-GDNHCRRR.js} +372 -372
- package/dist/cli/{providers-WZ4YBR5Y.mjs → providers-FVZLRXAU.mjs} +6 -6
- package/dist/cli/{providers-WZARYMCF.js → providers-ZKOSECLV.js} +9 -9
- package/dist/cli/{quickstart-PS4YHQJ6.js → quickstart-KSDKIXYD.js} +6 -6
- package/dist/cli/{quickstart-2575BNKA.mjs → quickstart-UJZ6PIQV.mjs} +4 -4
- package/dist/cli/{run-ZUHCZOJS.mjs → run-E7MZ7P35.mjs} +30 -28
- package/dist/cli/{run-FLZ6OTM7.js → run-PD2BBG6S.js} +51 -49
- package/dist/cli/search-TKSPTPHA.js +32 -0
- package/dist/cli/{search-HLPPKQEO.mjs → search-VTFUFTOY.mjs} +7 -7
- package/dist/cli/{search-output-RXJLU36B.js → search-output-G2AGDCOY.js} +9 -9
- package/dist/cli/{search-output-PDAXNOGP.mjs → search-output-PFVXQCWA.mjs} +6 -6
- package/dist/cli/{secrets-CGELYQ3H.mjs → secrets-7CIMEMX7.mjs} +6 -6
- package/dist/cli/{secrets-QJNG7G2Y.js → secrets-BCOQ4U7U.js} +15 -15
- package/dist/cli/sessions-4CO556VD.js +23 -0
- package/dist/cli/{sessions-ELMWVR4M.mjs → sessions-IUCQZEF7.mjs} +6 -6
- package/dist/cli/{settings-RR3LZXL7.mjs → settings-KZN62UQK.mjs} +12 -12
- package/dist/cli/{settings-44I44P5F.js → settings-REL4736M.js} +85 -85
- package/dist/cli/{setup-KGWRWH4B.mjs → setup-2P7OG3OU.mjs} +11 -14
- package/dist/cli/{setup-KTEYOCJO.js → setup-2XIVBBCS.js} +51 -54
- package/dist/cli/skills-JYT5DEY6.js +37 -0
- package/dist/cli/{skills-FPRID2I5.mjs → skills-VIGNDJKI.mjs} +7 -7
- package/dist/cli/tools-NTVUQ2TG.js +57 -0
- package/dist/cli/{tools-PI4WMDLY.mjs → tools-W3QT5EJY.mjs} +20 -20
- package/dist/cli/{update-VJOJAZ7B.mjs → update-GZVBVMY3.mjs} +9 -9
- package/dist/cli/update-TWJZPUZM.js +37 -0
- package/dist/cli/{views-OVPSINZO.mjs → views-BOGEH424.mjs} +6 -6
- package/dist/cli/{views-NTUOLNQU.js → views-TOLJNLSV.js} +21 -21
- package/dist/cli/{workflow-2UDYDM6F.js → workflow-ENWFRK5M.js} +17 -17
- package/dist/cli/{workflow-7OEFNXZC.mjs → workflow-VDG2FDQV.mjs} +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +122 -122
- 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-MQCN7WGZ.js +0 -44
- package/dist/cli/chunk-AID3OYVJ.js +0 -8
- package/dist/cli/chunk-OVDNJAJN.mjs +0 -8
- package/dist/cli/concurrent-runs-help-CFJH4KXV.js +0 -22
- package/dist/cli/describe-PHQ33AGS.mjs +0 -50
- package/dist/cli/describe-RHJ4XRFI.js +0 -50
- package/dist/cli/git-4JWOOHBG.js +0 -26
- package/dist/cli/search-JJWVHR3N.js +0 -32
- package/dist/cli/sessions-DHTBT2GN.js +0 -23
- package/dist/cli/skills-EPZPEXI2.js +0 -37
- package/dist/cli/tools-IGQQ5TML.js +0 -57
- package/dist/cli/update-4RNCVYGE.js +0 -37
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkYQKCH4R7js = require('./chunk-YQKCH4R7.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -22,14 +22,14 @@ var _chunkXLIHTJVMjs = require('./chunk-XLIHTJVM.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkVIUUTEHYjs = require('./chunk-VIUUTEHY.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunk5CYZHOKIjs = require('./chunk-5CYZHOKI.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.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 _chunkVIUUTEHYjs.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 = _chunkVIUUTEHYjs.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 `${_chunkVIUUTEHYjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
87
87
|
}
|
|
88
88
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
89
|
-
return `${
|
|
89
|
+
return `${_chunkVIUUTEHYjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
90
90
|
}
|
|
91
91
|
function savePendingClaim(baseUrl, claim) {
|
|
92
92
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -191,21 +191,21 @@ function parseRegisterWaitMode(args) {
|
|
|
191
191
|
function shouldWaitForRegisterClaim(mode) {
|
|
192
192
|
if (mode === "yes") return true;
|
|
193
193
|
if (mode === "no") return false;
|
|
194
|
-
return
|
|
194
|
+
return _chunk5CYZHOKIjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
195
195
|
}
|
|
196
196
|
function saveEnvValues(values, baseUrl, scope) {
|
|
197
197
|
const filtered = {
|
|
198
|
-
...values[
|
|
199
|
-
...values[
|
|
200
|
-
...values[
|
|
201
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
198
|
+
...values[_chunkVIUUTEHYjs.HOST_URL_ENV] ? { [_chunkVIUUTEHYjs.HOST_URL_ENV]: values[_chunkVIUUTEHYjs.HOST_URL_ENV] } : {},
|
|
199
|
+
...values[_chunkVIUUTEHYjs.API_KEY_ENV] ? { [_chunkVIUUTEHYjs.API_KEY_ENV]: values[_chunkVIUUTEHYjs.API_KEY_ENV] } : {},
|
|
200
|
+
...values[_chunkVIUUTEHYjs.ACTIVE_ORG_ID_ENV] ? { [_chunkVIUUTEHYjs.ACTIVE_ORG_ID_ENV]: values[_chunkVIUUTEHYjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
201
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkVIUUTEHYjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkVIUUTEHYjs.ACTIVE_ORG_NAME_ENV]: values[_chunkVIUUTEHYjs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
202
202
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
203
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
203
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkVIUUTEHYjs.FEATURES_ENV) ? { [_chunkVIUUTEHYjs.FEATURES_ENV]: values[_chunkVIUUTEHYjs.FEATURES_ENV] } : {}
|
|
204
204
|
};
|
|
205
205
|
if (scope === "folder") {
|
|
206
|
-
|
|
206
|
+
_chunkVIUUTEHYjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
207
207
|
} else {
|
|
208
|
-
|
|
208
|
+
_chunkVIUUTEHYjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
function activeOrgEnvValues(data) {
|
|
@@ -213,21 +213,21 @@ function activeOrgEnvValues(data) {
|
|
|
213
213
|
if (!orgId) return {};
|
|
214
214
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
215
215
|
return {
|
|
216
|
-
[
|
|
217
|
-
[
|
|
218
|
-
...
|
|
216
|
+
[_chunkVIUUTEHYjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
217
|
+
[_chunkVIUUTEHYjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
218
|
+
..._chunkVIUUTEHYjs.featureEnvValues.call(void 0, data)
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
222
222
|
const headers = {
|
|
223
223
|
"Content-Type": "application/json",
|
|
224
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
224
|
+
"User-Agent": `deepline-ts-sdk/${_chunk5CYZHOKIjs.SDK_VERSION}`,
|
|
225
225
|
"X-Deepline-Client-Family": "sdk",
|
|
226
226
|
"X-Deepline-CLI-Family": "sdk",
|
|
227
|
-
"X-Deepline-Agent-Runtime":
|
|
228
|
-
"X-Deepline-CLI-Version":
|
|
229
|
-
"X-Deepline-SDK-Version":
|
|
230
|
-
"X-Deepline-API-Contract":
|
|
227
|
+
"X-Deepline-Agent-Runtime": _chunk5CYZHOKIjs.detectAgentRuntime.call(void 0, ),
|
|
228
|
+
"X-Deepline-CLI-Version": _chunk5CYZHOKIjs.SDK_VERSION,
|
|
229
|
+
"X-Deepline-SDK-Version": _chunk5CYZHOKIjs.SDK_VERSION,
|
|
230
|
+
"X-Deepline-API-Contract": _chunk5CYZHOKIjs.SDK_API_CONTRACT
|
|
231
231
|
};
|
|
232
232
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
233
233
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -266,10 +266,10 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
266
266
|
if (failure.name === "AbortError" || failure.name === "TimeoutError") {
|
|
267
267
|
throw failure;
|
|
268
268
|
}
|
|
269
|
-
const causeCode =
|
|
269
|
+
const causeCode = _chunk5CYZHOKIjs.networkCauseCode.call(void 0, failure);
|
|
270
270
|
throw Object.assign(
|
|
271
271
|
new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
272
|
-
|
|
272
|
+
_chunk5CYZHOKIjs.connectionFailureMessage.call(void 0, new URL(url).origin, failure),
|
|
273
273
|
void 0,
|
|
274
274
|
"NETWORK_ERROR",
|
|
275
275
|
causeCode ? { causeCode } : void 0
|
|
@@ -286,7 +286,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
286
286
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
287
287
|
}
|
|
288
288
|
async function reportSetupCompleted(input) {
|
|
289
|
-
const apiKey = input.authScope === "folder" ?
|
|
289
|
+
const apiKey = input.authScope === "folder" ? _chunkVIUUTEHYjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkVIUUTEHYjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
290
290
|
if (!apiKey) return;
|
|
291
291
|
try {
|
|
292
292
|
await httpJson(
|
|
@@ -415,7 +415,7 @@ function endClaimPollOnRefusal(status, data, baseUrl, authScope) {
|
|
|
415
415
|
return EXIT_SERVER;
|
|
416
416
|
}
|
|
417
417
|
async function handleRegister(args, options) {
|
|
418
|
-
const baseUrl =
|
|
418
|
+
const baseUrl = _chunkVIUUTEHYjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
419
419
|
let orgName = "";
|
|
420
420
|
let orgId = "";
|
|
421
421
|
let agentName = "";
|
|
@@ -486,14 +486,14 @@ async function handleRegister(args, options) {
|
|
|
486
486
|
savePendingClaim(baseUrl, pendingClaim);
|
|
487
487
|
saveEnvValues(
|
|
488
488
|
{
|
|
489
|
-
[
|
|
489
|
+
[_chunkVIUUTEHYjs.HOST_URL_ENV]: baseUrl
|
|
490
490
|
},
|
|
491
491
|
baseUrl,
|
|
492
492
|
authScope
|
|
493
493
|
);
|
|
494
494
|
}
|
|
495
495
|
if (claimUrl && !_optionalChain([options, 'optionalAccess', _16 => _16.delegatedApproval])) {
|
|
496
|
-
const shouldOpen = waitMode !== "no" &&
|
|
496
|
+
const shouldOpen = waitMode !== "no" && _chunk5CYZHOKIjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
497
497
|
console.log(" Open this approval page in your browser:");
|
|
498
498
|
console.log(` ${claimUrl}`);
|
|
499
499
|
if (pendingClaim.device) {
|
|
@@ -501,7 +501,7 @@ async function handleRegister(args, options) {
|
|
|
501
501
|
` Click Approve if the page shows ${pendingClaim.device.userCode}.`
|
|
502
502
|
);
|
|
503
503
|
}
|
|
504
|
-
const opened = shouldOpen &&
|
|
504
|
+
const opened = shouldOpen && _chunkYQKCH4R7js.openInBrowser.call(void 0, claimUrl) === "opened";
|
|
505
505
|
if (claimToken && pendingClaim.approvalLinkReporting) {
|
|
506
506
|
await reportApprovalLinkShown(
|
|
507
507
|
baseUrl,
|
|
@@ -554,8 +554,8 @@ async function handleRegister(args, options) {
|
|
|
554
554
|
if (apiKey) {
|
|
555
555
|
saveEnvValues(
|
|
556
556
|
{
|
|
557
|
-
[
|
|
558
|
-
[
|
|
557
|
+
[_chunkVIUUTEHYjs.HOST_URL_ENV]: baseUrl,
|
|
558
|
+
[_chunkVIUUTEHYjs.API_KEY_ENV]: apiKey,
|
|
559
559
|
...activeOrgEnvValues(statusData)
|
|
560
560
|
},
|
|
561
561
|
baseUrl,
|
|
@@ -577,7 +577,7 @@ async function handleRegister(args, options) {
|
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
async function handleWait(args, options) {
|
|
580
|
-
const baseUrl =
|
|
580
|
+
const baseUrl = _chunkVIUUTEHYjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
581
581
|
let timeoutSeconds = 300;
|
|
582
582
|
let requestedScope;
|
|
583
583
|
if (args.includes("--auth-scope")) {
|
|
@@ -601,7 +601,7 @@ async function handleWait(args, options) {
|
|
|
601
601
|
const authScope = resumed.scope;
|
|
602
602
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _18 => _18.claimToken]), () => ( ""));
|
|
603
603
|
if (!pendingClaim) {
|
|
604
|
-
const scopedApiKey = authScope === "folder" ?
|
|
604
|
+
const scopedApiKey = authScope === "folder" ? _chunkVIUUTEHYjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkVIUUTEHYjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
605
605
|
if (scopedApiKey) {
|
|
606
606
|
if (!_optionalChain([options, 'optionalAccess', _19 => _19.quiet])) console.log("Already connected.");
|
|
607
607
|
return EXIT_OK;
|
|
@@ -664,8 +664,8 @@ async function handleWait(args, options) {
|
|
|
664
664
|
if (apiKey) {
|
|
665
665
|
saveEnvValues(
|
|
666
666
|
{
|
|
667
|
-
[
|
|
668
|
-
[
|
|
667
|
+
[_chunkVIUUTEHYjs.HOST_URL_ENV]: baseUrl,
|
|
668
|
+
[_chunkVIUUTEHYjs.API_KEY_ENV]: apiKey,
|
|
669
669
|
...activeOrgEnvValues(data)
|
|
670
670
|
},
|
|
671
671
|
baseUrl,
|
|
@@ -695,8 +695,8 @@ async function handleWait(args, options) {
|
|
|
695
695
|
return EXIT_AUTH;
|
|
696
696
|
}
|
|
697
697
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
698
|
-
const baseUrl =
|
|
699
|
-
const apiKey =
|
|
698
|
+
const baseUrl = _chunkVIUUTEHYjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
699
|
+
const apiKey = _chunkVIUUTEHYjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
700
700
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
701
701
|
try {
|
|
702
702
|
const { status, data } = await httpJson(
|
|
@@ -719,9 +719,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
721
|
async function handleStatus(args) {
|
|
722
|
-
const baseUrl =
|
|
722
|
+
const baseUrl = _chunkVIUUTEHYjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
723
723
|
const reveal = args.includes("--reveal");
|
|
724
|
-
const jsonOutput =
|
|
724
|
+
const jsonOutput = _chunkYQKCH4R7js.argsWantJson.call(void 0, args);
|
|
725
725
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
726
726
|
let authScope = null;
|
|
727
727
|
if (hasExplicitAuthScope) {
|
|
@@ -762,14 +762,14 @@ async function handleStatus(args) {
|
|
|
762
762
|
};
|
|
763
763
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
764
764
|
}
|
|
765
|
-
const apiKey = authScope === "folder" ?
|
|
765
|
+
const apiKey = authScope === "folder" ? _chunkVIUUTEHYjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkVIUUTEHYjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkVIUUTEHYjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
766
766
|
if (!apiKey) {
|
|
767
767
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
768
768
|
baseUrl,
|
|
769
769
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
770
770
|
);
|
|
771
771
|
if (pendingClaim) {
|
|
772
|
-
|
|
772
|
+
_chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
|
|
773
773
|
{
|
|
774
774
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
775
775
|
status: "pending",
|
|
@@ -799,7 +799,7 @@ async function handleStatus(args) {
|
|
|
799
799
|
);
|
|
800
800
|
return EXIT_OK;
|
|
801
801
|
}
|
|
802
|
-
|
|
802
|
+
_chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
|
|
803
803
|
{
|
|
804
804
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
805
805
|
status: "not connected",
|
|
@@ -832,7 +832,7 @@ async function handleStatus(args) {
|
|
|
832
832
|
}
|
|
833
833
|
);
|
|
834
834
|
if (status === 401 || status === 403) {
|
|
835
|
-
|
|
835
|
+
_chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
|
|
836
836
|
{
|
|
837
837
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
838
838
|
status: "unauthorized",
|
|
@@ -859,7 +859,7 @@ async function handleStatus(args) {
|
|
|
859
859
|
console.error(`Auth status error (status ${status}).`);
|
|
860
860
|
return EXIT_SERVER;
|
|
861
861
|
}
|
|
862
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
862
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkVIUUTEHYjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
863
863
|
clearSatisfiedPendingClaim(
|
|
864
864
|
baseUrl,
|
|
865
865
|
resolvedAuthScope,
|
|
@@ -887,28 +887,28 @@ async function handleStatus(args) {
|
|
|
887
887
|
if (apiKeyResp) {
|
|
888
888
|
saveEnvValues(
|
|
889
889
|
{
|
|
890
|
-
[
|
|
891
|
-
[
|
|
890
|
+
[_chunkVIUUTEHYjs.HOST_URL_ENV]: baseUrl,
|
|
891
|
+
[_chunkVIUUTEHYjs.API_KEY_ENV]: apiKeyResp,
|
|
892
892
|
...activeOrgEnvValues(data)
|
|
893
893
|
},
|
|
894
894
|
baseUrl,
|
|
895
895
|
resolvedAuthScope
|
|
896
896
|
);
|
|
897
897
|
if (resolvedAuthScope === "folder") {
|
|
898
|
-
const target =
|
|
898
|
+
const target = _chunkVIUUTEHYjs.resolveProjectPinTarget.call(void 0, );
|
|
899
899
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
900
900
|
} else {
|
|
901
901
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
905
|
-
saveEnvValues(
|
|
904
|
+
} else if (resolvedAuthScope === "folder" || _chunkVIUUTEHYjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
905
|
+
saveEnvValues(_chunkVIUUTEHYjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
906
906
|
}
|
|
907
|
-
|
|
907
|
+
_chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
|
|
908
908
|
{
|
|
909
909
|
...payload,
|
|
910
|
-
...
|
|
911
|
-
command_context:
|
|
910
|
+
..._chunk5CYZHOKIjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
911
|
+
command_context: _chunkVIUUTEHYjs.resolveCliCommandContext.call(void 0,
|
|
912
912
|
{ baseUrl, apiKey },
|
|
913
913
|
resolvedAuthScope
|
|
914
914
|
)
|
|
@@ -1,23 +1,23 @@
|
|
|
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 _chunkECHKAC7Mjs = require('./chunk-ECHKAC7M.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkUOT7HPBHjs = require('./chunk-UOT7HPBH.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk2HMN5H54js = require('./chunk-2HMN5H54.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkYQKCH4R7js = require('./chunk-YQKCH4R7.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkVIUUTEHYjs = require('./chunk-VIUUTEHY.js');
|
|
21
21
|
|
|
22
22
|
// src/cli/commands/update.ts
|
|
23
23
|
var _child_process = require('child_process');
|
|
@@ -499,7 +499,7 @@ function normalizedNpmPrefix(value) {
|
|
|
499
499
|
}
|
|
500
500
|
function resolveNpmGlobalPrefix(env) {
|
|
501
501
|
try {
|
|
502
|
-
const plan =
|
|
502
|
+
const plan = _chunk2HMN5H54js.resolveShellSpawn.call(void 0,
|
|
503
503
|
"npm",
|
|
504
504
|
["prefix", "-g"],
|
|
505
505
|
process.platform,
|
|
@@ -561,8 +561,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
561
561
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
562
562
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
563
563
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
564
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
565
|
-
const npmGlobalInstallFlags =
|
|
564
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkECHKAC7Mjs.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
565
|
+
const npmGlobalInstallFlags = _chunkECHKAC7Mjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
566
566
|
const args = installPrefix ? [
|
|
567
567
|
"install",
|
|
568
568
|
"-g",
|
|
@@ -572,7 +572,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
572
572
|
packageSpec
|
|
573
573
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
574
574
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
575
|
-
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) ||
|
|
575
|
+
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunkVIUUTEHYjs.autoDetectBaseUrl.call(void 0, )
|
|
576
576
|
);
|
|
577
577
|
return {
|
|
578
578
|
kind: "npm-global",
|
|
@@ -821,7 +821,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
821
821
|
function runCommand(command, args, env = process.env) {
|
|
822
822
|
return new Promise((resolveResult) => {
|
|
823
823
|
let output = "";
|
|
824
|
-
const plan =
|
|
824
|
+
const plan = _chunk2HMN5H54js.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
825
825
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
826
826
|
windowsHide: true,
|
|
827
827
|
stdio: ["inherit", "pipe", "pipe"],
|
|
@@ -1169,7 +1169,7 @@ function normalizePinnedVersion(value) {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
async function readPinMetadata(registryUrl, version) {
|
|
1171
1171
|
const controller = new AbortController();
|
|
1172
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
1172
|
+
const timeout = setTimeout(() => controller.abort(), _chunkVIUUTEHYjs.DEFAULT_TIMEOUT);
|
|
1173
1173
|
try {
|
|
1174
1174
|
const response = await fetch(
|
|
1175
1175
|
new URL(
|
|
@@ -1185,7 +1185,7 @@ async function readPinMetadata(registryUrl, version) {
|
|
|
1185
1185
|
if (!response.ok) {
|
|
1186
1186
|
return {
|
|
1187
1187
|
kind: "miss",
|
|
1188
|
-
transient:
|
|
1188
|
+
transient: _chunkVIUUTEHYjs.TRANSIENT_HTTP_STATUSES.has(response.status),
|
|
1189
1189
|
error: new Error(`${registryUrl} returned HTTP ${response.status}`)
|
|
1190
1190
|
};
|
|
1191
1191
|
}
|
|
@@ -1219,8 +1219,8 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl, retry =
|
|
|
1219
1219
|
"https://registry.npmjs.org/",
|
|
1220
1220
|
...fallbackRegistryUrl ? [fallbackRegistryUrl] : []
|
|
1221
1221
|
];
|
|
1222
|
-
const maxRetries = _nullishCoalesce(retry.maxRetries, () => (
|
|
1223
|
-
const backoffMs = _nullishCoalesce(retry.backoffMs, () => (
|
|
1222
|
+
const maxRetries = _nullishCoalesce(retry.maxRetries, () => ( _chunkVIUUTEHYjs.DEFAULT_MAX_RETRIES));
|
|
1223
|
+
const backoffMs = _nullishCoalesce(retry.backoffMs, () => ( _chunkVIUUTEHYjs.defaultRetryBackoffMs));
|
|
1224
1224
|
let lastError = null;
|
|
1225
1225
|
for (let round = 1; ; round += 1) {
|
|
1226
1226
|
let transientOnly = true;
|
|
@@ -1283,14 +1283,14 @@ async function resolveInstalledVersionIfLatest(plan) {
|
|
|
1283
1283
|
return null;
|
|
1284
1284
|
}
|
|
1285
1285
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1286
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1286
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkVIUUTEHYjs.autoDetectBaseUrl));
|
|
1287
1287
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1288
1288
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1289
1289
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1290
1290
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1291
1291
|
process.stdout.write = (() => true);
|
|
1292
1292
|
try {
|
|
1293
|
-
const exitCode = await
|
|
1293
|
+
const exitCode = await _chunkUOT7HPBHjs.runSkillsCommand.call(void 0, { json: true });
|
|
1294
1294
|
if (exitCode !== 0) {
|
|
1295
1295
|
throw new Error(
|
|
1296
1296
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1363,7 +1363,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1363
1363
|
};
|
|
1364
1364
|
if (options.json && !options.executeWithJson) {
|
|
1365
1365
|
const upToDateVersion2 = pinnedVersion || options.force ? null : await resolveUpToDateVersion(plan);
|
|
1366
|
-
|
|
1366
|
+
_chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
|
|
1367
1367
|
{
|
|
1368
1368
|
...plan,
|
|
1369
1369
|
updated: false,
|
|
@@ -1375,7 +1375,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1375
1375
|
return 0;
|
|
1376
1376
|
}
|
|
1377
1377
|
if (options.printCommand) {
|
|
1378
|
-
|
|
1378
|
+
_chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
|
|
1379
1379
|
{
|
|
1380
1380
|
...plan,
|
|
1381
1381
|
render: {
|
|
@@ -1388,7 +1388,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1388
1388
|
return 0;
|
|
1389
1389
|
}
|
|
1390
1390
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1391
|
-
|
|
1391
|
+
_chunkYQKCH4R7js.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1392
1392
|
return 0;
|
|
1393
1393
|
}
|
|
1394
1394
|
const upToDateVersion = pinnedVersion || options.force ? null : await resolveUpToDateVersion(plan);
|
|
@@ -1426,7 +1426,7 @@ To retry with full installer output, run: deepline skills install
|
|
|
1426
1426
|
);
|
|
1427
1427
|
}
|
|
1428
1428
|
if (options.executeWithJson && options.json) {
|
|
1429
|
-
|
|
1429
|
+
_chunkYQKCH4R7js.printCommandEnvelope.call(void 0,
|
|
1430
1430
|
{
|
|
1431
1431
|
ok: true,
|
|
1432
1432
|
pinnedVersion,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
exampleInputFileLine,
|
|
3
|
+
exampleJsonInput
|
|
4
|
+
} from "./chunk-STXDSVQZ.mjs";
|
|
4
5
|
import {
|
|
5
6
|
cloneEditStarter
|
|
6
7
|
} from "./chunk-PSX3WHIH.mjs";
|
|
@@ -606,7 +607,9 @@ function examples(described, options) {
|
|
|
606
607
|
if (!(error instanceof InputFileExampleRequired)) throw error;
|
|
607
608
|
}
|
|
608
609
|
const input = inputValue && JSON.stringify(inputValue);
|
|
609
|
-
const
|
|
610
|
+
const jsonInput = input === void 0 ? void 0 : exampleJsonInput(input, options.platform);
|
|
611
|
+
const inputArgument = jsonInput?.argument ?? "--input-file input.json";
|
|
612
|
+
const inputFile = jsonInput?.file ? { inputFile: jsonInput.file } : {};
|
|
610
613
|
const inputExpression = input ?? "input";
|
|
611
614
|
const read = options.verbose ? described.outputs : described.outputs.filter((field) => !field.secondary).slice(0, 1);
|
|
612
615
|
const reads = (expression) => read.flatMap((field) => {
|
|
@@ -629,6 +632,7 @@ function examples(described, options) {
|
|
|
629
632
|
return {
|
|
630
633
|
cli: `deepline run ${runner.toolId} ${inputArgument}`,
|
|
631
634
|
...inputValue ? { input: inputValue } : {},
|
|
635
|
+
...inputFile,
|
|
632
636
|
play: playFunction(
|
|
633
637
|
[
|
|
634
638
|
"const result = await deepline.tools.execute({",
|
|
@@ -647,6 +651,7 @@ function examples(described, options) {
|
|
|
647
651
|
return {
|
|
648
652
|
cli: `deepline run ${runner.reference} ${inputArgument}`,
|
|
649
653
|
...inputValue ? { input: inputValue } : {},
|
|
654
|
+
...inputFile,
|
|
650
655
|
play: playFunction(
|
|
651
656
|
[
|
|
652
657
|
`const output = await deepline.runPlay('${safeIdentifier(runner.reference.replace(/^.*\//, ""))}', '${runner.reference}', ${inputExpression});`,
|
|
@@ -681,7 +686,7 @@ function discoveryAuthLines(auth) {
|
|
|
681
686
|
]);
|
|
682
687
|
}
|
|
683
688
|
function describedLines(described, view) {
|
|
684
|
-
const { cli, play } = examples(described, view);
|
|
689
|
+
const { cli, play, inputFile } = examples(described, view);
|
|
685
690
|
const explanation = EXPLANATIONS[described.runner.via];
|
|
686
691
|
const indented = (text) => text.split("\n").map((line) => ` ${line}`);
|
|
687
692
|
const section = (lines) => lines.length ? ["", ...lines] : [];
|
|
@@ -711,6 +716,7 @@ function describedLines(described, view) {
|
|
|
711
716
|
...section(
|
|
712
717
|
view.cli ? [
|
|
713
718
|
"Run from the CLI:",
|
|
719
|
+
...inputFile ? indented(exampleInputFileLine(inputFile)) : [],
|
|
714
720
|
...indented(cli),
|
|
715
721
|
...view.explain ? indented(explanation.cli) : []
|
|
716
722
|
] : []
|
|
@@ -794,7 +800,9 @@ function describedJson(described, view) {
|
|
|
794
800
|
})
|
|
795
801
|
};
|
|
796
802
|
}
|
|
797
|
-
const { cli, play, input } = examples(described, {
|
|
803
|
+
const { cli, play, input, inputFile } = examples(described, {
|
|
804
|
+
verbose: view.verbose
|
|
805
|
+
});
|
|
798
806
|
return {
|
|
799
807
|
kind: described.kind,
|
|
800
808
|
id: described.id,
|
|
@@ -817,7 +825,13 @@ function describedJson(described, view) {
|
|
|
817
825
|
...described.csvInput ? { csvInput: described.csvInput } : {},
|
|
818
826
|
...used.size ? { types } : {},
|
|
819
827
|
...described.exclusive ? { exclusive: described.exclusive } : {},
|
|
820
|
-
run: {
|
|
828
|
+
run: {
|
|
829
|
+
cli,
|
|
830
|
+
...play ? { play } : {},
|
|
831
|
+
...input ? { input } : {},
|
|
832
|
+
// On Windows `cli` reads `input` from this file instead of inline.
|
|
833
|
+
...inputFile ? { inputFile: inputFile.path } : {}
|
|
834
|
+
},
|
|
821
835
|
...described.source ? { source: described.source } : {},
|
|
822
836
|
...hidden.length ? { hidden } : {}
|
|
823
837
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
traceCliSpan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F7CMRKSK.mjs";
|
|
4
4
|
import {
|
|
5
5
|
enforceSdkCompatibilityResponse,
|
|
6
6
|
flushDeferredSkillsSyncNotices,
|
|
7
7
|
requireSdkCompatibility
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BOZAP2EM.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/play-run-admission.ts
|
|
11
11
|
function usesInlinePlayAdmission(command, args) {
|