deepline 0.3.451 → 0.3.453
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client.ts +65 -0
- package/dist/bundling-sources/sdk/src/http.ts +2 -1
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +63 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +5 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +49 -11
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +17 -2
- package/dist/cli/{auth-YLBWEMRW.mjs → auth-6CXS55CN.mjs} +4 -4
- package/dist/cli/auth-AICIA232.js +40 -0
- package/dist/cli/{billing-GWG5D3P6.js → billing-QC52XTAD.js} +87 -74
- package/dist/cli/{billing-DUFOEOPT.mjs → billing-SWLTV6PV.mjs} +18 -5
- package/dist/cli/{chunk-37CPEQBE.mjs → chunk-2LDU5BMG.mjs} +3 -3
- package/dist/cli/{chunk-JUCEEIEC.mjs → chunk-43HOSM2F.mjs} +1 -1
- package/dist/cli/{chunk-E7V5CRA2.mjs → chunk-6CTVXF6X.mjs} +8 -8
- package/dist/cli/{chunk-BJOVX7EB.mjs → chunk-7557D4FM.mjs} +2 -2
- package/dist/cli/chunk-BX343KU7.mjs +155 -0
- package/dist/cli/{chunk-7VRWERTM.js → chunk-DMTAFWMS.js} +84 -50
- package/dist/cli/{chunk-XLOXUW5Y.mjs → chunk-FS2RMEJ7.mjs} +1 -1
- package/dist/cli/{chunk-EJ6YI46S.js → chunk-HUDUN4AR.js} +2 -2
- package/dist/cli/{chunk-OKTCLFKM.mjs → chunk-IFBLLSGH.mjs} +5 -5
- package/dist/cli/{chunk-33EM4SMH.mjs → chunk-IWFI6FTJ.mjs} +4 -153
- package/dist/cli/{chunk-ZPV7DMAA.mjs → chunk-IXVABCNA.mjs} +1 -1
- package/dist/cli/{chunk-O3KVUHCG.js → chunk-JOF3B22H.js} +20 -20
- package/dist/cli/{chunk-6TFACCXN.js → chunk-KFKM5J2N.js} +2 -2
- package/dist/cli/{chunk-WLVGRU5A.mjs → chunk-KQD6EFPD.mjs} +2 -2
- package/dist/cli/{chunk-HSKLAPMD.js → chunk-MP35NE55.js} +26 -26
- package/dist/cli/chunk-NOHA3SZJ.js +155 -0
- package/dist/cli/{chunk-Z3DBS4IB.js → chunk-NSQZUUYB.js} +81 -81
- package/dist/cli/{chunk-BQQLTSGC.mjs → chunk-P4UQCYKH.mjs} +4 -4
- package/dist/cli/{chunk-CH2WDSBC.js → chunk-PJWXEUUH.js} +8 -8
- package/dist/cli/{chunk-L2IUGWV5.js → chunk-RG644LJU.js} +1 -1
- package/dist/cli/{chunk-5DUMNKQG.js → chunk-RNCIPLU5.js} +50 -50
- package/dist/cli/{chunk-WDOWAOYB.js → chunk-RTR2KUU6.js} +10 -10
- package/dist/cli/{chunk-4C7HPD57.mjs → chunk-SQUJHT7O.mjs} +1 -1
- package/dist/cli/{chunk-ZNDE2BTH.js → chunk-V6AZQ4JH.js} +16 -16
- package/dist/cli/{chunk-F2DW7DFE.js → chunk-V7S2RUVE.js} +8 -8
- package/dist/cli/{chunk-C4NPWUZY.js → chunk-VG6WESY7.js} +73 -222
- package/dist/cli/{chunk-6G6KX7I7.js → chunk-WTTHH2K3.js} +6 -6
- package/dist/cli/{chunk-JRPNCMMN.js → chunk-WWZ4YJ6J.js} +35 -35
- package/dist/cli/{chunk-PJYTV24I.mjs → chunk-X2LUT22I.mjs} +2 -2
- package/dist/cli/{chunk-YXXIFMXI.mjs → chunk-XH4QC5ZX.mjs} +2 -2
- package/dist/cli/{chunk-3HT47QPJ.mjs → chunk-XNN3OTGT.mjs} +2 -2
- package/dist/cli/{chunk-LPPAJJJN.mjs → chunk-XV4463XW.mjs} +35 -1
- package/dist/cli/{chunk-TFCLUWDQ.js → chunk-YU6IE234.js} +6 -6
- package/dist/cli/{chunk-RFPP4Q66.mjs → chunk-ZVBLECZX.mjs} +3 -3
- package/dist/cli/{csv-RL7WQD6Y.mjs → csv-FON4ZQKC.mjs} +3 -3
- package/dist/cli/{csv-4CHXZQXO.js → csv-WIQB5XWZ.js} +12 -12
- package/dist/cli/{db-ZDBAWV7B.mjs → db-3KA62DOQ.mjs} +4 -4
- package/dist/cli/{db-MRI5IM2A.js → db-VMDDODCN.js} +25 -25
- package/dist/cli/{describe-RRQUUJQ3.mjs → describe-LGDK77QI.mjs} +13 -12
- package/dist/cli/{describe-2FYKXM5B.js → describe-NTAAHCCX.js} +17 -16
- package/dist/cli/describe-core.d.mts +1 -1
- package/dist/cli/describe-core.d.ts +1 -1
- package/dist/cli/{executions-KDBD47A5.js → executions-OT2KNJDO.js} +6 -6
- package/dist/cli/{executions-RJL76TJS.mjs → executions-TM6AMTQ7.mjs} +4 -4
- package/dist/cli/{feedback-2CE24NHD.js → feedback-4HQGY3TO.js} +7 -7
- package/dist/cli/{feedback-KOYLXHYE.mjs → feedback-HWLUVFE2.mjs} +3 -3
- package/dist/cli/git-QIZWO5BA.js +24 -0
- package/dist/cli/{git-RDUHU6L6.mjs → git-TDJVSPE6.mjs} +4 -4
- package/dist/cli/index.js +133 -131
- package/dist/cli/index.mjs +39 -37
- package/dist/cli/{legacy-noops-7FOMGBMN.js → legacy-noops-XH3FDLWT.js} +7 -7
- package/dist/cli/{legacy-noops-4HS2LYP6.mjs → legacy-noops-YB2PES43.mjs} +4 -4
- package/dist/cli/{monitors-IJXNK5BL.js → monitors-E3QFEJKF.js} +276 -124
- package/dist/cli/{monitors-JLBTNBVU.mjs → monitors-KQDDMSDR.mjs} +156 -4
- package/dist/cli/{org-OWP6K4AA.mjs → org-7X2C7YKA.mjs} +4 -4
- package/dist/cli/{org-JL7SW6VY.js → org-PMTLR7VP.js} +66 -66
- package/dist/cli/{play-FNOVKU74.mjs → play-7FNEPSVR.mjs} +11 -10
- package/dist/cli/{play-LLNZWHT6.js → play-RH22Z3D6.js} +284 -283
- package/dist/cli/{providers-WBOEOKE7.mjs → providers-HOEDJNUK.mjs} +4 -4
- package/dist/cli/{providers-E4XIEUC7.js → providers-X5NY5IQH.js} +7 -7
- package/dist/cli/{quickstart-3FUHKGEY.js → quickstart-FI4A6VTV.js} +5 -5
- package/dist/cli/{quickstart-6G5G3BVA.mjs → quickstart-NCL7P2US.mjs} +3 -3
- package/dist/cli/search-6FUMJBIY.js +30 -0
- package/dist/cli/{search-CNMB4Z6M.mjs → search-UHT7ZNPO.mjs} +5 -5
- package/dist/cli/{secrets-5FY5APVK.mjs → secrets-D4ZB5RKB.mjs} +4 -4
- package/dist/cli/{secrets-BDSWOYAT.js → secrets-TT6J3SZJ.js} +13 -13
- package/dist/cli/{sessions-PMIKVPQN.mjs → sessions-HRLJ6SLL.mjs} +4 -4
- package/dist/cli/{sessions-B7T2CHYK.js → sessions-SRQQZMM7.js} +5 -5
- package/dist/cli/{settings-RXQJRRLR.js → settings-EJIKXLC7.js} +76 -75
- package/dist/cli/{settings-4TAYLTPR.mjs → settings-PJJYPWU3.mjs} +9 -8
- package/dist/cli/{setup-ZTMETGSO.js → setup-3FL77Z33.js} +43 -42
- package/dist/cli/{setup-LVUISLVO.mjs → setup-DNI6ENFD.mjs} +8 -7
- package/dist/cli/skills-DEKOSL7F.js +30 -0
- package/dist/cli/{skills-NSJ43Z5Q.mjs → skills-FO7MY2OE.mjs} +6 -5
- package/dist/cli/tools-E6XRW6PW.js +45 -0
- package/dist/cli/{tools-CFCKIGDY.mjs → tools-F72WONN3.mjs} +13 -12
- package/dist/cli/update-6M3CAS4T.js +32 -0
- package/dist/cli/{update-HYOCBXJO.mjs → update-JZU33TC5.mjs} +8 -7
- package/dist/cli/{workflow-U6S4SWTF.js → workflow-BGKC73V2.js} +15 -15
- package/dist/cli/{workflow-RKX45RJ4.mjs → workflow-PQYQXQPH.mjs} +5 -5
- package/dist/{client-CPRaigLC.d.ts → client-D6XhrO0f.d.ts} +26 -1
- package/dist/{client-DstDI5TV.d.mts → client-mRA_esYI.d.mts} +26 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +82 -80
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +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/package.json +1 -1
- package/dist/cli/auth-WPQBEOES.js +0 -40
- package/dist/cli/git-DZ5GROPH.js +0 -24
- package/dist/cli/search-4ECC773X.js +0 -30
- package/dist/cli/skills-MIENPTOD.js +0 -29
- package/dist/cli/tools-CXJO5XSH.js +0 -44
- package/dist/cli/update-B2LQGEXF.js +0 -31
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
npmSupportsAllowScripts,
|
|
3
3
|
readNpmVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-43HOSM2F.mjs";
|
|
5
5
|
import {
|
|
6
6
|
runSkillsCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2LDU5BMG.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveShellSpawn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IWFI6FTJ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
printCommandEnvelope
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FS2RMEJ7.mjs";
|
|
14
14
|
import {
|
|
15
15
|
autoDetectBaseUrl
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-X2LUT22I.mjs";
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/update.ts
|
|
19
19
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
getActiveCliProgress
|
|
3
|
+
} from "./chunk-BX343KU7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_SKILL_AGENTS,
|
|
6
6
|
KNOWN_SKILL_AGENTS,
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
sdkCliStateDirPath,
|
|
18
18
|
skillsAgentPathSegment,
|
|
19
19
|
writeSdkSkillsLocalVersion
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-X2LUT22I.mjs";
|
|
21
21
|
import {
|
|
22
22
|
DeeplineError
|
|
23
23
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
24
24
|
import {
|
|
25
25
|
SDK_RELEASE
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-IXVABCNA.mjs";
|
|
27
27
|
|
|
28
28
|
// src/compat.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -400,153 +400,6 @@ function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
|
400
400
|
return rendered;
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
// src/cli/progress.ts
|
|
404
|
-
import { Worker } from "worker_threads";
|
|
405
|
-
var CliProgress = class {
|
|
406
|
-
lastMessage = null;
|
|
407
|
-
interactive = Boolean(process.stderr.isTTY);
|
|
408
|
-
grey = "\x1B[90m";
|
|
409
|
-
cyan = "\x1B[36m";
|
|
410
|
-
dim = "\x1B[2m";
|
|
411
|
-
reset = "\x1B[0m";
|
|
412
|
-
worker = null;
|
|
413
|
-
enabled;
|
|
414
|
-
// --json output is one JSON document: progress never renders under it.
|
|
415
|
-
constructor(enabled) {
|
|
416
|
-
this.enabled = enabled && !isJsonOutputMode();
|
|
417
|
-
}
|
|
418
|
-
phase(message) {
|
|
419
|
-
if (!this.enabled || this.lastMessage === message) {
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
if (this.interactive && this.lastMessage) {
|
|
423
|
-
this.settle("\u2713");
|
|
424
|
-
}
|
|
425
|
-
this.lastMessage = message;
|
|
426
|
-
if (!this.interactive) {
|
|
427
|
-
process.stderr.write(`${message}
|
|
428
|
-
`);
|
|
429
|
-
return;
|
|
430
|
-
}
|
|
431
|
-
this.ensureWorker();
|
|
432
|
-
this.worker?.postMessage({ type: "phase", message });
|
|
433
|
-
}
|
|
434
|
-
complete() {
|
|
435
|
-
this.settle("\u2713");
|
|
436
|
-
}
|
|
437
|
-
fail() {
|
|
438
|
-
this.settle("\u2717");
|
|
439
|
-
}
|
|
440
|
-
writeLogLine(line) {
|
|
441
|
-
if (isJsonOutputMode()) return;
|
|
442
|
-
if (!this.enabled) {
|
|
443
|
-
process.stderr.write(`${line}
|
|
444
|
-
`);
|
|
445
|
-
return;
|
|
446
|
-
}
|
|
447
|
-
const message = this.interactive ? `${this.cyan}[logs]${this.reset} ${this.dim}${line}${this.reset}` : `[logs] ${line}`;
|
|
448
|
-
if (!this.interactive) {
|
|
449
|
-
process.stderr.write(`${message}
|
|
450
|
-
`);
|
|
451
|
-
return;
|
|
452
|
-
}
|
|
453
|
-
const activeMessage = this.lastMessage;
|
|
454
|
-
this.worker?.terminate().catch(() => void 0);
|
|
455
|
-
this.worker = null;
|
|
456
|
-
process.stderr.write(`\r\x1B[2K${message}
|
|
457
|
-
`);
|
|
458
|
-
if (activeMessage) {
|
|
459
|
-
this.startWorker().postMessage({ type: "phase", message: activeMessage });
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
writeLine(line, stream = process.stderr) {
|
|
463
|
-
if (!this.enabled || !this.interactive) {
|
|
464
|
-
stream.write(`${line}
|
|
465
|
-
`);
|
|
466
|
-
return;
|
|
467
|
-
}
|
|
468
|
-
const activeMessage = this.lastMessage;
|
|
469
|
-
this.worker?.terminate().catch(() => void 0);
|
|
470
|
-
this.worker = null;
|
|
471
|
-
stream.write(`\r\x1B[2K${line}
|
|
472
|
-
`);
|
|
473
|
-
if (activeMessage) {
|
|
474
|
-
this.startWorker().postMessage({ type: "phase", message: activeMessage });
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
settle(mark) {
|
|
478
|
-
if (!this.enabled || !this.lastMessage) {
|
|
479
|
-
return;
|
|
480
|
-
}
|
|
481
|
-
if (this.interactive) {
|
|
482
|
-
this.worker?.terminate().catch(() => void 0);
|
|
483
|
-
this.worker = null;
|
|
484
|
-
process.stderr.write(
|
|
485
|
-
`\r\x1B[2K${this.grey}${mark} ${this.lastMessage}${this.reset}
|
|
486
|
-
`
|
|
487
|
-
);
|
|
488
|
-
}
|
|
489
|
-
this.lastMessage = null;
|
|
490
|
-
}
|
|
491
|
-
ensureWorker() {
|
|
492
|
-
this.startWorker();
|
|
493
|
-
}
|
|
494
|
-
startWorker() {
|
|
495
|
-
if (this.worker) {
|
|
496
|
-
return this.worker;
|
|
497
|
-
}
|
|
498
|
-
this.worker = new Worker(
|
|
499
|
-
`
|
|
500
|
-
const { parentPort } = require('node:worker_threads');
|
|
501
|
-
const { writeSync } = require('node:fs');
|
|
502
|
-
const frames = ['\u2014', '\\\\', '|', '/'];
|
|
503
|
-
const grey = '\\x1b[90m';
|
|
504
|
-
const reset = '\\x1b[0m';
|
|
505
|
-
let message = '';
|
|
506
|
-
let frameIndex = 0;
|
|
507
|
-
let timer = null;
|
|
508
|
-
function render() {
|
|
509
|
-
if (!message) return;
|
|
510
|
-
const frame = frames[frameIndex % frames.length] || '\u2014';
|
|
511
|
-
frameIndex += 1;
|
|
512
|
-
writeSync(2, '\\r\\x1b[2K' + grey + frame + ' ' + message + reset);
|
|
513
|
-
}
|
|
514
|
-
parentPort.on('message', (event) => {
|
|
515
|
-
if (event.type === 'phase') {
|
|
516
|
-
message = String(event.message || '');
|
|
517
|
-
frameIndex = 0;
|
|
518
|
-
render();
|
|
519
|
-
if (!timer) {
|
|
520
|
-
timer = setInterval(render, 120);
|
|
521
|
-
timer.unref && timer.unref();
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
if (event.type === 'stop') {
|
|
525
|
-
if (timer) clearInterval(timer);
|
|
526
|
-
timer = null;
|
|
527
|
-
writeSync(2, '\\r\\x1b[2K');
|
|
528
|
-
}
|
|
529
|
-
});
|
|
530
|
-
`,
|
|
531
|
-
{ eval: true }
|
|
532
|
-
);
|
|
533
|
-
this.worker.unref();
|
|
534
|
-
return this.worker;
|
|
535
|
-
}
|
|
536
|
-
};
|
|
537
|
-
var activeProgress = null;
|
|
538
|
-
function setActiveCliProgress(progress) {
|
|
539
|
-
activeProgress = progress;
|
|
540
|
-
}
|
|
541
|
-
function getActiveCliProgress() {
|
|
542
|
-
return activeProgress;
|
|
543
|
-
}
|
|
544
|
-
function createCliProgress(enabled) {
|
|
545
|
-
const progress = new CliProgress(enabled);
|
|
546
|
-
setActiveCliProgress(progress);
|
|
547
|
-
return progress;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
403
|
// src/cli/windows-arg-escape.ts
|
|
551
404
|
import { statSync } from "fs";
|
|
552
405
|
import { win32 } from "path";
|
|
@@ -2085,8 +1938,6 @@ export {
|
|
|
2085
1938
|
DEFAULT_SDK_SKILL_NAMES,
|
|
2086
1939
|
LEGACY_SKILL_NAMES_TO_REMOVE,
|
|
2087
1940
|
skillsSourceUrl,
|
|
2088
|
-
getActiveCliProgress,
|
|
2089
|
-
createCliProgress,
|
|
2090
1941
|
resolveShellSpawn,
|
|
2091
1942
|
isFailureReportingDisabled,
|
|
2092
1943
|
redactFailureText,
|
|
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
|
|
|
49
49
|
// getters keep their established compatibility behavior.
|
|
50
50
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
51
51
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
52
|
-
version: "0.3.
|
|
52
|
+
version: "0.3.453",
|
|
53
53
|
updateSummary: {
|
|
54
54
|
introducedIn: "0.3.90",
|
|
55
55
|
summary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release."
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkV6AZQ4JHjs = require('./chunk-V6AZQ4JH.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkVG6WESY7js = require('./chunk-VG6WESY7.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkWTTHH2K3js = require('./chunk-WTTHH2K3.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkRTR2KUU6js = require('./chunk-RTR2KUU6.js');
|
|
19
19
|
|
|
20
20
|
// src/cli/compatibility-catalog.ts
|
|
21
21
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -42,7 +42,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
42
42
|
async function reportAutoUpdateEvent(input) {
|
|
43
43
|
let apiKey = "";
|
|
44
44
|
try {
|
|
45
|
-
apiKey =
|
|
45
|
+
apiKey = _chunkRTR2KUU6js.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
46
46
|
} catch (e2) {
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
@@ -58,15 +58,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
58
58
|
headers: {
|
|
59
59
|
Authorization: `Bearer ${apiKey}`,
|
|
60
60
|
"Content-Type": "application/json",
|
|
61
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
61
|
+
"User-Agent": `deepline-ts-sdk/${_chunkRTR2KUU6js.SDK_VERSION}`,
|
|
62
62
|
"X-Deepline-Client-Family": "sdk",
|
|
63
63
|
"X-Deepline-CLI-Family": "sdk",
|
|
64
|
-
"X-Deepline-CLI-Version":
|
|
65
|
-
"X-Deepline-SDK-Version":
|
|
64
|
+
"X-Deepline-CLI-Version": _chunkRTR2KUU6js.SDK_VERSION,
|
|
65
|
+
"X-Deepline-SDK-Version": _chunkRTR2KUU6js.SDK_VERSION
|
|
66
66
|
},
|
|
67
67
|
body: JSON.stringify({
|
|
68
68
|
event: input.event,
|
|
69
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
69
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkRTR2KUU6js.SDK_VERSION,
|
|
70
70
|
target_version: input.response.latest,
|
|
71
71
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
72
72
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -85,13 +85,13 @@ function envTruthy(name) {
|
|
|
85
85
|
return value === "1" || value === "true" || value === "yes";
|
|
86
86
|
}
|
|
87
87
|
function shouldSkipSelfUpdate(policy) {
|
|
88
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
88
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkV6AZQ4JHjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkVG6WESY7js.isCiEnvironment.call(void 0, );
|
|
89
89
|
}
|
|
90
90
|
function isDowngradeAutoUpdateResponse(response) {
|
|
91
91
|
const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
|
|
92
|
-
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) ||
|
|
92
|
+
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkRTR2KUU6js.SDK_VERSION;
|
|
93
93
|
if (!target) return false;
|
|
94
|
-
return
|
|
94
|
+
return _chunkV6AZQ4JHjs.compareUpdateVersions.call(void 0, target, current) < 0;
|
|
95
95
|
}
|
|
96
96
|
function relaunchCurrentCommand(plan, runtime = {}) {
|
|
97
97
|
return new Promise((resolve) => {
|
|
@@ -144,7 +144,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
144
144
|
}
|
|
145
145
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
146
146
|
const target = response.latest;
|
|
147
|
-
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ||
|
|
147
|
+
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkRTR2KUU6js.SDK_VERSION;
|
|
148
148
|
process.stderr.write(
|
|
149
149
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
150
150
|
`
|
|
@@ -152,21 +152,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
152
152
|
return false;
|
|
153
153
|
}
|
|
154
154
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
155
|
-
const plan =
|
|
155
|
+
const plan = _chunkV6AZQ4JHjs.resolveUpdatePlan.call(void 0, {
|
|
156
156
|
packageSpec,
|
|
157
157
|
requireVerifiedNpmOwnership: true,
|
|
158
158
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
159
159
|
});
|
|
160
|
-
if (!
|
|
160
|
+
if (!_chunkV6AZQ4JHjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
161
161
|
return false;
|
|
162
162
|
}
|
|
163
163
|
if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
164
164
|
deferredAutoUpdate = async () => {
|
|
165
165
|
await applyAutoUpdate(response, baseUrl, plan, "next_command");
|
|
166
166
|
};
|
|
167
|
-
if (
|
|
167
|
+
if (_chunkWTTHH2K3js.isJsonOutputMode.call(void 0, )) {
|
|
168
168
|
const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
|
|
169
|
-
|
|
169
|
+
_chunkWTTHH2K3js.addJsonNotice.call(void 0, {
|
|
170
170
|
code: "sdk_update_queued",
|
|
171
171
|
message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
|
|
172
172
|
});
|
|
@@ -179,7 +179,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
179
179
|
return true;
|
|
180
180
|
}
|
|
181
181
|
async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
182
|
-
if (!
|
|
182
|
+
if (!_chunkV6AZQ4JHjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
|
|
183
183
|
const autoUpdate = response.auto_update;
|
|
184
184
|
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";
|
|
185
185
|
process.stderr.write(
|
|
@@ -192,7 +192,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
192
192
|
event: "started",
|
|
193
193
|
installKind: plan.kind
|
|
194
194
|
});
|
|
195
|
-
const updateResult = await
|
|
195
|
+
const updateResult = await _chunkV6AZQ4JHjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
196
196
|
if (updateResult.status === "skipped_previous_failure") {
|
|
197
197
|
void reportAutoUpdateEvent({
|
|
198
198
|
baseUrl,
|
|
@@ -243,7 +243,7 @@ var _crypto = require('crypto');
|
|
|
243
243
|
var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
|
|
244
244
|
var activeToolExecuteCommand = null;
|
|
245
245
|
function progressLine(line) {
|
|
246
|
-
if (!
|
|
246
|
+
if (!_chunkWTTHH2K3js.isJsonOutputMode.call(void 0, )) console.error(line);
|
|
247
247
|
}
|
|
248
248
|
function beginToolExecuteCommand() {
|
|
249
249
|
if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
|
|
@@ -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 _chunkWTTHH2K3js = require('./chunk-WTTHH2K3.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
|
+
_chunkWTTHH2K3js.writeRawStderr.call(void 0, `[cli-trace] ${JSON.stringify(payload)}
|
|
37
37
|
`);
|
|
38
38
|
}
|
|
39
39
|
async function traceCliSpan(phase, fields, run) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
printCommandEnvelope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FS2RMEJ7.mjs";
|
|
5
5
|
import {
|
|
6
6
|
agentSessionIdFromEnvironment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X2LUT22I.mjs";
|
|
8
8
|
|
|
9
9
|
// src/cli/commands/sessions.ts
|
|
10
10
|
import {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkWTTHH2K3js = require('./chunk-WTTHH2K3.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkRTR2KUU6js = require('./chunk-RTR2KUU6.js');
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -32,11 +32,11 @@ function renderDeployment(deployment) {
|
|
|
32
32
|
return `${deployment.id} ${source} (${kind}) - ${deployment.status}${suffix}`;
|
|
33
33
|
}
|
|
34
34
|
async function handleList(options) {
|
|
35
|
-
const { http } =
|
|
35
|
+
const { http } = _chunkWTTHH2K3js.getAuthedHttpClient.call(void 0, );
|
|
36
36
|
const payload = await http.get(
|
|
37
37
|
`/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
|
|
38
38
|
);
|
|
39
|
-
|
|
39
|
+
_chunkWTTHH2K3js.printCommandEnvelope.call(void 0,
|
|
40
40
|
{
|
|
41
41
|
projects: payload.projects,
|
|
42
42
|
count: payload.projects.length,
|
|
@@ -73,7 +73,7 @@ function describeInstallationStatus(installation) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
async function handleStatus(options) {
|
|
76
|
-
const { http } =
|
|
76
|
+
const { http } = _chunkWTTHH2K3js.getAuthedHttpClient.call(void 0, );
|
|
77
77
|
const payload = await http.get("/api/v2/github/installation");
|
|
78
78
|
const installation = payload.installation;
|
|
79
79
|
const others = (_nullishCoalesce(payload.installations, () => ( []))).filter(
|
|
@@ -136,7 +136,7 @@ async function handleStatus(options) {
|
|
|
136
136
|
)
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
_chunkWTTHH2K3js.printCommandEnvelope.call(void 0,
|
|
140
140
|
{
|
|
141
141
|
installation,
|
|
142
142
|
installations: _nullishCoalesce(payload.installations, () => ( [])),
|
|
@@ -147,10 +147,10 @@ async function handleStatus(options) {
|
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
149
|
async function handleRepos(options) {
|
|
150
|
-
const { http } =
|
|
150
|
+
const { http } = _chunkWTTHH2K3js.getAuthedHttpClient.call(void 0, );
|
|
151
151
|
const query = options.installation ? `?installationId=${encodeURIComponent(options.installation)}` : "";
|
|
152
152
|
const payload = await http.get(`/api/v2/github/repos${query}`);
|
|
153
|
-
|
|
153
|
+
_chunkWTTHH2K3js.printCommandEnvelope.call(void 0,
|
|
154
154
|
{
|
|
155
155
|
installation: payload.installation,
|
|
156
156
|
repositories: payload.repositories,
|
|
@@ -171,7 +171,7 @@ async function handleRepos(options) {
|
|
|
171
171
|
}
|
|
172
172
|
async function resolveRepoId(repo, installation) {
|
|
173
173
|
if (/^\d+$/.test(repo)) return Number(repo);
|
|
174
|
-
const { http } =
|
|
174
|
+
const { http } = _chunkWTTHH2K3js.getAuthedHttpClient.call(void 0, );
|
|
175
175
|
const query = installation ? `?installationId=${encodeURIComponent(installation)}` : "";
|
|
176
176
|
const payload = await http.get(
|
|
177
177
|
`/api/v2/github/repos${query}`
|
|
@@ -188,7 +188,7 @@ async function resolveRepoId(repo, installation) {
|
|
|
188
188
|
}
|
|
189
189
|
async function handleLink(repo, options) {
|
|
190
190
|
const repoId = await resolveRepoId(repo, options.installation);
|
|
191
|
-
const { http } =
|
|
191
|
+
const { http } = _chunkWTTHH2K3js.getAuthedHttpClient.call(void 0, );
|
|
192
192
|
const payload = await http.post("/api/v2/play-projects", {
|
|
193
193
|
repoId,
|
|
194
194
|
...options.installation !== void 0 ? { installationId: options.installation } : {},
|
|
@@ -197,7 +197,7 @@ async function handleLink(repo, options) {
|
|
|
197
197
|
...options.branch !== void 0 ? { productionBranch: options.branch } : {},
|
|
198
198
|
...options.prChecks !== void 0 ? { checkOnPullRequest: options.prChecks } : {}
|
|
199
199
|
});
|
|
200
|
-
|
|
200
|
+
_chunkWTTHH2K3js.printCommandEnvelope.call(void 0,
|
|
201
201
|
{
|
|
202
202
|
project: payload.project,
|
|
203
203
|
render: {
|
|
@@ -220,11 +220,11 @@ async function handleLink(repo, options) {
|
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
222
|
async function handleGet(id, options) {
|
|
223
|
-
const { http } =
|
|
223
|
+
const { http } = _chunkWTTHH2K3js.getAuthedHttpClient.call(void 0, );
|
|
224
224
|
const payload = await http.get(
|
|
225
225
|
`/api/v2/play-projects/${encodeURIComponent(id)}`
|
|
226
226
|
);
|
|
227
|
-
|
|
227
|
+
_chunkWTTHH2K3js.printCommandEnvelope.call(void 0,
|
|
228
228
|
{
|
|
229
229
|
project: payload.project,
|
|
230
230
|
render: {
|
|
@@ -240,7 +240,7 @@ async function handleGet(id, options) {
|
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
242
|
async function handleSet(id, options) {
|
|
243
|
-
const { http } =
|
|
243
|
+
const { http } = _chunkWTTHH2K3js.getAuthedHttpClient.call(void 0, );
|
|
244
244
|
const payload = await http.patch(
|
|
245
245
|
`/api/v2/play-projects/${encodeURIComponent(id)}`,
|
|
246
246
|
{
|
|
@@ -251,7 +251,7 @@ async function handleSet(id, options) {
|
|
|
251
251
|
...options.disabled !== void 0 ? { disabled: options.disabled } : {}
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
|
-
|
|
254
|
+
_chunkWTTHH2K3js.printCommandEnvelope.call(void 0,
|
|
255
255
|
{
|
|
256
256
|
project: payload.project,
|
|
257
257
|
render: {
|
|
@@ -264,9 +264,9 @@ async function handleSet(id, options) {
|
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
async function handleUnlink(id, options) {
|
|
267
|
-
const { http } =
|
|
267
|
+
const { http } = _chunkWTTHH2K3js.getAuthedHttpClient.call(void 0, );
|
|
268
268
|
await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
|
|
269
|
-
|
|
269
|
+
_chunkWTTHH2K3js.printCommandEnvelope.call(void 0,
|
|
270
270
|
{
|
|
271
271
|
ok: true,
|
|
272
272
|
id,
|
|
@@ -286,10 +286,10 @@ async function handleUnlink(id, options) {
|
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
288
|
async function handleConnect(options) {
|
|
289
|
-
const baseUrl =
|
|
289
|
+
const baseUrl = _chunkRTR2KUU6js.resolveBaseUrlOnly.call(void 0, );
|
|
290
290
|
const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
|
|
291
|
-
const opened =
|
|
292
|
-
|
|
291
|
+
const opened = _chunkWTTHH2K3js.openInBrowser.call(void 0, connectUrl);
|
|
292
|
+
_chunkWTTHH2K3js.printCommandEnvelope.call(void 0,
|
|
293
293
|
{
|
|
294
294
|
connectUrl,
|
|
295
295
|
browser: opened,
|
|
@@ -311,7 +311,7 @@ async function handleConnect(options) {
|
|
|
311
311
|
);
|
|
312
312
|
}
|
|
313
313
|
async function handleDeploymentsList(options) {
|
|
314
|
-
const { http } =
|
|
314
|
+
const { http } = _chunkWTTHH2K3js.getAuthedHttpClient.call(void 0, );
|
|
315
315
|
const query = new URLSearchParams();
|
|
316
316
|
if (options.repo) query.set("projectId", options.repo);
|
|
317
317
|
if (options.limit) query.set("limit", options.limit);
|
|
@@ -319,7 +319,7 @@ async function handleDeploymentsList(options) {
|
|
|
319
319
|
const payload = await http.get(
|
|
320
320
|
`/api/v2/deployments${suffix}`
|
|
321
321
|
);
|
|
322
|
-
|
|
322
|
+
_chunkWTTHH2K3js.printCommandEnvelope.call(void 0,
|
|
323
323
|
{
|
|
324
324
|
deployments: payload.deployments,
|
|
325
325
|
count: payload.deployments.length,
|
|
@@ -363,12 +363,12 @@ function renderDeploymentMonitorLines(results) {
|
|
|
363
363
|
]);
|
|
364
364
|
}
|
|
365
365
|
async function handleDeploymentGet(id, options) {
|
|
366
|
-
const { http } =
|
|
366
|
+
const { http } = _chunkWTTHH2K3js.getAuthedHttpClient.call(void 0, );
|
|
367
367
|
const payload = await http.get(`/api/v2/deployments/${encodeURIComponent(id)}`);
|
|
368
368
|
const playLines = renderDeploymentPlayLines(payload.deployment.results);
|
|
369
369
|
const monitorLines = renderDeploymentMonitorLines(payload.deployment.results);
|
|
370
370
|
const repository = _nullishCoalesce(_optionalChain([payload, 'access', _10 => _10.project, 'optionalAccess', _11 => _11.repoFullName]), () => ( payload.deployment.repoFullName));
|
|
371
|
-
|
|
371
|
+
_chunkWTTHH2K3js.printCommandEnvelope.call(void 0,
|
|
372
372
|
{
|
|
373
373
|
deployment: payload.deployment,
|
|
374
374
|
project: payload.project,
|
|
@@ -387,9 +387,9 @@ async function handleDeploymentGet(id, options) {
|
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
389
|
async function handleDeploymentCancel(id, options) {
|
|
390
|
-
const { http } =
|
|
390
|
+
const { http } = _chunkWTTHH2K3js.getAuthedHttpClient.call(void 0, );
|
|
391
391
|
const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
|
|
392
|
-
|
|
392
|
+
_chunkWTTHH2K3js.printCommandEnvelope.call(void 0,
|
|
393
393
|
{
|
|
394
394
|
cancelled: payload.cancelled,
|
|
395
395
|
deployment: payload.deployment,
|