@sleds/cli 0.1.55 → 0.1.57
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 +94 -21
- package/package.json +1 -1
package/dist/sleds.mjs
CHANGED
|
@@ -2565,9 +2565,18 @@ ${rows.map((r) => statusLine(r, now)).join(`
|
|
|
2565
2565
|
|
|
2566
2566
|
`)}${more}`;
|
|
2567
2567
|
}
|
|
2568
|
+
function mineSection(rows, now, count) {
|
|
2569
|
+
if (rows.length === 0)
|
|
2570
|
+
return null;
|
|
2571
|
+
return `On your sled (${count ?? rows.length}):
|
|
2572
|
+
|
|
2573
|
+
${rows.map((r) => statusLine(r, now)).join(`
|
|
2574
|
+
|
|
2575
|
+
`)}`;
|
|
2576
|
+
}
|
|
2568
2577
|
function sledText(s, now) {
|
|
2569
2578
|
const parts = [
|
|
2570
|
-
|
|
2579
|
+
mineSection(s.mine, now, s.mineCount),
|
|
2571
2580
|
section("Proposed to you", s.proposed, now, s.proposedCount),
|
|
2572
2581
|
section("Sent to you", s.sent, now)
|
|
2573
2582
|
].filter((p) => p !== null);
|
|
@@ -3519,6 +3528,7 @@ async function sledTool(ctx, args) {
|
|
|
3519
3528
|
return {
|
|
3520
3529
|
text: sledText({
|
|
3521
3530
|
mine: rows("mine"),
|
|
3531
|
+
...typeof r.mineCount === "number" ? { mineCount: r.mineCount } : {},
|
|
3522
3532
|
proposed: rows("proposed"),
|
|
3523
3533
|
...typeof r.proposedCount === "number" ? { proposedCount: r.proposedCount } : {},
|
|
3524
3534
|
sent: rows("sent")
|
|
@@ -6003,6 +6013,36 @@ var init_fieldMap = __esm(() => {
|
|
|
6003
6013
|
]);
|
|
6004
6014
|
});
|
|
6005
6015
|
|
|
6016
|
+
// ../../packages/shared/src/markdown/markdown.ts
|
|
6017
|
+
var init_markdown3 = () => {};
|
|
6018
|
+
|
|
6019
|
+
// ../../packages/shared/src/tracker/adf.ts
|
|
6020
|
+
var BLOCK_TYPES;
|
|
6021
|
+
var init_adf = __esm(() => {
|
|
6022
|
+
init_markdown3();
|
|
6023
|
+
BLOCK_TYPES = new Set([
|
|
6024
|
+
"paragraph",
|
|
6025
|
+
"heading",
|
|
6026
|
+
"bulletList",
|
|
6027
|
+
"orderedList",
|
|
6028
|
+
"taskList",
|
|
6029
|
+
"codeBlock",
|
|
6030
|
+
"blockquote",
|
|
6031
|
+
"panel",
|
|
6032
|
+
"rule",
|
|
6033
|
+
"table",
|
|
6034
|
+
"mediaSingle",
|
|
6035
|
+
"mediaGroup",
|
|
6036
|
+
"blockCard",
|
|
6037
|
+
"embedCard",
|
|
6038
|
+
"expand",
|
|
6039
|
+
"nestedExpand",
|
|
6040
|
+
"layoutSection",
|
|
6041
|
+
"layoutColumn",
|
|
6042
|
+
"decisionList"
|
|
6043
|
+
]);
|
|
6044
|
+
});
|
|
6045
|
+
|
|
6006
6046
|
// ../../packages/shared/src/help/whatsNew.ts
|
|
6007
6047
|
var SEPT_30 = "/whats-new/2026-09-30", WHATS_NEW;
|
|
6008
6048
|
var init_whatsNew = __esm(() => {
|
|
@@ -8167,6 +8207,7 @@ var init_src = __esm(() => {
|
|
|
8167
8207
|
init_statusMap();
|
|
8168
8208
|
init_confluence();
|
|
8169
8209
|
init_fieldMap();
|
|
8210
|
+
init_adf();
|
|
8170
8211
|
init_whatsNew();
|
|
8171
8212
|
init_cheatSheet();
|
|
8172
8213
|
init_pack2();
|
|
@@ -8912,6 +8953,7 @@ init_template();
|
|
|
8912
8953
|
init_statusMap();
|
|
8913
8954
|
init_confluence();
|
|
8914
8955
|
init_fieldMap();
|
|
8956
|
+
init_adf();
|
|
8915
8957
|
init_whatsNew();
|
|
8916
8958
|
init_cheatSheet();
|
|
8917
8959
|
init_pack2();
|
|
@@ -11536,7 +11578,7 @@ function beatBody(state, flags, host = {}, cap = {}) {
|
|
|
11536
11578
|
name: flags.name,
|
|
11537
11579
|
os: host.os ?? process.platform,
|
|
11538
11580
|
runner: flags.runner,
|
|
11539
|
-
version: host.version ?? "0.1.
|
|
11581
|
+
version: host.version ?? "0.1.57" ?? "dev",
|
|
11540
11582
|
running: live.length,
|
|
11541
11583
|
items: live.slice(0, BEAT_ITEMS).map((r) => `${r.item}/${r.node}`),
|
|
11542
11584
|
...cap.atOnce !== undefined ? { atOnce: cap.atOnce } : {},
|
|
@@ -11937,6 +11979,7 @@ function parsePrView(stdout) {
|
|
|
11937
11979
|
authorFeedback: 0,
|
|
11938
11980
|
draft: o.isDraft === true,
|
|
11939
11981
|
updatedAt: typeof o.updatedAt === "string" ? o.updatedAt : "",
|
|
11982
|
+
queued: typeof o.autoMergeRequest === "object" && o.autoMergeRequest !== null,
|
|
11940
11983
|
...mock ? { mock } : {},
|
|
11941
11984
|
...typeof o.headRefOid === "string" && o.headRefOid ? { head: o.headRefOid } : {},
|
|
11942
11985
|
...typeof mergeCommit === "string" && mergeCommit ? { mergeCommit } : {}
|
|
@@ -11985,6 +12028,27 @@ function prFeedback(exec, repoPath, url, author) {
|
|
|
11985
12028
|
}
|
|
11986
12029
|
return total;
|
|
11987
12030
|
}
|
|
12031
|
+
var MERGE_QUEUE_QUERY = "query($url: URI!) { resource(url: $url) { ... on PullRequest { mergeQueueEntry { state } } } }";
|
|
12032
|
+
function prInMergeQueue(exec, repoPath, url) {
|
|
12033
|
+
try {
|
|
12034
|
+
const r = exec("gh", [
|
|
12035
|
+
"api",
|
|
12036
|
+
"graphql",
|
|
12037
|
+
"-f",
|
|
12038
|
+
`query=${MERGE_QUEUE_QUERY}`,
|
|
12039
|
+
"-f",
|
|
12040
|
+
`url=${url}`,
|
|
12041
|
+
"--jq",
|
|
12042
|
+
".data.resource.mergeQueueEntry != null"
|
|
12043
|
+
], { cwd: repoPath });
|
|
12044
|
+
if (r.status !== 0)
|
|
12045
|
+
return null;
|
|
12046
|
+
const out = r.stdout.trim();
|
|
12047
|
+
return out === "true" ? true : out === "false" ? false : null;
|
|
12048
|
+
} catch {
|
|
12049
|
+
return null;
|
|
12050
|
+
}
|
|
12051
|
+
}
|
|
11988
12052
|
function prView(exec, repoPath, url, last) {
|
|
11989
12053
|
try {
|
|
11990
12054
|
const r = exec("gh", [
|
|
@@ -11992,11 +12056,13 @@ function prView(exec, repoPath, url, last) {
|
|
|
11992
12056
|
"view",
|
|
11993
12057
|
url,
|
|
11994
12058
|
"--json",
|
|
11995
|
-
"state,author,statusCheckRollup,reviewDecision,headRefOid,mergeable,baseRefName,mergeCommit,isDraft,body,updatedAt"
|
|
12059
|
+
"state,author,statusCheckRollup,reviewDecision,headRefOid,mergeable,baseRefName,mergeCommit,isDraft,body,updatedAt,autoMergeRequest"
|
|
11996
12060
|
], { cwd: repoPath });
|
|
11997
|
-
const
|
|
11998
|
-
if (!
|
|
11999
|
-
return
|
|
12061
|
+
const parsed = r.status === 0 ? parsePrView(r.stdout) : null;
|
|
12062
|
+
if (!parsed || parsed.state !== "OPEN")
|
|
12063
|
+
return parsed;
|
|
12064
|
+
const ready = !parsed.queued && parsed.failing.length === 0 && parsed.pending === 0 && parsed.reviewDecision === "APPROVED";
|
|
12065
|
+
const view = ready && prInMergeQueue(exec, repoPath, url) === true ? { ...parsed, queued: true } : parsed;
|
|
12000
12066
|
let read = view.updatedAt && last?.updatedAt === view.updatedAt ? last : undefined;
|
|
12001
12067
|
if (!read) {
|
|
12002
12068
|
const f = prFeedback(exec, repoPath, url, view.author);
|
|
@@ -12115,7 +12181,7 @@ function epicItem(epic, nodes) {
|
|
|
12115
12181
|
landed: nodes.length > 0 && nodes.every((n) => n.category === "done")
|
|
12116
12182
|
};
|
|
12117
12183
|
}
|
|
12118
|
-
var
|
|
12184
|
+
var BLOCK_TYPES2 = new Set([
|
|
12119
12185
|
"paragraph",
|
|
12120
12186
|
"heading",
|
|
12121
12187
|
"listItem",
|
|
@@ -12140,7 +12206,7 @@ function adfText(doc) {
|
|
|
12140
12206
|
if (Array.isArray(n.content))
|
|
12141
12207
|
for (const c of n.content)
|
|
12142
12208
|
walk(c);
|
|
12143
|
-
if (typeof n.type === "string" &&
|
|
12209
|
+
if (typeof n.type === "string" && BLOCK_TYPES2.has(n.type)) {
|
|
12144
12210
|
const last = out[out.length - 1];
|
|
12145
12211
|
if (last !== undefined && !last.endsWith(`
|
|
12146
12212
|
`))
|
|
@@ -15589,16 +15655,22 @@ async function follow(d, state, run, claim, runner, finished, attention, changes
|
|
|
15589
15655
|
pr.failing = view.failing;
|
|
15590
15656
|
pr.feedback = Math.max(pr.feedback, view.feedback);
|
|
15591
15657
|
pr.authorFeedback = Math.max(pr.authorFeedback ?? 0, view.authorFeedback) || undefined;
|
|
15592
|
-
const
|
|
15658
|
+
const queued = view.queued;
|
|
15659
|
+
if (queued && !pr.queued)
|
|
15660
|
+
d.log(`${ref(run)}: ${pr.url} is queued to merge`);
|
|
15661
|
+
else if (!queued && pr.queued)
|
|
15662
|
+
d.log(`${ref(run)}: ${pr.url} left the merge queue`);
|
|
15663
|
+
pr.queued = queued || undefined;
|
|
15664
|
+
const clear = view.failing.length === 0 && view.pending === 0 && view.reviewDecision === "APPROVED" && !queued;
|
|
15593
15665
|
if (clear && !pr.clear) {
|
|
15594
15666
|
d.log(`${ref(run)}: ${pr.url} is green and approved — ready for your merge call`);
|
|
15595
15667
|
attention.push({ ...at, what: "green and approved: ready for a merge" });
|
|
15596
15668
|
}
|
|
15597
15669
|
pr.clear = clear;
|
|
15598
15670
|
const prRead = d.source.prRead;
|
|
15599
|
-
const posted = `${ci}|${review}|${clear}`;
|
|
15671
|
+
const posted = `${ci}|${review}|${clear}|${queued}`;
|
|
15600
15672
|
if (prRead && posted !== pr.posted) {
|
|
15601
|
-
const read = { ci, ...review ? { review } : {}, clear };
|
|
15673
|
+
const read = { ci, ...review ? { review } : {}, clear, queued };
|
|
15602
15674
|
if (await prRead.call(d.source, run.item, run.node, read))
|
|
15603
15675
|
pr.posted = posted;
|
|
15604
15676
|
}
|
|
@@ -17514,7 +17586,7 @@ async function fetchVersion(o) {
|
|
|
17514
17586
|
const platform = o.platform ?? process.platform;
|
|
17515
17587
|
const arch = o.arch ?? process.arch;
|
|
17516
17588
|
const publicKey = o.publicKey ?? RELEASE_PUBLIC_KEY;
|
|
17517
|
-
const running = o.running ?? "0.1.
|
|
17589
|
+
const running = o.running ?? "0.1.57";
|
|
17518
17590
|
if (!publicKey)
|
|
17519
17591
|
return { ok: false, why: "no release key yet" };
|
|
17520
17592
|
if (!VERSION_RE2.test(o.version))
|
|
@@ -19099,7 +19171,7 @@ function engineClient(o, org, breaker) {
|
|
|
19099
19171
|
...src,
|
|
19100
19172
|
...breaker ? { fetchFn: breaker.fetch } : {},
|
|
19101
19173
|
timeoutMs: ENGINE_TIMEOUT_MS,
|
|
19102
|
-
version: "0.1.
|
|
19174
|
+
version: "0.1.57"
|
|
19103
19175
|
});
|
|
19104
19176
|
const asked = org?.trim() || env.SLEDS_ORG?.trim();
|
|
19105
19177
|
if (asked && !selectOrg(readConfig(o.home), org, env).seat)
|
|
@@ -19390,7 +19462,7 @@ async function driveEngine(o, flags, deps, until = {}) {
|
|
|
19390
19462
|
runner: deps.runner.name,
|
|
19391
19463
|
atOnce: flags.atOnce,
|
|
19392
19464
|
interval: flags.interval,
|
|
19393
|
-
cliVersion: "0.1.
|
|
19465
|
+
cliVersion: "0.1.57"
|
|
19394
19466
|
};
|
|
19395
19467
|
const beat = (checkedAt) => {
|
|
19396
19468
|
const m = deps.machine;
|
|
@@ -21257,7 +21329,7 @@ function engineClient2(o, org, breaker) {
|
|
|
21257
21329
|
...src,
|
|
21258
21330
|
...breaker ? { fetchFn: breaker.fetch } : {},
|
|
21259
21331
|
timeoutMs: ENGINE_TIMEOUT_MS2,
|
|
21260
|
-
version: "0.1.
|
|
21332
|
+
version: "0.1.57"
|
|
21261
21333
|
});
|
|
21262
21334
|
const asked = org?.trim() || env.SLEDS_ORG?.trim();
|
|
21263
21335
|
if (asked && !selectOrg(readConfig(o.home), org, env).seat)
|
|
@@ -21583,7 +21655,7 @@ async function driveEngine2(o, flags, deps, until = {}) {
|
|
|
21583
21655
|
runner: deps.runner.name,
|
|
21584
21656
|
atOnce: flags.atOnce,
|
|
21585
21657
|
interval: flags.interval,
|
|
21586
|
-
cliVersion: "0.1.
|
|
21658
|
+
cliVersion: "0.1.57"
|
|
21587
21659
|
};
|
|
21588
21660
|
const beat = (checkedAt) => {
|
|
21589
21661
|
const m = deps.machine;
|
|
@@ -22782,6 +22854,7 @@ function engineStatus(i) {
|
|
|
22782
22854
|
failing: r.pr.failing,
|
|
22783
22855
|
...opt("review", r.pr.review || undefined),
|
|
22784
22856
|
mergeable: r.pr.clear === true,
|
|
22857
|
+
queued: r.pr.queued === true,
|
|
22785
22858
|
...opt("conflict", conflictOf(r, i.state.decisions, i.watchOf))
|
|
22786
22859
|
});
|
|
22787
22860
|
continue;
|
|
@@ -22859,7 +22932,7 @@ function statusLines(s, now) {
|
|
|
22859
22932
|
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" : ago(r.startedAt)} · watch: ${r.watch}`);
|
|
22860
22933
|
lines.push(`following ${s.following.length}`);
|
|
22861
22934
|
for (const f of s.following) {
|
|
22862
|
-
lines.push(` ${f.item}/${f.node} ${f.pr}${f.checks ? ` checks ${f.checks}` : ""}${f.review ? ` · ${f.review}` : ""}${f.mergeable ? " · ready for your merge" : ""}`);
|
|
22935
|
+
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" : ""}`);
|
|
22863
22936
|
const c = f.conflict;
|
|
22864
22937
|
if (c)
|
|
22865
22938
|
lines.push(` conflict on ${c.files.join(", ")}${c.cause ? ` · ${c.cause}` : ""} · ${CONFLICT_STAGE[c.stage]} · since ${ago(c.since)} ago${c.watch ? ` · watch: ${c.watch}` : ""}`);
|
|
@@ -23685,7 +23758,7 @@ function contextFor(deps) {
|
|
|
23685
23758
|
...src,
|
|
23686
23759
|
fetchFn: deps.fetchFn,
|
|
23687
23760
|
timeoutMs: deps.timeoutMs,
|
|
23688
|
-
version: "0.1.
|
|
23761
|
+
version: "0.1.57"
|
|
23689
23762
|
}), deps.home, now) : null;
|
|
23690
23763
|
return {
|
|
23691
23764
|
channel: "code",
|
|
@@ -27803,7 +27876,7 @@ var realPidAlive4 = (pid) => {
|
|
|
27803
27876
|
};
|
|
27804
27877
|
function machineClient(home, env) {
|
|
27805
27878
|
const src = meterSource(home, undefined, { env });
|
|
27806
|
-
return src ? fetchClient({ ...src, version: "0.1.
|
|
27879
|
+
return src ? fetchClient({ ...src, version: "0.1.57" }) : null;
|
|
27807
27880
|
}
|
|
27808
27881
|
async function noteAnswer2(home, a, now) {
|
|
27809
27882
|
try {
|
|
@@ -28663,7 +28736,7 @@ var main = async (argv) => {
|
|
|
28663
28736
|
now: Date.now(),
|
|
28664
28737
|
stderr: (line) => console.error(line),
|
|
28665
28738
|
isTTY: !!process.stderr.isTTY,
|
|
28666
|
-
version: "0.1.
|
|
28739
|
+
version: "0.1.57"
|
|
28667
28740
|
});
|
|
28668
28741
|
switch (cmd) {
|
|
28669
28742
|
case "update":
|
|
@@ -28896,7 +28969,7 @@ ${renderHelpText(argv[1])}`);
|
|
|
28896
28969
|
case "version":
|
|
28897
28970
|
case "--version":
|
|
28898
28971
|
case "-v":
|
|
28899
|
-
console.log("sleds 0.1.
|
|
28972
|
+
console.log("sleds 0.1.57");
|
|
28900
28973
|
return 0;
|
|
28901
28974
|
default:
|
|
28902
28975
|
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.57",
|
|
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",
|