deepline 0.3.326 → 0.3.327
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/play-runtime/projection.ts +11 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +14 -1
- package/dist/cli/auth-67YOPQ6M.js +31 -0
- package/dist/cli/{auth-VON5FFUK.mjs → auth-EBBDOKNV.mjs} +4 -4
- package/dist/cli/{billing-YI4RZI2O.js → billing-6AAB7WPJ.js} +70 -70
- package/dist/cli/{billing-X6JUEFRE.mjs → billing-IM2QUFX4.mjs} +4 -4
- package/dist/cli/{chunk-W74E5ETE.mjs → chunk-3ITDKXNC.mjs} +2 -2
- package/dist/cli/{chunk-BUYZEUY4.js → chunk-3MXRNPBN.js} +1 -1
- package/dist/cli/{chunk-4LNBSQM4.js → chunk-4TO56P22.js} +224 -224
- package/dist/cli/{chunk-GVYKY6T6.js → chunk-4ZARCCPT.js} +9 -9
- package/dist/cli/{chunk-MKHSZA2X.js → chunk-77RAV5XX.js} +48 -48
- package/dist/cli/{chunk-MDQZQ3NY.js → chunk-7RCJDAJX.js} +2 -2
- package/dist/cli/{chunk-MOBZS4F3.mjs → chunk-A5SKM3GL.mjs} +1 -1
- package/dist/cli/{chunk-BR7GGTAE.mjs → chunk-CCRQ2VGJ.mjs} +1 -1
- package/dist/cli/{chunk-EMZ7Y5SW.js → chunk-CISKBOXD.js} +60 -60
- package/dist/cli/{chunk-VGKVLADU.mjs → chunk-D6GD5AVN.mjs} +3 -3
- package/dist/cli/{chunk-IQCCGOQH.mjs → chunk-DCAU6PND.mjs} +4 -4
- package/dist/cli/{chunk-TXVOB5J2.js → chunk-DM3SHV6U.js} +4 -4
- package/dist/cli/{chunk-KZ4PCK4O.js → chunk-DSDX6EUW.js} +15 -15
- package/dist/cli/{chunk-ZRN6YOF2.mjs → chunk-DVV4FPS7.mjs} +2 -2
- package/dist/cli/{chunk-M7CPVMDB.mjs → chunk-F45425TB.mjs} +1 -1
- package/dist/cli/{chunk-BQJVMKWL.mjs → chunk-G5774EFF.mjs} +1 -1
- package/dist/cli/{chunk-DFDXKOLR.mjs → chunk-HOWQKN6J.mjs} +5 -5
- package/dist/cli/{chunk-3NGWGFVL.js → chunk-HZZJR2GV.js} +26 -26
- package/dist/cli/{chunk-T33W6JUJ.js → chunk-MOP6D7Z5.js} +6 -6
- package/dist/cli/{chunk-TZQMFWLF.js → chunk-NWIJLTRL.js} +47 -47
- package/dist/cli/{chunk-KLWBAQ5A.mjs → chunk-QZAP5VOS.mjs} +1 -1
- package/dist/cli/{chunk-TDSNAC3C.mjs → chunk-REP2MYBI.mjs} +2 -2
- package/dist/cli/{chunk-4AB4Y6FF.mjs → chunk-RSEVBSFE.mjs} +1 -1
- package/dist/cli/{chunk-5NXHSRRE.js → chunk-TAGHNT5P.js} +6 -6
- package/dist/cli/{chunk-CUUHQ3AO.js → chunk-UROXKPND.js} +6 -6
- package/dist/cli/{chunk-VKXGOQG5.mjs → chunk-ZOFARJWH.mjs} +6 -6
- package/dist/cli/client-7LZCG4VD.js +20 -0
- package/dist/cli/{client-ZMOKUNL2.mjs → client-JCMSACT4.mjs} +3 -3
- package/dist/cli/{csv-IICJHJZ4.mjs → csv-NPMWVM5D.mjs} +3 -3
- package/dist/cli/{csv-HZRKEI7J.js → csv-OILKDKUX.js} +12 -12
- package/dist/cli/{db-X4B7YFNY.mjs → db-AZUAOWPQ.mjs} +4 -4
- package/dist/cli/{db-TM5NZF73.js → db-MNDRYYEX.js} +29 -29
- package/dist/cli/{describe-GMVS3LFC.mjs → describe-KJWOHMKC.mjs} +8 -8
- package/dist/cli/{describe-BDBARWZJ.js → describe-QENLDLM2.js} +15 -15
- package/dist/cli/{executions-QX25UOQM.js → executions-P36UHBPG.js} +6 -6
- package/dist/cli/{executions-447ZJMN4.mjs → executions-QZNQWF6F.mjs} +4 -4
- package/dist/cli/{feedback-4IXUTBX7.js → feedback-K4UGTLFD.js} +6 -6
- package/dist/cli/{feedback-JB7HHIC6.mjs → feedback-RQ6HSZSG.mjs} +3 -3
- package/dist/cli/{git-VID6KGAA.mjs → git-PBRMCBMI.mjs} +4 -4
- package/dist/cli/git-RPFH3NJ2.js +23 -0
- package/dist/cli/index.js +74 -74
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-SGR3G5WS.mjs → legacy-noops-G7GWJ5UC.mjs} +4 -4
- package/dist/cli/{legacy-noops-3FYTCOZO.js → legacy-noops-X74FM35Q.js} +7 -7
- package/dist/cli/{monitors-SH4FOMBM.mjs → monitors-KL2MCR57.mjs} +4 -4
- package/dist/cli/{monitors-SP52UHS4.js → monitors-VKURX3YM.js} +85 -85
- package/dist/cli/{org-B32MMIQT.mjs → org-DT53KTNW.mjs} +4 -4
- package/dist/cli/{org-UQMX7JOR.js → org-ZYXJDC44.js} +60 -60
- package/dist/cli/play-BUQV47E2.js +153 -0
- package/dist/cli/{play-XTE4LUP7.mjs → play-WIJGQYTB.mjs} +7 -7
- package/dist/cli/{providers-JNMJJ2OH.js → providers-GRTW4TXX.js} +7 -7
- package/dist/cli/{providers-RWLN6FUR.mjs → providers-GYGKGS2J.mjs} +4 -4
- package/dist/cli/{quickstart-HK6WZ342.js → quickstart-WB26543C.js} +5 -5
- package/dist/cli/{quickstart-IDB3Y375.mjs → quickstart-XF3M2M2S.mjs} +3 -3
- package/dist/cli/{search-6D3IFNPT.mjs → search-ANJLTOF2.mjs} +5 -5
- package/dist/cli/search-CR2GZLCM.js +26 -0
- package/dist/cli/{secrets-JOQB57IE.js → secrets-5KBUGMTK.js} +13 -13
- package/dist/cli/{secrets-TZ53CQ3D.mjs → secrets-D6UR5CTW.mjs} +4 -4
- package/dist/cli/{sessions-QSAICDXX.js → sessions-46PXFULL.js} +5 -5
- package/dist/cli/{sessions-4MBDC4EK.mjs → sessions-S7N4JEWK.mjs} +4 -4
- package/dist/cli/{settings-OTOCW7L7.js → settings-KMNBITSU.js} +74 -74
- package/dist/cli/{settings-RKQFMLDU.mjs → settings-V6U3SRTH.mjs} +7 -7
- package/dist/cli/{setup-AKZUDVYY.js → setup-4K5FY6AU.js} +41 -41
- package/dist/cli/{setup-2S5TNTUB.mjs → setup-OGITSLTN.mjs} +6 -6
- package/dist/cli/skills-4FP2MZKL.js +28 -0
- package/dist/cli/{skills-AGZXDLSA.mjs → skills-AXWAYPBY.mjs} +4 -4
- package/dist/cli/tools-7YZPH6WC.js +39 -0
- package/dist/cli/{tools-7Y6RD6FY.mjs → tools-LJCY6B23.mjs} +6 -6
- package/dist/cli/update-3VUOW6AP.js +28 -0
- package/dist/cli/{update-M7YGF67I.mjs → update-DDR5XIUB.mjs} +6 -6
- package/dist/cli/{workflow-NGMY425T.js → workflow-7CTCDWL3.js} +15 -15
- package/dist/cli/{workflow-CTVE7S7W.mjs → workflow-PRNCVANQ.mjs} +5 -5
- package/dist/index.js +57 -47
- package/dist/index.mjs +14 -4
- package/dist/install-integrity.json +74 -74
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-6STWK6UK.js +0 -31
- package/dist/cli/client-TEBW2P24.js +0 -20
- package/dist/cli/git-C7C7DTEH.js +0 -23
- package/dist/cli/play-UCIWBN7U.js +0 -153
- package/dist/cli/search-LUZ2S7DH.js +0 -26
- package/dist/cli/skills-26LASHZF.js +0 -28
- package/dist/cli/tools-L5VIJQWX.js +0 -39
- package/dist/cli/update-MNHF6M2F.js +0 -28
|
@@ -15,7 +15,7 @@ var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkDM3SHV6Ujs = require('./chunk-DM3SHV6U.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -146,7 +146,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
146
146
|
if (error instanceof _chunk7P5AA3SNjs.DeeplineError && (_optionalChain([error, 'access', _2 => _2.code, 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
|
|
147
147
|
// lost connections and explicitly unknown transaction resolution.
|
|
148
148
|
/^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
|
|
149
|
-
throw new (0,
|
|
149
|
+
throw new (0, _chunkDM3SHV6Ujs.CustomerDbQueryOutcomeUnknownError)(
|
|
150
150
|
error,
|
|
151
151
|
plan.request.body.operation_key
|
|
152
152
|
);
|
|
@@ -154,7 +154,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
154
154
|
throw error;
|
|
155
155
|
}
|
|
156
156
|
if (!result || typeof result !== "object" || Array.isArray(result) || typeof result.command !== "string" || !Array.isArray(result.columns) || !Array.isArray(result.rows) || typeof result.truncated !== "boolean" || result.row_count !== null && (!Number.isSafeInteger(result.row_count) || result.row_count < 0) || !Number.isSafeInteger(result.row_count_returned) || result.row_count_returned < 0) {
|
|
157
|
-
throw new (0,
|
|
157
|
+
throw new (0, _chunkDM3SHV6Ujs.CustomerDbQueryOutcomeUnknownError)(
|
|
158
158
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
159
159
|
"The SQL response did not contain a valid result.",
|
|
160
160
|
200,
|
|
@@ -165,7 +165,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
165
165
|
}
|
|
166
166
|
const operation = result.operation;
|
|
167
167
|
if (input.operationKey !== void 0 && (!operation || operation.operation_key !== input.operationKey || !Number.isSafeInteger(operation.completed_at_ms) || operation.completed_at_ms < 0 || !["executed", "operation_recovery"].includes(operation.source))) {
|
|
168
|
-
throw new (0,
|
|
168
|
+
throw new (0, _chunkDM3SHV6Ujs.CustomerDbQueryOutcomeUnknownError)(
|
|
169
169
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
170
170
|
"The server did not confirm the original atomic SQL operation.",
|
|
171
171
|
200,
|
|
@@ -2854,8 +2854,8 @@ function runtimeSelectionHeaders(runtime) {
|
|
|
2854
2854
|
}
|
|
2855
2855
|
const receivers = _optionalChain([process, 'access', _102 => _102.env, 'access', _103 => _103.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _104 => _104.trim, 'call', _105 => _105()]);
|
|
2856
2856
|
return {
|
|
2857
|
-
[
|
|
2858
|
-
...receivers ? { [
|
|
2857
|
+
[_chunkDM3SHV6Ujs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
2858
|
+
...receivers ? { [_chunkDM3SHV6Ujs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
2859
2859
|
};
|
|
2860
2860
|
}
|
|
2861
2861
|
function isolatedCiRuntimeEventReadHeaders() {
|
|
@@ -2871,7 +2871,7 @@ function isolatedCiRuntimeEventReadHeaders() {
|
|
|
2871
2871
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
2872
2872
|
);
|
|
2873
2873
|
}
|
|
2874
|
-
return { [
|
|
2874
|
+
return { [_chunkDM3SHV6Ujs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
2875
2875
|
}
|
|
2876
2876
|
function normalizeTestPolicyOverrides(value, source) {
|
|
2877
2877
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -3172,8 +3172,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3172
3172
|
* @throws {@link ConfigError} if no API key can be resolved from any source.
|
|
3173
3173
|
*/
|
|
3174
3174
|
constructor(options) {
|
|
3175
|
-
this.config =
|
|
3176
|
-
this.http = new (0,
|
|
3175
|
+
this.config = _chunkDM3SHV6Ujs.resolveConfig.call(void 0, options);
|
|
3176
|
+
this.http = new (0, _chunkDM3SHV6Ujs.HttpClient)(this.config);
|
|
3177
3177
|
this.toolCalls = new ToolCalls(
|
|
3178
3178
|
this.http,
|
|
3179
3179
|
this.config.timeout,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkUROXKPNDjs = require('./chunk-UROXKPND.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkCUUHQ3AOjs = require('./chunk-CUUHQ3AO.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkDM3SHV6Ujs = require('./chunk-DM3SHV6U.js');
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
|
|
@@ -52,7 +52,7 @@ function statusBannerLine(value) {
|
|
|
52
52
|
return `Service notice: ${banner.message}`;
|
|
53
53
|
}
|
|
54
54
|
function envFilePath(baseUrl) {
|
|
55
|
-
return
|
|
55
|
+
return _chunkDM3SHV6Ujs.hostEnvFilePath.call(void 0, baseUrl);
|
|
56
56
|
}
|
|
57
57
|
function normalizeAuthScope(value) {
|
|
58
58
|
if (!value || value === "global") return "global";
|
|
@@ -65,7 +65,7 @@ function parseAuthScope(args) {
|
|
|
65
65
|
}
|
|
66
66
|
function pendingClaimPath(baseUrl, scope) {
|
|
67
67
|
if (scope === "folder") {
|
|
68
|
-
const target =
|
|
68
|
+
const target = _chunkDM3SHV6Ujs.resolveProjectPinTarget.call(void 0, );
|
|
69
69
|
if (!target.ok) {
|
|
70
70
|
throw new Error(
|
|
71
71
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -75,10 +75,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
75
75
|
}
|
|
76
76
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
77
77
|
}
|
|
78
|
-
return `${
|
|
78
|
+
return `${_chunkDM3SHV6Ujs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunkDM3SHV6Ujs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
82
82
|
}
|
|
83
83
|
function savePendingClaim(baseUrl, claim) {
|
|
84
84
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -180,21 +180,21 @@ function parseRegisterWaitMode(args) {
|
|
|
180
180
|
function shouldWaitForRegisterClaim(mode) {
|
|
181
181
|
if (mode === "yes") return true;
|
|
182
182
|
if (mode === "no") return false;
|
|
183
|
-
return
|
|
183
|
+
return _chunkDM3SHV6Ujs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
184
184
|
}
|
|
185
185
|
function saveEnvValues(values, baseUrl, scope) {
|
|
186
186
|
const filtered = {
|
|
187
|
-
...values[
|
|
188
|
-
...values[
|
|
189
|
-
...values[
|
|
190
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
187
|
+
...values[_chunkDM3SHV6Ujs.HOST_URL_ENV] ? { [_chunkDM3SHV6Ujs.HOST_URL_ENV]: values[_chunkDM3SHV6Ujs.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunkDM3SHV6Ujs.API_KEY_ENV] ? { [_chunkDM3SHV6Ujs.API_KEY_ENV]: values[_chunkDM3SHV6Ujs.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunkDM3SHV6Ujs.ACTIVE_ORG_ID_ENV] ? { [_chunkDM3SHV6Ujs.ACTIVE_ORG_ID_ENV]: values[_chunkDM3SHV6Ujs.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkDM3SHV6Ujs.ACTIVE_ORG_NAME_ENV) ? { [_chunkDM3SHV6Ujs.ACTIVE_ORG_NAME_ENV]: values[_chunkDM3SHV6Ujs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
191
191
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
192
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
192
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkDM3SHV6Ujs.FEATURES_ENV) ? { [_chunkDM3SHV6Ujs.FEATURES_ENV]: values[_chunkDM3SHV6Ujs.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunkDM3SHV6Ujs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunkDM3SHV6Ujs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
function activeOrgEnvValues(data) {
|
|
@@ -202,21 +202,21 @@ function activeOrgEnvValues(data) {
|
|
|
202
202
|
if (!orgId) return {};
|
|
203
203
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
204
204
|
return {
|
|
205
|
-
[
|
|
206
|
-
[
|
|
207
|
-
...
|
|
205
|
+
[_chunkDM3SHV6Ujs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunkDM3SHV6Ujs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunkDM3SHV6Ujs.featureEnvValues.call(void 0, data)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
211
211
|
const headers = {
|
|
212
212
|
"Content-Type": "application/json",
|
|
213
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
213
|
+
"User-Agent": `deepline-ts-sdk/${_chunkDM3SHV6Ujs.SDK_VERSION}`,
|
|
214
214
|
"X-Deepline-Client-Family": "sdk",
|
|
215
215
|
"X-Deepline-CLI-Family": "sdk",
|
|
216
|
-
"X-Deepline-Agent-Runtime":
|
|
217
|
-
"X-Deepline-CLI-Version":
|
|
218
|
-
"X-Deepline-SDK-Version":
|
|
219
|
-
"X-Deepline-API-Contract":
|
|
216
|
+
"X-Deepline-Agent-Runtime": _chunkDM3SHV6Ujs.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunkDM3SHV6Ujs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunkDM3SHV6Ujs.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunkDM3SHV6Ujs.SDK_API_CONTRACT
|
|
220
220
|
};
|
|
221
221
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
222
222
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -254,7 +254,7 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
254
254
|
throw lastError instanceof Error ? lastError : new Error(String(lastError));
|
|
255
255
|
}
|
|
256
256
|
async function reportSetupCompleted(input) {
|
|
257
|
-
const apiKey = input.authScope === "folder" ?
|
|
257
|
+
const apiKey = input.authScope === "folder" ? _chunkDM3SHV6Ujs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkDM3SHV6Ujs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
258
258
|
if (!apiKey) return;
|
|
259
259
|
try {
|
|
260
260
|
await httpJson(
|
|
@@ -351,7 +351,7 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
async function handleRegister(args) {
|
|
354
|
-
const baseUrl =
|
|
354
|
+
const baseUrl = _chunkDM3SHV6Ujs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
355
355
|
let orgName = "";
|
|
356
356
|
let orgId = "";
|
|
357
357
|
let agentName = "";
|
|
@@ -406,19 +406,19 @@ async function handleRegister(args) {
|
|
|
406
406
|
});
|
|
407
407
|
saveEnvValues(
|
|
408
408
|
{
|
|
409
|
-
[
|
|
409
|
+
[_chunkDM3SHV6Ujs.HOST_URL_ENV]: baseUrl
|
|
410
410
|
},
|
|
411
411
|
baseUrl,
|
|
412
412
|
authScope
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
415
|
if (claimUrl) {
|
|
416
|
-
const shouldOpen = waitMode !== "no" &&
|
|
416
|
+
const shouldOpen = waitMode !== "no" && _chunkDM3SHV6Ujs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
417
417
|
console.log(
|
|
418
418
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
419
419
|
);
|
|
420
420
|
console.log(` ${claimUrl}`);
|
|
421
|
-
if (shouldOpen)
|
|
421
|
+
if (shouldOpen) _chunkUROXKPNDjs.openInBrowser.call(void 0, claimUrl);
|
|
422
422
|
}
|
|
423
423
|
if (data.cli_message) {
|
|
424
424
|
console.log(String(data.cli_message));
|
|
@@ -461,8 +461,8 @@ async function handleRegister(args) {
|
|
|
461
461
|
if (apiKey) {
|
|
462
462
|
saveEnvValues(
|
|
463
463
|
{
|
|
464
|
-
[
|
|
465
|
-
[
|
|
464
|
+
[_chunkDM3SHV6Ujs.HOST_URL_ENV]: baseUrl,
|
|
465
|
+
[_chunkDM3SHV6Ujs.API_KEY_ENV]: apiKey,
|
|
466
466
|
...activeOrgEnvValues(statusData)
|
|
467
467
|
},
|
|
468
468
|
baseUrl,
|
|
@@ -484,7 +484,7 @@ async function handleRegister(args) {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
async function handleWait(args) {
|
|
487
|
-
const baseUrl =
|
|
487
|
+
const baseUrl = _chunkDM3SHV6Ujs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
488
488
|
let timeoutSeconds = 300;
|
|
489
489
|
let requestedScope;
|
|
490
490
|
if (args.includes("--auth-scope")) {
|
|
@@ -508,7 +508,7 @@ async function handleWait(args) {
|
|
|
508
508
|
const authScope = resumed.scope;
|
|
509
509
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _11 => _11.claimToken]), () => ( ""));
|
|
510
510
|
if (!pendingClaim) {
|
|
511
|
-
const scopedApiKey = authScope === "folder" ?
|
|
511
|
+
const scopedApiKey = authScope === "folder" ? _chunkDM3SHV6Ujs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkDM3SHV6Ujs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
512
512
|
if (scopedApiKey) {
|
|
513
513
|
console.log("Already connected.");
|
|
514
514
|
return EXIT_OK;
|
|
@@ -551,8 +551,8 @@ async function handleWait(args) {
|
|
|
551
551
|
if (apiKey) {
|
|
552
552
|
saveEnvValues(
|
|
553
553
|
{
|
|
554
|
-
[
|
|
555
|
-
[
|
|
554
|
+
[_chunkDM3SHV6Ujs.HOST_URL_ENV]: baseUrl,
|
|
555
|
+
[_chunkDM3SHV6Ujs.API_KEY_ENV]: apiKey,
|
|
556
556
|
...activeOrgEnvValues(data)
|
|
557
557
|
},
|
|
558
558
|
baseUrl,
|
|
@@ -576,9 +576,9 @@ async function handleWait(args) {
|
|
|
576
576
|
return EXIT_AUTH;
|
|
577
577
|
}
|
|
578
578
|
async function handleStatus(args) {
|
|
579
|
-
const baseUrl =
|
|
579
|
+
const baseUrl = _chunkDM3SHV6Ujs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
580
580
|
const reveal = args.includes("--reveal");
|
|
581
|
-
const jsonOutput =
|
|
581
|
+
const jsonOutput = _chunkUROXKPNDjs.argsWantJson.call(void 0, args);
|
|
582
582
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
583
583
|
let authScope = null;
|
|
584
584
|
if (hasExplicitAuthScope) {
|
|
@@ -618,14 +618,14 @@ async function handleStatus(args) {
|
|
|
618
618
|
};
|
|
619
619
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
620
620
|
}
|
|
621
|
-
const apiKey = authScope === "folder" ?
|
|
621
|
+
const apiKey = authScope === "folder" ? _chunkDM3SHV6Ujs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkDM3SHV6Ujs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkDM3SHV6Ujs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
622
622
|
if (!apiKey) {
|
|
623
623
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
624
624
|
baseUrl,
|
|
625
625
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
626
626
|
);
|
|
627
627
|
if (pendingClaim) {
|
|
628
|
-
|
|
628
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
629
629
|
{
|
|
630
630
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
631
631
|
status: "pending",
|
|
@@ -646,7 +646,7 @@ async function handleStatus(args) {
|
|
|
646
646
|
);
|
|
647
647
|
return EXIT_OK;
|
|
648
648
|
}
|
|
649
|
-
|
|
649
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
650
650
|
{
|
|
651
651
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
652
652
|
status: "not connected",
|
|
@@ -682,7 +682,7 @@ async function handleStatus(args) {
|
|
|
682
682
|
}
|
|
683
683
|
);
|
|
684
684
|
if (status === 401 || status === 403) {
|
|
685
|
-
|
|
685
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
686
686
|
{
|
|
687
687
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
688
688
|
status: "unauthorized",
|
|
@@ -712,7 +712,7 @@ async function handleStatus(args) {
|
|
|
712
712
|
console.error(`Auth status error (status ${status}).`);
|
|
713
713
|
return EXIT_SERVER;
|
|
714
714
|
}
|
|
715
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
715
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkDM3SHV6Ujs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
716
716
|
clearSatisfiedPendingClaim(
|
|
717
717
|
baseUrl,
|
|
718
718
|
resolvedAuthScope,
|
|
@@ -740,28 +740,28 @@ async function handleStatus(args) {
|
|
|
740
740
|
if (apiKeyResp) {
|
|
741
741
|
saveEnvValues(
|
|
742
742
|
{
|
|
743
|
-
[
|
|
744
|
-
[
|
|
743
|
+
[_chunkDM3SHV6Ujs.HOST_URL_ENV]: baseUrl,
|
|
744
|
+
[_chunkDM3SHV6Ujs.API_KEY_ENV]: apiKeyResp,
|
|
745
745
|
...activeOrgEnvValues(data)
|
|
746
746
|
},
|
|
747
747
|
baseUrl,
|
|
748
748
|
resolvedAuthScope
|
|
749
749
|
);
|
|
750
750
|
if (resolvedAuthScope === "folder") {
|
|
751
|
-
const target =
|
|
751
|
+
const target = _chunkDM3SHV6Ujs.resolveProjectPinTarget.call(void 0, );
|
|
752
752
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
753
753
|
} else {
|
|
754
754
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
758
|
-
saveEnvValues(
|
|
757
|
+
} else if (resolvedAuthScope === "folder" || _chunkDM3SHV6Ujs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
758
|
+
saveEnvValues(_chunkDM3SHV6Ujs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
759
759
|
}
|
|
760
|
-
|
|
760
|
+
_chunkUROXKPNDjs.printCommandEnvelope.call(void 0,
|
|
761
761
|
{
|
|
762
762
|
...payload,
|
|
763
|
-
...
|
|
764
|
-
command_context:
|
|
763
|
+
..._chunkDM3SHV6Ujs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
764
|
+
command_context: _chunkDM3SHV6Ujs.resolveCliCommandContext.call(void 0,
|
|
765
765
|
{ baseUrl, apiKey },
|
|
766
766
|
resolvedAuthScope
|
|
767
767
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCISKBOXDjs = require('./chunk-CISKBOXD.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/npm-script-policy.ts
|
|
6
6
|
var _child_process = require('child_process');
|
|
@@ -13,7 +13,7 @@ function npmSupportsAllowScripts(version) {
|
|
|
13
13
|
}
|
|
14
14
|
function readNpmVersion(env) {
|
|
15
15
|
try {
|
|
16
|
-
const plan =
|
|
16
|
+
const plan = _chunkCISKBOXDjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
|
|
17
17
|
const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
|
|
18
18
|
encoding: "utf8",
|
|
19
19
|
env,
|