deepline 0.3.440 → 0.3.442
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/context.ts +10 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +37 -15
- package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +17 -3
- package/dist/bundling-sources/shared_libs/tool-execution-error.ts +17 -3
- package/dist/cli/{auth-KBORTFO6.mjs → auth-CUZJMTNS.mjs} +6 -6
- package/dist/cli/auth-HAO2GLGH.js +40 -0
- package/dist/cli/{billing-VJSUCB5I.mjs → billing-SWH3WAMC.mjs} +7 -7
- package/dist/cli/{billing-RE5WN7IQ.js → billing-W2U5VKFI.js} +83 -83
- package/dist/cli/{chunk-VXQQZV4A.js → chunk-2GVUZA6C.js} +33 -33
- package/dist/cli/{chunk-R2P756BJ.js → chunk-2JHQ24IT.js} +16 -16
- package/dist/cli/{chunk-MAMVGOSC.mjs → chunk-4QF2K7TM.mjs} +1 -1
- package/dist/cli/{chunk-O7PC3VOI.mjs → chunk-5ZQEDZDQ.mjs} +1 -1
- package/dist/cli/{chunk-GWC7OBRD.mjs → chunk-6YWIRIOI.mjs} +2 -2
- package/dist/cli/{chunk-Z7SKBAOU.js → chunk-77DW6WSO.js} +93 -93
- package/dist/cli/{chunk-4RKPT6IE.js → chunk-7BH4ZOWE.js} +2 -2
- package/dist/cli/{chunk-N5D4EMIY.mjs → chunk-7DH2FD7Y.mjs} +1 -1
- package/dist/cli/{chunk-PCNOULRB.mjs → chunk-7ICMVQL5.mjs} +4 -4
- package/dist/cli/{chunk-WU4U6VSB.js → chunk-A6QCMBGL.js} +5 -5
- package/dist/cli/{chunk-NPBJI7RE.js → chunk-ALJJRZNJ.js} +8 -8
- package/dist/cli/{chunk-ZLD46RSR.mjs → chunk-AR5YQQF5.mjs} +2 -2
- package/dist/cli/{chunk-GFEWNYQ4.js → chunk-C4WXHMKN.js} +2 -2
- package/dist/cli/{chunk-KAJK6XVI.js → chunk-CFUTOWE4.js} +6 -6
- package/dist/cli/{chunk-M6WSQZHP.js → chunk-D5IOUCJS.js} +57 -57
- package/dist/cli/{chunk-ATTUUPIU.js → chunk-D7IDBZDR.js} +8 -8
- package/dist/cli/{chunk-PPDBRJRW.js → chunk-DIAWYWT5.js} +6 -1
- package/dist/cli/{chunk-42YHEY2R.mjs → chunk-DUUY2JKP.mjs} +2 -2
- package/dist/cli/{chunk-KCC3FKIW.mjs → chunk-FAG4DFUC.mjs} +1 -1
- package/dist/cli/{chunk-V74O7X2X.mjs → chunk-GEHYAQSI.mjs} +2 -2
- package/dist/cli/{chunk-RDIN3NKA.js → chunk-GEQOPXOS.js} +2 -2
- package/dist/cli/{chunk-E4IXDAZI.mjs → chunk-HBL4PM5Q.mjs} +6 -1
- package/dist/cli/{chunk-4GHEUG6W.js → chunk-HYJKJJUM.js} +20 -20
- package/dist/cli/{chunk-2H4EY7KH.js → chunk-JKVRBCZL.js} +26 -26
- package/dist/cli/{chunk-V2ZITVZA.js → chunk-K2DHO3IM.js} +26 -26
- package/dist/cli/{chunk-R7GGDUOM.mjs → chunk-KKTRHDLN.mjs} +3 -3
- package/dist/cli/{chunk-OX5JAD3D.mjs → chunk-L2FWEP4G.mjs} +4 -4
- package/dist/cli/{chunk-BBYGXP2I.js → chunk-L3JU24MF.js} +12 -12
- package/dist/cli/{chunk-OOVQITRM.js → chunk-LCT6MTYQ.js} +50 -50
- package/dist/cli/{chunk-GJI7C2OU.js → chunk-NBFXQCWM.js} +8 -8
- package/dist/cli/{chunk-CWFN7MUU.mjs → chunk-O765GAOA.mjs} +9 -9
- package/dist/cli/{chunk-T6XBX45B.mjs → chunk-ODWSTSRJ.mjs} +5 -5
- package/dist/cli/{chunk-NUX2QHNC.mjs → chunk-OZDT2CZW.mjs} +1 -1
- package/dist/cli/{chunk-XL4FJX7J.mjs → chunk-P4GMPKMW.mjs} +3 -3
- package/dist/cli/{chunk-CI56TXRS.js → chunk-RR2LZVRA.js} +35 -35
- package/dist/cli/{chunk-EPABMF45.js → chunk-RWK35AB3.js} +6 -6
- package/dist/cli/{chunk-DS7Y7X26.mjs → chunk-SKXQZUMX.mjs} +1 -1
- package/dist/cli/{chunk-RAJP44MZ.mjs → chunk-SMM2EKDC.mjs} +1 -1
- package/dist/cli/{chunk-FGTKAXRJ.js → chunk-SOCWFREM.js} +101 -101
- package/dist/cli/{chunk-HNMQSS7P.js → chunk-SZUU2WTZ.js} +1 -1
- package/dist/cli/{chunk-K23LXA4N.mjs → chunk-TP4TMEML.mjs} +2 -2
- package/dist/cli/{chunk-NIR2UK5V.mjs → chunk-VLQWLPQU.mjs} +1 -1
- package/dist/cli/{chunk-GOHOTLUV.mjs → chunk-WY4W6PRD.mjs} +4 -4
- package/dist/cli/{chunk-GRAEERVE.mjs → chunk-YGMUSZLV.mjs} +3 -3
- package/dist/cli/{csv-L64ECPD5.js → csv-C5Z4OZQN.js} +14 -14
- package/dist/cli/{csv-MP3WOYPE.mjs → csv-HSR32EPA.mjs} +5 -5
- package/dist/cli/{db-RZJK6LGN.js → db-AK4ZYYRP.js} +34 -34
- package/dist/cli/{db-FOV7GHXS.mjs → db-JJGI4J5I.mjs} +7 -7
- package/dist/cli/{describe-R2BEQHVZ.mjs → describe-C35MTKF4.mjs} +16 -16
- package/dist/cli/{describe-WWENJAG2.js → describe-JVSD6F2G.js} +22 -22
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-3LFEK56I.js → executions-ZEA7O4PX.js} +9 -9
- package/dist/cli/{executions-C5WO6TGN.mjs → executions-ZECDB4NA.mjs} +7 -7
- package/dist/cli/{feedback-K6OAZUQ4.mjs → feedback-W7UL4V47.mjs} +5 -5
- package/dist/cli/{feedback-EMWUZ4LV.js → feedback-WQC4SX75.js} +9 -9
- package/dist/cli/git-E7CXCBZZ.js +24 -0
- package/dist/cli/{git-DJLL3OCZ.mjs → git-QBB7LEAV.mjs} +6 -6
- package/dist/cli/index.js +136 -136
- package/dist/cli/index.mjs +38 -38
- package/dist/cli/{legacy-noops-57SRSZ7M.js → legacy-noops-2QPJTEF4.js} +9 -9
- package/dist/cli/{legacy-noops-EAJG56KP.mjs → legacy-noops-E5NFHPKQ.mjs} +6 -6
- package/dist/cli/{monitors-FHTQ6227.mjs → monitors-E56RLT6N.mjs} +7 -7
- package/dist/cli/{monitors-OI57AAIG.js → monitors-MWBA46VZ.js} +93 -93
- package/dist/cli/{org-26EHPBKF.js → org-HGIWXACI.js} +69 -69
- package/dist/cli/{org-YGHFZTWJ.mjs → org-KE2DDK5A.mjs} +7 -7
- package/dist/cli/{play-KBKWTIXK.mjs → play-LGTF4IYG.mjs} +15 -15
- package/dist/cli/{play-PXGYS4DH.js → play-WO5UXBZM.js} +373 -373
- package/dist/cli/{providers-YPFEVK5C.mjs → providers-77KQS23B.mjs} +7 -7
- package/dist/cli/{providers-IZYBWI6M.js → providers-AIJPT54M.js} +10 -10
- package/dist/cli/{quickstart-RBCTFLI3.js → quickstart-CZQFBJVH.js} +7 -7
- package/dist/cli/{quickstart-SJ2M56CV.mjs → quickstart-EFMHLU4T.mjs} +5 -5
- package/dist/cli/{search-PSPZTTKR.mjs → search-U5KEPKNV.mjs} +8 -8
- package/dist/cli/search-XMNR7CYI.js +30 -0
- package/dist/cli/{secrets-XIWKYXGD.js → secrets-CBBR73U4.js} +16 -16
- package/dist/cli/{secrets-BCS4FE5D.mjs → secrets-JYHZIRO4.mjs} +7 -7
- package/dist/cli/{sessions-L3UEERFX.mjs → sessions-T74U74J7.mjs} +6 -6
- package/dist/cli/sessions-XA2EZDXD.js +16 -0
- package/dist/cli/{settings-SFFP7AR5.mjs → settings-C45BH4CU.mjs} +11 -11
- package/dist/cli/{settings-X2GMYBE7.js → settings-ND4437UB.js} +78 -78
- package/dist/cli/{setup-4ERUKDQ5.js → setup-FQ7JS4HM.js} +44 -44
- package/dist/cli/{setup-QIHAXFBL.mjs → setup-QDH6FAEZ.mjs} +9 -9
- package/dist/cli/skills-CSA2YFW6.js +29 -0
- package/dist/cli/{skills-BYNSDIKJ.mjs → skills-ZFSBA754.mjs} +7 -7
- package/dist/cli/tools-GUALRDI7.js +44 -0
- package/dist/cli/{tools-PQSMCIA7.mjs → tools-OVGOFORB.mjs} +15 -15
- package/dist/cli/{update-BI4E6UXI.mjs → update-BNU7VX5M.mjs} +9 -9
- package/dist/cli/update-K4WJSWDB.js +31 -0
- package/dist/cli/{workflow-PMRFMZVP.mjs → workflow-FX6GLQ3H.mjs} +8 -8
- package/dist/cli/{workflow-52P63K65.js → workflow-JSSXWU3T.js} +18 -18
- package/dist/{client-Doml68vC.d.mts → client-BCmnJaL9.d.mts} +1 -1
- package/dist/{client-9nH8tx4R.d.ts → client-BqQ7Rb11.d.ts} +1 -1
- package/dist/{compiler-manifest-CF2qngKr.d.ts → compiler-manifest-CWz_sNOQ.d.mts} +6 -2
- package/dist/{compiler-manifest-CF2qngKr.d.mts → compiler-manifest-CWz_sNOQ.d.ts} +6 -2
- package/dist/{index-Bq37k0sE.d.ts → index-4NPXDzlD.d.ts} +1 -1
- package/dist/{index-DTI-iNw8.d.mts → index-BF2JB_Ug.d.mts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +10 -10
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +96 -96
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +2 -2
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +3 -3
- package/dist/plays/run-request.mjs +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-LXI5K7V6.js +0 -40
- package/dist/cli/git-2BW2UDK6.js +0 -24
- package/dist/cli/search-5CFJRSGN.js +0 -30
- package/dist/cli/sessions-YX2AJF5I.js +0 -16
- package/dist/cli/skills-EOPZVMJS.js +0 -29
- package/dist/cli/tools-UEZW4OD7.js +0 -44
- package/dist/cli/update-6TOZCQ4Y.js +0 -31
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -14,10 +14,10 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkSZUU2WTZjs = require('./chunk-SZUU2WTZ.js');
|
|
21
21
|
|
|
22
22
|
// src/config.ts
|
|
23
23
|
|
|
@@ -378,7 +378,7 @@ function resolveBaseUrlOnly(options) {
|
|
|
378
378
|
_optionalChain([options, 'optionalAccess', _32 => _32.baseUrl, 'optionalAccess', _33 => _33.trim, 'call', _34 => _34()]) || autoDetectBaseUrl()
|
|
379
379
|
);
|
|
380
380
|
if (!baseUrl) {
|
|
381
|
-
throw new (0,
|
|
381
|
+
throw new (0, _chunkALJJRZNJjs.ConfigError)(
|
|
382
382
|
`Invalid ${HOST_URL_ENV}. Expected an http(s) URL such as https://code.deepline.com.`
|
|
383
383
|
);
|
|
384
384
|
}
|
|
@@ -389,13 +389,13 @@ function resolveConfig(options) {
|
|
|
389
389
|
_optionalChain([options, 'optionalAccess', _35 => _35.baseUrl, 'optionalAccess', _36 => _36.trim, 'call', _37 => _37()]) || autoDetectBaseUrl()
|
|
390
390
|
);
|
|
391
391
|
if (!baseUrl) {
|
|
392
|
-
throw new (0,
|
|
392
|
+
throw new (0, _chunkALJJRZNJjs.ConfigError)(
|
|
393
393
|
`Invalid ${HOST_URL_ENV}. Expected an http(s) URL such as https://code.deepline.com.`
|
|
394
394
|
);
|
|
395
395
|
}
|
|
396
396
|
const apiKey = resolveApiKeyForBaseUrl(baseUrl, _optionalChain([options, 'optionalAccess', _38 => _38.apiKey]));
|
|
397
397
|
if (!apiKey) {
|
|
398
|
-
throw new (0,
|
|
398
|
+
throw new (0, _chunkALJJRZNJjs.ConfigError)(
|
|
399
399
|
`No API key found. Set ${API_KEY_ENV}, add it to .env.deepline, or run: deepline auth register`
|
|
400
400
|
);
|
|
401
401
|
}
|
|
@@ -498,7 +498,7 @@ function findNearestGitCommonDir(startDir) {
|
|
|
498
498
|
function saveProjectDeeplineEnvValues(values, startDir = process.cwd()) {
|
|
499
499
|
const target = resolveProjectPinTarget(startDir);
|
|
500
500
|
if (!target.ok) {
|
|
501
|
-
throw new (0,
|
|
501
|
+
throw new (0, _chunkALJJRZNJjs.ConfigError)(
|
|
502
502
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
503
503
|
", "
|
|
504
504
|
)}. Set CLAUDE_PROJECT_DIR or cd into the intended project folder before running this command.`
|
|
@@ -649,9 +649,9 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
|
649
649
|
}
|
|
650
650
|
|
|
651
651
|
// src/version.ts
|
|
652
|
-
var SDK_VERSION =
|
|
653
|
-
var SDK_API_MAJOR =
|
|
654
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
652
|
+
var SDK_VERSION = _chunkSZUU2WTZjs.SDK_RELEASE.version;
|
|
653
|
+
var SDK_API_MAJOR = _chunkSZUU2WTZjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
654
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunkSZUU2WTZjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
655
655
|
|
|
656
656
|
// src/agent-runtime.ts
|
|
657
657
|
|
|
@@ -1195,16 +1195,16 @@ var HttpClient = class {
|
|
|
1195
1195
|
if (_optionalChain([options, 'optionalAccess', _204 => _204.retryFromExecutePolicy]) === true && responseRetryAllowed && options.executePolicyMaxRetries !== void 0) {
|
|
1196
1196
|
maxRetries = options.executePolicyMaxRetries;
|
|
1197
1197
|
}
|
|
1198
|
-
const structuredToolError = _optionalChain([options, 'optionalAccess', _205 => _205.toolId]) && !response.ok ?
|
|
1198
|
+
const structuredToolError = _optionalChain([options, 'optionalAccess', _205 => _205.toolId]) && !response.ok ? _chunkDIAWYWT5js.deserializeToolExecutionFailure.call(void 0,
|
|
1199
1199
|
_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
|
|
1200
1200
|
isRecord(parsed) ? parsed.tool_error : null,
|
|
1201
|
-
|
|
1201
|
+
_chunkDIAWYWT5js.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
|
|
1202
1202
|
) : null;
|
|
1203
1203
|
if (structuredToolError) {
|
|
1204
1204
|
if (response.status === 429) {
|
|
1205
1205
|
const retryAfter = parseRetryAfter(response);
|
|
1206
|
-
const failure =
|
|
1207
|
-
lastError = failure === null ? structuredToolError : new (0,
|
|
1206
|
+
const failure = _chunkDIAWYWT5js.serializeToolExecutionFailure.call(void 0, structuredToolError);
|
|
1207
|
+
lastError = failure === null ? structuredToolError : new (0, _chunkALJJRZNJjs.ToolRateLimitError)(structuredToolError.message, {
|
|
1208
1208
|
...failure,
|
|
1209
1209
|
retryAfterMs: _nullishCoalesce(failure.retryAfterMs, () => ( Math.max(0, retryAfter)))
|
|
1210
1210
|
});
|
|
@@ -1218,7 +1218,7 @@ var HttpClient = class {
|
|
|
1218
1218
|
}
|
|
1219
1219
|
if (response.status === 429) {
|
|
1220
1220
|
if (_optionalChain([options, 'optionalAccess', _206 => _206.preserveRateLimitResponse]) && isMonitorRateLimitEnvelope(parsed)) {
|
|
1221
|
-
throw new (0,
|
|
1221
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
1222
1222
|
_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
|
|
1223
1223
|
response.status,
|
|
1224
1224
|
_chunkXNYIZMNQjs.apiErrorCodeFromResponse.call(void 0, parsed),
|
|
@@ -1226,7 +1226,7 @@ var HttpClient = class {
|
|
|
1226
1226
|
);
|
|
1227
1227
|
}
|
|
1228
1228
|
const retryAfter = parseRetryAfter(response);
|
|
1229
|
-
lastError = new (0,
|
|
1229
|
+
lastError = new (0, _chunkALJJRZNJjs.RateLimitError)(retryAfter);
|
|
1230
1230
|
if (responseRetryAllowed && attempt < maxRetries) {
|
|
1231
1231
|
retryAfterDelayMs = retryAfter;
|
|
1232
1232
|
break;
|
|
@@ -1234,7 +1234,7 @@ var HttpClient = class {
|
|
|
1234
1234
|
throw lastError;
|
|
1235
1235
|
}
|
|
1236
1236
|
if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
|
|
1237
|
-
throw new (0,
|
|
1237
|
+
throw new (0, _chunkALJJRZNJjs.AuthError)(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
|
|
1238
1238
|
}
|
|
1239
1239
|
if (!response.ok) {
|
|
1240
1240
|
const retryableApiError = _optionalChain([options, 'optionalAccess', _207 => _207.retryApiErrors]) === true && responseRetryAllowed && isRetryableApiErrorResponse(response.status);
|
|
@@ -1243,7 +1243,7 @@ var HttpClient = class {
|
|
|
1243
1243
|
response.headers.get("content-type")
|
|
1244
1244
|
);
|
|
1245
1245
|
if (htmlError) {
|
|
1246
|
-
lastError = new (0,
|
|
1246
|
+
lastError = new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
1247
1247
|
htmlError.message(response.status),
|
|
1248
1248
|
response.status,
|
|
1249
1249
|
"API_ERROR",
|
|
@@ -1262,7 +1262,7 @@ var HttpClient = class {
|
|
|
1262
1262
|
const errorValue = typeof parsed === "object" && parsed && "error" in parsed ? parsed.error : void 0;
|
|
1263
1263
|
const msg = typeof errorValue === "string" ? errorValue : errorValue && typeof errorValue === "object" && "message" in errorValue && typeof errorValue.message === "string" ? errorValue.message : typeof parsed === "object" && parsed && "message" in parsed && typeof parsed.message === "string" ? parsed.message : `HTTP ${response.status}`;
|
|
1264
1264
|
const apiErrorCode = _chunkXNYIZMNQjs.apiErrorCodeFromResponse.call(void 0, parsed);
|
|
1265
|
-
lastError = new (0,
|
|
1265
|
+
lastError = new (0, _chunkDIAWYWT5js.DeeplineError)(msg, response.status, apiErrorCode, {
|
|
1266
1266
|
response: parsed
|
|
1267
1267
|
});
|
|
1268
1268
|
if (retryableApiError && attempt < maxRetries) {
|
|
@@ -1277,7 +1277,7 @@ var HttpClient = class {
|
|
|
1277
1277
|
response.headers.get("content-type")
|
|
1278
1278
|
);
|
|
1279
1279
|
if (interstitial) {
|
|
1280
|
-
throw new (0,
|
|
1280
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
1281
1281
|
`${this.config.baseUrl} returned a deployment-protection page instead of JSON. Set VERCEL_PROTECTION_BYPASS_TOKEN, or run \`vercel login\` if the CLI session expired.`,
|
|
1282
1282
|
response.status,
|
|
1283
1283
|
"DEPLOYMENT_PROTECTED",
|
|
@@ -1293,10 +1293,10 @@ var HttpClient = class {
|
|
|
1293
1293
|
lastError = requestCancelledError(options.signal);
|
|
1294
1294
|
break requestAttempts;
|
|
1295
1295
|
}
|
|
1296
|
-
if (error instanceof
|
|
1296
|
+
if (error instanceof _chunkALJJRZNJjs.AuthError || error instanceof _chunkDIAWYWT5js.DeeplineError) {
|
|
1297
1297
|
throw error;
|
|
1298
1298
|
}
|
|
1299
|
-
if (error instanceof
|
|
1299
|
+
if (error instanceof _chunkALJJRZNJjs.RateLimitError) {
|
|
1300
1300
|
lastError = error;
|
|
1301
1301
|
break;
|
|
1302
1302
|
}
|
|
@@ -1312,7 +1312,7 @@ var HttpClient = class {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
if (attempt < maxRetries) continue;
|
|
1314
1314
|
}
|
|
1315
|
-
if (lastError instanceof
|
|
1315
|
+
if (lastError instanceof _chunkDIAWYWT5js.DeeplineError) {
|
|
1316
1316
|
throw lastError;
|
|
1317
1317
|
}
|
|
1318
1318
|
const mappedNetworkError = mapNetworkError(
|
|
@@ -1337,7 +1337,7 @@ var HttpClient = class {
|
|
|
1337
1337
|
if (_optionalChain([options, 'optionalAccess', _214 => _214.toolId])) {
|
|
1338
1338
|
const code = mappedNetworkError.code;
|
|
1339
1339
|
throw withErrorCause(
|
|
1340
|
-
new (0,
|
|
1340
|
+
new (0, _chunkDIAWYWT5js.ToolExecutionError)(
|
|
1341
1341
|
withCoworkNetworkHint(mappedNetworkError.message),
|
|
1342
1342
|
{
|
|
1343
1343
|
toolId: options.toolId,
|
|
@@ -1362,7 +1362,7 @@ var HttpClient = class {
|
|
|
1362
1362
|
);
|
|
1363
1363
|
}
|
|
1364
1364
|
throw withErrorCause(
|
|
1365
|
-
new (0,
|
|
1365
|
+
new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
1366
1366
|
withCoworkNetworkHint(mappedNetworkError.message),
|
|
1367
1367
|
void 0,
|
|
1368
1368
|
mappedNetworkError.code,
|
|
@@ -1408,14 +1408,14 @@ var HttpClient = class {
|
|
|
1408
1408
|
const body = await response.text();
|
|
1409
1409
|
const parsed = parseResponseBody(body);
|
|
1410
1410
|
if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
|
|
1411
|
-
throw new (0,
|
|
1411
|
+
throw new (0, _chunkALJJRZNJjs.AuthError)(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
|
|
1412
1412
|
}
|
|
1413
1413
|
const htmlError = detectHtmlErrorBody(
|
|
1414
1414
|
body,
|
|
1415
1415
|
response.headers.get("content-type")
|
|
1416
1416
|
);
|
|
1417
1417
|
if (htmlError) {
|
|
1418
|
-
throw new (0,
|
|
1418
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
1419
1419
|
htmlError.message(response.status),
|
|
1420
1420
|
response.status,
|
|
1421
1421
|
"API_ERROR",
|
|
@@ -1426,7 +1426,7 @@ var HttpClient = class {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
);
|
|
1428
1428
|
}
|
|
1429
|
-
throw new (0,
|
|
1429
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
1430
1430
|
_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
|
|
1431
1431
|
response.status,
|
|
1432
1432
|
_chunkXNYIZMNQjs.apiErrorCodeFromResponse.call(void 0, parsed),
|
|
@@ -1434,17 +1434,17 @@ var HttpClient = class {
|
|
|
1434
1434
|
);
|
|
1435
1435
|
}
|
|
1436
1436
|
if (!response.body) {
|
|
1437
|
-
throw new (0,
|
|
1437
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)("SSE response did not include a body.");
|
|
1438
1438
|
}
|
|
1439
1439
|
yield* decodeSseStream(response.body);
|
|
1440
1440
|
return;
|
|
1441
1441
|
} catch (error) {
|
|
1442
|
-
if (error instanceof
|
|
1442
|
+
if (error instanceof _chunkALJJRZNJjs.AuthError || error instanceof _chunkDIAWYWT5js.DeeplineError) {
|
|
1443
1443
|
throw error;
|
|
1444
1444
|
}
|
|
1445
1445
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
1446
1446
|
if (isAbortLikeError(normalized) && _optionalChain([options, 'optionalAccess', _221 => _221.signal, 'optionalAccess', _222 => _222.aborted])) {
|
|
1447
|
-
throw new (0,
|
|
1447
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
1448
1448
|
`Stream from ${this.config.baseUrl} was aborted by the caller.`,
|
|
1449
1449
|
void 0,
|
|
1450
1450
|
"ABORTED"
|
|
@@ -1454,7 +1454,7 @@ var HttpClient = class {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
1456
|
if (lastError && isAbortLikeError(lastError)) {
|
|
1457
|
-
throw new (0,
|
|
1457
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
1458
1458
|
withCoworkNetworkHint(
|
|
1459
1459
|
`Unable to stream from ${this.config.baseUrl}. The remote stream was interrupted.`
|
|
1460
1460
|
),
|
|
@@ -1462,7 +1462,7 @@ var HttpClient = class {
|
|
|
1462
1462
|
"PLAY_STREAM_NETWORK_ABORTED"
|
|
1463
1463
|
);
|
|
1464
1464
|
}
|
|
1465
|
-
throw new (0,
|
|
1465
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
1466
1466
|
withCoworkNetworkHint(
|
|
1467
1467
|
_optionalChain([lastError, 'optionalAccess', _223 => _223.message]) ? `Unable to stream from ${this.config.baseUrl}. ${lastError.message}` : `Unable to stream from ${this.config.baseUrl}.`
|
|
1468
1468
|
)
|
|
@@ -1,19 +1,19 @@
|
|
|
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 _chunkC4WXHMKNjs = require('./chunk-C4WXHMKN.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkRR2LZVRAjs = require('./chunk-RR2LZVRA.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkD5IOUCJSjs = require('./chunk-D5IOUCJS.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkL3JU24MFjs = require('./chunk-L3JU24MF.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunk2GVUZA6Cjs = require('./chunk-2GVUZA6C.js');
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/update.ts
|
|
19
19
|
var _child_process = require('child_process');
|
|
@@ -495,7 +495,7 @@ function normalizedNpmPrefix(value) {
|
|
|
495
495
|
}
|
|
496
496
|
function resolveNpmGlobalPrefix(env) {
|
|
497
497
|
try {
|
|
498
|
-
const plan =
|
|
498
|
+
const plan = _chunkD5IOUCJSjs.resolveShellSpawn.call(void 0,
|
|
499
499
|
"npm",
|
|
500
500
|
["prefix", "-g"],
|
|
501
501
|
process.platform,
|
|
@@ -556,8 +556,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
556
556
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
557
557
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
558
558
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
559
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
560
|
-
const npmGlobalInstallFlags =
|
|
559
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkC4WXHMKNjs.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
560
|
+
const npmGlobalInstallFlags = _chunkC4WXHMKNjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
561
561
|
const args = installPrefix ? [
|
|
562
562
|
"install",
|
|
563
563
|
"-g",
|
|
@@ -567,7 +567,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
567
567
|
packageSpec
|
|
568
568
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
569
569
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
570
|
-
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) ||
|
|
570
|
+
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunk2GVUZA6Cjs.autoDetectBaseUrl.call(void 0, )
|
|
571
571
|
);
|
|
572
572
|
return {
|
|
573
573
|
kind: "npm-global",
|
|
@@ -816,7 +816,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
816
816
|
function runCommand(command, args, env = process.env) {
|
|
817
817
|
return new Promise((resolveResult) => {
|
|
818
818
|
let output = "";
|
|
819
|
-
const plan =
|
|
819
|
+
const plan = _chunkD5IOUCJSjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
820
820
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
821
821
|
stdio: ["inherit", "pipe", "pipe"],
|
|
822
822
|
shell: plan.shell,
|
|
@@ -1199,14 +1199,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1199
1199
|
throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
|
|
1200
1200
|
}
|
|
1201
1201
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1202
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1202
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunk2GVUZA6Cjs.autoDetectBaseUrl));
|
|
1203
1203
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1204
1204
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1205
1205
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1206
1206
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1207
1207
|
process.stdout.write = (() => true);
|
|
1208
1208
|
try {
|
|
1209
|
-
const exitCode = await
|
|
1209
|
+
const exitCode = await _chunkRR2LZVRAjs.runSkillsCommand.call(void 0, { json: true });
|
|
1210
1210
|
if (exitCode !== 0) {
|
|
1211
1211
|
throw new Error(
|
|
1212
1212
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1277,11 +1277,11 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1277
1277
|
]
|
|
1278
1278
|
};
|
|
1279
1279
|
if (options.json && !options.executeWithJson) {
|
|
1280
|
-
|
|
1280
|
+
_chunkL3JU24MFjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1281
1281
|
return 0;
|
|
1282
1282
|
}
|
|
1283
1283
|
if (options.printCommand) {
|
|
1284
|
-
|
|
1284
|
+
_chunkL3JU24MFjs.printCommandEnvelope.call(void 0,
|
|
1285
1285
|
{
|
|
1286
1286
|
...plan,
|
|
1287
1287
|
render: {
|
|
@@ -1294,7 +1294,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1294
1294
|
return 0;
|
|
1295
1295
|
}
|
|
1296
1296
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1297
|
-
|
|
1297
|
+
_chunkL3JU24MFjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1298
1298
|
return 0;
|
|
1299
1299
|
}
|
|
1300
1300
|
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
@@ -1324,7 +1324,7 @@ To retry with full installer output, run: deepline skills
|
|
|
1324
1324
|
);
|
|
1325
1325
|
}
|
|
1326
1326
|
if (options.executeWithJson && options.json) {
|
|
1327
|
-
|
|
1327
|
+
_chunkL3JU24MFjs.printCommandEnvelope.call(void 0,
|
|
1328
1328
|
{
|
|
1329
1329
|
ok: true,
|
|
1330
1330
|
pinnedVersion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
printCommandEnvelope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TP4TMEML.mjs";
|
|
5
5
|
import {
|
|
6
6
|
agentSessionIdFromEnvironment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-P4GMPKMW.mjs";
|
|
8
8
|
|
|
9
9
|
// src/cli/commands/sessions.ts
|
|
10
10
|
import {
|