@dreb/coding-agent 2.48.0 → 2.50.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.
Files changed (46) hide show
  1. package/README.md +16 -6
  2. package/agents/explore.md +8 -3
  3. package/dist/cli/args.d.ts.map +1 -1
  4. package/dist/cli/args.js +3 -1
  5. package/dist/cli/args.js.map +1 -1
  6. package/dist/core/agent-session.d.ts.map +1 -1
  7. package/dist/core/agent-session.js +1 -0
  8. package/dist/core/agent-session.js.map +1 -1
  9. package/dist/core/sdk.d.ts +3 -3
  10. package/dist/core/sdk.d.ts.map +1 -1
  11. package/dist/core/sdk.js +4 -3
  12. package/dist/core/sdk.js.map +1 -1
  13. package/dist/core/system-prompt.d.ts.map +1 -1
  14. package/dist/core/system-prompt.js +1 -0
  15. package/dist/core/system-prompt.js.map +1 -1
  16. package/dist/core/tools/ask-user.d.ts.map +1 -1
  17. package/dist/core/tools/ask-user.js +1 -1
  18. package/dist/core/tools/ask-user.js.map +1 -1
  19. package/dist/core/tools/index.d.ts +7 -0
  20. package/dist/core/tools/index.d.ts.map +1 -1
  21. package/dist/core/tools/index.js +6 -0
  22. package/dist/core/tools/index.js.map +1 -1
  23. package/dist/core/tools/subagent.d.ts.map +1 -1
  24. package/dist/core/tools/subagent.js +15 -9
  25. package/dist/core/tools/subagent.js.map +1 -1
  26. package/dist/core/tools/wait.d.ts.map +1 -1
  27. package/dist/core/tools/wait.js +2 -1
  28. package/dist/core/tools/wait.js.map +1 -1
  29. package/dist/core/tools/watch-github-ci.d.ts +35 -0
  30. package/dist/core/tools/watch-github-ci.d.ts.map +1 -0
  31. package/dist/core/tools/watch-github-ci.js +204 -0
  32. package/dist/core/tools/watch-github-ci.js.map +1 -0
  33. package/dist/index.d.ts +2 -2
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +2 -2
  36. package/dist/index.js.map +1 -1
  37. package/docs/dashboard.md +8 -5
  38. package/docs/extensions.md +4 -2
  39. package/docs/mach6.md +3 -3
  40. package/docs/rpc.md +1 -1
  41. package/docs/sdk.md +4 -4
  42. package/package.json +1 -1
  43. package/skills/mach6-implement/SKILL.md +4 -3
  44. package/skills/mach6-issue/SKILL.md +6 -6
  45. package/skills/mach6-plan/SKILL.md +5 -5
  46. package/skills/mach6-publish/SKILL.md +3 -4
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 strip, 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. |
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 chip 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.
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 a chip strip one chip per background agent; click
378
- to drill into its live transcript.
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
- ⋯, tasks default collapsed), and the file table shows name + download only.
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
 
@@ -613,7 +613,7 @@ In the default parallel tool execution mode, sibling tool calls from the same as
613
613
  import { isToolCallEventType } from "@dreb/coding-agent";
614
614
 
615
615
  dreb.on("tool_call", async (event, ctx) => {
616
- // event.toolName - "bash", "read", "write", "edit", "grep", "find", "ls", "web_search", "web_fetch", "subagent", "wait", "search", "ask_user", "skill", "tasks_update", "suggest_next", or custom tool names
616
+ // event.toolName - "bash", "read", "write", "edit", "grep", "find", "ls", "web_search", "web_fetch", "subagent", "wait", "watch_github_ci", "search", "ask_user", "skill", "tasks_update", "suggest_next", or custom tool names
617
617
  // event.toolCallId
618
618
  // event.input - tool parameters
619
619
 
@@ -1518,7 +1518,7 @@ async execute(toolCallId, params) {
1518
1518
 
1519
1519
  ### Overriding Built-in Tools
1520
1520
 
1521
- Extensions can override built-in tools (`read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`, `web_search`, `web_fetch`, `subagent`, `wait`, `search`, `ask_user`) by registering a tool with the same name. Interactive mode displays a warning when this happens. The factory-only tools (`skill`, `tasks_update`, `suggest_next`) can also be overridden.
1521
+ Extensions can override built-in tools (`read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`, `web_search`, `web_fetch`, `subagent`, `wait`, `watch_github_ci`, `search`, `ask_user`) by registering a tool with the same name. Interactive mode displays a warning when this happens. The factory-only tools (`skill`, `tasks_update`, `suggest_next`) can also be overridden.
1522
1522
 
1523
1523
  ```bash
1524
1524
  # Extension's read tool replaces built-in read
@@ -1549,6 +1549,8 @@ Built-in tool implementations:
1549
1549
  - [ls.ts](https://github.com/aebrer/dreb/blob/master/packages/coding-agent/src/core/tools/ls.ts) - `LsToolDetails`
1550
1550
  - [web.ts](https://github.com/aebrer/dreb/blob/master/packages/coding-agent/src/core/tools/web.ts) - `web_search` and `web_fetch`
1551
1551
  - [subagent.ts](https://github.com/aebrer/dreb/blob/master/packages/coding-agent/src/core/tools/subagent.ts)
1552
+ - [wait.ts](https://github.com/aebrer/dreb/blob/master/packages/coding-agent/src/core/tools/wait.ts)
1553
+ - [watch-github-ci.ts](https://github.com/aebrer/dreb/blob/master/packages/coding-agent/src/core/tools/watch-github-ci.ts) - `watch_github_ci`
1552
1554
  - [skill.ts](https://github.com/aebrer/dreb/blob/master/packages/coding-agent/src/core/tools/skill.ts) - factory-only
1553
1555
  - [tasks.ts](https://github.com/aebrer/dreb/blob/master/packages/coding-agent/src/core/tools/tasks.ts) - factory-only
1554
1556
 
package/docs/mach6.md CHANGED
@@ -30,7 +30,7 @@ Assess an existing GitHub issue or create a new one.
30
30
  /skill:mach6-issue add dark mode # Create issue from description
31
31
  ```
32
32
 
33
- **Assess mode:** Launches parallel subagents to explore the codebase, then posts a structured assessment (summary, gaps, ambiguities, scope, risks) as an issue comment.
33
+ **Assess mode:** Launches parallel Explore agents to retrieve bounded code/documentation evidence, then has the primary agent synthesize and post the assessment (summary, gaps, ambiguities, scope, risks) as an issue comment.
34
34
 
35
35
  **Create mode:** Drafts a structured issue with title, summary, acceptance criteria, and technical notes.
36
36
 
@@ -44,7 +44,7 @@ Explore the codebase, create an implementation plan, open a draft PR, and post t
44
44
 
45
45
  - Reads the issue and any existing assessment
46
46
  - Checks project conventions (AGENTS.md, CONTRIBUTING.md, etc.)
47
- - Launches parallel subagents to explore similar features, architecture, and integration points
47
+ - Launches parallel Explore agents to locate related implementations, enumerate explicit flows/call sites, and quote bounded evidence; the primary agent owns architecture and planning
48
48
  - Creates a feature branch (`feature/issue-42-<slug>`) with an empty commit
49
49
  - Opens a draft PR linking to the issue
50
50
  - Posts the plan as a PR comment with `<!-- mach6-plan -->` marker
@@ -112,7 +112,7 @@ Pre-merge checks, version bump, docs update, merge, tag, and release.
112
112
  /skill:mach6-publish 53
113
113
  ```
114
114
 
115
- - Verifies CI passing, no merge conflicts, all findings addressed
115
+ - Verifies CI passing with the blocking `watch_github_ci` tool (never `wait` or a polling loop), no merge conflicts, and all findings addressed
116
116
  - Runs pre-merge checklist (version bump, tests)
117
117
  - Applies version bump on the feature branch
118
118
  - Proactively reviews and updates ALL documentation affected by the PR's changes
package/docs/rpc.md CHANGED
@@ -1112,7 +1112,7 @@ Response:
1112
1112
  },
1113
1113
  {
1114
1114
  "name": "Explore",
1115
- "description": "Codebase and web exploration find files, search code, search the web, answer questions. Read-only."
1115
+ "description": "Concrete evidence retrievallocate files, symbols, documentation, call sites, and exact snippets. No implementation work."
1116
1116
  }
1117
1117
  ]
1118
1118
  }
package/docs/sdk.md CHANGED
@@ -387,10 +387,10 @@ const { session } = await createAgentSession({ resourceLoader: loader });
387
387
 
388
388
  ```typescript
389
389
  import {
390
- codingTools, // read, bash, edit, write (subset — default is all 11)
390
+ codingTools, // read, bash, edit, write (subset — default is all 13 standard tools)
391
391
  readOnlyTools, // read, grep, find, ls
392
392
  readTool, bashTool, editTool, writeTool,
393
- grepTool, findTool, lsTool,
393
+ grepTool, findTool, lsTool, watchGithubCiTool,
394
394
  } from "@dreb/coding-agent";
395
395
 
396
396
  // Use built-in tool set
@@ -953,13 +953,13 @@ SettingsManager
953
953
  codingTools
954
954
  readOnlyTools
955
955
  readTool, bashTool, editTool, writeTool
956
- grepTool, findTool, lsTool
956
+ grepTool, findTool, lsTool, watchGithubCiTool
957
957
 
958
958
  // Tool factories (for custom cwd)
959
959
  createCodingTools
960
960
  createReadOnlyTools
961
961
  createReadTool, createBashTool, createEditTool, createWriteTool
962
- createGrepTool, createFindTool, createLsTool
962
+ createGrepTool, createFindTool, createLsTool, createWatchGithubCiTool
963
963
 
964
964
  // Types
965
965
  type CreateAgentSessionOptions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreb/coding-agent",
3
- "version": "2.48.0",
3
+ "version": "2.50.0",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "drebConfig": {
@@ -133,13 +133,14 @@ tasks_update([
133
133
 
134
134
  #### If `ci` was specified:
135
135
 
136
+ Use `watch_github_ci` with `pr: "<pr-number>"` so the tool blocks until the pull request's checks pass or fail. Do not use `wait`, sleep, or repeated polling commands for CI.
137
+
138
+ If checks fail, use the returned check output to identify the failed run, then inspect it:
139
+
136
140
  ```bash
137
- gh pr checks <pr-number>
138
141
  gh run view <run-id> --log-failed
139
142
  ```
140
143
 
141
- **Note:** `gh pr checks` returns exit code 8 while checks are still pending — this is expected, not a failure. Wait and re-run if needed.
142
-
143
144
  Read the failed CI logs and identify issues. Extract test failures, stack traces, error messages. If all checks pass, report this and stop.
144
145
 
145
146
  #### If finding numbers were specified:
@@ -52,12 +52,12 @@ Update task: read → completed, explore → in_progress.
52
52
 
53
53
  ### Step 3: Explore the codebase
54
54
 
55
- Launch 2-3 Explore subagents in parallel targeting different aspects. Agent definitions specify their own model with a provider fallback list — defaults work across providers and are fine for most cases. Override only with good reason (e.g. a particularly complex issue warrants a stronger tier).
56
- - **Relevant code**: Find existing code related to the issue, trace implementation patterns
57
- - **Architecture**: Map relevant architecture layers, abstractions, data flow
58
- - **Prior work**: Check for related branches, PRs, or commits
55
+ Launch 2-3 Explore subagents in parallel for concrete evidence retrieval. Agent definitions specify their own model with a provider fallback list — defaults work across providers and are fine for most cases. Override only with good reason (e.g. a large repository requires inspecting many files).
56
+ - **Relevant code evidence**: Locate named related behavior and quote the exact implementation and test snippets
57
+ - **Flow inventory**: Enumerate files, symbols, imports, calls, and registrations in an explicitly named existing flow without diagnosing it
58
+ - **Prior-work evidence**: Locate related branches, PRs, commits, and documentation and report their exact references
59
59
 
60
- Each agent should return 5-10 key files. After agents complete, read all identified files.
60
+ Do not ask Explore to determine the root cause, interpret ambiguous requirements, recommend an implementation, decide architecture, or assess the issue. Each agent should return 5-10 key files with bounded evidence. After agents complete, read all identified files and have the primary agent synthesize the current state, gaps, scope, and risks.
61
61
 
62
62
  Update task: explore → completed, assess → in_progress.
63
63
 
@@ -109,7 +109,7 @@ ls .github/ISSUE_TEMPLATE/ 2>/dev/null
109
109
  ```
110
110
  If templates exist, read them and select the most appropriate one.
111
111
 
112
- Explore the codebase if needed to understand the relevant area.
112
+ If codebase context is needed, use Explore subagents only for bounded evidence such as locating named behavior, files, tests, call sites, or exact snippets. The primary agent must interpret that evidence and own the issue's requirements, proposed behavior, scope, and technical conclusions.
113
113
 
114
114
  ### Step 2: Draft the issue
115
115
 
@@ -53,12 +53,12 @@ Extract planning-relevant guidance: project layers, testing expectations, coding
53
53
 
54
54
  ## Step 4: Explore the codebase
55
55
 
56
- Launch 2-3 Explore subagents in parallel. Agent definitions specify their own model with a provider fallback list — defaults work across providers and are fine for most cases. Override only with good reason (e.g. a particularly large or complex codebase warrants a stronger tier).
57
- - **Similar features**: Find existing code that solves related problems, trace implementation patterns
58
- - **Architecture**: Map relevant architecture layers, abstractions, data flow
59
- - **Integration points**: Identify where new code connects to existing systems
56
+ Launch 2-3 Explore subagents in parallel for concrete evidence retrieval. Agent definitions specify their own model with a provider fallback list — defaults work across providers and are fine for most cases. Override only with good reason (e.g. a particularly large codebase requires inspecting many files).
57
+ - **Existing feature evidence**: Locate named related features and quote the exact implementation and test snippets that establish their patterns
58
+ - **Layer inventory**: Enumerate the files, symbols, imports, and calls in an explicitly named existing data flow without deciding the architecture
59
+ - **Integration evidence**: Enumerate concrete call sites, registrations, configuration, and documentation for the relevant symbols
60
60
 
61
- Include project conventions in each agent's context. Each agent returns 5-10 key files. Read all identified files.
61
+ Do not ask Explore to diagnose the problem, interpret ambiguous requirements, recommend an implementation, design the architecture, or produce the plan. Include project conventions in each agent's context. Each agent returns 5-10 key files with bounded evidence. Read all identified files, then have the primary agent synthesize the architecture, risks, and implementation plan.
62
62
 
63
63
  Update task: explore → completed, plan → in_progress.
64
64
 
@@ -34,10 +34,9 @@ tasks_update([
34
34
  gh pr checkout <pr-number>
35
35
  git pull
36
36
  gh pr view <pr-number> --json mergeable,mergeStateStatus,statusCheckRollup,reviewDecision,comments,body
37
- gh pr checks <pr-number>
38
37
  ```
39
38
 
40
- **Note:** `gh pr checks` returns exit code 8 while checks are still pending this is expected, not a failure. Wait and re-run if needed.
39
+ Use `watch_github_ci` with `pr: "<pr-number>"` to block until CI passes or fails. Do not use `wait`, sleep, or repeated polling commands for CI.
41
40
 
42
41
  Read ALL PR comments to understand the full history — plans, reviews, assessments, progress updates, and discussion.
43
42
 
@@ -90,7 +89,7 @@ Update task: checks → completed, version → in_progress.
90
89
  git push
91
90
  ```
92
91
 
93
- 5. Wait for CI to pass on the version bump commit before proceeding to merge.
92
+ 5. Use `watch_github_ci` with `pr: "<pr-number>"` and proceed only after it reports that CI passed on the version bump commit.
94
93
 
95
94
  If the project doesn't use versioning, skip this step.
96
95
 
@@ -127,7 +126,7 @@ Proactively review and update ALL documentation affected by the PR's changes. Th
127
126
  git push
128
127
  ```
129
128
 
130
- 5. Wait for CI to pass on the docs commit.
129
+ 5. Use `watch_github_ci` with `pr: "<pr-number>"` and proceed only after it reports that CI passed on the docs commit.
131
130
 
132
131
  If no documentation changes are needed (rare), skip this step.
133
132