deepline 0.3.349 → 0.3.351
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/scheduler-backends/postgres-budget-state.ts +30 -6
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +47 -22
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +114 -25
- package/dist/cli/{auth-MPHXSP64.mjs → auth-NQLQ5QBV.mjs} +4 -4
- package/dist/cli/auth-YTDZKDCB.js +31 -0
- package/dist/cli/{billing-K5WCTRBE.mjs → billing-AXSNXOTN.mjs} +4 -4
- package/dist/cli/{billing-2KUUGVDZ.js → billing-AZCBAJ6Q.js} +73 -73
- package/dist/cli/{chunk-JKJSTQ2I.mjs → chunk-722274AA.mjs} +1 -1
- package/dist/cli/{chunk-GHYMVZID.js → chunk-73J3BGJ3.js} +60 -60
- package/dist/cli/{chunk-DOHULRK2.mjs → chunk-7BGGBA4V.mjs} +4 -4
- package/dist/cli/{chunk-QCSLIEMC.js → chunk-7ZAG2XG5.js} +6 -6
- package/dist/cli/{chunk-WOFHIUOT.mjs → chunk-AQQFVUDI.mjs} +2 -2
- package/dist/cli/{chunk-I4VZKXMX.js → chunk-BKOYPUK2.js} +26 -26
- package/dist/cli/{chunk-MVQ3JAJA.js → chunk-BOOZ7D7V.js} +225 -225
- package/dist/cli/{chunk-O2FM2MS5.mjs → chunk-BR3XFSXN.mjs} +6 -6
- package/dist/cli/{chunk-QAM2K3CG.js → chunk-BWFUBETD.js} +48 -48
- package/dist/cli/{chunk-BPJTGASI.mjs → chunk-CFALTV4O.mjs} +2 -2
- package/dist/cli/{chunk-S347PHNB.js → chunk-CIDP2FSO.js} +9 -9
- package/dist/cli/{chunk-UE7DS2YV.mjs → chunk-DBWASDYS.mjs} +3 -3
- package/dist/cli/{chunk-ZQ6UF55Y.mjs → chunk-GT5HPOM3.mjs} +1 -1
- package/dist/cli/{chunk-BEGPN6NG.mjs → chunk-H5JUSKHB.mjs} +1 -1
- package/dist/cli/{chunk-M42H2BPA.js → chunk-ICZTTYDS.js} +8 -8
- package/dist/cli/{chunk-VDOH4A34.mjs → chunk-IKC7EPDS.mjs} +1 -1
- package/dist/cli/{chunk-CRSMVSER.js → chunk-JV6GFIQQ.js} +45 -45
- package/dist/cli/{chunk-KW25DKRC.js → chunk-L7YXXM5W.js} +1 -1
- package/dist/cli/{chunk-JBGR6U57.js → chunk-NUD2WO3E.js} +4 -4
- package/dist/cli/{chunk-SPB6CF4S.mjs → chunk-OF4N5X7Z.mjs} +2 -2
- package/dist/cli/{chunk-IHYVEM5Q.js → chunk-QD7W3OBA.js} +8 -8
- package/dist/cli/{chunk-GXN7DGNL.mjs → chunk-QOYD2THS.mjs} +2 -2
- package/dist/cli/{chunk-TVS3TAFR.js → chunk-SDLFAGQS.js} +15 -15
- package/dist/cli/{chunk-HVD3DK7S.mjs → chunk-URBPUPJS.mjs} +5 -5
- package/dist/cli/{chunk-6YZDQZE6.js → chunk-WY5N3SSC.js} +2 -2
- package/dist/cli/{chunk-6OVLJLYH.mjs → chunk-XFTGWGZ5.mjs} +1 -1
- package/dist/cli/client-3GCQER5K.js +20 -0
- package/dist/cli/{client-JWKYNLCR.mjs → client-NTEDBLQK.mjs} +3 -3
- package/dist/cli/{csv-IW75DRFX.js → csv-6PZZ4ARC.js} +12 -12
- package/dist/cli/{csv-Y2O237NO.mjs → csv-SSSPKSKU.mjs} +3 -3
- package/dist/cli/{db-6Q4VK5T2.js → db-3YL7YWTM.js} +29 -29
- package/dist/cli/{db-JW6UUJXC.mjs → db-XEVVDWOP.mjs} +4 -4
- package/dist/cli/{describe-DI65QISF.js → describe-XZNQXFXD.js} +15 -15
- package/dist/cli/{describe-JLN4RTGM.mjs → describe-YZ365BKT.mjs} +8 -8
- package/dist/cli/{executions-GB2E3BU6.js → executions-WBTIT2RU.js} +6 -6
- package/dist/cli/{executions-UK6LA2O5.mjs → executions-ZAV7YCQC.mjs} +4 -4
- package/dist/cli/{feedback-N2KAFS3R.mjs → feedback-NOYG63QE.mjs} +3 -3
- package/dist/cli/{feedback-MJE3A5ON.js → feedback-PRVJ26X7.js} +7 -7
- package/dist/cli/{git-NWRJFNII.mjs → git-AOSMM4US.mjs} +4 -4
- package/dist/cli/git-ZI4H72YR.js +23 -0
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-EIO65N6W.js → legacy-noops-RTNAEYVF.js} +7 -7
- package/dist/cli/{legacy-noops-RR4W2TTE.mjs → legacy-noops-T6DKTGZY.mjs} +4 -4
- package/dist/cli/{monitors-U7NVJDQL.js → monitors-7ERJ4277.js} +85 -85
- package/dist/cli/{monitors-HNUCJYET.mjs → monitors-QIR3T2QR.mjs} +4 -4
- package/dist/cli/{org-UBHNTBSB.js → org-7P46IVVU.js} +60 -60
- package/dist/cli/{org-O7MFRQNG.mjs → org-WNRQQZNP.mjs} +4 -4
- package/dist/cli/{play-4EIIEFQK.mjs → play-57XTHKER.mjs} +7 -7
- package/dist/cli/play-QIX7RZ74.js +153 -0
- package/dist/cli/{providers-REJIT7CX.mjs → providers-ET6UBGWJ.mjs} +4 -4
- package/dist/cli/{providers-CJ56HZIT.js → providers-USRX4UVZ.js} +7 -7
- package/dist/cli/{quickstart-BZUQWQK5.js → quickstart-BPPQFMWI.js} +5 -5
- package/dist/cli/{quickstart-DQN2LYBC.mjs → quickstart-OGZ7BZKS.mjs} +3 -3
- package/dist/cli/{search-35UOMFL2.mjs → search-MZARI5XA.mjs} +5 -5
- package/dist/cli/search-P447HWLU.js +26 -0
- package/dist/cli/{secrets-G4RYNUUD.js → secrets-O6XG35SA.js} +13 -13
- package/dist/cli/{secrets-YJB66UXU.mjs → secrets-WMUJ6PB4.mjs} +4 -4
- package/dist/cli/{sessions-BUWSRUSJ.mjs → sessions-EYALESPC.mjs} +4 -4
- package/dist/cli/{sessions-DGS7S6XX.js → sessions-LCHVGXMV.js} +5 -5
- package/dist/cli/{settings-OTWDMCM5.js → settings-25YT2IQK.js} +74 -74
- package/dist/cli/{settings-OCMJXIFD.mjs → settings-LUGKMDDX.mjs} +7 -7
- package/dist/cli/{setup-MYD34DUG.js → setup-AKZWHNKU.js} +41 -41
- package/dist/cli/{setup-UXYFRGIX.mjs → setup-KSRA3V42.mjs} +6 -6
- package/dist/cli/skills-GYWMMOFQ.js +28 -0
- package/dist/cli/{skills-LOWITZWQ.mjs → skills-VJJIB4F5.mjs} +4 -4
- package/dist/cli/tools-HN6E2AH6.js +40 -0
- package/dist/cli/{tools-YJHZJLES.mjs → tools-NYQD3VSU.mjs} +6 -6
- package/dist/cli/{update-PB5UCW4I.mjs → update-GU4TALAI.mjs} +6 -6
- package/dist/cli/update-IIEKVC75.js +28 -0
- package/dist/cli/{workflow-IH2FQSYZ.mjs → workflow-T4VNPJA4.mjs} +5 -5
- package/dist/cli/{workflow-DJYTA2YM.js → workflow-TFOUWNEJ.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- 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-KGXZELZ3.js +0 -31
- package/dist/cli/client-O4DPNWVJ.js +0 -20
- package/dist/cli/git-A7J4SSRV.js +0 -23
- package/dist/cli/play-IHLNNVPR.js +0 -153
- package/dist/cli/search-4EPCIU2T.js +0 -26
- package/dist/cli/skills-7UHWU7XL.js +0 -28
- package/dist/cli/tools-CBYKQ7IY.js +0 -40
- package/dist/cli/update-5M3OKPEU.js +0 -28
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
} from "./chunk-EDWJY6T4.mjs";
|
|
12
12
|
import {
|
|
13
13
|
registerDeprecatedSearchCommand
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DBWASDYS.mjs";
|
|
15
15
|
import {
|
|
16
16
|
handleDeploymentGet,
|
|
17
17
|
handleDeploymentsList
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CFALTV4O.mjs";
|
|
19
19
|
import {
|
|
20
20
|
PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY,
|
|
21
21
|
PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
normalizeRunEventOperationRequest,
|
|
41
41
|
parseLogLevel,
|
|
42
42
|
playInputExampleArgs
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-IKC7EPDS.mjs";
|
|
44
44
|
import {
|
|
45
45
|
CSV_DATA_INPUT_KEY,
|
|
46
46
|
buildNamedPlayRunRequest,
|
|
@@ -73,10 +73,10 @@ import {
|
|
|
73
73
|
printJsonError,
|
|
74
74
|
renderCommandEnvelopeText,
|
|
75
75
|
shouldEmitJson
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-GT5HPOM3.mjs";
|
|
77
77
|
import {
|
|
78
78
|
fetchWithDeploymentProtection
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-722274AA.mjs";
|
|
80
80
|
import {
|
|
81
81
|
PLAY_DEFAULT_EXPORT,
|
|
82
82
|
extractDefinedPlayName,
|
|
@@ -18160,7 +18160,7 @@ Examples:
|
|
|
18160
18160
|
process.exitCode = await ownView();
|
|
18161
18161
|
return;
|
|
18162
18162
|
}
|
|
18163
|
-
const { describeAnything } = await import("./describe-
|
|
18163
|
+
const { describeAnything } = await import("./describe-YZ365BKT.mjs");
|
|
18164
18164
|
process.exitCode = await describeAnything(
|
|
18165
18165
|
name,
|
|
18166
18166
|
{
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk7ZAG2XG5js = require('./chunk-7ZAG2XG5.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkQCSLIEMCjs = require('./chunk-QCSLIEMC.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkNUD2WO3Ejs = require('./chunk-NUD2WO3E.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 _chunkNUD2WO3Ejs.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 = _chunkNUD2WO3Ejs.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 `${_chunkNUD2WO3Ejs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunkNUD2WO3Ejs.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 _chunkNUD2WO3Ejs.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[_chunkNUD2WO3Ejs.HOST_URL_ENV] ? { [_chunkNUD2WO3Ejs.HOST_URL_ENV]: values[_chunkNUD2WO3Ejs.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunkNUD2WO3Ejs.API_KEY_ENV] ? { [_chunkNUD2WO3Ejs.API_KEY_ENV]: values[_chunkNUD2WO3Ejs.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunkNUD2WO3Ejs.ACTIVE_ORG_ID_ENV] ? { [_chunkNUD2WO3Ejs.ACTIVE_ORG_ID_ENV]: values[_chunkNUD2WO3Ejs.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkNUD2WO3Ejs.ACTIVE_ORG_NAME_ENV) ? { [_chunkNUD2WO3Ejs.ACTIVE_ORG_NAME_ENV]: values[_chunkNUD2WO3Ejs.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, _chunkNUD2WO3Ejs.FEATURES_ENV) ? { [_chunkNUD2WO3Ejs.FEATURES_ENV]: values[_chunkNUD2WO3Ejs.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunkNUD2WO3Ejs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunkNUD2WO3Ejs.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
|
+
[_chunkNUD2WO3Ejs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunkNUD2WO3Ejs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunkNUD2WO3Ejs.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/${_chunkNUD2WO3Ejs.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": _chunkNUD2WO3Ejs.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunkNUD2WO3Ejs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunkNUD2WO3Ejs.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunkNUD2WO3Ejs.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" ? _chunkNUD2WO3Ejs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkNUD2WO3Ejs.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 = _chunkNUD2WO3Ejs.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
|
+
[_chunkNUD2WO3Ejs.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" && _chunkNUD2WO3Ejs.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) _chunk7ZAG2XG5js.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
|
+
[_chunkNUD2WO3Ejs.HOST_URL_ENV]: baseUrl,
|
|
465
|
+
[_chunkNUD2WO3Ejs.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 = _chunkNUD2WO3Ejs.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" ? _chunkNUD2WO3Ejs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkNUD2WO3Ejs.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
|
+
[_chunkNUD2WO3Ejs.HOST_URL_ENV]: baseUrl,
|
|
555
|
+
[_chunkNUD2WO3Ejs.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 = _chunkNUD2WO3Ejs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
580
580
|
const reveal = args.includes("--reveal");
|
|
581
|
-
const jsonOutput =
|
|
581
|
+
const jsonOutput = _chunk7ZAG2XG5js.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" ? _chunkNUD2WO3Ejs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkNUD2WO3Ejs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkNUD2WO3Ejs.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
|
+
_chunk7ZAG2XG5js.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
|
+
_chunk7ZAG2XG5js.printCommandEnvelope.call(void 0,
|
|
650
650
|
{
|
|
651
651
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
652
652
|
status: "not connected",
|
|
@@ -679,7 +679,7 @@ async function handleStatus(args) {
|
|
|
679
679
|
}
|
|
680
680
|
);
|
|
681
681
|
if (status === 401 || status === 403) {
|
|
682
|
-
|
|
682
|
+
_chunk7ZAG2XG5js.printCommandEnvelope.call(void 0,
|
|
683
683
|
{
|
|
684
684
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
685
685
|
status: "unauthorized",
|
|
@@ -706,7 +706,7 @@ async function handleStatus(args) {
|
|
|
706
706
|
console.error(`Auth status error (status ${status}).`);
|
|
707
707
|
return EXIT_SERVER;
|
|
708
708
|
}
|
|
709
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
709
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkNUD2WO3Ejs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
710
710
|
clearSatisfiedPendingClaim(
|
|
711
711
|
baseUrl,
|
|
712
712
|
resolvedAuthScope,
|
|
@@ -734,28 +734,28 @@ async function handleStatus(args) {
|
|
|
734
734
|
if (apiKeyResp) {
|
|
735
735
|
saveEnvValues(
|
|
736
736
|
{
|
|
737
|
-
[
|
|
738
|
-
[
|
|
737
|
+
[_chunkNUD2WO3Ejs.HOST_URL_ENV]: baseUrl,
|
|
738
|
+
[_chunkNUD2WO3Ejs.API_KEY_ENV]: apiKeyResp,
|
|
739
739
|
...activeOrgEnvValues(data)
|
|
740
740
|
},
|
|
741
741
|
baseUrl,
|
|
742
742
|
resolvedAuthScope
|
|
743
743
|
);
|
|
744
744
|
if (resolvedAuthScope === "folder") {
|
|
745
|
-
const target =
|
|
745
|
+
const target = _chunkNUD2WO3Ejs.resolveProjectPinTarget.call(void 0, );
|
|
746
746
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
747
747
|
} else {
|
|
748
748
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
752
|
-
saveEnvValues(
|
|
751
|
+
} else if (resolvedAuthScope === "folder" || _chunkNUD2WO3Ejs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
752
|
+
saveEnvValues(_chunkNUD2WO3Ejs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
753
753
|
}
|
|
754
|
-
|
|
754
|
+
_chunk7ZAG2XG5js.printCommandEnvelope.call(void 0,
|
|
755
755
|
{
|
|
756
756
|
...payload,
|
|
757
|
-
...
|
|
758
|
-
command_context:
|
|
757
|
+
..._chunkNUD2WO3Ejs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
758
|
+
command_context: _chunkNUD2WO3Ejs.resolveCliCommandContext.call(void 0,
|
|
759
759
|
{ baseUrl, apiKey },
|
|
760
760
|
resolvedAuthScope
|
|
761
761
|
)
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GT5HPOM3.mjs";
|
|
6
6
|
import {
|
|
7
7
|
resolveBaseUrlOnly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-722274AA.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -15,7 +15,7 @@ var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkNUD2WO3Ejs = require('./chunk-NUD2WO3E.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -167,7 +167,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
167
167
|
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
|
|
168
168
|
// lost connections and explicitly unknown transaction resolution.
|
|
169
169
|
/^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
|
|
170
|
-
throw new (0,
|
|
170
|
+
throw new (0, _chunkNUD2WO3Ejs.CustomerDbQueryOutcomeUnknownError)(
|
|
171
171
|
error,
|
|
172
172
|
plan.request.body.operation_key
|
|
173
173
|
);
|
|
@@ -175,7 +175,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
175
175
|
throw error;
|
|
176
176
|
}
|
|
177
177
|
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) {
|
|
178
|
-
throw new (0,
|
|
178
|
+
throw new (0, _chunkNUD2WO3Ejs.CustomerDbQueryOutcomeUnknownError)(
|
|
179
179
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
180
180
|
"The SQL response did not contain a valid result.",
|
|
181
181
|
200,
|
|
@@ -186,7 +186,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
186
186
|
}
|
|
187
187
|
const operation = result.operation;
|
|
188
188
|
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))) {
|
|
189
|
-
throw new (0,
|
|
189
|
+
throw new (0, _chunkNUD2WO3Ejs.CustomerDbQueryOutcomeUnknownError)(
|
|
190
190
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
191
191
|
"The server did not confirm the original atomic SQL operation.",
|
|
192
192
|
200,
|
|
@@ -2910,8 +2910,8 @@ function runtimeSelectionHeaders(runtime) {
|
|
|
2910
2910
|
}
|
|
2911
2911
|
const receivers = _optionalChain([process, 'access', _104 => _104.env, 'access', _105 => _105.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _106 => _106.trim, 'call', _107 => _107()]);
|
|
2912
2912
|
return {
|
|
2913
|
-
[
|
|
2914
|
-
...receivers ? { [
|
|
2913
|
+
[_chunkNUD2WO3Ejs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
2914
|
+
...receivers ? { [_chunkNUD2WO3Ejs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
2915
2915
|
};
|
|
2916
2916
|
}
|
|
2917
2917
|
function isolatedCiRuntimeEventReadHeaders() {
|
|
@@ -2927,7 +2927,7 @@ function isolatedCiRuntimeEventReadHeaders() {
|
|
|
2927
2927
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
2928
2928
|
);
|
|
2929
2929
|
}
|
|
2930
|
-
return { [
|
|
2930
|
+
return { [_chunkNUD2WO3Ejs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
2931
2931
|
}
|
|
2932
2932
|
function normalizeTestPolicyOverrides(value, source) {
|
|
2933
2933
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -3217,8 +3217,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3217
3217
|
* @throws {@link ConfigError} if no API key can be resolved from any source.
|
|
3218
3218
|
*/
|
|
3219
3219
|
constructor(options) {
|
|
3220
|
-
this.config =
|
|
3221
|
-
this.http = new (0,
|
|
3220
|
+
this.config = _chunkNUD2WO3Ejs.resolveConfig.call(void 0, options);
|
|
3221
|
+
this.http = new (0, _chunkNUD2WO3Ejs.HttpClient)(this.config);
|
|
3222
3222
|
this.toolCalls = new ToolCalls(
|
|
3223
3223
|
this.http,
|
|
3224
3224
|
this.config.timeout,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IKC7EPDS.mjs";
|
|
4
4
|
import {
|
|
5
5
|
printCommandEnvelope,
|
|
6
6
|
renderCommandEnvelopeText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GT5HPOM3.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveConfig,
|
|
10
10
|
sdkCliStateDirPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-722274AA.mjs";
|
|
12
12
|
|
|
13
13
|
// src/cli/commands/search.ts
|
|
14
14
|
import { Option } from "commander";
|
|
@@ -1,14 +1,14 @@
|
|
|
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 _chunkCIDP2FSOjs = require('./chunk-CIDP2FSO.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk7ZAG2XG5js = require('./chunk-7ZAG2XG5.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkNUD2WO3Ejs = require('./chunk-NUD2WO3E.js');
|
|
12
12
|
|
|
13
13
|
// src/cli/commands/search.ts
|
|
14
14
|
var _commander = require('commander');
|
|
@@ -18,7 +18,7 @@ var _fs = require('fs');
|
|
|
18
18
|
var _path = require('path');
|
|
19
19
|
var SEARCH_REF_TTL_MS = 15 * 6e4;
|
|
20
20
|
function lastSearchPath() {
|
|
21
|
-
return _path.join.call(void 0,
|
|
21
|
+
return _path.join.call(void 0, _chunkNUD2WO3Ejs.sdkCliStateDirPath.call(void 0, _chunkNUD2WO3Ejs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
|
|
22
22
|
}
|
|
23
23
|
function rememberSearchRef(searchRef) {
|
|
24
24
|
try {
|
|
@@ -130,7 +130,7 @@ function searchRow(item) {
|
|
|
130
130
|
}
|
|
131
131
|
function renderSearchResults(result) {
|
|
132
132
|
if (result.results.length === 0)
|
|
133
|
-
return
|
|
133
|
+
return _chunk7ZAG2XG5js.renderCommandEnvelopeText.call(void 0, result);
|
|
134
134
|
const rows = result.results.map(searchRow);
|
|
135
135
|
const kinds = new Set(rows.map((row) => row.kind));
|
|
136
136
|
const onlyTools = kinds.size === 1 && kinds.has("tool");
|
|
@@ -147,7 +147,7 @@ function renderSearchResults(result) {
|
|
|
147
147
|
actions: _optionalChain([render, 'optionalAccess', _9 => _9.actions])
|
|
148
148
|
};
|
|
149
149
|
const followUps = _optionalChain([remaining, 'access', _10 => _10.sections, 'optionalAccess', _11 => _11.length]) || _optionalChain([remaining, 'access', _12 => _12.actions, 'optionalAccess', _13 => _13.length]) ? `
|
|
150
|
-
${
|
|
150
|
+
${_chunk7ZAG2XG5js.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
|
|
151
151
|
const notes = rows.flatMap(
|
|
152
152
|
(row) => row.notes.map((note) => ` ${row.id}: ${note}`)
|
|
153
153
|
);
|
|
@@ -224,7 +224,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
224
224
|
console.error(USAGE);
|
|
225
225
|
return 1;
|
|
226
226
|
}
|
|
227
|
-
const { search_ref: searchRef, ...result } = await new (0,
|
|
227
|
+
const { search_ref: searchRef, ...result } = await new (0, _chunkCIDP2FSOjs.DeeplineClient)().search({
|
|
228
228
|
query,
|
|
229
229
|
types,
|
|
230
230
|
exclude,
|
|
@@ -238,7 +238,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
238
238
|
});
|
|
239
239
|
if (searchRef) rememberSearchRef(searchRef);
|
|
240
240
|
pointAtDescribe(result);
|
|
241
|
-
|
|
241
|
+
_chunk7ZAG2XG5js.printCommandEnvelope.call(void 0, result, {
|
|
242
242
|
json: options.json === true,
|
|
243
243
|
text: renderSearchResults(result)
|
|
244
244
|
});
|