@r_masseater/msch 0.121.2 → 0.122.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r_masseater/msch",
3
- "version": "0.121.2",
3
+ "version": "0.122.0",
4
4
  "description": "A check policy for repositories: points every finite value set and object shape at its one owner, and ships the oxlint preset of plugins and rules.",
5
5
  "keywords": [
6
6
  "lint",
@@ -46,7 +46,7 @@ A rule that no code can decide, such as a README that copies what the code shows
46
46
 
47
47
  Run it from a cloud session as a step of the daily audit, not in `verify`, a hook or CI, because a model does not answer the same way twice. The cache directory must live outside the repository, such as a folder of the project, so that nothing is committed and every repository shares one cache. The cache key holds the rule, the model, the prompt version, the target file and the context files, so a verdict changes only when one of them changes.
48
48
 
49
- A rule that reads one file goes to the Cloudflare decision model and needs `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID`. A rule that must read other files goes to a Claude Agent SDK query in a temporary folder that holds only the target file and the declared context files, with read-only tools. The SDK is an optional peer dependency: add `@anthropic-ai/claude-agent-sdk` to the devDependencies of the repository root. It runs on the logged-in subscription or `CLAUDE_CODE_OAUTH_TOKEN`, so no API key is needed. A violation must quote the offending text exactly. A verdict whose quote is not in the file is discarded as `judge-unknown`, as is a pair that could not be decided, and neither is cached, so the next run asks again.
49
+ A rule that reads one file goes to the Cloudflare decision model and needs `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID`. To send the decision model somewhere other than the shell's Cloudflare account, such as a relay that a sandbox reaches, set `MSCH_JUDGE_CLOUDFLARE_API_TOKEN`, `MSCH_JUDGE_CLOUDFLARE_ACCOUNT_ID`, `MSCH_JUDGE_CLOUDFLARE_API_BASE_URL` or `MSCH_JUDGE_CLOUDFLARE_AI_GATEWAY_ID`; each one that is set replaces its unprefixed name for msch only, so other Cloudflare tools in the same shell are not redirected. A rule that must read other files goes to a Claude Agent SDK query in a temporary folder that holds only the target file and the declared context files, with read-only tools. The SDK is an optional peer dependency: add `@anthropic-ai/claude-agent-sdk` to the devDependencies of the repository root. It runs on the logged-in subscription or `CLAUDE_CODE_OAUTH_TOKEN`, so no API key is needed. A violation must quote the offending text exactly. A verdict whose quote is not in the file is discarded as `judge-unknown`, as is a pair that could not be decided, and neither is cached, so the next run asks again.
50
50
 
51
51
  To add a rule, add it to `JUDGE_RULES` in `src/features/judge-documents/model/judge-rules.ts` in msch's own repository, which the `repository` field of its `package.json` names, with its file globs, an English question that tells the model when to answer no, and a message that names the fix and its reason.
52
52