@dreb/coding-agent 2.59.2 → 2.60.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 CHANGED
@@ -319,6 +319,8 @@ A trusted root permits lazy loading for that existing directory and all of its d
319
319
 
320
320
  Replace the default system prompt with `.dreb/SYSTEM.md` (project) or `~/.dreb/agent/SYSTEM.md` (global). Append without replacing via `APPEND_SYSTEM.md`.
321
321
 
322
+ For persistent instructions that apply only to one exact provider/model pair, use `modelSettings` in `settings.json` with a canonical key such as `openai-codex/gpt-5.6-sol`. Set `systemPrompt` to replace dreb's built-in prompt or `appendSystemPrompt` to append instructions. The same mechanism works for local/custom models registered in `models.json`, and the prompt updates immediately when the model changes. Explicit session replacements (`--system-prompt`, `SYSTEM.md`, or SDK hooks) take precedence. See [Model settings](docs/settings.md#modelsettings).
323
+
322
324
  ---
323
325
 
324
326
  ## Memory
@@ -23,7 +23,8 @@ import type { ModelRegistry } from "./model-registry.js";
23
23
  import { PerformanceTracker } from "./performance-tracker.js";
24
24
  import { type PromptTemplate } from "./prompt-templates.js";
25
25
  import type { ResourceLoader } from "./resource-loader.js";
26
- import type { BranchSummaryEntry, SessionManager } from "./session-manager.js";
26
+ import type { BranchSummaryEntry } from "./session-manager.js";
27
+ import { SessionManager } from "./session-manager.js";
27
28
  import { type SettingsManager } from "./settings-manager.js";
28
29
  import type { BashOperations } from "./tools/bash.js";
29
30
  import { type SessionTask, type SubagentArbitrationEvent, type SubagentResult, type SubagentStepMetadata } from "./tools/index.js";
@@ -562,6 +563,8 @@ export declare class AgentSession {
562
563
  * resolves identically to how createAgentSession seeds it at startup.
563
564
  */
564
565
  private _refreshThinkingDisplay;
566
+ /** Reject malformed target-model prompt settings before a model switch mutates session state. */
567
+ private _validateModelPromptSettings;
565
568
  /**
566
569
  * Cycle to next/previous model.
567
570
  * Uses scoped models (from --models flag) if available, otherwise all available models.