mergestorm 0.3.17 → 0.3.18
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/README.md +2 -2
- package/dist/api.d.ts +5 -0
- package/dist/automation-catalog.d.ts +4 -0
- package/dist/automation-catalog.js +1 -0
- package/dist/commands/browse.d.ts +1 -1
- package/dist/commands/registry.js +3 -2
- package/dist/commands/review-client.js +4 -1
- package/dist/commands/review.js +9 -1
- package/dist/commands/settings.d.ts +1 -1
- package/dist/stack-dto.d.ts +3 -1
- package/dist/ui/banner.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,12 +45,12 @@ On a TTY, bare `mergestorm` (or `mergestorm shell`) opens a branded REPL: a comp
|
|
|
45
45
|
|
|
46
46
|
```
|
|
47
47
|
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
48
|
-
│ ▟██▛ mergestorm v0.3.
|
|
48
|
+
│ ▟██▛ mergestorm v0.3.18 │
|
|
49
49
|
│ ▜▙ ● msk_live_… · maelstrom │
|
|
50
50
|
│ [████████░░░░░░░░░░░░░░░░░░░░░░] 25% used · Resets Sep 5, 10:53am (UTC)│
|
|
51
51
|
│ │
|
|
52
52
|
│ review a diff · usage for tabs · /help for all commands │
|
|
53
|
-
│ New in v0.3.
|
|
53
|
+
│ New in v0.3.18: pr --wait fences a stale same-head pass │
|
|
54
54
|
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
55
55
|
mergestorm
|
|
56
56
|
╭──────────────────────────────────────────────────────────────────────────────╮
|
package/dist/api.d.ts
CHANGED
|
@@ -134,6 +134,11 @@ export type PrVortexReview = {
|
|
|
134
134
|
finding_count: number;
|
|
135
135
|
findings: PrReviewFindings | null;
|
|
136
136
|
patch_policy: unknown | null;
|
|
137
|
+
/**
|
|
138
|
+
* MS-01: True when the returned row is a resting completion but a newer
|
|
139
|
+
* attempt is in flight (active lease). The CLI must continue polling.
|
|
140
|
+
*/
|
|
141
|
+
newer_pass_pending?: boolean;
|
|
137
142
|
};
|
|
138
143
|
/**
|
|
139
144
|
* Pass selection on the DB-only PR review read (#2027). `pass` names one row;
|
|
@@ -22,6 +22,10 @@ export declare const BEARER_SETTINGS: readonly [{
|
|
|
22
22
|
readonly key: "cyclone_review_unit_land_prs_enabled";
|
|
23
23
|
readonly flag: "--cyclone-review-unit-land";
|
|
24
24
|
readonly label: "Cyclone Review Unit land PRs";
|
|
25
|
+
}, {
|
|
26
|
+
readonly key: "cyclone_skip_ci_enabled";
|
|
27
|
+
readonly flag: "--cyclone-skip-ci";
|
|
28
|
+
readonly label: "Skip CI on Cyclone commits";
|
|
25
29
|
}, {
|
|
26
30
|
readonly key: "vortex_seam_specialist_enabled";
|
|
27
31
|
readonly flag: "--vortex-seam";
|
|
@@ -5,6 +5,7 @@ export const BEARER_SETTINGS = [
|
|
|
5
5
|
{ key: "repo_overview_enabled", flag: "--repo-overview", label: "Repo overview" },
|
|
6
6
|
{ key: "review_unit_land_prs_enabled", flag: "--review-unit-land", label: "Review Unit land PRs" },
|
|
7
7
|
{ key: "cyclone_review_unit_land_prs_enabled", flag: "--cyclone-review-unit-land", label: "Cyclone Review Unit land PRs" },
|
|
8
|
+
{ key: "cyclone_skip_ci_enabled", flag: "--cyclone-skip-ci", label: "Skip CI on Cyclone commits" },
|
|
8
9
|
{ key: "vortex_seam_specialist_enabled", flag: "--vortex-seam", label: "Vortex seam specialist" },
|
|
9
10
|
{ key: "auto_land_default", flag: "--auto-land", label: "Auto land (new stacks)" },
|
|
10
11
|
];
|
|
@@ -27,7 +27,7 @@ export declare function buildStatusTabLines(input: StatusTabInput): string[];
|
|
|
27
27
|
/** In-place job detail for the Jobs tab (same envelope as `status <id>`). */
|
|
28
28
|
export declare function formatJobDetailLines(row: ReviewJobRow): string[];
|
|
29
29
|
/** Human labels for the Config tab and the static `settings` printout. */
|
|
30
|
-
export declare const SETTINGS_LABELS: Record<"auto_review_enabled" | "auto_patch_enabled" | "vortex_show_thinking_traces" | "repo_overview_enabled" | "review_unit_land_prs_enabled" | "cyclone_review_unit_land_prs_enabled" | "vortex_seam_specialist_enabled" | "auto_land_default", string>;
|
|
30
|
+
export declare const SETTINGS_LABELS: Record<"auto_review_enabled" | "auto_patch_enabled" | "vortex_show_thinking_traces" | "repo_overview_enabled" | "review_unit_land_prs_enabled" | "cyclone_review_unit_land_prs_enabled" | "cyclone_skip_ci_enabled" | "vortex_seam_specialist_enabled" | "auto_land_default", string>;
|
|
31
31
|
/** Config rows in a stable order: writable toggles, then connected flags. */
|
|
32
32
|
export declare function buildConfigRows(settings: SettingsResponse): TabsConfigRow[];
|
|
33
33
|
/**
|
|
@@ -52,6 +52,7 @@ export const COMMAND_REGISTRY = [
|
|
|
52
52
|
" [--context text] [--context-file path] [--thread slug]",
|
|
53
53
|
" [--idempotency-key k] [--webhook-url https://…]",
|
|
54
54
|
" HTTP 429 exits 7 (rate_limited) with retry_after_seconds",
|
|
55
|
+
" Uploads over 1 MB / 1_000_000 are rejected with HTTP 413 and do not create a job",
|
|
55
56
|
],
|
|
56
57
|
async run(args, ctx) {
|
|
57
58
|
if (ctx.mode === "shell") {
|
|
@@ -164,8 +165,8 @@ export const COMMAND_REGISTRY = [
|
|
|
164
165
|
"mergestorm settings [--json] Read the automation toggles (Config tab on a TTY)",
|
|
165
166
|
" [--auto-review on|off] [--auto-patch on|off] [--vortex-thinking on|off]",
|
|
166
167
|
" [--repo-overview on|off] [--review-unit-land on|off]",
|
|
167
|
-
" [--cyclone-review-unit-land on|off] [--
|
|
168
|
-
" [--auto-land on|off]
|
|
168
|
+
" [--cyclone-review-unit-land on|off] [--cyclone-skip-ci on|off]",
|
|
169
|
+
" [--vortex-seam on|off] [--auto-land on|off] Auto land default for new stacks",
|
|
169
170
|
" With flags: PATCH those settings and print the stored result",
|
|
170
171
|
],
|
|
171
172
|
async run(args, ctx) {
|
|
@@ -364,7 +364,10 @@ export async function pollPrVortexReview(cfg, owner, repo, prNumber, opts = {})
|
|
|
364
364
|
lastEnvelope = envelope;
|
|
365
365
|
const resting = (lastEnvelope.raw_status ?? lastEnvelope.status) !== "in_progress";
|
|
366
366
|
const matches = !opts.afterSha || shaMatches(lastEnvelope.head_sha, opts.afterSha);
|
|
367
|
-
|
|
367
|
+
// MS-01: A resting completion with newer_pass_pending indicates a newer
|
|
368
|
+
// attempt is in flight. Do not satisfy the wait from this stale result.
|
|
369
|
+
const stale = lastEnvelope.newer_pass_pending === true;
|
|
370
|
+
if (resting && matches && !stale)
|
|
368
371
|
return lastEnvelope;
|
|
369
372
|
opts.onTick?.("progress");
|
|
370
373
|
await sleepBeforePoll();
|
package/dist/commands/review.js
CHANGED
|
@@ -40,7 +40,8 @@ function normalizeVortexSpecialistIds(value) {
|
|
|
40
40
|
const selected = new Set(value.filter((id) => typeof id === "string" && VORTEX_SPECIALIST_IDS.includes(id)));
|
|
41
41
|
return VORTEX_SPECIALIST_IDS.filter((id) => selected.has(id));
|
|
42
42
|
}
|
|
43
|
-
const REVIEW_USAGE = "usage: mergestorm review [base] [head] [--json] [--wait|--no-wait] [--timeout seconds] [--router off|standard|max|manual] [--specialists id,id] [--context text] [--context-file path] [--idempotency-key k] [--webhook-url https://…] [--thread slug]"
|
|
43
|
+
const REVIEW_USAGE = "usage: mergestorm review [base] [head] [--json] [--wait|--no-wait] [--timeout seconds] [--router off|standard|max|manual] [--specialists id,id] [--context text] [--context-file path] [--idempotency-key k] [--webhook-url https://…] [--thread slug]\n" +
|
|
44
|
+
"Uploads over 1 MB / 1_000_000 are rejected with HTTP 413 and do not create a job.";
|
|
44
45
|
function usageError(message = REVIEW_USAGE) {
|
|
45
46
|
return new CommandError(message, REVIEW_EXIT.usage, "usage");
|
|
46
47
|
}
|
|
@@ -164,6 +165,9 @@ export function parseReviewArgs(args) {
|
|
|
164
165
|
thread = slug;
|
|
165
166
|
continue;
|
|
166
167
|
}
|
|
168
|
+
if (a === "-h" || a === "--help") {
|
|
169
|
+
throw usageError();
|
|
170
|
+
}
|
|
167
171
|
if (a.startsWith("-")) {
|
|
168
172
|
throw usageError(`unknown flag: ${a}`);
|
|
169
173
|
}
|
|
@@ -227,6 +231,10 @@ function asPollCommandError(err, jobId) {
|
|
|
227
231
|
return new CommandError(withReviewJobRecovery(`Poll failed: ${detail}`, jobId));
|
|
228
232
|
}
|
|
229
233
|
export async function cmdReview(args, opts = {}) {
|
|
234
|
+
if (args.includes("-h") || args.includes("--help")) {
|
|
235
|
+
console.log(REVIEW_USAGE);
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
230
238
|
const parsed = parseReviewArgs(args);
|
|
231
239
|
const base = resolveReviewBase(parsed.base);
|
|
232
240
|
const head = parsed.head || "HEAD";
|
|
@@ -3,7 +3,7 @@ import { type SettingsPatch, type SettingsResponse } from "../api.js";
|
|
|
3
3
|
* CLI flag → Bearer settings key. on|off only. The connected flags are
|
|
4
4
|
* read-only on the API and deliberately have no flag here.
|
|
5
5
|
*/
|
|
6
|
-
export declare const SETTINGS_FLAGS: Record<string, "auto_review_enabled" | "auto_patch_enabled" | "vortex_show_thinking_traces" | "repo_overview_enabled" | "review_unit_land_prs_enabled" | "cyclone_review_unit_land_prs_enabled" | "vortex_seam_specialist_enabled" | "auto_land_default">;
|
|
6
|
+
export declare const SETTINGS_FLAGS: Record<string, "auto_review_enabled" | "auto_patch_enabled" | "vortex_show_thinking_traces" | "repo_overview_enabled" | "review_unit_land_prs_enabled" | "cyclone_review_unit_land_prs_enabled" | "cyclone_skip_ci_enabled" | "vortex_seam_specialist_enabled" | "auto_land_default">;
|
|
7
7
|
export type SettingsArgs = {
|
|
8
8
|
json: boolean;
|
|
9
9
|
patch: SettingsPatch;
|
package/dist/stack-dto.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type StackReviewStatus = "approved" | "changes_requested" | "reviewed" |
|
|
|
20
20
|
* `incomplete` is a posted verdict whose head still has unreviewed files
|
|
21
21
|
* (#1947): Work paints Incomplete, never Reviewed or all clear.
|
|
22
22
|
*/
|
|
23
|
-
export type StackVortexStatus = "reviewing" | "seam_pending" | "all_clear" | "findings" | "throttled" | "failed" | "incomplete";
|
|
23
|
+
export type StackVortexStatus = "queued" | "skipped" | "reviewing" | "seam_pending" | "all_clear" | "findings" | "throttled" | "failed" | "incomplete";
|
|
24
24
|
export type StackCycloneStatus = "patching" | "awaiting_fix";
|
|
25
25
|
export type StackTempestStatus = "reviewing" | "findings" | "clear" | "failed" | "stale";
|
|
26
26
|
export type StackAgentName = "vortex" | "cyclone" | "tempest";
|
|
@@ -36,6 +36,8 @@ export type StackAgentRun = {
|
|
|
36
36
|
status: string;
|
|
37
37
|
/** Full SHA when known. UI shortens to 7. */
|
|
38
38
|
sha: string | null;
|
|
39
|
+
pass?: number | null;
|
|
40
|
+
skipReason?: string | null;
|
|
39
41
|
startedAt?: string | null;
|
|
40
42
|
finishedAt?: string | null;
|
|
41
43
|
/**
|
package/dist/ui/banner.js
CHANGED
|
@@ -87,6 +87,9 @@ const WHATS_NEW = {
|
|
|
87
87
|
"0.3.17": [
|
|
88
88
|
"nginx 413 names the upload limit instead of Failed: {}",
|
|
89
89
|
],
|
|
90
|
+
"0.3.18": [
|
|
91
|
+
"pr --wait fences a stale same-head pass",
|
|
92
|
+
],
|
|
90
93
|
};
|
|
91
94
|
function densityFromVariant(variant) {
|
|
92
95
|
if (variant === "mini" || variant === "nano")
|
package/package.json
CHANGED