@codyswann/lisa 8.7.0 → 8.7.1

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.
Files changed (162) hide show
  1. package/README.md +9 -0
  2. package/all/copy-overwrite/scripts/lib/changed-paths.mjs +146 -0
  3. package/all/copy-overwrite/scripts/lib/completion-proof-content.mjs +6 -2
  4. package/all/copy-overwrite/scripts/lisa-gates.mjs +16 -1
  5. package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +297 -177
  6. package/all/copy-overwrite/scripts/lisa-run-gates.mjs +24 -0
  7. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +7 -6
  8. package/all/copy-overwrite/scripts/threshold-ratchet-compare.mjs +18 -12
  9. package/dist/cli/apply-cmd.d.ts +10 -0
  10. package/dist/cli/apply-cmd.d.ts.map +1 -0
  11. package/dist/cli/apply-cmd.js +28 -0
  12. package/dist/cli/apply-cmd.js.map +1 -0
  13. package/dist/cli/index.d.ts.map +1 -1
  14. package/dist/cli/index.js +3 -12
  15. package/dist/cli/index.js.map +1 -1
  16. package/dist/core/lisa-owned-hash-ledger.json +56 -4
  17. package/dist/core/nightly-e2e-guard-behavior-certificate.d.ts +5 -5
  18. package/dist/core/nightly-e2e-guard-behavior-certificate.js +7 -7
  19. package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
  20. package/dist/core/upstream-evidence-manifest.json +65 -24
  21. package/expo/copy-overwrite/scripts/check-bdd-coverage.mjs +4 -1
  22. package/expo/create-only/tsconfig.local.json +6 -1
  23. package/package.json +4 -4
  24. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  26. package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +43 -18
  27. package/plugins/lisa/.codex-plugin/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  28. package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +6 -1
  29. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +9 -2
  30. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  31. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  32. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  33. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  34. package/plugins/lisa/hooks/block-direct-issue-create.sh +297 -177
  35. package/plugins/lisa/hooks/threshold-ratchet-compare.mjs +18 -12
  36. package/plugins/lisa/rules/reference/config-resolution.md +2 -2
  37. package/plugins/lisa/scripts/ready-queue-order.mjs +43 -18
  38. package/plugins/lisa/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  39. package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +6 -1
  40. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +9 -2
  41. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  42. package/plugins/lisa/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  43. package/plugins/lisa/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  44. package/plugins/lisa/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  45. package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +297 -177
  46. package/plugins/lisa-agy/plugin.json +1 -1
  47. package/plugins/lisa-agy/scripts/ready-queue-order.mjs +43 -18
  48. package/plugins/lisa-agy/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  49. package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +6 -1
  50. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +9 -2
  51. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  52. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  53. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  54. package/plugins/lisa-agy/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  55. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  57. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  58. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  62. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +297 -177
  64. package/plugins/lisa-copilot/hooks/threshold-ratchet-compare.mjs +18 -12
  65. package/plugins/lisa-copilot/rules/reference/config-resolution.md +2 -2
  66. package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +43 -18
  67. package/plugins/lisa-copilot/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  68. package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +6 -1
  69. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +9 -2
  70. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  71. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  72. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  73. package/plugins/lisa-copilot/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  74. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +297 -177
  76. package/plugins/lisa-cursor/hooks/threshold-ratchet-compare.mjs +18 -12
  77. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +2 -2
  78. package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +43 -18
  79. package/plugins/lisa-cursor/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  80. package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +6 -1
  81. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +9 -2
  82. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  83. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  84. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  85. package/plugins/lisa-cursor/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  86. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  87. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  88. package/plugins/lisa-devin/hooks/block-direct-issue-create.sh +297 -177
  89. package/plugins/lisa-devin/hooks/threshold-ratchet-compare.mjs +18 -12
  90. package/plugins/lisa-devin/rules/reference/config-resolution.md +2 -2
  91. package/plugins/lisa-devin/scripts/ready-queue-order.mjs +43 -18
  92. package/plugins/lisa-devin/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  93. package/plugins/lisa-devin/skills/lisa-linear-write-issue/SKILL.md +6 -1
  94. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +9 -2
  95. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  96. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  97. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  98. package/plugins/lisa-devin/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  99. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  100. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  101. package/plugins/lisa-expo-agy/plugin.json +1 -1
  102. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  103. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  104. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  105. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  106. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  107. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  108. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  109. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  111. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  112. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  113. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  114. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  115. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  116. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  117. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  118. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  119. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  120. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  121. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  122. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  123. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  125. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  126. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  127. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  128. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  129. package/plugins/lisa-rails-agy/plugin.json +1 -1
  130. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  131. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  132. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  133. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  134. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  135. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  136. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  137. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  138. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  139. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  140. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  141. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  142. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  143. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  144. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  145. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  146. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  147. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  148. package/plugins/src/base/hooks/block-direct-issue-create.sh +297 -177
  149. package/plugins/src/base/hooks/threshold-ratchet-compare.mjs +18 -12
  150. package/plugins/src/base/rules/reference/config-resolution.md +2 -2
  151. package/plugins/src/base/scripts/ready-queue-order.mjs +43 -18
  152. package/plugins/src/base/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  153. package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +6 -1
  154. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +9 -2
  155. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  156. package/plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  157. package/plugins/src/base/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  158. package/plugins/src/base/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  159. package/rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs +28 -2
  160. package/rails/copy-overwrite/scripts/threshold-ratchet-compare.mjs +18 -12
  161. package/typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs +28 -2
  162. package/typescript/copy-overwrite/scripts/threshold-ratchet-compare.mjs +18 -12
package/README.md CHANGED
@@ -226,6 +226,15 @@ the root `.nvmrc` to update current tracked runtime surfaces without rewriting
226
226
  historical plans or generic test fixtures. The npm updater has a separately
227
227
  qualified Node22.23.3 runtime, which this shared-default updater leaves alone.
228
228
 
229
+ ### Keeping generated artifacts out of Expo typechecking
230
+
231
+ New Expo projects exclude the root `evidence`, `test-results`, `playwright-report`,
232
+ `blob-report`, and `coverage` directories from ordinary TypeScript checks.
233
+ Existing `tsconfig.local.json` files stay project-owned. To adopt these
234
+ exclusions in an existing Expo project, append those five directory names to
235
+ its `exclude` array and retain your existing entries. Run your project's usual
236
+ typecheck after saving.
237
+
229
238
  ### Moving an existing host to Node24
230
239
 
231
240
  Review explicit `engines.node` and existing create-only workflow/EAS inputs;
@@ -509,6 +509,152 @@ function pushedChange({ root, git, env, source, read }) {
509
509
  });
510
510
  }
511
511
 
512
+ /**
513
+ * The remote default branch's common ancestor with a commit, for a first push
514
+ * or a manual run with no push-hook input.
515
+ * @param {string} head The commit being sent.
516
+ * @param {AskGit} git How git is asked.
517
+ * @returns {string|undefined} Comparison commit, or unknown ancestry.
518
+ */
519
+ function defaultBranchBase(head, git) {
520
+ const defaultRef = git([
521
+ "symbolic-ref",
522
+ "--quiet",
523
+ "refs/remotes/origin/HEAD",
524
+ ])?.trim();
525
+ if (!defaultRef) return undefined;
526
+ return git(["merge-base", defaultRef, head])?.trim() || undefined;
527
+ }
528
+
529
+ /**
530
+ * Compare a standalone hook's change with its previous gate declaration.
531
+ * @param {object} options Inputs.
532
+ * @param {string} options.moment The moment being run.
533
+ * @param {string} options.root The repository root.
534
+ * @param {(text: string|null) => boolean} options.declares Checks for gate declarations.
535
+ * @param {string|null} [options.pushRefs] The source of the actual pushed refs.
536
+ * @param {Record<string, string|undefined>} [options.env] The environment.
537
+ * @param {(source: string) => (string|null)} [options.read] Reads the refs.
538
+ * @returns {string|null} Why the change must be blocked, or null.
539
+ */
540
+ export function declarationProblemAt({
541
+ moment,
542
+ root,
543
+ declares,
544
+ pushRefs = null,
545
+ env = process.env,
546
+ read = readPushRefs,
547
+ }) {
548
+ if (moment !== "commit" && moment !== "push") return null;
549
+ const source = moment === "push" ? pushRefs || env[PUSH_REFS_ENV] : null;
550
+ const unreadable = detail =>
551
+ `Could not check whether this change removes the declared checks. ${detail}`;
552
+ const comparisonFailed = label =>
553
+ unreadable(
554
+ `Git could not compare ${label}. Fetch the comparison commit or repair the local checkout, then try again.`
555
+ );
556
+ const git = gitIn(root, env);
557
+ const problem = gitProblem(root, git, env);
558
+ if (problem !== null) return source ? unreadable(problem) : null;
559
+
560
+ /** @type {(args: string[], base: string, head: string, label: string) => string|null} */
561
+ const compare = (args, base, head, label) => {
562
+ const changed = git([
563
+ "diff",
564
+ ...args,
565
+ ...NAMES_ONLY,
566
+ "--",
567
+ DECLARATION_FILE,
568
+ ]);
569
+ if (changed === null) return comparisonFailed(label);
570
+ if (changed === "") return null;
571
+ const previous = declarationAt(base, git);
572
+ const current = declarationAt(head, git);
573
+ if (previous === undefined || current === undefined)
574
+ return comparisonFailed(label);
575
+ return declares(previous) && !declares(current)
576
+ ? "This change removes the declared checks, so they cannot check it. " +
577
+ "Restore them and use the project's human approval process for changes to its quality gates."
578
+ : null;
579
+ };
580
+ if (moment === "commit") {
581
+ if (git(["rev-parse", "--verify", "HEAD"]) === null) return null;
582
+ return compare(["--cached"], "HEAD", "", "the staged changes with HEAD");
583
+ }
584
+ const defaultComparisonFailed = label =>
585
+ unreadable(
586
+ `Git could not compare ${label}. Fetch origin's default branch and run git remote set-head origin --auto, then try again.`
587
+ );
588
+ if (!source) {
589
+ const upstream = git(["rev-parse", "--verify", "@{upstream}"])?.trim();
590
+ const base = upstream || defaultBranchBase("HEAD", git);
591
+ const label = "HEAD with its baseline";
592
+ if (base !== undefined) return compare([base, "HEAD"], base, "HEAD", label);
593
+ if (declares(declarationAt("HEAD", git) ?? null)) return null;
594
+ const tracked = git([
595
+ "for-each-ref",
596
+ "--count=1",
597
+ "--format=%(refname)",
598
+ "refs/remotes/",
599
+ ]);
600
+ return tracked === "" && git(["remote"]) === ""
601
+ ? null
602
+ : defaultComparisonFailed(label);
603
+ }
604
+ const text = read(source);
605
+ if (text === null) {
606
+ return unreadable(
607
+ "The list of pushed refs could not be read. Retry the push with Git's ref list available."
608
+ );
609
+ }
610
+ const updates = parsePushRefs(text);
611
+ if (updates === null) {
612
+ return unreadable(
613
+ "The list of pushed refs is malformed. Retry the push with Git's original ref list."
614
+ );
615
+ }
616
+ for (const { localOid, remoteOid, remoteRef } of updates) {
617
+ if (!remoteRef.startsWith("refs/heads/") || NO_OBJECT.test(localOid))
618
+ continue;
619
+ const base = NO_OBJECT.test(remoteOid)
620
+ ? defaultBranchBase(localOid, git)
621
+ : remoteOid;
622
+ const label = `${JSON.stringify(remoteRef)} with its baseline`;
623
+ if (base === undefined) {
624
+ // An inspected new branch with checks still has them, even if the
625
+ // remote default is not tracked locally yet.
626
+ if (declares(declarationAt(localOid, git) ?? null)) continue;
627
+ return defaultComparisonFailed(label);
628
+ }
629
+ const problem = compare([base, localOid], base, localOid, label);
630
+ if (problem !== null) return problem;
631
+ }
632
+ return null;
633
+ }
634
+
635
+ /**
636
+ * Read the declaration, distinguishing a missing path from an unreadable Git object.
637
+ * @param {string} ref The commit, or an empty string for the index.
638
+ * @param {AskGit} git How git is asked.
639
+ * @returns {string|null|undefined} Contents, absent file, or unknown contents.
640
+ */
641
+ function declarationAt(ref, git) {
642
+ const listing = ref
643
+ ? git(["ls-tree", ref, "--", DECLARATION_FILE])
644
+ : git(["ls-files", "--stage", "--", DECLARATION_FILE]);
645
+ if (listing === null) return undefined;
646
+ const entry = listing
647
+ .trimEnd()
648
+ .split("\n")
649
+ .find(
650
+ line =>
651
+ line.endsWith(`\t${DECLARATION_FILE}`) && !line.startsWith("040000 ")
652
+ );
653
+ if (!entry) return null;
654
+ if (!/^100(?:644|755) /u.test(entry)) return undefined;
655
+ return git(["show", `${ref}:${DECLARATION_FILE}`]) ?? undefined;
656
+ }
657
+
512
658
  /**
513
659
  * What the change at one moment touches.
514
660
  * @param {object} options Inputs.
@@ -2,6 +2,7 @@
2
2
  // Do not edit directly — durable changes belong upstream in Lisa.
3
3
 
4
4
  /** Validate captured bytes and the canonical v2 claim/obligation conjunctions. */
5
+ import { stripVTControlCharacters } from "node:util";
5
6
  import {
6
7
  BOUNDARIES,
7
8
  KINDS,
@@ -158,8 +159,11 @@ export function validateTypedBytes(kind, bytes, name) {
158
159
  )
159
160
  ),
160
161
  "test-run-log": () =>
161
- testSummary(text) &&
162
- /(?:✓|PASS|\bok\s+\d+|testName|test_name|fullName| > )/.test(text),
162
+ /^[ \t]*[1-9]\d* examples?, \d+ failures?(?:, \d+ pending)?(?:, [1-9]\d* errors? occurred outside of examples)?[ \t]*\r?$/m.test(
163
+ stripVTControlCharacters(text)
164
+ ) ||
165
+ (testSummary(text) &&
166
+ /(?:✓|PASS|\bok\s+\d+|testName|test_name|fullName| > )/.test(text)),
163
167
  "deploy-log": () =>
164
168
  rows.some(
165
169
  row =>
@@ -3683,9 +3683,24 @@ export function readGates(cwd = process.cwd()) {
3683
3683
  config: {},
3684
3684
  };
3685
3685
  }
3686
+ let text;
3687
+ try {
3688
+ text = readFileSync(path, "utf8");
3689
+ } catch (err) {
3690
+ throw new Error(`${CONFIG_FILE} is not readable: ${err.message}`);
3691
+ }
3692
+ return parseGatesConfig(text);
3693
+ }
3694
+
3695
+ /**
3696
+ * Read declarations from the config contents, including a staged or committed copy.
3697
+ * @param {string} text The JSON document.
3698
+ * @returns {{runner: string, unproven: string, gates: object, policy: object, config: object}} Parsed config.
3699
+ */
3700
+ export function parseGatesConfig(text) {
3686
3701
  let config;
3687
3702
  try {
3688
- config = JSON.parse(readFileSync(path, "utf8"));
3703
+ config = JSON.parse(text);
3689
3704
  } catch (err) {
3690
3705
  throw new Error(`${CONFIG_FILE} is not readable: ${err.message}`);
3691
3706
  }