@dreb/coding-agent 2.25.3 → 2.27.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +21 -11
  3. package/dist/core/agent-session.d.ts +7 -0
  4. package/dist/core/agent-session.d.ts.map +1 -1
  5. package/dist/core/agent-session.js +22 -0
  6. package/dist/core/agent-session.js.map +1 -1
  7. package/dist/core/buddy/buddy-controller.d.ts.map +1 -1
  8. package/dist/core/buddy/buddy-controller.js +5 -23
  9. package/dist/core/buddy/buddy-controller.js.map +1 -1
  10. package/dist/core/context-buffer.d.ts +49 -0
  11. package/dist/core/context-buffer.d.ts.map +1 -0
  12. package/dist/core/context-buffer.js +84 -0
  13. package/dist/core/context-buffer.js.map +1 -0
  14. package/dist/core/sdk.d.ts.map +1 -1
  15. package/dist/core/sdk.js +3 -1
  16. package/dist/core/sdk.js.map +1 -1
  17. package/dist/core/settings-manager.d.ts +13 -0
  18. package/dist/core/settings-manager.d.ts.map +1 -1
  19. package/dist/core/settings-manager.js +40 -0
  20. package/dist/core/settings-manager.js.map +1 -1
  21. package/dist/core/system-prompt.d.ts +5 -0
  22. package/dist/core/system-prompt.d.ts.map +1 -1
  23. package/dist/core/system-prompt.js +6 -0
  24. package/dist/core/system-prompt.js.map +1 -1
  25. package/dist/core/thinking.d.ts +10 -1
  26. package/dist/core/thinking.d.ts.map +1 -1
  27. package/dist/core/thinking.js +14 -0
  28. package/dist/core/thinking.js.map +1 -1
  29. package/dist/core/tools/subagent.d.ts.map +1 -1
  30. package/dist/core/tools/subagent.js +1 -0
  31. package/dist/core/tools/subagent.js.map +1 -1
  32. package/dist/modes/interactive/components/settings-selector.d.ts +5 -0
  33. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  34. package/dist/modes/interactive/components/settings-selector.js +16 -0
  35. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  36. package/dist/modes/interactive/components/tool-execution.d.ts +7 -0
  37. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  38. package/dist/modes/interactive/components/tool-execution.js +16 -0
  39. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  40. package/dist/modes/interactive/interactive-mode.d.ts +33 -0
  41. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  42. package/dist/modes/interactive/interactive-mode.js +210 -87
  43. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  44. package/dist/modes/interactive/tab-title.d.ts +21 -3
  45. package/dist/modes/interactive/tab-title.d.ts.map +1 -1
  46. package/dist/modes/interactive/tab-title.js +47 -25
  47. package/dist/modes/interactive/tab-title.js.map +1 -1
  48. package/docs/agent-models.md +10 -0
  49. package/docs/development.md +1 -1
  50. package/docs/providers.md +7 -0
  51. package/docs/settings.md +29 -2
  52. package/docs/tui.md +42 -0
  53. package/examples/extensions/custom-provider-anthropic/package.json +3 -0
  54. package/examples/extensions/custom-provider-gitlab-duo/package.json +3 -0
  55. package/examples/extensions/custom-provider-qwen-cli/package.json +3 -0
  56. package/examples/extensions/with-deps/package.json +3 -0
  57. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  ### Added
6
6
 
7
+ - Thinking summaries are visible again on Opus 4.7+ (and any adaptive-thinking Claude model). Anthropic flipped the API default for `thinking.display` to `"omitted"`, so these models returned empty thinking blocks — dreb now sends `"summarized"` by default. Added a model-keyed `modelSettings` setting with a `thinkingDisplay` override (`"summarized" | "omitted"`), exposed in `/settings` → **Show thinking summaries** (shown only for adaptive models). Because the setting is keyed by model ID and resolved at the shared session-creation chokepoint, it is honored uniformly across the TUI, headless, JSON, RPC, and Telegram clients — and inherited automatically by subagents using the same model. ([#250](https://github.com/aebrer/dreb/issues/250))
8
+
7
9
  - Secret scrubbing and sensitive file access guards — two layers of defense against accidental credential leaks through the tool pipeline. Output scrubbing detects and redacts known secret patterns (AWS, GitHub, OpenAI, Anthropic, Slack, Stripe, PEM/SSH keys, URL credentials) in tool output before it enters the LLM conversation. Sensitive file guard blocks read access to credential files (`~/.ssh/id_*`, `~/.aws/credentials`, `~/.dreb/secrets/`, etc.) via both the `read` tool and bash commands. Both layers configurable via `sensitiveFilePaths` and `secretOutputPatterns` settings. ([#171](https://github.com/aebrer/dreb/issues/171))
8
10
 
9
11
  - Expanded forbidden-commands guard with destructive operation patterns: `rm -rf /` and variants, `dd` to block devices, `mkfs`, fork bomb `:(){ :|:& };:`, and block device redirects (`> /dev/sda`). Guard now also checks quoted content (catches `echo "rm -rf /" | bash`) and inspects script files before execution (`bash script.sh`). ([#170](https://github.com/aebrer/dreb/issues/170))
@@ -40,6 +42,8 @@
40
42
 
41
43
  ### Fixed
42
44
 
45
+ - Fixed ESC doing nothing during `stream_retry` / `length_retry` backoff. The old handlers stopped the working spinner (`loadingAnimation`) and swapped in a dedicated retry spinner that had no ESC wiring, so the default ESC handler's `if (this.loadingAnimation)` guard fell through to a no-op. The fix removes the retry spinner entirely, keeps the working spinner running throughout the retry, and surfaces retry feedback as a persistent warning in the chat scrollback instead. ESC now aborts via the pre-existing spinner-abort path — identical to cancelling normal generation. ([#262](https://github.com/aebrer/dreb/issues/262))
46
+
43
47
  - Fixed `/buddy off` not persisting across sessions — the buddy reappeared in the TUI on restart. The `hidden` flag was persisted correctly, but the startup auto-mount ignored it. The startup mount is now gated on the persisted `hidden` flag (extracted into `mountExistingBuddyIfVisible()`); a hidden buddy stays loaded but unmounted until you run `/buddy` to bring it back. ([#243](https://github.com/aebrer/dreb/issues/243))
44
48
 
45
49
  - Fixed subagents silently returning empty results when a child's final response was truncated at the model's token limit. The subagent spawn handler now inspects the last assistant message's `stopReason`: a clean exit with no output now surfaces a descriptive error (truncation, loud truncation failure, or "completed with no output") instead of a silent empty string, and a clean exit with partial output now flags the truncation via `errorMessage` while preserving the partial text — covering both raw `length` truncation and the loud `error` stopReason produced when the core agent loop exhausts its length retries. The parent renders these errors even on a clean (exit code 0) exit. ([#240](https://github.com/aebrer/dreb/issues/240))
package/README.md CHANGED
@@ -43,6 +43,22 @@ What you get in exchange: a skill system, an extension API, custom agent definit
43
43
 
44
44
  ## Quick Start
45
45
 
46
+ > **Node.js 22 LTS is required.** dreb relies on SSE streaming behavior that is stable in Node 22 LTS. Node 24 and Node 26 are known to break provider streaming due to changes in ReadableStream buffering, which causes every provider to fail with **"request ended without sending any chunks"**. If you see that error, switch to Node 22 LTS.
47
+
48
+ ### Building from source (recommended)
49
+
50
+ ```bash
51
+ git clone https://github.com/aebrer/dreb.git
52
+ cd dreb
53
+ npm install
54
+ npm run build
55
+ npm link -w packages/coding-agent
56
+ ```
57
+
58
+ ---
59
+
60
+ ### Installing from npm
61
+
46
62
  ```bash
47
63
  npm install -g @dreb/coding-agent
48
64
  ```
@@ -71,17 +87,9 @@ Then just talk to dreb. All 11 built-in tools are enabled by default: `read`, `w
71
87
 
72
88
  **Bun users:** Bun's lockfile can cache stale `@dreb/*` versions after upgrades, causing missing-export errors. Fix with `bun pm cache rm && bunx --force dreb`.
73
89
 
74
- ---
90
+ ### Troubleshooting
75
91
 
76
- ### Building from source
77
-
78
- ```bash
79
- git clone https://github.com/aebrer/dreb.git
80
- cd dreb
81
- npm install
82
- npm run build
83
- npm link -w packages/coding-agent
84
- ```
92
+ - **"request ended without sending any chunks" on every provider** — Your Node version is likely too new. Switch to **Node.js 22 LTS**. Node 26 in particular changed ReadableStream buffering in a way that breaks the Anthropic and OpenAI SDK stream parsers dreb uses.
85
93
 
86
94
  ---
87
95
 
@@ -157,7 +165,7 @@ Type `/` in the editor to trigger commands. [Extensions](#extensions) can regist
157
165
  | `/login`, `/logout` | OAuth authentication |
158
166
  | `/model` | Switch models |
159
167
  | `/scoped-models` | Enable/disable models for cycling |
160
- | `/settings` | Thinking level, theme, message delivery, transport |
168
+ | `/settings` | Thinking level, thinking summaries (adaptive Claude models), theme, message delivery, transport |
161
169
  | `/resume` | Pick from previous sessions |
162
170
  | `/new` | Start a new session |
163
171
  | `/name <name>` | Set session display name |
@@ -361,6 +369,8 @@ The `subagent` tool delegates tasks to independent child agent processes. Each s
361
369
 
362
370
  **Per-agent model overrides:** The model used by each agent type can be overridden via the `agentModels.models` setting (a map of agent name → ordered fallback list) without copying or editing the agent definition `.md` files. Configure it in `settings.json` or via `/settings` → **Agent Models**. Resolution order: per-invocation `model` override → `agentModels` setting → agent definition `model` → parent session model. See [docs/agent-models.md](docs/agent-models.md).
363
371
 
372
+ **Model identity in system prompt:** The parent session's running model is exposed in its own system prompt as `You are running on: provider/id`. This lets the model make self-aware routing decisions (e.g. delegate vision tasks to a multimodal subagent, or use a differently-architected model as a critic). The line updates automatically on mid-session model switches.
373
+
364
374
  **Session metadata:** Each child process records its agent type in the session JSONL header (`agentType` field), providing an audit trail of which agent definition executed the work.
365
375
 
366
376
  ---
@@ -467,6 +467,13 @@ export declare class AgentSession {
467
467
  * @throws Error if no API key available for the model
468
468
  */
469
469
  setModel(model: Model<any>): Promise<void>;
470
+ /**
471
+ * Refresh the live agent's thinkingDisplay for a (possibly) new model. The default
472
+ * depends on the model (adaptive-thinking models default to "summarized"), so this
473
+ * must run on every model switch. Keyed by model id from shared settings, so it
474
+ * resolves identically to how createAgentSession seeds it at startup.
475
+ */
476
+ private _refreshThinkingDisplay;
470
477
  /**
471
478
  * Cycle to next/previous model.
472
479
  * Uses scoped models (from --models flag) if available, otherwise all available models.