@r_masseater/msch 0.48.0 → 0.48.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 (30) hide show
  1. package/dist/cargo-inputs.mjs +2 -2
  2. package/dist/changed.mjs +4 -4
  3. package/dist/{check-upstream-exits-BJNhgkLI.mjs → check-upstream-exits-22kQ5juG.mjs} +2 -2
  4. package/dist/{check-upstream-exits-BJNhgkLI.mjs.map → check-upstream-exits-22kQ5juG.mjs.map} +1 -1
  5. package/dist/cli.mjs +321 -204
  6. package/dist/cli.mjs.map +1 -1
  7. package/dist/{dependencies-v59cxwTD.mjs → dependencies-Bh625TQu.mjs} +15 -11
  8. package/dist/dependencies-Bh625TQu.mjs.map +1 -0
  9. package/dist/exits.mjs +3 -3
  10. package/dist/{ignored-directories-thSB0IAT.mjs → ignored-directories-BrwYtwZw.mjs} +2 -2
  11. package/dist/{ignored-directories-thSB0IAT.mjs.map → ignored-directories-BrwYtwZw.mjs.map} +1 -1
  12. package/dist/oxlint.mjs +2 -2
  13. package/dist/{package-Bdv6W97F.mjs → package-M3y-ZOGZ.mjs} +3 -3
  14. package/dist/{package-Bdv6W97F.mjs.map → package-M3y-ZOGZ.mjs.map} +1 -1
  15. package/dist/{problem-u-p6QglA.mjs → problem-DHWbumiO.mjs} +2 -2
  16. package/dist/{problem-u-p6QglA.mjs.map → problem-DHWbumiO.mjs.map} +1 -1
  17. package/dist/{project-DeQcAglt.mjs → project-DmUvZQEd.mjs} +4 -4
  18. package/dist/{project-DeQcAglt.mjs.map → project-DmUvZQEd.mjs.map} +1 -1
  19. package/dist/publish.mjs +41 -11
  20. package/dist/publish.mjs.map +1 -1
  21. package/dist/{repository-files-aXwrITdF.mjs → repository-files-CEaXCw-J.mjs} +4 -3
  22. package/dist/repository-files-CEaXCw-J.mjs.map +1 -0
  23. package/dist/{runtime-BmlYnI7T.mjs → runtime-Calown4W.mjs} +2 -2
  24. package/dist/{runtime-BmlYnI7T.mjs.map → runtime-Calown4W.mjs.map} +1 -1
  25. package/dist/{syntax-ct2fFLtv.mjs → syntax-P4jlh7LM.mjs} +2 -2
  26. package/dist/{syntax-ct2fFLtv.mjs.map → syntax-P4jlh7LM.mjs.map} +1 -1
  27. package/dist/workspace-settings.mjs +4 -4
  28. package/package.json +1 -1
  29. package/dist/dependencies-v59cxwTD.mjs.map +0 -1
  30. package/dist/repository-files-aXwrITdF.mjs.map +0 -1
package/dist/cli.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { B as stringsIn, E as hasVerifyTask, F as childrenOf$1, I as keyName, L as literalOf, N as workspaceConfigOf, P as KeySchema, R as nestedValues, S as RUN_TASKS, T as definesTask, _ as publishedProjects, a as cratesIn, b as runTasksOf, c as workspaceLinks, d as deployEntries, f as namedWorkspaces, h as shadcnUiOf, l as lockedGraph, o as owningWorkspace, p as patternOf$1, r as readManifest, t as MANIFEST_FILE$3, u as lockedPackages, v as workspaceDirectories, w as VERIFY_TASK, y as workspaceManifest, z as propertyValue } from "./dependencies-v59cxwTD.mjs";
3
- import { C as valueKey, S as schemaTypeOf, _ as formatValues, b as literalValuesOf, c as listConfigFiles, d as withProject, f as declarationKey, g as finiteValuesOf, h as locationOf, i as recordsIn, l as mentions$1, m as isObjectType, n as contentKey, o as projectInputs, p as describeLibraryType, r as keepOnly, t as implementationFingerprint, u as typeScriptCompiler, v as isSubsetOf, w as vocabularyOf, x as sameValues, y as literalUnionOf } from "./project-DeQcAglt.mjs";
4
- import { a as groupOf$2, n as RepositoryFiles, t as NODE_MODULES } from "./repository-files-aXwrITdF.mjs";
5
- import { a as isRecord, c as isScannedText, d as presentFiles, f as scanText, i as collectNodes, l as isToolVersions, n as checkUpstreamExits, o as tomlSourceComments, p as positionOf, s as yamlSourceComments, t as checkScatteredDeviations, u as listedFiles } from "./check-upstream-exits-BJNhgkLI.mjs";
6
- import { a as publicEntriesOf, i as EntryManifestJson, r as publishedWorkspaces } from "./package-Bdv6W97F.mjs";
2
+ import { B as propertyValue, C as RUN_TASKS, D as hasVerifyTask, E as definesTask, F as KeySchema, I as childrenOf$1, L as keyName, P as workspaceConfigOf, R as literalOf, T as VERIFY_TASK, V as stringsIn, _ as publishedProjects, a as cratesIn, b as workspaceManifest, c as workspaceLinks, d as deployEntries, f as namedWorkspaces, h as shadcnUiOf, l as lockedGraph, o as owningWorkspace, p as patternOf$1, r as readManifest, t as MANIFEST_FILE$3, u as lockedPackages, v as workspaceDirectories, x as runTasksOf, y as workspaceProjects, z as nestedValues } from "./dependencies-Bh625TQu.mjs";
3
+ import { C as valueKey, S as schemaTypeOf, _ as formatValues, b as literalValuesOf, c as listConfigFiles, d as withProject, f as declarationKey, g as finiteValuesOf, h as locationOf, i as recordsIn, l as mentions$1, m as isObjectType, n as contentKey, o as projectInputs, p as describeLibraryType, r as keepOnly, t as implementationFingerprint, u as typeScriptCompiler, v as isSubsetOf, w as vocabularyOf, x as sameValues, y as literalUnionOf } from "./project-DmUvZQEd.mjs";
4
+ import { a as groupOf$2, n as RepositoryFiles, t as NODE_MODULES } from "./repository-files-CEaXCw-J.mjs";
5
+ import { a as isRecord, c as isScannedText, d as presentFiles, f as scanText, i as collectNodes, l as isToolVersions, n as checkUpstreamExits, o as tomlSourceComments, p as positionOf, s as yamlSourceComments, t as checkScatteredDeviations, u as listedFiles } from "./check-upstream-exits-22kQ5juG.mjs";
6
+ import { a as publicEntriesOf, i as EntryManifestJson, r as publishedWorkspaces } from "./package-M3y-ZOGZ.mjs";
7
7
  import { n as JAPANESE, t as COMMENT_DIRECTIVES } from "./comment-directives-CRAU6yNZ.mjs";
8
8
  import { t as startedOnce } from "./started-once-CkTooI_o.mjs";
9
- import { $ as isSpreadElement, A as isBlock, B as isInterfaceDeclaration, C as getJSDocTags, D as isArrayLiteralExpression, E as getTextOfJSDocComment, F as isExportDeclaration, G as isObjectLiteralExpression, H as isModuleDeclaration, I as isFunctionDeclaration, J as isPropertyAssignment, K as isParenthesizedExpression, L as isFunctionExpression, M as isClassDeclaration, N as isElementAccessExpression, O as isArrowFunction, P as isEnumDeclaration, Q as isSourceFile, R as isIdentifier, S as SyntaxKind, T as getNameOfDeclaration, U as isNewExpression, V as isModuleBlock, W as isNumericLiteral, X as isSatisfiesExpression, Y as isReturnStatement, Z as isSignatureDeclaration, _ as uniqueByReference, a as descendantsOf, at as isVariableDeclaration, c as isGenericDeclaration, d as lineOf$3, et as isStringLiteral, f as packageOf$1, g as symbolAt, i as declarationsOf, it as isUnionTypeNode, j as isCallExpression, k as isBinaryExpression, l as isInsideAny, m as referencedSymbols, n as columnOf, nt as isTypeLiteralNode, o as importedModulesOf, ot as isVariableDeclarationList, p as propertyNamesOf, q as isPropertyAccessExpression, r as contains, rt as isTypeReferenceNode, s as isExternalDeclaration, st as isVariableStatement, t as childrenOf$2, tt as isTypeAliasDeclaration, u as isTypeDeclaration, x as SignatureKind, z as isImportDeclaration } from "./syntax-ct2fFLtv.mjs";
10
- import { a as sortProblems, i as problemAt$9, r as formatProblem, t as ProblemList } from "./problem-u-p6QglA.mjs";
11
- import { n as ProblemsFound, r as writeStdout, t as runCli } from "./runtime-BmlYnI7T.mjs";
9
+ import { $ as isSpreadElement, A as isBlock, B as isInterfaceDeclaration, C as getJSDocTags, D as isArrayLiteralExpression, E as getTextOfJSDocComment, F as isExportDeclaration, G as isObjectLiteralExpression, H as isModuleDeclaration, I as isFunctionDeclaration, J as isPropertyAssignment, K as isParenthesizedExpression, L as isFunctionExpression, M as isClassDeclaration, N as isElementAccessExpression, O as isArrowFunction, P as isEnumDeclaration, Q as isSourceFile, R as isIdentifier, S as SyntaxKind, T as getNameOfDeclaration, U as isNewExpression, V as isModuleBlock, W as isNumericLiteral, X as isSatisfiesExpression, Y as isReturnStatement, Z as isSignatureDeclaration, _ as uniqueByReference, a as descendantsOf, at as isVariableDeclaration, c as isGenericDeclaration, d as lineOf$3, et as isStringLiteral, f as packageOf$1, g as symbolAt, i as declarationsOf, it as isUnionTypeNode, j as isCallExpression, k as isBinaryExpression, l as isInsideAny, m as referencedSymbols, n as columnOf, nt as isTypeLiteralNode, o as importedModulesOf, ot as isVariableDeclarationList, p as propertyNamesOf, q as isPropertyAccessExpression, r as contains, rt as isTypeReferenceNode, s as isExternalDeclaration, st as isVariableStatement, t as childrenOf$2, tt as isTypeAliasDeclaration, u as isTypeDeclaration, x as SignatureKind, z as isImportDeclaration } from "./syntax-P4jlh7LM.mjs";
10
+ import { a as sortProblems, i as problemAt$9, r as formatProblem, t as ProblemList } from "./problem-DHWbumiO.mjs";
11
+ import { n as ProblemsFound, r as writeStdout, t as runCli } from "./runtime-Calown4W.mjs";
12
12
  import "./cli-contract-D7btWrEu.mjs";
13
13
  import { VpToolsError, runVpa } from "@r_masseater/vite-plus-adopt";
14
14
  import { Array, Config, Effect, FileSystem, HashMap, HashSet, Number as Number$1, Option, Order, Path, Predicate, Record, Result, Schema, Stdio, Stream, String as String$1, pipe } from "effect";
@@ -348,12 +348,12 @@ const checkOverrides = Effect.fn("checkOverrides")(function* checkOverrides(root
348
348
  // src/features/check-overrides/model/git-subpath.ts
349
349
  const DEPENDENCY_FILE = /(?:^|\/)(?:package\.json|pnpm-workspace\.ya?ml)$/u;
350
350
  const GIT_SUBPATH = /(?<![^\s"':])[^\s"'#]+#(?:[^\s"'&]*&)*path:[^\s"']*/gu;
351
- const RULE$50 = "git-subpath-dependency";
351
+ const RULE$52 = "git-subpath-dependency";
352
352
  const WHOLE_MATCH$3 = 0;
353
353
  const problemAt$8 = ({ file }, source) => (found) => ({
354
354
  file,
355
355
  ...positionOf(source)(found.index ?? WHOLE_MATCH$3),
356
- rule: RULE$50,
356
+ rule: RULE$52,
357
357
  message: `Git subpath dependencies are banned. Publish the package to npm and depend on a released version instead of \`${String$1.trim(found[WHOLE_MATCH$3])}\`.`
358
358
  });
359
359
  const problemsIn$17 = (entry, source) => pipe(Array.fromIterable(String$1.matchAll(GIT_SUBPATH)(source)), Array.map(problemAt$8(entry, source)));
@@ -364,13 +364,13 @@ const checkGitSubpath = Effect.fn("checkGitSubpath")(function* checkGitSubpath(r
364
364
  return yield* scanText(pipe(listed, Array.filter(isDependencyFile)), problemsIn$17);
365
365
  });
366
366
  // src/features/check-overrides/model/restricted-rules.ts
367
- const RULE$49 = "unnamed-restriction";
367
+ const RULE$51 = "unnamed-restriction";
368
368
  const WHOLE_MATCH$2 = 0;
369
369
  const UNNAMED = new RegExp(`(?:[\\w@-]+/)?no-restricted-(?:imports|properties)\\b`, "gu");
370
370
  const problemsIn$16 = (entry, source) => pipe(Array.fromIterable(String$1.matchAll(UNNAMED)(source)), Array.map((found) => ({
371
371
  file: entry.file,
372
372
  ...positionOf(source)(found.index ?? WHOLE_MATCH$2),
373
- rule: RULE$49,
373
+ rule: RULE$51,
374
374
  message: `${found[WHOLE_MATCH$2]} is not used in this repository, because its name does not say what an entry protects. Ban a package in dependencyRules.banned, and write any other restriction as a rule in msch-lint whose name states the intent.`
375
375
  })));
376
376
  /** @internal */
@@ -379,7 +379,7 @@ const checkRestrictedRules = Effect.fn("checkRestrictedRules")(function* checkRe
379
379
  return yield* scanText(pipe(listed, Array.filter(isScannedText)), problemsIn$16);
380
380
  });
381
381
  // src/features/check-overrides/model/package-registry.ts
382
- const RULE$48 = "package-registry";
382
+ const RULE$50 = "package-registry";
383
383
  const REGISTRY = "https://npm.flatt.tech/";
384
384
  const TRAILING_SLASH = /\/$/u;
385
385
  const WORKSPACE_FILE$5 = "pnpm-workspace.yaml";
@@ -396,7 +396,7 @@ const offsetIn$1 = (found) => pipe(Option.fromNullishOr(found), Option.map(({ in
396
396
  const workspaceProblem = (file, source, registry) => ({
397
397
  file,
398
398
  ...positionOf(source)(offsetIn$1(WORKSPACE_REGISTRY.exec(source))),
399
- rule: RULE$48,
399
+ rule: RULE$50,
400
400
  message: Option.match(registry, {
401
401
  onNone: () => `${REASON} Set \`registry: ${REGISTRY}\` in ${WORKSPACE_FILE$5}.`,
402
402
  onSome: (value) => `${REASON} \`registry\` is ${value}. Set it to ${REGISTRY}.`
@@ -405,7 +405,7 @@ const workspaceProblem = (file, source, registry) => ({
405
405
  const npmrcProblems = (entry, source) => pipe(Array.fromIterable(String$1.matchAll(NPMRC_REGISTRY)(source)), Array.filter((found) => !Option.exists(groupOf$2("value")(found), isGuarded)), Array.map((found) => ({
406
406
  file: entry.file,
407
407
  ...positionOf(source)(found.index ?? START$19),
408
- rule: RULE$48,
408
+ rule: RULE$50,
409
409
  message: `${REASON} This .npmrc overrides it with \`${String$1.trim(found[START$19])}\`. Remove the line.`
410
410
  })));
411
411
  const checkWorkspace = Effect.fn("checkWorkspace")(function* checkWorkspace(root) {
@@ -425,7 +425,7 @@ const checkPackageRegistry = Effect.fn("checkPackageRegistry")(function* checkPa
425
425
  return [...yield* checkWorkspace(root), ...overrides];
426
426
  });
427
427
  // src/features/check-placement/model/colocated-git-patterns.ts
428
- const RULE$47 = "colocated-git-patterns";
428
+ const RULE$49 = "colocated-git-patterns";
429
429
  const PATTERN_FILES = [":(glob)**/.gitignore", ":(glob)**/.gitattributes"];
430
430
  const ROOT$2 = ".";
431
431
  const SEPARATOR$21 = "/";
@@ -436,7 +436,7 @@ const FLOATING_PREFIX = `${ANY_DEPTH}${SEPARATOR$21}`;
436
436
  const LEADING_SLASHES = /^\/+/u;
437
437
  const TRAILING_SLASHES = /\/+$/u;
438
438
  const SPACES = /\s+/u;
439
- const FIRST$24 = 1;
439
+ const FIRST$26 = 1;
440
440
  const READ_CONCURRENCY$29 = 16;
441
441
  const isInside = (directory) => (inner) => inner !== directory && (directory === ROOT$2 || String$1.startsWith(`${directory}${SEPARATOR$21}`)(inner));
442
442
  const withoutPrefix = (prefix, text) => {
@@ -462,7 +462,7 @@ const entryOf$1 = (file, kind, directory) => (line, index) => {
462
462
  file,
463
463
  kind,
464
464
  directory,
465
- line: index + FIRST$24,
465
+ line: index + FIRST$26,
466
466
  pattern,
467
467
  values: Array.join(values, " ")
468
468
  });
@@ -477,12 +477,12 @@ const entriesIn$1 = Effect.fn("entriesIn")(function* entriesIn(root, file) {
477
477
  const problemAt$7 = (entry, message) => ({
478
478
  file: entry.file,
479
479
  line: entry.line,
480
- column: FIRST$24,
481
- rule: RULE$47,
480
+ column: FIRST$26,
481
+ rule: RULE$49,
482
482
  message
483
483
  });
484
484
  const misplacedMessage = (kind, workspaces) => {
485
- if (workspaces.length === FIRST$24) {
485
+ if (workspaces.length === FIRST$26) {
486
486
  const workspace = Array.join(workspaces, "");
487
487
  return `matches only paths inside the workspace ${workspace}. Move it to ${workspace}/${kind} and write it relative to that directory.`;
488
488
  }
@@ -540,8 +540,8 @@ const checkColocatedGitPatterns = Effect.fn("checkColocatedGitPatterns")(functio
540
540
  return Array.getSomes([...misplacedFound, ...repeatedFound]);
541
541
  });
542
542
  // src/features/check-placement/model/colocated-tests.ts
543
- const RULE$46 = "colocated-test";
544
- const FIRST$23 = 1;
543
+ const RULE$48 = "colocated-test";
544
+ const FIRST$25 = 1;
545
545
  const READ_CONCURRENCY$28 = 64;
546
546
  const ROOT_SUBPATH = ".";
547
547
  const NAME_GROUP = "name";
@@ -566,14 +566,14 @@ const decodeManifest$9 = Schema.decodeUnknownOption(Schema.fromJsonString(Manife
566
566
  const byLength$2 = Order.mapInput(Order.Number, (directory) => directory.length);
567
567
  const problemFor$7 = (test, message) => ({
568
568
  file: test.file,
569
- line: FIRST$23,
570
- column: FIRST$23,
571
- rule: RULE$46,
569
+ line: FIRST$25,
570
+ column: FIRST$25,
571
+ rule: RULE$48,
572
572
  message: `${test.base} ${message}`
573
573
  });
574
574
  const groupsOf$1 = (source, pattern, group) => pipe(Array.fromIterable(String$1.matchAll(pattern)(source)), Array.map((match) => pipe(Option.fromUndefinedOr(match.groups), Option.flatMap((groups) => Option.fromUndefinedOr(groups[group])))), Array.getSomes);
575
575
  const namesSibling = (source) => pipe([...groupsOf$1(source, RELATIVE_REFERENCE, NAME_GROUP), ...groupsOf$1(source, DIRNAME_REFERENCE, NAME_GROUP)], Array.some((name) => !TEST_FILE$2.test(name)));
576
- const ownerOf$4 = (packages, name) => {
576
+ const ownerOf$5 = (packages, name) => {
577
577
  const owners = pipe(packages, Array.filter((directory) => String$1.startsWith(directory)(name)));
578
578
  return Array.last(Array.sort(owners, byLength$2));
579
579
  };
@@ -584,7 +584,7 @@ const specifiersBeside = ({ join, dirname, directory }) => (manifest) => pipe(Op
584
584
  }), Array.filter(({ source }) => dirname(source) === directory), Array.map(({ label }) => String$1.replace(ROOT_SUBPATH, name)(label)))), Option.getOrElse(() => []));
585
585
  const ownSpecifiers = Effect.fn("ownSpecifiers")(function* ownSpecifiers(context, test) {
586
586
  const files = yield* RepositoryFiles;
587
- const owner = ownerOf$4(context.packages, test.name);
587
+ const owner = ownerOf$5(context.packages, test.name);
588
588
  if (Option.isNone(owner)) return [];
589
589
  const text = yield* files.readFile(files.join(context.root, owner.value, MANIFEST_FILE$3));
590
590
  const join = (target) => files.join(context.root, owner.value, target);
@@ -650,26 +650,26 @@ const agentDocProblems = Effect.fn("agentDocProblems")(function* agentDocProblem
650
650
  });
651
651
  // src/features/check-placement/model/agent-docs-length.ts
652
652
  const RECOMMENDED_LINES = 200;
653
- const FIRST$22 = 1;
654
- const RULE$45 = "agent-docs-length";
653
+ const FIRST$24 = 1;
654
+ const RULE$47 = "agent-docs-length";
655
655
  const lineCount = (source) => pipe(String$1.trimEnd(source), String$1.split("\n")).length;
656
656
  const problemFor$6 = (file) => (lines) => {
657
657
  if (lines <= RECOMMENDED_LINES) return Option.none();
658
658
  return Option.some({
659
659
  file,
660
660
  line: 201,
661
- column: FIRST$22,
662
- rule: RULE$45,
661
+ column: FIRST$24,
662
+ rule: RULE$47,
663
663
  message: `has ${String(lines)} lines. Claude Code recommends under ${String(RECOMMENDED_LINES)} lines per file: longer files cost context and are followed less reliably. Cut what the code already tells, and move rules shared across repositories into skills.`
664
664
  });
665
665
  };
666
666
  /** @internal */
667
667
  const checkAgentDocsLength = (root) => agentDocProblems(root, (file) => (source) => problemFor$6(file)(lineCount(source)));
668
668
  // src/features/check-placement/model/claude-link.ts
669
- const RULE$44 = "claude-md-link";
669
+ const RULE$46 = "claude-md-link";
670
670
  const CLAUDE = "CLAUDE.md";
671
671
  const AGENTS = "AGENTS.md";
672
- const FIRST$21 = 1;
672
+ const FIRST$23 = 1;
673
673
  const READ_CONCURRENCY$26 = 16;
674
674
  const MESSAGE$16 = "CLAUDE.md must be a symbolic link to AGENTS.md";
675
675
  /** @internal */
@@ -683,9 +683,9 @@ const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLink
683
683
  const pointsElsewhere = pipe(target, Option.exists((value) => value !== AGENTS));
684
684
  return pipe(Option.liftPredicate(file, () => !isLink || pointsElsewhere), Option.map((path) => ({
685
685
  file: path,
686
- line: FIRST$21,
687
- column: FIRST$21,
688
- rule: RULE$44,
686
+ line: FIRST$23,
687
+ column: FIRST$23,
688
+ rule: RULE$46,
689
689
  message: MESSAGE$16
690
690
  })));
691
691
  });
@@ -694,9 +694,9 @@ const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLink
694
694
  return Array.getSomes(found);
695
695
  });
696
696
  // src/features/check-placement/model/dangling-links.ts
697
- const RULE$43 = "dangling-link";
697
+ const RULE$45 = "dangling-link";
698
698
  const SEPARATOR$20 = "/";
699
- const FIRST$20 = 1;
699
+ const FIRST$22 = 1;
700
700
  const READ_CONCURRENCY$25 = 16;
701
701
  const holds = (target) => (name) => name === target || String$1.startsWith(`${target}${SEPARATOR$20}`)(name);
702
702
  /** @internal */
@@ -708,9 +708,9 @@ const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDangli
708
708
  const link = yield* files.readLink(file);
709
709
  return pipe(link, Option.map((target) => files.relative(root, files.resolve(files.dirname(file), target))), Option.filter((target) => !pipe(listed, Array.some(holds(target)))), Option.map((target) => ({
710
710
  file,
711
- line: FIRST$20,
712
- column: FIRST$20,
713
- rule: RULE$43,
711
+ line: FIRST$22,
712
+ column: FIRST$22,
713
+ rule: RULE$45,
714
714
  message: `is a link to ${target}, where no file is tracked. A fresh checkout gets a link to nothing, and GitHub Actions fails to load the repository's actions. Track a file there, such as .gitkeep, or delete the link.`
715
715
  })));
716
716
  });
@@ -718,10 +718,10 @@ const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDangli
718
718
  return Array.getSomes(found);
719
719
  });
720
720
  // src/features/check-placement/model/nested-docs.ts
721
- const RULE$42 = "nested-docs";
721
+ const RULE$44 = "nested-docs";
722
722
  const CONFIG_FILE$6 = "vite.config.ts";
723
723
  const SEPARATOR$19 = "/";
724
- const FIRST$19 = 1;
724
+ const FIRST$21 = 1;
725
725
  const READ_CONCURRENCY$24 = 64;
726
726
  const AGENT_DOCS$1 = /^(?:AGENTS|CLAUDE)(?:\.[^/]+)?\.md$/iu;
727
727
  const WORKSPACE_AGENT_DOC = "AGENTS.md";
@@ -732,9 +732,9 @@ var RootConfigUnreadable = class extends taggedError$5()("RootConfigUnreadable",
732
732
  const isNested = (name) => String$1.includes(SEPARATOR$19)(name);
733
733
  const problemFor$5 = (file, message) => ({
734
734
  file,
735
- line: FIRST$19,
736
- column: FIRST$19,
737
- rule: RULE$42,
735
+ line: FIRST$21,
736
+ column: FIRST$21,
737
+ rule: RULE$44,
738
738
  message
739
739
  });
740
740
  const AGENT_DOCS_MESSAGE = "belongs only at the repository root. Move what agents need into the root AGENTS.md and delete this file.";
@@ -785,7 +785,7 @@ const checkNestedDocs = Effect.fn("checkNestedDocs")(function* checkNestedDocs(r
785
785
  return Array.getSomes(found);
786
786
  });
787
787
  // src/features/check-placement/model/published-readme.ts
788
- const RULE$41 = "published-readme";
788
+ const RULE$43 = "published-readme";
789
789
  const README_FILE = "README.md";
790
790
  const READ_CONCURRENCY$23 = 16;
791
791
  const MESSAGE$15 = "contains Japanese. This package is published to npm, so write its README in English.";
@@ -799,7 +799,7 @@ const problemIn$4 = Effect.fn("problemIn")(function* problemIn(root, { directory
799
799
  file,
800
800
  line: FILE_START$1,
801
801
  column: FILE_START$1,
802
- rule: RULE$41,
802
+ rule: RULE$43,
803
803
  message: MISSING_MESSAGE
804
804
  });
805
805
  return pipe(text, Option.flatMap((source) => pipe(Option.fromNullishOr(JAPANESE.exec(source)), Option.map((found) => {
@@ -808,7 +808,7 @@ const problemIn$4 = Effect.fn("problemIn")(function* problemIn(root, { directory
808
808
  file,
809
809
  line,
810
810
  column,
811
- rule: RULE$41,
811
+ rule: RULE$43,
812
812
  message: MESSAGE$15
813
813
  };
814
814
  }))));
@@ -820,7 +820,7 @@ const checkPublishedReadme = Effect.fn("checkPublishedReadme")(function* checkPu
820
820
  return Array.getSomes(found);
821
821
  });
822
822
  // src/features/check-placement/model/published-tests.ts
823
- const RULE$40 = "published-tests";
823
+ const RULE$42 = "published-tests";
824
824
  const MANIFEST_FILE$2 = "package.json";
825
825
  const FILE_START = 1;
826
826
  const TEST_FILE$1 = /\.test\.[cm]?[jt]sx?$/u;
@@ -835,7 +835,7 @@ const problemFor$4 = Effect.fn("problemFor")(function* problemFor(root, listed,
835
835
  file: files.join(absolute, MANIFEST_FILE$2),
836
836
  line: FILE_START,
837
837
  column: FILE_START,
838
- rule: RULE$40,
838
+ rule: RULE$42,
839
839
  message: MESSAGE$14
840
840
  });
841
841
  });
@@ -849,9 +849,9 @@ const checkPublishedTests = Effect.fn("checkPublishedTests")(function* checkPubl
849
849
  return Array.getSomes(found);
850
850
  });
851
851
  // src/features/check-placement/model/root-docs.ts
852
- const RULE$39 = "root-docs";
852
+ const RULE$41 = "root-docs";
853
853
  const SEPARATOR$18 = "/";
854
- const FIRST$18 = 1;
854
+ const FIRST$20 = 1;
855
855
  const MARKDOWN$1 = /\.(?:md|mdx|markdown)$/iu;
856
856
  const ALLOWED = /^(?:README(?:\.[^/]+)?|AGENTS|CLAUDE|ARCHITECTURE|DESIGN|CHANGELOG|LICENSE|NOTICE)\.(?:md|mdx|markdown)$/iu;
857
857
  const MESSAGE$13 = "is a hand-written document outside the places documents belong. Hand-written text goes only in the root README.md, AGENTS.md, CLAUDE.md, ARCHITECTURE.md and DESIGN.md, and under docs/. Move what is still true and not already told by the code into one of them, and delete this file.";
@@ -862,14 +862,14 @@ const checkRootDocs = Effect.fn("checkRootDocs")(function* checkRootDocs(root) {
862
862
  const names = yield* files.listedFiles(root);
863
863
  return pipe(names, Array.filter(isStrayRootDoc), Array.map((name) => ({
864
864
  file: files.join(root, name),
865
- line: FIRST$18,
866
- column: FIRST$18,
867
- rule: RULE$39,
865
+ line: FIRST$20,
866
+ column: FIRST$20,
867
+ rule: RULE$41,
868
868
  message: `${name} ${MESSAGE$13}`
869
869
  })));
870
870
  });
871
871
  // src/features/check-placement/model/root-readme.ts
872
- const RULE$38 = "root-readme";
872
+ const RULE$40 = "root-readme";
873
873
  const ROOT_DOC = /^(?:README(?:\.[^/]+)?|AGENTS\.md|CLAUDE\.md)$/iu;
874
874
  const READ_CONCURRENCY$22 = 16;
875
875
  const START$18 = 0;
@@ -881,7 +881,7 @@ const MarketplacePlugin = Schema.Struct({
881
881
  name: Schema.optional(Schema.String),
882
882
  source: Schema.Unknown
883
883
  });
884
- const Marketplace = Schema.fromJsonString(Schema.Struct({ plugins: Schema.Array(MarketplacePlugin) }));
884
+ const Marketplace$1 = Schema.fromJsonString(Schema.Struct({ plugins: Schema.Array(MarketplacePlugin) }));
885
885
  const NO_PLUGINS = {
886
886
  directories: [],
887
887
  names: []
@@ -900,7 +900,7 @@ const pluginsOf = (plugins) => {
900
900
  const marketplacePlugins = Effect.fn("marketplacePlugins")(function* marketplacePlugins(root) {
901
901
  const files = yield* RepositoryFiles;
902
902
  const text = yield* files.readFile(files.join(root, MARKETPLACE));
903
- return pipe(text, Option.flatMap(Schema.decodeOption(Marketplace)), Option.map(({ plugins }) => pluginsOf(plugins)), Option.getOrElse(() => NO_PLUGINS));
903
+ return pipe(text, Option.flatMap(Schema.decodeOption(Marketplace$1)), Option.map(({ plugins }) => pluginsOf(plugins)), Option.getOrElse(() => NO_PLUGINS));
904
904
  });
905
905
  const isPluginName = (plugins) => (name) => Array.contains(plugins.names, name);
906
906
  const ownNames = (plugins, names) => {
@@ -918,7 +918,7 @@ const problemsIn$15 = (file, source, plugins) => (workspace) => {
918
918
  return pipe(Array.fromIterable(String$1.matchAll(pattern)(source)), Array.map((found) => ({
919
919
  file,
920
920
  ...at(found.index ?? START$18),
921
- rule: RULE$38,
921
+ rule: RULE$40,
922
922
  message
923
923
  })));
924
924
  };
@@ -956,7 +956,7 @@ const checkDocPlacement = Effect.fn("checkDocPlacement")(function* checkDocPlace
956
956
  return Array.flatten(found);
957
957
  });
958
958
  // src/features/check-placement/model/docs-mirror.ts
959
- const RULE$37 = "docs-mirror";
959
+ const RULE$39 = "docs-mirror";
960
960
  const DOC = /(?:^|\/)(?:README|AGENTS|ARCHITECTURE|CLAUDE|SKILL)\.md$/u;
961
961
  const MIRROR_LIMIT = 3;
962
962
  const READ_CONCURRENCY$21 = 16;
@@ -973,7 +973,7 @@ const firstMention = (source, workspace) => {
973
973
  const mentions = pipe(workspace.names, Array.flatMap(mentionOf(source, workspace.directory)));
974
974
  return Array.head(Array.sort(mentions, byOffset));
975
975
  };
976
- const ownerOf$3 = (doc) => (workspace) => String$1.startsWith(`${workspace.directory}/`)(doc);
976
+ const ownerOf$4 = (doc) => (workspace) => String$1.startsWith(`${workspace.directory}/`)(doc);
977
977
  const describe = (mentions) => pipe(mentions, Array.map(({ directory }) => `\`${directory}\``), Array.join(", "));
978
978
  const problemFor$3 = (file, source, mentions) => pipe(Array.head(mentions), Option.filter(() => mentions.length >= MIRROR_LIMIT), Option.map(({ offset }) => {
979
979
  const { line, column } = positionOf(source)(offset);
@@ -981,11 +981,11 @@ const problemFor$3 = (file, source, mentions) => pipe(Array.head(mentions), Opti
981
981
  file,
982
982
  line,
983
983
  column,
984
- rule: RULE$37,
984
+ rule: RULE$39,
985
985
  message: `names ${String(mentions.length)} other workspaces (${describe(mentions)}). The workspace list and each package.json already declare them, so this copy goes stale. Point at the declaration instead of listing it.`
986
986
  };
987
987
  }), Option.toArray);
988
- const othersIn = (doc, workspaces) => pipe(workspaces, Array.filter((workspace) => !ownerOf$3(doc)(workspace)));
988
+ const othersIn = (doc, workspaces) => pipe(workspaces, Array.filter((workspace) => !ownerOf$4(doc)(workspace)));
989
989
  const problemIn$3 = (workspaces) => (doc, file, source) => {
990
990
  const mentions = pipe(othersIn(doc, workspaces), Array.flatMap((workspace) => Option.toArray(firstMention(source, workspace))));
991
991
  return problemFor$3(file, source, Array.sort(mentions, byOffset));
@@ -1013,9 +1013,9 @@ const checkDocsMirror = Effect.fn("checkDocsMirror")(function* checkDocsMirror(r
1013
1013
  return Array.flatten(found);
1014
1014
  });
1015
1015
  // src/features/check-placement/model/ignored-sources.ts
1016
- const RULE$36 = "ignored-sources";
1016
+ const RULE$38 = "ignored-sources";
1017
1017
  const SOURCES = [":(glob)**/src/**", ":(exclude,glob)**/node_modules/**"];
1018
- const FIRST$17 = 1;
1018
+ const FIRST$19 = 1;
1019
1019
  const MESSAGE$12 = "is under src/ but .gitignore ignores it, so verify passes here while the file never reaches the commit. Narrow the pattern in .gitignore.";
1020
1020
  /** @internal */
1021
1021
  const checkIgnoredSources = Effect.fn("checkIgnoredSources")(function* checkIgnoredSources(root) {
@@ -1023,15 +1023,15 @@ const checkIgnoredSources = Effect.fn("checkIgnoredSources")(function* checkIgno
1023
1023
  const ignored = yield* files.ignoredFiles(root, SOURCES);
1024
1024
  return pipe(ignored, Array.map((file) => ({
1025
1025
  file: files.join(root, file),
1026
- line: FIRST$17,
1027
- column: FIRST$17,
1028
- rule: RULE$36,
1026
+ line: FIRST$19,
1027
+ column: FIRST$19,
1028
+ rule: RULE$38,
1029
1029
  message: MESSAGE$12
1030
1030
  })));
1031
1031
  });
1032
1032
  // src/features/check-placement/model/member-sources.ts
1033
1033
  const ROOT_WORKSPACE$1 = ".";
1034
- const FIRST$16 = 1;
1034
+ const FIRST$18 = 1;
1035
1035
  const SEPARATOR$16 = "/";
1036
1036
  const EXCLUDED$6 = [
1037
1037
  ":(exclude,attr:linguist-vendored)",
@@ -1052,12 +1052,12 @@ const memberSources = Effect.fn("memberSources")(function* memberSources(root) {
1052
1052
  const byLength$1 = Order.mapInput(Order.Number, (directory) => directory.length);
1053
1053
  const fileProblem$1 = ({ file, rule, message }) => ({
1054
1054
  file,
1055
- line: FIRST$16,
1056
- column: FIRST$16,
1055
+ line: FIRST$18,
1056
+ column: FIRST$18,
1057
1057
  rule,
1058
1058
  message
1059
1059
  });
1060
- const ownerOf$2 = (workspaces) => (name) => pipe(workspaces, Array.filter((workspace) => String$1.startsWith(`${workspace}${SEPARATOR$16}`)(name)), (owners) => Array.last(Array.sort(owners, byLength$1)), Option.map((workspace) => ({
1060
+ const ownerOf$3 = (workspaces) => (name) => pipe(workspaces, Array.filter((workspace) => String$1.startsWith(`${workspace}${SEPARATOR$16}`)(name)), (owners) => Array.last(Array.sort(owners, byLength$1)), Option.map((workspace) => ({
1061
1061
  workspace,
1062
1062
  inner: String$1.slice(workspace.length + 1)(name)
1063
1063
  })));
@@ -9664,7 +9664,7 @@ const deployNamed = ({ workspace, inner }) => {
9664
9664
  const checkSourceNames = Effect.fn("checkSourceNames")(function* checkSourceNames(root) {
9665
9665
  const files = yield* RepositoryFiles;
9666
9666
  const { workspaces, listed } = yield* memberSources(root);
9667
- const owned = pipe(listed, Array.map(ownerOf$2(workspaces)), Array.getSomes);
9667
+ const owned = pipe(listed, Array.map(ownerOf$3(workspaces)), Array.getSomes);
9668
9668
  const report = (rule, message) => (found) => pipe(Array.dedupe(found), Array.map((name) => fileProblem$1({
9669
9669
  file: files.join(root, name),
9670
9670
  rule,
@@ -9779,13 +9779,13 @@ const checkRustModules = Effect.fn("checkRustModules")(function* checkRustModule
9779
9779
  return [...sliceNameProblems(root, files.join, sources), ...Array.flatMap(Array.getSomes(read), problemsOf$4)];
9780
9780
  });
9781
9781
  // src/features/check-placement/model/shadcn-ui-alias.ts
9782
- const RULE$35 = "shadcn-ui-alias";
9783
- const FIRST$15 = 1;
9782
+ const RULE$37 = "shadcn-ui-alias";
9783
+ const FIRST$17 = 1;
9784
9784
  const problemOf$8 = (directory, { file, alias }) => ({
9785
9785
  file,
9786
- line: FIRST$15,
9787
- column: FIRST$15,
9788
- rule: RULE$35,
9786
+ line: FIRST$17,
9787
+ column: FIRST$17,
9788
+ rule: RULE$37,
9789
9789
  message: `aliases.ui "${alias}" in ${directory}/components.json does not resolve to a directory through the imports of ${directory}/package.json. shadcn lint and msch then cannot tell which files are the design-system components. Point the alias at a "#/" import, such as "#/shared/ui", and map "#/*" to "./src/*".`
9790
9790
  });
9791
9791
  /** @internal */
@@ -9801,7 +9801,7 @@ const shadcnAliasProblems = Effect.fn("shadcnAliasProblems")(function* shadcnAli
9801
9801
  });
9802
9802
  // src/features/check-placement/model/source-aliases.ts
9803
9803
  const ALIAS_RULE = "source-alias";
9804
- const FIRST$14 = 1;
9804
+ const FIRST$16 = 1;
9805
9805
  const SOURCE_ALIAS = "#/*";
9806
9806
  const SOURCE_TARGET = "./src/*";
9807
9807
  const SOURCE_PREFIX = /^\.\/src(?:\/|$)/u;
@@ -9810,8 +9810,8 @@ const Manifest$4 = Schema.Struct({ imports: Schema.optional(Schema.Unknown) });
9810
9810
  const decodeManifest$8 = Schema.decodeUnknownOption(Schema.fromJsonString(Manifest$4));
9811
9811
  const problemAt$6 = (file, rule, message) => ({
9812
9812
  file,
9813
- line: FIRST$14,
9814
- column: FIRST$14,
9813
+ line: FIRST$16,
9814
+ column: FIRST$16,
9815
9815
  rule,
9816
9816
  message
9817
9817
  });
@@ -9859,7 +9859,7 @@ const WORKFLOW_DIRECTORY$1 = ".github/";
9859
9859
  const SEPARATOR$13 = "/";
9860
9860
  const CURRENT = "./";
9861
9861
  const READ_CONCURRENCY$19 = 8;
9862
- const FIRST$13 = 1;
9862
+ const FIRST$15 = 1;
9863
9863
  const RUN_FILE = /(?:^|[\s;&|(])(?:node|vpx|tsx|bun|deno)\s+(?:-\S+\s+)*(?<file>[^\s;&|)]+\.[cm]?[jt]s)\b/gu;
9864
9864
  const COMMAND = /^bin\/[^/]+\.[cm]?ts$/u;
9865
9865
  const NOT_COMMAND = /\.(?:test|d|test\.support)\.[cm]?ts$/u;
@@ -9935,8 +9935,8 @@ const problemsIn$14 = Effect.fn("problemsIn")(function* problemsIn(root, directo
9935
9935
  const isRun = (path) => Array.contains(runPaths, path) || Array.contains(entries.bins, path) || String$1.includes(workspacePath(directory, path))(workflows);
9936
9936
  const unrun = pipe(commands, Array.filter((path) => !isRun(path)), Array.map((path) => ({
9937
9937
  file: files.join(root, directory, path),
9938
- line: FIRST$13,
9939
- column: FIRST$13,
9938
+ line: FIRST$15,
9939
+ column: FIRST$15,
9940
9940
  rule: UNRUN,
9941
9941
  message: `No task, package.json bin or workflow runs ${workspacePath(directory, path)}. Files in ${BIN}/ are entry points for fallow, so an unused one is never reported. Run it from a task or delete it.`
9942
9942
  })));
@@ -9948,8 +9948,8 @@ const scriptsProblem = Effect.fn("scriptsProblem")(function* scriptsProblem(root
9948
9948
  const isDirectory = yield* files.isDirectory(file);
9949
9949
  return pipe(isDirectory, Option.filter(Boolean), Option.map(() => ({
9950
9950
  file,
9951
- line: FIRST$13,
9952
- column: FIRST$13,
9951
+ line: FIRST$15,
9952
+ column: FIRST$15,
9953
9953
  rule: SCRIPTS,
9954
9954
  message: `${workspacePath(directory, SCRIPTS_DIRECTORY)} is a scripts directory. Put each command at ${BIN}/<name>.ts and the code that it shares in the package's own source, so that every workspace runs its commands the same way.`
9955
9955
  })));
@@ -9963,21 +9963,21 @@ const checkCommandEntries = Effect.fn("checkCommandEntries")(function* checkComm
9963
9963
  return [...Array.flatten(found), ...Array.getSomes(scripts)];
9964
9964
  });
9965
9965
  // src/features/check-repository-layout/model/crates.ts
9966
- const RULE$34 = "unverified-crate";
9966
+ const RULE$36 = "unverified-crate";
9967
9967
  const VERSION_RULE = "release-version";
9968
9968
  const MANIFEST_FILE$1 = "package.json";
9969
9969
  const APP_DIRECTORIES = ["", "src-tauri"];
9970
9970
  const CARGO_FILE$1 = "Cargo.toml";
9971
9971
  const CONFIG_FILE$5 = "vite.config.ts";
9972
9972
  const SEPARATOR$12 = "/";
9973
- const FIRST$12 = 1;
9973
+ const FIRST$14 = 1;
9974
9974
  const READ_CONCURRENCY$18 = 8;
9975
9975
  const PackageVersion = Schema.fromJsonString(Schema.Struct({ version: Schema.String }));
9976
9976
  const problemFor$2 = (crate, message) => ({
9977
9977
  file: crate.manifest,
9978
- line: FIRST$12,
9979
- column: FIRST$12,
9980
- rule: RULE$34,
9978
+ line: FIRST$14,
9979
+ column: FIRST$14,
9980
+ rule: RULE$36,
9981
9981
  message: `crate ${crate.name} ${message}, so vp run verify never checks it.`
9982
9982
  });
9983
9983
  const problemIn$2 = Effect.fn("problemIn")(function* problemIn(root, directories, crate) {
@@ -9997,8 +9997,8 @@ const versionProblemIn = Effect.fn("versionProblemIn")(function* versionProblemI
9997
9997
  if (Option.isNone(version) || version.value === crate.version) return Option.none();
9998
9998
  return Option.some({
9999
9999
  file: crate.manifest,
10000
- line: FIRST$12,
10001
- column: FIRST$12,
10000
+ line: FIRST$14,
10001
+ column: FIRST$14,
10002
10002
  rule: VERSION_RULE,
10003
10003
  message: `crate ${crate.name} is version ${crate.version} but ${workspace.value}/${MANIFEST_FILE$1} is ${version.value}. msch-publish releases the version in package.json, so bump both in the same PR.`
10004
10004
  });
@@ -10013,7 +10013,7 @@ const checkCrates = Effect.fn("checkCrates")(function* checkCrates(root) {
10013
10013
  return Array.getSomes(Array.flatten(found));
10014
10014
  });
10015
10015
  // src/features/check-repository-layout/model/deploy-entry-patterns.ts
10016
- const RULE$33 = "deploy-entry-pattern";
10016
+ const RULE$35 = "deploy-entry-pattern";
10017
10017
  const FALLOW_KEYS = [
10018
10018
  "entry",
10019
10019
  "entryPoints",
@@ -10084,7 +10084,7 @@ const problemsIn$13 = Effect.fn("problemsIn")(function* problemsIn(request) {
10084
10084
  return pipe(Array.getSomes(flagged), Array.map(({ text: pattern, start }) => ({
10085
10085
  file: path,
10086
10086
  ...positionOf(text.value)(start - kind.offset),
10087
- rule: RULE$33,
10087
+ rule: RULE$35,
10088
10088
  message: `${pattern} ${MESSAGE$11}`
10089
10089
  })));
10090
10090
  });
@@ -10117,7 +10117,7 @@ const checkDeployEntryPatterns = Effect.fn("checkDeployEntryPatterns")(function*
10117
10117
  return Array.flatten(found);
10118
10118
  });
10119
10119
  // src/features/check-repository-layout/model/fallow-entries.ts
10120
- const RULE$32 = "listed-entry";
10120
+ const RULE$34 = "listed-entry";
10121
10121
  const ENTRY_KEYS = [
10122
10122
  "entry",
10123
10123
  "entryPoints",
@@ -10147,7 +10147,7 @@ const problemsIn$12 = Effect.fn("problemsIn")(function* problemsIn(root, file, d
10147
10147
  return pipe(entryPatternsIn(parsed.program), Array.filter(namesOneFile(directories)), Array.map(({ text: pattern, start }) => ({
10148
10148
  file: path,
10149
10149
  ...positionOf(text.value)(start),
10150
- rule: RULE$32,
10150
+ rule: RULE$34,
10151
10151
  message: `${pattern} names files one by one. Let fallow find the file through what declares it: package.json bin and exports, a tool's config file, or the main of the Alchemy resource that deploys it.`
10152
10152
  })));
10153
10153
  });
@@ -10159,11 +10159,11 @@ const checkFallowEntries = Effect.fn("checkFallowEntries")(function* checkFallow
10159
10159
  return Array.flatten(found);
10160
10160
  });
10161
10161
  // src/features/check-repository-layout/model/root-workspace-paths.ts
10162
- const RULE$31 = "root-workspace-path";
10162
+ const RULE$33 = "root-workspace-path";
10163
10163
  const CONFIG_FILE$4 = "vite.config.ts";
10164
10164
  const PATH_CHARACTER = /[\w.@/-]/u;
10165
10165
  const NAME_CHARACTER = /[\w.@-]/u;
10166
- const FIRST$11 = 0;
10166
+ const FIRST$13 = 0;
10167
10167
  const NEXT$2 = 1;
10168
10168
  const isBoundary = (character, allowed) => character === "" || !allowed.test(character);
10169
10169
  const mentions = (directory) => (text) => {
@@ -10171,14 +10171,14 @@ const mentions = (directory) => (text) => {
10171
10171
  return pipe(Array.drop(parts, NEXT$2), Array.some((after, index) => {
10172
10172
  const before = parts[index] ?? "";
10173
10173
  const previous = String$1.slice(before.length - NEXT$2)(before);
10174
- const following = String$1.slice(FIRST$11, NEXT$2)(after);
10174
+ const following = String$1.slice(FIRST$13, NEXT$2)(after);
10175
10175
  return isBoundary(previous, PATH_CHARACTER) && (following === "/" || isBoundary(following, NAME_CHARACTER));
10176
10176
  }));
10177
10177
  };
10178
10178
  const problemsIn$11 = (file, source, directories) => (found) => pipe(directories, Array.filter((directory) => mentions(directory)(found.text)), Array.map((directory) => ({
10179
10179
  file,
10180
10180
  ...positionOf(source)(found.start),
10181
- rule: RULE$31,
10181
+ rule: RULE$33,
10182
10182
  message: `${directory} is a workspace. The root ${CONFIG_FILE$4} holds what applies to every workspace, so move what only ${directory} needs into ${directory}/${CONFIG_FILE$4}: msch.lint, msch.devDependencies or its verify task.`
10183
10183
  })));
10184
10184
  /** @internal */
@@ -10192,9 +10192,9 @@ const checkRootWorkspacePaths = Effect.fn("checkRootWorkspacePaths")(function* c
10192
10192
  return pipe(stringsIn(parsed.program), Array.flatMap(problemsIn$11(file, source.value, directories)));
10193
10193
  });
10194
10194
  // src/features/check-repository-layout/model/hidden-verify.ts
10195
- const RULE$30 = "hidden-verify";
10195
+ const RULE$32 = "hidden-verify";
10196
10196
  const CONFIG_FILE$3 = "vite.config.ts";
10197
- const FIRST$10 = 1;
10197
+ const FIRST$12 = 1;
10198
10198
  const READ_CONCURRENCY$15 = 8;
10199
10199
  const problemIn$1 = Effect.fn("problemIn")(function* problemIn(root, directory) {
10200
10200
  const config = yield* workspaceConfigOf(root, directory);
@@ -10204,9 +10204,9 @@ const problemIn$1 = Effect.fn("problemIn")(function* problemIn(root, directory)
10204
10204
  const verified = yield* hasVerifyTask(file);
10205
10205
  return Option.some({
10206
10206
  file,
10207
- line: FIRST$10,
10208
- column: FIRST$10,
10209
- rule: RULE$30,
10207
+ line: FIRST$12,
10208
+ column: FIRST$12,
10209
+ rule: RULE$32,
10210
10210
  message: `${directory} gets its verify task from code outside ${CONFIG_FILE$3}. The root verify reads ${CONFIG_FILE$3} without running it, so it never runs this verify. Write run.tasks.verify in ${directory}/${CONFIG_FILE$3}.`
10211
10211
  }).pipe(Option.filter(() => verified));
10212
10212
  });
@@ -10217,7 +10217,7 @@ const checkHiddenVerify = Effect.fn("checkHiddenVerify")(function* checkHiddenVe
10217
10217
  return Array.getSomes(found);
10218
10218
  });
10219
10219
  // src/features/check-repository-layout/model/shared-uncached-tasks.ts
10220
- const RULE$29 = "shared-uncached-task";
10220
+ const RULE$31 = "shared-uncached-task";
10221
10221
  const READ_CONCURRENCY$14 = 8;
10222
10222
  const SHARED = 2;
10223
10223
  const OWN_PROGRAM = /^(?:node|vpx|bun|deno|tsx)$|\//u;
@@ -10260,7 +10260,7 @@ const problemsOf$3 = (definitions) => {
10260
10260
  return pipe(definitions, Array.map(({ file, position, name, command }) => ({
10261
10261
  file,
10262
10262
  ...position,
10263
- rule: RULE$29,
10263
+ rule: RULE$31,
10264
10264
  message: `The uncached task ${name} (${command}) is written the same way in ${Array.join(directories, ", ")}. Write it once in a shared helper and spread it into each run.tasks, so that a change to it reaches every workspace.`
10265
10265
  })));
10266
10266
  };
@@ -10271,7 +10271,7 @@ const checkSharedUncachedTasks = Effect.fn("checkSharedUncachedTasks")(function*
10271
10271
  return pipe(Array.flatten(found), Array.groupBy(({ name, definition }) => `${name}\u0000${definition}`), Record.values, Array.flatMap(problemsOf$3));
10272
10272
  });
10273
10273
  // src/features/check-repository-layout/model/unlocked-tasks.ts
10274
- const RULE$28 = "unlocked-task";
10274
+ const RULE$30 = "unlocked-task";
10275
10275
  const READ_CONCURRENCY$13 = 8;
10276
10276
  const READS_DEPENDENCIES = /^vp (?:test|pack|build)\b/u;
10277
10277
  const decodeCommand = Schema.decodeUnknownOption(Schema.Union([Schema.String, Schema.NonEmptyArray(Schema.String)]));
@@ -10283,7 +10283,7 @@ const tracksLockfiles = (task) => pipe(propertyValue("cache")(task.value), Optio
10283
10283
  const problemsOf$2 = ({ file, source, tasks }) => pipe(tasks, Array.filter(tracksLockfiles), Array.flatMap((task) => pipe(commandOf(task), Option.map((command) => ({
10284
10284
  file,
10285
10285
  ...positionOf(source)(task.start),
10286
- rule: RULE$28,
10286
+ rule: RULE$30,
10287
10287
  message: `The task ${keyName(task.key)} runs ${command} with inputs written by hand. It then reruns after every lockfile change, and it does not rerun when a dependency of a dependency moves. Set cache to LOCKED from @r_masseater/msch/locked-inputs.`
10288
10288
  })), Option.toArray)));
10289
10289
  /** @internal */
@@ -10438,13 +10438,13 @@ const outputPathsOf = (step) => pipe(stringOf(pathInputOf(step)), Option.toArray
10438
10438
  /** @internal */
10439
10439
  const producedPaths = (source) => pipe(jobsOf(source), Array.flatMap(([, job]) => itemsOf(childOf("steps")(job))), Array.flatMap(outputPathsOf));
10440
10440
  // src/features/check-repository-layout/model/workflow-paths.ts
10441
- const RULE$27 = "workflow-path";
10441
+ const RULE$29 = "workflow-path";
10442
10442
  const WORKFLOW_DIRECTORY = ".github/workflows/";
10443
10443
  const WORKFLOW_EXTENSIONS = [".yml", ".yaml"];
10444
10444
  const READ_CONCURRENCY$12 = 8;
10445
10445
  const WILDCARD$2 = /[*?[]/u;
10446
10446
  const SEPARATOR$9 = "/";
10447
- const FIRST$9 = 0;
10447
+ const FIRST$11 = 0;
10448
10448
  const EXPECTED = {
10449
10449
  action: "a directory with action.yml",
10450
10450
  directory: "a directory",
@@ -10485,7 +10485,7 @@ const RESOLVERS = {
10485
10485
  };
10486
10486
  const staticPrefix = (path) => {
10487
10487
  const prefix = Array.headNonEmpty(String$1.split(path, WILDCARD$2));
10488
- if (String$1.endsWith(SEPARATOR$9)(prefix)) return String$1.slice(FIRST$9, -1)(prefix);
10488
+ if (String$1.endsWith(SEPARATOR$9)(prefix)) return String$1.slice(FIRST$11, -1)(prefix);
10489
10489
  return prefix;
10490
10490
  };
10491
10491
  const isIgnored$1 = Effect.fn("isIgnored")(function* isIgnored(root, path) {
@@ -10504,7 +10504,7 @@ const isMissing = Effect.fn("isMissing")(function* isMissing(root, produced, fou
10504
10504
  const problemOf$7 = (file, source) => (found) => ({
10505
10505
  file,
10506
10506
  ...positionOf(source)(found.offset),
10507
- rule: RULE$27,
10507
+ rule: RULE$29,
10508
10508
  message: `${found.field} names ${found.path}, which is not ${EXPECTED[found.kind]} in this repository. Point it at a path that exists or remove it.`
10509
10509
  });
10510
10510
  const problemsIn$10 = Effect.fn("problemsIn")(function* problemsIn(root, workflow) {
@@ -10631,12 +10631,12 @@ const checkWorkspaces = Effect.fn("checkWorkspaces")(function* checkWorkspaces(r
10631
10631
  return Array.flatten(found);
10632
10632
  });
10633
10633
  // src/features/check-typescript-generation/model/typescript-generation.ts
10634
- const RULE$26 = "legacy-typescript";
10634
+ const RULE$28 = "legacy-typescript";
10635
10635
  const LOCKFILE = "pnpm-lock.yaml";
10636
10636
  const COMPILER = "typescript";
10637
10637
  const CURRENT_MAJOR = 7;
10638
10638
  const LEGACY_COMPILER_PACKAGE = /^@typescript\/typescript\d+$/u;
10639
- const FIRST$8 = 1;
10639
+ const FIRST$10 = 1;
10640
10640
  const legacyOf = (id) => {
10641
10641
  const { name, version } = parse$1(id);
10642
10642
  const isOldCompiler = name === COMPILER && pipe(Option.fromNullishOr(version), Option.flatMap((found) => Option.fromNullishOr(semver.coerce(found))), Option.exists((found) => found.major < CURRENT_MAJOR));
@@ -10647,8 +10647,8 @@ const legacyOf = (id) => {
10647
10647
  };
10648
10648
  const dependentsOf = (nodes) => (id) => pipe(nodes, Array.filter(({ dependencies }) => Array.contains(dependencies, id)), Array.map((node) => `\`${node.id}\``));
10649
10649
  const lineOf$2 = (source) => (id) => pipe(String$1.split(source, "\n"), Array.findFirstIndex((line) => String$1.replaceAll("'", "")(String$1.trim(line)) === `${id}:`), Option.match({
10650
- onNone: () => FIRST$8,
10651
- onSome: (index) => index + FIRST$8
10650
+ onNone: () => FIRST$10,
10651
+ onSome: (index) => index + FIRST$10
10652
10652
  }));
10653
10653
  const messageOf$2 = (legacy, dependents) => `\`${legacy.id}\` is installed, pulled in by ${Array.join(dependents, ", ")}. Only TypeScript ${String(CURRENT_MAJOR)} or newer is used: remove the dependency that needs the old compiler, move it to the TypeScript ${String(CURRENT_MAJOR)} API, or bundle or port it. Do not install an old compiler beside TypeScript ${String(CURRENT_MAJOR)}.`;
10654
10654
  /** @internal */
@@ -10661,8 +10661,8 @@ const checkTypescriptGeneration = Effect.fn("checkTypescriptGeneration")(functio
10661
10661
  return pipe(Option.getOrElse(nodes, () => []), Array.flatMap(({ id }) => Option.toArray(legacyOf(id))), Array.map((legacy) => ({
10662
10662
  file,
10663
10663
  line: lineOf$2(source)(legacy.id),
10664
- column: FIRST$8,
10665
- rule: RULE$26,
10664
+ column: FIRST$10,
10665
+ rule: RULE$28,
10666
10666
  message: messageOf$2(legacy, dependentsOf(Option.getOrElse(nodes, () => []))(legacy.id))
10667
10667
  })));
10668
10668
  });
@@ -11087,7 +11087,7 @@ const scanned = (owners, problems) => ({
11087
11087
  owners,
11088
11088
  problems
11089
11089
  });
11090
- const ownerOf$1 = (project) => (annotated) => {
11090
+ const ownerOf$2 = (project) => (annotated) => {
11091
11091
  const { node, conceptId } = annotated;
11092
11092
  if (!isModuleConst(node)) return scanned([], [annotationProblem(`@${OWNER_TAG} registers an owner only on a module-scope const.`)(node)]);
11093
11093
  if (conceptId === "") return scanned([], [annotationProblem(`@${OWNER_TAG} needs a concept id.`)(node)]);
@@ -11121,7 +11121,7 @@ const conflictProblems = (owners) => pipe(owners, Array.flatMap((owner, index) =
11121
11121
  return [...pipe(Array.take(sameConcept, FIRST_OWNER_COUNT), Array.map(() => ownerProblem(`The concept ${owner.conceptId} already has an owner.`)(owner))), ...pipe(Array.take(sameSet, FIRST_OWNER_COUNT), Array.map((other) => ownerProblem(`The values ${formatValues(owner.values)} are already owned by ${other.conceptId}.`)(owner)))];
11122
11122
  }));
11123
11123
  const ownersIn = (project) => {
11124
- const results = pipe(project.sourceFiles, Array.flatMap((sourceFile) => pipe(annotatedIn(sourceFile), Array.map((annotated) => ownerOf$1(project)(annotated)))));
11124
+ const results = pipe(project.sourceFiles, Array.flatMap((sourceFile) => pipe(annotatedIn(sourceFile), Array.map((annotated) => ownerOf$2(project)(annotated)))));
11125
11125
  return scanned(pipe(results, Array.flatMap((result) => result.owners)), pipe(results, Array.flatMap((result) => result.problems)));
11126
11126
  };
11127
11127
  const combineOwnerScans = (scans) => {
@@ -11576,7 +11576,7 @@ const duplicateProblems = (relative) => (sites) => {
11576
11576
  }))));
11577
11577
  };
11578
11578
  // src/features/check-value-owners/model/name-lists.ts
11579
- const RULE$25 = "hand-written-names";
11579
+ const RULE$27 = "hand-written-names";
11580
11580
  const TEST_FILE = /\.test(?:\.[\w-]+)?\.[cm]?tsx?$/u;
11581
11581
  const nameListOf = (site) => {
11582
11582
  if (TEST_FILE.test(site.file) || site.values.length < 2) return Option.none();
@@ -11591,7 +11591,7 @@ const problemOf$6 = ({ list, reason }) => ({
11591
11591
  file: list.site.file,
11592
11592
  line: list.site.line,
11593
11593
  column: list.site.column,
11594
- rule: RULE$25,
11594
+ rule: RULE$27,
11595
11595
  message: `The names ${formatValues(list.names)} are listed by hand, but ${reason}`
11596
11596
  });
11597
11597
  // src/features/check-value-owners/model/declared-names.ts
@@ -11818,7 +11818,7 @@ const checkRepository = Effect.fn("checkRepository")(function* checkRepository(r
11818
11818
  return sortProblems([...ownerScan.problems, ...repositoryProblems(repository)(analyses)]);
11819
11819
  }, Effect.scoped);
11820
11820
  // src/features/source-code/find-namespace-destructuring/model/namespace-destructuring.ts
11821
- const RULE$24 = "namespace-destructuring";
11821
+ const RULE$26 = "namespace-destructuring";
11822
11822
  const LOCAL = /^[.#/]/u;
11823
11823
  const messageOf$1 = (name) => `Destructuring ${name}, which comes from a package, makes the bundler keep everything ${name} exports. Write ${name}.<member> where it is used.`;
11824
11824
  const isPackage = (specifier) => isStringLiteral(specifier) && !LOCAL.test(specifier.text);
@@ -11834,7 +11834,7 @@ const destructuredName = (declaration) => {
11834
11834
  return pipe(Option.fromUndefinedOr(declaration.initializer), Option.filter(isIdentifier), Option.map((initializer) => initializer.text));
11835
11835
  };
11836
11836
  const problemOf$5 = (names) => (declaration) => pipe(destructuredName(declaration), Option.filter((name) => names.includes(name)), Option.map((name) => problemAt$9({
11837
- rule: RULE$24,
11837
+ rule: RULE$26,
11838
11838
  message: messageOf$1(name)
11839
11839
  })), Option.map((report) => report(declaration)));
11840
11840
  const namespaceDestructuringIn = () => (sourceFile) => {
@@ -11842,7 +11842,7 @@ const namespaceDestructuringIn = () => (sourceFile) => {
11842
11842
  return pipe(descendantsOf(sourceFile), Array.filter(isVariableDeclaration), Array.map(problemOf$5(names)), Array.getSomes);
11843
11843
  };
11844
11844
  // src/features/source-code/find-pass-through-wrappers/model/pass-through-wrappers.ts
11845
- const RULE$23 = "pass-through-wrapper";
11845
+ const RULE$25 = "pass-through-wrapper";
11846
11846
  const SINGLE_STATEMENT = 1;
11847
11847
  const SINGLE_DECLARATION = 1;
11848
11848
  const THIS_PARAMETER = "this";
@@ -11939,7 +11939,7 @@ const isPassThrough = (checker) => (candidate) => (forward) => {
11939
11939
  const problemOf$4 = (checker) => (candidate) => {
11940
11940
  if (changesTheCall(candidate.wrapper)) return Option.none();
11941
11941
  return pipe(returnedExpression(candidate.wrapper), Option.flatMap(forwardOf), Option.filter(isPassThrough(checker)(candidate)), Option.map((forward) => problemAt$9({
11942
- rule: RULE$23,
11942
+ rule: RULE$25,
11943
11943
  message: messageOf(forward.callee.getText())
11944
11944
  })(candidate.name)));
11945
11945
  };
@@ -11948,7 +11948,7 @@ const passThroughWrappersIn = (checker) => (sourceFile) => pipe(descendantsOf(so
11948
11948
  /** @internal */
11949
11949
  const checkSources = (root) => checkRepository(root, [passThroughWrappersIn, namespaceDestructuringIn]);
11950
11950
  // src/features/check-agent-settings/model/missing-hooks.ts
11951
- const RULE$22 = "missing-hook";
11951
+ const RULE$24 = "missing-hook";
11952
11952
  const SETTINGS_FILE$1 = /^\.claude\/settings\.json$/u;
11953
11953
  const PLUGIN_HOOKS_FILE = /(?:^|\/)hooks\/hooks\.json$/u;
11954
11954
  const PROJECT_PATH = /(?<optional>--env-file-if-exists=)?\$\{?CLAUDE_PROJECT_DIR\}?(?:\\")?\/(?<path>[\w.@/-]+)/gu;
@@ -11973,7 +11973,7 @@ const problemsIn$9 = Effect.fn("problemsIn")(function* problemsIn({ root, file,
11973
11973
  return pipe(missing, Array.map(({ path, index }) => ({
11974
11974
  file,
11975
11975
  ...positionOf(source)(index),
11976
- rule: RULE$22,
11976
+ rule: RULE$24,
11977
11977
  message: `runs ${path}, which does not exist. The hook fails every time it fires. Point it at a file that exists or remove the hook.`
11978
11978
  })));
11979
11979
  });
@@ -12004,7 +12004,7 @@ const checkMissingHooks = Effect.fn("checkMissingHooks")(function* checkMissingH
12004
12004
  const taggedError$3 = Schema.TaggedError;
12005
12005
  var SectionConfigUnreadable = class extends taggedError$3()("SectionConfigUnreadable", { file: Schema.String }) {};
12006
12006
  const CONFIG_FILE$2 = "vite.config.ts";
12007
- const FIRST$7 = 1;
12007
+ const FIRST$9 = 1;
12008
12008
  const sectionAt = (file, pick) => Effect.gen(function* readSection() {
12009
12009
  if (!(yield* (yield* RepositoryFiles).exists(file))) return Option.none();
12010
12010
  const config = yield* Effect.tryPromise({
@@ -12015,8 +12015,8 @@ const sectionAt = (file, pick) => Effect.gen(function* readSection() {
12015
12015
  });
12016
12016
  const failureAt = (file, rule, message) => [{
12017
12017
  file,
12018
- line: FIRST$7,
12019
- column: FIRST$7,
12018
+ line: FIRST$9,
12019
+ column: FIRST$9,
12020
12020
  rule,
12021
12021
  message
12022
12022
  }];
@@ -12038,7 +12038,7 @@ const checkSection = (check) => (root) => Effect.gen(function* runSection() {
12038
12038
  onSuccess: (found) => pipe(found, Array.filter(({ severity }) => severity === "error"), Array.map((diagnostic) => ({
12039
12039
  file: files.join(root, diagnostic.path),
12040
12040
  line: diagnostic.line,
12041
- column: diagnostic.column ?? FIRST$7,
12041
+ column: diagnostic.column ?? FIRST$9,
12042
12042
  rule: check.rule,
12043
12043
  message: `${diagnostic.rule} ${diagnostic.message}${check.detail(diagnostic)}`
12044
12044
  })))
@@ -12059,8 +12059,8 @@ const SHELL_SHEBANG = /^#!\S*(?:\/|\s)(?:env\s+)?(?:-\S+\s+)*(?:ba|z|k|da)?sh\b|
12059
12059
  const EXTENSION = /\.[^./]+$/u;
12060
12060
  const SETTINGS_FILE = ".claude/settings.json";
12061
12061
  const READ_CONCURRENCY$9 = 64;
12062
- const FIRST$6 = 1;
12063
- const RULE$21 = "shell-script";
12062
+ const FIRST$8 = 1;
12063
+ const RULE$23 = "shell-script";
12064
12064
  const MESSAGE$10 = "is a shell script. Do the work in TypeScript as a Vite+ task in vite.config.ts, a test, or the tool's own hook, and delete this file. Only the SessionStart hook in .claude/settings.json, which installs the toolchain before TypeScript can run, stays a shell script.";
12065
12065
  const HookSchema = Schema.Struct({
12066
12066
  command: Schema.optional(Schema.String),
@@ -12081,9 +12081,9 @@ const baseName = (name) => pipe(String$1.split("/")(name), Array.last, Option.ge
12081
12081
  const hasExtension = (name) => EXTENSION.test(baseName(name));
12082
12082
  const problemFor$1 = (file) => ({
12083
12083
  file,
12084
- line: FIRST$6,
12085
- column: FIRST$6,
12086
- rule: RULE$21,
12084
+ line: FIRST$8,
12085
+ column: FIRST$8,
12086
+ rule: RULE$23,
12087
12087
  message: MESSAGE$10
12088
12088
  });
12089
12089
  /** @internal */
@@ -12136,7 +12136,7 @@ const runScriptsOf = (source) => {
12136
12136
  const COMMAND_CHAIN = /&&|\|\||;|\|/u;
12137
12137
  const QUOTED$1 = /\$\{\{.*?\}\}|"(?:[^"\\]|\\.)*"|'[^']*'/gu;
12138
12138
  const COMMENT = "#";
12139
- const RULE$20 = "workflow-script";
12139
+ const RULE$22 = "workflow-script";
12140
12140
  const ONE_COMMAND = 1;
12141
12141
  const MESSAGE$9 = "runs more than one command. Keep a step to one command, `vp run <task>` or `vp exec <bin>`, and put the logic in a Vite+ task in TypeScript.";
12142
12142
  const isCommand = (line) => String$1.isNonEmpty(line) && !String$1.startsWith(COMMENT)(line);
@@ -12150,7 +12150,7 @@ const problemsIn$8 = (file) => (source) => {
12150
12150
  return pipe(runScriptsOf(source), Array.filter(runsMoreThanOneCommand), Array.map(({ start }) => ({
12151
12151
  file,
12152
12152
  ...at(start),
12153
- rule: RULE$20,
12153
+ rule: RULE$22,
12154
12154
  message: MESSAGE$9
12155
12155
  })));
12156
12156
  };
@@ -12281,7 +12281,7 @@ const AGENT_DOCS = [
12281
12281
  ];
12282
12282
  const READ_CONCURRENCY$7 = 16;
12283
12283
  const START$13 = 0;
12284
- const FIRST$5 = 1;
12284
+ const FIRST$7 = 1;
12285
12285
  const LINE = "\n";
12286
12286
  const CommandText = Schema.Union([Schema.String, Schema.Array(Schema.String)]);
12287
12287
  const decodeCommandText = Schema.decodeUnknownOption(CommandText);
@@ -12312,8 +12312,8 @@ const hookSources = (file, name) => (source) => pipe(String$1.split(source, LINE
12312
12312
  kind: "hook",
12313
12313
  file,
12314
12314
  position: {
12315
- line: index + FIRST$5,
12316
- column: FIRST$5
12315
+ line: index + FIRST$7,
12316
+ column: FIRST$7
12317
12317
  },
12318
12318
  name,
12319
12319
  text
@@ -12386,7 +12386,7 @@ const commandSources = Effect.fn("commandSources")(function* commandSources(root
12386
12386
  return Array.flatten(found);
12387
12387
  });
12388
12388
  // src/features/check-vite-plus/model/package-scripts.ts
12389
- const RULE$19 = "package-script";
12389
+ const RULE$21 = "package-script";
12390
12390
  const LIFECYCLE = [
12391
12391
  "preinstall",
12392
12392
  "install",
@@ -12409,12 +12409,12 @@ const LIFECYCLE = [
12409
12409
  const problemOf$3 = ({ file, position, name }) => ({
12410
12410
  file,
12411
12411
  ...position,
12412
- rule: RULE$19,
12412
+ rule: RULE$21,
12413
12413
  message: `The script ${name} is not a lifecycle script. package.json scripts hold only the scripts the package manager runs by itself, such as prepare and prepack. Write ${name} as a task in run.tasks of this package's vite.config.ts, where its shape is type-checked.`
12414
12414
  });
12415
12415
  const packageScriptProblems = (sources) => pipe(sources, Array.filter(({ kind, name }) => kind === "script" && !Array.contains(LIFECYCLE, name)), Array.map(problemOf$3));
12416
12416
  // src/features/check-vite-plus/model/vite-plus-block.ts
12417
- const RULE$18 = "vite-plus-block";
12417
+ const RULE$20 = "vite-plus-block";
12418
12418
  const MARKER = Array.join([
12419
12419
  "<!--",
12420
12420
  "VITE PLUS START",
@@ -12427,7 +12427,7 @@ const problemIn = (file) => (source) => {
12427
12427
  return Option.some({
12428
12428
  file,
12429
12429
  ...positionOf(source)(index.value),
12430
- rule: RULE$18,
12430
+ rule: RULE$20,
12431
12431
  message: MESSAGE$8
12432
12432
  });
12433
12433
  };
@@ -12483,7 +12483,7 @@ const checkFullHistoryCheckout = workflowCheck({
12483
12483
  })
12484
12484
  });
12485
12485
  // src/features/check-workflows/model/publish-trigger.ts
12486
- const RULE$16 = "publish-trigger";
12486
+ const RULE$18 = "publish-trigger";
12487
12487
  const PUBLISH = /\bmsch-publish\b/u;
12488
12488
  const MANUAL = "workflow_dispatch";
12489
12489
  const TRIGGER_KEY = "on";
@@ -12503,18 +12503,18 @@ const publishTriggerOffsetsOf = (source) => {
12503
12503
  };
12504
12504
  /** @internal */
12505
12505
  const checkPublishTrigger = workflowCheck({
12506
- rule: RULE$16,
12506
+ rule: RULE$18,
12507
12507
  message: MESSAGE$6,
12508
12508
  offsetsOf: publishTriggerOffsetsOf
12509
12509
  });
12510
12510
  // src/features/check-workflows/model/release-please.ts
12511
- const RULE$15 = "release-please";
12511
+ const RULE$17 = "release-please";
12512
12512
  const RELEASE_PLEASE = /^googleapis\/release-please-action(?:@|$)/u;
12513
12513
  const RELEASE_PLEASE_FILE = /(?:^|\/)(?:release-please-config|\.release-please-manifest)\.json$/u;
12514
- const FIRST$4 = 1;
12514
+ const FIRST$6 = 1;
12515
12515
  const MESSAGE$5 = "releases with release-please. Releases are manual: bump the version in a PR, then run the publish workflow, which runs `msch-publish` for the workspace.";
12516
12516
  const checkReleasePleaseSteps = workflowCheck({
12517
- rule: RULE$15,
12517
+ rule: RULE$17,
12518
12518
  message: MESSAGE$5,
12519
12519
  offsetsOf: scalarKeyOffsets({
12520
12520
  name: "uses",
@@ -12526,9 +12526,9 @@ const checkReleasePleaseFiles = Effect.fn("checkReleasePleaseFiles")(function* c
12526
12526
  const names = yield* files.listedFiles(root);
12527
12527
  return pipe(names, Array.filter((name) => RELEASE_PLEASE_FILE.test(name)), Array.map((name) => ({
12528
12528
  file: files.join(root, name),
12529
- line: FIRST$4,
12530
- column: FIRST$4,
12531
- rule: RULE$15,
12529
+ line: FIRST$6,
12530
+ column: FIRST$6,
12531
+ rule: RULE$17,
12532
12532
  message: MESSAGE$5
12533
12533
  })));
12534
12534
  });
@@ -12540,17 +12540,17 @@ const checkReleasePlease = Effect.fn("checkReleasePlease")(function* checkReleas
12540
12540
  // src/features/check-workflows/model/workflow-queue.ts
12541
12541
  const CONCURRENCY_KEY = "concurrency";
12542
12542
  const QUEUE_KEY = "queue";
12543
- const RULE$14 = "workflow-queue";
12543
+ const RULE$16 = "workflow-queue";
12544
12544
  const MESSAGE$4 = "queues runs with `queue`. A queued group runs every old push one by one, so a long run holds back the newest commit for hours. Drop `queue`: a job that later pushes redo gets `cancel-in-progress: true`, and a deploy or release job keeps the default, which lets the running one finish and replaces the waiting one with the newest run.";
12545
12545
  const queueOffsetsOf = (source) => pipe(pairsNamed(CONCURRENCY_KEY)(source), Array.flatMap((pair) => Option.toArray(keyOffsetIn(QUEUE_KEY)(pair.value))));
12546
12546
  /** @internal */
12547
12547
  const checkWorkflowQueues = workflowCheck({
12548
- rule: RULE$14,
12548
+ rule: RULE$16,
12549
12549
  message: MESSAGE$4,
12550
12550
  offsetsOf: queueOffsetsOf
12551
12551
  });
12552
12552
  // src/features/check-workflows/model/workflow-commits.ts
12553
- const RULE$13 = "workflow-commit";
12553
+ const RULE$15 = "workflow-commit";
12554
12554
  const GIT_WRITE = /\bgit\s+(?:-{1,2}\S+\s+(?:\S+\s+)?)*(?:commit|push)\b/u;
12555
12555
  const COMMIT_ACTION = /^[^@/]+\/[^@]*(?:commit|push)[^@]*(?:@|$)/iu;
12556
12556
  const MESSAGE$3 = "commits or pushes from a workflow. A bot commit leaves generated files out of review and races the next push. Regenerate the files in a commit hook (for example `.vite-hooks/pre-commit`) so they land in the author's commit, and let CI only check that they are current.";
@@ -12558,7 +12558,7 @@ const offsetsWhere = (name, pattern) => (source) => pipe(pairsNamed(name)(source
12558
12558
  const commitOffsetsOf = (source) => [...offsetsWhere("run", GIT_WRITE)(source), ...offsetsWhere("uses", COMMIT_ACTION)(source)];
12559
12559
  /** @internal */
12560
12560
  const checkWorkflowCommits = workflowCheck({
12561
- rule: RULE$13,
12561
+ rule: RULE$15,
12562
12562
  message: MESSAGE$3,
12563
12563
  offsetsOf: commitOffsetsOf
12564
12564
  });
@@ -12752,7 +12752,7 @@ const commentsWith = (grammars) => (reader, source) => {
12752
12752
  }[reader](source);
12753
12753
  };
12754
12754
  // src/features/ban-comments/model/comments.ts
12755
- const RULE$12 = "comment";
12755
+ const RULE$14 = "comment";
12756
12756
  const CONFIG_FILE$1 = "vite.config.ts";
12757
12757
  const VENDORED_PATHSPEC = ":(attr:linguist-vendored)";
12758
12758
  const READ_CONCURRENCY$6 = 64;
@@ -12822,14 +12822,14 @@ const isAllowed = (source, directives) => (comment) => isShebang(comment) || dir
12822
12822
  const problemOf$2 = (file, source) => ({ index }) => ({
12823
12823
  file,
12824
12824
  ...positionOf(source)(index),
12825
- rule: RULE$12,
12825
+ rule: RULE$14,
12826
12826
  message: MESSAGE$2
12827
12827
  });
12828
12828
  const unreadableProblem = (file, message) => ({
12829
12829
  file,
12830
12830
  line: FIRST_LINE$4,
12831
12831
  column: FIRST_COLUMN$3,
12832
- rule: RULE$12,
12832
+ rule: RULE$14,
12833
12833
  message: `msch could not read the comments in this file: ${message}`
12834
12834
  });
12835
12835
  const settingsOf = ({ msch, lint }) => ({
@@ -13128,20 +13128,20 @@ const checkSkillEntry = Effect.fn("checkSkillEntry")(function* checkSkillEntry(r
13128
13128
  ];
13129
13129
  });
13130
13130
  // src/features/check-skills/model/published-skills.ts
13131
- const RULE$11 = "published-skills";
13131
+ const RULE$13 = "published-skills";
13132
13132
  const KEYWORD = "tanstack-intent";
13133
13133
  const SKILLS = "skills";
13134
13134
  const MANIFEST_FILE = "package.json";
13135
13135
  const SKILL_FILE$1 = "SKILL.md";
13136
- const FIRST$3 = 1;
13136
+ const FIRST$5 = 1;
13137
13137
  const SUCCEEDED = 0;
13138
13138
  const SYNC = "Run vp exec intent maintainer sync in the repository root.";
13139
13139
  const INTENT_CLI = fileURLToPath(new URL("./cli.mjs", import.meta.resolve("@tanstack/intent")));
13140
13140
  const problemAt$2 = (file, message) => ({
13141
13141
  file,
13142
- line: FIRST$3,
13143
- column: FIRST$3,
13144
- rule: RULE$11,
13142
+ line: FIRST$5,
13143
+ column: FIRST$5,
13144
+ rule: RULE$13,
13145
13145
  message
13146
13146
  });
13147
13147
  const skillDirectoriesIn = (files, directory) => pipe(findSkillFiles(files.join(directory, SKILLS)), Array.filter((file) => files.basename(file) === SKILL_FILE$1), Array.map((file) => files.relative(directory, files.dirname(file))));
@@ -13180,7 +13180,7 @@ const checkPublishedSkills = Effect.fn("checkPublishedSkills")(function* checkPu
13180
13180
  return Array.flatten(problems);
13181
13181
  });
13182
13182
  // src/features/check-skills/model/skill-files.ts
13183
- const RULE$10 = "skill-file";
13183
+ const RULE$12 = "skill-file";
13184
13184
  const SKILL_FILE = /(?:^|\/)SKILL\.md$/u;
13185
13185
  const INSTALLED = /(?:^|\/)\.(?:agents|claude|codex)\/skills\//u;
13186
13186
  const MARKDOWN = ".md";
@@ -13198,7 +13198,7 @@ const COMMIT_LINK = /\/(?:blob|tree)\/[0-9a-f]{40}(?:\/|$)/u;
13198
13198
  const BLANK = /\s+/u;
13199
13199
  const SEPARATOR$3 = "/";
13200
13200
  const START$9 = 0;
13201
- const FIRST$2 = 1;
13201
+ const FIRST$4 = 1;
13202
13202
  const READ_CONCURRENCY$4 = 16;
13203
13203
  const Metadata = Schema.Struct({ "derived-from": Schema.optional(Schema.String) });
13204
13204
  const Frontmatter = Schema.Struct({
@@ -13237,7 +13237,7 @@ const frontmatterProblems = (skill, folder) => pipe(frontmatterOf(skill.source),
13237
13237
  ]), Option.getOrElse(() => []), Array.map(({ index, message }) => ({
13238
13238
  file: skill.file,
13239
13239
  ...positionOf(skill.source)(index),
13240
- rule: RULE$10,
13240
+ rule: RULE$12,
13241
13241
  message
13242
13242
  })));
13243
13243
  const linkOf = (found) => pipe(groupOf$2("target")(found), Option.filter((target) => !EXTERNAL.test(target)), Option.map((target) => String$1.replace(FRAGMENT, "")(target)), Option.filter(String$1.isNonEmpty), Option.map((target) => ({
@@ -13264,7 +13264,7 @@ const linkProblems = Effect.fn("linkProblems")(function* linkProblems(file) {
13264
13264
  return pipe(missing, Array.map(({ target, index }) => ({
13265
13265
  file,
13266
13266
  ...positionOf(source)(index),
13267
- rule: RULE$10,
13267
+ rule: RULE$12,
13268
13268
  message: `links to ${target}, which does not exist. Fix the path or remove the link.`
13269
13269
  })));
13270
13270
  });
@@ -13278,9 +13278,9 @@ const problemsIn$6 = Effect.fn("problemsIn")(function* problemsIn(root, listed,
13278
13278
  const links = yield* Effect.forEach(documents, linkProblems, { concurrency: READ_CONCURRENCY$4 });
13279
13279
  const licenses = pipe(inside, Array.filter((entry) => files.dirname(entry) === directory), Array.filter((entry) => LICENSE_FILE.test(files.basename(entry))), Array.map((entry) => ({
13280
13280
  file: files.join(root, entry),
13281
- line: FIRST$2,
13282
- column: FIRST$2,
13283
- rule: RULE$10,
13281
+ line: FIRST$4,
13282
+ column: FIRST$4,
13283
+ rule: RULE$12,
13284
13284
  message: "is a license file inside a skill. Skills here carry neither a license field nor a LICENSE file. Delete it."
13285
13285
  })));
13286
13286
  return [
@@ -13360,7 +13360,7 @@ const cargoEntries = (text) => {
13360
13360
  };
13361
13361
  const toolchainEntries = (text) => singleEntry("channel", fieldOf("channel")(parseToml(text)["toolchain"]));
13362
13362
  // src/features/check-version-downgrades/model/version-downgrade.ts
13363
- const RULE$9 = "version-downgrade";
13363
+ const RULE$11 = "version-downgrade";
13364
13364
  const DEFAULT_BASE = "origin/main";
13365
13365
  const READ_CONCURRENCY$3 = 16;
13366
13366
  const READERS = [
@@ -13386,7 +13386,7 @@ const downgradesIn = ({ file, text, before, after }) => {
13386
13386
  file,
13387
13387
  line: lineOf(text, entry),
13388
13388
  column: FIRST_LINE$1,
13389
- rule: RULE$9,
13389
+ rule: RULE$11,
13390
13390
  message: message(old, entry)
13391
13391
  })), Option.toArray)));
13392
13392
  };
@@ -13468,14 +13468,14 @@ const START$7 = 0;
13468
13468
  const HEX = 16;
13469
13469
  const CODE_POINT_WIDTH = 4;
13470
13470
  const READ_CONCURRENCY$1 = 64;
13471
- const RULE$8 = "hidden-unicode";
13471
+ const RULE$10 = "hidden-unicode";
13472
13472
  const hexOf = (character) => pipe(String$1.codePointAt(START$7)(character), Option.getOrElse(() => START$7), (code) => code.toString(HEX), String$1.toUpperCase, String$1.padStart(CODE_POINT_WIDTH, "0"));
13473
13473
  const problemOf$1 = (file, source) => (found) => {
13474
13474
  const hex = hexOf(found[START$7]);
13475
13475
  return {
13476
13476
  file,
13477
13477
  ...positionOf(source)(found.index ?? START$7),
13478
- rule: RULE$8,
13478
+ rule: RULE$10,
13479
13479
  message: `U+${hex} is invisible in editors and reviews and can change what the text means. Remove it, or write it as the escape \\u${hex}.`
13480
13480
  };
13481
13481
  };
@@ -13497,14 +13497,14 @@ const checkHiddenUnicode = Effect.fn("checkHiddenUnicode")(function* checkHidden
13497
13497
  return Array.flatten(found);
13498
13498
  });
13499
13499
  // src/features/find-unneeded-files/model/alchemy-patch.ts
13500
- const RULE$7 = "alchemy-patch";
13500
+ const RULE$9 = "alchemy-patch";
13501
13501
  const WORKSPACE_FILE$3 = "pnpm-workspace.yaml";
13502
13502
  const ALCHEMY$1 = /^(?:alchemy|@alchemy\.run\/[^@]+)(?:@.*)?$/u;
13503
13503
  const START$6 = 0;
13504
13504
  const problemOf = (file, position, name) => ({
13505
13505
  file,
13506
13506
  ...position,
13507
- rule: RULE$7,
13507
+ rule: RULE$9,
13508
13508
  message: `patches ${name}. A patch breaks on every Alchemy release. Define the missing setting as a custom resource in the stack and delete the patch.`
13509
13509
  });
13510
13510
  const problemsIn$3 = (file, patched) => (source) => {
@@ -13524,7 +13524,7 @@ const checkAlchemyPatch = Effect.fn("checkAlchemyPatch")(function* checkAlchemyP
13524
13524
  // src/features/find-unneeded-files/model/applied-packages.ts
13525
13525
  const MSCH = "@r_masseater/msch";
13526
13526
  const SCOPE$1 = "@r_masseater/";
13527
- const RULE$6 = "applied-package";
13527
+ const RULE$8 = "applied-package";
13528
13528
  const WORKSPACE_FILE$2 = "pnpm-workspace.yaml";
13529
13529
  const NOT_FOUND = -1;
13530
13530
  const SEPARATOR$2 = "/";
@@ -13569,13 +13569,13 @@ const appliedByMsch = Effect.fn("appliedByMsch")(function* appliedByMsch() {
13569
13569
  const problemAt$1 = (file, source) => (index, name) => ({
13570
13570
  file,
13571
13571
  ...positionOf(source)(index),
13572
- rule: RULE$6,
13572
+ rule: RULE$8,
13573
13573
  message: `msch applies ${name}. Remove this use and let msch apply it.`
13574
13574
  });
13575
13575
  const specifierPattern = ({ name }) => new RegExp(`["'\`]${escaped(name)}(?=["'\`/])`, "gu");
13576
13576
  const binPattern = (bin) => new RegExp(`(?<![\\w./@:-])${escaped(bin)}(?=[ \\t"'\`]|$)`, "gmu");
13577
13577
  const usesIn = (applied) => ({ file }, source) => pipe(applied, Array.flatMap((entry) => pipe([specifierPattern(entry), ...pipe(entry.bins, Array.map(binPattern))], Array.flatMap((pattern) => Array.fromIterable(String$1.matchAll(pattern)(source))), Array.map((found) => problemAt$1(file, source)(found.index ?? NOT_FOUND, entry.name)))));
13578
- const ownerOf = (directories) => (name) => pipe(directories, Array.filter((directory) => directory === "" || String$1.startsWith(`${directory}${SEPARATOR$2}`)(name)), Array.match({
13578
+ const ownerOf$1 = (directories) => (name) => pipe(directories, Array.filter((directory) => directory === "" || String$1.startsWith(`${directory}${SEPARATOR$2}`)(name)), Array.match({
13579
13579
  onEmpty: () => "",
13580
13580
  onNonEmpty: Array.max(BY_LENGTH)
13581
13581
  }));
@@ -13598,7 +13598,7 @@ const manifestUses = Effect.fn("manifestUses")(function* manifestUses(root, appl
13598
13598
  }));
13599
13599
  });
13600
13600
  const sourceUses = Effect.fn("sourceUses")(function* sourceUses({ root, applied, directories, consumers }) {
13601
- const owner = ownerOf(directories);
13601
+ const owner = ownerOf$1(directories);
13602
13602
  const listed = yield* listedFiles(root);
13603
13603
  const sources = pipe(listed, Array.filter((entry) => isScannedSource(entry) && Array.contains(consumers, owner(entry.name))));
13604
13604
  return yield* scanText(sources, usesIn(applied));
@@ -13624,8 +13624,8 @@ const checkAppliedPackages = Effect.fn("checkAppliedPackages")(function* checkAp
13624
13624
  return yield* appliedPackageProblems(root, applied);
13625
13625
  });
13626
13626
  // src/features/find-unneeded-files/model/replaced-tools.ts
13627
- const RULE$5 = "replaced-tool";
13628
- const FIRST$1 = 1;
13627
+ const RULE$7 = "replaced-tool";
13628
+ const FIRST$3 = 1;
13629
13629
  const TASKS = "Vite+ tasks in run.tasks of vite.config.ts, run with `vp run`";
13630
13630
  const HOOKS = "the hooks in .vite-hooks/ that `vp config` installs";
13631
13631
  const ALCHEMY = "the Alchemy stack in alchemy.run.ts";
@@ -13703,9 +13703,9 @@ const REPLACED = [
13703
13703
  ];
13704
13704
  const problemFor = ({ name, file }) => pipe(REPLACED, Array.findFirst(({ pattern }) => pattern.test(name)), Option.map(({ tool, replacement }) => ({
13705
13705
  file,
13706
- line: FIRST$1,
13707
- column: FIRST$1,
13708
- rule: RULE$5,
13706
+ line: FIRST$3,
13707
+ column: FIRST$3,
13708
+ rule: RULE$7,
13709
13709
  message: `belongs to ${tool}, which this repository replaced with ${replacement}. Move what is still needed there and delete this file.`
13710
13710
  })));
13711
13711
  /** @internal */
@@ -13840,7 +13840,7 @@ const checkUnneededFiles = Effect.fn("checkUnneededFiles")(function* checkUnneed
13840
13840
  return yield* unneededIn(root, cargoEnabled(workspace.value));
13841
13841
  });
13842
13842
  // src/features/check-effect-diagnostics/model/effect-diagnostics.ts
13843
- const RULE$4 = "effect-diagnostics-once";
13843
+ const RULE$6 = "effect-diagnostics-once";
13844
13844
  const PLUGIN = "@effect/language-service";
13845
13845
  const CONFIG_PATHSPEC = ":(glob)**/tsconfig*.json";
13846
13846
  const EXCLUDED$3 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
@@ -13858,7 +13858,7 @@ const reportsDiagnostics = (plugin) => plugin.name === PLUGIN && plugin.diagnost
13858
13858
  const problemsIn$2 = (entry, source) => pipe(decodeConfig(source), Option.flatMap(({ compilerOptions }) => Option.fromUndefinedOr(compilerOptions)), Option.flatMap(({ plugins }) => Option.fromUndefinedOr(plugins)), Option.filter(Array.some(reportsDiagnostics)), Option.map(() => ({
13859
13859
  file: entry.file,
13860
13860
  ...positionOf(source)(pipe(String$1.indexOf(`"${PLUGIN}"`)(source), Option.getOrElse(() => START$4))),
13861
- rule: RULE$4,
13861
+ rule: RULE$6,
13862
13862
  message: MESSAGE$1
13863
13863
  })), Option.toArray);
13864
13864
  /** @internal */
@@ -13871,7 +13871,7 @@ const checkEffectDiagnostics = Effect.fn("checkEffectDiagnostics")(function* che
13871
13871
  }))), problemsIn$2);
13872
13872
  });
13873
13873
  // src/features/check-exact-versions/model/exact-versions.ts
13874
- const RULE$3 = "version-range";
13874
+ const RULE$5 = "version-range";
13875
13875
  const WORKSPACE_FILE = "pnpm-workspace.yaml";
13876
13876
  const ALIAS = /^npm:(?:@[^/@]+\/)?[^@]+@(?<version>.+)$/u;
13877
13877
  const PROTOCOL = /^[a-z+]+:/u;
@@ -13904,7 +13904,7 @@ const offsetIn = (source) => (pattern) => pipe(Option.fromNullishOr(pattern.exec
13904
13904
  const problemsFor = (file, source, pattern) => (found) => pipe(found, Array.filter(({ specifier }) => isRange(specifier)), Array.map((range) => ({
13905
13905
  file,
13906
13906
  ...positionOf(source)(offsetIn(source)(pattern(range))),
13907
- rule: RULE$3,
13907
+ rule: RULE$5,
13908
13908
  message: `\`${range.name}\` \`${range.specifier}\` ${MESSAGE}`
13909
13909
  })));
13910
13910
  const manifestPattern = ({ name, specifier }) => new RegExp(`"${quoted(name)}"\\s*:\\s*"${quoted(specifier)}"`, "u");
@@ -13934,7 +13934,7 @@ const checkExactVersions = Effect.fn("checkExactVersions")(function* checkExactV
13934
13934
  return [...fromManifests, ...fromCatalogs];
13935
13935
  });
13936
13936
  // src/features/check-package-scope/model/package-scope.ts
13937
- const RULE$2 = "package-scope";
13937
+ const RULE$4 = "package-scope";
13938
13938
  const SCOPE = "@r_masseater/";
13939
13939
  const NAME_KEY = "\"name\"";
13940
13940
  const START$2 = 0;
@@ -13950,7 +13950,7 @@ const unscopedName = (manifest) => pipe(Option.fromUndefinedOr(manifest.name), O
13950
13950
  const problemsIn$1 = (entry, source) => pipe(decodeManifest$2(source), Option.filter(isPublished$1), Option.flatMap(unscopedName), Option.map((name) => ({
13951
13951
  file: entry.file,
13952
13952
  ...positionOf(source)(pipe(String$1.indexOf(NAME_KEY)(source), Option.getOrElse(() => START$2))),
13953
- rule: RULE$2,
13953
+ rule: RULE$4,
13954
13954
  message: `Packages are published only under the ${SCOPE} scope. Rename "${name}" to "${SCOPE}${String$1.replace(/^@[^/]+\//u, "")(name)}".`
13955
13955
  })), Option.toArray);
13956
13956
  /** @internal */
@@ -13962,8 +13962,108 @@ const checkPackageScope = Effect.fn("checkPackageScope")(function* checkPackageS
13962
13962
  file: files.join(root, name)
13963
13963
  }))), problemsIn$1);
13964
13964
  });
13965
+ // src/features/check-plugin-marketplace/model/plugin-marketplace.ts
13966
+ const RULE$3 = "plugin-marketplace";
13967
+ const PLUGIN_DIRECTORY = ".claude-plugin";
13968
+ const PLUGIN_FILE = `${PLUGIN_DIRECTORY}/plugin.json`;
13969
+ const MARKETPLACE_FILE = `${PLUGIN_DIRECTORY}/marketplace.json`;
13970
+ const FIRST$2 = 1;
13971
+ const INDENT = 2;
13972
+ const OwnerSchema = Schema.Struct({
13973
+ name: Schema.String,
13974
+ url: Schema.optionalKey(Schema.String)
13975
+ });
13976
+ const Person = Schema.Union([Schema.String, OwnerSchema]);
13977
+ const RootManifest = Schema.fromJsonString(Schema.Struct({
13978
+ name: Schema.String,
13979
+ author: Schema.optionalKey(Person)
13980
+ }));
13981
+ const PluginManifest = Schema.fromJsonString(Schema.Struct({ name: Schema.String }));
13982
+ const NpmSource = Schema.Struct({
13983
+ source: Schema.Literal("npm"),
13984
+ package: Schema.String
13985
+ });
13986
+ const PluginSchema = Schema.Struct({
13987
+ name: Schema.String,
13988
+ source: Schema.Union([Schema.String, NpmSource]),
13989
+ description: Schema.String
13990
+ });
13991
+ const Marketplace = Schema.fromJsonString(Schema.Struct({
13992
+ name: Schema.String,
13993
+ owner: OwnerSchema,
13994
+ plugins: Schema.Array(PluginSchema)
13995
+ }), { space: INDENT });
13996
+ const decodeRoot = Schema.decodeUnknownOption(RootManifest);
13997
+ const decodePlugin = Schema.decodeUnknownOption(PluginManifest);
13998
+ const encodeMarketplace = Schema.encodeEffect(Marketplace);
13999
+ const marketplaceName = (packageName) => pipe(String$1.toLowerCase(packageName), String$1.replace(/^@/u, ""), String$1.replaceAll(/[^a-z0-9]+/gu, "-"), String$1.replaceAll(/^-+|-+$/gu, ""));
14000
+ const ownerOf = (author) => {
14001
+ if (Predicate.isString(author)) return { name: author };
14002
+ return author;
14003
+ };
14004
+ const sourceOf = (project) => pipe(project.packageName, Option.filter(() => project.published), Option.match({
14005
+ onNone: () => `./${project.directory}`,
14006
+ onSome: (name) => ({
14007
+ source: "npm",
14008
+ package: name
14009
+ })
14010
+ }));
14011
+ const pluginIn = Effect.fn("pluginIn")(function* pluginIn(root, project) {
14012
+ const files = yield* RepositoryFiles;
14013
+ const text = yield* files.readFile(files.join(root, project.directory, PLUGIN_FILE));
14014
+ return pipe(text, Option.flatMap(decodePlugin), Option.map(({ name }) => ({
14015
+ name,
14016
+ source: sourceOf(project),
14017
+ description: Option.getOrElse(project.description, () => "")
14018
+ })));
14019
+ });
14020
+ const problem = (file, message) => ({
14021
+ file,
14022
+ line: FIRST$2,
14023
+ column: FIRST$2,
14024
+ rule: RULE$3,
14025
+ message
14026
+ });
14027
+ const pluginsIn = Effect.fn("pluginsIn")(function* pluginsIn(root) {
14028
+ const projects = yield* workspaceProjects(root);
14029
+ const found = yield* Effect.forEach(projects, (project) => pluginIn(root, project), { concurrency: "unbounded" });
14030
+ return Array.getSomes(found);
14031
+ });
14032
+ const ownerIn = Effect.fn("ownerIn")(function* ownerIn(root) {
14033
+ const files = yield* RepositoryFiles;
14034
+ const text = yield* files.readFile(files.join(root, MANIFEST_FILE$3));
14035
+ return pipe(text, Option.flatMap(decodeRoot), Option.flatMap(({ name, author }) => pipe(Option.fromUndefinedOr(author), Option.map((found) => ({
14036
+ name: marketplaceName(name),
14037
+ owner: ownerOf(found)
14038
+ })))));
14039
+ });
14040
+ const rewrite = Effect.fn("rewrite")(function* rewrite(file, expected) {
14041
+ const files = yield* RepositoryFiles;
14042
+ const written = yield* files.readFile(file);
14043
+ if (Option.exists(written, (text) => text === expected)) return [];
14044
+ yield* files.writeFile(file, expected);
14045
+ return [problem(file, `${MARKETPLACE_FILE} is generated from the workspaces that have ${PLUGIN_FILE}. msch rewrote it; commit the result.`)];
14046
+ });
14047
+ const withoutPlugins = Effect.fn("withoutPlugins")(function* withoutPlugins(file) {
14048
+ if (!(yield* (yield* RepositoryFiles).exists(file))) return [];
14049
+ return [problem(file, `No workspace has ${PLUGIN_FILE}. Delete ${MARKETPLACE_FILE}.`)];
14050
+ });
14051
+ /** @internal */
14052
+ const checkPluginMarketplace = Effect.fn("checkPluginMarketplace")(function* checkPluginMarketplace(root) {
14053
+ const files = yield* RepositoryFiles;
14054
+ const file = files.join(root, MARKETPLACE_FILE);
14055
+ const plugins = yield* pluginsIn(root);
14056
+ if (!Array.isReadonlyArrayNonEmpty(plugins)) return yield* withoutPlugins(file);
14057
+ const header = yield* ownerIn(root);
14058
+ if (Option.isNone(header)) return [problem(files.join(root, MANIFEST_FILE$3), `Workspaces ship Claude Code plugins, so ${MARKETPLACE_FILE} lists them. Add "author" to the root ${MANIFEST_FILE$3}; it becomes the marketplace owner.`)];
14059
+ const text = yield* encodeMarketplace({
14060
+ ...header.value,
14061
+ plugins
14062
+ });
14063
+ return yield* rewrite(file, `${text}\n`);
14064
+ });
13965
14065
  // src/features/check-runtime-version/model/node-version.ts
13966
- const RULE$1 = "node-version";
14066
+ const RULE$2 = "node-version";
13967
14067
  const MINIMUM = 26;
13968
14068
  const SUPPORTED = `Node.js ${String(MINIMUM)} or later is the only supported runtime.`;
13969
14069
  const MANIFEST = /(?:^|\/)package\.json$/u;
@@ -13997,7 +14097,7 @@ const admitsOld = (range) => pipe(String$1.split(range, ALTERNATIVE), Array.some
13997
14097
  const problemAt = ({ entry, source, index }, message) => ({
13998
14098
  file: entry.file,
13999
14099
  ...positionOf(source)(index),
14000
- rule: RULE$1,
14100
+ rule: RULE$2,
14001
14101
  message
14002
14102
  });
14003
14103
  const offsetOf = (source, text) => pipe(String$1.indexOf(text)(source), Option.getOrElse(() => START$1));
@@ -14050,13 +14150,13 @@ const checkNodeVersion = Effect.fn("checkNodeVersion")(function* checkNodeVersio
14050
14150
  return yield* scanText(sources, problemsIn);
14051
14151
  });
14052
14152
  // src/features/check-unused-workspaces/model/unused-workspaces.ts
14053
- const RULE = "unused-workspace";
14153
+ const RULE$1 = "unused-workspace";
14054
14154
  const CARGO_FILE = "Cargo.toml";
14055
14155
  const ROOT_DIRECTORY = "";
14056
14156
  const TASK_SEPARATOR = "#";
14057
14157
  const SEPARATOR = "/";
14058
14158
  const START = 0;
14059
- const FIRST = 1;
14159
+ const FIRST$1 = 1;
14060
14160
  const READ_CONCURRENCY = 8;
14061
14161
  const LIBRARY_KINDS = [
14062
14162
  "lib",
@@ -14154,11 +14254,26 @@ const checkUnusedWorkspaces = Effect.fn("checkUnusedWorkspaces")(function* check
14154
14254
  ...tasks
14155
14255
  ];
14156
14256
  return pipe(members, Array.filter(({ library, entry }) => library && !entry), Array.filter((member) => !isDependedOn(links)(member)), Array.map(({ directory }) => ({
14257
+ file: files.join(root, directory, MANIFEST_FILE$3),
14258
+ line: FIRST$1,
14259
+ column: FIRST$1,
14260
+ rule: RULE$1,
14261
+ message: `${directory} is a private library, and no other workspace depends on it through package.json, a Cargo path dependency or a task. Delete it, or depend on it from the code that uses it.`
14262
+ })));
14263
+ });
14264
+ // src/features/check-workspace-descriptions/model/workspace-descriptions.ts
14265
+ const RULE = "workspace-description";
14266
+ const FIRST = 1;
14267
+ /** @internal */
14268
+ const checkWorkspaceDescriptions = Effect.fn("checkWorkspaceDescriptions")(function* checkWorkspaceDescriptions(root) {
14269
+ const files = yield* RepositoryFiles;
14270
+ const projects = yield* workspaceProjects(root);
14271
+ return pipe(projects, Array.filter(({ description }) => Option.isNone(description)), Array.map(({ directory }) => ({
14157
14272
  file: files.join(root, directory, MANIFEST_FILE$3),
14158
14273
  line: FIRST,
14159
14274
  column: FIRST,
14160
14275
  rule: RULE,
14161
- message: `${directory} is a private library, and no other workspace depends on it through package.json, a Cargo path dependency or a task. Delete it, or depend on it from the code that uses it.`
14276
+ message: "Add a one-line \"description\" that says what this workspace is for. Agents find existing tools by these descriptions, so a workspace without one is invisible to them."
14162
14277
  })));
14163
14278
  });
14164
14279
  // src/app/manifest-checks.ts
@@ -14171,7 +14286,9 @@ const checkManifests = Effect.fn("checkManifests")(function* checkManifests(root
14171
14286
  checkExactVersions(root),
14172
14287
  checkUpstreamExits(root),
14173
14288
  checkScatteredDeviations(root),
14174
- checkEffectDiagnostics(root)
14289
+ checkEffectDiagnostics(root),
14290
+ checkWorkspaceDescriptions(root),
14291
+ checkPluginMarketplace(root)
14175
14292
  ], { concurrency: "unbounded" });
14176
14293
  return Array.flatten(found);
14177
14294
  });