@dreb/coding-agent 2.40.2 → 2.42.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/README.md +22 -9
- package/dist/core/agent-session.d.ts +2 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +8 -4
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/context-trust.d.ts +44 -0
- package/dist/core/context-trust.d.ts.map +1 -0
- package/dist/core/context-trust.js +117 -0
- package/dist/core/context-trust.js.map +1 -0
- package/dist/core/nested-context.d.ts +4 -3
- package/dist/core/nested-context.d.ts.map +1 -1
- package/dist/core/nested-context.js +34 -9
- package/dist/core/nested-context.js.map +1 -1
- package/dist/core/resource-loader.d.ts +3 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +29 -11
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/settings-manager.d.ts +38 -2
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +161 -6
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +2 -2
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/rpc/index.d.ts +1 -1
- package/dist/modes/rpc/index.d.ts.map +1 -1
- package/dist/modes/rpc/index.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +22 -8
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +67 -6
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts +57 -7
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +341 -70
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +114 -3
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/docs/dashboard.md +29 -9
- package/docs/rpc.md +184 -10
- package/docs/settings.md +32 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,7 +81,7 @@ Or use a custom provider (corporate proxy, Bedrock, etc.) — see [Custom provid
|
|
|
81
81
|
|
|
82
82
|
Then just talk to dreb. All 11 built-in tools are enabled by default: `read`, `write`, `edit`, `bash`, `grep`, `find`, `ls`, `web_search`, `web_fetch`, `subagent`, and `wait`. Use `--tools` to restrict to a subset (e.g., `--tools read,grep,find,ls` for read-only). Three additional tools — `search`, `skill`, and `tasks_update` — are always active regardless of `--tools`. `suggest_next` is active by default but excluded when `--tools` is specified. The model uses these to fulfill your requests. Add capabilities via [skills](#skills), [prompt templates](#prompt-templates), [extensions](#extensions), or [packages](#packages).
|
|
83
83
|
|
|
84
|
-
**Also available:** [`@dreb/telegram`](https://www.npmjs.com/package/@dreb/telegram) — run dreb as a Telegram bot with live tool status and visible results for user-facing tools (`npm install -g @dreb/telegram`). [`@dreb/dashboard`](https://www.npmjs.com/package/@dreb/dashboard) — run `dreb dashboard` for a browser UI with fleet overview, full chat steering, subagent observability, host file browser, and Tailscale/rotating-code pairing (`npm install -g @dreb/dashboard`; see [docs/dashboard.md](docs/dashboard.md)).
|
|
84
|
+
**Also available:** [`@dreb/telegram`](https://www.npmjs.com/package/@dreb/telegram) — run dreb as a Telegram bot with live tool status and visible results for user-facing tools (`npm install -g @dreb/telegram`). [`@dreb/dashboard`](https://www.npmjs.com/package/@dreb/dashboard) — run `dreb dashboard` for a browser UI with fleet overview, full chat steering, subagent observability, host file browser, and Tailscale/rotating-code pairing (`npm install -g @dreb/dashboard`; see [docs/dashboard.md](docs/dashboard.md)). Its top bar and persistent session header indicators report connecting, connected, retrying, resyncing, disconnected, or auth failed; bounded SSE replay plus an explicit snapshot barrier restores session state and tasks after a reload, restart, gap, backpressure disconnect, or stalled stream.
|
|
85
85
|
|
|
86
86
|
**Platform notes:** [Windows](docs/windows.md) | [Termux (Android)](docs/termux.md) | [tmux](docs/tmux.md) | [Terminal setup](docs/terminal-setup.md) | [Shell aliases](docs/shell-aliases.md)
|
|
87
87
|
|
|
@@ -276,7 +276,7 @@ Use `/settings` to modify common options, or edit JSON files directly:
|
|
|
276
276
|
| `~/.dreb/agent/settings.json` | Global (all projects) |
|
|
277
277
|
| `.dreb/settings.json` | Project (overrides global) |
|
|
278
278
|
|
|
279
|
-
See [docs/settings.md](docs/settings.md) for all options.
|
|
279
|
+
See [docs/settings.md](docs/settings.md) for all options. Dashboard Settings re-entry reloads durable global and project settings after flushing pending writes, so it sees external file edits; unreadable, invalid, or failed writes are surfaced as errors rather than showing stale values. See the [RPC settings contract](docs/rpc.md#get_settings).
|
|
280
280
|
|
|
281
281
|
---
|
|
282
282
|
|
|
@@ -289,16 +289,29 @@ dreb loads `AGENTS.md` (or `CLAUDE.md`) at startup from:
|
|
|
289
289
|
|
|
290
290
|
Use for project instructions, conventions, common commands. All matching files are concatenated.
|
|
291
291
|
|
|
292
|
-
### Nested context
|
|
292
|
+
### Nested context trust
|
|
293
293
|
|
|
294
|
-
|
|
294
|
+
At startup, dreb **always** performs a separate upward scan from its launch cwd and loads matching `AGENTS.md`/`CLAUDE.md` files there and in parent directories. That initial scan is not lazy nested loading and is **not** controlled by the settings below. A context file in a subdirectory — or in a different repo an agent later visits — is considered only when a tool operates there.
|
|
295
295
|
|
|
296
|
-
|
|
297
|
-
- Walks up from the target directory to a sensible ceiling: the session cwd (for in-tree targets), otherwise the outermost git repo root, otherwise the outermost directory containing a context file.
|
|
298
|
-
- Each file is injected at most once per session, and files already loaded at startup are never repeated. Applies to subagents too — including subagents that work in a different repo than the parent.
|
|
299
|
-
- Disable with `context.autoLoadNested: false` in settings, or toggle "Auto-load nested context" in `/settings`.
|
|
296
|
+
Lazy nested/out-of-cwd context loading is **off by default**. Configure explicit global trusted roots in `~/.dreb/agent/settings.json`:
|
|
300
297
|
|
|
301
|
-
|
|
298
|
+
```json
|
|
299
|
+
{
|
|
300
|
+
"context": {
|
|
301
|
+
"trustedFolders": ["~/src/my-company", "/srv/controlled-repos"]
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
A trusted root permits lazy loading for that existing directory and all of its descendants. dreb resolves both the root and each tool target through canonical native `realpath` at decision time: relative, missing, non-directory, and broken-symlink roots fail closed; duplicate and nested roots are deduplicated/subsumed. A lexical descendant that symlinks outside the canonical root is therefore **not** trusted. Project `.dreb/settings.json` cannot add, override, or otherwise widen this policy.
|
|
307
|
+
|
|
308
|
+
- Lazy loading triggers on path-bearing tools (`read`, `edit`, `write`, `grep`, `find`, `ls`) and on `bash` commands that begin with `cd <dir>`.
|
|
309
|
+
- It walks from the target toward the applicable ceiling. A trusted root is a hard ceiling; otherwise the session cwd is used for in-tree targets, then the outermost git repo root, then the outermost directory containing a context file.
|
|
310
|
+
- Each file is injected at most once per session, including files from the initial upward scan. The paths are realpath-deduplicated. If a triggering `read` or full `cat`/`bat` already returns a context file in full, dreb marks it loaded without adding a duplicate block.
|
|
311
|
+
- Auto-loaded text is secret-scrubbed and appended **after** extension `tool_result` transforms, so those transforms intentionally do not see it.
|
|
312
|
+
- Main agents and subagents make the same global trust decision. Global trust changes are observed by active processes for **future** lazy loads; already injected content cannot be removed from their conversation.
|
|
313
|
+
|
|
314
|
+
**Expert trust-all override — prompt-injection warning:** setting `context.autoLoadNested: true` in the **global** `~/.dreb/agent/settings.json` allows lazy loading from any resolvable tool target. This can inject instructions from untrusted or third-party repositories. It is global-only; a project `.dreb/settings.json` cannot enable it. Leave it off and trust only folders you control whenever possible. The Files view shows the effective trust for the directory being viewed and lets you trust a folder or untrust the actual granting root; untrusting an inherited folder removes that root's trust for all of its descendants.
|
|
302
315
|
|
|
303
316
|
### System Prompt
|
|
304
317
|
|
|
@@ -253,7 +253,8 @@ export declare class AgentSession {
|
|
|
253
253
|
* should be injected. Resolves the directory the tool operates in, walks up to a
|
|
254
254
|
* sensible ceiling collecting not-yet-loaded AGENTS.md/CLAUDE.md files, and formats
|
|
255
255
|
* them. Each directory is scanned at most once (negative cache) and each file is
|
|
256
|
-
* injected at most once per session (realpath dedup).
|
|
256
|
+
* injected at most once per session (realpath dedup). Every decision consumes the
|
|
257
|
+
* refreshed global-only trust policy; absent settings managers fail closed.
|
|
257
258
|
*/
|
|
258
259
|
private _computeNestedContextBlock;
|
|
259
260
|
/**
|