deepline 0.3.522 → 0.3.523
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-core.ts +118 -0
- package/dist/bundling-sources/sdk/src/index.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +47 -18
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/db-session-renewal.ts +209 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +16 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +38 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +92 -10
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +96 -25
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +139 -17
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +26 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +145 -5
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +190 -10
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +85 -5
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +21 -11
- package/dist/cli/{artifacts-RY2MK74N.mjs → artifacts-RBHR2DG4.mjs} +6 -6
- package/dist/cli/{artifacts-GIZZH5VA.js → artifacts-RZTS2JHZ.js} +18 -18
- package/dist/cli/auth-DPWYFQR5.js +43 -0
- package/dist/cli/{auth-YIBY5IKT.mjs → auth-ENQUQS56.mjs} +5 -5
- package/dist/cli/{billing-G3IX3SNY.mjs → billing-6A27ULCX.mjs} +7 -7
- package/dist/cli/{billing-UDKL53GI.js → billing-6HONTJOY.js} +82 -82
- package/dist/cli/{chunk-4DFWDA2Q.js → chunk-2BRDHM4S.js} +9 -9
- package/dist/cli/{chunk-EJBW7Y6Z.js → chunk-326WVSWS.js} +108 -96
- package/dist/cli/{chunk-7JEN3FX4.js → chunk-36LQQL5C.js} +5 -5
- package/dist/cli/{chunk-GVKW3LCA.js → chunk-4NWY7JBB.js} +11 -11
- package/dist/cli/{chunk-RKE5YTHY.mjs → chunk-4V63IJCL.mjs} +5 -5
- package/dist/cli/{chunk-VFCVH2LV.mjs → chunk-5WFQXAD4.mjs} +5 -5
- package/dist/cli/{chunk-4TUMKJZX.mjs → chunk-6DBRBWHC.mjs} +2 -2
- package/dist/cli/{chunk-CFXERH7F.mjs → chunk-6OZ2WSHD.mjs} +1 -1
- package/dist/cli/{chunk-5H22VJPE.js → chunk-7GNKAACY.js} +6 -6
- package/dist/cli/{chunk-G65FJ5JX.mjs → chunk-7M5FRSFP.mjs} +2 -2
- package/dist/cli/{chunk-PDLRUZ42.mjs → chunk-DNXP3D5H.mjs} +5 -5
- package/dist/cli/{chunk-OAQIVJFY.mjs → chunk-F3WRLFFM.mjs} +2 -2
- package/dist/cli/{chunk-RI672VNY.js → chunk-FBMOBNJY.js} +2 -2
- package/dist/cli/{chunk-NDNG3MAT.mjs → chunk-H7275EZU.mjs} +5 -5
- package/dist/cli/{chunk-C6WGMODR.mjs → chunk-HSVGP4CI.mjs} +2 -2
- package/dist/cli/{chunk-DNJJ3ULJ.js → chunk-HUC5SGJQ.js} +2 -2
- package/dist/cli/{chunk-DARD7TJ7.js → chunk-HUIFUE4L.js} +53 -53
- package/dist/cli/{chunk-52MHE7B4.mjs → chunk-I62LJ7NU.mjs} +1 -1
- package/dist/cli/{chunk-BZY335JP.js → chunk-IEVXYHGJ.js} +5 -5
- package/dist/cli/{chunk-FQQAAR3Q.mjs → chunk-JCTTXLAZ.mjs} +1 -1
- package/dist/cli/{chunk-3KMGVOBM.mjs → chunk-JGZQBDYG.mjs} +4 -4
- package/dist/cli/{chunk-ZUAKRBZB.js → chunk-JMMNCJ7Z.js} +1 -1
- package/dist/cli/{chunk-UV6XCHOZ.mjs → chunk-JVEFMOY2.mjs} +1 -1
- package/dist/cli/{chunk-FNHUDCJE.js → chunk-K326BEVR.js} +10 -10
- package/dist/cli/{chunk-MD524MRB.mjs → chunk-KILRUAXF.mjs} +1 -1
- package/dist/cli/{chunk-XXY4E57R.mjs → chunk-LZL6V5M5.mjs} +2 -2
- package/dist/cli/{chunk-GMYDVW7Z.js → chunk-MCXPJYBN.js} +3 -3
- package/dist/cli/{chunk-VE6FHVXZ.mjs → chunk-MHTRYBXY.mjs} +78 -1
- package/dist/cli/{chunk-ISUUSSS4.js → chunk-MT3WG3KR.js} +16 -16
- package/dist/cli/{chunk-37SXIFIU.js → chunk-MZROKQV3.js} +44 -44
- package/dist/cli/{chunk-4MF44THR.js → chunk-N5MLEXZ7.js} +50 -8
- package/dist/cli/{chunk-XR6TN5DT.mjs → chunk-NWTMQGPP.mjs} +6 -6
- package/dist/cli/{chunk-Y3LDRCMB.mjs → chunk-PCORO245.mjs} +2 -2
- package/dist/cli/{chunk-534YYHIF.js → chunk-PESMXAUG.js} +6 -6
- package/dist/cli/{chunk-RDJTCW3I.mjs → chunk-QMBL5ZIQ.mjs} +3 -3
- package/dist/cli/{chunk-LFSOBW7E.mjs → chunk-QOO5W5XS.mjs} +22 -10
- package/dist/cli/{chunk-ZZ7U4YJS.mjs → chunk-QSAC3IVI.mjs} +1 -1
- package/dist/cli/{chunk-HYR34KFA.js → chunk-QYXIODWH.js} +78 -1
- package/dist/cli/{chunk-BONXEWYF.mjs → chunk-RKREB7MU.mjs} +3 -3
- package/dist/cli/{chunk-KMBF3N2Z.js → chunk-RQN4PHRE.js} +16 -16
- package/dist/cli/{chunk-XT25FX6T.js → chunk-S4YKRH3W.js} +3 -3
- package/dist/cli/{chunk-F5D623KO.js → chunk-SBGKKOCC.js} +26 -26
- package/dist/cli/{chunk-5477PEHL.mjs → chunk-SXTVJIGB.mjs} +1 -1
- package/dist/cli/{chunk-7J5PLHII.mjs → chunk-U6DLLV3S.mjs} +1 -1
- package/dist/cli/{chunk-ENWJFUWK.mjs → chunk-UH3EAFFN.mjs} +2 -2
- package/dist/cli/{chunk-DLDWAPA5.js → chunk-UQN4VTZL.js} +4 -4
- package/dist/cli/{chunk-DRDZBRXV.js → chunk-V46J3UTM.js} +7 -7
- package/dist/cli/{chunk-5BQPEHEP.js → chunk-WGVJA4I5.js} +14 -14
- package/dist/cli/{chunk-SFMCKB57.mjs → chunk-WVQOXYTQ.mjs} +44 -2
- package/dist/cli/{chunk-VIM6I7RC.js → chunk-XVXEARHC.js} +41 -41
- package/dist/cli/{chunk-6SJPZV5E.js → chunk-XYL26236.js} +2 -2
- package/dist/cli/{chunk-ZZLZCO6Y.js → chunk-ZWN4RXC2.js} +22 -22
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-3HIE4VCO.js → csv-UBACJK75.js} +13 -13
- package/dist/cli/{csv-PE35WGRO.mjs → csv-YFJ2JLUP.mjs} +4 -4
- package/dist/cli/{db-O2YRTTDO.js → db-2ZPA2LZ7.js} +27 -27
- package/dist/cli/{db-L7ZMMQKW.mjs → db-NKGYTAQO.mjs} +6 -6
- package/dist/cli/{describe-NI324Y2M.mjs → describe-GX7DRKWZ.mjs} +18 -18
- package/dist/cli/describe-WQZF7MEG.js +50 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-T6KU2OKK.mjs → executions-HTHQ7KKD.mjs} +6 -6
- package/dist/cli/{executions-VH4DKLFI.js → executions-NXMRGPIL.js} +8 -8
- package/dist/cli/{feedback-ZLC6G5OK.js → feedback-TGVQACRO.js} +10 -10
- package/dist/cli/{feedback-SCSJC3FX.mjs → feedback-USP4T34P.mjs} +5 -5
- package/dist/cli/{git-I4LVQCID.mjs → git-KUONEHCD.mjs} +5 -5
- package/dist/cli/git-X3SCQREB.js +25 -0
- package/dist/cli/index.js +145 -145
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{legacy-noops-UPFWEHPG.js → legacy-noops-2JY3CQ24.js} +9 -9
- package/dist/cli/{legacy-noops-44FQ2256.mjs → legacy-noops-B2GMHU42.mjs} +6 -6
- package/dist/cli/{monitors-LMSASWXE.mjs → monitors-2OVBZJ6Z.mjs} +7 -7
- package/dist/cli/{monitors-JN6IQGK6.js → monitors-XI6I52AX.js} +100 -100
- package/dist/cli/{org-F7O3ZU5O.js → org-5TUQ2H6Y.js} +235 -72
- package/dist/cli/{org-QYLVEE7A.mjs → org-BNJW764Y.mjs} +169 -6
- package/dist/cli/{pages-5XE4LBZN.mjs → pages-QC3TQIPW.mjs} +6 -6
- package/dist/cli/{pages-KEL3Y4L4.js → pages-UXCLX53Y.js} +18 -18
- package/dist/cli/{play-MWQG3G32.mjs → play-45PPG5SZ.mjs} +18 -18
- package/dist/cli/{play-OURHH6KV.js → play-KRWMZ7FG.js} +317 -317
- package/dist/cli/{providers-IQY7LUBB.mjs → providers-JDT35MRL.mjs} +6 -6
- package/dist/cli/{providers-ZCBWPE3C.js → providers-RBUJ72Y3.js} +9 -9
- package/dist/cli/{quickstart-L45NGRMI.mjs → quickstart-GD2SWGAC.mjs} +4 -4
- package/dist/cli/{quickstart-O53OXTN6.js → quickstart-JZ4Q3HFT.js} +6 -6
- package/dist/cli/{run-W745Z3Z5.js → run-JEAHA367.js} +41 -41
- package/dist/cli/{run-VCSIWLEU.mjs → run-KIZ3HBI2.mjs} +23 -23
- package/dist/cli/{search-THELKULN.mjs → search-5UFNXHFK.mjs} +8 -8
- package/dist/cli/search-6JULJMD7.js +33 -0
- package/dist/cli/{search-output-N7MJLYYD.mjs → search-output-HAXPKQO6.mjs} +4 -4
- package/dist/cli/{search-output-SJW7LEOM.js → search-output-W3RDSVLE.js} +6 -6
- package/dist/cli/{secrets-44ST3FJH.mjs → secrets-JAWT66B2.mjs} +6 -6
- package/dist/cli/{secrets-GDXPX3KB.js → secrets-PC7C2Q32.js} +15 -15
- package/dist/cli/{sessions-LYCBI77S.mjs → sessions-325V7G35.mjs} +6 -6
- package/dist/cli/sessions-WFUCOJHZ.js +18 -0
- package/dist/cli/{settings-GXPDMJFG.mjs → settings-FKHTA65P.mjs} +13 -13
- package/dist/cli/{settings-3WOFF642.js → settings-RGU6Y2QR.js} +86 -86
- package/dist/cli/{setup-YM6JEB64.mjs → setup-43GOYTFC.mjs} +10 -10
- package/dist/cli/{setup-YHLMBJP4.js → setup-ZMZ7HU2I.js} +50 -50
- package/dist/cli/skills-3XTQ6FFM.js +37 -0
- package/dist/cli/{skills-WX4XWEAT.mjs → skills-Q2VAHSXM.mjs} +8 -8
- package/dist/cli/{tools-K24VSQ7S.mjs → tools-BUH7ZWDS.mjs} +17 -17
- package/dist/cli/tools-UK2R4YXQ.js +57 -0
- package/dist/cli/{update-PSSCF5AT.mjs → update-JFALWOHD.mjs} +10 -10
- package/dist/cli/update-LNKPHS54.js +35 -0
- package/dist/cli/{workflow-DGOPYATO.mjs → workflow-ISJKLY6X.mjs} +7 -7
- package/dist/cli/{workflow-FPVI3NIA.js → workflow-YELST32A.js} +17 -17
- package/dist/{client-DA71-2_u.d.mts → client-C2N7MofG.d.mts} +1 -1
- package/dist/{client-B-2Am2y6.d.ts → client-C7lTRJjw.d.ts} +1 -1
- package/dist/{client-core-BXbds1cb.d.mts → client-core-BTkDSKGn.d.mts} +79 -2
- package/dist/{client-core-C0IzDKMJ.d.ts → client-core-hmhBi7Ib.d.ts} +79 -2
- package/dist/{compiler-manifest-B4mIIbw7.d.mts → compiler-manifest-DsxsQP-T.d.mts} +14 -7
- package/dist/{compiler-manifest-B4mIIbw7.d.ts → compiler-manifest-DsxsQP-T.d.ts} +14 -7
- package/dist/{errors-Gj9i5Rkd.d.ts → errors-Bk5h1D-C.d.ts} +1 -1
- package/dist/{errors-C2F4qzAq.d.mts → errors-qdJUVQ3g.d.mts} +1 -1
- package/dist/{index-5JZBufdF.d.mts → index-PaupwX1B.d.mts} +1 -1
- package/dist/{index-BXtSj8bv.d.ts → index-bL66eHYz.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +117 -116
- 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 +7 -5
- 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/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/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-JSES2JOQ.js +0 -43
- package/dist/cli/describe-EB336DAO.js +0 -50
- package/dist/cli/git-23T7TXAH.js +0 -25
- package/dist/cli/search-R6K7ZAMU.js +0 -33
- package/dist/cli/sessions-2V5ZFOWL.js +0 -18
- package/dist/cli/skills-XNGADDO6.js +0 -37
- package/dist/cli/tools-ROUMCB7B.js +0 -57
- package/dist/cli/update-RXURGIRW.js +0 -35
|
@@ -1,13 +1,13 @@
|
|
|
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 _chunkMCXPJYBNjs = require('./chunk-MCXPJYBN.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkUQN4VTZLjs = require('./chunk-UQN4VTZL.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
|
|
@@ -150,7 +150,7 @@ function buildEnvironmentContext() {
|
|
|
150
150
|
node_version: process.version,
|
|
151
151
|
runtime: "Node.js",
|
|
152
152
|
hostname: _os.hostname.call(void 0, ),
|
|
153
|
-
agent_runtime:
|
|
153
|
+
agent_runtime: _chunkUQN4VTZLjs.detectAgentRuntime.call(void 0, )
|
|
154
154
|
};
|
|
155
155
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
156
156
|
const normalized = _optionalChain([process, 'access', _5 => _5.env, 'access', _6 => _6[key], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);
|
|
@@ -171,18 +171,18 @@ function buildEnvironmentContext() {
|
|
|
171
171
|
return context;
|
|
172
172
|
}
|
|
173
173
|
function failureReportHeaders(apiKey) {
|
|
174
|
-
const agentSessionId =
|
|
174
|
+
const agentSessionId = _chunkUQN4VTZLjs.agentSessionIdFromEnvironment.call(void 0, );
|
|
175
175
|
return {
|
|
176
|
-
...
|
|
176
|
+
..._chunkUQN4VTZLjs.deploymentProtectionHeaders.call(void 0, ),
|
|
177
177
|
...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
|
|
178
178
|
Authorization: `Bearer ${apiKey}`,
|
|
179
179
|
"Content-Type": "application/json",
|
|
180
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
180
|
+
"User-Agent": `deepline-ts-sdk/${_chunkUQN4VTZLjs.SDK_VERSION}`,
|
|
181
181
|
"X-Deepline-Client-Family": "sdk",
|
|
182
182
|
"X-Deepline-CLI-Family": "sdk",
|
|
183
|
-
"X-Deepline-Agent-Runtime":
|
|
184
|
-
"X-Deepline-CLI-Version":
|
|
185
|
-
"X-Deepline-SDK-Version":
|
|
183
|
+
"X-Deepline-Agent-Runtime": _chunkUQN4VTZLjs.detectAgentRuntime.call(void 0, ),
|
|
184
|
+
"X-Deepline-CLI-Version": _chunkUQN4VTZLjs.SDK_VERSION,
|
|
185
|
+
"X-Deepline-SDK-Version": _chunkUQN4VTZLjs.SDK_VERSION
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
async function postFailureReport(input) {
|
|
@@ -210,7 +210,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
210
210
|
if (isFailureReportingDisabled()) return false;
|
|
211
211
|
let apiKey = "";
|
|
212
212
|
try {
|
|
213
|
-
apiKey =
|
|
213
|
+
apiKey = _chunkMCXPJYBNjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
214
214
|
} catch (e2) {
|
|
215
215
|
return false;
|
|
216
216
|
}
|
|
@@ -237,7 +237,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
237
237
|
failure_code: failureCode2,
|
|
238
238
|
failure_stage: failureStage,
|
|
239
239
|
error_body: "Automatic Deepline skills installation failed.",
|
|
240
|
-
cli_version:
|
|
240
|
+
cli_version: _chunkUQN4VTZLjs.SDK_VERSION,
|
|
241
241
|
context: {
|
|
242
242
|
environment: buildEnvironmentContext(),
|
|
243
243
|
skills_sync: {
|
|
@@ -357,7 +357,7 @@ function buildFailureReport(input) {
|
|
|
357
357
|
failure_kind: failureKind,
|
|
358
358
|
failure_code: code,
|
|
359
359
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
360
|
-
cli_version:
|
|
360
|
+
cli_version: _chunkUQN4VTZLjs.SDK_VERSION,
|
|
361
361
|
context: {
|
|
362
362
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
363
363
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -377,8 +377,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
377
377
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
378
378
|
const exitCode = resolvedExitCode(input);
|
|
379
379
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
380
|
-
const baseUrl =
|
|
381
|
-
const apiKey =
|
|
380
|
+
const baseUrl = _chunkMCXPJYBNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
381
|
+
const apiKey = _chunkMCXPJYBNjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
382
382
|
if (!apiKey) return false;
|
|
383
383
|
return postFailureReport({
|
|
384
384
|
baseUrl,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
RETAINED_PIPELINE_RECEIVERS_HEADER,
|
|
32
32
|
RUNTIME_ENVIRONMENT_TOKEN_HEADER,
|
|
33
33
|
SDK_API_MAJOR
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-JCTTXLAZ.mjs";
|
|
35
35
|
import {
|
|
36
36
|
CustomerDbQueryOutcomeUnknownError
|
|
37
37
|
} from "./chunk-QNHHZ63P.mjs";
|
|
@@ -3566,7 +3566,44 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
3566
3566
|
`/api/v2/auth/workspace/members/${encodeURIComponent(memberId)}/role`,
|
|
3567
3567
|
{ role: grants.join(",") }
|
|
3568
3568
|
),
|
|
3569
|
-
create: (options) => this.createWorkspace(options)
|
|
3569
|
+
create: (options) => this.createWorkspace(options),
|
|
3570
|
+
serviceAccounts: {
|
|
3571
|
+
list: () => this.http.get("/api/v2/auth/workspace/service-accounts"),
|
|
3572
|
+
// Creating an account or a key is not idempotent, so a transport
|
|
3573
|
+
// retry or localhost failover after a lost response could report a
|
|
3574
|
+
// false failure or mint a second live key. Surface the ambiguity;
|
|
3575
|
+
// `list` shows what exists.
|
|
3576
|
+
create: (options) => this.http.post(
|
|
3577
|
+
"/api/v2/auth/workspace/service-accounts",
|
|
3578
|
+
options,
|
|
3579
|
+
void 0,
|
|
3580
|
+
{ maxRetries: 0, exactUrlOnly: true }
|
|
3581
|
+
),
|
|
3582
|
+
setRole: (serviceAccountId, role) => this.http.patch(
|
|
3583
|
+
`/api/v2/auth/workspace/service-accounts/${encodeURIComponent(serviceAccountId)}`,
|
|
3584
|
+
{ role }
|
|
3585
|
+
),
|
|
3586
|
+
delete: (serviceAccountId) => this.http.delete(
|
|
3587
|
+
`/api/v2/auth/workspace/service-accounts/${encodeURIComponent(serviceAccountId)}`
|
|
3588
|
+
),
|
|
3589
|
+
createKey: (serviceAccountId) => this.http.post(
|
|
3590
|
+
`/api/v2/auth/workspace/service-accounts/${encodeURIComponent(serviceAccountId)}/keys`,
|
|
3591
|
+
{},
|
|
3592
|
+
void 0,
|
|
3593
|
+
{ maxRetries: 0, exactUrlOnly: true }
|
|
3594
|
+
),
|
|
3595
|
+
// A retried rotate after a lost response would revoke the key it
|
|
3596
|
+
// just issued, so it is not retried either.
|
|
3597
|
+
rotateKey: (serviceAccountId) => this.http.post(
|
|
3598
|
+
`/api/v2/auth/workspace/service-accounts/${encodeURIComponent(serviceAccountId)}/keys/rotate`,
|
|
3599
|
+
{},
|
|
3600
|
+
void 0,
|
|
3601
|
+
{ maxRetries: 0, exactUrlOnly: true }
|
|
3602
|
+
),
|
|
3603
|
+
revokeKey: (serviceAccountId, keyId) => this.http.delete(
|
|
3604
|
+
`/api/v2/auth/workspace/service-accounts/${encodeURIComponent(serviceAccountId)}/keys/${encodeURIComponent(keyId)}`
|
|
3605
|
+
)
|
|
3606
|
+
}
|
|
3570
3607
|
};
|
|
3571
3608
|
this.monitors = {
|
|
3572
3609
|
status: () => this.getMonitorsAccess(),
|
|
@@ -5507,6 +5544,11 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
5507
5544
|
async getNotificationSettings() {
|
|
5508
5545
|
return this.http.get("/api/v2/settings/notifications");
|
|
5509
5546
|
}
|
|
5547
|
+
/** Fresh balance of the active workspace's own provider credential. */
|
|
5548
|
+
async getIntegrationBalance(provider) {
|
|
5549
|
+
const params = new URLSearchParams({ provider });
|
|
5550
|
+
return this.http.get(`/api/v2/integrations/balance?${params}`);
|
|
5551
|
+
}
|
|
5510
5552
|
/** Get the dashboard link where a workspace owner or admin can connect a provider. */
|
|
5511
5553
|
async getIntegrationConnectLink(provider) {
|
|
5512
5554
|
const params = new URLSearchParams({ provider });
|
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkMZROKQV3js = require('./chunk-MZROKQV3.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkV46J3UTMjs = require('./chunk-V46J3UTM.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkMCXPJYBNjs = require('./chunk-MCXPJYBN.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkUQN4VTZLjs = require('./chunk-UQN4VTZL.js');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
var _chunkRLX5ZFNXjs = require('./chunk-RLX5ZFNX.js');
|
|
@@ -145,7 +145,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
145
145
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
146
146
|
}
|
|
147
147
|
function resolveLocalRoot() {
|
|
148
|
-
const target =
|
|
148
|
+
const target = _chunkMCXPJYBNjs.resolveProjectPinTarget.call(void 0, );
|
|
149
149
|
if (!target.ok) {
|
|
150
150
|
throw new Error(
|
|
151
151
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -156,7 +156,7 @@ function resolveLocalRoot() {
|
|
|
156
156
|
return target.dir;
|
|
157
157
|
}
|
|
158
158
|
function detectSkillsAgents(input) {
|
|
159
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
159
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunkUQN4VTZLjs.detectAgentRuntime.call(void 0, )));
|
|
160
160
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
161
161
|
if (knownAgent) return [knownAgent];
|
|
162
162
|
const roots = [
|
|
@@ -171,11 +171,11 @@ function detectSkillsAgents(input) {
|
|
|
171
171
|
return detected.length > 0 ? detected : ["*"];
|
|
172
172
|
}
|
|
173
173
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
174
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
174
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkMCXPJYBNjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
175
175
|
}
|
|
176
176
|
function buildSkillsPlan(input) {
|
|
177
177
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
178
|
-
const legacyNames = [...
|
|
178
|
+
const legacyNames = [..._chunkMZROKQV3js.LEGACY_SKILL_NAMES_TO_REMOVE].sort(
|
|
179
179
|
(a, b) => a.localeCompare(b)
|
|
180
180
|
);
|
|
181
181
|
return {
|
|
@@ -189,7 +189,7 @@ function buildSkillsPlan(input) {
|
|
|
189
189
|
args: [
|
|
190
190
|
"exec",
|
|
191
191
|
"--yes",
|
|
192
|
-
`--package=${
|
|
192
|
+
`--package=${_chunkMZROKQV3js.SKILLS_NPX_PACKAGE}`,
|
|
193
193
|
"--",
|
|
194
194
|
"skills",
|
|
195
195
|
"remove",
|
|
@@ -205,11 +205,11 @@ function buildSkillsPlan(input) {
|
|
|
205
205
|
args: [
|
|
206
206
|
"exec",
|
|
207
207
|
"--yes",
|
|
208
|
-
`--package=${
|
|
208
|
+
`--package=${_chunkMZROKQV3js.SKILLS_NPX_PACKAGE}`,
|
|
209
209
|
"--",
|
|
210
210
|
"skills",
|
|
211
211
|
"add",
|
|
212
|
-
|
|
212
|
+
_chunkMZROKQV3js.skillsSourceUrl.call(void 0, input.baseUrl),
|
|
213
213
|
"--agent",
|
|
214
214
|
...input.agents,
|
|
215
215
|
...scopeArgs,
|
|
@@ -246,7 +246,7 @@ function readSkillsInstallState(path) {
|
|
|
246
246
|
}
|
|
247
247
|
function runProcess(command, args, cwd) {
|
|
248
248
|
return new Promise((resolve, reject) => {
|
|
249
|
-
const plan =
|
|
249
|
+
const plan = _chunkMZROKQV3js.resolveShellSpawn.call(void 0,
|
|
250
250
|
command,
|
|
251
251
|
args,
|
|
252
252
|
process.platform,
|
|
@@ -268,7 +268,7 @@ function runProcess(command, args, cwd) {
|
|
|
268
268
|
child.kill("SIGTERM");
|
|
269
269
|
reject(
|
|
270
270
|
new Error(
|
|
271
|
-
`${
|
|
271
|
+
`${_chunkMZROKQV3js.SKILLS_NPX_PACKAGE} timed out after ${SKILLS_PROCESS_TIMEOUT_MS}ms.`
|
|
272
272
|
)
|
|
273
273
|
);
|
|
274
274
|
}, SKILLS_PROCESS_TIMEOUT_MS);
|
|
@@ -279,7 +279,7 @@ function runProcess(command, args, cwd) {
|
|
|
279
279
|
child.once("close", (code) => {
|
|
280
280
|
clearTimeout(timeout);
|
|
281
281
|
if (code && stderr.trim()) {
|
|
282
|
-
process.stderr.write(`${
|
|
282
|
+
process.stderr.write(`${_chunkMZROKQV3js.SKILLS_NPX_PACKAGE} exited ${code}.
|
|
283
283
|
`);
|
|
284
284
|
}
|
|
285
285
|
resolve(_nullishCoalesce(code, () => ( 1)));
|
|
@@ -287,7 +287,7 @@ function runProcess(command, args, cwd) {
|
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
async function showSkills(options, name) {
|
|
290
|
-
const baseUrl =
|
|
290
|
+
const baseUrl = _chunkMCXPJYBNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
291
291
|
const url = name ? `${baseUrl}/.well-known/skills/${encodeURIComponent(name)}/SKILL.md` : `${baseUrl}/.well-known/skills/index.json`;
|
|
292
292
|
try {
|
|
293
293
|
const response = await fetch(url, {
|
|
@@ -300,7 +300,7 @@ async function showSkills(options, name) {
|
|
|
300
300
|
}
|
|
301
301
|
if (name) {
|
|
302
302
|
const markdown = await response.text();
|
|
303
|
-
|
|
303
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
304
304
|
{ ok: true, status: "completed", skill: { name, markdown } },
|
|
305
305
|
{ json: options.json, text: markdown }
|
|
306
306
|
);
|
|
@@ -310,7 +310,7 @@ async function showSkills(options, name) {
|
|
|
310
310
|
const skills = (_nullishCoalesce(index.skills, () => ( []))).filter(
|
|
311
311
|
(skill) => skill.install_surface === "v1" && skill.name
|
|
312
312
|
);
|
|
313
|
-
|
|
313
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
314
314
|
{
|
|
315
315
|
ok: true,
|
|
316
316
|
status: "completed",
|
|
@@ -327,7 +327,7 @@ Read one with: deepline skills show <name>
|
|
|
327
327
|
);
|
|
328
328
|
return 0;
|
|
329
329
|
} catch (error) {
|
|
330
|
-
|
|
330
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
331
331
|
{
|
|
332
332
|
ok: false,
|
|
333
333
|
status: "failed",
|
|
@@ -350,7 +350,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
350
350
|
scope = normalizeScope(options.scope);
|
|
351
351
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
352
352
|
} catch (error) {
|
|
353
|
-
|
|
353
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
354
354
|
{
|
|
355
355
|
ok: false,
|
|
356
356
|
status: "failed",
|
|
@@ -362,22 +362,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
362
362
|
);
|
|
363
363
|
return 2;
|
|
364
364
|
}
|
|
365
|
-
const baseUrl =
|
|
365
|
+
const baseUrl = _chunkMCXPJYBNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
366
366
|
const catalog = {
|
|
367
|
-
skillNames: [...
|
|
368
|
-
version:
|
|
367
|
+
skillNames: [..._chunkMZROKQV3js.DEFAULT_SDK_SKILL_NAMES],
|
|
368
|
+
version: _chunkUQN4VTZLjs.SDK_VERSION
|
|
369
369
|
};
|
|
370
370
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
371
371
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
372
372
|
if (options.dryRun) {
|
|
373
|
-
|
|
373
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
374
374
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
375
375
|
{ json: options.json }
|
|
376
376
|
);
|
|
377
377
|
return 0;
|
|
378
378
|
}
|
|
379
|
-
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !
|
|
380
|
-
|
|
379
|
+
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !_chunkMZROKQV3js.hasFailedAutomaticSkillsSync.call(void 0, baseUrl, agents)) {
|
|
380
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
381
381
|
{
|
|
382
382
|
ok: true,
|
|
383
383
|
status: "current",
|
|
@@ -409,10 +409,10 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
409
409
|
}
|
|
410
410
|
if (scope === "local" && root) {
|
|
411
411
|
const managedNames = [
|
|
412
|
-
.../* @__PURE__ */ new Set([...plan.skillNames, ...
|
|
412
|
+
.../* @__PURE__ */ new Set([...plan.skillNames, ..._chunkMZROKQV3js.LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
413
413
|
];
|
|
414
414
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
415
|
-
|
|
415
|
+
_chunkMCXPJYBNjs.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
416
416
|
".deepline/",
|
|
417
417
|
...agentRoots.flatMap(
|
|
418
418
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -421,7 +421,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
421
421
|
}
|
|
422
422
|
let lease;
|
|
423
423
|
try {
|
|
424
|
-
lease = scope === "global" ? await
|
|
424
|
+
lease = scope === "global" ? await _chunkMZROKQV3js.acquireSkillsInstallLease.call(void 0, baseUrl, agents, plan.version, {
|
|
425
425
|
waitMs: _nullishCoalesce(dependencies.installLeaseWaitMs, () => ( SKILLS_INSTALL_LEASE_WAIT_MS)),
|
|
426
426
|
onWait: () => process.stderr.write(
|
|
427
427
|
"Waiting for a background Deepline skills refresh to finish...\n"
|
|
@@ -429,8 +429,8 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
429
429
|
}) : { release: () => {
|
|
430
430
|
} };
|
|
431
431
|
} catch (error) {
|
|
432
|
-
if (!(error instanceof
|
|
433
|
-
|
|
432
|
+
if (!(error instanceof _chunkMZROKQV3js.SkillsStateUnavailableError)) throw error;
|
|
433
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
434
434
|
{
|
|
435
435
|
ok: false,
|
|
436
436
|
status: "failed",
|
|
@@ -446,7 +446,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
446
446
|
return 5;
|
|
447
447
|
}
|
|
448
448
|
if (!lease) {
|
|
449
|
-
|
|
449
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
450
450
|
{
|
|
451
451
|
ok: false,
|
|
452
452
|
status: "failed",
|
|
@@ -455,7 +455,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
455
455
|
scope,
|
|
456
456
|
agents,
|
|
457
457
|
message: "A background Deepline skills refresh is still running for these agents.",
|
|
458
|
-
next: `Retry in a moment: deepline skills install --scope ${scope}. If no refresh is running, remove ${
|
|
458
|
+
next: `Retry in a moment: deepline skills install --scope ${scope}. If no refresh is running, remove ${_chunkMZROKQV3js.skillsInstallLeasePath.call(void 0, baseUrl, agents)}`
|
|
459
459
|
},
|
|
460
460
|
{ json: options.json }
|
|
461
461
|
);
|
|
@@ -504,7 +504,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
} catch (error) {
|
|
507
|
-
|
|
507
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
508
508
|
{
|
|
509
509
|
ok: false,
|
|
510
510
|
status: "failed",
|
|
@@ -520,7 +520,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
520
520
|
return 5;
|
|
521
521
|
}
|
|
522
522
|
if (missing.length > 0) {
|
|
523
|
-
|
|
523
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
524
524
|
{
|
|
525
525
|
ok: false,
|
|
526
526
|
status: "failed",
|
|
@@ -560,7 +560,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
560
560
|
{
|
|
561
561
|
schemaVersion: 1,
|
|
562
562
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
563
|
-
cliVersion:
|
|
563
|
+
cliVersion: _chunkUQN4VTZLjs.SDK_VERSION,
|
|
564
564
|
scope,
|
|
565
565
|
agents,
|
|
566
566
|
skillsVersion: plan.version,
|
|
@@ -573,9 +573,9 @@ async function runSkillsInstallWithLease(input) {
|
|
|
573
573
|
"utf8"
|
|
574
574
|
);
|
|
575
575
|
if (scope === "global") {
|
|
576
|
-
|
|
576
|
+
_chunkMZROKQV3js.clearFailedAutomaticSkillsSync.call(void 0, baseUrl, agents);
|
|
577
577
|
}
|
|
578
|
-
|
|
578
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
579
579
|
{
|
|
580
580
|
ok: true,
|
|
581
581
|
status: "complete",
|
|
@@ -624,7 +624,7 @@ Examples:
|
|
|
624
624
|
"after",
|
|
625
625
|
`
|
|
626
626
|
Notes:
|
|
627
|
-
This command reinstalls current Deepline-managed skills using ${
|
|
627
|
+
This command reinstalls current Deepline-managed skills using ${_chunkMZROKQV3js.SKILLS_NPX_PACKAGE},
|
|
628
628
|
then removes legacy Deepline skill names. Local scope writes into the resolved
|
|
629
629
|
persistent project.
|
|
630
630
|
|
|
@@ -636,13 +636,13 @@ Examples:
|
|
|
636
636
|
).action(async (options) => {
|
|
637
637
|
process.exitCode = await runSkillsCommand(options);
|
|
638
638
|
});
|
|
639
|
-
program.command(
|
|
639
|
+
program.command(_chunkMZROKQV3js.SKILLS_AUTO_SYNC_COMMAND, { hidden: true }).description("Refresh Deepline agent skills in the background.").option(
|
|
640
640
|
"--claim <token>",
|
|
641
641
|
"Owner token of the leases this child was started for."
|
|
642
642
|
).action(async (options) => {
|
|
643
643
|
const claim = _optionalChain([options, 'access', _9 => _9.claim, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]);
|
|
644
644
|
if (!claim) {
|
|
645
|
-
|
|
645
|
+
_chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
|
|
646
646
|
{
|
|
647
647
|
ok: false,
|
|
648
648
|
status: "failed",
|
|
@@ -655,7 +655,7 @@ Examples:
|
|
|
655
655
|
process.exitCode = 2;
|
|
656
656
|
return;
|
|
657
657
|
}
|
|
658
|
-
await
|
|
658
|
+
await _chunkMZROKQV3js.syncSdkSkillsIfNeeded.call(void 0, _chunkMCXPJYBNjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
659
659
|
mode: "inline",
|
|
660
660
|
notices: "defer",
|
|
661
661
|
claim
|
|
@@ -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 _chunkMZROKQV3js = require('./chunk-MZROKQV3.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 = _chunkMZROKQV3js.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,
|
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkMT3WG3KRjs = require('./chunk-MT3WG3KR.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkMZROKQV3js = require('./chunk-MZROKQV3.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkV46J3UTMjs = require('./chunk-V46J3UTM.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkMCXPJYBNjs = require('./chunk-MCXPJYBN.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkUQN4VTZLjs = require('./chunk-UQN4VTZL.js');
|
|
22
22
|
|
|
23
23
|
// src/cli/compatibility-catalog.ts
|
|
24
24
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -45,7 +45,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
45
45
|
async function reportAutoUpdateEvent(input) {
|
|
46
46
|
let apiKey = "";
|
|
47
47
|
try {
|
|
48
|
-
apiKey =
|
|
48
|
+
apiKey = _chunkMCXPJYBNjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
49
49
|
} catch (e2) {
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
@@ -61,15 +61,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
61
61
|
headers: {
|
|
62
62
|
Authorization: `Bearer ${apiKey}`,
|
|
63
63
|
"Content-Type": "application/json",
|
|
64
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
64
|
+
"User-Agent": `deepline-ts-sdk/${_chunkUQN4VTZLjs.SDK_VERSION}`,
|
|
65
65
|
"X-Deepline-Client-Family": "sdk",
|
|
66
66
|
"X-Deepline-CLI-Family": "sdk",
|
|
67
|
-
"X-Deepline-CLI-Version":
|
|
68
|
-
"X-Deepline-SDK-Version":
|
|
67
|
+
"X-Deepline-CLI-Version": _chunkUQN4VTZLjs.SDK_VERSION,
|
|
68
|
+
"X-Deepline-SDK-Version": _chunkUQN4VTZLjs.SDK_VERSION
|
|
69
69
|
},
|
|
70
70
|
body: JSON.stringify({
|
|
71
71
|
event: input.event,
|
|
72
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
72
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkUQN4VTZLjs.SDK_VERSION,
|
|
73
73
|
target_version: input.response.latest,
|
|
74
74
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
75
75
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -88,13 +88,13 @@ function envTruthy(name) {
|
|
|
88
88
|
return value === "1" || value === "true" || value === "yes";
|
|
89
89
|
}
|
|
90
90
|
function shouldSkipSelfUpdate(policy) {
|
|
91
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
91
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkMT3WG3KRjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkMZROKQV3js.isCiEnvironment.call(void 0, );
|
|
92
92
|
}
|
|
93
93
|
function isDowngradeAutoUpdateResponse(response) {
|
|
94
94
|
const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
|
|
95
|
-
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) ||
|
|
95
|
+
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkUQN4VTZLjs.SDK_VERSION;
|
|
96
96
|
if (!target) return false;
|
|
97
|
-
return
|
|
97
|
+
return _chunkMT3WG3KRjs.compareUpdateVersions.call(void 0, target, current) < 0;
|
|
98
98
|
}
|
|
99
99
|
function relaunchCurrentCommand(plan, runtime = {}) {
|
|
100
100
|
return new Promise((resolve) => {
|
|
@@ -147,7 +147,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
147
147
|
}
|
|
148
148
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
149
149
|
const target = response.latest;
|
|
150
|
-
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ||
|
|
150
|
+
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkUQN4VTZLjs.SDK_VERSION;
|
|
151
151
|
process.stderr.write(
|
|
152
152
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
153
153
|
`
|
|
@@ -155,21 +155,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
155
155
|
return false;
|
|
156
156
|
}
|
|
157
157
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
158
|
-
const plan =
|
|
158
|
+
const plan = _chunkMT3WG3KRjs.resolveUpdatePlan.call(void 0, {
|
|
159
159
|
packageSpec,
|
|
160
160
|
requireVerifiedNpmOwnership: true,
|
|
161
161
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
162
162
|
});
|
|
163
|
-
if (!
|
|
163
|
+
if (!_chunkMT3WG3KRjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
164
164
|
return false;
|
|
165
165
|
}
|
|
166
166
|
if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
167
167
|
deferredAutoUpdate = async () => {
|
|
168
168
|
await applyAutoUpdate(response, baseUrl, plan, "next_command");
|
|
169
169
|
};
|
|
170
|
-
if (
|
|
170
|
+
if (_chunkV46J3UTMjs.isJsonOutputMode.call(void 0, )) {
|
|
171
171
|
const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
|
|
172
|
-
|
|
172
|
+
_chunkV46J3UTMjs.addJsonNotice.call(void 0, {
|
|
173
173
|
code: "sdk_update_queued",
|
|
174
174
|
message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
|
|
175
175
|
});
|
|
@@ -182,7 +182,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
182
182
|
return true;
|
|
183
183
|
}
|
|
184
184
|
async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
185
|
-
if (!
|
|
185
|
+
if (!_chunkMT3WG3KRjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
|
|
186
186
|
const autoUpdate = response.auto_update;
|
|
187
187
|
const label = _optionalChain([autoUpdate, 'optionalAccess', _32 => _32.reason]) === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : _optionalChain([autoUpdate, 'optionalAccess', _33 => _33.reason]) === "deprecated" ? "is deprecated and will update automatically" : _optionalChain([autoUpdate, 'optionalAccess', _34 => _34.required]) ? "requires an update" : "has an update available and will update automatically";
|
|
188
188
|
process.stderr.write(
|
|
@@ -195,7 +195,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
195
195
|
event: "started",
|
|
196
196
|
installKind: plan.kind
|
|
197
197
|
});
|
|
198
|
-
const updateResult = await
|
|
198
|
+
const updateResult = await _chunkMT3WG3KRjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
199
199
|
if (updateResult.status === "skipped_previous_failure") {
|
|
200
200
|
void reportAutoUpdateEvent({
|
|
201
201
|
baseUrl,
|
|
@@ -233,7 +233,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
233
233
|
exitCode: 0
|
|
234
234
|
});
|
|
235
235
|
try {
|
|
236
|
-
await
|
|
236
|
+
await _chunkMZROKQV3js.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
237
237
|
mode: "detached",
|
|
238
238
|
update: _optionalChain([response, 'access', _36 => _36.skills, 'optionalAccess', _37 => _37.requires_cli_update]) ? void 0 : response.skills,
|
|
239
239
|
afterCliUpdate: {
|
|
@@ -260,7 +260,7 @@ var _crypto = require('crypto');
|
|
|
260
260
|
var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
|
|
261
261
|
var activeToolExecuteCommand = null;
|
|
262
262
|
function progressLine(line) {
|
|
263
|
-
if (!
|
|
263
|
+
if (!_chunkV46J3UTMjs.isJsonOutputMode.call(void 0, )) console.error(line);
|
|
264
264
|
}
|
|
265
265
|
function beginToolExecuteCommand() {
|
|
266
266
|
if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
|
package/dist/cli/command-docs.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkQYXIODWHjs = require('./chunk-QYXIODWH.js');
|
|
11
11
|
require('./chunk-R7J7CJPZ.js');
|
|
12
12
|
require('./chunk-YGCKMI5P.js');
|
|
13
13
|
require('./chunk-COGTRVWW.js');
|
|
@@ -20,4 +20,4 @@ require('./chunk-COGTRVWW.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
exports.CLI_DOC_SURFACE =
|
|
23
|
+
exports.CLI_DOC_SURFACE = _chunkQYXIODWHjs.CLI_DOC_SURFACE; exports.COMMAND_DOCS = _chunkQYXIODWHjs.COMMAND_DOCS; exports.PLAY_RUNTIME_PRICING_NOTE = _chunkQYXIODWHjs.PLAY_RUNTIME_PRICING_NOTE; exports.commandDocKey = _chunkQYXIODWHjs.commandDocKey; exports.helpDetailFromArgv = _chunkQYXIODWHjs.helpDetailFromArgv; exports.renderActionExplanation = _chunkQYXIODWHjs.renderActionExplanation; exports.renderCommandExplanation = _chunkQYXIODWHjs.renderCommandExplanation; exports.renderDocText = _chunkQYXIODWHjs.renderDocText;
|