@namzu/sdk 57.1.0 → 58.0.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 +51 -0
- package/dist/agents/QueryAgent.d.ts.map +1 -1
- package/dist/agents/QueryAgent.js +2 -0
- package/dist/agents/QueryAgent.js.map +1 -1
- package/dist/agents/file-definitions.d.ts +35 -4
- package/dist/agents/file-definitions.d.ts.map +1 -1
- package/dist/agents/file-definitions.js +98 -8
- package/dist/agents/file-definitions.js.map +1 -1
- package/dist/authorization/protected-paths.d.ts +9 -0
- package/dist/authorization/protected-paths.d.ts.map +1 -1
- package/dist/authorization/protected-paths.js +29 -3
- package/dist/authorization/protected-paths.js.map +1 -1
- package/dist/connector/mcp/client.d.ts +8 -0
- package/dist/connector/mcp/client.d.ts.map +1 -1
- package/dist/connector/mcp/client.js +75 -2
- package/dist/connector/mcp/client.js.map +1 -1
- package/dist/constants/mcp/index.d.ts +2 -0
- package/dist/constants/mcp/index.d.ts.map +1 -1
- package/dist/constants/mcp/index.js +2 -0
- package/dist/constants/mcp/index.js.map +1 -1
- package/dist/constants/plugin/index.d.ts +2 -0
- package/dist/constants/plugin/index.d.ts.map +1 -1
- package/dist/constants/plugin/index.js +2 -0
- package/dist/constants/plugin/index.js.map +1 -1
- package/dist/manager/agent/lifecycle.d.ts +1 -1
- package/dist/manager/agent/lifecycle.d.ts.map +1 -1
- package/dist/manager/agent/lifecycle.js +25 -4
- package/dist/manager/agent/lifecycle.js.map +1 -1
- package/dist/manager/session/turn-recorder.d.ts.map +1 -1
- package/dist/manager/session/turn-recorder.js +2 -1
- package/dist/manager/session/turn-recorder.js.map +1 -1
- package/dist/persona/assembler.d.ts.map +1 -1
- package/dist/persona/assembler.js +2 -2
- package/dist/persona/assembler.js.map +1 -1
- package/dist/plugin/index.d.ts +1 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/lifecycle.d.ts +8 -1
- package/dist/plugin/lifecycle.d.ts.map +1 -1
- package/dist/plugin/lifecycle.js +9 -2
- package/dist/plugin/lifecycle.js.map +1 -1
- package/dist/plugin/shell-hook-http.d.ts +39 -0
- package/dist/plugin/shell-hook-http.d.ts.map +1 -0
- package/dist/plugin/shell-hook-http.js +163 -0
- package/dist/plugin/shell-hook-http.js.map +1 -0
- package/dist/plugin/shell-hook.d.ts +93 -11
- package/dist/plugin/shell-hook.d.ts.map +1 -1
- package/dist/plugin/shell-hook.js +223 -39
- package/dist/plugin/shell-hook.js.map +1 -1
- package/dist/public-runtime.d.ts +2 -2
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +2 -2
- package/dist/public-runtime.js.map +1 -1
- package/dist/public-tools.d.ts +1 -0
- package/dist/public-tools.d.ts.map +1 -1
- package/dist/public-tools.js +2 -0
- package/dist/public-tools.js.map +1 -1
- package/dist/public-types.d.ts +1 -1
- package/dist/public-types.d.ts.map +1 -1
- package/dist/runtime/query/executor.d.ts +1 -0
- package/dist/runtime/query/executor.d.ts.map +1 -1
- package/dist/runtime/query/executor.js +34 -9
- package/dist/runtime/query/executor.js.map +1 -1
- package/dist/runtime/query/index.d.ts +2 -0
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +25 -1
- package/dist/runtime/query/index.js.map +1 -1
- package/dist/runtime/query/iteration/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/index.js +6 -2
- package/dist/runtime/query/iteration/index.js.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction-breaker.d.ts +18 -8
- package/dist/runtime/query/iteration/phases/compaction-breaker.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction-breaker.js +33 -9
- package/dist/runtime/query/iteration/phases/compaction-breaker.js.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction.js +6 -4
- package/dist/runtime/query/iteration/phases/compaction.js.map +1 -1
- package/dist/runtime/query/iteration/phases/context.d.ts +2 -0
- package/dist/runtime/query/iteration/phases/context.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/context.js.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.js +70 -3
- package/dist/runtime/query/iteration/phases/tool-review.js.map +1 -1
- package/dist/runtime/query/path-escalation.d.ts +2 -0
- package/dist/runtime/query/path-escalation.d.ts.map +1 -1
- package/dist/runtime/query/path-escalation.js +7 -4
- package/dist/runtime/query/path-escalation.js.map +1 -1
- package/dist/runtime/query/plugin-hooks.js +2 -2
- package/dist/runtime/query/plugin-hooks.js.map +1 -1
- package/dist/runtime/query/prepare-turn.d.ts +2 -0
- package/dist/runtime/query/prepare-turn.d.ts.map +1 -1
- package/dist/runtime/query/prepare-turn.js +25 -0
- package/dist/runtime/query/prepare-turn.js.map +1 -1
- package/dist/runtime/query/review-policy.d.ts +3 -2
- package/dist/runtime/query/review-policy.d.ts.map +1 -1
- package/dist/runtime/query/review-policy.js +32 -13
- package/dist/runtime/query/review-policy.js.map +1 -1
- package/dist/session/retention/archive.js +1 -1
- package/dist/session/retention/archive.js.map +1 -1
- package/dist/session/workspace/driver.d.ts +6 -0
- package/dist/session/workspace/driver.d.ts.map +1 -1
- package/dist/session/workspace/git-worktree.d.ts.map +1 -1
- package/dist/session/workspace/git-worktree.js +28 -0
- package/dist/session/workspace/git-worktree.js.map +1 -1
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/loader.d.ts +7 -0
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +53 -0
- package/dist/skills/loader.js.map +1 -1
- package/dist/skills/registry.d.ts +1 -1
- package/dist/skills/registry.d.ts.map +1 -1
- package/dist/skills/registry.js +2 -1
- package/dist/skills/registry.js.map +1 -1
- package/dist/tools/builtins/bash-cwd.d.ts +52 -0
- package/dist/tools/builtins/bash-cwd.d.ts.map +1 -0
- package/dist/tools/builtins/bash-cwd.js +127 -0
- package/dist/tools/builtins/bash-cwd.js.map +1 -0
- package/dist/tools/builtins/bash.d.ts.map +1 -1
- package/dist/tools/builtins/bash.js +41 -6
- package/dist/tools/builtins/bash.js.map +1 -1
- package/dist/tools/builtins/bounded-file-read.d.ts +10 -0
- package/dist/tools/builtins/bounded-file-read.d.ts.map +1 -0
- package/dist/tools/builtins/bounded-file-read.js +67 -0
- package/dist/tools/builtins/bounded-file-read.js.map +1 -0
- package/dist/tools/builtins/grep.d.ts +6 -1
- package/dist/tools/builtins/grep.d.ts.map +1 -1
- package/dist/tools/builtins/grep.js +187 -24
- package/dist/tools/builtins/grep.js.map +1 -1
- package/dist/tools/builtins/read-file.d.ts +1 -0
- package/dist/tools/builtins/read-file.d.ts.map +1 -1
- package/dist/tools/builtins/read-file.js +113 -28
- package/dist/tools/builtins/read-file.js.map +1 -1
- package/dist/tools/builtins/read-media.d.ts +68 -0
- package/dist/tools/builtins/read-media.d.ts.map +1 -0
- package/dist/tools/builtins/read-media.js +397 -0
- package/dist/tools/builtins/read-media.js.map +1 -0
- package/dist/tools/builtins/search-tools.js +1 -1
- package/dist/tools/builtins/search-tools.js.map +1 -1
- package/dist/tools/builtins/skill.d.ts +4 -2
- package/dist/tools/builtins/skill.d.ts.map +1 -1
- package/dist/tools/builtins/skill.js +61 -2
- package/dist/tools/builtins/skill.js.map +1 -1
- package/dist/tools/builtins/sleep-guard.d.ts +15 -0
- package/dist/tools/builtins/sleep-guard.d.ts.map +1 -0
- package/dist/tools/builtins/sleep-guard.js +33 -0
- package/dist/tools/builtins/sleep-guard.js.map +1 -0
- package/dist/tools/builtins/view-image.d.ts +23 -1
- package/dist/tools/builtins/view-image.d.ts.map +1 -1
- package/dist/tools/builtins/view-image.js +66 -58
- package/dist/tools/builtins/view-image.js.map +1 -1
- package/dist/tools/file-read-tracker.d.ts.map +1 -1
- package/dist/tools/file-read-tracker.js +31 -0
- package/dist/tools/file-read-tracker.js.map +1 -1
- package/dist/toolsets/manager.js +3 -3
- package/dist/toolsets/manager.js.map +1 -1
- package/dist/types/agent/query.d.ts +2 -0
- package/dist/types/agent/query.d.ts.map +1 -1
- package/dist/types/agent/task.d.ts +6 -2
- package/dist/types/agent/task.d.ts.map +1 -1
- package/dist/types/agent/task.js.map +1 -1
- package/dist/types/connector/mcp.d.ts +46 -0
- package/dist/types/connector/mcp.d.ts.map +1 -1
- package/dist/types/hitl/index.d.ts +1 -1
- package/dist/types/plugin/index.d.ts +72 -5
- package/dist/types/plugin/index.d.ts.map +1 -1
- package/dist/types/plugin/index.js +12 -1
- package/dist/types/plugin/index.js.map +1 -1
- package/dist/types/session/sub-session.d.ts +6 -2
- package/dist/types/session/sub-session.d.ts.map +1 -1
- package/dist/types/skills/index.d.ts +36 -0
- package/dist/types/skills/index.d.ts.map +1 -1
- package/dist/types/skills/index.js +9 -0
- package/dist/types/skills/index.js.map +1 -1
- package/dist/types/tool/index.d.ts +22 -0
- package/dist/types/tool/index.d.ts.map +1 -1
- package/dist/types/tool/index.js.map +1 -1
- package/dist/types/workspace/ref.d.ts +2 -0
- package/dist/types/workspace/ref.d.ts.map +1 -1
- package/dist/utils/frontmatter.d.ts +12 -0
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +6 -0
- package/dist/utils/frontmatter.js.map +1 -1
- package/package.json +1 -1
- package/src/agents/QueryAgent.ts +2 -0
- package/src/agents/file-definitions.ts +126 -6
- package/src/authorization/protected-paths.ts +30 -2
- package/src/connector/mcp/client.ts +87 -1
- package/src/constants/mcp/index.ts +3 -0
- package/src/constants/plugin/index.ts +2 -0
- package/src/manager/agent/lifecycle.ts +24 -5
- package/src/manager/session/turn-recorder.ts +2 -1
- package/src/persona/assembler.ts +2 -2
- package/src/plugin/index.ts +5 -0
- package/src/plugin/lifecycle.ts +16 -2
- package/src/plugin/shell-hook-http.ts +181 -0
- package/src/plugin/shell-hook.ts +386 -89
- package/src/public-runtime.ts +2 -0
- package/src/public-tools.ts +2 -0
- package/src/public-types.ts +5 -0
- package/src/runtime/query/executor.ts +40 -10
- package/src/runtime/query/index.ts +33 -0
- package/src/runtime/query/iteration/index.ts +11 -3
- package/src/runtime/query/iteration/phases/compaction-breaker.ts +38 -9
- package/src/runtime/query/iteration/phases/compaction.ts +21 -4
- package/src/runtime/query/iteration/phases/context.ts +2 -0
- package/src/runtime/query/iteration/phases/tool-review.ts +74 -3
- package/src/runtime/query/path-escalation.ts +11 -5
- package/src/runtime/query/plugin-hooks.ts +2 -2
- package/src/runtime/query/prepare-turn.ts +33 -0
- package/src/runtime/query/review-policy.ts +45 -16
- package/src/session/retention/archive.ts +1 -1
- package/src/session/workspace/driver.ts +6 -0
- package/src/session/workspace/git-worktree.ts +31 -0
- package/src/skills/index.ts +6 -1
- package/src/skills/loader.ts +54 -0
- package/src/skills/registry.ts +7 -6
- package/src/tools/builtins/bash-cwd.ts +156 -0
- package/src/tools/builtins/bash.ts +79 -34
- package/src/tools/builtins/bounded-file-read.ts +80 -0
- package/src/tools/builtins/grep.ts +198 -28
- package/src/tools/builtins/read-file.ts +151 -30
- package/src/tools/builtins/read-media.ts +483 -0
- package/src/tools/builtins/search-tools.ts +1 -1
- package/src/tools/builtins/skill.ts +91 -2
- package/src/tools/builtins/sleep-guard.ts +31 -0
- package/src/tools/builtins/view-image.ts +74 -62
- package/src/tools/file-read-tracker.ts +30 -0
- package/src/toolsets/manager.ts +3 -3
- package/src/types/agent/query.ts +2 -0
- package/src/types/agent/task.ts +6 -2
- package/src/types/connector/mcp.ts +48 -0
- package/src/types/hitl/index.ts +1 -1
- package/src/types/plugin/index.ts +102 -16
- package/src/types/session/sub-session.ts +6 -2
- package/src/types/skills/index.ts +48 -0
- package/src/types/tool/index.ts +22 -0
- package/src/types/workspace/ref.ts +2 -0
- package/src/utils/frontmatter.ts +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 58.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- eae3908: The built-in `bash` tool now starts each call of a session in the directory the previous call ended in, so `cd packages/app` in one call holds for the next. Variables, functions and aliases still do not carry over. The new directory has to be inside the turn's roots (the working directory, added directories, paths approved for the call); a command that ends elsewhere is put back at the working directory and its result ends with `Shell cwd was reset to <directory>`. A sandboxed command and Windows shells are unchanged, and file tools still resolve relative paths against the working directory. A caller that relied on every call starting at the working directory should use absolute paths or a subshell, `(cd dir && command)`, which leaves the directory alone.
|
|
8
|
+
|
|
9
|
+
This changes the default from resetting the shell working directory on every call to retaining it within a session.
|
|
10
|
+
|
|
11
|
+
- eae3908: The built-in `bash` tool now refuses a call that opens with `sleep` for 25 seconds or more (alone, or as the first part of a chain) when the host has background jobs, and tells the model to use `monitor` with an until-loop, or `run_in_background` with `wait_for_job`. Shorter sleeps, later sleeps in a chain, background runs, and hosts without background jobs are unchanged. A caller that needs a long fixed wait can run it with `run_in_background`.
|
|
12
|
+
|
|
13
|
+
This changes the default for a leading sleep of at least 25 seconds from running it to refusing it when background jobs are available. Move the wait to the background job tools, or split the sleep into a supervised job.
|
|
14
|
+
|
|
15
|
+
- eae3908: The built-in `read` tool now reads pictures, PDFs and notebooks instead of refusing them. A PNG, JPEG or WebP comes back as the picture (checked and fitted as `view_image` does); a PDF comes back as page images through the new optional `pages` argument (`"3"` or `"1-5"`, at most 20 pages per request; a PDF of more than 10 pages needs it) using poppler's `pdftoppm` and `pdfinfo`, and says to install poppler-utils when they are missing; a `.ipynb` comes back as its cells with their printed output. A text file that only has a picture name is still read as text. This changes the default result for those paths: image/PDF refusals become media results, and notebook JSON becomes rendered cells. Callers that require raw notebook JSON should read it through their own text-file tool; callers matching the old media refusal must accept and render the returned content blocks.
|
|
16
|
+
- eae3908: `isProtectedPath` no longer reports paths under `.namzu/skills`, `.namzu/agents`, `.namzu/commands` and `.namzu/worktrees`, so writing a skill, an agent definition or a command no longer raises a protected-path question each time. Everything else under `.namzu` (settings, memory, hooks) is still protected, and so is any `.git` or second `.namzu` below those folders. New export `PROJECT_DIRECTORY_AUTHORED_FOLDERS` lists the four names. To keep asking, check the path yourself before calling.
|
|
17
|
+
|
|
18
|
+
This changes the default protected-path result for the four project-authored folders from protected to unprotected. Hosts that require the previous question must retain an explicit protected-path policy for those folders.
|
|
19
|
+
|
|
20
|
+
- eae3908: File reads now enforce a 32 MiB text input ceiling even with a window or `allow_large`, notebooks enforce a 1 MiB UTF-8 text/encoded-image output budget, and PDF pictures enforce a 24 MiB encoded output budget. Reads use bounded range IO rather than trusting a file's initial size; sandbox adapters must honor offset/length range requests. Extract smaller files or selected notebook cells with shell tooling, or request fewer PDF pages when a budget is exceeded.
|
|
21
|
+
|
|
22
|
+
Protected-path writes now require a person even in `bypass` and `classify`; unattended calls are refused rather than silently approved. Keep such writes out of unattended tasks or supply an explicit per-call reviewer. Shell path checks resolve relative operands against the carried bash directory while preserving the original session roots. Hosts may use `effectiveBashWorkingDirectory` to apply the same directory to their own checks.
|
|
23
|
+
|
|
24
|
+
Grep adds `before_context`, `after_context` and `only_matching` in content mode, retaining the existing symmetric `context_lines` and default file-list behavior. Search file reads are bounded against files that grow after discovery.
|
|
25
|
+
|
|
26
|
+
- eae3908: A delegated git worktree can now be kept only when the child changed something. Pass `retention: 'retain-changed'` in `ChildWorkspaceRequest`: when the child ends, the manager removes the checkout if it has no uncommitted changes and no new commits, and keeps it otherwise. The git driver records the starting commit in `GitWorktreeBackendMeta.baseCommit`, `WorkspaceInspection` gained an optional `hasNewCommits`, and disposing a checkout whose branch never left the starting commit also deletes that branch (a branch with commits is never deleted). `SubSession.workspaceRetention` may now be `'retain-changed'`. Existing `'retain'` still keeps the checkout. Disposing a newly created git worktree now also deletes its branch when it still points to its starting commit; before, that branch remained. Use `retention: 'retain'` to keep both the checkout and branch, or create a separate branch before explicitly disposing the checkout.
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- eae3908: An agent file's frontmatter now also reads `disallowedTools`, `effort`, `maxTurns`, `background`, `isolation` (`worktree`) and `skills`, and `model: inherit` means no model line. `AgentFileDefinition` gains the matching optional fields. A file that already loads still loads; a file that newly sets one of these keys with a value it cannot use (an unknown effort, a `maxTurns` that is not a positive whole number) is refused with its path and reason, as a bad `tools` line already was.
|
|
31
|
+
- eae3908: The `grep` tool takes two new optional arguments. `multiline` lets a pattern span lines (`.` matches a newline, `^` and `$` match at line boundaries) and prints every line a match covers. `type` limits the search to one kind of file such as `ts`, `py` or `rust`; an unknown kind is refused with the list of known ones. Calls that pass neither behave as before.
|
|
32
|
+
- eae3908: Four new hook events, available to the `hooks` config and to plugins: `post_tool_batch` (once per model step, after every tool call of the step has settled; carries each call and what the model was given for it; a hook answering `continue: false` ends the turn once the step is done), `permission_denied` (a call refused by a rule, the mode's policy, a classifier or a hook; never one a person declined), `subagent_start` (a delegated child's turn begins) and `turn_failure` (a root turn failed; not for a cancellation). Shell hooks receive them with the names `PostToolBatch`, `PermissionDenied`, `SubagentStart` and `StopFailure` in `hook_event_name`. `PluginHookEvent` and `ShellHookEvent` gain these members, so a `switch` over them that has an exhaustive `never` check needs four more cases. Nothing to change to keep working.
|
|
33
|
+
- eae3908: Hooks are no longer only commands. In the `hooks` config an entry may now be `{ type: http, url, headers?, allowedEnvVars? }` (the event is posted as JSON and a 2xx body is the answer; private and link-local addresses are refused), `{ type: prompt, prompt }` (the small model judges a condition; `{"ok": false}` refuses the action), or a command with `args` (run without a shell) or `async: true` (started and not waited for). Every kind takes `onFailure: block` to refuse the action when the hook itself fails (cannot start, times out, exits other than 0 or 2, prints unreadable JSON); the default `continue` is the old behaviour. In `@namzu/sdk`, `ShellHooksConfig` entries are now `ShellHookHandler` (a union that still includes `ShellHookEntry`, so existing entries keep working), `attachShellHooks` takes a `judge` option to answer `prompt` hooks, and `shellHookVerdict` takes the wider entry type. Code that reads `.command` from a config entry must narrow on `type` first. Nothing to change to keep working.
|
|
34
|
+
- eae3908: New hook event `subagent_start`, fired when a delegated child session starts, before the child's first prompt. It carries `parentSessionId`, `parentTurnId` and `agentType`; a hook may answer `annotate` to add context to the child's turn. Shell hooks can attach to it (`SubagentStart` in a hook's JSON, `agent_id` and `agent_type` on stdin, `matcher` tested against the agent name). `subagent_stop` also carries `agentType`. Nothing changes for code that does not register the new event; code that switches exhaustively over `PluginHookEvent` needs a case for it.
|
|
35
|
+
- eae3908: An agent file can now carry a `permissionMode:` line. `@namzu/sdk` reads it into `AgentFileDefinition.permissionMode` and, when a host passes `permissionModes` to `discoverAgentDefinitions`, reports a file naming any other word instead of loading it. In `@namzu/cli`, `plan` and `accept-edits` narrow a delegated agent whose parent asks before changes; a parent in any other mode keeps its own mode in the agent, and a file cannot ask for `bypass` or `auto`. Nothing to change to keep working: a file without the line behaves as before.
|
|
36
|
+
- eae3908: A file the model read whole, wrote or edited and that something else then changed on disk is now announced to the model before its next request, with the changed lines and their line numbers, so it works from the file as it is and no longer finds out through a refused edit. The refusal remains as a safety net. For SDK hosts, `FileReadTracker` gains the optional `fullBody`, `fullBodyPaths` and `recordFullBody`; `createFileReadTracker()` now keeps the body of up to 128 whole-file observations (none over 512 KiB), where it kept only hashes. A custom tracker without these methods is unaffected. Nothing to change to keep working.
|
|
37
|
+
|
|
38
|
+
Bound complete changed-file notes to 16,384 characters per request, including filenames, framing and separators. Defer notes that do not fit to later requests without losing them or changing the stale-write witness. Comparison reads stop at 2 MiB; larger files receive a content-free notice.
|
|
39
|
+
|
|
40
|
+
- eae3908: A tool server on the earlier protocol revision can now ask you for a short form, and Namzu answers it. New optional `MCPClientConfig.onElicitation` (with the types `MCPElicitationRequest` and `MCPElicitationResult`) makes an `MCPClient` declare form-mode elicitation on its handshake and hand each `elicitation/create` request to your handler; without it nothing is declared and requests are refused as before. In the CLI, interactive sessions show each form field on the question card, check the answers against the field's limits and ask again when one does not fit; headless runs never tell servers they may ask. A request to open a link (URL mode) and the newer revision's input requests are still not answered. Nothing to change to keep working; a server that used to be refused may now show a card.
|
|
41
|
+
- eae3908: A plugin can now contribute slash commands and agents, and a plugin folder can be tried for one launch. In `plugin.json`, `commands` and `agents` list folders (relative to the plugin, no `..`) of markdown files: a command file works like one in `.namzu/commands/` and is named `/<plugin>__<file>`, an agent file works like one in `.namzu/agents/` and is named `<plugin>__<name>`; the user's and project's own files of the same name win. `/plugins` lists them. The SDK manifest type gains optional `commands` and `agents`, and `PluginLifecycleManager.install` takes an optional `authorityRoot` for a plugin folder outside both scope roots. `namzu --plugin-dir <folder>` (repeatable) loads that plugin for this launch without `plugins.enabled`; it runs the plugin's code, so name only folders you trust. A manifest that already carried `commands` or `agents` keys had them ignored; they now take effect, so remove them to keep the old behaviour.
|
|
42
|
+
- eae3908: A skill can now say when the model should use it and run as a delegated agent. `when_to_use` is shown after the description in the skills manifest and in the `skill` tool's listing. `context: fork` makes the `skill` tool hand the skill to the turn's `Agent` tool, with `agent`, `model`, `effort` and `background` as that agent's type, model, reasoning effort and background flag, and return its report; the `skill` tool gains an optional `args` string for what to apply the skill to. A turn with no `Agent` tool loads the skill inline and says so. An inline skill still runs on the turn's own model. These keys are read leniently: a value that cannot be used, or one written as a block scalar or list, leaves the key out and the skill still loads. New exports: `skillModelDescription`, `SKILL_FRONTMATTER_TOLERATED_KEYS`, the `tolerates` option of `parseFrontmatter`, and the matching optional `SkillMetadata` fields. A skill that already sets one of these keys for another tool now gets the behaviour; remove the key to keep the old one.
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- eae3908: Clarify that the discovery catalogue is a snapshot, not live tool status. Call tools directly when their schemas are visible in the current runtime tools parameter; search only for a needed deferred schema that is absent. Loaded tools remain governed by source-bound history receipts, compaction resets, readiness, allow-lists and authorization.
|
|
47
|
+
- eae3908: Prevent resumed sessions from stopping with a context-refill error when compaction sheds host reminders or recorded context and the host adds them back. These runtime notes still count toward the request budget, while the refill guard continues to bound repeated growth from conversation messages and tool output.
|
|
48
|
+
- eae3908: Fix false rapid-refill stops when useful compaction leaves the context above its trigger. The opt-in breaker now requires the history to regain the space shed by the previous compaction, using comparable before/after estimates, instead of treating closely spaced reductions alone as refills. Actual refill loops still stop, and provider-overflow recovery keeps its two-rung limit.
|
|
49
|
+
- eae3908: Fix plan-mode review of read-only calls reaching outside the working roots when the authorization gate otherwise allows the tool. These calls now ask for approval of the outside path instead of being mistaken for an explicit rule-requested review and refused. Explicit ask and deny rules, mutation refusals in plan mode, and required user approval for outside-root access remain in force.
|
|
50
|
+
- eae3908: Preserve a fork skill's requested reasoning effort when it has no explicit model. The skill tool now forwards effort independently through the host's existing Agent dispatch instead of silently dropping it. Hosts validate that request: a host requiring a model (including the CLI) returns its refusal, so set a concrete supported model alongside effort there. No model or provider is inferred, and inline skills do not switch the current turn's model or effort.
|
|
51
|
+
- eae3908: Stop the turn recorder's message-identity index from keeping compacted-away message objects alive throughout a long-running turn. Historical record-ID lookup remains available while callers hold a message object. This removes one memory-retention path; step results, activity tracking and session-log retention are unchanged.
|
|
52
|
+
- eae3908: Keep a delegated worktree branch when it advances between inspection and cleanup. Branch deletion now compares the recorded starting commit under Git's ref lock, so cleanup cannot delete a concurrently updated branch.
|
|
53
|
+
|
|
3
54
|
## 57.1.0
|
|
4
55
|
|
|
5
56
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryAgent.d.ts","sourceRoot":"","sources":["../../src/agents/QueryAgent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEX,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"QueryAgent.d.ts","sourceRoot":"","sources":["../../src/agents/QueryAgent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEX,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AA+IlD,qBAAa,UAAW,SAAQ,aAAa,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;gBAET,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM;IAiBvE;;;;;;;;OAQG;IACG,GAAG,CACR,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,gBAAgB,EACxB,QAAQ,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,gBAAgB,CAAC;YAmBd,YAAY;IAoEX,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAGtC"}
|
|
@@ -18,6 +18,7 @@ const configRoutes = {
|
|
|
18
18
|
pruneKeepLast: 'turn',
|
|
19
19
|
paths: 'query',
|
|
20
20
|
sessionLog: 'query',
|
|
21
|
+
pluginManager: 'query',
|
|
21
22
|
checkpointStore: 'query',
|
|
22
23
|
sandbox: 'turn',
|
|
23
24
|
inboundMessages: 'query',
|
|
@@ -175,6 +176,7 @@ export class QueryAgent extends AbstractAgent {
|
|
|
175
176
|
},
|
|
176
177
|
agentId: this.metadata.id,
|
|
177
178
|
agentName: this.metadata.name,
|
|
179
|
+
agentType: this.type,
|
|
178
180
|
workingDirectory: input.workingDirectory,
|
|
179
181
|
sessionId: scope.sessionId,
|
|
180
182
|
topicId: scope.topicId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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AM,YAAY,GAAG,GAAuB,CAAA;gBAC5C,IAAI,YAAY,CAAC,SAAS,EAAE,CAAC;oBAC5B,aAAa,IAAI,YAAY,CAAC,SAAS,CAAC,MAAM,CAAA;gBAC/C,CAAC;YACF,CAAC;QACF,CAAC;QAED,OAAO;YACN,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,KAAK,EAAE,IAAI,CAAC,UAAU;YACtB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/C,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,UAAU,EAAE,IAAI,CAAC,gBAAgB;YACjC,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;YAClC,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,aAAa;SACb,CAAA;IACF,CAAC;IAEQ,KAAK,CAAC,MAAM;QACpB,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAA;IAC7B,CAAC;CACD"}
|
|
@@ -14,13 +14,20 @@
|
|
|
14
14
|
* name: reviewer
|
|
15
15
|
* description: Reviews a diff for correctness and convention drift.
|
|
16
16
|
* tools: read, grep, glob # optional allowlist, intersected with the parent's set
|
|
17
|
-
*
|
|
17
|
+
* disallowedTools: bash # optional; removed from whatever the rest allows
|
|
18
|
+
* model: claude-sonnet-4-5 # optional override; `inherit` keeps the session's
|
|
19
|
+
* effort: high # optional reasoning effort
|
|
20
|
+
* maxTurns: 20 # optional cap on the agent's own turns
|
|
21
|
+
* background: true # optional; runs in the background unless the call says otherwise
|
|
22
|
+
* isolation: worktree # optional; its own Git checkout
|
|
23
|
+
* skills: release-notes # optional; skills loaded into its prompt
|
|
18
24
|
* readOnly: true # optional; keeps only read-only tools
|
|
25
|
+
* permissionMode: plan # optional; a mode name the host lists
|
|
19
26
|
* ---
|
|
20
27
|
* You review changes for this repository. Cite file:line for every finding …
|
|
21
28
|
* ```
|
|
22
29
|
*
|
|
23
|
-
* `tools`
|
|
30
|
+
* `tools`, `disallowedTools` and `skills` are each one comma-separated line: this kernel's frontmatter reader
|
|
24
31
|
* refuses block lists and flow sequences by design, so there is no other
|
|
25
32
|
* form to accept.
|
|
26
33
|
*
|
|
@@ -32,6 +39,7 @@
|
|
|
32
39
|
* agent whose `tools` line failed to parse would otherwise run with the
|
|
33
40
|
* parent's whole set, which is the opposite of what the line was for.
|
|
34
41
|
*/
|
|
42
|
+
import type { ReasoningEffort } from '../types/provider/chat.js';
|
|
35
43
|
import { type Logger } from '../utils/logger.js';
|
|
36
44
|
/** Per-file character budget for the prompt body. */
|
|
37
45
|
export declare const MAX_AGENT_FILE_CHARS = 32000;
|
|
@@ -44,7 +52,25 @@ export interface AgentFileDefinition {
|
|
|
44
52
|
readonly prompt: string;
|
|
45
53
|
/** Tool names the agent may use; absent means the parent's working set. */
|
|
46
54
|
readonly tools?: readonly string[];
|
|
55
|
+
/** Tool names removed from the roster whatever else allows them. */
|
|
56
|
+
readonly disallowedTools?: readonly string[];
|
|
57
|
+
/** Absent means the session's model; `model: inherit` in a file is the same thing. */
|
|
47
58
|
readonly model?: string;
|
|
59
|
+
/** Reasoning effort the agent runs with, when its model supports it. */
|
|
60
|
+
readonly effort?: ReasoningEffort;
|
|
61
|
+
/** The most turns the agent takes before it stops; a positive whole number. */
|
|
62
|
+
readonly maxTurns?: number;
|
|
63
|
+
/** The agent runs in the background when the call does not say. */
|
|
64
|
+
readonly background?: boolean;
|
|
65
|
+
/** `worktree`: the agent works in its own Git checkout. */
|
|
66
|
+
readonly isolation?: 'worktree';
|
|
67
|
+
/** Skills whose instructions are loaded into the agent's prompt. */
|
|
68
|
+
readonly skills?: readonly string[];
|
|
69
|
+
/**
|
|
70
|
+
* The permission mode the file asks for, as the word the host accepts. The
|
|
71
|
+
* host decides what it may do with it; the kernel only keeps it.
|
|
72
|
+
*/
|
|
73
|
+
readonly permissionMode?: string;
|
|
48
74
|
readonly readOnly: boolean;
|
|
49
75
|
readonly path: string;
|
|
50
76
|
/** The host's label for the root this file came from (`user`, `project`, …). */
|
|
@@ -66,6 +92,11 @@ export interface DiscoveredAgentDefinitions {
|
|
|
66
92
|
export interface DiscoverAgentDefinitionsOptions {
|
|
67
93
|
/** Names refused in a file. Defaults to `DEFAULT_RESERVED_AGENT_NAMES`. */
|
|
68
94
|
readonly reserved?: ReadonlySet<string>;
|
|
95
|
+
/**
|
|
96
|
+
* The words a `permissionMode:` line may use. A file naming any other word
|
|
97
|
+
* is reported and skipped. Absent: any non-empty word is kept.
|
|
98
|
+
*/
|
|
99
|
+
readonly permissionModes?: ReadonlySet<string>;
|
|
69
100
|
readonly log?: Logger;
|
|
70
101
|
}
|
|
71
102
|
/**
|
|
@@ -74,7 +105,7 @@ export interface DiscoverAgentDefinitionsOptions {
|
|
|
74
105
|
* wrong is reported.
|
|
75
106
|
*/
|
|
76
107
|
export declare function discoverAgentDefinitions(roots: readonly AgentDefinitionRoot[], options?: DiscoverAgentDefinitionsOptions): Promise<DiscoveredAgentDefinitions>;
|
|
77
|
-
export declare function parseAgentFile(path: string, source: string, reserved?: ReadonlySet<string>): Promise<AgentFileDefinition | SkippedAgentFile>;
|
|
108
|
+
export declare function parseAgentFile(path: string, source: string, reserved?: ReadonlySet<string>, permissionModes?: ReadonlySet<string>): Promise<AgentFileDefinition | SkippedAgentFile>;
|
|
78
109
|
/** Pure: the file's text to a definition, or the reason it is refused. */
|
|
79
|
-
export declare function parseAgentMarkdown(raw: string, path: string, source: string, reserved?: ReadonlySet<string>): AgentFileDefinition | SkippedAgentFile;
|
|
110
|
+
export declare function parseAgentMarkdown(raw: string, path: string, source: string, reserved?: ReadonlySet<string>, permissionModes?: ReadonlySet<string>): AgentFileDefinition | SkippedAgentFile;
|
|
80
111
|
//# sourceMappingURL=file-definitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-definitions.d.ts","sourceRoot":"","sources":["../../src/agents/file-definitions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"file-definitions.d.ts","sourceRoot":"","sources":["../../src/agents/file-definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAGhE,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,oBAAoB,CAAA;AAE/D,qDAAqD;AACrD,eAAO,MAAM,oBAAoB,QAAS,CAAA;AAK1C,kFAAkF;AAClF,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,MAAM,CAG3D,CAAA;AAeF,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,oEAAoE;IACpE,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC5C,sFAAsF;IACtF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,wEAAwE;IACxE,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAA;IACjC,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO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AQ,GAAE,WAAW,CAAC,MAAM,CAAgC,EAC5D,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACnC,OAAO,CAAC,mBAAmB,GAAG,gBAAgB,CAAC,CAcjD;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CACjC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,GAAE,WAAW,CAAC,MAAM,CAAgC,EAC5D,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACnC,mBAAmB,GAAG,gBAAgB,CA2IxC"}
|
|
@@ -14,13 +14,20 @@
|
|
|
14
14
|
* name: reviewer
|
|
15
15
|
* description: Reviews a diff for correctness and convention drift.
|
|
16
16
|
* tools: read, grep, glob # optional allowlist, intersected with the parent's set
|
|
17
|
-
*
|
|
17
|
+
* disallowedTools: bash # optional; removed from whatever the rest allows
|
|
18
|
+
* model: claude-sonnet-4-5 # optional override; `inherit` keeps the session's
|
|
19
|
+
* effort: high # optional reasoning effort
|
|
20
|
+
* maxTurns: 20 # optional cap on the agent's own turns
|
|
21
|
+
* background: true # optional; runs in the background unless the call says otherwise
|
|
22
|
+
* isolation: worktree # optional; its own Git checkout
|
|
23
|
+
* skills: release-notes # optional; skills loaded into its prompt
|
|
18
24
|
* readOnly: true # optional; keeps only read-only tools
|
|
25
|
+
* permissionMode: plan # optional; a mode name the host lists
|
|
19
26
|
* ---
|
|
20
27
|
* You review changes for this repository. Cite file:line for every finding …
|
|
21
28
|
* ```
|
|
22
29
|
*
|
|
23
|
-
* `tools`
|
|
30
|
+
* `tools`, `disallowedTools` and `skills` are each one comma-separated line: this kernel's frontmatter reader
|
|
24
31
|
* refuses block lists and flow sequences by design, so there is no other
|
|
25
32
|
* form to accept.
|
|
26
33
|
*
|
|
@@ -46,6 +53,16 @@ export const DEFAULT_RESERVED_AGENT_NAMES = new Set([
|
|
|
46
53
|
'general-purpose',
|
|
47
54
|
'explore',
|
|
48
55
|
]);
|
|
56
|
+
const EFFORT_LEVELS = new Set([
|
|
57
|
+
'none',
|
|
58
|
+
'minimal',
|
|
59
|
+
'low',
|
|
60
|
+
'medium',
|
|
61
|
+
'high',
|
|
62
|
+
'xhigh',
|
|
63
|
+
'max',
|
|
64
|
+
'ultra',
|
|
65
|
+
]);
|
|
49
66
|
const NAME_PATTERN = /^[a-z][a-z0-9-]{0,63}$/;
|
|
50
67
|
/**
|
|
51
68
|
* Every `*.md` in every root, later roots shadowing earlier ones by name.
|
|
@@ -69,7 +86,7 @@ export async function discoverAgentDefinitions(roots, options = {}) {
|
|
|
69
86
|
continue;
|
|
70
87
|
}
|
|
71
88
|
for (const file of files) {
|
|
72
|
-
const found = await parseAgentFile(join(root.dir, file), root.source, options.reserved);
|
|
89
|
+
const found = await parseAgentFile(join(root.dir, file), root.source, options.reserved, options.permissionModes);
|
|
73
90
|
if ('reason' in found)
|
|
74
91
|
skipped.push(found);
|
|
75
92
|
else
|
|
@@ -78,7 +95,7 @@ export async function discoverAgentDefinitions(roots, options = {}) {
|
|
|
78
95
|
}
|
|
79
96
|
return { definitions: [...byName.values()], skipped };
|
|
80
97
|
}
|
|
81
|
-
export async function parseAgentFile(path, source, reserved = DEFAULT_RESERVED_AGENT_NAMES) {
|
|
98
|
+
export async function parseAgentFile(path, source, reserved = DEFAULT_RESERVED_AGENT_NAMES, permissionModes) {
|
|
82
99
|
let raw;
|
|
83
100
|
try {
|
|
84
101
|
if ((await stat(path)).size > MAX_AGENT_FILE_BYTES) {
|
|
@@ -92,10 +109,10 @@ export async function parseAgentFile(path, source, reserved = DEFAULT_RESERVED_A
|
|
|
92
109
|
reason: `could not be read: ${error instanceof Error ? error.message : String(error)}`,
|
|
93
110
|
};
|
|
94
111
|
}
|
|
95
|
-
return parseAgentMarkdown(raw, path, source, reserved);
|
|
112
|
+
return parseAgentMarkdown(raw, path, source, reserved, permissionModes);
|
|
96
113
|
}
|
|
97
114
|
/** Pure: the file's text to a definition, or the reason it is refused. */
|
|
98
|
-
export function parseAgentMarkdown(raw, path, source, reserved = DEFAULT_RESERVED_AGENT_NAMES) {
|
|
115
|
+
export function parseAgentMarkdown(raw, path, source, reserved = DEFAULT_RESERVED_AGENT_NAMES, permissionModes) {
|
|
99
116
|
if (!raw.trimStart().startsWith('---')) {
|
|
100
117
|
return { path, reason: 'has no frontmatter; an agent file starts with `---` and a `name:`' };
|
|
101
118
|
}
|
|
@@ -131,10 +148,76 @@ export function parseAgentMarkdown(raw, path, source, reserved = DEFAULT_RESERVE
|
|
|
131
148
|
}
|
|
132
149
|
tools = list;
|
|
133
150
|
}
|
|
134
|
-
const
|
|
135
|
-
|
|
151
|
+
const listed = (key) => {
|
|
152
|
+
const value = values[key];
|
|
153
|
+
if (value === undefined)
|
|
154
|
+
return { ok: true, list: undefined };
|
|
155
|
+
const list = stringList(value);
|
|
156
|
+
if (list === undefined || list.length === 0) {
|
|
157
|
+
return { ok: false, reason: `\`${key}:\` must be a non-empty, comma-separated list` };
|
|
158
|
+
}
|
|
159
|
+
return { ok: true, list };
|
|
160
|
+
};
|
|
161
|
+
const denied = listed('disallowedTools');
|
|
162
|
+
if (!denied.ok)
|
|
163
|
+
return { path, reason: denied.reason };
|
|
164
|
+
const preloaded = listed('skills');
|
|
165
|
+
if (!preloaded.ok)
|
|
166
|
+
return { path, reason: preloaded.reason };
|
|
167
|
+
const modelText = scalar(values.model);
|
|
168
|
+
if (values.model !== undefined && (modelText === undefined || modelText.trim().length === 0)) {
|
|
136
169
|
return { path, reason: '`model:` must be a model name' };
|
|
137
170
|
}
|
|
171
|
+
// `inherit` is the same as no line: the session's own model.
|
|
172
|
+
const model = modelText?.trim().toLowerCase() === 'inherit' ? undefined : modelText;
|
|
173
|
+
let effort;
|
|
174
|
+
if (values.effort !== undefined) {
|
|
175
|
+
const level = scalar(values.effort)?.trim().toLowerCase();
|
|
176
|
+
if (level === undefined || !EFFORT_LEVELS.has(level)) {
|
|
177
|
+
return {
|
|
178
|
+
path,
|
|
179
|
+
reason: `\`effort:\` must be one of ${[...EFFORT_LEVELS].join(', ')}`,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
effort = level;
|
|
183
|
+
}
|
|
184
|
+
let maxTurns;
|
|
185
|
+
if (values.maxTurns !== undefined) {
|
|
186
|
+
const text = scalar(values.maxTurns)?.trim();
|
|
187
|
+
if (text === undefined || !/^[1-9][0-9]{0,8}$/.test(text)) {
|
|
188
|
+
return { path, reason: '`maxTurns:` must be a positive whole number' };
|
|
189
|
+
}
|
|
190
|
+
maxTurns = Number(text);
|
|
191
|
+
}
|
|
192
|
+
let background;
|
|
193
|
+
if (values.background !== undefined) {
|
|
194
|
+
const flag = scalar(values.background);
|
|
195
|
+
if (flag !== 'true' && flag !== 'false') {
|
|
196
|
+
return { path, reason: '`background:` must be true or false' };
|
|
197
|
+
}
|
|
198
|
+
background = flag === 'true';
|
|
199
|
+
}
|
|
200
|
+
let isolation;
|
|
201
|
+
if (values.isolation !== undefined) {
|
|
202
|
+
if (scalar(values.isolation)?.trim() !== 'worktree') {
|
|
203
|
+
return { path, reason: '`isolation:` must be worktree' };
|
|
204
|
+
}
|
|
205
|
+
isolation = 'worktree';
|
|
206
|
+
}
|
|
207
|
+
let permissionMode;
|
|
208
|
+
if (values.permissionMode !== undefined) {
|
|
209
|
+
const word = scalar(values.permissionMode)?.trim();
|
|
210
|
+
if (word === undefined || word.length === 0) {
|
|
211
|
+
return { path, reason: '`permissionMode:` must be a mode name' };
|
|
212
|
+
}
|
|
213
|
+
if (permissionModes && !permissionModes.has(word)) {
|
|
214
|
+
return {
|
|
215
|
+
path,
|
|
216
|
+
reason: `\`permissionMode: ${word}\` is not one of ${[...permissionModes].join(', ')}`,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
permissionMode = word;
|
|
220
|
+
}
|
|
138
221
|
let readOnly = false;
|
|
139
222
|
if (values.readOnly !== undefined) {
|
|
140
223
|
const flag = scalar(values.readOnly);
|
|
@@ -155,7 +238,14 @@ export function parseAgentMarkdown(raw, path, source, reserved = DEFAULT_RESERVE
|
|
|
155
238
|
description: description.trim(),
|
|
156
239
|
prompt,
|
|
157
240
|
...(tools ? { tools } : {}),
|
|
241
|
+
...(denied.list ? { disallowedTools: denied.list } : {}),
|
|
158
242
|
...(model ? { model: model.trim() } : {}),
|
|
243
|
+
...(effort ? { effort } : {}),
|
|
244
|
+
...(maxTurns !== undefined ? { maxTurns } : {}),
|
|
245
|
+
...(background !== undefined ? { background } : {}),
|
|
246
|
+
...(isolation ? { isolation } : {}),
|
|
247
|
+
...(preloaded.list ? { skills: preloaded.list } : {}),
|
|
248
|
+
...(permissionMode ? { permissionMode } : {}),
|
|
159
249
|
readOnly,
|
|
160
250
|
path,
|
|
161
251
|
source,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-definitions.js","sourceRoot":"","sources":["../../src/agents/file-definitions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"file-definitions.js","sourceRoot":"","sources":["../../src/agents/file-definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAe,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAE/D,qDAAqD;AACrD,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAA;AAE1C,iDAAiD;AACjD,MAAM,oBAAoB,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA;AAE5C,kFAAkF;AAClF,MAAM,CAAC,MAAM,4BAA4B,GAAwB,IAAI,GAAG,CAAC;IACxE,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EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IACnC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AAC5C,CAAC"}
|
|
@@ -25,6 +25,15 @@ export declare const PROTECTED_DIRECTORIES: readonly string[];
|
|
|
25
25
|
export declare const PROTECTED_NESTED_DIRECTORIES: readonly (readonly string[])[];
|
|
26
26
|
/** File names; a path whose last segment is one of these is protected. */
|
|
27
27
|
export declare const PROTECTED_FILE_NAMES: readonly string[];
|
|
28
|
+
/**
|
|
29
|
+
* Folders under the project directory that hold what a person or the model
|
|
30
|
+
* authors on purpose (skills, agent definitions, commands) and the checkouts
|
|
31
|
+
* of delegated work. Writing there is the point of the folder, so the project
|
|
32
|
+
* directory is not protected on their account. Only the first project
|
|
33
|
+
* directory in a path can be excused: a second one deeper down, or any other
|
|
34
|
+
* protected name below, still protects the path.
|
|
35
|
+
*/
|
|
36
|
+
export declare const PROJECT_DIRECTORY_AUTHORED_FOLDERS: readonly string[];
|
|
28
37
|
/**
|
|
29
38
|
* Whether a write to `path` is one of the protected kinds. Pure: it reads the
|
|
30
39
|
* spelling it is given, so a caller that wants a symlink's target covered
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protected-paths.d.ts","sourceRoot":"","sources":["../../src/authorization/protected-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAUlD,CAAA;AAED,0DAA0D;AAC1D,eAAO,MAAM,4BAA4B,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAyB,CAAA;AAEhG,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAwCjD,CAAA;
|
|
1
|
+
{"version":3,"file":"protected-paths.d.ts","sourceRoot":"","sources":["../../src/authorization/protected-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAUlD,CAAA;AAED,0DAA0D;AAC1D,eAAO,MAAM,4BAA4B,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAyB,CAAA;AAEhG,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAwCjD,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kCAAkC,EAAE,SAAS,MAAM,EAK/D,CAAA;AAcD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAsBrD"}
|
|
@@ -75,10 +75,26 @@ export const PROTECTED_FILE_NAMES = [
|
|
|
75
75
|
'.devcontainer.json',
|
|
76
76
|
'pyrightconfig.json',
|
|
77
77
|
];
|
|
78
|
+
/**
|
|
79
|
+
* Folders under the project directory that hold what a person or the model
|
|
80
|
+
* authors on purpose (skills, agent definitions, commands) and the checkouts
|
|
81
|
+
* of delegated work. Writing there is the point of the folder, so the project
|
|
82
|
+
* directory is not protected on their account. Only the first project
|
|
83
|
+
* directory in a path can be excused: a second one deeper down, or any other
|
|
84
|
+
* protected name below, still protects the path.
|
|
85
|
+
*/
|
|
86
|
+
export const PROJECT_DIRECTORY_AUTHORED_FOLDERS = [
|
|
87
|
+
'skills',
|
|
88
|
+
'agents',
|
|
89
|
+
'commands',
|
|
90
|
+
'worktrees',
|
|
91
|
+
];
|
|
92
|
+
const PROJECT_DIRECTORY = '.namzu';
|
|
78
93
|
/** Lower case, with the two letters that fold into ASCII on some file systems. */
|
|
79
94
|
function fold(name) {
|
|
80
95
|
return name.toLowerCase().replace(/ı/g, 'i').replace(/ſ/g, 's');
|
|
81
96
|
}
|
|
97
|
+
const AUTHORED = new Set(PROJECT_DIRECTORY_AUTHORED_FOLDERS.map(fold));
|
|
82
98
|
const DIRECTORIES = new Set(PROTECTED_DIRECTORIES.map(fold));
|
|
83
99
|
const FILE_NAMES = new Set(PROTECTED_FILE_NAMES.map(fold));
|
|
84
100
|
const NESTED = PROTECTED_NESTED_DIRECTORIES.map((sequence) => sequence.map(fold));
|
|
@@ -89,9 +105,19 @@ const NESTED = PROTECTED_NESTED_DIRECTORIES.map((sequence) => sequence.map(fold)
|
|
|
89
105
|
*/
|
|
90
106
|
export function isProtectedPath(path) {
|
|
91
107
|
const segments = path.split(/[\\/]+/).map(fold);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
108
|
+
let excused = false;
|
|
109
|
+
for (let index = 0; index < segments.length; index += 1) {
|
|
110
|
+
const segment = segments[index];
|
|
111
|
+
if (!DIRECTORIES.has(segment))
|
|
112
|
+
continue;
|
|
113
|
+
if (segment === PROJECT_DIRECTORY && !excused) {
|
|
114
|
+
const next = segments[index + 1];
|
|
115
|
+
if (next !== undefined && AUTHORED.has(next)) {
|
|
116
|
+
excused = true;
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return true;
|
|
95
121
|
}
|
|
96
122
|
for (const sequence of NESTED) {
|
|
97
123
|
for (let start = 0; start + sequence.length <= segments.length; start += 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protected-paths.js","sourceRoot":"","sources":["../../src/authorization/protected-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACvD,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,eAAe;IACf,OAAO;IACP,MAAM;CACN,CAAA;AAED,0DAA0D;AAC1D,MAAM,CAAC,MAAM,4BAA4B,GAAmC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAA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paths.js","sourceRoot":"","sources":["../../src/authorization/protected-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACvD,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,eAAe;IACf,OAAO;IACP,MAAM;CACN,CAAA;AAED,0DAA0D;AAC1D,MAAM,CAAC,MAAM,4BAA4B,GAAmC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;AAEhG,0EAA0E;AAC1E,MAAM,CAAC,MAAM,oBAAoB,GAAsB;IACtD,YAAY;IACZ,aAAa;IACb,SAAS;IACT,eAAe;IACf,QAAQ;IACR,WAAW;IACX,UAAU;IACV,SAAS;IACT,SAAS;IACT,UAAU;IACV,aAAa;IACb,eAAe;IACf,cAAc;IACd,QAAQ;IACR,YAAY;IACZ,WAAW;IACX,mBAAmB;IACnB,2EAA2E;IAC3E,yBAAyB;IACzB,QAAQ;IACR,SAAS;IACT,aAAa;IACb,UAAU;IACV,iBAAiB;IACjB,eAAe;IACf,aAAa;IACb,cAAc;IACd,UAAU;IACV,eAAe;IACf,aAAa;IACb,yBAAyB;IACzB,cAAc;IACd,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,2BAA2B;IAC3B,0BAA0B;IAC1B,oBAAoB;IACpB,oBAAoB;CACpB,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAsB;IACpE,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,WAAW;CACX,CAAA;AAED,MAAM,iBAAiB,GAAG,QAAQ,CAAA;AAElC,kFAAkF;AAClF,SAAS,IAAI,CAAC,IAAY;IACzB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAChE,CA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G,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;YAC5E,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,CAAC;gBAAE,OAAO,IAAI,CAAA;QACrF,CAAC;IACF,CAAC;IACD,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC1C,OAAO,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,EAAE,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AACjE,CAAC"}
|
|
@@ -20,6 +20,8 @@ export declare class MCPClient {
|
|
|
20
20
|
private subscriptionFailures;
|
|
21
21
|
/** Best-effort protocol cancellations still belong to this connection generation. */
|
|
22
22
|
private cancellationControllers;
|
|
23
|
+
/** Elicitations waiting on the person, by the server's request id. */
|
|
24
|
+
private elicitationControllers;
|
|
23
25
|
private log;
|
|
24
26
|
private readonly config;
|
|
25
27
|
private readonly requestTimeoutMs;
|
|
@@ -393,6 +395,12 @@ export declare class MCPClient {
|
|
|
393
395
|
private rejectAllPending;
|
|
394
396
|
private notify;
|
|
395
397
|
private handleMessage;
|
|
398
|
+
/**
|
|
399
|
+
* Answer one `elicitation/create`: form mode goes to the host's handler,
|
|
400
|
+
* anything else is refused as invalid params so the server is never left
|
|
401
|
+
* waiting. Only the action is logged, never the values the person typed.
|
|
402
|
+
*/
|
|
403
|
+
private answerElicitation;
|
|
396
404
|
private handleProgressNotification;
|
|
397
405
|
/**
|
|
398
406
|
* The modern subscription stream is authority-scoped by its request ID.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/connector/mcp/client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,E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