deepline 0.3.299 → 0.3.300
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +4 -0
- package/dist/cli/auth-6JUPJXSW.js +31 -0
- package/dist/cli/{auth-GWIEEZWL.mjs → auth-RVK23SLA.mjs} +4 -4
- package/dist/cli/{billing-K5EVUVEH.js → billing-6LEQNTUS.js} +70 -70
- package/dist/cli/{billing-O5RAKWXK.mjs → billing-CBWRPMBG.mjs} +4 -4
- package/dist/cli/{chunk-CL4YLYGW.js → chunk-2C5H32YE.js} +6 -6
- package/dist/cli/{chunk-TRSF2X3K.mjs → chunk-6AUI2MS4.mjs} +1 -1
- package/dist/cli/{chunk-DMTWRFPD.js → chunk-6CLYAWXK.js} +4 -4
- package/dist/cli/{chunk-S34ZVHGJ.mjs → chunk-BFGSCAZ7.mjs} +1 -1
- package/dist/cli/{chunk-FKKCGFQ2.mjs → chunk-BLANZQG2.mjs} +2 -2
- package/dist/cli/{chunk-XUMCCIOY.js → chunk-BW3WGFLG.js} +48 -48
- package/dist/cli/{chunk-WF7XMZAC.js → chunk-DRLNWL4W.js} +6 -6
- package/dist/cli/{chunk-5465KL4F.mjs → chunk-E6S4RTMG.mjs} +4 -4
- package/dist/cli/{chunk-FT2TIKOX.mjs → chunk-GQISQAAZ.mjs} +2 -2
- package/dist/cli/{chunk-BQ63LCEL.mjs → chunk-LH7IBCW2.mjs} +3 -3
- package/dist/cli/{chunk-SJK2LSDQ.js → chunk-M5SHROFS.js} +7 -6
- package/dist/cli/{chunk-W2N5FICT.mjs → chunk-MFGPKFJC.mjs} +1 -1
- package/dist/cli/{chunk-2BISKKLW.js → chunk-N5A3LWPC.js} +57 -57
- package/dist/cli/{chunk-D2P4AM5M.js → chunk-NMTG3N2J.js} +6 -6
- package/dist/cli/{chunk-QAEIUQPS.mjs → chunk-NXOML2N6.mjs} +1 -1
- package/dist/cli/{chunk-ACSNZYU3.js → chunk-OCKGMK6B.js} +2 -2
- package/dist/cli/{chunk-4B7VWFHW.js → chunk-OKKAFDXS.js} +15 -15
- package/dist/cli/{chunk-6ECTEH6V.mjs → chunk-RLDEQJQQ.mjs} +2 -2
- package/dist/cli/{chunk-3M3LQJUV.js → chunk-XUA3QCZU.js} +26 -26
- package/dist/cli/{chunk-ZWUOF7WR.mjs → chunk-YLYVPHEG.mjs} +1 -1
- package/dist/cli/{chunk-REFGDIMC.js → chunk-YR26QBMJ.js} +1 -1
- package/dist/cli/{chunk-CJBMCJW7.mjs → chunk-Z3RMVRCQ.mjs} +2 -1
- package/dist/cli/{client-OXUEAZD2.mjs → client-6D6UBKDX.mjs} +3 -3
- package/dist/cli/client-HAGQESNI.js +20 -0
- package/dist/cli/{csv-J24BXLDP.js → csv-O4HDE34Y.js} +12 -12
- package/dist/cli/{csv-NV6QBRGT.mjs → csv-VK327Z63.mjs} +3 -3
- package/dist/cli/{db-FL4N5LXG.js → db-IL35EIOE.js} +20 -20
- package/dist/cli/{db-IY4LHKLR.mjs → db-TRNRYJL6.mjs} +4 -4
- package/dist/cli/{executions-OYGLF6K2.js → executions-CFWDNHOQ.js} +6 -6
- package/dist/cli/{executions-72PNXJWI.mjs → executions-JEUBKNUA.mjs} +4 -4
- package/dist/cli/{feedback-NGPJBTUS.mjs → feedback-BSSEEXR2.mjs} +3 -3
- package/dist/cli/{feedback-WHOLOKBU.js → feedback-F7HXHQY3.js} +6 -6
- package/dist/cli/{git-HQKCORLT.mjs → git-I3AAHTCJ.mjs} +4 -4
- package/dist/cli/git-T5WWT3DW.js +23 -0
- package/dist/cli/index.js +73 -73
- package/dist/cli/index.mjs +30 -30
- package/dist/cli/{legacy-noops-5RHXWONK.js → legacy-noops-HNN7WPWF.js} +7 -7
- package/dist/cli/{legacy-noops-MCAHTGPU.mjs → legacy-noops-KTRWO7NA.mjs} +4 -4
- package/dist/cli/{monitors-MC4QEQ7N.js → monitors-4Y4M3ZJ3.js} +85 -85
- package/dist/cli/{monitors-X2KE6CL6.mjs → monitors-D64KB7G2.mjs} +4 -4
- package/dist/cli/{org-75TWPW5D.js → org-ELLMCZRC.js} +60 -60
- package/dist/cli/{org-YW6EKMHL.mjs → org-UGIVFU7B.mjs} +4 -4
- package/dist/cli/{play-DEBY5SCV.mjs → play-LUNGZ5ZJ.mjs} +9 -6
- package/dist/cli/{play-CAMPEI5I.js → play-NXV5UJYW.js} +203 -200
- package/dist/cli/{providers-VNOHQ2AS.js → providers-AL6YIZVA.js} +7 -7
- package/dist/cli/{providers-IA77P6YJ.mjs → providers-YCNHAEFJ.mjs} +4 -4
- package/dist/cli/{quickstart-LDTV2HGI.js → quickstart-LK5IBLYY.js} +5 -5
- package/dist/cli/{quickstart-K7HQS543.mjs → quickstart-R6AOCVA2.mjs} +3 -3
- package/dist/cli/{search-536X3UCU.mjs → search-77YOO5TG.mjs} +5 -5
- package/dist/cli/{search-SN5OPRXZ.js → search-PGW2ZEZ3.js} +6 -6
- package/dist/cli/{secrets-2EW56WXT.js → secrets-5OV4C2UI.js} +13 -13
- package/dist/cli/{secrets-B3AJVZEX.mjs → secrets-OWNCPA6L.mjs} +4 -4
- package/dist/cli/{sessions-3VDMBHNS.js → sessions-NOLZ4NAQ.js} +5 -5
- package/dist/cli/{sessions-WBJUUGWS.mjs → sessions-RVJHCSYH.mjs} +4 -4
- package/dist/cli/{settings-KABYSG3X.js → settings-326S34JQ.js} +74 -74
- package/dist/cli/{settings-RLDDNKLV.mjs → settings-LEYUQDYL.mjs} +7 -7
- package/dist/cli/{setup-CSOSGT4H.js → setup-7RTEC2RE.js} +41 -41
- package/dist/cli/{setup-LXS6GANX.mjs → setup-CNE25BAJ.mjs} +6 -6
- package/dist/cli/{skills-63SF5XTZ.mjs → skills-R4EC4IXL.mjs} +4 -4
- package/dist/cli/skills-SE54MI6I.js +28 -0
- package/dist/cli/{tools-HNP35FVR.mjs → tools-BEBLJVVA.mjs} +5 -5
- package/dist/cli/{tools-RHL5K6UA.js → tools-ZVTN62JI.js} +50 -50
- package/dist/cli/{update-BIUXK2GK.mjs → update-5JG7TQZ4.mjs} +6 -6
- package/dist/cli/update-IQYOCMLG.js +28 -0
- package/dist/cli/{workflow-EKLCRCUD.mjs → workflow-FQVZBGT3.mjs} +5 -5
- package/dist/cli/{workflow-45YNQNPE.js → workflow-VTDHF75U.js} +15 -15
- package/dist/{client-Ct4jmvAg.d.ts → client-DjJfoW8r.d.ts} +4 -0
- package/dist/{client-Ct9GKrwu.d.mts → client-Me88eH3z.d.mts} +4 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +70 -70
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-4WFBFN3L.js +0 -31
- package/dist/cli/client-ZBLK3VOY.js +0 -20
- package/dist/cli/git-GD5I7YOP.js +0 -23
- package/dist/cli/skills-C7MLZJEK.js +0 -28
- package/dist/cli/update-NFJGKKZ6.js +0 -28
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkDRLNWL4Wjs = require('./chunk-DRLNWL4W.js');
|
|
5
5
|
|
|
6
6
|
// src/cli/commands/sessions.ts
|
|
7
7
|
|
|
@@ -420,7 +420,7 @@ function buildSessionUploadContent(raw) {
|
|
|
420
420
|
return { encodedContent: encoded, needsChunking: true };
|
|
421
421
|
}
|
|
422
422
|
async function uploadPayload(path, payload) {
|
|
423
|
-
const { http } =
|
|
423
|
+
const { http } = _chunkDRLNWL4Wjs.getAuthedHttpClient.call(void 0, );
|
|
424
424
|
return await http.post(path, payload);
|
|
425
425
|
}
|
|
426
426
|
async function uploadChunkedSessions(sessions, options) {
|
|
@@ -452,7 +452,7 @@ async function uploadChunkedSessions(sessions, options) {
|
|
|
452
452
|
environments: sessions.map(() => detectShellContext()),
|
|
453
453
|
...options.rating ? { rating: options.rating } : {}
|
|
454
454
|
});
|
|
455
|
-
|
|
455
|
+
_chunkDRLNWL4Wjs.printCommandEnvelope.call(void 0,
|
|
456
456
|
{
|
|
457
457
|
...response,
|
|
458
458
|
ok: true,
|
|
@@ -481,7 +481,7 @@ async function handleSessionsSend(options) {
|
|
|
481
481
|
filename: _path.basename.call(void 0, filePath),
|
|
482
482
|
...rating ? { rating } : {}
|
|
483
483
|
});
|
|
484
|
-
|
|
484
|
+
_chunkDRLNWL4Wjs.printCommandEnvelope.call(void 0,
|
|
485
485
|
{
|
|
486
486
|
...response2,
|
|
487
487
|
ok: true,
|
|
@@ -530,7 +530,7 @@ async function handleSessionsSend(options) {
|
|
|
530
530
|
environment: detectShellContext(),
|
|
531
531
|
...rating ? { rating } : {}
|
|
532
532
|
});
|
|
533
|
-
|
|
533
|
+
_chunkDRLNWL4Wjs.printCommandEnvelope.call(void 0,
|
|
534
534
|
{
|
|
535
535
|
...response,
|
|
536
536
|
ok: true,
|
|
@@ -635,7 +635,7 @@ ${refreshMeta}
|
|
|
635
635
|
</body>
|
|
636
636
|
</html>`;
|
|
637
637
|
_fs.writeFileSync.call(void 0, outputPath, html, "utf8");
|
|
638
|
-
|
|
638
|
+
_chunkDRLNWL4Wjs.printCommandEnvelope.call(void 0,
|
|
639
639
|
{
|
|
640
640
|
ok: true,
|
|
641
641
|
file: outputPath,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkYR26QBMJjs = require('./chunk-YR26QBMJ.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -721,9 +721,9 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
|
721
721
|
}
|
|
722
722
|
|
|
723
723
|
// src/version.ts
|
|
724
|
-
var SDK_VERSION =
|
|
725
|
-
var SDK_API_MAJOR =
|
|
726
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
724
|
+
var SDK_VERSION = _chunkYR26QBMJjs.SDK_RELEASE.version;
|
|
725
|
+
var SDK_API_MAJOR = _chunkYR26QBMJjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
726
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunkYR26QBMJjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
727
727
|
|
|
728
728
|
// src/agent-runtime.ts
|
|
729
729
|
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-GAMFK2ZP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
printCommandEnvelope
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6AUI2MS4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_SKILL_AGENTS,
|
|
9
9
|
KNOWN_SKILL_AGENTS,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
sdkCliStateDirPath,
|
|
23
23
|
skillsAgentPathSegment,
|
|
24
24
|
writeSdkSkillsLocalVersion
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-BFGSCAZ7.mjs";
|
|
26
26
|
import {
|
|
27
27
|
DeeplineError
|
|
28
28
|
} from "./chunk-NXGCO4JB.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkDRLNWL4Wjs = require('./chunk-DRLNWL4W.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkWF7XMZACjs = require('./chunk-WF7XMZAC.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunk6CLYAWXKjs = require('./chunk-6CLYAWXK.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 _chunk6CLYAWXKjs.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 = _chunk6CLYAWXKjs.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 `${_chunk6CLYAWXKjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunk6CLYAWXKjs.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 _chunk6CLYAWXKjs.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[_chunk6CLYAWXKjs.HOST_URL_ENV] ? { [_chunk6CLYAWXKjs.HOST_URL_ENV]: values[_chunk6CLYAWXKjs.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunk6CLYAWXKjs.API_KEY_ENV] ? { [_chunk6CLYAWXKjs.API_KEY_ENV]: values[_chunk6CLYAWXKjs.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunk6CLYAWXKjs.ACTIVE_ORG_ID_ENV] ? { [_chunk6CLYAWXKjs.ACTIVE_ORG_ID_ENV]: values[_chunk6CLYAWXKjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunk6CLYAWXKjs.ACTIVE_ORG_NAME_ENV) ? { [_chunk6CLYAWXKjs.ACTIVE_ORG_NAME_ENV]: values[_chunk6CLYAWXKjs.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, _chunk6CLYAWXKjs.FEATURES_ENV) ? { [_chunk6CLYAWXKjs.FEATURES_ENV]: values[_chunk6CLYAWXKjs.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunk6CLYAWXKjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunk6CLYAWXKjs.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
|
+
[_chunk6CLYAWXKjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunk6CLYAWXKjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunk6CLYAWXKjs.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/${_chunk6CLYAWXKjs.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": _chunk6CLYAWXKjs.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunk6CLYAWXKjs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunk6CLYAWXKjs.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunk6CLYAWXKjs.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" ? _chunk6CLYAWXKjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunk6CLYAWXKjs.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 = _chunk6CLYAWXKjs.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
|
+
[_chunk6CLYAWXKjs.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" && _chunk6CLYAWXKjs.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) _chunkDRLNWL4Wjs.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
|
+
[_chunk6CLYAWXKjs.HOST_URL_ENV]: baseUrl,
|
|
465
|
+
[_chunk6CLYAWXKjs.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 = _chunk6CLYAWXKjs.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" ? _chunk6CLYAWXKjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunk6CLYAWXKjs.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
|
+
[_chunk6CLYAWXKjs.HOST_URL_ENV]: baseUrl,
|
|
555
|
+
[_chunk6CLYAWXKjs.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 = _chunk6CLYAWXKjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
580
580
|
const reveal = args.includes("--reveal");
|
|
581
|
-
const jsonOutput =
|
|
581
|
+
const jsonOutput = _chunkDRLNWL4Wjs.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" ? _chunk6CLYAWXKjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunk6CLYAWXKjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunk6CLYAWXKjs.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
|
+
_chunkDRLNWL4Wjs.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
|
+
_chunkDRLNWL4Wjs.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
|
+
_chunkDRLNWL4Wjs.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, () => ( (_chunk6CLYAWXKjs.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
|
+
[_chunk6CLYAWXKjs.HOST_URL_ENV]: baseUrl,
|
|
744
|
+
[_chunk6CLYAWXKjs.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 = _chunk6CLYAWXKjs.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" || _chunk6CLYAWXKjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
758
|
+
saveEnvValues(_chunk6CLYAWXKjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
759
759
|
}
|
|
760
|
-
|
|
760
|
+
_chunkDRLNWL4Wjs.printCommandEnvelope.call(void 0,
|
|
761
761
|
{
|
|
762
762
|
...payload,
|
|
763
|
-
...
|
|
764
|
-
command_context:
|
|
763
|
+
..._chunk6CLYAWXKjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
764
|
+
command_context: _chunk6CLYAWXKjs.resolveCliCommandContext.call(void 0,
|
|
765
765
|
{ baseUrl, apiKey },
|
|
766
766
|
resolvedAuthScope
|
|
767
767
|
)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk6CLYAWXKjs = require('./chunk-6CLYAWXK.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -136,8 +136,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
136
136
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
137
137
|
var defaultBrowserCommandRunner = childProcess;
|
|
138
138
|
function getAuthedHttpClient() {
|
|
139
|
-
const config =
|
|
140
|
-
return { config, http: new (0,
|
|
139
|
+
const config = _chunk6CLYAWXKjs.resolveConfig.call(void 0, );
|
|
140
|
+
return { config, http: new (0, _chunk6CLYAWXKjs.HttpClient)(config) };
|
|
141
141
|
}
|
|
142
142
|
function stableOsUserId() {
|
|
143
143
|
try {
|
|
@@ -477,7 +477,7 @@ function collectLocalEnvInfo() {
|
|
|
477
477
|
os: `${process.platform} ${process.arch}`,
|
|
478
478
|
node_version: process.version,
|
|
479
479
|
home_dir: homeDir,
|
|
480
|
-
agent_runtime:
|
|
480
|
+
agent_runtime: _chunk6CLYAWXKjs.detectAgentRuntime.call(void 0, )
|
|
481
481
|
};
|
|
482
482
|
const env = process.env;
|
|
483
483
|
const optional = {
|
|
@@ -725,9 +725,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
725
725
|
}
|
|
726
726
|
function withAgentCommandContext(value) {
|
|
727
727
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
728
|
-
return
|
|
728
|
+
return _chunk6CLYAWXKjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
729
729
|
...valueRecord,
|
|
730
|
-
command_context:
|
|
730
|
+
command_context: _chunk6CLYAWXKjs.resolveCliCommandContext.call(void 0, )
|
|
731
731
|
} : value;
|
|
732
732
|
}
|
|
733
733
|
function printJson(value, fields) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
npmSupportsAllowScripts,
|
|
3
3
|
readNpmVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YLYVPHEG.mjs";
|
|
5
5
|
import {
|
|
6
6
|
resolveShellSpawn,
|
|
7
7
|
runSkillsCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BLANZQG2.mjs";
|
|
9
9
|
import {
|
|
10
10
|
printCommandEnvelope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6AUI2MS4.mjs";
|
|
12
12
|
import {
|
|
13
13
|
autoDetectBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BFGSCAZ7.mjs";
|
|
15
15
|
|
|
16
16
|
// src/cli/commands/update.ts
|
|
17
17
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6AUI2MS4.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
saveHostEnvValues,
|
|
26
26
|
saveProjectDeeplineEnvValues,
|
|
27
27
|
storedHostApiKey
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BFGSCAZ7.mjs";
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
import {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z3RMVRCQ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
printCommandEnvelope
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6AUI2MS4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
resolveConfig,
|
|
9
9
|
sdkCliStateDirPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BFGSCAZ7.mjs";
|
|
11
11
|
|
|
12
12
|
// src/cli/search-ref.ts
|
|
13
13
|
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -14,7 +14,7 @@ var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunk6CLYAWXKjs = require('./chunk-6CLYAWXK.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -2191,8 +2191,8 @@ function runtimeSelectionHeaders(runtime) {
|
|
|
2191
2191
|
}
|
|
2192
2192
|
const receivers = _optionalChain([process, 'access', _95 => _95.env, 'access', _96 => _96.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _97 => _97.trim, 'call', _98 => _98()]);
|
|
2193
2193
|
return {
|
|
2194
|
-
[
|
|
2195
|
-
...receivers ? { [
|
|
2194
|
+
[_chunk6CLYAWXKjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
2195
|
+
...receivers ? { [_chunk6CLYAWXKjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
2196
2196
|
};
|
|
2197
2197
|
}
|
|
2198
2198
|
function isolatedCiRuntimeEventReadHeaders() {
|
|
@@ -2208,7 +2208,7 @@ function isolatedCiRuntimeEventReadHeaders() {
|
|
|
2208
2208
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
2209
2209
|
);
|
|
2210
2210
|
}
|
|
2211
|
-
return { [
|
|
2211
|
+
return { [_chunk6CLYAWXKjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
2212
2212
|
}
|
|
2213
2213
|
function normalizeTestPolicyOverrides(value, source) {
|
|
2214
2214
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -2509,8 +2509,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
2509
2509
|
* @throws {@link ConfigError} if no API key can be resolved from any source.
|
|
2510
2510
|
*/
|
|
2511
2511
|
constructor(options) {
|
|
2512
|
-
this.config =
|
|
2513
|
-
this.http = new (0,
|
|
2512
|
+
this.config = _chunk6CLYAWXKjs.resolveConfig.call(void 0, options);
|
|
2513
|
+
this.http = new (0, _chunk6CLYAWXKjs.HttpClient)(this.config);
|
|
2514
2514
|
this.toolCalls = new ToolCalls(
|
|
2515
2515
|
this.http,
|
|
2516
2516
|
this.config.timeout,
|
|
@@ -2692,6 +2692,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
2692
2692
|
...play.reference ? { reference: play.reference } : {},
|
|
2693
2693
|
...play.displayName ? { displayName: play.displayName } : {},
|
|
2694
2694
|
...description ? { description } : {},
|
|
2695
|
+
...play.guidance ? { guidance: play.guidance } : {},
|
|
2695
2696
|
pinned: Boolean(play.pinned),
|
|
2696
2697
|
toolCategories: _nullishCoalesce(play.toolCategories, () => ( [])),
|
|
2697
2698
|
origin: play.origin,
|