vouchington-tooling 0.11.0 → 0.11.2
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 +17 -0
- package/dist/agent-blackboard/snapshot-cleanup-receipt.mjs +2 -0
- package/dist/agent-blackboard/snapshot-cleanup-resume.d.mts +1 -1
- package/dist/agent-blackboard/snapshot-cleanup-resume.mjs +3 -6
- package/dist/agent-harness-config/apply.d.mts +4 -0
- package/dist/agent-harness-config/apply.mjs +72 -0
- package/dist/agent-harness-config/cli.d.mts +10 -0
- package/dist/agent-harness-config/cli.mjs +100 -0
- package/dist/agent-harness-config/index.d.mts +4 -0
- package/dist/agent-harness-config/index.mjs +3 -0
- package/dist/agent-harness-config/merge-json.d.mts +5 -0
- package/dist/agent-harness-config/merge-json.mjs +62 -0
- package/dist/agent-harness-config/merge-toml.d.mts +6 -0
- package/dist/agent-harness-config/merge-toml.mjs +132 -0
- package/dist/agent-harness-config/paths.d.mts +3 -0
- package/dist/agent-harness-config/paths.mjs +117 -0
- package/dist/agent-harness-config/policy.d.mts +14 -0
- package/dist/agent-harness-config/policy.mjs +51 -0
- package/dist/agent-harness-config/prerequisites.d.mts +2 -0
- package/dist/agent-harness-config/prerequisites.mjs +67 -0
- package/dist/agent-harness-config/toml-value.d.mts +6 -0
- package/dist/agent-harness-config/toml-value.mjs +69 -0
- package/dist/agent-harness-config/types.d.mts +88 -0
- package/dist/agent-harness-config/types.mjs +1 -0
- package/dist/browser-session-runner/watchdog.mjs +1 -0
- package/dist/cli/index.mjs +9 -6
- package/dist/cli/parse.d.mts +3 -0
- package/dist/cli/parse.mjs +2 -0
- package/dist/cli/usage.d.mts +1 -1
- package/dist/cli/usage.mjs +5 -0
- package/dist/gha-artifacts-cleanup/classify.mjs +1 -0
- package/dist/gha-post-review/claude-token.mjs +2 -0
- package/dist/gha-post-review/github.mjs +1 -0
- package/dist/gha-post-review/post.mjs +7 -1
- package/dist/gha-pr-checkpoint/codec.mjs +1 -0
- package/dist/gha-review-payload/diff.mjs +1 -0
- package/dist/gha-review-payload/payload.mjs +2 -0
- package/dist/gha-workspace-policy/shared.mjs +1 -0
- package/dist/http-link-pagination/index.mjs +1 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +1 -0
- package/dist/pnpm-deploy/normalize.mjs +1 -0
- package/dist/pnpm-install/install-operations.d.mts +2 -1
- package/dist/pnpm-install/install-operations.mjs +16 -4
- package/dist/pnpm-install/metadata.d.mts +3 -3
- package/dist/pnpm-install/metadata.mjs +10 -24
- package/dist/pnpm-install/pending-builds.d.mts +6 -14
- package/dist/pnpm-install/pending-builds.mjs +23 -91
- package/dist/pnpm-install/pnpm-install-fake-pnpm.test-helpers.mjs +15 -1
- package/dist/pnpm-install/runner.mjs +27 -59
- package/dist/pnpm-install/transition.d.mts +2 -7
- package/dist/pnpm-install/transition.mjs +3 -11
- package/dist/runner-port-policy/index.mjs +2 -0
- package/dist/session-friction/log.mjs +1 -0
- package/dist/skill-discovery/manifest.mjs +2 -0
- package/dist/sql-ast/constraint-do-block.mjs +1 -0
- package/dist/sql-ast/drop-index.mjs +2 -0
- package/dist/vitest-blob-manifest/reports-cli.mjs +2 -0
- package/docs/agent-harness-config.md +134 -0
- package/package.json +8 -1
- package/dist/cli/commands/post-review.d.mts +0 -1
- package/dist/cli/commands/post-review.mjs +0 -4
- package/dist/cli/commands/stage-review-payload.d.mts +0 -1
- package/dist/cli/commands/stage-review-payload.mjs +0 -4
- package/dist/cli/commands/swift-semantic-equal.d.mts +0 -1
- package/dist/cli/commands/swift-semantic-equal.mjs +0 -4
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Agent harness config
|
|
2
|
+
|
|
3
|
+
`vouchington agent-harness-config` merges a portable **classifier-auto + sandbox**
|
|
4
|
+
policy into Claude, Codex, Grok, and Cursor config files. It does not copy
|
|
5
|
+
allowlists, hooks, plugins, MCP servers, or models.
|
|
6
|
+
|
|
7
|
+
Use it to keep local interactive sessions on a permission classifier (routine
|
|
8
|
+
work proceeds, risky calls still prompt) with an OS sandbox enabled.
|
|
9
|
+
|
|
10
|
+
## Classifier vs always-approve
|
|
11
|
+
|
|
12
|
+
Always-approve / YOLO is not the same as classifier auto. Cursor
|
|
13
|
+
`unrestricted` also forces the sandbox off.
|
|
14
|
+
|
|
15
|
+
| Harness | Classifier (this tool writes) | Do not use | Sandbox |
|
|
16
|
+
| ------- | ------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------ |
|
|
17
|
+
| Claude | `permissions.defaultMode = "auto"` | `bypassPermissions` | `sandbox.enabled = true`, fail closed if unavailable |
|
|
18
|
+
| Codex | `approval_policy = "on-request"` and `approvals_reviewer = "auto_review"` | `approval_policy = "never"` | `sandbox_mode = "workspace-write"` plus extra writable roots |
|
|
19
|
+
| Grok | `ui.permission_mode = "auto"` | `always-approve` / `bypassPermissions` / `--yolo` | defines `workspace-write`; invoke with `--sandbox workspace-write` |
|
|
20
|
+
| Cursor | `approvalMode = "auto-review"` | `unrestricted` (`--force` / `--yolo`) | `sandbox.mode = "enabled"` |
|
|
21
|
+
|
|
22
|
+
Grok Auto is a separate mode from plan. Shift+Tab is `Normal → Plan → Auto
|
|
23
|
+
(when enabled) → Always-approve`. The tool also writes `auto_mode.enabled =
|
|
24
|
+
true` and `default_auto_mode = true` so Auto is available by default and
|
|
25
|
+
stays the permission classifier under plan mode. Plan-file edits remain
|
|
26
|
+
auto-approved; other file edits stay blocked. That is not YOLO.
|
|
27
|
+
|
|
28
|
+
Repo Claude settings set `sandbox.enabled` and `sandbox.failIfUnavailable`.
|
|
29
|
+
They do not change a
|
|
30
|
+
project `permissions.defaultMode` of `"plan"`.
|
|
31
|
+
|
|
32
|
+
Grok config can define a sandbox profile but cannot activate it for a future
|
|
33
|
+
session. Start Grok with `--sandbox workspace-write`; `check` reports this as
|
|
34
|
+
an unmet manual prerequisite so it never claims the profile is active.
|
|
35
|
+
|
|
36
|
+
## CLI
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
vouchington agent-harness-config dump
|
|
40
|
+
vouchington agent-harness-config check --global
|
|
41
|
+
vouchington agent-harness-config check --repo /path/to/checkout
|
|
42
|
+
vouchington agent-harness-config apply --global --repo /path --repo /other
|
|
43
|
+
vouchington agent-harness-config apply --global --harness grok --harness cursor
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- `dump` prints the canonical key map as JSON. It does not need `--global` or `--repo`.
|
|
47
|
+
- `check` and `apply` require at least one of `--global` or `--repo` (repeatable).
|
|
48
|
+
- `--harness` filters to `claude`, `codex`, `grok`, or `cursor`. Default is all four.
|
|
49
|
+
- `--home` overrides the user home directory (tests and nonstandard layouts).
|
|
50
|
+
- `check` exits `0` when every targeted file and prerequisite matches, `1` on drift or an unmet prerequisite, and `2` on usage errors.
|
|
51
|
+
- `apply` writes only drifted keys, then exits `1` when a prerequisite remains unmet and `2` on I/O or usage errors.
|
|
52
|
+
|
|
53
|
+
## Library
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import {
|
|
57
|
+
applyHarnessConfig,
|
|
58
|
+
checkHarnessConfig,
|
|
59
|
+
dumpHarnessPolicy,
|
|
60
|
+
planHarnessConfig,
|
|
61
|
+
} from 'vouchington-tooling/agent-harness-config'
|
|
62
|
+
|
|
63
|
+
const dump = dumpHarnessPolicy()
|
|
64
|
+
await checkHarnessConfig({ kind: 'global' }, { home: '/tmp/isolated-home' })
|
|
65
|
+
await applyHarnessConfig({ kind: 'repo', root: '/path/to/checkout' }, { harnesses: ['grok'] })
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Pass `home` in options so tests never touch the real `~/.claude` or `~/.cursor`.
|
|
69
|
+
`extraWritableRoots` replaces the shipped toolchain cache list.
|
|
70
|
+
|
|
71
|
+
## Files
|
|
72
|
+
|
|
73
|
+
Global (`--global`, under `$HOME` or `--home`):
|
|
74
|
+
|
|
75
|
+
| File | Keys |
|
|
76
|
+
| ------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
77
|
+
| `.claude/settings.json` | `permissions.defaultMode`, `sandbox.enabled`, `sandbox.failIfUnavailable`, `useAutoModeDuringPlan` |
|
|
78
|
+
| `.codex/config.toml` | `approval_policy`, `approvals_reviewer`, `sandbox_mode`, `[sandbox_workspace_write]` |
|
|
79
|
+
| `.grok/sandbox.toml` | `[profiles.workspace-write]` extra roots (written first) |
|
|
80
|
+
| `.grok/config.toml` | `ui.permission_mode`, `auto_mode.enabled`, `default_auto_mode` |
|
|
81
|
+
| `.cursor/cli-config.json` | `approvalMode`, `sandbox.mode` |
|
|
82
|
+
|
|
83
|
+
The Grok profile is selected per invocation with `--sandbox workspace-write`.
|
|
84
|
+
|
|
85
|
+
Repo (`--repo`):
|
|
86
|
+
|
|
87
|
+
| File | Keys |
|
|
88
|
+
| ----------------------- | ------------------------------------------------------------------------------- |
|
|
89
|
+
| `.claude/settings.json` | `sandbox.enabled`, `sandbox.failIfUnavailable`, `sandbox.filesystem.allowWrite` |
|
|
90
|
+
| `.codex/config.toml` | same Codex keys as global |
|
|
91
|
+
| `.grok/sandbox.toml` | extra roots only (project config cannot set the default profile) |
|
|
92
|
+
| `.cursor/sandbox.json` | `workspace_readwrite` extra roots and `networkPolicy.default = allow` |
|
|
93
|
+
|
|
94
|
+
Repo-local classifier settings have user-level prerequisites:
|
|
95
|
+
|
|
96
|
+
- Codex loads `.codex/config.toml` only after the absolute checkout path has
|
|
97
|
+
`trust_level = "trusted"` in `~/.codex/config.toml`. This command checks that
|
|
98
|
+
entry but never creates or changes it.
|
|
99
|
+
- Cursor approval mode belongs in `~/.cursor/cli-config.json`; the repo command
|
|
100
|
+
checks for global `auto-review` and intentionally leaves `.cursor/cli.json`
|
|
101
|
+
untouched.
|
|
102
|
+
- Grok sandbox activation is per invocation as described above.
|
|
103
|
+
|
|
104
|
+
These scope boundaries follow the current vendor references for
|
|
105
|
+
[Claude sandboxing](https://code.claude.com/docs/en/sandboxing),
|
|
106
|
+
[Codex project config](https://developers.openai.com/codex/config-reference),
|
|
107
|
+
[Grok settings](https://docs.x.ai/build/settings),
|
|
108
|
+
[Grok permissions](https://docs.x.ai/build/features/permissions),
|
|
109
|
+
[Cursor CLI config](https://prod.cursor.com/docs/cli/reference/configuration), and
|
|
110
|
+
[Cursor repo sandbox config](https://prod.cursor.com/docs/reference/sandbox).
|
|
111
|
+
|
|
112
|
+
Missing files are created with only these keys. Sibling keys are preserved.
|
|
113
|
+
JSON is pretty-printed with a trailing newline. TOML upserts named keys
|
|
114
|
+
without rewriting unrelated tables such as `[[marketplace.sources]]` or
|
|
115
|
+
`[projects."…"]`.
|
|
116
|
+
|
|
117
|
+
## Extra writable roots
|
|
118
|
+
|
|
119
|
+
The default list is toolchain caches, not product paths:
|
|
120
|
+
|
|
121
|
+
- `~/.cargo`
|
|
122
|
+
- `~/Library/pnpm`, `~/.local/share/pnpm`, `~/.pnpm-store`
|
|
123
|
+
- `~/Library/Caches/pnpm`, `~/.cache/pnpm`
|
|
124
|
+
- `~/.pnpm-state`, `~/.local/state/pnpm`
|
|
125
|
+
- `~/Library/Caches/no-mistakes`, `~/.cache/no-mistakes`
|
|
126
|
+
- `/var/folders`, `/private/var/folders`
|
|
127
|
+
|
|
128
|
+
Replace the list through `extraWritableRoots` when a checkout needs different roots.
|
|
129
|
+
|
|
130
|
+
## Out of scope
|
|
131
|
+
|
|
132
|
+
The tool does not copy permission allow/deny lists, `sandbox.excludedCommands`,
|
|
133
|
+
hooks, plugins, MCP servers, or model settings. Those stay in each checkout
|
|
134
|
+
or user config.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vouchington-tooling",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Vouchington CLI and extractable tooling libraries.",
|
|
5
5
|
"homepage": "https://github.com/vouchington/vouchington-tooling/tree/main/packages/vouchington-tooling#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"ast-grep",
|
|
21
21
|
"dist",
|
|
22
|
+
"docs",
|
|
22
23
|
"skills",
|
|
23
24
|
"scripts",
|
|
24
25
|
"README.md"
|
|
@@ -102,6 +103,11 @@
|
|
|
102
103
|
"import": "./dist/ast-grep-pack/index.mjs",
|
|
103
104
|
"default": "./dist/ast-grep-pack/index.mjs"
|
|
104
105
|
},
|
|
106
|
+
"./agent-harness-config": {
|
|
107
|
+
"types": "./dist/agent-harness-config/index.d.mts",
|
|
108
|
+
"import": "./dist/agent-harness-config/index.mjs",
|
|
109
|
+
"default": "./dist/agent-harness-config/index.mjs"
|
|
110
|
+
},
|
|
105
111
|
"./vitest-blob-manifest": {
|
|
106
112
|
"types": "./dist/vitest-blob-manifest/index.d.mts",
|
|
107
113
|
"import": "./dist/vitest-blob-manifest/index.mjs",
|
|
@@ -287,6 +293,7 @@
|
|
|
287
293
|
"csv-stringify": "6.8.3",
|
|
288
294
|
"dockerfile-ast": "0.7.1",
|
|
289
295
|
"picomatch": "4.0.7",
|
|
296
|
+
"smol-toml": "1.8.0",
|
|
290
297
|
"yaml": "2.9.0"
|
|
291
298
|
},
|
|
292
299
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runPostReviewCommand(): Promise<number>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runStageReviewPayloadCommand(args: readonly string[]): number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runSwiftSemanticEqualCommand(args: readonly string[]): number;
|