@dreb/coding-agent 2.63.0 → 2.64.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.
Files changed (43) hide show
  1. package/README.md +2 -2
  2. package/dist/core/agent-session.d.ts.map +1 -1
  3. package/dist/core/agent-session.js +4 -9
  4. package/dist/core/agent-session.js.map +1 -1
  5. package/dist/core/output-guard.d.ts +9 -1
  6. package/dist/core/output-guard.d.ts.map +1 -1
  7. package/dist/core/output-guard.js +75 -20
  8. package/dist/core/output-guard.js.map +1 -1
  9. package/dist/core/settings-manager.d.ts +4 -0
  10. package/dist/core/settings-manager.d.ts.map +1 -1
  11. package/dist/core/settings-manager.js +12 -0
  12. package/dist/core/settings-manager.js.map +1 -1
  13. package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
  14. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  15. package/dist/modes/interactive/components/settings-selector.js +10 -0
  16. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  17. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  18. package/dist/modes/interactive/interactive-mode.js +4 -0
  19. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  20. package/dist/modes/rpc/index.d.ts +1 -0
  21. package/dist/modes/rpc/index.d.ts.map +1 -1
  22. package/dist/modes/rpc/index.js +1 -0
  23. package/dist/modes/rpc/index.js.map +1 -1
  24. package/dist/modes/rpc/rpc-client.d.ts +1 -0
  25. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  26. package/dist/modes/rpc/rpc-client.js +21 -1
  27. package/dist/modes/rpc/rpc-client.js.map +1 -1
  28. package/dist/modes/rpc/rpc-event-projection.d.ts +7 -0
  29. package/dist/modes/rpc/rpc-event-projection.d.ts.map +1 -1
  30. package/dist/modes/rpc/rpc-event-projection.js +161 -0
  31. package/dist/modes/rpc/rpc-event-projection.js.map +1 -1
  32. package/dist/modes/rpc/rpc-mode.d.ts +2 -2
  33. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  34. package/dist/modes/rpc/rpc-mode.js +16 -7
  35. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  36. package/dist/modes/rpc/rpc-types.d.ts +3 -0
  37. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  38. package/dist/modes/rpc/rpc-types.js.map +1 -1
  39. package/docs/compaction.md +16 -0
  40. package/docs/dashboard.md +16 -2
  41. package/docs/rpc.md +28 -2
  42. package/docs/settings.md +5 -0
  43. package/package.json +1 -1
package/docs/rpc.md CHANGED
@@ -18,6 +18,12 @@ await client.start();
18
18
 
19
19
  This enables per-user filesystem isolation by plain Unix DAC: give each authenticated user a dedicated UID and a working directory owned by that UID at mode `0700`. If the parent lacks the required capability (or the platform doesn't support `uid`/`gid`, e.g. Windows), the spawn fails and `start()` rejects rather than silently running as the parent user.
20
20
 
21
+ ### Process exit and pipe errors
22
+
23
+ `RpcClient.onExit(listener)` receives an `RpcExitInfo` when the child dies: `{ code, signal }` from a process `exit`, or `{ error }` from a spawn/runtime `error`. Process exits also carry `stderrTail` — the last **2000 characters** of the child's captured stderr — so a host that only watches for exit codes can still surface the child's own diagnostic (for example the stdout backpressure guard's abort message) instead of an opaque exit code. In-flight requests are rejected with the exit reason.
24
+
25
+ Child stdio pipe failures (e.g. an `EPIPE` when writing a large prompt to a dying child) are handled the same way: each pipe's `error` event fails in-flight requests with the pipe error and the captured stderr tail instead of crashing the host process.
26
+
21
27
 
22
28
  ## Starting RPC Mode
23
29
 
@@ -1325,7 +1331,7 @@ Note: with `summarize: true` the command is LLM-bound and can take a while. `Rpc
1325
1331
 
1326
1332
  Persistent settings, backed by the settings file (see [settings.md](settings.md)). They are normally distinct from live session state, with global-only control/security-policy exceptions:
1327
1333
 
1328
- - **Persistent defaults** (`get_settings` / `set_settings`): provider/model, thinking level, queue modes, compaction/retry/image/skill/thinking-display/transport toggles, `maxConcurrentSubagents`, `enabledModels`, `tabTitle`, and per-agent model fallback lists seed fresh runtimes. Writing these ordinary defaults does **not** change a running session.
1334
+ - **Persistent defaults** (`get_settings` / `set_settings`): provider/model, thinking level, queue modes, compaction/retry/image/skill/thinking-display/transport toggles, automatic-compaction continuation, `maxConcurrentSubagents`, `enabledModels`, `tabTitle`, and per-agent model fallback lists seed fresh runtimes. Writing these ordinary defaults does **not** change a running session.
1329
1335
  - **Global nested-context trust policy** (`autoLoadNestedContext`, `trustedContextFolders`, `effectiveTrustedContextRoots`, and the trust commands below): this is read from `~/.dreb/agent/settings.json` only, never project settings. Active main/subagent processes observe it for **future lazy nested/out-of-cwd loads**; it cannot remove content already injected into a conversation. It does not govern the separate initial upward context scan from the launch cwd.
1330
1336
  - **Global Dispatch Arbiter policy** (`subagentArbiter`): the complete object is read/written globally and project settings cannot shadow it. Enabled runtimes consume it before future subagent spawns; it does not rewrite already-started children.
1331
1337
  - **Runtime state** (`get_state` / `set_model` / `set_thinking_level` / `set_steering_mode` / `set_follow_up_mode` / `set_auto_compaction` / `set_auto_retry`): the state of the live session. Note that the runtime setters also persist their values as new defaults as a side effect.
@@ -1353,6 +1359,7 @@ Response:
1353
1359
  "steeringMode": "one-at-a-time",
1354
1360
  "followUpMode": "one-at-a-time",
1355
1361
  "compactionEnabled": true,
1362
+ "continueAfterAutoCompaction": false,
1356
1363
  "retryEnabled": true,
1357
1364
  "maxConcurrentSubagents": 4,
1358
1365
  "imageAutoResize": true,
@@ -1400,6 +1407,8 @@ Response:
1400
1407
 
1401
1408
  `tabTitle` is the effective merged object and is absent when unconfigured. Its optional `model` is one exact `provider/model`; when absent, title generation preserves the Explore-agent resolution route documented in [settings.md](settings.md#tab-title).
1402
1409
 
1410
+ `continueAfterAutoCompaction` defaults to `false`. When true, every successful automatic threshold or overflow compaction starts another model turn even without queued messages. It does not make failed, cancelled, or manual compaction continue.
1411
+
1403
1412
  #### set_settings
1404
1413
 
1405
1414
  Update persistent default settings. Takes a partial payload — only the supplied keys change. The whole payload is validated before anything is applied: on any invalid field, nothing changes and the response is an explicit error. Writes target the global settings file (same scope as every runtime setter).
@@ -1408,6 +1417,12 @@ Update persistent default settings. Takes a partial payload — only the supplie
1408
1417
  {"type": "set_settings", "settings": {"defaultThinkingLevel": "low", "retryEnabled": false}}
1409
1418
  ```
1410
1419
 
1420
+ Enable uninterrupted automatic-compaction continuation for unattended work. This can keep producing model turns and cost indefinitely; it never changes manual `compact` behavior:
1421
+
1422
+ ```json
1423
+ {"type": "set_settings", "settings": {"continueAfterAutoCompaction": true}}
1424
+ ```
1425
+
1411
1426
  Set the maximum concurrency for newly started parent sessions. Zero removes the `subagent` tool and adds explicit parent-model guidance; positive values limit running children without changing the separate eight-item parallel-call input bound:
1412
1427
 
1413
1428
  ```json
@@ -1488,6 +1503,7 @@ Response is the full settings snapshot after the write (same shape as `get_setti
1488
1503
  "steeringMode": "one-at-a-time",
1489
1504
  "followUpMode": "one-at-a-time",
1490
1505
  "compactionEnabled": true,
1506
+ "continueAfterAutoCompaction": false,
1491
1507
  "retryEnabled": false,
1492
1508
  "maxConcurrentSubagents": 1,
1493
1509
  "imageAutoResize": true,
@@ -1514,6 +1530,7 @@ Project-shadow warning example (the global write still lands, but the returned m
1514
1530
  "steeringMode": "one-at-a-time",
1515
1531
  "followUpMode": "one-at-a-time",
1516
1532
  "compactionEnabled": true,
1533
+ "continueAfterAutoCompaction": false,
1517
1534
  "retryEnabled": true,
1518
1535
  "maxConcurrentSubagents": 4,
1519
1536
  "imageAutoResize": true,
@@ -1543,6 +1560,7 @@ Valid keys and values:
1543
1560
  | `steeringMode` | `"all"`, `"one-at-a-time"` |
1544
1561
  | `followUpMode` | `"all"`, `"one-at-a-time"` |
1545
1562
  | `compactionEnabled` | boolean |
1563
+ | `continueAfterAutoCompaction` | boolean; default `false`. Starts another model turn after every successful automatic compaction and never affects manual compaction. |
1546
1564
  | `retryEnabled` | boolean |
1547
1565
  | `maxConcurrentSubagents` | Non-negative safe integer; default `4`. Captured by new parent sessions; `0` removes the subagent tool and adds explicit self-execution guidance. |
1548
1566
  | `imageAutoResize` | boolean |
@@ -1859,6 +1877,14 @@ When the RPC server is launched with `--ui dashboard`, `message_update` events a
1859
1877
 
1860
1878
  The projection applies recursively to `message_update` events nested inside `background_agent_event` payloads. It does **not** apply to command responses — `get_dashboard_snapshot` still returns complete messages — and `message_end` always carries the full final message as the authoritative transcript record. RPC servers launched without `--ui dashboard` emit the full unprojected protocol shown above.
1861
1879
 
1880
+ The same dashboard-mode projection also dedupes images across the wire. Inline `image` blocks (PNG, JPEG, GIF, WebP) are content-identified by `sha256(mimeType + 0x00 + decodedBytes)`; the first occurrence of each unique image is sent inline, and every later occurrence anywhere in the event stream is replaced with
1881
+
1882
+ ```json
1883
+ {"type": "image_reference", "id": "<64 hex chars>", "mimeType": "image/png", "size": 12345}
1884
+ ```
1885
+
1886
+ The child process emits each unique image's bytes at most once per process lifetime, which keeps multi-image turns from filling the stdout pipe while the dashboard is busy decoding. The child only dedupes blocks the dashboard's strict decode accepts — allowlisted MIME type, canonical base64, matching byte signature; everything else is left inline at every occurrence (the dashboard rejects it, as before, so it never becomes an unresolvable reference). Command responses are untouched — `get_messages` and `get_dashboard_snapshot` always carry full base64 payloads — and the dedupe state is per-process: a restarted child re-sends. See [Transcript images](dashboard.md#transcript-images) for how the dashboard resolves these references.
1887
+
1862
1888
  ### tool_execution_start / tool_execution_update / tool_execution_end
1863
1889
 
1864
1890
  Emitted when a tool begins, streams progress, and completes execution.
@@ -1928,7 +1954,7 @@ The `reason` field is `"threshold"` (context getting large) or `"overflow"` (con
1928
1954
  }
1929
1955
  ```
1930
1956
 
1931
- If `reason` was `"overflow"` and compaction succeeds, `willRetry` is `true` and the agent will automatically retry the prompt.
1957
+ If `reason` was `"overflow"` and compaction succeeds, `willRetry` is `true` and the agent will automatically retry the prompt. Independently, persistent `continueAfterAutoCompaction: true` starts another model turn after any successful automatic compaction, including a threshold compaction with `willRetry: false` and no queued message. Manual `compact` is outside this event path and does not continue because of that setting.
1932
1958
 
1933
1959
  If compaction was aborted, `result` is `null` and `aborted` is `true`.
1934
1960
 
package/docs/settings.md CHANGED
@@ -215,6 +215,7 @@ For either permitted lazy-load path, each context file is realpath-deduplicated
215
215
  | Setting | Type | Default | Description |
216
216
  |---------|------|---------|-------------|
217
217
  | `compaction.enabled` | boolean | `true` | Enable auto-compaction |
218
+ | `compaction.continueAfterAutoCompaction` | boolean | `false` | Start another model turn after every successful automatic compaction; manual `/compact` never continues because of this setting |
218
219
  | `compaction.reserveTokens` | number | `16384` | Tokens reserved for LLM response |
219
220
  | `compaction.keepRecentTokens` | number | `20000` | Recent tokens to keep (not summarized) |
220
221
 
@@ -222,12 +223,15 @@ For either permitted lazy-load path, each context file is realpath-deduplicated
222
223
  {
223
224
  "compaction": {
224
225
  "enabled": true,
226
+ "continueAfterAutoCompaction": false,
225
227
  "reserveTokens": 16384,
226
228
  "keepRecentTokens": 20000
227
229
  }
228
230
  }
229
231
  ```
230
232
 
233
+ The continuation option is intended for unattended long-running work and can produce model turns and cost without further user input. It applies only after successful automatic threshold or overflow compaction. Failed or cancelled automatic compaction and manual `/compact` do not continue because of it. The option is available in terminal `/settings` and dashboard Settings.
234
+
231
235
  ### Branch Summary
232
236
 
233
237
  | Setting | Type | Default | Description |
@@ -464,6 +468,7 @@ See [packages.md](packages.md) for package management details.
464
468
  "theme": "dark",
465
469
  "compaction": {
466
470
  "enabled": true,
471
+ "continueAfterAutoCompaction": false,
467
472
  "reserveTokens": 16384,
468
473
  "keepRecentTokens": 20000
469
474
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreb/coding-agent",
3
- "version": "2.63.0",
3
+ "version": "2.64.1",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "drebConfig": {