@nathapp/nax-agent 0.88.0 → 0.89.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.
- package/CHANGELOG.md +4 -0
- package/README.md +11 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to `@nathapp/nax-agent` are recorded here. The format follow
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/). While the version is `0.x`, a minor
|
|
5
5
|
release may change the public API.
|
|
6
6
|
|
|
7
|
+
## [0.89.0] - 2026-10-17
|
|
8
|
+
|
|
9
|
+
- No changes in this package. Released in lockstep with the other nax packages.
|
|
10
|
+
|
|
7
11
|
## [0.88.0] - 2026-10-16
|
|
8
12
|
|
|
9
13
|
- No changes in this package. Released in lockstep with the other nax packages.
|
package/README.md
CHANGED
|
@@ -34,9 +34,9 @@ The host installs these once, near startup. They are module-level, so they apply
|
|
|
34
34
|
|
|
35
35
|
Three pieces of host knowledge are passed in as data or functions, because the package cannot know them. Their behaviour when you omit them differs, so check each one.
|
|
36
36
|
|
|
37
|
-
- **`runDeclaredCommand`** runs a command your project declared (a test or lint command), never one the model wrote. If you do not supply it, the `RunCommand` tool answers `exit 1` with "no declared-command runner is configured for this session" and starts no process. It fails closed.
|
|
38
|
-
- **`ProtectedPathsPolicy`** names the paths you own and want kept away from the agent: git pathspecs the Git tool excludes from its default view, gitignore patterns `GitCommit` refuses to stage, the project state directory, the credential directory and the trust-store file the sandbox protects. If you do not supply it, the Git tool excludes nothing from its default view, and `GitCommit` fails closed: it refuses every path and stages nothing until the policy supplies a non-empty `gitIgnorePatterns` (an empty list refuses the same way). Supply it whenever the agent works in a directory that holds files you own. Building a sandboxed session requires it.
|
|
39
|
-
- **`commandInterceptor`** may rewrite a command before it runs (for example to prefix a wrapper binary). Rewrites are validated: an argv rewrite may only prefix the original argv with the provider's own binary, and a shell rewrite goes through the same narrowing. If you do not supply one, commands run unchanged. An interceptor that throws, or returns a rewrite that fails validation, is treated as a decline, and the original command runs.
|
|
37
|
+
- **`runDeclaredCommand`** runs a command your project declared (a test or lint command), never one the model wrote. If you do not supply it, the `RunCommand` tool answers `exit 1` with "no declared-command runner is configured for this session" and starts no process. It fails closed. `createAgentSession` does not accept a runner yet: `hostPorts.runDeclaredCommand` throws `AGENT_SESSION_INVALID_OPTIONS`, so a session's `RunCommand` always refuses.
|
|
38
|
+
- **`ProtectedPathsPolicy`** (`hostPorts.protectedPaths` on the facade) names the paths you own and want kept away from the agent: git pathspecs the Git tool excludes from its default view, gitignore patterns `GitCommit` refuses to stage, the project state directory, the credential directory and the trust-store file the sandbox protects. If you do not supply it, the Git tool excludes nothing from its default view, and `GitCommit` fails closed: it refuses every path and stages nothing until the policy supplies a non-empty `gitIgnorePatterns` (an empty list refuses the same way). Supply it whenever the agent works in a directory that holds files you own. Building a sandboxed session requires it.
|
|
39
|
+
- **`commandInterceptor`** (`hostPorts.commandInterceptor` on the facade) may rewrite a command before it runs (for example to prefix a wrapper binary). Rewrites are validated: an argv rewrite may only prefix the original argv with the provider's own binary, and a shell rewrite goes through the same narrowing. If you do not supply one, commands run unchanged. An interceptor that throws, or returns a rewrite that fails validation, is treated as a decline, and the original command runs.
|
|
40
40
|
|
|
41
41
|
## Repository instructions
|
|
42
42
|
|
|
@@ -62,7 +62,7 @@ const lookupOrder: EmbedderTool = {
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
const session = await createAgentSession({
|
|
65
|
-
backend: nativeBackend({ model: "
|
|
65
|
+
backend: nativeBackend({ model: "openai/gpt-5.4-mini" }),
|
|
66
66
|
profile: "ask",
|
|
67
67
|
workdir: "/abs/project",
|
|
68
68
|
tools: [lookupOrder],
|
|
@@ -82,8 +82,9 @@ Profiles set what a session may do:
|
|
|
82
82
|
| Profile | Side effects |
|
|
83
83
|
|:--------|:-------------|
|
|
84
84
|
| `none` | no side effects; |
|
|
85
|
-
| `read` | read-only; |
|
|
86
|
-
| `
|
|
85
|
+
| `read` | read-only tools (Read, Glob, Grep, Git); |
|
|
86
|
+
| `review` | the read tools plus Bash; `bashApproval` and the sandbox floor apply; |
|
|
87
|
+
| `ask` | Write, Edit, Delete and GitCommit are put to `answer()`; Bash follows `bashApproval`; |
|
|
87
88
|
| `full` | no prompts; `bashApproval` and the sandbox floor apply. |
|
|
88
89
|
|
|
89
90
|
`createAgentSession` takes a `SessionBackend`. `nativeBackend(opts)` takes `instructionFileName` (default `AGENTS.md`), `model`, `credentials`, `catalogOverrides`, `loopHandlers`, `hostPorts`, `bashApproval`, `allowUnsandboxed` and `compaction`. The ACP backend ships in `@nathapp/nax-agent-acp`.
|
|
@@ -97,7 +98,7 @@ Profiles set what a session may do:
|
|
|
97
98
|
- **Approvals and questions.** Answer them with `session.answer(requestId, { decision: "allow" | "deny" })` or `{ text }`. An unanswered one is denied after `approvalTimeoutMs` (default 600000, range 30000..3600000). `answer` returns `"accepted"`, `"expired"`, `"cancelled"` or `"unknown"`.
|
|
98
99
|
- **Credentials.** A session's `credentials` (`memory` or `exec`) and `catalogOverrides` give it its own client. Without them it uses the process-wide `configureCredentials` slot.
|
|
99
100
|
- **History and restarts.** The store holds one document per session, saved at the end of every turn. `close()` keeps it. After a restart, `resumeAgentSession(sessionId, options)` reopens it with the same options you created it with; pass `instructions` and `tools` again, since they are not stored. If the process died mid-turn, `session.lastTurn` is `{ turnId, status: "interrupted" }`, and that turn's message is not in history. A resume with a different model throws `AGENT_SESSION_MODEL_MISMATCH`; a different reasoning effort (`[high]`) is the same model. Resuming with a different backend kind throws `AGENT_SESSION_BACKEND_MISMATCH`; a stored document with no `backend` field is native. Do not open one session id twice at once: the store has no lock.
|
|
100
|
-
- **Errors.** Every error is an `AgentSessionError` with a code `AGENT_SESSION_*`: `INVALID_OPTIONS`, `EXISTS`, `BUSY`, `CLOSED`, `INVALID_ANSWER`, `NOT_FOUND`, `SCHEMA_UNSUPPORTED`, `MODEL_MISMATCH`, `SANDBOX_UNAVAILABLE`, `TOOL_NAME_RESERVED`, `BACKEND_UNAVAILABLE`, `AUTH_REQUIRED`, `CAPABILITY_UNSUPPORTED` or `BACKEND_MISMATCH`. A stored document that cannot be read is a `NaxError` with `TRANSCRIPT_CORRUPT`.
|
|
101
|
+
- **Errors.** Every error is an `AgentSessionError` with a code `AGENT_SESSION_*`: `INVALID_OPTIONS`, `EXISTS`, `BUSY`, `CLOSED`, `INVALID_ANSWER`, `NOT_FOUND`, `SCHEMA_UNSUPPORTED`, `MODEL_MISMATCH`, `SANDBOX_UNAVAILABLE`, `TOOL_NAME_RESERVED`, `BACKEND_UNAVAILABLE`, `AUTH_REQUIRED`, `RATE_LIMITED`, `CAPABILITY_UNSUPPORTED` or `BACKEND_MISMATCH`. A stored document that cannot be read is a `NaxError` with `TRANSCRIPT_CORRUPT`.
|
|
101
102
|
|
|
102
103
|
## MCP connections (`@nathapp/nax-agent/mcp`)
|
|
103
104
|
|
|
@@ -127,10 +128,10 @@ await connection.close(); // waits for the process; SI
|
|
|
127
128
|
|
|
128
129
|
## Status and roadmap
|
|
129
130
|
|
|
130
|
-
`0.x` may reshape `.` with a minor bump. `@nathapp/nax-agent-acp` provides an ACP backend for the same API
|
|
131
|
+
`0.x` may reshape `.` with a minor bump. `@nathapp/nax-agent-acp` provides an ACP backend for the same API. Both packages share one version. See [`CHANGELOG.md`](CHANGELOG.md).
|
|
131
132
|
|
|
132
|
-
Maintainers: see the [release procedure](https://github.com/nathapp-io/nax/blob/main/
|
|
133
|
-
|
|
133
|
+
Maintainers: releases are lockstep and tag-driven; see the [repo-root release procedure](https://github.com/nathapp-io/nax/blob/main/RELEASING.md).
|
|
134
|
+
The package's [`RELEASING.md`](RELEASING.md) keeps its acceptance records.
|
|
134
135
|
|
|
135
136
|
## License
|
|
136
137
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nathapp/nax-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.0",
|
|
4
4
|
"description": "nax's native coding agent: session contract, native loop, tools, permissions, sandbox, command-safety.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "William Khoo",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@anthropic-ai/sandbox-runtime": "0.0.77",
|
|
49
49
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
50
|
-
"@nathapp/nax-ai": "0.
|
|
50
|
+
"@nathapp/nax-ai": "0.89.0",
|
|
51
51
|
"zod": "^4.3.6"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|