@robota-sdk/agent-framework 3.0.0-beta.67 → 3.0.0-beta.68

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,9 +1,264 @@
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";
1
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";
2
- import { IAIProvider, IContextWindowState, IFileSystem, IFileSystemAsync, IHistoryEntry, IHookInput, IHookResult, IHookTypeExecutor, IProviderConfig, IProviderDefinition, IProviderModelCatalog, 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";
3
- import { FileSessionLogger, ICompactEvent, ISessionLogger, ISessionReplayValidationResult, ITerminalOutput as ITerminalOutput$1, Session, TPermissionHandler } from "@robota-sdk/agent-session";
3
+ import { FileSessionLogger, ICompactEvent, ISessionLogger, ISessionReplayValidationResult, ITerminalOutput as ITerminalOutput$1, Session, TPermissionHandler, TPermissionResult } from "@robota-sdk/agent-session";
4
4
  import { ISandboxClient, IWorkspaceManifest, createZodFunctionTool } from "@robota-sdk/agent-tools";
5
5
  import { IConfigurableTransport, ITransportAdapter, ITransportAdapter as ITransportAdapter$1, ITransportConfig, ITransportRegistryView } from "@robota-sdk/agent-interface-transport";
6
6
 
7
+ //#region src/command-api/org-policy/org-policy-types.d.ts
8
+ interface IOrgPolicy {
9
+ /** Allowed provider profile names. Undefined = all allowed. */
10
+ allowedProviders?: string[];
11
+ /** Slash command names blocked by policy (without leading slash). */
12
+ blockedCommands?: string[];
13
+ /** If true, API keys must be stored as env references ($ENV:VAR), not plaintext. */
14
+ requireApiKeyFromEnv?: boolean;
15
+ /** Shown in policy violation messages so users know who to contact. */
16
+ adminContact?: string;
17
+ }
18
+ //#endregion
19
+ //#region src/command-api/org-policy/org-policy-loader.d.ts
20
+ declare function loadOrgPolicy(): IOrgPolicy | null;
21
+ declare function formatOrgPolicyViolationMessage(reason: string, adminContact: string | undefined): string;
22
+ declare function isApiKeyPlaintext(apiKey: string | undefined): boolean;
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
+ //#region src/command-api/plugin/plugin-command-api.d.ts
196
+ declare const PLUGIN_COMMAND_DESCRIPTION = "Manage plugins";
197
+ declare const PLUGIN_COMMAND_ARGUMENT_HINT = "manage | install <name@marketplace> | uninstall <name@marketplace> | enable <name@marketplace> | disable <name@marketplace> | marketplace <action>";
198
+ 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
+ declare function createPluginTuiRequestedEffect(): TCommandEffect;
231
+ declare function createPluginRegistryReloadRequestedEffect(): TCommandEffect;
232
+ declare function resolvePluginCommandAdapter(context: ICommandHostContext): ICommandPluginAdapter | undefined;
233
+ declare function buildPluginCommandSubcommands(): ICommand[];
234
+ //#endregion
235
+ //#region src/command-api/host-adapters.d.ts
236
+ interface ICommandSettingsDocument {
237
+ [key: string]: TUniversalValue;
238
+ }
239
+ interface ICommandSettingsAdapter<TSettings extends ICommandSettingsDocument = ICommandSettingsDocument> {
240
+ read(): TSettings;
241
+ write(settings: TSettings): void;
242
+ }
243
+ interface ICommandProcessAdapter {
244
+ requestExit(reason?: TSessionEndReason): void;
245
+ requestRestart(reason: TSessionEndReason, message: string): void;
246
+ }
247
+ interface ICommandPickerAdapter<TItem extends ICommandSettingsDocument> {
248
+ pick(items: readonly TItem[]): Promise<TItem | undefined> | TItem | undefined;
249
+ }
250
+ interface ICommandPermissionModeAdapter {
251
+ getPermissionMode(): TPermissionMode;
252
+ setPermissionMode(mode: TPermissionMode): void;
253
+ listSessionAllowedTools(): readonly string[];
254
+ }
255
+ interface ICommandHostAdapters {
256
+ settings?: ICommandSettingsAdapter;
257
+ process?: ICommandProcessAdapter;
258
+ permissionMode?: ICommandPermissionModeAdapter;
259
+ plugin?: ICommandPluginAdapter;
260
+ }
261
+ //#endregion
7
262
  //#region src/background-tasks/background-job-orchestrator.d.ts
8
263
  type TBackgroundJobWaitPolicy = 'detached' | 'wait_all' | 'wait_any' | 'manual';
9
264
  type TBackgroundJobGroupStatus = 'running' | 'completed';
@@ -273,485 +528,9 @@ interface ICreateExecutionWorkspaceTaskSpawnerOptions {
273
528
  }
274
529
  declare function createExecutionWorkspaceTaskSpawner(options: ICreateExecutionWorkspaceTaskSpawnerOptions): IExecutionWorkspaceTaskSpawner;
275
530
  //#endregion
276
- //#region src/interactive/interactive-session-background-tracker.d.ts
277
- interface IBackgroundTrackerState {
278
- tasks: IBackgroundTaskState[];
279
- taskEvents: TBackgroundTaskEvent[];
280
- groups: IBackgroundJobGroupState[];
281
- groupEvents: TBackgroundJobGroupEvent[];
282
- }
283
- declare class SessionBackgroundTaskTracker {
284
- private readonly getManager;
285
- private readonly onChanged;
286
- private readonly emitTaskEvent;
287
- private readonly emitGroupEvent;
288
- private readonly persistSession;
289
- private backgroundTasks;
290
- private backgroundTaskEvents;
291
- private backgroundJobGroups;
292
- private backgroundJobGroupEvents;
293
- private backgroundTaskUnsubscribe;
294
- private backgroundJobUnsubscribe;
295
- private backgroundJobOrchestrator;
296
- constructor(getManager: () => IBackgroundTaskManager | undefined, onChanged: (cause: TExecutionWorkspaceUpdateCause, entryId?: string) => void, emitTaskEvent: (event: TBackgroundTaskEvent) => void, emitGroupEvent: (event: TBackgroundJobGroupEvent) => void, persistSession: () => void);
297
- subscribe(session: Session): void;
298
- dispose(): void;
299
- restoreState(state: IBackgroundTrackerState): void;
300
- getState(): IBackgroundTrackerState;
301
- getManagerOrThrow(): IBackgroundTaskManager;
302
- getOrchestratorOrThrow(sessionId: string): BackgroundJobOrchestrator;
303
- cancelTask(taskId: string, reason?: string): Promise<void>;
304
- closeTask(taskId: string): Promise<void>;
305
- sendTask(taskId: string, input: IBackgroundTaskInput): Promise<void>;
306
- readTaskLog(taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
307
- listTasks(filter?: IBackgroundTaskListFilter): IBackgroundTaskState[];
308
- getTask(taskId: string): IBackgroundTaskState | undefined;
309
- createGroup(input: Omit<IBackgroundJobGroupCreateRequest, 'parentSessionId'>, sessionId: string): IBackgroundJobGroupState;
310
- listGroups(sessionId: string): IBackgroundJobGroupState[];
311
- getGroup(groupId: string, sessionId: string): IBackgroundJobGroupState | undefined;
312
- waitGroup(groupId: string, sessionId: string): Promise<IBackgroundJobGroupState>;
313
- readTaskDetail(entryId: string, taskId: string, cursor?: IExecutionDetailCursor): Promise<IExecutionDetailPage>;
314
- readGroupDetail(entryId: string, groupId: string, sessionId: string): IExecutionDetailPage;
315
- getTaskSnapshots(): IBackgroundTaskState[];
316
- getGroupSnapshots(): IBackgroundJobGroupState[];
317
- private subscribeGroupEvents;
318
- private recordTaskEvent;
319
- private recordGroupEvent;
320
- }
321
- //#endregion
322
- //#region src/agents/agent-definition-types.d.ts
323
- /**
324
- * Definition of an agent that can be spawned as a subagent.
325
- *
326
- * Built-in agents and custom (user-defined) agents share this shape.
327
- * Optional fields inherit from the parent session when omitted.
328
- */
329
- interface IAgentDefinition {
330
- /** Unique name used to reference the agent (e.g., 'Explore', 'Plan'). */
331
- name: string;
332
- /** Human-readable description of the agent's purpose. */
333
- description: string;
334
- /** Markdown body content used as the agent's system prompt. */
335
- systemPrompt: string;
336
- /** Model override (e.g., 'claude-haiku-4-5', 'sonnet', 'opus'). Inherits parent model when omitted. */
337
- model?: string;
338
- /** Maximum number of agentic turns the subagent may execute. */
339
- maxTurns?: number;
340
- /** Allowlist of tool names. Only these tools are available when set. */
341
- tools?: string[];
342
- /** Denylist of tool names. These tools are removed from the inherited set. */
343
- disallowedTools?: string[];
344
- }
345
- //#endregion
346
- //#region src/config/config-types.d.ts
347
- /**
348
- * Fully resolved config after merging all settings files and applying defaults.
349
- */
350
- interface IResolvedConfig {
351
- defaultTrustLevel: 'safe' | 'moderate' | 'full';
352
- /** Response language code (e.g., "ko", "en"). Undefined = no language constraint. */
353
- language?: string;
354
- /** Active provider profile key when providers/currentProvider are used. */
355
- currentProvider?: string;
356
- provider: {
357
- name: string;
358
- model: string;
359
- apiKey: string | undefined;
360
- baseURL?: string;
361
- timeout?: number;
362
- options?: Record<string, TUniversalValue>;
363
- };
364
- permissions: {
365
- allow: string[];
366
- deny: string[];
367
- };
368
- env: Record<string, string>;
369
- hooks?: THooksConfig;
370
- /** Plugin enablement map: plugin name -> enabled/disabled */
371
- enabledPlugins?: Record<string, boolean>;
372
- /** Extra marketplace sources: name -> { source } */
373
- extraKnownMarketplaces?: Record<string, {
374
- source: {
375
- type: string;
376
- repo?: string;
377
- url?: string;
378
- path?: string;
379
- ref?: string;
380
- };
381
- }>;
382
- /** Auto-compact threshold as a 0-1 fraction. Set false to disable automatic compaction. */
383
- autoCompactThreshold?: number | false;
384
- /** Transport enable/disable + options: transport name -> { enabled, options } */
385
- transports?: Record<string, {
386
- enabled?: boolean;
387
- options?: Record<string, unknown>;
388
- }>;
389
- }
390
- //#endregion
391
- //#region src/context/context-file-tracker.d.ts
392
- /** A single context file entry tracked with its content hash. */
393
- interface IContextFileEntry {
394
- /** Absolute path to the file. */
395
- filePath: string;
396
- /** Content as read at load time. */
397
- content: string;
398
- /** SHA-256 hex digest of `content`. */
399
- contentHash: string;
400
- }
401
- //#endregion
402
- //#region src/context/context-loader.d.ts
403
- interface ILoadedContext {
404
- /** Concatenated content of all AGENTS.md files found (root-first) */
405
- agentsMd: string;
406
- /** Concatenated content of all CLAUDE.md files found (root-first) */
407
- claudeMd: string;
408
- /** Startup project memory index loaded from .robota/memory/MEMORY.md, if present */
409
- memoryMd?: string;
410
- /** Formatted active task context loaded from .agents/tasks/*.md, if present */
411
- taskContext?: string;
412
- /** Extracted "Compact Instructions" section from CLAUDE.md, if present */
413
- compactInstructions?: string;
414
- /** Per-file entries for all AGENTS.md files, root-first. Present for staleness detection. */
415
- agentsFileEntries?: IContextFileEntry[];
416
- /** Per-file entries for all CLAUDE.md files, root-first. Present for staleness detection. */
417
- claudeFileEntries?: IContextFileEntry[];
418
- }
419
- //#endregion
420
- //#region src/assembly/create-subagent-session.d.ts
421
- /** Options for creating a subagent session. */
422
- interface ISubagentOptions {
423
- /** Agent definition (built-in or custom). */
424
- agentDefinition: IAgentDefinition;
425
- /** Parent's resolved config (for provider, permissions, etc.). */
426
- parentConfig: IResolvedConfig;
427
- /** Parent's loaded context (CLAUDE.md, AGENTS.md). */
428
- parentContext: ILoadedContext;
429
- /** Parent session's available tools (to inherit/filter). */
430
- parentTools: IToolWithEventService[];
431
- /** AI provider instance. */
432
- provider: IAIProvider;
433
- /** Terminal output interface. */
434
- terminal: ITerminalOutput$1;
435
- /** Stable session ID for transcript files. */
436
- sessionId?: string;
437
- /** Optional logger for subagent transcripts. */
438
- sessionLogger?: ISessionLogger;
439
- /** Whether this is a fork worker (uses fork suffix instead of standard). */
440
- isForkWorker?: boolean;
441
- /** Permission mode from parent (bypassPermissions, acceptEdits, etc.). */
442
- permissionMode?: TPermissionMode;
443
- /** Permission handler from parent. */
444
- permissionHandler?: TPermissionHandler;
445
- /** Plugin hooks configuration from parent session. */
446
- hooks?: Record<string, unknown>;
447
- /** Hook type executors from parent session (prompt, agent, etc.). */
448
- hookTypeExecutors?: IHookTypeExecutor[];
449
- /** Streaming callback. */
450
- onTextDelta?: (delta: string) => void;
451
- /** Tool execution callback. */
452
- onToolExecution?: (event: {
453
- type: 'start' | 'end';
454
- toolName: string;
455
- toolArgs?: TToolArgs;
456
- success?: boolean;
457
- denied?: boolean;
458
- toolResultData?: string;
459
- }) => void;
460
- }
461
- /**
462
- * Create a fully-configured Session for subagent execution.
463
- *
464
- * Assembles provider, tools, and system prompt from parent context and
465
- * agent definition, then returns a new Session instance.
466
- */
467
- declare function createSubagentSession(options: ISubagentOptions): Session;
468
- //#endregion
469
- //#region src/subagents/in-process-subagent-runner.d.ts
470
- interface IInProcessSubagentRunnerDeps {
471
- config: IResolvedConfig;
472
- context: ILoadedContext;
473
- tools: IToolWithEventService[];
474
- terminal: ITerminalOutput;
475
- provider: IAIProvider;
476
- permissionMode?: TPermissionMode;
477
- permissionHandler?: TPermissionHandler;
478
- hooks?: ISubagentOptions['hooks'];
479
- hookTypeExecutors?: IHookTypeExecutor[];
480
- onTextDelta?: (delta: string) => void;
481
- onToolExecution?: (event: {
482
- type: 'start' | 'end';
483
- toolName: string;
484
- toolArgs?: TToolArgs;
485
- success?: boolean;
486
- denied?: boolean;
487
- toolResultData?: string;
488
- }) => void;
489
- customAgentRegistry?: (name: string) => IAgentDefinition | undefined;
490
- }
491
- type TSubagentRunnerFactory = (deps: IInProcessSubagentRunnerDeps) => ISubagentRunner$1;
492
- declare function createInProcessSubagentRunner(deps: IInProcessSubagentRunnerDeps): ISubagentRunner$1;
493
- //#endregion
494
- //#region src/tools/agent-tool.d.ts
495
- /** Dependencies injected at creation time via createAgentTool factory */
496
- interface IAgentToolDeps extends IInProcessSubagentRunnerDeps {
497
- cwd?: string;
498
- parentSessionId?: string;
499
- subagentDepth?: number;
500
- subagentManager?: ISubagentManager;
501
- backgroundTaskManager?: IBackgroundTaskManager;
502
- /** Optional custom agent registry for resolving non-built-in agent types. */
503
- customAgentRegistry?: (name: string) => IAgentDefinition | undefined;
504
- /** Model-visible and command-visible agent definitions available to this session. */
505
- agentDefinitions?: IAgentDefinition[];
506
- }
507
- /** Store agent tool deps keyed by a session (or any object). */
508
- declare function storeAgentToolDeps(key: object, deps: IAgentToolDeps): void;
509
- /** Retrieve agent tool deps for a given session key. */
510
- declare function retrieveAgentToolDeps(key: object): IAgentToolDeps | undefined;
511
- /**
512
- * Create an agent tool instance with deps captured in closure.
513
- *
514
- * Each session gets its own tool instance — no shared mutable state.
515
- */
516
- declare function createAgentTool(deps: IAgentToolDeps): ReturnType<typeof createZodFunctionTool>;
517
- //#endregion
518
- //#region src/capabilities/types.d.ts
519
- type TCapabilityKind = 'builtin-command' | 'skill' | 'agent' | 'tool';
520
- type TCapabilitySafety = 'read-only' | 'write' | 'process' | 'network' | 'background-agent';
521
- interface ICapabilityDescriptor {
522
- readonly name: string;
523
- readonly kind: TCapabilityKind;
524
- readonly description: string;
525
- readonly userInvocable: boolean;
526
- readonly modelInvocable: boolean;
527
- readonly argumentHint?: string;
528
- readonly safety?: TCapabilitySafety;
529
- }
530
- //#endregion
531
- //#region src/command-api/types.d.ts
532
- /** A command entry */
533
- interface ICommand {
534
- /** Command name without slash (e.g., "mode") — used for invocation */
535
- name: string;
536
- /** User-friendly display label (e.g., "Interaction Mode"). Falls back to `name` if not set. */
537
- displayName?: string;
538
- /** Short description shown in autocomplete */
539
- description: string;
540
- /** Source identifier (e.g., "builtin", "skill") */
541
- source: string;
542
- /** Subcommands for hierarchical menus */
543
- subcommands?: ICommand[];
544
- /** Execute the command. Args is everything after the command name. */
545
- execute?: (args: string) => void | Promise<void>;
546
- /** Full SKILL.md content (only for skill commands) */
547
- skillContent?: string;
548
- /** Hint for the expected argument (Claude Code frontmatter) */
549
- argumentHint?: string;
550
- /** When true, models cannot invoke this skill autonomously */
551
- disableModelInvocation?: boolean;
552
- /** When true, models may invoke this command through the SDK-projected command tool */
553
- modelInvocable?: boolean;
554
- /** When false, users cannot invoke this skill directly */
555
- userInvocable?: boolean;
556
- /** Safety category for model-visible capability descriptors */
557
- safety?: TCapabilitySafety;
558
- /** List of tools this skill is allowed to use */
559
- allowedTools?: string[];
560
- /** Preferred model for executing this skill */
561
- model?: string;
562
- /** Effort level hint for the skill */
563
- effort?: string;
564
- /** Context scope for the skill (e.g., "project") */
565
- context?: string;
566
- /** Agent identity to use when executing this skill */
567
- agent?: string;
568
- /** Plugin installation directory (plugin skills/commands only) */
569
- pluginDir?: string;
570
- }
571
- /** A source that provides commands */
572
- interface ICommandSource {
573
- name: string;
574
- getCommands(): ICommand[];
575
- }
576
- //#endregion
577
- //#region src/config/settings-io.d.ts
578
- type TSettingsData = Record<string, TUniversalValue>;
579
- declare function getUserSettingsPath(): string;
580
- type TSettingsScope = 'user' | 'project-local';
581
- declare function resolveSettingsPathForScope(cwd: string, scope: TSettingsScope | undefined): string;
582
- declare function readSettings(path: string): TSettingsData;
583
- declare function writeSettings(path: string, settings: TSettingsData): void;
584
- declare function updateModelInSettings(settingsPath: string, modelId: string): void;
585
- declare function deleteSettings(path: string): boolean;
586
- //#endregion
587
- //#region src/command-api/statusline/statusline-command-api.d.ts
588
- declare const STATUSLINE_COMMAND_DESCRIPTION = "Configure TUI status-line visibility and fields such as model, context, tokens, session, and git branch.";
589
- declare const STATUSLINE_COMMAND_ARGUMENT_HINT = "on | off | reset | git on | git off";
590
- interface IStatusLineCommandSettings {
591
- enabled: boolean;
592
- gitBranch: boolean;
593
- }
594
- type TStatusLineCommandSettingsPatch = Partial<IStatusLineCommandSettings> & Record<string, TUniversalValue>;
595
- declare const DEFAULT_STATUS_LINE_COMMAND_SETTINGS: Readonly<IStatusLineCommandSettings>;
596
- declare function buildStatusLineCommandSubcommands(source?: string): ICommand[];
597
- declare function isStatusLineCommandSettingsPatch(value: Record<string, TUniversalValue>): value is TStatusLineCommandSettingsPatch;
598
- declare function readStatusLineSettings(settings: TSettingsData): IStatusLineCommandSettings;
599
- declare function applyStatusLineSettings(settingsPath: string, patch: TStatusLineCommandSettingsPatch): IStatusLineCommandSettings;
600
- //#endregion
601
- //#region src/command-api/effects.d.ts
602
- type TCommandEffect = {
603
- type: 'model-change-requested';
604
- modelId: string;
605
- } | {
606
- type: 'language-change-requested';
607
- language: string;
608
- } | {
609
- type: 'settings-reset-requested';
610
- } | {
611
- type: 'session-exit-requested';
612
- reason?: TSessionEndReason;
613
- message?: string;
614
- } | {
615
- type: 'session-restart-requested';
616
- reason: TSessionEndReason;
617
- message: string;
618
- } | {
619
- type: 'plugin-tui-requested';
620
- } | {
621
- type: 'plugin-registry-reload-requested';
622
- } | {
623
- type: 'settings-tui-requested';
624
- } | {
625
- type: 'session-picker-requested';
626
- } | {
627
- type: 'session-renamed';
628
- name: string;
629
- } | {
630
- type: 'conversation-history-cleared';
631
- } | {
632
- type: 'session-execution-started';
633
- } | {
634
- type: 'statusline-settings-patch';
635
- patch: TStatusLineCommandSettingsPatch;
636
- } | {
637
- type: 'agent-switcher-requested';
638
- };
639
- //#endregion
640
- //#region src/command-api/interactions.d.ts
641
- /** Choice option for command-owned follow-up prompts. */
642
- interface ICommandChoicePromptOption {
643
- value: string;
644
- label: string;
645
- }
646
- /** Generic prompt descriptor rendered by host UIs for command interactions. */
647
- type TCommandInteractionPrompt = {
648
- kind: 'choice';
649
- title: string;
650
- description?: string;
651
- options: readonly ICommandChoicePromptOption[];
652
- maxVisible?: number;
653
- } | {
654
- kind: 'text';
655
- title: string;
656
- description?: string;
657
- placeholder?: string;
658
- allowEmpty?: boolean;
659
- masked?: boolean;
660
- validate?: (value: string) => string | undefined;
661
- };
662
- /** Stateful command continuation owned by the command module. */
663
- interface ICommandInteraction {
664
- prompt: TCommandInteractionPrompt;
665
- submit(value: string): Promise<ICommandResult> | ICommandResult;
666
- cancel?(): Promise<ICommandResult> | ICommandResult;
667
- }
668
- //#endregion
669
- //#region src/command-api/command-result.d.ts
670
- type TCommandResultDataValue = TUniversalValue | Record<string, unknown> | readonly Record<string, unknown>[];
671
- /** Result of a system command execution. */
672
- interface ICommandResult {
673
- /** Human-readable output message */
674
- message: string;
675
- /** Command completed successfully */
676
- success: boolean;
677
- /** Additional structured data (command-specific diagnostics only) */
678
- data?: Record<string, unknown>;
679
- /** Typed host effects requested by the command */
680
- effects?: readonly TCommandEffect[];
681
- /** Command-owned follow-up prompt and continuation */
682
- interaction?: ICommandInteraction;
683
- }
684
- //#endregion
685
- //#region src/command-api/plugin/plugin-command-api.d.ts
686
- declare const PLUGIN_COMMAND_DESCRIPTION = "Manage plugins";
687
- declare const PLUGIN_COMMAND_ARGUMENT_HINT = "manage | install <name@marketplace> | uninstall <name@marketplace> | enable <name@marketplace> | disable <name@marketplace> | marketplace <action>";
688
- declare const RELOAD_PLUGINS_COMMAND_DESCRIPTION = "Reload all plugin resources";
689
- type TPluginInstallScope = 'user' | 'project';
690
- interface ICommandInstalledPlugin {
691
- name: string;
692
- description: string;
693
- enabled: boolean;
694
- }
695
- interface ICommandAvailablePlugin {
696
- name: string;
697
- description: string;
698
- installed: boolean;
699
- }
700
- interface ICommandMarketplaceSource {
701
- name: string;
702
- type: string;
703
- }
704
- interface ICommandPluginReloadResult {
705
- loadedPluginCount: number;
706
- }
707
- interface ICommandPluginAdapter {
708
- listInstalled(): Promise<readonly ICommandInstalledPlugin[]>;
709
- listAvailablePlugins(marketplace: string): Promise<readonly ICommandAvailablePlugin[]>;
710
- install(pluginId: string, scope?: TPluginInstallScope): Promise<void>;
711
- uninstall(pluginId: string): Promise<void>;
712
- enable(pluginId: string): Promise<void>;
713
- disable(pluginId: string): Promise<void>;
714
- marketplaceAdd(source: string): Promise<string>;
715
- marketplaceRemove(name: string): Promise<void>;
716
- marketplaceUpdate(name: string): Promise<void>;
717
- marketplaceList(): Promise<readonly ICommandMarketplaceSource[]>;
718
- reloadPlugins(): Promise<ICommandPluginReloadResult>;
719
- }
720
- declare function createPluginTuiRequestedEffect(): TCommandEffect;
721
- declare function createPluginRegistryReloadRequestedEffect(): TCommandEffect;
722
- declare function resolvePluginCommandAdapter(context: ICommandHostContext): ICommandPluginAdapter | undefined;
723
- declare function buildPluginCommandSubcommands(): ICommand[];
724
- //#endregion
725
- //#region src/command-api/host-adapters.d.ts
726
- interface ICommandSettingsDocument {
727
- [key: string]: TUniversalValue;
728
- }
729
- interface ICommandSettingsAdapter<TSettings extends ICommandSettingsDocument = ICommandSettingsDocument> {
730
- read(): TSettings;
731
- write(settings: TSettings): void;
732
- }
733
- interface ICommandProcessAdapter {
734
- requestExit(reason?: TSessionEndReason): void;
735
- requestRestart(reason: TSessionEndReason, message: string): void;
736
- }
737
- interface ICommandPickerAdapter<TItem extends ICommandSettingsDocument> {
738
- pick(items: readonly TItem[]): Promise<TItem | undefined> | TItem | undefined;
739
- }
740
- interface ICommandPermissionModeAdapter {
741
- getPermissionMode(): TPermissionMode;
742
- setPermissionMode(mode: TPermissionMode): void;
743
- listSessionAllowedTools(): readonly string[];
744
- }
745
- interface ICommandHostAdapters {
746
- settings?: ICommandSettingsAdapter;
747
- process?: ICommandProcessAdapter;
748
- permissionMode?: ICommandPermissionModeAdapter;
749
- plugin?: ICommandPluginAdapter;
750
- }
751
- //#endregion
752
- //#region src/checkpoints/edit-checkpoint-types.d.ts
753
- interface IEditCheckpointRecorder {
754
- captureFile(filePath: string): Promise<void> | void;
531
+ //#region src/checkpoints/edit-checkpoint-types.d.ts
532
+ interface IEditCheckpointRecorder {
533
+ captureFile(filePath: string): Promise<void> | void;
755
534
  }
756
535
  interface IEditCheckpointTurnInput {
757
536
  sessionId: string;
@@ -966,37 +745,211 @@ declare class ProjectMemoryStore {
966
745
  append(input: IAppendMemoryInput): IAppendMemoryResult;
967
746
  }
968
747
  //#endregion
969
- //#region src/memory/automatic-memory-types.d.ts
970
- type TMemoryCandidateStatus = 'pending' | 'approved' | 'rejected' | 'saved' | 'skipped';
971
- interface IMemoryCandidate {
972
- id: string;
973
- type: TMemoryType;
974
- topic: string;
975
- text: string;
976
- sourceMessageIds: string[];
977
- confidence: number;
978
- createdAt: string;
979
- reason: string;
980
- }
981
- interface IMemoryPendingRecord extends IMemoryCandidate {
982
- status: TMemoryCandidateStatus;
983
- updatedAt: string;
984
- decisionReason?: string;
985
- }
986
- interface IMemoryReference {
987
- topic: string;
988
- path: string;
989
- score: number;
990
- truncated: boolean;
991
- }
992
- interface IMemoryEvent {
993
- type: 'memory_candidate_extracted' | 'memory_candidate_queued' | 'memory_candidate_saved' | 'memory_candidate_skipped' | 'memory_candidate_approved' | 'memory_candidate_rejected' | 'memory_retrieved';
994
- at: string;
995
- candidateId?: string;
996
- topic?: string;
997
- reason?: string;
998
- data?: Record<string, TUniversalValue>;
748
+ //#region src/memory/automatic-memory-types.d.ts
749
+ type TMemoryCandidateStatus = 'pending' | 'approved' | 'rejected' | 'saved' | 'skipped';
750
+ interface IMemoryCandidate {
751
+ id: string;
752
+ type: TMemoryType;
753
+ topic: string;
754
+ text: string;
755
+ sourceMessageIds: string[];
756
+ confidence: number;
757
+ createdAt: string;
758
+ reason: string;
759
+ }
760
+ interface IMemoryPendingRecord extends IMemoryCandidate {
761
+ status: TMemoryCandidateStatus;
762
+ updatedAt: string;
763
+ decisionReason?: string;
764
+ }
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
+ //#endregion
780
+ //#region src/agents/agent-definition-types.d.ts
781
+ /**
782
+ * Definition of an agent that can be spawned as a subagent.
783
+ *
784
+ * Built-in agents and custom (user-defined) agents share this shape.
785
+ * Optional fields inherit from the parent session when omitted.
786
+ */
787
+ interface IAgentDefinition {
788
+ /** Unique name used to reference the agent (e.g., 'Explore', 'Plan'). */
789
+ name: string;
790
+ /** Human-readable description of the agent's purpose. */
791
+ description: string;
792
+ /** Markdown body content used as the agent's system prompt. */
793
+ systemPrompt: string;
794
+ /** Model override (e.g., 'claude-haiku-4-5', 'sonnet', 'opus'). Inherits parent model when omitted. */
795
+ model?: string;
796
+ /** Maximum number of agentic turns the subagent may execute. */
797
+ maxTurns?: number;
798
+ /** Allowlist of tool names. Only these tools are available when set. */
799
+ tools?: string[];
800
+ /** Denylist of tool names. These tools are removed from the inherited set. */
801
+ disallowedTools?: string[];
802
+ }
803
+ //#endregion
804
+ //#region src/config/config-types.d.ts
805
+ /**
806
+ * Fully resolved config after merging all settings files and applying defaults.
807
+ */
808
+ interface IResolvedConfig {
809
+ defaultTrustLevel: 'safe' | 'moderate' | 'full';
810
+ /** Response language code (e.g., "ko", "en"). Undefined = no language constraint. */
811
+ language?: string;
812
+ /** Active provider profile key when providers/currentProvider are used. */
813
+ currentProvider?: string;
814
+ provider: {
815
+ name: string;
816
+ model: string;
817
+ apiKey: string | undefined;
818
+ baseURL?: string;
819
+ timeout?: number;
820
+ options?: Record<string, TUniversalValue>;
821
+ };
822
+ permissions: {
823
+ allow: string[];
824
+ deny: string[];
825
+ };
826
+ env: Record<string, string>;
827
+ hooks?: THooksConfig;
828
+ /** Plugin enablement map: plugin name -> enabled/disabled */
829
+ enabledPlugins?: Record<string, boolean>;
830
+ /** Extra marketplace sources: name -> { source } */
831
+ extraKnownMarketplaces?: Record<string, {
832
+ source: {
833
+ type: string;
834
+ repo?: string;
835
+ url?: string;
836
+ path?: string;
837
+ ref?: string;
838
+ };
839
+ }>;
840
+ /** Auto-compact threshold as a 0-1 fraction. Set false to disable automatic compaction. */
841
+ autoCompactThreshold?: number | false;
842
+ /** Transport enable/disable + options: transport name -> { enabled, options } */
843
+ transports?: Record<string, {
844
+ enabled?: boolean;
845
+ options?: Record<string, unknown>;
846
+ }>;
847
+ }
848
+ //#endregion
849
+ //#region src/context/context-file-tracker.d.ts
850
+ /** A single context file entry tracked with its content hash. */
851
+ interface IContextFileEntry {
852
+ /** Absolute path to the file. */
853
+ filePath: string;
854
+ /** Content as read at load time. */
855
+ content: string;
856
+ /** SHA-256 hex digest of `content`. */
857
+ contentHash: string;
858
+ }
859
+ //#endregion
860
+ //#region src/context/context-loader.d.ts
861
+ interface ILoadedContext {
862
+ /** Concatenated content of all AGENTS.md files found (root-first) */
863
+ agentsMd: string;
864
+ /** Concatenated content of all CLAUDE.md files found (root-first) */
865
+ claudeMd: string;
866
+ /** Startup project memory index loaded from .robota/memory/MEMORY.md, if present */
867
+ memoryMd?: string;
868
+ /** Formatted active task context loaded from .agents/tasks/*.md, if present */
869
+ taskContext?: string;
870
+ /** Extracted "Compact Instructions" section from CLAUDE.md, if present */
871
+ compactInstructions?: string;
872
+ /** Per-file entries for all AGENTS.md files, root-first. Present for staleness detection. */
873
+ agentsFileEntries?: IContextFileEntry[];
874
+ /** Per-file entries for all CLAUDE.md files, root-first. Present for staleness detection. */
875
+ claudeFileEntries?: IContextFileEntry[];
876
+ }
877
+ //#endregion
878
+ //#region src/assembly/create-subagent-session.d.ts
879
+ /** Options for creating a subagent session. */
880
+ interface ISubagentOptions {
881
+ /** Agent definition (built-in or custom). */
882
+ agentDefinition: IAgentDefinition;
883
+ /** Parent's resolved config (for provider, permissions, etc.). */
884
+ parentConfig: IResolvedConfig;
885
+ /** Parent's loaded context (CLAUDE.md, AGENTS.md). */
886
+ parentContext: ILoadedContext;
887
+ /** Parent session's available tools (to inherit/filter). */
888
+ parentTools: IToolWithEventService[];
889
+ /** AI provider instance. */
890
+ provider: IAIProvider;
891
+ /** Terminal output interface. */
892
+ terminal: ITerminalOutput$1;
893
+ /** Stable session ID for transcript files. */
894
+ sessionId?: string;
895
+ /** Optional logger for subagent transcripts. */
896
+ sessionLogger?: ISessionLogger;
897
+ /** Whether this is a fork worker (uses fork suffix instead of standard). */
898
+ isForkWorker?: boolean;
899
+ /** Permission mode from parent (bypassPermissions, acceptEdits, etc.). */
900
+ permissionMode?: TPermissionMode;
901
+ /** Permission handler from parent. */
902
+ permissionHandler?: TPermissionHandler;
903
+ /** Plugin hooks configuration from parent session. */
904
+ hooks?: Record<string, unknown>;
905
+ /** Hook type executors from parent session (prompt, agent, etc.). */
906
+ hookTypeExecutors?: IHookTypeExecutor[];
907
+ /** Streaming callback. */
908
+ onTextDelta?: (delta: string) => void;
909
+ /** Tool execution callback. */
910
+ onToolExecution?: (event: {
911
+ type: 'start' | 'end';
912
+ toolName: string;
913
+ toolArgs?: TToolArgs;
914
+ success?: boolean;
915
+ denied?: boolean;
916
+ toolResultData?: string;
917
+ executionId?: string;
918
+ }) => void;
919
+ }
920
+ /**
921
+ * Create a fully-configured Session for subagent execution.
922
+ *
923
+ * Assembles provider, tools, and system prompt from parent context and
924
+ * agent definition, then returns a new Session instance.
925
+ */
926
+ declare function createSubagentSession(options: ISubagentOptions): Session;
927
+ //#endregion
928
+ //#region src/subagents/in-process-subagent-runner.d.ts
929
+ interface IInProcessSubagentRunnerDeps {
930
+ config: IResolvedConfig;
931
+ context: ILoadedContext;
932
+ tools: IToolWithEventService[];
933
+ terminal: ITerminalOutput;
934
+ provider: IAIProvider;
935
+ permissionMode?: TPermissionMode;
936
+ permissionHandler?: TPermissionHandler;
937
+ hooks?: ISubagentOptions['hooks'];
938
+ hookTypeExecutors?: IHookTypeExecutor[];
939
+ onTextDelta?: (delta: string) => void;
940
+ onToolExecution?: (event: {
941
+ type: 'start' | 'end';
942
+ toolName: string;
943
+ toolArgs?: TToolArgs;
944
+ success?: boolean;
945
+ denied?: boolean;
946
+ toolResultData?: string;
947
+ executionId?: string;
948
+ }) => void;
949
+ customAgentRegistry?: (name: string) => IAgentDefinition | undefined;
999
950
  }
951
+ type TSubagentRunnerFactory = (deps: IInProcessSubagentRunnerDeps) => ISubagentRunner$1;
952
+ declare function createInProcessSubagentRunner(deps: IInProcessSubagentRunnerDeps): ISubagentRunner$1;
1000
953
  //#endregion
1001
954
  //#region src/command-api/context/context-command-api.d.ts
1002
955
  type TAutoCompactThreshold = number | false;
@@ -1005,6 +958,8 @@ declare const AUTO_COMPACT_THRESHOLD_SETTINGS_KEY = "autoCompactThreshold";
1005
958
  interface ICompactContextResult {
1006
959
  before: IContextWindowState;
1007
960
  after: IContextWindowState;
961
+ beforeMessageCount: number;
962
+ afterMessageCount: number;
1008
963
  }
1009
964
  /** Read context-window state through the command host facade. */
1010
965
  declare function readCommandContextState(context: ICommandHostContext): IContextWindowState;
@@ -1035,6 +990,8 @@ interface ICommandListEntry {
1035
990
  /** User-friendly display label. Falls back to `name` if not set. */
1036
991
  displayName?: string;
1037
992
  description: string;
993
+ /** Optional usage example shown in /help output (e.g., "/compact Summarize the context"). */
994
+ example?: string;
1038
995
  }
1039
996
  interface ICommandSkillListEntry {
1040
997
  readonly name: string;
@@ -1064,6 +1021,11 @@ interface ICommandSessionRuntime {
1064
1021
  getSessionAllowedTools(): readonly string[];
1065
1022
  getAutoCompactThreshold(): number | false;
1066
1023
  setAutoCompactThreshold?(threshold: TAutoCompactThreshold): void;
1024
+ getSessionTokenUsage?(): {
1025
+ inputTokens: number;
1026
+ outputTokens: number;
1027
+ } | undefined;
1028
+ getModelId?(): string | undefined;
1067
1029
  }
1068
1030
  interface ICommandSessionReplayValidationReport {
1069
1031
  logFile: string;
@@ -1131,6 +1093,8 @@ interface ISystemCommand {
1131
1093
  /** User-friendly display label (e.g., "Interaction Mode"). Falls back to `name` if not set. */
1132
1094
  displayName?: string;
1133
1095
  description: string;
1096
+ /** Optional usage example shown in /help output (e.g., "/compact Summarize the context"). */
1097
+ example?: string;
1134
1098
  modelInvocable?: boolean;
1135
1099
  userInvocable?: boolean;
1136
1100
  argumentHint?: string;
@@ -1217,6 +1181,7 @@ interface IProviderCommandSettingsAdapter {
1217
1181
  interface IProviderCommandModuleOptions {
1218
1182
  providerDefinitions: readonly IProviderDefinition[];
1219
1183
  settings: IProviderCommandSettingsAdapter;
1184
+ orgPolicy?: IOrgPolicy;
1220
1185
  }
1221
1186
  //#endregion
1222
1187
  //#region src/command-api/provider/provider-profile-names.d.ts
@@ -1290,41 +1255,6 @@ declare function readCommandBackgroundTaskLog(context: ICommandHostContext, task
1290
1255
  declare function cancelCommandBackgroundTask(context: ICommandHostContext, taskId: string, reason?: string): Promise<void>;
1291
1256
  declare function closeCommandBackgroundTask(context: ICommandHostContext, taskId: string): Promise<void>;
1292
1257
  //#endregion
1293
- //#region src/command-api/model/model-command-api.d.ts
1294
- declare const MODEL_COMMAND_DESCRIPTION = "Change AI model";
1295
- declare const MODEL_COMMAND_ARGUMENT_HINT = "<model-id>";
1296
- interface IModelCommandSettingsAdapter {
1297
- readMergedSettings(): TProviderSettingsDocument;
1298
- }
1299
- interface IModelCommandModuleOptions {
1300
- providerDefinitions: readonly IProviderDefinition[];
1301
- settings: IModelCommandSettingsAdapter;
1302
- }
1303
- interface IBuildModelCommandSubcommandsOptions {
1304
- source?: string;
1305
- providerDefinitions?: readonly IProviderDefinition[];
1306
- settings?: TProviderSettingsDocument;
1307
- }
1308
- interface IActiveProviderModelCatalogState {
1309
- providerType: string;
1310
- catalog?: IProviderModelCatalog;
1311
- refreshAttempted: boolean;
1312
- refreshMessage?: string;
1313
- }
1314
- interface IResolveActiveProviderModelCatalogStateOptions {
1315
- settings?: TProviderSettingsDocument;
1316
- providerDefinitions?: readonly IProviderDefinition[];
1317
- refresh?: boolean;
1318
- }
1319
- declare function buildModelCommandSubcommands(sourceOrOptions?: string | IBuildModelCommandSubcommandsOptions): ICommand[];
1320
- declare function formatModelCommandUsageMessage(options?: {
1321
- settings?: TProviderSettingsDocument;
1322
- providerDefinitions?: readonly IProviderDefinition[];
1323
- }): string;
1324
- declare function formatModelCommandUsageMessageAsync(options?: IResolveActiveProviderModelCatalogStateOptions): Promise<string>;
1325
- declare function resolveActiveProviderModelCatalog(settings: TProviderSettingsDocument | undefined, providerDefinitions?: readonly IProviderDefinition[]): IProviderModelCatalog | undefined;
1326
- declare function resolveActiveProviderModelCatalogState(options: IResolveActiveProviderModelCatalogStateOptions): Promise<IActiveProviderModelCatalogState | undefined>;
1327
- //#endregion
1328
1258
  //#region src/command-api/language/language-command-api.d.ts
1329
1259
  declare const LANGUAGE_COMMAND_DESCRIPTION = "Set response language";
1330
1260
  declare const LANGUAGE_COMMAND_ARGUMENT_HINT = "<code>";
@@ -1371,7 +1301,7 @@ declare const CLEAR_COMMAND_DESCRIPTION = "Clear conversation history";
1371
1301
  declare const RENAME_COMMAND_DESCRIPTION = "Rename the current session";
1372
1302
  declare const RENAME_COMMAND_USAGE = "Usage: rename <name>";
1373
1303
  declare const RESUME_COMMAND_DESCRIPTION = "Resume a previous session";
1374
- declare const COST_COMMAND_DESCRIPTION = "Show session info";
1304
+ declare const COST_COMMAND_DESCRIPTION = "Show session token usage and estimated cost. /cost budget <amount> sets a monthly budget.";
1375
1305
  declare const VALIDATE_SESSION_COMMAND_DESCRIPTION = "Validate current session replay log";
1376
1306
  declare const EXIT_COMMAND_DESCRIPTION = "Exit CLI";
1377
1307
  interface ICommandSessionInfo {
@@ -1914,6 +1844,76 @@ interface ISkillActivationHistoryData extends ISkillActivationEvent {
1914
1844
  readonly message: string;
1915
1845
  }
1916
1846
  //#endregion
1847
+ //#region src/interactive/interactive-session-background-tracker.d.ts
1848
+ interface IBackgroundTrackerState {
1849
+ tasks: IBackgroundTaskState[];
1850
+ taskEvents: TBackgroundTaskEvent[];
1851
+ groups: IBackgroundJobGroupState[];
1852
+ groupEvents: TBackgroundJobGroupEvent[];
1853
+ }
1854
+ declare class SessionBackgroundTaskTracker {
1855
+ private readonly getManager;
1856
+ private readonly onChanged;
1857
+ private readonly emitTaskEvent;
1858
+ private readonly emitGroupEvent;
1859
+ private readonly persistSession;
1860
+ private backgroundTasks;
1861
+ private backgroundTaskEvents;
1862
+ private backgroundJobGroups;
1863
+ private backgroundJobGroupEvents;
1864
+ private backgroundTaskUnsubscribe;
1865
+ private backgroundJobUnsubscribe;
1866
+ private backgroundJobOrchestrator;
1867
+ constructor(getManager: () => IBackgroundTaskManager | undefined, onChanged: (cause: TExecutionWorkspaceUpdateCause, entryId?: string) => void, emitTaskEvent: (event: TBackgroundTaskEvent) => void, emitGroupEvent: (event: TBackgroundJobGroupEvent) => void, persistSession: () => void);
1868
+ subscribe(session: Session): void;
1869
+ dispose(): void;
1870
+ restoreState(state: IBackgroundTrackerState): void;
1871
+ getState(): IBackgroundTrackerState;
1872
+ getManagerOrThrow(): IBackgroundTaskManager;
1873
+ getOrchestratorOrThrow(sessionId: string): BackgroundJobOrchestrator;
1874
+ cancelTask(taskId: string, reason?: string): Promise<void>;
1875
+ closeTask(taskId: string): Promise<void>;
1876
+ sendTask(taskId: string, input: IBackgroundTaskInput): Promise<void>;
1877
+ readTaskLog(taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
1878
+ listTasks(filter?: IBackgroundTaskListFilter): IBackgroundTaskState[];
1879
+ getTask(taskId: string): IBackgroundTaskState | undefined;
1880
+ createGroup(input: Omit<IBackgroundJobGroupCreateRequest, 'parentSessionId'>, sessionId: string): IBackgroundJobGroupState;
1881
+ listGroups(sessionId: string): IBackgroundJobGroupState[];
1882
+ getGroup(groupId: string, sessionId: string): IBackgroundJobGroupState | undefined;
1883
+ waitGroup(groupId: string, sessionId: string): Promise<IBackgroundJobGroupState>;
1884
+ readTaskDetail(entryId: string, taskId: string, cursor?: IExecutionDetailCursor): Promise<IExecutionDetailPage>;
1885
+ readGroupDetail(entryId: string, groupId: string, sessionId: string): IExecutionDetailPage;
1886
+ getTaskSnapshots(): IBackgroundTaskState[];
1887
+ getGroupSnapshots(): IBackgroundJobGroupState[];
1888
+ private subscribeGroupEvents;
1889
+ private recordTaskEvent;
1890
+ private recordGroupEvent;
1891
+ }
1892
+ //#endregion
1893
+ //#region src/tools/agent-tool.d.ts
1894
+ /** Dependencies injected at creation time via createAgentTool factory */
1895
+ interface IAgentToolDeps extends IInProcessSubagentRunnerDeps {
1896
+ cwd?: string;
1897
+ parentSessionId?: string;
1898
+ subagentDepth?: number;
1899
+ subagentManager?: ISubagentManager;
1900
+ backgroundTaskManager?: IBackgroundTaskManager;
1901
+ /** Optional custom agent registry for resolving non-built-in agent types. */
1902
+ customAgentRegistry?: (name: string) => IAgentDefinition | undefined;
1903
+ /** Model-visible and command-visible agent definitions available to this session. */
1904
+ agentDefinitions?: IAgentDefinition[];
1905
+ }
1906
+ /** Store agent tool deps keyed by a session (or any object). */
1907
+ declare function storeAgentToolDeps(key: object, deps: IAgentToolDeps): void;
1908
+ /** Retrieve agent tool deps for a given session key. */
1909
+ declare function retrieveAgentToolDeps(key: object): IAgentToolDeps | undefined;
1910
+ /**
1911
+ * Create an agent tool instance with deps captured in closure.
1912
+ *
1913
+ * Each session gets its own tool instance — no shared mutable state.
1914
+ */
1915
+ declare function createAgentTool(deps: IAgentToolDeps): ReturnType<typeof createZodFunctionTool>;
1916
+ //#endregion
1917
1917
  //#region src/interactive/interactive-session-agent-jobs.d.ts
1918
1918
  interface ISpawnAgentJobInput {
1919
1919
  agentType: string;
@@ -2027,8 +2027,9 @@ declare function resolveSessionIdByIdOrName(sessionStore: IInteractiveSessionSto
2027
2027
  //#endregion
2028
2028
  //#region src/interactive/types.d.ts
2029
2029
  /** Permission handler result — SDK-owned type (mirrors agent-sessions TPermissionResult).
2030
- * true = allow, false = deny, 'allow-session' = allow and remember for this session. */
2031
- type TPermissionResultValue = boolean | 'allow-session';
2030
+ * true = allow, false = deny, 'allow-session' = allow and remember for this session,
2031
+ * 'allow-project' = allow and persist to .robota/settings.local.json. */
2032
+ type TPermissionResultValue = boolean | 'allow-session' | 'allow-project';
2032
2033
  /** Tool execution state visible to clients. */
2033
2034
  interface IToolState {
2034
2035
  toolName: string;
@@ -2038,6 +2039,7 @@ interface IToolState {
2038
2039
  diffLines?: IDiffLine[];
2039
2040
  diffFile?: string;
2040
2041
  toolResultData?: string;
2042
+ executionId?: string;
2041
2043
  }
2042
2044
  /** A single diff line for Edit tool display. */
2043
2045
  interface IDiffLine {
@@ -2245,7 +2247,7 @@ interface ICreateSessionOptions {
2245
2247
  /** Callback when context window usage is refreshed */
2246
2248
  onContextUpdate?: (state: IContextWindowState) => void;
2247
2249
  /** Custom prompt-for-approval function (injected from CLI) */
2248
- promptForApproval?: (terminal: ITerminalOutput$1, toolName: string, toolArgs: TToolArgs) => Promise<boolean>;
2250
+ promptForApproval?: (terminal: ITerminalOutput$1, toolName: string, toolArgs: TToolArgs) => Promise<TPermissionResult>;
2249
2251
  /** Additional tools to register beyond the defaults (e.g. agent-tool) */
2250
2252
  additionalTools?: IToolWithEventService[];
2251
2253
  /** Additional background task runners composed by the runtime shell. */
@@ -2262,6 +2264,7 @@ interface ICreateSessionOptions {
2262
2264
  success?: boolean;
2263
2265
  denied?: boolean;
2264
2266
  toolResultData?: string;
2267
+ executionId?: string;
2265
2268
  }) => void;
2266
2269
  /** Callback when context is compacted */
2267
2270
  onCompact?: (summary: string) => void;
@@ -2287,6 +2290,10 @@ interface ICreateSessionOptions {
2287
2290
  sessionId?: string;
2288
2291
  /** Pre-approved tool names — added to permissions.allow as ToolName(*) patterns. */
2289
2292
  allowedTools?: string[];
2293
+ /** Denied tool names — added to permissions.deny as ToolName(*) patterns. denied > allowed. */
2294
+ deniedTools?: string[];
2295
+ /** Override the model from config. When set, takes precedence over config.provider.model. */
2296
+ model?: string;
2290
2297
  /** Text to append to the generated system prompt. */
2291
2298
  appendSystemPrompt?: string;
2292
2299
  /** Model command execution bridge. */
@@ -2303,6 +2310,10 @@ interface ICreateSessionOptions {
2303
2310
  sandboxClient?: ISandboxClient;
2304
2311
  /** Name reported to the underlying Robota agent config. Defaults to 'agent'. */
2305
2312
  agentName?: string;
2313
+ /** Request structured output from the provider for this session. */
2314
+ responseFormat?: {
2315
+ type: 'text' | 'json_object';
2316
+ };
2306
2317
  }
2307
2318
  //#endregion
2308
2319
  //#region src/assembly/create-tools.d.ts
@@ -2312,6 +2323,7 @@ interface ICreateSessionOptions {
2312
2323
  */
2313
2324
  interface ICreateDefaultToolsOptions {
2314
2325
  sandboxClient?: ISandboxClient;
2326
+ cwd?: string;
2315
2327
  }
2316
2328
  declare function createDefaultTools(options?: ICreateDefaultToolsOptions): IToolWithEventService[];
2317
2329
  //#endregion
@@ -2393,6 +2405,10 @@ interface IInteractiveSessionStandardOptions {
2393
2405
  bare?: boolean;
2394
2406
  /** Pre-approved tool names passed to createSession. */
2395
2407
  allowedTools?: string[];
2408
+ /** Denied tool names — added to permissions.deny. denied > allowed. */
2409
+ deniedTools?: string[];
2410
+ /** Override the model from config. When set, takes precedence over config.provider.model. */
2411
+ model?: string;
2396
2412
  /** Text to append to the system prompt. */
2397
2413
  appendSystemPrompt?: string;
2398
2414
  /** Replace the entire system prompt with this string. Takes precedence over the default builder. */
@@ -2411,6 +2427,8 @@ interface IInteractiveSessionStandardOptions {
2411
2427
  shellExec?: TShellExecFn;
2412
2428
  /** Model-visible command descriptors derived from the composed command executor. */
2413
2429
  commandDescriptors?: readonly ICapabilityDescriptor[];
2430
+ /** Provider definitions for hot-swap via /provider switch. */
2431
+ providerDefinitions?: readonly import('@robota-sdk/agent-core').IProviderDefinition[];
2414
2432
  /** Model command execution bridge. */
2415
2433
  modelCommandExecutor?: (command: string, args: string) => Promise<ICommandResult | null>;
2416
2434
  /** Predicate for commands allowed through the model command execution bridge. */
@@ -2429,6 +2447,14 @@ interface IInteractiveSessionStandardOptions {
2429
2447
  sandboxSnapshotId?: string;
2430
2448
  /** Name reported to the underlying Robota agent config. Defaults to 'agent'. */
2431
2449
  agentName?: string;
2450
+ /** Organization policy for enforcing provider restrictions, command blocks, and API key rules. */
2451
+ orgPolicy?: IOrgPolicy;
2452
+ /** Additional tools registered alongside the default CLI tools. */
2453
+ additionalTools?: IToolWithEventService[];
2454
+ /** Request structured output from the provider for this session. */
2455
+ responseFormat?: {
2456
+ type: 'text' | 'json_object';
2457
+ };
2432
2458
  }
2433
2459
  /** Test/advanced construction: inject pre-built session directly. */
2434
2460
  interface IInteractiveSessionInjectedOptions {
@@ -2490,6 +2516,7 @@ declare class SessionSkillRouter {
2490
2516
  name: string;
2491
2517
  displayName?: string;
2492
2518
  description: string;
2519
+ example?: string;
2493
2520
  }>;
2494
2521
  listSkills(): ICommandSkillListEntry[];
2495
2522
  listModelInvocableCommands(): Array<{
@@ -2542,6 +2569,7 @@ declare class SessionExecutionController {
2542
2569
  success?: boolean;
2543
2570
  denied?: boolean;
2544
2571
  toolResultData?: string;
2572
+ executionId?: string;
2545
2573
  }): void;
2546
2574
  emitExecutionWorkspaceUpdated(cause: TExecutionWorkspaceUpdateCause, entryId?: string): void;
2547
2575
  private drainPendingQueue;
@@ -2573,6 +2601,7 @@ declare abstract class InteractiveSessionBase {
2573
2601
  name: string;
2574
2602
  displayName?: string;
2575
2603
  description: string;
2604
+ example?: string;
2576
2605
  }>;
2577
2606
  listSkills(): ICommandSkillListEntry[];
2578
2607
  listModelInvocableCommands(): Array<{
@@ -2698,6 +2727,8 @@ declare class InteractiveSession extends InteractiveSessionBase implements ISess
2698
2727
  private agentsFileEntries;
2699
2728
  private claudeFileEntries;
2700
2729
  private rebuildSystemMessage;
2730
+ private providerDefinitions;
2731
+ private orgPolicy;
2701
2732
  protected readonly bgTracker: SessionBackgroundTaskTracker;
2702
2733
  protected readonly histTracker: SessionHistoryTracker;
2703
2734
  protected readonly skillRouter: SessionSkillRouter;
@@ -2730,6 +2761,8 @@ declare class InteractiveSession extends InteractiveSessionBase implements ISess
2730
2761
  private getBackgroundTaskManager;
2731
2762
  private captureSandboxSnapshot;
2732
2763
  private persistCurrentSession;
2764
+ private switchProvider;
2765
+ executeCommand(name: string, args: string): Promise<ICommandResult | null>;
2733
2766
  }
2734
2767
  //#endregion
2735
2768
  //#region src/query.d.ts
@@ -2746,7 +2779,15 @@ interface ICreateQueryOptions {
2746
2779
  permissionHandler?: TInteractivePermissionHandler;
2747
2780
  /** Streaming text callback. */
2748
2781
  onTextDelta?: (delta: string) => void;
2782
+ /** Additional tools registered alongside the default CLI tools. */
2783
+ additionalTools?: IToolWithEventService[];
2784
+ /** Request structured output from the provider. */
2785
+ responseFormat?: {
2786
+ type: 'text' | 'json_object';
2787
+ };
2749
2788
  }
2789
+ /** Type of the function returned by createQuery(). */
2790
+ type TQueryFunction = (prompt: string) => Promise<string>;
2750
2791
  /**
2751
2792
  * Create a prompt-only query function bound to a provider.
2752
2793
  *
@@ -2917,12 +2958,14 @@ declare function createCommandExecutionTool(deps: ICommandExecutionToolDeps): Re
2917
2958
  //#region src/tools/model-command-tool-projection.d.ts
2918
2959
  declare const MODEL_COMMAND_TOOL_PREFIX: "robota_command_";
2919
2960
  declare const PROVIDER_SAFE_TOOL_NAME_PATTERN: RegExp;
2920
- type TModelCommandDescriptor = Pick<ICapabilityDescriptor, 'name' | 'description' | 'argumentHint'>;
2961
+ type TModelCommandDescriptor = Pick<ICapabilityDescriptor, 'name' | 'description' | 'argumentHint' | 'requiresPermission'>;
2921
2962
  interface IProjectedModelCommandTool {
2922
2963
  readonly commandName: string;
2923
2964
  readonly toolName: string;
2924
2965
  readonly description: string;
2925
2966
  readonly descriptor: TModelCommandDescriptor;
2967
+ /** Mirrors the source command's requiresPermission flag. false = auto-approved. */
2968
+ readonly requiresPermission: boolean;
2926
2969
  }
2927
2970
  interface IModelCommandToolProjection {
2928
2971
  readonly commandTools: readonly IProjectedModelCommandTool[];
@@ -2969,6 +3012,7 @@ declare function projectPaths(cwd: string): {
2969
3012
  declare function userPaths(): {
2970
3013
  settings: string;
2971
3014
  sessions: string;
3015
+ onboarded: string;
2972
3016
  };
2973
3017
  //#endregion
2974
3018
  //#region src/context/task-context.d.ts
@@ -3000,7 +3044,7 @@ declare function loadTaskContext(cwd: string, options?: ITaskSelectionOptions, f
3000
3044
  declare function updateTaskFileStatus(taskPath: string, status: TTaskFileStatus, options?: IUpdateTaskFileStatusOptions, fs?: IFileSystem): void;
3001
3045
  //#endregion
3002
3046
  //#region src/permissions/permission-prompt.d.ts
3003
- declare function promptForApproval(terminal: ITerminalOutput$2, toolName: string, toolArgs: TToolArgs): Promise<boolean>;
3047
+ declare function promptForApproval(terminal: ITerminalOutput$2, toolName: string, toolArgs: TToolArgs): Promise<TPermissionResultValue>;
3004
3048
  //#endregion
3005
3049
  //#region src/testing/create-test-interactive-session.d.ts
3006
3050
  /** Creates a stub IInteractiveSession for use in tests. All methods return sensible defaults.
@@ -3024,46 +3068,6 @@ declare function resolveGitBranch(cwd: string): string | undefined;
3024
3068
  declare function compareSemverVersions(left: string, right: string): number;
3025
3069
  declare function isNewerSemverVersion(candidate: string, current: string): boolean;
3026
3070
  //#endregion
3027
- //#region src/runtime/agent-runtime.d.ts
3028
- interface IAgentRuntimeConfig {
3029
- cwd: string;
3030
- provider: IAIProvider;
3031
- commandModules?: readonly ICommandModule[];
3032
- commandHostAdapters?: ICommandHostAdapters;
3033
- backgroundTaskRunners?: IBackgroundTaskRunner$1[];
3034
- subagentRunnerFactory?: TSubagentRunnerFactory;
3035
- sessionStore?: IInteractiveSessionStore;
3036
- transportRegistry?: ITransportRegistryView<IInteractiveSession>;
3037
- reloadPluginCommandSource?: (registry: CommandRegistry) => void;
3038
- }
3039
- /** Session-specific options for IAgentRuntime.createSession(). Runtime fields (cwd, provider, etc.) are inherited automatically. */
3040
- interface IHeadlessSessionOptions {
3041
- permissionMode?: TPermissionMode;
3042
- maxTurns?: number;
3043
- sessionStore?: IInteractiveSessionStore;
3044
- sessionName?: string;
3045
- bare?: boolean;
3046
- allowedTools?: string[];
3047
- appendSystemPrompt?: string;
3048
- /** Replace the entire system prompt. Takes precedence over the default builder. */
3049
- systemPrompt?: string;
3050
- shellExec?: TShellExecFn;
3051
- agentName?: string;
3052
- }
3053
- interface IAgentRuntime {
3054
- readonly cwd: string;
3055
- readonly provider: IAIProvider;
3056
- readonly commandModules: readonly ICommandModule[];
3057
- readonly commandHostAdapters: ICommandHostAdapters;
3058
- readonly backgroundTaskRunners: IBackgroundTaskRunner$1[];
3059
- readonly subagentRunnerFactory: TSubagentRunnerFactory | undefined;
3060
- readonly sessionStore: IInteractiveSessionStore | undefined;
3061
- readonly transportRegistry: ITransportRegistryView<IInteractiveSession> | undefined;
3062
- readonly reloadPluginCommandSource: (registry: CommandRegistry) => void;
3063
- createSession(opts: IHeadlessSessionOptions): InteractiveSession;
3064
- }
3065
- declare function createAgentRuntime(config: IAgentRuntimeConfig): IAgentRuntime;
3066
- //#endregion
3067
3071
  //#region src/utils/read-package-version.d.ts
3068
3072
  declare function readPackageVersion(importMetaUrl: string): string;
3069
3073
  //#endregion
@@ -3123,5 +3127,66 @@ declare function shouldRunStartupCliUpdateCheck(input: IStartupCliUpdatePolicyIn
3123
3127
  declare function formatCliUpdateNotice(notice: ICliUpdateNotice): string;
3124
3128
  declare function formatCliUpdateCheckMessage(result: TCliUpdateCheckResult): string;
3125
3129
  //#endregion
3126
- 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 IActiveModelChangeOptions, type IActiveModelChangeResult, type IActiveProviderModelCatalogState, 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 IBuildModelCommandSubcommandsOptions, 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 ICommandInstalledPlugin, type ICommandInteraction, 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 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 IModelCommandModuleOptions, type IModelCommandSettingsAdapter, type IModelCommandToolProjection, type IPermissionsCommandState, 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 IResolveActiveProviderModelCatalogStateOptions, type IResolveUserLocalStorageRootOptions, 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 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, 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_ARGUMENT_HINT, MODEL_COMMAND_DESCRIPTION, 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, 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 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, buildModelCommandSubcommands, 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, createLineDetailPage, createMainThreadDetailPage, createMainThreadExecutionEntryId, createModelCommandToolProjection, createPluginRegistryReloadRequestedEffect, createPluginTuiRequestedEffect, createProjectSessionStore, createProjectedCommandExecutionTools, createPromptFileReferenceHistoryEntry, createProviderFromSettings, createProviderSafeModelCommandToolName, createQuery, createSessionExitRequestedEffect, createSessionPickerRequestedEffect, createSessionRenamedEffect, createSubagentLogger, createSubagentSession, createSystemCommands, createTestInteractiveSession, deleteProviderProfile, deleteSettings, deleteUserLocalMemoryItem, disableUserLocalMemoryItem, discoverTaskFiles, evaluateReversibleToolSafety, executeSkill, formatCliUpdateCheckMessage, formatCliUpdateNotice, formatCommandBackgroundTask, formatCommandBackgroundTaskList, formatCommandHelpMessage, formatCommandPermissionsMessage, formatCommandSessionReplayValidationReport, formatEnvReference, formatInvalidPermissionModeMessage, formatLanguageUsageMessage, formatModelCommandUsageMessage, formatModelCommandUsageMessageAsync, formatProjectedModelCommandToolPromptDescription, formatPromptFileReferenceDiagnostics, formatTaskContext, getBuiltInAgent, getForkWorkerSuffix, getProviderSettingsPaths, getStartupCliUpdateNotice, getSubagentSuffix, getUserSettingsPath, getUserUpdateCheckCachePath, hasBlockingPromptFileReferenceDiagnostics, hasSensitiveCommandMemoryContent, hasUsableSecretReference, inspectCommandEditCheckpoint, inspectUserLocalMemoryItem, inspectUserLocalStorage, isCommandMemoryType, isEnvReference, isMemoryType, isNewerSemverVersion, isPermissionMode, isStatusLineCommandSettingsPatch, listActiveContextReferences, listCommandBackgroundTasks, listCommandContextReferences, listCommandEditCheckpoints, listCommandSessionAllowedTools, listCommandUsedMemoryReferences, listResumableSessionSummaries, listUserLocalMemoryItems, loadTaskContext, mergeProviderPatch, mergeProviders, mergeSettings, normalizeModelCommandName, parseCommandBackgroundLogCursor, parseExecutionWorkspaceEntryId, parseFrontmatter, 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, resolveActiveProviderModelCatalog, resolveActiveProviderModelCatalogState, 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, transitionSelfHostingLoop, updateModelInSettings, updateTaskFileStatus, upsertContextReference, upsertProviderProfile, userPaths, validateCommandSessionReplayLog, validateProviderProfile, wrapEditCheckpointTools, wrapReversibleExecutionTools, writeAutoCompactThresholdSetting, writeCommandPermissionMode, writeSettings, writeUpdateCheckCache };
3130
+ //#region src/runtime/agent-runtime.d.ts
3131
+ interface IAgentRuntimeConfig {
3132
+ cwd: string;
3133
+ provider: IAIProvider;
3134
+ commandModules?: readonly ICommandModule[];
3135
+ commandHostAdapters?: ICommandHostAdapters;
3136
+ backgroundTaskRunners?: IBackgroundTaskRunner$1[];
3137
+ subagentRunnerFactory?: TSubagentRunnerFactory;
3138
+ sessionStore?: IInteractiveSessionStore;
3139
+ transportRegistry?: ITransportRegistryView<IInteractiveSession>;
3140
+ reloadPluginCommandSource?: (registry: CommandRegistry) => void;
3141
+ orgPolicy?: IOrgPolicy;
3142
+ }
3143
+ /** Session-specific options for IAgentRuntime.createSession(). Runtime fields (cwd, provider, etc.) are inherited automatically. */
3144
+ interface IHeadlessSessionOptions {
3145
+ permissionMode?: TPermissionMode;
3146
+ maxTurns?: number;
3147
+ sessionStore?: IInteractiveSessionStore;
3148
+ sessionName?: string;
3149
+ bare?: boolean;
3150
+ allowedTools?: string[];
3151
+ /** Denied tool names — added to permissions.deny. denied > allowed. */
3152
+ deniedTools?: string[];
3153
+ /** Override the model from config. When set, takes precedence over config.provider.model. */
3154
+ model?: string;
3155
+ appendSystemPrompt?: string;
3156
+ /** Replace the entire system prompt. Takes precedence over the default builder. */
3157
+ systemPrompt?: string;
3158
+ shellExec?: TShellExecFn;
3159
+ agentName?: string;
3160
+ /** Additional tools registered alongside the default CLI tools. */
3161
+ additionalTools?: IToolWithEventService[];
3162
+ /** Resume an existing persisted session by ID. Requires sessionStore to be configured. */
3163
+ resumeSessionId?: string;
3164
+ /** Request structured output from the provider for this session. */
3165
+ responseFormat?: {
3166
+ type: 'text' | 'json_object';
3167
+ };
3168
+ }
3169
+ interface IAgentRuntime {
3170
+ readonly cwd: string;
3171
+ readonly provider: IAIProvider;
3172
+ readonly commandModules: readonly ICommandModule[];
3173
+ readonly commandHostAdapters: ICommandHostAdapters;
3174
+ readonly backgroundTaskRunners: IBackgroundTaskRunner$1[];
3175
+ readonly subagentRunnerFactory: TSubagentRunnerFactory | undefined;
3176
+ readonly sessionStore: IInteractiveSessionStore | undefined;
3177
+ readonly transportRegistry: ITransportRegistryView<IInteractiveSession> | undefined;
3178
+ readonly reloadPluginCommandSource: (registry: CommandRegistry) => void;
3179
+ createSession(opts: IHeadlessSessionOptions): InteractiveSession;
3180
+ }
3181
+ declare function createAgentRuntime(config: IAgentRuntimeConfig): IAgentRuntime;
3182
+ //#endregion
3183
+ //#region src/runtime/stateless-runtime.d.ts
3184
+ interface IStatelessRuntimeConfig {
3185
+ provider: IAIProvider;
3186
+ /** Working directory. Defaults to process.cwd(). Not used for file I/O in stateless mode. */
3187
+ cwd?: string;
3188
+ }
3189
+ declare function createStatelessRuntime(config: IStatelessRuntimeConfig): IAgentRuntime;
3190
+ //#endregion
3191
+ 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 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 ICommandInstalledPlugin, type ICommandInteraction, 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 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 IPermissionsCommandState, 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, 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, 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, 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, isStatusLineCommandSettingsPatch, listActiveContextReferences, listCommandBackgroundTasks, listCommandContextReferences, listCommandEditCheckpoints, listCommandSessionAllowedTools, listCommandUsedMemoryReferences, listResumableSessionSummaries, listUserLocalMemoryItems, loadOrgPolicy, loadTaskContext, mergeProviderPatch, mergeProviders, mergeSettings, normalizeModelCommandName, parseCommandBackgroundLogCursor, parseExecutionWorkspaceEntryId, parseFrontmatter, 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, transitionSelfHostingLoop, updateModelInSettings, updateTaskFileStatus, upsertContextReference, upsertProviderProfile, userPaths, validateCommandSessionReplayLog, validateProviderProfile, wrapEditCheckpointTools, wrapReversibleExecutionTools, writeAutoCompactThresholdSetting, writeCommandPermissionMode, writeSettings, writeUpdateCheckCache };
3127
3192
  //# sourceMappingURL=index.d.ts.map