@mstar-harness/cli 3.7.2 → 3.8.0

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.
@@ -6335,12 +6335,16 @@ function reviewPackage(base, head, outFile, opts = {}) {
6335
6335
  mkdirSync6(mkdirAfterGate, { recursive: true });
6336
6336
  }
6337
6337
  const run = (args) => execFileSync3("git", args, { cwd, maxBuffer: GIT_CAPTURE_MAX_BYTES });
6338
+ const commits = run(["log", "--oneline", `${base}..${head}`]);
6339
+ if (commits.length === 0) {
6340
+ throw new SddScriptError(`review package range ${base}..${head} is empty in ${cwd} \u2014 refusing to write an empty package ` + `(run the command from the branch worktree, not the control checkout)`, 1);
6341
+ }
6338
6342
  const parts = [
6339
6343
  Buffer.from(`# Review package: ${base}..${head}
6340
6344
 
6341
6345
  ## Commits
6342
6346
  `),
6343
- run(["log", "--oneline", `${base}..${head}`]),
6347
+ commits,
6344
6348
  Buffer.from(`
6345
6349
  ## Files changed
6346
6350
  `),
@@ -14339,9 +14343,10 @@ dispatchCommand.command("validate").description("Validate an Assignment markdown
14339
14343
  if (!assignmentFile) {
14340
14344
  throw new SddScriptError("usage: dispatch validate <assignment-file> [--branch <branch>]", 2);
14341
14345
  }
14342
- const file = resolveCliPath(assignmentFile);
14346
+ const fromCwd = path14.isAbsolute(assignmentFile) ? assignmentFile : path14.resolve(process.cwd(), assignmentFile);
14347
+ const file = fs9.existsSync(fromCwd) ? fromCwd : resolveCliPath(assignmentFile);
14343
14348
  if (!fs9.existsSync(file)) {
14344
- throw new Error(`assignment file not found: ${file}`);
14349
+ throw new Error(`assignment file not found: ${assignmentFile} (tried ${fromCwd} and ${resolveCliPath(assignmentFile)})`);
14345
14350
  }
14346
14351
  const text = fs9.readFileSync(file, "utf8");
14347
14352
  const readOnly = isReadOnlyAssignmentRole(parseAssignmentFields(text).executeAs ?? "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/cli",
3
- "version": "3.7.2",
3
+ "version": "3.8.0",
4
4
  "description": "Morning Star harness CLI — installer bootstrap + mstar workflow verbs (path/status/lease/sdd/iteration/dispatch/worktree/lint/design-md/audit/compound/host/skill).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,6 +20,7 @@
20
20
  "dev": "bun run src/index.ts",
21
21
  "build": "rm -rf dist && bun build src/index.ts --target node --outfile dist/mstar-harness.js && bun ../../scripts/escape-dist-literals.ts dist/mstar-harness.js",
22
22
  "check": "bun run src/index.ts --help",
23
+ "typecheck:src": "bunx tsc --noEmit -p tsconfig.json",
23
24
  "test": "bun run --cwd ../engine build && bun run build && bun test",
24
25
  "prepublishOnly": "bun run build && bun run check"
25
26
  },