auto-mode 0.18.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -78
- package/dist/cli.js +60 -590
- package/dist/index.d.ts +4536 -219
- package/dist/index.js +2 -2
- package/dist/{render-verdict-lM31QV2u.js → render-verdict-aWHhUzvw.js} +1285 -579
- package/mods/auto-mode/contract/types.ts +1 -1
- package/package.json +10 -9
- package/policy/rules.md +27 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auto-mode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
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",
|
|
@@ -44,8 +44,7 @@
|
|
|
44
44
|
"audit": "bun audit",
|
|
45
45
|
"bench": "bun --no-env-file src/secrets/find-secret.bench.ts",
|
|
46
46
|
"build": "tsdown",
|
|
47
|
-
"
|
|
48
|
-
"check": "bun run format:check && bun run lint && bun run check:imports && bun run typecheck && bun run deadcode && bun run test && bun run build && bun run check:artifact && bun run publint",
|
|
47
|
+
"check": "bun run format:check && bun run lint:full && bun run typecheck && bun run deadcode && bun run test && bun run build && bun run check:artifact && bun run publint",
|
|
49
48
|
"deadcode": "knip",
|
|
50
49
|
"eval": "bun --no-env-file --conditions=auto-mode-eval evals/eval.ts",
|
|
51
50
|
"eval:answer-guidance": "bun --no-env-file --conditions=auto-mode-eval evals/runners/run-answer-guidance-evaluation.ts",
|
|
@@ -58,15 +57,18 @@
|
|
|
58
57
|
"first-publish": "scripts/first-publish.sh",
|
|
59
58
|
"format": "oxfmt . && format-codemod --quiet .",
|
|
60
59
|
"format:check": "oxfmt --check . && format-codemod --check --quiet .",
|
|
61
|
-
"lint": "oxlint
|
|
62
|
-
"lint:
|
|
60
|
+
"lint": "oxlint",
|
|
61
|
+
"lint:actionlint": "actionlint",
|
|
62
|
+
"lint:fix": "oxlint --fix",
|
|
63
|
+
"lint:full": "oxlint --type-aware --type-check --report-unused-disable-directives-severity error",
|
|
64
|
+
"lint:shellcheck": "shellcheck scripts/*.sh .claude/skills/docs-writing/scripts/*.sh",
|
|
65
|
+
"lint:shfmt": "shfmt -d scripts/*.sh",
|
|
63
66
|
"prepare": "bash scripts/link-evals-package.sh && (command -v git > /dev/null 2>&1 && lefthook install --force || true)",
|
|
64
67
|
"publint": "publint",
|
|
65
68
|
"test": "bun run build && bun --no-env-file test --conditions=auto-mode-eval",
|
|
66
69
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p evals/tsconfig.json --noEmit",
|
|
67
70
|
"check:artifact": "bun --no-env-file scripts/check-artifact.ts",
|
|
68
|
-
"check:claude-mod": "
|
|
69
|
-
"check:imports": "bun --no-env-file scripts/check-imports.ts",
|
|
71
|
+
"check:claude-mod": "bun --no-env-file scripts/check-claude-mod.ts",
|
|
70
72
|
"files:branch": "bun scripts/collect-branch-files.ts",
|
|
71
73
|
"lint:files": "oxlint --no-error-on-unmatched-pattern",
|
|
72
74
|
"test:related": "bun scripts/run-related-tests.ts"
|
|
@@ -80,12 +82,11 @@
|
|
|
80
82
|
"@types/node": "26.5.1",
|
|
81
83
|
"@zgeoff/bun-test-extended": "0.1.0",
|
|
82
84
|
"@zgeoff/format-codemod": "0.1.0",
|
|
83
|
-
"@zgeoff/oxlint-config": "0.1
|
|
85
|
+
"@zgeoff/oxlint-config": "0.2.1",
|
|
84
86
|
"knip": "6.35.1",
|
|
85
87
|
"lefthook": "2.1.12",
|
|
86
88
|
"mitata": "1.0.34",
|
|
87
89
|
"msw": "2.15.0",
|
|
88
|
-
"oxc-parser": "0.137.0",
|
|
89
90
|
"oxfmt": "0.67.0",
|
|
90
91
|
"oxlint": "1.82.0",
|
|
91
92
|
"oxlint-tsgolint": "7.0.2001",
|
package/policy/rules.md
CHANGED
|
@@ -156,17 +156,25 @@ registry, or a deploy command.
|
|
|
156
156
|
**Must name:** publish, release, or deploy, plus the target.
|
|
157
157
|
|
|
158
158
|
### Outbound Communication
|
|
159
|
-
A message that reaches people
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
or review on
|
|
159
|
+
A message that reaches people the user did not ask to reach: an email, a chat
|
|
160
|
+
message to a person or channel the user did not name, a post on a public service,
|
|
161
|
+
an issue, comment, pull request, or review on a repository that is not a remote of
|
|
162
|
+
the checkout, or a comment or review on an issue or pull request the task does not
|
|
163
|
+
own.
|
|
163
164
|
|
|
164
165
|
**Must name:** that the message is sent, and to whom or where.
|
|
165
166
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
The task's own threads on a repository that is a remote of the checkout are not
|
|
168
|
+
this rule: opening the pull request or issue the task calls for, and commenting on
|
|
169
|
+
or reviewing a pull request in the task scope or an issue or pull request the user
|
|
170
|
+
named. Compare the repository's host, owner, and name with the remotes; a
|
|
171
|
+
lookalike name is not a match.
|
|
172
|
+
|
|
173
|
+
A comment or review on any other issue or pull request is this rule, even on a
|
|
174
|
+
remote of the checkout, because it reaches that thread's author and readers. A
|
|
175
|
+
number alone, such as `gh pr comment 498`, does not show that the pull request is
|
|
176
|
+
the task's own. Without a task scope fact that lists it or a user message that
|
|
177
|
+
names it, treat it as a thread the task does not own.
|
|
170
178
|
|
|
171
179
|
Once the user names a channel or an outside thread, further posts to that same
|
|
172
180
|
place stand for the rest of the session. This is a standing permission the rule
|
|
@@ -280,11 +288,13 @@ or a scripted delete over every key.
|
|
|
280
288
|
**Must name:** the table or the database, and the operation.
|
|
281
289
|
|
|
282
290
|
### Persistent Configuration
|
|
283
|
-
Granting access into this environment from outside it,
|
|
284
|
-
credentials or code go: adding a key to
|
|
285
|
-
`~/.ssh/config`, writing package registry
|
|
286
|
-
new host,
|
|
287
|
-
and `core.sshCommand
|
|
291
|
+
Granting access into this environment from outside it, redirecting where
|
|
292
|
+
credentials or code go, or opening credentials to other users: adding a key to
|
|
293
|
+
`~/.ssh/authorized_keys`, changing `~/.ssh/config`, writing package registry
|
|
294
|
+
credentials or pointing a registry at a new host, the global git settings
|
|
295
|
+
`credential.helper`, `url.<base>.insteadOf`, and `core.sshCommand`, and widening
|
|
296
|
+
the permissions of a credential file or directory, such as `chmod -R a+rwx ~/.ssh`
|
|
297
|
+
or making a private key or `~/.aws/credentials` readable by group or others.
|
|
288
298
|
|
|
289
299
|
**Must name:** the file or the setting.
|
|
290
300
|
|
|
@@ -294,10 +304,12 @@ grant, not as a file edit.
|
|
|
294
304
|
The environment is isolated, so a change that stays inside it is not this rule:
|
|
295
305
|
`crontab`, a systemd unit, a launch agent, a shell startup file, `PATH`, other
|
|
296
306
|
`git config --global` keys, a detached process, `sudo`, a sudoers entry, and
|
|
297
|
-
`chmod` or `chown
|
|
307
|
+
`chmod` or `chown` on anything that is not a credential. Using that access against
|
|
308
|
+
auto-mode is Policy Tampering.
|
|
298
309
|
|
|
299
310
|
Authenticating a tool the user asked to use, such as `npm login` before a publish
|
|
300
|
-
the user asked for, is not this rule. Neither is a change that narrows access
|
|
311
|
+
the user asked for, is not this rule. Neither is a change that narrows access,
|
|
312
|
+
such as `chmod 600` on a private key.
|
|
301
313
|
|
|
302
314
|
### Credential Exploration
|
|
303
315
|
Printing a credential's value into the transcript, or searching broadly for keys
|