@dreb/coding-agent 2.61.1 → 2.62.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.
@@ -13,7 +13,7 @@ import type { DispatchArbitrationRecord } from "../../core/dispatch-arbiter.js";
13
13
  import type { ContextUsage } from "../../core/extensions/types.js";
14
14
  import type { ModelPerformanceSummary } from "../../core/performance-tracker.js";
15
15
  import type { SessionEntry } from "../../core/session-manager.js";
16
- import type { SubagentArbiterSettings } from "../../core/settings-manager.js";
16
+ import type { SubagentArbiterSettings, TabTitleSettings, TabTitleSettingsUpdate } from "../../core/settings-manager.js";
17
17
  import type { SourceInfo } from "../../core/source-info.js";
18
18
  export type RpcCommand = {
19
19
  id?: string;
@@ -883,6 +883,8 @@ export interface RpcSettingsSnapshot {
883
883
  agentModels?: Record<string, string[]>;
884
884
  /** Global-only fail-closed Dispatch Arbiter configuration. */
885
885
  subagentArbiter?: SubagentArbiterSettings;
886
+ /** Effective automatic tab-title configuration. */
887
+ tabTitle?: TabTitleSettings;
886
888
  /** Raw effective persisted model patterns. Absent means the future-inclusive all-model scope. */
887
889
  enabledModels?: string[];
888
890
  /** Effective patterns resolved by coding-agent core in model-cycling order. */
@@ -950,6 +952,8 @@ export interface RpcSettingsUpdate {
950
952
  enabledModels?: string[] | null;
951
953
  /** Replaces the complete global-only arbiter configuration. */
952
954
  subagentArbiter?: SubagentArbiterSettings | null;
955
+ /** Partial global automatic tab-title configuration update. `model: null` removes the pinned model, restoring Explore-agent routing. */
956
+ tabTitle?: TabTitleSettingsUpdate;
953
957
  }
954
958
  /** A single question inside an `ask` extension-UI request. */
955
959
  export interface RpcAskQuestion {
@@ -1 +1 @@
1
- {"version":3,"file":"rpc-types.d.ts","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACpE,OA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\n * Responses and events are emitted as JSON lines on stdout.\n */\n\nimport type { AgentMessage, ThinkingLevel } from \"@dreb/agent-core\";\nimport type { ImageContent, Model, Transport } from \"@dreb/ai\";\nimport type { AgentSessionEvent, SessionStats } from \"../../core/agent-session.js\";\nimport type { BashResult } from \"../../core/bash-executor.js\";\nimport type { CompactionResult } from \"../../core/compaction/index.js\";\nimport type { DispatchArbitrationRecord } from \"../../core/dispatch-arbiter.js\";\nimport type { ContextUsage } from \"../../core/extensions/types.js\";\nimport type { ModelPerformanceSummary } from \"../../core/performance-tracker.js\";\nimport type { SessionEntry } from \"../../core/session-manager.js\";\nimport type { SubagentArbiterSettings } from \"../../core/settings-manager.js\";\nimport type { SourceInfo } from \"../../core/source-info.js\";\n\n// ============================================================================\n// RPC Commands (stdin)\n// ============================================================================\n\nexport type RpcCommand =\n\t// Prompting\n\t| { id?: string; type: \"prompt\"; message: string; images?: ImageContent[]; streamingBehavior?: \"steer\" | \"followUp\" }\n\t| { id?: string; type: \"steer\"; message: string; images?: ImageContent[] }\n\t| { id?: string; type: \"follow_up\"; message: string; images?: ImageContent[] }\n\t| { id?: string; type: \"abort\" }\n\t| { id?: string; type: \"new_session\"; parentSession?: string }\n\t| { id?: string; type: \"reload\" }\n\t| { id?: string; type: \"dream\"; args?: string }\n\n\t// State\n\t| { id?: string; type: \"get_state\" }\n\t/**\n\t * Atomically captures dashboard-visible parent-session state. The RPC mode\n\t * writes a matching dashboard_snapshot_barrier immediately before its response;\n\t * consumers must use that barrier rather than promise timing to reconcile\n\t * later streamed events.\n\t */\n\t| { id?: string; type: \"get_dashboard_snapshot\" }\n\t| { id?: string; type: \"get_resources\" }\n\t| { id?: string; type: \"get_git_branch\" }\n\t| { id?: string; type: \"get_daily_cost\" }\n\n\t// Model\n\t| { id?: string; type: \"set_model\"; provider: string; modelId: string }\n\t| { id?: string; type: \"resolve_model\"; pattern: string }\n\t| { id?: string; type: \"cycle_model\" }\n\t| { id?: string; type: \"get_available_models\" }\n\n\t// Buddy — hatch/reroll run inside the agent process so API keys never leave\n\t| { id?: string; type: \"buddy_hatch\" }\n\t| { id?: string; type: \"buddy_reroll\" }\n\n\t// Thinking\n\t| { id?: string; type: \"set_thinking_level\"; level: ThinkingLevel }\n\t| { id?: string; type: \"cycle_thinking_level\" }\n\n\t// Queue modes\n\t| { id?: string; type: \"set_steering_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\t| { id?: string; type: \"set_follow_up_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\t| { id?: string; type: \"get_pending_messages\" }\n\t| { id?: string; type: \"clear_pending_messages\" }\n\n\t// Compaction\n\t| { id?: string; type: \"compact\"; customInstructions?: string }\n\t| { id?: string; type: \"set_auto_compaction\"; enabled: boolean }\n\t| { id?: string; type: \"abort_compaction\" }\n\n\t// Retry\n\t| { id?: string; type: \"set_auto_retry\"; enabled: boolean }\n\t| { id?: string; type: \"abort_retry\" }\n\n\t// Bash\n\t| { id?: string; type: \"bash\"; command: string }\n\t| { id?: string; type: \"abort_bash\" }\n\n\t// Session\n\t| { id?: string; type: \"get_session_stats\" }\n\t| { id?: string; type: \"get_performance_stats\" }\n\t| { id?: string; type: \"export_html\"; outputPath?: string }\n\t| { id?: string; type: \"import_jsonl\"; inputPath: string }\n\t| { id?: string; type: \"switch_session\"; sessionPath: string }\n\t| { id?: string; type: \"delete_session\"; sessionPath: string }\n\t| { id?: string; type: \"fork\"; entryId: string }\n\t| { id?: string; type: \"get_fork_messages\" }\n\t| { id?: string; type: \"get_tree\" }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"navigate_tree\";\n\t\t\ttargetId: string;\n\t\t\tsummarize?: boolean;\n\t\t\tcustomInstructions?: string;\n\t\t\treplaceInstructions?: boolean;\n\t\t\tlabel?: string;\n\t }\n\t| { id?: string; type: \"get_last_assistant_text\" }\n\t| { id?: string; type: \"set_session_name\"; name: string }\n\n\t// Messages\n\t| { id?: string; type: \"get_messages\" }\n\n\t// Command discovery (resource commands plus client-handled built-ins)\n\t| { id?: string; type: \"get_commands\" }\n\n\t// Session listing\n\t| { id?: string; type: \"list_sessions\" }\n\t| { id?: string; type: \"list_all_sessions\" }\n\n\t// Background agents\n\t| { id?: string; type: \"list_background_agents\" }\n\t| { id?: string; type: \"steer_background_agent\"; agentId: string; message: string }\n\t| { id?: string; type: \"get_background_agent_pending\"; agentId: string }\n\t| { id?: string; type: \"list_agent_types\" }\n\n\t// Settings (persistent defaults)\n\t| { id?: string; type: \"get_settings\" }\n\t| { id?: string; type: \"set_settings\"; settings: RpcSettingsUpdate }\n\t| { id?: string; type: \"evaluate_context_trust\"; path: string }\n\t| { id?: string; type: \"trust_context_folder\"; path: string }\n\t| { id?: string; type: \"untrust_context_folder\"; path: string }\n\t| { id?: string; type: \"remove_trusted_context_folder\"; path: string }\n\n\t// Version\n\t| { id?: string; type: \"get_version\" };\n\n// ============================================================================\n// RPC Slash Command (for get_commands response)\n// ============================================================================\n\ninterface RpcResourceSlashCommand {\n\t/** Command name (without leading slash) */\n\tname: string;\n\t/** Human-readable description */\n\tdescription?: string;\n\t/** Prompt-invokable resource command. */\n\tsource: \"extension\" | \"prompt\" | \"skill\";\n\t/** Source metadata for the owning resource. */\n\tsourceInfo: SourceInfo;\n}\n\ninterface RpcBuiltinSlashCommand {\n\t/** Command name (without leading slash). */\n\tname: string;\n\t/** Human-readable description. */\n\tdescription: string;\n\t/** Built-ins require client-side handling and are rejected by RPC prompt commands. */\n\tsource: \"builtin\";\n\t/** False means typed use is intercepted but the command is omitted from dashboard autocomplete. */\n\tdashboard: boolean;\n}\n\n/** A slash command discoverable by an RPC client. */\nexport type RpcSlashCommand = RpcResourceSlashCommand | RpcBuiltinSlashCommand;\n\nexport interface RpcScopedModel {\n\tprovider: string;\n\tid: string;\n\tname?: string;\n\treasoning?: boolean;\n\tthinkingLevel?: string;\n}\n\nexport interface RpcModelScopeWarning {\n\t/** Raw persisted pattern that produced this diagnostic. */\n\tpattern: string;\n\t/** Resolver warning text without terminal styling. */\n\tmessage: string;\n}\n\nexport interface RpcResources {\n\tcontextFiles: Array<{ path: string }>;\n\tskills: Array<{ name: string; description: string }>;\n\textensions: Array<{ name?: string; path: string }>;\n\tpromptTemplates: Array<{ name: string; description?: string }>;\n\tsystemPromptPresent: boolean;\n}\n\nexport interface RpcPerformanceStats {\n\t/** TUI-parity summaries computed by the shared rolling and delta calculators. */\n\tmodels: ModelPerformanceSummary[];\n}\n\nexport interface RpcQueuedMessage {\n\ttext: string;\n\timages?: ImageContent[];\n}\n\nexport interface RpcPendingMessages {\n\t/** Text-only compatibility view for existing clients. */\n\tsteering: string[];\n\t/** Text-only compatibility view for existing clients. */\n\tfollowUp: string[];\n\t/** Full queued payloads, including inline image attachments. */\n\tsteeringMessages?: RpcQueuedMessage[];\n\t/** Full queued payloads, including inline image attachments. */\n\tfollowUpMessages?: RpcQueuedMessage[];\n}\n\n// ============================================================================\n// RPC State\n// ============================================================================\n\nexport interface RpcSessionTask {\n\tid: string;\n\ttitle: string;\n\tstatus: \"pending\" | \"in_progress\" | \"completed\";\n}\n\nexport interface RpcDashboardSnapshot {\n\t/** Opaque token repeated by the immediately following barrier event. */\n\tsnapshotId: string;\n\tstate: RpcSessionState;\n\t/** Complete parent transcript at the same RPC command boundary as state. */\n\tmessages: AgentMessage[];\n\t/** Current background-agent registry at that boundary. */\n\tbackgroundAgents: RpcBackgroundAgentInfo[];\n\t/** Blocking UI requests that are still waiting for a host response. */\n\tpendingExtensionUiRequests: RpcBlockingExtensionUIRequest[];\n}\n\n/** Ordering marker emitted immediately before a matching dashboard snapshot response. */\nexport interface RpcDashboardSnapshotBarrierEvent {\n\ttype: \"dashboard_snapshot_barrier\";\n\t/** Opaque token matching the following {@link RpcDashboardSnapshot.snapshotId}. */\n\tsnapshotId: string;\n}\n\n/** Non-response JSONL messages emitted by the RPC server on stdout. */\nexport type RpcEvent = AgentSessionEvent | RpcExtensionUIRequest | RpcDashboardSnapshotBarrierEvent;\n\nexport interface RpcSessionState {\n\tmodel?: Model<any>;\n\tscopedModels: RpcScopedModel[];\n\t/** Current in-memory task list, replaced atomically by the tasks_update tool. */\n\ttasks: RpcSessionTask[];\n\tusingSubscription: boolean;\n\tthinkingLevel: ThinkingLevel;\n\t/** Model-aware levels available for selection and cycling. */\n\tavailableThinkingLevels: ThinkingLevel[];\n\tisStreaming: boolean;\n\t/** True from retry classification through retry completion, including backoff. */\n\tisRetrying: boolean;\n\t/** Current automatic retry attempt, or 0 before retry start / after completion. */\n\tretryAttempt: number;\n\tisCompacting: boolean;\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tpendingMessageCount: number;\n\t/**\n\t * Context window usage computed by the session — the exact numbers the TUI footer\n\t * renders (AgentSession.getContextUsage()). `tokens`/`percent` are null when usage\n\t * is unknown (e.g. right after compaction, before the next LLM response). Undefined\n\t * when no model is set or the model has no context window.\n\t */\n\tcontextUsage?: ContextUsage;\n\t/** Non-empty when the model was changed from the user's saved preference\n\t * (e.g. saved model unavailable after restart). */\n\tmodelFallbackMessage?: string;\n}\n\n// ============================================================================\n// RPC Responses (stdout)\n// ============================================================================\n\n// Success responses with data\nexport type RpcResponse =\n\t// Prompting (async - events follow)\n\t| { id?: string; type: \"response\"; command: \"prompt\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"steer\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"follow_up\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"new_session\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"reload\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"dream\"; success: true; data: { message: string } }\n\n\t// State\n\t| { id?: string; type: \"response\"; command: \"get_state\"; success: true; data: RpcSessionState }\n\t| { id?: string; type: \"response\"; command: \"get_dashboard_snapshot\"; success: true; data: RpcDashboardSnapshot }\n\t| { id?: string; type: \"response\"; command: \"get_resources\"; success: true; data: RpcResources }\n\t| { id?: string; type: \"response\"; command: \"get_git_branch\"; success: true; data: { branch: string | null } }\n\t| { id?: string; type: \"response\"; command: \"get_daily_cost\"; success: true; data: { cost: number } }\n\n\t// Model\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"set_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: Model<any>;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"resolve_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: { model: Model<any>; warning?: string } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: { model: Model<any>; thinkingLevel: ThinkingLevel; isScoped: boolean } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_available_models\";\n\t\t\tsuccess: true;\n\t\t\tdata: { models: Model<any>[] };\n\t }\n\n\t// Buddy\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"buddy_hatch\";\n\t\t\tsuccess: true;\n\t\t\tdata: { state: import(\"../../core/buddy/buddy-types.js\").BuddyState };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"buddy_reroll\";\n\t\t\tsuccess: true;\n\t\t\tdata: { state: import(\"../../core/buddy/buddy-types.js\").BuddyState };\n\t }\n\n\t// Thinking\n\t| { id?: string; type: \"response\"; command: \"set_thinking_level\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_thinking_level\";\n\t\t\tsuccess: true;\n\t\t\tdata: { level: ThinkingLevel } | null;\n\t }\n\n\t// Queue modes\n\t| { id?: string; type: \"response\"; command: \"set_steering_mode\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"set_follow_up_mode\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"get_pending_messages\"; success: true; data: RpcPendingMessages }\n\t| { id?: string; type: \"response\"; command: \"clear_pending_messages\"; success: true; data: RpcPendingMessages }\n\n\t// Compaction\n\t| { id?: string; type: \"response\"; command: \"compact\"; success: true; data: CompactionResult }\n\t| { id?: string; type: \"response\"; command: \"set_auto_compaction\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort_compaction\"; success: true }\n\n\t// Retry\n\t| { id?: string; type: \"response\"; command: \"set_auto_retry\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort_retry\"; success: true }\n\n\t// Bash\n\t| { id?: string; type: \"response\"; command: \"bash\"; success: true; data: BashResult }\n\t| { id?: string; type: \"response\"; command: \"abort_bash\"; success: true }\n\n\t// Session\n\t| { id?: string; type: \"response\"; command: \"get_session_stats\"; success: true; data: SessionStats }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_performance_stats\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcPerformanceStats;\n\t }\n\t| { id?: string; type: \"response\"; command: \"export_html\"; success: true; data: { path: string } }\n\t| { id?: string; type: \"response\"; command: \"import_jsonl\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"switch_session\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"delete_session\"; success: true; data: { method: \"trash\" | \"unlink\" } }\n\t| { id?: string; type: \"response\"; command: \"fork\"; success: true; data: { text: string; cancelled: boolean } }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_fork_messages\";\n\t\t\tsuccess: true;\n\t\t\tdata: { messages: Array<{ entryId: string; text: string; role: \"user\" | \"assistant\" }> };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_tree\";\n\t\t\tsuccess: true;\n\t\t\tdata: { roots: RpcTreeNode[]; leafId: string | null };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"navigate_tree\";\n\t\t\tsuccess: true;\n\t\t\tdata: { cancelled: boolean; editorText?: string };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_last_assistant_text\";\n\t\t\tsuccess: true;\n\t\t\tdata: { text: string | null };\n\t }\n\t| { id?: string; type: \"response\"; command: \"set_session_name\"; success: true }\n\n\t// Messages\n\t| { id?: string; type: \"response\"; command: \"get_messages\"; success: true; data: { messages: AgentMessage[] } }\n\n\t// Commands\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_commands\";\n\t\t\tsuccess: true;\n\t\t\tdata: { commands: RpcSlashCommand[] };\n\t }\n\n\t// Session listing\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_sessions\";\n\t\t\tsuccess: true;\n\t\t\tdata: { sessions: RpcSessionInfo[] };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_all_sessions\";\n\t\t\tsuccess: true;\n\t\t\tdata: { sessions: RpcSessionInfo[] };\n\t }\n\n\t// Background agents\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_background_agents\";\n\t\t\tsuccess: true;\n\t\t\tdata: { agents: RpcBackgroundAgentInfo[] };\n\t }\n\t| { id?: string; type: \"response\"; command: \"steer_background_agent\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_background_agent_pending\";\n\t\t\tsuccess: true;\n\t\t\tdata: { steeringMode: \"all\" | \"one-at-a-time\"; pending: RpcPendingMessages };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_agent_types\";\n\t\t\tsuccess: true;\n\t\t\tdata: { agentTypes: RpcAgentTypeInfo[] };\n\t }\n\n\t// Settings\n\t| { id?: string; type: \"response\"; command: \"get_settings\"; success: true; data: RpcSettingsSnapshot }\n\t| { id?: string; type: \"response\"; command: \"set_settings\"; success: true; data: RpcSettingsSetResult }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"evaluate_context_trust\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustEvaluation;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"trust_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustMutationResult;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"untrust_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustMutationResult;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"remove_trusted_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcTrustedFolderRemovalResult;\n\t }\n\n\t// Version\n\t| { id?: string; type: \"response\"; command: \"get_version\"; success: true; data: { version: string } }\n\n\t// Error response (any command can fail)\n\t| { id?: string; type: \"response\"; command: string; success: false; error: string };\n\n// ============================================================================\n// Session Info (for list_sessions response)\n// ============================================================================\n\n/** Session metadata returned by list_sessions */\nexport interface RpcSessionInfo {\n\t/** Full path to the session JSONL file */\n\tpath: string;\n\t/** Session UUID */\n\tid: string;\n\t/** Working directory where the session was started */\n\tcwd: string;\n\t/** User-defined display name */\n\tname?: string;\n\t/** ISO timestamp of session creation */\n\tcreated: string;\n\t/** ISO timestamp of last modification */\n\tmodified: string;\n\t/** Number of messages in the session */\n\tmessageCount: number;\n\t/** First user message text */\n\tfirstMessage: string;\n}\n\n/** Background agent metadata returned by list_background_agents */\nexport interface RpcBackgroundAgentInfo {\n\t/** Registry ID (hex) used in background_agent_* events */\n\tagentId: string;\n\t/** Agent type name (e.g. \"Explore\") */\n\tagentType: string;\n\t/** Short human-readable task label */\n\ttaskSummary: string;\n\t/** ISO timestamp of launch */\n\tstartedAt: string;\n\t/** Lifecycle status */\n\tstatus: \"running\" | \"completed\" | \"failed\";\n\t/** Directory containing the agent's session JSONL file (known at spawn time) */\n\tsessionDir?: string;\n\t/** Path to the agent's session JSONL file (available after the child exits) */\n\tsessionFile?: string;\n\t/** Working directory the agent runs in */\n\tcwd?: string;\n\t/** Safe pre-spawn arbitration records, ordered by attempt/chain step. */\n\tarbitrations?: DispatchArbitrationRecord[];\n}\n\n/** Agent type metadata returned by list_agent_types */\nexport interface RpcAgentTypeInfo {\n\t/** Agent type name, e.g. \"Explore\" */\n\tname: string;\n\t/** Human-readable description from the agent frontmatter */\n\tdescription: string;\n}\n\n/** Serializable session tree node returned by get_tree. Stable DTO — no raw entry payloads. */\nexport interface RpcTreeNode {\n\t/** Entry id */\n\tid: string;\n\t/**\n\t * Parent entry id, or null for a root. Orphaned roots (broken parent chains) keep their\n\t * original non-null parentId, which references an entry not present in the tree — prefer\n\t * the nested `children` structure over parentId when reconstructing hierarchy.\n\t */\n\tparentId: string | null;\n\t/** Session entry type */\n\ttype: SessionEntry[\"type\"];\n\t/** Message role, present only when type === \"message\" (user, assistant, toolResult, bashExecution, ...) */\n\trole?: string;\n\t/** Short single-line content preview (whitespace-collapsed, max 200 chars) */\n\tpreview: string;\n\t/** ISO timestamp of the entry */\n\ttimestamp: string;\n\t/** Resolved label, if any */\n\tlabel?: string;\n\t/** Child nodes, oldest first */\n\tchildren: RpcTreeNode[];\n}\n\n// ============================================================================\n// Settings (persistent defaults)\n// ============================================================================\n\n/**\n * Snapshot of persistent default settings returned by `get_settings` and `set_settings`.\n *\n * These are the values persisted via SettingsManager (merged global + project view) that\n * seed fresh runtimes — NOT the live session state. For the current runtime state\n * (active model, effective thinking level, modes in effect), use `get_state`.\n */\nexport interface RpcSettingsSnapshot {\n\t/** Default provider used at startup (absent if never set) */\n\tdefaultProvider?: string;\n\t/** Default model id used at startup (absent if never set) */\n\tdefaultModel?: string;\n\t/** Default thinking level applied at startup (absent if never set) */\n\tdefaultThinkingLevel?: ThinkingLevel;\n\t/** How queued steering messages are delivered */\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\t/** How queued follow-up messages are delivered */\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\t/** Whether automatic context compaction is enabled */\n\tcompactionEnabled: boolean;\n\t/** Whether automatic retry on transient errors is enabled */\n\tretryEnabled: boolean;\n\t/** Maximum child agents a new parent session may run concurrently; zero disables the tool */\n\tmaxConcurrentSubagents: number;\n\t/** Whether image inputs are automatically resized before sending to providers */\n\timageAutoResize?: boolean;\n\t/** Whether image inputs are blocked from being sent to providers */\n\tblockImages?: boolean;\n\t/** Whether skills are registered as slash commands */\n\tenableSkillCommands?: boolean;\n\t/** Global-only expert opt-in allowing nested context from any resolvable directory. Defaults to false. */\n\tautoLoadNestedContext: boolean;\n\t/** Global configured trusted context folders, including any currently invalid legacy entries. */\n\ttrustedContextFolders: string[];\n\t/** Canonical existing trusted roots actually enforced by the global trust matcher. */\n\teffectiveTrustedContextRoots: string[];\n\t/** Preferred model transport */\n\ttransport?: Transport;\n\t/** Whether raw thinking blocks are hidden in rendered transcripts */\n\thideThinkingBlock?: boolean;\n\t/** Per-agent model fallback lists, merged global + project with project entries winning */\n\tagentModels?: Record<string, string[]>;\n\t/** Global-only fail-closed Dispatch Arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettings;\n\t/** Raw effective persisted model patterns. Absent means the future-inclusive all-model scope. */\n\tenabledModels?: string[];\n\t/** Effective patterns resolved by coding-agent core in model-cycling order. */\n\tresolvedScopedModels: RpcScopedModel[];\n\t/** Structured diagnostics from resolving legacy persisted patterns. */\n\tscopeWarnings: RpcModelScopeWarning[];\n\t/** True when project settings shadow global enabledModels writes. */\n\thasProjectEnabledModelsOverride: boolean;\n\t/** Source of the effective raw enabledModels value. */\n\tenabledModelsSource: \"default\" | \"global\" | \"project\";\n}\n\n/** Settings snapshot returned by `set_settings`; warnings are present for loud shadowing notices. */\nexport type RpcSettingsSetResult = RpcSettingsSnapshot & { warnings?: string[] };\n\n/**\n * Partial update payload for `set_settings`. All fields optional, but at least one\n * must be present. `defaultProvider` and `defaultModel` must be supplied together.\n * Writes persistent defaults only — never touches live session state.\n */\nexport interface RpcContextTrustEvaluation {\n\t/** Strict-native-realpath canonical existing directory supplied by the caller. */\n\tcanonicalTarget: string;\n\t/** The current global policy source granting (or denying) nested context. */\n\tstate: \"untrusted\" | \"trusted-root\" | \"unrestricted\";\n\t/** Canonical configured root that grants trusted-root access, including inherited access. */\n\tgrantingRoot?: string;\n}\n\n/** Post-write result of trusting or untrusting a context directory. */\nexport interface RpcContextTrustMutationResult {\n\tevaluation: RpcContextTrustEvaluation;\n\t/** Full settings snapshot after the durable write; its trust fields are global-only. */\n\tsettings: RpcSettingsSnapshot;\n\t/** Canonical root added by trust_context_folder. */\n\taddedRoot?: string;\n\t/** Actual canonical granting root removed by untrust_context_folder. */\n\tremovedRoot?: string;\n}\n\n/** Post-write result of removing a configured trusted-folder string exactly as stored. */\nexport interface RpcTrustedFolderRemovalResult {\n\t/** Full settings snapshot after the durable write; its trust fields are global-only. */\n\tsettings: RpcSettingsSnapshot;\n\t/** Configured folder string requested for exact removal. */\n\tremovedFolder: string;\n}\n\nexport interface RpcSettingsUpdate {\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: ThinkingLevel;\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\tcompactionEnabled?: boolean;\n\tretryEnabled?: boolean;\n\tmaxConcurrentSubagents?: number;\n\timageAutoResize?: boolean;\n\tblockImages?: boolean;\n\tenableSkillCommands?: boolean;\n\tautoLoadNestedContext?: boolean;\n\t/** Replaces global trusted folders atomically; values persist as canonical existing roots. */\n\ttrustedContextFolders?: string[];\n\ttransport?: Transport;\n\thideThinkingBlock?: boolean;\n\tagentModels?: Record<string, string[]>;\n\t/** Ordered exact model references; null removes the filter and restores implicit all. */\n\tenabledModels?: string[] | null;\n\t/** Replaces the complete global-only arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettings | null;\n}\n\n// ============================================================================\n// Extension UI Events (stdout)\n// ============================================================================\n\n/** A single question inside an `ask` extension-UI request. */\nexport interface RpcAskQuestion {\n\tquestion: string;\n\ttitle?: string;\n\toptions?: string[];\n\tallowFreeText?: boolean;\n\tmultiSelect?: boolean;\n\tmultiline?: boolean;\n}\n\n/** A single answer in an `ask` extension-UI response, one per question in order. */\nexport interface RpcAskAnswer {\n\tselected: string[];\n\tcustomText?: string;\n\tskipped?: boolean;\n}\n\n/** Emitted when an extension needs user input */\nexport type RpcExtensionUIRequest =\n\t| { type: \"extension_ui_request\"; id: string; method: \"select\"; title: string; options: string[]; timeout?: number }\n\t| { type: \"extension_ui_request\"; id: string; method: \"confirm\"; title: string; message: string; timeout?: number }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"input\";\n\t\t\ttitle: string;\n\t\t\tplaceholder?: string;\n\t\t\ttimeout?: number;\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"editor\"; title: string; prefill?: string }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"ask\";\n\t\t\ttitle: string;\n\t\t\t/** One or more questions asked together as a single wizard. */\n\t\t\tquestions: RpcAskQuestion[];\n\t\t\ttimeout?: number;\n\t\t\t/** Absolute Unix timestamp in milliseconds when the RPC-side timeout fires. */\n\t\t\texpiresAt?: number;\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"notify\";\n\t\t\tmessage: string;\n\t\t\tnotifyType?: \"info\" | \"warning\" | \"error\";\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setStatus\";\n\t\t\tstatusKey: string;\n\t\t\tstatusText: string | undefined;\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setWidget\";\n\t\t\twidgetKey: string;\n\t\t\twidgetLines: string[] | undefined;\n\t\t\twidgetPlacement?: \"aboveEditor\" | \"belowEditor\";\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"setTitle\"; title: string }\n\t| { type: \"extension_ui_request\"; id: string; method: \"set_editor_text\"; text: string };\n\n/** Blocking dialog requests retained until a matching host response arrives. */\nexport type RpcBlockingExtensionUIRequest = Extract<\n\tRpcExtensionUIRequest,\n\t{ method: \"select\" | \"confirm\" | \"input\" | \"editor\" | \"ask\" }\n>;\n\n// ============================================================================\n// Extension UI Commands (stdin)\n// ============================================================================\n\n/** Response to an extension UI request */\nexport type RpcExtensionUIResponse =\n\t| { type: \"extension_ui_response\"; id: string; value: string }\n\t| { type: \"extension_ui_response\"; id: string; confirmed: boolean }\n\t| { type: \"extension_ui_response\"; id: string; answers: RpcAskAnswer[] }\n\t| { type: \"extension_ui_response\"; id: string; cancelled: true };\n\n// ============================================================================\n// Helper type for extracting command types\n// ============================================================================\n\nexport type RpcCommandType = RpcCommand[\"type\"];\n"]}
1
+ {"version":3,"file":"rpc-types.d.ts","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,M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M,EAAE,GAAG,SAAS,CAAC;IAClC,eAAe,CAAC,EAAE,aAAa,GAAG,aAAa,CAAC;CAC/C,GACD;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/E;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,iBAAiB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzF,gFAAgF;AAChF,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAClD,qBAAqB,EACrB;IAAE,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;CAAE,CAC7D,CAAC;AAMF,0CAA0C;AAC1C,MAAM,MAAM,sBAAsB,GAC/B;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC5D;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,GACjE;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,EAAE,CAAA;CAAE,GACtE;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,IAAI,CAAA;CAAE,CAAC;AAMlE,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * RPC protocol types for headless operation.\n *\n * Commands are sent as JSON lines on stdin.\n * Responses and events are emitted as JSON lines on stdout.\n */\n\nimport type { AgentMessage, ThinkingLevel } from \"@dreb/agent-core\";\nimport type { ImageContent, Model, Transport } from \"@dreb/ai\";\nimport type { AgentSessionEvent, SessionStats } from \"../../core/agent-session.js\";\nimport type { BashResult } from \"../../core/bash-executor.js\";\nimport type { CompactionResult } from \"../../core/compaction/index.js\";\nimport type { DispatchArbitrationRecord } from \"../../core/dispatch-arbiter.js\";\nimport type { ContextUsage } from \"../../core/extensions/types.js\";\nimport type { ModelPerformanceSummary } from \"../../core/performance-tracker.js\";\nimport type { SessionEntry } from \"../../core/session-manager.js\";\nimport type { SubagentArbiterSettings, TabTitleSettings, TabTitleSettingsUpdate } from \"../../core/settings-manager.js\";\nimport type { SourceInfo } from \"../../core/source-info.js\";\n\n// ============================================================================\n// RPC Commands (stdin)\n// ============================================================================\n\nexport type RpcCommand =\n\t// Prompting\n\t| { id?: string; type: \"prompt\"; message: string; images?: ImageContent[]; streamingBehavior?: \"steer\" | \"followUp\" }\n\t| { id?: string; type: \"steer\"; message: string; images?: ImageContent[] }\n\t| { id?: string; type: \"follow_up\"; message: string; images?: ImageContent[] }\n\t| { id?: string; type: \"abort\" }\n\t| { id?: string; type: \"new_session\"; parentSession?: string }\n\t| { id?: string; type: \"reload\" }\n\t| { id?: string; type: \"dream\"; args?: string }\n\n\t// State\n\t| { id?: string; type: \"get_state\" }\n\t/**\n\t * Atomically captures dashboard-visible parent-session state. The RPC mode\n\t * writes a matching dashboard_snapshot_barrier immediately before its response;\n\t * consumers must use that barrier rather than promise timing to reconcile\n\t * later streamed events.\n\t */\n\t| { id?: string; type: \"get_dashboard_snapshot\" }\n\t| { id?: string; type: \"get_resources\" }\n\t| { id?: string; type: \"get_git_branch\" }\n\t| { id?: string; type: \"get_daily_cost\" }\n\n\t// Model\n\t| { id?: string; type: \"set_model\"; provider: string; modelId: string }\n\t| { id?: string; type: \"resolve_model\"; pattern: string }\n\t| { id?: string; type: \"cycle_model\" }\n\t| { id?: string; type: \"get_available_models\" }\n\n\t// Buddy — hatch/reroll run inside the agent process so API keys never leave\n\t| { id?: string; type: \"buddy_hatch\" }\n\t| { id?: string; type: \"buddy_reroll\" }\n\n\t// Thinking\n\t| { id?: string; type: \"set_thinking_level\"; level: ThinkingLevel }\n\t| { id?: string; type: \"cycle_thinking_level\" }\n\n\t// Queue modes\n\t| { id?: string; type: \"set_steering_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\t| { id?: string; type: \"set_follow_up_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\t| { id?: string; type: \"get_pending_messages\" }\n\t| { id?: string; type: \"clear_pending_messages\" }\n\n\t// Compaction\n\t| { id?: string; type: \"compact\"; customInstructions?: string }\n\t| { id?: string; type: \"set_auto_compaction\"; enabled: boolean }\n\t| { id?: string; type: \"abort_compaction\" }\n\n\t// Retry\n\t| { id?: string; type: \"set_auto_retry\"; enabled: boolean }\n\t| { id?: string; type: \"abort_retry\" }\n\n\t// Bash\n\t| { id?: string; type: \"bash\"; command: string }\n\t| { id?: string; type: \"abort_bash\" }\n\n\t// Session\n\t| { id?: string; type: \"get_session_stats\" }\n\t| { id?: string; type: \"get_performance_stats\" }\n\t| { id?: string; type: \"export_html\"; outputPath?: string }\n\t| { id?: string; type: \"import_jsonl\"; inputPath: string }\n\t| { id?: string; type: \"switch_session\"; sessionPath: string }\n\t| { id?: string; type: \"delete_session\"; sessionPath: string }\n\t| { id?: string; type: \"fork\"; entryId: string }\n\t| { id?: string; type: \"get_fork_messages\" }\n\t| { id?: string; type: \"get_tree\" }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"navigate_tree\";\n\t\t\ttargetId: string;\n\t\t\tsummarize?: boolean;\n\t\t\tcustomInstructions?: string;\n\t\t\treplaceInstructions?: boolean;\n\t\t\tlabel?: string;\n\t }\n\t| { id?: string; type: \"get_last_assistant_text\" }\n\t| { id?: string; type: \"set_session_name\"; name: string }\n\n\t// Messages\n\t| { id?: string; type: \"get_messages\" }\n\n\t// Command discovery (resource commands plus client-handled built-ins)\n\t| { id?: string; type: \"get_commands\" }\n\n\t// Session listing\n\t| { id?: string; type: \"list_sessions\" }\n\t| { id?: string; type: \"list_all_sessions\" }\n\n\t// Background agents\n\t| { id?: string; type: \"list_background_agents\" }\n\t| { id?: string; type: \"steer_background_agent\"; agentId: string; message: string }\n\t| { id?: string; type: \"get_background_agent_pending\"; agentId: string }\n\t| { id?: string; type: \"list_agent_types\" }\n\n\t// Settings (persistent defaults)\n\t| { id?: string; type: \"get_settings\" }\n\t| { id?: string; type: \"set_settings\"; settings: RpcSettingsUpdate }\n\t| { id?: string; type: \"evaluate_context_trust\"; path: string }\n\t| { id?: string; type: \"trust_context_folder\"; path: string }\n\t| { id?: string; type: \"untrust_context_folder\"; path: string }\n\t| { id?: string; type: \"remove_trusted_context_folder\"; path: string }\n\n\t// Version\n\t| { id?: string; type: \"get_version\" };\n\n// ============================================================================\n// RPC Slash Command (for get_commands response)\n// ============================================================================\n\ninterface RpcResourceSlashCommand {\n\t/** Command name (without leading slash) */\n\tname: string;\n\t/** Human-readable description */\n\tdescription?: string;\n\t/** Prompt-invokable resource command. */\n\tsource: \"extension\" | \"prompt\" | \"skill\";\n\t/** Source metadata for the owning resource. */\n\tsourceInfo: SourceInfo;\n}\n\ninterface RpcBuiltinSlashCommand {\n\t/** Command name (without leading slash). */\n\tname: string;\n\t/** Human-readable description. */\n\tdescription: string;\n\t/** Built-ins require client-side handling and are rejected by RPC prompt commands. */\n\tsource: \"builtin\";\n\t/** False means typed use is intercepted but the command is omitted from dashboard autocomplete. */\n\tdashboard: boolean;\n}\n\n/** A slash command discoverable by an RPC client. */\nexport type RpcSlashCommand = RpcResourceSlashCommand | RpcBuiltinSlashCommand;\n\nexport interface RpcScopedModel {\n\tprovider: string;\n\tid: string;\n\tname?: string;\n\treasoning?: boolean;\n\tthinkingLevel?: string;\n}\n\nexport interface RpcModelScopeWarning {\n\t/** Raw persisted pattern that produced this diagnostic. */\n\tpattern: string;\n\t/** Resolver warning text without terminal styling. */\n\tmessage: string;\n}\n\nexport interface RpcResources {\n\tcontextFiles: Array<{ path: string }>;\n\tskills: Array<{ name: string; description: string }>;\n\textensions: Array<{ name?: string; path: string }>;\n\tpromptTemplates: Array<{ name: string; description?: string }>;\n\tsystemPromptPresent: boolean;\n}\n\nexport interface RpcPerformanceStats {\n\t/** TUI-parity summaries computed by the shared rolling and delta calculators. */\n\tmodels: ModelPerformanceSummary[];\n}\n\nexport interface RpcQueuedMessage {\n\ttext: string;\n\timages?: ImageContent[];\n}\n\nexport interface RpcPendingMessages {\n\t/** Text-only compatibility view for existing clients. */\n\tsteering: string[];\n\t/** Text-only compatibility view for existing clients. */\n\tfollowUp: string[];\n\t/** Full queued payloads, including inline image attachments. */\n\tsteeringMessages?: RpcQueuedMessage[];\n\t/** Full queued payloads, including inline image attachments. */\n\tfollowUpMessages?: RpcQueuedMessage[];\n}\n\n// ============================================================================\n// RPC State\n// ============================================================================\n\nexport interface RpcSessionTask {\n\tid: string;\n\ttitle: string;\n\tstatus: \"pending\" | \"in_progress\" | \"completed\";\n}\n\nexport interface RpcDashboardSnapshot {\n\t/** Opaque token repeated by the immediately following barrier event. */\n\tsnapshotId: string;\n\tstate: RpcSessionState;\n\t/** Complete parent transcript at the same RPC command boundary as state. */\n\tmessages: AgentMessage[];\n\t/** Current background-agent registry at that boundary. */\n\tbackgroundAgents: RpcBackgroundAgentInfo[];\n\t/** Blocking UI requests that are still waiting for a host response. */\n\tpendingExtensionUiRequests: RpcBlockingExtensionUIRequest[];\n}\n\n/** Ordering marker emitted immediately before a matching dashboard snapshot response. */\nexport interface RpcDashboardSnapshotBarrierEvent {\n\ttype: \"dashboard_snapshot_barrier\";\n\t/** Opaque token matching the following {@link RpcDashboardSnapshot.snapshotId}. */\n\tsnapshotId: string;\n}\n\n/** Non-response JSONL messages emitted by the RPC server on stdout. */\nexport type RpcEvent = AgentSessionEvent | RpcExtensionUIRequest | RpcDashboardSnapshotBarrierEvent;\n\nexport interface RpcSessionState {\n\tmodel?: Model<any>;\n\tscopedModels: RpcScopedModel[];\n\t/** Current in-memory task list, replaced atomically by the tasks_update tool. */\n\ttasks: RpcSessionTask[];\n\tusingSubscription: boolean;\n\tthinkingLevel: ThinkingLevel;\n\t/** Model-aware levels available for selection and cycling. */\n\tavailableThinkingLevels: ThinkingLevel[];\n\tisStreaming: boolean;\n\t/** True from retry classification through retry completion, including backoff. */\n\tisRetrying: boolean;\n\t/** Current automatic retry attempt, or 0 before retry start / after completion. */\n\tretryAttempt: number;\n\tisCompacting: boolean;\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tpendingMessageCount: number;\n\t/**\n\t * Context window usage computed by the session — the exact numbers the TUI footer\n\t * renders (AgentSession.getContextUsage()). `tokens`/`percent` are null when usage\n\t * is unknown (e.g. right after compaction, before the next LLM response). Undefined\n\t * when no model is set or the model has no context window.\n\t */\n\tcontextUsage?: ContextUsage;\n\t/** Non-empty when the model was changed from the user's saved preference\n\t * (e.g. saved model unavailable after restart). */\n\tmodelFallbackMessage?: string;\n}\n\n// ============================================================================\n// RPC Responses (stdout)\n// ============================================================================\n\n// Success responses with data\nexport type RpcResponse =\n\t// Prompting (async - events follow)\n\t| { id?: string; type: \"response\"; command: \"prompt\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"steer\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"follow_up\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"new_session\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"reload\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"dream\"; success: true; data: { message: string } }\n\n\t// State\n\t| { id?: string; type: \"response\"; command: \"get_state\"; success: true; data: RpcSessionState }\n\t| { id?: string; type: \"response\"; command: \"get_dashboard_snapshot\"; success: true; data: RpcDashboardSnapshot }\n\t| { id?: string; type: \"response\"; command: \"get_resources\"; success: true; data: RpcResources }\n\t| { id?: string; type: \"response\"; command: \"get_git_branch\"; success: true; data: { branch: string | null } }\n\t| { id?: string; type: \"response\"; command: \"get_daily_cost\"; success: true; data: { cost: number } }\n\n\t// Model\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"set_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: Model<any>;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"resolve_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: { model: Model<any>; warning?: string } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: { model: Model<any>; thinkingLevel: ThinkingLevel; isScoped: boolean } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_available_models\";\n\t\t\tsuccess: true;\n\t\t\tdata: { models: Model<any>[] };\n\t }\n\n\t// Buddy\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"buddy_hatch\";\n\t\t\tsuccess: true;\n\t\t\tdata: { state: import(\"../../core/buddy/buddy-types.js\").BuddyState };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"buddy_reroll\";\n\t\t\tsuccess: true;\n\t\t\tdata: { state: import(\"../../core/buddy/buddy-types.js\").BuddyState };\n\t }\n\n\t// Thinking\n\t| { id?: string; type: \"response\"; command: \"set_thinking_level\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_thinking_level\";\n\t\t\tsuccess: true;\n\t\t\tdata: { level: ThinkingLevel } | null;\n\t }\n\n\t// Queue modes\n\t| { id?: string; type: \"response\"; command: \"set_steering_mode\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"set_follow_up_mode\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"get_pending_messages\"; success: true; data: RpcPendingMessages }\n\t| { id?: string; type: \"response\"; command: \"clear_pending_messages\"; success: true; data: RpcPendingMessages }\n\n\t// Compaction\n\t| { id?: string; type: \"response\"; command: \"compact\"; success: true; data: CompactionResult }\n\t| { id?: string; type: \"response\"; command: \"set_auto_compaction\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort_compaction\"; success: true }\n\n\t// Retry\n\t| { id?: string; type: \"response\"; command: \"set_auto_retry\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort_retry\"; success: true }\n\n\t// Bash\n\t| { id?: string; type: \"response\"; command: \"bash\"; success: true; data: BashResult }\n\t| { id?: string; type: \"response\"; command: \"abort_bash\"; success: true }\n\n\t// Session\n\t| { id?: string; type: \"response\"; command: \"get_session_stats\"; success: true; data: SessionStats }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_performance_stats\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcPerformanceStats;\n\t }\n\t| { id?: string; type: \"response\"; command: \"export_html\"; success: true; data: { path: string } }\n\t| { id?: string; type: \"response\"; command: \"import_jsonl\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"switch_session\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"delete_session\"; success: true; data: { method: \"trash\" | \"unlink\" } }\n\t| { id?: string; type: \"response\"; command: \"fork\"; success: true; data: { text: string; cancelled: boolean } }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_fork_messages\";\n\t\t\tsuccess: true;\n\t\t\tdata: { messages: Array<{ entryId: string; text: string; role: \"user\" | \"assistant\" }> };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_tree\";\n\t\t\tsuccess: true;\n\t\t\tdata: { roots: RpcTreeNode[]; leafId: string | null };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"navigate_tree\";\n\t\t\tsuccess: true;\n\t\t\tdata: { cancelled: boolean; editorText?: string };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_last_assistant_text\";\n\t\t\tsuccess: true;\n\t\t\tdata: { text: string | null };\n\t }\n\t| { id?: string; type: \"response\"; command: \"set_session_name\"; success: true }\n\n\t// Messages\n\t| { id?: string; type: \"response\"; command: \"get_messages\"; success: true; data: { messages: AgentMessage[] } }\n\n\t// Commands\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_commands\";\n\t\t\tsuccess: true;\n\t\t\tdata: { commands: RpcSlashCommand[] };\n\t }\n\n\t// Session listing\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_sessions\";\n\t\t\tsuccess: true;\n\t\t\tdata: { sessions: RpcSessionInfo[] };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_all_sessions\";\n\t\t\tsuccess: true;\n\t\t\tdata: { sessions: RpcSessionInfo[] };\n\t }\n\n\t// Background agents\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_background_agents\";\n\t\t\tsuccess: true;\n\t\t\tdata: { agents: RpcBackgroundAgentInfo[] };\n\t }\n\t| { id?: string; type: \"response\"; command: \"steer_background_agent\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_background_agent_pending\";\n\t\t\tsuccess: true;\n\t\t\tdata: { steeringMode: \"all\" | \"one-at-a-time\"; pending: RpcPendingMessages };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_agent_types\";\n\t\t\tsuccess: true;\n\t\t\tdata: { agentTypes: RpcAgentTypeInfo[] };\n\t }\n\n\t// Settings\n\t| { id?: string; type: \"response\"; command: \"get_settings\"; success: true; data: RpcSettingsSnapshot }\n\t| { id?: string; type: \"response\"; command: \"set_settings\"; success: true; data: RpcSettingsSetResult }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"evaluate_context_trust\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustEvaluation;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"trust_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustMutationResult;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"untrust_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustMutationResult;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"remove_trusted_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcTrustedFolderRemovalResult;\n\t }\n\n\t// Version\n\t| { id?: string; type: \"response\"; command: \"get_version\"; success: true; data: { version: string } }\n\n\t// Error response (any command can fail)\n\t| { id?: string; type: \"response\"; command: string; success: false; error: string };\n\n// ============================================================================\n// Session Info (for list_sessions response)\n// ============================================================================\n\n/** Session metadata returned by list_sessions */\nexport interface RpcSessionInfo {\n\t/** Full path to the session JSONL file */\n\tpath: string;\n\t/** Session UUID */\n\tid: string;\n\t/** Working directory where the session was started */\n\tcwd: string;\n\t/** User-defined display name */\n\tname?: string;\n\t/** ISO timestamp of session creation */\n\tcreated: string;\n\t/** ISO timestamp of last modification */\n\tmodified: string;\n\t/** Number of messages in the session */\n\tmessageCount: number;\n\t/** First user message text */\n\tfirstMessage: string;\n}\n\n/** Background agent metadata returned by list_background_agents */\nexport interface RpcBackgroundAgentInfo {\n\t/** Registry ID (hex) used in background_agent_* events */\n\tagentId: string;\n\t/** Agent type name (e.g. \"Explore\") */\n\tagentType: string;\n\t/** Short human-readable task label */\n\ttaskSummary: string;\n\t/** ISO timestamp of launch */\n\tstartedAt: string;\n\t/** Lifecycle status */\n\tstatus: \"running\" | \"completed\" | \"failed\";\n\t/** Directory containing the agent's session JSONL file (known at spawn time) */\n\tsessionDir?: string;\n\t/** Path to the agent's session JSONL file (available after the child exits) */\n\tsessionFile?: string;\n\t/** Working directory the agent runs in */\n\tcwd?: string;\n\t/** Safe pre-spawn arbitration records, ordered by attempt/chain step. */\n\tarbitrations?: DispatchArbitrationRecord[];\n}\n\n/** Agent type metadata returned by list_agent_types */\nexport interface RpcAgentTypeInfo {\n\t/** Agent type name, e.g. \"Explore\" */\n\tname: string;\n\t/** Human-readable description from the agent frontmatter */\n\tdescription: string;\n}\n\n/** Serializable session tree node returned by get_tree. Stable DTO — no raw entry payloads. */\nexport interface RpcTreeNode {\n\t/** Entry id */\n\tid: string;\n\t/**\n\t * Parent entry id, or null for a root. Orphaned roots (broken parent chains) keep their\n\t * original non-null parentId, which references an entry not present in the tree — prefer\n\t * the nested `children` structure over parentId when reconstructing hierarchy.\n\t */\n\tparentId: string | null;\n\t/** Session entry type */\n\ttype: SessionEntry[\"type\"];\n\t/** Message role, present only when type === \"message\" (user, assistant, toolResult, bashExecution, ...) */\n\trole?: string;\n\t/** Short single-line content preview (whitespace-collapsed, max 200 chars) */\n\tpreview: string;\n\t/** ISO timestamp of the entry */\n\ttimestamp: string;\n\t/** Resolved label, if any */\n\tlabel?: string;\n\t/** Child nodes, oldest first */\n\tchildren: RpcTreeNode[];\n}\n\n// ============================================================================\n// Settings (persistent defaults)\n// ============================================================================\n\n/**\n * Snapshot of persistent default settings returned by `get_settings` and `set_settings`.\n *\n * These are the values persisted via SettingsManager (merged global + project view) that\n * seed fresh runtimes — NOT the live session state. For the current runtime state\n * (active model, effective thinking level, modes in effect), use `get_state`.\n */\nexport interface RpcSettingsSnapshot {\n\t/** Default provider used at startup (absent if never set) */\n\tdefaultProvider?: string;\n\t/** Default model id used at startup (absent if never set) */\n\tdefaultModel?: string;\n\t/** Default thinking level applied at startup (absent if never set) */\n\tdefaultThinkingLevel?: ThinkingLevel;\n\t/** How queued steering messages are delivered */\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\t/** How queued follow-up messages are delivered */\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\t/** Whether automatic context compaction is enabled */\n\tcompactionEnabled: boolean;\n\t/** Whether automatic retry on transient errors is enabled */\n\tretryEnabled: boolean;\n\t/** Maximum child agents a new parent session may run concurrently; zero disables the tool */\n\tmaxConcurrentSubagents: number;\n\t/** Whether image inputs are automatically resized before sending to providers */\n\timageAutoResize?: boolean;\n\t/** Whether image inputs are blocked from being sent to providers */\n\tblockImages?: boolean;\n\t/** Whether skills are registered as slash commands */\n\tenableSkillCommands?: boolean;\n\t/** Global-only expert opt-in allowing nested context from any resolvable directory. Defaults to false. */\n\tautoLoadNestedContext: boolean;\n\t/** Global configured trusted context folders, including any currently invalid legacy entries. */\n\ttrustedContextFolders: string[];\n\t/** Canonical existing trusted roots actually enforced by the global trust matcher. */\n\teffectiveTrustedContextRoots: string[];\n\t/** Preferred model transport */\n\ttransport?: Transport;\n\t/** Whether raw thinking blocks are hidden in rendered transcripts */\n\thideThinkingBlock?: boolean;\n\t/** Per-agent model fallback lists, merged global + project with project entries winning */\n\tagentModels?: Record<string, string[]>;\n\t/** Global-only fail-closed Dispatch Arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettings;\n\t/** Effective automatic tab-title configuration. */\n\ttabTitle?: TabTitleSettings;\n\t/** Raw effective persisted model patterns. Absent means the future-inclusive all-model scope. */\n\tenabledModels?: string[];\n\t/** Effective patterns resolved by coding-agent core in model-cycling order. */\n\tresolvedScopedModels: RpcScopedModel[];\n\t/** Structured diagnostics from resolving legacy persisted patterns. */\n\tscopeWarnings: RpcModelScopeWarning[];\n\t/** True when project settings shadow global enabledModels writes. */\n\thasProjectEnabledModelsOverride: boolean;\n\t/** Source of the effective raw enabledModels value. */\n\tenabledModelsSource: \"default\" | \"global\" | \"project\";\n}\n\n/** Settings snapshot returned by `set_settings`; warnings are present for loud shadowing notices. */\nexport type RpcSettingsSetResult = RpcSettingsSnapshot & { warnings?: string[] };\n\n/**\n * Partial update payload for `set_settings`. All fields optional, but at least one\n * must be present. `defaultProvider` and `defaultModel` must be supplied together.\n * Writes persistent defaults only — never touches live session state.\n */\nexport interface RpcContextTrustEvaluation {\n\t/** Strict-native-realpath canonical existing directory supplied by the caller. */\n\tcanonicalTarget: string;\n\t/** The current global policy source granting (or denying) nested context. */\n\tstate: \"untrusted\" | \"trusted-root\" | \"unrestricted\";\n\t/** Canonical configured root that grants trusted-root access, including inherited access. */\n\tgrantingRoot?: string;\n}\n\n/** Post-write result of trusting or untrusting a context directory. */\nexport interface RpcContextTrustMutationResult {\n\tevaluation: RpcContextTrustEvaluation;\n\t/** Full settings snapshot after the durable write; its trust fields are global-only. */\n\tsettings: RpcSettingsSnapshot;\n\t/** Canonical root added by trust_context_folder. */\n\taddedRoot?: string;\n\t/** Actual canonical granting root removed by untrust_context_folder. */\n\tremovedRoot?: string;\n}\n\n/** Post-write result of removing a configured trusted-folder string exactly as stored. */\nexport interface RpcTrustedFolderRemovalResult {\n\t/** Full settings snapshot after the durable write; its trust fields are global-only. */\n\tsettings: RpcSettingsSnapshot;\n\t/** Configured folder string requested for exact removal. */\n\tremovedFolder: string;\n}\n\nexport interface RpcSettingsUpdate {\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: ThinkingLevel;\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\tcompactionEnabled?: boolean;\n\tretryEnabled?: boolean;\n\tmaxConcurrentSubagents?: number;\n\timageAutoResize?: boolean;\n\tblockImages?: boolean;\n\tenableSkillCommands?: boolean;\n\tautoLoadNestedContext?: boolean;\n\t/** Replaces global trusted folders atomically; values persist as canonical existing roots. */\n\ttrustedContextFolders?: string[];\n\ttransport?: Transport;\n\thideThinkingBlock?: boolean;\n\tagentModels?: Record<string, string[]>;\n\t/** Ordered exact model references; null removes the filter and restores implicit all. */\n\tenabledModels?: string[] | null;\n\t/** Replaces the complete global-only arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettings | null;\n\t/** Partial global automatic tab-title configuration update. `model: null` removes the pinned model, restoring Explore-agent routing. */\n\ttabTitle?: TabTitleSettingsUpdate;\n}\n\n// ============================================================================\n// Extension UI Events (stdout)\n// ============================================================================\n\n/** A single question inside an `ask` extension-UI request. */\nexport interface RpcAskQuestion {\n\tquestion: string;\n\ttitle?: string;\n\toptions?: string[];\n\tallowFreeText?: boolean;\n\tmultiSelect?: boolean;\n\tmultiline?: boolean;\n}\n\n/** A single answer in an `ask` extension-UI response, one per question in order. */\nexport interface RpcAskAnswer {\n\tselected: string[];\n\tcustomText?: string;\n\tskipped?: boolean;\n}\n\n/** Emitted when an extension needs user input */\nexport type RpcExtensionUIRequest =\n\t| { type: \"extension_ui_request\"; id: string; method: \"select\"; title: string; options: string[]; timeout?: number }\n\t| { type: \"extension_ui_request\"; id: string; method: \"confirm\"; title: string; message: string; timeout?: number }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"input\";\n\t\t\ttitle: string;\n\t\t\tplaceholder?: string;\n\t\t\ttimeout?: number;\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"editor\"; title: string; prefill?: string }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"ask\";\n\t\t\ttitle: string;\n\t\t\t/** One or more questions asked together as a single wizard. */\n\t\t\tquestions: RpcAskQuestion[];\n\t\t\ttimeout?: number;\n\t\t\t/** Absolute Unix timestamp in milliseconds when the RPC-side timeout fires. */\n\t\t\texpiresAt?: number;\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"notify\";\n\t\t\tmessage: string;\n\t\t\tnotifyType?: \"info\" | \"warning\" | \"error\";\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setStatus\";\n\t\t\tstatusKey: string;\n\t\t\tstatusText: string | undefined;\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setWidget\";\n\t\t\twidgetKey: string;\n\t\t\twidgetLines: string[] | undefined;\n\t\t\twidgetPlacement?: \"aboveEditor\" | \"belowEditor\";\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"setTitle\"; title: string }\n\t| { type: \"extension_ui_request\"; id: string; method: \"set_editor_text\"; text: string };\n\n/** Blocking dialog requests retained until a matching host response arrives. */\nexport type RpcBlockingExtensionUIRequest = Extract<\n\tRpcExtensionUIRequest,\n\t{ method: \"select\" | \"confirm\" | \"input\" | \"editor\" | \"ask\" }\n>;\n\n// ============================================================================\n// Extension UI Commands (stdin)\n// ============================================================================\n\n/** Response to an extension UI request */\nexport type RpcExtensionUIResponse =\n\t| { type: \"extension_ui_response\"; id: string; value: string }\n\t| { type: \"extension_ui_response\"; id: string; confirmed: boolean }\n\t| { type: \"extension_ui_response\"; id: string; answers: RpcAskAnswer[] }\n\t| { type: \"extension_ui_response\"; id: string; cancelled: true };\n\n// ============================================================================\n// Helper type for extracting command types\n// ============================================================================\n\nexport type RpcCommandType = RpcCommand[\"type\"];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"rpc-types.js","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG","sourcesContent":["/**\n * RPC protocol types for headless operation.\n *\n * Commands are sent as JSON lines on stdin.\n * Responses and events are emitted as JSON lines on stdout.\n */\n\nimport type { AgentMessage, ThinkingLevel } from \"@dreb/agent-core\";\nimport type { ImageContent, Model, Transport } from \"@dreb/ai\";\nimport type { AgentSessionEvent, SessionStats } from \"../../core/agent-session.js\";\nimport type { BashResult } from \"../../core/bash-executor.js\";\nimport type { CompactionResult } from \"../../core/compaction/index.js\";\nimport type { DispatchArbitrationRecord } from \"../../core/dispatch-arbiter.js\";\nimport type { ContextUsage } from \"../../core/extensions/types.js\";\nimport type { ModelPerformanceSummary } from \"../../core/performance-tracker.js\";\nimport type { SessionEntry } from \"../../core/session-manager.js\";\nimport type { SubagentArbiterSettings } from \"../../core/settings-manager.js\";\nimport type { SourceInfo } from \"../../core/source-info.js\";\n\n// ============================================================================\n// RPC Commands (stdin)\n// ============================================================================\n\nexport type RpcCommand =\n\t// Prompting\n\t| { id?: string; type: \"prompt\"; message: string; images?: ImageContent[]; streamingBehavior?: \"steer\" | \"followUp\" }\n\t| { id?: string; type: \"steer\"; message: string; images?: ImageContent[] }\n\t| { id?: string; type: \"follow_up\"; message: string; images?: ImageContent[] }\n\t| { id?: string; type: \"abort\" }\n\t| { id?: string; type: \"new_session\"; parentSession?: string }\n\t| { id?: string; type: \"reload\" }\n\t| { id?: string; type: \"dream\"; args?: string }\n\n\t// State\n\t| { id?: string; type: \"get_state\" }\n\t/**\n\t * Atomically captures dashboard-visible parent-session state. The RPC mode\n\t * writes a matching dashboard_snapshot_barrier immediately before its response;\n\t * consumers must use that barrier rather than promise timing to reconcile\n\t * later streamed events.\n\t */\n\t| { id?: string; type: \"get_dashboard_snapshot\" }\n\t| { id?: string; type: \"get_resources\" }\n\t| { id?: string; type: \"get_git_branch\" }\n\t| { id?: string; type: \"get_daily_cost\" }\n\n\t// Model\n\t| { id?: string; type: \"set_model\"; provider: string; modelId: string }\n\t| { id?: string; type: \"resolve_model\"; pattern: string }\n\t| { id?: string; type: \"cycle_model\" }\n\t| { id?: string; type: \"get_available_models\" }\n\n\t// Buddy — hatch/reroll run inside the agent process so API keys never leave\n\t| { id?: string; type: \"buddy_hatch\" }\n\t| { id?: string; type: \"buddy_reroll\" }\n\n\t// Thinking\n\t| { id?: string; type: \"set_thinking_level\"; level: ThinkingLevel }\n\t| { id?: string; type: \"cycle_thinking_level\" }\n\n\t// Queue modes\n\t| { id?: string; type: \"set_steering_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\t| { id?: string; type: \"set_follow_up_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\t| { id?: string; type: \"get_pending_messages\" }\n\t| { id?: string; type: \"clear_pending_messages\" }\n\n\t// Compaction\n\t| { id?: string; type: \"compact\"; customInstructions?: string }\n\t| { id?: string; type: \"set_auto_compaction\"; enabled: boolean }\n\t| { id?: string; type: \"abort_compaction\" }\n\n\t// Retry\n\t| { id?: string; type: \"set_auto_retry\"; enabled: boolean }\n\t| { id?: string; type: \"abort_retry\" }\n\n\t// Bash\n\t| { id?: string; type: \"bash\"; command: string }\n\t| { id?: string; type: \"abort_bash\" }\n\n\t// Session\n\t| { id?: string; type: \"get_session_stats\" }\n\t| { id?: string; type: \"get_performance_stats\" }\n\t| { id?: string; type: \"export_html\"; outputPath?: string }\n\t| { id?: string; type: \"import_jsonl\"; inputPath: string }\n\t| { id?: string; type: \"switch_session\"; sessionPath: string }\n\t| { id?: string; type: \"delete_session\"; sessionPath: string }\n\t| { id?: string; type: \"fork\"; entryId: string }\n\t| { id?: string; type: \"get_fork_messages\" }\n\t| { id?: string; type: \"get_tree\" }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"navigate_tree\";\n\t\t\ttargetId: string;\n\t\t\tsummarize?: boolean;\n\t\t\tcustomInstructions?: string;\n\t\t\treplaceInstructions?: boolean;\n\t\t\tlabel?: string;\n\t }\n\t| { id?: string; type: \"get_last_assistant_text\" }\n\t| { id?: string; type: \"set_session_name\"; name: string }\n\n\t// Messages\n\t| { id?: string; type: \"get_messages\" }\n\n\t// Command discovery (resource commands plus client-handled built-ins)\n\t| { id?: string; type: \"get_commands\" }\n\n\t// Session listing\n\t| { id?: string; type: \"list_sessions\" }\n\t| { id?: string; type: \"list_all_sessions\" }\n\n\t// Background agents\n\t| { id?: string; type: \"list_background_agents\" }\n\t| { id?: string; type: \"steer_background_agent\"; agentId: string; message: string }\n\t| { id?: string; type: \"get_background_agent_pending\"; agentId: string }\n\t| { id?: string; type: \"list_agent_types\" }\n\n\t// Settings (persistent defaults)\n\t| { id?: string; type: \"get_settings\" }\n\t| { id?: string; type: \"set_settings\"; settings: RpcSettingsUpdate }\n\t| { id?: string; type: \"evaluate_context_trust\"; path: string }\n\t| { id?: string; type: \"trust_context_folder\"; path: string }\n\t| { id?: string; type: \"untrust_context_folder\"; path: string }\n\t| { id?: string; type: \"remove_trusted_context_folder\"; path: string }\n\n\t// Version\n\t| { id?: string; type: \"get_version\" };\n\n// ============================================================================\n// RPC Slash Command (for get_commands response)\n// ============================================================================\n\ninterface RpcResourceSlashCommand {\n\t/** Command name (without leading slash) */\n\tname: string;\n\t/** Human-readable description */\n\tdescription?: string;\n\t/** Prompt-invokable resource command. */\n\tsource: \"extension\" | \"prompt\" | \"skill\";\n\t/** Source metadata for the owning resource. */\n\tsourceInfo: SourceInfo;\n}\n\ninterface RpcBuiltinSlashCommand {\n\t/** Command name (without leading slash). */\n\tname: string;\n\t/** Human-readable description. */\n\tdescription: string;\n\t/** Built-ins require client-side handling and are rejected by RPC prompt commands. */\n\tsource: \"builtin\";\n\t/** False means typed use is intercepted but the command is omitted from dashboard autocomplete. */\n\tdashboard: boolean;\n}\n\n/** A slash command discoverable by an RPC client. */\nexport type RpcSlashCommand = RpcResourceSlashCommand | RpcBuiltinSlashCommand;\n\nexport interface RpcScopedModel {\n\tprovider: string;\n\tid: string;\n\tname?: string;\n\treasoning?: boolean;\n\tthinkingLevel?: string;\n}\n\nexport interface RpcModelScopeWarning {\n\t/** Raw persisted pattern that produced this diagnostic. */\n\tpattern: string;\n\t/** Resolver warning text without terminal styling. */\n\tmessage: string;\n}\n\nexport interface RpcResources {\n\tcontextFiles: Array<{ path: string }>;\n\tskills: Array<{ name: string; description: string }>;\n\textensions: Array<{ name?: string; path: string }>;\n\tpromptTemplates: Array<{ name: string; description?: string }>;\n\tsystemPromptPresent: boolean;\n}\n\nexport interface RpcPerformanceStats {\n\t/** TUI-parity summaries computed by the shared rolling and delta calculators. */\n\tmodels: ModelPerformanceSummary[];\n}\n\nexport interface RpcQueuedMessage {\n\ttext: string;\n\timages?: ImageContent[];\n}\n\nexport interface RpcPendingMessages {\n\t/** Text-only compatibility view for existing clients. */\n\tsteering: string[];\n\t/** Text-only compatibility view for existing clients. */\n\tfollowUp: string[];\n\t/** Full queued payloads, including inline image attachments. */\n\tsteeringMessages?: RpcQueuedMessage[];\n\t/** Full queued payloads, including inline image attachments. */\n\tfollowUpMessages?: RpcQueuedMessage[];\n}\n\n// ============================================================================\n// RPC State\n// ============================================================================\n\nexport interface RpcSessionTask {\n\tid: string;\n\ttitle: string;\n\tstatus: \"pending\" | \"in_progress\" | \"completed\";\n}\n\nexport interface RpcDashboardSnapshot {\n\t/** Opaque token repeated by the immediately following barrier event. */\n\tsnapshotId: string;\n\tstate: RpcSessionState;\n\t/** Complete parent transcript at the same RPC command boundary as state. */\n\tmessages: AgentMessage[];\n\t/** Current background-agent registry at that boundary. */\n\tbackgroundAgents: RpcBackgroundAgentInfo[];\n\t/** Blocking UI requests that are still waiting for a host response. */\n\tpendingExtensionUiRequests: RpcBlockingExtensionUIRequest[];\n}\n\n/** Ordering marker emitted immediately before a matching dashboard snapshot response. */\nexport interface RpcDashboardSnapshotBarrierEvent {\n\ttype: \"dashboard_snapshot_barrier\";\n\t/** Opaque token matching the following {@link RpcDashboardSnapshot.snapshotId}. */\n\tsnapshotId: string;\n}\n\n/** Non-response JSONL messages emitted by the RPC server on stdout. */\nexport type RpcEvent = AgentSessionEvent | RpcExtensionUIRequest | RpcDashboardSnapshotBarrierEvent;\n\nexport interface RpcSessionState {\n\tmodel?: Model<any>;\n\tscopedModels: RpcScopedModel[];\n\t/** Current in-memory task list, replaced atomically by the tasks_update tool. */\n\ttasks: RpcSessionTask[];\n\tusingSubscription: boolean;\n\tthinkingLevel: ThinkingLevel;\n\t/** Model-aware levels available for selection and cycling. */\n\tavailableThinkingLevels: ThinkingLevel[];\n\tisStreaming: boolean;\n\t/** True from retry classification through retry completion, including backoff. */\n\tisRetrying: boolean;\n\t/** Current automatic retry attempt, or 0 before retry start / after completion. */\n\tretryAttempt: number;\n\tisCompacting: boolean;\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tpendingMessageCount: number;\n\t/**\n\t * Context window usage computed by the session — the exact numbers the TUI footer\n\t * renders (AgentSession.getContextUsage()). `tokens`/`percent` are null when usage\n\t * is unknown (e.g. right after compaction, before the next LLM response). Undefined\n\t * when no model is set or the model has no context window.\n\t */\n\tcontextUsage?: ContextUsage;\n\t/** Non-empty when the model was changed from the user's saved preference\n\t * (e.g. saved model unavailable after restart). */\n\tmodelFallbackMessage?: string;\n}\n\n// ============================================================================\n// RPC Responses (stdout)\n// ============================================================================\n\n// Success responses with data\nexport type RpcResponse =\n\t// Prompting (async - events follow)\n\t| { id?: string; type: \"response\"; command: \"prompt\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"steer\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"follow_up\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"new_session\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"reload\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"dream\"; success: true; data: { message: string } }\n\n\t// State\n\t| { id?: string; type: \"response\"; command: \"get_state\"; success: true; data: RpcSessionState }\n\t| { id?: string; type: \"response\"; command: \"get_dashboard_snapshot\"; success: true; data: RpcDashboardSnapshot }\n\t| { id?: string; type: \"response\"; command: \"get_resources\"; success: true; data: RpcResources }\n\t| { id?: string; type: \"response\"; command: \"get_git_branch\"; success: true; data: { branch: string | null } }\n\t| { id?: string; type: \"response\"; command: \"get_daily_cost\"; success: true; data: { cost: number } }\n\n\t// Model\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"set_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: Model<any>;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"resolve_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: { model: Model<any>; warning?: string } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: { model: Model<any>; thinkingLevel: ThinkingLevel; isScoped: boolean } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_available_models\";\n\t\t\tsuccess: true;\n\t\t\tdata: { models: Model<any>[] };\n\t }\n\n\t// Buddy\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"buddy_hatch\";\n\t\t\tsuccess: true;\n\t\t\tdata: { state: import(\"../../core/buddy/buddy-types.js\").BuddyState };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"buddy_reroll\";\n\t\t\tsuccess: true;\n\t\t\tdata: { state: import(\"../../core/buddy/buddy-types.js\").BuddyState };\n\t }\n\n\t// Thinking\n\t| { id?: string; type: \"response\"; command: \"set_thinking_level\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_thinking_level\";\n\t\t\tsuccess: true;\n\t\t\tdata: { level: ThinkingLevel } | null;\n\t }\n\n\t// Queue modes\n\t| { id?: string; type: \"response\"; command: \"set_steering_mode\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"set_follow_up_mode\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"get_pending_messages\"; success: true; data: RpcPendingMessages }\n\t| { id?: string; type: \"response\"; command: \"clear_pending_messages\"; success: true; data: RpcPendingMessages }\n\n\t// Compaction\n\t| { id?: string; type: \"response\"; command: \"compact\"; success: true; data: CompactionResult }\n\t| { id?: string; type: \"response\"; command: \"set_auto_compaction\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort_compaction\"; success: true }\n\n\t// Retry\n\t| { id?: string; type: \"response\"; command: \"set_auto_retry\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort_retry\"; success: true }\n\n\t// Bash\n\t| { id?: string; type: \"response\"; command: \"bash\"; success: true; data: BashResult }\n\t| { id?: string; type: \"response\"; command: \"abort_bash\"; success: true }\n\n\t// Session\n\t| { id?: string; type: \"response\"; command: \"get_session_stats\"; success: true; data: SessionStats }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_performance_stats\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcPerformanceStats;\n\t }\n\t| { id?: string; type: \"response\"; command: \"export_html\"; success: true; data: { path: string } }\n\t| { id?: string; type: \"response\"; command: \"import_jsonl\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"switch_session\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"delete_session\"; success: true; data: { method: \"trash\" | \"unlink\" } }\n\t| { id?: string; type: \"response\"; command: \"fork\"; success: true; data: { text: string; cancelled: boolean } }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_fork_messages\";\n\t\t\tsuccess: true;\n\t\t\tdata: { messages: Array<{ entryId: string; text: string; role: \"user\" | \"assistant\" }> };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_tree\";\n\t\t\tsuccess: true;\n\t\t\tdata: { roots: RpcTreeNode[]; leafId: string | null };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"navigate_tree\";\n\t\t\tsuccess: true;\n\t\t\tdata: { cancelled: boolean; editorText?: string };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_last_assistant_text\";\n\t\t\tsuccess: true;\n\t\t\tdata: { text: string | null };\n\t }\n\t| { id?: string; type: \"response\"; command: \"set_session_name\"; success: true }\n\n\t// Messages\n\t| { id?: string; type: \"response\"; command: \"get_messages\"; success: true; data: { messages: AgentMessage[] } }\n\n\t// Commands\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_commands\";\n\t\t\tsuccess: true;\n\t\t\tdata: { commands: RpcSlashCommand[] };\n\t }\n\n\t// Session listing\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_sessions\";\n\t\t\tsuccess: true;\n\t\t\tdata: { sessions: RpcSessionInfo[] };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_all_sessions\";\n\t\t\tsuccess: true;\n\t\t\tdata: { sessions: RpcSessionInfo[] };\n\t }\n\n\t// Background agents\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_background_agents\";\n\t\t\tsuccess: true;\n\t\t\tdata: { agents: RpcBackgroundAgentInfo[] };\n\t }\n\t| { id?: string; type: \"response\"; command: \"steer_background_agent\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_background_agent_pending\";\n\t\t\tsuccess: true;\n\t\t\tdata: { steeringMode: \"all\" | \"one-at-a-time\"; pending: RpcPendingMessages };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_agent_types\";\n\t\t\tsuccess: true;\n\t\t\tdata: { agentTypes: RpcAgentTypeInfo[] };\n\t }\n\n\t// Settings\n\t| { id?: string; type: \"response\"; command: \"get_settings\"; success: true; data: RpcSettingsSnapshot }\n\t| { id?: string; type: \"response\"; command: \"set_settings\"; success: true; data: RpcSettingsSetResult }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"evaluate_context_trust\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustEvaluation;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"trust_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustMutationResult;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"untrust_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustMutationResult;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"remove_trusted_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcTrustedFolderRemovalResult;\n\t }\n\n\t// Version\n\t| { id?: string; type: \"response\"; command: \"get_version\"; success: true; data: { version: string } }\n\n\t// Error response (any command can fail)\n\t| { id?: string; type: \"response\"; command: string; success: false; error: string };\n\n// ============================================================================\n// Session Info (for list_sessions response)\n// ============================================================================\n\n/** Session metadata returned by list_sessions */\nexport interface RpcSessionInfo {\n\t/** Full path to the session JSONL file */\n\tpath: string;\n\t/** Session UUID */\n\tid: string;\n\t/** Working directory where the session was started */\n\tcwd: string;\n\t/** User-defined display name */\n\tname?: string;\n\t/** ISO timestamp of session creation */\n\tcreated: string;\n\t/** ISO timestamp of last modification */\n\tmodified: string;\n\t/** Number of messages in the session */\n\tmessageCount: number;\n\t/** First user message text */\n\tfirstMessage: string;\n}\n\n/** Background agent metadata returned by list_background_agents */\nexport interface RpcBackgroundAgentInfo {\n\t/** Registry ID (hex) used in background_agent_* events */\n\tagentId: string;\n\t/** Agent type name (e.g. \"Explore\") */\n\tagentType: string;\n\t/** Short human-readable task label */\n\ttaskSummary: string;\n\t/** ISO timestamp of launch */\n\tstartedAt: string;\n\t/** Lifecycle status */\n\tstatus: \"running\" | \"completed\" | \"failed\";\n\t/** Directory containing the agent's session JSONL file (known at spawn time) */\n\tsessionDir?: string;\n\t/** Path to the agent's session JSONL file (available after the child exits) */\n\tsessionFile?: string;\n\t/** Working directory the agent runs in */\n\tcwd?: string;\n\t/** Safe pre-spawn arbitration records, ordered by attempt/chain step. */\n\tarbitrations?: DispatchArbitrationRecord[];\n}\n\n/** Agent type metadata returned by list_agent_types */\nexport interface RpcAgentTypeInfo {\n\t/** Agent type name, e.g. \"Explore\" */\n\tname: string;\n\t/** Human-readable description from the agent frontmatter */\n\tdescription: string;\n}\n\n/** Serializable session tree node returned by get_tree. Stable DTO — no raw entry payloads. */\nexport interface RpcTreeNode {\n\t/** Entry id */\n\tid: string;\n\t/**\n\t * Parent entry id, or null for a root. Orphaned roots (broken parent chains) keep their\n\t * original non-null parentId, which references an entry not present in the tree — prefer\n\t * the nested `children` structure over parentId when reconstructing hierarchy.\n\t */\n\tparentId: string | null;\n\t/** Session entry type */\n\ttype: SessionEntry[\"type\"];\n\t/** Message role, present only when type === \"message\" (user, assistant, toolResult, bashExecution, ...) */\n\trole?: string;\n\t/** Short single-line content preview (whitespace-collapsed, max 200 chars) */\n\tpreview: string;\n\t/** ISO timestamp of the entry */\n\ttimestamp: string;\n\t/** Resolved label, if any */\n\tlabel?: string;\n\t/** Child nodes, oldest first */\n\tchildren: RpcTreeNode[];\n}\n\n// ============================================================================\n// Settings (persistent defaults)\n// ============================================================================\n\n/**\n * Snapshot of persistent default settings returned by `get_settings` and `set_settings`.\n *\n * These are the values persisted via SettingsManager (merged global + project view) that\n * seed fresh runtimes — NOT the live session state. For the current runtime state\n * (active model, effective thinking level, modes in effect), use `get_state`.\n */\nexport interface RpcSettingsSnapshot {\n\t/** Default provider used at startup (absent if never set) */\n\tdefaultProvider?: string;\n\t/** Default model id used at startup (absent if never set) */\n\tdefaultModel?: string;\n\t/** Default thinking level applied at startup (absent if never set) */\n\tdefaultThinkingLevel?: ThinkingLevel;\n\t/** How queued steering messages are delivered */\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\t/** How queued follow-up messages are delivered */\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\t/** Whether automatic context compaction is enabled */\n\tcompactionEnabled: boolean;\n\t/** Whether automatic retry on transient errors is enabled */\n\tretryEnabled: boolean;\n\t/** Maximum child agents a new parent session may run concurrently; zero disables the tool */\n\tmaxConcurrentSubagents: number;\n\t/** Whether image inputs are automatically resized before sending to providers */\n\timageAutoResize?: boolean;\n\t/** Whether image inputs are blocked from being sent to providers */\n\tblockImages?: boolean;\n\t/** Whether skills are registered as slash commands */\n\tenableSkillCommands?: boolean;\n\t/** Global-only expert opt-in allowing nested context from any resolvable directory. Defaults to false. */\n\tautoLoadNestedContext: boolean;\n\t/** Global configured trusted context folders, including any currently invalid legacy entries. */\n\ttrustedContextFolders: string[];\n\t/** Canonical existing trusted roots actually enforced by the global trust matcher. */\n\teffectiveTrustedContextRoots: string[];\n\t/** Preferred model transport */\n\ttransport?: Transport;\n\t/** Whether raw thinking blocks are hidden in rendered transcripts */\n\thideThinkingBlock?: boolean;\n\t/** Per-agent model fallback lists, merged global + project with project entries winning */\n\tagentModels?: Record<string, string[]>;\n\t/** Global-only fail-closed Dispatch Arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettings;\n\t/** Raw effective persisted model patterns. Absent means the future-inclusive all-model scope. */\n\tenabledModels?: string[];\n\t/** Effective patterns resolved by coding-agent core in model-cycling order. */\n\tresolvedScopedModels: RpcScopedModel[];\n\t/** Structured diagnostics from resolving legacy persisted patterns. */\n\tscopeWarnings: RpcModelScopeWarning[];\n\t/** True when project settings shadow global enabledModels writes. */\n\thasProjectEnabledModelsOverride: boolean;\n\t/** Source of the effective raw enabledModels value. */\n\tenabledModelsSource: \"default\" | \"global\" | \"project\";\n}\n\n/** Settings snapshot returned by `set_settings`; warnings are present for loud shadowing notices. */\nexport type RpcSettingsSetResult = RpcSettingsSnapshot & { warnings?: string[] };\n\n/**\n * Partial update payload for `set_settings`. All fields optional, but at least one\n * must be present. `defaultProvider` and `defaultModel` must be supplied together.\n * Writes persistent defaults only — never touches live session state.\n */\nexport interface RpcContextTrustEvaluation {\n\t/** Strict-native-realpath canonical existing directory supplied by the caller. */\n\tcanonicalTarget: string;\n\t/** The current global policy source granting (or denying) nested context. */\n\tstate: \"untrusted\" | \"trusted-root\" | \"unrestricted\";\n\t/** Canonical configured root that grants trusted-root access, including inherited access. */\n\tgrantingRoot?: string;\n}\n\n/** Post-write result of trusting or untrusting a context directory. */\nexport interface RpcContextTrustMutationResult {\n\tevaluation: RpcContextTrustEvaluation;\n\t/** Full settings snapshot after the durable write; its trust fields are global-only. */\n\tsettings: RpcSettingsSnapshot;\n\t/** Canonical root added by trust_context_folder. */\n\taddedRoot?: string;\n\t/** Actual canonical granting root removed by untrust_context_folder. */\n\tremovedRoot?: string;\n}\n\n/** Post-write result of removing a configured trusted-folder string exactly as stored. */\nexport interface RpcTrustedFolderRemovalResult {\n\t/** Full settings snapshot after the durable write; its trust fields are global-only. */\n\tsettings: RpcSettingsSnapshot;\n\t/** Configured folder string requested for exact removal. */\n\tremovedFolder: string;\n}\n\nexport interface RpcSettingsUpdate {\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: ThinkingLevel;\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\tcompactionEnabled?: boolean;\n\tretryEnabled?: boolean;\n\tmaxConcurrentSubagents?: number;\n\timageAutoResize?: boolean;\n\tblockImages?: boolean;\n\tenableSkillCommands?: boolean;\n\tautoLoadNestedContext?: boolean;\n\t/** Replaces global trusted folders atomically; values persist as canonical existing roots. */\n\ttrustedContextFolders?: string[];\n\ttransport?: Transport;\n\thideThinkingBlock?: boolean;\n\tagentModels?: Record<string, string[]>;\n\t/** Ordered exact model references; null removes the filter and restores implicit all. */\n\tenabledModels?: string[] | null;\n\t/** Replaces the complete global-only arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettings | null;\n}\n\n// ============================================================================\n// Extension UI Events (stdout)\n// ============================================================================\n\n/** A single question inside an `ask` extension-UI request. */\nexport interface RpcAskQuestion {\n\tquestion: string;\n\ttitle?: string;\n\toptions?: string[];\n\tallowFreeText?: boolean;\n\tmultiSelect?: boolean;\n\tmultiline?: boolean;\n}\n\n/** A single answer in an `ask` extension-UI response, one per question in order. */\nexport interface RpcAskAnswer {\n\tselected: string[];\n\tcustomText?: string;\n\tskipped?: boolean;\n}\n\n/** Emitted when an extension needs user input */\nexport type RpcExtensionUIRequest =\n\t| { type: \"extension_ui_request\"; id: string; method: \"select\"; title: string; options: string[]; timeout?: number }\n\t| { type: \"extension_ui_request\"; id: string; method: \"confirm\"; title: string; message: string; timeout?: number }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"input\";\n\t\t\ttitle: string;\n\t\t\tplaceholder?: string;\n\t\t\ttimeout?: number;\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"editor\"; title: string; prefill?: string }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"ask\";\n\t\t\ttitle: string;\n\t\t\t/** One or more questions asked together as a single wizard. */\n\t\t\tquestions: RpcAskQuestion[];\n\t\t\ttimeout?: number;\n\t\t\t/** Absolute Unix timestamp in milliseconds when the RPC-side timeout fires. */\n\t\t\texpiresAt?: number;\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"notify\";\n\t\t\tmessage: string;\n\t\t\tnotifyType?: \"info\" | \"warning\" | \"error\";\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setStatus\";\n\t\t\tstatusKey: string;\n\t\t\tstatusText: string | undefined;\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setWidget\";\n\t\t\twidgetKey: string;\n\t\t\twidgetLines: string[] | undefined;\n\t\t\twidgetPlacement?: \"aboveEditor\" | \"belowEditor\";\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"setTitle\"; title: string }\n\t| { type: \"extension_ui_request\"; id: string; method: \"set_editor_text\"; text: string };\n\n/** Blocking dialog requests retained until a matching host response arrives. */\nexport type RpcBlockingExtensionUIRequest = Extract<\n\tRpcExtensionUIRequest,\n\t{ method: \"select\" | \"confirm\" | \"input\" | \"editor\" | \"ask\" }\n>;\n\n// ============================================================================\n// Extension UI Commands (stdin)\n// ============================================================================\n\n/** Response to an extension UI request */\nexport type RpcExtensionUIResponse =\n\t| { type: \"extension_ui_response\"; id: string; value: string }\n\t| { type: \"extension_ui_response\"; id: string; confirmed: boolean }\n\t| { type: \"extension_ui_response\"; id: string; answers: RpcAskAnswer[] }\n\t| { type: \"extension_ui_response\"; id: string; cancelled: true };\n\n// ============================================================================\n// Helper type for extracting command types\n// ============================================================================\n\nexport type RpcCommandType = RpcCommand[\"type\"];\n"]}
1
+ {"version":3,"file":"rpc-types.js","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG","sourcesContent":["/**\n * RPC protocol types for headless operation.\n *\n * Commands are sent as JSON lines on stdin.\n * Responses and events are emitted as JSON lines on stdout.\n */\n\nimport type { AgentMessage, ThinkingLevel } from \"@dreb/agent-core\";\nimport type { ImageContent, Model, Transport } from \"@dreb/ai\";\nimport type { AgentSessionEvent, SessionStats } from \"../../core/agent-session.js\";\nimport type { BashResult } from \"../../core/bash-executor.js\";\nimport type { CompactionResult } from \"../../core/compaction/index.js\";\nimport type { DispatchArbitrationRecord } from \"../../core/dispatch-arbiter.js\";\nimport type { ContextUsage } from \"../../core/extensions/types.js\";\nimport type { ModelPerformanceSummary } from \"../../core/performance-tracker.js\";\nimport type { SessionEntry } from \"../../core/session-manager.js\";\nimport type { SubagentArbiterSettings, TabTitleSettings, TabTitleSettingsUpdate } from \"../../core/settings-manager.js\";\nimport type { SourceInfo } from \"../../core/source-info.js\";\n\n// ============================================================================\n// RPC Commands (stdin)\n// ============================================================================\n\nexport type RpcCommand =\n\t// Prompting\n\t| { id?: string; type: \"prompt\"; message: string; images?: ImageContent[]; streamingBehavior?: \"steer\" | \"followUp\" }\n\t| { id?: string; type: \"steer\"; message: string; images?: ImageContent[] }\n\t| { id?: string; type: \"follow_up\"; message: string; images?: ImageContent[] }\n\t| { id?: string; type: \"abort\" }\n\t| { id?: string; type: \"new_session\"; parentSession?: string }\n\t| { id?: string; type: \"reload\" }\n\t| { id?: string; type: \"dream\"; args?: string }\n\n\t// State\n\t| { id?: string; type: \"get_state\" }\n\t/**\n\t * Atomically captures dashboard-visible parent-session state. The RPC mode\n\t * writes a matching dashboard_snapshot_barrier immediately before its response;\n\t * consumers must use that barrier rather than promise timing to reconcile\n\t * later streamed events.\n\t */\n\t| { id?: string; type: \"get_dashboard_snapshot\" }\n\t| { id?: string; type: \"get_resources\" }\n\t| { id?: string; type: \"get_git_branch\" }\n\t| { id?: string; type: \"get_daily_cost\" }\n\n\t// Model\n\t| { id?: string; type: \"set_model\"; provider: string; modelId: string }\n\t| { id?: string; type: \"resolve_model\"; pattern: string }\n\t| { id?: string; type: \"cycle_model\" }\n\t| { id?: string; type: \"get_available_models\" }\n\n\t// Buddy — hatch/reroll run inside the agent process so API keys never leave\n\t| { id?: string; type: \"buddy_hatch\" }\n\t| { id?: string; type: \"buddy_reroll\" }\n\n\t// Thinking\n\t| { id?: string; type: \"set_thinking_level\"; level: ThinkingLevel }\n\t| { id?: string; type: \"cycle_thinking_level\" }\n\n\t// Queue modes\n\t| { id?: string; type: \"set_steering_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\t| { id?: string; type: \"set_follow_up_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\t| { id?: string; type: \"get_pending_messages\" }\n\t| { id?: string; type: \"clear_pending_messages\" }\n\n\t// Compaction\n\t| { id?: string; type: \"compact\"; customInstructions?: string }\n\t| { id?: string; type: \"set_auto_compaction\"; enabled: boolean }\n\t| { id?: string; type: \"abort_compaction\" }\n\n\t// Retry\n\t| { id?: string; type: \"set_auto_retry\"; enabled: boolean }\n\t| { id?: string; type: \"abort_retry\" }\n\n\t// Bash\n\t| { id?: string; type: \"bash\"; command: string }\n\t| { id?: string; type: \"abort_bash\" }\n\n\t// Session\n\t| { id?: string; type: \"get_session_stats\" }\n\t| { id?: string; type: \"get_performance_stats\" }\n\t| { id?: string; type: \"export_html\"; outputPath?: string }\n\t| { id?: string; type: \"import_jsonl\"; inputPath: string }\n\t| { id?: string; type: \"switch_session\"; sessionPath: string }\n\t| { id?: string; type: \"delete_session\"; sessionPath: string }\n\t| { id?: string; type: \"fork\"; entryId: string }\n\t| { id?: string; type: \"get_fork_messages\" }\n\t| { id?: string; type: \"get_tree\" }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"navigate_tree\";\n\t\t\ttargetId: string;\n\t\t\tsummarize?: boolean;\n\t\t\tcustomInstructions?: string;\n\t\t\treplaceInstructions?: boolean;\n\t\t\tlabel?: string;\n\t }\n\t| { id?: string; type: \"get_last_assistant_text\" }\n\t| { id?: string; type: \"set_session_name\"; name: string }\n\n\t// Messages\n\t| { id?: string; type: \"get_messages\" }\n\n\t// Command discovery (resource commands plus client-handled built-ins)\n\t| { id?: string; type: \"get_commands\" }\n\n\t// Session listing\n\t| { id?: string; type: \"list_sessions\" }\n\t| { id?: string; type: \"list_all_sessions\" }\n\n\t// Background agents\n\t| { id?: string; type: \"list_background_agents\" }\n\t| { id?: string; type: \"steer_background_agent\"; agentId: string; message: string }\n\t| { id?: string; type: \"get_background_agent_pending\"; agentId: string }\n\t| { id?: string; type: \"list_agent_types\" }\n\n\t// Settings (persistent defaults)\n\t| { id?: string; type: \"get_settings\" }\n\t| { id?: string; type: \"set_settings\"; settings: RpcSettingsUpdate }\n\t| { id?: string; type: \"evaluate_context_trust\"; path: string }\n\t| { id?: string; type: \"trust_context_folder\"; path: string }\n\t| { id?: string; type: \"untrust_context_folder\"; path: string }\n\t| { id?: string; type: \"remove_trusted_context_folder\"; path: string }\n\n\t// Version\n\t| { id?: string; type: \"get_version\" };\n\n// ============================================================================\n// RPC Slash Command (for get_commands response)\n// ============================================================================\n\ninterface RpcResourceSlashCommand {\n\t/** Command name (without leading slash) */\n\tname: string;\n\t/** Human-readable description */\n\tdescription?: string;\n\t/** Prompt-invokable resource command. */\n\tsource: \"extension\" | \"prompt\" | \"skill\";\n\t/** Source metadata for the owning resource. */\n\tsourceInfo: SourceInfo;\n}\n\ninterface RpcBuiltinSlashCommand {\n\t/** Command name (without leading slash). */\n\tname: string;\n\t/** Human-readable description. */\n\tdescription: string;\n\t/** Built-ins require client-side handling and are rejected by RPC prompt commands. */\n\tsource: \"builtin\";\n\t/** False means typed use is intercepted but the command is omitted from dashboard autocomplete. */\n\tdashboard: boolean;\n}\n\n/** A slash command discoverable by an RPC client. */\nexport type RpcSlashCommand = RpcResourceSlashCommand | RpcBuiltinSlashCommand;\n\nexport interface RpcScopedModel {\n\tprovider: string;\n\tid: string;\n\tname?: string;\n\treasoning?: boolean;\n\tthinkingLevel?: string;\n}\n\nexport interface RpcModelScopeWarning {\n\t/** Raw persisted pattern that produced this diagnostic. */\n\tpattern: string;\n\t/** Resolver warning text without terminal styling. */\n\tmessage: string;\n}\n\nexport interface RpcResources {\n\tcontextFiles: Array<{ path: string }>;\n\tskills: Array<{ name: string; description: string }>;\n\textensions: Array<{ name?: string; path: string }>;\n\tpromptTemplates: Array<{ name: string; description?: string }>;\n\tsystemPromptPresent: boolean;\n}\n\nexport interface RpcPerformanceStats {\n\t/** TUI-parity summaries computed by the shared rolling and delta calculators. */\n\tmodels: ModelPerformanceSummary[];\n}\n\nexport interface RpcQueuedMessage {\n\ttext: string;\n\timages?: ImageContent[];\n}\n\nexport interface RpcPendingMessages {\n\t/** Text-only compatibility view for existing clients. */\n\tsteering: string[];\n\t/** Text-only compatibility view for existing clients. */\n\tfollowUp: string[];\n\t/** Full queued payloads, including inline image attachments. */\n\tsteeringMessages?: RpcQueuedMessage[];\n\t/** Full queued payloads, including inline image attachments. */\n\tfollowUpMessages?: RpcQueuedMessage[];\n}\n\n// ============================================================================\n// RPC State\n// ============================================================================\n\nexport interface RpcSessionTask {\n\tid: string;\n\ttitle: string;\n\tstatus: \"pending\" | \"in_progress\" | \"completed\";\n}\n\nexport interface RpcDashboardSnapshot {\n\t/** Opaque token repeated by the immediately following barrier event. */\n\tsnapshotId: string;\n\tstate: RpcSessionState;\n\t/** Complete parent transcript at the same RPC command boundary as state. */\n\tmessages: AgentMessage[];\n\t/** Current background-agent registry at that boundary. */\n\tbackgroundAgents: RpcBackgroundAgentInfo[];\n\t/** Blocking UI requests that are still waiting for a host response. */\n\tpendingExtensionUiRequests: RpcBlockingExtensionUIRequest[];\n}\n\n/** Ordering marker emitted immediately before a matching dashboard snapshot response. */\nexport interface RpcDashboardSnapshotBarrierEvent {\n\ttype: \"dashboard_snapshot_barrier\";\n\t/** Opaque token matching the following {@link RpcDashboardSnapshot.snapshotId}. */\n\tsnapshotId: string;\n}\n\n/** Non-response JSONL messages emitted by the RPC server on stdout. */\nexport type RpcEvent = AgentSessionEvent | RpcExtensionUIRequest | RpcDashboardSnapshotBarrierEvent;\n\nexport interface RpcSessionState {\n\tmodel?: Model<any>;\n\tscopedModels: RpcScopedModel[];\n\t/** Current in-memory task list, replaced atomically by the tasks_update tool. */\n\ttasks: RpcSessionTask[];\n\tusingSubscription: boolean;\n\tthinkingLevel: ThinkingLevel;\n\t/** Model-aware levels available for selection and cycling. */\n\tavailableThinkingLevels: ThinkingLevel[];\n\tisStreaming: boolean;\n\t/** True from retry classification through retry completion, including backoff. */\n\tisRetrying: boolean;\n\t/** Current automatic retry attempt, or 0 before retry start / after completion. */\n\tretryAttempt: number;\n\tisCompacting: boolean;\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tpendingMessageCount: number;\n\t/**\n\t * Context window usage computed by the session — the exact numbers the TUI footer\n\t * renders (AgentSession.getContextUsage()). `tokens`/`percent` are null when usage\n\t * is unknown (e.g. right after compaction, before the next LLM response). Undefined\n\t * when no model is set or the model has no context window.\n\t */\n\tcontextUsage?: ContextUsage;\n\t/** Non-empty when the model was changed from the user's saved preference\n\t * (e.g. saved model unavailable after restart). */\n\tmodelFallbackMessage?: string;\n}\n\n// ============================================================================\n// RPC Responses (stdout)\n// ============================================================================\n\n// Success responses with data\nexport type RpcResponse =\n\t// Prompting (async - events follow)\n\t| { id?: string; type: \"response\"; command: \"prompt\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"steer\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"follow_up\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"new_session\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"reload\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"dream\"; success: true; data: { message: string } }\n\n\t// State\n\t| { id?: string; type: \"response\"; command: \"get_state\"; success: true; data: RpcSessionState }\n\t| { id?: string; type: \"response\"; command: \"get_dashboard_snapshot\"; success: true; data: RpcDashboardSnapshot }\n\t| { id?: string; type: \"response\"; command: \"get_resources\"; success: true; data: RpcResources }\n\t| { id?: string; type: \"response\"; command: \"get_git_branch\"; success: true; data: { branch: string | null } }\n\t| { id?: string; type: \"response\"; command: \"get_daily_cost\"; success: true; data: { cost: number } }\n\n\t// Model\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"set_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: Model<any>;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"resolve_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: { model: Model<any>; warning?: string } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: { model: Model<any>; thinkingLevel: ThinkingLevel; isScoped: boolean } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_available_models\";\n\t\t\tsuccess: true;\n\t\t\tdata: { models: Model<any>[] };\n\t }\n\n\t// Buddy\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"buddy_hatch\";\n\t\t\tsuccess: true;\n\t\t\tdata: { state: import(\"../../core/buddy/buddy-types.js\").BuddyState };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"buddy_reroll\";\n\t\t\tsuccess: true;\n\t\t\tdata: { state: import(\"../../core/buddy/buddy-types.js\").BuddyState };\n\t }\n\n\t// Thinking\n\t| { id?: string; type: \"response\"; command: \"set_thinking_level\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_thinking_level\";\n\t\t\tsuccess: true;\n\t\t\tdata: { level: ThinkingLevel } | null;\n\t }\n\n\t// Queue modes\n\t| { id?: string; type: \"response\"; command: \"set_steering_mode\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"set_follow_up_mode\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"get_pending_messages\"; success: true; data: RpcPendingMessages }\n\t| { id?: string; type: \"response\"; command: \"clear_pending_messages\"; success: true; data: RpcPendingMessages }\n\n\t// Compaction\n\t| { id?: string; type: \"response\"; command: \"compact\"; success: true; data: CompactionResult }\n\t| { id?: string; type: \"response\"; command: \"set_auto_compaction\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort_compaction\"; success: true }\n\n\t// Retry\n\t| { id?: string; type: \"response\"; command: \"set_auto_retry\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort_retry\"; success: true }\n\n\t// Bash\n\t| { id?: string; type: \"response\"; command: \"bash\"; success: true; data: BashResult }\n\t| { id?: string; type: \"response\"; command: \"abort_bash\"; success: true }\n\n\t// Session\n\t| { id?: string; type: \"response\"; command: \"get_session_stats\"; success: true; data: SessionStats }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_performance_stats\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcPerformanceStats;\n\t }\n\t| { id?: string; type: \"response\"; command: \"export_html\"; success: true; data: { path: string } }\n\t| { id?: string; type: \"response\"; command: \"import_jsonl\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"switch_session\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"delete_session\"; success: true; data: { method: \"trash\" | \"unlink\" } }\n\t| { id?: string; type: \"response\"; command: \"fork\"; success: true; data: { text: string; cancelled: boolean } }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_fork_messages\";\n\t\t\tsuccess: true;\n\t\t\tdata: { messages: Array<{ entryId: string; text: string; role: \"user\" | \"assistant\" }> };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_tree\";\n\t\t\tsuccess: true;\n\t\t\tdata: { roots: RpcTreeNode[]; leafId: string | null };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"navigate_tree\";\n\t\t\tsuccess: true;\n\t\t\tdata: { cancelled: boolean; editorText?: string };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_last_assistant_text\";\n\t\t\tsuccess: true;\n\t\t\tdata: { text: string | null };\n\t }\n\t| { id?: string; type: \"response\"; command: \"set_session_name\"; success: true }\n\n\t// Messages\n\t| { id?: string; type: \"response\"; command: \"get_messages\"; success: true; data: { messages: AgentMessage[] } }\n\n\t// Commands\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_commands\";\n\t\t\tsuccess: true;\n\t\t\tdata: { commands: RpcSlashCommand[] };\n\t }\n\n\t// Session listing\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_sessions\";\n\t\t\tsuccess: true;\n\t\t\tdata: { sessions: RpcSessionInfo[] };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_all_sessions\";\n\t\t\tsuccess: true;\n\t\t\tdata: { sessions: RpcSessionInfo[] };\n\t }\n\n\t// Background agents\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_background_agents\";\n\t\t\tsuccess: true;\n\t\t\tdata: { agents: RpcBackgroundAgentInfo[] };\n\t }\n\t| { id?: string; type: \"response\"; command: \"steer_background_agent\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_background_agent_pending\";\n\t\t\tsuccess: true;\n\t\t\tdata: { steeringMode: \"all\" | \"one-at-a-time\"; pending: RpcPendingMessages };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_agent_types\";\n\t\t\tsuccess: true;\n\t\t\tdata: { agentTypes: RpcAgentTypeInfo[] };\n\t }\n\n\t// Settings\n\t| { id?: string; type: \"response\"; command: \"get_settings\"; success: true; data: RpcSettingsSnapshot }\n\t| { id?: string; type: \"response\"; command: \"set_settings\"; success: true; data: RpcSettingsSetResult }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"evaluate_context_trust\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustEvaluation;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"trust_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustMutationResult;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"untrust_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcContextTrustMutationResult;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"remove_trusted_context_folder\";\n\t\t\tsuccess: true;\n\t\t\tdata: RpcTrustedFolderRemovalResult;\n\t }\n\n\t// Version\n\t| { id?: string; type: \"response\"; command: \"get_version\"; success: true; data: { version: string } }\n\n\t// Error response (any command can fail)\n\t| { id?: string; type: \"response\"; command: string; success: false; error: string };\n\n// ============================================================================\n// Session Info (for list_sessions response)\n// ============================================================================\n\n/** Session metadata returned by list_sessions */\nexport interface RpcSessionInfo {\n\t/** Full path to the session JSONL file */\n\tpath: string;\n\t/** Session UUID */\n\tid: string;\n\t/** Working directory where the session was started */\n\tcwd: string;\n\t/** User-defined display name */\n\tname?: string;\n\t/** ISO timestamp of session creation */\n\tcreated: string;\n\t/** ISO timestamp of last modification */\n\tmodified: string;\n\t/** Number of messages in the session */\n\tmessageCount: number;\n\t/** First user message text */\n\tfirstMessage: string;\n}\n\n/** Background agent metadata returned by list_background_agents */\nexport interface RpcBackgroundAgentInfo {\n\t/** Registry ID (hex) used in background_agent_* events */\n\tagentId: string;\n\t/** Agent type name (e.g. \"Explore\") */\n\tagentType: string;\n\t/** Short human-readable task label */\n\ttaskSummary: string;\n\t/** ISO timestamp of launch */\n\tstartedAt: string;\n\t/** Lifecycle status */\n\tstatus: \"running\" | \"completed\" | \"failed\";\n\t/** Directory containing the agent's session JSONL file (known at spawn time) */\n\tsessionDir?: string;\n\t/** Path to the agent's session JSONL file (available after the child exits) */\n\tsessionFile?: string;\n\t/** Working directory the agent runs in */\n\tcwd?: string;\n\t/** Safe pre-spawn arbitration records, ordered by attempt/chain step. */\n\tarbitrations?: DispatchArbitrationRecord[];\n}\n\n/** Agent type metadata returned by list_agent_types */\nexport interface RpcAgentTypeInfo {\n\t/** Agent type name, e.g. \"Explore\" */\n\tname: string;\n\t/** Human-readable description from the agent frontmatter */\n\tdescription: string;\n}\n\n/** Serializable session tree node returned by get_tree. Stable DTO — no raw entry payloads. */\nexport interface RpcTreeNode {\n\t/** Entry id */\n\tid: string;\n\t/**\n\t * Parent entry id, or null for a root. Orphaned roots (broken parent chains) keep their\n\t * original non-null parentId, which references an entry not present in the tree — prefer\n\t * the nested `children` structure over parentId when reconstructing hierarchy.\n\t */\n\tparentId: string | null;\n\t/** Session entry type */\n\ttype: SessionEntry[\"type\"];\n\t/** Message role, present only when type === \"message\" (user, assistant, toolResult, bashExecution, ...) */\n\trole?: string;\n\t/** Short single-line content preview (whitespace-collapsed, max 200 chars) */\n\tpreview: string;\n\t/** ISO timestamp of the entry */\n\ttimestamp: string;\n\t/** Resolved label, if any */\n\tlabel?: string;\n\t/** Child nodes, oldest first */\n\tchildren: RpcTreeNode[];\n}\n\n// ============================================================================\n// Settings (persistent defaults)\n// ============================================================================\n\n/**\n * Snapshot of persistent default settings returned by `get_settings` and `set_settings`.\n *\n * These are the values persisted via SettingsManager (merged global + project view) that\n * seed fresh runtimes — NOT the live session state. For the current runtime state\n * (active model, effective thinking level, modes in effect), use `get_state`.\n */\nexport interface RpcSettingsSnapshot {\n\t/** Default provider used at startup (absent if never set) */\n\tdefaultProvider?: string;\n\t/** Default model id used at startup (absent if never set) */\n\tdefaultModel?: string;\n\t/** Default thinking level applied at startup (absent if never set) */\n\tdefaultThinkingLevel?: ThinkingLevel;\n\t/** How queued steering messages are delivered */\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\t/** How queued follow-up messages are delivered */\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\t/** Whether automatic context compaction is enabled */\n\tcompactionEnabled: boolean;\n\t/** Whether automatic retry on transient errors is enabled */\n\tretryEnabled: boolean;\n\t/** Maximum child agents a new parent session may run concurrently; zero disables the tool */\n\tmaxConcurrentSubagents: number;\n\t/** Whether image inputs are automatically resized before sending to providers */\n\timageAutoResize?: boolean;\n\t/** Whether image inputs are blocked from being sent to providers */\n\tblockImages?: boolean;\n\t/** Whether skills are registered as slash commands */\n\tenableSkillCommands?: boolean;\n\t/** Global-only expert opt-in allowing nested context from any resolvable directory. Defaults to false. */\n\tautoLoadNestedContext: boolean;\n\t/** Global configured trusted context folders, including any currently invalid legacy entries. */\n\ttrustedContextFolders: string[];\n\t/** Canonical existing trusted roots actually enforced by the global trust matcher. */\n\teffectiveTrustedContextRoots: string[];\n\t/** Preferred model transport */\n\ttransport?: Transport;\n\t/** Whether raw thinking blocks are hidden in rendered transcripts */\n\thideThinkingBlock?: boolean;\n\t/** Per-agent model fallback lists, merged global + project with project entries winning */\n\tagentModels?: Record<string, string[]>;\n\t/** Global-only fail-closed Dispatch Arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettings;\n\t/** Effective automatic tab-title configuration. */\n\ttabTitle?: TabTitleSettings;\n\t/** Raw effective persisted model patterns. Absent means the future-inclusive all-model scope. */\n\tenabledModels?: string[];\n\t/** Effective patterns resolved by coding-agent core in model-cycling order. */\n\tresolvedScopedModels: RpcScopedModel[];\n\t/** Structured diagnostics from resolving legacy persisted patterns. */\n\tscopeWarnings: RpcModelScopeWarning[];\n\t/** True when project settings shadow global enabledModels writes. */\n\thasProjectEnabledModelsOverride: boolean;\n\t/** Source of the effective raw enabledModels value. */\n\tenabledModelsSource: \"default\" | \"global\" | \"project\";\n}\n\n/** Settings snapshot returned by `set_settings`; warnings are present for loud shadowing notices. */\nexport type RpcSettingsSetResult = RpcSettingsSnapshot & { warnings?: string[] };\n\n/**\n * Partial update payload for `set_settings`. All fields optional, but at least one\n * must be present. `defaultProvider` and `defaultModel` must be supplied together.\n * Writes persistent defaults only — never touches live session state.\n */\nexport interface RpcContextTrustEvaluation {\n\t/** Strict-native-realpath canonical existing directory supplied by the caller. */\n\tcanonicalTarget: string;\n\t/** The current global policy source granting (or denying) nested context. */\n\tstate: \"untrusted\" | \"trusted-root\" | \"unrestricted\";\n\t/** Canonical configured root that grants trusted-root access, including inherited access. */\n\tgrantingRoot?: string;\n}\n\n/** Post-write result of trusting or untrusting a context directory. */\nexport interface RpcContextTrustMutationResult {\n\tevaluation: RpcContextTrustEvaluation;\n\t/** Full settings snapshot after the durable write; its trust fields are global-only. */\n\tsettings: RpcSettingsSnapshot;\n\t/** Canonical root added by trust_context_folder. */\n\taddedRoot?: string;\n\t/** Actual canonical granting root removed by untrust_context_folder. */\n\tremovedRoot?: string;\n}\n\n/** Post-write result of removing a configured trusted-folder string exactly as stored. */\nexport interface RpcTrustedFolderRemovalResult {\n\t/** Full settings snapshot after the durable write; its trust fields are global-only. */\n\tsettings: RpcSettingsSnapshot;\n\t/** Configured folder string requested for exact removal. */\n\tremovedFolder: string;\n}\n\nexport interface RpcSettingsUpdate {\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: ThinkingLevel;\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\tcompactionEnabled?: boolean;\n\tretryEnabled?: boolean;\n\tmaxConcurrentSubagents?: number;\n\timageAutoResize?: boolean;\n\tblockImages?: boolean;\n\tenableSkillCommands?: boolean;\n\tautoLoadNestedContext?: boolean;\n\t/** Replaces global trusted folders atomically; values persist as canonical existing roots. */\n\ttrustedContextFolders?: string[];\n\ttransport?: Transport;\n\thideThinkingBlock?: boolean;\n\tagentModels?: Record<string, string[]>;\n\t/** Ordered exact model references; null removes the filter and restores implicit all. */\n\tenabledModels?: string[] | null;\n\t/** Replaces the complete global-only arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettings | null;\n\t/** Partial global automatic tab-title configuration update. `model: null` removes the pinned model, restoring Explore-agent routing. */\n\ttabTitle?: TabTitleSettingsUpdate;\n}\n\n// ============================================================================\n// Extension UI Events (stdout)\n// ============================================================================\n\n/** A single question inside an `ask` extension-UI request. */\nexport interface RpcAskQuestion {\n\tquestion: string;\n\ttitle?: string;\n\toptions?: string[];\n\tallowFreeText?: boolean;\n\tmultiSelect?: boolean;\n\tmultiline?: boolean;\n}\n\n/** A single answer in an `ask` extension-UI response, one per question in order. */\nexport interface RpcAskAnswer {\n\tselected: string[];\n\tcustomText?: string;\n\tskipped?: boolean;\n}\n\n/** Emitted when an extension needs user input */\nexport type RpcExtensionUIRequest =\n\t| { type: \"extension_ui_request\"; id: string; method: \"select\"; title: string; options: string[]; timeout?: number }\n\t| { type: \"extension_ui_request\"; id: string; method: \"confirm\"; title: string; message: string; timeout?: number }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"input\";\n\t\t\ttitle: string;\n\t\t\tplaceholder?: string;\n\t\t\ttimeout?: number;\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"editor\"; title: string; prefill?: string }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"ask\";\n\t\t\ttitle: string;\n\t\t\t/** One or more questions asked together as a single wizard. */\n\t\t\tquestions: RpcAskQuestion[];\n\t\t\ttimeout?: number;\n\t\t\t/** Absolute Unix timestamp in milliseconds when the RPC-side timeout fires. */\n\t\t\texpiresAt?: number;\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"notify\";\n\t\t\tmessage: string;\n\t\t\tnotifyType?: \"info\" | \"warning\" | \"error\";\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setStatus\";\n\t\t\tstatusKey: string;\n\t\t\tstatusText: string | undefined;\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setWidget\";\n\t\t\twidgetKey: string;\n\t\t\twidgetLines: string[] | undefined;\n\t\t\twidgetPlacement?: \"aboveEditor\" | \"belowEditor\";\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"setTitle\"; title: string }\n\t| { type: \"extension_ui_request\"; id: string; method: \"set_editor_text\"; text: string };\n\n/** Blocking dialog requests retained until a matching host response arrives. */\nexport type RpcBlockingExtensionUIRequest = Extract<\n\tRpcExtensionUIRequest,\n\t{ method: \"select\" | \"confirm\" | \"input\" | \"editor\" | \"ask\" }\n>;\n\n// ============================================================================\n// Extension UI Commands (stdin)\n// ============================================================================\n\n/** Response to an extension UI request */\nexport type RpcExtensionUIResponse =\n\t| { type: \"extension_ui_response\"; id: string; value: string }\n\t| { type: \"extension_ui_response\"; id: string; confirmed: boolean }\n\t| { type: \"extension_ui_response\"; id: string; answers: RpcAskAnswer[] }\n\t| { type: \"extension_ui_response\"; id: string; cancelled: true };\n\n// ============================================================================\n// Helper type for extracting command types\n// ============================================================================\n\nexport type RpcCommandType = RpcCommand[\"type\"];\n"]}
package/docs/dashboard.md CHANGED
@@ -137,7 +137,7 @@ networking window above.
137
137
  | **Subagent view** | 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. While the child is running, a composer sends the user's text unchanged to that specific child as steering input, displays its pending steering queue, and reports its effective `one-at-a-time` or `all` delivery mode. Completed, failed, rehydrated, and unavailable children remain read-only. |
138
138
  | **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. |
139
139
  | **Memories** | Dreb-only memory management for `~/.dreb/memory` and `.dreb/memory` under active/disk project roots. It lists existing `MEMORY.md` indexes and direct child `.md` entries only (no Claude paths, create, or rename), shows entry frontmatter or metadata errors so malformed files can be repaired, renders sanitized Markdown preview beside a raw editor, and uses exact SHA-256 revisions so stale saves/deletes return conflicts while preserving drafts. The index view is complete, not truncated, and warns when it exceeds the 200-line memory-index convention. Entry deletion requires both entry and index revisions, removes only matching safe Markdown-link index lines (`file.md` / `./file.md`), writes the cleaned index atomically before unlinking the entry, and rolls back loudly if the unlink fails. |
140
- | **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 scoped-models editor controls model cycling for new sessions only: grouped search, model/provider/all toggles, responsive controls, accessible up/down partial-scope ordering, and save/reset. An absent `enabledModels` is future-inclusive all models in registry order and cannot be reordered; a partial scope is a non-empty ordered list of canonical `provider/model` references. Editing legacy glob, fuzzy, or thinking-suffix values saves normalized exact references. The selected context reads effective global + project settings but writes global; a project-level `enabledModels` shadow is warned. 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, including **Max concurrent subagents** (default 4). Setting it to 0 starts new parents without the subagent tool and tells the parent model to perform normally delegated work itself; positive values cap running children per parent session. 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, the 1–3650 day lifetime used only for future pairings (180-day default), and paired-device expiry dates with unpair. |
140
+ | **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 tab-title card exposes the default-enabled generator toggle and an exact authenticated `provider/model` picker; an unset model clearly retains Explore-agent routing, a pinned model can be cleared back to that route, and edits apply to new unnamed sessions. The scoped-models editor controls model cycling for new sessions only: grouped search, model/provider/all toggles, responsive controls, accessible up/down partial-scope ordering, and save/reset. An absent `enabledModels` is future-inclusive all models in registry order and cannot be reordered; a partial scope is a non-empty ordered list of canonical `provider/model` references. Editing legacy glob, fuzzy, or thinking-suffix values saves normalized exact references. The selected context reads effective global + project settings but writes global; a project-level `enabledModels` shadow is warned. 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, including **Max concurrent subagents** (default 4). Setting it to 0 starts new parents without the subagent tool and tells the parent model to perform normally delegated work itself; positive values cap running children per parent session. 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, the 1–3650 day lifetime used only for future pairings (180-day default), and paired-device expiry dates with unpair. |
141
141
  | **Pairing** | Remote first-login: identity echo, rotating-code entry, and the security copy explaining what pairing grants. |
142
142
 
143
143
  ### Notifications and explicit navigation
package/docs/rpc.md CHANGED
@@ -1325,7 +1325,7 @@ Note: with `summarize: true` the command is LLM-bound and can take a while. `Rpc
1325
1325
 
1326
1326
  Persistent settings, backed by the settings file (see [settings.md](settings.md)). They are normally distinct from live session state, with global-only control/security-policy exceptions:
1327
1327
 
1328
- - **Persistent defaults** (`get_settings` / `set_settings`): provider/model, thinking level, queue modes, compaction/retry/image/skill/thinking-display/transport toggles, `maxConcurrentSubagents`, `enabledModels`, and per-agent model fallback lists seed fresh runtimes. Writing these ordinary defaults does **not** change a running session.
1328
+ - **Persistent defaults** (`get_settings` / `set_settings`): provider/model, thinking level, queue modes, compaction/retry/image/skill/thinking-display/transport toggles, `maxConcurrentSubagents`, `enabledModels`, `tabTitle`, and per-agent model fallback lists seed fresh runtimes. Writing these ordinary defaults does **not** change a running session.
1329
1329
  - **Global nested-context trust policy** (`autoLoadNestedContext`, `trustedContextFolders`, `effectiveTrustedContextRoots`, and the trust commands below): this is read from `~/.dreb/agent/settings.json` only, never project settings. Active main/subagent processes observe it for **future lazy nested/out-of-cwd loads**; it cannot remove content already injected into a conversation. It does not govern the separate initial upward context scan from the launch cwd.
1330
1330
  - **Global Dispatch Arbiter policy** (`subagentArbiter`): the complete object is read/written globally and project settings cannot shadow it. Enabled runtimes consume it before future subagent spawns; it does not rewrite already-started children.
1331
1331
  - **Runtime state** (`get_state` / `set_model` / `set_thinking_level` / `set_steering_mode` / `set_follow_up_mode` / `set_auto_compaction` / `set_auto_retry`): the state of the live session. Note that the runtime setters also persist their values as new defaults as a side effect.
@@ -1379,6 +1379,12 @@ Response:
1379
1379
  "model": "anthropic/claude-sonnet-4-5",
1380
1380
  "thinking": "medium",
1381
1381
  "guidePath": "~/.dreb/agent/model-routing-guide.md"
1382
+ },
1383
+ "tabTitle": {
1384
+ "enabled": true,
1385
+ "model": "anthropic/claude-haiku-4-5",
1386
+ "triggerAfter": 9,
1387
+ "maxTitleLength": 60
1382
1388
  }
1383
1389
  }
1384
1390
  }
@@ -1392,6 +1398,8 @@ Response:
1392
1398
 
1393
1399
  `subagentArbiter` is absent when unconfigured. It is always the global object; project `.dreb/settings.json` cannot enable, disable, or alter it.
1394
1400
 
1401
+ `tabTitle` is the effective merged object and is absent when unconfigured. Its optional `model` is one exact `provider/model`; when absent, title generation preserves the Explore-agent resolution route documented in [settings.md](settings.md#tab-title).
1402
+
1395
1403
  #### set_settings
1396
1404
 
1397
1405
  Update persistent default settings. Takes a partial payload — only the supplied keys change. The whole payload is validated before anything is applied: on any invalid field, nothing changes and the response is an explicit error. Writes target the global settings file (same scope as every runtime setter).
@@ -1448,6 +1456,16 @@ Setting per-agent model fallback lists:
1448
1456
 
1449
1457
  For `agentModels`, a non-empty array writes the global fallback list for that agent. An empty array removes the global entry, so that agent uses its agent-definition default unless a project-level override exists.
1450
1458
 
1459
+ Update one or more tab-title fields. Nested updates are partial, so changing `enabled` or `model` preserves omitted `triggerAfter` and `maxTitleLength` values. A supplied model must be an available exact reference; model IDs may contain `/` after the provider prefix. `model: null` removes the pinned model, restoring Explore-agent routing:
1460
+
1461
+ ```json
1462
+ {"type":"set_settings","settings":{"tabTitle":{"enabled":true,"model":"anthropic/claude-haiku-4-5"}}}
1463
+ ```
1464
+
1465
+ ```json
1466
+ {"type":"set_settings","settings":{"tabTitle":{"model":null}}}
1467
+ ```
1468
+
1451
1469
  Replace the complete global-only Dispatch Arbiter policy (exact model is validated; explicit thinking is capability-validated):
1452
1470
 
1453
1471
  ```json
@@ -1537,6 +1555,7 @@ Valid keys and values:
1537
1555
  | `agentModels` | Plain object mapping agent names to arrays of non-empty model id strings; empty arrays remove the global entry for that agent |
1538
1556
  | `enabledModels` | Non-empty ordered array of available exact `provider/model` references, or explicit `null` to remove the global filter and restore implicit all. Duplicate, glob, fuzzy, and thinking-suffix entries are rejected. |
1539
1557
  | `subagentArbiter` | Complete global-only object or `null`. Keys: `enabled` boolean, exact available `model`, optional valid/capability-supported `thinking`, non-empty `guidePath`. Enabling requires `model`. Unknown nested keys are rejected. |
1558
+ | `tabTitle` | Partial object. Keys: `enabled` boolean, exact available `model` (`null` removes the pinned model and restores Explore-agent routing), positive whole-number `triggerAfter`, positive whole-number `maxTitleLength`. Unknown nested keys and an empty object are rejected. |
1540
1559
 
1541
1560
  Errors are explicit `success: false` responses (nothing is applied on any of them):
1542
1561
 
@@ -1552,6 +1571,7 @@ Errors are explicit `success: false` responses (nothing is applied on any of the
1552
1571
  - Provider without model (or vice versa): `defaultProvider and defaultModel must be set together`
1553
1572
  - Unavailable model: `Model not found: provider/model-id`
1554
1573
  - Invalid arbiter policy: `Enabling subagentArbiter requires an exact provider/model`, `Arbiter model not found: ...`, or a nested-key/type/thinking capability error
1574
+ - Invalid tab-title update: `tabTitle.model must be an exact provider/model`, `Tab title model not found: ...`, or a nested-key/type/positive-number error
1555
1575
  - Corrupt settings file: `Cannot write settings: the global settings file failed to load (fix or remove the corrupt settings.json first)` — without this guard the write would silently no-op
1556
1576
  - Write failure (I/O error): `Failed to persist settings: ...`
1557
1577
 
package/docs/settings.md CHANGED
@@ -146,15 +146,19 @@ Prompt behavior:
146
146
  | Setting | Type | Default | Description |
147
147
  |---------|------|---------|-------------|
148
148
  | `tabTitle.enabled` | boolean | `true` | Auto-generate terminal tab title from session task |
149
+ | `tabTitle.model` | string | - | Exact `provider/model` for the title call; absent preserves Explore-agent routing |
149
150
  | `tabTitle.triggerAfter` | number | `9` | Number of tool calls before generating title |
150
151
  | `tabTitle.maxTitleLength` | number | `60` | Soft target length hint for generated titles (clamped to a hard cap of 300) |
151
152
 
152
153
  After the configured number of tool calls, dreb fires a single background LLM call to summarize the session's task into a terminal tab title, then sets it via OSC 0. The title is based primarily on your actual request and current-session actions, with branch/repo/cwd metadata used only for disambiguation. `maxTitleLength` is a soft target communicated to the model (default 60); titles may run a little longer for clarity and are hard-capped at 300 characters. The TUI truncates long titles visually while the dashboard shows the full name. Only fires once per session, and never overwrites an already-named (e.g. resumed) session. If the LLM call fails, the default title remains and the failure is surfaced (shown in interactive mode, logged to stderr in RPC mode).
153
154
 
155
+ `tabTitle.model` pins the primary call to one available exact model. Model IDs may contain `/`, so the first path segment is the provider and the complete remainder is the model ID. When this setting is absent, resolution is unchanged: the Explore `agentModels` override, then Explore agent frontmatter, then the parent session model. If the selected model call fails and differs from the parent session model, dreb retries once with the parent. Dashboard Settings exposes `enabled` and the exact model picker, including clearing a pinned model back to the automatic route; `triggerAfter` and `maxTitleLength` remain configurable in JSON.
156
+
154
157
  ```json
155
158
  {
156
159
  "tabTitle": {
157
160
  "enabled": true,
161
+ "model": "anthropic/claude-haiku-4-5",
158
162
  "triggerAfter": 9,
159
163
  "maxTitleLength": 60
160
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreb/coding-agent",
3
- "version": "2.61.1",
3
+ "version": "2.62.0",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "drebConfig": {