@nathapp/nax 0.77.2 → 0.77.3

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/nax.js CHANGED
@@ -17837,6 +17837,10 @@ var init_schemas3 = __esm(() => {
17837
17837
  defaultAgent: exports_external.string().nullable().default(null),
17838
17838
  model: exports_external.string().min(1, "model must be non-empty").nullable().default(null),
17839
17839
  narrative: exports_external.boolean().default(true),
17840
+ prBody: exports_external.object({
17841
+ template: exports_external.enum(["merge", "strict", "ignore"]).default("merge"),
17842
+ sectionMap: exports_external.record(exports_external.string(), exports_external.string()).default({})
17843
+ }).default({ template: "merge", sectionMap: {} }),
17840
17844
  reviewers: exports_external.object({
17841
17845
  spec: exports_external.string().nullable().default(null),
17842
17846
  quality: exports_external.string().nullable().default(null),
@@ -17856,6 +17860,7 @@ var init_schemas3 = __esm(() => {
17856
17860
  defaultAgent: null,
17857
17861
  model: null,
17858
17862
  narrative: true,
17863
+ prBody: { template: "merge", sectionMap: {} },
17859
17864
  reviewers: { spec: null, quality: null, narrative: null },
17860
17865
  escalate: { telegram: true },
17861
17866
  notify: { mode: "escalation" },
@@ -17868,6 +17873,7 @@ var init_schemas3 = __esm(() => {
17868
17873
  defaultAgent: null,
17869
17874
  model: null,
17870
17875
  narrative: true,
17876
+ prBody: { template: "merge", sectionMap: {} },
17871
17877
  reviewers: { spec: null, quality: null, narrative: null },
17872
17878
  escalate: { telegram: true },
17873
17879
  notify: { mode: "escalation" },
@@ -23598,7 +23604,7 @@ function parseFrontmatter(raw, filePath) {
23598
23604
  const doc2 = parsed ?? {};
23599
23605
  const unknownKeys = Object.keys(doc2).filter((key) => !KNOWN_FRONTMATTER_KEYS.has(key));
23600
23606
  if (unknownKeys.length > 0) {
23601
- throw new RulesFrontmatterError(`Canonical rule frontmatter declares unknown key(s): ${unknownKeys.join(", ")}. Only priority, paths, appliesTo, and stages are recognised.`, filePath);
23607
+ throw new RulesFrontmatterError(`Canonical rule frontmatter declares unknown key(s): ${unknownKeys.join(", ")}. Only priority, paths, appliesTo, stages, and description are recognised.`, filePath);
23602
23608
  }
23603
23609
  const priorityRaw = doc2.priority;
23604
23610
  let priority = FRONTMATTER_PRIORITY_DEFAULT;
@@ -23651,12 +23657,29 @@ function parseFrontmatter(raw, filePath) {
23651
23657
  }
23652
23658
  }
23653
23659
  }
23660
+ const descriptionRaw = doc2.description;
23661
+ let description;
23662
+ if (descriptionRaw !== undefined) {
23663
+ if (typeof descriptionRaw !== "string") {
23664
+ throw new RulesFrontmatterError("frontmatter.description must be a string", filePath);
23665
+ }
23666
+ if (descriptionRaw.includes(`
23667
+ `) || descriptionRaw.includes("\r")) {
23668
+ throw new RulesFrontmatterError("frontmatter.description must be a single line", filePath);
23669
+ }
23670
+ const trimmed = descriptionRaw.trim();
23671
+ if (!trimmed) {
23672
+ throw new RulesFrontmatterError("frontmatter.description cannot be empty", filePath);
23673
+ }
23674
+ description = trimmed;
23675
+ }
23654
23676
  return {
23655
23677
  content: effectiveContent.slice(close[0].length).trim(),
23656
23678
  priority,
23657
23679
  ...paths && { paths },
23658
23680
  ...appliesTo && { appliesTo },
23659
23681
  ...stages && { stages },
23682
+ ...description && { description },
23660
23683
  warnings
23661
23684
  };
23662
23685
  }
@@ -23664,7 +23687,7 @@ var KNOWN_FRONTMATTER_KEYS, FRONTMATTER_PRIORITY_DEFAULT = 100, EXTRA_KNOWN_STAG
23664
23687
  var init_rules_frontmatter = __esm(() => {
23665
23688
  init_errors();
23666
23689
  init_stage_config();
23667
- KNOWN_FRONTMATTER_KEYS = new Set(["priority", "paths", "appliesTo", "stages"]);
23690
+ KNOWN_FRONTMATTER_KEYS = new Set(["priority", "paths", "appliesTo", "stages", "description"]);
23668
23691
  EXTRA_KNOWN_STAGES = [
23669
23692
  "queue-check",
23670
23693
  "routing",
@@ -23827,6 +23850,7 @@ async function loadCanonicalRules(workdir, options = {}) {
23827
23850
  ...parsed.paths && { paths: parsed.paths },
23828
23851
  ...parsed.appliesTo && { appliesTo: parsed.appliesTo },
23829
23852
  ...parsed.stages && { stages: parsed.stages },
23853
+ ...parsed.description && { description: parsed.description },
23830
23854
  ...parsed.warnings.length > 0 && { warnings: parsed.warnings }
23831
23855
  });
23832
23856
  }
@@ -26445,6 +26469,144 @@ function isInside(root, filePath) {
26445
26469
  }
26446
26470
  var init_realpath = () => {};
26447
26471
 
26472
+ // src/utils/porcelain.ts
26473
+ function parsePorcelainForNaxPaths(porcelain) {
26474
+ const protectedPaths = [];
26475
+ if (!porcelain)
26476
+ return protectedPaths;
26477
+ for (const rawLine of porcelain.split(`
26478
+ `)) {
26479
+ if (!rawLine)
26480
+ continue;
26481
+ if (rawLine.length < 4)
26482
+ continue;
26483
+ const xStatus = rawLine[0];
26484
+ const yStatus = rawLine[1];
26485
+ if (xStatus === "?" && yStatus === "?")
26486
+ continue;
26487
+ const isDeleted = xStatus === "D" || yStatus === "D";
26488
+ const isRename = xStatus === "R" || yStatus === "R";
26489
+ if (!isDeleted && !isRename)
26490
+ continue;
26491
+ const staged = xStatus === "D" || xStatus === "R";
26492
+ const pathField = rawLine.slice(3);
26493
+ let targetPath;
26494
+ if (isRename) {
26495
+ const oldPath = splitRenameOldPath(pathField);
26496
+ if (oldPath === null)
26497
+ continue;
26498
+ targetPath = oldPath;
26499
+ } else {
26500
+ targetPath = pathField;
26501
+ }
26502
+ targetPath = unquotePorcelainPath(targetPath);
26503
+ if (!targetPath.split("/").includes(".nax"))
26504
+ continue;
26505
+ protectedPaths.push({ path: targetPath, staged });
26506
+ }
26507
+ return protectedPaths;
26508
+ }
26509
+ function unquotePorcelainPath(p) {
26510
+ if (p.length < 2 || p[0] !== '"' || p[p.length - 1] !== '"')
26511
+ return p;
26512
+ const inner = p.slice(1, -1);
26513
+ const bytes = [];
26514
+ for (let i = 0;i < inner.length; i++) {
26515
+ const c = inner[i];
26516
+ if (c !== "\\" || i + 1 >= inner.length) {
26517
+ bytes.push(c.charCodeAt(0));
26518
+ continue;
26519
+ }
26520
+ const next = inner[i + 1];
26521
+ if (next === '"' || next === "\\") {
26522
+ bytes.push(next.charCodeAt(0));
26523
+ i++;
26524
+ continue;
26525
+ }
26526
+ if (next === "a") {
26527
+ bytes.push(7);
26528
+ i++;
26529
+ continue;
26530
+ }
26531
+ if (next === "b") {
26532
+ bytes.push(8);
26533
+ i++;
26534
+ continue;
26535
+ }
26536
+ if (next === "t") {
26537
+ bytes.push(9);
26538
+ i++;
26539
+ continue;
26540
+ }
26541
+ if (next === "n") {
26542
+ bytes.push(10);
26543
+ i++;
26544
+ continue;
26545
+ }
26546
+ if (next === "v") {
26547
+ bytes.push(11);
26548
+ i++;
26549
+ continue;
26550
+ }
26551
+ if (next === "f") {
26552
+ bytes.push(12);
26553
+ i++;
26554
+ continue;
26555
+ }
26556
+ if (next === "r") {
26557
+ bytes.push(13);
26558
+ i++;
26559
+ continue;
26560
+ }
26561
+ if (next >= "0" && next <= "7") {
26562
+ let j = i + 1;
26563
+ let digits = "";
26564
+ while (j < inner.length && digits.length < 3 && inner[j] >= "0" && inner[j] <= "7") {
26565
+ digits += inner[j];
26566
+ j++;
26567
+ }
26568
+ const byte = Number.parseInt(digits, 8);
26569
+ if (!Number.isNaN(byte)) {
26570
+ bytes.push(byte);
26571
+ i = j - 1;
26572
+ continue;
26573
+ }
26574
+ }
26575
+ if (next === "x") {
26576
+ const slice = inner.slice(i + 2, i + 4);
26577
+ if (slice.length === 2 && /^[0-9a-fA-F]{2}$/.test(slice)) {
26578
+ bytes.push(Number.parseInt(slice, 16));
26579
+ i += 3;
26580
+ continue;
26581
+ }
26582
+ }
26583
+ bytes.push(c.charCodeAt(0));
26584
+ }
26585
+ return new TextDecoder("utf-8").decode(new Uint8Array(bytes));
26586
+ }
26587
+ function splitRenameOldPath(pathField) {
26588
+ let start = 0;
26589
+ if (pathField.startsWith('"')) {
26590
+ let i = 1;
26591
+ while (i < pathField.length) {
26592
+ const c = pathField[i];
26593
+ if (c === "\\" && i + 1 < pathField.length) {
26594
+ i += 2;
26595
+ continue;
26596
+ }
26597
+ if (c === '"') {
26598
+ start = i + 1;
26599
+ break;
26600
+ }
26601
+ i++;
26602
+ }
26603
+ }
26604
+ const arrowIdx = pathField.indexOf(" -> ", start);
26605
+ if (arrowIdx < 0)
26606
+ return null;
26607
+ return pathField.slice(0, arrowIdx);
26608
+ }
26609
+
26448
26610
  // src/utils/git.ts
26449
26611
  async function getGitRoot(workdir) {
26450
26612
  try {
@@ -26589,6 +26751,32 @@ async function autoCommitIfDirty(workdir, stage, role, storyId, blockedWorktrees
26589
26751
  dirtyFiles: statusOutput.trim().split(`
26590
26752
  `).length
26591
26753
  });
26754
+ const naxPaths = parsePorcelainForNaxPaths(statusOutput);
26755
+ for (const { path: protectedPath, staged } of naxPaths) {
26756
+ logger?.error(stage, "Restoring deleted .nax/ path before auto-commit", {
26757
+ storyId,
26758
+ role,
26759
+ path: protectedPath,
26760
+ staged
26761
+ });
26762
+ const checkoutArgs = staged ? ["git", "checkout", "HEAD", "--", protectedPath] : ["git", "checkout", "--", protectedPath];
26763
+ const checkoutProc = _gitDeps.spawn(checkoutArgs, {
26764
+ cwd: realGitRoot,
26765
+ stdout: "pipe",
26766
+ stderr: "pipe"
26767
+ });
26768
+ const checkoutExit = await checkoutProc.exited;
26769
+ if (checkoutExit !== 0) {
26770
+ const stderr = await new Response(checkoutProc.stderr).text();
26771
+ logger?.error(stage, "Failed to restore .nax/ path before auto-commit", {
26772
+ storyId,
26773
+ role,
26774
+ path: protectedPath,
26775
+ exitCode: checkoutExit,
26776
+ stderr: stderr.trim()
26777
+ });
26778
+ }
26779
+ }
26592
26780
  const addProc = _gitDeps.spawn(["git", "add", "-A"], { cwd: realGitRoot, stdout: "pipe", stderr: "pipe" });
26593
26781
  await addProc.exited;
26594
26782
  const commitProc = _gitDeps.spawn(["git", "commit", "-m", `chore(${storyId}): auto-commit after ${role} session`], {
@@ -33415,6 +33603,20 @@ Include the story ID when known \u2014 \`feat(<story-id>): <description>\`.
33415
33603
  When the story is ambiguous, pick an interpretation, proceed, and document the choice in the commit body under \`Assumptions:\`. Do not invent requirements; do not silently choose when the story is genuinely under-specified \u2014 note it.`;
33416
33604
  }
33417
33605
 
33606
+ // src/prompts/sections/nax-artifacts.ts
33607
+ function buildNaxArtifactsSection(role, _variant, _isolation) {
33608
+ return `# .nax/ artifact immutability
33609
+
33610
+ Files under \`.nax/\` are nax's own artifacts (acceptance scaffolds, plan state, generated acceptance
33611
+ tests). They must NEVER be moved, renamed, or deleted \u2014 \`.nax/\` is a tool-managed directory and
33612
+ modifying it breaks the orchestrator.
33613
+
33614
+ - A test under \`.nax/\` is NOT a reason to skip writing source-tree tests. \`.nax/\` is generated
33615
+ scaffolding, not real coverage of the package's code.
33616
+ - A source-tree test is NOT a reason to remove a test under \`.nax/\`. The two serve different
33617
+ purposes and must coexist.`;
33618
+ }
33619
+
33418
33620
  // src/prompts/sections/test-quality.ts
33419
33621
  function buildTestQualitySection(role, variant, storyId) {
33420
33622
  const authors = AUTHORING_ROLES.has(role) || role === "implementer" && variant === "lite";
@@ -33603,6 +33805,9 @@ class TddPromptBuilder {
33603
33805
  const guardrails = buildBehavioralGuardrailsSection(this.role, guardrailLevel, guardrailVariant, guardrailIsolation);
33604
33806
  if (guardrails)
33605
33807
  acc.add(this.s("guardrails", guardrails));
33808
+ const naxArtifacts = buildNaxArtifactsSection(this.role, guardrailVariant, guardrailIsolation);
33809
+ if (naxArtifacts)
33810
+ acc.add(this.s("nax-artifacts", naxArtifacts));
33606
33811
  const testQuality = buildTestQualitySection(this.role, this.options.variant, this.story_?.id);
33607
33812
  if (testQuality)
33608
33813
  acc.add(this.s("test-quality", testQuality));
@@ -43507,12 +43712,23 @@ var init_mutation_check = __esm(() => {
43507
43712
  candidates: 0,
43508
43713
  checked: false
43509
43714
  };
43510
- const record2 = (result) => {
43715
+ const logger = getLogger();
43716
+ const record2 = (result, skipReason) => {
43511
43717
  if (ctx.storyId) {
43512
43718
  ctx.runtime?.mutationSummaries?.set(ctx.storyId, { storyId: ctx.storyId, ...result });
43513
43719
  }
43720
+ if (result.checked) {
43721
+ logger.info("mutation-check", "Mutation spot-check outcomes", {
43722
+ storyId: input.storyId,
43723
+ killed: result.outcomes.killed,
43724
+ survived: result.outcomes.survived,
43725
+ errored: result.outcomes.errored,
43726
+ candidates: result.candidates,
43727
+ ...skipReason ? { skipReason } : {},
43728
+ ...result.revertFailed ? { revertFailed: true } : {}
43729
+ });
43730
+ }
43514
43731
  };
43515
- const logger = getLogger();
43516
43732
  if (!cfg?.enabled) {
43517
43733
  if (await mayHaveJournal([input.workdir, input.repoRoot])) {
43518
43734
  await sweepLeftoverMutants(await deps.getGitRoot(input.workdir) ?? input.workdir, input.storyId);
@@ -43550,7 +43766,7 @@ var init_mutation_check = __esm(() => {
43550
43766
  logger.warn("mutation-check", "Failed to obtain changed-line ranges \u2014 skipping mutation spot-check", {
43551
43767
  storyId: input.storyId
43552
43768
  });
43553
- record2({ ...emptyOutput, checked: true });
43769
+ record2({ ...emptyOutput, checked: true }, "changed-line-ranges-unavailable");
43554
43770
  return { success: true, ...emptyOutput, checked: true };
43555
43771
  }
43556
43772
  const survivors = [];
@@ -44742,7 +44958,7 @@ var package_default;
44742
44958
  var init_package = __esm(() => {
44743
44959
  package_default = {
44744
44960
  name: "@nathapp/nax",
44745
- version: "0.77.2",
44961
+ version: "0.77.3",
44746
44962
  description: "AI Coding Agent Orchestrator \u2014 loops until done",
44747
44963
  type: "module",
44748
44964
  bin: {
@@ -44806,7 +45022,7 @@ var init_package = __esm(() => {
44806
45022
  "@biomejs/biome": "^1.9.4",
44807
45023
  "@types/bun": "^1.3.8",
44808
45024
  "react-devtools-core": "^7.0.1",
44809
- typescript: "^5.7.3"
45025
+ typescript: "^7.0.2"
44810
45026
  },
44811
45027
  license: "MIT",
44812
45028
  author: "William Khoo",
@@ -44846,8 +45062,8 @@ var init_version = __esm(() => {
44846
45062
  NAX_VERSION = package_default.version;
44847
45063
  NAX_COMMIT = (() => {
44848
45064
  try {
44849
- if (/^[0-9a-f]{6,10}$/.test("888b55c1"))
44850
- return "888b55c1";
45065
+ if (/^[0-9a-f]{6,10}$/.test("e42ce962"))
45066
+ return "e42ce962";
44851
45067
  } catch {}
44852
45068
  try {
44853
45069
  const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
@@ -46905,6 +47121,8 @@ evidence that an acceptance criterion is already tested, and you may NOT emit UN
46905
47121
  The only valid response to a missing-test finding is to
46906
47122
  author a real test under the package's resolved test path.
46907
47123
 
47124
+ ${buildNaxArtifactsSection("implementer")}
47125
+
46908
47126
  ## Test-file edit exceptions
46909
47127
 
46910
47128
  The "do not modify test files" rule has ${countWord} narrow escape valves. Each requires a
@@ -59161,6 +59379,7 @@ __export(exports_acceptance2, {
59161
59379
  acceptanceStage: () => acceptanceStage,
59162
59380
  _acceptanceStageDeps: () => _acceptanceStageDeps
59163
59381
  });
59382
+ import path12 from "path";
59164
59383
  function areAllStoriesComplete(ctx) {
59165
59384
  const counts = countStories(ctx.prd);
59166
59385
  const totalComplete = counts.passed + counts.failed + counts.skipped;
@@ -59205,18 +59424,42 @@ var init_acceptance3 = __esm(() => {
59205
59424
  packageDir: ctx.workdir
59206
59425
  }
59207
59426
  ];
59427
+ const storiesByPackageDir = new Map;
59428
+ for (const s of ctx.prd.userStories) {
59429
+ if (s.id.startsWith("US-FIX-") || s.status === "decomposed")
59430
+ continue;
59431
+ const wd = s.workdir ?? "";
59432
+ const pkgDir = wd ? path12.join(ctx.workdir, wd) : ctx.workdir;
59433
+ storiesByPackageDir.set(pkgDir, (storiesByPackageDir.get(pkgDir) ?? 0) + 1);
59434
+ }
59208
59435
  const allFailedACs = [];
59209
59436
  const allFindings = [];
59210
59437
  const failedPackages = [];
59438
+ const missingTargets = [];
59211
59439
  const allOutputParts = [];
59212
59440
  let anyError = false;
59213
59441
  let errorExitCode = 0;
59214
59442
  let hardeningPromoted = 0;
59215
- for (const { testPath, packageDir, testFramework, commandOverride } of testGroups) {
59443
+ for (const { testPath, packageDir, testFramework, commandOverride, storyCount, acceptanceEnabled } of testGroups) {
59216
59444
  const testFile = Bun.file(testPath);
59217
59445
  const exists = await testFile.exists();
59218
59446
  if (!exists) {
59219
- logger.warn("acceptance", "Acceptance test file not found \u2014 skipping", { storyId: ctx.story.id, testPath });
59447
+ const resolvedStoryCount = storyCount ?? storiesByPackageDir.get(packageDir) ?? 0;
59448
+ const resolvedAcceptanceEnabled = acceptanceEnabled ?? true;
59449
+ if (resolvedStoryCount > 0 && resolvedAcceptanceEnabled) {
59450
+ logger.warn("acceptance", "Required acceptance test file missing", {
59451
+ storyId: ctx.story.id,
59452
+ testPath,
59453
+ packageDir
59454
+ });
59455
+ missingTargets.push(packageDir);
59456
+ } else {
59457
+ logger.warn("acceptance", "Acceptance test file not found \u2014 skipping", {
59458
+ storyId: ctx.story.id,
59459
+ testPath,
59460
+ packageDir
59461
+ });
59462
+ }
59220
59463
  continue;
59221
59464
  }
59222
59465
  const resolvedFramework = testFramework ?? ctx.config.project?.testFramework;
@@ -59293,6 +59536,29 @@ ${stderr}`;
59293
59536
  const combinedOutput = allOutputParts.join(`
59294
59537
  `);
59295
59538
  const durationMs = Date.now() - startTime;
59539
+ if (missingTargets.length > 0) {
59540
+ ctx.acceptanceFailures = {
59541
+ failedACs: allFailedACs,
59542
+ findings: allFindings,
59543
+ testOutput: combinedOutput,
59544
+ failedPackages,
59545
+ missingTargets
59546
+ };
59547
+ logger.info("acceptance", "verdict", {
59548
+ storyId: ctx.story.id,
59549
+ packageDir: ctx.workdir,
59550
+ passed: false,
59551
+ failedACs: allFailedACs,
59552
+ retries: ctx.acceptanceRetries ?? 0,
59553
+ hardeningPromoted,
59554
+ durationMs,
59555
+ missingTargets
59556
+ });
59557
+ return {
59558
+ action: "fail",
59559
+ reason: `Required acceptance test files are missing for packages: ${missingTargets.join(", ")}`
59560
+ };
59561
+ }
59296
59562
  if (allFailedACs.length === 0) {
59297
59563
  logger.info("acceptance", "All acceptance tests passed", { storyId: ctx.story.id });
59298
59564
  const hardeningEnabled = ctx.config.acceptance?.hardening?.enabled !== false;
@@ -59440,7 +59706,7 @@ __export(exports_acceptance_setup, {
59440
59706
  acceptanceSetupStage: () => acceptanceSetupStage,
59441
59707
  _acceptanceSetupDeps: () => _acceptanceSetupDeps
59442
59708
  });
59443
- import path12 from "path";
59709
+ import path13 from "path";
59444
59710
  function computeACFingerprint(criteria) {
59445
59711
  const sorted = [...criteria].sort().join(`
59446
59712
  `);
@@ -59451,7 +59717,7 @@ function computeACFingerprint(criteria) {
59451
59717
  async function runAcceptanceSetup(ctx, featureDir, phaseStartTime) {
59452
59718
  const language = ctx.config.project?.language;
59453
59719
  const testPathConfig = ctx.config.acceptance.testPath;
59454
- const metaPath = path12.join(featureDir, "acceptance-meta.json");
59720
+ const metaPath = path13.join(featureDir, "acceptance-meta.json");
59455
59721
  const allCriteria = ctx.prd.userStories.filter((s) => !s.id.startsWith("US-FIX-") && s.status !== "decomposed").flatMap((s) => s.acceptanceCriteria);
59456
59722
  const featureName = ctx.prd.feature ?? ctx.prd.featureName;
59457
59723
  const groups = await groupStoriesByPackage(ctx.prd, ctx.workdir, featureName, testPathConfig, language);
@@ -59578,7 +59844,7 @@ async function runAcceptanceSetup(ctx, featureDir, phaseStartTime) {
59578
59844
  testable: c.testable,
59579
59845
  storyId: c.storyId
59580
59846
  })), null, 2);
59581
- await _acceptanceSetupDeps.writeFile(path12.join(featureDir, "acceptance-refined.json"), refinedJsonContent);
59847
+ await _acceptanceSetupDeps.writeFile(path13.join(featureDir, "acceptance-refined.json"), refinedJsonContent);
59582
59848
  }
59583
59849
  const fingerprint2 = computeACFingerprint(allCriteria);
59584
59850
  await _acceptanceSetupDeps.writeMeta(metaPath, {
@@ -59592,7 +59858,7 @@ async function runAcceptanceSetup(ctx, featureDir, phaseStartTime) {
59592
59858
  }
59593
59859
  const acceptanceTestPaths = [];
59594
59860
  for (const g of groups) {
59595
- const relativeWorkdir = path12.relative(ctx.projectDir, g.packageDir);
59861
+ const relativeWorkdir = path13.relative(ctx.projectDir, g.packageDir);
59596
59862
  let groupConfig = ctx.config;
59597
59863
  if (relativeWorkdir && relativeWorkdir !== ".") {
59598
59864
  try {
@@ -59605,7 +59871,9 @@ async function runAcceptanceSetup(ctx, featureDir, phaseStartTime) {
59605
59871
  testPath: g.testPath,
59606
59872
  packageDir: g.packageDir,
59607
59873
  testFramework: groupConfig.project?.testFramework,
59608
- commandOverride: groupConfig.acceptance.command
59874
+ commandOverride: groupConfig.acceptance.command,
59875
+ storyCount: g.stories.length,
59876
+ acceptanceEnabled: groupConfig.acceptance.enabled
59609
59877
  });
59610
59878
  }
59611
59879
  ctx.acceptanceTestPaths = acceptanceTestPaths;
@@ -59722,7 +59990,7 @@ var init_acceptance_setup = __esm(() => {
59722
59990
  },
59723
59991
  autoCommitIfDirty,
59724
59992
  loadGroupConfig: async (projectDir, relativeWorkdir) => {
59725
- return loadConfigForWorkdir(path12.join(projectDir, ".nax", "config.json"), relativeWorkdir || undefined);
59993
+ return loadConfigForWorkdir(path13.join(projectDir, ".nax", "config.json"), relativeWorkdir || undefined);
59726
59994
  },
59727
59995
  runTest: async (_testPath, _workdir, _cmd) => {
59728
59996
  const cmd = _cmd;
@@ -60359,7 +60627,7 @@ var init_story_context = __esm(() => {
60359
60627
 
60360
60628
  // src/execution/lock.ts
60361
60629
  import { unlink as unlink2 } from "fs/promises";
60362
- import path13 from "path";
60630
+ import path14 from "path";
60363
60631
  function getSafeLogger3() {
60364
60632
  try {
60365
60633
  return getLogger();
@@ -60376,7 +60644,7 @@ function isProcessAlive(pid) {
60376
60644
  }
60377
60645
  }
60378
60646
  async function acquireLock(workdir) {
60379
- const lockPath = path13.join(workdir, "nax.lock");
60647
+ const lockPath = path14.join(workdir, "nax.lock");
60380
60648
  const lockFile = Bun.file(lockPath);
60381
60649
  try {
60382
60650
  const exists = await lockFile.exists();
@@ -60428,7 +60696,7 @@ async function acquireLock(workdir) {
60428
60696
  }
60429
60697
  }
60430
60698
  async function releaseLock(workdir) {
60431
- const lockPath = path13.join(workdir, "nax.lock");
60699
+ const lockPath = path14.join(workdir, "nax.lock");
60432
60700
  try {
60433
60701
  await unlink2(lockPath);
60434
60702
  } catch (error48) {
@@ -63952,7 +64220,7 @@ function parseQueueFile(content) {
63952
64220
  var init_queue = () => {};
63953
64221
 
63954
64222
  // src/execution/queue-handler.ts
63955
- import path14 from "path";
64223
+ import path15 from "path";
63956
64224
  function getSafeLogger4() {
63957
64225
  try {
63958
64226
  return getLogger();
@@ -63961,8 +64229,8 @@ function getSafeLogger4() {
63961
64229
  }
63962
64230
  }
63963
64231
  async function readQueueFile(workdir) {
63964
- const queuePath = path14.join(workdir, ".queue.txt");
63965
- const processingPath = path14.join(workdir, ".queue.txt.processing");
64232
+ const queuePath = path15.join(workdir, ".queue.txt");
64233
+ const processingPath = path15.join(workdir, ".queue.txt.processing");
63966
64234
  const logger = getSafeLogger4();
63967
64235
  try {
63968
64236
  const file3 = Bun.file(queuePath);
@@ -63987,7 +64255,7 @@ async function readQueueFile(workdir) {
63987
64255
  }
63988
64256
  }
63989
64257
  async function clearQueueFile(workdir) {
63990
- const processingPath = path14.join(workdir, ".queue.txt.processing");
64258
+ const processingPath = path15.join(workdir, ".queue.txt.processing");
63991
64259
  const logger = getSafeLogger4();
63992
64260
  try {
63993
64261
  const file3 = Bun.file(processingPath);
@@ -64007,7 +64275,7 @@ var init_queue_handler = __esm(() => {
64007
64275
  });
64008
64276
 
64009
64277
  // src/pipeline/stages/queue-check.ts
64010
- import path15 from "path";
64278
+ import path16 from "path";
64011
64279
  var queueCheckStage;
64012
64280
  var init_queue_check = __esm(() => {
64013
64281
  init_config();
@@ -64061,10 +64329,10 @@ var init_queue_check = __esm(() => {
64061
64329
  }
64062
64330
  if (cmd.type === "INJECT") {
64063
64331
  try {
64064
- if (path15.isAbsolute(cmd.storyFile)) {
64332
+ if (path16.isAbsolute(cmd.storyFile)) {
64065
64333
  throw new NaxError(`INJECT storyFile must be a relative path within the workspace: ${cmd.storyFile}`, "INJECT_PATH_ABSOLUTE", { stage: "queue-check", storyId: ctx.story?.id ?? "unknown", storyFile: cmd.storyFile });
64066
64334
  }
64067
- const storyFilePath = validateFilePath(path15.join(ctx.workdir, cmd.storyFile), ctx.workdir);
64335
+ const storyFilePath = validateFilePath(path16.join(ctx.workdir, cmd.storyFile), ctx.workdir);
64068
64336
  const raw = await Bun.file(storyFilePath).json();
64069
64337
  const existingIds = new Set(ctx.prd.userStories.map((s) => s.id));
64070
64338
  const story = validateInjectedStory(raw, existingIds);
@@ -64878,11 +65146,11 @@ __export(exports_init_context, {
64878
65146
  generateContextTemplate: () => generateContextTemplate
64879
65147
  });
64880
65148
  import { basename as basename12, join as join56 } from "path";
64881
- async function bunFileExists(path16) {
64882
- return Bun.file(path16).exists();
65149
+ async function bunFileExists(path17) {
65150
+ return Bun.file(path17).exists();
64883
65151
  }
64884
- async function bunMkdirp(path16) {
64885
- const proc = Bun.spawn(["mkdir", "-p", path16]);
65152
+ async function bunMkdirp(path17) {
65153
+ const proc = Bun.spawn(["mkdir", "-p", path17]);
64886
65154
  await proc.exited;
64887
65155
  }
64888
65156
  async function findFiles(dir, maxFiles = 200) {
@@ -64948,8 +65216,8 @@ async function detectEntryPoints(projectRoot) {
64948
65216
  const candidates = ["src/index.ts", "src/main.ts", "main.go", "src/lib.rs"];
64949
65217
  const found = [];
64950
65218
  for (const candidate of candidates) {
64951
- const path16 = join56(projectRoot, candidate);
64952
- if (await bunFileExists(path16)) {
65219
+ const path17 = join56(projectRoot, candidate);
65220
+ if (await bunFileExists(path17)) {
64953
65221
  found.push(candidate);
64954
65222
  }
64955
65223
  }
@@ -64959,8 +65227,8 @@ async function detectConfigFiles(projectRoot) {
64959
65227
  const candidates = ["tsconfig.json", "biome.json", "turbo.json", ".env.example"];
64960
65228
  const found = [];
64961
65229
  for (const candidate of candidates) {
64962
- const path16 = join56(projectRoot, candidate);
64963
- if (await bunFileExists(path16)) {
65230
+ const path17 = join56(projectRoot, candidate);
65231
+ if (await bunFileExists(path17)) {
64964
65232
  found.push(candidate);
64965
65233
  }
64966
65234
  }
@@ -65702,10 +65970,10 @@ var init_setup_analyze = __esm(() => {
65702
65970
  init_workspace();
65703
65971
  CANONICAL_SCRIPTS = ["build", "test", "lint", "type-check", "lint:fix"];
65704
65972
  _analyzeRepoDeps = {
65705
- fileExists: async (path16) => Bun.file(path16).exists(),
65706
- readJson: async (path16) => {
65973
+ fileExists: async (path17) => Bun.file(path17).exists(),
65974
+ readJson: async (path17) => {
65707
65975
  try {
65708
- const f = Bun.file(path16);
65976
+ const f = Bun.file(path17);
65709
65977
  if (!await f.exists())
65710
65978
  return null;
65711
65979
  return JSON.parse(await f.text());
@@ -65760,9 +66028,9 @@ async function fillScripts(workdir, analysis) {
65760
66028
  var TYPE_CHECK_KEY = "type-check", TYPE_CHECK_SCRIPT = "tsc --noEmit -p tsconfig.json", TYPE_CHECK_TURBO_PASSTHROUGH = "turbo run type-check", _fillScriptsDeps;
65761
66029
  var init_setup_fill = __esm(() => {
65762
66030
  _fillScriptsDeps = {
65763
- readJson: async (path16) => {
66031
+ readJson: async (path17) => {
65764
66032
  try {
65765
- const f = Bun.file(path16);
66033
+ const f = Bun.file(path17);
65766
66034
  if (!await f.exists())
65767
66035
  return null;
65768
66036
  return JSON.parse(await f.text());
@@ -65770,8 +66038,8 @@ var init_setup_fill = __esm(() => {
65770
66038
  return null;
65771
66039
  }
65772
66040
  },
65773
- writeFile: async (path16, content) => {
65774
- await Bun.write(path16, content);
66041
+ writeFile: async (path17, content) => {
66042
+ await Bun.write(path17, content);
65775
66043
  }
65776
66044
  };
65777
66045
  });
@@ -65830,9 +66098,9 @@ async function writeSetupConfig(workdir, config2, monoConfigs, _opts, deps = _wr
65830
66098
  var _writeSetupDeps;
65831
66099
  var init_setup_write = __esm(() => {
65832
66100
  _writeSetupDeps = {
65833
- writeFile: (path16, content) => Bun.write(path16, content).then(() => {}),
65834
- mkdir: async (path16) => {
65835
- const proc = Bun.spawn(["mkdir", "-p", path16]);
66101
+ writeFile: (path17, content) => Bun.write(path17, content).then(() => {}),
66102
+ mkdir: async (path17) => {
66103
+ const proc = Bun.spawn(["mkdir", "-p", path17]);
65836
66104
  await proc.exited;
65837
66105
  }
65838
66106
  };
@@ -65916,7 +66184,7 @@ var init_setup = __esm(() => {
65916
66184
  },
65917
66185
  generateSetupPlan: (ctx, analysis) => generateSetupPlan(ctx, analysis),
65918
66186
  runGate: (workdir, config2) => runSetupGate(workdir, config2),
65919
- fileExists: (path16) => Bun.file(path16).exists(),
66187
+ fileExists: (path17) => Bun.file(path17).exists(),
65920
66188
  writeSetupConfig: (workdir, config2, monoConfigs, opts) => writeSetupConfig(workdir, config2, monoConfigs, opts),
65921
66189
  stdout: (msg) => {
65922
66190
  process.stdout.write(`${msg}
@@ -65972,6 +66240,130 @@ var init_forge = __esm(() => {
65972
66240
  URL_REGEX = /https?:\/\/\S+/;
65973
66241
  });
65974
66242
 
66243
+ // flows/nax-finish/pr-template-merge.ts
66244
+ function normalizeHeading(heading) {
66245
+ return heading.toLowerCase().replace(/[^a-z0-9\s]/g, " ").replace(/\s+/g, " ").trim();
66246
+ }
66247
+ function cleanTemplateText(text) {
66248
+ return text.replace(HTML_COMMENT_RE, "").split(`
66249
+ `).filter((line) => !DANGLING_ISSUE_RE.test(line) && !UNCHECKED_BOX_RE.test(line)).map((line) => line.trimEnd()).join(`
66250
+ `).trim();
66251
+ }
66252
+ function parseTemplate(rawText) {
66253
+ const text = rawText.replace(/\r\n/g, `
66254
+ `);
66255
+ const frontmatterMatch = FRONTMATTER_RE.exec(text);
66256
+ const frontmatter = frontmatterMatch ? frontmatterMatch[0].trimEnd() : "";
66257
+ const rest = frontmatterMatch ? text.slice(frontmatterMatch[0].length) : text;
66258
+ const preambleLines = [];
66259
+ const sections2 = [];
66260
+ let current = null;
66261
+ for (const line of rest.split(`
66262
+ `)) {
66263
+ const heading = HEADING_RE.exec(line);
66264
+ if (heading) {
66265
+ if (current)
66266
+ sections2.push({ heading: current.heading, body: current.lines.join(`
66267
+ `) });
66268
+ current = { heading: heading[1], lines: [] };
66269
+ continue;
66270
+ }
66271
+ if (current)
66272
+ current.lines.push(line);
66273
+ else
66274
+ preambleLines.push(line);
66275
+ }
66276
+ if (current)
66277
+ sections2.push({ heading: current.heading, body: current.lines.join(`
66278
+ `) });
66279
+ return { frontmatter, preamble: preambleLines.join(`
66280
+ `), sections: sections2 };
66281
+ }
66282
+ function renderSection2(heading, body) {
66283
+ if (heading.length === 0)
66284
+ return body;
66285
+ return body.length === 0 ? `## ${heading}` : `## ${heading}
66286
+
66287
+ ${body}`;
66288
+ }
66289
+ function renderSections(sections2) {
66290
+ return sections2.filter((s) => s.body.trim().length > 0).map((s) => renderSection2(s.heading, s.body.trim())).join(`
66291
+
66292
+ `).trim();
66293
+ }
66294
+ function mergeTemplate(template, sections2, opts = {}) {
66295
+ const mode = opts.mode ?? "merge";
66296
+ if (mode === "ignore" || !template || template.trim().length === 0)
66297
+ return renderSections(sections2);
66298
+ const parsed = parseTemplate(template);
66299
+ if (parsed.sections.length === 0)
66300
+ return renderSections(sections2);
66301
+ const aliases = { ...DEFAULT_SECTION_ALIASES };
66302
+ for (const [heading, key] of Object.entries(opts.sectionMap ?? {}))
66303
+ aliases[normalizeHeading(heading)] = key;
66304
+ const fillable = sections2.filter((s) => s.heading.length > 0 && s.body.trim().length > 0);
66305
+ const consumed = new Set;
66306
+ const parts = [];
66307
+ if (parsed.frontmatter.length > 0)
66308
+ parts.push(parsed.frontmatter);
66309
+ const preamble = cleanTemplateText(parsed.preamble);
66310
+ if (preamble.length > 0)
66311
+ parts.push(preamble);
66312
+ for (const templateSection of parsed.sections) {
66313
+ const key = aliases[normalizeHeading(templateSection.heading)];
66314
+ const match = key ? fillable.find((s) => s.key === key && !consumed.has(s.key)) : undefined;
66315
+ if (match) {
66316
+ consumed.add(match.key);
66317
+ parts.push(renderSection2(templateSection.heading, match.body.trim()));
66318
+ } else if (mode === "strict") {
66319
+ parts.push(renderSection2(templateSection.heading, ""));
66320
+ }
66321
+ }
66322
+ for (const section of sections2) {
66323
+ if (consumed.has(section.key) || section.body.trim().length === 0)
66324
+ continue;
66325
+ parts.push(renderSection2(section.heading, section.body.trim()));
66326
+ }
66327
+ return parts.join(`
66328
+
66329
+ `).trim();
66330
+ }
66331
+ var DEFAULT_SECTION_ALIASES, HEADING_RE, FRONTMATTER_RE, HTML_COMMENT_RE, DANGLING_ISSUE_RE, UNCHECKED_BOX_RE;
66332
+ var init_pr_template_merge = __esm(() => {
66333
+ DEFAULT_SECTION_ALIASES = {
66334
+ what: "narrative",
66335
+ "what changed": "narrative",
66336
+ "whats changed": "narrative",
66337
+ summary: "narrative",
66338
+ description: "narrative",
66339
+ overview: "narrative",
66340
+ changes: "narrative",
66341
+ "what does this do": "narrative",
66342
+ "what does this mr do and why": "narrative",
66343
+ "what does this pr do": "narrative",
66344
+ how: "stories",
66345
+ implementation: "stories",
66346
+ "implementation details": "stories",
66347
+ "changes made": "stories",
66348
+ approach: "stories",
66349
+ design: "stories",
66350
+ testing: "verification",
66351
+ tests: "verification",
66352
+ "test plan": "verification",
66353
+ verification: "verification",
66354
+ qa: "verification",
66355
+ validation: "verification",
66356
+ "how to test": "verification",
66357
+ "how has this been tested": "verification",
66358
+ "how to set up and validate locally": "verification"
66359
+ };
66360
+ HEADING_RE = /^##[ \t]+(.+?)[ \t]*$/;
66361
+ FRONTMATTER_RE = /^---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/;
66362
+ HTML_COMMENT_RE = /<!--[\s\S]*?-->/g;
66363
+ DANGLING_ISSUE_RE = /^[ \t]*(?:closes?|fixe?s?|resolves?)[ \t]*:?[ \t]*#[ \t]*(?:\([^)]*\))?[ \t]*$/i;
66364
+ UNCHECKED_BOX_RE = /^[ \t]*[-*+][ \t]+\[[ \t]\]/;
66365
+ });
66366
+
65975
66367
  // src/plugins/builtin/auto-pr/pr-body.ts
65976
66368
  function buildTitle(ctx) {
65977
66369
  return `feat: ${ctx.feature}`;
@@ -65989,7 +66381,6 @@ function buildSummaryLines(ctx) {
65989
66381
  const failed = `${storySummary.failed} failed`;
65990
66382
  const skipped = `${storySummary.skipped} skipped`;
65991
66383
  return [
65992
- "## Run summary",
65993
66384
  `- Feature: ${ctx.feature}`,
65994
66385
  `- Stories: ${passed} / ${failed} / ${skipped}`,
65995
66386
  `- Duration: ${formatDuration3(ctx.totalDurationMs)}`,
@@ -66013,26 +66404,30 @@ function buildStoryTable(stories) {
66013
66404
  lines.push("");
66014
66405
  return lines;
66015
66406
  }
66016
- function buildBody2(ctx, template) {
66017
- const blocks = [];
66018
- blocks.push("> Auto-opened by nax \u2014 review pending. Run nax-finish before merge.");
66019
- blocks.push("");
66020
- blocks.push(...buildSummaryLines(ctx));
66021
- blocks.push(...buildStoryTable(ctx.stories));
66022
- if (template !== null) {
66023
- blocks.push("---");
66024
- blocks.push(template);
66025
- }
66026
- return blocks.join(`
66027
- `);
66407
+ function buildBody2(ctx, template, opts = {}) {
66408
+ const sections2 = [
66409
+ {
66410
+ key: "stories",
66411
+ heading: "Run summary",
66412
+ body: [...buildSummaryLines(ctx), ...buildStoryTable(ctx.stories)].join(`
66413
+ `).trim()
66414
+ }
66415
+ ];
66416
+ const merged = mergeTemplate(template, sections2, opts);
66417
+ return merged.length > 0 ? `${REVIEW_PENDING_BANNER}
66418
+
66419
+ ${merged}` : REVIEW_PENDING_BANNER;
66028
66420
  }
66029
- var SECONDS_PER_MINUTE = 60, MS_PER_SECOND = 1000;
66421
+ var SECONDS_PER_MINUTE = 60, MS_PER_SECOND = 1000, REVIEW_PENDING_BANNER = "> Auto-opened by nax \u2014 review pending. Run nax-finish before merge.";
66422
+ var init_pr_body = __esm(() => {
66423
+ init_pr_template_merge();
66424
+ });
66030
66425
 
66031
66426
  // src/plugins/builtin/auto-pr/template.ts
66032
- import * as path16 from "path";
66427
+ import * as path17 from "path";
66033
66428
  async function firstExisting(workdir, deps, paths) {
66034
66429
  for (const relPath of paths) {
66035
- const content = await deps.readText(path16.join(workdir, relPath));
66430
+ const content = await deps.readText(path17.join(workdir, relPath));
66036
66431
  if (content !== null) {
66037
66432
  return content;
66038
66433
  }
@@ -66059,7 +66454,7 @@ var init_template = __esm(() => {
66059
66454
  });
66060
66455
 
66061
66456
  // src/plugins/builtin/auto-pr/index.ts
66062
- import * as path17 from "path";
66457
+ import * as path18 from "path";
66063
66458
  async function defaultRun(cmd, opts) {
66064
66459
  const proc = Bun.spawn(cmd, { cwd: opts.cwd, stdout: "pipe", stderr: "pipe" });
66065
66460
  const [exitCode, stdout, stderr] = await Promise.all([
@@ -66069,8 +66464,8 @@ async function defaultRun(cmd, opts) {
66069
66464
  ]);
66070
66465
  return { exitCode, stdout, stderr };
66071
66466
  }
66072
- async function defaultReadText(path18) {
66073
- const file3 = Bun.file(path18);
66467
+ async function defaultReadText(path19) {
66468
+ const file3 = Bun.file(path19);
66074
66469
  if (!await file3.exists())
66075
66470
  return null;
66076
66471
  return file3.text();
@@ -66100,8 +66495,8 @@ function getStorySummary(context) {
66100
66495
  function relativePrdPath(workdir, prdPath) {
66101
66496
  if (!prdPath)
66102
66497
  return prdPath;
66103
- const rel = path17.relative(workdir, prdPath);
66104
- return rel && !rel.startsWith("..") && !path17.isAbsolute(rel) ? rel : prdPath;
66498
+ const rel = path18.relative(workdir, prdPath);
66499
+ return rel && !rel.startsWith("..") && !path18.isAbsolute(rel) ? rel : prdPath;
66105
66500
  }
66106
66501
  function toPrBodyContext(context) {
66107
66502
  const summary = getStorySummary(context);
@@ -66120,6 +66515,7 @@ function toPrBodyContext(context) {
66120
66515
  var PLUGIN_NAME = "nax-auto-pr", PLUGIN_VERSION = "0.1.0", GIT_REMOTE_CMD, _autoPrDeps, autoPrAction, autoPrPlugin;
66121
66516
  var init_auto_pr = __esm(() => {
66122
66517
  init_forge();
66518
+ init_pr_body();
66123
66519
  init_template();
66124
66520
  GIT_REMOTE_CMD = ["git", "remote", "get-url", "origin"];
66125
66521
  _autoPrDeps = {
@@ -66331,7 +66727,7 @@ var init_auto_route = __esm(() => {
66331
66727
  });
66332
66728
 
66333
66729
  // src/plugins/builtin/curator/collect.ts
66334
- import * as path18 from "path";
66730
+ import * as path19 from "path";
66335
66731
  function now() {
66336
66732
  return new Date().toISOString();
66337
66733
  }
@@ -66381,7 +66777,7 @@ function tokenCount(story) {
66381
66777
  }
66382
66778
  async function collectFromMetrics(context) {
66383
66779
  const observations = [];
66384
- const metricsPath = path18.join(context.outputDir, "metrics.json");
66780
+ const metricsPath = path19.join(context.outputDir, "metrics.json");
66385
66781
  try {
66386
66782
  const data = await readJsonFile(metricsPath);
66387
66783
  const runs = Array.isArray(data) ? data : [data];
@@ -66450,11 +66846,11 @@ function findingMessage(finding) {
66450
66846
  }
66451
66847
  async function collectFromReviewAudit(context) {
66452
66848
  const observations = [];
66453
- const auditDir = path18.join(context.outputDir, "review-audit");
66849
+ const auditDir = path19.join(context.outputDir, "review-audit");
66454
66850
  try {
66455
66851
  const glob = new Bun.Glob("**/*.json");
66456
66852
  for await (const file3 of glob.scan({ cwd: auditDir, absolute: false })) {
66457
- const fullPath = path18.join(auditDir, file3);
66853
+ const fullPath = path19.join(auditDir, file3);
66458
66854
  try {
66459
66855
  const audit = asRecord3(await readJsonFile(fullPath));
66460
66856
  if (!audit)
@@ -66500,12 +66896,12 @@ async function collectFromReviewAudit(context) {
66500
66896
  }
66501
66897
  async function collectFromContextManifests(context) {
66502
66898
  const observations = [];
66503
- const featuresDir = path18.join(context.workdir, ".nax", "features");
66899
+ const featuresDir = path19.join(context.workdir, ".nax", "features");
66504
66900
  let skippedManifests = 0;
66505
66901
  try {
66506
66902
  const glob = new Bun.Glob("*/stories/*/context-manifest-*.json");
66507
66903
  for await (const file3 of glob.scan({ cwd: featuresDir, absolute: false })) {
66508
- const fullPath = path18.join(featuresDir, file3);
66904
+ const fullPath = path19.join(featuresDir, file3);
66509
66905
  try {
66510
66906
  const parts = file3.split("/");
66511
66907
  const featureId = parts[0] ?? context.feature;
@@ -67109,10 +67505,10 @@ async function* streamJsonlLines(file3) {
67109
67505
 
67110
67506
  // src/plugins/builtin/curator/rollup.ts
67111
67507
  import { appendFile as appendFile3, mkdir as mkdir9, writeFile } from "fs/promises";
67112
- import * as path19 from "path";
67508
+ import * as path20 from "path";
67113
67509
  async function appendToRollup(observations, rollupPath) {
67114
67510
  try {
67115
- const dir = path19.dirname(rollupPath);
67511
+ const dir = path20.dirname(rollupPath);
67116
67512
  await mkdir9(dir, { recursive: true });
67117
67513
  if (observations.length === 0) {
67118
67514
  const f = Bun.file(rollupPath);
@@ -67196,7 +67592,7 @@ var init_rollup = __esm(() => {
67196
67592
 
67197
67593
  // src/plugins/builtin/curator/index.ts
67198
67594
  import { mkdir as mkdir10 } from "fs/promises";
67199
- import * as path20 from "path";
67595
+ import * as path21 from "path";
67200
67596
  function getCuratorEnabled(context) {
67201
67597
  const cfg = context.config;
67202
67598
  if (!cfg)
@@ -67270,7 +67666,7 @@ var init_curator = __esm(() => {
67270
67666
  const observations = await collectObservations(curatorContext);
67271
67667
  if (context.outputDir) {
67272
67668
  const { observationsPath, rollupPath } = resolveCuratorOutputs(curatorContext);
67273
- const runDir = path20.dirname(observationsPath);
67669
+ const runDir = path21.dirname(observationsPath);
67274
67670
  await mkdir10(runDir, { recursive: true });
67275
67671
  await Bun.write(observationsPath, observations.map((o) => JSON.stringify(o)).join(`
67276
67672
  `) + (observations.length > 0 ? `
@@ -67289,7 +67685,7 @@ var init_curator = __esm(() => {
67289
67685
  }
67290
67686
  const proposals = runHeuristics(window2.observations.length > 0 ? window2.observations : observations, thresholds);
67291
67687
  const markdown = renderProposals(proposals, context.runId, observations.length);
67292
- const proposalsMdPath = path20.join(runDir, "curator-proposals.md");
67688
+ const proposalsMdPath = path21.join(runDir, "curator-proposals.md");
67293
67689
  await Bun.write(proposalsMdPath, markdown);
67294
67690
  }
67295
67691
  return {
@@ -67339,6 +67735,10 @@ function getFinishAutoFlowConfig(ctx) {
67339
67735
  defaultAgent: resolveFlowAgent(ctx.config, autoFlow.defaultAgent),
67340
67736
  model: autoFlow.model ?? null,
67341
67737
  narrative: autoFlow.narrative !== false,
67738
+ prBody: {
67739
+ template: autoFlow.prBody?.template ?? defaults.prBody.template,
67740
+ sectionMap: autoFlow.prBody?.sectionMap ?? defaults.prBody.sectionMap
67741
+ },
67342
67742
  reviewers: {
67343
67743
  spec: autoFlow.reviewers?.spec ?? null,
67344
67744
  quality: autoFlow.reviewers?.quality ?? null,
@@ -67370,6 +67770,7 @@ var init_config2 = __esm(() => {
67370
67770
  flowPath: "flows/nax-finish/nax-finish.flow.ts",
67371
67771
  model: null,
67372
67772
  narrative: true,
67773
+ prBody: { template: "merge", sectionMap: {} },
67373
67774
  reviewers: { spec: null, quality: null, narrative: null },
67374
67775
  escalate: { telegram: true },
67375
67776
  notify: { mode: "escalation" },
@@ -67439,7 +67840,7 @@ var init_telegram2 = __esm(() => {
67439
67840
  });
67440
67841
 
67441
67842
  // src/plugins/builtin/nax-finish/index.ts
67442
- import * as path21 from "path";
67843
+ import * as path22 from "path";
67443
67844
  async function defaultRun2(cmd, opts) {
67444
67845
  const proc = Bun.spawn(cmd, { cwd: opts.cwd, env: opts.env, stdout: "pipe", stderr: "pipe" });
67445
67846
  let timedOut = false;
@@ -67465,11 +67866,11 @@ async function defaultRun2(cmd, opts) {
67465
67866
  }
67466
67867
  }
67467
67868
  function finishAuditDir(ctx) {
67468
- const root = ctx.outputDir ?? path21.join(ctx.workdir, ".nax");
67469
- return path21.join(root, "finish-audit", ctx.feature);
67869
+ const root = ctx.outputDir ?? path22.join(ctx.workdir, ".nax");
67870
+ return path22.join(root, "finish-audit", ctx.feature);
67470
67871
  }
67471
67872
  function finishResultPath(ctx, runId) {
67472
- return path21.join(finishAuditDir(ctx), `${runId}.result.json`);
67873
+ return path22.join(finishAuditDir(ctx), `${runId}.result.json`);
67473
67874
  }
67474
67875
  async function defaultReadResult(resultPath) {
67475
67876
  const f = Bun.file(resultPath);
@@ -67486,17 +67887,17 @@ function isFeatureBranch(b) {
67486
67887
  return b !== "main" && b !== "master" && b.length > 0;
67487
67888
  }
67488
67889
  async function resolveFlowPath(workdir, flowPath, deps = _naxFinishDeps) {
67489
- if (path21.isAbsolute(flowPath)) {
67890
+ if (path22.isAbsolute(flowPath)) {
67490
67891
  return await deps.exists(flowPath) ? flowPath : null;
67491
67892
  }
67492
67893
  const candidates = [];
67493
67894
  let dir = deps.moduleDir;
67494
67895
  for (let i = 0;i < PACKAGE_ROOT_SEARCH_DEPTH; i += 1) {
67495
- dir = path21.dirname(dir);
67496
- if (await deps.exists(path21.join(dir, "package.json")))
67497
- candidates.push(path21.resolve(dir, flowPath));
67896
+ dir = path22.dirname(dir);
67897
+ if (await deps.exists(path22.join(dir, "package.json")))
67898
+ candidates.push(path22.resolve(dir, flowPath));
67498
67899
  }
67499
- candidates.push(path21.resolve(workdir, flowPath));
67900
+ candidates.push(path22.resolve(workdir, flowPath));
67500
67901
  for (const candidate of candidates) {
67501
67902
  if (await deps.exists(candidate))
67502
67903
  return candidate;
@@ -67519,7 +67920,14 @@ function buildFlowArgv(flowPath, inputJson, opts = {}) {
67519
67920
  ];
67520
67921
  }
67521
67922
  function buildFlowEnv(cfg) {
67522
- const env2 = { ...process.env };
67923
+ const {
67924
+ NAX_FINISH_SPEC_PROFILE: _spec,
67925
+ NAX_FINISH_QUALITY_PROFILE: _quality,
67926
+ NAX_FINISH_NARRATIVE_PROFILE: _narrative,
67927
+ NAX_FINISH_NARRATIVE: _narrativeSwitch,
67928
+ ...rest
67929
+ } = process.env;
67930
+ const env2 = { ...rest };
67523
67931
  if (cfg.reviewers.spec)
67524
67932
  env2.NAX_FINISH_SPEC_PROFILE = cfg.reviewers.spec;
67525
67933
  if (cfg.reviewers.quality)
@@ -67567,7 +67975,8 @@ async function executeFinishFlow(options) {
67567
67975
  auditDir: finishAuditDir(ctx),
67568
67976
  runId: ctx.runId,
67569
67977
  escalateTelegram,
67570
- timeouts: { acceptanceMs: cfg.timeouts.acceptanceMs, gateMs: cfg.timeouts.gateMs }
67978
+ timeouts: { acceptanceMs: cfg.timeouts.acceptanceMs, gateMs: cfg.timeouts.gateMs },
67979
+ prBody: { template: cfg.prBody.template, sectionMap: cfg.prBody.sectionMap }
67571
67980
  };
67572
67981
  const cmd = buildFlowArgv(flowPath, JSON.stringify(input), {
67573
67982
  defaultAgent: cfg.defaultAgent,
@@ -69057,14 +69466,14 @@ var init_validator = __esm(() => {
69057
69466
 
69058
69467
  // src/plugins/loader.ts
69059
69468
  import * as fs from "fs/promises";
69060
- import * as path22 from "path";
69469
+ import * as path23 from "path";
69061
69470
  function getSafeLogger6() {
69062
69471
  return getSafeLogger();
69063
69472
  }
69064
69473
  function extractPluginName(pluginPath) {
69065
- const basename14 = path22.basename(pluginPath);
69474
+ const basename14 = path23.basename(pluginPath);
69066
69475
  if (basename14 === "index.ts" || basename14 === "index.js" || basename14 === "index.mjs") {
69067
- return path22.basename(path22.dirname(pluginPath));
69476
+ return path23.basename(path23.dirname(pluginPath));
69068
69477
  }
69069
69478
  return basename14.replace(/\.(ts|js|mjs)$/, "");
69070
69479
  }
@@ -69212,7 +69621,7 @@ async function discoverPlugins(dir, isTestFileFn) {
69212
69621
  try {
69213
69622
  const entries = await fs.readdir(dir, { withFileTypes: true });
69214
69623
  for (const entry of entries) {
69215
- const fullPath = path22.join(dir, entry.name);
69624
+ const fullPath = path23.join(dir, entry.name);
69216
69625
  if (entry.isFile()) {
69217
69626
  if (isPluginFile(entry.name, isTestFileFn)) {
69218
69627
  discovered.push({ path: fullPath });
@@ -69220,7 +69629,7 @@ async function discoverPlugins(dir, isTestFileFn) {
69220
69629
  } else if (entry.isDirectory()) {
69221
69630
  const indexPaths = ["index.ts", "index.js", "index.mjs"];
69222
69631
  for (const indexFile of indexPaths) {
69223
- const indexPath = path22.join(fullPath, indexFile);
69632
+ const indexPath = path23.join(fullPath, indexFile);
69224
69633
  try {
69225
69634
  await fs.access(indexPath);
69226
69635
  discovered.push({ path: indexPath });
@@ -69245,13 +69654,13 @@ function isPluginFile(filename, isTestFileFn) {
69245
69654
  return !FALLBACK_TEST_FILE_RE.test(filename);
69246
69655
  }
69247
69656
  function resolveModulePath(modulePath, projectRoot) {
69248
- if (path22.isAbsolute(modulePath) || !modulePath.startsWith("./") && !modulePath.startsWith("../")) {
69657
+ if (path23.isAbsolute(modulePath) || !modulePath.startsWith("./") && !modulePath.startsWith("../")) {
69249
69658
  return modulePath;
69250
69659
  }
69251
69660
  if (projectRoot) {
69252
- return path22.resolve(projectRoot, modulePath);
69661
+ return path23.resolve(projectRoot, modulePath);
69253
69662
  }
69254
- return path22.resolve(modulePath);
69663
+ return path23.resolve(modulePath);
69255
69664
  }
69256
69665
  async function loadAndValidatePlugin(initialModulePath, config2, allowedRoots = [], originalPath) {
69257
69666
  let attemptedPath = initialModulePath;
@@ -70279,7 +70688,7 @@ var init_fix_diagnosis = __esm(() => {
70279
70688
  });
70280
70689
 
70281
70690
  // src/execution/lifecycle/acceptance-helpers.ts
70282
- import path24 from "path";
70691
+ import path25 from "path";
70283
70692
  function isStubTestFile(content) {
70284
70693
  return isStubTestContent(content);
70285
70694
  }
@@ -70298,7 +70707,7 @@ function isTestLevelFailure(failedACs, totalACs, semanticVerdicts) {
70298
70707
  async function loadSpecContent(featureDir) {
70299
70708
  if (!featureDir)
70300
70709
  return "";
70301
- const specPath = path24.join(featureDir, "spec.md");
70710
+ const specPath = path25.join(featureDir, "spec.md");
70302
70711
  const specFile = Bun.file(specPath);
70303
70712
  return await specFile.exists() ? await specFile.text() : "";
70304
70713
  }
@@ -70318,13 +70727,26 @@ async function loadAcceptanceTestContent2(featureDir, testPaths, configuredTestP
70318
70727
  }
70319
70728
  if (!configuredTestPath)
70320
70729
  return [];
70321
- const resolvedPath = path24.join(featureDir, configuredTestPath);
70730
+ const resolvedPath = path25.join(featureDir, configuredTestPath);
70322
70731
  const testFile = Bun.file(resolvedPath);
70323
70732
  const content = await testFile.exists() ? await testFile.text() : "";
70324
70733
  return [{ content, path: resolvedPath }];
70325
70734
  }
70326
- function buildResult(success2, prd, totalCost2, iterations, storiesCompleted, prdDirty, failedACs, retries) {
70327
- return { success: success2, prd, totalCost: totalCost2, iterations, storiesCompleted, prdDirty, failedACs, retries };
70735
+ function buildResult(success2, prd, totalCost2, iterations, storiesCompleted, prdDirty, failedACs, retries, skippedPackages) {
70736
+ return { success: success2, prd, totalCost: totalCost2, iterations, storiesCompleted, prdDirty, failedACs, retries, skippedPackages };
70737
+ }
70738
+ function buildFailureResult(prd, totalCost2, iterations, storiesCompleted, failedACs, retries, skippedPackages) {
70739
+ return {
70740
+ success: false,
70741
+ prd,
70742
+ totalCost: totalCost2,
70743
+ iterations,
70744
+ storiesCompleted,
70745
+ prdDirty: false,
70746
+ failedACs,
70747
+ retries,
70748
+ skippedPackages
70749
+ };
70328
70750
  }
70329
70751
  async function regenerateAcceptanceTest(testPath, acceptanceContext) {
70330
70752
  const logger = getSafeLogger();
@@ -70335,7 +70757,7 @@ async function regenerateAcceptanceTest(testPath, acceptanceContext) {
70335
70757
  const { unlink: unlink3 } = await import("fs/promises");
70336
70758
  await unlink3(testPath);
70337
70759
  if (acceptanceContext.featureDir) {
70338
- const metaPath = path24.join(acceptanceContext.featureDir, "acceptance-meta.json");
70760
+ const metaPath = path25.join(acceptanceContext.featureDir, "acceptance-meta.json");
70339
70761
  try {
70340
70762
  await unlink3(metaPath);
70341
70763
  } catch {}
@@ -70349,7 +70771,7 @@ async function regenerateAcceptanceTest(testPath, acceptanceContext) {
70349
70771
  const changedFilesRaw = diffOutput.split(`
70350
70772
  `).map((f) => f.trim()).filter((f) => f.length > 0);
70351
70773
  const repoRoot = acceptanceContext.projectDir ?? workdir;
70352
- const packageDir = acceptanceContext.story.workdir && acceptanceContext.projectDir ? path24.join(acceptanceContext.projectDir, acceptanceContext.story.workdir) : undefined;
70774
+ const packageDir = acceptanceContext.story.workdir && acceptanceContext.projectDir ? path25.join(acceptanceContext.projectDir, acceptanceContext.story.workdir) : undefined;
70353
70775
  const ignoreMatchers = acceptanceContext.naxIgnoreIndex?.getMatchers(packageDir) ?? await resolveNaxIgnorePatterns(repoRoot, packageDir);
70354
70776
  const changedFiles = filterNaxInternalPaths(changedFilesRaw, ignoreMatchers);
70355
70777
  const MAX_BYTES = 51200;
@@ -70358,7 +70780,7 @@ async function regenerateAcceptanceTest(testPath, acceptanceContext) {
70358
70780
  for (const file3 of changedFiles) {
70359
70781
  if (totalBytes >= MAX_BYTES)
70360
70782
  break;
70361
- const filePath = path24.join(workdir, file3);
70783
+ const filePath = path25.join(workdir, file3);
70362
70784
  try {
70363
70785
  const fileContent = await _regenerateDeps.readFile(filePath);
70364
70786
  const remaining = MAX_BYTES - totalBytes;
@@ -70578,6 +71000,15 @@ async function runAcceptanceTestsOnce(ctx, prd, packageFilter) {
70578
71000
  if (result.action !== "fail")
70579
71001
  return { passed: true, failedACs: [], testOutput: "" };
70580
71002
  const failures = acceptanceContext.acceptanceFailures;
71003
+ if (failures?.missingTargets && failures.missingTargets.length > 0) {
71004
+ return {
71005
+ passed: false,
71006
+ failedACs: [],
71007
+ testOutput: failures.testOutput,
71008
+ failedPackages: failures.failedPackages,
71009
+ missingTargets: failures.missingTargets
71010
+ };
71011
+ }
70581
71012
  if (!failures || failures.failedACs.length === 0)
70582
71013
  return { passed: true, failedACs: [], testOutput: "" };
70583
71014
  return {
@@ -70675,10 +71106,11 @@ async function runAcceptanceLoop(ctx) {
70675
71106
  return buildResult(false, prd, totalCost2, iterations, storiesCompleted, prdDirty);
70676
71107
  }
70677
71108
  const failures = acceptanceContext.acceptanceFailures;
71109
+ const skippedPackages = acceptanceResult.skippedPackages ?? failures?.missingTargets;
70678
71110
  if (!failures || failures.failedACs.length === 0) {
70679
71111
  logger?.error("acceptance", "Acceptance tests failed but no specific failures detected");
70680
71112
  await fireHook(ctx.hooks, "on-pause", hookCtx(ctx.feature, { reason: "Acceptance tests failed (no failures detected)", cost: totalCost2 }), ctx.workdir);
70681
- return buildResult(false, prd, totalCost2, iterations, storiesCompleted, prdDirty);
71113
+ return buildFailureResult(prd, totalCost2, iterations, storiesCompleted, undefined, undefined, skippedPackages);
70682
71114
  }
70683
71115
  acceptanceRetries++;
70684
71116
  logger?.warn("acceptance", `Acceptance retry ${acceptanceRetries}/${maxRetries}`, {
@@ -70691,7 +71123,7 @@ async function runAcceptanceLoop(ctx) {
70691
71123
  reason: `Acceptance validation failed after ${maxRetries} retries: ${failures.failedACs.join(", ")}`,
70692
71124
  cost: totalCost2
70693
71125
  }), ctx.workdir);
70694
- return buildResult(false, prd, totalCost2, iterations, storiesCompleted, prdDirty, failures.failedACs, acceptanceRetries);
71126
+ return buildFailureResult(prd, totalCost2, iterations, storiesCompleted, failures.failedACs, acceptanceRetries, skippedPackages);
70695
71127
  }
70696
71128
  if (ctx.featureDir) {
70697
71129
  const existingStubPath = await findExistingAcceptanceTestPath({
@@ -70706,7 +71138,7 @@ async function runAcceptanceLoop(ctx) {
70706
71138
  storyId: firstStory?.id,
70707
71139
  stubRegenCount
70708
71140
  });
70709
- return buildResult(false, prd, totalCost2, iterations, storiesCompleted, prdDirty, failures.failedACs, acceptanceRetries);
71141
+ return buildFailureResult(prd, totalCost2, iterations, storiesCompleted, failures.failedACs, acceptanceRetries, skippedPackages);
70710
71142
  }
70711
71143
  stubRegenCount++;
70712
71144
  logger?.warn("acceptance", "Stub test detected \u2014 full regen", {
@@ -70722,7 +71154,7 @@ async function runAcceptanceLoop(ctx) {
70722
71154
  const totalACs = prd.userStories.filter((s) => !s.id.startsWith("US-FIX-")).flatMap((s) => s.acceptanceCriteria).length;
70723
71155
  if (!ctx.runtime) {
70724
71156
  logger?.error("acceptance", "Runtime not found for diagnosis", { storyId: firstStory?.id });
70725
- return buildResult(false, prd, totalCost2, iterations, storiesCompleted, prdDirty, failures.failedACs, acceptanceRetries);
71157
+ return buildFailureResult(prd, totalCost2, iterations, storiesCompleted, failures.failedACs, acceptanceRetries, skippedPackages);
70726
71158
  }
70727
71159
  const failedPkgs = failures.failedPackages && failures.failedPackages.length > 0 ? failures.failedPackages : [{ testPath: "", packageDir: ctx.workdir, output: failures.testOutput, failedACs: failures.failedACs }];
70728
71160
  const strategy = ctx.config.acceptance.fix?.strategy ?? "diagnose-first";
@@ -70765,7 +71197,7 @@ async function runAcceptanceLoop(ctx) {
70765
71197
  const finalCheck = await runAcceptanceTestsOnce(attemptCtx, prd);
70766
71198
  const success2 = finalCheck.passed && remainingFindings.length === 0;
70767
71199
  const failureMessages = !success2 ? finalCheck.failedACs.length > 0 ? finalCheck.failedACs : remainingFindings.length > 0 ? remainingFindings.map((f) => f.message) : ["acceptance validation failed (unknown cause)"] : undefined;
70768
- return buildResult(success2, prd, totalCost2, iterations, storiesCompleted, prdDirty, failureMessages, acceptanceRetries + totalInternalIterations);
71200
+ return buildResult(success2, prd, totalCost2, iterations, storiesCompleted, prdDirty, failureMessages, acceptanceRetries + totalInternalIterations, finalCheck.missingTargets);
70769
71201
  }
70770
71202
  return buildResult(false, prd, totalCost2, iterations, storiesCompleted, prdDirty);
70771
71203
  }
@@ -70842,9 +71274,9 @@ var init_scratch_purge = __esm(() => {
70842
71274
  return [];
70843
71275
  }
70844
71276
  },
70845
- fileExists: (path25) => Bun.file(path25).exists(),
70846
- readFile: (path25) => Bun.file(path25).text(),
70847
- remove: (path25) => rm(path25, { recursive: true, force: true }),
71277
+ fileExists: (path26) => Bun.file(path26).exists(),
71278
+ readFile: (path26) => Bun.file(path26).text(),
71279
+ remove: (path26) => rm(path26, { recursive: true, force: true }),
70848
71280
  move: async (src, dest) => {
70849
71281
  await mkdir12(dirname15(dest), { recursive: true });
70850
71282
  await rename(src, dest);
@@ -71734,7 +72166,7 @@ var init_headless_formatter = __esm(() => {
71734
72166
  });
71735
72167
 
71736
72168
  // src/execution/runner-completion.ts
71737
- import path25 from "path";
72169
+ import path26 from "path";
71738
72170
  async function runCompletionPhase(options) {
71739
72171
  const logger = getSafeLogger();
71740
72172
  logger?.debug("execution", "Completion phase started", {
@@ -71755,11 +72187,11 @@ async function runCompletionPhase(options) {
71755
72187
  const acceptanceStartTime = Date.now();
71756
72188
  pipelineEventBus.emit({ type: "postrun:phase:started", phase: "acceptance" });
71757
72189
  const acceptanceTestPaths = options.featureDir ? await Promise.all((await groupStoriesByPackage(options.prd, options.workdir, options.feature, options.config.acceptance.testPath, options.config.project?.language)).map(async (g) => {
71758
- const relativeWorkdir = path25.relative(options.workdir, g.packageDir);
72190
+ const relativeWorkdir = path26.relative(options.workdir, g.packageDir);
71759
72191
  let groupConfig = options.config;
71760
72192
  if (relativeWorkdir && relativeWorkdir !== ".") {
71761
72193
  try {
71762
- groupConfig = await _runnerCompletionDeps.loadConfigForWorkdir(path25.join(options.workdir, ".nax", "config.json"), relativeWorkdir);
72194
+ groupConfig = await _runnerCompletionDeps.loadConfigForWorkdir(path26.join(options.workdir, ".nax", "config.json"), relativeWorkdir);
71763
72195
  } catch (error48) {
71764
72196
  logger?.warn("execution", "Falling back to root config for package acceptance settings", {
71765
72197
  packageDir: g.packageDir,
@@ -71772,7 +72204,9 @@ async function runCompletionPhase(options) {
71772
72204
  testPath: g.testPath,
71773
72205
  packageDir: g.packageDir,
71774
72206
  testFramework: groupConfig.project?.testFramework,
71775
- commandOverride: groupConfig.acceptance.command
72207
+ commandOverride: groupConfig.acceptance.command,
72208
+ storyCount: g.stories.length,
72209
+ acceptanceEnabled: groupConfig.acceptance.enabled
71776
72210
  };
71777
72211
  })) : undefined;
71778
72212
  let acceptanceResult;
@@ -71797,7 +72231,8 @@ async function runCompletionPhase(options) {
71797
72231
  sessionManager: options.sessionManager,
71798
72232
  runtime: options.runtime,
71799
72233
  abortSignal: options.abortSignal,
71800
- acceptanceTestPaths
72234
+ acceptanceTestPaths,
72235
+ skippedPackages: postRunStatus?.acceptance?.skippedPackages
71801
72236
  });
71802
72237
  } catch (err) {
71803
72238
  pipelineEventBus.emit({
@@ -71811,7 +72246,11 @@ async function runCompletionPhase(options) {
71811
72246
  const lastRunAt = new Date().toISOString();
71812
72247
  const acceptanceDurationMs = Date.now() - acceptanceStartTime;
71813
72248
  if (acceptanceResult.success) {
71814
- options.statusWriter.setPostRunPhase("acceptance", { status: "passed", lastRunAt });
72249
+ options.statusWriter.setPostRunPhase("acceptance", {
72250
+ status: "passed",
72251
+ lastRunAt,
72252
+ skippedPackages: undefined
72253
+ });
71815
72254
  pipelineEventBus.emit({
71816
72255
  type: "postrun:phase:completed",
71817
72256
  phase: "acceptance",
@@ -71825,12 +72264,14 @@ async function runCompletionPhase(options) {
71825
72264
  });
71826
72265
  } else {
71827
72266
  acceptancePassed = false;
71828
- options.statusWriter.setPostRunPhase("acceptance", {
72267
+ const failureUpdate = {
71829
72268
  status: "failed",
71830
72269
  failedACs: acceptanceResult.failedACs ?? [],
71831
72270
  retries: acceptanceResult.retries ?? 0,
71832
- lastRunAt
71833
- });
72271
+ lastRunAt,
72272
+ skippedPackages: acceptanceResult.skippedPackages && acceptanceResult.skippedPackages.length > 0 ? acceptanceResult.skippedPackages : undefined
72273
+ };
72274
+ options.statusWriter.setPostRunPhase("acceptance", failureUpdate);
71834
72275
  pipelineEventBus.emit({
71835
72276
  type: "postrun:phase:completed",
71836
72277
  phase: "acceptance",
@@ -72031,7 +72472,7 @@ function precomputeBatchPlan(stories, maxBatchSize = DEFAULT_MAX_BATCH_SIZE2) {
72031
72472
  var DEFAULT_MAX_BATCH_SIZE2 = 4;
72032
72473
 
72033
72474
  // src/execution/ensure-package-dirs.ts
72034
- import path26 from "path";
72475
+ import path27 from "path";
72035
72476
  async function ensureStoryPackageDirs(prd, workdir, deps = _ensurePackageDirsDeps) {
72036
72477
  const logger = getSafeLogger();
72037
72478
  const relToStoryId = new Map;
@@ -72044,8 +72485,8 @@ async function ensureStoryPackageDirs(prd, workdir, deps = _ensurePackageDirsDep
72044
72485
  }
72045
72486
  const created = [];
72046
72487
  for (const [rel, storyId] of relToStoryId) {
72047
- const abs = path26.resolve(workdir, rel);
72048
- const rootWithSep = workdir.endsWith(path26.sep) ? workdir : workdir + path26.sep;
72488
+ const abs = path27.resolve(workdir, rel);
72489
+ const rootWithSep = workdir.endsWith(path27.sep) ? workdir : workdir + path27.sep;
72049
72490
  if (abs !== workdir && !abs.startsWith(rootWithSep)) {
72050
72491
  logger?.warn("execution", "Skipping story workdir outside repo root", {
72051
72492
  storyId,
@@ -73079,9 +73520,9 @@ var _quoteIntegrityDeps, CONTEXT_LINES = 3;
73079
73520
  var init_quote_integrity = __esm(() => {
73080
73521
  init_logger2();
73081
73522
  _quoteIntegrityDeps = {
73082
- readFile: async (path27) => {
73523
+ readFile: async (path28) => {
73083
73524
  try {
73084
- return await Bun.file(path27).text();
73525
+ return await Bun.file(path28).text();
73085
73526
  } catch {
73086
73527
  return null;
73087
73528
  }
@@ -73370,7 +73811,7 @@ var exports_merge_conflict_rectify = {};
73370
73811
  __export(exports_merge_conflict_rectify, {
73371
73812
  rectifyConflictedStory: () => rectifyConflictedStory
73372
73813
  });
73373
- import path27 from "path";
73814
+ import path28 from "path";
73374
73815
  async function closeStaleAcpSession(worktreePath, sessionName) {
73375
73816
  const logger = getSafeLogger();
73376
73817
  try {
@@ -73397,7 +73838,7 @@ async function rectifyConflictedStory(options) {
73397
73838
  await worktreeManager.remove(workdir, storyId);
73398
73839
  } catch {}
73399
73840
  await worktreeManager.create(workdir, storyId);
73400
- const worktreePath = path27.join(workdir, ".nax-wt", storyId);
73841
+ const worktreePath = path28.join(workdir, ".nax-wt", storyId);
73401
73842
  const { formatSessionName: formatSessionName2 } = await Promise.resolve().then(() => (init_naming(), exports_naming));
73402
73843
  const staleSessionName = formatSessionName2({
73403
73844
  workdir: worktreePath,
@@ -74097,7 +74538,7 @@ __export(exports_parallel_batch, {
74097
74538
  runParallelBatch: () => runParallelBatch,
74098
74539
  _parallelBatchDeps: () => _parallelBatchDeps
74099
74540
  });
74100
- import path28 from "path";
74541
+ import path29 from "path";
74101
74542
  async function runParallelBatch(options) {
74102
74543
  const { stories, ctx, prd } = options;
74103
74544
  const { workdir, config: config2, maxConcurrency, pipelineContext, eventEmitter, agentGetFn, hooks, pluginRegistry } = ctx;
@@ -74116,9 +74557,9 @@ async function runParallelBatch(options) {
74116
74557
  });
74117
74558
  throw error48;
74118
74559
  }
74119
- worktreePaths.set(story.id, path28.join(workdir, ".nax-wt", story.id));
74560
+ worktreePaths.set(story.id, path29.join(workdir, ".nax-wt", story.id));
74120
74561
  }
74121
- const rootConfigPath = path28.join(workdir, ".nax", "config.json");
74562
+ const rootConfigPath = path29.join(workdir, ".nax", "config.json");
74122
74563
  const profileOverride = profileOverrideFromConfig(config2);
74123
74564
  const storyEffectiveConfigs = new Map;
74124
74565
  const configResults = await Promise.allSettled(stories.filter((story) => story.workdir).map(async (story) => {
@@ -74965,7 +75406,7 @@ import { resolve as resolve21 } from "path";
74965
75406
  function countProgress(prd) {
74966
75407
  const stories = prd.userStories;
74967
75408
  const passed = stories.filter((s) => s.status === "passed").length;
74968
- const failed = stories.filter((s) => s.status === "failed").length;
75409
+ const failed = stories.filter((s) => s.status === "failed" || s.status === "regression-failed").length;
74969
75410
  const paused = stories.filter((s) => s.status === "paused").length;
74970
75411
  const blocked = stories.filter((s) => s.status === "blocked").length;
74971
75412
  const total = stories.length;
@@ -75172,7 +75613,7 @@ __export(exports_migrate, {
75172
75613
  });
75173
75614
  import { existsSync as existsSync36 } from "fs";
75174
75615
  import { mkdir as mkdir16, readdir as readdir5, rename as rename3 } from "fs/promises";
75175
- import path29 from "path";
75616
+ import path30 from "path";
75176
75617
  async function detectGeneratedContent(naxDir) {
75177
75618
  if (!existsSync36(naxDir))
75178
75619
  return [];
@@ -75185,17 +75626,17 @@ async function detectGeneratedContent(naxDir) {
75185
75626
  }
75186
75627
  for (const entry of entries) {
75187
75628
  if (GENERATED_NAMES.has(entry)) {
75188
- candidates.push({ name: entry, srcPath: path29.join(naxDir, entry) });
75629
+ candidates.push({ name: entry, srcPath: path30.join(naxDir, entry) });
75189
75630
  }
75190
75631
  }
75191
- const featuresDir = path29.join(naxDir, "features");
75632
+ const featuresDir = path30.join(naxDir, "features");
75192
75633
  if (existsSync36(featuresDir)) {
75193
75634
  let featureDirs = [];
75194
75635
  try {
75195
75636
  featureDirs = await readdir5(featuresDir);
75196
75637
  } catch {}
75197
75638
  for (const fid of featureDirs) {
75198
- const featureDir = path29.join(featuresDir, fid);
75639
+ const featureDir = path30.join(featuresDir, fid);
75199
75640
  let subEntries = [];
75200
75641
  try {
75201
75642
  subEntries = await readdir5(featureDir);
@@ -75205,12 +75646,12 @@ async function detectGeneratedContent(naxDir) {
75205
75646
  for (const sub of subEntries) {
75206
75647
  if (GENERATED_FEATURE_SUBNAMES.has(sub)) {
75207
75648
  candidates.push({
75208
- name: path29.join("features", fid, sub),
75209
- srcPath: path29.join(featureDir, sub)
75649
+ name: path30.join("features", fid, sub),
75650
+ srcPath: path30.join(featureDir, sub)
75210
75651
  });
75211
75652
  }
75212
75653
  if (sub === "stories") {
75213
- const storiesDir = path29.join(featureDir, "stories");
75654
+ const storiesDir = path30.join(featureDir, "stories");
75214
75655
  let storyDirs = [];
75215
75656
  try {
75216
75657
  storyDirs = await readdir5(storiesDir);
@@ -75218,7 +75659,7 @@ async function detectGeneratedContent(naxDir) {
75218
75659
  continue;
75219
75660
  }
75220
75661
  for (const sid of storyDirs) {
75221
- const storyDir = path29.join(storiesDir, sid);
75662
+ const storyDir = path30.join(storiesDir, sid);
75222
75663
  let storyEntries = [];
75223
75664
  try {
75224
75665
  storyEntries = await readdir5(storyDir);
@@ -75228,8 +75669,8 @@ async function detectGeneratedContent(naxDir) {
75228
75669
  for (const se of storyEntries) {
75229
75670
  if (se.startsWith("context-manifest-") && se.endsWith(".json")) {
75230
75671
  candidates.push({
75231
- name: path29.join("features", fid, "stories", sid, se),
75232
- srcPath: path29.join(storyDir, se)
75672
+ name: path30.join("features", fid, "stories", sid, se),
75673
+ srcPath: path30.join(storyDir, se)
75233
75674
  });
75234
75675
  }
75235
75676
  }
@@ -75250,15 +75691,15 @@ async function migrateCommand(options) {
75250
75691
  name: options.reclaim
75251
75692
  });
75252
75693
  }
75253
- const src = path29.join(globalConfigDir(), options.reclaim);
75694
+ const src = path30.join(globalConfigDir(), options.reclaim);
75254
75695
  if (!existsSync36(src)) {
75255
75696
  throw new NaxError(`Nothing to reclaim: ~/.nax/${options.reclaim} does not exist`, "MIGRATE_RECLAIM_NOT_FOUND", {
75256
75697
  stage: "migrate",
75257
75698
  name: options.reclaim
75258
75699
  });
75259
75700
  }
75260
- const archiveBase = path29.join(globalConfigDir(), "_archive");
75261
- const archiveDest = path29.join(archiveBase, `${options.reclaim}-${Date.now()}`);
75701
+ const archiveBase = path30.join(globalConfigDir(), "_archive");
75702
+ const archiveDest = path30.join(archiveBase, `${options.reclaim}-${Date.now()}`);
75262
75703
  await mkdir16(archiveBase, { recursive: true });
75263
75704
  await rename3(src, archiveDest);
75264
75705
  logger.info("migrate", `Reclaimed: archived to ${archiveDest}`, { storyId: "_migrate" });
@@ -75295,8 +75736,8 @@ async function migrateCommand(options) {
75295
75736
  logger.info("migrate", `Merged: identity for "${options.merge}" updated`, { storyId: "_migrate" });
75296
75737
  return;
75297
75738
  }
75298
- const naxDir = path29.join(options.workdir, ".nax");
75299
- const configPath = path29.join(naxDir, "config.json");
75739
+ const naxDir = path30.join(options.workdir, ".nax");
75740
+ const configPath = path30.join(naxDir, "config.json");
75300
75741
  if (!existsSync36(configPath)) {
75301
75742
  throw new NaxError("No .nax/config.json found \u2014 run nax init first", "MIGRATE_NO_CONFIG", {
75302
75743
  stage: "migrate",
@@ -75312,7 +75753,7 @@ async function migrateCommand(options) {
75312
75753
  cause: e
75313
75754
  });
75314
75755
  }
75315
- const projectKey = config2.name?.trim() || path29.basename(options.workdir);
75756
+ const projectKey = config2.name?.trim() || path30.basename(options.workdir);
75316
75757
  const destBase = projectOutputDir(projectKey, config2.outputDir);
75317
75758
  const candidates = await detectGeneratedContent(naxDir);
75318
75759
  if (candidates.length === 0) {
@@ -75321,7 +75762,7 @@ async function migrateCommand(options) {
75321
75762
  }
75322
75763
  if (options.dryRun) {
75323
75764
  for (const c of candidates) {
75324
- logger.info("migrate", `[dry-run] Would move: ${c.srcPath} -> ${path29.join(destBase, c.name)}`, {
75765
+ logger.info("migrate", `[dry-run] Would move: ${c.srcPath} -> ${path30.join(destBase, c.name)}`, {
75325
75766
  storyId: "_migrate"
75326
75767
  });
75327
75768
  }
@@ -75330,8 +75771,8 @@ async function migrateCommand(options) {
75330
75771
  await mkdir16(destBase, { recursive: true });
75331
75772
  let moved = 0;
75332
75773
  for (const candidate of candidates) {
75333
- const dest = path29.join(destBase, candidate.name);
75334
- await mkdir16(path29.dirname(dest), { recursive: true });
75774
+ const dest = path30.join(destBase, candidate.name);
75775
+ await mkdir16(path30.dirname(dest), { recursive: true });
75335
75776
  if (existsSync36(dest)) {
75336
75777
  throw new NaxError(`Migration conflict: destination already exists.
75337
75778
  Source: ${candidate.srcPath}
@@ -75361,7 +75802,7 @@ async function migrateCommand(options) {
75361
75802
  moved++;
75362
75803
  logger.info("migrate", `Moved: ${candidate.name}`, { storyId: "_migrate" });
75363
75804
  }
75364
- await Bun.write(path29.join(destBase, ".migrated-from"), JSON.stringify({ from: options.workdir, migratedAt: new Date().toISOString() }, null, 2));
75805
+ await Bun.write(path30.join(destBase, ".migrated-from"), JSON.stringify({ from: options.workdir, migratedAt: new Date().toISOString() }, null, 2));
75365
75806
  logger.info("migrate", `Migration complete: ${moved} entries moved`, {
75366
75807
  storyId: "_migrate",
75367
75808
  destBase
@@ -75478,7 +75919,7 @@ __export(exports_precheck_runner, {
75478
75919
  runPrecheckValidation: () => runPrecheckValidation
75479
75920
  });
75480
75921
  import { mkdirSync as mkdirSync7 } from "fs";
75481
- import path30 from "path";
75922
+ import path31 from "path";
75482
75923
  async function runPrecheckValidation(ctx) {
75483
75924
  const logger = getSafeLogger();
75484
75925
  if (process.env.NAX_PRECHECK !== "1") {
@@ -75493,7 +75934,7 @@ async function runPrecheckValidation(ctx) {
75493
75934
  silent: true
75494
75935
  });
75495
75936
  if (ctx.logFilePath) {
75496
- mkdirSync7(path30.dirname(ctx.logFilePath), { recursive: true });
75937
+ mkdirSync7(path31.dirname(ctx.logFilePath), { recursive: true });
75497
75938
  const precheckLog = {
75498
75939
  type: "precheck",
75499
75940
  timestamp: new Date().toISOString(),
@@ -75806,7 +76247,7 @@ __export(exports_run_setup, {
75806
76247
  setupRun: () => setupRun,
75807
76248
  _runSetupDeps: () => _runSetupDeps
75808
76249
  });
75809
- import path31 from "path";
76250
+ import path32 from "path";
75810
76251
  function warnProfileMismatch(prd, config2, logger) {
75811
76252
  const profiles = config2.routing?.agents?.profiles ?? [];
75812
76253
  const profileIds = new Set(profiles.map((p) => p.id));
@@ -75927,7 +76368,7 @@ async function setupRun(options) {
75927
76368
  statusWriter.setPrd(prd);
75928
76369
  {
75929
76370
  const { detectGeneratedContent: detectGeneratedContent2, migrateCommand: migrateCommand2 } = await Promise.resolve().then(() => (init_migrate(), exports_migrate));
75930
- const naxDir = path31.join(workdir, ".nax");
76371
+ const naxDir = path32.join(workdir, ".nax");
75931
76372
  const candidates = await detectGeneratedContent2(naxDir).catch(() => []);
75932
76373
  if (candidates.length > 0) {
75933
76374
  logger?.info("setup", "Found generated content under .nax/ \u2014 migrating to output dir", {
@@ -75954,7 +76395,7 @@ async function setupRun(options) {
75954
76395
  remoteUrl = new TextDecoder().decode(gitResult.stdout).trim() || null;
75955
76396
  }
75956
76397
  } catch {}
75957
- const projectKey = config2.name?.trim() || path31.basename(workdir);
76398
+ const projectKey = config2.name?.trim() || path32.basename(workdir);
75958
76399
  await claimProjectIdentity2(projectKey, workdir, remoteUrl).catch((err) => {
75959
76400
  if (err instanceof NaxError && err.code === "RUN_NAME_COLLISION") {
75960
76401
  throw err;
@@ -76009,8 +76450,8 @@ async function setupRun(options) {
76009
76450
  explicit: Object.fromEntries(explicitFields.map((f) => [f, existingProjectConfig[f]])),
76010
76451
  detected: Object.fromEntries(autodetectedFields.map((f) => [f, detectedProfile[f]]))
76011
76452
  });
76012
- const globalPluginsDir = path31.join(globalConfigDir(), "plugins");
76013
- const projectPluginsDir = path31.join(workdir, ".nax", "plugins");
76453
+ const globalPluginsDir = path32.join(globalConfigDir(), "plugins");
76454
+ const projectPluginsDir = path32.join(workdir, ".nax", "plugins");
76014
76455
  const configPlugins = config2.plugins || [];
76015
76456
  const resolvedPatterns = await resolveTestFilePatterns(config2, workdir);
76016
76457
  const isTestFileFn = (filename) => resolvedPatterns.regex.some((re) => re.test(filename));
@@ -76615,6 +77056,7 @@ __export(exports_execution, {
76615
77056
  _pidRegistryDeps: () => _pidRegistryDeps,
76616
77057
  _newPackageSetupDeps: () => _newPackageSetupDeps,
76617
77058
  StoryOrchestratorBuilder: () => StoryOrchestratorBuilder,
77059
+ StatusWriter: () => StatusWriter,
76618
77060
  STRICT_VERDICT_PHASE_NAMES: () => STRICT_VERDICT_PHASE_NAMES,
76619
77061
  PidRegistry: () => PidRegistry,
76620
77062
  PHASE_KIND_TO_STATE_KEY: () => PHASE_KIND_TO_STATE_KEY,
@@ -76630,6 +77072,7 @@ var init_execution2 = __esm(() => {
76630
77072
  init_iteration_runner();
76631
77073
  init_escalation();
76632
77074
  init_queue_handler();
77075
+ init_status_writer();
76633
77076
  init_ensure_package_dirs();
76634
77077
  init_new_package_setup();
76635
77078
  init_helpers();
@@ -77932,11 +78375,11 @@ var require_react_reconciler_development = __commonJS((exports, module) => {
77932
78375
  fiber = fiber.next, id--;
77933
78376
  return fiber;
77934
78377
  }
77935
- function copyWithSetImpl(obj, path32, index, value) {
77936
- if (index >= path32.length)
78378
+ function copyWithSetImpl(obj, path33, index, value) {
78379
+ if (index >= path33.length)
77937
78380
  return value;
77938
- var key = path32[index], updated = isArrayImpl(obj) ? obj.slice() : assign2({}, obj);
77939
- updated[key] = copyWithSetImpl(obj[key], path32, index + 1, value);
78381
+ var key = path33[index], updated = isArrayImpl(obj) ? obj.slice() : assign2({}, obj);
78382
+ updated[key] = copyWithSetImpl(obj[key], path33, index + 1, value);
77940
78383
  return updated;
77941
78384
  }
77942
78385
  function copyWithRename(obj, oldPath, newPath) {
@@ -77956,11 +78399,11 @@ var require_react_reconciler_development = __commonJS((exports, module) => {
77956
78399
  index + 1 === oldPath.length ? (updated[newPath[index]] = updated[oldKey], isArrayImpl(updated) ? updated.splice(oldKey, 1) : delete updated[oldKey]) : updated[oldKey] = copyWithRenameImpl(obj[oldKey], oldPath, newPath, index + 1);
77957
78400
  return updated;
77958
78401
  }
77959
- function copyWithDeleteImpl(obj, path32, index) {
77960
- var key = path32[index], updated = isArrayImpl(obj) ? obj.slice() : assign2({}, obj);
77961
- if (index + 1 === path32.length)
78402
+ function copyWithDeleteImpl(obj, path33, index) {
78403
+ var key = path33[index], updated = isArrayImpl(obj) ? obj.slice() : assign2({}, obj);
78404
+ if (index + 1 === path33.length)
77962
78405
  return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
77963
- updated[key] = copyWithDeleteImpl(obj[key], path32, index + 1);
78406
+ updated[key] = copyWithDeleteImpl(obj[key], path33, index + 1);
77964
78407
  return updated;
77965
78408
  }
77966
78409
  function shouldSuspendImpl() {
@@ -87983,29 +88426,29 @@ Check the top-level render call using <` + componentName2 + ">.");
87983
88426
  var didWarnAboutNestedUpdates = false;
87984
88427
  var didWarnAboutFindNodeInStrictMode = {};
87985
88428
  var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
87986
- overrideHookState = function(fiber, id, path32, value) {
88429
+ overrideHookState = function(fiber, id, path33, value) {
87987
88430
  id = findHook(fiber, id);
87988
- id !== null && (path32 = copyWithSetImpl(id.memoizedState, path32, 0, value), id.memoizedState = path32, id.baseState = path32, fiber.memoizedProps = assign2({}, fiber.memoizedProps), path32 = enqueueConcurrentRenderForLane(fiber, 2), path32 !== null && scheduleUpdateOnFiber(path32, fiber, 2));
88431
+ id !== null && (path33 = copyWithSetImpl(id.memoizedState, path33, 0, value), id.memoizedState = path33, id.baseState = path33, fiber.memoizedProps = assign2({}, fiber.memoizedProps), path33 = enqueueConcurrentRenderForLane(fiber, 2), path33 !== null && scheduleUpdateOnFiber(path33, fiber, 2));
87989
88432
  };
87990
- overrideHookStateDeletePath = function(fiber, id, path32) {
88433
+ overrideHookStateDeletePath = function(fiber, id, path33) {
87991
88434
  id = findHook(fiber, id);
87992
- id !== null && (path32 = copyWithDeleteImpl(id.memoizedState, path32, 0), id.memoizedState = path32, id.baseState = path32, fiber.memoizedProps = assign2({}, fiber.memoizedProps), path32 = enqueueConcurrentRenderForLane(fiber, 2), path32 !== null && scheduleUpdateOnFiber(path32, fiber, 2));
88435
+ id !== null && (path33 = copyWithDeleteImpl(id.memoizedState, path33, 0), id.memoizedState = path33, id.baseState = path33, fiber.memoizedProps = assign2({}, fiber.memoizedProps), path33 = enqueueConcurrentRenderForLane(fiber, 2), path33 !== null && scheduleUpdateOnFiber(path33, fiber, 2));
87993
88436
  };
87994
88437
  overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
87995
88438
  id = findHook(fiber, id);
87996
88439
  id !== null && (oldPath = copyWithRename(id.memoizedState, oldPath, newPath), id.memoizedState = oldPath, id.baseState = oldPath, fiber.memoizedProps = assign2({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), oldPath !== null && scheduleUpdateOnFiber(oldPath, fiber, 2));
87997
88440
  };
87998
- overrideProps = function(fiber, path32, value) {
87999
- fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path32, 0, value);
88441
+ overrideProps = function(fiber, path33, value) {
88442
+ fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path33, 0, value);
88000
88443
  fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
88001
- path32 = enqueueConcurrentRenderForLane(fiber, 2);
88002
- path32 !== null && scheduleUpdateOnFiber(path32, fiber, 2);
88444
+ path33 = enqueueConcurrentRenderForLane(fiber, 2);
88445
+ path33 !== null && scheduleUpdateOnFiber(path33, fiber, 2);
88003
88446
  };
88004
- overridePropsDeletePath = function(fiber, path32) {
88005
- fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path32, 0);
88447
+ overridePropsDeletePath = function(fiber, path33) {
88448
+ fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path33, 0);
88006
88449
  fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
88007
- path32 = enqueueConcurrentRenderForLane(fiber, 2);
88008
- path32 !== null && scheduleUpdateOnFiber(path32, fiber, 2);
88450
+ path33 = enqueueConcurrentRenderForLane(fiber, 2);
88451
+ path33 !== null && scheduleUpdateOnFiber(path33, fiber, 2);
88009
88452
  };
88010
88453
  overridePropsRenamePath = function(fiber, oldPath, newPath) {
88011
88454
  fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);
@@ -92060,8 +92503,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92060
92503
  }
92061
92504
  return false;
92062
92505
  }
92063
- function utils_getInObject(object2, path32) {
92064
- return path32.reduce(function(reduced, attr2) {
92506
+ function utils_getInObject(object2, path33) {
92507
+ return path33.reduce(function(reduced, attr2) {
92065
92508
  if (reduced) {
92066
92509
  if (utils_hasOwnProperty.call(reduced, attr2)) {
92067
92510
  return reduced[attr2];
@@ -92073,11 +92516,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92073
92516
  return null;
92074
92517
  }, object2);
92075
92518
  }
92076
- function deletePathInObject(object2, path32) {
92077
- var length = path32.length;
92078
- var last2 = path32[length - 1];
92519
+ function deletePathInObject(object2, path33) {
92520
+ var length = path33.length;
92521
+ var last2 = path33[length - 1];
92079
92522
  if (object2 != null) {
92080
- var parent = utils_getInObject(object2, path32.slice(0, length - 1));
92523
+ var parent = utils_getInObject(object2, path33.slice(0, length - 1));
92081
92524
  if (parent) {
92082
92525
  if (src_isArray(parent)) {
92083
92526
  parent.splice(last2, 1);
@@ -92103,11 +92546,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92103
92546
  }
92104
92547
  }
92105
92548
  }
92106
- function utils_setInObject(object2, path32, value) {
92107
- var length = path32.length;
92108
- var last2 = path32[length - 1];
92549
+ function utils_setInObject(object2, path33, value) {
92550
+ var length = path33.length;
92551
+ var last2 = path33[length - 1];
92109
92552
  if (object2 != null) {
92110
- var parent = utils_getInObject(object2, path32.slice(0, length - 1));
92553
+ var parent = utils_getInObject(object2, path33.slice(0, length - 1));
92111
92554
  if (parent) {
92112
92555
  parent[last2] = value;
92113
92556
  }
@@ -92638,8 +93081,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92638
93081
  unserializable: Symbol("unserializable")
92639
93082
  };
92640
93083
  var LEVEL_THRESHOLD = 2;
92641
- function createDehydrated(type, inspectable, data, cleaned, path32) {
92642
- cleaned.push(path32);
93084
+ function createDehydrated(type, inspectable, data, cleaned, path33) {
93085
+ cleaned.push(path33);
92643
93086
  var dehydrated = {
92644
93087
  inspectable,
92645
93088
  type,
@@ -92657,13 +93100,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92657
93100
  }
92658
93101
  return dehydrated;
92659
93102
  }
92660
- function dehydrate(data, cleaned, unserializable, path32, isPathAllowed) {
93103
+ function dehydrate(data, cleaned, unserializable, path33, isPathAllowed) {
92661
93104
  var level = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
92662
93105
  var type = getDataType(data);
92663
93106
  var isPathAllowedCheck;
92664
93107
  switch (type) {
92665
93108
  case "html_element":
92666
- cleaned.push(path32);
93109
+ cleaned.push(path33);
92667
93110
  return {
92668
93111
  inspectable: false,
92669
93112
  preview_short: formatDataForPreview(data, false),
@@ -92672,7 +93115,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92672
93115
  type
92673
93116
  };
92674
93117
  case "function":
92675
- cleaned.push(path32);
93118
+ cleaned.push(path33);
92676
93119
  return {
92677
93120
  inspectable: false,
92678
93121
  preview_short: formatDataForPreview(data, false),
@@ -92681,14 +93124,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92681
93124
  type
92682
93125
  };
92683
93126
  case "string":
92684
- isPathAllowedCheck = isPathAllowed(path32);
93127
+ isPathAllowedCheck = isPathAllowed(path33);
92685
93128
  if (isPathAllowedCheck) {
92686
93129
  return data;
92687
93130
  } else {
92688
93131
  return data.length <= 500 ? data : data.slice(0, 500) + "...";
92689
93132
  }
92690
93133
  case "bigint":
92691
- cleaned.push(path32);
93134
+ cleaned.push(path33);
92692
93135
  return {
92693
93136
  inspectable: false,
92694
93137
  preview_short: formatDataForPreview(data, false),
@@ -92697,7 +93140,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92697
93140
  type
92698
93141
  };
92699
93142
  case "symbol":
92700
- cleaned.push(path32);
93143
+ cleaned.push(path33);
92701
93144
  return {
92702
93145
  inspectable: false,
92703
93146
  preview_short: formatDataForPreview(data, false),
@@ -92706,9 +93149,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92706
93149
  type
92707
93150
  };
92708
93151
  case "react_element": {
92709
- isPathAllowedCheck = isPathAllowed(path32);
93152
+ isPathAllowedCheck = isPathAllowed(path33);
92710
93153
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
92711
- cleaned.push(path32);
93154
+ cleaned.push(path33);
92712
93155
  return {
92713
93156
  inspectable: true,
92714
93157
  preview_short: formatDataForPreview(data, false),
@@ -92725,19 +93168,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92725
93168
  preview_long: formatDataForPreview(data, true),
92726
93169
  name: getDisplayNameForReactElement(data) || "Unknown"
92727
93170
  };
92728
- unserializableValue.key = dehydrate(data.key, cleaned, unserializable, path32.concat(["key"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93171
+ unserializableValue.key = dehydrate(data.key, cleaned, unserializable, path33.concat(["key"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92729
93172
  if (data.$$typeof === REACT_LEGACY_ELEMENT_TYPE) {
92730
- unserializableValue.ref = dehydrate(data.ref, cleaned, unserializable, path32.concat(["ref"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93173
+ unserializableValue.ref = dehydrate(data.ref, cleaned, unserializable, path33.concat(["ref"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92731
93174
  }
92732
- unserializableValue.props = dehydrate(data.props, cleaned, unserializable, path32.concat(["props"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92733
- unserializable.push(path32);
93175
+ unserializableValue.props = dehydrate(data.props, cleaned, unserializable, path33.concat(["props"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93176
+ unserializable.push(path33);
92734
93177
  return unserializableValue;
92735
93178
  }
92736
93179
  case "react_lazy": {
92737
- isPathAllowedCheck = isPathAllowed(path32);
93180
+ isPathAllowedCheck = isPathAllowed(path33);
92738
93181
  var payload = data._payload;
92739
93182
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
92740
- cleaned.push(path32);
93183
+ cleaned.push(path33);
92741
93184
  var inspectable = payload !== null && hydration_typeof(payload) === "object" && (payload._status === 1 || payload._status === 2 || payload.status === "fulfilled" || payload.status === "rejected");
92742
93185
  return {
92743
93186
  inspectable,
@@ -92754,13 +93197,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92754
93197
  preview_long: formatDataForPreview(data, true),
92755
93198
  name: "lazy()"
92756
93199
  };
92757
- _unserializableValue._payload = dehydrate(payload, cleaned, unserializable, path32.concat(["_payload"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92758
- unserializable.push(path32);
93200
+ _unserializableValue._payload = dehydrate(payload, cleaned, unserializable, path33.concat(["_payload"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93201
+ unserializable.push(path33);
92759
93202
  return _unserializableValue;
92760
93203
  }
92761
93204
  case "array_buffer":
92762
93205
  case "data_view":
92763
- cleaned.push(path32);
93206
+ cleaned.push(path33);
92764
93207
  return {
92765
93208
  inspectable: false,
92766
93209
  preview_short: formatDataForPreview(data, false),
@@ -92770,21 +93213,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92770
93213
  type
92771
93214
  };
92772
93215
  case "array":
92773
- isPathAllowedCheck = isPathAllowed(path32);
93216
+ isPathAllowedCheck = isPathAllowed(path33);
92774
93217
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
92775
- return createDehydrated(type, true, data, cleaned, path32);
93218
+ return createDehydrated(type, true, data, cleaned, path33);
92776
93219
  }
92777
93220
  var arr = [];
92778
93221
  for (var i = 0;i < data.length; i++) {
92779
- arr[i] = dehydrateKey(data, i, cleaned, unserializable, path32.concat([i]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93222
+ arr[i] = dehydrateKey(data, i, cleaned, unserializable, path33.concat([i]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92780
93223
  }
92781
93224
  return arr;
92782
93225
  case "html_all_collection":
92783
93226
  case "typed_array":
92784
93227
  case "iterator":
92785
- isPathAllowedCheck = isPathAllowed(path32);
93228
+ isPathAllowedCheck = isPathAllowed(path33);
92786
93229
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
92787
- return createDehydrated(type, true, data, cleaned, path32);
93230
+ return createDehydrated(type, true, data, cleaned, path33);
92788
93231
  } else {
92789
93232
  var _unserializableValue2 = {
92790
93233
  unserializable: true,
@@ -92796,13 +93239,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92796
93239
  name: typeof data.constructor !== "function" || typeof data.constructor.name !== "string" || data.constructor.name === "Object" ? "" : data.constructor.name
92797
93240
  };
92798
93241
  Array.from(data).forEach(function(item, i2) {
92799
- return _unserializableValue2[i2] = dehydrate(item, cleaned, unserializable, path32.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93242
+ return _unserializableValue2[i2] = dehydrate(item, cleaned, unserializable, path33.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92800
93243
  });
92801
- unserializable.push(path32);
93244
+ unserializable.push(path33);
92802
93245
  return _unserializableValue2;
92803
93246
  }
92804
93247
  case "opaque_iterator":
92805
- cleaned.push(path32);
93248
+ cleaned.push(path33);
92806
93249
  return {
92807
93250
  inspectable: false,
92808
93251
  preview_short: formatDataForPreview(data, false),
@@ -92811,7 +93254,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92811
93254
  type
92812
93255
  };
92813
93256
  case "date":
92814
- cleaned.push(path32);
93257
+ cleaned.push(path33);
92815
93258
  return {
92816
93259
  inspectable: false,
92817
93260
  preview_short: formatDataForPreview(data, false),
@@ -92820,7 +93263,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92820
93263
  type
92821
93264
  };
92822
93265
  case "regexp":
92823
- cleaned.push(path32);
93266
+ cleaned.push(path33);
92824
93267
  return {
92825
93268
  inspectable: false,
92826
93269
  preview_short: formatDataForPreview(data, false),
@@ -92829,9 +93272,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92829
93272
  type
92830
93273
  };
92831
93274
  case "thenable":
92832
- isPathAllowedCheck = isPathAllowed(path32);
93275
+ isPathAllowedCheck = isPathAllowed(path33);
92833
93276
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
92834
- cleaned.push(path32);
93277
+ cleaned.push(path33);
92835
93278
  return {
92836
93279
  inspectable: data.status === "fulfilled" || data.status === "rejected",
92837
93280
  preview_short: formatDataForPreview(data, false),
@@ -92852,8 +93295,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92852
93295
  preview_long: formatDataForPreview(data, true),
92853
93296
  name: "fulfilled Thenable"
92854
93297
  };
92855
- _unserializableValue3.value = dehydrate(data.value, cleaned, unserializable, path32.concat(["value"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92856
- unserializable.push(path32);
93298
+ _unserializableValue3.value = dehydrate(data.value, cleaned, unserializable, path33.concat(["value"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93299
+ unserializable.push(path33);
92857
93300
  return _unserializableValue3;
92858
93301
  }
92859
93302
  case "rejected": {
@@ -92864,12 +93307,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92864
93307
  preview_long: formatDataForPreview(data, true),
92865
93308
  name: "rejected Thenable"
92866
93309
  };
92867
- _unserializableValue4.reason = dehydrate(data.reason, cleaned, unserializable, path32.concat(["reason"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92868
- unserializable.push(path32);
93310
+ _unserializableValue4.reason = dehydrate(data.reason, cleaned, unserializable, path33.concat(["reason"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93311
+ unserializable.push(path33);
92869
93312
  return _unserializableValue4;
92870
93313
  }
92871
93314
  default:
92872
- cleaned.push(path32);
93315
+ cleaned.push(path33);
92873
93316
  return {
92874
93317
  inspectable: false,
92875
93318
  preview_short: formatDataForPreview(data, false),
@@ -92879,21 +93322,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92879
93322
  };
92880
93323
  }
92881
93324
  case "object":
92882
- isPathAllowedCheck = isPathAllowed(path32);
93325
+ isPathAllowedCheck = isPathAllowed(path33);
92883
93326
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
92884
- return createDehydrated(type, true, data, cleaned, path32);
93327
+ return createDehydrated(type, true, data, cleaned, path33);
92885
93328
  } else {
92886
93329
  var object2 = {};
92887
93330
  getAllEnumerableKeys(data).forEach(function(key) {
92888
93331
  var name = key.toString();
92889
- object2[name] = dehydrateKey(data, key, cleaned, unserializable, path32.concat([name]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93332
+ object2[name] = dehydrateKey(data, key, cleaned, unserializable, path33.concat([name]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92890
93333
  });
92891
93334
  return object2;
92892
93335
  }
92893
93336
  case "class_instance": {
92894
- isPathAllowedCheck = isPathAllowed(path32);
93337
+ isPathAllowedCheck = isPathAllowed(path33);
92895
93338
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
92896
- return createDehydrated(type, true, data, cleaned, path32);
93339
+ return createDehydrated(type, true, data, cleaned, path33);
92897
93340
  }
92898
93341
  var value = {
92899
93342
  unserializable: true,
@@ -92905,15 +93348,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92905
93348
  };
92906
93349
  getAllEnumerableKeys(data).forEach(function(key) {
92907
93350
  var keyAsString = key.toString();
92908
- value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path32.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93351
+ value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path33.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92909
93352
  });
92910
- unserializable.push(path32);
93353
+ unserializable.push(path33);
92911
93354
  return value;
92912
93355
  }
92913
93356
  case "error": {
92914
- isPathAllowedCheck = isPathAllowed(path32);
93357
+ isPathAllowedCheck = isPathAllowed(path33);
92915
93358
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
92916
- return createDehydrated(type, true, data, cleaned, path32);
93359
+ return createDehydrated(type, true, data, cleaned, path33);
92917
93360
  }
92918
93361
  var _value = {
92919
93362
  unserializable: true,
@@ -92923,22 +93366,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92923
93366
  preview_long: formatDataForPreview(data, true),
92924
93367
  name: data.name
92925
93368
  };
92926
- _value.message = dehydrate(data.message, cleaned, unserializable, path32.concat(["message"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92927
- _value.stack = dehydrate(data.stack, cleaned, unserializable, path32.concat(["stack"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93369
+ _value.message = dehydrate(data.message, cleaned, unserializable, path33.concat(["message"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93370
+ _value.stack = dehydrate(data.stack, cleaned, unserializable, path33.concat(["stack"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92928
93371
  if ("cause" in data) {
92929
- _value.cause = dehydrate(data.cause, cleaned, unserializable, path32.concat(["cause"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93372
+ _value.cause = dehydrate(data.cause, cleaned, unserializable, path33.concat(["cause"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92930
93373
  }
92931
93374
  getAllEnumerableKeys(data).forEach(function(key) {
92932
93375
  var keyAsString = key.toString();
92933
- _value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path32.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
93376
+ _value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path33.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
92934
93377
  });
92935
- unserializable.push(path32);
93378
+ unserializable.push(path33);
92936
93379
  return _value;
92937
93380
  }
92938
93381
  case "infinity":
92939
93382
  case "nan":
92940
93383
  case "undefined":
92941
- cleaned.push(path32);
93384
+ cleaned.push(path33);
92942
93385
  return {
92943
93386
  type
92944
93387
  };
@@ -92946,10 +93389,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92946
93389
  return data;
92947
93390
  }
92948
93391
  }
92949
- function dehydrateKey(parent, key, cleaned, unserializable, path32, isPathAllowed) {
93392
+ function dehydrateKey(parent, key, cleaned, unserializable, path33, isPathAllowed) {
92950
93393
  var level = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;
92951
93394
  try {
92952
- return dehydrate(parent[key], cleaned, unserializable, path32, isPathAllowed, level);
93395
+ return dehydrate(parent[key], cleaned, unserializable, path33, isPathAllowed, level);
92953
93396
  } catch (error48) {
92954
93397
  var preview = "";
92955
93398
  if (hydration_typeof(error48) === "object" && error48 !== null && typeof error48.stack === "string") {
@@ -92957,7 +93400,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92957
93400
  } else if (typeof error48 === "string") {
92958
93401
  preview = error48;
92959
93402
  }
92960
- cleaned.push(path32);
93403
+ cleaned.push(path33);
92961
93404
  return {
92962
93405
  inspectable: false,
92963
93406
  preview_short: "[Exception]",
@@ -92967,8 +93410,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92967
93410
  };
92968
93411
  }
92969
93412
  }
92970
- function fillInPath(object2, data, path32, value) {
92971
- var target = getInObject(object2, path32);
93413
+ function fillInPath(object2, data, path33, value) {
93414
+ var target = getInObject(object2, path33);
92972
93415
  if (target != null) {
92973
93416
  if (!target[meta3.unserializable]) {
92974
93417
  delete target[meta3.inspectable];
@@ -92983,9 +93426,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92983
93426
  }
92984
93427
  if (value !== null && data.unserializable.length > 0) {
92985
93428
  var unserializablePath = data.unserializable[0];
92986
- var isMatch2 = unserializablePath.length === path32.length;
92987
- for (var i = 0;i < path32.length; i++) {
92988
- if (path32[i] !== unserializablePath[i]) {
93429
+ var isMatch2 = unserializablePath.length === path33.length;
93430
+ for (var i = 0;i < path33.length; i++) {
93431
+ if (path33[i] !== unserializablePath[i]) {
92989
93432
  isMatch2 = false;
92990
93433
  break;
92991
93434
  }
@@ -92994,13 +93437,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
92994
93437
  upgradeUnserializable(value, value);
92995
93438
  }
92996
93439
  }
92997
- setInObject(object2, path32, value);
93440
+ setInObject(object2, path33, value);
92998
93441
  }
92999
93442
  function hydrate(object2, cleaned, unserializable) {
93000
- cleaned.forEach(function(path32) {
93001
- var length = path32.length;
93002
- var last2 = path32[length - 1];
93003
- var parent = getInObject(object2, path32.slice(0, length - 1));
93443
+ cleaned.forEach(function(path33) {
93444
+ var length = path33.length;
93445
+ var last2 = path33[length - 1];
93446
+ var parent = getInObject(object2, path33.slice(0, length - 1));
93004
93447
  if (!parent || !parent.hasOwnProperty(last2)) {
93005
93448
  return;
93006
93449
  }
@@ -93026,10 +93469,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
93026
93469
  parent[last2] = replaced;
93027
93470
  }
93028
93471
  });
93029
- unserializable.forEach(function(path32) {
93030
- var length = path32.length;
93031
- var last2 = path32[length - 1];
93032
- var parent = getInObject(object2, path32.slice(0, length - 1));
93472
+ unserializable.forEach(function(path33) {
93473
+ var length = path33.length;
93474
+ var last2 = path33[length - 1];
93475
+ var parent = getInObject(object2, path33.slice(0, length - 1));
93033
93476
  if (!parent || !parent.hasOwnProperty(last2)) {
93034
93477
  return;
93035
93478
  }
@@ -93150,11 +93593,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
93150
93593
  return gte2(version2, FIRST_DEVTOOLS_BACKEND_LOCKSTEP_VER);
93151
93594
  }
93152
93595
  function cleanForBridge(data, isPathAllowed) {
93153
- var path32 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
93596
+ var path33 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
93154
93597
  if (data !== null) {
93155
93598
  var cleanedPaths = [];
93156
93599
  var unserializablePaths = [];
93157
- var cleanedData = dehydrate(data, cleanedPaths, unserializablePaths, path32, isPathAllowed);
93600
+ var cleanedData = dehydrate(data, cleanedPaths, unserializablePaths, path33, isPathAllowed);
93158
93601
  return {
93159
93602
  data: cleanedData,
93160
93603
  cleaned: cleanedPaths,
@@ -93164,18 +93607,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
93164
93607
  return null;
93165
93608
  }
93166
93609
  }
93167
- function copyWithDelete(obj, path32) {
93610
+ function copyWithDelete(obj, path33) {
93168
93611
  var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
93169
- var key = path32[index];
93612
+ var key = path33[index];
93170
93613
  var updated = shared_isArray(obj) ? obj.slice() : utils_objectSpread({}, obj);
93171
- if (index + 1 === path32.length) {
93614
+ if (index + 1 === path33.length) {
93172
93615
  if (shared_isArray(updated)) {
93173
93616
  updated.splice(key, 1);
93174
93617
  } else {
93175
93618
  delete updated[key];
93176
93619
  }
93177
93620
  } else {
93178
- updated[key] = copyWithDelete(obj[key], path32, index + 1);
93621
+ updated[key] = copyWithDelete(obj[key], path33, index + 1);
93179
93622
  }
93180
93623
  return updated;
93181
93624
  }
@@ -93196,14 +93639,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
93196
93639
  }
93197
93640
  return updated;
93198
93641
  }
93199
- function copyWithSet(obj, path32, value) {
93642
+ function copyWithSet(obj, path33, value) {
93200
93643
  var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
93201
- if (index >= path32.length) {
93644
+ if (index >= path33.length) {
93202
93645
  return value;
93203
93646
  }
93204
- var key = path32[index];
93647
+ var key = path33[index];
93205
93648
  var updated = shared_isArray(obj) ? obj.slice() : utils_objectSpread({}, obj);
93206
- updated[key] = copyWithSet(obj[key], path32, value, index + 1);
93649
+ updated[key] = copyWithSet(obj[key], path33, value, index + 1);
93207
93650
  return updated;
93208
93651
  }
93209
93652
  function getEffectDurations(root) {
@@ -94531,12 +94974,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
94531
94974
  }
94532
94975
  });
94533
94976
  bridge_defineProperty(_this, "overrideValueAtPath", function(_ref) {
94534
- var { id, path: path32, rendererID, type, value } = _ref;
94977
+ var { id, path: path33, rendererID, type, value } = _ref;
94535
94978
  switch (type) {
94536
94979
  case "context":
94537
94980
  _this.send("overrideContext", {
94538
94981
  id,
94539
- path: path32,
94982
+ path: path33,
94540
94983
  rendererID,
94541
94984
  wasForwarded: true,
94542
94985
  value
@@ -94545,7 +94988,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
94545
94988
  case "hooks":
94546
94989
  _this.send("overrideHookState", {
94547
94990
  id,
94548
- path: path32,
94991
+ path: path33,
94549
94992
  rendererID,
94550
94993
  wasForwarded: true,
94551
94994
  value
@@ -94554,7 +94997,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
94554
94997
  case "props":
94555
94998
  _this.send("overrideProps", {
94556
94999
  id,
94557
- path: path32,
95000
+ path: path33,
94558
95001
  rendererID,
94559
95002
  wasForwarded: true,
94560
95003
  value
@@ -94563,7 +95006,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
94563
95006
  case "state":
94564
95007
  _this.send("overrideState", {
94565
95008
  id,
94566
- path: path32,
95009
+ path: path33,
94567
95010
  rendererID,
94568
95011
  wasForwarded: true,
94569
95012
  value
@@ -94897,12 +95340,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
94897
95340
  }
94898
95341
  });
94899
95342
  agent_defineProperty(_this, "copyElementPath", function(_ref5) {
94900
- var { id, path: path32, rendererID } = _ref5;
95343
+ var { id, path: path33, rendererID } = _ref5;
94901
95344
  var renderer = _this._rendererInterfaces[rendererID];
94902
95345
  if (renderer == null) {
94903
95346
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
94904
95347
  } else {
94905
- var value = renderer.getSerializedElementValueByPath(id, path32);
95348
+ var value = renderer.getSerializedElementValueByPath(id, path33);
94906
95349
  if (value != null) {
94907
95350
  _this._bridge.send("saveToClipboard", value);
94908
95351
  } else {
@@ -94911,12 +95354,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
94911
95354
  }
94912
95355
  });
94913
95356
  agent_defineProperty(_this, "deletePath", function(_ref6) {
94914
- var { hookID, id, path: path32, rendererID, type } = _ref6;
95357
+ var { hookID, id, path: path33, rendererID, type } = _ref6;
94915
95358
  var renderer = _this._rendererInterfaces[rendererID];
94916
95359
  if (renderer == null) {
94917
95360
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
94918
95361
  } else {
94919
- renderer.deletePath(type, id, hookID, path32);
95362
+ renderer.deletePath(type, id, hookID, path33);
94920
95363
  }
94921
95364
  });
94922
95365
  agent_defineProperty(_this, "getBackendVersion", function() {
@@ -94953,12 +95396,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
94953
95396
  }
94954
95397
  });
94955
95398
  agent_defineProperty(_this, "inspectElement", function(_ref9) {
94956
- var { forceFullData, id, path: path32, rendererID, requestID } = _ref9;
95399
+ var { forceFullData, id, path: path33, rendererID, requestID } = _ref9;
94957
95400
  var renderer = _this._rendererInterfaces[rendererID];
94958
95401
  if (renderer == null) {
94959
95402
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
94960
95403
  } else {
94961
- _this._bridge.send("inspectedElement", renderer.inspectElement(requestID, id, path32, forceFullData));
95404
+ _this._bridge.send("inspectedElement", renderer.inspectElement(requestID, id, path33, forceFullData));
94962
95405
  if (_this._persistedSelectionMatch === null || _this._persistedSelectionMatch.id !== id) {
94963
95406
  _this._persistedSelection = null;
94964
95407
  _this._persistedSelectionMatch = null;
@@ -94992,15 +95435,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
94992
95435
  }
94993
95436
  for (var rendererID in _this._rendererInterfaces) {
94994
95437
  var renderer = _this._rendererInterfaces[rendererID];
94995
- var path32 = null;
95438
+ var path33 = null;
94996
95439
  if (suspendedByPathIndex !== null && rendererPath !== null) {
94997
95440
  var suspendedByPathRendererIndex = suspendedByPathIndex - suspendedByOffset;
94998
95441
  var rendererHasRequestedSuspendedByPath = renderer.getElementAttributeByPath(id, ["suspendedBy", suspendedByPathRendererIndex]) !== undefined;
94999
95442
  if (rendererHasRequestedSuspendedByPath) {
95000
- path32 = ["suspendedBy", suspendedByPathRendererIndex].concat(rendererPath);
95443
+ path33 = ["suspendedBy", suspendedByPathRendererIndex].concat(rendererPath);
95001
95444
  }
95002
95445
  }
95003
- var inspectedRootsPayload = renderer.inspectElement(requestID, id, path32, forceFullData);
95446
+ var inspectedRootsPayload = renderer.inspectElement(requestID, id, path33, forceFullData);
95004
95447
  switch (inspectedRootsPayload.type) {
95005
95448
  case "hydrated-path":
95006
95449
  inspectedRootsPayload.path[1] += suspendedByOffset;
@@ -95094,20 +95537,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
95094
95537
  }
95095
95538
  });
95096
95539
  agent_defineProperty(_this, "overrideValueAtPath", function(_ref15) {
95097
- var { hookID, id, path: path32, rendererID, type, value } = _ref15;
95540
+ var { hookID, id, path: path33, rendererID, type, value } = _ref15;
95098
95541
  var renderer = _this._rendererInterfaces[rendererID];
95099
95542
  if (renderer == null) {
95100
95543
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
95101
95544
  } else {
95102
- renderer.overrideValueAtPath(type, id, hookID, path32, value);
95545
+ renderer.overrideValueAtPath(type, id, hookID, path33, value);
95103
95546
  }
95104
95547
  });
95105
95548
  agent_defineProperty(_this, "overrideContext", function(_ref16) {
95106
- var { id, path: path32, rendererID, wasForwarded, value } = _ref16;
95549
+ var { id, path: path33, rendererID, wasForwarded, value } = _ref16;
95107
95550
  if (!wasForwarded) {
95108
95551
  _this.overrideValueAtPath({
95109
95552
  id,
95110
- path: path32,
95553
+ path: path33,
95111
95554
  rendererID,
95112
95555
  type: "context",
95113
95556
  value
@@ -95115,11 +95558,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
95115
95558
  }
95116
95559
  });
95117
95560
  agent_defineProperty(_this, "overrideHookState", function(_ref17) {
95118
- var { id, hookID, path: path32, rendererID, wasForwarded, value } = _ref17;
95561
+ var { id, hookID, path: path33, rendererID, wasForwarded, value } = _ref17;
95119
95562
  if (!wasForwarded) {
95120
95563
  _this.overrideValueAtPath({
95121
95564
  id,
95122
- path: path32,
95565
+ path: path33,
95123
95566
  rendererID,
95124
95567
  type: "hooks",
95125
95568
  value
@@ -95127,11 +95570,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
95127
95570
  }
95128
95571
  });
95129
95572
  agent_defineProperty(_this, "overrideProps", function(_ref18) {
95130
- var { id, path: path32, rendererID, wasForwarded, value } = _ref18;
95573
+ var { id, path: path33, rendererID, wasForwarded, value } = _ref18;
95131
95574
  if (!wasForwarded) {
95132
95575
  _this.overrideValueAtPath({
95133
95576
  id,
95134
- path: path32,
95577
+ path: path33,
95135
95578
  rendererID,
95136
95579
  type: "props",
95137
95580
  value
@@ -95139,11 +95582,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
95139
95582
  }
95140
95583
  });
95141
95584
  agent_defineProperty(_this, "overrideState", function(_ref19) {
95142
- var { id, path: path32, rendererID, wasForwarded, value } = _ref19;
95585
+ var { id, path: path33, rendererID, wasForwarded, value } = _ref19;
95143
95586
  if (!wasForwarded) {
95144
95587
  _this.overrideValueAtPath({
95145
95588
  id,
95146
- path: path32,
95589
+ path: path33,
95147
95590
  rendererID,
95148
95591
  type: "state",
95149
95592
  value
@@ -95210,12 +95653,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
95210
95653
  _this._bridge.send("stopInspectingHost", selected);
95211
95654
  });
95212
95655
  agent_defineProperty(_this, "storeAsGlobal", function(_ref23) {
95213
- var { count, id, path: path32, rendererID } = _ref23;
95656
+ var { count, id, path: path33, rendererID } = _ref23;
95214
95657
  var renderer = _this._rendererInterfaces[rendererID];
95215
95658
  if (renderer == null) {
95216
95659
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
95217
95660
  } else {
95218
- renderer.storeAsGlobal(id, path32, count);
95661
+ renderer.storeAsGlobal(id, path33, count);
95219
95662
  }
95220
95663
  });
95221
95664
  agent_defineProperty(_this, "updateHookSettings", function(settings) {
@@ -95232,12 +95675,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
95232
95675
  var rendererID = +rendererIDString;
95233
95676
  var renderer = _this._rendererInterfaces[rendererID];
95234
95677
  if (_this._lastSelectedRendererID === rendererID) {
95235
- var path32 = renderer.getPathForElement(_this._lastSelectedElementID);
95236
- if (path32 !== null) {
95237
- renderer.setTrackedPath(path32);
95678
+ var path33 = renderer.getPathForElement(_this._lastSelectedElementID);
95679
+ if (path33 !== null) {
95680
+ renderer.setTrackedPath(path33);
95238
95681
  _this._persistedSelection = {
95239
95682
  rendererID,
95240
- path: path32
95683
+ path: path33
95241
95684
  };
95242
95685
  }
95243
95686
  }
@@ -95312,11 +95755,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
95312
95755
  var rendererID = _this._lastSelectedRendererID;
95313
95756
  var id = _this._lastSelectedElementID;
95314
95757
  var renderer = _this._rendererInterfaces[rendererID];
95315
- var path32 = renderer != null ? renderer.getPathForElement(id) : null;
95316
- if (path32 !== null) {
95758
+ var path33 = renderer != null ? renderer.getPathForElement(id) : null;
95759
+ if (path33 !== null) {
95317
95760
  storage_sessionStorageSetItem(SESSION_STORAGE_LAST_SELECTION_KEY, JSON.stringify({
95318
95761
  rendererID,
95319
- path: path32
95762
+ path: path33
95320
95763
  }));
95321
95764
  } else {
95322
95765
  storage_sessionStorageRemoveItem(SESSION_STORAGE_LAST_SELECTION_KEY);
@@ -96039,7 +96482,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
96039
96482
  hasElementWithId: function hasElementWithId() {
96040
96483
  return false;
96041
96484
  },
96042
- inspectElement: function inspectElement(requestID, id, path32) {
96485
+ inspectElement: function inspectElement(requestID, id, path33) {
96043
96486
  return {
96044
96487
  id,
96045
96488
  responseID: requestID,
@@ -101309,9 +101752,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
101309
101752
  }
101310
101753
  return null;
101311
101754
  }
101312
- function getElementAttributeByPath(id, path32) {
101755
+ function getElementAttributeByPath(id, path33) {
101313
101756
  if (isMostRecentlyInspectedElement(id)) {
101314
- return utils_getInObject(mostRecentlyInspectedElement, path32);
101757
+ return utils_getInObject(mostRecentlyInspectedElement, path33);
101315
101758
  }
101316
101759
  return;
101317
101760
  }
@@ -102014,9 +102457,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
102014
102457
  function isMostRecentlyInspectedElementCurrent(id) {
102015
102458
  return isMostRecentlyInspectedElement(id) && !hasElementUpdatedSinceLastInspected;
102016
102459
  }
102017
- function mergeInspectedPaths(path32) {
102460
+ function mergeInspectedPaths(path33) {
102018
102461
  var current = currentlyInspectedPaths;
102019
- path32.forEach(function(key) {
102462
+ path33.forEach(function(key) {
102020
102463
  if (!current[key]) {
102021
102464
  current[key] = {};
102022
102465
  }
@@ -102024,21 +102467,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
102024
102467
  });
102025
102468
  }
102026
102469
  function createIsPathAllowed(key, secondaryCategory) {
102027
- return function isPathAllowed(path32) {
102470
+ return function isPathAllowed(path33) {
102028
102471
  switch (secondaryCategory) {
102029
102472
  case "hooks":
102030
- if (path32.length === 1) {
102473
+ if (path33.length === 1) {
102031
102474
  return true;
102032
102475
  }
102033
- if (path32[path32.length - 2] === "hookSource" && path32[path32.length - 1] === "fileName") {
102476
+ if (path33[path33.length - 2] === "hookSource" && path33[path33.length - 1] === "fileName") {
102034
102477
  return true;
102035
102478
  }
102036
- if (path32[path32.length - 1] === "subHooks" || path32[path32.length - 2] === "subHooks") {
102479
+ if (path33[path33.length - 1] === "subHooks" || path33[path33.length - 2] === "subHooks") {
102037
102480
  return true;
102038
102481
  }
102039
102482
  break;
102040
102483
  case "suspendedBy":
102041
- if (path32.length < 5) {
102484
+ if (path33.length < 5) {
102042
102485
  return true;
102043
102486
  }
102044
102487
  break;
@@ -102049,8 +102492,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
102049
102492
  if (!current) {
102050
102493
  return false;
102051
102494
  }
102052
- for (var i = 0;i < path32.length; i++) {
102053
- current = current[path32[i]];
102495
+ for (var i = 0;i < path33.length; i++) {
102496
+ current = current[path33[i]];
102054
102497
  if (!current) {
102055
102498
  return false;
102056
102499
  }
@@ -102104,38 +102547,38 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
102104
102547
  break;
102105
102548
  }
102106
102549
  }
102107
- function storeAsGlobal(id, path32, count) {
102550
+ function storeAsGlobal(id, path33, count) {
102108
102551
  if (isMostRecentlyInspectedElement(id)) {
102109
- var value = utils_getInObject(mostRecentlyInspectedElement, path32);
102552
+ var value = utils_getInObject(mostRecentlyInspectedElement, path33);
102110
102553
  var key = "$reactTemp".concat(count);
102111
102554
  window[key] = value;
102112
102555
  console.log(key);
102113
102556
  console.log(value);
102114
102557
  }
102115
102558
  }
102116
- function getSerializedElementValueByPath(id, path32) {
102559
+ function getSerializedElementValueByPath(id, path33) {
102117
102560
  if (isMostRecentlyInspectedElement(id)) {
102118
- var valueToCopy = utils_getInObject(mostRecentlyInspectedElement, path32);
102561
+ var valueToCopy = utils_getInObject(mostRecentlyInspectedElement, path33);
102119
102562
  return serializeToString(valueToCopy);
102120
102563
  }
102121
102564
  }
102122
- function inspectElement(requestID, id, path32, forceFullData) {
102123
- if (path32 !== null) {
102124
- mergeInspectedPaths(path32);
102565
+ function inspectElement(requestID, id, path33, forceFullData) {
102566
+ if (path33 !== null) {
102567
+ mergeInspectedPaths(path33);
102125
102568
  }
102126
102569
  if (isMostRecentlyInspectedElement(id) && !forceFullData) {
102127
102570
  if (!hasElementUpdatedSinceLastInspected) {
102128
- if (path32 !== null) {
102571
+ if (path33 !== null) {
102129
102572
  var secondaryCategory = null;
102130
- if (path32[0] === "hooks" || path32[0] === "suspendedBy") {
102131
- secondaryCategory = path32[0];
102573
+ if (path33[0] === "hooks" || path33[0] === "suspendedBy") {
102574
+ secondaryCategory = path33[0];
102132
102575
  }
102133
102576
  return {
102134
102577
  id,
102135
102578
  responseID: requestID,
102136
102579
  type: "hydrated-path",
102137
- path: path32,
102138
- value: cleanForBridge(utils_getInObject(mostRecentlyInspectedElement, path32), createIsPathAllowed(null, secondaryCategory), path32)
102580
+ path: path33,
102581
+ value: cleanForBridge(utils_getInObject(mostRecentlyInspectedElement, path33), createIsPathAllowed(null, secondaryCategory), path33)
102139
102582
  };
102140
102583
  } else {
102141
102584
  return {
@@ -102331,7 +102774,7 @@ The error thrown in the component is:
102331
102774
  console.groupEnd();
102332
102775
  }
102333
102776
  }
102334
- function deletePath(type, id, hookID, path32) {
102777
+ function deletePath(type, id, hookID, path33) {
102335
102778
  var devtoolsInstance = idToDevToolsInstanceMap.get(id);
102336
102779
  if (devtoolsInstance === undefined) {
102337
102780
  console.warn('Could not find DevToolsInstance with id "'.concat(id, '"'));
@@ -102345,11 +102788,11 @@ The error thrown in the component is:
102345
102788
  var instance2 = fiber.stateNode;
102346
102789
  switch (type) {
102347
102790
  case "context":
102348
- path32 = path32.slice(1);
102791
+ path33 = path33.slice(1);
102349
102792
  switch (fiber.tag) {
102350
102793
  case ClassComponent:
102351
- if (path32.length === 0) {} else {
102352
- deletePathInObject(instance2.context, path32);
102794
+ if (path33.length === 0) {} else {
102795
+ deletePathInObject(instance2.context, path33);
102353
102796
  }
102354
102797
  instance2.forceUpdate();
102355
102798
  break;
@@ -102359,21 +102802,21 @@ The error thrown in the component is:
102359
102802
  break;
102360
102803
  case "hooks":
102361
102804
  if (typeof overrideHookStateDeletePath === "function") {
102362
- overrideHookStateDeletePath(fiber, hookID, path32);
102805
+ overrideHookStateDeletePath(fiber, hookID, path33);
102363
102806
  }
102364
102807
  break;
102365
102808
  case "props":
102366
102809
  if (instance2 === null) {
102367
102810
  if (typeof overridePropsDeletePath === "function") {
102368
- overridePropsDeletePath(fiber, path32);
102811
+ overridePropsDeletePath(fiber, path33);
102369
102812
  }
102370
102813
  } else {
102371
- fiber.pendingProps = copyWithDelete(instance2.props, path32);
102814
+ fiber.pendingProps = copyWithDelete(instance2.props, path33);
102372
102815
  instance2.forceUpdate();
102373
102816
  }
102374
102817
  break;
102375
102818
  case "state":
102376
- deletePathInObject(instance2.state, path32);
102819
+ deletePathInObject(instance2.state, path33);
102377
102820
  instance2.forceUpdate();
102378
102821
  break;
102379
102822
  }
@@ -102428,7 +102871,7 @@ The error thrown in the component is:
102428
102871
  }
102429
102872
  }
102430
102873
  }
102431
- function overrideValueAtPath(type, id, hookID, path32, value) {
102874
+ function overrideValueAtPath(type, id, hookID, path33, value) {
102432
102875
  var devtoolsInstance = idToDevToolsInstanceMap.get(id);
102433
102876
  if (devtoolsInstance === undefined) {
102434
102877
  console.warn('Could not find DevToolsInstance with id "'.concat(id, '"'));
@@ -102442,13 +102885,13 @@ The error thrown in the component is:
102442
102885
  var instance2 = fiber.stateNode;
102443
102886
  switch (type) {
102444
102887
  case "context":
102445
- path32 = path32.slice(1);
102888
+ path33 = path33.slice(1);
102446
102889
  switch (fiber.tag) {
102447
102890
  case ClassComponent:
102448
- if (path32.length === 0) {
102891
+ if (path33.length === 0) {
102449
102892
  instance2.context = value;
102450
102893
  } else {
102451
- utils_setInObject(instance2.context, path32, value);
102894
+ utils_setInObject(instance2.context, path33, value);
102452
102895
  }
102453
102896
  instance2.forceUpdate();
102454
102897
  break;
@@ -102458,18 +102901,18 @@ The error thrown in the component is:
102458
102901
  break;
102459
102902
  case "hooks":
102460
102903
  if (typeof overrideHookState === "function") {
102461
- overrideHookState(fiber, hookID, path32, value);
102904
+ overrideHookState(fiber, hookID, path33, value);
102462
102905
  }
102463
102906
  break;
102464
102907
  case "props":
102465
102908
  switch (fiber.tag) {
102466
102909
  case ClassComponent:
102467
- fiber.pendingProps = copyWithSet(instance2.props, path32, value);
102910
+ fiber.pendingProps = copyWithSet(instance2.props, path33, value);
102468
102911
  instance2.forceUpdate();
102469
102912
  break;
102470
102913
  default:
102471
102914
  if (typeof overrideProps === "function") {
102472
- overrideProps(fiber, path32, value);
102915
+ overrideProps(fiber, path33, value);
102473
102916
  }
102474
102917
  break;
102475
102918
  }
@@ -102477,7 +102920,7 @@ The error thrown in the component is:
102477
102920
  case "state":
102478
102921
  switch (fiber.tag) {
102479
102922
  case ClassComponent:
102480
- utils_setInObject(instance2.state, path32, value);
102923
+ utils_setInObject(instance2.state, path33, value);
102481
102924
  instance2.forceUpdate();
102482
102925
  break;
102483
102926
  }
@@ -102763,14 +103206,14 @@ The error thrown in the component is:
102763
103206
  var trackedPathMatchInstance = null;
102764
103207
  var trackedPathMatchDepth = -1;
102765
103208
  var mightBeOnTrackedPath = false;
102766
- function setTrackedPath(path32) {
102767
- if (path32 === null) {
103209
+ function setTrackedPath(path33) {
103210
+ if (path33 === null) {
102768
103211
  trackedPathMatchFiber = null;
102769
103212
  trackedPathMatchInstance = null;
102770
103213
  trackedPathMatchDepth = -1;
102771
103214
  mightBeOnTrackedPath = false;
102772
103215
  }
102773
- trackedPath = path32;
103216
+ trackedPath = path33;
102774
103217
  }
102775
103218
  function updateTrackedPathStateBeforeMount(fiber, fiberInstance) {
102776
103219
  if (trackedPath === null || !mightBeOnTrackedPath) {
@@ -103534,9 +103977,9 @@ The error thrown in the component is:
103534
103977
  }
103535
103978
  var currentlyInspectedElementID = null;
103536
103979
  var currentlyInspectedPaths = {};
103537
- function mergeInspectedPaths(path32) {
103980
+ function mergeInspectedPaths(path33) {
103538
103981
  var current = currentlyInspectedPaths;
103539
- path32.forEach(function(key) {
103982
+ path33.forEach(function(key) {
103540
103983
  if (!current[key]) {
103541
103984
  current[key] = {};
103542
103985
  }
@@ -103544,13 +103987,13 @@ The error thrown in the component is:
103544
103987
  });
103545
103988
  }
103546
103989
  function createIsPathAllowed(key) {
103547
- return function isPathAllowed(path32) {
103990
+ return function isPathAllowed(path33) {
103548
103991
  var current = currentlyInspectedPaths[key];
103549
103992
  if (!current) {
103550
103993
  return false;
103551
103994
  }
103552
- for (var i = 0;i < path32.length; i++) {
103553
- current = current[path32[i]];
103995
+ for (var i = 0;i < path33.length; i++) {
103996
+ current = current[path33[i]];
103554
103997
  if (!current) {
103555
103998
  return false;
103556
103999
  }
@@ -103600,24 +104043,24 @@ The error thrown in the component is:
103600
104043
  break;
103601
104044
  }
103602
104045
  }
103603
- function storeAsGlobal(id, path32, count) {
104046
+ function storeAsGlobal(id, path33, count) {
103604
104047
  var inspectedElement = inspectElementRaw(id);
103605
104048
  if (inspectedElement !== null) {
103606
- var value = utils_getInObject(inspectedElement, path32);
104049
+ var value = utils_getInObject(inspectedElement, path33);
103607
104050
  var key = "$reactTemp".concat(count);
103608
104051
  window[key] = value;
103609
104052
  console.log(key);
103610
104053
  console.log(value);
103611
104054
  }
103612
104055
  }
103613
- function getSerializedElementValueByPath(id, path32) {
104056
+ function getSerializedElementValueByPath(id, path33) {
103614
104057
  var inspectedElement = inspectElementRaw(id);
103615
104058
  if (inspectedElement !== null) {
103616
- var valueToCopy = utils_getInObject(inspectedElement, path32);
104059
+ var valueToCopy = utils_getInObject(inspectedElement, path33);
103617
104060
  return serializeToString(valueToCopy);
103618
104061
  }
103619
104062
  }
103620
- function inspectElement(requestID, id, path32, forceFullData) {
104063
+ function inspectElement(requestID, id, path33, forceFullData) {
103621
104064
  if (forceFullData || currentlyInspectedElementID !== id) {
103622
104065
  currentlyInspectedElementID = id;
103623
104066
  currentlyInspectedPaths = {};
@@ -103630,8 +104073,8 @@ The error thrown in the component is:
103630
104073
  type: "not-found"
103631
104074
  };
103632
104075
  }
103633
- if (path32 !== null) {
103634
- mergeInspectedPaths(path32);
104076
+ if (path33 !== null) {
104077
+ mergeInspectedPaths(path33);
103635
104078
  }
103636
104079
  updateSelectedElement(id);
103637
104080
  inspectedElement.context = cleanForBridge(inspectedElement.context, createIsPathAllowed("context"));
@@ -103834,10 +104277,10 @@ The error thrown in the component is:
103834
104277
  console.groupEnd();
103835
104278
  }
103836
104279
  }
103837
- function getElementAttributeByPath(id, path32) {
104280
+ function getElementAttributeByPath(id, path33) {
103838
104281
  var inspectedElement = inspectElementRaw(id);
103839
104282
  if (inspectedElement !== null) {
103840
- return utils_getInObject(inspectedElement, path32);
104283
+ return utils_getInObject(inspectedElement, path33);
103841
104284
  }
103842
104285
  return;
103843
104286
  }
@@ -103854,14 +104297,14 @@ The error thrown in the component is:
103854
104297
  }
103855
104298
  return element.type;
103856
104299
  }
103857
- function deletePath(type, id, hookID, path32) {
104300
+ function deletePath(type, id, hookID, path33) {
103858
104301
  var internalInstance = idToInternalInstanceMap.get(id);
103859
104302
  if (internalInstance != null) {
103860
104303
  var publicInstance = internalInstance._instance;
103861
104304
  if (publicInstance != null) {
103862
104305
  switch (type) {
103863
104306
  case "context":
103864
- deletePathInObject(publicInstance.context, path32);
104307
+ deletePathInObject(publicInstance.context, path33);
103865
104308
  forceUpdate(publicInstance);
103866
104309
  break;
103867
104310
  case "hooks":
@@ -103869,12 +104312,12 @@ The error thrown in the component is:
103869
104312
  case "props":
103870
104313
  var element = internalInstance._currentElement;
103871
104314
  internalInstance._currentElement = legacy_renderer_objectSpread(legacy_renderer_objectSpread({}, element), {}, {
103872
- props: copyWithDelete(element.props, path32)
104315
+ props: copyWithDelete(element.props, path33)
103873
104316
  });
103874
104317
  forceUpdate(publicInstance);
103875
104318
  break;
103876
104319
  case "state":
103877
- deletePathInObject(publicInstance.state, path32);
104320
+ deletePathInObject(publicInstance.state, path33);
103878
104321
  forceUpdate(publicInstance);
103879
104322
  break;
103880
104323
  }
@@ -103908,14 +104351,14 @@ The error thrown in the component is:
103908
104351
  }
103909
104352
  }
103910
104353
  }
103911
- function overrideValueAtPath(type, id, hookID, path32, value) {
104354
+ function overrideValueAtPath(type, id, hookID, path33, value) {
103912
104355
  var internalInstance = idToInternalInstanceMap.get(id);
103913
104356
  if (internalInstance != null) {
103914
104357
  var publicInstance = internalInstance._instance;
103915
104358
  if (publicInstance != null) {
103916
104359
  switch (type) {
103917
104360
  case "context":
103918
- utils_setInObject(publicInstance.context, path32, value);
104361
+ utils_setInObject(publicInstance.context, path33, value);
103919
104362
  forceUpdate(publicInstance);
103920
104363
  break;
103921
104364
  case "hooks":
@@ -103923,12 +104366,12 @@ The error thrown in the component is:
103923
104366
  case "props":
103924
104367
  var element = internalInstance._currentElement;
103925
104368
  internalInstance._currentElement = legacy_renderer_objectSpread(legacy_renderer_objectSpread({}, element), {}, {
103926
- props: copyWithSet(element.props, path32, value)
104369
+ props: copyWithSet(element.props, path33, value)
103927
104370
  });
103928
104371
  forceUpdate(publicInstance);
103929
104372
  break;
103930
104373
  case "state":
103931
- utils_setInObject(publicInstance.state, path32, value);
104374
+ utils_setInObject(publicInstance.state, path33, value);
103932
104375
  forceUpdate(publicInstance);
103933
104376
  break;
103934
104377
  }
@@ -103969,7 +104412,7 @@ The error thrown in the component is:
103969
104412
  return [];
103970
104413
  }
103971
104414
  function setTraceUpdatesEnabled(enabled) {}
103972
- function setTrackedPath(path32) {}
104415
+ function setTrackedPath(path33) {}
103973
104416
  function getOwnersList(id) {
103974
104417
  return null;
103975
104418
  }
@@ -107428,10 +107871,10 @@ init_setup_write();
107428
107871
  // src/cli/plugins.ts
107429
107872
  init_paths();
107430
107873
  init_loader4();
107431
- import * as path23 from "path";
107874
+ import * as path24 from "path";
107432
107875
  async function pluginsListCommand(config2, workdir, overrideGlobalPluginsDir) {
107433
- const globalPluginsDir = overrideGlobalPluginsDir ?? path23.join(globalConfigDir(), "plugins");
107434
- const projectPluginsDir = path23.join(workdir, ".nax", "plugins");
107876
+ const globalPluginsDir = overrideGlobalPluginsDir ?? path24.join(globalConfigDir(), "plugins");
107877
+ const projectPluginsDir = path24.join(workdir, ".nax", "plugins");
107435
107878
  const configPlugins = config2.plugins || [];
107436
107879
  const registry3 = await loadPlugins(globalPluginsDir, projectPluginsDir, configPlugins, workdir, config2.disabledPlugins);
107437
107880
  const plugins = registry3.plugins;
@@ -107481,10 +107924,10 @@ function formatSource(type, sourcePath) {
107481
107924
  return `built-in (${sourcePath})`;
107482
107925
  }
107483
107926
  if (type === "global") {
107484
- return `global (${path23.basename(sourcePath)})`;
107927
+ return `global (${path24.basename(sourcePath)})`;
107485
107928
  }
107486
107929
  if (type === "project") {
107487
- return `project (${path23.basename(sourcePath)})`;
107930
+ return `project (${path24.basename(sourcePath)})`;
107488
107931
  }
107489
107932
  return `config (${sourcePath})`;
107490
107933
  }
@@ -107880,10 +108323,10 @@ function deepDiffConfigs(global2, project, currentPath = []) {
107880
108323
  for (const key of Object.keys(project)) {
107881
108324
  const projectValue = project[key];
107882
108325
  const globalValue = global2[key];
107883
- const path24 = [...currentPath, key];
107884
- const pathStr = path24.join(".");
108326
+ const path25 = [...currentPath, key];
108327
+ const pathStr = path25.join(".");
107885
108328
  if (projectValue !== null && typeof projectValue === "object" && !Array.isArray(projectValue) && globalValue !== null && typeof globalValue === "object" && !Array.isArray(globalValue)) {
107886
- const nestedDiffs = deepDiffConfigs(globalValue, projectValue, path24);
108329
+ const nestedDiffs = deepDiffConfigs(globalValue, projectValue, path25);
107887
108330
  diffs.push(...nestedDiffs);
107888
108331
  } else {
107889
108332
  if (!deepEqual(projectValue, globalValue)) {
@@ -107926,11 +108369,11 @@ init_defaults();
107926
108369
  init_loader();
107927
108370
  import { existsSync as existsSync25 } from "fs";
107928
108371
  import { join as join71 } from "path";
107929
- async function loadConfigFile(path24) {
107930
- if (!existsSync25(path24))
108372
+ async function loadConfigFile(path25) {
108373
+ if (!existsSync25(path25))
107931
108374
  return null;
107932
108375
  try {
107933
- return await Bun.file(path24).json();
108376
+ return await Bun.file(path25).json();
107934
108377
  } catch {
107935
108378
  return null;
107936
108379
  }
@@ -107977,10 +108420,10 @@ async function configCommand(config2, options = {}) {
107977
108420
  console.log(`${"Field".padEnd(40)}${"Project Value".padEnd(20)}Global Value`);
107978
108421
  console.log("\u2500".repeat(80));
107979
108422
  for (const diff2 of diffs) {
107980
- const path24 = diff2.path.padEnd(40);
108423
+ const path25 = diff2.path.padEnd(40);
107981
108424
  const projectVal = formatValueForTable(diff2.projectValue);
107982
108425
  const globalVal = formatValueForTable(diff2.globalValue);
107983
- console.log(`${path24}${projectVal.padEnd(20)}${globalVal}`);
108426
+ console.log(`${path25}${projectVal.padEnd(20)}${globalVal}`);
107984
108427
  const description = FIELD_DESCRIPTIONS[diff2.path];
107985
108428
  if (description) {
107986
108429
  console.log(`${"".padEnd(40)}\u21B3 ${description}`);
@@ -108013,26 +108456,26 @@ function determineConfigSources() {
108013
108456
  project: projectPath && fileExists(projectPath) ? projectPath : null
108014
108457
  };
108015
108458
  }
108016
- function fileExists(path24) {
108017
- return existsSync26(path24);
108459
+ function fileExists(path25) {
108460
+ return existsSync26(path25);
108018
108461
  }
108019
- function displayConfigWithDescriptions(obj, path24, sources, indent = 0) {
108462
+ function displayConfigWithDescriptions(obj, path25, sources, indent = 0) {
108020
108463
  const indentStr = " ".repeat(indent);
108021
- const pathStr = path24.join(".");
108464
+ const pathStr = path25.join(".");
108022
108465
  if (obj === null || obj === undefined || typeof obj !== "object" || Array.isArray(obj)) {
108023
108466
  const description = FIELD_DESCRIPTIONS[pathStr];
108024
108467
  const value = formatValue(obj);
108025
108468
  if (description) {
108026
108469
  console.log(`${indentStr}# ${description}`);
108027
108470
  }
108028
- const key = path24[path24.length - 1] || "";
108471
+ const key = path25[path25.length - 1] || "";
108029
108472
  console.log(`${indentStr}${key}: ${value}`);
108030
108473
  console.log();
108031
108474
  return;
108032
108475
  }
108033
108476
  const entries = Object.entries(obj);
108034
108477
  const objAsRecord = obj;
108035
- const isPromptsSection = path24.join(".") === "prompts";
108478
+ const isPromptsSection = path25.join(".") === "prompts";
108036
108479
  if (isPromptsSection && !objAsRecord.overrides) {
108037
108480
  const description = FIELD_DESCRIPTIONS["prompts.overrides"];
108038
108481
  if (description) {
@@ -108055,7 +108498,7 @@ function displayConfigWithDescriptions(obj, path24, sources, indent = 0) {
108055
108498
  }
108056
108499
  for (let i = 0;i < entries.length; i++) {
108057
108500
  const [key, value] = entries[i];
108058
- const currentPath = [...path24, key];
108501
+ const currentPath = [...path25, key];
108059
108502
  const currentPathStr = currentPath.join(".");
108060
108503
  const description = FIELD_DESCRIPTIONS[currentPathStr];
108061
108504
  if (description) {
@@ -108493,11 +108936,11 @@ async function rulesLintCommand(options, deps = _rulesLintDeps) {
108493
108936
  }
108494
108937
  // src/cli/rules.ts
108495
108938
  var _rulesCLIDeps = {
108496
- readFile: async (path24) => Bun.file(path24).text(),
108497
- writeFile: async (path24, content) => {
108498
- await Bun.write(path24, content);
108939
+ readFile: async (path25) => Bun.file(path25).text(),
108940
+ writeFile: async (path25, content) => {
108941
+ await Bun.write(path25, content);
108499
108942
  },
108500
- fileExists: async (path24) => Bun.file(path24).exists(),
108943
+ fileExists: async (path25) => Bun.file(path25).exists(),
108501
108944
  globInDir: (dir) => {
108502
108945
  try {
108503
108946
  return [...new Bun.Glob("*.md").scanSync({ cwd: dir })].sort().map((f) => join75(dir, f));
@@ -108505,8 +108948,8 @@ var _rulesCLIDeps = {
108505
108948
  return [];
108506
108949
  }
108507
108950
  },
108508
- mkdir: async (path24) => {
108509
- await mkdir11(path24, { recursive: true });
108951
+ mkdir: async (path25) => {
108952
+ await mkdir11(path25, { recursive: true });
108510
108953
  },
108511
108954
  globCanonicalRuleFiles: (workdir) => _rulesLintDeps.globCanonicalRuleFiles(workdir),
108512
108955
  globHasMatch: (pattern, cwd) => _rulesLintDeps.globHasMatch(pattern, cwd),
@@ -108532,22 +108975,35 @@ var AGENT_RULE_DIRS = {
108532
108975
  claude: ".claude/rules"
108533
108976
  };
108534
108977
  var SUPPORTED_AGENTS = [...Object.keys(AGENT_RULE_DIRS), ...Object.keys(AGENT_SHIM_FILES)].sort();
108978
+ function packageGlobToFileGlob(pattern) {
108979
+ const base = pattern.replace(/\/+$/, "").replace(/\/+\*{1,2}$/, "").replace(/\/+$/, "");
108980
+ if (base === "" || base === "**")
108981
+ return "**";
108982
+ return `${base}/**`;
108983
+ }
108535
108984
  function claudeFrontmatter(rule) {
108536
- if (rule.paths?.length) {
108537
- _rulesCLIDeps.getLogger().warn("rules-export", "Dropping package scope \u2014 Claude has no equivalent", {
108985
+ const fileGlobs = rule.appliesTo ?? [];
108986
+ const packageGlobs = rule.paths ?? [];
108987
+ if (fileGlobs.length > 0 && packageGlobs.length > 0) {
108988
+ _rulesCLIDeps.getLogger().warn("rules-export", "Dropping package scope \u2014 Claude cannot express both scopes", {
108538
108989
  rule: rule.path ?? rule.fileName,
108539
- droppedPaths: rule.paths
108990
+ description: rule.description,
108991
+ droppedPaths: packageGlobs,
108992
+ keptAppliesTo: fileGlobs
108540
108993
  });
108541
108994
  }
108542
- const globs = rule.appliesTo ?? [];
108543
- if (globs.length === 0)
108995
+ const globs = fileGlobs.length > 0 ? fileGlobs : [...new Set(packageGlobs.map(packageGlobToFileGlob))];
108996
+ const description = rule.description;
108997
+ if (globs.length === 0 && description === undefined)
108544
108998
  return "";
108545
- const lines = globs.map((g) => ` - ${JSON.stringify(g)}`).join(`
108546
- `);
108999
+ const descLine = description !== undefined ? `description: ${JSON.stringify(description)}
109000
+ ` : "";
109001
+ const globLines = globs.length > 0 ? `paths:
109002
+ ${globs.map((g) => ` - ${JSON.stringify(g)}`).join(`
109003
+ `)}
109004
+ ` : "";
108547
109005
  return `---
108548
- paths:
108549
- ${lines}
108550
- ---
109006
+ ${descLine}${globLines}---
108551
109007
  `;
108552
109008
  }
108553
109009
  async function exportRuleDirectory(input) {
@@ -108766,8 +109222,8 @@ async function resolveRunProfileOverride(opts) {
108766
109222
  return cliChain;
108767
109223
  if (opts.envProfile)
108768
109224
  return;
108769
- const readJson = opts._readJson ?? (async (path24) => {
108770
- const file3 = Bun.file(path24);
109225
+ const readJson = opts._readJson ?? (async (path25) => {
109226
+ const file3 = Bun.file(path25);
108771
109227
  if (!await file3.exists())
108772
109228
  return;
108773
109229
  return file3.json();
@@ -109170,14 +109626,14 @@ function resolveEffective(detected, configPatterns) {
109170
109626
  return "detected";
109171
109627
  return "none";
109172
109628
  }
109173
- async function loadRawConfig(path24) {
109174
- const f = Bun.file(path24);
109629
+ async function loadRawConfig(path25) {
109630
+ const f = Bun.file(path25);
109175
109631
  if (!await f.exists())
109176
109632
  return {};
109177
109633
  return JSON.parse(await f.text());
109178
109634
  }
109179
- async function writeRawConfig(path24, data) {
109180
- await Bun.write(path24, `${JSON.stringify(data, null, 2)}
109635
+ async function writeRawConfig(path25, data) {
109636
+ await Bun.write(path25, `${JSON.stringify(data, null, 2)}
109181
109637
  `);
109182
109638
  }
109183
109639
  function deepSet(obj, keyPath, value) {
@@ -109965,10 +110421,10 @@ function renderReport(timeline, options = {}) {
109965
110421
  }
109966
110422
 
109967
110423
  // src/commands/replay.ts
109968
- async function readJsonlLenient(path24) {
109969
- if (!existsSync32(path24))
110424
+ async function readJsonlLenient(path25) {
110425
+ if (!existsSync32(path25))
109970
110426
  return [];
109971
- const content = await Bun.file(path24).text();
110427
+ const content = await Bun.file(path25).text();
109972
110428
  const lines = content.split(`
109973
110429
  `);
109974
110430
  const entries = [];
@@ -109982,11 +110438,11 @@ async function readJsonlLenient(path24) {
109982
110438
  }
109983
110439
  return entries;
109984
110440
  }
109985
- async function readJsonOrUndefined(path24) {
109986
- if (!existsSync32(path24))
110441
+ async function readJsonOrUndefined(path25) {
110442
+ if (!existsSync32(path25))
109987
110443
  return;
109988
110444
  try {
109989
- return await Bun.file(path24).json();
110445
+ return await Bun.file(path25).json();
109990
110446
  } catch {
109991
110447
  return;
109992
110448
  }
@@ -115282,8 +115738,8 @@ function Text({ color, backgroundColor, dimColor = false, bold = false, italic =
115282
115738
  }
115283
115739
 
115284
115740
  // node_modules/ink/build/components/ErrorOverview.js
115285
- var cleanupPath = (path32) => {
115286
- return path32?.replace(`file://${cwd()}/`, "");
115741
+ var cleanupPath = (path33) => {
115742
+ return path33?.replace(`file://${cwd()}/`, "");
115287
115743
  };
115288
115744
  var stackUtils = new import_stack_utils.default({
115289
115745
  cwd: cwd(),
@@ -119087,8 +119543,8 @@ configProfileCmd.command("current").description("Show the currently active profi
119087
119543
  });
119088
119544
  configProfileCmd.command("create <name>").description("Create a new empty profile").option("-d, --dir <path>", "Project directory", process.cwd()).action(async (name, options) => {
119089
119545
  try {
119090
- const path32 = await profileCreateCommand(name, options.dir);
119091
- console.log(`Created profile at: ${path32}`);
119546
+ const path33 = await profileCreateCommand(name, options.dir);
119547
+ console.log(`Created profile at: ${path33}`);
119092
119548
  } catch (err) {
119093
119549
  console.error(source_default.red(`Error: ${err.message}`));
119094
119550
  process.exit(1);
@@ -119388,6 +119844,7 @@ rules.command("export").description("Export canonical rules for an agent (claude
119388
119844
  process.exit(1);
119389
119845
  return;
119390
119846
  }
119847
+ initLogger({ level: "info", useChalk: true });
119391
119848
  try {
119392
119849
  await rulesExportCommand({
119393
119850
  dir: workdir,