@dreb/coding-agent 2.47.0 → 2.49.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 +1 -1
- package/dist/core/agent-session.d.ts +22 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +90 -12
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/k3-context-tier.d.ts +67 -0
- package/dist/core/k3-context-tier.d.ts.map +1 -0
- package/dist/core/k3-context-tier.js +76 -0
- package/dist/core/k3-context-tier.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +5 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/tools/ask-user.d.ts.map +1 -1
- package/dist/core/tools/ask-user.js +1 -1
- package/dist/core/tools/ask-user.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +7 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/dashboard.md +8 -5
- package/docs/providers.md +1 -0
- package/docs/rpc.md +1 -0
- package/package.json +1 -1
package/docs/dashboard.md
CHANGED
|
@@ -120,7 +120,7 @@ networking window above.
|
|
|
120
120
|
| Screen | What it does |
|
|
121
121
|
|---|---|
|
|
122
122
|
| **Fleet** | Home. Live-first: one grid of every live session at the top — status chip (● running / ◆ needs-attention / ○ idle / ✕ error), project path, activity line, live subagent lines, tasks progress, ctx%, model, terminal provider-error reason, last activity. Live cards keep a deterministic order by project path, then session start time; needs-attention cards badge the browser tab without jumping around. Below the grid: past sessions grouped by project, three compact rows per group with an "all N on disk" expander, resume and delete. |
|
|
123
|
-
| **Session view** | Full chat drill-in. Markdown streaming transcript (text, thinking blocks with expand preference, inline provider/API failures with partial output preserved, agent-result cards, tool cards with bespoke read/write/edit/bash bodies plus full expandable inputs, markdown-rendered results for markdown-contract tools like subagent/skill/web_fetch/suggest_next, and inline tool-result images, compaction/branch summaries, custom messages), per-message copy, tasks panel, subagent
|
|
123
|
+
| **Session view** | Full chat drill-in. Markdown streaming transcript (text, thinking blocks with expand preference, inline provider/API failures with partial output preserved, agent-result cards, tool cards with bespoke read/write/edit/bash bodies plus full expandable inputs, markdown-rendered results for markdown-contract tools like subagent/skill/web_fetch/suggest_next, and inline tool-result images, compaction/branch summaries, custom messages), per-message copy, tasks panel, a bounded scrollable subagent panel that lists every retained agent newest-first with full running/done counts, status line with elapsed time plus ■ stop and compaction/retry aborts, a persistent session-header live indicator, and an info bar with cwd, branch, session name, token breakdown, cost/(sub)/daily rollup, ctx%, median tok/s, and a stats popover. Composer supports auto-grow, history, `/` autocomplete from `get_commands`, image attach/paste with sent images retained as user-message previews, queued-message chips with restore-all, steer/follow-up modes, and suggest-next. The ⋯ menu covers export HTML, compact, rename, fork-from-message, loaded context, and tool expand/collapse. Session names update live from manual rename or auto-naming. Extension UI requests for select/confirm/input/editor render as modals; rich `ask`/`ask_user` questions render inline with Markdown-formatted question text, choices, optional free text, an in-card Stop agent action, Escape-to-stop, and the authoritative auto-stop countdown. Pending questions set needs-attention state and use the existing hidden-page notification path. Extension notifications render as toasts. |
|
|
124
124
|
| **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. |
|
|
125
125
|
| **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. |
|
|
126
126
|
| **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 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, plus the paired-devices list with unpair. |
|
|
@@ -128,7 +128,7 @@ networking window above.
|
|
|
128
128
|
|
|
129
129
|
### Dispatch Arbiter observability
|
|
130
130
|
|
|
131
|
-
When the global Dispatch Arbiter is enabled, the dashboard consumes the typed `subagent_arbitration` RPC event. The matching background-agent card is updated to the final selected agent before child events arrive; the parent
|
|
131
|
+
When the global Dispatch Arbiter is enabled, the dashboard consumes the typed `subagent_arbitration` RPC event. The matching background-agent card is updated to the final selected agent before child events arrive; the parent panel row shows final model/thinking or a failure marker, and the subagent drill-in lists ordered records (including chain steps). Runtime snapshots carry the same safe records so refresh/resync during a live process does not revert to the requested identity.
|
|
132
132
|
|
|
133
133
|
Only host-validated proposed/final tuples, changed fields, status, step, and bounded host errors cross RPC/SSE. Arbiter prompts, raw output, reasoning, tasks, guides, and parent excerpts never reach dashboard protocol state. The safe record is separately persisted in the parent session as a non-context custom entry; child transcript hydration remains sourced from the child log.
|
|
134
134
|
|
|
@@ -374,8 +374,10 @@ Then open `https://hostname.tailXXXX.ts.net:<port>` on the phone.
|
|
|
374
374
|
Background subagents are first-class:
|
|
375
375
|
|
|
376
376
|
- Fleet cards show running/done counts and live agent lines.
|
|
377
|
-
- The session view shows
|
|
378
|
-
|
|
377
|
+
- The session view shows every retained background agent in a bounded,
|
|
378
|
+
scrollable panel, ordered newest-first with the full running/done count in its
|
|
379
|
+
summary. It uses the same native collapse pattern as the task tracker, starts
|
|
380
|
+
collapsed on mobile, and keeps every row available for transcript drill-in.
|
|
379
381
|
- The drill-in view streams the child's events in real time via the
|
|
380
382
|
`background_agent_event` relay (see [RPC events](rpc.md#event-types)) and
|
|
381
383
|
hydrates from the agent's on-disk session log on mount, so transcripts
|
|
@@ -387,7 +389,8 @@ Single breakpoint at 700px. At <=700px, fleet cards stack; long session names,
|
|
|
387
389
|
status chips, project paths, activity and subagent text, and past-session
|
|
388
390
|
labels wrap within their cards or rows rather than spilling off-screen. The
|
|
389
391
|
session view prioritizes read-and-steer (model/thinking switchers collapse into
|
|
390
|
-
⋯,
|
|
392
|
+
⋯, and task/subagent panels default collapsed), and the file table shows name +
|
|
393
|
+
download only.
|
|
391
394
|
Composer modes, abort, and needs-attention affordances are never reduced away
|
|
392
395
|
— steering a running agent from a phone is the primary remote use case.
|
|
393
396
|
|
package/docs/providers.md
CHANGED
|
@@ -52,6 +52,7 @@ Use `/logout` to clear credentials. Tokens are stored in `~/.dreb/agent/auth.jso
|
|
|
52
52
|
- `/login` uses the Kimi Code OAuth subscription endpoint at `https://api.kimi.com/coding/v1`.
|
|
53
53
|
- `KIMI_API_KEY` uses Kimi For Coding's Anthropic-compatible API at `https://api.kimi.com/coding`.
|
|
54
54
|
- Built-in OAuth models are `kimi-for-coding` (default, 262k context), `k3` (1M context), and `kimi-for-coding-highspeed` (262k context). Model availability is plan-dependent: the `k3` 1M-context ID and the `kimi-for-coding-highspeed` ID are only exposed when the subscription includes them, and `kimi-for-coding-highspeed` runs at roughly 6× speed for 3× quota usage. On login/refresh, dreb asks the Kimi API which models the subscription is entitled to and updates context, reasoning, image, tool-use, protocol, and thinking-effort metadata. Compatible newly discovered IDs are templated conservatively; if discovery fails, the static list remains available.
|
|
55
|
+
- The OAuth `k3` model is context-tiered: the Kimi endpoint serves it as `k3-256k` (256k context, cheaper) and `k3` (1M context, stated to consume 2× the quota), and upgrading does not invalidate the prompt cache. The cheaper variant is exclusive to the Kimi for Coding OAuth endpoint — the pay-per-token Moonshot AI Platform does not expose it. dreb starts every session on the `k3-256k` wire ID and automatically upgrades to `k3` once the session context passes the 256k cutoff (256k minus the default compaction reserve) instead of compacting. A user-lowered compaction threshold compacts before the cutoff and thus effectively disables the upgrade. Customizing `k3`'s context window via `models.json` disables automatic tiering entirely, and compacted or fresh sessions return to the cheaper tier.
|
|
55
56
|
- OAuth requests use the current Kimi Code device identity contract and share its stable `~/.kimi-code/device_id`. Extra low-precedence headers can be supplied with newline-separated `KIMI_CODE_CUSTOM_HEADERS` values.
|
|
56
57
|
- The OAuth coding endpoint accepts OpenAI-style multimodal content arrays with base64 `image_url` data URLs. dreb keeps a conservative 32k output-token cap because the managed model catalog does not currently advertise a per-model output limit.
|
|
57
58
|
- Moonshot Open Platform uses a different base URL (`https://api.moonshot.ai/v1`); don't assume both routes expose identical behavior.
|
package/docs/rpc.md
CHANGED
|
@@ -1617,6 +1617,7 @@ Response:
|
|
|
1617
1617
|
| `length_retry` | Response hit the token limit; retrying with a larger budget |
|
|
1618
1618
|
| `auto_compaction_start` | Auto-compaction begins |
|
|
1619
1619
|
| `auto_compaction_end` | Auto-compaction completes |
|
|
1620
|
+
| `context_window_upgrade` | Wire model tier auto-upgraded (e.g. Kimi K3 256k → 1M); includes `provider`, `modelId`, `fromContextWindow`, `toContextWindow` |
|
|
1620
1621
|
| `auto_retry_start` | Auto-retry begins (after transient error) |
|
|
1621
1622
|
| `auto_retry_end` | Auto-retry completes (success or final failure) |
|
|
1622
1623
|
| `background_agent_start` | Background subagent launched (includes `sessionDir`) |
|