auto-mode 3.0.0 → 3.1.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.
@@ -1,14 +1,8 @@
1
1
  const KEY_COMMAND_MS = 5000;
2
2
  const JEV_MS = 5000;
3
3
  const JUDGE_MS = 120_000;
4
-
5
- // Node start, the config and scope reads, and the action log, none of which
6
- // waits on the network.
7
4
  const STARTUP_MS = 5000;
8
5
 
9
- // The CLI stops each step of one `run` at its limit. The worst case runs Jev
10
- // and the judge twice, on a named containment deny and on Jev's deny, each
11
- // after its own key command.
12
6
  export const CLI_LIMITS = {
13
7
  keyCommandMs: KEY_COMMAND_MS,
14
8
  jevMs: JEV_MS,
@@ -1,3 +1,3 @@
1
1
  // Composer, Remote Control and the SDK are the prompt origins a person types
2
- // into; any other origin is a delivery from a tool, not direct user evidence.
2
+ // into; any other origin is a delivery from a tool.
3
3
  export const MESSAGE_ORIGINS = ['composer', 'bridge', 'sdk'] as const;
@@ -1,5 +1,3 @@
1
- // The commands that can create a worktree, a branch, or a PR, keyed by program.
2
- // Each entry is the words that follow the program and its leading options.
3
1
  export const SCOPE_COMMANDS = {
4
2
  git: ['worktree add', 'checkout', 'switch', 'branch'],
5
3
  gh: ['pr create'],
@@ -1,7 +1,6 @@
1
1
  import { SCOPE_COMMANDS } from '../contract/scope-commands.ts';
2
2
 
3
- // A cheap gate before the record subprocess: options may sit between the
4
- // program and its subcommand, and the CLI parses the words exactly.
3
+ // Options may sit between the program and its subcommand on a command line.
5
4
  const SCOPE_COMMAND_PATTERN = new RegExp(
6
5
  Object.entries(SCOPE_COMMANDS)
7
6
  .map(([program, commands]) => {
@@ -1,7 +1,5 @@
1
1
  import type { ModVerdict } from '../contract/types.ts';
2
2
 
3
- // The CLI ships with this mod, so any other shape is a mismatched or broken CLI,
4
- // and only an exact verdict may replace the prompt.
5
3
  export function parseDecision(stdout: string): ModVerdict | null {
6
4
  let body: unknown;
7
5
 
@@ -7,8 +7,6 @@ import { isToolInput } from './is-tool-input.ts';
7
7
  import { parseDecision } from './parse-decision.ts';
8
8
  import type { ModOn, ModOptions, PromptContext } from './types.ts';
9
9
 
10
- // The record may look up a created PR's head branch with gh, which the CLI
11
- // bounds at 5 seconds.
12
10
  const RECORD_TIMEOUT_MS = 8000;
13
11
 
14
12
  export function register(on: ModOn, options: ModOptions): void {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-mode",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "A permission classifier library and Claude Code mod, so agents that are not Claude can run unattended",
5
5
  "keywords": [
6
6
  "agent",
@@ -64,40 +64,46 @@
64
64
  "prepare": "bash scripts/link-evals-package.sh && (command -v git > /dev/null 2>&1 && lefthook install --force || true)",
65
65
  "publint": "publint",
66
66
  "test": "bun run build && bun --no-env-file test --conditions=auto-mode-eval",
67
- "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p evals/tsconfig.json --noEmit",
67
+ "typecheck": "tsrs -p tsconfig.json --noEmit && tsrs -p evals/tsconfig.json --noEmit",
68
68
  "check:artifact": "bun --no-env-file scripts/check-artifact.ts",
69
69
  "check:claude-mod": "bun --no-env-file scripts/check-claude-mod.ts",
70
- "files:branch": "bun scripts/collect-branch-files.ts",
70
+ "files:branch": "bun scripts/read-branch-files.ts",
71
71
  "lint:files": "oxlint --no-error-on-unmatched-pattern",
72
- "test:related": "bun scripts/run-related-tests.ts"
72
+ "test:related": "bun scripts/run-related-tests.ts",
73
+ "check:commits": "bun scripts/run-commits-check.ts",
74
+ "check:local-paths": "bun scripts/run-local-paths-check.ts",
75
+ "check:test-timeouts": "bun scripts/run-test-timeouts-check.ts",
76
+ "check:workflows": "bun scripts/run-workflows-check.ts",
77
+ "memory-capped": "bash scripts/run-memory-capped.sh \"$(bun scripts/read-memory-budget.ts)\""
73
78
  },
74
79
  "devDependencies": {
75
- "@anthropic-ai/claude-agent-sdk": "0.3.296",
76
- "@commitlint/cli": "21.2.3",
80
+ "@anthropic-ai/claude-agent-sdk": "0.3.303",
81
+ "@commitlint/cli": "21.2.4",
77
82
  "@faker-js/faker": "10.6.0",
78
83
  "@stylistic/eslint-plugin": "5.10.0",
79
84
  "@tsconfig/strictest": "2.0.8",
80
- "@types/bun": "1.4.2",
85
+ "@types/bun": "1.4.3",
81
86
  "@types/node": "26.6.5",
82
87
  "@zgeoff/bun-test-extended": "0.2.1",
83
- "@zgeoff/format-codemod": "0.3.0",
84
- "@zgeoff/oxlint-config": "0.6.1",
85
- "@zgeoff/skill-gate": "0.2.2",
88
+ "@zgeoff/format-codemod": "0.3.3",
89
+ "@zgeoff/oxlint-config": "0.7.0",
90
+ "@zgeoff/skill-gate": "0.2.9",
86
91
  "gunshi": "1.0.0-rc.1",
87
- "knip": "6.41.0",
88
- "lefthook": "2.2.1",
92
+ "knip": "6.42.0",
93
+ "lefthook": "2.2.2",
89
94
  "mitata": "1.0.34",
90
95
  "msw": "2.15.0",
91
- "oxfmt": "0.72.0",
92
- "oxlint": "1.87.0",
96
+ "oxfmt": "0.73.0",
97
+ "oxlint": "1.88.0",
93
98
  "oxlint-tsgolint": "7.0.2004",
94
99
  "publint": "0.3.25",
95
- "re2js": "2.8.6",
100
+ "re2js": "2.8.8",
96
101
  "tiny-invariant": "1.3.3",
97
- "ts-pattern": "5.9.0",
102
+ "ts-pattern": "5.9.2",
98
103
  "tsdown": "0.23.1",
104
+ "tsrs": "0.18.0-ts7.1.0-dev.20260929",
99
105
  "typescript": "7.0.2",
100
- "zod": "4.6.6"
106
+ "zod": "4.6.7"
101
107
  },
102
108
  "overrides": {
103
109
  "smol-toml": "1.9.1"
package/policy/judge.md CHANGED
@@ -25,6 +25,8 @@ When neither reason clearly holds, confirm.
25
25
 
26
26
  Always confirm a HARD BLOCK rule and a configured hard deny entry. Consent never clears one, and you cannot overturn one; your task for these is the reason only.
27
27
 
28
+ One exception applies only to a deny whose own evidence holds `"misreadMayClear": true`, which only a HARD BLOCK rule can hold. You may overturn that deny with the basis `misread` when the facts show that the action cannot cause the harm its rule describes and that no other rule covers the action, including a SOFT BLOCK rule the classifier doubted. Otherwise confirm it. This exception changes nothing for any other deny.
29
+
28
30
  Confirm a SOFT BLOCK rule when the last direct user message is missing, when it does not name both the operation and the target, and when the action reaches past what it names.
29
31
 
30
32
  ## The reason
@@ -1 +0,0 @@
1
- export { t as startJudgeSession } from "./start-judge-session-vxiG-kDp.js";