deepline 0.3.462 → 0.3.464
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/play.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +17 -17
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +28 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +16 -2
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +12 -9
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +115 -7
- package/dist/bundling-sources/shared_libs/plays/field-catalog.ts +353 -52
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +63 -3
- package/dist/cli/{auth-JDLEY7VU.mjs → auth-GMSI6QWR.mjs} +5 -5
- package/dist/cli/auth-P4E7M3AV.js +41 -0
- package/dist/cli/{billing-SDHLBLMV.mjs → billing-6G2RFLM7.mjs} +6 -6
- package/dist/cli/{billing-HXAXB3XZ.js → billing-MGH36CNP.js} +77 -77
- package/dist/cli/{chunk-UAJFWWZE.js → chunk-2RFTOESC.js} +5 -5
- package/dist/cli/{chunk-VFGVXXZP.js → chunk-3AIMFE3Z.js} +36 -36
- package/dist/cli/{chunk-O2RX5A66.mjs → chunk-3MKRAI6R.mjs} +5 -5
- package/dist/cli/{chunk-7MJ6VI2T.mjs → chunk-44BEFU62.mjs} +2 -2
- package/dist/cli/{chunk-7VZHXVOQ.js → chunk-4XNXFHG6.js} +1 -1
- package/dist/cli/{chunk-D6DXOUTO.mjs → chunk-5CKIO7KA.mjs} +1 -1
- package/dist/cli/{chunk-XANRM3QA.js → chunk-5XIGEYYK.js} +6 -6
- package/dist/cli/{chunk-NHRWZPWZ.mjs → chunk-6A7OH2PV.mjs} +2 -2
- package/dist/cli/{chunk-4KQ6SIBC.mjs → chunk-6COF5LIE.mjs} +2 -2
- package/dist/cli/{chunk-S6UAJR6V.mjs → chunk-6E2KNNTD.mjs} +2 -2
- package/dist/cli/{chunk-S42YIQNE.mjs → chunk-6KDOO7IM.mjs} +4 -4
- package/dist/cli/{chunk-5LEAXRHV.js → chunk-6P4OYABU.js} +54 -226
- package/dist/cli/chunk-7YDN6AEK.mjs +649 -0
- package/dist/cli/{chunk-HUB3CCM2.js → chunk-ACZLDP7L.js} +3 -3
- package/dist/cli/{chunk-BGTPIMSM.js → chunk-BMUDQMYE.js} +6 -6
- package/dist/cli/{chunk-6NNVJDVR.mjs → chunk-CUZVOPPY.mjs} +3 -3
- package/dist/cli/{chunk-ZUK6LIJB.mjs → chunk-DO3FSI4C.mjs} +1 -1
- package/dist/cli/{chunk-NBLSCHKK.js → chunk-E4QJKJH6.js} +51 -51
- package/dist/cli/{chunk-ZGQSFYD2.js → chunk-EQNJUG3N.js} +53 -53
- package/dist/cli/{chunk-GEGW5HPZ.js → chunk-FEWZT4RV.js} +21 -21
- package/dist/cli/{chunk-QJZ6WNWD.js → chunk-FVAB2JRO.js} +8 -8
- package/dist/cli/{chunk-Y4DPU4OM.js → chunk-GVJVBBGV.js} +3 -3
- package/dist/cli/{chunk-MUUQZIOF.mjs → chunk-HGUHBLX5.mjs} +3 -3
- package/dist/cli/{chunk-6PMCRYDA.js → chunk-HIMV32ZX.js} +6 -4
- package/dist/cli/{chunk-MSY22NQW.mjs → chunk-I2TCWIW2.mjs} +44 -216
- package/dist/cli/{chunk-XZAFIOUQ.mjs → chunk-J327QVQV.mjs} +1 -1
- package/dist/cli/chunk-JLZKF7EY.js +649 -0
- package/dist/cli/{chunk-7LFIMWMW.js → chunk-K3BARC72.js} +2 -2
- package/dist/cli/{chunk-LROWFPGN.js → chunk-K4DVRQTY.js} +16 -16
- package/dist/cli/{chunk-XQCTG5OO.js → chunk-L3U44YVO.js} +5 -5
- package/dist/cli/{chunk-CKSOY47X.mjs → chunk-M4QVY6RW.mjs} +2 -2
- package/dist/cli/{chunk-6RNQGWFD.mjs → chunk-MP3O4ISC.mjs} +1 -1
- package/dist/cli/{chunk-PHSEINNH.mjs → chunk-MQNBOSQP.mjs} +5 -5
- package/dist/cli/{chunk-TKAQR3IB.mjs → chunk-MUQAKLBP.mjs} +1 -1
- package/dist/cli/{chunk-YT5EODJO.js → chunk-NI3QFUK7.js} +4 -4
- package/dist/cli/{chunk-PKHVSIJG.mjs → chunk-O4AOYLZE.mjs} +2 -2
- package/dist/cli/{chunk-3ACMRZRV.js → chunk-O4ZMADW4.js} +7 -7
- package/dist/cli/{chunk-V3MEA7NB.mjs → chunk-OA7IIOLW.mjs} +4 -4
- package/dist/cli/{chunk-VPHN2HAL.mjs → chunk-OGCAGZXO.mjs} +6 -4
- package/dist/cli/{chunk-LFXLQEZN.mjs → chunk-PPQL5F4P.mjs} +1 -1
- package/dist/cli/{chunk-WIY6U6GD.mjs → chunk-RFOQRCMW.mjs} +5 -5
- package/dist/cli/{chunk-FKVYR3QA.mjs → chunk-TMVBBGSK.mjs} +1 -1
- package/dist/cli/{chunk-EM4TXCCI.js → chunk-TU3M7UXJ.js} +13 -13
- package/dist/cli/{chunk-AT636LLU.mjs → chunk-UM363DQF.mjs} +2 -2
- package/dist/cli/{chunk-V335HGX5.js → chunk-UOAHDEAI.js} +9 -9
- package/dist/cli/{chunk-UDRPEZ5F.mjs → chunk-VQHEMZ33.mjs} +1 -1
- package/dist/cli/{chunk-3KZCFOZ6.mjs → chunk-VYDOPASG.mjs} +1 -1
- package/dist/cli/{chunk-ULK7JGGI.js → chunk-VZX4P5FT.js} +258 -258
- package/dist/cli/{chunk-OPJAJBD4.js → chunk-WLIFUH6W.js} +8 -8
- package/dist/cli/{chunk-OMQ23IXL.js → chunk-X3XJ6ZSJ.js} +2 -2
- package/dist/cli/{chunk-7U3XNPOA.mjs → chunk-XMDBN2K7.mjs} +11 -11
- package/dist/cli/{chunk-7SWNPNML.js → chunk-ZAB6KCZW.js} +3 -3
- package/dist/cli/{chunk-JF3TLIMQ.js → chunk-ZIMCLWEW.js} +5 -5
- package/dist/cli/{chunk-I6VHOU5O.js → chunk-ZQERHPZA.js} +26 -26
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-L54JS7TF.mjs → csv-4ZVMBOCK.mjs} +4 -4
- package/dist/cli/{csv-C56GSCEU.js → csv-W2JPV57R.js} +13 -13
- package/dist/cli/{db-MOGRMZTA.js → db-6YNFDHEW.js} +27 -27
- package/dist/cli/{db-YVBUW2DX.mjs → db-TVK6BLRB.mjs} +6 -6
- package/dist/cli/describe-APW5TWBT.js +48 -0
- package/dist/cli/{describe-NLZKKT7C.mjs → describe-JFN4ECPO.mjs} +20 -20
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-ZBGSTT37.mjs → executions-2FK4FFKE.mjs} +6 -6
- package/dist/cli/{executions-A7L4ULPP.js → executions-J4CAN7RB.js} +8 -8
- package/dist/cli/{feedback-G6GU37FD.mjs → feedback-EYRRLA2P.mjs} +4 -4
- package/dist/cli/{feedback-OHLY7RYD.js → feedback-NOO4OM4U.js} +8 -8
- package/dist/cli/{git-PKZW3QD5.mjs → git-D3Q4JKBC.mjs} +5 -5
- package/dist/cli/git-FPF6DT43.js +25 -0
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-5LM3D724.js → legacy-noops-5ZGRKSN3.js} +8 -8
- package/dist/cli/{legacy-noops-LJJYG6YA.mjs → legacy-noops-SUFJWBLZ.mjs} +5 -5
- package/dist/cli/{monitors-UX3H5DC2.js → monitors-3QFJZA6Z.js} +91 -91
- package/dist/cli/{monitors-72QV4ALO.mjs → monitors-IRDIIR6J.mjs} +7 -7
- package/dist/cli/{org-IF7ISUVB.js → org-275OJJ7W.js} +68 -68
- package/dist/cli/{org-6RRRKOCP.mjs → org-2VA2FSMG.mjs} +6 -6
- package/dist/cli/{pages-3SU3HKL7.js → pages-SPRBOZRA.js} +17 -17
- package/dist/cli/{pages-DXDYYKEK.mjs → pages-WCUEBFYU.mjs} +6 -6
- package/dist/cli/{play-AHASKRLA.mjs → play-7UL5H6QU.mjs} +18 -18
- package/dist/cli/{play-EUIUVLUH.js → play-NMHUWBET.js} +305 -305
- package/dist/cli/{providers-V5WU4VXJ.js → providers-72LUJEAT.js} +9 -9
- package/dist/cli/{providers-GWGE3WY3.mjs → providers-WSCKV557.mjs} +6 -6
- package/dist/cli/{quickstart-OXKQ5ZST.mjs → quickstart-K4LAKJKJ.mjs} +4 -4
- package/dist/cli/{quickstart-QP65I5PF.js → quickstart-XSUUAE2Y.js} +6 -6
- package/dist/cli/{run-F3FTYS56.js → run-MLV2CLW7.js} +40 -40
- package/dist/cli/{run-6MM72IGL.mjs → run-R2MOXXHH.mjs} +25 -25
- package/dist/cli/search-AYFUV6YV.js +32 -0
- package/dist/cli/{search-ZMEBVJZB.mjs → search-WHJZNWKE.mjs} +7 -7
- package/dist/cli/{secrets-ACND5N6A.js → secrets-7PXFBOFY.js} +15 -15
- package/dist/cli/{secrets-XRCJFF3L.mjs → secrets-YGVOFLI5.mjs} +6 -6
- package/dist/cli/{sessions-ZGRJPCFF.js → sessions-ASXXZI42.js} +6 -6
- package/dist/cli/{sessions-RTK3CEW6.mjs → sessions-G7I54W4L.mjs} +5 -5
- package/dist/cli/{settings-XDRBPRDE.mjs → settings-4GFO6JYO.mjs} +11 -11
- package/dist/cli/{settings-PD5KWQQZ.js → settings-RTEBMDPC.js} +78 -78
- package/dist/cli/{setup-3HPYAOCC.mjs → setup-4RJGKSDC.mjs} +9 -9
- package/dist/cli/{setup-E2Q6PXHC.js → setup-A6V2MJK7.js} +44 -44
- package/dist/cli/{skills-OOQFMPOV.mjs → skills-432W6EGS.mjs} +7 -7
- package/dist/cli/skills-GOQECD7H.js +31 -0
- package/dist/cli/tools-JXYN7WOE.js +55 -0
- package/dist/cli/{tools-C5ZT3UIC.mjs → tools-SABREK3C.mjs} +18 -18
- package/dist/cli/update-BSB4TJER.js +33 -0
- package/dist/cli/{update-ZWJTADIW.mjs → update-F7NO5RDW.mjs} +9 -9
- package/dist/cli/{workflow-23NMPAJ7.mjs → workflow-F4N7CFUX.mjs} +7 -7
- package/dist/cli/{workflow-TCXU5YJV.js → workflow-TF6YDWTM.js} +17 -17
- package/dist/{client-DTwnz_AW.d.mts → client-ADFHNtFM.d.mts} +1 -1
- package/dist/{client-DS2IWYZF.d.ts → client-BClp2yrq.d.ts} +1 -1
- package/dist/{client-core-B_6HAIBy.d.ts → client-core-BFU73Ttw.d.ts} +1 -1
- package/dist/{client-core-DzBSlY1U.d.mts → client-core-DWLmmJWo.d.mts} +1 -1
- package/dist/{compiler-manifest-Dcyd3-Zd.d.mts → compiler-manifest-Cs17yO-H.d.mts} +321 -3
- package/dist/{compiler-manifest-Dcyd3-Zd.d.ts → compiler-manifest-Cs17yO-H.d.ts} +321 -3
- package/dist/{errors-yQwfgrcX.d.ts → errors-Dee-QpVS.d.ts} +1 -1
- package/dist/{errors-d-sTrZhe.d.mts → errors-qNfvQuRB.d.mts} +1 -1
- package/dist/{index-C6oXchjN.d.mts → index-BTqNNXmC.d.mts} +1 -1
- package/dist/{index-P56zy_z5.d.ts → index-DXTh1Lxe.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +81 -14
- package/dist/index.mjs +77 -10
- package/dist/install-integrity.json +114 -114
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- 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.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-UXKY6TCC.js +0 -41
- package/dist/cli/chunk-NA4T3B62.js +0 -286
- package/dist/cli/chunk-TXZVVBQZ.mjs +0 -286
- package/dist/cli/describe-KYEULWPG.js +0 -48
- package/dist/cli/git-P76N4NDQ.js +0 -25
- package/dist/cli/search-OYKOOI7A.js +0 -32
- package/dist/cli/skills-XYWV52KB.js +0 -31
- package/dist/cli/tools-ASCDZJCK.js +0 -55
- package/dist/cli/update-5RQSEIFM.js +0 -33
|
@@ -26,7 +26,7 @@ var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkNI3QFUK7js = require('./chunk-NI3QFUK7.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
@@ -647,7 +647,7 @@ var ToolCalls = class {
|
|
|
647
647
|
idempotencyKey,
|
|
648
648
|
onResponse: (response2) => {
|
|
649
649
|
lastResponse = null;
|
|
650
|
-
atomicToolsSupported = response2.headers.get(
|
|
650
|
+
atomicToolsSupported = response2.headers.get(_chunkNI3QFUK7js.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
651
651
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
652
652
|
if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
|
|
653
653
|
try {
|
|
@@ -1026,8 +1026,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
const receivers = _optionalChain([env, 'access', _52 => _52.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
|
|
1028
1028
|
return {
|
|
1029
|
-
[
|
|
1030
|
-
...receivers ? { [
|
|
1029
|
+
[_chunkNI3QFUK7js.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1030
|
+
...receivers ? { [_chunkNI3QFUK7js.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1031
1031
|
};
|
|
1032
1032
|
}
|
|
1033
1033
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1098,7 +1098,7 @@ var PlayClient = class {
|
|
|
1098
1098
|
return _chunkJKVRBCZLjs.startPlayRun.call(void 0,
|
|
1099
1099
|
this.http,
|
|
1100
1100
|
resolved.request,
|
|
1101
|
-
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1101
|
+
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkNI3QFUK7js.SDK_API_MAJOR) } : headers,
|
|
1102
1102
|
options
|
|
1103
1103
|
);
|
|
1104
1104
|
}
|
|
@@ -3175,7 +3175,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3175
3175
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3176
3176
|
);
|
|
3177
3177
|
}
|
|
3178
|
-
return { [
|
|
3178
|
+
return { [_chunkNI3QFUK7js.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3179
3179
|
}
|
|
3180
3180
|
function sleep(ms) {
|
|
3181
3181
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6A7OH2PV.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -22,12 +22,12 @@ import {
|
|
|
22
22
|
saveHostEnvValues,
|
|
23
23
|
saveProjectDeeplineEnvValues,
|
|
24
24
|
storedHostApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5CKIO7KA.mjs";
|
|
26
26
|
import {
|
|
27
27
|
SDK_API_CONTRACT,
|
|
28
28
|
SDK_VERSION,
|
|
29
29
|
detectAgentRuntime
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-MP3O4ISC.mjs";
|
|
31
31
|
|
|
32
32
|
// src/cli/commands/auth.ts
|
|
33
33
|
import {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkO4ZMADW4js = require('./chunk-O4ZMADW4.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -22,12 +22,12 @@ var _chunk3ACMRZRVjs = require('./chunk-3ACMRZRV.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkGVJVBBGVjs = require('./chunk-GVJVBBGV.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkNI3QFUK7js = require('./chunk-NI3QFUK7.js');
|
|
31
31
|
|
|
32
32
|
// src/cli/commands/auth.ts
|
|
33
33
|
|
|
@@ -54,7 +54,7 @@ function statusBannerLine(value) {
|
|
|
54
54
|
return `Service notice: ${banner.message}`;
|
|
55
55
|
}
|
|
56
56
|
function envFilePath(baseUrl) {
|
|
57
|
-
return
|
|
57
|
+
return _chunkGVJVBBGVjs.hostEnvFilePath.call(void 0, baseUrl);
|
|
58
58
|
}
|
|
59
59
|
function normalizeAuthScope(value) {
|
|
60
60
|
if (!value || value === "global") return "global";
|
|
@@ -67,7 +67,7 @@ function parseAuthScope(args) {
|
|
|
67
67
|
}
|
|
68
68
|
function pendingClaimPath(baseUrl, scope) {
|
|
69
69
|
if (scope === "folder") {
|
|
70
|
-
const target =
|
|
70
|
+
const target = _chunkGVJVBBGVjs.resolveProjectPinTarget.call(void 0, );
|
|
71
71
|
if (!target.ok) {
|
|
72
72
|
throw new Error(
|
|
73
73
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -77,10 +77,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
77
77
|
}
|
|
78
78
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
79
79
|
}
|
|
80
|
-
return `${
|
|
80
|
+
return `${_chunkGVJVBBGVjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
81
81
|
}
|
|
82
82
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
83
|
-
return `${
|
|
83
|
+
return `${_chunkGVJVBBGVjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
84
84
|
}
|
|
85
85
|
function savePendingClaim(baseUrl, claim) {
|
|
86
86
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -182,21 +182,21 @@ function parseRegisterWaitMode(args) {
|
|
|
182
182
|
function shouldWaitForRegisterClaim(mode) {
|
|
183
183
|
if (mode === "yes") return true;
|
|
184
184
|
if (mode === "no") return false;
|
|
185
|
-
return
|
|
185
|
+
return _chunkNI3QFUK7js.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
186
186
|
}
|
|
187
187
|
function saveEnvValues(values, baseUrl, scope) {
|
|
188
188
|
const filtered = {
|
|
189
|
-
...values[
|
|
190
|
-
...values[
|
|
191
|
-
...values[
|
|
192
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
189
|
+
...values[_chunkGVJVBBGVjs.HOST_URL_ENV] ? { [_chunkGVJVBBGVjs.HOST_URL_ENV]: values[_chunkGVJVBBGVjs.HOST_URL_ENV] } : {},
|
|
190
|
+
...values[_chunkGVJVBBGVjs.API_KEY_ENV] ? { [_chunkGVJVBBGVjs.API_KEY_ENV]: values[_chunkGVJVBBGVjs.API_KEY_ENV] } : {},
|
|
191
|
+
...values[_chunkGVJVBBGVjs.ACTIVE_ORG_ID_ENV] ? { [_chunkGVJVBBGVjs.ACTIVE_ORG_ID_ENV]: values[_chunkGVJVBBGVjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
192
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkGVJVBBGVjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkGVJVBBGVjs.ACTIVE_ORG_NAME_ENV]: values[_chunkGVJVBBGVjs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
193
193
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
194
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
194
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkGVJVBBGVjs.FEATURES_ENV) ? { [_chunkGVJVBBGVjs.FEATURES_ENV]: values[_chunkGVJVBBGVjs.FEATURES_ENV] } : {}
|
|
195
195
|
};
|
|
196
196
|
if (scope === "folder") {
|
|
197
|
-
|
|
197
|
+
_chunkGVJVBBGVjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
198
198
|
} else {
|
|
199
|
-
|
|
199
|
+
_chunkGVJVBBGVjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
function activeOrgEnvValues(data) {
|
|
@@ -204,21 +204,21 @@ function activeOrgEnvValues(data) {
|
|
|
204
204
|
if (!orgId) return {};
|
|
205
205
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
206
206
|
return {
|
|
207
|
-
[
|
|
208
|
-
[
|
|
209
|
-
...
|
|
207
|
+
[_chunkGVJVBBGVjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
208
|
+
[_chunkGVJVBBGVjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
209
|
+
..._chunkGVJVBBGVjs.featureEnvValues.call(void 0, data)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
213
213
|
const headers = {
|
|
214
214
|
"Content-Type": "application/json",
|
|
215
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
215
|
+
"User-Agent": `deepline-ts-sdk/${_chunkNI3QFUK7js.SDK_VERSION}`,
|
|
216
216
|
"X-Deepline-Client-Family": "sdk",
|
|
217
217
|
"X-Deepline-CLI-Family": "sdk",
|
|
218
|
-
"X-Deepline-Agent-Runtime":
|
|
219
|
-
"X-Deepline-CLI-Version":
|
|
220
|
-
"X-Deepline-SDK-Version":
|
|
221
|
-
"X-Deepline-API-Contract":
|
|
218
|
+
"X-Deepline-Agent-Runtime": _chunkNI3QFUK7js.detectAgentRuntime.call(void 0, ),
|
|
219
|
+
"X-Deepline-CLI-Version": _chunkNI3QFUK7js.SDK_VERSION,
|
|
220
|
+
"X-Deepline-SDK-Version": _chunkNI3QFUK7js.SDK_VERSION,
|
|
221
|
+
"X-Deepline-API-Contract": _chunkNI3QFUK7js.SDK_API_CONTRACT
|
|
222
222
|
};
|
|
223
223
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
224
224
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -264,7 +264,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
264
264
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
265
265
|
}
|
|
266
266
|
async function reportSetupCompleted(input) {
|
|
267
|
-
const apiKey = input.authScope === "folder" ?
|
|
267
|
+
const apiKey = input.authScope === "folder" ? _chunkGVJVBBGVjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkGVJVBBGVjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
268
268
|
if (!apiKey) return;
|
|
269
269
|
try {
|
|
270
270
|
await httpJson(
|
|
@@ -361,7 +361,7 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
async function handleRegister(args) {
|
|
364
|
-
const baseUrl =
|
|
364
|
+
const baseUrl = _chunkGVJVBBGVjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
365
365
|
let orgName = "";
|
|
366
366
|
let orgId = "";
|
|
367
367
|
let agentName = "";
|
|
@@ -416,19 +416,19 @@ async function handleRegister(args) {
|
|
|
416
416
|
});
|
|
417
417
|
saveEnvValues(
|
|
418
418
|
{
|
|
419
|
-
[
|
|
419
|
+
[_chunkGVJVBBGVjs.HOST_URL_ENV]: baseUrl
|
|
420
420
|
},
|
|
421
421
|
baseUrl,
|
|
422
422
|
authScope
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
425
|
if (claimUrl) {
|
|
426
|
-
const shouldOpen = waitMode !== "no" &&
|
|
426
|
+
const shouldOpen = waitMode !== "no" && _chunkNI3QFUK7js.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
427
427
|
console.log(
|
|
428
428
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
429
429
|
);
|
|
430
430
|
console.log(` ${claimUrl}`);
|
|
431
|
-
if (shouldOpen)
|
|
431
|
+
if (shouldOpen) _chunkO4ZMADW4js.openInBrowser.call(void 0, claimUrl);
|
|
432
432
|
}
|
|
433
433
|
if (data.cli_message) {
|
|
434
434
|
console.log(String(data.cli_message));
|
|
@@ -471,8 +471,8 @@ async function handleRegister(args) {
|
|
|
471
471
|
if (apiKey) {
|
|
472
472
|
saveEnvValues(
|
|
473
473
|
{
|
|
474
|
-
[
|
|
475
|
-
[
|
|
474
|
+
[_chunkGVJVBBGVjs.HOST_URL_ENV]: baseUrl,
|
|
475
|
+
[_chunkGVJVBBGVjs.API_KEY_ENV]: apiKey,
|
|
476
476
|
...activeOrgEnvValues(statusData)
|
|
477
477
|
},
|
|
478
478
|
baseUrl,
|
|
@@ -494,7 +494,7 @@ async function handleRegister(args) {
|
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
async function handleWait(args) {
|
|
497
|
-
const baseUrl =
|
|
497
|
+
const baseUrl = _chunkGVJVBBGVjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
498
498
|
let timeoutSeconds = 300;
|
|
499
499
|
let requestedScope;
|
|
500
500
|
if (args.includes("--auth-scope")) {
|
|
@@ -518,7 +518,7 @@ async function handleWait(args) {
|
|
|
518
518
|
const authScope = resumed.scope;
|
|
519
519
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _12 => _12.claimToken]), () => ( ""));
|
|
520
520
|
if (!pendingClaim) {
|
|
521
|
-
const scopedApiKey = authScope === "folder" ?
|
|
521
|
+
const scopedApiKey = authScope === "folder" ? _chunkGVJVBBGVjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkGVJVBBGVjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
522
522
|
if (scopedApiKey) {
|
|
523
523
|
console.log("Already connected.");
|
|
524
524
|
return EXIT_OK;
|
|
@@ -561,8 +561,8 @@ async function handleWait(args) {
|
|
|
561
561
|
if (apiKey) {
|
|
562
562
|
saveEnvValues(
|
|
563
563
|
{
|
|
564
|
-
[
|
|
565
|
-
[
|
|
564
|
+
[_chunkGVJVBBGVjs.HOST_URL_ENV]: baseUrl,
|
|
565
|
+
[_chunkGVJVBBGVjs.API_KEY_ENV]: apiKey,
|
|
566
566
|
...activeOrgEnvValues(data)
|
|
567
567
|
},
|
|
568
568
|
baseUrl,
|
|
@@ -586,8 +586,8 @@ async function handleWait(args) {
|
|
|
586
586
|
return EXIT_AUTH;
|
|
587
587
|
}
|
|
588
588
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
589
|
-
const baseUrl =
|
|
590
|
-
const apiKey =
|
|
589
|
+
const baseUrl = _chunkGVJVBBGVjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
590
|
+
const apiKey = _chunkGVJVBBGVjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
591
591
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
592
592
|
try {
|
|
593
593
|
const { status, data } = await httpJson(
|
|
@@ -610,9 +610,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
612
|
async function handleStatus(args) {
|
|
613
|
-
const baseUrl =
|
|
613
|
+
const baseUrl = _chunkGVJVBBGVjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
614
614
|
const reveal = args.includes("--reveal");
|
|
615
|
-
const jsonOutput =
|
|
615
|
+
const jsonOutput = _chunkO4ZMADW4js.argsWantJson.call(void 0, args);
|
|
616
616
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
617
617
|
let authScope = null;
|
|
618
618
|
if (hasExplicitAuthScope) {
|
|
@@ -653,14 +653,14 @@ async function handleStatus(args) {
|
|
|
653
653
|
};
|
|
654
654
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
655
655
|
}
|
|
656
|
-
const apiKey = authScope === "folder" ?
|
|
656
|
+
const apiKey = authScope === "folder" ? _chunkGVJVBBGVjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkGVJVBBGVjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkGVJVBBGVjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
657
657
|
if (!apiKey) {
|
|
658
658
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
659
659
|
baseUrl,
|
|
660
660
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
661
661
|
);
|
|
662
662
|
if (pendingClaim) {
|
|
663
|
-
|
|
663
|
+
_chunkO4ZMADW4js.printCommandEnvelope.call(void 0,
|
|
664
664
|
{
|
|
665
665
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
666
666
|
status: "pending",
|
|
@@ -681,7 +681,7 @@ async function handleStatus(args) {
|
|
|
681
681
|
);
|
|
682
682
|
return EXIT_OK;
|
|
683
683
|
}
|
|
684
|
-
|
|
684
|
+
_chunkO4ZMADW4js.printCommandEnvelope.call(void 0,
|
|
685
685
|
{
|
|
686
686
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
687
687
|
status: "not connected",
|
|
@@ -714,7 +714,7 @@ async function handleStatus(args) {
|
|
|
714
714
|
}
|
|
715
715
|
);
|
|
716
716
|
if (status === 401 || status === 403) {
|
|
717
|
-
|
|
717
|
+
_chunkO4ZMADW4js.printCommandEnvelope.call(void 0,
|
|
718
718
|
{
|
|
719
719
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
720
720
|
status: "unauthorized",
|
|
@@ -741,7 +741,7 @@ async function handleStatus(args) {
|
|
|
741
741
|
console.error(`Auth status error (status ${status}).`);
|
|
742
742
|
return EXIT_SERVER;
|
|
743
743
|
}
|
|
744
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
744
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkGVJVBBGVjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
745
745
|
clearSatisfiedPendingClaim(
|
|
746
746
|
baseUrl,
|
|
747
747
|
resolvedAuthScope,
|
|
@@ -769,28 +769,28 @@ async function handleStatus(args) {
|
|
|
769
769
|
if (apiKeyResp) {
|
|
770
770
|
saveEnvValues(
|
|
771
771
|
{
|
|
772
|
-
[
|
|
773
|
-
[
|
|
772
|
+
[_chunkGVJVBBGVjs.HOST_URL_ENV]: baseUrl,
|
|
773
|
+
[_chunkGVJVBBGVjs.API_KEY_ENV]: apiKeyResp,
|
|
774
774
|
...activeOrgEnvValues(data)
|
|
775
775
|
},
|
|
776
776
|
baseUrl,
|
|
777
777
|
resolvedAuthScope
|
|
778
778
|
);
|
|
779
779
|
if (resolvedAuthScope === "folder") {
|
|
780
|
-
const target =
|
|
780
|
+
const target = _chunkGVJVBBGVjs.resolveProjectPinTarget.call(void 0, );
|
|
781
781
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
782
782
|
} else {
|
|
783
783
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
787
|
-
saveEnvValues(
|
|
786
|
+
} else if (resolvedAuthScope === "folder" || _chunkGVJVBBGVjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
787
|
+
saveEnvValues(_chunkGVJVBBGVjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
788
788
|
}
|
|
789
|
-
|
|
789
|
+
_chunkO4ZMADW4js.printCommandEnvelope.call(void 0,
|
|
790
790
|
{
|
|
791
791
|
...payload,
|
|
792
|
-
...
|
|
793
|
-
command_context:
|
|
792
|
+
..._chunkNI3QFUK7js.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
793
|
+
command_context: _chunkGVJVBBGVjs.resolveCliCommandContext.call(void 0,
|
|
794
794
|
{ baseUrl, apiKey },
|
|
795
795
|
resolvedAuthScope
|
|
796
796
|
)
|