@dreb/coding-agent 2.55.4 → 2.55.6
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 +1 -1
- package/dist/core/agent-session.d.ts +5 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +7 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/output-guard.d.ts +2 -0
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js +95 -3
- package/dist/core/output-guard.js.map +1 -1
- package/dist/modes/rpc/rpc-event-projection.d.ts +29 -0
- package/dist/modes/rpc/rpc-event-projection.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-event-projection.js +54 -0
- package/dist/modes/rpc/rpc-event-projection.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +10 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/docs/dashboard.md +15 -6
- package/docs/rpc.md +7 -1
- package/package.json +1 -1
package/docs/dashboard.md
CHANGED
|
@@ -53,8 +53,12 @@ dreb dashboard --remote --allow you@example.com --allow teammate@example.com
|
|
|
53
53
|
|
|
54
54
|
Layers, in order, all fail-closed (any auth-subsystem error denies):
|
|
55
55
|
|
|
56
|
-
1. **Tailscale reachability** — the peer address must resolve
|
|
57
|
-
|
|
56
|
+
1. **Tailscale reachability** — the peer address must resolve through the
|
|
57
|
+
peer-specific `tailscale whois --json` command. Concurrent requests for the
|
|
58
|
+
same normalized peer share one in-flight lookup; completed identities are not
|
|
59
|
+
cached. A clean unknown peer remains a 403, while command, timeout, and parse
|
|
60
|
+
failures remain fail-closed as distinct auth-subsystem errors. No Tailscale,
|
|
61
|
+
no access.
|
|
58
62
|
2. **Identity allowlist** — `--allow` login names. An empty allowlist denies
|
|
59
63
|
everyone. Rejected identities see a denial page naming the identity.
|
|
60
64
|
3. **Pairing code** — first login from a new device requires the current
|
|
@@ -63,9 +67,14 @@ Layers, in order, all fail-closed (any auth-subsystem error denies):
|
|
|
63
67
|
printed at server start as a headless fallback). It proves the person can
|
|
64
68
|
see the host machine's local dashboard, so a stolen allowlist identity can't
|
|
65
69
|
quietly gain access.
|
|
66
|
-
4. **Device cookie** — successful pairing sets a signed HttpOnly cookie
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
4. **Device cookie** — successful pairing sets a signed HttpOnly cookie. New
|
|
71
|
+
pairings last 180 days by default; settings → devices accepts a whole-day
|
|
72
|
+
lifetime from 1 through 3650 for future pairings. Existing devices retain
|
|
73
|
+
their recorded `expiresAt`. When a remote device has at most 10% of its
|
|
74
|
+
original validity remaining (and has not expired), it receives an advance
|
|
75
|
+
warning at most once per UTC day across tabs, reconnects, and dashboard
|
|
76
|
+
restarts. Paired devices show their expiry date and can be unpaired at any
|
|
77
|
+
time.
|
|
69
78
|
|
|
70
79
|
**There is no LAN mode.** The server never listens on a LAN-reachable
|
|
71
80
|
interface without Tailscale identity enforcement.
|
|
@@ -128,7 +137,7 @@ networking window above.
|
|
|
128
137
|
| **Subagent view** | Read-only transcript of a background agent: live events via the RPC relay, hydrated from the agent's on-disk session log (`/subagents/:agentId/messages`) so the transcript survives browser reloads. Shows the task, streaming output, tool activity, and any safe Dispatch Arbiter changed/unchanged/failure records with the final agent/model/thinking. No raw arbiter output is displayed or transported. No composer — subagents can't be steered yet; the parent session controls them. |
|
|
129
138
|
| **Files** | Host-wide browser with places shortcuts (home, /tmp, project roots), breadcrumbs to `/`, new-folder, download, drop-zone/picker upload with explicit collision prompts, and "new session here" on any directory. It also shows the **effective global nested-context trust** for the displayed canonical directory: untrusted, trusted by that root, inherited from a granting root, or global expert trust-all. You can trust the displayed folder and descendants, or untrust the actual granting root; untrusting an inherited folder removes that root's trust for all descendants. |
|
|
130
139
|
| **Memories** | Dreb-only memory management for `~/.dreb/memory` and `.dreb/memory` under active/disk project roots. It lists existing `MEMORY.md` indexes and direct child `.md` entries only (no Claude paths, create, or rename), shows entry frontmatter or metadata errors so malformed files can be repaired, renders sanitized Markdown preview beside a raw editor, and uses exact SHA-256 revisions so stale saves/deletes return conflicts while preserving drafts. The index view is complete, not truncated, and warns when it exceeds the 200-line memory-index convention. Entry deletion requires both entry and index revisions, removes only matching safe Markdown-link index lines (`file.md` / `./file.md`), writes the cleaned index atomically before unlinking the entry, and rolls back loudly if the unlink fails. |
|
|
131
|
-
| **Settings** | Persistent defaults (default model, thinking level, steering/follow-up queue modes, auto-compaction, auto-retry) via `get_settings`/`set_settings` — validation errors are shown verbatim. The scoped-models editor controls model cycling for new sessions only: grouped search, model/provider/all toggles, responsive controls, accessible up/down partial-scope ordering, and save/reset. An absent `enabledModels` is future-inclusive all models in registry order and cannot be reordered; a partial scope is a non-empty ordered list of canonical `provider/model` references. Editing legacy glob, fuzzy, or thinking-suffix values saves normalized exact references. The selected context reads effective global + project settings but writes global; a project-level `enabledModels` shadow is warned. The global-only Dispatch Arbiter card exposes enable/disable, exact authenticated model selection, thinking, guide path, and readiness guidance; model-less enablement is blocked and RPC/runtime validation remains fail-closed. Entering Settings flushes pending writes and reloads durable global + project settings, so external edits appear; read, parse, or write failures fail loudly instead of showing stale settings. The global-only nested-context policy lists every explicit trusted root for audit and revoke, offers a simple add-by-path control, and includes a prominently warned expert trust-all toggle; the Files view remains the primary place to grant trust while browsing. Most defaults seed new sessions; context-trust changes are observed by active main/subagent processes for future lazy loads, but cannot remove already injected content. Dashboard-local preferences (always expand thinking, transcript image display mode, needs-attention notification permission) live in the browser, alongside an appearance section: a theme gallery of eight curated themes (entropist.ca, Dim, Solarized, Gruvbox, Caves of Qud, Van Gogh, and the colorblind-safe Okabe-Ito and Paul Tol) with live preview cards and a system/light/dark mode selector, saved per browser. Shows the current rotating pairing code on the host/local dashboard,
|
|
140
|
+
| **Settings** | Persistent defaults (default model, thinking level, steering/follow-up queue modes, auto-compaction, auto-retry) via `get_settings`/`set_settings` — validation errors are shown verbatim. The scoped-models editor controls model cycling for new sessions only: grouped search, model/provider/all toggles, responsive controls, accessible up/down partial-scope ordering, and save/reset. An absent `enabledModels` is future-inclusive all models in registry order and cannot be reordered; a partial scope is a non-empty ordered list of canonical `provider/model` references. Editing legacy glob, fuzzy, or thinking-suffix values saves normalized exact references. The selected context reads effective global + project settings but writes global; a project-level `enabledModels` shadow is warned. The global-only Dispatch Arbiter card exposes enable/disable, exact authenticated model selection, thinking, guide path, and readiness guidance; model-less enablement is blocked and RPC/runtime validation remains fail-closed. Entering Settings flushes pending writes and reloads durable global + project settings, so external edits appear; read, parse, or write failures fail loudly instead of showing stale settings. The global-only nested-context policy lists every explicit trusted root for audit and revoke, offers a simple add-by-path control, and includes a prominently warned expert trust-all toggle; the Files view remains the primary place to grant trust while browsing. Most defaults seed new sessions; context-trust changes are observed by active main/subagent processes for future lazy loads, but cannot remove already injected content. Dashboard-local preferences (always expand thinking, transcript image display mode, needs-attention notification permission) live in the browser, alongside an appearance section: a theme gallery of eight curated themes (entropist.ca, Dim, Solarized, Gruvbox, Caves of Qud, Van Gogh, and the colorblind-safe Okabe-Ito and Paul Tol) with live preview cards and a system/light/dark mode selector, saved per browser. Shows the current rotating pairing code on the host/local dashboard, the 1–3650 day lifetime used only for future pairings (180-day default), and paired-device expiry dates with unpair. |
|
|
132
141
|
| **Pairing** | Remote first-login: identity echo, rotating-code entry, and the security copy explaining what pairing grants. |
|
|
133
142
|
|
|
134
143
|
### Dispatch Arbiter observability
|
package/docs/rpc.md
CHANGED
|
@@ -1794,6 +1794,12 @@ Example streaming a text response:
|
|
|
1794
1794
|
{"type":"message_update","message":{...},"assistantMessageEvent":{"type":"text_end","contentIndex":0,"content":"Hello world","partial":{...}}}
|
|
1795
1795
|
```
|
|
1796
1796
|
|
|
1797
|
+
#### Dashboard-mode wire projection (`--ui dashboard`)
|
|
1798
|
+
|
|
1799
|
+
When the RPC server is launched with `--ui dashboard`, `message_update` events are projected **before serialization**: the cumulative top-level `message` field and the nested `assistantMessageEvent.partial` field are omitted from every frame. Both fields grow with the response, so carrying them on every delta makes the JSONL stream quadratic in response length; the dashboard reducer consumes only the delta fields (`type`, `contentIndex`, `delta`, `content`, `toolCall`), which are preserved unchanged.
|
|
1800
|
+
|
|
1801
|
+
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.
|
|
1802
|
+
|
|
1797
1803
|
### tool_execution_start / tool_execution_update / tool_execution_end
|
|
1798
1804
|
|
|
1799
1805
|
Emitted when a tool begins, streams progress, and completes execution.
|
|
@@ -1961,7 +1967,7 @@ Chain completions omit ambiguous scalar model/thinking fields and instead includ
|
|
|
1961
1967
|
}
|
|
1962
1968
|
```
|
|
1963
1969
|
|
|
1964
|
-
`background_agent_event` relays every JSONL event the child process emits (the same event union documented here, plus the initial session header), verbatim, tagged with the child's `agentId`. This is the live-transcript transport for observers like the dashboard — no session-file tailing needed. Streaming children emit `message_update` deltas at high frequency; consumers that fan events out further (e.g. over a network) should batch or throttle:
|
|
1970
|
+
`background_agent_event` relays every JSONL event the child process emits (the same event union documented here, plus the initial session header), verbatim, tagged with the child's `agentId`. This is the live-transcript transport for observers like the dashboard — no session-file tailing needed. Streaming children emit `message_update` deltas at high frequency; consumers that fan events out further (e.g. over a network) should batch or throttle. Under `--ui dashboard`, the [wire projection](#dashboard-mode-wire-projection---ui-dashboard) described above applies recursively to nested `message_update` events, so relayed frames omit the cumulative `message` and `partial` fields just like top-level ones:
|
|
1965
1971
|
|
|
1966
1972
|
```json
|
|
1967
1973
|
{
|