@dreb/coding-agent 2.32.1 → 2.34.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 (80) hide show
  1. package/README.md +4 -0
  2. package/dist/core/agent-session.d.ts +14 -1
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +59 -8
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/settings-manager.d.ts +18 -0
  7. package/dist/core/settings-manager.d.ts.map +1 -1
  8. package/dist/core/settings-manager.js +22 -0
  9. package/dist/core/settings-manager.js.map +1 -1
  10. package/dist/core/tools/bash.d.ts.map +1 -1
  11. package/dist/core/tools/bash.js +4 -4
  12. package/dist/core/tools/bash.js.map +1 -1
  13. package/dist/core/tools/edit.d.ts.map +1 -1
  14. package/dist/core/tools/edit.js +2 -2
  15. package/dist/core/tools/edit.js.map +1 -1
  16. package/dist/core/tools/find.d.ts.map +1 -1
  17. package/dist/core/tools/find.js +2 -2
  18. package/dist/core/tools/find.js.map +1 -1
  19. package/dist/core/tools/grep.d.ts.map +1 -1
  20. package/dist/core/tools/grep.js +2 -2
  21. package/dist/core/tools/grep.js.map +1 -1
  22. package/dist/core/tools/ls.d.ts.map +1 -1
  23. package/dist/core/tools/ls.js +2 -2
  24. package/dist/core/tools/ls.js.map +1 -1
  25. package/dist/core/tools/read.d.ts.map +1 -1
  26. package/dist/core/tools/read.js +2 -2
  27. package/dist/core/tools/read.js.map +1 -1
  28. package/dist/core/tools/search.d.ts.map +1 -1
  29. package/dist/core/tools/search.js +2 -2
  30. package/dist/core/tools/search.js.map +1 -1
  31. package/dist/core/tools/skill.d.ts.map +1 -1
  32. package/dist/core/tools/skill.js +2 -2
  33. package/dist/core/tools/skill.js.map +1 -1
  34. package/dist/core/tools/subagent.d.ts.map +1 -1
  35. package/dist/core/tools/subagent.js +2 -2
  36. package/dist/core/tools/subagent.js.map +1 -1
  37. package/dist/core/tools/suggest-next.d.ts.map +1 -1
  38. package/dist/core/tools/suggest-next.js +5 -5
  39. package/dist/core/tools/suggest-next.js.map +1 -1
  40. package/dist/core/tools/tasks.d.ts.map +1 -1
  41. package/dist/core/tools/tasks.js +2 -2
  42. package/dist/core/tools/tasks.js.map +1 -1
  43. package/dist/core/tools/wait.d.ts.map +1 -1
  44. package/dist/core/tools/wait.js +2 -2
  45. package/dist/core/tools/wait.js.map +1 -1
  46. package/dist/core/tools/web.d.ts.map +1 -1
  47. package/dist/core/tools/web.js +4 -4
  48. package/dist/core/tools/web.js.map +1 -1
  49. package/dist/core/tools/write.d.ts.map +1 -1
  50. package/dist/core/tools/write.js +1 -1
  51. package/dist/core/tools/write.js.map +1 -1
  52. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  53. package/dist/modes/interactive/components/assistant-message.js +5 -10
  54. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  55. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  56. package/dist/modes/interactive/components/bash-execution.js +4 -4
  57. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  58. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  59. package/dist/modes/interactive/components/branch-summary-message.js +1 -1
  60. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  61. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  62. package/dist/modes/interactive/components/compaction-summary-message.js +1 -1
  63. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  64. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  65. package/dist/modes/interactive/components/custom-message.js +1 -1
  66. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  67. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  68. package/dist/modes/interactive/components/skill-invocation-message.js +1 -1
  69. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  70. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  71. package/dist/modes/interactive/components/tool-execution.js +2 -2
  72. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  73. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  74. package/dist/modes/interactive/components/user-message.js +1 -1
  75. package/dist/modes/interactive/components/user-message.js.map +1 -1
  76. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  77. package/dist/modes/interactive/interactive-mode.js +36 -29
  78. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  79. package/docs/settings.md +20 -0
  80. package/package.json +1 -1
package/README.md CHANGED
@@ -156,6 +156,8 @@ The editor can be temporarily replaced by other UI, like built-in `/settings` or
156
156
 
157
157
  Standard editing keybindings for delete word, undo, etc. See [docs/keybindings.md](docs/keybindings.md).
158
158
 
159
+ Transcript content is optimized for copy/paste: assistant prose, code blocks, tool output, bash output, diffs, and subagent/background-agent results use terminal soft-wrap, so selecting from scrollback preserves long logical lines without app-injected hard newlines. Fixed-width chrome such as tables, boxes, overlays, and the footer remains width-constrained.
160
+
159
161
  ### Commands
160
162
 
161
163
  Type `/` in the editor to trigger commands. [Extensions](#extensions) can register custom commands, [skills](#skills) are available as `/skill:name`, and [prompt templates](#prompt-templates) expand via `/templatename`.
@@ -384,6 +386,8 @@ The `subagent` tool delegates tasks to independent child agent processes. Each s
384
386
 
385
387
  **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.
386
388
 
389
+ **Background-agent guardrail:** Background subagents run asynchronously and return control to you while they work. To stop the parent agent from spinning ahead of results, a guardrail pauses it after `backgroundAgents.parentTurnLimit` turns (default 3) while subagents are still running. When this happens, dreb surfaces a friendly, non-error notification in the TUI and Telegram — explaining that background agents are still working and the parent paused intentionally, and that it resumes when they report back or when you send a message to steer it. This is a frontend/session event, not a model-context steer, so it can't go stale. Set `backgroundAgents.parentTurnGuardrail` to `false` to let the parent run unbounded while subagents work, or raise `parentTurnLimit` to relax the guardrail. See [settings](docs/settings.md#background-agents).
390
+
387
391
  ---
388
392
 
389
393
  ## Semantic Search
@@ -23,7 +23,7 @@ import { PerformanceTracker } from "./performance-tracker.js";
23
23
  import { type PromptTemplate } from "./prompt-templates.js";
24
24
  import type { ResourceLoader } from "./resource-loader.js";
25
25
  import type { BranchSummaryEntry, SessionManager } from "./session-manager.js";
26
- import type { SettingsManager } from "./settings-manager.js";
26
+ import { type SettingsManager } from "./settings-manager.js";
27
27
  import type { BashOperations } from "./tools/bash.js";
28
28
  import { type SessionTask, type SubagentResult } from "./tools/index.js";
29
29
  /** Parsed skill block from a user message */
@@ -69,6 +69,11 @@ export type AgentSessionEvent = AgentEvent | {
69
69
  agentId: string;
70
70
  agentType: string;
71
71
  success: boolean;
72
+ } | {
73
+ type: "parent_paused_for_background_agents";
74
+ runningAgentCount: number;
75
+ turnsUsed: number;
76
+ turnLimit: number;
72
77
  } | {
73
78
  type: "tasks_update";
74
79
  tasks: readonly SessionTask[];
@@ -204,6 +209,8 @@ export declare class AgentSession {
204
209
  private _modelRegistry;
205
210
  private _tasks;
206
211
  private _bgTurnCounter;
212
+ private _bgRunningAtTurnStart;
213
+ private _bgPauseNotified;
207
214
  private static readonly BG_TURN_LIMIT;
208
215
  private _sentinelSteered;
209
216
  private _unsubscribeGuardrailSentinel?;
@@ -245,6 +252,12 @@ export declare class AgentSession {
245
252
  * - Layer D: Turn limiter — restrict parent to N turns while bg agents are running
246
253
  */
247
254
  private _installBackgroundAgentGuardrails;
255
+ /**
256
+ * Reset the background-agent guardrail counter and the pause-notified flag together.
257
+ * These two fields are one logical unit — they must always reset in lockstep so a new
258
+ * pause episode both restarts the turn budget and re-arms the pause notification.
259
+ */
260
+ private _resetBgGuardrailState;
248
261
  /**
249
262
  * Handle background agent completion — builds the delivery message and routes
250
263
  * it to the parent agent via the appropriate channel (steer, prompt, or appendMessage).