@sleds/cli 0.1.61 → 0.1.63
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/sleds.mjs +48 -23
- package/package.json +1 -1
package/dist/sleds.mjs
CHANGED
|
@@ -3632,7 +3632,7 @@ An engine (or you) takes a ready node with \`sled {take: "${key}/<key>"}\`; Run
|
|
|
3632
3632
|
text: "Show the person the graph as text and ask for a yes; then call route again with the same nodes and confirm: true. With nobody to ask (a planning session), call again with propose: true instead.",
|
|
3633
3633
|
isError: true
|
|
3634
3634
|
};
|
|
3635
|
-
const r = await ctx.client.get(`/proxy/route?q=${encodeURIComponent(q)}`);
|
|
3635
|
+
const r = await ctx.client.get(`/proxy/route?q=${encodeURIComponent(q)}&draft=1`);
|
|
3636
3636
|
if (!r)
|
|
3637
3637
|
return UNREACHABLE;
|
|
3638
3638
|
if (r.ok === false)
|
|
@@ -6821,10 +6821,19 @@ var init_deploys = __esm(() => {
|
|
|
6821
6821
|
SERVICE_RE = /^[A-Za-z0-9][A-Za-z0-9_.-]{0,39}$/;
|
|
6822
6822
|
});
|
|
6823
6823
|
|
|
6824
|
+
// ../../packages/shared/src/deploys/series.ts
|
|
6825
|
+
var DAY_MS4, WEEK_MS2;
|
|
6826
|
+
var init_series = __esm(() => {
|
|
6827
|
+
init_metrics();
|
|
6828
|
+
DAY_MS4 = 24 * 60 * 60 * 1000;
|
|
6829
|
+
WEEK_MS2 = 7 * DAY_MS4;
|
|
6830
|
+
});
|
|
6831
|
+
|
|
6824
6832
|
// ../../packages/shared/src/deploys/stability.ts
|
|
6825
6833
|
var init_stability = __esm(() => {
|
|
6826
6834
|
init_outcome();
|
|
6827
6835
|
init_metrics();
|
|
6836
|
+
init_series();
|
|
6828
6837
|
});
|
|
6829
6838
|
|
|
6830
6839
|
// ../../packages/shared/src/newrelic/newrelic.ts
|
|
@@ -8343,6 +8352,7 @@ var init_src = __esm(() => {
|
|
|
8343
8352
|
init_stability();
|
|
8344
8353
|
init_batchSize();
|
|
8345
8354
|
init_report();
|
|
8355
|
+
init_series();
|
|
8346
8356
|
init_sentry();
|
|
8347
8357
|
init_newrelic();
|
|
8348
8358
|
init_musher();
|
|
@@ -8806,6 +8816,7 @@ function parseRun(v) {
|
|
|
8806
8816
|
} : {},
|
|
8807
8817
|
...v.pr.clear === true ? { clear: true } : {},
|
|
8808
8818
|
...v.pr.queued === true ? { queued: true } : {},
|
|
8819
|
+
...v.pr.autoMerge === true ? { autoMerge: true } : {},
|
|
8809
8820
|
...typeof v.pr.ci === "string" ? { ci: v.pr.ci } : {},
|
|
8810
8821
|
...typeof v.pr.review === "string" ? { review: v.pr.review } : {},
|
|
8811
8822
|
...typeof v.pr.posted === "string" ? { posted: v.pr.posted } : {},
|
|
@@ -9112,6 +9123,7 @@ init_period();
|
|
|
9112
9123
|
init_stability();
|
|
9113
9124
|
init_batchSize();
|
|
9114
9125
|
init_report();
|
|
9126
|
+
init_series();
|
|
9115
9127
|
init_sentry();
|
|
9116
9128
|
init_newrelic();
|
|
9117
9129
|
init_musher();
|
|
@@ -11781,7 +11793,7 @@ function beatBody(state, flags, host = {}, cap = {}) {
|
|
|
11781
11793
|
name: flags.name,
|
|
11782
11794
|
os: host.os ?? process.platform,
|
|
11783
11795
|
runner: flags.runner,
|
|
11784
|
-
version: host.version ?? "0.1.
|
|
11796
|
+
version: host.version ?? "0.1.63" ?? "dev",
|
|
11785
11797
|
running: live.length,
|
|
11786
11798
|
items: live.slice(0, BEAT_ITEMS).map((r) => `${r.item}/${r.node}`),
|
|
11787
11799
|
...cap.atOnce !== undefined ? { atOnce: cap.atOnce } : {},
|
|
@@ -12252,7 +12264,8 @@ function parsePrView(stdout) {
|
|
|
12252
12264
|
authorFeedback: 0,
|
|
12253
12265
|
draft: o.isDraft === true,
|
|
12254
12266
|
updatedAt: typeof o.updatedAt === "string" ? o.updatedAt : "",
|
|
12255
|
-
|
|
12267
|
+
autoMerge: typeof o.autoMergeRequest === "object" && o.autoMergeRequest !== null,
|
|
12268
|
+
queued: false,
|
|
12256
12269
|
...mock ? { mock } : {},
|
|
12257
12270
|
...typeof o.headRefOid === "string" && o.headRefOid ? { head: o.headRefOid } : {},
|
|
12258
12271
|
...typeof mergeCommit === "string" && mergeCommit ? { mergeCommit } : {}
|
|
@@ -12365,8 +12378,8 @@ function prView(exec, repoPath, url, last) {
|
|
|
12365
12378
|
const parsed = r.status === 0 ? parsePrView(r.stdout) : null;
|
|
12366
12379
|
if (!parsed || parsed.state !== "OPEN")
|
|
12367
12380
|
return parsed;
|
|
12368
|
-
const ready =
|
|
12369
|
-
const view = ready && prInMergeQueue(exec, repoPath, url) === true ? { ...parsed, queued: true } : parsed;
|
|
12381
|
+
const ready = parsed.failing.length === 0 && parsed.pending === 0 && parsed.reviewDecision === "APPROVED";
|
|
12382
|
+
const view = (parsed.autoMerge || ready) && prInMergeQueue(exec, repoPath, url) === true ? { ...parsed, queued: true } : parsed;
|
|
12370
12383
|
let read = view.updatedAt && last?.updatedAt === view.updatedAt ? last : undefined;
|
|
12371
12384
|
let findings = null;
|
|
12372
12385
|
if (!read) {
|
|
@@ -13339,7 +13352,7 @@ function sledsSource(client, o) {
|
|
|
13339
13352
|
let pack = "";
|
|
13340
13353
|
let brief = null;
|
|
13341
13354
|
try {
|
|
13342
|
-
brief = await
|
|
13355
|
+
brief = await client.get(`/proxy/route?q=${encodeURIComponent(project)}&draft=1`);
|
|
13343
13356
|
pack = (isObject8(brief?.draft) ? str6(brief.draft.pack) : undefined) ?? "";
|
|
13344
13357
|
} catch {
|
|
13345
13358
|
pack = "";
|
|
@@ -16495,21 +16508,27 @@ async function follow(d, state, run, claim, runner, finished, attention, changes
|
|
|
16495
16508
|
pr.feedback = Math.max(pr.feedback, view.feedback);
|
|
16496
16509
|
pr.authorFeedback = Math.max(pr.authorFeedback ?? 0, view.authorFeedback) || undefined;
|
|
16497
16510
|
const queued = view.queued;
|
|
16511
|
+
const autoMerge = view.autoMerge;
|
|
16498
16512
|
if (queued && !pr.queued)
|
|
16499
16513
|
d.log(`${ref(run)}: ${pr.url} is queued to merge`);
|
|
16500
16514
|
else if (!queued && pr.queued)
|
|
16501
16515
|
d.log(`${ref(run)}: ${pr.url} left the merge queue`);
|
|
16516
|
+
if (autoMerge && !pr.autoMerge)
|
|
16517
|
+
d.log(`${ref(run)}: ${pr.url} is set to merge when ready`);
|
|
16518
|
+
else if (!autoMerge && pr.autoMerge)
|
|
16519
|
+
d.log(`${ref(run)}: ${pr.url} is no longer set to merge`);
|
|
16502
16520
|
pr.queued = queued || undefined;
|
|
16503
|
-
|
|
16521
|
+
pr.autoMerge = autoMerge || undefined;
|
|
16522
|
+
const clear = view.failing.length === 0 && view.pending === 0 && view.reviewDecision === "APPROVED" && !queued && !autoMerge;
|
|
16504
16523
|
if (clear && !pr.clear) {
|
|
16505
16524
|
d.log(`${ref(run)}: ${pr.url} is green and approved — ready for your merge call`);
|
|
16506
16525
|
attention.push({ ...at, what: "green and approved: ready for a merge" });
|
|
16507
16526
|
}
|
|
16508
16527
|
pr.clear = clear;
|
|
16509
16528
|
const prRead = d.source.prRead;
|
|
16510
|
-
const posted = `${ci}|${review}|${clear}|${queued}`;
|
|
16529
|
+
const posted = `${ci}|${review}|${clear}|${queued}|${autoMerge}`;
|
|
16511
16530
|
if (prRead && posted !== pr.posted) {
|
|
16512
|
-
const read = { ci, ...review ? { review } : {}, clear, queued };
|
|
16531
|
+
const read = { ci, ...review ? { review } : {}, clear, queued, autoMerge };
|
|
16513
16532
|
if (await prRead.call(d.source, run.item, run.node, read))
|
|
16514
16533
|
pr.posted = posted;
|
|
16515
16534
|
}
|
|
@@ -18592,7 +18611,7 @@ async function fetchVersion(o) {
|
|
|
18592
18611
|
const platform = o.platform ?? process.platform;
|
|
18593
18612
|
const arch = o.arch ?? process.arch;
|
|
18594
18613
|
const publicKey = o.publicKey ?? RELEASE_PUBLIC_KEY;
|
|
18595
|
-
const running = o.running ?? "0.1.
|
|
18614
|
+
const running = o.running ?? "0.1.63";
|
|
18596
18615
|
if (!publicKey)
|
|
18597
18616
|
return { ok: false, why: "no release key yet" };
|
|
18598
18617
|
if (!VERSION_RE2.test(o.version))
|
|
@@ -19816,6 +19835,11 @@ function engineUpdater(o) {
|
|
|
19816
19835
|
};
|
|
19817
19836
|
}
|
|
19818
19837
|
|
|
19838
|
+
// src/version.ts
|
|
19839
|
+
function cliVersion(env) {
|
|
19840
|
+
return "0.1.63";
|
|
19841
|
+
}
|
|
19842
|
+
|
|
19819
19843
|
// src/commands/update.ts
|
|
19820
19844
|
init_server();
|
|
19821
19845
|
init_config();
|
|
@@ -20199,7 +20223,7 @@ function engineClient(o, org, breaker) {
|
|
|
20199
20223
|
...src,
|
|
20200
20224
|
...breaker ? { fetchFn: breaker.fetch } : {},
|
|
20201
20225
|
timeoutMs: ENGINE_TIMEOUT_MS,
|
|
20202
|
-
version: "0.1.
|
|
20226
|
+
version: "0.1.63"
|
|
20203
20227
|
});
|
|
20204
20228
|
const asked = org?.trim() || env.SLEDS_ORG?.trim();
|
|
20205
20229
|
if (asked && !selectOrg(readConfig(o.home), org, env).seat)
|
|
@@ -20505,7 +20529,7 @@ async function driveEngine(o, flags, deps, until = {}) {
|
|
|
20505
20529
|
runner: deps.runner.name,
|
|
20506
20530
|
atOnce: flags.atOnce,
|
|
20507
20531
|
interval: flags.interval,
|
|
20508
|
-
cliVersion: "0.1.
|
|
20532
|
+
cliVersion: "0.1.63"
|
|
20509
20533
|
};
|
|
20510
20534
|
const beat = (checkedAt) => {
|
|
20511
20535
|
const m = deps.machine;
|
|
@@ -22374,7 +22398,7 @@ function engineClient2(o, org, breaker) {
|
|
|
22374
22398
|
...src,
|
|
22375
22399
|
...breaker ? { fetchFn: breaker.fetch } : {},
|
|
22376
22400
|
timeoutMs: ENGINE_TIMEOUT_MS2,
|
|
22377
|
-
version: "0.1.
|
|
22401
|
+
version: "0.1.63"
|
|
22378
22402
|
});
|
|
22379
22403
|
const asked = org?.trim() || env.SLEDS_ORG?.trim();
|
|
22380
22404
|
if (asked && !selectOrg(readConfig(o.home), org, env).seat)
|
|
@@ -22715,7 +22739,7 @@ async function driveEngine2(o, flags, deps, until = {}) {
|
|
|
22715
22739
|
runner: deps.runner.name,
|
|
22716
22740
|
atOnce: flags.atOnce,
|
|
22717
22741
|
interval: flags.interval,
|
|
22718
|
-
cliVersion: "0.1.
|
|
22742
|
+
cliVersion: "0.1.63"
|
|
22719
22743
|
};
|
|
22720
22744
|
const beat = (checkedAt) => {
|
|
22721
22745
|
const m = deps.machine;
|
|
@@ -22921,7 +22945,7 @@ function engineRunner2(o, flags) {
|
|
|
22921
22945
|
});
|
|
22922
22946
|
}
|
|
22923
22947
|
function engineStartGuard(home, env, now) {
|
|
22924
|
-
return startGuard({ home, version: env
|
|
22948
|
+
return startGuard({ home, version: cliVersion(env), now });
|
|
22925
22949
|
}
|
|
22926
22950
|
var engineCmd = async (o) => {
|
|
22927
22951
|
const log = o.log ?? console.log;
|
|
@@ -23072,7 +23096,7 @@ var engineCmd = async (o) => {
|
|
|
23072
23096
|
log(terminalOf2(o).c.dim(n));
|
|
23073
23097
|
const watch = firstBeatWatchdog({
|
|
23074
23098
|
home: o.home,
|
|
23075
|
-
version: (o.env
|
|
23099
|
+
version: cliVersion(o.env),
|
|
23076
23100
|
say: error,
|
|
23077
23101
|
...o.updates?.stateFiles ? { stateFiles: o.updates.stateFiles() } : {},
|
|
23078
23102
|
...o.watchdog
|
|
@@ -23153,7 +23177,7 @@ function engineUpdaterFor(o, flags, deps, client) {
|
|
|
23153
23177
|
return engineUpdater({
|
|
23154
23178
|
home: o.home,
|
|
23155
23179
|
engine: statePath(engineStateDir2(o, flags.org, flags.seat), deps.engine),
|
|
23156
|
-
version: env
|
|
23180
|
+
version: cliVersion(env),
|
|
23157
23181
|
compiled: o.updates?.compiled ?? isCompiled(),
|
|
23158
23182
|
tokens: () => {
|
|
23159
23183
|
try {
|
|
@@ -23915,6 +23939,7 @@ function engineStatus(i) {
|
|
|
23915
23939
|
...opt("review", r.pr.review || undefined),
|
|
23916
23940
|
mergeable: r.pr.clear === true,
|
|
23917
23941
|
queued: r.pr.queued === true,
|
|
23942
|
+
autoMerge: r.pr.autoMerge === true,
|
|
23918
23943
|
...opt("conflict", conflictOf(r, i.state.decisions, i.watchOf)),
|
|
23919
23944
|
runner: r.handle.runner,
|
|
23920
23945
|
...r.pr.live ? { watch: i.watchOf(r), watchTarget: watchTarget(r.handle) } : {},
|
|
@@ -23995,7 +24020,7 @@ function statusLines(s, now) {
|
|
|
23995
24020
|
lines.push(` ${r.item}/${r.node} ${r.title} · ${r.answerer ? `parked, the decider answers${r.answerer.model ? ` on ${r.answerer.model}` : ""}${r.answerer.effort ? ` · ${r.answerer.effort}` : ""}` : r.parked ? "parked, waiting for your answer" : `${r.kind === "mock" ? "drawing a mock · " : ""}${ago(r.startedAt)}`} · watch: ${r.watch}`);
|
|
23996
24021
|
lines.push(`following ${s.following.length}`);
|
|
23997
24022
|
for (const f of s.following) {
|
|
23998
|
-
lines.push(` ${f.item}/${f.node} ${f.pr}${f.checks ? ` checks ${f.checks}` : ""}${f.review ? ` · ${f.review}` : ""}${f.mergeable ? " · ready for your merge" : ""}${f.queued ? " · queued to merge" : ""}`);
|
|
24023
|
+
lines.push(` ${f.item}/${f.node} ${f.pr}${f.checks ? ` checks ${f.checks}` : ""}${f.review ? ` · ${f.review}` : ""}${f.mergeable ? " · ready for your merge" : ""}${f.queued ? " · queued to merge" : f.autoMerge ? " · merge when ready" : ""}`);
|
|
23999
24024
|
if (f.watch)
|
|
24000
24025
|
lines.push(` watch: ${f.watch}`);
|
|
24001
24026
|
else if (f.worktree)
|
|
@@ -24825,7 +24850,7 @@ function contextFor(deps) {
|
|
|
24825
24850
|
...src,
|
|
24826
24851
|
fetchFn: deps.fetchFn,
|
|
24827
24852
|
timeoutMs: deps.timeoutMs,
|
|
24828
|
-
version: "0.1.
|
|
24853
|
+
version: "0.1.63"
|
|
24829
24854
|
}), deps.home, now) : null;
|
|
24830
24855
|
return {
|
|
24831
24856
|
channel: "code",
|
|
@@ -29086,7 +29111,7 @@ var realPidAlive4 = (pid) => {
|
|
|
29086
29111
|
};
|
|
29087
29112
|
function machineClient(home, env) {
|
|
29088
29113
|
const src = meterSource(home, undefined, { env });
|
|
29089
|
-
return src ? fetchClient({ ...src, version: "0.1.
|
|
29114
|
+
return src ? fetchClient({ ...src, version: "0.1.63" }) : null;
|
|
29090
29115
|
}
|
|
29091
29116
|
async function noteAnswer2(home, a, now) {
|
|
29092
29117
|
try {
|
|
@@ -29120,7 +29145,7 @@ async function updateCmd(o) {
|
|
|
29120
29145
|
error(UPDATE_USAGE);
|
|
29121
29146
|
return 2;
|
|
29122
29147
|
}
|
|
29123
|
-
const version = o.version ?? env
|
|
29148
|
+
const version = o.version ?? cliVersion(env);
|
|
29124
29149
|
if (parsed.mode === "off" || parsed.mode === "on") {
|
|
29125
29150
|
const off = parsed.mode === "off";
|
|
29126
29151
|
await withUpdateLock(home, (s) => {
|
|
@@ -29956,7 +29981,7 @@ var main = async (argv) => {
|
|
|
29956
29981
|
now: Date.now(),
|
|
29957
29982
|
stderr: (line) => console.error(line),
|
|
29958
29983
|
isTTY: !!process.stderr.isTTY,
|
|
29959
|
-
version: "0.1.
|
|
29984
|
+
version: "0.1.63"
|
|
29960
29985
|
});
|
|
29961
29986
|
switch (cmd) {
|
|
29962
29987
|
case "update":
|
|
@@ -30189,7 +30214,7 @@ ${renderHelpText(argv[1])}`);
|
|
|
30189
30214
|
case "version":
|
|
30190
30215
|
case "--version":
|
|
30191
30216
|
case "-v":
|
|
30192
|
-
console.log("sleds 0.1.
|
|
30217
|
+
console.log("sleds 0.1.63");
|
|
30193
30218
|
return 0;
|
|
30194
30219
|
default:
|
|
30195
30220
|
console.error(`unknown command: ${cmd}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sleds/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
4
4
|
"description": "SLEDS CLI — the cost and limits of AI agent work, decided at the wall. Point Claude Code at a SLEDS proxy; estimate before you run; hold, switch model, or run overnight when you hit a limit.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|