@r_masseater/msch 0.99.0 → 0.100.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 (96) hide show
  1. package/README.md +1 -18
  2. package/dist/cargo-inputs.mjs +2 -2
  3. package/dist/cli.mjs +5214 -1074
  4. package/dist/cli.mjs.map +1 -1
  5. package/dist/config.d.mts +2 -2
  6. package/dist/config.mjs +2 -2
  7. package/dist/decision-rules.d.mts +1 -1
  8. package/dist/decision-rules.mjs +1 -1
  9. package/dist/{define-lint-preset-Ca94gIkh.mjs → define-lint-preset-BnOZuTNT.mjs} +8 -12
  10. package/dist/define-lint-preset-BnOZuTNT.mjs.map +1 -0
  11. package/dist/{ignored-directories-D-7Rm_2X.mjs → ignored-directories-DVyp8bfD.mjs} +2 -2
  12. package/dist/{ignored-directories-D-7Rm_2X.mjs.map → ignored-directories-DVyp8bfD.mjs.map} +1 -1
  13. package/dist/{index-Dm0Gg9wS.d.mts → index-Cdap8t_F.d.mts} +2 -2
  14. package/dist/{index-BeNrE8zK.d.mts → index-DbmdHsLx.d.mts} +24 -5
  15. package/dist/lint-rules.mjs +49 -16
  16. package/dist/lint-rules.mjs.map +1 -1
  17. package/dist/lint.d.mts +1 -1
  18. package/dist/lint.mjs +1 -1
  19. package/dist/oxlint.mjs +4 -3
  20. package/dist/oxlint.mjs.map +1 -1
  21. package/dist/{problem-DbuTeNvL.mjs → problem-BTQ96CJ5.mjs} +2 -2
  22. package/dist/{problem-DbuTeNvL.mjs.map → problem-BTQ96CJ5.mjs.map} +1 -1
  23. package/dist/{published-3eokcs_D.mjs → published-O6THHxdC.mjs} +172 -6
  24. package/dist/published-O6THHxdC.mjs.map +1 -0
  25. package/dist/{repository-files-DSwKJnrj.mjs → repository-files-BwjF-kJ8.mjs} +2 -2
  26. package/dist/{repository-files-DSwKJnrj.mjs.map → repository-files-BwjF-kJ8.mjs.map} +1 -1
  27. package/dist/{repository-text-BKEirzPk.mjs → repository-text-qZQSVg9L.mjs} +8 -8
  28. package/dist/repository-text-qZQSVg9L.mjs.map +1 -0
  29. package/dist/workspace-settings.d.mts +1 -1
  30. package/dist/workspace-settings.mjs +3 -4
  31. package/dist/workspace-settings.mjs.map +1 -1
  32. package/package.json +5 -13
  33. package/skills/msch-checks/SKILL.md +10 -10
  34. package/skills/msch-publishing/SKILL.md +12 -12
  35. package/skills/msch-repository-config/SKILL.md +2 -2
  36. package/dist/base-revision-Bl-4nxAd.mjs +0 -15
  37. package/dist/base-revision-Bl-4nxAd.mjs.map +0 -1
  38. package/dist/changed.d.mts +0 -1
  39. package/dist/changed.mjs +0 -245
  40. package/dist/changed.mjs.map +0 -1
  41. package/dist/cli-contract-D7btWrEu.mjs +0 -5
  42. package/dist/cli-contract-D7btWrEu.mjs.map +0 -1
  43. package/dist/define-lint-preset-Ca94gIkh.mjs.map +0 -1
  44. package/dist/exits.d.mts +0 -1
  45. package/dist/exits.mjs +0 -40
  46. package/dist/exits.mjs.map +0 -1
  47. package/dist/judge.d.mts +0 -1
  48. package/dist/judge.mjs +0 -415
  49. package/dist/judge.mjs.map +0 -1
  50. package/dist/lookup-report-L5OLXRMf.mjs +0 -29
  51. package/dist/lookup-report-L5OLXRMf.mjs.map +0 -1
  52. package/dist/manifest-texts-DPgsV8kj.mjs +0 -19
  53. package/dist/manifest-texts-DPgsV8kj.mjs.map +0 -1
  54. package/dist/output-DAvdel9H.mjs +0 -33
  55. package/dist/output-DAvdel9H.mjs.map +0 -1
  56. package/dist/package-routes-BQWX5ttU.mjs +0 -73
  57. package/dist/package-routes-BQWX5ttU.mjs.map +0 -1
  58. package/dist/package-versions-sx15IGwA.mjs +0 -92
  59. package/dist/package-versions-sx15IGwA.mjs.map +0 -1
  60. package/dist/pass-records-BcAAWgiQ.mjs +0 -437
  61. package/dist/pass-records-BcAAWgiQ.mjs.map +0 -1
  62. package/dist/publish.d.mts +0 -1
  63. package/dist/publish.mjs +0 -1596
  64. package/dist/publish.mjs.map +0 -1
  65. package/dist/published-3eokcs_D.mjs.map +0 -1
  66. package/dist/published.d.mts +0 -1
  67. package/dist/published.mjs +0 -134
  68. package/dist/published.mjs.map +0 -1
  69. package/dist/refs.d.mts +0 -1
  70. package/dist/refs.mjs +0 -232
  71. package/dist/refs.mjs.map +0 -1
  72. package/dist/registries-DePiYd3D.mjs +0 -11
  73. package/dist/registries-DePiYd3D.mjs.map +0 -1
  74. package/dist/registry-releases-BBtz4wGE.mjs +0 -62
  75. package/dist/registry-releases-BBtz4wGE.mjs.map +0 -1
  76. package/dist/repository-text-BKEirzPk.mjs.map +0 -1
  77. package/dist/runtime-Djm7zMwu.mjs +0 -13
  78. package/dist/runtime-Djm7zMwu.mjs.map +0 -1
  79. package/dist/specifiers-BrCyPubD.mjs +0 -32
  80. package/dist/specifiers-BrCyPubD.mjs.map +0 -1
  81. package/dist/tree-sitter-BfzHNwTR.mjs +0 -41
  82. package/dist/tree-sitter-BfzHNwTR.mjs.map +0 -1
  83. package/dist/unbumped.d.mts +0 -1
  84. package/dist/unbumped.mjs +0 -19
  85. package/dist/unbumped.mjs.map +0 -1
  86. package/dist/upstream-exits-4bn4gblF.mjs +0 -357
  87. package/dist/upstream-exits-4bn4gblF.mjs.map +0 -1
  88. package/dist/upstream-record-DRNGym9S.mjs +0 -136
  89. package/dist/upstream-record-DRNGym9S.mjs.map +0 -1
  90. package/dist/upstream.d.mts +0 -1
  91. package/dist/upstream.mjs +0 -104
  92. package/dist/upstream.mjs.map +0 -1
  93. package/dist/workspace-manifest-BAVyPzbA.mjs +0 -8
  94. package/dist/workspace-manifest-BAVyPzbA.mjs.map +0 -1
  95. package/dist/workspace-projects-MpL8K7Nz.mjs +0 -172
  96. package/dist/workspace-projects-MpL8K7Nz.mjs.map +0 -1
package/dist/config.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as WorkspaceSettings } from "./index-Dm0Gg9wS.mjs";
2
- import { r as MarkdownOptions } from "./index-BeNrE8zK.mjs";
1
+ import { a as WorkspaceSettings } from "./index-Cdap8t_F.mjs";
2
+ import { r as MarkdownOptions } from "./index-DbmdHsLx.mjs";
3
3
  import { ToolSections } from "@r_masseater/vite-plus-adopt";
4
4
  import { Schema } from "effect";
5
5
  import { UserConfig } from "vite-plus";
package/dist/config.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { b as exempt, d as requiredStack, f as lint, h as decisionTestRules, o as structureOf, r as markdownOf } from "./define-lint-preset-Ca94gIkh.mjs";
2
- import { i as textlintOf, o as tasksOf, r as secretsOf } from "./repository-text-BKEirzPk.mjs";
1
+ import { b as exempt, d as requiredStack, f as lint, h as decisionTestRules, o as structureOf, r as markdownOf } from "./define-lint-preset-BnOZuTNT.mjs";
2
+ import { i as textlintOf, o as tasksOf, r as secretsOf } from "./repository-text-qZQSVg9L.mjs";
3
3
  import { Array, Option, Record, pipe } from "effect";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { recommended } from "@r_masseater/fu4/presets";
@@ -1,2 +1,2 @@
1
- import { a as _default } from "./index-BeNrE8zK.mjs";
1
+ import { a as _default } from "./index-DbmdHsLx.mjs";
2
2
  export { _default as default };
@@ -1 +1 @@
1
- export { g as default } from "./define-lint-preset-Ca94gIkh.mjs";
1
+ export { g as default } from "./define-lint-preset-BnOZuTNT.mjs";
@@ -62,12 +62,8 @@ const alchemyOverride = {
62
62
  }
63
63
  };
64
64
  const commandsOverride = {
65
- files: ["bin/**"],
66
- rules: {
67
- "node/no-process-env": "off",
68
- "node/no-sync": "off",
69
- "effecttsgo/node-builtin-import": "off"
70
- }
65
+ files: ["**/bin/**"],
66
+ rules: { "msch-lint/wiring-only-commands": "error" }
71
67
  };
72
68
  // src/features/define-lint-preset/config/decision-rules.ts
73
69
  var decision_rules_default = createDecisionPlugin({
@@ -300,6 +296,7 @@ const lint = {
300
296
  ...testRules,
301
297
  ...webGuidanceRules,
302
298
  "msch-lint/array-from-async": "error",
299
+ "msch-lint/declared-arguments": "error",
303
300
  "msch-lint/ecosystem-readers": "error",
304
301
  "msch-lint/explicit-import-path": "error",
305
302
  "msch-lint/get-or-insert": "error",
@@ -383,10 +380,6 @@ const lint = {
383
380
  rules: { "import/no-default-export": "off" }
384
381
  },
385
382
  commandsOverride,
386
- {
387
- files: ["**/bin/**"],
388
- rules: { "baseline-js/use-baseline": "off" }
389
- },
390
383
  {
391
384
  files: [
392
385
  "**/*.test.ts",
@@ -394,7 +387,10 @@ const lint = {
394
387
  "**/*.test.support.ts",
395
388
  "**/vite.config.ts"
396
389
  ],
397
- rules: testHonestyRules
390
+ rules: {
391
+ "msch-lint/declared-arguments": "off",
392
+ ...testHonestyRules
393
+ }
398
394
  },
399
395
  {
400
396
  files: ["**/vite.config.ts"],
@@ -729,4 +725,4 @@ const markdownOf = ({ indexSkill, docs = {} }) => {
729
725
  };
730
726
  export { alchemyOverride as _, textlintPresets as a, exempt as b, remotionRules as c, requiredStack as d, lint as f, decision_rules_default as g, decisionTestRules as h, textlintFilters as i, tracedRules as l, decisionRules as m, MARKDOWN_RULES as n, structureOf as o, allRulesOf as p, markdownOf as r, videoRules as s, MARKDOWN_IGNORES as t, INSTRUMENTATION as u, commandsOverride as v, removalPolicyOverride as y };
731
727
 
732
- //# sourceMappingURL=define-lint-preset-Ca94gIkh.mjs.map
728
+ //# sourceMappingURL=define-lint-preset-BnOZuTNT.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-lint-preset-BnOZuTNT.mjs","names":["Rec","Arr","Str","effectPresets","decisionPlugin","shadcn","Str","Arr","Rec"],"sources":["../src/shared/config/exempt.ts","../src/features/define-lint-preset/config/lint-overrides.config.ts","../src/features/define-lint-preset/config/decision-rules.ts","../src/features/define-lint-preset/config/web-guidance.config.ts","../src/features/define-lint-preset/config/lint.config.ts","../src/features/define-lint-preset/config/test-rules.config.ts","../src/features/define-lint-preset/config/preset.ts","../src/features/define-lint-preset/config/required-stack.config.ts","../src/features/define-lint-preset/config/traced-rules.config.ts","../src/features/define-lint-preset/config/remotion-rules.config.ts","../src/features/define-lint-preset/config/video-rules.config.ts","../src/features/define-lint-preset/config/structure.config.ts","../src/features/define-lint-preset/config/kuromojin.config.ts","../src/features/define-lint-preset/config/textlint-presets.config.ts","../src/features/define-lint-preset/config/textlint-filters.config.ts","../src/features/define-lint-preset/config/markdown.config.ts"],"sourcesContent":["export const generated = [\n \"**/routeTree.gen.ts\",\n \"**/generated/**\",\n \"**/drizzle/**/snapshot.json\",\n \".claude/skills/**\",\n \".intent/**\",\n \"AGENTS.md\",\n \"CLAUDE.md\",\n \"**/CHANGELOG.md\",\n \".github/release-please/*manifest.json\",\n \"**/.release-please-manifest.json\",\n \"**/*.d.*.ts\",\n \"**/src-tauri/gen/**\",\n];\n\nconst checkerInputs = [\"**/fixtures/**\"];\n\nconst vendored = [\"**/upstream/**\"];\n\nexport const exempt = [...generated, ...checkerInputs, ...vendored];\n","export const resourceRules = {\n \"msch-lint/worker-logpush\": \"error\",\n \"msch-lint/worker-cpu-limit\": \"error\",\n \"msch-lint/attributed-model-call\": \"error\",\n \"msch-lint/gated-model-call\": \"error\",\n \"msch-lint/gated-model-request\": \"error\",\n \"msch-lint/workers-ai-through-runner\": \"error\",\n \"msch-lint/ai-gateway-logs\": \"error\",\n \"msch-lint/ai-gateway-spend-limit\": \"error\",\n \"msch-lint/ai-gateway-cache\": \"error\",\n} as const;\n\nexport const removalPolicyOverride: {\n files: string[];\n excludeFiles: string[];\n rules: Readonly<Record<string, \"error\">>;\n} = {\n files: [\"**/*.ts\"],\n excludeFiles: [\"**/*.test.ts\"],\n rules: { \"msch-lint/protected-storage\": \"error\" },\n};\n\nexport const alchemyOverride: {\n files: string[];\n rules: Readonly<Record<string, \"error\">>;\n} = {\n files: [\"**/alchemy.run.ts\"],\n rules: {\n \"msch-lint/stack-named-by-app\": \"error\",\n \"msch-lint/stack-checks-app-prefix\": \"error\",\n },\n};\n\nexport const commandsOverride: {\n files: string[];\n rules: Readonly<Record<string, \"error\">>;\n} = {\n files: [\"**/bin/**\"],\n rules: {\n \"msch-lint/wiring-only-commands\": \"error\",\n },\n};\n","import { createDecisionPlugin, defineDecisionRule } from \"@r_masseater/oxlint-plugin-decision\";\n\nexport default createDecisionPlugin({\n name: \"stack\",\n rules: [\n defineDecisionRule({\n id: \"exclusive-status\",\n target: \"file\",\n question:\n \"Does this code represent one piece of state with several boolean flags or optional fields whose combinations can contradict each other, instead of one exclusive status expressed as a discriminated union? Answer no when every state is a single exclusive status, or when the file holds no such state. A violation needs two or more booleans or optional fields that describe the same piece of state; a single boolean value, parameter, return value or field is not a violation, and a union of objects told apart by a status or kind field is already an exclusive status. A constant configuration object whose shape a library fixes, such as an OpenFeature flag definition, holds no state and is not a violation.\",\n message: \"状態は排他的なstatusを持つ判別共用体で表し、booleanフラグの組を使わない。\",\n cutoff: 0.8,\n }),\n defineDecisionRule({\n id: \"server-state-tanstack-query\",\n target: \"file\",\n question:\n \"Does this code fetch, cache or synchronize server data on the client with something other than TanStack Query, such as fetch inside useEffect, SWR or a hand-written cache? Answer no when server data on the client goes only through TanStack Query, or when the file handles none. Creating an API client such as a better-auth or Eden client, which fetches nothing until a query calls it, is not a violation.\",\n message: \"サーバー状態はTanStack Queryだけで扱う。\",\n cutoff: 0.8,\n }),\n defineDecisionRule({\n id: \"ui-state-effect-atom\",\n target: \"file\",\n question:\n \"Does this code hold client-side UI state with something other than effect-atom, such as useState, useReducer, React context used as a store, zustand, jotai or redux? Answer no when client-side UI state is held only by effect-atom, or when the file holds none. effect-atom is Atom from effect/reactivity, read and written through @effect/atom-react hooks such as useAtomValue and useAtomSet. Creating a TanStack Query QueryClient or configuring the router, which hold no UI state, is not a violation.\",\n message: \"UI状態はeffect-atomだけで扱う。\",\n cutoff: 0.8,\n }),\n ],\n});\n","import type { UserConfig } from \"vite-plus\";\n\ntype LintRules = NonNullable<NonNullable<UserConfig[\"lint\"]>[\"rules\"]>;\n\nexport const webGuidanceRules = {\n \"jsx-a11y/no-redundant-roles\": [\"error\", { ul: [\"list\"], ol: [\"list\"] }],\n \"jsx-a11y/no-noninteractive-tabindex\": [\"error\", { tags: [\"section\"], roles: [\"tabpanel\"] }],\n} satisfies LintRules;\n","import { presets as effectPresets } from \"@effect/tsgo/oxlint-presets\";\nimport htmlReact from \"@html-eslint/eslint-plugin-react\";\nimport eslintReact from \"@r_masseater/oxlint-typed-rules/react\";\nimport { Array as Arr, Record as Rec, String as Str, Struct, pipe } from \"effect\";\nimport reactHooks from \"eslint-plugin-react-hooks\";\n\nimport decisionPlugin from \"./decision-rules.ts\";\n\nconst asErrors = (names: readonly string[]): Readonly<Record<string, \"error\">> =>\n Rec.fromEntries(\n pipe(\n names,\n Arr.map((name) => [name, \"error\"] as const),\n ),\n );\n\nexport const allRulesOf = ({\n prefix,\n rules,\n}: Readonly<{ prefix: string; rules: Readonly<Record<string, unknown>> }>): Readonly<\n Record<string, \"error\">\n> =>\n asErrors(\n pipe(\n Rec.keys(rules),\n Arr.map((rule) => `${prefix}/${rule}`),\n ),\n );\n\nconst reactHooksRuleNames = pipe(\n Struct.keys(reactHooks.configs[\"recommended-latest\"].rules),\n Arr.map(Str.replace(\"react-hooks/\", \"react-hooks-js/\")),\n);\n\nconst reactHooksRules = asErrors(reactHooksRuleNames);\n\nconst eslintReactRuleNames = pipe(\n Rec.keys(eslintReact.configs[\"strict-typescript\"].rules ?? {}),\n Arr.filter(\n (name) => !(Str.replace(\"@eslint-react/\", \"react-hooks-js/\")(name) in reactHooksRules),\n ),\n);\n\nconst effectRuleNames = pipe(\n Rec.values(effectPresets),\n Arr.flatMap((preset) => Struct.keys(preset.rules ?? {})),\n);\n\nexport const pluginRules: Readonly<Record<string, \"error\">> = {\n ...asErrors(Rec.keys(htmlReact.configs.all.rules ?? {})),\n ...reactHooksRules,\n ...asErrors(eslintReactRuleNames),\n ...asErrors(effectRuleNames),\n};\n\nexport const decisionPluginName = decisionPlugin.meta.name;\n\nexport const decisionRules = allRulesOf({\n prefix: decisionPluginName,\n rules: decisionPlugin.rules,\n});\n\nexport const decisionTestRules = pipe(\n decisionRules,\n Rec.map(() => \"off\" as const),\n);\n\nexport const shadcnRestyleContracts = [\n { pattern: \"^Table(Head|Cell)$\", allow: [\"text-alignment\", \"fvn-spacing\"] },\n { pattern: \"^TableCaption$\", allow: [\"caption\", \"text-alignment\", \"mt-*\", \"mb-*\"] },\n];\n\nexport { webGuidanceRules } from \"./web-guidance.config.ts\";\n","import type { UserConfig } from \"vite-plus\";\n\ntype LintRules = NonNullable<NonNullable<UserConfig[\"lint\"]>[\"rules\"]>;\n\nexport const testRules = {\n \"vitest/expect-expect\": [\n \"error\",\n { assertFunctionNames: [\"expect\", \"expect*\", \"assert*\", \"waitFor*\", \"run\", \"*.run\"] },\n ],\n \"vitest/valid-expect\": [\"error\", { maxArgs: 2 }],\n \"vitest/valid-title\": [\"error\", { allowArguments: true }],\n \"vitest/prefer-called-times\": \"off\",\n \"vitest/prefer-import-in-mock\": \"off\",\n \"vitest/no-standalone-expect\": \"off\",\n \"vitest/no-conditional-in-test\": \"off\",\n \"vitest/require-test-timeout\": \"off\",\n \"vitest/prefer-expect-assertions\": \"off\",\n \"vitest/require-top-level-describe\": \"off\",\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/require-hook\": \"off\",\n \"vitest/no-hooks\": \"off\",\n \"vitest/consistent-test-it\": \"off\",\n \"vitest/prefer-describe-function-title\": \"off\",\n \"vitest/prefer-lowercase-title\": \"off\",\n \"vitest/prefer-to-be-truthy\": \"off\",\n \"vitest/prefer-to-be-falsy\": \"off\",\n \"vitest/padding-around-after-all-blocks\": \"off\",\n \"vitest/padding-around-test-blocks\": \"off\",\n \"vitest/max-expects\": \"off\",\n} satisfies LintRules;\n\nexport const testHonestyRules = {\n \"msch-lint/no-test-doubles\": \"error\",\n \"msch-lint/no-flake-masking\": \"error\",\n} satisfies LintRules;\n","import { fileURLToPath } from \"node:url\";\n\nimport tanstackQuery from \"@r_masseater/oxlint-typed-rules/tanstack-query\";\nimport tanstackRouter from \"@r_masseater/oxlint-typed-rules/tanstack-router\";\nimport { plugin as shadcn } from \"@shadcn/lint\";\nimport baselineJs from \"eslint-plugin-baseline-js\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport { DECISION_MODEL, DECISION_TIMEOUT_MS, generated } from \"#/shared/config/index.ts\";\n\nimport {\n alchemyOverride,\n commandsOverride,\n removalPolicyOverride,\n resourceRules,\n} from \"./lint-overrides.config.ts\";\nimport {\n allRulesOf,\n decisionPluginName,\n pluginRules,\n shadcnRestyleContracts,\n webGuidanceRules,\n} from \"./lint.config.ts\";\nimport { testHonestyRules, testRules } from \"./test-rules.config.ts\";\n\ntype LintConfig = NonNullable<UserConfig[\"lint\"]>;\n\nconst resolved = (specifier: string): string => fileURLToPath(import.meta.resolve(specifier));\n\nconst typedRules = \"@r_masseater/oxlint-typed-rules\";\n\nconst jsPlugins = [\n { name: \"vite-plus\", specifier: resolved(\"vite-plus/oxlint-plugin\") },\n { name: \"tanstack-query\", specifier: resolved(`${typedRules}/tanstack-query`) },\n { name: \"tanstack-router\", specifier: resolved(`${typedRules}/tanstack-router`) },\n { name: \"tanstack-start\", specifier: resolved(`${typedRules}/tanstack-start`) },\n { name: \"drizzle\", specifier: resolved(`${typedRules}/drizzle`) },\n { name: \"react-hooks-js\", specifier: resolved(\"eslint-plugin-react-hooks\") },\n { name: \"@eslint-react\", specifier: resolved(`${typedRules}/react`) },\n { name: \"@remotion\", specifier: resolved(`${typedRules}/remotion`) },\n { name: \"shadcn\", specifier: resolved(\"@shadcn/lint\") },\n { name: \"baseline-js\", specifier: resolved(\"eslint-plugin-baseline-js\") },\n { name: \"@html-eslint/react\", specifier: resolved(\"@html-eslint/eslint-plugin-react\") },\n { name: \"eslint-js\", specifier: resolved(\"oxlint-plugin-eslint\") },\n { name: decisionPluginName, specifier: resolved(\"@r_masseater/msch/decision-rules\") },\n { name: \"msch-lint\", specifier: resolved(\"@r_masseater/msch/lint-rules\") },\n];\n\nconst rules = {\n \"vite-plus/prefer-vite-plus-imports\": \"error\",\n \"tanstack-start/no-async-client-component\": \"error\",\n \"tanstack-start/no-client-code-in-server-component\": \"error\",\n ...allRulesOf({ prefix: \"tanstack-query\", rules: tanstackQuery.rules }),\n ...allRulesOf({ prefix: \"tanstack-router\", rules: tanstackRouter.rules }),\n \"drizzle/enforce-delete-with-where\": [\"error\", { drizzleObjectName: [\"db\"] }],\n \"drizzle/enforce-update-with-where\": [\"error\", { drizzleObjectName: [\"db\"] }],\n ...allRulesOf({ prefix: \"shadcn\", rules: shadcn.rules }),\n \"shadcn/no-restyle\": [\"error\", { contracts: shadcnRestyleContracts }],\n ...allRulesOf({ prefix: \"baseline-js\", rules: baselineJs.rules }),\n ...baselineJs.configs.recommended().rules,\n \"baseline-js/use-baseline\": [\n \"error\",\n {\n available: \"widely\",\n ignoreFeatures: [\"top-level-await\"],\n includeWebApis: { preset: \"auto\" },\n includeJsBuiltins: { preset: \"auto\" },\n },\n ],\n ...pluginRules,\n \"eslint/capitalized-comments\": \"off\",\n \"eslint/sort-imports\": \"off\",\n \"eslint/sort-keys\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/prefer-default-export\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/exports-last\": \"off\",\n ...testRules,\n ...webGuidanceRules,\n \"msch-lint/array-from-async\": \"error\",\n \"msch-lint/declared-arguments\": \"error\",\n \"msch-lint/ecosystem-readers\": \"error\",\n \"msch-lint/explicit-import-path\": \"error\",\n \"msch-lint/get-or-insert\": \"error\",\n \"msch-lint/mcp-tool-layer\": \"error\",\n \"msch-lint/main-through-node-main\": \"error\",\n \"msch-lint/inline-exports\": \"error\",\n \"msch-lint/ui-state-in-atoms\": \"error\",\n \"msch-lint/no-hand-written-sql\": \"error\",\n \"msch-lint/platform-node-by-module\": \"error\",\n \"msch-lint/readonly-parameters\": \"error\",\n \"msch-lint/separate-min-max\": \"error\",\n \"msch-lint/typed-calls-not-reflect\": \"error\",\n \"react/react-in-jsx-scope\": \"off\",\n \"eslint/no-undef\": \"off\",\n \"typescript/promise-function-async\": \"off\",\n \"react/forbid-component-props\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n \"node/no-top-level-await\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"eslint/new-cap\": [\"error\", { capIsNew: false }],\n \"eslint/one-var\": [\"error\", \"never\"],\n \"unicorn/relative-url-style\": [\"error\", \"always\"],\n \"eslint/id-length\": [\"error\", { exceptions: [\"x\", \"y\"] }],\n \"jsdoc/check-tag-names\": [\"error\", { definedTags: [\"msch\", \"stability\"] }],\n \"jsdoc/require-param\": [\"error\", { exemptedBy: [\"inheritdoc\", \"internal\", \"msch\", \"stability\"] }],\n \"jsdoc/require-returns\": [\n \"error\",\n { exemptedBy: [\"inheritdoc\", \"internal\", \"msch\", \"stability\"] },\n ],\n ...resourceRules,\n \"typescript/prefer-readonly-parameter-types\": \"off\",\n \"eslint/no-duplicate-imports\": [\"error\", { allowSeparateTypeImports: true }],\n \"react/function-component-definition\": [\n \"error\",\n { namedComponents: \"arrow-function\", unnamedComponents: \"arrow-function\" },\n ],\n \"typescript/no-empty-interface\": [\"error\", { allowSingleExtends: true }],\n \"typescript/no-empty-object-type\": [\"error\", { allowInterfaces: \"with-single-extends\" }],\n \"react/jsx-filename-extension\": [\"error\", { extensions: [\".tsx\"] }],\n \"react/only-export-components\": [\"error\", { allowExportNames: [\"Route\"] }],\n} satisfies LintConfig[\"rules\"];\n\nconst actionScriptsOverride = {\n files: [\".github/**/*.ts\"],\n rules: {\n \"baseline-js/use-baseline\": \"off\",\n \"effecttsgo/async-function\": \"off\",\n \"effecttsgo/global-console\": \"off\",\n \"effecttsgo/global-fetch\": \"off\",\n \"effecttsgo/global-json\": \"off\",\n \"effecttsgo/missing-pipeable-signature\": \"off\",\n \"effecttsgo/node-builtin-import\": \"off\",\n \"effecttsgo/prefer-effect-array\": \"off\",\n \"effecttsgo/prefer-effect-record\": \"off\",\n \"effecttsgo/prefer-effect-string\": \"off\",\n \"effecttsgo/process-env\": \"off\",\n \"eslint/no-console\": \"off\",\n \"eslint/no-undefined\": \"off\",\n \"import/no-relative-parent-imports\": \"off\",\n \"node/no-process-env\": \"off\",\n \"node/no-sync\": \"off\",\n \"oxc/no-async-await\": \"off\",\n \"unicorn/no-process-exit\": \"off\",\n },\n} satisfies NonNullable<LintConfig[\"overrides\"]>[number];\n\nconst overrides = [\n removalPolicyOverride,\n actionScriptsOverride,\n alchemyOverride,\n {\n files: [\"**/*.config.ts\", \"**/alchemy.*.ts\", \"**/decision-rules.ts\"],\n rules: { \"import/no-default-export\": \"off\" },\n },\n commandsOverride,\n {\n files: [\"**/*.test.ts\", \"**/*.test.tsx\", \"**/*.test.support.ts\", \"**/vite.config.ts\"],\n rules: { \"msch-lint/declared-arguments\": \"off\", ...testHonestyRules },\n },\n {\n files: [\"**/vite.config.ts\"],\n rules: {\n \"eslint/max-lines\": \"off\",\n \"eslint/max-lines-per-function\": \"off\",\n \"baseline-js/use-baseline\": \"off\",\n },\n },\n] satisfies LintConfig[\"overrides\"];\n\nexport const lint = {\n ignorePatterns: generated,\n plugins: [\n \"eslint\",\n \"typescript\",\n \"unicorn\",\n \"oxc\",\n \"import\",\n \"react\",\n \"react-perf\",\n \"jsx-a11y\",\n \"jsdoc\",\n \"vitest\",\n \"promise\",\n \"node\",\n \"effecttsgo\",\n ],\n categories: {\n correctness: \"error\",\n suspicious: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n style: \"error\",\n restriction: \"error\",\n nursery: \"error\",\n },\n jsPlugins,\n rules,\n overrides,\n settings: {\n [decisionPluginName]: {\n model: DECISION_MODEL,\n timeoutMs: DECISION_TIMEOUT_MS,\n ci: \"skip\",\n },\n },\n options: {\n typeAware: true,\n typeCheck: true,\n denyWarnings: true,\n reportUnusedDisableDirectives: \"error\",\n },\n} satisfies LintConfig;\n","const UI_STATE = \"UI 状態は effect-atom だけで扱う\";\n\nexport const INSTRUMENTATION = \"計装は Effect のトレーシングだけで扱う\";\nconst INFRASTRUCTURE = \"インフラは Alchemy の IaC と Cloudflare だけで扱い、wrangler は使わない\";\n\nexport const requiredStack: Readonly<Record<string, readonly string[]>> = {\n [UI_STATE]: [\n \"zustand\",\n \"jotai\",\n \"valtio\",\n \"recoil\",\n \"mobx\",\n \"mobx-*\",\n \"redux\",\n \"@reduxjs/*\",\n \"react-redux\",\n \"xstate\",\n \"@xstate/*\",\n \"nanostores\",\n \"@nanostores/*\",\n \"@preact/signals*\",\n ],\n \"サーバー状態は TanStack Query と Eden だけで扱う\": [\n \"swr\",\n \"react-query\",\n \"@apollo/*\",\n \"urql\",\n \"@urql/*\",\n \"axios\",\n \"ky\",\n \"ofetch\",\n \"got\",\n \"node-fetch\",\n \"graphql-request\",\n \"@trpc/*\",\n ],\n \"ルーティングとサーバーは TanStack Start と Elysia だけで扱う\": [\n \"react-router\",\n \"react-router-dom\",\n \"next\",\n \"@remix-run/*\",\n \"wouter\",\n \"express\",\n \"hono\",\n \"fastify\",\n \"koa\",\n \"@nestjs/*\",\n ],\n \"データベースは Drizzle だけで扱い、スキーマはマイグレーションで生成する\": [\n \"prisma\",\n \"@prisma/*\",\n \"typeorm\",\n \"sequelize\",\n \"kysely\",\n \"knex\",\n \"@mikro-orm/*\",\n \"better-sqlite3\",\n \"pg\",\n \"mysql2\",\n ],\n \"認証は better-auth だけで扱う\": [\n \"next-auth\",\n \"@auth/*\",\n \"lucia\",\n \"passport\",\n \"passport-*\",\n \"@clerk/*\",\n \"firebase/auth\",\n \"@supabase/*\",\n ],\n \"UI は shadcn/ui と Tailwind CSS だけで組む\": [\n \"@mui/*\",\n \"antd\",\n \"@chakra-ui/*\",\n \"@mantine/*\",\n \"styled-components\",\n \"@emotion/*\",\n \"bootstrap\",\n \"react-bootstrap\",\n ],\n \"検証、日時、ログ、関数型ユーティリティは Effect だけで扱う\": [\n \"zod\",\n \"yup\",\n \"joi\",\n \"valibot\",\n \"arktype\",\n \"io-ts\",\n \"superstruct\",\n \"moment\",\n \"dayjs\",\n \"date-fns\",\n \"luxon\",\n \"winston\",\n \"pino\",\n \"bunyan\",\n \"loglevel\",\n \"lodash\",\n \"lodash-es\",\n \"ramda\",\n \"rxjs\",\n \"fp-ts\",\n \"neverthrow\",\n \"ts-results\",\n \"purify-ts\",\n ],\n \"CSV は effect/encoding の Csv だけで読み書きする\": [\n \"papaparse\",\n \"csv-parse\",\n \"csv-parser\",\n \"csv-stringify\",\n \"fast-csv\",\n \"@fast-csv/*\",\n \"d3-dsv\",\n ],\n \"tar は effect/encoding の Tar だけで読み書きする\": [\n \"modern-tar\",\n \"nanotar\",\n \"tar\",\n \"tar-stream\",\n \"tar-fs\",\n \"tar-js\",\n \"tarts\",\n \"it-tar\",\n ],\n \"エージェントスキルは vite.config.ts の skills に書き、msch --prepare で入れる\": [\"skills\"],\n \"フィーチャーフラグは OpenFeature だけで扱う\": [\n \"launchdarkly-*\",\n \"@launchdarkly/*\",\n \"@growthbook/*\",\n \"unleash-client\",\n \"flagsmith\",\n \"@vercel/flags\",\n ],\n \"テストは Vitest と Playwright だけで扱う\": [\n \"jest\",\n \"jest-*\",\n \"@jest/*\",\n \"ts-jest\",\n \"mocha\",\n \"jasmine\",\n \"jasmine-core\",\n \"ava\",\n \"cypress\",\n \"tap\",\n \"uvu\",\n ],\n \"決済は Stripe だけで扱う\": [\n \"@paypal/*\",\n \"paypal-rest-sdk\",\n \"braintree\",\n \"@paddle/*\",\n \"@lemonsqueezy/*\",\n \"square\",\n ],\n \"整形は Vite+ の vp fmt だけで扱う\": [\n \"prettier\",\n \"prettier-plugin-*\",\n \"@prettier/*\",\n \"@biomejs/*\",\n \"dprint\",\n ],\n \"lint は Vite+ の vp lint だけで扱い、ESLint のプラグインは oxlint の JS プラグインとして読む\": [\n \"eslint\",\n \"@eslint/*\",\n \"eslint-config-*\",\n \"tslint\",\n \"standard\",\n \"xo\",\n ],\n [INSTRUMENTATION]: [\"@opentelemetry/*\", \"dd-trace\", \"newrelic\"],\n [INFRASTRUCTURE]: [\n \"wrangler\",\n \"miniflare\",\n \"@cloudflare/vite-plugin\",\n \"@vercel/*\",\n \"@netlify/*\",\n \"aws-cdk\",\n \"aws-cdk-lib\",\n \"@pulumi/*\",\n \"cdktf\",\n ],\n};\n","export const tracedRules = {\n \"msch-lint/traced-elysia\": \"error\",\n \"msch-lint/traced-effect-run\": \"error\",\n} as const;\n","import remotion from \"@r_masseater/oxlint-typed-rules/remotion\";\n\nimport { allRulesOf } from \"./lint.config.ts\";\n\nexport const remotionRules = allRulesOf({ prefix: \"@remotion\", rules: remotion.rules });\n","import type { VideoIntro } from \"#/shared/config/index.ts\";\n\nexport interface VideoSayOptions {\n readonly terms?: Readonly<Record<string, string>>;\n readonly banned?: Readonly<Record<string, string>>;\n readonly maxEmphasis?: number;\n}\n\nexport interface VideoSeriesOptions {\n readonly values?: Readonly<Record<string, string>>;\n readonly voices?: readonly string[];\n readonly opener?: string;\n readonly closer?: string;\n readonly intro?: VideoIntro;\n readonly introValues?: Readonly<Record<string, string>>;\n readonly afterIntro?: Readonly<Record<string, string>>;\n}\n\nexport interface VideoRulesOptions {\n readonly say: VideoSayOptions;\n readonly series: Readonly<Record<string, VideoSeriesOptions>>;\n readonly banned?: Readonly<Record<string, string>>;\n}\n\nexport const videoRules = ({ say, series, banned = {} }: VideoRulesOptions) =>\n ({\n \"msch-lint/video-say\": [\"error\", say],\n \"msch-lint/video-readings\": \"error\",\n \"msch-lint/video-series\": [\"error\", { series, banned }],\n }) as const;\n","import type { WismConfig } from \"@r_masseater/wism\";\nimport { rustCrate, skill, structure, workspace } from \"@r_masseater/wism/presets\";\nimport { Array as Arr, Predicate, String as Str, pipe } from \"effect\";\n\nconst NEGATION = \"!\";\nconst isIgnore = Predicate.not(Str.startsWith(NEGATION));\n\nexport interface StructureOptions {\n readonly members: readonly string[];\n readonly ignorePatterns: readonly string[];\n}\n\nexport const structureOf = ({ members, ignorePatterns }: StructureOptions): WismConfig =>\n structure({\n kinds: [workspace({ paths: members }), rustCrate(), skill()],\n ignores: pipe(ignorePatterns, Arr.filter(isIgnore)),\n });\n","import { createRequire, registerHooks } from \"node:module\";\n\nexport const KUROMOJIN = \"kuromojin\";\nconst ON_Y8 = \"@r_masseater/y8/kuromojin\";\n\nexport const requireWithY8Kuromojin = (parentUrl: string): NodeJS.Require => {\n registerHooks({\n resolve: (specifier, context, nextResolve) => {\n if (specifier === KUROMOJIN) {\n return nextResolve(ON_Y8, { ...context, parentURL: import.meta.url });\n }\n return nextResolve(specifier, context);\n },\n });\n return createRequire(parentUrl);\n};\n","import presetJa from \"@r_masseater/textlint-rule-preset-ja\";\nimport type { ToolSections } from \"@r_masseater/vite-plus-adopt\";\nimport { Option, Predicate, Record as Rec, pipe } from \"effect\";\n\nimport { JAPANESE } from \"#/shared/config/index.ts\";\n\nimport { requireWithY8Kuromojin } from \"./kuromojin.config.ts\";\n\ntype Preset = NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"presets\"]>[string];\ntype Rule = Preset[\"rules\"][string];\ntype Reporter = Extract<Rule, (...args: never) => unknown>;\ntype Fixable = Exclude<Rule, Reporter>;\n\nconst NO_HANDLERS = {};\n\nconst isPreset = (value: unknown): value is Preset =>\n Predicate.hasProperty(value, \"rules\") &&\n Predicate.isObject(value.rules) &&\n Predicate.hasProperty(value, \"rulesConfig\") &&\n Predicate.isObject(value.rulesConfig);\n\nconst presetIn = (value: unknown): Option.Option<Preset> => {\n if (isPreset(value)) {\n return Option.some(value);\n }\n if (Predicate.hasProperty(value, \"default\")) {\n return presetIn(value.default);\n }\n return Option.none();\n};\n\nconst required = requireWithY8Kuromojin(import.meta.url);\n\nconst presetOf = (specifier: string, loaded: unknown): Preset =>\n Option.getOrThrowWith(\n presetIn(loaded),\n () => new TypeError(`${specifier} does not export a textlint preset`),\n );\n\nconst japaneseOnly =\n (reporter: Reporter): Reporter =>\n (context, options) => {\n if (JAPANESE.test(context.getSource())) {\n return reporter(context, options);\n }\n return NO_HANDLERS;\n };\n\nconst forJapanese = (rule: Reporter | Readonly<Fixable>): Rule => {\n if (Predicate.isFunction(rule)) {\n return japaneseOnly(rule);\n }\n return { linter: japaneseOnly(rule.linter), fixer: japaneseOnly(rule.fixer) };\n};\n\nconst japanesePreset = (specifier: string, loaded: unknown): Preset => {\n const { rules, rulesConfig } = presetOf(specifier, loaded);\n return { rules: pipe(rules, Rec.map(forJapanese)), rulesConfig };\n};\n\nexport const textlintPresets: NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"presets\"]> = {\n \"@r_masseater/preset-ja\": japanesePreset(\"@r_masseater/textlint-rule-preset-ja\", presetJa),\n \"@textlint-ja/preset-ai-writing\": japanesePreset(\n \"@textlint-ja/textlint-rule-preset-ai-writing\",\n required(\"@textlint-ja/textlint-rule-preset-ai-writing\"),\n ),\n \"preset-ja-technical-writing\": japanesePreset(\n \"textlint-rule-preset-ja-technical-writing\",\n required(\"textlint-rule-preset-ja-technical-writing\"),\n ),\n};\n","import { createRequire } from \"node:module\";\n\nimport type { ToolSections } from \"@r_masseater/vite-plus-adopt\";\nimport { Option, Predicate, pipe } from \"effect\";\n\ntype Filter = NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"filterModules\"]>[string];\n\nconst isFilter = (value: unknown): value is Filter => Predicate.isFunction(value);\n\nconst filterIn = (specifier: string, loaded: unknown): Filter =>\n pipe(\n Option.liftPredicate(loaded, isFilter),\n Option.getOrThrowWith(() => new TypeError(`${specifier} does not export a textlint filter`)),\n );\n\nexport const textlintFilters: NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"filterModules\"]> =\n {\n comments: filterIn(\n \"textlint-filter-rule-comments\",\n createRequire(import.meta.url)(\"textlint-filter-rule-comments\"),\n ),\n };\n","import type { Y8Config } from \"@r_masseater/y8\";\nimport { recommended } from \"@r_masseater/y8/presets\";\nimport type { RecommendedOptions } from \"@r_masseater/y8/presets\";\nimport { Option } from \"effect\";\n\nimport { exempt } from \"#/shared/config/index.ts\";\n\ntype SkillNames = NonNullable<NonNullable<RecommendedOptions[\"skills\"]>[\"skillNames\"]>;\n\nconst skillNamesOf = (indexSkill: Option.Option<string>): SkillNames =>\n Option.match(indexSkill, {\n onNone: (): SkillNames => ({}),\n onSome: (index): SkillNames => ({ index }),\n });\n\nconst docsOf = (indexSkill: Option.Option<string>): RecommendedOptions => {\n const skillNames = skillNamesOf(indexSkill);\n return {\n agents: {\n sections: [[\"Tech stack\"], [\"Commands\"], [\"Rules\"]],\n commands: [\"Commands\"],\n stack: [\"Tech stack\"],\n skillNames,\n },\n skills: { skillNames },\n };\n};\n\nexport const MARKDOWN_IGNORES = [\".agents/skills/**\", \"CHANGELOG.md\", \"**/CLAUDE.md\", ...exempt];\n\nexport const MARKDOWN_RULES = { \"agnix/XP-001\": \"off\" } as const;\n\nexport interface MarkdownOptions {\n readonly indexSkill: Option.Option<string>;\n readonly docs?: RecommendedOptions;\n}\n\nexport const markdownOf = ({ indexSkill, docs = {} }: MarkdownOptions): Y8Config => {\n const base = docsOf(indexSkill);\n return {\n extends: [\n recommended({\n ...base,\n ...docs,\n agents: { ...base.agents, ...docs.agents },\n skills: { ...base.skills, ...docs.skills },\n }),\n ],\n rules: MARKDOWN_RULES,\n reportUnusedDirectives: true,\n ignores: MARKDOWN_IGNORES,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAa,YAAY;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,gBAAgB,CAAC,gBAAgB;AAEvC,MAAM,WAAW,CAAC,gBAAgB;AAElC,MAAa,SAAS;CAAC,GAAG;CAAW,GAAG;CAAe,GAAG;AAAQ;;ACnBlE,MAAa,gBAAgB;CAC3B,4BAA4B;CAC5B,8BAA8B;CAC9B,mCAAmC;CACnC,8BAA8B;CAC9B,iCAAiC;CACjC,uCAAuC;CACvC,6BAA6B;CAC7B,oCAAoC;CACpC,8BAA8B;AAChC;AAEA,MAAa,wBAIT;CACF,OAAO,CAAC,SAAS;CACjB,cAAc,CAAC,cAAc;CAC7B,OAAO,EAAE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W;EACX,WAAW;EACX,cAAc;EACd,+BAA+B;CACjC;AACF;;ACpNA,MAAM,WAAW;AAEjB,MAAa,kBAAkB;AAC/B,MAAM,iBAAiB;AAEvB,MAAa,gBAA6D;EACvE,WAAW;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,uCAAuC;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,8CAA8C;EAC5C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,4CAA4C;EAC1C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,yBAAyB;EACvB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,uCAAuC;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,qCAAqC;EACnC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,yCAAyC;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,yCAAyC;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,8DAA8D,CAAC,QAAQ;CACvE,gCAAgC;EAC9B;EACA;EACA;EACA;EACA;EACA;CACF;CACA,kCAAkC;EAChC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,oBAAoB;EAClB;EACA;EACA;EACA;EACA;EACA;CACF;CACA,4BAA4B;EAC1B;EACA;EACA;EACA;EACA;CACF;CACA,sEAAsE;EACpE;EACA;EACA;EACA;EACA;EACA;CACF;EACC,kBAAkB;EAAC;EAAoB;EAAY;CAAU;EAC7D,iBAAiB;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;;ACrLA,MAAa,cAAc;CACzB,2BAA2B;CAC3B,+BA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ACF;AAEA,MAAa,mBAAmB;CAAC;CAAqB;CAAgB;CAAgB,GAAG;AAAM;AAE/F,MAAa,iBAAiB,EAAE,gBAAgB,MAAM;AAOtD,MAAa,cAAc,EAAE,YAAY,OAAO,CAAC,QAAmC;CAClF,MAAM,OAAO,OAAO,UAAU;CAC9B,OAAO;EACL,SAAS,CACP,YAAY;GACV,GAAG;GACH,GAAG;GACH,QAAQ;IAAE,GAAG,KAAK;IAAQ,GAAG,KAAK;GAAO;GACzC,QAAQ;IAAE,GAAG,KAAK;IAAQ,GAAG,KAAK;GAAO;EAC3C,CAAC,CACH;EACA,OAAO;EACP,wBAAwB;EACxB,SAAS;CACX;AACF"}
@@ -1,4 +1,4 @@
1
- import { i as nodeRepositoryFiles, r as RepositoryFiles } from "./repository-files-DSwKJnrj.mjs";
1
+ import { i as nodeRepositoryFiles, r as RepositoryFiles } from "./repository-files-BwjF-kJ8.mjs";
2
2
  import { Array, Effect, Function, HashSet, Option, String, pipe } from "effect";
3
3
  // src/shared/lib/reachable.ts
4
4
  const DATA_FIRST_ARITY = 2;
@@ -91,4 +91,4 @@ const collectPlacedIgnoredDirectories = Effect.fn("collectPlacedIgnoredDirectori
91
91
  const ignoredDirectories = (root) => Effect.runPromise(collectIgnoredDirectories(root).pipe(Effect.provide(nodeRepositoryFiles)));
92
92
  export { reachable as i, collectPlacedIgnoredDirectories as n, ignoredDirectories as r, collectIgnoredDirectories as t };
93
93
 
94
- //# sourceMappingURL=ignored-directories-D-7Rm_2X.mjs.map
94
+ //# sourceMappingURL=ignored-directories-DVyp8bfD.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ignored-directories-D-7Rm_2X.mjs","names":["Arr","Fn","Str","Arr"],"sources":["../src/shared/lib/reachable.ts","../src/shared/lib/ignored-directories.ts"],"sourcesContent":["import { Array as Arr, Function as Fn, HashSet, pipe } from \"effect\";\n\nexport type Edges = Readonly<Record<string, readonly string[]>>;\n\nconst DATA_FIRST_ARITY = 2;\n\nconst visit = (\n edges: Edges,\n seen: HashSet.HashSet<string>,\n frontier: readonly string[],\n): HashSet.HashSet<string> => {\n const fresh = HashSet.difference(HashSet.fromIterable(frontier), seen);\n if (HashSet.isEmpty(fresh)) {\n return seen;\n }\n const next = pipe(\n Arr.fromIterable(fresh),\n Arr.flatMap((id) => edges[id] ?? []),\n );\n return visit(edges, HashSet.union(seen, fresh), next);\n};\n\nexport const reachable: {\n (roots: readonly string[]): (edges: Edges) => readonly string[];\n (edges: Edges, roots: readonly string[]): readonly string[];\n} = Fn.dual(DATA_FIRST_ARITY, (edges: Edges, roots: readonly string[]): readonly string[] =>\n Arr.fromIterable(visit(edges, HashSet.empty(), roots)),\n);\n","import { Array as Arr, Effect, Option, String as Str, pipe } from \"effect\";\n\nimport { RepositoryFiles, nodeRepositoryFiles } from \"./repository-files.ts\";\n\nconst IGNORE_FILES = \":(glob)**/.gitignore\";\nconst SEPARATOR = \"/\";\nconst NEGATION = \"!\";\nconst CONTENTS = \"/**\";\nconst ROOT = \".\";\nconst ANYWHERE = \"**/\";\nconst READ_CONCURRENCY = 16;\nconst DIRECTORY_ENTRY = /^(?<anchor>\\/?)(?<name>[^!#/].*)\\/$/u;\nconst TOOL_DIRECTORIES = [\"**/node_modules/.vite*\"];\nconst WILDCARD = /[*?[]/u;\n\nexport interface IgnoredDirectory {\n readonly pattern: string;\n readonly base: \"workspace\";\n}\n\nconst scopedName = (anchor: string, name: string): string => {\n if (anchor === SEPARATOR || Str.includes(SEPARATOR)(name)) {\n return name;\n }\n return `${ANYWHERE}${name}`;\n};\n\nconst inDirectory =\n (directory: string) =>\n (glob: string): string => {\n if (directory === ROOT) {\n return glob;\n }\n return `${directory}${SEPARATOR}${glob}`;\n };\n\nconst globOf =\n (directory: string) =>\n (line: string): Option.Option<string> => {\n const found = DIRECTORY_ENTRY.exec(Str.trim(line));\n return pipe(\n Option.fromNullishOr(found),\n Option.flatMap(({ groups }) => Option.fromNullishOr(groups)),\n Option.flatMap(({ anchor, name }) =>\n Option.map(Option.fromNullishOr(name), (entry) => scopedName(anchor ?? \"\", entry)),\n ),\n Option.map(inDirectory(directory)),\n );\n };\n\nconst contentsOf = (glob: string): string => `:(glob)${glob}${CONTENTS}`;\n\nconst keptGlob = Effect.fn(\"keptGlob\")(function* keptGlob(root: string, glob: string) {\n const files = yield* RepositoryFiles;\n const listed = yield* files.trackedFiles(root, [contentsOf(glob)]);\n return Option.some(glob).pipe(Option.filter(() => Arr.isReadonlyArrayEmpty(listed)));\n});\n\nconst keptGlobs = Effect.fn(\"keptGlobs\")(function* keptGlobs(\n root: string,\n candidates: readonly string[],\n) {\n const files = yield* RepositoryFiles;\n const listed = yield* files.trackedFiles(root, pipe(candidates, Arr.map(contentsOf)));\n if (Arr.isReadonlyArrayEmpty(listed)) {\n return candidates;\n }\n const kept = yield* Effect.forEach(candidates, (glob) => keptGlob(root, glob), {\n concurrency: READ_CONCURRENCY,\n });\n return Arr.getSomes(kept);\n});\n\nconst globsIn = Effect.fn(\"globsIn\")(function* globsIn(root: string, file: string) {\n const files = yield* RepositoryFiles;\n const text = yield* files.readFile(files.join(root, file));\n const toGlob = globOf(files.dirname(file));\n return pipe(\n Option.getOrElse(text, () => \"\"),\n Str.split(\"\\n\"),\n Arr.map(toGlob),\n Arr.getSomes,\n );\n});\n\nconst ignoredGlobs = Effect.fn(\"ignoredGlobs\")(function* ignoredGlobs(root: string) {\n const files = yield* RepositoryFiles;\n const ignoreFiles = yield* files.trackedFiles(root, [IGNORE_FILES]);\n const globs = yield* Effect.forEach(ignoreFiles, (file) => globsIn(root, file), {\n concurrency: 1,\n });\n const kept = yield* keptGlobs(root, Arr.dedupe(Arr.flatten(globs)));\n return Arr.dedupe([...kept, ...TOOL_DIRECTORIES]);\n});\n\nconst exclusionsOf = (globs: readonly string[]): readonly IgnoredDirectory[] =>\n pipe(\n globs,\n Arr.flatMap((glob): readonly IgnoredDirectory[] => [\n { pattern: `${NEGATION}${glob}`, base: \"workspace\" },\n { pattern: `${NEGATION}${glob}${CONTENTS}`, base: \"workspace\" },\n ]),\n );\n\ninterface Placement {\n readonly parent: readonly string[];\n readonly name: string;\n}\n\nconst placementOf = (glob: string): Option.Option<Placement> =>\n pipe(\n Option.liftPredicate(glob, Str.startsWith(ANYWHERE)),\n Option.map((found) => Str.split(SEPARATOR)(Str.slice(ANYWHERE.length)(found))),\n Option.map((segments) => ({\n parent: Arr.initNonEmpty(segments),\n name: Arr.lastNonEmpty(segments),\n })),\n Option.filter(\n ({ parent }) =>\n Arr.isReadonlyArrayNonEmpty(parent) &&\n !pipe(\n parent,\n Arr.some((segment) => WILDCARD.test(segment)),\n ),\n ),\n );\n\nconst placesOf =\n (parent: readonly string[]) =>\n (file: string): readonly string[] => {\n const segments = Str.split(SEPARATOR)(file);\n return pipe(\n Arr.makeBy(segments.length - parent.length, (start) => start),\n Arr.filter((start) =>\n pipe(\n parent,\n Arr.every((segment, offset) => segments[start + offset] === segment),\n ),\n ),\n Arr.map((start) => Arr.join(Arr.take(segments, start + parent.length), SEPARATOR)),\n );\n };\n\nconst placedGlobs = Effect.fn(\"placedGlobs\")(function* placedGlobs(\n root: string,\n globs: readonly string[],\n) {\n const files = yield* RepositoryFiles;\n const parents = pipe(\n globs,\n Arr.flatMap((glob) => Option.toArray(placementOf(glob))),\n Arr.map(({ parent }) => contentsOf(`${ANYWHERE}${Arr.join(parent, SEPARATOR)}`)),\n );\n const listed = yield* files.trackedFiles(root, Arr.dedupe(parents));\n return pipe(\n globs,\n Arr.flatMap((glob) =>\n Option.match(placementOf(glob), {\n onNone: () => Arr.filter([glob], (kept) => !Str.startsWith(ANYWHERE)(kept)),\n onSome: ({ parent, name }) =>\n pipe(\n listed,\n Arr.flatMap(placesOf(parent)),\n Arr.dedupe,\n Arr.map((place) => `${place}${SEPARATOR}${name}`),\n ),\n }),\n ),\n );\n});\n\nexport const collectIgnoredDirectories = Effect.fn(\"collectIgnoredDirectories\")(\n function* collectIgnoredDirectories(root: string) {\n const globs = yield* ignoredGlobs(root);\n return exclusionsOf(globs);\n },\n);\n\nexport const collectPlacedIgnoredDirectories = Effect.fn(\"collectPlacedIgnoredDirectories\")(\n function* collectPlacedIgnoredDirectories(root: string) {\n const globs = yield* ignoredGlobs(root);\n const placed = yield* placedGlobs(root, globs);\n return exclusionsOf(placed);\n },\n);\n\nexport const ignoredDirectories = (root: string): Promise<readonly IgnoredDirectory[]> =>\n Effect.runPromise(collectIgnoredDirectories(root).pipe(Effect.provide(nodeRepositoryFiles)));\n"],"mappings":";;;AAIA,MAAM,mBAAmB;AAEzB,MAAM,SACJ,OACA,MACA,aAC4B;CAC5B,MAAM,QAAQ,QAAQ,WAAW,QAAQ,aAAa,QAAQ,GAAG,IAAI;CACrE,IAAI,QAAQ,QAAQ,KAAK,GACvB,OAAO;CAET,MAAM,OAAO,KACXA,MAAI,aAAa,KAAK,GACtBA,MAAI,SAAS,OAAO,MAAM,OAAO,CAAC,CAAC,CACrC;CACA,OAAO,MAAM,OAAO,QAAQ,MAAM,MAAM,KAAK,GAAG,IAAI;AACtD;AAEA,MAAa,YAGTC,SAAG,KAAK,mBAAmB,OAAc,UAC3CD,MAAI,aAAa,MAAM,OAAO,QAAQ,MAAM,GAAG,KAAK,CAAC,CACvD;;ACvBA,MAAM,eAAe;AACrB,MAAM,YAAY;AAClB,MAAM,WAAW;AACjB,MAAM,WAAW;AACjB,MAAM,OAAO;AACb,MAAM,WAAW;AACjB,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AACxB,MAAM,mBAAmB,CAAC,wBAAwB;AAClD,MAAM,WAAW;AAOjB,MAAM,cAAc,QAAgB,SAAyB;CAC3D,IAAI,WAAW,aAAaE,OAAI,SAAS,SAAS,CAAC,CAAC,IAAI,GACtD,OAAO;CAET,OAAO,GAAG,WAAW;AACvB;AAEA,MAAM,eACH,eACA,SAAyB;CACxB,IAAI,cAAc,MAChB,OAAO;CAET,OAAO,GAAG,YAAY,YAAY;AACpC;AAEF,MAAM,UACH,eACA,SAAwC;CACvC,MAAM,QA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AAC,KAAK,OAAO,QAAQ,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"ignored-directories-DVyp8bfD.mjs","names":["Arr","Fn","Str","Arr"],"sources":["../src/shared/lib/reachable.ts","../src/shared/lib/ignored-directories.ts"],"sourcesContent":["import { Array as Arr, Function as Fn, HashSet, pipe } from \"effect\";\n\nexport type Edges = Readonly<Record<string, readonly string[]>>;\n\nconst DATA_FIRST_ARITY = 2;\n\nconst visit = (\n edges: Edges,\n seen: HashSet.HashSet<string>,\n frontier: readonly string[],\n): HashSet.HashSet<string> => {\n const fresh = HashSet.difference(HashSet.fromIterable(frontier), seen);\n if (HashSet.isEmpty(fresh)) {\n return seen;\n }\n const next = pipe(\n Arr.fromIterable(fresh),\n Arr.flatMap((id) => edges[id] ?? []),\n );\n return visit(edges, HashSet.union(seen, fresh), next);\n};\n\nexport const reachable: {\n (roots: readonly string[]): (edges: Edges) => readonly string[];\n (edges: Edges, roots: readonly string[]): readonly string[];\n} = Fn.dual(DATA_FIRST_ARITY, (edges: Edges, roots: readonly string[]): readonly string[] =>\n Arr.fromIterable(visit(edges, HashSet.empty(), roots)),\n);\n","import { Array as Arr, Effect, Option, String as Str, pipe } from \"effect\";\n\nimport { RepositoryFiles, nodeRepositoryFiles } from \"./repository-files.ts\";\n\nconst IGNORE_FILES = \":(glob)**/.gitignore\";\nconst SEPARATOR = \"/\";\nconst NEGATION = \"!\";\nconst CONTENTS = \"/**\";\nconst ROOT = \".\";\nconst ANYWHERE = \"**/\";\nconst READ_CONCURRENCY = 16;\nconst DIRECTORY_ENTRY = /^(?<anchor>\\/?)(?<name>[^!#/].*)\\/$/u;\nconst TOOL_DIRECTORIES = [\"**/node_modules/.vite*\"];\nconst WILDCARD = /[*?[]/u;\n\nexport interface IgnoredDirectory {\n readonly pattern: string;\n readonly base: \"workspace\";\n}\n\nconst scopedName = (anchor: string, name: string): string => {\n if (anchor === SEPARATOR || Str.includes(SEPARATOR)(name)) {\n return name;\n }\n return `${ANYWHERE}${name}`;\n};\n\nconst inDirectory =\n (directory: string) =>\n (glob: string): string => {\n if (directory === ROOT) {\n return glob;\n }\n return `${directory}${SEPARATOR}${glob}`;\n };\n\nconst globOf =\n (directory: string) =>\n (line: string): Option.Option<string> => {\n const found = DIRECTORY_ENTRY.exec(Str.trim(line));\n return pipe(\n Option.fromNullishOr(found),\n Option.flatMap(({ groups }) => Option.fromNullishOr(groups)),\n Option.flatMap(({ anchor, name }) =>\n Option.map(Option.fromNullishOr(name), (entry) => scopedName(anchor ?? \"\", entry)),\n ),\n Option.map(inDirectory(directory)),\n );\n };\n\nconst contentsOf = (glob: string): string => `:(glob)${glob}${CONTENTS}`;\n\nconst keptGlob = Effect.fn(\"keptGlob\")(function* keptGlob(root: string, glob: string) {\n const files = yield* RepositoryFiles;\n const listed = yield* files.trackedFiles(root, [contentsOf(glob)]);\n return Option.some(glob).pipe(Option.filter(() => Arr.isReadonlyArrayEmpty(listed)));\n});\n\nconst keptGlobs = Effect.fn(\"keptGlobs\")(function* keptGlobs(\n root: string,\n candidates: readonly string[],\n) {\n const files = yield* RepositoryFiles;\n const listed = yield* files.trackedFiles(root, pipe(candidates, Arr.map(contentsOf)));\n if (Arr.isReadonlyArrayEmpty(listed)) {\n return candidates;\n }\n const kept = yield* Effect.forEach(candidates, (glob) => keptGlob(root, glob), {\n concurrency: READ_CONCURRENCY,\n });\n return Arr.getSomes(kept);\n});\n\nconst globsIn = Effect.fn(\"globsIn\")(function* globsIn(root: string, file: string) {\n const files = yield* RepositoryFiles;\n const text = yield* files.readFile(files.join(root, file));\n const toGlob = globOf(files.dirname(file));\n return pipe(\n Option.getOrElse(text, () => \"\"),\n Str.split(\"\\n\"),\n Arr.map(toGlob),\n Arr.getSomes,\n );\n});\n\nconst ignoredGlobs = Effect.fn(\"ignoredGlobs\")(function* ignoredGlobs(root: string) {\n const files = yield* RepositoryFiles;\n const ignoreFiles = yield* files.trackedFiles(root, [IGNORE_FILES]);\n const globs = yield* Effect.forEach(ignoreFiles, (file) => globsIn(root, file), {\n concurrency: 1,\n });\n const kept = yield* keptGlobs(root, Arr.dedupe(Arr.flatten(globs)));\n return Arr.dedupe([...kept, ...TOOL_DIRECTORIES]);\n});\n\nconst exclusionsOf = (globs: readonly string[]): readonly IgnoredDirectory[] =>\n pipe(\n globs,\n Arr.flatMap((glob): readonly IgnoredDirectory[] => [\n { pattern: `${NEGATION}${glob}`, base: \"workspace\" },\n { pattern: `${NEGATION}${glob}${CONTENTS}`, base: \"workspace\" },\n ]),\n );\n\ninterface Placement {\n readonly parent: readonly string[];\n readonly name: string;\n}\n\nconst placementOf = (glob: string): Option.Option<Placement> =>\n pipe(\n Option.liftPredicate(glob, Str.startsWith(ANYWHERE)),\n Option.map((found) => Str.split(SEPARATOR)(Str.slice(ANYWHERE.length)(found))),\n Option.map((segments) => ({\n parent: Arr.initNonEmpty(segments),\n name: Arr.lastNonEmpty(segments),\n })),\n Option.filter(\n ({ parent }) =>\n Arr.isReadonlyArrayNonEmpty(parent) &&\n !pipe(\n parent,\n Arr.some((segment) => WILDCARD.test(segment)),\n ),\n ),\n );\n\nconst placesOf =\n (parent: readonly string[]) =>\n (file: string): readonly string[] => {\n const segments = Str.split(SEPARATOR)(file);\n return pipe(\n Arr.makeBy(segments.length - parent.length, (start) => start),\n Arr.filter((start) =>\n pipe(\n parent,\n Arr.every((segment, offset) => segments[start + offset] === segment),\n ),\n ),\n Arr.map((start) => Arr.join(Arr.take(segments, start + parent.length), SEPARATOR)),\n );\n };\n\nconst placedGlobs = Effect.fn(\"placedGlobs\")(function* placedGlobs(\n root: string,\n globs: readonly string[],\n) {\n const files = yield* RepositoryFiles;\n const parents = pipe(\n globs,\n Arr.flatMap((glob) => Option.toArray(placementOf(glob))),\n Arr.map(({ parent }) => contentsOf(`${ANYWHERE}${Arr.join(parent, SEPARATOR)}`)),\n );\n const listed = yield* files.trackedFiles(root, Arr.dedupe(parents));\n return pipe(\n globs,\n Arr.flatMap((glob) =>\n Option.match(placementOf(glob), {\n onNone: () => Arr.filter([glob], (kept) => !Str.startsWith(ANYWHERE)(kept)),\n onSome: ({ parent, name }) =>\n pipe(\n listed,\n Arr.flatMap(placesOf(parent)),\n Arr.dedupe,\n Arr.map((place) => `${place}${SEPARATOR}${name}`),\n ),\n }),\n ),\n );\n});\n\nexport const collectIgnoredDirectories = Effect.fn(\"collectIgnoredDirectories\")(\n function* collectIgnoredDirectories(root: string) {\n const globs = yield* ignoredGlobs(root);\n return exclusionsOf(globs);\n },\n);\n\nexport const collectPlacedIgnoredDirectories = Effect.fn(\"collectPlacedIgnoredDirectories\")(\n function* collectPlacedIgnoredDirectories(root: string) {\n const globs = yield* ignoredGlobs(root);\n const placed = yield* placedGlobs(root, globs);\n return exclusionsOf(placed);\n },\n);\n\nexport const ignoredDirectories = (root: string): Promise<readonly IgnoredDirectory[]> =>\n Effect.runPromise(collectIgnoredDirectories(root).pipe(Effect.provide(nodeRepositoryFiles)));\n"],"mappings":";;;AAIA,MAAM,mBAAmB;AAEzB,MAAM,SACJ,OACA,MACA,aAC4B;CAC5B,MAAM,QAAQ,QAAQ,WAAW,QAAQ,aAAa,QAAQ,GAAG,IAAI;CACrE,IAAI,QAAQ,QAAQ,KAAK,GACvB,OAAO;CAET,MAAM,OAAO,KACXA,MAAI,aAAa,KAAK,GACtBA,MAAI,SAAS,OAAO,MAAM,OAAO,CAAC,CAAC,CACrC;CACA,OAAO,MAAM,OAAO,QAAQ,MAAM,MAAM,KAAK,GAAG,IAAI;AACtD;AAEA,MAAa,YAGTC,SAAG,KAAK,mBAAmB,OAAc,UAC3CD,MAAI,aAAa,MAAM,OAAO,QAAQ,MAAM,GAAG,KAAK,CAAC,CACvD;;ACvBA,MAAM,eAAe;AACrB,MAAM,YAAY;AAClB,MAAM,WAAW;AACjB,MAAM,WAAW;AACjB,MAAM,OAAO;AACb,MAAM,WAAW;AACjB,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AACxB,MAAM,mBAAmB,CAAC,wBAAwB;AAClD,M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ACtC,OAAO,aAAa,KAAK;AAC3B,CACF;AAEA,MAAa,kCAAkC,OAAO,GAAG,iCAAiC,CAAC,CACzF,UAAU,gCAAgC,MAAc;CACtD,MAAM,QAAQ,OAAO,aAAa,IAAI;CACtC,MAAM,SAAS,OAAO,YAAY,MAAM,KAAK;CAC7C,OAAO,aAAa,MAAM;AAC5B,CACF;AAEA,MAAa,sBAAsB,SACjC,OAAO,WAAW,0BAA0B,IAAI,CAAC,CAAC,KAAK,OAAO,QAAQ,mBAAmB,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { Context, Effect, FileSystem, Layer, Option, Path, Schema } from "effect";
2
- import "@r_masseater/masseater-utils/kestrion/pnpm";
3
2
  import { ChildProcessSpawner } from "effect/process";
3
+ import "@r_masseater/masseater-utils/kestrion/pnpm";
4
4
  import "@r_masseater/masseater-utils/kestrion";
5
5
  import { OxlintOverride } from "vite-plus/lint";
6
6
  interface WorkspaceTasks {
@@ -53,4 +53,4 @@ interface SettingsOptions {
53
53
  }
54
54
  declare const workspaceSettings: (options: SettingsOptions) => Promise<WorkspaceSettings>;
55
55
  export { WorkspaceSettings as a, DependencySets as c, WorkspaceTasks as d, WorkspaceLint as i, IgnoredDirectory as l, RuleSets as n, workspaceSettings as o, SettingsOptions as r, DependencyAllowance as s, RuleSet as t, ignoredDirectories as u };
56
- //# sourceMappingURL=index-Dm0Gg9wS.d.mts.map
56
+ //# sourceMappingURL=index-Cdap8t_F.d.mts.map
@@ -104,6 +104,7 @@ declare const lint$2: {
104
104
  "import/group-exports": "off";
105
105
  "import/exports-last": "off";
106
106
  "msch-lint/array-from-async": "error";
107
+ "msch-lint/declared-arguments": "error";
107
108
  "msch-lint/ecosystem-readers": "error";
108
109
  "msch-lint/explicit-import-path": "error";
109
110
  "msch-lint/get-or-insert": "error";
@@ -164,9 +165,6 @@ declare const lint$2: {
164
165
  overrides: ({
165
166
  files: string[];
166
167
  rules: Readonly<Record<string, "error">>;
167
- } | {
168
- files: string[];
169
- rules: Readonly<Record<string, "off">>;
170
168
  } | {
171
169
  files: string[];
172
170
  rules: {
@@ -189,11 +187,32 @@ declare const lint$2: {
189
187
  "oxc/no-async-await": "off";
190
188
  "unicorn/no-process-exit": "off";
191
189
  };
190
+ } | {
191
+ files: string[];
192
+ rules: {
193
+ "import/no-default-export": "off";
194
+ "eslint/max-lines"?: never;
195
+ "eslint/max-lines-per-function"?: never;
196
+ "baseline-js/use-baseline"?: never;
197
+ };
192
198
  } | {
193
199
  files: string[];
194
200
  rules: {
195
201
  "msch-lint/no-test-doubles": "error";
196
202
  "msch-lint/no-flake-masking": "error";
203
+ "import/no-default-export"?: never;
204
+ "msch-lint/declared-arguments": "off";
205
+ "eslint/max-lines"?: never;
206
+ "eslint/max-lines-per-function"?: never;
207
+ "baseline-js/use-baseline"?: never;
208
+ };
209
+ } | {
210
+ files: string[];
211
+ rules: {
212
+ "import/no-default-export"?: never;
213
+ "eslint/max-lines": "off";
214
+ "eslint/max-lines-per-function": "off";
215
+ "baseline-js/use-baseline": "off";
197
216
  };
198
217
  })[];
199
218
  settings: {
@@ -221,7 +240,7 @@ declare const alchemyOverride: {
221
240
  };
222
241
  declare const commandsOverride: {
223
242
  files: string[];
224
- rules: Readonly<Record<string, "off">>;
243
+ rules: Readonly<Record<string, "error">>;
225
244
  };
226
245
  declare const exempt: string[];
227
246
  /** @msch video.intro */
@@ -279,4 +298,4 @@ interface MarkdownOptions {
279
298
  }
280
299
  declare const markdownOf: ({ indexSkill, docs }: MarkdownOptions) => Y8Config;
281
300
  export { decisionRules as C, allRulesOf as S, exempt as _, _default as a, removalPolicyOverride as b, structureOf as c, VideoSeriesOptions as d, videoRules as f, requiredStack as g, INSTRUMENTATION as h, markdownOf as i, VideoRulesOptions as l, tracedRules as m, MARKDOWN_RULES as n, textlintFilters as o, remotionRules as p, MarkdownOptions as r, textlintPresets as s, MARKDOWN_IGNORES as t, VideoSayOptions as u, alchemyOverride as v, decisionTestRules as w, lint$2 as x, commandsOverride as y };
282
- //# sourceMappingURL=index-BeNrE8zK.d.mts.map
301
+ //# sourceMappingURL=index-DbmdHsLx.d.mts.map
@@ -78,7 +78,7 @@ const childrenOf = (keys, node) => pipe(Option.liftPredicate(node, Predicate.isO
78
78
  const descendants = (keys) => (node) => [node, ...pipe(childrenOf(keys, node), Array.flatMap(descendants(keys)))];
79
79
  const accessesIn = (scope) => (method) => (node) => pipe(descendants(scope.keys)(node), Array.map(accessOf(scope)(method)), Array.getSomes);
80
80
  // src/features/define-lint-rules/model/array-from-async.ts
81
- const MESSAGE$6 = "Collect an async iterable with Array.fromAsync, passing the mapping as its second argument. Do not push each item from a for await loop.";
81
+ const MESSAGE$7 = "Collect an async iterable with Array.fromAsync, passing the mapping as its second argument. Do not push each item from a for await loop.";
82
82
  const ONE$1 = 1;
83
83
  const DeclarationSchema = Schema.Struct({
84
84
  type: Schema.Literal("VariableDeclaration"),
@@ -112,7 +112,7 @@ const arrayFromAsync = {
112
112
  create: (context) => ({ ForOfStatement: (node) => {
113
113
  if (collectsByHand(node)) context.report({
114
114
  node,
115
- message: MESSAGE$6
115
+ message: MESSAGE$7
116
116
  });
117
117
  } })
118
118
  };
@@ -211,7 +211,7 @@ const typedRuleOf = ({ meta, visitorOf }) => withTypeInformation({
211
211
  });
212
212
  // src/features/define-lint-rules/model/explicit-import-path.ts
213
213
  const MESSAGE_ID$1 = "spellOut";
214
- const MESSAGE$5 = "`{{specifier}}` does not name a file. Write `{{fixed}}`: Node ESM and TypeScript nodenext resolve neither a missing extension nor a directory index, so spelling out the file works under every resolver.";
214
+ const MESSAGE$6 = "`{{specifier}}` does not name a file. Write `{{fixed}}`: Node ESM and TypeScript nodenext resolve neither a missing extension nor a directory index, so spelling out the file works under every resolver.";
215
215
  const RELATIVE = /^\.{1,2}(?:\/|$)/u;
216
216
  const PARTS = /^(?<path>[^?]*)(?<query>.*)$/su;
217
217
  const TRAILING_SEPARATORS = /\/+$/u;
@@ -268,12 +268,12 @@ const explicitImportPath = typedRuleOf({
268
268
  meta: {
269
269
  type: "suggestion",
270
270
  fixable: "code",
271
- messages: { [MESSAGE_ID$1]: MESSAGE$5 }
271
+ messages: { [MESSAGE_ID$1]: MESSAGE$6 }
272
272
  },
273
273
  visitorOf: visitorOf$1
274
274
  });
275
275
  // src/features/define-lint-rules/model/get-or-insert.ts
276
- const MESSAGE$4 = "Use getOrInsert or getOrInsertComputed on the Map or WeakMap, so that reading a key and storing its first value is one call. Do not read the key and then set it by hand.";
276
+ const MESSAGE$5 = "Use getOrInsert or getOrInsertComputed on the Map or WeakMap, so that reading a key and storing its first value is one call. Do not read the key and then set it by hand.";
277
277
  const ONE = 1;
278
278
  const TWO = 2;
279
279
  const OPTION_FROM = /^(?:Option\.)?from(?:NullishOr|UndefinedOr|Nullable)$/u;
@@ -382,24 +382,24 @@ const getOrInsert = {
382
382
  IfStatement: (node) => {
383
383
  if (isHasGuard(scope, node)) context.report({
384
384
  node,
385
- message: MESSAGE$4
385
+ message: MESSAGE$5
386
386
  });
387
387
  },
388
388
  BlockStatement: (node) => {
389
389
  for (const index of fallbackIndices(scope, node.body)) for (const statement of Option.toArray(Array.get(node.body, index))) context.report({
390
390
  node: statement,
391
- message: MESSAGE$4
391
+ message: MESSAGE$5
392
392
  });
393
393
  if (isMemoized(scope, node)) context.report({
394
394
  node,
395
- message: MESSAGE$4
395
+ message: MESSAGE$5
396
396
  });
397
397
  }
398
398
  };
399
399
  }
400
400
  };
401
401
  // src/features/define-lint-rules/model/inline-exports.ts
402
- const MESSAGE$3 = "export は宣言に付ける(export const・export function など)。ファイルの末尾で export { … } にまとめない。";
402
+ const MESSAGE$4 = "export は宣言に付ける(export const・export function など)。ファイルの末尾で export { … } にまとめない。";
403
403
  const TYPE = "type";
404
404
  const CLASS_NAME = "ClassName";
405
405
  const isList = (node) => node.declaration === null && node.source === null && !Array.isReadonlyArrayEmpty(node.specifiers);
@@ -414,7 +414,7 @@ const inlineExports = {
414
414
  create: (context) => ({ ExportNamedDeclaration: (node) => {
415
415
  if (isList(node) && !pipe(node.specifiers, Array.every(isTypeOnlyClass(context, node)))) context.report({
416
416
  node,
417
- message: MESSAGE$3
417
+ message: MESSAGE$4
418
418
  });
419
419
  } })
420
420
  };
@@ -423,7 +423,7 @@ const SOURCE = "/src/";
423
423
  const TOOL_LAYERS = ["features", "shared"];
424
424
  const TEST_FILE = /\.test(?:\.support)?\.[cm]?[jt]sx?$/u;
425
425
  const METHOD = "registerTool";
426
- const MESSAGE$2 = "Register an MCP tool in the features slice of the operation it performs. A tool is one operation, so app/ only composes the slices' register functions and entities/ only holds the data they share.";
426
+ const MESSAGE$3 = "Register an MCP tool in the features slice of the operation it performs. A tool is one operation, so app/ only composes the slices' register functions and entities/ only holds the data they share.";
427
427
  const layerIn = (path) => pipe(String$1.lastIndexOf(SOURCE)(path), Option.map((index) => Array.headNonEmpty(segments(String$1.slice(index + 5)(path)))));
428
428
  const layerOf = (filename) => layerIn(toPosix(filename));
429
429
  const outsideToolLayers = (filename) => !TEST_FILE.test(filename) && Option.exists(layerOf(filename), (layer) => !Array.contains(TOOL_LAYERS, layer));
@@ -435,7 +435,7 @@ const mcpToolLayer = {
435
435
  const { callee } = node;
436
436
  if (callee.type === "MemberExpression" && callee.property.type === "Identifier" && callee.property.name === METHOD) context.report({
437
437
  node: callee.property,
438
- message: MESSAGE$2
438
+ message: MESSAGE$3
439
439
  });
440
440
  } };
441
441
  }
@@ -559,7 +559,7 @@ const writablePartOf = (project) => (type) => {
559
559
  return partOf(type);
560
560
  };
561
561
  // src/features/define-lint-rules/model/readonly-parameters.ts
562
- const MESSAGE$1 = "A function must not be able to change its arguments, but {{part}}. Declare the parameter with a read-only type. Types declared by a package or by the language are exempt unless the language has a read-only form of them.";
562
+ const MESSAGE$2 = "A function must not be able to change its arguments, but {{part}}. Declare the parameter with a read-only type. Types declared by a package or by the language are exempt unless the language has a read-only form of them.";
563
563
  const MESSAGE_ID = "shouldBeReadonly";
564
564
  const WHOLE = "the type";
565
565
  const SEPARATOR = ".";
@@ -633,12 +633,12 @@ const visitorOf = (context, services) => {
633
633
  const readonlyParameters = typedRuleOf({
634
634
  meta: {
635
635
  type: "suggestion",
636
- messages: { [MESSAGE_ID]: MESSAGE$1 }
636
+ messages: { [MESSAGE_ID]: MESSAGE$2 }
637
637
  },
638
638
  visitorOf
639
639
  });
640
640
  // src/features/define-lint-rules/model/separate-min-max.ts
641
- const MESSAGE = "Select min and max in separate queries. SQLite uses an index for a lone min or max only, so one select with both reads every row in the range, and D1 bills each row read.";
641
+ const MESSAGE$1 = "Select min and max in separate queries. SQLite uses an index for a lone min or max only, so one select with both reads every row in the range, and D1 bills each row read.";
642
642
  const AggregateCallSchema = Schema.Struct({
643
643
  type: Schema.Literal("CallExpression"),
644
644
  callee: Schema.Struct({
@@ -677,7 +677,7 @@ const separateMinMax = {
677
677
  create: (context) => ({ CallExpression: (node) => {
678
678
  if (selectsBoth(node)) context.report({
679
679
  node,
680
- message: MESSAGE
680
+ message: MESSAGE$1
681
681
  });
682
682
  } })
683
683
  };
@@ -1323,6 +1323,18 @@ const INTENTS = {
1323
1323
  "run"
1324
1324
  ]
1325
1325
  }]
1326
+ },
1327
+ "declared-arguments": {
1328
+ message: "Declare what a command takes with Command, Flag and Argument from effect/cli, and pass the typed input to a function. Do not read the argument list by hand: hand-written parsing is code that only an entry has, so no other rule or test covers it.",
1329
+ imports: [],
1330
+ members: [{
1331
+ object: "process",
1332
+ properties: ["argv"]
1333
+ }, {
1334
+ object: "stdio",
1335
+ properties: ["args"]
1336
+ }],
1337
+ home: Option.none()
1326
1338
  }
1327
1339
  };
1328
1340
  // src/features/define-lint-rules/model/model-call-rules.ts
@@ -1415,11 +1427,32 @@ const TEST_HONESTY_RULES = {
1415
1427
  ]
1416
1428
  }
1417
1429
  };
1430
+ // src/features/define-lint-rules/model/wiring-only-commands.ts
1431
+ const MESSAGE = "Keep a command file to its imports and the call that starts the command. Put functions and classes in a slice under src, where the same lint rules, tests and unused-code checks cover them as any other code.";
1432
+ const wiringOnlyCommands = {
1433
+ meta: { type: "problem" },
1434
+ create: (context) => {
1435
+ const report = (node) => {
1436
+ context.report({
1437
+ node,
1438
+ message: MESSAGE
1439
+ });
1440
+ };
1441
+ return {
1442
+ FunctionDeclaration: report,
1443
+ FunctionExpression: report,
1444
+ ArrowFunctionExpression: report,
1445
+ ClassDeclaration: report,
1446
+ ClassExpression: report
1447
+ };
1448
+ }
1449
+ };
1418
1450
  // src/features/define-lint-rules/model/plugin.ts
1419
1451
  const mschLintPlugin = {
1420
1452
  meta: { name: "msch-lint" },
1421
1453
  rules: {
1422
1454
  ...CODED_RULES,
1455
+ "wiring-only-commands": wiringOnlyCommands,
1423
1456
  ...pipe(INTENTS, Record.map(ruleOf)),
1424
1457
  ...pipe({
1425
1458
  ...RESOURCE_RULES,