@robota-sdk/agent-framework 3.0.0-beta.73 → 3.0.0-beta.75

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.
@@ -1,8 +1,8 @@
1
- import { IAIProvider, IContextWindowState, IFileSystem, IFileSystemAsync, IHistoryEntry, IHookInput, IHookResult, IHookTypeExecutor, IProviderConfig, IProviderDefinition, IProviderProbeResult, IProviderProfileConfig, ISession, ITerminalOutput, ITerminalOutput as ITerminalOutput$2, IToolSchema, IToolWithEventService, THookDefinition, THooksConfig, TPermissionMode, TSessionEndReason, TToolArgs, TTrustLevel, TUniversalMessage, TUniversalValue, formatEnvReference, hasUsableSecretReference, isEnvReference, resolveEnvReference } from "@robota-sdk/agent-core";
2
- import { IAgentBackgroundTaskRequest, IBackgroundTaskError, IBackgroundTaskError as IBackgroundTaskError$1, IBackgroundTaskHandle, IBackgroundTaskInput, IBackgroundTaskListFilter, IBackgroundTaskLogCursor, IBackgroundTaskLogCursor as IBackgroundTaskLogCursor$1, IBackgroundTaskLogPage, IBackgroundTaskManager, IBackgroundTaskManager as IBackgroundTaskManager$1, IBackgroundTaskManagerOptions, IBackgroundTaskResult, IBackgroundTaskRunner, IBackgroundTaskRunner as IBackgroundTaskRunner$1, IBackgroundTaskStart, IBackgroundTaskState, IBackgroundTaskState as IBackgroundTaskState$1, IBaseBackgroundTaskRequest, ICreateLimitedOutputCaptureOptions, ILimitedOutputCapture, IPreparedSubagentWorktree, IProcessBackgroundTaskRequest, ISerializableProviderProfile, ISubagentJobHandle, ISubagentJobResult, ISubagentJobStart, ISubagentJobState, ISubagentManager, ISubagentManagerOptions, ISubagentRunner, ISubagentRunner as ISubagentRunner$1, ISubagentSpawnRequest, ISubagentWorktreeAdapter, ISubagentWorktreePrepareRequest, IWorktreeSubagentRunnerOptions, TBackgroundPermissionPolicy, TBackgroundPermissionPolicy as TBackgroundPermissionPolicy$1, TBackgroundPrimitive, TBackgroundPrimitive as TBackgroundPrimitive$1, TBackgroundTaskErrorCategory, TBackgroundTaskEvent, TBackgroundTaskEventListener, TBackgroundTaskIdFactory, TBackgroundTaskIsolation, TBackgroundTaskIsolation as TBackgroundTaskIsolation$1, TBackgroundTaskKind, TBackgroundTaskKind as TBackgroundTaskKind$1, TBackgroundTaskMode, TBackgroundTaskMode as TBackgroundTaskMode$1, TBackgroundTaskRequest, TBackgroundTaskRunnerEvent, TBackgroundTaskStatus, TBackgroundTaskStatus as TBackgroundTaskStatus$1, TBackgroundTaskTimeoutReason, TBackgroundTaskTransitionEvent, TSubagentJobMode, TSubagentJobStatus } from "@robota-sdk/agent-executor";
1
+ import { IActionRequest, IActionResponse, IBackgroundJobGroupCreateRequest, IBackgroundJobGroupCreateRequest as IBackgroundJobGroupCreateRequest$1, IBackgroundJobGroupState, IBackgroundJobGroupState as IBackgroundJobGroupState$1, IBackgroundJobGroupSummary, IBackgroundJobGroupSummary as IBackgroundJobGroupSummary$1, IBackgroundJobResultEnvelope, ICapabilityDescriptor, ICommand, ICommandAvailablePlugin, ICommandChoicePromptOption, ICommandInfo, ICommandInstalledPlugin, ICommandInteraction, ICommandInteractionHint, ICommandListEntry, ICommandMarketplaceSource, ICommandPluginAdapter, ICommandPluginAdapter as ICommandPluginAdapter$1, ICommandPluginReloadResult, ICommandResult, ICommandSource, IConfigurableTransport, IContextFileRefreshedEvent, IContextReferenceItem, ICreateExecutionWorkspaceSnapshotInput, ICreateLineDetailPageInput, ICreateMainThreadDetailPageInput, ICreateMainThreadEntryInput, IDiffLine, IExecutionDetailCursor, IExecutionDetailPage, IExecutionDetailRecord, IExecutionOrigin, IExecutionOrigin as IExecutionOrigin$1, IExecutionResult, IExecutionWorkspaceEntry, IExecutionWorkspaceEntryRef, IExecutionWorkspaceEntryRef as IExecutionWorkspaceEntryRef$1, IExecutionWorkspaceEvent, IExecutionWorkspaceFilter, IExecutionWorkspaceSnapshot, IExecutionWorkspaceSnapshotOptions, IInteractionChannel, IInteractiveSession, IInteractiveSessionEvents, IInteractiveSessionRecord, IInteractiveSessionStore, IMemoryEvent, IMemoryReference, IPermissionRequest, IPickItem, IPromptFileReferenceRecord, IResumableSessionSummary, ISkillActivationEvent, IStatusLineCommandSettings, IToolState, IToolSummary, ITransportAdapter, ITransportAdapter as ITransportAdapter$1, ITransportConfig, ITransportRegistryView, IUsageSnapshot, InteractionEvent, TBackgroundJobGroupEvent, TBackgroundJobGroupEventListener, TBackgroundJobGroupEventListener as TBackgroundJobGroupEventListener$1, TBackgroundJobGroupIdFactory, TBackgroundJobGroupIdFactory as TBackgroundJobGroupIdFactory$1, TBackgroundJobGroupStatus, TBackgroundJobWaitPolicy, TCapabilityKind, TCapabilitySafety, TCommandEffect, TCommandInteractionPrompt, TCommandResultDataValue, TContextReferenceLoadType, TContextReferenceStatus, TExecutionAttention, TExecutionControl, TExecutionDetailRecordKind, TExecutionEntryKind, TExecutionOriginKind, TExecutionWorkspaceStatus, TExecutionWorkspaceUpdateCause, TExecutionWorkspaceVisibility, TInteractiveEventName, TInteractivePermissionHandler, TMemoryType, TPermissionResultValue, TPluginInstallScope, TPromptFileReferenceReason, TSkillActivationInvocation, TSkillActivationMode, TSkillActivationSource, TSkillActivationStatus, TStatusLineCommandSettingsPatch } from "@robota-sdk/agent-interface-transport";
2
+ import { IAIProvider, IContextWindowState, IFileSystem, IFileSystemAsync, IHistoryEntry, IHookInput, IHookResult, IHookTypeExecutor, IProviderConfig, IProviderDefinition, IProviderProbeResult, IProviderProfileConfig, ISession, ITerminalOutput, ITerminalOutput as ITerminalOutput$2, IToolWithEventService, THookDefinition, THooksConfig, TModelEffort, TPermissionMode, TSessionEndReason, TToolArgs, TUniversalMessage, TUniversalValue, formatEnvReference, hasUsableSecretReference, isEnvReference, resolveEnvReference } from "@robota-sdk/agent-core";
3
+ import { IAgentBackgroundTaskRequest, IBackgroundTaskError, IBackgroundTaskHandle, IBackgroundTaskInput, IBackgroundTaskListFilter, IBackgroundTaskLogCursor, IBackgroundTaskLogPage, IBackgroundTaskManager, IBackgroundTaskManager as IBackgroundTaskManager$1, IBackgroundTaskManagerOptions, IBackgroundTaskResult, IBackgroundTaskRunner, IBackgroundTaskRunner as IBackgroundTaskRunner$1, IBackgroundTaskStart, IBackgroundTaskState, IBackgroundTaskState as IBackgroundTaskState$1, IBaseBackgroundTaskRequest, ICreateLimitedOutputCaptureOptions, ILimitedOutputCapture, IPreparedSubagentWorktree, IProcessBackgroundTaskRequest, ISerializableProviderProfile, ISubagentJobHandle, ISubagentJobResult, ISubagentJobStart, ISubagentJobState, ISubagentManager, ISubagentManagerOptions, ISubagentRunner, ISubagentRunner as ISubagentRunner$1, ISubagentSpawnRequest, ISubagentWorktreeAdapter, ISubagentWorktreePrepareRequest, IWorktreeSubagentRunnerOptions, TBackgroundPermissionPolicy, TBackgroundPermissionPolicy as TBackgroundPermissionPolicy$1, TBackgroundPrimitive, TBackgroundPrimitive as TBackgroundPrimitive$1, TBackgroundTaskErrorCategory, TBackgroundTaskEvent, TBackgroundTaskEventListener, TBackgroundTaskIdFactory, TBackgroundTaskIsolation, TBackgroundTaskIsolation as TBackgroundTaskIsolation$1, TBackgroundTaskKind, TBackgroundTaskMode, TBackgroundTaskMode as TBackgroundTaskMode$1, TBackgroundTaskRequest, TBackgroundTaskRunnerEvent, TBackgroundTaskStatus, TBackgroundTaskTimeoutReason, TBackgroundTaskTransitionEvent, TSubagentJobMode, TSubagentJobStatus } from "@robota-sdk/agent-executor";
3
4
  import { FileSessionLogger, ICompactEvent, ISessionLogger, ISessionReplayValidationResult, ITerminalOutput as ITerminalOutput$1, Session, TPermissionHandler, TPermissionResult } from "@robota-sdk/agent-session";
4
5
  import { ISandboxClient, IWorkspaceManifest, createZodFunctionTool } from "@robota-sdk/agent-tools";
5
- import { IConfigurableTransport, ITransportAdapter, ITransportAdapter as ITransportAdapter$1, ITransportConfig, ITransportRegistryView } from "@robota-sdk/agent-interface-transport";
6
6
 
7
7
  //#region src/command-api/org-policy/org-policy-types.d.ts
8
8
  interface IOrgPolicy {
@@ -21,215 +21,13 @@ declare function loadOrgPolicy(): IOrgPolicy | null;
21
21
  declare function formatOrgPolicyViolationMessage(reason: string, adminContact: string | undefined): string;
22
22
  declare function isApiKeyPlaintext(apiKey: string | undefined): boolean;
23
23
  //#endregion
24
- //#region src/capabilities/types.d.ts
25
- type TCapabilityKind = 'builtin-command' | 'skill' | 'agent' | 'tool';
26
- type TCapabilitySafety = 'read-only' | 'write' | 'process' | 'network' | 'background-agent';
27
- interface ICapabilityDescriptor {
28
- readonly name: string;
29
- readonly kind: TCapabilityKind;
30
- readonly description: string;
31
- readonly userInvocable: boolean;
32
- readonly modelInvocable: boolean;
33
- readonly argumentHint?: string;
34
- readonly safety?: TCapabilitySafety;
35
- /** When false, the projected tool is auto-approved without prompting the user. */
36
- readonly requiresPermission?: boolean;
37
- }
38
- //#endregion
39
- //#region src/command-api/types.d.ts
40
- /** A command entry */
41
- interface ICommand {
42
- /** Command name without slash (e.g., "mode") — used for invocation */
43
- name: string;
44
- /** User-friendly display label (e.g., "Interaction Mode"). Falls back to `name` if not set. */
45
- displayName?: string;
46
- /** Short description shown in autocomplete */
47
- description: string;
48
- /** Optional usage example shown in /help output (e.g., "/compact Summarize the context"). */
49
- example?: string;
50
- /** Source identifier (e.g., "builtin", "skill") */
51
- source: string;
52
- /** Subcommands for hierarchical menus */
53
- subcommands?: ICommand[];
54
- /** Execute the command. Args is everything after the command name. */
55
- execute?: (args: string) => void | Promise<void>;
56
- /** Full SKILL.md content (only for skill commands) */
57
- skillContent?: string;
58
- /** Hint for the expected argument (Claude Code frontmatter) */
59
- argumentHint?: string;
60
- /** When true, models cannot invoke this skill autonomously */
61
- disableModelInvocation?: boolean;
62
- /** When true, models may invoke this command through the SDK-projected command tool */
63
- modelInvocable?: boolean;
64
- /** When false, users cannot invoke this skill directly */
65
- userInvocable?: boolean;
66
- /** Safety category for model-visible capability descriptors */
67
- safety?: TCapabilitySafety;
68
- /** List of tools this skill is allowed to use */
69
- allowedTools?: string[];
70
- /** Preferred model for executing this skill */
71
- model?: string;
72
- /** Effort level hint for the skill */
73
- effort?: string;
74
- /** Context scope for the skill (e.g., "project") */
75
- context?: string;
76
- /** Agent identity to use when executing this skill */
77
- agent?: string;
78
- /** Plugin installation directory (plugin skills/commands only) */
79
- pluginDir?: string;
80
- }
81
- /** A source that provides commands */
82
- interface ICommandSource {
83
- name: string;
84
- getCommands(): ICommand[];
85
- }
86
- //#endregion
87
- //#region src/config/settings-io.d.ts
88
- type TSettingsData = Record<string, TUniversalValue>;
89
- declare function getUserSettingsPath(): string;
90
- type TSettingsScope = 'user' | 'project-local';
91
- declare function resolveSettingsPathForScope(cwd: string, scope: TSettingsScope | undefined): string;
92
- declare function readSettings(path: string): TSettingsData;
93
- declare function writeSettings(path: string, settings: TSettingsData): void;
94
- declare function updateModelInSettings(settingsPath: string, modelId: string): void;
95
- declare function deleteSettings(path: string): boolean;
96
- //#endregion
97
- //#region src/command-api/statusline/statusline-command-api.d.ts
98
- declare const STATUSLINE_COMMAND_DESCRIPTION = "Configure TUI status-line visibility and fields such as model, context, tokens, session, and git branch.";
99
- declare const STATUSLINE_COMMAND_ARGUMENT_HINT = "on | off | reset | git on | git off";
100
- interface IStatusLineCommandSettings {
101
- enabled: boolean;
102
- gitBranch: boolean;
103
- }
104
- type TStatusLineCommandSettingsPatch = Partial<IStatusLineCommandSettings> & Record<string, TUniversalValue>;
105
- declare const DEFAULT_STATUS_LINE_COMMAND_SETTINGS: Readonly<IStatusLineCommandSettings>;
106
- declare function buildStatusLineCommandSubcommands(source?: string): ICommand[];
107
- declare function isStatusLineCommandSettingsPatch(value: Record<string, TUniversalValue>): value is TStatusLineCommandSettingsPatch;
108
- declare function readStatusLineSettings(settings: TSettingsData): IStatusLineCommandSettings;
109
- declare function applyStatusLineSettings(settingsPath: string, patch: TStatusLineCommandSettingsPatch): IStatusLineCommandSettings;
110
- //#endregion
111
- //#region src/command-api/effects.d.ts
112
- type TCommandEffect = {
113
- type: 'provider-hot-swap-requested';
114
- profileName: string;
115
- } | {
116
- type: 'language-change-requested';
117
- language: string;
118
- } | {
119
- type: 'settings-reset-requested';
120
- } | {
121
- type: 'session-exit-requested';
122
- reason?: TSessionEndReason;
123
- message?: string;
124
- } | {
125
- type: 'session-restart-requested';
126
- reason: TSessionEndReason;
127
- message: string;
128
- } | {
129
- type: 'plugin-tui-requested';
130
- } | {
131
- type: 'plugin-registry-reload-requested';
132
- } | {
133
- type: 'settings-tui-requested';
134
- } | {
135
- type: 'session-picker-requested';
136
- } | {
137
- type: 'session-renamed';
138
- name: string;
139
- } | {
140
- type: 'conversation-history-cleared';
141
- } | {
142
- type: 'session-execution-started';
143
- } | {
144
- type: 'statusline-settings-patch';
145
- patch: TStatusLineCommandSettingsPatch;
146
- } | {
147
- type: 'agent-switcher-requested';
148
- };
149
- //#endregion
150
- //#region src/command-api/interactions.d.ts
151
- /** Choice option for command-owned follow-up prompts. */
152
- interface ICommandChoicePromptOption {
153
- value: string;
154
- label: string;
155
- }
156
- /** Generic prompt descriptor rendered by host UIs for command interactions. */
157
- type TCommandInteractionPrompt = {
158
- kind: 'choice';
159
- title: string;
160
- description?: string;
161
- options: readonly ICommandChoicePromptOption[];
162
- maxVisible?: number;
163
- } | {
164
- kind: 'text';
165
- title: string;
166
- description?: string;
167
- placeholder?: string;
168
- allowEmpty?: boolean;
169
- masked?: boolean;
170
- validate?: (value: string) => string | undefined;
171
- };
172
- /** Stateful command continuation owned by the command module. */
173
- interface ICommandInteraction {
174
- prompt: TCommandInteractionPrompt;
175
- submit(value: string): Promise<ICommandResult> | ICommandResult;
176
- cancel?(): Promise<ICommandResult> | ICommandResult;
177
- }
178
- //#endregion
179
- //#region src/command-api/command-result.d.ts
180
- type TCommandResultDataValue = TUniversalValue | Record<string, unknown> | readonly Record<string, unknown>[];
181
- /** Result of a system command execution. */
182
- interface ICommandResult {
183
- /** Human-readable output message */
184
- message: string;
185
- /** Command completed successfully */
186
- success: boolean;
187
- /** Additional structured data (command-specific diagnostics only) */
188
- data?: Record<string, unknown>;
189
- /** Typed host effects requested by the command */
190
- effects?: readonly TCommandEffect[];
191
- /** Command-owned follow-up prompt and continuation */
192
- interaction?: ICommandInteraction;
193
- }
194
- //#endregion
195
24
  //#region src/command-api/plugin/plugin-command-api.d.ts
196
25
  declare const PLUGIN_COMMAND_DESCRIPTION = "Manage plugins";
197
26
  declare const PLUGIN_COMMAND_ARGUMENT_HINT = "manage | install <name@marketplace> | uninstall <name@marketplace> | enable <name@marketplace> | disable <name@marketplace> | marketplace <action>";
198
27
  declare const RELOAD_PLUGINS_COMMAND_DESCRIPTION = "Reload all plugin resources";
199
- type TPluginInstallScope = 'user' | 'project';
200
- interface ICommandInstalledPlugin {
201
- name: string;
202
- description: string;
203
- enabled: boolean;
204
- }
205
- interface ICommandAvailablePlugin {
206
- name: string;
207
- description: string;
208
- installed: boolean;
209
- }
210
- interface ICommandMarketplaceSource {
211
- name: string;
212
- type: string;
213
- }
214
- interface ICommandPluginReloadResult {
215
- loadedPluginCount: number;
216
- }
217
- interface ICommandPluginAdapter {
218
- listInstalled(): Promise<readonly ICommandInstalledPlugin[]>;
219
- listAvailablePlugins(marketplace: string): Promise<readonly ICommandAvailablePlugin[]>;
220
- install(pluginId: string, scope?: TPluginInstallScope): Promise<void>;
221
- uninstall(pluginId: string): Promise<void>;
222
- enable(pluginId: string): Promise<void>;
223
- disable(pluginId: string): Promise<void>;
224
- marketplaceAdd(source: string): Promise<string>;
225
- marketplaceRemove(name: string): Promise<void>;
226
- marketplaceUpdate(name: string): Promise<void>;
227
- marketplaceList(): Promise<readonly ICommandMarketplaceSource[]>;
228
- reloadPlugins(): Promise<ICommandPluginReloadResult>;
229
- }
230
28
  declare function createPluginTuiRequestedEffect(): TCommandEffect;
231
29
  declare function createPluginRegistryReloadRequestedEffect(): TCommandEffect;
232
- declare function resolvePluginCommandAdapter(context: ICommandHostContext): ICommandPluginAdapter | undefined;
30
+ declare function resolvePluginCommandAdapter(context: ICommandHostContext): ICommandPluginAdapter$1 | undefined;
233
31
  declare function buildPluginCommandSubcommands(): ICommand[];
234
32
  //#endregion
235
33
  //#region src/command-api/host-adapters.d.ts
@@ -260,63 +58,11 @@ interface ICommandHostAdapters {
260
58
  }
261
59
  //#endregion
262
60
  //#region src/background-tasks/background-job-orchestrator.d.ts
263
- type TBackgroundJobWaitPolicy = 'detached' | 'wait_all' | 'wait_any' | 'manual';
264
- type TBackgroundJobGroupStatus = 'running' | 'completed';
265
- interface IBackgroundJobResultEnvelope {
266
- taskId: string;
267
- label: string;
268
- status: TBackgroundTaskStatus$1;
269
- summary?: string;
270
- outputRef?: string;
271
- error?: IBackgroundTaskError$1;
272
- startedAt?: string;
273
- completedAt?: string;
274
- }
275
- interface IBackgroundJobGroupState {
276
- id: string;
277
- parentSessionId: string;
278
- waitPolicy: TBackgroundJobWaitPolicy;
279
- taskIds: string[];
280
- status: TBackgroundJobGroupStatus;
281
- createdAt: string;
282
- updatedAt: string;
283
- label?: string;
284
- completedAt?: string;
285
- results: IBackgroundJobResultEnvelope[];
286
- }
287
- interface IBackgroundJobGroupSummary {
288
- groupId: string;
289
- status: TBackgroundJobGroupStatus;
290
- total: number;
291
- completed: number;
292
- failed: number;
293
- cancelled: number;
294
- pending: number;
295
- lines: string[];
296
- }
297
- interface IBackgroundJobGroupCreateRequest {
298
- parentSessionId: string;
299
- waitPolicy: TBackgroundJobWaitPolicy;
300
- taskIds: string[];
301
- label?: string;
302
- }
303
- type TBackgroundJobGroupEvent = {
304
- type: 'background_job_group_created';
305
- group: IBackgroundJobGroupState;
306
- } | {
307
- type: 'background_job_group_updated';
308
- group: IBackgroundJobGroupState;
309
- } | {
310
- type: 'background_job_group_completed';
311
- group: IBackgroundJobGroupState;
312
- };
313
- type TBackgroundJobGroupEventListener = (event: TBackgroundJobGroupEvent) => void;
314
- type TBackgroundJobGroupIdFactory = (request: IBackgroundJobGroupCreateRequest) => string;
315
61
  interface IBackgroundJobOrchestratorOptions {
316
62
  manager: IBackgroundTaskManager$1;
317
63
  now?: () => string;
318
- idFactory?: TBackgroundJobGroupIdFactory;
319
- initialGroups?: readonly IBackgroundJobGroupState[];
64
+ idFactory?: TBackgroundJobGroupIdFactory$1;
65
+ initialGroups?: readonly IBackgroundJobGroupState$1[];
320
66
  }
321
67
  declare class BackgroundJobOrchestrator {
322
68
  private readonly manager;
@@ -327,11 +73,11 @@ declare class BackgroundJobOrchestrator {
327
73
  private readonly groups;
328
74
  private sequence;
329
75
  constructor(options: IBackgroundJobOrchestratorOptions);
330
- createGroup(request: IBackgroundJobGroupCreateRequest): IBackgroundJobGroupState;
331
- listGroups(): IBackgroundJobGroupState[];
332
- getGroup(groupId: string): IBackgroundJobGroupState | undefined;
333
- waitGroup(groupId: string): Promise<IBackgroundJobGroupState>;
334
- subscribe(listener: TBackgroundJobGroupEventListener): () => void;
76
+ createGroup(request: IBackgroundJobGroupCreateRequest$1): IBackgroundJobGroupState$1;
77
+ listGroups(): IBackgroundJobGroupState$1[];
78
+ getGroup(groupId: string): IBackgroundJobGroupState$1 | undefined;
79
+ waitGroup(groupId: string): Promise<IBackgroundJobGroupState$1>;
80
+ subscribe(listener: TBackgroundJobGroupEventListener$1): () => void;
335
81
  dispose(): void;
336
82
  private nextGroupId;
337
83
  private restoreGroup;
@@ -342,7 +88,7 @@ declare class BackgroundJobOrchestrator {
342
88
  private evaluateCompletion;
343
89
  private emit;
344
90
  }
345
- declare function summarizeBackgroundJobGroup(group: IBackgroundJobGroupState): IBackgroundJobGroupSummary;
91
+ declare function summarizeBackgroundJobGroup(group: IBackgroundJobGroupState$1): IBackgroundJobGroupSummary$1;
346
92
  //#endregion
347
93
  //#region src/background-tasks/execution-workspace-types.d.ts
348
94
  declare const EXECUTION_ORIGIN_METADATA_KEYS: {
@@ -354,116 +100,11 @@ declare const EXECUTION_ORIGIN_METADATA_KEYS: {
354
100
  readonly skillId: "executionOriginSkillId";
355
101
  readonly label: "executionOriginLabel";
356
102
  };
357
- type TExecutionEntryKind = 'main_thread' | 'background_task' | 'background_group';
358
- type TExecutionWorkspaceStatus = 'active' | 'idle' | TBackgroundTaskStatus$1;
359
- type TExecutionAttention = 'none' | 'unread' | 'failed' | 'permission' | 'completed';
360
- type TExecutionWorkspaceVisibility = 'default' | 'collapsed';
361
- type TExecutionControl = 'select' | 'cancel' | 'close' | 'send' | 'read_log' | 'wait';
362
- type TExecutionOriginKind = 'user_prompt' | 'slash_command' | 'model_command' | 'tool_call' | 'skill' | 'transport' | 'system';
363
- type TExecutionDetailRecordKind = 'message' | 'tool_activity' | 'process_output' | 'progress' | 'result' | 'error' | 'group_summary';
364
- type TExecutionWorkspaceUpdateCause = 'main_thread' | 'background_task' | 'background_group';
365
- interface IExecutionOrigin {
366
- readonly kind: TExecutionOriginKind;
367
- readonly sessionId: string;
368
- readonly turnId?: string;
369
- readonly commandName?: string;
370
- readonly toolCallId?: string;
371
- readonly skillId?: string;
372
- readonly label?: string;
373
- }
374
- interface IExecutionWorkspaceEntry {
375
- readonly id: string;
376
- readonly sourceId: string;
377
- readonly kind: TExecutionEntryKind;
378
- readonly parentId?: string;
379
- readonly groupId?: string;
380
- readonly origin: IExecutionOrigin;
381
- readonly taskKind?: TBackgroundTaskKind$1;
382
- readonly status: TExecutionWorkspaceStatus;
383
- readonly title: string;
384
- readonly subtitle?: string;
385
- readonly preview?: string;
386
- readonly currentAction?: string;
387
- readonly unread: boolean;
388
- readonly attention: TExecutionAttention;
389
- readonly visibility: TExecutionWorkspaceVisibility;
390
- readonly updatedAt: string;
391
- readonly controls: readonly TExecutionControl[];
392
- }
393
- interface IExecutionWorkspaceFilter {
394
- readonly includeMainThread?: boolean;
395
- readonly kinds?: readonly TExecutionEntryKind[];
396
- readonly visibility?: readonly TExecutionWorkspaceVisibility[];
397
- }
398
- interface IExecutionWorkspaceSnapshot {
399
- readonly sessionId: string;
400
- readonly selectedEntryId?: string;
401
- readonly updatedAt: string;
402
- readonly entries: readonly IExecutionWorkspaceEntry[];
403
- }
404
- interface IExecutionWorkspaceSnapshotOptions {
405
- readonly selectedEntryId?: string;
406
- readonly filter?: IExecutionWorkspaceFilter;
407
- }
408
- interface IExecutionWorkspaceEvent {
409
- readonly type: 'execution_workspace_updated';
410
- readonly cause: TExecutionWorkspaceUpdateCause;
411
- readonly entryId?: string;
412
- readonly snapshot: IExecutionWorkspaceSnapshot;
413
- }
414
- interface IExecutionDetailCursor {
415
- readonly offset: number;
416
- }
417
- interface IExecutionDetailRecord {
418
- readonly id: string;
419
- readonly kind: TExecutionDetailRecordKind;
420
- readonly text: string;
421
- readonly timestamp?: string;
422
- readonly sourceId?: string;
423
- }
424
- interface IExecutionDetailPage {
425
- readonly entryId: string;
426
- readonly cursor?: IExecutionDetailCursor;
427
- readonly nextCursor?: IExecutionDetailCursor;
428
- readonly records: readonly IExecutionDetailRecord[];
429
- }
430
- interface ICreateMainThreadEntryInput {
431
- readonly sessionId: string;
432
- readonly isExecuting: boolean;
433
- readonly hasPendingPrompt: boolean;
434
- readonly historyLength: number;
435
- readonly updatedAt: string;
436
- readonly preview?: string;
437
- }
438
- interface ICreateExecutionWorkspaceSnapshotInput {
439
- readonly sessionId: string;
440
- readonly mainThread: ICreateMainThreadEntryInput;
441
- readonly tasks: readonly IBackgroundTaskState$1[];
442
- readonly groups: readonly IBackgroundJobGroupState[];
443
- readonly selectedEntryId?: string;
444
- readonly filter?: IExecutionWorkspaceFilter;
445
- }
446
- interface IExecutionWorkspaceEntryRef {
447
- readonly kind: TExecutionEntryKind;
448
- readonly sourceId: string;
449
- }
450
- interface ICreateMainThreadDetailPageInput {
451
- readonly entryId: string;
452
- readonly history: readonly IHistoryEntry[];
453
- readonly cursor?: IExecutionDetailCursor;
454
- }
455
- interface ICreateLineDetailPageInput {
456
- readonly entryId: string;
457
- readonly lines: readonly string[];
458
- readonly cursor?: IBackgroundTaskLogCursor$1;
459
- readonly nextCursor?: IBackgroundTaskLogCursor$1;
460
- readonly kind?: TExecutionDetailRecordKind;
461
- }
462
103
  declare function createMainThreadExecutionEntryId(sessionId: string): string;
463
104
  declare function createBackgroundTaskExecutionEntryId(taskId: string): string;
464
105
  declare function createBackgroundGroupExecutionEntryId(groupId: string): string;
465
- declare function parseExecutionWorkspaceEntryId(entryId: string): IExecutionWorkspaceEntryRef | undefined;
466
- declare function createExecutionOriginMetadata(origin: IExecutionOrigin): Record<string, TBackgroundPrimitive$1>;
106
+ declare function parseExecutionWorkspaceEntryId(entryId: string): IExecutionWorkspaceEntryRef$1 | undefined;
107
+ declare function createExecutionOriginMetadata(origin: IExecutionOrigin$1): Record<string, TBackgroundPrimitive$1>;
467
108
  //#endregion
468
109
  //#region src/background-tasks/execution-workspace-projection.d.ts
469
110
  declare function createExecutionWorkspaceSnapshot(input: ICreateExecutionWorkspaceSnapshotInput): IExecutionWorkspaceSnapshot;
@@ -612,21 +253,12 @@ declare class EditCheckpointStore {
612
253
  declare function wrapEditCheckpointTools(tools: readonly IToolWithEventService[], recorder: IEditCheckpointRecorder): IToolWithEventService[];
613
254
  //#endregion
614
255
  //#region src/context/prompt-file-reference-types.d.ts
615
- type TPromptFileReferenceReason = 'manual' | 'prompt-reference';
616
256
  type TPromptFileReferenceDiagnosticCode = 'not-found' | 'outside-root' | 'directory-not-supported' | 'file-too-large' | 'total-too-large' | 'too-many-references' | 'max-depth' | 'circular-reference' | 'unreadable';
617
257
  interface IPromptFileReferenceToken {
618
258
  original: string;
619
259
  path: string;
620
260
  index: number;
621
261
  }
622
- interface IPromptFileReferenceRecord {
623
- originalReference: string;
624
- sourcePath: string;
625
- relativePath: string;
626
- reason: TPromptFileReferenceReason;
627
- depth: number;
628
- byteLength: number;
629
- }
630
262
  interface IResolvedPromptFileReference extends IPromptFileReferenceRecord {
631
263
  content: string;
632
264
  }
@@ -659,19 +291,6 @@ interface IPromptFileReferenceHistoryData {
659
291
  }
660
292
  //#endregion
661
293
  //#region src/context/context-reference-inventory.d.ts
662
- type TContextReferenceLoadType = 'manual' | 'prompt-reference' | 'system';
663
- type TContextReferenceStatus = 'active' | 'observed';
664
- interface IContextReferenceItem {
665
- id: string;
666
- sourcePath: string;
667
- relativePath: string;
668
- originalReference: string;
669
- loadType: TContextReferenceLoadType;
670
- status: TContextReferenceStatus;
671
- byteLength: number;
672
- loadedAt: string;
673
- lastUsedAt?: string;
674
- }
675
294
  interface IContextReferenceInventoryLimits {
676
295
  maxActiveReferences?: number;
677
296
  maxActiveBytes?: number;
@@ -705,7 +324,6 @@ declare function toContextReferenceRecords(references: readonly IContextReferenc
705
324
  //#region src/memory/project-memory-store.d.ts
706
325
  declare const MEMORY_INDEX_MAX_LINES = 200;
707
326
  declare const MEMORY_INDEX_MAX_BYTES: number;
708
- type TMemoryType = 'user' | 'feedback' | 'project' | 'reference';
709
327
  interface IStartupMemory {
710
328
  content: string;
711
329
  path: string;
@@ -762,20 +380,6 @@ interface IMemoryPendingRecord extends IMemoryCandidate {
762
380
  updatedAt: string;
763
381
  decisionReason?: string;
764
382
  }
765
- interface IMemoryReference {
766
- topic: string;
767
- path: string;
768
- score: number;
769
- truncated: boolean;
770
- }
771
- interface IMemoryEvent {
772
- type: 'memory_candidate_extracted' | 'memory_candidate_queued' | 'memory_candidate_saved' | 'memory_candidate_skipped' | 'memory_candidate_approved' | 'memory_candidate_rejected' | 'memory_retrieved';
773
- at: string;
774
- candidateId?: string;
775
- topic?: string;
776
- reason?: string;
777
- data?: Record<string, TUniversalValue>;
778
- }
779
383
  //#endregion
780
384
  //#region src/agents/agent-definition-types.d.ts
781
385
  /**
@@ -985,14 +589,6 @@ declare function removeCommandContextReference(context: ICommandHostContext, pat
985
589
  declare function clearCommandContextReferences(context: ICommandHostContext): IContextReferenceClearResult;
986
590
  //#endregion
987
591
  //#region src/command-api/host-context.d.ts
988
- interface ICommandListEntry {
989
- name: string;
990
- /** User-friendly display label. Falls back to `name` if not set. */
991
- displayName?: string;
992
- description: string;
993
- /** Optional usage example shown in /help output (e.g., "/compact Summarize the context"). */
994
- example?: string;
995
- }
996
592
  interface ICommandSkillListEntry {
997
593
  readonly name: string;
998
594
  readonly description: string;
@@ -1010,6 +606,16 @@ interface ICommandSkillActivationRequest {
1010
606
  readonly rawInput?: string;
1011
607
  }
1012
608
  type TAutoCompactThresholdSource = 'default' | 'settings' | 'session';
609
+ /**
610
+ * Live model re-application options (PRESET-013). Carries the model group a preset switch may
611
+ * re-apply to a running session; `maxOutputTokens` maps to the agent's `maxTokens` channel.
612
+ */
613
+ interface IModelReapplyOptions {
614
+ model?: string;
615
+ effort?: TModelEffort;
616
+ temperature?: number;
617
+ maxOutputTokens?: number;
618
+ }
1013
619
  interface ICommandSessionRuntime {
1014
620
  clearHistory(): void;
1015
621
  compact(instructions?: string): Promise<void>;
@@ -1028,6 +634,14 @@ interface ICommandSessionRuntime {
1028
634
  outputTokens: number;
1029
635
  } | undefined;
1030
636
  getModelId?(): string | undefined;
637
+ /** Re-apply model/effort/temperature/maxOutputTokens to the live session (PRESET-013). */
638
+ applyModelOptions?(options: IModelReapplyOptions): void;
639
+ /** Read the active preset id (PRESET-011 runtime state). */
640
+ getActivePresetId?(): string;
641
+ /** Set the active preset id (PRESET-011 runtime state — pure state, no option re-application). */
642
+ setActivePresetId?(id: string): void;
643
+ /** Toggle subagent dispatch live for the running session (PRESET-016 runtime gate). */
644
+ setParallelSubagentsEnabled?(enabled: boolean): void;
1031
645
  }
1032
646
  interface ICommandSessionReplayValidationReport {
1033
647
  logFile: string;
@@ -1039,6 +653,12 @@ interface ICommandHostContext {
1039
653
  validateCurrentSessionReplayLog?(): ICommandSessionReplayValidationReport;
1040
654
  getAgentJobCapability?(): IAgentJobHostContext | undefined;
1041
655
  getSession(): ICommandSessionRuntime;
656
+ /** PRESET-014 — re-apply a preset persona to the live system prompt. */
657
+ applyPersona?(persona: string): void;
658
+ /** PRESET-017 — toggle the verify-before-done self-verification section on the live prompt. */
659
+ applySelfVerification?(enabled: boolean): void;
660
+ /** PRESET-015 — re-apply command-module selection to the live session. */
661
+ applyCommandModuleSelection?(enabled: readonly string[] | undefined, disabled: readonly string[] | undefined): void;
1042
662
  getContextState(): IContextWindowState;
1043
663
  getAutoCompactThreshold(): TAutoCompactThreshold;
1044
664
  getAutoCompactThresholdSource?(): TAutoCompactThresholdSource;
@@ -1084,6 +704,26 @@ interface IAgentJobHostContext {
1084
704
  closeAgentJob(jobId: string): Promise<void>;
1085
705
  createBackgroundJobGroup(input: Omit<IBackgroundJobGroupCreateRequest, 'parentSessionId'>): IBackgroundJobGroupState;
1086
706
  waitBackgroundJobGroup(groupId: string): Promise<IBackgroundJobGroupState>;
707
+ /**
708
+ * FLOW-005: schedule a recurring/one-shot agent wake. On each cron fire the agent loop
709
+ * re-enters with `agentInstruction` (FLOW-001/002). `cronExpression` may be a standard cron
710
+ * string or an ISO timestamp (one-shot).
711
+ */
712
+ spawnScheduledWake(input: {
713
+ label: string;
714
+ cronExpression: string;
715
+ agentInstruction: string;
716
+ }): Promise<IBackgroundTaskState>;
717
+ /**
718
+ * FLOW-005: monitor a process's output and wake the agent with `agentInstruction` when a
719
+ * line matches `matchPattern` (FLOW-004).
720
+ */
721
+ spawnMonitorWake(input: {
722
+ label: string;
723
+ command: string;
724
+ matchPattern: string;
725
+ agentInstruction: string;
726
+ }): Promise<IBackgroundTaskState>;
1087
727
  readBackgroundTaskLog(taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
1088
728
  }
1089
729
  //#endregion
@@ -1113,89 +753,6 @@ interface ISystemCommand {
1113
753
  execute(context: ICommandHostContext, args: string): Promise<ICommandResult> | ICommandResult;
1114
754
  }
1115
755
  //#endregion
1116
- //#region src/interaction/types.d.ts
1117
- /** One-way display events pushed by the framework to the channel. */
1118
- type InteractionEvent = {
1119
- type: 'user-message';
1120
- text: string;
1121
- } | {
1122
- type: 'assistant-chunk';
1123
- chunk: string;
1124
- } | {
1125
- type: 'assistant-done';
1126
- fullText: string;
1127
- } | {
1128
- type: 'tool-call';
1129
- id: string;
1130
- name: string;
1131
- args: unknown;
1132
- } | {
1133
- type: 'tool-result';
1134
- id: string;
1135
- name: string;
1136
- result: unknown;
1137
- } | {
1138
- type: 'permission-request';
1139
- request: IPermissionRequest;
1140
- } | {
1141
- type: 'permission-resolved';
1142
- id: string;
1143
- granted: boolean;
1144
- } | {
1145
- type: 'command-result';
1146
- name: string;
1147
- output: string;
1148
- } | {
1149
- type: 'error';
1150
- error: Error;
1151
- };
1152
- /** Framework-level permission request (id used to correlate with permission-resolved). */
1153
- interface IPermissionRequest {
1154
- id: string;
1155
- toolName: string;
1156
- toolArgs: unknown;
1157
- }
1158
- /** Request-response contract for disambiguation dialogs. */
1159
- type IActionRequest = {
1160
- type: 'pick';
1161
- id: string;
1162
- title: string;
1163
- items: IPickItem[];
1164
- defaultIndex?: number;
1165
- } | {
1166
- type: 'confirm';
1167
- id: string;
1168
- message: string;
1169
- defaultValue?: boolean;
1170
- };
1171
- type IActionResponse = {
1172
- type: 'pick';
1173
- item: IPickItem;
1174
- } | {
1175
- type: 'confirm';
1176
- confirmed: boolean;
1177
- } | {
1178
- type: 'cancelled';
1179
- };
1180
- interface IPickItem {
1181
- label: string;
1182
- value: string;
1183
- description?: string;
1184
- }
1185
- interface ICommandInfo {
1186
- name: string;
1187
- description: string;
1188
- subcommands?: ICommandInfo[];
1189
- }
1190
- /** Declared by command modules; consumed by createInteractiveRuntime to call requestAction. */
1191
- type ICommandInteractionHint = {
1192
- type: 'pick';
1193
- getItems(): IPickItem[];
1194
- } | {
1195
- type: 'confirm';
1196
- message: string;
1197
- };
1198
- //#endregion
1199
756
  //#region src/command-api/command-module.d.ts
1200
757
  type TCommandModuleSessionRequirement = 'agent-runtime';
1201
758
  /** Composable command capability module. */
@@ -1248,6 +805,8 @@ interface IProviderSetupPatch {
1248
805
  }
1249
806
  interface IProviderSettingsBuildOptions {
1250
807
  providerDefinitions?: readonly IProviderDefinition[];
808
+ /** Environment map for configure-time checks (test seam, default: process.env). */
809
+ env?: Record<string, string | undefined>;
1251
810
  }
1252
811
  declare function upsertProviderProfile(settings: TProviderSettingsDocument, profileName: string, profile: IProviderProfileSettings): TProviderSettingsDocument;
1253
812
  declare function setCurrentProvider(settings: TProviderSettingsDocument, profileName: string): TProviderSettingsDocument;
@@ -1321,8 +880,24 @@ declare function resolveActiveProvider(settings: TProviderSettingsDocument, prov
1321
880
  interface IReadProviderSettingsOptions {
1322
881
  providerOverride?: string;
1323
882
  providerDefinitions?: readonly IProviderDefinition[];
883
+ /** Environment map for env-default synthesis (test seam, default: process.env). */
884
+ env?: Record<string, string | undefined>;
885
+ }
886
+ /**
887
+ * Missing or unusable provider configuration at session start.
888
+ * Typed so callers can map it to a distinct exit code without message matching.
889
+ */
890
+ declare class ProviderConfigError extends Error {
891
+ constructor(message: string);
1324
892
  }
1325
893
  declare function readMergedProviderSettings(cwd: string): TProviderSettingsDocument;
894
+ /**
895
+ * Zero-config fallback: synthesize an in-memory provider config from the first
896
+ * definition (in order) whose defaults are complete — `$ENV:` apiKey reference with the
897
+ * referenced variable set, plus a default model. Settings profiles always win; nothing
898
+ * is persisted. Returns undefined when no definition qualifies.
899
+ */
900
+ declare function resolveEnvDefaultProvider(providerDefinitions: readonly IProviderDefinition[], env?: Record<string, string | undefined>): IProviderConfig | undefined;
1326
901
  declare function readProviderSettings(cwd: string, options?: IReadProviderSettingsOptions): IProviderConfig;
1327
902
  declare function createProviderFromSettings(cwd: string, modelOverride?: string, options?: IReadProviderSettingsOptions): IAIProvider;
1328
903
  //#endregion
@@ -1383,6 +958,84 @@ declare function listCommandSessionAllowedTools(context: ICommandHostContext): r
1383
958
  declare function readCommandPermissionsState(context: ICommandHostContext): IPermissionsCommandState;
1384
959
  declare function formatCommandPermissionsMessage(state: IPermissionsCommandState): string;
1385
960
  //#endregion
961
+ //#region src/command-api/preset/preset-application.d.ts
962
+ /**
963
+ * Resolved-preset option subset that can be re-applied to a *live* session.
964
+ *
965
+ * This is a framework-owned shape. The agent-preset package's `TResolvedPresetOptions` satisfies it
966
+ * structurally, so a consumer can hand a `resolvePreset(...)` result straight to
967
+ * {@link applyPresetToSession} without framework importing agent-preset (no dependency cycle).
968
+ *
969
+ * PRESET-012 carries the permission/trust group (`permissionMode`); PRESET-013 adds the model group
970
+ * (`model`, `effort`, `temperature`, `maxOutputTokens`); PRESET-014 adds the `persona` block,
971
+ * re-applied to the live system prompt; PRESET-015 adds the command-module selection group
972
+ * (`enabledCommandModules`/`disabledCommandModules`), re-filtered against the session-start set.
973
+ */
974
+ interface IPresetApplicationOptions {
975
+ permissionMode?: TPermissionMode;
976
+ model?: string;
977
+ effort?: TModelEffort;
978
+ temperature?: number;
979
+ maxOutputTokens?: number;
980
+ /** PRESET-014 — preset persona re-applied to the live system prompt. */
981
+ persona?: string;
982
+ /** PRESET-015 — allowlist of command-module names to keep on the live session. */
983
+ enabledCommandModules?: readonly string[];
984
+ /** PRESET-015 — denylist of command-module names to remove from the live session. */
985
+ disabledCommandModules?: readonly string[];
986
+ /** PRESET-016 — runtime gate toggle for subagent dispatch on the live session. */
987
+ enableParallelSubagents?: boolean;
988
+ /** PRESET-017 — toggle the verify-before-done self-verification section on the live prompt. */
989
+ selfVerification?: boolean;
990
+ }
991
+ /** Outcome of {@link applyPresetToSession}: which option groups were re-applied vs. skipped. */
992
+ interface IPresetApplicationResult {
993
+ /** Option-group keys whose value was present and applied to the live session. */
994
+ readonly applied: readonly string[];
995
+ /** Option-group keys absent from the resolved options (left untouched). */
996
+ readonly skipped: readonly string[];
997
+ }
998
+ /**
999
+ * Re-apply a resolved preset to a live session and record it as the active preset.
1000
+ *
1001
+ * This is the single entry point for live preset switching. It first records the active preset id
1002
+ * (PRESET-011 runtime state) — the runtime's `setActivePresetId` is optional, so it is invoked
1003
+ * defensively. It then re-applies each option group it owns; PRESET-012 applies the permission
1004
+ * posture via the existing `writeCommandPermissionMode` seam, and PRESET-013 re-applies the model
1005
+ * group (`model`/`effort`/`temperature`/`maxOutputTokens`) via the runtime's optional
1006
+ * `applyModelOptions`. PRESET-014 re-applies the `persona` group via the host context's optional
1007
+ * `applyPersona` seam. PRESET-015 re-applies the command-module selection group via the host
1008
+ * context's optional `applyCommandModuleSelection` seam. PRESET-016 toggles the parallel-subagents
1009
+ * runtime gate via the runtime's optional `setParallelSubagentsEnabled` seam. PRESET-017 toggles
1010
+ * the verify-before-done self-verification section via the host context's optional
1011
+ * `applySelfVerification` seam. Groups absent from `options` are left untouched and reported under
1012
+ * `skipped`.
1013
+ */
1014
+ declare function applyPresetToSession(context: ICommandHostContext, presetId: string, options: IPresetApplicationOptions): IPresetApplicationResult;
1015
+ //#endregion
1016
+ //#region src/config/settings-io.d.ts
1017
+ type TSettingsData = Record<string, TUniversalValue>;
1018
+ declare function getUserSettingsPath(): string;
1019
+ type TSettingsScope = 'user' | 'project-local';
1020
+ declare function resolveSettingsPathForScope(cwd: string, scope: TSettingsScope | undefined): string;
1021
+ /**
1022
+ * CLI-069: missing file → empty defaults (non-error); an EXISTING file that
1023
+ * fails to parse throws SettingsParseError — no warn-and-continue masking.
1024
+ */
1025
+ declare function readSettings(path: string): TSettingsData;
1026
+ declare function writeSettings(path: string, settings: TSettingsData): void;
1027
+ declare function updateModelInSettings(settingsPath: string, modelId: string): void;
1028
+ declare function deleteSettings(path: string): boolean;
1029
+ //#endregion
1030
+ //#region src/command-api/statusline/statusline-command-api.d.ts
1031
+ declare const STATUSLINE_COMMAND_DESCRIPTION = "Configure TUI status-line visibility and fields such as model, context, tokens, session, and git branch.";
1032
+ declare const STATUSLINE_COMMAND_ARGUMENT_HINT = "on | off | reset | git on | git off";
1033
+ declare const DEFAULT_STATUS_LINE_COMMAND_SETTINGS: Readonly<IStatusLineCommandSettings>;
1034
+ declare function buildStatusLineCommandSubcommands(source?: string): ICommand[];
1035
+ declare function isStatusLineCommandSettingsPatch(value: Record<string, TUniversalValue>): value is TStatusLineCommandSettingsPatch;
1036
+ declare function readStatusLineSettings(settings: TSettingsData): IStatusLineCommandSettings;
1037
+ declare function applyStatusLineSettings(settingsPath: string, patch: TStatusLineCommandSettingsPatch): IStatusLineCommandSettings;
1038
+ //#endregion
1386
1039
  //#region src/command-api/session/session-command-api.d.ts
1387
1040
  declare const CLEAR_COMMAND_DESCRIPTION = "Clear conversation history";
1388
1041
  declare const RENAME_COMMAND_DESCRIPTION = "Rename the current session";
@@ -1826,6 +1479,8 @@ declare class SystemCommandExecutor {
1826
1479
  constructor(commands?: ISystemCommand[]);
1827
1480
  /** Register an additional command. */
1828
1481
  register(command: ISystemCommand): void;
1482
+ /** Replace the entire command set (used by live preset command-module re-selection — PRESET-015). */
1483
+ replaceCommands(commands: readonly ISystemCommand[]): void;
1829
1484
  /** Execute a command by name. Returns null if command not found. */
1830
1485
  execute(name: string, session: ICommandHostContext, args: string): Promise<ICommandResult | null>;
1831
1486
  getCommand(name: string): ISystemCommand | undefined;
@@ -1912,21 +1567,6 @@ interface ISkillExecutionResult {
1912
1567
  declare function executeSkill(skill: ICommand, args: string, callbacks: ISkillExecutionCallbacks, context?: SkillPromptContext): Promise<ISkillExecutionResult>;
1913
1568
  //#endregion
1914
1569
  //#region src/commands/skill-activation-events.d.ts
1915
- type TSkillActivationSource = 'skill' | 'plugin';
1916
- type TSkillActivationInvocation = 'user-slash' | 'model-tool';
1917
- type TSkillActivationMode = 'inject' | 'fork';
1918
- type TSkillActivationStatus = 'started' | 'completed' | 'failed';
1919
- interface ISkillActivationEvent {
1920
- readonly type: 'skill-activation';
1921
- readonly skillName: string;
1922
- readonly source: TSkillActivationSource;
1923
- readonly invocation: TSkillActivationInvocation;
1924
- readonly mode: TSkillActivationMode;
1925
- readonly status: TSkillActivationStatus;
1926
- readonly timestamp: string;
1927
- readonly qualifiedName?: string;
1928
- readonly error?: string;
1929
- }
1930
1570
  interface ISkillActivationHistoryData extends ISkillActivationEvent {
1931
1571
  readonly message: string;
1932
1572
  }
@@ -1944,6 +1584,8 @@ declare class SessionBackgroundTaskTracker {
1944
1584
  private readonly emitTaskEvent;
1945
1585
  private readonly emitGroupEvent;
1946
1586
  private readonly persistSession;
1587
+ private readonly onWake?;
1588
+ private readonly appendSystemNote?;
1947
1589
  private backgroundTasks;
1948
1590
  private backgroundTaskEvents;
1949
1591
  private backgroundJobGroups;
@@ -1951,8 +1593,13 @@ declare class SessionBackgroundTaskTracker {
1951
1593
  private backgroundTaskUnsubscribe;
1952
1594
  private backgroundJobUnsubscribe;
1953
1595
  private backgroundJobOrchestrator;
1954
- constructor(getManager: () => IBackgroundTaskManager | undefined, onChanged: (cause: TExecutionWorkspaceUpdateCause, entryId?: string) => void, emitTaskEvent: (event: TBackgroundTaskEvent) => void, emitGroupEvent: (event: TBackgroundJobGroupEvent) => void, persistSession: () => void);
1596
+ constructor(getManager: () => IBackgroundTaskManager | undefined, onChanged: (cause: TExecutionWorkspaceUpdateCause, entryId?: string) => void, emitTaskEvent: (event: TBackgroundTaskEvent) => void, emitGroupEvent: (event: TBackgroundJobGroupEvent) => void, persistSession: () => void, onWake?: ((instruction: string, taskId: string) => void) | undefined, appendSystemNote?: ((message: string) => void) | undefined);
1955
1597
  subscribe(session: Session): void;
1598
+ /**
1599
+ * FLOW-003: re-spawn restored sleeping scheduled wakes so they fire again after a resume,
1600
+ * and surface a one-time note for any whose fire time elapsed while the CLI was closed.
1601
+ */
1602
+ private reArmRestoredSchedules;
1956
1603
  dispose(): void;
1957
1604
  restoreState(state: IBackgroundTrackerState): void;
1958
1605
  getState(): IBackgroundTrackerState;
@@ -1989,6 +1636,8 @@ interface IAgentToolDeps extends IInProcessSubagentRunnerDeps {
1989
1636
  customAgentRegistry?: (name: string) => IAgentDefinition | undefined;
1990
1637
  /** Model-visible and command-visible agent definitions available to this session. */
1991
1638
  agentDefinitions?: IAgentDefinition[];
1639
+ /** PRESET-016 — runtime gate; when present and returns false, subagent dispatch is refused. */
1640
+ isParallelSubagentsEnabled?: () => boolean;
1992
1641
  }
1993
1642
  /** Store agent tool deps keyed by a session (or any object). */
1994
1643
  declare function storeAgentToolDeps(key: object, deps: IAgentToolDeps): void;
@@ -2039,6 +1688,7 @@ declare class SessionHistoryTracker {
2039
1688
  private readonly getExecuting;
2040
1689
  private readonly persistSession;
2041
1690
  private readonly emitSkillActivation;
1691
+ private readonly emitMemoryEvent;
2042
1692
  private history;
2043
1693
  private editCheckpointStore;
2044
1694
  private memoryEvents;
@@ -2046,7 +1696,7 @@ declare class SessionHistoryTracker {
2046
1696
  private contextReferences;
2047
1697
  private systemContextReferences;
2048
1698
  private skillActivationEvents;
2049
- constructor(cwd: string, getSessionId: () => string, getExecuting: () => boolean, persistSession: () => void, emitSkillActivation: (event: ISkillActivationEvent) => void, editCheckpointStore?: EditCheckpointStore | null);
1699
+ constructor(cwd: string, getSessionId: () => string, getExecuting: () => boolean, persistSession: () => void, emitSkillActivation: (event: ISkillActivationEvent) => void, emitMemoryEvent: (event: IMemoryEvent) => void, editCheckpointStore?: EditCheckpointStore | null);
2050
1700
  restoreState(state: IHistoryTrackerState): void;
2051
1701
  getState(): IHistoryTrackerState;
2052
1702
  append(entry: IHistoryEntry): void;
@@ -2076,119 +1726,11 @@ declare class SessionHistoryTracker {
2076
1726
  }
2077
1727
  //#endregion
2078
1728
  //#region src/interactive/session-persistence.d.ts
2079
- interface IInteractiveSessionRecord {
2080
- id: string;
2081
- name?: string;
2082
- cwd: string;
2083
- createdAt: string;
2084
- updatedAt: string;
2085
- messages: TUniversalMessage[];
2086
- history?: IHistoryEntry[];
2087
- systemPrompt?: string;
2088
- toolSchemas?: IToolSchema[];
2089
- backgroundTasks?: IBackgroundTaskState[];
2090
- backgroundTaskEvents?: TBackgroundTaskEvent[];
2091
- backgroundJobGroups?: IBackgroundJobGroupState[];
2092
- backgroundJobGroupEvents?: TBackgroundJobGroupEvent[];
2093
- skillActivationEvents?: ISkillActivationEvent[];
2094
- memoryEvents?: IMemoryEvent[];
2095
- usedMemoryReferences?: IMemoryReference[];
2096
- contextReferences?: IContextReferenceItem[];
2097
- sandboxSnapshotId?: string;
2098
- }
2099
- interface IInteractiveSessionStore {
2100
- save(session: IInteractiveSessionRecord): void;
2101
- load(id: string): IInteractiveSessionRecord | undefined;
2102
- list(): IInteractiveSessionRecord[];
2103
- delete(id: string): void;
2104
- }
2105
- interface IResumableSessionSummary {
2106
- id: string;
2107
- name?: string;
2108
- cwd: string;
2109
- updatedAt: string;
2110
- messageCount: number;
2111
- preview: string;
2112
- }
2113
1729
  declare function createProjectSessionStore(cwd: string, fs?: IFileSystem): IInteractiveSessionStore;
2114
1730
  declare function listResumableSessionSummaries(sessionStore: IInteractiveSessionStore | undefined, cwd: string): IResumableSessionSummary[];
2115
1731
  declare function resolveLatestSessionId(sessionStore: IInteractiveSessionStore | undefined, cwd: string): string | undefined;
2116
1732
  declare function resolveSessionIdByIdOrName(sessionStore: IInteractiveSessionStore | undefined, idOrName: string): string | undefined;
2117
1733
  //#endregion
2118
- //#region src/interactive/types.d.ts
2119
- /** Permission handler result — SDK-owned type (mirrors agent-sessions TPermissionResult).
2120
- * true = allow, false = deny, 'allow-session' = allow and remember for this session,
2121
- * 'allow-project' = allow and persist to .robota/settings.local.json. */
2122
- type TPermissionResultValue = boolean | 'allow-session' | 'allow-project';
2123
- /** Tool execution state visible to clients. */
2124
- interface IToolState {
2125
- toolName: string;
2126
- firstArg: string;
2127
- isRunning: boolean;
2128
- result?: 'success' | 'error' | 'denied';
2129
- diffLines?: IDiffLine[];
2130
- diffFile?: string;
2131
- toolResultData?: string;
2132
- executionId?: string;
2133
- }
2134
- /** A single diff line for Edit tool display. */
2135
- interface IDiffLine {
2136
- type: 'add' | 'remove' | 'context' | 'hunk';
2137
- text: string;
2138
- lineNumber: number;
2139
- }
2140
- interface IUsageSnapshot {
2141
- kind: 'exact' | 'estimated';
2142
- scope: 'turn';
2143
- totalTokens: number;
2144
- promptTokens?: number;
2145
- completionTokens?: number;
2146
- contextUsedTokens: number;
2147
- contextMaxTokens: number;
2148
- contextUsedPercentage: number;
2149
- costStatus: 'unknown' | 'estimated' | 'exact';
2150
- }
2151
- /** Result of a completed prompt execution. */
2152
- interface IExecutionResult {
2153
- response: string;
2154
- history: IHistoryEntry[];
2155
- toolSummaries: IToolSummary[];
2156
- contextState: IContextWindowState;
2157
- usage?: IUsageSnapshot;
2158
- promptFileReferences?: IPromptFileReferenceRecord[];
2159
- }
2160
- /** Summary of a tool call extracted from history. */
2161
- interface IToolSummary {
2162
- name: string;
2163
- args: string;
2164
- }
2165
- /** Permission handler delegate — clients provide their own UI. */
2166
- type TInteractivePermissionHandler = (toolName: string, toolArgs: TToolArgs) => Promise<TPermissionResultValue>;
2167
- /** Events emitted by InteractiveSession. */
2168
- interface IInteractiveSessionEvents {
2169
- text_delta: (delta: string) => void;
2170
- tool_start: (state: IToolState) => void;
2171
- tool_end: (state: IToolState) => void;
2172
- thinking: (isThinking: boolean) => void;
2173
- complete: (result: IExecutionResult) => void;
2174
- error: (error: Error) => void;
2175
- context_update: (state: IContextWindowState) => void;
2176
- compact: (event: ICompactEvent) => void;
2177
- interrupted: (result: IExecutionResult) => void;
2178
- skill_activation: (event: ISkillActivationEvent) => void;
2179
- background_task_event: (event: TBackgroundTaskEvent) => void;
2180
- background_job_group_event: (event: TBackgroundJobGroupEvent) => void;
2181
- execution_workspace_event: (event: IExecutionWorkspaceEvent) => void;
2182
- user_message: (content: string) => void;
2183
- /** Emitted when a context file (AGENTS.md or CLAUDE.md) is refreshed due to staleness. */
2184
- context_file_refreshed: (event: IContextFileRefreshedEvent) => void;
2185
- }
2186
- /** Emitted when a context file is found stale and re-read before a turn. */
2187
- interface IContextFileRefreshedEvent {
2188
- filePath: string;
2189
- }
2190
- type TInteractiveEventName = keyof IInteractiveSessionEvents;
2191
- //#endregion
2192
1734
  //#region src/context/project-detector.d.ts
2193
1735
  type TProjectType = 'node' | 'python' | 'rust' | 'go' | 'unknown';
2194
1736
  type TPackageManager = 'pnpm' | 'yarn' | 'npm' | 'bun';
@@ -2202,6 +1744,16 @@ interface IProjectInfo {
2202
1744
  //#endregion
2203
1745
  //#region src/context/system-prompt-builder.d.ts
2204
1746
  interface ISystemPromptParams {
1747
+ /**
1748
+ * Preset persona block (portable personality/behaviour). When set and non-blank it is
1749
+ * composed as a `source: 'persona'` section with priority 5; empty/undefined adds no section.
1750
+ */
1751
+ persona?: string;
1752
+ /**
1753
+ * PRESET-017: when true, a concise verify-before-done directive is composed as a
1754
+ * `source: 'self-verification'` section with priority 6; false/undefined adds no section.
1755
+ */
1756
+ selfVerification?: boolean;
2205
1757
  /** Concatenated AGENTS.md content (may be empty string) */
2206
1758
  agentsMd: string;
2207
1759
  /** Concatenated CLAUDE.md content (may be empty string) */
@@ -2212,8 +1764,8 @@ interface ISystemPromptParams {
2212
1764
  taskContext?: string;
2213
1765
  /** Human-readable tool descriptions, one per entry */
2214
1766
  toolDescriptions: string[];
2215
- /** Active trust level governing permission checks */
2216
- trustLevel: TTrustLevel;
1767
+ /** Active permission mode — the value the permission gate enforces */
1768
+ permissionMode: TPermissionMode;
2217
1769
  /** Detected project metadata */
2218
1770
  projectInfo: IProjectInfo;
2219
1771
  /** Current working directory */
@@ -2346,6 +1898,18 @@ interface ICreateSessionOptions {
2346
1898
  subagentRunnerFactory?: TSubagentRunnerFactory;
2347
1899
  /** Enable agent tool, agent definitions, and subagent runtime wiring for this session. */
2348
1900
  enableAgentRuntime?: boolean;
1901
+ /**
1902
+ * Preset execution capability: when true the assembly turns on `enableAgentRuntime`
1903
+ * so subagent/background dispatch is active for this session. Threaded from the
1904
+ * preset's `enableParallelSubagents` flag.
1905
+ */
1906
+ enableParallelSubagents?: boolean;
1907
+ /**
1908
+ * Preset execution capability: when true the framework composes a verify-before-done
1909
+ * self-verification section into the system prompt (PRESET-017), as a normal
1910
+ * priority-sorted `source: 'self-verification'` section.
1911
+ */
1912
+ selfVerification?: boolean;
2349
1913
  /** Callback when a tool starts or finishes execution — enables real-time tool display in UI */
2350
1914
  onToolExecution?: (event: {
2351
1915
  type: 'start' | 'end';
@@ -2384,8 +1948,17 @@ interface ICreateSessionOptions {
2384
1948
  deniedTools?: string[];
2385
1949
  /** Override the model from config. When set, takes precedence over config.provider.model. */
2386
1950
  model?: string;
1951
+ /**
1952
+ * Reasoning-effort dial for this session, threaded to the provider request builder.
1953
+ * Resolved from a preset's `effort` (PRESET-008). When unset, the framework→provider
1954
+ * seam defaults it to `'high'`. Native-effort providers map it onto their request
1955
+ * parameter; providers without native effort ignore it as a documented no-op.
1956
+ */
1957
+ effort?: TModelEffort;
2387
1958
  /** Text to append to the generated system prompt. */
2388
1959
  appendSystemPrompt?: string;
1960
+ /** Preset persona block composed as a `source: 'persona'` system-prompt section (priority 5). */
1961
+ persona?: string;
2389
1962
  /** Model command execution bridge. */
2390
1963
  modelCommandExecutor?: (command: string, args: string) => Promise<ICommandResult | null>;
2391
1964
  /** Predicate for commands allowed through the model command execution bridge. */
@@ -2400,11 +1973,28 @@ interface ICreateSessionOptions {
2400
1973
  sandboxClient?: ISandboxClient;
2401
1974
  /** Name reported to the underlying Robota agent config. Defaults to 'agent'. */
2402
1975
  agentName?: string;
1976
+ /** Active preset id selected at startup (PRESET-011 runtime state). Defaults to 'default'. */
1977
+ activePresetId?: string;
2403
1978
  /** Request structured output from the provider for this session. */
2404
1979
  responseFormat?: {
2405
1980
  type: 'text' | 'json_object';
2406
1981
  };
2407
1982
  }
1983
+ /** Result of createSession — session instance plus a system-message rebuilder for context refresh. */
1984
+ interface ICreateSessionResult {
1985
+ session: Session;
1986
+ /**
1987
+ * Rebuild the system message using updated context strings.
1988
+ * Called by staleness detection when AGENTS.md or CLAUDE.md files change between turns.
1989
+ * PRESET-014: an optional `overrides.persona` re-applies a preset persona to the live prompt;
1990
+ * PRESET-017: an optional `overrides.selfVerification` toggles the verify-before-done section.
1991
+ * Either override is retained for subsequent (override-less) rebuilds.
1992
+ */
1993
+ rebuildSystemMessage: (agentsMd: string, claudeMd: string, overrides?: {
1994
+ persona?: string;
1995
+ selfVerification?: boolean;
1996
+ }) => string;
1997
+ }
2408
1998
  //#endregion
2409
1999
  //#region src/assembly/create-tools.d.ts
2410
2000
  /**
@@ -2501,6 +2091,8 @@ interface IInteractiveSessionStandardOptions {
2501
2091
  model?: string;
2502
2092
  /** Text to append to the system prompt. */
2503
2093
  appendSystemPrompt?: string;
2094
+ /** Preset persona block composed as a `source: 'persona'` system-prompt section (priority 5). */
2095
+ persona?: string;
2504
2096
  /** Replace the entire system prompt with this string. Takes precedence over the default builder. */
2505
2097
  systemPrompt?: string;
2506
2098
  /** Override config language (e.g., "ko", "en"). Injected into system prompt. */
@@ -2537,6 +2129,12 @@ interface IInteractiveSessionStandardOptions {
2537
2129
  sandboxSnapshotId?: string;
2538
2130
  /** Name reported to the underlying Robota agent config. Defaults to 'agent'. */
2539
2131
  agentName?: string;
2132
+ /** Active preset id selected at startup (PRESET-011 runtime state). Defaults to 'default'. */
2133
+ activePresetId?: string;
2134
+ /** Preset execution capability: activate agent runtime + subagent/background dispatch. */
2135
+ enableParallelSubagents?: boolean;
2136
+ /** Preset execution capability: run a post-task self-verification step. */
2137
+ selfVerification?: boolean;
2540
2138
  /** Organization policy for enforcing provider restrictions, command blocks, and API key rules. */
2541
2139
  orgPolicy?: IOrgPolicy;
2542
2140
  /** Additional tools registered alongside the default CLI tools. */
@@ -2574,8 +2172,16 @@ interface ICreatedInteractiveSession {
2574
2172
  agentsFileEntries: IContextFileEntry[];
2575
2173
  /** Per-file entries for CLAUDE.md files loaded at startup. Used for staleness detection. */
2576
2174
  claudeFileEntries: IContextFileEntry[];
2577
- /** Rebuilds the system message given updated agentsMd and claudeMd strings. */
2578
- rebuildSystemMessage: (agentsMd: string, claudeMd: string) => string;
2175
+ /**
2176
+ * Rebuilds the system message given updated agentsMd and claudeMd strings. PRESET-014: an
2177
+ * optional `overrides.persona` re-applies a preset persona to the live prompt; PRESET-017: an
2178
+ * optional `overrides.selfVerification` toggles the verify-before-done section. Either override
2179
+ * is retained for subsequent (override-less) rebuilds.
2180
+ */
2181
+ rebuildSystemMessage: (agentsMd: string, claudeMd: string, overrides?: {
2182
+ persona?: string;
2183
+ selfVerification?: boolean;
2184
+ }) => string;
2579
2185
  }
2580
2186
  //#endregion
2581
2187
  //#region src/interactive/interactive-session-skill-router.d.ts
@@ -2592,6 +2198,8 @@ declare class SessionSkillRouter {
2592
2198
  private readonly onBlockingCommand;
2593
2199
  private readonly shellExec?;
2594
2200
  readonly commandExecutor: SystemCommandExecutor;
2201
+ /** Command modules received at construction — retained for live re-selection (PRESET-015). */
2202
+ private readonly allCommandModules;
2595
2203
  private readonly skillCommandSource;
2596
2204
  private readonly commandHostAdapters?;
2597
2205
  private commandInvocationSource;
@@ -2600,6 +2208,8 @@ declare class SessionSkillRouter {
2600
2208
  onForkSkill: (skill: ICommand, args: string, displayInput: string | undefined, qualifiedName: string | undefined, invocation: ISkillActivationEvent['invocation']) => Promise<ISkillExecutionResult>, /** Called for blocking commands — wraps execution with thinking/executing lifecycle */
2601
2209
 
2602
2210
  onBlockingCommand: (execute: () => Promise<ICommandResult>) => Promise<ICommandResult>, shellExec?: TShellExecFn | undefined);
2211
+ /** PRESET-015 — re-filter the session's command modules and rebuild the executor live. */
2212
+ reapplyCommandModuleSelection(enabled: readonly string[] | undefined, disabled: readonly string[] | undefined): void;
2603
2213
  getCommandInvocationSource(): TCommandInvocationSource;
2604
2214
  getCommandHostAdapters(): ICommandHostAdapters;
2605
2215
  listCommands(): Array<{
@@ -2634,6 +2244,16 @@ interface IExecutionControllerCallbacks {
2634
2244
  emit: <E extends string>(event: E, ...args: unknown[]) => void;
2635
2245
  persistSession: () => void;
2636
2246
  }
2247
+ /** Origin of a turn — distinguishes a human prompt from an agent-wakeup (FLOW-002). */
2248
+ type TTurnSource = 'user' | 'agent-wakeup';
2249
+ /** Options threaded through submit/executePrompt for non-user turns (FLOW-002). */
2250
+ interface ITurnOptions {
2251
+ turnSource?: TTurnSource;
2252
+ /** When set, the in-flight wake for this background task id is cleared on turn completion. */
2253
+ wakeTaskId?: string;
2254
+ }
2255
+ /** A submit callback that optionally carries turn options (default = user turn). */
2256
+ type TSubmitFn = (prompt: string, displayInput?: string, rawInput?: string, options?: ITurnOptions) => Promise<void>;
2637
2257
  declare class SessionExecutionController {
2638
2258
  private readonly histTracker;
2639
2259
  private readonly skillRouter;
@@ -2645,7 +2265,10 @@ declare class SessionExecutionController {
2645
2265
  pendingPrompt: string | null;
2646
2266
  pendingDisplayInput: string | undefined;
2647
2267
  pendingRawInput: string | undefined;
2268
+ pendingTurnOptions: ITurnOptions;
2648
2269
  shuttingDown: boolean;
2270
+ /** FLOW-002: background task ids with an in-flight wake turn (coalesces duplicate wakes). */
2271
+ readonly wakeTaskIds: Set<string>;
2649
2272
  constructor(histTracker: SessionHistoryTracker, skillRouter: SessionSkillRouter, callbacks: IExecutionControllerCallbacks);
2650
2273
  clearPendingQueue(): void;
2651
2274
  clearStreaming(): void;
@@ -2663,7 +2286,7 @@ declare class SessionExecutionController {
2663
2286
  }): void;
2664
2287
  emitExecutionWorkspaceUpdated(cause: TExecutionWorkspaceUpdateCause, entryId?: string): void;
2665
2288
  private drainPendingQueue;
2666
- executePrompt(input: string, displayInput: string | undefined, rawInput: string | undefined, agentsFileEntries: IContextFileEntry[], claudeFileEntries: IContextFileEntry[], rebuildSystemMessage: ICreatedInteractiveSession['rebuildSystemMessage'] | null, setEntries: (agents: IContextFileEntry[], claude: IContextFileEntry[]) => void, submit: (p: string, d?: string, r?: string) => Promise<void>): Promise<void>;
2289
+ executePrompt(input: string, displayInput: string | undefined, rawInput: string | undefined, agentsFileEntries: IContextFileEntry[], claudeFileEntries: IContextFileEntry[], rebuildSystemMessage: ICreatedInteractiveSession['rebuildSystemMessage'] | null, setEntries: (agents: IContextFileEntry[], claude: IContextFileEntry[]) => void, submit: TSubmitFn, turnOptions?: ITurnOptions): Promise<void>;
2667
2290
  executeForkSkillCommand(skill: ICommand, args: string, displayInput: string | undefined, qualifiedName: string | undefined, invocation: ISkillActivationEvent['invocation'], submit: (p: string, d?: string, r?: string) => Promise<void>): Promise<ISkillExecutionResult>;
2668
2291
  executeForegroundCommand(execute: () => Promise<ICommandResult>, submit: (p: string, d?: string, r?: string) => Promise<void>): Promise<ICommandResult>;
2669
2292
  applyForkSkillResult(result: string): Promise<void>;
@@ -2739,59 +2362,17 @@ declare abstract class InteractiveSessionBase {
2739
2362
  sendAgentJob(jobId: string, prompt: string): Promise<void>;
2740
2363
  cancelAgentJob(jobId: string, reason?: string): Promise<void>;
2741
2364
  closeAgentJob(jobId: string): Promise<void>;
2742
- }
2743
- //#endregion
2744
- //#region src/interactive/i-interactive-session.d.ts
2745
- /** Minimal session surface consumed by transport adapters and test factories. */
2746
- interface IInteractiveSession {
2747
- /** True once the underlying session has been initialized. */
2748
- readonly isInitialized?: boolean;
2749
- submit(input: string, displayInput?: string, rawInput?: string): Promise<void>;
2750
- abort(): void;
2751
- cancelQueue(): void;
2752
- shutdown(options?: {
2753
- reason?: string;
2754
- message?: string;
2755
- }): Promise<void>;
2756
- isExecuting(): boolean;
2757
- getPendingPrompt(): string | null;
2758
- getMessages(): TUniversalMessage[];
2759
- getContextState(): IContextWindowState;
2760
- getSession(): {
2761
- getSessionId(): string;
2762
- };
2763
- getCwd(): string;
2764
- executeCommand(name: string, args: string): Promise<ICommandResult | null>;
2765
- listCommands(): ICommandListEntry[];
2766
- on<E extends TInteractiveEventName>(event: E, handler: IInteractiveSessionEvents[E]): void;
2767
- off<E extends TInteractiveEventName>(event: E, handler: IInteractiveSessionEvents[E]): void;
2768
- listBackgroundTasks(filter?: IBackgroundTaskListFilter): IBackgroundTaskState[];
2769
- getBackgroundTask(taskId: string): IBackgroundTaskState | undefined;
2770
- cancelBackgroundTask(taskId: string, reason?: string): Promise<void>;
2771
- closeBackgroundTask(taskId: string): Promise<void>;
2772
- sendBackgroundTask(taskId: string, input: IBackgroundTaskInput): Promise<void>;
2773
- readBackgroundTaskLog(taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
2774
- listBackgroundJobGroups(): IBackgroundJobGroupState[];
2775
- getBackgroundJobGroup(groupId: string): IBackgroundJobGroupState | undefined;
2776
- createBackgroundJobGroup(input: Omit<IBackgroundJobGroupCreateRequest, 'parentSessionId'>): IBackgroundJobGroupState;
2777
- waitBackgroundJobGroup(groupId: string): Promise<IBackgroundJobGroupState>;
2778
- getExecutionWorkspaceSnapshot(options?: IExecutionWorkspaceSnapshotOptions): IExecutionWorkspaceSnapshot;
2779
- listAgentDefinitions(): Array<{
2780
- name: string;
2781
- description: string;
2782
- }>;
2783
- listAgentJobs(): ISubagentJobState[];
2784
- spawnAgentJob(input: {
2785
- agentType: string;
2365
+ spawnScheduledWake(input: {
2786
2366
  label: string;
2787
- mode: 'foreground' | 'background';
2788
- prompt: string;
2789
- model?: string;
2790
- isolation?: TBackgroundTaskIsolation;
2791
- }): Promise<ISubagentJobState>;
2792
- sendAgentJob(jobId: string, prompt: string): Promise<void>;
2793
- cancelAgentJob(jobId: string, reason?: string): Promise<void>;
2794
- closeAgentJob(jobId: string): Promise<void>;
2367
+ cronExpression: string;
2368
+ agentInstruction: string;
2369
+ }): Promise<IBackgroundTaskState>;
2370
+ spawnMonitorWake(input: {
2371
+ label: string;
2372
+ command: string;
2373
+ matchPattern: string;
2374
+ agentInstruction: string;
2375
+ }): Promise<IBackgroundTaskState>;
2795
2376
  }
2796
2377
  //#endregion
2797
2378
  //#region src/interactive/interactive-session.d.ts
@@ -2835,13 +2416,38 @@ declare class InteractiveSession extends InteractiveSessionBase implements ISess
2835
2416
  on<E extends TInteractiveEventName>(event: E, handler: IInteractiveSessionEvents[E]): void;
2836
2417
  off<E extends TInteractiveEventName>(event: E, handler: IInteractiveSessionEvents[E]): void;
2837
2418
  private emit;
2838
- submit(input: string, displayInput?: string, rawInput?: string): Promise<void>;
2419
+ submit(input: string, displayInput?: string, rawInput?: string, options?: ITurnOptions): Promise<void>;
2420
+ /**
2421
+ * FLOW-002: re-enter the agent loop with a non-user turn triggered by a background wake
2422
+ * (a scheduled fire or, later, a monitor match). Coalesces by source task id so repeated
2423
+ * wakes for the same task while one is still in flight collapse to a single turn.
2424
+ */
2425
+ requestWakeup(instruction: string, sourceTaskId: string): void;
2839
2426
  abort(): void;
2840
2427
  shutdown(options?: IInteractiveSessionShutdownOptions): Promise<void>;
2841
2428
  get isInitialized(): boolean;
2842
2429
  getAutoCompactThresholdSource(): TAutoCompactThresholdSource;
2843
2430
  getAutoCompactThreshold(): number | false;
2844
2431
  getSession(): Session;
2432
+ /**
2433
+ * PRESET-014: re-apply a preset persona to the live system prompt. Recomposes the system
2434
+ * message from the currently tracked AGENTS.md/CLAUDE.md entries (the same content the staleness
2435
+ * refresh uses) plus the new persona, then propagates it to the session. No-op before init,
2436
+ * when the rebuild closure is not yet available.
2437
+ */
2438
+ applyPersona(persona: string): void;
2439
+ /**
2440
+ * PRESET-017: toggle the verify-before-done self-verification section on the live system prompt.
2441
+ * Recomposes the system message from the currently tracked AGENTS.md/CLAUDE.md entries plus the
2442
+ * new selfVerification flag, then propagates it to the session. No-op before init, when the
2443
+ * rebuild closure is not yet available.
2444
+ */
2445
+ applySelfVerification(enabled: boolean): void;
2446
+ /**
2447
+ * PRESET-015: re-apply a preset's command-module selection to the live session by delegating to
2448
+ * the skill router, which re-filters the session-start module set and rebuilds the executor.
2449
+ */
2450
+ applyCommandModuleSelection(enabled: readonly string[] | undefined, disabled: readonly string[] | undefined): void;
2845
2451
  getAgentJobCapability(): IAgentJobHostContext;
2846
2452
  setAutoCompactThreshold(threshold: TAutoCompactThreshold, source?: TAutoCompactThresholdSource): void;
2847
2453
  clearConversationHistory(): void;
@@ -3133,25 +2739,6 @@ declare function formatTaskContext(tasks: readonly ITaskContextFile[]): string;
3133
2739
  declare function loadTaskContext(cwd: string, options?: ITaskSelectionOptions, fs?: IFileSystem): string;
3134
2740
  declare function updateTaskFileStatus(taskPath: string, status: TTaskFileStatus, options?: IUpdateTaskFileStatusOptions, fs?: IFileSystem): void;
3135
2741
  //#endregion
3136
- //#region src/interaction/IInteractionChannel.d.ts
3137
- interface IInteractionChannel {
3138
- /** Framework registers input handler. Channel calls it when user submits text. */
3139
- onSubmit(handler: (text: string) => Promise<void>): void;
3140
- /** Framework pushes one-way display events. Fire-and-forget. */
3141
- write(event: InteractionEvent): void;
3142
- /**
3143
- * Framework requests user disambiguation. Channel decides HOW to present it
3144
- * (Ink dialog, web modal, programmatic preset). Resolves when user responds.
3145
- */
3146
- requestAction(action: IActionRequest): Promise<IActionResponse>;
3147
- /** Framework provides registered slash commands for autocomplete. */
3148
- setAvailableCommands(commands: ICommandInfo[]): void;
3149
- /** Signal whether session is busy (channel may disable input). */
3150
- setBusy(busy: boolean): void;
3151
- start(): Promise<void>;
3152
- stop(): Promise<void>;
3153
- }
3154
- //#endregion
3155
2742
  //#region src/interaction/input-parser.d.ts
3156
2743
  type ParsedInput = {
3157
2744
  type: 'slash-command';
@@ -3200,6 +2787,18 @@ declare function promptForApproval(terminal: ITerminalOutput$2, toolName: string
3200
2787
  * Pass overrides to spy on or replace specific methods. */
3201
2788
  declare function createTestInteractiveSession(overrides?: Partial<IInteractiveSession>): IInteractiveSession;
3202
2789
  //#endregion
2790
+ //#region src/config/settings-parse-error.d.ts
2791
+ /**
2792
+ * CLI-069: an EXISTING settings file that fails to parse is an error condition,
2793
+ * never silently equated with a missing file (forbidden-fallback class). Thrown
2794
+ * by the settings readers; session start propagates it (fail fast, exit 1),
2795
+ * reporting consumers (e.g. diagnose) catch it and present it as a finding.
2796
+ */
2797
+ declare class SettingsParseError extends Error {
2798
+ readonly filePath: string;
2799
+ constructor(filePath: string, parseMessage: string);
2800
+ }
2801
+ //#endregion
3203
2802
  //#region src/config/reset-user-config.d.ts
3204
2803
  interface IResetUserConfigResult {
3205
2804
  deleted: boolean;
@@ -3337,5 +2936,5 @@ interface IStatelessRuntimeConfig {
3337
2936
  }
3338
2937
  declare function createStatelessRuntime(config: IStatelessRuntimeConfig): IAgentRuntime;
3339
2938
  //#endregion
3340
- export { AUTO_COMPACT_THRESHOLD_SETTINGS_KEY, AgentExecutor, BACKGROUND_COMMAND_DESCRIPTION, BACKGROUND_COMMAND_USAGE, BUILT_IN_AGENTS, BackgroundJobOrchestrator, BuiltinCommandSource, BundlePluginInstaller, BundlePluginLoader, CLEAR_COMMAND_DESCRIPTION, CLI_UPDATE_CACHE_TTL_MS, CLI_UPDATE_PACKAGE_NAME, CLI_UPDATE_REGISTRY_URL, CLI_UPDATE_TIMEOUT_MS, COST_COMMAND_DESCRIPTION, CommandRegistry, DEFAULT_AUTO_COMPACT_THRESHOLD, DEFAULT_STATUS_LINE_COMMAND_SETTINGS, EXECUTION_ORIGIN_METADATA_KEYS, EXIT_COMMAND_DESCRIPTION, EditCheckpointStore, HELP_COMMAND_DESCRIPTION, type IActionRequest, type IActionResponse, type IActiveModelChangeOptions, type IActiveModelChangeResult, type IAgentBackgroundTaskRequest, type IAgentDefinition, type IAgentExecutorOptions, type IAgentJobHostContext, type IAgentRuntime, type IAgentRuntimeConfig, type IAgentSession, type IAgentToolDeps, type IAppendMemoryInput, type IAppendMemoryResult, type IBackgroundJobGroupCreateRequest, type IBackgroundJobGroupState, type IBackgroundJobGroupSummary, type IBackgroundJobOrchestratorOptions, type IBackgroundJobResultEnvelope, type IBackgroundProcessToolDeps, type IBackgroundTaskError, type IBackgroundTaskHandle, type IBackgroundTaskInput, type IBackgroundTaskListFilter, type IBackgroundTaskLogCursor, type IBackgroundTaskLogPage, type IBackgroundTaskManager, type IBackgroundTaskManagerOptions, type IBackgroundTaskResult, type IBackgroundTaskRunner, type IBackgroundTaskSpawnerGroupRequest, type IBackgroundTaskStart, type IBackgroundTaskState, type IBaseBackgroundTaskRequest, type IBundlePluginFeatures, type IBundlePluginInstallerOptions, type IBundlePluginManifest, type IBundleSkill, type ICapabilityDescriptor, type ICheckForCliUpdateOptions, type ICliUpdateNotice, type ICommand, type ICommandAvailablePlugin, type ICommandChoicePromptOption, type ICommandExecutionToolDeps, type ICommandHostAdapters, type ICommandHostContext, type ICommandInfo, type ICommandInstalledPlugin, type ICommandInteraction, type ICommandInteractionHint, type ICommandListEntry, type ICommandMarketplaceSource, type ICommandMemoryStores, type ICommandModule, type ICommandPendingMemoryStore, type ICommandPermissionModeAdapter, type ICommandPickerAdapter, type ICommandPluginAdapter, type ICommandPluginReloadResult, type ICommandProcessAdapter, type ICommandProjectMemoryStore, type ICommandResult, type ICommandSessionInfo, type ICommandSessionReplayValidationReport, type ICommandSessionRuntime, type ICommandSettingsAdapter, type ICommandSettingsDocument, type ICommandSkillListEntry, type ICommandSource, type ICompactContextResult, type IConfigurableTransport, type IContextFileRefreshedEvent, type IContextReferenceAddResult, type IContextReferenceClearResult, type IContextReferenceInventoryLimits, type IContextReferenceItem, type IContextReferenceRemoveResult, type IContextReferenceUpsertResult, type ICreateExecutionWorkspaceSnapshotInput, type ICreateExecutionWorkspaceTaskSpawnerOptions, type ICreateLimitedOutputCaptureOptions, type ICreateLineDetailPageInput, type ICreateMainThreadDetailPageInput, type ICreateMainThreadEntryInput, type ICreateQueryOptions, type IDiffLine, type IEditCheckpointFileInspection, type IEditCheckpointFileRecord, type IEditCheckpointInspection, type IEditCheckpointInspectionPlan, type IEditCheckpointManifest, type IEditCheckpointRecorder, type IEditCheckpointRestoreResult, type IEditCheckpointSummary, type IEditCheckpointTurnInput, type IExecutionDetailCursor, type IExecutionDetailPage, type IExecutionDetailRecord, type IExecutionOrigin, type IExecutionResult, type IExecutionWorkspaceEntry, type IExecutionWorkspaceEntryRef, type IExecutionWorkspaceEvent, type IExecutionWorkspaceFilter, type IExecutionWorkspaceSnapshot, type IExecutionWorkspaceSnapshotOptions, type IExecutionWorkspaceTaskSpawner, type IForkExecutionOptions, type IHeadlessSessionOptions, type IInProcessSubagentRunnerDeps, type IInspectUserLocalStorageOptions, type IInstalledPluginRecord, type IInteractionChannel, type IInteractiveRuntime, type IInteractiveRuntimeOptions, type IInteractiveSession, type IInteractiveSessionEvents, type IInteractiveSessionRecord, type IInteractiveSessionShutdownOptions, type IInteractiveSessionStore, type IKnownMarketplaceEntry, type ILegacyProviderSettings, type ILimitedOutputCapture, type ILoadedBundlePlugin, type IMarketplaceClientOptions, type IMarketplaceManifest, type IMarketplacePluginEntry, type IMemoryCandidate, type IMemoryEvent, type IMemoryPendingRecord, type IMemoryReference, type IModelCommandToolProjection, type IOrgPolicy, type IPermissionRequest, type IPermissionsCommandState, type IPickItem, type IPluginSettings, type IPreparedSubagentWorktree, type IProcessBackgroundTaskRequest, type IProjectMemorySummary, type IProjectedCommandExecutionToolsDeps, type IProjectedModelCommandTool, type IPromptExecutorOptions, type IPromptFileReferenceDiagnostic, type IPromptFileReferenceHistoryData, type IPromptFileReferenceLimits, type IPromptFileReferenceRecord, type IPromptFileReferenceResolveOptions, type IPromptFileReferenceToken, type IPromptProvider, type IProviderCommandModuleOptions, type IProviderCommandSettingsAdapter, type IProviderProfileNameSuggestionInput, type IProviderProfileNameSuggestionOptions, type IProviderProfileSettings, type IProviderSettingsBuildOptions, type IProviderSettingsWriteTargetOptions, type IProviderSetupInput, type IProviderSetupPatch, type IProviderSwitchOptions, type IReadProviderSettingsOptions, type IResetUserConfigResult, type IResolveUserLocalStorageRootOptions, type IResolvedConfig, type IResolvedPromptFileReference, type IResolvedPromptFileReferences, type IResumableSessionSummary, type IReversibleExecutionOptions, type IReversibleToolSafetyContext, type IReversibleToolSafetyInput, type IReversibleToolSafetyReport, type ISelfHostingVerificationPlan, type ISelfHostingVerificationPlanInput, type ISelfHostingVerificationStep, type ISerializableProviderProfile, type ISkillActivationEvent, type ISkillActivationHistoryData, type ISkillExecutionCallbacks, type ISkillExecutionResult, type ISpawnAgentTaskRequest, type ISpawnProcessTaskRequest, type IStartupCliUpdatePolicyInput, type IStartupMemory, type IStatelessRuntimeConfig, type IStatusLineCommandSettings, type ISubagentJobHandle, type ISubagentJobResult, type ISubagentJobStart, type ISubagentJobState, type ISubagentManager, type ISubagentManagerOptions, type ISubagentOptions, type ISubagentPromptOptions, type ISubagentRunner, type ISubagentSpawnRequest, type ISubagentWorktreeAdapter, type ISubagentWorktreePrepareRequest, type ISystemCommand, type ITaskContextFile, type ITaskSelectionOptions, type IToolState, type IToolSummary, type ITransportAdapter, type ITransportConfig, type IUpdateCheckCache, type IUpdateTaskFileStatusOptions, type IUsageSnapshot, type IUserLocalMemoryDeleteResult, type IUserLocalMemoryItemOptions, type IUserLocalMemoryItemProjection, type IUserLocalMemoryListOptions, type IUserLocalMemoryListProjection, type IUserLocalMemorySetOptions, type IUserLocalStorageCategoryDefinition, type IUserLocalStorageCategoryProjection, type IUserLocalStorageInspection, type IUserLocalStorageItemSummary, type IWorktreeSubagentRunnerOptions, type InteractionEvent, InteractiveSession, LANGUAGE_COMMAND_ARGUMENT_HINT, LANGUAGE_COMMAND_DESCRIPTION, MEMORY_COMMAND_ARGUMENT_HINT, MEMORY_COMMAND_DESCRIPTION, MEMORY_COMMAND_USAGE, MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, MODEL_COMMAND_TOOL_PREFIX, MarketplaceClient, PERMISSIONS_COMMAND_DESCRIPTION, PERMISSION_MODE_ARGUMENT_HINT, PERMISSION_MODE_COMMAND_DESCRIPTION, PLUGIN_COMMAND_ARGUMENT_HINT, PLUGIN_COMMAND_DESCRIPTION, PROVIDER_SAFE_TOOL_NAME_PATTERN, type ParsedInput, PluginCommandSource, PluginSettingsStore, ProjectMemoryStore, PromptExecutor, RECOMMENDED_RESPONSE_LANGUAGES, RELOAD_PLUGINS_COMMAND_DESCRIPTION, RENAME_COMMAND_DESCRIPTION, RENAME_COMMAND_USAGE, RESUME_COMMAND_DESCRIPTION, REWIND_COMMAND_ARGUMENT_HINT, REWIND_COMMAND_DESCRIPTION, STATUSLINE_COMMAND_ARGUMENT_HINT, STATUSLINE_COMMAND_DESCRIPTION, SkillCommandSource, type SkillPromptContext, SystemCommandExecutor, type TAutoCompactThreshold, type TAutoCompactThresholdSource, type TBackgroundJobGroupEvent, type TBackgroundJobGroupEventListener, type TBackgroundJobGroupIdFactory, type TBackgroundJobGroupStatus, type TBackgroundJobWaitPolicy, type TBackgroundPermissionPolicy, type TBackgroundPrimitive, type TBackgroundTaskErrorCategory, type TBackgroundTaskEvent, type TBackgroundTaskEventListener, type TBackgroundTaskIdFactory, type TBackgroundTaskIsolation, type TBackgroundTaskKind, type TBackgroundTaskMode, type TBackgroundTaskRequest, type TBackgroundTaskRunnerEvent, type TBackgroundTaskStatus, type TBackgroundTaskTimeoutReason, type TBackgroundTaskTransitionEvent, type TCapabilityKind, type TCapabilitySafety, type TCliUpdateCheckResult, type TCommandEffect, type TCommandInteractionPrompt, type TCommandModuleSessionRequirement, type TCommandResultDataValue, type TContextReferenceLoadType, type TContextReferenceStatus, type TEditCheckpointFileRestoreAction, type TEnabledPlugins, type TExecutionAttention, type TExecutionControl, type TExecutionDetailRecordKind, type TExecutionEntryKind, type TExecutionOriginKind, type TExecutionWorkspaceStatus, type TExecutionWorkspaceUpdateCause, type TExecutionWorkspaceVisibility, type TInstalledPluginsRegistry, type TInteractiveEventName, type TInteractivePermissionHandler, type TInteractiveSessionOptions, type TKnownMarketplacesRegistry, type TMarketplaceSource, type TMemoryCandidateStatus, type TMemoryType, type TPermissionResultValue, type TPluginInstallScope, type TPromptFileReferenceDiagnosticCode, type TPromptFileReferenceReason, type TProviderFactory, type TProviderSettingsDocument, type TQueryFunction, type TRecommendedResponseLanguage, type TReversibleExecutionIsolation, type TReversibleRollbackLayer, type TReversibleSafetyStatus, type TReversibleSideEffect, type TSelfHostingLoopEvent, type TSelfHostingLoopState, type TSelfHostingVerificationPhase, type TSessionFactory, type TSettingsCheck, type TSettingsData, type TSettingsScope, type TShellExecFn, type TSkillActivationInvocation, type TSkillActivationMode, type TSkillActivationSource, type TSkillActivationStatus, type TStatusLineCommandSettingsPatch, type TSubagentJobMode, type TSubagentJobStatus, type TSubagentRunnerFactory, type TSystemCommandLifecycle, type TTaskFileStatus, type TUserLocalMemoryCategory, type TUserLocalMemoryCommandExecutionEffect, type TUserLocalStorageCategory, USER_LOCAL_MEMORY_CATEGORIES, USER_LOCAL_STORAGE_CATEGORIES, USER_LOCAL_STORAGE_CATEGORY_DEFINITIONS, VALIDATE_SESSION_COMMAND_DESCRIPTION, VALID_PERMISSION_MODES, addCommandContextReference, applyActiveModelChange, applyProviderConfiguration, applyProviderSwitch, applyStatusLineSettings, assembleSubagentPrompt, buildBackgroundCommandSubcommands, buildLanguageCommandSubcommands, buildMemoryCommandSubcommands, buildPermissionModeSubcommands, buildPluginCommandSubcommands, buildPromptWithFileReferences, buildProviderProfile, buildProviderSetupPatch, buildRewindCommandSubcommands, buildStatusLineCommandSubcommands, cancelCommandBackgroundTask, checkForCliUpdate, checkSettingsDocument, checkSettingsFile, clearCommandContextReferences, clearContextReferences, clearConversationHistory, closeCommandBackgroundTask, compactCommandContext, compareSemverVersions, createAgentRuntime, createAgentTool, createBackgroundGroupExecutionEntryId, createBackgroundProcessTool, createBackgroundTaskExecutionEntryId, createBuiltinCommandModule, createCommandExecutionTool, createCommandMemoryStores, createCommandPendingMemoryStore, createCommandProjectMemoryStore, createContextReferenceItem, createDefaultTools, createExecutionOriginMetadata, createExecutionWorkspaceSnapshot, createExecutionWorkspaceTaskSpawner, createInProcessSubagentRunner, createInteractiveRuntime, createLineDetailPage, createMainThreadDetailPage, createMainThreadExecutionEntryId, createModelCommandToolProjection, createPluginRegistryReloadRequestedEffect, createPluginTuiRequestedEffect, createProjectSessionStore, createProjectedCommandExecutionTools, createPromptFileReferenceHistoryEntry, createProviderFromSettings, createProviderSafeModelCommandToolName, createQuery, createSessionExitRequestedEffect, createSessionPickerRequestedEffect, createSessionRenamedEffect, createStatelessRuntime, createSubagentLogger, createSubagentSession, createSystemCommands, createTestInteractiveSession, deleteProviderProfile, deleteSettings, deleteUserLocalMemoryItem, disableUserLocalMemoryItem, discoverTaskFiles, evaluateReversibleToolSafety, executeSkill, formatCliUpdateCheckMessage, formatCliUpdateNotice, formatCommandBackgroundTask, formatCommandBackgroundTaskList, formatCommandHelpMessage, formatCommandPermissionsMessage, formatCommandSessionReplayValidationReport, formatEnvReference, formatInvalidPermissionModeMessage, formatLanguageUsageMessage, formatOrgPolicyViolationMessage, formatProjectedModelCommandToolPromptDescription, formatPromptFileReferenceDiagnostics, formatTaskContext, getBuiltInAgent, getForkWorkerSuffix, getProviderSettingsPaths, getStartupCliUpdateNotice, getSubagentSuffix, getUserSettingsPath, getUserUpdateCheckCachePath, hasBlockingPromptFileReferenceDiagnostics, hasSensitiveCommandMemoryContent, hasUsableSecretReference, inspectCommandEditCheckpoint, inspectUserLocalMemoryItem, inspectUserLocalStorage, isApiKeyPlaintext, isCommandMemoryType, isEnvReference, isMemoryType, isNewerSemverVersion, isPermissionMode, isSlashCommand, isStatusLineCommandSettingsPatch, listActiveContextReferences, listCommandBackgroundTasks, listCommandContextReferences, listCommandEditCheckpoints, listCommandSessionAllowedTools, listCommandUsedMemoryReferences, listResumableSessionSummaries, listUserLocalMemoryItems, loadOrgPolicy, loadTaskContext, mergeProviderPatch, mergeProviders, mergeSettings, normalizeModelCommandName, parseCommandBackgroundLogCursor, parseExecutionWorkspaceEntryId, parseFrontmatter, parseInput, parseLanguageArgument, parsePermissionModeArgument, parsePromptFileReferences, parseSessionNameArgument, parseTaskFile, planSelfHostingVerification, preprocessShellCommands, probeProviderProfile, projectPaths, promptForApproval, readAutoCompactThreshold, readAutoCompactThresholdSource, readCommandBackgroundTaskLog, readCommandContextState, readCommandPermissionMode, readCommandPermissionsState, readCommandSessionInfo, readCurrentGitBranch, readEnabledUserLocalMemoryItem, readMergedProviderSettings, readMergedProviderSettingsFromPaths, readPackageVersion, readProviderSettings, readSettings, readStatusLineSettings, readUpdateCheckCache, recordCommandMemoryEvent, removeCommandContextReference, removeContextReference, resetAutoCompactThresholdSetting, resetUserConfig, resolveActiveProvider, resolveEnvReference, resolveGitBranch, resolveLatestSessionId, resolvePermissionModeAdapter, resolvePluginCommandAdapter, resolvePromptFileReferencePaths, resolvePromptFileReferences, resolveProviderSettingsWriteTargetPath, resolveSessionIdByIdOrName, resolveSettingsPathForScope, resolveSubagentLogDir, resolveUserLocalStorageRoot, restoreCommandEditCheckpoint, retrieveAgentToolDeps, rollbackCommandEditCheckpoint, sanitizeProviderProfileName, selectRelevantTasks, setCommandAutoCompactThreshold, setCurrentProvider, setUserLocalMemoryItem, shouldRunStartupCliUpdateCheck, storeAgentToolDeps, substituteVariables, suggestProviderProfileName, summarizeBackgroundJobGroup, testProviderProfileCommand, toContextReferenceRecords, toPromptFileReferenceRecords, tokeniseSlashCommand, transitionSelfHostingLoop, updateModelInSettings, updateTaskFileStatus, upsertContextReference, upsertProviderProfile, userPaths, validateCommandSessionReplayLog, validateProviderProfile, wrapEditCheckpointTools, wrapReversibleExecutionTools, writeAutoCompactThresholdSetting, writeCommandPermissionMode, writeSettings, writeUpdateCheckCache };
2939
+ export { AUTO_COMPACT_THRESHOLD_SETTINGS_KEY, AgentExecutor, BACKGROUND_COMMAND_DESCRIPTION, BACKGROUND_COMMAND_USAGE, BUILT_IN_AGENTS, BackgroundJobOrchestrator, BuiltinCommandSource, BundlePluginInstaller, BundlePluginLoader, CLEAR_COMMAND_DESCRIPTION, CLI_UPDATE_CACHE_TTL_MS, CLI_UPDATE_PACKAGE_NAME, CLI_UPDATE_REGISTRY_URL, CLI_UPDATE_TIMEOUT_MS, COST_COMMAND_DESCRIPTION, CommandRegistry, DEFAULT_AUTO_COMPACT_THRESHOLD, DEFAULT_STATUS_LINE_COMMAND_SETTINGS, EXECUTION_ORIGIN_METADATA_KEYS, EXIT_COMMAND_DESCRIPTION, EditCheckpointStore, HELP_COMMAND_DESCRIPTION, type IActionRequest, type IActionResponse, type IActiveModelChangeOptions, type IActiveModelChangeResult, type IAgentBackgroundTaskRequest, type IAgentDefinition, type IAgentExecutorOptions, type IAgentJobHostContext, type IAgentRuntime, type IAgentRuntimeConfig, type IAgentSession, type IAgentToolDeps, type IAppendMemoryInput, type IAppendMemoryResult, type IBackgroundJobGroupCreateRequest, type IBackgroundJobGroupState, type IBackgroundJobGroupSummary, type IBackgroundJobOrchestratorOptions, type IBackgroundJobResultEnvelope, type IBackgroundProcessToolDeps, type IBackgroundTaskError, type IBackgroundTaskHandle, type IBackgroundTaskInput, type IBackgroundTaskListFilter, type IBackgroundTaskLogCursor, type IBackgroundTaskLogPage, type IBackgroundTaskManager, type IBackgroundTaskManagerOptions, type IBackgroundTaskResult, type IBackgroundTaskRunner, type IBackgroundTaskSpawnerGroupRequest, type IBackgroundTaskStart, type IBackgroundTaskState, type IBaseBackgroundTaskRequest, type IBundlePluginFeatures, type IBundlePluginInstallerOptions, type IBundlePluginManifest, type IBundleSkill, type ICapabilityDescriptor, type ICheckForCliUpdateOptions, type ICliUpdateNotice, type ICommand, type ICommandAvailablePlugin, type ICommandChoicePromptOption, type ICommandExecutionToolDeps, type ICommandHostAdapters, type ICommandHostContext, type ICommandInfo, type ICommandInstalledPlugin, type ICommandInteraction, type ICommandInteractionHint, type ICommandListEntry, type ICommandMarketplaceSource, type ICommandMemoryStores, type ICommandModule, type ICommandPendingMemoryStore, type ICommandPermissionModeAdapter, type ICommandPickerAdapter, type ICommandPluginAdapter, type ICommandPluginReloadResult, type ICommandProcessAdapter, type ICommandProjectMemoryStore, type ICommandResult, type ICommandSessionInfo, type ICommandSessionReplayValidationReport, type ICommandSessionRuntime, type ICommandSettingsAdapter, type ICommandSettingsDocument, type ICommandSkillListEntry, type ICommandSource, type ICompactContextResult, type IConfigurableTransport, type IContextFileRefreshedEvent, type IContextReferenceAddResult, type IContextReferenceClearResult, type IContextReferenceInventoryLimits, type IContextReferenceItem, type IContextReferenceRemoveResult, type IContextReferenceUpsertResult, type ICreateExecutionWorkspaceSnapshotInput, type ICreateExecutionWorkspaceTaskSpawnerOptions, type ICreateLimitedOutputCaptureOptions, type ICreateLineDetailPageInput, type ICreateMainThreadDetailPageInput, type ICreateMainThreadEntryInput, type ICreateQueryOptions, type ICreateSessionOptions, type ICreateSessionResult, type IDiffLine, type IEditCheckpointFileInspection, type IEditCheckpointFileRecord, type IEditCheckpointInspection, type IEditCheckpointInspectionPlan, type IEditCheckpointManifest, type IEditCheckpointRecorder, type IEditCheckpointRestoreResult, type IEditCheckpointSummary, type IEditCheckpointTurnInput, type IExecutionDetailCursor, type IExecutionDetailPage, type IExecutionDetailRecord, type IExecutionOrigin, type IExecutionResult, type IExecutionWorkspaceEntry, type IExecutionWorkspaceEntryRef, type IExecutionWorkspaceEvent, type IExecutionWorkspaceFilter, type IExecutionWorkspaceSnapshot, type IExecutionWorkspaceSnapshotOptions, type IExecutionWorkspaceTaskSpawner, type IForkExecutionOptions, type IHeadlessSessionOptions, type IInProcessSubagentRunnerDeps, type IInspectUserLocalStorageOptions, type IInstalledPluginRecord, type IInteractionChannel, type IInteractiveRuntime, type IInteractiveRuntimeOptions, type IInteractiveSession, type IInteractiveSessionEvents, type IInteractiveSessionRecord, type IInteractiveSessionShutdownOptions, type IInteractiveSessionStore, type IKnownMarketplaceEntry, type ILegacyProviderSettings, type ILimitedOutputCapture, type ILoadedBundlePlugin, type IMarketplaceClientOptions, type IMarketplaceManifest, type IMarketplacePluginEntry, type IMemoryCandidate, type IMemoryEvent, type IMemoryPendingRecord, type IMemoryReference, type IModelCommandToolProjection, type IModelReapplyOptions, type IOrgPolicy, type IPermissionRequest, type IPermissionsCommandState, type IPickItem, type IPluginSettings, type IPreparedSubagentWorktree, type IPresetApplicationOptions, type IPresetApplicationResult, type IProcessBackgroundTaskRequest, type IProjectMemorySummary, type IProjectedCommandExecutionToolsDeps, type IProjectedModelCommandTool, type IPromptExecutorOptions, type IPromptFileReferenceDiagnostic, type IPromptFileReferenceHistoryData, type IPromptFileReferenceLimits, type IPromptFileReferenceRecord, type IPromptFileReferenceResolveOptions, type IPromptFileReferenceToken, type IPromptProvider, type IProviderCommandModuleOptions, type IProviderCommandSettingsAdapter, type IProviderProfileNameSuggestionInput, type IProviderProfileNameSuggestionOptions, type IProviderProfileSettings, type IProviderSettingsBuildOptions, type IProviderSettingsWriteTargetOptions, type IProviderSetupInput, type IProviderSetupPatch, type IProviderSwitchOptions, type IReadProviderSettingsOptions, type IResetUserConfigResult, type IResolveUserLocalStorageRootOptions, type IResolvedConfig, type IResolvedPromptFileReference, type IResolvedPromptFileReferences, type IResumableSessionSummary, type IReversibleExecutionOptions, type IReversibleToolSafetyContext, type IReversibleToolSafetyInput, type IReversibleToolSafetyReport, type ISelfHostingVerificationPlan, type ISelfHostingVerificationPlanInput, type ISelfHostingVerificationStep, type ISerializableProviderProfile, type ISkillActivationEvent, type ISkillActivationHistoryData, type ISkillExecutionCallbacks, type ISkillExecutionResult, type ISpawnAgentTaskRequest, type ISpawnProcessTaskRequest, type IStartupCliUpdatePolicyInput, type IStartupMemory, type IStatelessRuntimeConfig, type IStatusLineCommandSettings, type ISubagentJobHandle, type ISubagentJobResult, type ISubagentJobStart, type ISubagentJobState, type ISubagentManager, type ISubagentManagerOptions, type ISubagentOptions, type ISubagentPromptOptions, type ISubagentRunner, type ISubagentSpawnRequest, type ISubagentWorktreeAdapter, type ISubagentWorktreePrepareRequest, type ISystemCommand, type ITaskContextFile, type ITaskSelectionOptions, type IToolState, type IToolSummary, type ITransportAdapter, type ITransportConfig, type IUpdateCheckCache, type IUpdateTaskFileStatusOptions, type IUsageSnapshot, type IUserLocalMemoryDeleteResult, type IUserLocalMemoryItemOptions, type IUserLocalMemoryItemProjection, type IUserLocalMemoryListOptions, type IUserLocalMemoryListProjection, type IUserLocalMemorySetOptions, type IUserLocalStorageCategoryDefinition, type IUserLocalStorageCategoryProjection, type IUserLocalStorageInspection, type IUserLocalStorageItemSummary, type IWorktreeSubagentRunnerOptions, type InteractionEvent, InteractiveSession, LANGUAGE_COMMAND_ARGUMENT_HINT, LANGUAGE_COMMAND_DESCRIPTION, MEMORY_COMMAND_ARGUMENT_HINT, MEMORY_COMMAND_DESCRIPTION, MEMORY_COMMAND_USAGE, MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, MODEL_COMMAND_TOOL_PREFIX, MarketplaceClient, PERMISSIONS_COMMAND_DESCRIPTION, PERMISSION_MODE_ARGUMENT_HINT, PERMISSION_MODE_COMMAND_DESCRIPTION, PLUGIN_COMMAND_ARGUMENT_HINT, PLUGIN_COMMAND_DESCRIPTION, PROVIDER_SAFE_TOOL_NAME_PATTERN, type ParsedInput, PluginCommandSource, PluginSettingsStore, ProjectMemoryStore, PromptExecutor, ProviderConfigError, RECOMMENDED_RESPONSE_LANGUAGES, RELOAD_PLUGINS_COMMAND_DESCRIPTION, RENAME_COMMAND_DESCRIPTION, RENAME_COMMAND_USAGE, RESUME_COMMAND_DESCRIPTION, REWIND_COMMAND_ARGUMENT_HINT, REWIND_COMMAND_DESCRIPTION, STATUSLINE_COMMAND_ARGUMENT_HINT, STATUSLINE_COMMAND_DESCRIPTION, SettingsParseError, SkillCommandSource, type SkillPromptContext, SystemCommandExecutor, type TAutoCompactThreshold, type TAutoCompactThresholdSource, type TBackgroundJobGroupEvent, type TBackgroundJobGroupEventListener, type TBackgroundJobGroupIdFactory, type TBackgroundJobGroupStatus, type TBackgroundJobWaitPolicy, type TBackgroundPermissionPolicy, type TBackgroundPrimitive, type TBackgroundTaskErrorCategory, type TBackgroundTaskEvent, type TBackgroundTaskEventListener, type TBackgroundTaskIdFactory, type TBackgroundTaskIsolation, type TBackgroundTaskKind, type TBackgroundTaskMode, type TBackgroundTaskRequest, type TBackgroundTaskRunnerEvent, type TBackgroundTaskStatus, type TBackgroundTaskTimeoutReason, type TBackgroundTaskTransitionEvent, type TCapabilityKind, type TCapabilitySafety, type TCliUpdateCheckResult, type TCommandEffect, type TCommandInteractionPrompt, type TCommandModuleSessionRequirement, type TCommandResultDataValue, type TContextReferenceLoadType, type TContextReferenceStatus, type TEditCheckpointFileRestoreAction, type TEnabledPlugins, type TExecutionAttention, type TExecutionControl, type TExecutionDetailRecordKind, type TExecutionEntryKind, type TExecutionOriginKind, type TExecutionWorkspaceStatus, type TExecutionWorkspaceUpdateCause, type TExecutionWorkspaceVisibility, type TInstalledPluginsRegistry, type TInteractiveEventName, type TInteractivePermissionHandler, type TInteractiveSessionOptions, type TKnownMarketplacesRegistry, type TMarketplaceSource, type TMemoryCandidateStatus, type TMemoryType, type TPermissionResultValue, type TPluginInstallScope, type TPromptFileReferenceDiagnosticCode, type TPromptFileReferenceReason, type TProviderFactory, type TProviderSettingsDocument, type TQueryFunction, type TRecommendedResponseLanguage, type TReversibleExecutionIsolation, type TReversibleRollbackLayer, type TReversibleSafetyStatus, type TReversibleSideEffect, type TSelfHostingLoopEvent, type TSelfHostingLoopState, type TSelfHostingVerificationPhase, type TSessionFactory, type TSettingsCheck, type TSettingsData, type TSettingsScope, type TShellExecFn, type TSkillActivationInvocation, type TSkillActivationMode, type TSkillActivationSource, type TSkillActivationStatus, type TStatusLineCommandSettingsPatch, type TSubagentJobMode, type TSubagentJobStatus, type TSubagentRunnerFactory, type TSystemCommandLifecycle, type TTaskFileStatus, type TUserLocalMemoryCategory, type TUserLocalMemoryCommandExecutionEffect, type TUserLocalStorageCategory, USER_LOCAL_MEMORY_CATEGORIES, USER_LOCAL_STORAGE_CATEGORIES, USER_LOCAL_STORAGE_CATEGORY_DEFINITIONS, VALIDATE_SESSION_COMMAND_DESCRIPTION, VALID_PERMISSION_MODES, addCommandContextReference, applyActiveModelChange, applyPresetToSession, applyProviderConfiguration, applyProviderSwitch, applyStatusLineSettings, assembleSubagentPrompt, buildBackgroundCommandSubcommands, buildLanguageCommandSubcommands, buildMemoryCommandSubcommands, buildPermissionModeSubcommands, buildPluginCommandSubcommands, buildPromptWithFileReferences, buildProviderProfile, buildProviderSetupPatch, buildRewindCommandSubcommands, buildStatusLineCommandSubcommands, cancelCommandBackgroundTask, checkForCliUpdate, checkSettingsDocument, checkSettingsFile, clearCommandContextReferences, clearContextReferences, clearConversationHistory, closeCommandBackgroundTask, compactCommandContext, compareSemverVersions, createAgentRuntime, createAgentTool, createBackgroundGroupExecutionEntryId, createBackgroundProcessTool, createBackgroundTaskExecutionEntryId, createBuiltinCommandModule, createCommandExecutionTool, createCommandMemoryStores, createCommandPendingMemoryStore, createCommandProjectMemoryStore, createContextReferenceItem, createDefaultTools, createExecutionOriginMetadata, createExecutionWorkspaceSnapshot, createExecutionWorkspaceTaskSpawner, createInProcessSubagentRunner, createInteractiveRuntime, createLineDetailPage, createMainThreadDetailPage, createMainThreadExecutionEntryId, createModelCommandToolProjection, createPluginRegistryReloadRequestedEffect, createPluginTuiRequestedEffect, createProjectSessionStore, createProjectedCommandExecutionTools, createPromptFileReferenceHistoryEntry, createProviderFromSettings, createProviderSafeModelCommandToolName, createQuery, createSessionExitRequestedEffect, createSessionPickerRequestedEffect, createSessionRenamedEffect, createStatelessRuntime, createSubagentLogger, createSubagentSession, createSystemCommands, createTestInteractiveSession, deleteProviderProfile, deleteSettings, deleteUserLocalMemoryItem, disableUserLocalMemoryItem, discoverTaskFiles, evaluateReversibleToolSafety, executeSkill, formatCliUpdateCheckMessage, formatCliUpdateNotice, formatCommandBackgroundTask, formatCommandBackgroundTaskList, formatCommandHelpMessage, formatCommandPermissionsMessage, formatCommandSessionReplayValidationReport, formatEnvReference, formatInvalidPermissionModeMessage, formatLanguageUsageMessage, formatOrgPolicyViolationMessage, formatProjectedModelCommandToolPromptDescription, formatPromptFileReferenceDiagnostics, formatTaskContext, getBuiltInAgent, getForkWorkerSuffix, getProviderSettingsPaths, getStartupCliUpdateNotice, getSubagentSuffix, getUserSettingsPath, getUserUpdateCheckCachePath, hasBlockingPromptFileReferenceDiagnostics, hasSensitiveCommandMemoryContent, hasUsableSecretReference, inspectCommandEditCheckpoint, inspectUserLocalMemoryItem, inspectUserLocalStorage, isApiKeyPlaintext, isCommandMemoryType, isEnvReference, isMemoryType, isNewerSemverVersion, isPermissionMode, isSlashCommand, isStatusLineCommandSettingsPatch, listActiveContextReferences, listCommandBackgroundTasks, listCommandContextReferences, listCommandEditCheckpoints, listCommandSessionAllowedTools, listCommandUsedMemoryReferences, listResumableSessionSummaries, listUserLocalMemoryItems, loadOrgPolicy, loadTaskContext, mergeProviderPatch, mergeProviders, mergeSettings, normalizeModelCommandName, parseCommandBackgroundLogCursor, parseExecutionWorkspaceEntryId, parseFrontmatter, parseInput, parseLanguageArgument, parsePermissionModeArgument, parsePromptFileReferences, parseSessionNameArgument, parseTaskFile, planSelfHostingVerification, preprocessShellCommands, probeProviderProfile, projectPaths, promptForApproval, readAutoCompactThreshold, readAutoCompactThresholdSource, readCommandBackgroundTaskLog, readCommandContextState, readCommandPermissionMode, readCommandPermissionsState, readCommandSessionInfo, readCurrentGitBranch, readEnabledUserLocalMemoryItem, readMergedProviderSettings, readMergedProviderSettingsFromPaths, readPackageVersion, readProviderSettings, readSettings, readStatusLineSettings, readUpdateCheckCache, recordCommandMemoryEvent, removeCommandContextReference, removeContextReference, resetAutoCompactThresholdSetting, resetUserConfig, resolveActiveProvider, resolveEnvDefaultProvider, resolveEnvReference, resolveGitBranch, resolveLatestSessionId, resolvePermissionModeAdapter, resolvePluginCommandAdapter, resolvePromptFileReferencePaths, resolvePromptFileReferences, resolveProviderSettingsWriteTargetPath, resolveSessionIdByIdOrName, resolveSettingsPathForScope, resolveSubagentLogDir, resolveUserLocalStorageRoot, restoreCommandEditCheckpoint, retrieveAgentToolDeps, rollbackCommandEditCheckpoint, sanitizeProviderProfileName, selectRelevantTasks, setCommandAutoCompactThreshold, setCurrentProvider, setUserLocalMemoryItem, shouldRunStartupCliUpdateCheck, storeAgentToolDeps, substituteVariables, suggestProviderProfileName, summarizeBackgroundJobGroup, testProviderProfileCommand, toContextReferenceRecords, toPromptFileReferenceRecords, tokeniseSlashCommand, transitionSelfHostingLoop, updateModelInSettings, updateTaskFileStatus, upsertContextReference, upsertProviderProfile, userPaths, validateCommandSessionReplayLog, validateProviderProfile, wrapEditCheckpointTools, wrapReversibleExecutionTools, writeAutoCompactThresholdSetting, writeCommandPermissionMode, writeSettings, writeUpdateCheckCache };
3341
2940
  //# sourceMappingURL=index.d.ts.map