@robota-sdk/agent-framework 3.0.0-beta.67 → 3.0.0-beta.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/node/index.cjs +41 -41
- package/dist/node/index.d.ts +662 -594
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +41 -41
- package/dist/node/index.js.map +1 -1
- package/package.json +23 -6
package/dist/node/index.d.ts
CHANGED
|
@@ -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 {
|
|
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/
|
|
277
|
-
interface
|
|
278
|
-
|
|
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;
|
|
@@ -880,7 +659,7 @@ interface IPromptFileReferenceHistoryData {
|
|
|
880
659
|
}
|
|
881
660
|
//#endregion
|
|
882
661
|
//#region src/context/context-reference-inventory.d.ts
|
|
883
|
-
type TContextReferenceLoadType = 'manual' | 'prompt-reference';
|
|
662
|
+
type TContextReferenceLoadType = 'manual' | 'prompt-reference' | 'system';
|
|
884
663
|
type TContextReferenceStatus = 'active' | 'observed';
|
|
885
664
|
interface IContextReferenceItem {
|
|
886
665
|
id: 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
|
|
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;
|
|
@@ -1957,6 +1957,7 @@ declare class SessionHistoryTracker {
|
|
|
1957
1957
|
private memoryEvents;
|
|
1958
1958
|
private usedMemoryReferences;
|
|
1959
1959
|
private contextReferences;
|
|
1960
|
+
private systemContextReferences;
|
|
1960
1961
|
private skillActivationEvents;
|
|
1961
1962
|
constructor(cwd: string, getSessionId: () => string, getExecuting: () => boolean, persistSession: () => void, emitSkillActivation: (event: ISkillActivationEvent) => void, editCheckpointStore?: EditCheckpointStore | null);
|
|
1962
1963
|
restoreState(state: IHistoryTrackerState): void;
|
|
@@ -1976,7 +1977,9 @@ declare class SessionHistoryTracker {
|
|
|
1976
1977
|
setEditCheckpointStore(store: EditCheckpointStore): void;
|
|
1977
1978
|
getUsedMemoryReferences(): IMemoryReference[];
|
|
1978
1979
|
recordMemoryEvent(event: IMemoryEvent): void;
|
|
1980
|
+
recordSystemContextFiles(entries: readonly IContextFileEntry[]): void;
|
|
1979
1981
|
listContextReferences(): IContextReferenceItem[];
|
|
1982
|
+
listInjectionContextReferences(): IContextReferenceItem[];
|
|
1980
1983
|
addContextReference(path: string): Promise<IContextReferenceAddResult>;
|
|
1981
1984
|
removeContextReference(path: string): IContextReferenceRemoveResult;
|
|
1982
1985
|
clearContextReferences(): IContextReferenceClearResult;
|
|
@@ -2027,8 +2030,9 @@ declare function resolveSessionIdByIdOrName(sessionStore: IInteractiveSessionSto
|
|
|
2027
2030
|
//#endregion
|
|
2028
2031
|
//#region src/interactive/types.d.ts
|
|
2029
2032
|
/** Permission handler result — SDK-owned type (mirrors agent-sessions TPermissionResult).
|
|
2030
|
-
* true = allow, false = deny, 'allow-session' = allow and remember for this session
|
|
2031
|
-
|
|
2033
|
+
* true = allow, false = deny, 'allow-session' = allow and remember for this session,
|
|
2034
|
+
* 'allow-project' = allow and persist to .robota/settings.local.json. */
|
|
2035
|
+
type TPermissionResultValue = boolean | 'allow-session' | 'allow-project';
|
|
2032
2036
|
/** Tool execution state visible to clients. */
|
|
2033
2037
|
interface IToolState {
|
|
2034
2038
|
toolName: string;
|
|
@@ -2038,6 +2042,7 @@ interface IToolState {
|
|
|
2038
2042
|
diffLines?: IDiffLine[];
|
|
2039
2043
|
diffFile?: string;
|
|
2040
2044
|
toolResultData?: string;
|
|
2045
|
+
executionId?: string;
|
|
2041
2046
|
}
|
|
2042
2047
|
/** A single diff line for Edit tool display. */
|
|
2043
2048
|
interface IDiffLine {
|
|
@@ -2245,7 +2250,7 @@ interface ICreateSessionOptions {
|
|
|
2245
2250
|
/** Callback when context window usage is refreshed */
|
|
2246
2251
|
onContextUpdate?: (state: IContextWindowState) => void;
|
|
2247
2252
|
/** Custom prompt-for-approval function (injected from CLI) */
|
|
2248
|
-
promptForApproval?: (terminal: ITerminalOutput$1, toolName: string, toolArgs: TToolArgs) => Promise<
|
|
2253
|
+
promptForApproval?: (terminal: ITerminalOutput$1, toolName: string, toolArgs: TToolArgs) => Promise<TPermissionResult>;
|
|
2249
2254
|
/** Additional tools to register beyond the defaults (e.g. agent-tool) */
|
|
2250
2255
|
additionalTools?: IToolWithEventService[];
|
|
2251
2256
|
/** Additional background task runners composed by the runtime shell. */
|
|
@@ -2262,6 +2267,7 @@ interface ICreateSessionOptions {
|
|
|
2262
2267
|
success?: boolean;
|
|
2263
2268
|
denied?: boolean;
|
|
2264
2269
|
toolResultData?: string;
|
|
2270
|
+
executionId?: string;
|
|
2265
2271
|
}) => void;
|
|
2266
2272
|
/** Callback when context is compacted */
|
|
2267
2273
|
onCompact?: (summary: string) => void;
|
|
@@ -2287,6 +2293,10 @@ interface ICreateSessionOptions {
|
|
|
2287
2293
|
sessionId?: string;
|
|
2288
2294
|
/** Pre-approved tool names — added to permissions.allow as ToolName(*) patterns. */
|
|
2289
2295
|
allowedTools?: string[];
|
|
2296
|
+
/** Denied tool names — added to permissions.deny as ToolName(*) patterns. denied > allowed. */
|
|
2297
|
+
deniedTools?: string[];
|
|
2298
|
+
/** Override the model from config. When set, takes precedence over config.provider.model. */
|
|
2299
|
+
model?: string;
|
|
2290
2300
|
/** Text to append to the generated system prompt. */
|
|
2291
2301
|
appendSystemPrompt?: string;
|
|
2292
2302
|
/** Model command execution bridge. */
|
|
@@ -2303,6 +2313,10 @@ interface ICreateSessionOptions {
|
|
|
2303
2313
|
sandboxClient?: ISandboxClient;
|
|
2304
2314
|
/** Name reported to the underlying Robota agent config. Defaults to 'agent'. */
|
|
2305
2315
|
agentName?: string;
|
|
2316
|
+
/** Request structured output from the provider for this session. */
|
|
2317
|
+
responseFormat?: {
|
|
2318
|
+
type: 'text' | 'json_object';
|
|
2319
|
+
};
|
|
2306
2320
|
}
|
|
2307
2321
|
//#endregion
|
|
2308
2322
|
//#region src/assembly/create-tools.d.ts
|
|
@@ -2312,6 +2326,7 @@ interface ICreateSessionOptions {
|
|
|
2312
2326
|
*/
|
|
2313
2327
|
interface ICreateDefaultToolsOptions {
|
|
2314
2328
|
sandboxClient?: ISandboxClient;
|
|
2329
|
+
cwd?: string;
|
|
2315
2330
|
}
|
|
2316
2331
|
declare function createDefaultTools(options?: ICreateDefaultToolsOptions): IToolWithEventService[];
|
|
2317
2332
|
//#endregion
|
|
@@ -2393,6 +2408,10 @@ interface IInteractiveSessionStandardOptions {
|
|
|
2393
2408
|
bare?: boolean;
|
|
2394
2409
|
/** Pre-approved tool names passed to createSession. */
|
|
2395
2410
|
allowedTools?: string[];
|
|
2411
|
+
/** Denied tool names — added to permissions.deny. denied > allowed. */
|
|
2412
|
+
deniedTools?: string[];
|
|
2413
|
+
/** Override the model from config. When set, takes precedence over config.provider.model. */
|
|
2414
|
+
model?: string;
|
|
2396
2415
|
/** Text to append to the system prompt. */
|
|
2397
2416
|
appendSystemPrompt?: string;
|
|
2398
2417
|
/** Replace the entire system prompt with this string. Takes precedence over the default builder. */
|
|
@@ -2411,6 +2430,8 @@ interface IInteractiveSessionStandardOptions {
|
|
|
2411
2430
|
shellExec?: TShellExecFn;
|
|
2412
2431
|
/** Model-visible command descriptors derived from the composed command executor. */
|
|
2413
2432
|
commandDescriptors?: readonly ICapabilityDescriptor[];
|
|
2433
|
+
/** Provider definitions for hot-swap via /provider switch. */
|
|
2434
|
+
providerDefinitions?: readonly import('@robota-sdk/agent-core').IProviderDefinition[];
|
|
2414
2435
|
/** Model command execution bridge. */
|
|
2415
2436
|
modelCommandExecutor?: (command: string, args: string) => Promise<ICommandResult | null>;
|
|
2416
2437
|
/** Predicate for commands allowed through the model command execution bridge. */
|
|
@@ -2429,6 +2450,14 @@ interface IInteractiveSessionStandardOptions {
|
|
|
2429
2450
|
sandboxSnapshotId?: string;
|
|
2430
2451
|
/** Name reported to the underlying Robota agent config. Defaults to 'agent'. */
|
|
2431
2452
|
agentName?: string;
|
|
2453
|
+
/** Organization policy for enforcing provider restrictions, command blocks, and API key rules. */
|
|
2454
|
+
orgPolicy?: IOrgPolicy;
|
|
2455
|
+
/** Additional tools registered alongside the default CLI tools. */
|
|
2456
|
+
additionalTools?: IToolWithEventService[];
|
|
2457
|
+
/** Request structured output from the provider for this session. */
|
|
2458
|
+
responseFormat?: {
|
|
2459
|
+
type: 'text' | 'json_object';
|
|
2460
|
+
};
|
|
2432
2461
|
}
|
|
2433
2462
|
/** Test/advanced construction: inject pre-built session directly. */
|
|
2434
2463
|
interface IInteractiveSessionInjectedOptions {
|
|
@@ -2490,6 +2519,7 @@ declare class SessionSkillRouter {
|
|
|
2490
2519
|
name: string;
|
|
2491
2520
|
displayName?: string;
|
|
2492
2521
|
description: string;
|
|
2522
|
+
example?: string;
|
|
2493
2523
|
}>;
|
|
2494
2524
|
listSkills(): ICommandSkillListEntry[];
|
|
2495
2525
|
listModelInvocableCommands(): Array<{
|
|
@@ -2542,6 +2572,7 @@ declare class SessionExecutionController {
|
|
|
2542
2572
|
success?: boolean;
|
|
2543
2573
|
denied?: boolean;
|
|
2544
2574
|
toolResultData?: string;
|
|
2575
|
+
executionId?: string;
|
|
2545
2576
|
}): void;
|
|
2546
2577
|
emitExecutionWorkspaceUpdated(cause: TExecutionWorkspaceUpdateCause, entryId?: string): void;
|
|
2547
2578
|
private drainPendingQueue;
|
|
@@ -2573,6 +2604,7 @@ declare abstract class InteractiveSessionBase {
|
|
|
2573
2604
|
name: string;
|
|
2574
2605
|
displayName?: string;
|
|
2575
2606
|
description: string;
|
|
2607
|
+
example?: string;
|
|
2576
2608
|
}>;
|
|
2577
2609
|
listSkills(): ICommandSkillListEntry[];
|
|
2578
2610
|
listModelInvocableCommands(): Array<{
|
|
@@ -2698,6 +2730,8 @@ declare class InteractiveSession extends InteractiveSessionBase implements ISess
|
|
|
2698
2730
|
private agentsFileEntries;
|
|
2699
2731
|
private claudeFileEntries;
|
|
2700
2732
|
private rebuildSystemMessage;
|
|
2733
|
+
private providerDefinitions;
|
|
2734
|
+
private orgPolicy;
|
|
2701
2735
|
protected readonly bgTracker: SessionBackgroundTaskTracker;
|
|
2702
2736
|
protected readonly histTracker: SessionHistoryTracker;
|
|
2703
2737
|
protected readonly skillRouter: SessionSkillRouter;
|
|
@@ -2730,6 +2764,8 @@ declare class InteractiveSession extends InteractiveSessionBase implements ISess
|
|
|
2730
2764
|
private getBackgroundTaskManager;
|
|
2731
2765
|
private captureSandboxSnapshot;
|
|
2732
2766
|
private persistCurrentSession;
|
|
2767
|
+
private switchProvider;
|
|
2768
|
+
executeCommand(name: string, args: string): Promise<ICommandResult | null>;
|
|
2733
2769
|
}
|
|
2734
2770
|
//#endregion
|
|
2735
2771
|
//#region src/query.d.ts
|
|
@@ -2746,7 +2782,15 @@ interface ICreateQueryOptions {
|
|
|
2746
2782
|
permissionHandler?: TInteractivePermissionHandler;
|
|
2747
2783
|
/** Streaming text callback. */
|
|
2748
2784
|
onTextDelta?: (delta: string) => void;
|
|
2785
|
+
/** Additional tools registered alongside the default CLI tools. */
|
|
2786
|
+
additionalTools?: IToolWithEventService[];
|
|
2787
|
+
/** Request structured output from the provider. */
|
|
2788
|
+
responseFormat?: {
|
|
2789
|
+
type: 'text' | 'json_object';
|
|
2790
|
+
};
|
|
2749
2791
|
}
|
|
2792
|
+
/** Type of the function returned by createQuery(). */
|
|
2793
|
+
type TQueryFunction = (prompt: string) => Promise<string>;
|
|
2750
2794
|
/**
|
|
2751
2795
|
* Create a prompt-only query function bound to a provider.
|
|
2752
2796
|
*
|
|
@@ -2917,12 +2961,14 @@ declare function createCommandExecutionTool(deps: ICommandExecutionToolDeps): Re
|
|
|
2917
2961
|
//#region src/tools/model-command-tool-projection.d.ts
|
|
2918
2962
|
declare const MODEL_COMMAND_TOOL_PREFIX: "robota_command_";
|
|
2919
2963
|
declare const PROVIDER_SAFE_TOOL_NAME_PATTERN: RegExp;
|
|
2920
|
-
type TModelCommandDescriptor = Pick<ICapabilityDescriptor, 'name' | 'description' | 'argumentHint'>;
|
|
2964
|
+
type TModelCommandDescriptor = Pick<ICapabilityDescriptor, 'name' | 'description' | 'argumentHint' | 'requiresPermission'>;
|
|
2921
2965
|
interface IProjectedModelCommandTool {
|
|
2922
2966
|
readonly commandName: string;
|
|
2923
2967
|
readonly toolName: string;
|
|
2924
2968
|
readonly description: string;
|
|
2925
2969
|
readonly descriptor: TModelCommandDescriptor;
|
|
2970
|
+
/** Mirrors the source command's requiresPermission flag. false = auto-approved. */
|
|
2971
|
+
readonly requiresPermission: boolean;
|
|
2926
2972
|
}
|
|
2927
2973
|
interface IModelCommandToolProjection {
|
|
2928
2974
|
readonly commandTools: readonly IProjectedModelCommandTool[];
|
|
@@ -2969,6 +3015,7 @@ declare function projectPaths(cwd: string): {
|
|
|
2969
3015
|
declare function userPaths(): {
|
|
2970
3016
|
settings: string;
|
|
2971
3017
|
sessions: string;
|
|
3018
|
+
onboarded: string;
|
|
2972
3019
|
};
|
|
2973
3020
|
//#endregion
|
|
2974
3021
|
//#region src/context/task-context.d.ts
|
|
@@ -3000,7 +3047,7 @@ declare function loadTaskContext(cwd: string, options?: ITaskSelectionOptions, f
|
|
|
3000
3047
|
declare function updateTaskFileStatus(taskPath: string, status: TTaskFileStatus, options?: IUpdateTaskFileStatusOptions, fs?: IFileSystem): void;
|
|
3001
3048
|
//#endregion
|
|
3002
3049
|
//#region src/permissions/permission-prompt.d.ts
|
|
3003
|
-
declare function promptForApproval(terminal: ITerminalOutput$2, toolName: string, toolArgs: TToolArgs): Promise<
|
|
3050
|
+
declare function promptForApproval(terminal: ITerminalOutput$2, toolName: string, toolArgs: TToolArgs): Promise<TPermissionResultValue>;
|
|
3004
3051
|
//#endregion
|
|
3005
3052
|
//#region src/testing/create-test-interactive-session.d.ts
|
|
3006
3053
|
/** Creates a stub IInteractiveSession for use in tests. All methods return sensible defaults.
|
|
@@ -3024,46 +3071,6 @@ declare function resolveGitBranch(cwd: string): string | undefined;
|
|
|
3024
3071
|
declare function compareSemverVersions(left: string, right: string): number;
|
|
3025
3072
|
declare function isNewerSemverVersion(candidate: string, current: string): boolean;
|
|
3026
3073
|
//#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
3074
|
//#region src/utils/read-package-version.d.ts
|
|
3068
3075
|
declare function readPackageVersion(importMetaUrl: string): string;
|
|
3069
3076
|
//#endregion
|
|
@@ -3123,5 +3130,66 @@ declare function shouldRunStartupCliUpdateCheck(input: IStartupCliUpdatePolicyIn
|
|
|
3123
3130
|
declare function formatCliUpdateNotice(notice: ICliUpdateNotice): string;
|
|
3124
3131
|
declare function formatCliUpdateCheckMessage(result: TCliUpdateCheckResult): string;
|
|
3125
3132
|
//#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 };
|
|
3133
|
+
//#region src/runtime/agent-runtime.d.ts
|
|
3134
|
+
interface IAgentRuntimeConfig {
|
|
3135
|
+
cwd: string;
|
|
3136
|
+
provider: IAIProvider;
|
|
3137
|
+
commandModules?: readonly ICommandModule[];
|
|
3138
|
+
commandHostAdapters?: ICommandHostAdapters;
|
|
3139
|
+
backgroundTaskRunners?: IBackgroundTaskRunner$1[];
|
|
3140
|
+
subagentRunnerFactory?: TSubagentRunnerFactory;
|
|
3141
|
+
sessionStore?: IInteractiveSessionStore;
|
|
3142
|
+
transportRegistry?: ITransportRegistryView<IInteractiveSession>;
|
|
3143
|
+
reloadPluginCommandSource?: (registry: CommandRegistry) => void;
|
|
3144
|
+
orgPolicy?: IOrgPolicy;
|
|
3145
|
+
}
|
|
3146
|
+
/** Session-specific options for IAgentRuntime.createSession(). Runtime fields (cwd, provider, etc.) are inherited automatically. */
|
|
3147
|
+
interface IHeadlessSessionOptions {
|
|
3148
|
+
permissionMode?: TPermissionMode;
|
|
3149
|
+
maxTurns?: number;
|
|
3150
|
+
sessionStore?: IInteractiveSessionStore;
|
|
3151
|
+
sessionName?: string;
|
|
3152
|
+
bare?: boolean;
|
|
3153
|
+
allowedTools?: string[];
|
|
3154
|
+
/** Denied tool names — added to permissions.deny. denied > allowed. */
|
|
3155
|
+
deniedTools?: string[];
|
|
3156
|
+
/** Override the model from config. When set, takes precedence over config.provider.model. */
|
|
3157
|
+
model?: string;
|
|
3158
|
+
appendSystemPrompt?: string;
|
|
3159
|
+
/** Replace the entire system prompt. Takes precedence over the default builder. */
|
|
3160
|
+
systemPrompt?: string;
|
|
3161
|
+
shellExec?: TShellExecFn;
|
|
3162
|
+
agentName?: string;
|
|
3163
|
+
/** Additional tools registered alongside the default CLI tools. */
|
|
3164
|
+
additionalTools?: IToolWithEventService[];
|
|
3165
|
+
/** Resume an existing persisted session by ID. Requires sessionStore to be configured. */
|
|
3166
|
+
resumeSessionId?: string;
|
|
3167
|
+
/** Request structured output from the provider for this session. */
|
|
3168
|
+
responseFormat?: {
|
|
3169
|
+
type: 'text' | 'json_object';
|
|
3170
|
+
};
|
|
3171
|
+
}
|
|
3172
|
+
interface IAgentRuntime {
|
|
3173
|
+
readonly cwd: string;
|
|
3174
|
+
readonly provider: IAIProvider;
|
|
3175
|
+
readonly commandModules: readonly ICommandModule[];
|
|
3176
|
+
readonly commandHostAdapters: ICommandHostAdapters;
|
|
3177
|
+
readonly backgroundTaskRunners: IBackgroundTaskRunner$1[];
|
|
3178
|
+
readonly subagentRunnerFactory: TSubagentRunnerFactory | undefined;
|
|
3179
|
+
readonly sessionStore: IInteractiveSessionStore | undefined;
|
|
3180
|
+
readonly transportRegistry: ITransportRegistryView<IInteractiveSession> | undefined;
|
|
3181
|
+
readonly reloadPluginCommandSource: (registry: CommandRegistry) => void;
|
|
3182
|
+
createSession(opts: IHeadlessSessionOptions): InteractiveSession;
|
|
3183
|
+
}
|
|
3184
|
+
declare function createAgentRuntime(config: IAgentRuntimeConfig): IAgentRuntime;
|
|
3185
|
+
//#endregion
|
|
3186
|
+
//#region src/runtime/stateless-runtime.d.ts
|
|
3187
|
+
interface IStatelessRuntimeConfig {
|
|
3188
|
+
provider: IAIProvider;
|
|
3189
|
+
/** Working directory. Defaults to process.cwd(). Not used for file I/O in stateless mode. */
|
|
3190
|
+
cwd?: string;
|
|
3191
|
+
}
|
|
3192
|
+
declare function createStatelessRuntime(config: IStatelessRuntimeConfig): IAgentRuntime;
|
|
3193
|
+
//#endregion
|
|
3194
|
+
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
3195
|
//# sourceMappingURL=index.d.ts.map
|