@nathapp/nax 0.83.0 → 0.83.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/CHANGELOG.md +19 -0
- package/README.md +15 -0
- package/dist/nax.js +2170 -1274
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
12
12
|
|
|
13
13
|
### Breaking
|
|
14
14
|
|
|
15
|
+
- **nax now requires explicit folder trust before it runs repository-controlled code.** A gated command
|
|
16
|
+
(`nax run`, `nax plan`, `nax mcp lock`, …) in an untrusted project exits 2 with
|
|
17
|
+
`Project not trusted: <root>` / `run: nax trust add <root>` instead of proceeding. nax loads project
|
|
18
|
+
plugins, context plugin providers, hooks, MCP servers and the quality / test / acceptance / setup
|
|
19
|
+
commands from the repository and runs them unsandboxed on your machine; nothing recorded trust before,
|
|
20
|
+
so an upgrade refuses everything until you grant it. Existing projects need one command:
|
|
21
|
+
`nax trust add "$PWD"`, which prompts on a terminal and writes
|
|
22
|
+
`~/.nax/trust.json` (or `$NAX_GLOBAL_CONFIG_DIR/trust.json`). Trust is hierarchical — an entry for a
|
|
23
|
+
folder covers every folder beneath it, so trusting a parent also covers the clones, worktrees and new
|
|
24
|
+
projects you create under it later. `/` and your home directory are refused unless you pass `--force`.
|
|
25
|
+
Manage the store with `nax trust list`, `nax trust add`, `nax trust rm` and `nax trust check`
|
|
26
|
+
(`--json` on `list`/`check`); see the [CLI reference](docs/guides/cli-reference.md#nax-trust).
|
|
27
|
+
**In CI**, grant trust once at the start of the job — `--yes` skips the prompt and requires no TTY, and
|
|
28
|
+
the same command is a no-op (exit 0) on a cache that already covers the path:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
nax trust add "$PWD" --yes
|
|
32
|
+
```
|
|
33
|
+
|
|
15
34
|
- `autoMode.defaultAgent`, `autoMode.fallbackOrder`, and `context.v2.fallback` config fields removed. Use `agent.default` and `agent.fallback.map` instead (ADR-012 Phase 6). Loading a config containing any of these keys throws `NaxError CONFIG_LEGACY_AGENT_KEYS` with a per-key migration pointer.
|
|
16
35
|
- **BREAKING (custom permission profiles only):** the agent's file-tool containment root moved from the
|
|
17
36
|
story's package directory to the repo root (single-frame redesign). A custom `scoped` permission
|
package/README.md
CHANGED
|
@@ -102,6 +102,7 @@ See [docs/](docs/) for full guides on configuration, test strategies, monorepo s
|
|
|
102
102
|
| [`nax agents`](docs/guides/cli-reference.md#nax-agents) | List available coding agents |
|
|
103
103
|
| `nax auth` | Manage provider credentials for the native agent (`login`, `import`, `list`, `rm`) |
|
|
104
104
|
| [`nax approvals`](docs/guides/cli-reference.md#nax-approvals-list) | List or revoke remembered command approvals (`list`, `rm`) |
|
|
105
|
+
| [`nax trust`](docs/guides/cli-reference.md#nax-trust) | Trust or untrust project folders (`list`, `add`, `rm`, `check`) |
|
|
105
106
|
| `nax mcp lock` | Pin configured MCP servers' tool surface to `.nax/mcp-lock.json` |
|
|
106
107
|
| [`nax config`](docs/guides/cli-reference.md#nax-config) | Display the effective merged config (`--explain`, `--diff`); `nax config profile` manages config profiles |
|
|
107
108
|
| [`nax curator`](docs/guides/cli-reference.md#nax-curator-status) | Inspect, commit, or garbage-collect curator proposals |
|
|
@@ -184,6 +185,20 @@ See [Sandbox & Command Safety](docs/guides/sandbox-and-command-safety.md), [Appr
|
|
|
184
185
|
|
|
185
186
|
## Key Concepts
|
|
186
187
|
|
|
188
|
+
### Project trust
|
|
189
|
+
|
|
190
|
+
nax runs repository-controlled code — project plugins, context plugin providers, hooks, MCP servers and the quality / test / acceptance / setup commands — unsandboxed on the host. Before a gated command (`nax run`, `nax plan`, `nax mcp lock`, …) acts on a project, that project's folder must be trusted, and a refusal exits 2 with `run: nax trust add <root>`.
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
nax trust add "$PWD" # trust this checkout (asks for confirmation)
|
|
194
|
+
nax trust list # what is trusted, and which entry covers the cwd
|
|
195
|
+
nax trust check --json # machine-readable answer for a script
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Trust is hierarchical and stored once per machine (`~/.nax/trust.json`): an entry for a folder covers that folder and **every folder beneath it**, so trusting a parent covers the clones, worktrees and new projects you create under it later — you do not re-grant trust per checkout. Trusting `/` or your home directory would cover everything you own and is refused unless you pass `--force`. In CI, grant trust once at the top of the job with `nax trust add "$PWD" --yes`, which is a no-op (exit 0) on a cache that already covers the path.
|
|
199
|
+
|
|
200
|
+
See [`nax trust`](docs/guides/cli-reference.md#nax-trust) for the full surface.
|
|
201
|
+
|
|
187
202
|
### Test Strategies
|
|
188
203
|
|
|
189
204
|
nax supports five test strategies. When `tdd.strategy` is `"auto"` (default), the planner selects the strategy per story based on complexity and content — security-critical stories always get `three-session-tdd` regardless of complexity.
|