@dreb/coding-agent 2.32.1 → 2.33.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 +2 -0
- package/dist/core/agent-session.d.ts +14 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +59 -8
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/settings-manager.d.ts +18 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +22 -0
- package/dist/core/settings-manager.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/settings.md +20 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -384,6 +384,8 @@ The `subagent` tool delegates tasks to independent child agent processes. Each s
|
|
|
384
384
|
|
|
385
385
|
**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
386
|
|
|
387
|
+
**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).
|
|
388
|
+
|
|
387
389
|
---
|
|
388
390
|
|
|
389
391
|
## 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
|
|
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).
|