@r_masseater/msch 0.87.5 → 0.88.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/base-revision-C9RxuIMK.mjs +15 -0
  2. package/dist/base-revision-C9RxuIMK.mjs.map +1 -0
  3. package/dist/changed.mjs +2 -2
  4. package/dist/cli.mjs +298 -237
  5. package/dist/cli.mjs.map +1 -1
  6. package/dist/{credential-broker-jnmkwOXO.mjs → credential-broker-PkIpsaMh.mjs} +10 -9
  7. package/dist/credential-broker-PkIpsaMh.mjs.map +1 -0
  8. package/dist/exits.mjs +1 -1
  9. package/dist/{manifest-texts-l_XRxGlJ.mjs → manifest-texts-B69vIp7o.mjs} +3 -13
  10. package/dist/manifest-texts-B69vIp7o.mjs.map +1 -0
  11. package/dist/owner-settings-BAh-fFKg.mjs +122 -0
  12. package/dist/owner-settings-BAh-fFKg.mjs.map +1 -0
  13. package/dist/package-routes-DQmhjX07.mjs +82 -0
  14. package/dist/package-routes-DQmhjX07.mjs.map +1 -0
  15. package/dist/{package-versions-KlfuUwaI.mjs → package-versions-PMKDR-bJ.mjs} +3 -2
  16. package/dist/{package-versions-KlfuUwaI.mjs.map → package-versions-PMKDR-bJ.mjs.map} +1 -1
  17. package/dist/{pass-records-DPIg0O9z.mjs → pass-records-CBvMwfN3.mjs} +3 -3
  18. package/dist/{pass-records-DPIg0O9z.mjs.map → pass-records-CBvMwfN3.mjs.map} +1 -1
  19. package/dist/publish.mjs +50 -23
  20. package/dist/publish.mjs.map +1 -1
  21. package/dist/{published-CoG4Fl0J.mjs → published-B5LA4ZlS.mjs} +2 -2
  22. package/dist/{published-CoG4Fl0J.mjs.map → published-B5LA4ZlS.mjs.map} +1 -1
  23. package/dist/published.mjs +17 -17
  24. package/dist/published.mjs.map +1 -1
  25. package/dist/refs.mjs +4 -8
  26. package/dist/refs.mjs.map +1 -1
  27. package/dist/{registry-releases-E0PE3Wq-.mjs → registry-releases-CZfn2qwC.mjs} +4 -5
  28. package/dist/registry-releases-CZfn2qwC.mjs.map +1 -0
  29. package/dist/unbumped.mjs +1 -1
  30. package/dist/{upstream-exits-bWCzT6HQ.mjs → upstream-exits-CNhs9_g2.mjs} +5 -4
  31. package/dist/{upstream-exits-bWCzT6HQ.mjs.map → upstream-exits-CNhs9_g2.mjs.map} +1 -1
  32. package/dist/upstream.mjs +4 -3
  33. package/dist/upstream.mjs.map +1 -1
  34. package/dist/wake.mjs +11 -6
  35. package/dist/wake.mjs.map +1 -1
  36. package/dist/{dependencies-0FX_K_FN.mjs → workspace-projects-B-vCr6bx.mjs} +68 -60
  37. package/dist/workspace-projects-B-vCr6bx.mjs.map +1 -0
  38. package/dist/workspace-settings.mjs +2 -2
  39. package/package.json +1 -1
  40. package/skills/msch-publishing/SKILL.md +2 -0
  41. package/skills/msch-repository-config/SKILL.md +33 -0
  42. package/src/app/vite.d.ts +34 -0
  43. package/dist/credential-broker-jnmkwOXO.mjs.map +0 -1
  44. package/dist/dependencies-0FX_K_FN.mjs.map +0 -1
  45. package/dist/lookup-DjQU0W6q.mjs +0 -33
  46. package/dist/lookup-DjQU0W6q.mjs.map +0 -1
  47. package/dist/manifest-texts-l_XRxGlJ.mjs.map +0 -1
  48. package/dist/registry-releases-E0PE3Wq-.mjs.map +0 -1
package/dist/cli.mjs CHANGED
@@ -1,18 +1,20 @@
1
1
  #!/usr/bin/env node
2
- import { t as workspaceManifest } from "./workspace-manifest-BAVyPzbA.mjs";
3
- import { C as valueKey, S as schemaTypeOf, _ as formatValues, a as nearestManifestDirectory, b as literalValuesOf, c as listConfigFiles, d as withProject, f as declarationKey, g as finiteValuesOf, h as locationOf, i as installedPackages, l as mentions$1, m as isObjectType, n as keepOnly, o as projectInputs, p as describeLibraryType, r as recordsIn, t as contentKey, u as typeScriptCompiler, v as isSubsetOf, w as vocabularyOf, x as sameValues, y as literalUnionOf } from "./pass-records-DPIg0O9z.mjs";
2
+ import { C as valueKey, S as schemaTypeOf, _ as formatValues, a as nearestManifestDirectory, b as literalValuesOf, c as listConfigFiles, d as withProject, f as declarationKey, g as finiteValuesOf, h as locationOf, i as installedPackages, l as mentions$1, m as isObjectType, n as keepOnly, o as projectInputs, p as describeLibraryType, r as recordsIn, t as contentKey, u as typeScriptCompiler, v as isSubsetOf, w as vocabularyOf, x as sameValues, y as literalUnionOf } from "./pass-records-CBvMwfN3.mjs";
4
3
  import { n as NODE_MODULES, o as TOOL_NAME, r as RepositoryFiles, s as groupOf, t as MSCH_CACHE } from "./repository-files-B6PEvKWe.mjs";
5
- import { a as workspaceDeviations, c as tomlSourceComments, d as problemAtIndex, i as cargoDeviations, l as yamlSourceComments, o as collectNodes, r as WORKSPACE_SECTIONS, s as isRecord, t as checkUpstreamExits, u as positionOf } from "./upstream-exits-bWCzT6HQ.mjs";
4
+ import { t as workspaceManifest } from "./workspace-manifest-BAVyPzbA.mjs";
5
+ import { a as workspaceDeviations, c as tomlSourceComments, d as problemAtIndex, i as cargoDeviations, l as yamlSourceComments, o as collectNodes, r as WORKSPACE_SECTIONS, s as isRecord, t as checkUpstreamExits, u as positionOf } from "./upstream-exits-CNhs9_g2.mjs";
6
6
  import { a as parent, i as join, n as isInside, t as baseName } from "./path-DUttmo2s.mjs";
7
- import { a as unmatchedWorkspacePatterns, i as publishedProjects, n as readManifest, o as workspaceDirectories, s as workspaceProjects } from "./dependencies-0FX_K_FN.mjs";
8
- import { $ as isIdentifier, A as uniqueByReference, B as getTextOfJSDocComment, C as moduleSpecifierOf, E as referencedSymbols, F as SymbolFlags, G as isCallExpression, H as isArrowFunction, I as SyntaxKind, J as isEnumDeclaration, K as isClassDeclaration, L as getJSDocTags, O as symbolAt, P as SignatureKind, Q as isFunctionExpression, S as moduleSpecifierLiteralOf, St as isVariableStatement, T as propertyNamesOf, U as isBinaryExpression, V as isArrayLiteralExpression, W as isBlock, X as isExpressionStatement, Y as isExportDeclaration, Z as isFunctionDeclaration, _ as isGenericDeclaration, _t as isTypeLiteralNode, a as problemAtPosition, at as isNumericLiteral, b as isTypeDeclaration, bt as isVariableDeclaration, c as carriesTag, ct as isPropertyAccessExpression, d as contains, dt as isSatisfiesExpression, et as isImportDeclaration, f as declarationsOf, ft as isSignatureDeclaration, g as isExternalDeclaration, gt as isTypeAliasDeclaration, h as importedModulesOf, ht as isStringLiteral, i as problemAt$6, it as isNewExpression, k as symbolAtLocation, l as childrenOf$1, lt as isPropertyAssignment, m as descendantsOf, mt as isSpreadElement, nt as isModuleBlock, o as problemInFile, ot as isObjectLiteralExpression, p as declaresAType, pt as isSourceFile, q as isElementAccessExpression, rt as isModuleDeclaration, s as sortProblems, st as isParenthesizedExpression, t as ProblemList, tt as isInterfaceDeclaration, u as columnOf, ut as isReturnStatement, v as isInsideAny, vt as isTypeReferenceNode, w as packageOf$1, x as lineOf$3, xt as isVariableDeclarationList, y as isOutsideDeclaration, yt as isUnionTypeNode, z as getNameOfDeclaration } from "./problem-CUIz4TEI.mjs";
9
- import { A as keyName, D as workspaceConfigOf, M as nestedValues, N as propertyValue, O as KeySchema, P as stringsIn, _ as VERIFY_TASK, a as entryNameOf, d as deployEntries, g as RUN_TASKS, i as publishedWorkspaces, j as literalOf, k as childrenOf$2, l as workspaceLinks, o as isBinEntry, p as shadcnUiOf, r as packedWorkspaces, s as publicEntriesOf, u as bundledEntries, v as definesTask, y as hasVerifyTask } from "./published-CoG4Fl0J.mjs";
7
+ import { i as workspaceProjects, n as unmatchedWorkspacePatterns, o as installedManifest, r as workspaceDirectories, s as readManifest, t as publishedProjects } from "./workspace-projects-B-vCr6bx.mjs";
8
+ import { $ as isIdentifier, A as uniqueByReference, B as getTextOfJSDocComment, C as moduleSpecifierOf, E as referencedSymbols, F as SymbolFlags, G as isCallExpression, H as isArrowFunction, I as SyntaxKind, J as isEnumDeclaration, K as isClassDeclaration, L as getJSDocTags, O as symbolAt, P as SignatureKind, Q as isFunctionExpression, S as moduleSpecifierLiteralOf, St as isVariableStatement, T as propertyNamesOf, U as isBinaryExpression, V as isArrayLiteralExpression, W as isBlock, X as isExpressionStatement, Y as isExportDeclaration, Z as isFunctionDeclaration, _ as isGenericDeclaration, _t as isTypeLiteralNode, a as problemAtPosition, at as isNumericLiteral, b as isTypeDeclaration, bt as isVariableDeclaration, c as carriesTag, ct as isPropertyAccessExpression, d as contains, dt as isSatisfiesExpression, et as isImportDeclaration, f as declarationsOf, ft as isSignatureDeclaration, g as isExternalDeclaration, gt as isTypeAliasDeclaration, h as importedModulesOf, ht as isStringLiteral, i as problemAt$7, it as isNewExpression, k as symbolAtLocation, l as childrenOf$1, lt as isPropertyAssignment, m as descendantsOf, mt as isSpreadElement, nt as isModuleBlock, o as problemInFile, ot as isObjectLiteralExpression, p as declaresAType, pt as isSourceFile, q as isElementAccessExpression, rt as isModuleDeclaration, s as sortProblems, st as isParenthesizedExpression, t as ProblemList, tt as isInterfaceDeclaration, u as columnOf, ut as isReturnStatement, v as isInsideAny, vt as isTypeReferenceNode, w as packageOf$1, x as lineOf$3, xt as isVariableDeclarationList, y as isOutsideDeclaration, yt as isUnionTypeNode, z as getNameOfDeclaration } from "./problem-CUIz4TEI.mjs";
9
+ import { A as keyName, D as workspaceConfigOf, M as nestedValues, N as propertyValue, O as KeySchema, P as stringsIn, _ as VERIFY_TASK, a as entryNameOf, d as deployEntries, g as RUN_TASKS, i as publishedWorkspaces, j as literalOf, k as childrenOf$2, l as workspaceLinks, o as isBinEntry, p as shadcnUiOf, r as packedWorkspaces, s as publicEntriesOf, u as bundledEntries, v as definesTask, y as hasVerifyTask } from "./published-B5LA4ZlS.mjs";
10
10
  import { r as JAPANESE } from "./config-BBdsNPSO.mjs";
11
+ import { a as scopeOfName, i as ownerSettings, n as PUBLIC_REGISTRY, o as withTrailingSlash, r as isPublicRegistry, t as DEFAULT_SETTINGS } from "./owner-settings-BAh-fFKg.mjs";
11
12
  import { n as readTree, t as loadLanguage } from "./tree-sitter-BfzHNwTR.mjs";
12
- import { n as baseName$1, r as baseRevision, t as manifestTexts } from "./manifest-texts-l_XRxGlJ.mjs";
13
+ import { n as baseRevision, t as baseName$1 } from "./base-revision-C9RxuIMK.mjs";
13
14
  import { a as presentFiles, i as listedFiles, n as isScannedText, o as scanText, r as isToolVersions, t as upstreamRecords } from "./upstream-record-DlluH3fY.mjs";
14
15
  import { a as offsetIn$1, i as namedCatalogsOf, n as manifestPattern, o as quoted$1, r as manifestSpecifiers, s as specifiedIn, t as fieldsOf } from "./specifiers-BrCyPubD.mjs";
15
- import { t as checkPackageVersions } from "./package-versions-KlfuUwaI.mjs";
16
+ import { t as checkPackageVersions } from "./package-versions-PMKDR-bJ.mjs";
17
+ import { t as manifestTexts } from "./manifest-texts-B69vIp7o.mjs";
16
18
  import { i as writeProblems, n as failWhenAny, r as writeJsonProblems } from "./output-B_YPmKad.mjs";
17
19
  import { t as runCli } from "./runtime-C8OGDSk9.mjs";
18
20
  import "./cli-contract-D7btWrEu.mjs";
@@ -21,9 +23,10 @@ import { VpToolsError, findCiDrift, runVpa } from "@r_masseater/vite-plus-adopt"
21
23
  import { Array as Array$1, Boolean as Boolean$1, Context, Effect, FileSystem, HashMap, HashSet, Match, Metric, Number as Number$1, Option, Order, Path, Predicate, Record, Result, Schema, SchemaTransformation, Stdio, Stream, String as String$1, pipe } from "effect";
22
24
  import { lockedGraph, lockedPackageIds, parseDependencyPath, updateWorkspaceManifest } from "@r_masseater/masseater-utils/kestrion/pnpm";
23
25
  import { ChildProcess } from "effect/process";
24
- import { parse, resolveConfigFromFile } from "vite-plus";
25
26
  import { PACKAGE_JSON_FILE, RUNTIME_SECTIONS, binEntriesOf, namesIn, optionalPeerNames, runtimeDependencyNames, targetsIn } from "@r_masseater/masseater-utils/kestrion";
27
+ import { findPackageJson } from "@r_masseater/masseater-utils/kestrion/node";
26
28
  import { decodePackageJson } from "@r_masseater/masseater-utils/kestrion/npm";
29
+ import { parse, resolveConfigFromFile } from "vite-plus";
27
30
  import { fileURLToPath } from "node:url";
28
31
  import { getStaticTOMLValue, parseTOML } from "toml-eslint-parser";
29
32
  import { isMap, isPair, isScalar, isSeq, parse as parse$1, parseDocument, visit } from "yaml";
@@ -38,102 +41,6 @@ import { DomUtils, parseDocument as parseDocument$1 } from "htmlparser2";
38
41
  import { DockerfileParser } from "dockerfile-ast";
39
42
  import { parse as parse$2 } from "sql-parser-cst";
40
43
  import { findSkillFiles } from "@tanstack/intent";
41
- import { findPackageJson } from "@r_masseater/masseater-utils/kestrion/node";
42
- // src/entities/workspace/model/run-tasks.ts
43
- const TaskProperty = Schema.Struct({
44
- type: Schema.Literal("Property"),
45
- computed: Schema.Literal(false),
46
- key: KeySchema,
47
- value: Schema.Unknown,
48
- start: Schema.Finite
49
- });
50
- const TaskObject = Schema.Struct({
51
- type: Schema.Literal("ObjectExpression"),
52
- properties: Schema.Array(Schema.Unknown)
53
- });
54
- const decodeTaskProperty = Schema.decodeUnknownOption(TaskProperty);
55
- const decodeTaskObject = Schema.decodeUnknownOption(TaskObject);
56
- const tasksIn = (program) => pipe(nestedValues(RUN_TASKS)(program), Array$1.flatMap((tasks) => pipe(decodeTaskObject(tasks), Option.map(({ properties }) => properties), Option.getOrElse(() => []))), Array$1.flatMap((property) => Option.toArray(decodeTaskProperty(property))));
57
- const runTasksOf = Effect.fn("runTasksOf")(function* runTasksOf(root, directory) {
58
- const config = yield* workspaceConfigOf(root, directory);
59
- return pipe(config, Option.map(({ file, source, program }) => ({
60
- file,
61
- source,
62
- tasks: tasksIn(program)
63
- })));
64
- });
65
- // src/entities/workspace/model/workspace-names.ts
66
- const ALTERNATIVE$1 = "|";
67
- const SCOPE$3 = /^@[^/]+\//u;
68
- const SPECIAL$1 = /[$()*+.?[\\\]^{|}]/gu;
69
- /** @internal */
70
- const patternOf$1 = (names) => {
71
- const alternatives = pipe(names, Array$1.map(String$1.replaceAll(SPECIAL$1, String.raw`\$&`)));
72
- return new RegExp(`(?<![\\p{L}\\p{N}_-])(?:${Array$1.join(alternatives, ALTERNATIVE$1)})(?![\\p{L}\\p{N}_-])`, "gu");
73
- };
74
- const namedIn = (basename) => ({ directory, packageName }) => {
75
- const unscoped = pipe(packageName, Option.map(String$1.replace(SCOPE$3, "")));
76
- return {
77
- directory,
78
- names: pipe([
79
- Option.some(directory),
80
- Option.some(basename(directory)),
81
- packageName,
82
- unscoped
83
- ], Array$1.getSomes, Array$1.dedupe),
84
- packageName
85
- };
86
- };
87
- /** @internal */
88
- const namedWorkspaces = Effect.fn("namedWorkspaces")(function* namedWorkspaces(root) {
89
- const files = yield* RepositoryFiles;
90
- const projects = yield* workspaceProjects(root);
91
- return pipe(projects, Array$1.map(namedIn((directory) => files.basename(directory))));
92
- });
93
- // src/entities/workspace/model/cargo-crates.ts
94
- const SEPARATOR$22 = "/";
95
- const SUCCESS$1 = 0;
96
- const CrateTarget = Schema.Struct({ kind: Schema.Array(Schema.String) });
97
- const CrateDependency = Schema.Struct({ path: Schema.optional(Schema.String) });
98
- const CrateEntry = Schema.Struct({
99
- name: Schema.String,
100
- version: Schema.String,
101
- manifest_path: Schema.String,
102
- targets: Schema.Array(CrateTarget),
103
- dependencies: Schema.Array(CrateDependency)
104
- });
105
- const CrateList = Schema.fromJsonString(Schema.Struct({ packages: Schema.Array(CrateEntry) }));
106
- const decodeCrateList = Schema.decodeUnknownEffect(CrateList);
107
- const crateOf$1 = (crate) => ({
108
- name: crate.name,
109
- version: crate.version,
110
- manifest: crate.manifest_path,
111
- kinds: pipe(crate.targets, Array$1.flatMap(({ kind }) => kind), Array$1.dedupe),
112
- pathDependencies: pipe(crate.dependencies, Array$1.flatMap(({ path }) => Option.toArray(Option.fromUndefinedOr(path))))
113
- });
114
- /** @internal */
115
- const cratesIn = Effect.fn("cratesIn")(function* cratesIn(root) {
116
- const handle = yield* ChildProcess.make("cargo", [
117
- "metadata",
118
- "--no-deps",
119
- "--format-version",
120
- "1",
121
- "--offline"
122
- ], {
123
- cwd: root,
124
- extendEnv: true,
125
- stdin: "ignore"
126
- });
127
- const output = yield* handle.stdout.pipe(Stream.decodeText(), Stream.mkString);
128
- if ((yield* handle.exitCode) !== SUCCESS$1) return [];
129
- const list = yield* decodeCrateList(output);
130
- return pipe(list.packages, Array$1.map(crateOf$1));
131
- }, Effect.scoped);
132
- /** @internal */
133
- const owningWorkspace = (directories) => (directory) => {
134
- const owners = pipe(directories, Array$1.filter((workspace) => directory === workspace || String$1.startsWith(`${workspace}${SEPARATOR$22}`)(directory)));
135
- return Array$1.last(Array$1.sort(owners, String$1.Order));
136
- };
137
44
  // src/features/check-overrides/model/override-findings.ts
138
45
  const describeVersions = (versions) => Option.getOrElse(Option.liftPredicate(Array$1.join(versions, ","), (joined) => joined !== ""), () => "-");
139
46
  const describeChanges = (report) => {
@@ -229,6 +136,101 @@ const unlessPassed = Effect.fn("unlessPassed")(function* unlessPassed(root, inpu
229
136
  if (Array$1.isReadonlyArrayEmpty(problems)) yield* keepOnly(records, [key]);
230
137
  return problems;
231
138
  });
139
+ // src/entities/workspace/model/run-tasks.ts
140
+ const TaskProperty = Schema.Struct({
141
+ type: Schema.Literal("Property"),
142
+ computed: Schema.Literal(false),
143
+ key: KeySchema,
144
+ value: Schema.Unknown,
145
+ start: Schema.Finite
146
+ });
147
+ const TaskObject = Schema.Struct({
148
+ type: Schema.Literal("ObjectExpression"),
149
+ properties: Schema.Array(Schema.Unknown)
150
+ });
151
+ const decodeTaskProperty = Schema.decodeUnknownOption(TaskProperty);
152
+ const decodeTaskObject = Schema.decodeUnknownOption(TaskObject);
153
+ const tasksIn = (program) => pipe(nestedValues(RUN_TASKS)(program), Array$1.flatMap((tasks) => pipe(decodeTaskObject(tasks), Option.map(({ properties }) => properties), Option.getOrElse(() => []))), Array$1.flatMap((property) => Option.toArray(decodeTaskProperty(property))));
154
+ const runTasksOf = Effect.fn("runTasksOf")(function* runTasksOf(root, directory) {
155
+ const config = yield* workspaceConfigOf(root, directory);
156
+ return pipe(config, Option.map(({ file, source, program }) => ({
157
+ file,
158
+ source,
159
+ tasks: tasksIn(program)
160
+ })));
161
+ });
162
+ // src/entities/workspace/model/workspace-names.ts
163
+ const ALTERNATIVE$1 = "|";
164
+ const SCOPE$2 = /^@[^/]+\//u;
165
+ const SPECIAL$1 = /[$()*+.?[\\\]^{|}]/gu;
166
+ /** @internal */
167
+ const patternOf$1 = (names) => {
168
+ const alternatives = pipe(names, Array$1.map(String$1.replaceAll(SPECIAL$1, String.raw`\$&`)));
169
+ return new RegExp(`(?<![\\p{L}\\p{N}_-])(?:${Array$1.join(alternatives, ALTERNATIVE$1)})(?![\\p{L}\\p{N}_-])`, "gu");
170
+ };
171
+ const namedIn = (basename) => ({ directory, packageName }) => {
172
+ const unscoped = pipe(packageName, Option.map(String$1.replace(SCOPE$2, "")));
173
+ return {
174
+ directory,
175
+ names: pipe([
176
+ Option.some(directory),
177
+ Option.some(basename(directory)),
178
+ packageName,
179
+ unscoped
180
+ ], Array$1.getSomes, Array$1.dedupe),
181
+ packageName
182
+ };
183
+ };
184
+ /** @internal */
185
+ const namedWorkspaces = Effect.fn("namedWorkspaces")(function* namedWorkspaces(root) {
186
+ const files = yield* RepositoryFiles;
187
+ const projects = yield* workspaceProjects(root);
188
+ return pipe(projects, Array$1.map(namedIn((directory) => files.basename(directory))));
189
+ });
190
+ // src/entities/workspace/model/cargo-crates.ts
191
+ const SEPARATOR$22 = "/";
192
+ const SUCCESS$1 = 0;
193
+ const CrateTarget = Schema.Struct({ kind: Schema.Array(Schema.String) });
194
+ const CrateDependency = Schema.Struct({ path: Schema.optional(Schema.String) });
195
+ const CrateEntry = Schema.Struct({
196
+ name: Schema.String,
197
+ version: Schema.String,
198
+ manifest_path: Schema.String,
199
+ targets: Schema.Array(CrateTarget),
200
+ dependencies: Schema.Array(CrateDependency)
201
+ });
202
+ const CrateList = Schema.fromJsonString(Schema.Struct({ packages: Schema.Array(CrateEntry) }));
203
+ const decodeCrateList = Schema.decodeUnknownEffect(CrateList);
204
+ const crateOf$1 = (crate) => ({
205
+ name: crate.name,
206
+ version: crate.version,
207
+ manifest: crate.manifest_path,
208
+ kinds: pipe(crate.targets, Array$1.flatMap(({ kind }) => kind), Array$1.dedupe),
209
+ pathDependencies: pipe(crate.dependencies, Array$1.flatMap(({ path }) => Option.toArray(Option.fromUndefinedOr(path))))
210
+ });
211
+ /** @internal */
212
+ const cratesIn = Effect.fn("cratesIn")(function* cratesIn(root) {
213
+ const handle = yield* ChildProcess.make("cargo", [
214
+ "metadata",
215
+ "--no-deps",
216
+ "--format-version",
217
+ "1",
218
+ "--offline"
219
+ ], {
220
+ cwd: root,
221
+ extendEnv: true,
222
+ stdin: "ignore"
223
+ });
224
+ const output = yield* handle.stdout.pipe(Stream.decodeText(), Stream.mkString);
225
+ if ((yield* handle.exitCode) !== SUCCESS$1) return [];
226
+ const list = yield* decodeCrateList(output);
227
+ return pipe(list.packages, Array$1.map(crateOf$1));
228
+ }, Effect.scoped);
229
+ /** @internal */
230
+ const owningWorkspace = (directories) => (directory) => {
231
+ const owners = pipe(directories, Array$1.filter((workspace) => directory === workspace || String$1.startsWith(`${workspace}${SEPARATOR$22}`)(directory)));
232
+ return Array$1.last(Array$1.sort(owners, String$1.Order));
233
+ };
232
234
  // src/features/check-overrides/model/override-resolution.ts
233
235
  const VerdictSchema = Schema.Literals([
234
236
  "unused",
@@ -348,6 +350,10 @@ const BASELINE_PROBE = "msch-baseline-probe";
348
350
  const REMOVED_DEPENDENCY = "-";
349
351
  const QUOTES$1 = ["\"", "'"];
350
352
  const PREVIOUS = 1;
353
+ const workspaceOverrides = Effect.fn("workspaceOverrides")(function* workspaceOverrides(root) {
354
+ const manifest = yield* workspaceManifest(root);
355
+ return pipe(manifest, Option.flatMap((found) => Option.fromUndefinedOr(found.overrides)), Option.getOrElse(() => ({})));
356
+ });
351
357
  const keyStart = (source) => (index) => {
352
358
  const before = String$1.slice(index - PREVIOUS, index)(source);
353
359
  return index - Number(Array$1.contains(QUOTES$1, before)) * PREVIOUS;
@@ -365,10 +371,10 @@ const withBaselineProbe = (overrides) => ({
365
371
  [BASELINE_PROBE]: REMOVED_DEPENDENCY
366
372
  });
367
373
  // src/features/check-overrides/model/overrides.ts
368
- const WORKSPACE_FILE$6 = "pnpm-workspace.yaml";
374
+ const WORKSPACE_FILE$7 = "pnpm-workspace.yaml";
369
375
  const RESOLUTION_FILES = [
370
376
  "*package.json",
371
- WORKSPACE_FILE$6,
377
+ WORKSPACE_FILE$7,
372
378
  "pnpm-lock.yaml",
373
379
  ".npmrc",
374
380
  "patches/*"
@@ -467,7 +473,7 @@ const problemsFor$1 = Effect.fn("problemsFor")(function* problemsFor(workspace,
467
473
  const { root, overrides } = workspace;
468
474
  const baseline = yield* resolutionWith(workspace, BASELINE_PROBE, withBaselineProbe(overrides));
469
475
  const judgeAgainstBaseline = judge(baseline);
470
- const file = path.join(root, WORKSPACE_FILE$6);
476
+ const file = path.join(root, WORKSPACE_FILE$7);
471
477
  const problemOf = (located) => resolutionWith(workspace, located.key, withoutOverride(located.key)(overrides)).pipe(Effect.map((candidate) => overrideProblem({
472
478
  ...located,
473
479
  file
@@ -479,9 +485,8 @@ const problemsFor$1 = Effect.fn("problemsFor")(function* problemsFor(workspace,
479
485
  const checkOverrides = Effect.fn("checkOverrides")(function* checkOverrides(root) {
480
486
  const fs = yield* FileSystem.FileSystem;
481
487
  const path = yield* Path.Path;
482
- const source = yield* fs.readFileString(path.join(root, WORKSPACE_FILE$6)).pipe(Effect.option);
483
- const manifest = yield* workspaceManifest(root);
484
- const overrides = pipe(manifest, Option.flatMap((found) => Option.fromUndefinedOr(found.overrides)), Option.getOrElse(() => ({})));
488
+ const source = yield* fs.readFileString(path.join(root, WORKSPACE_FILE$7)).pipe(Effect.option);
489
+ const overrides = yield* workspaceOverrides(root);
485
490
  const keys = pipe(source, Option.map((text) => overrideKeysOf(text)(overrides)), Option.getOrElse(() => []));
486
491
  if (!Array$1.isReadonlyArrayNonEmpty(keys)) return [];
487
492
  const files = yield* trackedResolutionFiles(root);
@@ -494,15 +499,15 @@ const checkOverrides = Effect.fn("checkOverrides")(function* checkOverrides(root
494
499
  // src/features/check-overrides/model/git-subpath.ts
495
500
  const DEPENDENCY_FILE = /(?:^|\/)(?:package\.json|pnpm-workspace\.ya?ml)$/u;
496
501
  const GIT_SUBPATH = /(?<![^\s"':])[^\s"'#]+#(?:[^\s"'&]*&)*path:[^\s"']*/gu;
497
- const RULE$70 = "git-subpath-dependency";
502
+ const RULE$71 = "git-subpath-dependency";
498
503
  const WHOLE_MATCH$4 = 0;
499
- const problemAt$5 = ({ file }, source) => (found) => ({
504
+ const problemAt$6 = ({ file }, source) => (found) => ({
500
505
  file,
501
506
  ...positionOf(source)(found.index ?? WHOLE_MATCH$4),
502
- rule: RULE$70,
507
+ rule: RULE$71,
503
508
  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$4])}\`.`
504
509
  });
505
- const problemsIn$23 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(GIT_SUBPATH)(source)), Array$1.map(problemAt$5(entry, source)));
510
+ const problemsIn$23 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(GIT_SUBPATH)(source)), Array$1.map(problemAt$6(entry, source)));
506
511
  const isDependencyFile = ({ name }) => DEPENDENCY_FILE.test(name);
507
512
  /** @internal */
508
513
  const checkGitSubpath = Effect.fn("checkGitSubpath")(function* checkGitSubpath(root) {
@@ -510,13 +515,13 @@ const checkGitSubpath = Effect.fn("checkGitSubpath")(function* checkGitSubpath(r
510
515
  return yield* scanText(pipe(listed, Array$1.filter(isDependencyFile)), problemsIn$23);
511
516
  });
512
517
  // src/features/check-overrides/model/restricted-rules.ts
513
- const RULE$69 = "unnamed-restriction";
518
+ const RULE$70 = "unnamed-restriction";
514
519
  const WHOLE_MATCH$3 = 0;
515
520
  const UNNAMED = new RegExp(`(?:[\\w@-]+/)?no-restricted-(?:imports|properties)\\b`, "gu");
516
521
  const problemsIn$22 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(UNNAMED)(source)), Array$1.map((found) => ({
517
522
  file: entry.file,
518
523
  ...positionOf(source)(found.index ?? WHOLE_MATCH$3),
519
- rule: RULE$69,
524
+ rule: RULE$70,
520
525
  message: `${found[WHOLE_MATCH$3]} 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.`
521
526
  })));
522
527
  /** @internal */
@@ -525,13 +530,13 @@ const checkRestrictedRules = Effect.fn("checkRestrictedRules")(function* checkRe
525
530
  return yield* scanText(pipe(listed, Array$1.filter(isScannedText)), problemsIn$22);
526
531
  });
527
532
  // src/features/check-overrides/model/type-exemptions.ts
528
- const RULE$68 = "named-type-exemption";
533
+ const RULE$69 = "named-type-exemption";
529
534
  const WHOLE_MATCH$2 = 0;
530
535
  const SPECIFIER = new RegExp(`["']?\\bfrom["']?\\s*:\\s*["'](?:file|lib|package)["']`, "gu");
531
536
  const problemsIn$21 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(SPECIFIER)(source)), Array$1.map((found) => ({
532
537
  file: entry.file,
533
538
  ...positionOf(source)(found.index ?? WHOLE_MATCH$2),
534
- rule: RULE$68,
539
+ rule: RULE$69,
535
540
  message: "exempts a type from a lint rule by its name. Such a list is written by hand for every dependency and only grows. msch-lint/readonly-parameters reads where each type is declared and exempts the types of packages and of the language by itself, so remove the entry. For another rule, add a rule to msch-lint that reads the declaration."
536
541
  })));
537
542
  /** @internal */
@@ -540,51 +545,63 @@ const checkTypeExemptions = Effect.fn("checkTypeExemptions")(function* checkType
540
545
  return yield* scanText(pipe(listed, Array$1.filter(isScannedText)), problemsIn$21);
541
546
  });
542
547
  // src/features/check-overrides/model/package-registry.ts
543
- const RULE$67 = "package-registry";
544
- const REGISTRY = "https://npm.flatt.tech/";
545
- const TRAILING_SLASH = /\/$/u;
546
- const WORKSPACE_FILE$5 = "pnpm-workspace.yaml";
548
+ const RULE$68 = "package-registry";
549
+ const WORKSPACE_FILE$6 = "pnpm-workspace.yaml";
547
550
  const NPMRC = /(?:^|\/)\.npmrc$/u;
548
551
  const WORKSPACE_REGISTRY = /^registry:/mu;
549
552
  const NPMRC_REGISTRY = /^[ \t]*registry[ \t]*=[ \t]*(?<value>\S*)/gmu;
550
553
  const START$28 = 0;
551
- const REASON = `Installs go through Takumi Guard (${REGISTRY}), which blocks known-malicious packages before they are installed.`;
554
+ const reasonOf = (registry) => {
555
+ if (registry === DEFAULT_SETTINGS.installRegistry) return `Installs go through Takumi Guard (${registry}), which blocks known-malicious packages before they are installed.`;
556
+ return `Installs go through ${registry}, the registry msch.installs.registry in the root vite.config.ts names.`;
557
+ };
558
+ const requiredOf = (registry) => ({
559
+ registry,
560
+ reason: reasonOf(registry)
561
+ });
552
562
  const decodeRegistry = Schema.decodeUnknownOption(Schema.Struct({ registry: Schema.optional(Schema.String) }));
553
563
  const registryOf = (manifest) => pipe(decodeRegistry(manifest), Option.flatMap(({ registry }) => Option.fromUndefinedOr(registry)));
554
- const withoutSlash = String$1.replace(TRAILING_SLASH, "");
555
- const isGuarded = (registry) => withoutSlash(registry) === withoutSlash(REGISTRY);
564
+ const isRequired = ({ registry }) => (found) => withTrailingSlash(found) === registry;
556
565
  const offsetIn = (found) => pipe(Option.fromNullishOr(found), Option.map(({ index }) => index), Option.getOrElse(() => START$28));
557
- const workspaceProblem = (file, source, registry) => ({
566
+ const workspaceProblem = (required, { file, source }, registry) => ({
558
567
  file,
559
568
  ...positionOf(source)(offsetIn(WORKSPACE_REGISTRY.exec(source))),
560
- rule: RULE$67,
569
+ rule: RULE$68,
561
570
  message: Option.match(registry, {
562
- onNone: () => `${REASON} Set \`registry: ${REGISTRY}\` in ${WORKSPACE_FILE$5}.`,
563
- onSome: (value) => `${REASON} \`registry\` is ${value}. Set it to ${REGISTRY}.`
571
+ onNone: () => `${required.reason} Set \`registry: ${required.registry}\` in ${WORKSPACE_FILE$6}.`,
572
+ onSome: (value) => `${required.reason} \`registry\` is ${value}. Set it to ${required.registry}.`
564
573
  })
565
574
  });
566
- const npmrcProblems = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(NPMRC_REGISTRY)(source)), Array$1.filter((found) => !Option.exists(groupOf("value")(found), isGuarded)), Array$1.map((found) => ({
575
+ const npmrcProblems = (required) => (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(NPMRC_REGISTRY)(source)), Array$1.filter((found) => !Option.exists(groupOf("value")(found), isRequired(required))), Array$1.map((found) => ({
567
576
  file: entry.file,
568
577
  ...positionOf(source)(found.index ?? START$28),
569
- rule: RULE$67,
570
- message: `${REASON} This .npmrc overrides it with \`${String$1.trim(found[START$28])}\`. Remove the line.`
578
+ rule: RULE$68,
579
+ message: `${required.reason} This .npmrc overrides it with \`${String$1.trim(found[START$28])}\`. Remove the line.`
571
580
  })));
572
- const checkWorkspace = Effect.fn("checkWorkspace")(function* checkWorkspace(root) {
581
+ const checkWorkspace = Effect.fn("checkWorkspace")(function* checkWorkspace(root, required) {
573
582
  const files = yield* RepositoryFiles;
574
583
  const manifest = yield* workspaceManifest(root);
575
- if (Option.isNone(manifest) || Option.exists(registryOf(manifest.value), isGuarded)) return [];
576
- const registry = registryOf(manifest.value);
577
- const file = files.join(root, WORKSPACE_FILE$5);
584
+ const registry = pipe(manifest, Option.flatMap(registryOf));
585
+ const guarded = isRequired(required)(Option.getOrElse(registry, () => PUBLIC_REGISTRY));
586
+ if (Option.isNone(manifest) || guarded) return [];
587
+ const file = files.join(root, WORKSPACE_FILE$6);
578
588
  const read = yield* files.readFile(file);
579
589
  const source = Option.getOrElse(read, () => "");
580
- return [workspaceProblem(file, source, registry)];
590
+ return [workspaceProblem(required, {
591
+ file,
592
+ source
593
+ }, registry)];
581
594
  });
582
595
  /** @internal */
583
596
  const checkPackageRegistry = Effect.fn("checkPackageRegistry")(function* checkPackageRegistry(root) {
597
+ const { installRegistry } = yield* ownerSettings(root);
598
+ const required = requiredOf(installRegistry);
584
599
  const listed = yield* listedFiles(root);
585
- const overrides = yield* scanText(pipe(listed, Array$1.filter(({ name }) => NPMRC.test(name))), npmrcProblems);
586
- return [...yield* checkWorkspace(root), ...overrides];
600
+ const overrides = yield* scanText(pipe(listed, Array$1.filter(({ name }) => NPMRC.test(name))), npmrcProblems(required));
601
+ return [...yield* checkWorkspace(root, required), ...overrides];
587
602
  });
603
+ // src/entities/package/model/stack-catalog.ts
604
+ const STACK_CATALOG = "catalog:stack";
588
605
  // ../../node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js
589
606
  const balanced = (a, b, str) => {
590
607
  const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
@@ -2692,6 +2709,85 @@ const matcher = (patterns) => {
2692
2709
  };
2693
2710
  String$1.startsWith(NEGATION$2);
2694
2711
  String$1.slice(1);
2712
+ // src/entities/package/model/published-manifest.ts
2713
+ const EXCLUDED$8 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
2714
+ const isPublished$1 = (manifest) => manifest.private !== true && Predicate.isNotUndefined(manifest.publishConfig);
2715
+ const publishedManifestOf = (source) => pipe(source, Option.flatMap(decodePackageJson), Option.filter(isPublished$1));
2716
+ /** @internal */
2717
+ const scanPublishedManifests = Effect.fn("scanPublishedManifests")(function* scanPublishedManifests(root, problemsIn) {
2718
+ const files = yield* RepositoryFiles;
2719
+ const manifests = yield* files.matchingFiles(root, [`:(glob)**/${PACKAGE_JSON_FILE}`, ...EXCLUDED$8]);
2720
+ return yield* scanText(pipe(manifests, Array$1.map((name) => ({
2721
+ name,
2722
+ file: files.join(root, name)
2723
+ }))), (entry, source) => pipe(publishedManifestOf(Option.some(source)), Option.map((manifest) => problemsIn({
2724
+ entry,
2725
+ source,
2726
+ manifest
2727
+ })), Option.getOrElse(() => [])));
2728
+ });
2729
+ // src/features/check-overrides/model/removed-peers.ts
2730
+ const RULE$67 = "removed-peer";
2731
+ const MSCH$1 = "@r_masseater/msch";
2732
+ const WORKSPACE_FILE$5 = "pnpm-workspace.yaml";
2733
+ const REMOVED = "-";
2734
+ const PARENT_SEPARATOR = ">";
2735
+ const VERSION_SEPARATOR = "@";
2736
+ const SCOPED_START = 1;
2737
+ const packageNameOf$1 = (selector) => pipe(String$1.indexOf(VERSION_SEPARATOR)(String$1.slice(SCOPED_START)(selector)), Option.match({
2738
+ onNone: () => selector,
2739
+ onSome: (index) => String$1.takeLeft(selector, index + SCOPED_START)
2740
+ }));
2741
+ const removalOf = (key) => Array$1.matchRight(String$1.split(key, PARENT_SEPARATOR), {
2742
+ onEmpty: () => Option.none(),
2743
+ onNonEmpty: (parents, target) => Option.some({
2744
+ key,
2745
+ target: packageNameOf$1(target),
2746
+ parent: pipe(Array$1.last(parents), Option.map(packageNameOf$1))
2747
+ })
2748
+ });
2749
+ const removesPeer = ({ target, parent }) => ({ peer, dependent }) => peer === target && Option.match(parent, {
2750
+ onNone: () => true,
2751
+ onSome: (name) => name === dependent
2752
+ });
2753
+ const isRemoval = (value) => value === REMOVED;
2754
+ const problemAt$5 = (file, { key, line, column }) => ({ peer, dependent }) => ({
2755
+ file,
2756
+ line,
2757
+ column,
2758
+ rule: RULE$67,
2759
+ message: `msch runs ${dependent}, which needs ${peer} as a peer, so removing ${peer} with the override ${key} breaks msch. Remove the override.`
2760
+ });
2761
+ const removalsIn = (overrides) => pipe(overrides, Record.filter(isRemoval));
2762
+ const firstRemovedPeer = (peers) => (removal) => pipe(peers, Array$1.findFirst(removesPeer(removal)));
2763
+ const removedPeerProblems = (peers) => ({ file, source, overrides }) => pipe(overrideKeysOf(source)(removalsIn(overrides)), Array$1.flatMap((located) => pipe(removalOf(located.key), Option.flatMap(firstRemovedPeer(peers)), Option.map(problemAt$5(file, located)), Option.toArray)));
2764
+ const requiredPeersOf = (dependent, manifest) => pipe(Record.keys(manifest.peerDependencies ?? {}), Array$1.difference(optionalPeerNames(manifest)), Array$1.map((peer) => ({
2765
+ peer,
2766
+ dependent
2767
+ })));
2768
+ const mschPeers = Effect.fn("mschPeers")(function* mschPeers() {
2769
+ const files = yield* RepositoryFiles;
2770
+ const own = findPackageJson(MSCH$1, import.meta.url);
2771
+ if (Option.isNone(own)) return [];
2772
+ const manifest = yield* readManifest(files.dirname(own.value));
2773
+ const dependencies = pipe(manifest, Option.map(({ dependencies: held }) => Record.keys(held ?? {})), Option.getOrElse(() => []));
2774
+ const found = yield* Effect.forEach(dependencies, (dependency) => Effect.map(installedManifest(dependency, own.value), (installed) => pipe(installed, Option.map((held) => requiredPeersOf(dependency, held)), Option.getOrElse(() => []))), { concurrency: 1 });
2775
+ return Array$1.flatten(found);
2776
+ });
2777
+ /** @internal */
2778
+ const checkRemovedPeers = Effect.fn("checkRemovedPeers")(function* checkRemovedPeers(root) {
2779
+ const files = yield* RepositoryFiles;
2780
+ const overrides = yield* workspaceOverrides(root);
2781
+ if (!pipe(Record.values(overrides), Array$1.some(isRemoval))) return [];
2782
+ const file = files.join(root, WORKSPACE_FILE$5);
2783
+ const source = yield* files.readFile(file);
2784
+ const peers = yield* mschPeers();
2785
+ return removedPeerProblems(peers)({
2786
+ file,
2787
+ source: Option.getOrElse(source, () => ""),
2788
+ overrides
2789
+ });
2790
+ });
2695
2791
  // src/features/check-placement/model/colocated-git-patterns.ts
2696
2792
  const RULE$66 = "colocated-git-patterns";
2697
2793
  const PATTERN_FILES = [":(glob)**/.gitignore", ":(glob)**/.gitattributes"];
@@ -2802,25 +2898,6 @@ const checkColocatedGitPatterns = Effect.fn("checkColocatedGitPatterns")(functio
2802
2898
  const repeatedFound = pipe(entries, Array$1.map(repeated(entries)));
2803
2899
  return Array$1.getSomes([...misplacedFound, ...repeatedFound]);
2804
2900
  });
2805
- // src/entities/package/model/stack-catalog.ts
2806
- const STACK_CATALOG = "catalog:stack";
2807
- // src/entities/package/model/published-manifest.ts
2808
- const EXCLUDED$8 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
2809
- const isPublished$1 = (manifest) => manifest.private !== true && Predicate.isNotUndefined(manifest.publishConfig);
2810
- const publishedManifestOf = (source) => pipe(source, Option.flatMap(decodePackageJson), Option.filter(isPublished$1));
2811
- /** @internal */
2812
- const scanPublishedManifests = Effect.fn("scanPublishedManifests")(function* scanPublishedManifests(root, problemsIn) {
2813
- const files = yield* RepositoryFiles;
2814
- const manifests = yield* files.matchingFiles(root, [`:(glob)**/${PACKAGE_JSON_FILE}`, ...EXCLUDED$8]);
2815
- return yield* scanText(pipe(manifests, Array$1.map((name) => ({
2816
- name,
2817
- file: files.join(root, name)
2818
- }))), (entry, source) => pipe(publishedManifestOf(Option.some(source)), Option.map((manifest) => problemsIn({
2819
- entry,
2820
- source,
2821
- manifest
2822
- })), Option.getOrElse(() => [])));
2823
- });
2824
2901
  // src/features/check-placement/model/colocated-tests.ts
2825
2902
  const RULE$65 = "colocated-test";
2826
2903
  const FIRST$22 = 1;
@@ -3183,7 +3260,7 @@ const RULE$59 = "published-readme";
3183
3260
  const READ_CONCURRENCY$26 = 16;
3184
3261
  const MESSAGE$18 = "contains Japanese. This package is published to npm, so write its README in English.";
3185
3262
  const MISSING_MESSAGE = "is missing. This package is published to npm, so give it an English README.md.";
3186
- const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory }) {
3263
+ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, english, { directory }) {
3187
3264
  const readme = yield* readReadme({
3188
3265
  root,
3189
3266
  directory,
@@ -3192,7 +3269,7 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3192
3269
  });
3193
3270
  return Result.match(readme, {
3194
3271
  onFailure: Option.some,
3195
- onSuccess: ({ file, source }) => pipe(Option.fromNullishOr(JAPANESE.exec(source)), Option.map((found) => {
3272
+ onSuccess: ({ file, source }) => pipe(Option.fromNullishOr(JAPANESE.exec(source)), Option.filter(() => english), Option.map((found) => {
3196
3273
  const { line, column } = positionOf(source)(found.index);
3197
3274
  return {
3198
3275
  file,
@@ -3207,7 +3284,9 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3207
3284
  /** @internal */
3208
3285
  const checkPublishedReadme = Effect.fn("checkPublishedReadme")(function* checkPublishedReadme(root) {
3209
3286
  const projects = yield* publishedProjects(root);
3210
- const found = yield* Effect.forEach(projects, (project) => problemIn$5(root, project), { concurrency: READ_CONCURRENCY$26 });
3287
+ const { publishRegistry } = yield* ownerSettings(root);
3288
+ const english = isPublicRegistry(publishRegistry);
3289
+ const found = yield* Effect.forEach(projects, (project) => problemIn$5(root, english, project), { concurrency: READ_CONCURRENCY$26 });
3211
3290
  return Array$1.getSomes(found);
3212
3291
  });
3213
3292
  // src/features/check-placement/model/published-tests.ts
@@ -3264,7 +3343,7 @@ const ROOT_DOC = /^(?:README(?:\.[^/]+)?|AGENTS\.md|CLAUDE\.md)$/iu;
3264
3343
  const READ_CONCURRENCY$25 = 16;
3265
3344
  const START$27 = 0;
3266
3345
  const CHECK_POLICY = "@r_masseater/msch";
3267
- const MARKETPLACE$1 = ".claude-plugin/marketplace.json";
3346
+ const MARKETPLACE = ".claude-plugin/marketplace.json";
3268
3347
  const RELATIVE$2 = /^\.\//u;
3269
3348
  const MarketplacePlugin = Schema.Struct({
3270
3349
  name: Schema.optional(Schema.String),
@@ -3287,7 +3366,7 @@ const pluginsOf = (plugins) => {
3287
3366
  };
3288
3367
  const marketplacePlugins = Effect.fn("marketplacePlugins")(function* marketplacePlugins(root) {
3289
3368
  const files = yield* RepositoryFiles;
3290
- const text = yield* files.readFile(files.join(root, MARKETPLACE$1));
3369
+ const text = yield* files.readFile(files.join(root, MARKETPLACE));
3291
3370
  return pipe(text, Option.flatMap(Schema.decodeOption(Marketplace$1)), Option.map(({ plugins }) => pluginsOf(plugins)), Option.getOrElse(() => NO_PLUGINS));
3292
3371
  });
3293
3372
  const isPluginName = (plugins) => (name) => Array$1.contains(plugins.names, name);
@@ -11961,7 +12040,7 @@ const NEXT$3 = 1;
11961
12040
  const WORD_SEPARATOR$1 = "-";
11962
12041
  const MINIMUM_WORDS = 2;
11963
12042
  const FEATURES$1 = "src/features/";
11964
- const SOURCE$1 = "src/";
12043
+ const SOURCE = "src/";
11965
12044
  const SEGMENTS = /* @__PURE__ */ new Set([
11966
12045
  "ui",
11967
12046
  "model",
@@ -11993,7 +12072,7 @@ const SLICE_DEPTHS = [3, 4];
11993
12072
  const pathPrefix = (parts, depth) => Array$1.join(Array$1.take(parts, depth), SEPARATOR$16);
11994
12073
  const isInSliceLayer = (parts) => {
11995
12074
  const [source, layer] = parts;
11996
- return `${source}${SEPARATOR$16}` === SOURCE$1 && Array$1.contains(SLICE_LAYERS, layer ?? "");
12075
+ return `${source}${SEPARATOR$16}` === SOURCE && Array$1.contains(SLICE_LAYERS, layer ?? "");
11997
12076
  };
11998
12077
  const indexedSlice = (owned) => {
11999
12078
  const parts = String$1.split(owned.inner, SEPARATOR$16);
@@ -12007,7 +12086,7 @@ const misnamedSegment = (slices) => ({ workspace, inner }) => {
12007
12086
  return pipe(SLICE_DEPTHS, Array$1.findFirst(insideSlice), Option.filter(isSegmentFolder), Option.map((depth) => `${workspace}${SEPARATOR$16}${pathPrefix(parts, depth + NEXT$3)}`));
12008
12087
  };
12009
12088
  const deployNamed = ({ workspace, inner }) => {
12010
- if (!String$1.startsWith(SOURCE$1)(inner)) return Option.none();
12089
+ if (!String$1.startsWith(SOURCE)(inner)) return Option.none();
12011
12090
  const segments = String$1.split(inner, SEPARATOR$16);
12012
12091
  return pipe(Array$1.findFirstIndex(segments, (segment) => DEPLOY_MARKER.test(segment)), Option.map((index) => `${workspace}${SEPARATOR$16}${Array$1.join(Array$1.take(segments, index + NEXT$3), SEPARATOR$16)}`));
12013
12092
  };
@@ -13114,12 +13193,12 @@ const checkWorkspaces = Effect.fn("checkWorkspaces")(function* checkWorkspaces(r
13114
13193
  return Array$1.flatten(found);
13115
13194
  });
13116
13195
  // src/shared/lib/package-name.ts
13117
- const SCOPE$2 = "@";
13196
+ const SCOPE$1 = "@";
13118
13197
  const SEPARATOR$7 = "/";
13119
13198
  const SCOPED_SEGMENTS = 2;
13120
13199
  const PLAIN_SEGMENTS = 1;
13121
13200
  const segmentCount = (specifier) => {
13122
- if (String$1.startsWith(SCOPE$2)(specifier)) return SCOPED_SEGMENTS;
13201
+ if (String$1.startsWith(SCOPE$1)(specifier)) return SCOPED_SEGMENTS;
13123
13202
  return PLAIN_SEGMENTS;
13124
13203
  };
13125
13204
  const packageNameOf = (specifier) => pipe(String$1.split(specifier, SEPARATOR$7), Array$1.take(segmentCount(specifier)), Array$1.join(SEPARATOR$7));
@@ -13686,7 +13765,7 @@ const messageOf$3 = (statement) => {
13686
13765
  };
13687
13766
  const problemsIn$13 = (api) => (file) => (source) => {
13688
13767
  const retained = api.createSourceFile(file, source);
13689
- const problems = pipe(retained.sourceFile.statements, Array$1.fromIterable, Array$1.filter(isEffect), Array$1.map((statement) => problemAt$6({
13768
+ const problems = pipe(retained.sourceFile.statements, Array$1.fromIterable, Array$1.filter(isEffect), Array$1.map((statement) => problemAt$7({
13690
13769
  rule: RULE$40,
13691
13770
  message: messageOf$3(statement)
13692
13771
  })(statement)));
@@ -14111,7 +14190,7 @@ const ownerValuesOf = (checker) => (declaration) => {
14111
14190
  const type = checker.getTypeAtLocation(declaration.name);
14112
14191
  return finiteValuesOf(checker)(type).pipe(Option.orElse(() => objectValuesOf(checker)(type)));
14113
14192
  };
14114
- const annotationProblem = (message) => problemAt$6({
14193
+ const annotationProblem = (message) => problemAt$7({
14115
14194
  rule: "owner-annotation",
14116
14195
  message
14117
14196
  });
@@ -14247,7 +14326,7 @@ const shapeProblem = (site, matches) => {
14247
14326
  onNone: () => "Derive it from the library type, for example with Pick, instead of copying its properties.",
14248
14327
  onSome: () => "Use the library type instead of copying it."
14249
14328
  });
14250
- return problemAt$6({
14329
+ return problemAt$7({
14251
14330
  rule: "library-shape",
14252
14331
  message: `This shape copies ${shown}. ${advice}`
14253
14332
  })(site.node);
@@ -14348,7 +14427,7 @@ const derivedVerdict = (context) => (site) => {
14348
14427
  const added = pipe(site.values, Array$1.filter((value) => !isSubsetOf([value], held)));
14349
14428
  if (!Array$1.isReadonlyArrayNonEmpty(owners) || !Array$1.isReadonlyArrayNonEmpty(added)) return verdict([], []);
14350
14429
  const message = `This set adds ${formatValues(added)} to ${describeOwners(owners)}. Add the values to the owner, or register the wider set as its own concept.`;
14351
- return verdict([problemAt$6({
14430
+ return verdict([problemAt$7({
14352
14431
  rule: "owner-extension",
14353
14432
  message
14354
14433
  })(site.node)], []);
@@ -14370,7 +14449,7 @@ const originalVerdict = (context) => (site) => {
14370
14449
  const owners = pipe(context.owners, Array$1.filter((owner) => isSubsetOf(site.values, owner.values)));
14371
14450
  if (Array$1.isReadonlyArrayNonEmpty(owners)) {
14372
14451
  const message = `The values ${formatValues(site.values)} are owned by ${describeOwners(owners)}. Derive this set from the owner instead of restating it.`;
14373
- return verdict([problemAt$6({
14452
+ return verdict([problemAt$7({
14374
14453
  rule: "owner-value-set",
14375
14454
  message
14376
14455
  })(site.node)], []);
@@ -14378,7 +14457,7 @@ const originalVerdict = (context) => (site) => {
14378
14457
  const candidates = libraryCandidates(context)(site);
14379
14458
  if (Array$1.isReadonlyArrayNonEmpty(candidates)) {
14380
14459
  const message = `The values ${formatValues(site.values)} restate a dependency type: ${listCandidates(candidates)}. Derive this set from the library type.`;
14381
- return verdict([problemAt$6({
14460
+ return verdict([problemAt$7({
14382
14461
  rule: "library-value-set",
14383
14462
  message
14384
14463
  })(site.node)], []);
@@ -14409,7 +14488,7 @@ const isValuePosition = (node) => {
14409
14488
  const { parent } = node;
14410
14489
  return VALUE_PARENT_KINDS.has(parent.kind) || pipe(VALUE_SLOTS, Array$1.some((isSlot) => isSlot(node, parent)));
14411
14490
  };
14412
- const ownedLiteralProblem = (context) => (literal) => Option.fromUndefinedOr(context.checker.getContextualType(literal)).pipe(Option.filter((contextual) => vocabularyOf(context.checker)(contextual).pipe(Option.exists((vocabulary) => !vocabulary.admitsUnnamedValues))), Option.map(() => pipe(contextSymbolsOf(context.checker)(literal), Array$1.flatMap((symbol) => ownersBehind(context)(symbol, [])), uniqueByReference, Array$1.filter((owner) => isSubsetOf([literal.text], pipe(owner.values, Array$1.map(String)))))), Option.filter((owners) => Array$1.isReadonlyArrayNonEmpty(owners)), Option.map((owners) => problemAt$6({
14491
+ const ownedLiteralProblem = (context) => (literal) => Option.fromUndefinedOr(context.checker.getContextualType(literal)).pipe(Option.filter((contextual) => vocabularyOf(context.checker)(contextual).pipe(Option.exists((vocabulary) => !vocabulary.admitsUnnamedValues))), Option.map(() => pipe(contextSymbolsOf(context.checker)(literal), Array$1.flatMap((symbol) => ownersBehind(context)(symbol, [])), uniqueByReference, Array$1.filter((owner) => isSubsetOf([literal.text], pipe(owner.values, Array$1.map(String)))))), Option.filter((owners) => Array$1.isReadonlyArrayNonEmpty(owners)), Option.map((owners) => problemAt$7({
14413
14492
  rule: "owned-literal",
14414
14493
  message: `${literal.getText()} is a value of ${describeOwners(owners)}. Write it through the owner's binding instead of as a literal.`
14415
14494
  })(literal)));
@@ -14844,7 +14923,7 @@ const destructuredName = (declaration) => {
14844
14923
  if (declaration.name.kind !== SyntaxKind.ObjectBindingPattern) return Option.none();
14845
14924
  return pipe(Option.fromUndefinedOr(declaration.initializer), Option.filter(isIdentifier), Option.map((initializer) => initializer.text));
14846
14925
  };
14847
- const problemOf$5 = (names) => (declaration) => pipe(destructuredName(declaration), Option.filter((name) => names.includes(name)), Option.map((name) => problemAt$6({
14926
+ const problemOf$5 = (names) => (declaration) => pipe(destructuredName(declaration), Option.filter((name) => names.includes(name)), Option.map((name) => problemAt$7({
14848
14927
  rule: RULE$36,
14849
14928
  message: messageOf$1(name)
14850
14929
  })), Option.map((report) => report(declaration)));
@@ -14949,7 +15028,7 @@ const isPassThrough = (checker) => (candidate) => (forward) => {
14949
15028
  };
14950
15029
  const problemOf$4 = (checker) => (candidate) => {
14951
15030
  if (changesTheCall(candidate.wrapper)) return Option.none();
14952
- return pipe(returnedExpression(candidate.wrapper), Option.flatMap(forwardOf), Option.filter(isPassThrough(checker)(candidate)), Option.map((forward) => problemAt$6({
15031
+ return pipe(returnedExpression(candidate.wrapper), Option.flatMap(forwardOf), Option.filter(isPassThrough(checker)(candidate)), Option.map((forward) => problemAt$7({
14953
15032
  rule: RULE$35,
14954
15033
  message: messageOf(forward.callee.getText())
14955
15034
  })(candidate.name)));
@@ -14958,23 +15037,6 @@ const passThroughWrappersIn = (checker) => (sourceFile) => pipe(descendantsOf(so
14958
15037
  // src/app/source-checks.ts
14959
15038
  /** @internal */
14960
15039
  const checkSources = (root) => checkRepository(root, [passThroughWrappersIn, namespaceDestructuringIn]);
14961
- // src/shared/config/masseater-marketplace.json
14962
- var name = "masseater-dev";
14963
- var plugins = [{
14964
- "name": "kogane",
14965
- "source": {
14966
- "source": "npm",
14967
- "package": "@r_masseater/kogane"
14968
- },
14969
- "description": "Claude Code plugin that suggests existing workspaces of the current pnpm monorepo for each prompt, ranked with EmbeddingGemma 2 on the user's machine."
14970
- }, {
14971
- "name": "watashi",
14972
- "source": {
14973
- "source": "npm",
14974
- "package": "@r_masseater/watashi"
14975
- },
14976
- "description": "CLI for watashi (watashi.masseater.dev). Sends Claude Code transcripts from a Stop hook after masking secrets locally with h56m, and manages login and API tokens."
14977
- }];
14978
15040
  // src/features/check-agent-settings/model/known-plugins.ts
14979
15041
  const RULE$34 = "known-plugins";
14980
15042
  const SETTINGS_FILE$2 = ".claude/settings.json";
@@ -14991,28 +15053,26 @@ const SettingsSchema$1 = Schema.Struct({
14991
15053
  enabledPlugins: Schema.optionalKey(Plugins$1)
14992
15054
  });
14993
15055
  const decodeSettings$1 = Schema.decodeUnknownOption(Schema.fromJsonString(SettingsSchema$1));
14994
- const REPOSITORY_NAME = "masseater/masseater.dev";
14995
- const MARKETPLACE = name;
14996
- const PLUGINS = pipe(plugins, Array$1.map(({ name }) => `${name}@${MARKETPLACE}`));
14997
15056
  const problem$1 = problemInFile(RULE$34);
14998
- const fromGithub = ({ source }) => source.source === GITHUB$2 && source.repo === REPOSITORY_NAME;
14999
- const marketplaceKnown = (settings) => pipe(Option.fromUndefinedOr(settings.extraKnownMarketplaces), Option.flatMap(Record.get(MARKETPLACE)), Option.exists(fromGithub));
15057
+ const fromGithub = (repository) => ({ source }) => source.source === GITHUB$2 && source.repo === repository;
15058
+ const marketplaceKnown = (marketplace, settings) => pipe(Option.fromUndefinedOr(settings.extraKnownMarketplaces), Option.flatMap(Record.get(marketplace.name)), Option.exists(fromGithub(marketplace.repository)));
15000
15059
  const pluginEnabled = (settings) => (plugin) => pipe(Option.fromUndefinedOr(settings.enabledPlugins), Option.flatMap(Record.get(plugin)), Option.getOrElse(() => false));
15001
- const marketplaceProblems = (file, settings) => {
15002
- if (marketplaceKnown(settings)) return [];
15003
- return [problem$1(file, `Agents miss masseater's own tools when the ${MARKETPLACE} marketplace is not known. Add "extraKnownMarketplaces": { "${MARKETPLACE}": { "source": { "source": "${GITHUB$2}", "repo": "${REPOSITORY_NAME}" } } }.`)];
15060
+ const marketplaceProblems = (marketplace, file, settings) => {
15061
+ if (marketplaceKnown(marketplace, settings)) return [];
15062
+ return [problem$1(file, `Agents miss the owner's own tools when the ${marketplace.name} marketplace is not known. Add "extraKnownMarketplaces": { "${marketplace.name}": { "source": { "source": "${GITHUB$2}", "repo": "${marketplace.repository}" } } }.`)];
15004
15063
  };
15005
- const pluginProblems = (file, settings) => {
15064
+ const pluginProblems = (marketplace, file, settings) => {
15006
15065
  const enabled = pluginEnabled(settings);
15007
- return pipe(PLUGINS, Array$1.filter((plugin) => !enabled(plugin)), Array$1.map((plugin) => problem$1(file, `Enable "${plugin}" in "enabledPlugins" so every session gets it.`)));
15066
+ return pipe(marketplace.plugins, Array$1.map((name) => `${name}@${marketplace.name}`), Array$1.filter((plugin) => !enabled(plugin)), Array$1.map((plugin) => problem$1(file, `Enable "${plugin}" in "enabledPlugins" so every session gets it.`)));
15008
15067
  };
15009
15068
  /** @internal */
15010
15069
  const checkKnownPlugins = Effect.fn("checkKnownPlugins")(function* checkKnownPlugins(root) {
15011
15070
  const files = yield* RepositoryFiles;
15071
+ const { marketplace } = yield* ownerSettings(root);
15012
15072
  const file = files.join(root, SETTINGS_FILE$2);
15013
15073
  const text = yield* files.readFile(file);
15014
15074
  const settings = pipe(text, Option.flatMap(decodeSettings$1), Option.getOrElse(() => ({})));
15015
- return [...marketplaceProblems(file, settings), ...pluginProblems(file, settings)];
15075
+ return [...marketplaceProblems(marketplace, file, settings), ...pluginProblems(marketplace, file, settings)];
15016
15076
  });
15017
15077
  // src/features/check-agent-settings/model/missing-hooks.ts
15018
15078
  const RULE$33 = "missing-hook";
@@ -16349,7 +16409,6 @@ const ENTRY_RULE = "unlocked-skill";
16349
16409
  const VISIBLE_RULE = "skill-source-visible";
16350
16410
  const CONFIG_FILE$1 = "vite.config.ts";
16351
16411
  const RENOVATE_FILE$1 = "renovate.json";
16352
- const SOURCE = "masseater/skills";
16353
16412
  const PRESET$1 = "github>masseater/ecosystems//libs/vite-plus-adopt/renovate";
16354
16413
  const START$13 = 0;
16355
16414
  const LOCAL_PREFIX = "./";
@@ -16383,11 +16442,13 @@ const declaredSkills = Effect.fn("declaredSkills")(function* declaredSkills(root
16383
16442
  sources: skills
16384
16443
  })));
16385
16444
  });
16386
- const entryProblems = ({ file, text, sources }) => {
16445
+ const entryProblems = (required, { file, text, sources }) => {
16446
+ if (required === "marketplace") return [];
16387
16447
  const at = problemAt$3(ENTRY_RULE, file, text);
16388
- return pipe(Record.get(sources, SOURCE), Option.match({
16389
- onNone: () => [at("skills", `does not install ${SOURCE}. Add "${SOURCE}": { commit, root: "plugins/masseater-skills/skills", skills: "all" } to skills.`)],
16390
- onSome: (source) => pipe(Option.liftPredicate(source, ({ skills }) => skills !== "all"), Option.map(() => at(`"${SOURCE}"`, `picks skills from ${SOURCE} by name. Write skills: "all", so every repository gets each new skill with the next digest update.`)), Option.toArray)
16448
+ const { repository: source, root } = required;
16449
+ return pipe(Record.get(sources, source), Option.match({
16450
+ onNone: () => [at("skills", `does not install ${source}. Add "${source}": { commit, root: "${root}", skills: "all" } to skills.`)],
16451
+ onSome: (found) => pipe(Option.liftPredicate(found, ({ skills }) => skills !== "all"), Option.map(() => at(`"${source}"`, `picks skills from ${source} by name. Write skills: "all", so every repository gets each new skill with the next digest update.`)), Option.toArray)
16391
16452
  }));
16392
16453
  };
16393
16454
  const literalPattern = (repository, commit) => new RegExp(`"${String$1.replaceAll(REGEX_SPECIAL, String.raw`\$&`)(repository)}": \\{\\s*commit: "${commit}"`, "u");
@@ -16404,8 +16465,9 @@ const checkSkillEntry = Effect.fn("checkSkillEntry")(function* checkSkillEntry(r
16404
16465
  const declared = yield* declaredSkills(root);
16405
16466
  if (Option.isNone(declared)) return [];
16406
16467
  const preset = yield* presetProblems(root);
16468
+ const { skills } = yield* ownerSettings(root);
16407
16469
  return [
16408
- ...entryProblems(declared.value),
16470
+ ...entryProblems(skills, declared.value),
16409
16471
  ...visibleProblems(declared.value),
16410
16472
  ...preset
16411
16473
  ];
@@ -16729,14 +16791,14 @@ const checkRenovateSettings = Effect.fn("checkRenovateSettings")(function* check
16729
16791
  });
16730
16792
  // src/features/find-unneeded-files/model/applied-packages.ts
16731
16793
  const MSCH = "@r_masseater/msch";
16732
- const SCOPE$1 = "@r_masseater/";
16733
- const LIBRARIES = ["@r_masseater/masseater-utils"];
16794
+ const SCOPE = Option.getOrElse(scopeOfName(MSCH), () => MSCH);
16795
+ const PLUGIN_KEYWORDS = ["oxlint-plugin", "textlint-rule"];
16734
16796
  const RULE$14 = "applied-package";
16735
16797
  const WORKSPACE_FILE$2 = "pnpm-workspace.yaml";
16736
16798
  const NOT_FOUND = -1;
16737
16799
  const SEPARATOR$1 = "/";
16738
16800
  /** @internal */
16739
- const isApplied = (name) => String$1.startsWith(SCOPE$1)(name) && !Array$1.contains(LIBRARIES, name);
16801
+ const isApplied = ({ bins, keywords }) => Array$1.isReadonlyArrayNonEmpty(bins) || pipe(keywords, Array$1.some((keyword) => Array$1.contains(PLUGIN_KEYWORDS, keyword)));
16740
16802
  const BY_LENGTH = Order.mapInput(Order.Number, (text) => text.length);
16741
16803
  const escaped = (text) => String$1.replaceAll(/[.*+?^${}()|[\]\\]/gu, String.raw`\$&`)(text);
16742
16804
  const declaredNames = (manifest) => namesIn(manifest, [
@@ -16744,27 +16806,25 @@ const declaredNames = (manifest) => namesIn(manifest, [
16744
16806
  "devDependencies",
16745
16807
  "peerDependencies"
16746
16808
  ]);
16747
- const installedManifest = Effect.fn("installedManifest")(function* installedManifest(name) {
16748
- const files = yield* RepositoryFiles;
16749
- return yield* pipe(findPackageJson(name, import.meta.url), Option.match({
16750
- onNone: () => Effect.succeed(Option.none()),
16751
- onSome: (file) => readManifest(files.dirname(file))
16752
- }));
16753
- });
16754
16809
  const installedPackage = Effect.fn("installedPackage")(function* installedPackage(name) {
16755
- const manifest = yield* installedManifest(name);
16756
- return {
16810
+ const manifest = yield* installedManifest(name, import.meta.url);
16811
+ return pipe(manifest, Option.map((found) => ({
16757
16812
  name,
16758
- bins: pipe(manifest, Option.map((found) => pipe(binEntriesOf({
16813
+ bins: pipe(binEntriesOf({
16759
16814
  ...found,
16760
16815
  name
16761
- }), Array$1.map(([command]) => command))), Option.getOrElse(() => []))
16762
- };
16816
+ }), Array$1.map(([command]) => command)),
16817
+ keywords: found.keywords ?? []
16818
+ })), Option.filter(isApplied), Option.map(({ name: applied, bins }) => ({
16819
+ name: applied,
16820
+ bins
16821
+ })));
16763
16822
  });
16764
16823
  const appliedByMsch = Effect.fn("appliedByMsch")(function* appliedByMsch() {
16765
- const manifest = yield* installedManifest(MSCH);
16766
- const names = pipe(manifest, Option.map(({ dependencies, peerDependencies }) => [...Record.keys(dependencies ?? {}), ...Record.keys(peerDependencies ?? {})]), Option.getOrElse(() => []), Array$1.filter(isApplied));
16767
- return yield* Effect.forEach(names, installedPackage, { concurrency: 1 });
16824
+ const manifest = yield* installedManifest(MSCH, import.meta.url);
16825
+ const names = pipe(manifest, Option.map(({ dependencies, peerDependencies }) => [...Record.keys(dependencies ?? {}), ...Record.keys(peerDependencies ?? {})]), Option.getOrElse(() => []), Array$1.filter(String$1.startsWith(SCOPE)));
16826
+ const found = yield* Effect.forEach(names, installedPackage, { concurrency: 1 });
16827
+ return Array$1.getSomes(found);
16768
16828
  });
16769
16829
  const problemAt$1 = (file, source) => (index, name) => ({
16770
16830
  file,
@@ -16898,7 +16958,7 @@ const REPLACED = [
16898
16958
  {
16899
16959
  pattern: /(?:^|\/)\.claude\/rules\//u,
16900
16960
  tool: ".claude/rules",
16901
- replacement: "the root AGENTS.md and the skills in masseater/skills"
16961
+ replacement: "the root AGENTS.md and agent skills"
16902
16962
  }
16903
16963
  ];
16904
16964
  const problemFor$1 = ({ name, file }) => pipe(REPLACED, Array$1.findFirst(({ pattern }) => pattern.test(name)), Option.map(({ tool, replacement }) => ({
@@ -17384,14 +17444,13 @@ const firstKeyIndex = (source) => pipe(KEYS, Array$1.findFirst((key) => String$1
17384
17444
  const homepageProblems = (dirname) => ({ entry, source, manifest }) => pipe(Option.some(dirname(entry.name)), Option.filter((directory) => directory !== ROOT_DIRECTORY$1), Option.map((directory) => messagesOf(manifest, directory)), Option.getOrElse(() => []), Array$1.map((message) => problemAtIndex(RULE$6)(entry.file, source)(firstKeyIndex(source), message)));
17385
17445
  // src/features/check-published-manifest/model/package-scope.ts
17386
17446
  const RULE$5 = "package-scope";
17387
- const SCOPE = "@r_masseater/";
17388
17447
  const NAME_KEY = "\"name\"";
17389
17448
  const START$4 = 0;
17390
- const unscopedName = ({ manifest }) => pipe(Option.fromUndefinedOr(manifest.name), Option.filter((name) => !String$1.startsWith(SCOPE)(name)));
17449
+ const unscopedName = (scope) => ({ manifest }) => pipe(Option.fromUndefinedOr(manifest.name), Option.filter((name) => !String$1.startsWith(scope)(name)));
17391
17450
  const nameIndex = (source) => pipe(String$1.indexOf(NAME_KEY)(source), Option.getOrElse(() => START$4));
17392
- const messageFor$1 = (name) => `Packages are published only under the ${SCOPE} scope. Rename "${name}" to "${SCOPE}${String$1.replace(/^@[^/]+\//u, "")(name)}".`;
17451
+ const messageFor$1 = (scope, name) => `Packages are published only under the ${scope} scope. Rename "${name}" to "${scope}${String$1.replace(/^@[^/]+\//u, "")(name)}".`;
17393
17452
  /** @internal */
17394
- const scopeProblems = (found) => pipe(unscopedName(found), Option.map((name) => problemAtIndex(RULE$5)(found.entry.file, found.source)(nameIndex(found.source), messageFor$1(name))), Option.toArray);
17453
+ const scopeProblems = (scope) => (found) => pipe(unscopedName(scope)(found), Option.map((name) => problemAtIndex(RULE$5)(found.entry.file, found.source)(nameIndex(found.source), messageFor$1(scope, name))), Option.toArray);
17395
17454
  // src/features/check-published-manifest/model/private-dependency.ts
17396
17455
  const RULE$4 = "private-workspace-dependency";
17397
17456
  const START$3 = 0;
@@ -17413,9 +17472,10 @@ const checkPublishedManifests = Effect.fn("checkPublishedManifests")(function* c
17413
17472
  const files = yield* RepositoryFiles;
17414
17473
  const homepage = homepageProblems(files.dirname);
17415
17474
  const privateNames = yield* privateNamesIn(root);
17475
+ const { scope } = yield* ownerSettings(root);
17416
17476
  const privateDependencies = privateDependencyProblems(privateNames);
17417
17477
  return yield* scanPublishedManifests(root, (found) => [
17418
- ...scopeProblems(found),
17478
+ ...scopeProblems(scope)(found),
17419
17479
  ...homepage(found),
17420
17480
  ...privateDependencies(found)
17421
17481
  ]);
@@ -17702,7 +17762,8 @@ const checkTrackedText = Effect.fn("checkTrackedText")(function* checkTrackedTex
17702
17762
  checkPackageVersions(root),
17703
17763
  checkRenovateSettings(root),
17704
17764
  checkCatalogEntries(root),
17705
- checkPackageRegistry(root)
17765
+ checkPackageRegistry(root),
17766
+ checkRemovedPeers(root)
17706
17767
  ], { concurrency: "unbounded" });
17707
17768
  return Array$1.flatten(found);
17708
17769
  });