deepline 0.3.469 → 0.3.471
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 +5 -0
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +22 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-admission-outcome.ts +34 -8
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/postgres-adapter.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +173 -32
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +36 -1
- package/dist/cli/auth-2MMOFS3O.js +41 -0
- package/dist/cli/{auth-HHMOHWIF.mjs → auth-MUCIXHJF.mjs} +5 -5
- package/dist/cli/{billing-26PU55WM.js → billing-BQQNTCTV.js} +82 -81
- package/dist/cli/{billing-KQORGOK4.mjs → billing-QGCTDE2N.mjs} +9 -8
- package/dist/cli/{chunk-YCIQYY5F.mjs → chunk-2KBRY5CA.mjs} +3 -3
- package/dist/cli/{chunk-WFI46NX4.mjs → chunk-3PT2HJKC.mjs} +1 -1
- package/dist/cli/{chunk-PKCDG6W5.mjs → chunk-4OAA43RX.mjs} +3 -3
- package/dist/cli/{chunk-E55WWSW4.js → chunk-4PT2WZD2.js} +26 -26
- package/dist/cli/{chunk-GFHBE35X.js → chunk-5QWGL2QO.js} +93 -93
- package/dist/cli/{chunk-HNP5V5BN.js → chunk-6DTW6JND.js} +6 -2
- package/dist/cli/{chunk-E6O62X6Z.mjs → chunk-AMUSZHCE.mjs} +2 -2
- package/dist/cli/{chunk-I5ZF67WP.mjs → chunk-ATKFOOVD.mjs} +5 -5
- package/dist/cli/{chunk-RC7X6KBQ.js → chunk-CR2F3JZN.js} +51 -51
- package/dist/cli/{chunk-SNAPSOK7.js → chunk-DFMFYOML.js} +10 -10
- package/dist/cli/{chunk-ODOFLA34.js → chunk-DK5Y5BD3.js} +4 -4
- package/dist/cli/{chunk-GVRTIZJN.mjs → chunk-DV4V5IWI.mjs} +5 -5
- package/dist/cli/{chunk-5WQM5HAQ.mjs → chunk-E2SHDT7T.mjs} +2 -2
- package/dist/cli/{chunk-SXTMM4DA.js → chunk-E3WTQ3JI.js} +14 -14
- package/dist/cli/{chunk-D7DUKSFS.mjs → chunk-EHVVDHNU.mjs} +1 -1
- package/dist/cli/{chunk-WCKFCSRX.mjs → chunk-EYKMITTY.mjs} +4 -4
- package/dist/cli/{chunk-FA3G556U.mjs → chunk-FJBGBPYY.mjs} +2 -2
- package/dist/cli/{chunk-UI2UC3OD.mjs → chunk-FVGT5EBA.mjs} +1 -1
- package/dist/cli/{chunk-YSRQJ4M3.js → chunk-FX3QM6WN.js} +3 -3
- package/dist/cli/{chunk-KOBMP4ZD.js → chunk-G6RQXAJ2.js} +1 -1
- package/dist/cli/{chunk-LBG7M2UO.js → chunk-GPSVXVDZ.js} +8 -8
- package/dist/cli/{chunk-I7TGFUQJ.mjs → chunk-IE5KAVTI.mjs} +3 -3
- package/dist/cli/{chunk-RXG2KE3N.mjs → chunk-IPFUDUSY.mjs} +4 -4
- package/dist/cli/{chunk-L34QVDRW.js → chunk-J2NYCUTK.js} +24 -24
- package/dist/cli/{chunk-JKVRBCZL.js → chunk-JDMR33HS.js} +1 -0
- package/dist/cli/{chunk-HB2M7RWZ.mjs → chunk-K5USD25Z.mjs} +10 -10
- package/dist/cli/{chunk-6SZNOJSR.js → chunk-KSUGLTX3.js} +6 -6
- package/dist/cli/{chunk-3G4MRUY7.js → chunk-MLQJVAVS.js} +3 -3
- package/dist/cli/{chunk-URGJLSJX.mjs → chunk-MV6HL67R.mjs} +2 -2
- package/dist/cli/{chunk-ZZ3WOBZQ.js → chunk-NBPNYD54.js} +16 -16
- package/dist/cli/{chunk-FAG4DFUC.mjs → chunk-NELMCOWK.mjs} +1 -0
- package/dist/cli/{chunk-ZWZKQBJJ.js → chunk-NLT3CFVJ.js} +2 -2
- package/dist/cli/{chunk-KPFO7CQM.js → chunk-NPJY5QRC.js} +53 -53
- package/dist/cli/{chunk-PAY27R7P.mjs → chunk-OYHCMKZM.mjs} +3 -3
- package/dist/cli/{chunk-T3OOWRPX.mjs → chunk-PVEEGJFN.mjs} +1 -1
- package/dist/cli/{chunk-NWAFIAHT.js → chunk-RUWBAU6V.js} +8 -8
- package/dist/cli/{chunk-2BBBUZVW.js → chunk-RWCTGSD7.js} +3 -3
- package/dist/cli/{chunk-2OFJVQ7L.mjs → chunk-RYGJWMWL.mjs} +1 -1
- package/dist/cli/{chunk-D464JW3N.mjs → chunk-RZHUHL53.mjs} +19 -1
- package/dist/cli/{chunk-4CJLSC6I.mjs → chunk-SIQV6UYG.mjs} +4 -4
- package/dist/cli/{chunk-XXIAG42J.js → chunk-TWRK4NOU.js} +36 -36
- package/dist/cli/{chunk-N6QVWV5R.mjs → chunk-U5RGCQWJ.mjs} +2 -2
- package/dist/cli/{chunk-FVYAEBGO.mjs → chunk-V2WMJXU6.mjs} +6 -2
- package/dist/cli/{chunk-X7MME4NT.js → chunk-VDRGX2XL.js} +5 -5
- package/dist/cli/{chunk-TEYQKQAQ.js → chunk-VGIAOWCD.js} +5 -5
- package/dist/cli/{chunk-CUCH65D3.mjs → chunk-VVY3HGFM.mjs} +2 -2
- package/dist/cli/{chunk-7S33CZMU.js → chunk-WDXJUZCY.js} +2 -2
- package/dist/cli/{chunk-7JY5HB23.js → chunk-YRM5TPXL.js} +8 -8
- package/dist/cli/{chunk-WG3KGAII.js → chunk-Z52WEIBR.js} +19 -1
- package/dist/cli/{chunk-VERY76VG.mjs → chunk-ZAF54BQK.mjs} +1 -1
- package/dist/cli/{chunk-2GMJDL3C.js → chunk-ZHM7VCKH.js} +21 -21
- package/dist/cli/{chunk-DI3K3PJE.mjs → chunk-ZMJOSD7R.mjs} +1 -1
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-DVAQAKEI.mjs → csv-Q6BSRCBJ.mjs} +4 -4
- package/dist/cli/{csv-RTWPHENL.js → csv-UE7RZDUV.js} +13 -13
- package/dist/cli/{db-OFAOD5AT.mjs → db-FI6XXB2H.mjs} +7 -7
- package/dist/cli/{db-BY4Y6CQ3.js → db-T7A7EE3D.js} +28 -28
- package/dist/cli/{describe-QOO27KPQ.mjs → describe-4GGU6NU3.mjs} +18 -18
- package/dist/cli/describe-UM2VGRY7.js +48 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-QHGGAQOE.js → executions-4I6F5RMS.js} +9 -9
- package/dist/cli/{executions-EUHFCB47.mjs → executions-S46XI7NX.mjs} +7 -7
- package/dist/cli/{feedback-47CCLALE.mjs → feedback-3LJ7NZE7.mjs} +4 -4
- package/dist/cli/{feedback-5G4CUZFN.js → feedback-VEGUNKSP.js} +8 -8
- package/dist/cli/git-EVWKNIUA.js +25 -0
- package/dist/cli/{git-5I2AXG4O.mjs → git-W7SFD7AA.mjs} +5 -5
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-5OBXYGLC.js → legacy-noops-3EMB5SJH.js} +8 -8
- package/dist/cli/{legacy-noops-AJYRHCWF.mjs → legacy-noops-FIR5PSHG.mjs} +5 -5
- package/dist/cli/{monitors-IWFCIY3H.mjs → monitors-4DKW25PV.mjs} +8 -8
- package/dist/cli/{monitors-5CWZZ7D7.js → monitors-53LPJH6R.js} +92 -92
- package/dist/cli/{org-7EP6FXX6.mjs → org-6ZV2DBGI.mjs} +7 -7
- package/dist/cli/{org-7HCL5RO7.js → org-CYLJFX4Q.js} +73 -73
- package/dist/cli/{pages-GTECAV7A.js → pages-42E3WIMH.js} +18 -18
- package/dist/cli/{pages-UJWA7YNZ.mjs → pages-V3LEXCRL.mjs} +7 -7
- package/dist/cli/{play-MMGWGTTZ.js → play-O3OY556F.js} +556 -516
- package/dist/cli/{play-X3SYW37L.mjs → play-X7REMNNG.mjs} +63 -23
- package/dist/cli/{providers-ZBCQLB5Y.mjs → providers-L2DJVAXN.mjs} +7 -7
- package/dist/cli/{providers-VQL4X4VL.js → providers-NZ7TISS3.js} +10 -10
- package/dist/cli/{quickstart-SIFBA4UU.js → quickstart-IKNGAQRO.js} +6 -6
- package/dist/cli/{quickstart-TIPHHFSA.mjs → quickstart-ROWMAUXQ.mjs} +4 -4
- package/dist/cli/{run-XKSIVFEN.js → run-JG6DLOYR.js} +37 -37
- package/dist/cli/{run-4L6ZW53Z.mjs → run-PJI577J2.mjs} +23 -23
- package/dist/cli/{search-6HLAN32O.mjs → search-DOVJ745X.mjs} +8 -8
- package/dist/cli/search-RHKW5GSR.js +32 -0
- package/dist/cli/{secrets-4HTY4MSI.mjs → secrets-OKDFNCRJ.mjs} +7 -7
- package/dist/cli/{secrets-KYRIVDA6.js → secrets-R5LWXIG6.js} +16 -16
- package/dist/cli/{sessions-JEV4COUF.mjs → sessions-KX4C2CKS.mjs} +5 -5
- package/dist/cli/{sessions-EVKRTCFM.js → sessions-L3DSAY2T.js} +6 -6
- package/dist/cli/{settings-WFZNZVHF.js → settings-NKTNNTAP.js} +79 -79
- package/dist/cli/{settings-QSABRUHQ.mjs → settings-W3SMDBYS.mjs} +12 -12
- package/dist/cli/{setup-JFEGYAMU.js → setup-5WZEXWQR.js} +44 -44
- package/dist/cli/{setup-KG22OTJO.mjs → setup-7KFKKW2W.mjs} +9 -9
- package/dist/cli/skills-UFAABPCQ.js +31 -0
- package/dist/cli/{skills-5XJM7UBQ.mjs → skills-X5TLATOL.mjs} +7 -7
- package/dist/cli/{tools-2AMQKFP4.mjs → tools-27J5EOKO.mjs} +17 -17
- package/dist/cli/tools-IVU3BCIY.js +55 -0
- package/dist/cli/{update-KEN737KZ.mjs → update-EWL477FJ.mjs} +9 -9
- package/dist/cli/update-G7HFHKPG.js +33 -0
- package/dist/cli/{workflow-T622YRL4.js → workflow-GFNGGHJE.js} +18 -18
- package/dist/cli/{workflow-L6Q5H3OO.mjs → workflow-YXR6YMT2.mjs} +8 -8
- package/dist/{client-B3tlWsw7.d.ts → client-DIpVmXcj.d.ts} +1 -1
- package/dist/{client-CdJR18SJ.d.mts → client-DitOgp8N.d.mts} +1 -1
- package/dist/{client-core-ByJD7QXj.d.mts → client-core-COZteOww.d.mts} +28 -2
- package/dist/{client-core-CxHBKfE5.d.ts → client-core-k543Fg6D.d.ts} +28 -2
- package/dist/{compiler-manifest-D5dARg3M.d.ts → compiler-manifest-Zwm9yqOA.d.mts} +39 -0
- package/dist/{compiler-manifest-D5dARg3M.d.mts → compiler-manifest-Zwm9yqOA.d.ts} +39 -0
- package/dist/{errors-BtHHzWL8.d.ts → errors-CsYwlpn4.d.ts} +1 -1
- package/dist/{errors-BveMVPwA.d.mts → errors-nEsqNLL8.d.mts} +1 -1
- package/dist/{index-C6sovoYP.d.ts → index-9pUZqkPH.d.ts} +1 -1
- package/dist/{index-BboApDGD.d.mts → index-CXF2jtza.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +112 -112
- 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 +1 -1
- 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 +2 -2
- package/dist/plays/run-request.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-LEYK6ZW7.js +0 -41
- package/dist/cli/describe-FS5CSJTO.js +0 -48
- package/dist/cli/git-IWVY3SXC.js +0 -25
- package/dist/cli/search-2WGVKZ2E.js +0 -32
- package/dist/cli/skills-6DY62DEQ.js +0 -31
- package/dist/cli/tools-ENIGWVGY.js +0 -55
- package/dist/cli/update-XZBBPRDV.js +0 -33
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkNPJY5QRCjs = require('./chunk-NPJY5QRC.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkYRM5TPXLjs = require('./chunk-YRM5TPXL.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkMLQJVAVSjs = require('./chunk-MLQJVAVS.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkDK5Y5BD3js = require('./chunk-DK5Y5BD3.js');
|
|
28
28
|
|
|
29
29
|
// src/cli/commands/skills.ts
|
|
30
30
|
var _child_process = require('child_process');
|
|
@@ -77,7 +77,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
77
77
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
78
78
|
}
|
|
79
79
|
function resolveLocalRoot() {
|
|
80
|
-
const target =
|
|
80
|
+
const target = _chunkMLQJVAVSjs.resolveProjectPinTarget.call(void 0, );
|
|
81
81
|
if (!target.ok) {
|
|
82
82
|
throw new Error(
|
|
83
83
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -88,7 +88,7 @@ function resolveLocalRoot() {
|
|
|
88
88
|
return target.dir;
|
|
89
89
|
}
|
|
90
90
|
function detectSkillsAgents(input) {
|
|
91
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
91
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunkDK5Y5BD3js.detectAgentRuntime.call(void 0, )));
|
|
92
92
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
93
93
|
if (knownAgent) return [knownAgent];
|
|
94
94
|
const roots = [
|
|
@@ -103,11 +103,11 @@ function detectSkillsAgents(input) {
|
|
|
103
103
|
return detected.length > 0 ? detected : ["*"];
|
|
104
104
|
}
|
|
105
105
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
106
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
106
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkMLQJVAVSjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
107
107
|
}
|
|
108
108
|
function buildSkillsPlan(input) {
|
|
109
109
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
110
|
-
const legacyNames = [...
|
|
110
|
+
const legacyNames = [..._chunkNPJY5QRCjs.LEGACY_SKILL_NAMES_TO_REMOVE].sort(
|
|
111
111
|
(a, b) => a.localeCompare(b)
|
|
112
112
|
);
|
|
113
113
|
return {
|
|
@@ -121,7 +121,7 @@ function buildSkillsPlan(input) {
|
|
|
121
121
|
args: [
|
|
122
122
|
"exec",
|
|
123
123
|
"--yes",
|
|
124
|
-
`--package=${
|
|
124
|
+
`--package=${_chunkNPJY5QRCjs.SKILLS_NPX_PACKAGE}`,
|
|
125
125
|
"--",
|
|
126
126
|
"skills",
|
|
127
127
|
"remove",
|
|
@@ -137,11 +137,11 @@ function buildSkillsPlan(input) {
|
|
|
137
137
|
args: [
|
|
138
138
|
"exec",
|
|
139
139
|
"--yes",
|
|
140
|
-
`--package=${
|
|
140
|
+
`--package=${_chunkNPJY5QRCjs.SKILLS_NPX_PACKAGE}`,
|
|
141
141
|
"--",
|
|
142
142
|
"skills",
|
|
143
143
|
"add",
|
|
144
|
-
|
|
144
|
+
_chunkNPJY5QRCjs.skillsSourceUrl.call(void 0, input.baseUrl),
|
|
145
145
|
"--agent",
|
|
146
146
|
...input.agents,
|
|
147
147
|
...scopeArgs,
|
|
@@ -178,7 +178,7 @@ function readSkillsInstallState(path) {
|
|
|
178
178
|
}
|
|
179
179
|
function runProcess(command, args, cwd) {
|
|
180
180
|
return new Promise((resolve, reject) => {
|
|
181
|
-
const plan =
|
|
181
|
+
const plan = _chunkNPJY5QRCjs.resolveShellSpawn.call(void 0,
|
|
182
182
|
command,
|
|
183
183
|
args,
|
|
184
184
|
process.platform,
|
|
@@ -200,7 +200,7 @@ function runProcess(command, args, cwd) {
|
|
|
200
200
|
child.kill("SIGTERM");
|
|
201
201
|
reject(
|
|
202
202
|
new Error(
|
|
203
|
-
`${
|
|
203
|
+
`${_chunkNPJY5QRCjs.SKILLS_NPX_PACKAGE} timed out after ${SKILLS_PROCESS_TIMEOUT_MS}ms.`
|
|
204
204
|
)
|
|
205
205
|
);
|
|
206
206
|
}, SKILLS_PROCESS_TIMEOUT_MS);
|
|
@@ -211,7 +211,7 @@ function runProcess(command, args, cwd) {
|
|
|
211
211
|
child.once("close", (code) => {
|
|
212
212
|
clearTimeout(timeout);
|
|
213
213
|
if (code && stderr.trim()) {
|
|
214
|
-
process.stderr.write(`${
|
|
214
|
+
process.stderr.write(`${_chunkNPJY5QRCjs.SKILLS_NPX_PACKAGE} exited ${code}.
|
|
215
215
|
`);
|
|
216
216
|
}
|
|
217
217
|
resolve(_nullishCoalesce(code, () => ( 1)));
|
|
@@ -225,7 +225,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
225
225
|
scope = normalizeScope(options.scope);
|
|
226
226
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
227
227
|
} catch (error) {
|
|
228
|
-
|
|
228
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
229
229
|
{
|
|
230
230
|
ok: false,
|
|
231
231
|
status: "failed",
|
|
@@ -237,22 +237,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
237
237
|
);
|
|
238
238
|
return 2;
|
|
239
239
|
}
|
|
240
|
-
const baseUrl =
|
|
240
|
+
const baseUrl = _chunkMLQJVAVSjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
241
241
|
const catalog = {
|
|
242
|
-
skillNames: [...
|
|
243
|
-
version:
|
|
242
|
+
skillNames: [..._chunkNPJY5QRCjs.DEFAULT_SDK_SKILL_NAMES],
|
|
243
|
+
version: _chunkDK5Y5BD3js.SDK_VERSION
|
|
244
244
|
};
|
|
245
245
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
246
246
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
247
247
|
if (options.dryRun) {
|
|
248
|
-
|
|
248
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
249
249
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
250
250
|
{ json: options.json }
|
|
251
251
|
);
|
|
252
252
|
return 0;
|
|
253
253
|
}
|
|
254
|
-
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !
|
|
255
|
-
|
|
254
|
+
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !_chunkNPJY5QRCjs.hasFailedAutomaticSkillsSync.call(void 0, baseUrl, agents)) {
|
|
255
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
256
256
|
{
|
|
257
257
|
ok: true,
|
|
258
258
|
status: "current",
|
|
@@ -284,10 +284,10 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
284
284
|
}
|
|
285
285
|
if (scope === "local" && root) {
|
|
286
286
|
const managedNames = [
|
|
287
|
-
.../* @__PURE__ */ new Set([...plan.skillNames, ...
|
|
287
|
+
.../* @__PURE__ */ new Set([...plan.skillNames, ..._chunkNPJY5QRCjs.LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
288
288
|
];
|
|
289
289
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
290
|
-
|
|
290
|
+
_chunkMLQJVAVSjs.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
291
291
|
".deepline/",
|
|
292
292
|
...agentRoots.flatMap(
|
|
293
293
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -296,7 +296,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
296
296
|
}
|
|
297
297
|
let lease;
|
|
298
298
|
try {
|
|
299
|
-
lease = scope === "global" ? await
|
|
299
|
+
lease = scope === "global" ? await _chunkNPJY5QRCjs.acquireSkillsInstallLease.call(void 0, baseUrl, agents, plan.version, {
|
|
300
300
|
waitMs: _nullishCoalesce(dependencies.installLeaseWaitMs, () => ( SKILLS_INSTALL_LEASE_WAIT_MS)),
|
|
301
301
|
onWait: () => process.stderr.write(
|
|
302
302
|
"Waiting for a background Deepline skills refresh to finish...\n"
|
|
@@ -304,8 +304,8 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
304
304
|
}) : { release: () => {
|
|
305
305
|
} };
|
|
306
306
|
} catch (error) {
|
|
307
|
-
if (!(error instanceof
|
|
308
|
-
|
|
307
|
+
if (!(error instanceof _chunkNPJY5QRCjs.SkillsStateUnavailableError)) throw error;
|
|
308
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
309
309
|
{
|
|
310
310
|
ok: false,
|
|
311
311
|
status: "failed",
|
|
@@ -321,7 +321,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
321
321
|
return 5;
|
|
322
322
|
}
|
|
323
323
|
if (!lease) {
|
|
324
|
-
|
|
324
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
325
325
|
{
|
|
326
326
|
ok: false,
|
|
327
327
|
status: "failed",
|
|
@@ -330,7 +330,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
330
330
|
scope,
|
|
331
331
|
agents,
|
|
332
332
|
message: "A background Deepline skills refresh is still running for these agents.",
|
|
333
|
-
next: `Retry in a moment: deepline skills --scope ${scope}. If no refresh is running, remove ${
|
|
333
|
+
next: `Retry in a moment: deepline skills --scope ${scope}. If no refresh is running, remove ${_chunkNPJY5QRCjs.skillsInstallLeasePath.call(void 0, baseUrl, agents)}`
|
|
334
334
|
},
|
|
335
335
|
{ json: options.json }
|
|
336
336
|
);
|
|
@@ -367,7 +367,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
367
367
|
throw new Error("Could not install the current Deepline skills.");
|
|
368
368
|
}
|
|
369
369
|
} catch (error) {
|
|
370
|
-
|
|
370
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
371
371
|
{
|
|
372
372
|
ok: false,
|
|
373
373
|
status: "failed",
|
|
@@ -406,7 +406,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
406
406
|
{
|
|
407
407
|
schemaVersion: 1,
|
|
408
408
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
409
|
-
cliVersion:
|
|
409
|
+
cliVersion: _chunkDK5Y5BD3js.SDK_VERSION,
|
|
410
410
|
scope,
|
|
411
411
|
agents,
|
|
412
412
|
skillsVersion: plan.version,
|
|
@@ -419,9 +419,9 @@ async function runSkillsInstallWithLease(input) {
|
|
|
419
419
|
"utf8"
|
|
420
420
|
);
|
|
421
421
|
if (scope === "global") {
|
|
422
|
-
|
|
422
|
+
_chunkNPJY5QRCjs.clearFailedAutomaticSkillsSync.call(void 0, baseUrl, agents);
|
|
423
423
|
}
|
|
424
|
-
|
|
424
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
425
425
|
{
|
|
426
426
|
ok: true,
|
|
427
427
|
status: "complete",
|
|
@@ -452,7 +452,7 @@ function registerSkillsCommand(program) {
|
|
|
452
452
|
"after",
|
|
453
453
|
`
|
|
454
454
|
Notes:
|
|
455
|
-
This command reinstalls current Deepline-managed skills using ${
|
|
455
|
+
This command reinstalls current Deepline-managed skills using ${_chunkNPJY5QRCjs.SKILLS_NPX_PACKAGE},
|
|
456
456
|
then removes legacy Deepline skill names. Local scope writes into the resolved
|
|
457
457
|
persistent project.
|
|
458
458
|
|
|
@@ -464,13 +464,13 @@ Examples:
|
|
|
464
464
|
).action(async (options) => {
|
|
465
465
|
process.exitCode = await runSkillsCommand(options);
|
|
466
466
|
});
|
|
467
|
-
program.command(
|
|
467
|
+
program.command(_chunkNPJY5QRCjs.SKILLS_AUTO_SYNC_COMMAND, { hidden: true }).description("Refresh Deepline agent skills in the background.").option(
|
|
468
468
|
"--claim <token>",
|
|
469
469
|
"Owner token of the leases this child was started for."
|
|
470
470
|
).action(async (options) => {
|
|
471
471
|
const claim = _optionalChain([options, 'access', _ => _.claim, 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]);
|
|
472
472
|
if (!claim) {
|
|
473
|
-
|
|
473
|
+
_chunkYRM5TPXLjs.printCommandEnvelope.call(void 0,
|
|
474
474
|
{
|
|
475
475
|
ok: false,
|
|
476
476
|
status: "failed",
|
|
@@ -483,7 +483,7 @@ Examples:
|
|
|
483
483
|
process.exitCode = 2;
|
|
484
484
|
return;
|
|
485
485
|
}
|
|
486
|
-
await
|
|
486
|
+
await _chunkNPJY5QRCjs.syncSdkSkillsIfNeeded.call(void 0, _chunkMLQJVAVSjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
487
487
|
mode: "inline",
|
|
488
488
|
notices: "defer",
|
|
489
489
|
claim
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MV6HL67R.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FVGT5EBA.mjs";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
10
|
var DeeplineClient2 = class extends DeeplineClient {
|
|
@@ -1058,7 +1058,9 @@ Output (JSON, printed when the run ends):
|
|
|
1058
1058
|
datasets[] {datasetId, name, storage {schema, table}}, and actions holding
|
|
1059
1059
|
exact follow-up commands: getRunCmd, getFullRunCmd, getBillingCmd,
|
|
1060
1060
|
getLogsCmd, exportDatasetCmds[], queryTableSqlCmds[]. Rows are not in this
|
|
1061
|
-
payload.
|
|
1061
|
+
payload. When the play's rateLimit window is held, no run starts: the
|
|
1062
|
+
package is the latest run plus rateLimited {latestRunId, nextAllowedAt,
|
|
1063
|
+
message}. Progress lines are printed while it waits; the JSON is the last
|
|
1062
1064
|
thing printed. To parse it, add --json: progress is suppressed and stdout
|
|
1063
1065
|
is one JSON document.
|
|
1064
1066
|
]]
|
|
@@ -1069,7 +1071,9 @@ Output:
|
|
|
1069
1071
|
rowOutcomes, warnings, datasets[] {tableNamespace, sqlQualifiedTableName,
|
|
1070
1072
|
actions}, and next {inspect, full, billing, logs}, each naming the MCP call
|
|
1071
1073
|
for that follow-up. Pass a dataset's tableNamespace as table_namespace to
|
|
1072
|
-
deepline_read_play_output for its rows; rows are not in this payload.
|
|
1074
|
+
deepline_read_play_output for its rows; rows are not in this payload. A
|
|
1075
|
+
held rateLimit window starts no run and returns the latest run with
|
|
1076
|
+
rateLimited {latestRunId, nextAllowedAt, message}.
|
|
1073
1077
|
]]
|
|
1074
1078
|
Cost:
|
|
1075
1079
|
Spends Deepline credits through the play's tool calls. Validation errors
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkJ2NYCUTKjs = require('./chunk-J2NYCUTK.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkMLQJVAVSjs = require('./chunk-MLQJVAVS.js');
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
|
-
var DeeplineClient2 = class extends
|
|
10
|
+
var DeeplineClient2 = class extends _chunkJ2NYCUTKjs.DeeplineClient {
|
|
11
11
|
constructor(options) {
|
|
12
|
-
const config =
|
|
13
|
-
super(config, new (0,
|
|
12
|
+
const config = _chunkMLQJVAVSjs.resolveConfig.call(void 0, options);
|
|
13
|
+
super(config, new (0, _chunkMLQJVAVSjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJ2NYCUTKjs = require('./chunk-J2NYCUTK.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkMLQJVAVSjs = require('./chunk-MLQJVAVS.js');
|
|
8
8
|
|
|
9
9
|
// src/plays/local-play-execution.ts
|
|
10
10
|
function importedNodes(graph) {
|
|
@@ -137,9 +137,9 @@ async function pinLocalPlayImports(client, graph) {
|
|
|
137
137
|
|
|
138
138
|
// src/plays/client.ts
|
|
139
139
|
function createPlayClient(options) {
|
|
140
|
-
const config =
|
|
141
|
-
return new (0,
|
|
142
|
-
new (0,
|
|
140
|
+
const config = _chunkMLQJVAVSjs.resolveConfig.call(void 0, options);
|
|
141
|
+
return new (0, _chunkJ2NYCUTKjs.PlayClient)(
|
|
142
|
+
new (0, _chunkMLQJVAVSjs.HttpClient)(config),
|
|
143
143
|
_nullishCoalesce(config.environment, () => ( process.env))
|
|
144
144
|
);
|
|
145
145
|
}
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OYHCMKZM.mjs";
|
|
6
6
|
import {
|
|
7
7
|
resolveBaseUrlOnly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FVGT5EBA.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -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(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYRM5TPXLjs = require('./chunk-YRM5TPXL.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/maintenance-policy.ts
|
|
6
6
|
var _commander = require('commander');
|
|
@@ -33,7 +33,7 @@ function recordCliTrace(event) {
|
|
|
33
33
|
sinceStartMs: now - cliTraceStartedAt,
|
|
34
34
|
...event
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
_chunkYRM5TPXLjs.writeRawStderr.call(void 0, `[cli-trace] ${JSON.stringify(payload)}
|
|
37
37
|
`);
|
|
38
38
|
}
|
|
39
39
|
async function traceCliSpan(phase, fields, run) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkMLQJVAVSjs = require('./chunk-MLQJVAVS.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkDK5Y5BD3js = require('./chunk-DK5Y5BD3.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -20,7 +20,7 @@ var RUN_FIELDS = new Set(
|
|
|
20
20
|
var ROOTS = {
|
|
21
21
|
describe: "name playKey reference displayName description pinned toolCategories tags origin ownerType canEdit canClone aliases inputSchema outputSchema staticPipeline csvInput rowOutputSchema runCommand examples cloneEditStarter currentPublishedVersion liveVersion triggerStatus triggerMetadata isDraftDirty latestRunId runtimeLimit activeScheduledPlays dashboardUrl command_context",
|
|
22
22
|
check: "kind target checked scope name exportName valid stage issues inputSchema outputSchema recognized triggers runtimeLimit limits featureFlags sourceHash artifactHash graphHash toolGetterHints exports actions diagnostics reference origin ownerType activeScheduledPlays command_context",
|
|
23
|
-
run: "schemaVersion kind run datasets actions apiVersion dashboardUrl progress rowOutcomes steps errors error warnings result resultState execution command_context diagnostics",
|
|
23
|
+
run: "schemaVersion kind run datasets actions apiVersion rateLimited dashboardUrl progress rowOutcomes steps errors error warnings result resultState execution command_context diagnostics",
|
|
24
24
|
get: "schemaVersion kind run dashboardUrl runStatus steps failures errorDetails rowOutcomes warnings failedLogs datasets result resultState actions diagnostics command_context",
|
|
25
25
|
config: "runId contract command_context",
|
|
26
26
|
export: "runId datasets csv_path json_path format source rowCount columns notice metadata_path actions command_context"
|
|
@@ -290,8 +290,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
290
290
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
291
291
|
var defaultBrowserCommandRunner = childProcess;
|
|
292
292
|
function getAuthedHttpClient() {
|
|
293
|
-
const config =
|
|
294
|
-
return { config, http: new (0,
|
|
293
|
+
const config = _chunkMLQJVAVSjs.resolveConfig.call(void 0, );
|
|
294
|
+
return { config, http: new (0, _chunkMLQJVAVSjs.HttpClient)(config) };
|
|
295
295
|
}
|
|
296
296
|
function stableOsUserId() {
|
|
297
297
|
try {
|
|
@@ -631,7 +631,7 @@ function collectLocalEnvInfo() {
|
|
|
631
631
|
os: `${process.platform} ${process.arch}`,
|
|
632
632
|
node_version: process.version,
|
|
633
633
|
home_dir: homeDir,
|
|
634
|
-
agent_runtime:
|
|
634
|
+
agent_runtime: _chunkDK5Y5BD3js.detectAgentRuntime.call(void 0, )
|
|
635
635
|
};
|
|
636
636
|
const env = process.env;
|
|
637
637
|
const optional = {
|
|
@@ -878,9 +878,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
878
878
|
}
|
|
879
879
|
function withAgentCommandContext(value) {
|
|
880
880
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
881
|
-
return
|
|
881
|
+
return _chunkDK5Y5BD3js.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
882
882
|
...valueRecord,
|
|
883
|
-
command_context:
|
|
883
|
+
command_context: _chunkMLQJVAVSjs.resolveCliCommandContext.call(void 0, )
|
|
884
884
|
} : value;
|
|
885
885
|
}
|
|
886
886
|
function printJson(value, fields) {
|
|
@@ -167,6 +167,7 @@ var PLAY_AUTHORING_BINDING_FIELDS = {
|
|
|
167
167
|
"compatibility",
|
|
168
168
|
"cron",
|
|
169
169
|
"inline",
|
|
170
|
+
"rateLimit",
|
|
170
171
|
"runtime",
|
|
171
172
|
"secrets",
|
|
172
173
|
"sqlListeners",
|
|
@@ -1371,6 +1372,22 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
|
|
|
1371
1372
|
description: "Play-level sandbox deadline. The default is 30m; use a static duration such as 90m or 2h, up to 4h.",
|
|
1372
1373
|
errorMessage: 'runtime.timeout must be a static duration such as "90m" or "2h".'
|
|
1373
1374
|
},
|
|
1375
|
+
"rateLimit.every": {
|
|
1376
|
+
schema: _typebox.Type.String({ pattern: "^\\d+\\s*[smh]$" }),
|
|
1377
|
+
fixtures: {
|
|
1378
|
+
valid: "5m",
|
|
1379
|
+
invalid: "5 minutes",
|
|
1380
|
+
absent: void 0,
|
|
1381
|
+
unresolved: { expression: "every" },
|
|
1382
|
+
edition1: "5m"
|
|
1383
|
+
},
|
|
1384
|
+
referenceType: "string",
|
|
1385
|
+
required: false,
|
|
1386
|
+
resolution: "static-required",
|
|
1387
|
+
issueCode: "play_authoring_binding_invalid",
|
|
1388
|
+
description: "Start at most one run per window, such as 30s, 5m, or 1h (10s to 24h).",
|
|
1389
|
+
errorMessage: 'rateLimit.every must be a static duration from "10s" to "24h", such as "5m".'
|
|
1390
|
+
},
|
|
1374
1391
|
"runtime.size": {
|
|
1375
1392
|
schema: _typebox.Type.Literal("standard"),
|
|
1376
1393
|
fixtures: {
|
|
@@ -1712,6 +1729,7 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
1712
1729
|
` inline?: ${cloudReferenceType("inline")};`,
|
|
1713
1730
|
` billing?: { maxCreditsPerRun?: ${cloudReferenceType("billing.maxCreditsPerRun")} };`,
|
|
1714
1731
|
` runtime?: { timeout?: ${cloudReferenceType("runtime.timeout")}; size?: ${cloudReferenceType("runtime.size")} };`,
|
|
1732
|
+
` rateLimit?: { every: ${cloudReferenceType("rateLimit.every")} };`,
|
|
1715
1733
|
` webhook?: { hmac?: { algorithm?: ${cloudReferenceType("bindings.webhook.hmac.algorithm")}; header?: ${cloudReferenceType("bindings.webhook.hmac.header")}; signaturePrefix?: ${cloudReferenceType("bindings.webhook.hmac.signaturePrefix")}; secretEnv: ${cloudReferenceType("bindings.webhook.hmac.secretEnv")} }; auth?: { type: ${cloudReferenceType("bindings.webhook.auth.type")}; headerFamily: ${cloudReferenceType("bindings.webhook.auth.headerFamily")}; signingSecrets: readonly ${cloudReferenceType("bindings.webhook.auth.signingSecrets[]")}[]; toleranceSeconds?: ${cloudReferenceType("bindings.webhook.auth.toleranceSeconds")} } };`,
|
|
1716
1734
|
` cron?: { schedule: ${cloudReferenceType("bindings.cron.schedule")}; timezone?: ${cloudReferenceType("bindings.cron.timezone")}; input?: PlayCronInput<TInput> };`,
|
|
1717
1735
|
" sqlListeners?: readonly SqlListenerDeclaration[];",
|
|
@@ -1736,7 +1754,7 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
1736
1754
|
`export type PlayAsyncCallOptions = { description: ${cloudReferenceType("ctx.runPlayAsync.options.description")} };`,
|
|
1737
1755
|
"declare const PLAY_RUN_ID_BRAND: unique symbol;",
|
|
1738
1756
|
"export type PlayRunId = string & { readonly [PLAY_RUN_ID_BRAND]: 'PlayRunId' };",
|
|
1739
|
-
"export type AsyncPlayRunRef = Readonly<{ runId: PlayRunId }>;",
|
|
1757
|
+
"export type AsyncPlayRunRef = Readonly<{ runId: PlayRunId; rateLimited?: { latestRunId: string; nextAllowedAt: string; message: string } }>;",
|
|
1740
1758
|
`export type RuntimeStepOptions = { semanticKey?: ${cloudReferenceType("ctx.step.semanticKey")}; staleAfterSeconds?: ${cloudReferenceType("ctx.step.staleAfterSeconds")} };`,
|
|
1741
1759
|
`export type FetchOptions = { staleAfterSeconds?: ${cloudReferenceType("ctx.fetch.staleAfterSeconds")}; transient?: boolean };`,
|
|
1742
1760
|
"export type CallFreshnessMetadata = { requestedStaleAfterSeconds: number | null; effectiveStaleAfterSeconds: number | null; source: 'executed' | 'operation_recovery' | 'reusable_result' | 'live_observation'; resultAgeMs: number; completedAt: number; operationReceiptKey?: string; unavailableReason?: string };",
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkNBPNYD54js = require('./chunk-NBPNYD54.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkNPJY5QRCjs = require('./chunk-NPJY5QRC.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkYRM5TPXLjs = require('./chunk-YRM5TPXL.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkMLQJVAVSjs = require('./chunk-MLQJVAVS.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkDK5Y5BD3js = require('./chunk-DK5Y5BD3.js');
|
|
21
21
|
|
|
22
22
|
// src/cli/compatibility-catalog.ts
|
|
23
23
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -44,7 +44,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
44
44
|
async function reportAutoUpdateEvent(input) {
|
|
45
45
|
let apiKey = "";
|
|
46
46
|
try {
|
|
47
|
-
apiKey =
|
|
47
|
+
apiKey = _chunkMLQJVAVSjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
48
48
|
} catch (e2) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
@@ -60,15 +60,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
60
60
|
headers: {
|
|
61
61
|
Authorization: `Bearer ${apiKey}`,
|
|
62
62
|
"Content-Type": "application/json",
|
|
63
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
63
|
+
"User-Agent": `deepline-ts-sdk/${_chunkDK5Y5BD3js.SDK_VERSION}`,
|
|
64
64
|
"X-Deepline-Client-Family": "sdk",
|
|
65
65
|
"X-Deepline-CLI-Family": "sdk",
|
|
66
|
-
"X-Deepline-CLI-Version":
|
|
67
|
-
"X-Deepline-SDK-Version":
|
|
66
|
+
"X-Deepline-CLI-Version": _chunkDK5Y5BD3js.SDK_VERSION,
|
|
67
|
+
"X-Deepline-SDK-Version": _chunkDK5Y5BD3js.SDK_VERSION
|
|
68
68
|
},
|
|
69
69
|
body: JSON.stringify({
|
|
70
70
|
event: input.event,
|
|
71
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
71
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkDK5Y5BD3js.SDK_VERSION,
|
|
72
72
|
target_version: input.response.latest,
|
|
73
73
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
74
74
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -87,13 +87,13 @@ function envTruthy(name) {
|
|
|
87
87
|
return value === "1" || value === "true" || value === "yes";
|
|
88
88
|
}
|
|
89
89
|
function shouldSkipSelfUpdate(policy) {
|
|
90
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
90
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkNBPNYD54js.shouldRunCliAutoUpdate.call(void 0, ) || _chunkNPJY5QRCjs.isCiEnvironment.call(void 0, );
|
|
91
91
|
}
|
|
92
92
|
function isDowngradeAutoUpdateResponse(response) {
|
|
93
93
|
const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
|
|
94
|
-
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) ||
|
|
94
|
+
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkDK5Y5BD3js.SDK_VERSION;
|
|
95
95
|
if (!target) return false;
|
|
96
|
-
return
|
|
96
|
+
return _chunkNBPNYD54js.compareUpdateVersions.call(void 0, target, current) < 0;
|
|
97
97
|
}
|
|
98
98
|
function relaunchCurrentCommand(plan, runtime = {}) {
|
|
99
99
|
return new Promise((resolve) => {
|
|
@@ -146,7 +146,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
146
146
|
}
|
|
147
147
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
148
148
|
const target = response.latest;
|
|
149
|
-
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ||
|
|
149
|
+
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkDK5Y5BD3js.SDK_VERSION;
|
|
150
150
|
process.stderr.write(
|
|
151
151
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
152
152
|
`
|
|
@@ -154,21 +154,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
154
154
|
return false;
|
|
155
155
|
}
|
|
156
156
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
157
|
-
const plan =
|
|
157
|
+
const plan = _chunkNBPNYD54js.resolveUpdatePlan.call(void 0, {
|
|
158
158
|
packageSpec,
|
|
159
159
|
requireVerifiedNpmOwnership: true,
|
|
160
160
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
161
161
|
});
|
|
162
|
-
if (!
|
|
162
|
+
if (!_chunkNBPNYD54js.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
163
163
|
return false;
|
|
164
164
|
}
|
|
165
165
|
if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
166
166
|
deferredAutoUpdate = async () => {
|
|
167
167
|
await applyAutoUpdate(response, baseUrl, plan, "next_command");
|
|
168
168
|
};
|
|
169
|
-
if (
|
|
169
|
+
if (_chunkYRM5TPXLjs.isJsonOutputMode.call(void 0, )) {
|
|
170
170
|
const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
|
|
171
|
-
|
|
171
|
+
_chunkYRM5TPXLjs.addJsonNotice.call(void 0, {
|
|
172
172
|
code: "sdk_update_queued",
|
|
173
173
|
message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
|
|
174
174
|
});
|
|
@@ -181,7 +181,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
181
181
|
return true;
|
|
182
182
|
}
|
|
183
183
|
async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
184
|
-
if (!
|
|
184
|
+
if (!_chunkNBPNYD54js.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
|
|
185
185
|
const autoUpdate = response.auto_update;
|
|
186
186
|
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";
|
|
187
187
|
process.stderr.write(
|
|
@@ -194,7 +194,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
194
194
|
event: "started",
|
|
195
195
|
installKind: plan.kind
|
|
196
196
|
});
|
|
197
|
-
const updateResult = await
|
|
197
|
+
const updateResult = await _chunkNBPNYD54js.runAutomaticUpdatePlan.call(void 0, plan);
|
|
198
198
|
if (updateResult.status === "skipped_previous_failure") {
|
|
199
199
|
void reportAutoUpdateEvent({
|
|
200
200
|
baseUrl,
|
|
@@ -245,7 +245,7 @@ var _crypto = require('crypto');
|
|
|
245
245
|
var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
|
|
246
246
|
var activeToolExecuteCommand = null;
|
|
247
247
|
function progressLine(line) {
|
|
248
|
-
if (!
|
|
248
|
+
if (!_chunkYRM5TPXLjs.isJsonOutputMode.call(void 0, )) console.error(line);
|
|
249
249
|
}
|
|
250
250
|
function beginToolExecuteCommand() {
|
|
251
251
|
if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
|
package/dist/cli/command-docs.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk6DTW6JNDjs = require('./chunk-6DTW6JND.js');
|
|
10
10
|
require('./chunk-COGTRVWW.js');
|
|
11
11
|
|
|
12
12
|
|
|
@@ -16,4 +16,4 @@ require('./chunk-COGTRVWW.js');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.CLI_DOC_SURFACE =
|
|
19
|
+
exports.CLI_DOC_SURFACE = _chunk6DTW6JNDjs.CLI_DOC_SURFACE; exports.COMMAND_DOCS = _chunk6DTW6JNDjs.COMMAND_DOCS; exports.commandDocKey = _chunk6DTW6JNDjs.commandDocKey; exports.helpDetailFromArgv = _chunk6DTW6JNDjs.helpDetailFromArgv; exports.renderActionExplanation = _chunk6DTW6JNDjs.renderActionExplanation; exports.renderCommandExplanation = _chunk6DTW6JNDjs.renderCommandExplanation; exports.renderDocText = _chunk6DTW6JNDjs.renderDocText;
|