deepline 0.3.325 → 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/client.ts +23 -25
- package/dist/bundling-sources/sdk/src/compat.ts +11 -6
- package/dist/bundling-sources/sdk/src/db/query.ts +172 -0
- package/dist/bundling-sources/sdk/src/errors.ts +35 -0
- package/dist/bundling-sources/sdk/src/index.ts +13 -0
- package/dist/bundling-sources/sdk/src/play.ts +34 -31
- package/dist/bundling-sources/sdk/src/plays/authoring-graph-path.ts +13 -0
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +2 -1
- package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +189 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/tool-calls.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 +98 -11
- package/dist/cli/auth-67YOPQ6M.js +31 -0
- package/dist/cli/{auth-PIZESRPC.mjs → auth-EBBDOKNV.mjs} +4 -4
- package/dist/cli/{billing-DQKFCQV5.js → billing-6AAB7WPJ.js} +70 -70
- package/dist/cli/{billing-HSL6VTCM.mjs → billing-IM2QUFX4.mjs} +4 -4
- package/dist/cli/{chunk-WW4XZIVM.mjs → chunk-3ITDKXNC.mjs} +12 -9
- package/dist/cli/{chunk-K7FC5IUU.js → chunk-3MXRNPBN.js} +1 -1
- package/dist/cli/{chunk-DLW7X2UK.js → chunk-4TO56P22.js} +5928 -5730
- package/dist/cli/{chunk-MNKDSR2J.js → chunk-4ZARCCPT.js} +344 -254
- package/dist/cli/{chunk-PBNZXZCW.js → chunk-77RAV5XX.js} +48 -48
- package/dist/cli/{chunk-HUKWYHBG.js → chunk-7RCJDAJX.js} +2 -2
- package/dist/cli/{chunk-5TYU3UIS.mjs → chunk-A5SKM3GL.mjs} +1 -1
- package/dist/cli/{chunk-XNL3SEMC.js → chunk-AFNEQ43J.js} +8 -3
- package/dist/cli/{chunk-XSEMQ4II.js → chunk-AGH6YP2T.js} +2 -1
- package/dist/cli/chunk-AID3OYVJ.js +8 -0
- package/dist/cli/{chunk-YE3O2UHM.mjs → chunk-CCRQ2VGJ.mjs} +24 -1
- package/dist/cli/{chunk-HPTQEWCF.js → chunk-CISKBOXD.js} +70 -67
- package/dist/cli/{chunk-OPERWJR6.mjs → chunk-D6GD5AVN.mjs} +3 -3
- package/dist/cli/{chunk-6RMKHN7S.mjs → chunk-DCAU6PND.mjs} +4 -20
- package/dist/cli/{chunk-PVDQ55PS.js → chunk-DM3SHV6U.js} +29 -6
- package/dist/cli/{chunk-CV5GDCKN.js → chunk-DSDX6EUW.js} +29 -45
- package/dist/cli/{chunk-5FHU7TV4.mjs → chunk-DVV4FPS7.mjs} +2 -2
- package/dist/cli/{chunk-AQUNQJ5Y.mjs → chunk-F45425TB.mjs} +1 -1
- package/dist/cli/{chunk-NWBARG3F.mjs → chunk-G5774EFF.mjs} +1 -1
- package/dist/cli/chunk-GVESPYSY.mjs +234 -0
- package/dist/cli/{chunk-H5TJBRSC.mjs → chunk-HOWQKN6J.mjs} +98 -113
- package/dist/cli/{chunk-UYFWTIKF.js → chunk-HZZJR2GV.js} +26 -26
- package/dist/cli/{chunk-76VKBPOC.mjs → chunk-JOA6IKDE.mjs} +7 -2
- package/dist/cli/chunk-LVEDPCLJ.js +234 -0
- package/dist/cli/{chunk-KZNFYOHX.js → chunk-MOP6D7Z5.js} +6 -6
- package/dist/cli/{chunk-YXRPWMGN.js → chunk-NWIJLTRL.js} +147 -162
- package/dist/cli/chunk-OVDNJAJN.mjs +8 -0
- package/dist/cli/{chunk-XIVUB36F.mjs → chunk-QZAP5VOS.mjs} +104 -14
- package/dist/cli/{chunk-6VZDSBK6.mjs → chunk-REP2MYBI.mjs} +2 -2
- package/dist/cli/{chunk-PWV2M4LW.mjs → chunk-RSEVBSFE.mjs} +1 -1
- package/dist/cli/{chunk-OOPSX57I.js → chunk-TAGHNT5P.js} +6 -6
- package/dist/cli/{chunk-QQ2FG5W3.js → chunk-UROXKPND.js} +6 -6
- package/dist/cli/{chunk-7PZFGB7L.mjs → chunk-YIY74KUF.mjs} +2 -1
- package/dist/cli/{chunk-7MD453WV.mjs → chunk-ZOFARJWH.mjs} +5674 -5476
- package/dist/cli/client-7LZCG4VD.js +20 -0
- package/dist/cli/{client-57SR4KVM.mjs → client-JCMSACT4.mjs} +3 -3
- package/dist/cli/{csv-G2FRMOXL.mjs → csv-NPMWVM5D.mjs} +3 -3
- package/dist/cli/{csv-5DJSC6BD.js → csv-OILKDKUX.js} +12 -12
- package/dist/cli/{db-WWZEXM3N.mjs → db-AZUAOWPQ.mjs} +214 -137
- package/dist/cli/{db-NVO7P4VO.js → db-MNDRYYEX.js} +226 -149
- package/dist/cli/{describe-26OMF3A4.mjs → describe-KJWOHMKC.mjs} +12 -11
- package/dist/cli/{describe-M26LHDBQ.js → describe-QENLDLM2.js} +28 -27
- package/dist/cli/{executions-KI47LPKE.js → executions-P36UHBPG.js} +6 -6
- package/dist/cli/{executions-2LLHY3IL.mjs → executions-QZNQWF6F.mjs} +4 -4
- package/dist/cli/{feedback-2Y26C2BZ.js → feedback-K4UGTLFD.js} +6 -6
- package/dist/cli/{feedback-O26VL2OF.mjs → feedback-RQ6HSZSG.mjs} +3 -3
- package/dist/cli/{git-UVPGZN3K.mjs → git-PBRMCBMI.mjs} +4 -4
- package/dist/cli/git-RPFH3NJ2.js +23 -0
- package/dist/cli/index.js +105 -87
- package/dist/cli/index.mjs +65 -47
- package/dist/cli/{legacy-noops-IK5CH72U.mjs → legacy-noops-G7GWJ5UC.mjs} +4 -4
- package/dist/cli/{legacy-noops-H6Y3SEVB.js → legacy-noops-X74FM35Q.js} +7 -7
- package/dist/cli/{monitors-SFVVMAJT.mjs → monitors-KL2MCR57.mjs} +4 -4
- package/dist/cli/{monitors-JL6TTQCI.js → monitors-VKURX3YM.js} +85 -85
- package/dist/cli/{org-SSDONL57.mjs → org-DT53KTNW.mjs} +4 -4
- package/dist/cli/{org-OVMAZCQS.js → org-ZYXJDC44.js} +60 -60
- package/dist/cli/play-BUQV47E2.js +153 -0
- package/dist/cli/{play-X6NPACUO.mjs → play-WIJGQYTB.mjs} +11 -10
- package/dist/cli/{providers-E24JDWSR.js → providers-GRTW4TXX.js} +7 -7
- package/dist/cli/{providers-ONUBYYY4.mjs → providers-GYGKGS2J.mjs} +4 -4
- package/dist/cli/{quickstart-TB7C3DLG.js → quickstart-WB26543C.js} +5 -5
- package/dist/cli/{quickstart-B7NIXACV.mjs → quickstart-XF3M2M2S.mjs} +3 -3
- package/dist/cli/{search-N3QUIATW.mjs → search-ANJLTOF2.mjs} +5 -5
- package/dist/cli/search-CR2GZLCM.js +26 -0
- package/dist/cli/{secrets-CPCVFDYB.js → secrets-5KBUGMTK.js} +13 -13
- package/dist/cli/{secrets-V7Z4M67T.mjs → secrets-D6UR5CTW.mjs} +4 -4
- package/dist/cli/{sessions-E4FIZLQP.js → sessions-46PXFULL.js} +5 -5
- package/dist/cli/{sessions-PDOBKAKO.mjs → sessions-S7N4JEWK.mjs} +4 -4
- package/dist/cli/{settings-UVM2WDE4.js → settings-KMNBITSU.js} +74 -74
- package/dist/cli/{settings-QYHYHZDI.mjs → settings-V6U3SRTH.mjs} +7 -7
- package/dist/cli/{setup-3JFAXQLJ.js → setup-4K5FY6AU.js} +41 -41
- package/dist/cli/{setup-4RLAETDW.mjs → setup-OGITSLTN.mjs} +6 -6
- package/dist/cli/skills-4FP2MZKL.js +28 -0
- package/dist/cli/{skills-ZX2JSWOZ.mjs → skills-AXWAYPBY.mjs} +4 -4
- package/dist/cli/tools-7YZPH6WC.js +39 -0
- package/dist/cli/{tools-EGXCVIPJ.mjs → tools-LJCY6B23.mjs} +8 -7
- package/dist/cli/update-3VUOW6AP.js +28 -0
- package/dist/cli/{update-7FEKRQFE.mjs → update-DDR5XIUB.mjs} +6 -6
- package/dist/cli/{workflow-54VCKIG2.js → workflow-7CTCDWL3.js} +15 -15
- package/dist/cli/{workflow-7V7TTTKK.mjs → workflow-PRNCVANQ.mjs} +5 -5
- package/dist/{client-Bb4Jjzmj.d.ts → client-DHq8dJ56.d.ts} +39 -11
- package/dist/{client-COa-3GHK.d.mts → client-wiWPZhnI.d.mts} +39 -11
- package/dist/{compiler-manifest-CsnWj-AK.d.mts → compiler-manifest-9TkZ_ykI.d.mts} +711 -711
- package/dist/{compiler-manifest-CsnWj-AK.d.ts → compiler-manifest-9TkZ_ykI.d.ts} +711 -711
- package/dist/index-B-5_Xhud.d.mts +75 -0
- package/dist/index-ykksoEyR.d.ts +75 -0
- package/dist/index.d.mts +52 -13
- package/dist/index.d.ts +52 -13
- package/dist/index.js +142 -68
- package/dist/index.mjs +102 -28
- package/dist/install-integrity.json +91 -84
- package/dist/plays/bundle-play-file.d.mts +7 -75
- package/dist/plays/bundle-play-file.d.ts +7 -75
- package/dist/plays/bundle-play-file.mjs +1 -1
- 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/package.json +1 -1
- package/dist/cli/auth-RXCD4GOV.js +0 -31
- package/dist/cli/chunk-OWJZUE3Y.mjs +0 -103
- package/dist/cli/chunk-SDK3ZA2C.js +0 -103
- package/dist/cli/client-562MULXK.js +0 -20
- package/dist/cli/git-KGPX5YPD.js +0 -23
- package/dist/cli/play-3DB4MSHN.js +0 -152
- package/dist/cli/search-NJ637YGQ.js +0 -26
- package/dist/cli/skills-BYRYG64R.js +0 -28
- package/dist/cli/tools-TAWOAY5X.js +0 -38
- package/dist/cli/update-H24GEBXM.js +0 -28
|
@@ -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 _chunkQQ2FG5W3js = require('./chunk-QQ2FG5W3.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,
|
|
@@ -1,4 +1,8 @@
|
|
|
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; }
|
|
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
|
+
|
|
3
|
+
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
4
|
+
|
|
5
|
+
// src/cli/described.ts
|
|
2
6
|
var SHAPE = "{}";
|
|
3
7
|
var SCHEMA_LINE_LIMIT = 100;
|
|
4
8
|
function isRecord(value) {
|
|
@@ -288,9 +292,10 @@ function examples(described, options) {
|
|
|
288
292
|
if (runner.via === "monitor") return { cli: runner.deploy, play: null };
|
|
289
293
|
if (runner.via === "tool") {
|
|
290
294
|
return {
|
|
291
|
-
cli: `deepline tools execute ${runner.toolId} --input
|
|
295
|
+
cli: `deepline tools execute ${runner.toolId} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, input)}`,
|
|
292
296
|
play: [
|
|
293
297
|
"const result = await ctx.tools.execute({",
|
|
298
|
+
" staleAfterSeconds: 0,",
|
|
294
299
|
` id: '${safeIdentifier(runner.toolId)}',`,
|
|
295
300
|
` tool: '${runner.toolId}',`,
|
|
296
301
|
` input: ${input},`,
|
|
@@ -300,7 +305,7 @@ function examples(described, options) {
|
|
|
300
305
|
};
|
|
301
306
|
}
|
|
302
307
|
return {
|
|
303
|
-
cli: _nullishCoalesce(runner.cli, () => ( `deepline plays run ${runner.reference} --input
|
|
308
|
+
cli: _nullishCoalesce(runner.cli, () => ( `deepline plays run ${runner.reference} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, input)}`)),
|
|
304
309
|
play: [
|
|
305
310
|
`const output = await ctx.runPlay('${safeIdentifier(runner.reference.replace(/^.*\//, ""))}', '${runner.reference}', ${input});`,
|
|
306
311
|
...reads((field) => `output.${field.name}`)
|
|
@@ -3408,7 +3408,8 @@ async function bundlePlayFile2(filePath, options = {}) {
|
|
|
3408
3408
|
exportName: options.exportName,
|
|
3409
3409
|
adapter: {
|
|
3410
3410
|
...createSdkPlayBundlingAdapter(),
|
|
3411
|
-
sourceIdentityRoot
|
|
3411
|
+
sourceIdentityRoot,
|
|
3412
|
+
...options.cache === false ? { cacheDir: null } : {}
|
|
3412
3413
|
}
|
|
3413
3414
|
});
|
|
3414
3415
|
if (result.success)
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-DLIRSHV6.mjs";
|
|
5
5
|
import {
|
|
6
6
|
SDK_RELEASE
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-G5774EFF.mjs";
|
|
8
8
|
import {
|
|
9
9
|
DeeplineError,
|
|
10
10
|
TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
@@ -17,6 +17,28 @@ import {
|
|
|
17
17
|
} from "./chunk-NXGCO4JB.mjs";
|
|
18
18
|
|
|
19
19
|
// src/errors.ts
|
|
20
|
+
var CustomerDbQueryOutcomeUnknownError = class extends DeeplineError {
|
|
21
|
+
outcome = "unknown";
|
|
22
|
+
operationKey;
|
|
23
|
+
retryable;
|
|
24
|
+
constructor(cause, operationKey, options = {}) {
|
|
25
|
+
const recoveryAvailable = operationKey !== void 0 && options.recoveryAvailable !== false;
|
|
26
|
+
super(
|
|
27
|
+
operationKey === void 0 ? "SQL outcome is unknown. The unkeyed request was attempted once; inspect the database before issuing another write. An operation key added afterwards cannot recover this request." : recoveryAvailable ? "SQL outcome is unknown. Recover by submitting the same SQL and options with the original operation key; do not use a new key." : "SQL outcome is unknown. The server did not confirm atomic recovery support. Do not resubmit this write; inspect the database and confirm reader support before recovering with the original operation key.",
|
|
28
|
+
cause.statusCode,
|
|
29
|
+
"CUSTOMER_DB_QUERY_OUTCOME_UNKNOWN",
|
|
30
|
+
{
|
|
31
|
+
outcome: "unknown",
|
|
32
|
+
recovery: recoveryAvailable ? "original_operation_key" : "unavailable",
|
|
33
|
+
causeCode: cause.code
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
this.name = "CustomerDbQueryOutcomeUnknownError";
|
|
37
|
+
this.operationKey = operationKey;
|
|
38
|
+
this.retryable = recoveryAvailable;
|
|
39
|
+
Object.defineProperty(this, "cause", { value: cause, configurable: true });
|
|
40
|
+
}
|
|
41
|
+
};
|
|
20
42
|
var AuthError = class extends DeeplineError {
|
|
21
43
|
/** Constructed by the SDK when Deepline rejects the caller's credentials. */
|
|
22
44
|
constructor(message = "Authentication failed. Check your DEEPLINE_API_KEY.") {
|
|
@@ -1950,6 +1972,7 @@ ${COWORK_NETWORK_HINT}`;
|
|
|
1950
1972
|
}
|
|
1951
1973
|
|
|
1952
1974
|
export {
|
|
1975
|
+
CustomerDbQueryOutcomeUnknownError,
|
|
1953
1976
|
AuthError,
|
|
1954
1977
|
RateLimitError,
|
|
1955
1978
|
ToolRateLimitError,
|