@nathapp/nax 0.82.0-canary.9 → 0.82.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/CHANGELOG.md +32 -0
- package/README.md +27 -3
- package/dist/nax.js +91548 -73377
- package/package.json +32 -17
package/CHANGELOG.md
CHANGED
|
@@ -13,14 +13,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
13
13
|
### Breaking
|
|
14
14
|
|
|
15
15
|
- `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
|
+
- **BREAKING (custom permission profiles only):** the agent's file-tool containment root moved from the
|
|
17
|
+
story's package directory to the repo root (single-frame redesign). A custom `scoped` permission
|
|
18
|
+
profile's grant globs (e.g. `Write(src/**)`) now match against REPO-ROOTED paths instead of
|
|
19
|
+
package-relative paths — `Write(src/**)` that used to scope a grant to the package's own `src/` now
|
|
20
|
+
matches `src/**` at the repo root only; a monorepo profile author who wants the old scoping must
|
|
21
|
+
rewrite the glob as `Write(packages/*/src/**)` or the specific package path. The default `unrestricted`
|
|
22
|
+
profile is unaffected (it skips glob matching entirely). No config schema change; this is a semantic
|
|
23
|
+
shift in what an existing glob string matches.
|
|
16
24
|
|
|
17
25
|
### Fixed
|
|
18
26
|
|
|
19
27
|
- **watchdog:** Count ACP `tool_call` / `tool_call_update` stream activity by default, and add `agent.idleWatchdog.toolCallOnlyIdleTimeoutSeconds` (default 1800s) so long-running tool-only sessions stay alive without masking runaway tool loops.
|
|
28
|
+
- **Story fragments no longer name nax's own artifacts.** The fragment collector (`## Files touched`) ran
|
|
29
|
+
`git diff --name-only` with no exclusions, so git-tracked run state such as
|
|
30
|
+
`<pkg>/.nax/cache/test-patterns.json` was recorded as a changed file and then offered to a dependent
|
|
31
|
+
story as something worth reading. Excludes are anchored at the repository root, so the same fragment is
|
|
32
|
+
produced whether the story's workdir is the repo root or a package (#2072).
|
|
33
|
+
- **Monorepo: the agent loop now uses per-package config.** `callOp` resolved its config from the repo
|
|
34
|
+
root, so a story with a `workdir` was given the ROOT `quality.commands` and `RunCommand` ran the wrong
|
|
35
|
+
toolchain (#2066). The registry also missed every override under worktree and parallel isolation, where
|
|
36
|
+
a package resolved through `.nax-wt/<storyId>/` (#2069).
|
|
37
|
+
|
|
38
|
+
**Behaviour change:** `execution.permissionProfile` and `execution.permissions` declared in
|
|
39
|
+
`.nax/mono/<pkg>/config.json` were previously inert at every dispatch site and now apply, completing the
|
|
40
|
+
SEC-3 fix. Per-package `execution.denyPaths`, `models`, `agent.native.transportRetry` and
|
|
41
|
+
`execution.compaction` likewise now take effect. If an overlay in your repo sets any of these, review it
|
|
42
|
+
before upgrading — the resolved profile is now logged once per dispatch.
|
|
43
|
+
- **RunCommand:** `target` supplied with a declared `command` is now rejected (previously the `target`
|
|
44
|
+
was silently discarded); `target` remains valid only for the `argv` branch (#2066).
|
|
45
|
+
- **Review diff paths are now package-relative.** `collectDiff`, `collectDiffStat` and
|
|
46
|
+
`computeTestInventory` ran git without `--relative`, so a monorepo story's reviewer — whose file
|
|
47
|
+
tools are rooted at the package dir — was shown repo-rooted paths like `packages/lib/src/util.ts`.
|
|
48
|
+
Reading one resolved to `<pkg>/packages/lib/...` and failed, costing a round trip per file before
|
|
49
|
+
the model retried. `computeTestInventory` also gained the `-- .` pathspec its siblings already had,
|
|
50
|
+
so the adversarial prompt's test-gap inventory no longer lists files from other packages (#2066).
|
|
20
51
|
- **Fixed** — a same-agent fallback hop dispatched the previous model, because
|
|
21
52
|
`SessionManager` reused a live session whenever the agent name matched and
|
|
22
53
|
discarded the requested endpoint. Same-agent ladder rungs and sticky endpoints
|
|
23
54
|
inherited by warm rectification ops were both inert (#1965).
|
|
55
|
+
- `nax plan --decompose` now persists through `finalizeAndWritePrd` instead of writing the PRD raw, so decompose-created sub-stories get `workdirSource` stamped and their declared paths re-spelled into the repo frame (#2080). The write is scoped to the new sub-stories: workdir derivation and routing resolution do not re-run over stories already in the PRD, which may have executed.
|
|
24
56
|
|
|
25
57
|
### Changed
|
|
26
58
|
|
package/README.md
CHANGED
|
@@ -120,11 +120,34 @@ For full flag details, see the [CLI Reference](docs/guides/cli-reference.md).
|
|
|
120
120
|
"hooks": {
|
|
121
121
|
"on-all-stories-complete": { "command": "npm run build" } // Fire after all stories pass
|
|
122
122
|
}
|
|
123
|
+
},
|
|
124
|
+
"mcp": {
|
|
125
|
+
"servers": {
|
|
126
|
+
"codebase-memory": {
|
|
127
|
+
"command": "codebase-memory-mcp", // stdio MCP server binary (client only)
|
|
128
|
+
"args": [], // Optional server args
|
|
129
|
+
"stages": ["run"], // Attach in these pipeline stages ("*" = all)
|
|
130
|
+
"allowedTools": ["search_graph"] // Optional: subset of locked tools that is grantable
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"execution": {
|
|
135
|
+
"commandInterceptor": {
|
|
136
|
+
"provider": "rtk", // Token-reducing proxy for the Git tool
|
|
137
|
+
"enabled": true, // Off by default — opt in per project
|
|
138
|
+
"git": { "verbs": ["log", "diff"] } // Only these subcommands are rewritten
|
|
139
|
+
}
|
|
123
140
|
}
|
|
124
141
|
}
|
|
125
142
|
```
|
|
126
143
|
|
|
127
|
-
|
|
144
|
+
`mcp` attaches external Model Context Protocol (MCP) servers as tool providers — nax is a client only, never an MCP server. The server id is the tool-name namespace: the `codebase-memory` server advertises its tools as `codebase-memory__search_graph`, `codebase-memory__trace_path`, and so on. Before any of those tools are grantable, run `nax mcp lock` at the project root: it connects every enabled server once, pins the advertised tool surface (name + input-schema hash) to `.nax/mcp-lock.json`, and that lockfile is committed like `bun.lock`. `stages` is the attachment control — a server's tools attach only to the listed pipeline stages, and an empty list attaches nowhere. MCP tools are advertised under the `unrestricted` permission profile only; `safe` and `scoped` resolve no provider tools at all. `allowedTools` narrows which locked tools are grantable; omitted means every locked tool is.
|
|
145
|
+
|
|
146
|
+
`execution.commandInterceptor` rewrites the `Git` tool's argv through `rtk` so `log` and `diff` output reaches the model compressed. It is confined to the Git site: user-authored `quality.commands` and `acceptance.command` are never wrapped. It fails open — if the `rtk` binary is missing the call runs as plain git.
|
|
147
|
+
|
|
148
|
+
**Both features are native-agent only.** An ACP agent (`claude`, `codex`, `opencode`, `gemini`) brings its own tools, so nax's `Git` tool is never invoked and no MCP tool is advertised. A project on `"protocol": "acp"` can hold a complete, valid config for both and get zero effect, with no error. The built-in defaults (`agent.protocol: "hybrid"`, `agent.default: "native"`) enable both; a config that switches to an acpx agent does not.
|
|
149
|
+
|
|
150
|
+
See [MCP & Command Interception](docs/guides/mcp-and-interception.md) for setup, verification and troubleshooting, and the [Configuration Guide](docs/guides/configuration.md) for the full schema.
|
|
128
151
|
|
|
129
152
|
---
|
|
130
153
|
|
|
@@ -186,11 +209,12 @@ See [Plugins Guide](docs/guides/agents.md#plugins).
|
|
|
186
209
|
|
|
187
210
|
## Agents
|
|
188
211
|
|
|
189
|
-
nax
|
|
212
|
+
The default agent is `native`: nax drives the model in-process over `@nathapp/nax-ai` (no CLI binary), using the built-in `models.native` Anthropic tier map, so it needs Anthropic credentials (`nax auth` or the provider's environment variable) unless you override the map. Every other agent is reached via [ACP](https://github.com/openclaw/acpx) (Agent Client Protocol) — a JSON-RPC protocol that provides persistent sessions, exact token/cost reporting, and multi-turn session continuity.
|
|
190
213
|
|
|
191
214
|
| Agent | Binary | Notes |
|
|
192
215
|
|:------|:-------|:------|
|
|
193
|
-
|
|
|
216
|
+
| Native (nax-ai) | — (in-process) | Default. `agent.default: "native"` |
|
|
217
|
+
| Claude Code | `claude` | Set `agent.default: "claude"` |
|
|
194
218
|
| OpenCode | `opencode` | Set `agent.default: "opencode"` |
|
|
195
219
|
| Codex | `codex` | Set `agent.default: "codex"` |
|
|
196
220
|
| Gemini CLI | `gemini` | Set `agent.default: "gemini"` |
|