@mstar-harness/engine 3.6.0-alpha.3 → 3.6.0-alpha.4

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/engine.js CHANGED
@@ -5905,6 +5905,9 @@ function prReviewSeatPrompt(opts) {
5905
5905
  if (!isAbsolute9(worktreePath)) {
5906
5906
  throw new TypeError(`prReviewSeatPrompt: worktreePath must be an absolute path - got ${JSON.stringify(opts.worktreePath)}`);
5907
5907
  }
5908
+ if (opts.diffFile !== undefined && opts.diffFile !== "" && !isAbsolute9(opts.diffFile)) {
5909
+ throw new TypeError(`prReviewSeatPrompt: diffFile must be an absolute path - got ${JSON.stringify(opts.diffFile)}`);
5910
+ }
5908
5911
  const slug = `${domain}-${seat}`;
5909
5912
  const lines = [];
5910
5913
  lines.push(`# PR review audit seat — Stage ${opts.stage}${opts.securitySeat === true ? " (security)" : ""}`);
@@ -5930,6 +5933,9 @@ function prReviewSeatPrompt(opts) {
5930
5933
  const sections = opts.stage === 1 ? tier === "quick" ? "Scoping, Evidence rules" : "Review pipeline, Worktree isolation, Scoping, Evidence rules" : "Merge class, Attack and vet, Evidence rules, Sizing & change shape";
5931
5934
  lines.push(`1. \`${prReviewRef}\` — read at least these sections: ${sections}.`);
5932
5935
  lines.push(`2. The review worktree: \`${worktreePath}\` — your ONLY working directory this session; read-only (no edits, no fixes, no stash, no commits, no posts).`);
5936
+ if (opts.diffFile) {
5937
+ lines.push(`- Read the pinned diff snapshot FIRST: \`${opts.diffFile}\` — it is the review's diff basis (already computed at setup); read it before opening files.`);
5938
+ }
5933
5939
  if (opts.stage === 2) {
5934
5940
  lines.push(`3. \`${join15(skillRoot, "references", "finding-format.md")}\` — the template every finding follows.`);
5935
5941
  if (opts.securitySeat === true) {
@@ -6264,6 +6270,7 @@ export {
6264
6270
  KNOWLEDGE_KNOWLEDGE_PROBLEM_TYPES,
6265
6271
  KNOWLEDGE_CATEGORY_MAP,
6266
6272
  KNOWLEDGE_BUG_PROBLEM_TYPES,
6273
+ GIT_CAPTURE_MAX_BYTES,
6267
6274
  FIVE_QUESTION_SECTIONS,
6268
6275
  DEV_TRACK_PARAMS,
6269
6276
  AUDIT_RISKS,
package/dist/index.d.ts CHANGED
@@ -40,7 +40,7 @@ export { antiRecursionPrecheck, assertDefaultBranchProtected, assertTriIdentity,
40
40
  export type { BranchProbeOptions, L1PreDispatchInput, L2PreDispatchInput, QcAlignmentAssignment, QcSnapshotAssignment, WorktreeTrack, } from "./worktree.js";
41
41
  export { assertBranchAlignment, assertControlVsFeaturePath, assertQcAlignment, l1PreDispatchCheck, l2PreDispatchCheck, singleReviewSnapshot, } from "./worktree.js";
42
42
  export type { ImplementerSessionLedger, ReviewPackageOptions, SddWorkspaceOptions, StickyRulesInput, StickyRulesResult, TaskBriefOptions, } from "./sdd.js";
43
- export { SddScriptError, assertBaseSha, implementerSessionStickyRules, readProgressLedger, reviewPackage, sddWorkspace, taskBrief, taskReportExists, } from "./sdd.js";
43
+ export { GIT_CAPTURE_MAX_BYTES, SddScriptError, assertBaseSha, implementerSessionStickyRules, readProgressLedger, reviewPackage, sddWorkspace, taskBrief, taskReportExists, } from "./sdd.js";
44
44
  export type { CompassDoc, PhaseGateOptions, PhaseGateResult, PhaseTransition, } from "./iteration.js";
45
45
  export { assertIndexRowObligations, evaluatePhaseGate, parseCompassFrontmatter, parseCompassFrontmatterText, pushCadenceProbe, validateCompassFrontmatter, } from "./iteration.js";
46
46
  export type { AppendProjectRegisterEntriesOpts, CloseProjectRegisterEntryOpts, FindingsCleanupMode, ProjectRegisterDoc, ProjectRegisterEntry, RoadmapFrontmatter, RoadmapStatus, RoadmapValidation, TechDebtCheck, TechDebtRollup, TechDebtSummary, } from "./project.js";
@@ -314,6 +314,10 @@ export type PrReviewSeatPromptOptions = {
314
314
  decidedTradeoffs?: readonly string[];
315
315
  securitySeat?: boolean;
316
316
  tier?: PrReviewTier;
317
+ /** Absolute path to the pinned diff snapshot written by `worktree-setup`
318
+ * (review artifact beside the sidecar). Non-empty → the prompt gains a
319
+ * read-first ingredient line pointing at it. */
320
+ diffFile?: string;
317
321
  };
318
322
  /**
319
323
  * Generate the read-only audit-seat prompt for one Stage 1 collect or
package/dist/sdd.d.ts CHANGED
@@ -27,6 +27,13 @@ export type ReviewPackageOptions = {
27
27
  sddDir?: string;
28
28
  cwd?: string;
29
29
  };
30
+ /**
31
+ * Git capture ceiling for `gitOut` / `reviewPackage` (qc3 W-2): Node's
32
+ * default 1 MiB `maxBuffer` ENOBUFS'd on large review ranges. 64 MiB keeps
33
+ * realistic iteration-close ranges working while bounding memory; captures
34
+ * beyond that fail as SddScriptError via the CLI.
35
+ */
36
+ export declare const GIT_CAPTURE_MAX_BYTES: number;
30
37
  /**
31
38
  * Resolve and ensure `{SDD_DIR}` = `{HARNESS_DIR}/sdd/<plan-id>/` (prints
32
39
  * the absolute path). Resolution order:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/engine",
3
- "version": "3.6.0-alpha.3",
3
+ "version": "3.6.0-alpha.4",
4
4
  "description": "Morning Star Harness Workflow Engine — deterministic workflow enforcement library (path, status, lease, dispatch, sdd, iteration, lint gates).",
5
5
  "license": "MIT",
6
6
  "repository": {