@robota-sdk/agent-framework 3.0.0-beta.65 → 3.0.0-beta.67
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/dist/node/index.cjs +50 -48
- package/dist/node/index.d.ts +713 -552
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +50 -48
- package/dist/node/index.js.map +1 -1
- package/package.json +6 -6
package/dist/node/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IAIProvider, IContextWindowState, IFileSystem, IFileSystemAsync, IHistoryEntry, IHookInput, IHookResult, IHookTypeExecutor, IProviderConfig, IProviderDefinition,
|
|
3
|
-
import {
|
|
4
|
-
import { IAgentBackgroundTaskRequest, IBackgroundTaskError, IBackgroundTaskError as IBackgroundTaskError$1, IBackgroundTaskHandle, IBackgroundTaskInput, IBackgroundTaskListFilter, IBackgroundTaskLogCursor, IBackgroundTaskLogCursor as IBackgroundTaskLogCursor$1, IBackgroundTaskLogPage, IBackgroundTaskManager, IBackgroundTaskManager as IBackgroundTaskManager$1, IBackgroundTaskManagerOptions, IBackgroundTaskResult, IBackgroundTaskRunner, IBackgroundTaskStart, IBackgroundTaskState, IBackgroundTaskState as IBackgroundTaskState$1, IBaseBackgroundTaskRequest, ICreateLimitedOutputCaptureOptions, ILimitedOutputCapture, IPreparedSubagentWorktree, IProcessBackgroundTaskRequest, ISerializableProviderProfile, ISubagentJobHandle, ISubagentJobResult, ISubagentJobStart, ISubagentJobState, ISubagentManager, ISubagentManagerOptions, ISubagentRunner, ISubagentRunner as ISubagentRunner$1, ISubagentSpawnRequest, ISubagentWorktreeAdapter, ISubagentWorktreePrepareRequest, IWorktreeSubagentRunnerOptions, TBackgroundPermissionPolicy, TBackgroundPermissionPolicy as TBackgroundPermissionPolicy$1, TBackgroundPrimitive, TBackgroundPrimitive as TBackgroundPrimitive$1, TBackgroundTaskErrorCategory, TBackgroundTaskEvent, TBackgroundTaskEventListener, TBackgroundTaskIdFactory, TBackgroundTaskIsolation, TBackgroundTaskIsolation as TBackgroundTaskIsolation$1, TBackgroundTaskKind, TBackgroundTaskKind as TBackgroundTaskKind$1, TBackgroundTaskMode, TBackgroundTaskMode as TBackgroundTaskMode$1, TBackgroundTaskRequest, TBackgroundTaskRunnerEvent, TBackgroundTaskStatus, TBackgroundTaskStatus as TBackgroundTaskStatus$1, TBackgroundTaskTimeoutReason, TBackgroundTaskTransitionEvent, TSubagentJobMode, TSubagentJobStatus } from "@robota-sdk/agent-executor";
|
|
1
|
+
import { IAgentBackgroundTaskRequest, IBackgroundTaskError, IBackgroundTaskError as IBackgroundTaskError$1, IBackgroundTaskHandle, IBackgroundTaskInput, IBackgroundTaskListFilter, IBackgroundTaskLogCursor, IBackgroundTaskLogCursor as IBackgroundTaskLogCursor$1, IBackgroundTaskLogPage, IBackgroundTaskManager, IBackgroundTaskManager as IBackgroundTaskManager$1, IBackgroundTaskManagerOptions, IBackgroundTaskResult, IBackgroundTaskRunner, IBackgroundTaskRunner as IBackgroundTaskRunner$1, IBackgroundTaskStart, IBackgroundTaskState, IBackgroundTaskState as IBackgroundTaskState$1, IBaseBackgroundTaskRequest, ICreateLimitedOutputCaptureOptions, ILimitedOutputCapture, IPreparedSubagentWorktree, IProcessBackgroundTaskRequest, ISerializableProviderProfile, ISubagentJobHandle, ISubagentJobResult, ISubagentJobStart, ISubagentJobState, ISubagentManager, ISubagentManagerOptions, ISubagentRunner, ISubagentRunner as ISubagentRunner$1, ISubagentSpawnRequest, ISubagentWorktreeAdapter, ISubagentWorktreePrepareRequest, IWorktreeSubagentRunnerOptions, TBackgroundPermissionPolicy, TBackgroundPermissionPolicy as TBackgroundPermissionPolicy$1, TBackgroundPrimitive, TBackgroundPrimitive as TBackgroundPrimitive$1, TBackgroundTaskErrorCategory, TBackgroundTaskEvent, TBackgroundTaskEventListener, TBackgroundTaskIdFactory, TBackgroundTaskIsolation, TBackgroundTaskIsolation as TBackgroundTaskIsolation$1, TBackgroundTaskKind, TBackgroundTaskKind as TBackgroundTaskKind$1, TBackgroundTaskMode, TBackgroundTaskMode as TBackgroundTaskMode$1, TBackgroundTaskRequest, TBackgroundTaskRunnerEvent, TBackgroundTaskStatus, TBackgroundTaskStatus as TBackgroundTaskStatus$1, TBackgroundTaskTimeoutReason, TBackgroundTaskTransitionEvent, TSubagentJobMode, TSubagentJobStatus } from "@robota-sdk/agent-executor";
|
|
2
|
+
import { IAIProvider, IContextWindowState, IFileSystem, IFileSystemAsync, IHistoryEntry, IHookInput, IHookResult, IHookTypeExecutor, IProviderConfig, IProviderDefinition, IProviderModelCatalog, IProviderProbeResult, IProviderProfileConfig, ISession, ITerminalOutput, ITerminalOutput as ITerminalOutput$2, IToolSchema, IToolWithEventService, THookDefinition, THooksConfig, TPermissionMode, TSessionEndReason, TToolArgs, TTrustLevel, TUniversalMessage, TUniversalValue, formatEnvReference, hasUsableSecretReference, isEnvReference, resolveEnvReference } from "@robota-sdk/agent-core";
|
|
3
|
+
import { FileSessionLogger, ICompactEvent, ISessionLogger, ISessionReplayValidationResult, ITerminalOutput as ITerminalOutput$1, Session, TPermissionHandler } from "@robota-sdk/agent-session";
|
|
5
4
|
import { ISandboxClient, IWorkspaceManifest, createZodFunctionTool } from "@robota-sdk/agent-tools";
|
|
5
|
+
import { IConfigurableTransport, ITransportAdapter, ITransportAdapter as ITransportAdapter$1, ITransportConfig, ITransportRegistryView } from "@robota-sdk/agent-interface-transport";
|
|
6
6
|
|
|
7
7
|
//#region src/background-tasks/background-job-orchestrator.d.ts
|
|
8
8
|
type TBackgroundJobWaitPolicy = 'detached' | 'wait_all' | 'wait_any' | 'manual';
|
|
@@ -273,159 +273,50 @@ interface ICreateExecutionWorkspaceTaskSpawnerOptions {
|
|
|
273
273
|
}
|
|
274
274
|
declare function createExecutionWorkspaceTaskSpawner(options: ICreateExecutionWorkspaceTaskSpawnerOptions): IExecutionWorkspaceTaskSpawner;
|
|
275
275
|
//#endregion
|
|
276
|
-
//#region src/
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
readonly description: string;
|
|
283
|
-
readonly userInvocable: boolean;
|
|
284
|
-
readonly modelInvocable: boolean;
|
|
285
|
-
readonly argumentHint?: string;
|
|
286
|
-
readonly safety?: TCapabilitySafety;
|
|
287
|
-
}
|
|
288
|
-
//#endregion
|
|
289
|
-
//#region src/command-api/types.d.ts
|
|
290
|
-
/** A command entry */
|
|
291
|
-
interface ICommand {
|
|
292
|
-
/** Command name without slash (e.g., "mode") — used for invocation */
|
|
293
|
-
name: string;
|
|
294
|
-
/** User-friendly display label (e.g., "Interaction Mode"). Falls back to `name` if not set. */
|
|
295
|
-
displayName?: string;
|
|
296
|
-
/** Short description shown in autocomplete */
|
|
297
|
-
description: string;
|
|
298
|
-
/** Source identifier (e.g., "builtin", "skill") */
|
|
299
|
-
source: string;
|
|
300
|
-
/** Subcommands for hierarchical menus */
|
|
301
|
-
subcommands?: ICommand[];
|
|
302
|
-
/** Execute the command. Args is everything after the command name. */
|
|
303
|
-
execute?: (args: string) => void | Promise<void>;
|
|
304
|
-
/** Full SKILL.md content (only for skill commands) */
|
|
305
|
-
skillContent?: string;
|
|
306
|
-
/** Hint for the expected argument (Claude Code frontmatter) */
|
|
307
|
-
argumentHint?: string;
|
|
308
|
-
/** When true, models cannot invoke this skill autonomously */
|
|
309
|
-
disableModelInvocation?: boolean;
|
|
310
|
-
/** When true, models may invoke this command through the SDK-projected command tool */
|
|
311
|
-
modelInvocable?: boolean;
|
|
312
|
-
/** When false, users cannot invoke this skill directly */
|
|
313
|
-
userInvocable?: boolean;
|
|
314
|
-
/** Safety category for model-visible capability descriptors */
|
|
315
|
-
safety?: TCapabilitySafety;
|
|
316
|
-
/** List of tools this skill is allowed to use */
|
|
317
|
-
allowedTools?: string[];
|
|
318
|
-
/** Preferred model for executing this skill */
|
|
319
|
-
model?: string;
|
|
320
|
-
/** Effort level hint for the skill */
|
|
321
|
-
effort?: string;
|
|
322
|
-
/** Context scope for the skill (e.g., "project") */
|
|
323
|
-
context?: string;
|
|
324
|
-
/** Agent identity to use when executing this skill */
|
|
325
|
-
agent?: string;
|
|
326
|
-
/** Plugin installation directory (plugin skills/commands only) */
|
|
327
|
-
pluginDir?: string;
|
|
328
|
-
}
|
|
329
|
-
/** A source that provides commands */
|
|
330
|
-
interface ICommandSource {
|
|
331
|
-
name: string;
|
|
332
|
-
getCommands(): ICommand[];
|
|
333
|
-
}
|
|
334
|
-
//#endregion
|
|
335
|
-
//#region src/command-api/statusline/statusline-command-api.d.ts
|
|
336
|
-
declare const STATUSLINE_COMMAND_DESCRIPTION = "Configure TUI status-line visibility and fields such as model, context, tokens, session, and git branch.";
|
|
337
|
-
declare const STATUSLINE_COMMAND_ARGUMENT_HINT = "on | off | reset | git on | git off";
|
|
338
|
-
interface IStatusLineCommandSettings {
|
|
339
|
-
enabled: boolean;
|
|
340
|
-
gitBranch: boolean;
|
|
341
|
-
}
|
|
342
|
-
type TStatusLineCommandSettingsPatch = Partial<IStatusLineCommandSettings> & Record<string, TUniversalValue>;
|
|
343
|
-
declare const DEFAULT_STATUS_LINE_COMMAND_SETTINGS: Readonly<IStatusLineCommandSettings>;
|
|
344
|
-
declare function buildStatusLineCommandSubcommands(source?: string): ICommand[];
|
|
345
|
-
declare function isStatusLineCommandSettingsPatch(value: Record<string, TUniversalValue>): value is TStatusLineCommandSettingsPatch;
|
|
346
|
-
//#endregion
|
|
347
|
-
//#region src/command-api/effects.d.ts
|
|
348
|
-
type TCommandEffect = {
|
|
349
|
-
type: 'model-change-requested';
|
|
350
|
-
modelId: string;
|
|
351
|
-
} | {
|
|
352
|
-
type: 'language-change-requested';
|
|
353
|
-
language: string;
|
|
354
|
-
} | {
|
|
355
|
-
type: 'settings-reset-requested';
|
|
356
|
-
} | {
|
|
357
|
-
type: 'session-exit-requested';
|
|
358
|
-
reason?: TSessionEndReason;
|
|
359
|
-
message?: string;
|
|
360
|
-
} | {
|
|
361
|
-
type: 'session-restart-requested';
|
|
362
|
-
reason: TSessionEndReason;
|
|
363
|
-
message: string;
|
|
364
|
-
} | {
|
|
365
|
-
type: 'plugin-tui-requested';
|
|
366
|
-
} | {
|
|
367
|
-
type: 'plugin-registry-reload-requested';
|
|
368
|
-
} | {
|
|
369
|
-
type: 'settings-tui-requested';
|
|
370
|
-
} | {
|
|
371
|
-
type: 'session-picker-requested';
|
|
372
|
-
} | {
|
|
373
|
-
type: 'session-renamed';
|
|
374
|
-
name: string;
|
|
375
|
-
} | {
|
|
376
|
-
type: 'conversation-history-cleared';
|
|
377
|
-
} | {
|
|
378
|
-
type: 'session-execution-started';
|
|
379
|
-
} | {
|
|
380
|
-
type: 'statusline-settings-patch';
|
|
381
|
-
patch: TStatusLineCommandSettingsPatch;
|
|
382
|
-
} | {
|
|
383
|
-
type: 'agent-switcher-requested';
|
|
384
|
-
};
|
|
385
|
-
//#endregion
|
|
386
|
-
//#region src/command-api/interactions.d.ts
|
|
387
|
-
/** Choice option for command-owned follow-up prompts. */
|
|
388
|
-
interface ICommandChoicePromptOption {
|
|
389
|
-
value: string;
|
|
390
|
-
label: string;
|
|
391
|
-
}
|
|
392
|
-
/** Generic prompt descriptor rendered by host UIs for command interactions. */
|
|
393
|
-
type TCommandInteractionPrompt = {
|
|
394
|
-
kind: 'choice';
|
|
395
|
-
title: string;
|
|
396
|
-
description?: string;
|
|
397
|
-
options: readonly ICommandChoicePromptOption[];
|
|
398
|
-
maxVisible?: number;
|
|
399
|
-
} | {
|
|
400
|
-
kind: 'text';
|
|
401
|
-
title: string;
|
|
402
|
-
description?: string;
|
|
403
|
-
placeholder?: string;
|
|
404
|
-
allowEmpty?: boolean;
|
|
405
|
-
masked?: boolean;
|
|
406
|
-
validate?: (value: string) => string | undefined;
|
|
407
|
-
};
|
|
408
|
-
/** Stateful command continuation owned by the command module. */
|
|
409
|
-
interface ICommandInteraction {
|
|
410
|
-
prompt: TCommandInteractionPrompt;
|
|
411
|
-
submit(value: string): Promise<ICommandResult> | ICommandResult;
|
|
412
|
-
cancel?(): Promise<ICommandResult> | ICommandResult;
|
|
276
|
+
//#region src/interactive/interactive-session-background-tracker.d.ts
|
|
277
|
+
interface IBackgroundTrackerState {
|
|
278
|
+
tasks: IBackgroundTaskState[];
|
|
279
|
+
taskEvents: TBackgroundTaskEvent[];
|
|
280
|
+
groups: IBackgroundJobGroupState[];
|
|
281
|
+
groupEvents: TBackgroundJobGroupEvent[];
|
|
413
282
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
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;
|
|
429
320
|
}
|
|
430
321
|
//#endregion
|
|
431
322
|
//#region src/agents/agent-definition-types.d.ts
|
|
@@ -540,7 +431,7 @@ interface ISubagentOptions {
|
|
|
540
431
|
/** AI provider instance. */
|
|
541
432
|
provider: IAIProvider;
|
|
542
433
|
/** Terminal output interface. */
|
|
543
|
-
terminal: ITerminalOutput;
|
|
434
|
+
terminal: ITerminalOutput$1;
|
|
544
435
|
/** Stable session ID for transcript files. */
|
|
545
436
|
sessionId?: string;
|
|
546
437
|
/** Optional logger for subagent transcripts. */
|
|
@@ -580,7 +471,7 @@ interface IInProcessSubagentRunnerDeps {
|
|
|
580
471
|
config: IResolvedConfig;
|
|
581
472
|
context: ILoadedContext;
|
|
582
473
|
tools: IToolWithEventService[];
|
|
583
|
-
terminal: ITerminalOutput
|
|
474
|
+
terminal: ITerminalOutput;
|
|
584
475
|
provider: IAIProvider;
|
|
585
476
|
permissionMode?: TPermissionMode;
|
|
586
477
|
permissionHandler?: TPermissionHandler;
|
|
@@ -600,27 +491,218 @@ interface IInProcessSubagentRunnerDeps {
|
|
|
600
491
|
type TSubagentRunnerFactory = (deps: IInProcessSubagentRunnerDeps) => ISubagentRunner$1;
|
|
601
492
|
declare function createInProcessSubagentRunner(deps: IInProcessSubagentRunnerDeps): ISubagentRunner$1;
|
|
602
493
|
//#endregion
|
|
603
|
-
//#region src/
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
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[];
|
|
612
506
|
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
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;
|
|
617
529
|
}
|
|
618
|
-
|
|
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 */
|
|
619
535
|
name: string;
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
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;
|
|
624
706
|
}
|
|
625
707
|
interface ICommandPluginAdapter {
|
|
626
708
|
listInstalled(): Promise<readonly ICommandInstalledPlugin[]>;
|
|
@@ -750,81 +832,6 @@ declare class EditCheckpointStore {
|
|
|
750
832
|
//#region src/checkpoints/edit-checkpoint-tools.d.ts
|
|
751
833
|
declare function wrapEditCheckpointTools(tools: readonly IToolWithEventService[], recorder: IEditCheckpointRecorder): IToolWithEventService[];
|
|
752
834
|
//#endregion
|
|
753
|
-
//#region src/memory/project-memory-store.d.ts
|
|
754
|
-
declare const MEMORY_INDEX_MAX_LINES = 200;
|
|
755
|
-
declare const MEMORY_INDEX_MAX_BYTES: number;
|
|
756
|
-
type TMemoryType = 'user' | 'feedback' | 'project' | 'reference';
|
|
757
|
-
interface IStartupMemory {
|
|
758
|
-
content: string;
|
|
759
|
-
path: string;
|
|
760
|
-
lineCount: number;
|
|
761
|
-
truncated: boolean;
|
|
762
|
-
}
|
|
763
|
-
interface IMemoryTopicSummary {
|
|
764
|
-
name: string;
|
|
765
|
-
path: string;
|
|
766
|
-
}
|
|
767
|
-
interface IProjectMemorySummary {
|
|
768
|
-
indexPath: string;
|
|
769
|
-
topicsPath: string;
|
|
770
|
-
topics: IMemoryTopicSummary[];
|
|
771
|
-
}
|
|
772
|
-
interface IAppendMemoryInput {
|
|
773
|
-
type: TMemoryType;
|
|
774
|
-
topic: string;
|
|
775
|
-
text: string;
|
|
776
|
-
}
|
|
777
|
-
interface IAppendMemoryResult {
|
|
778
|
-
indexPath: string;
|
|
779
|
-
topicPath: string;
|
|
780
|
-
topic: string;
|
|
781
|
-
deduplicated: boolean;
|
|
782
|
-
}
|
|
783
|
-
declare function isMemoryType(value: string): value is TMemoryType;
|
|
784
|
-
declare class ProjectMemoryStore {
|
|
785
|
-
private readonly cwd;
|
|
786
|
-
private readonly now;
|
|
787
|
-
constructor(cwd: string, now?: () => Date);
|
|
788
|
-
getIndexPath(): string;
|
|
789
|
-
getTopicsPath(): string;
|
|
790
|
-
loadStartupMemory(): IStartupMemory;
|
|
791
|
-
list(): IProjectMemorySummary;
|
|
792
|
-
readTopic(topic: string): string;
|
|
793
|
-
append(input: IAppendMemoryInput): IAppendMemoryResult;
|
|
794
|
-
}
|
|
795
|
-
//#endregion
|
|
796
|
-
//#region src/memory/automatic-memory-types.d.ts
|
|
797
|
-
type TMemoryCandidateStatus = 'pending' | 'approved' | 'rejected' | 'saved' | 'skipped';
|
|
798
|
-
interface IMemoryCandidate {
|
|
799
|
-
id: string;
|
|
800
|
-
type: TMemoryType;
|
|
801
|
-
topic: string;
|
|
802
|
-
text: string;
|
|
803
|
-
sourceMessageIds: string[];
|
|
804
|
-
confidence: number;
|
|
805
|
-
createdAt: string;
|
|
806
|
-
reason: string;
|
|
807
|
-
}
|
|
808
|
-
interface IMemoryPendingRecord extends IMemoryCandidate {
|
|
809
|
-
status: TMemoryCandidateStatus;
|
|
810
|
-
updatedAt: string;
|
|
811
|
-
decisionReason?: string;
|
|
812
|
-
}
|
|
813
|
-
interface IMemoryReference {
|
|
814
|
-
topic: string;
|
|
815
|
-
path: string;
|
|
816
|
-
score: number;
|
|
817
|
-
truncated: boolean;
|
|
818
|
-
}
|
|
819
|
-
interface IMemoryEvent {
|
|
820
|
-
type: 'memory_candidate_extracted' | 'memory_candidate_queued' | 'memory_candidate_saved' | 'memory_candidate_skipped' | 'memory_candidate_approved' | 'memory_candidate_rejected' | 'memory_retrieved';
|
|
821
|
-
at: string;
|
|
822
|
-
candidateId?: string;
|
|
823
|
-
topic?: string;
|
|
824
|
-
reason?: string;
|
|
825
|
-
data?: Record<string, TUniversalValue>;
|
|
826
|
-
}
|
|
827
|
-
//#endregion
|
|
828
835
|
//#region src/context/prompt-file-reference-types.d.ts
|
|
829
836
|
type TPromptFileReferenceReason = 'manual' | 'prompt-reference';
|
|
830
837
|
type TPromptFileReferenceDiagnosticCode = 'not-found' | 'outside-root' | 'directory-not-supported' | 'file-too-large' | 'total-too-large' | 'too-many-references' | 'max-depth' | 'circular-reference' | 'unreadable';
|
|
@@ -916,20 +923,95 @@ declare function clearContextReferences(references: readonly IContextReferenceIt
|
|
|
916
923
|
declare function listActiveContextReferences(references: readonly IContextReferenceItem[]): IContextReferenceItem[];
|
|
917
924
|
declare function toContextReferenceRecords(references: readonly IContextReferenceItem[]): IPromptFileReferenceRecord[];
|
|
918
925
|
//#endregion
|
|
919
|
-
//#region src/
|
|
920
|
-
|
|
921
|
-
declare const
|
|
922
|
-
|
|
923
|
-
interface
|
|
924
|
-
|
|
925
|
-
|
|
926
|
+
//#region src/memory/project-memory-store.d.ts
|
|
927
|
+
declare const MEMORY_INDEX_MAX_LINES = 200;
|
|
928
|
+
declare const MEMORY_INDEX_MAX_BYTES: number;
|
|
929
|
+
type TMemoryType = 'user' | 'feedback' | 'project' | 'reference';
|
|
930
|
+
interface IStartupMemory {
|
|
931
|
+
content: string;
|
|
932
|
+
path: string;
|
|
933
|
+
lineCount: number;
|
|
934
|
+
truncated: boolean;
|
|
926
935
|
}
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
936
|
+
interface IMemoryTopicSummary {
|
|
937
|
+
name: string;
|
|
938
|
+
path: string;
|
|
939
|
+
}
|
|
940
|
+
interface IProjectMemorySummary {
|
|
941
|
+
indexPath: string;
|
|
942
|
+
topicsPath: string;
|
|
943
|
+
topics: IMemoryTopicSummary[];
|
|
944
|
+
}
|
|
945
|
+
interface IAppendMemoryInput {
|
|
946
|
+
type: TMemoryType;
|
|
947
|
+
topic: string;
|
|
948
|
+
text: string;
|
|
949
|
+
}
|
|
950
|
+
interface IAppendMemoryResult {
|
|
951
|
+
indexPath: string;
|
|
952
|
+
topicPath: string;
|
|
953
|
+
topic: string;
|
|
954
|
+
deduplicated: boolean;
|
|
955
|
+
}
|
|
956
|
+
declare function isMemoryType(value: string): value is TMemoryType;
|
|
957
|
+
declare class ProjectMemoryStore {
|
|
958
|
+
private readonly cwd;
|
|
959
|
+
private readonly now;
|
|
960
|
+
constructor(cwd: string, now?: () => Date);
|
|
961
|
+
getIndexPath(): string;
|
|
962
|
+
getTopicsPath(): string;
|
|
963
|
+
loadStartupMemory(): IStartupMemory;
|
|
964
|
+
list(): IProjectMemorySummary;
|
|
965
|
+
readTopic(topic: string): string;
|
|
966
|
+
append(input: IAppendMemoryInput): IAppendMemoryResult;
|
|
967
|
+
}
|
|
968
|
+
//#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>;
|
|
999
|
+
}
|
|
1000
|
+
//#endregion
|
|
1001
|
+
//#region src/command-api/context/context-command-api.d.ts
|
|
1002
|
+
type TAutoCompactThreshold = number | false;
|
|
1003
|
+
declare const DEFAULT_AUTO_COMPACT_THRESHOLD = 0.835;
|
|
1004
|
+
declare const AUTO_COMPACT_THRESHOLD_SETTINGS_KEY = "autoCompactThreshold";
|
|
1005
|
+
interface ICompactContextResult {
|
|
1006
|
+
before: IContextWindowState;
|
|
1007
|
+
after: IContextWindowState;
|
|
1008
|
+
}
|
|
1009
|
+
/** Read context-window state through the command host facade. */
|
|
1010
|
+
declare function readCommandContextState(context: ICommandHostContext): IContextWindowState;
|
|
1011
|
+
/** Read the effective automatic compact policy through the command host facade. */
|
|
1012
|
+
declare function readAutoCompactThreshold(context: ICommandHostContext): TAutoCompactThreshold;
|
|
1013
|
+
/** Read the source of the effective automatic compact policy. */
|
|
1014
|
+
declare function readAutoCompactThresholdSource(context: ICommandHostContext): TAutoCompactThresholdSource;
|
|
933
1015
|
/** Update the active session's automatic compact policy through the command host facade. */
|
|
934
1016
|
declare function setCommandAutoCompactThreshold(context: ICommandHostContext, threshold: TAutoCompactThreshold, source: TAutoCompactThresholdSource): void;
|
|
935
1017
|
/** Persist an automatic compact policy value through the host settings adapter, when present. */
|
|
@@ -1114,7 +1196,7 @@ interface IProviderSetupPatch {
|
|
|
1114
1196
|
providers: Record<string, IProviderProfileSettings>;
|
|
1115
1197
|
}
|
|
1116
1198
|
interface IProviderSettingsBuildOptions {
|
|
1117
|
-
providerDefinitions?: readonly IProviderDefinition
|
|
1199
|
+
providerDefinitions?: readonly IProviderDefinition[];
|
|
1118
1200
|
}
|
|
1119
1201
|
declare function upsertProviderProfile(settings: TProviderSettingsDocument, profileName: string, profile: IProviderProfileSettings): TProviderSettingsDocument;
|
|
1120
1202
|
declare function setCurrentProvider(settings: TProviderSettingsDocument, profileName: string): TProviderSettingsDocument;
|
|
@@ -1133,7 +1215,7 @@ interface IProviderCommandSettingsAdapter {
|
|
|
1133
1215
|
writeTargetSettings(settings: TProviderSettingsDocument): void;
|
|
1134
1216
|
}
|
|
1135
1217
|
interface IProviderCommandModuleOptions {
|
|
1136
|
-
providerDefinitions: readonly IProviderDefinition
|
|
1218
|
+
providerDefinitions: readonly IProviderDefinition[];
|
|
1137
1219
|
settings: IProviderCommandSettingsAdapter;
|
|
1138
1220
|
}
|
|
1139
1221
|
//#endregion
|
|
@@ -1153,13 +1235,44 @@ declare function probeProviderProfile(profile: IProviderProfileConfig): Promise<
|
|
|
1153
1235
|
//#endregion
|
|
1154
1236
|
//#region src/command-api/provider/settings-check.d.ts
|
|
1155
1237
|
type TSettingsCheck = 'missing' | 'valid' | 'corrupt' | 'incomplete';
|
|
1156
|
-
declare function checkSettingsDocument(settings: TProviderSettingsDocument, providerDefinitions?: readonly IProviderDefinition
|
|
1238
|
+
declare function checkSettingsDocument(settings: TProviderSettingsDocument, providerDefinitions?: readonly IProviderDefinition[]): TSettingsCheck;
|
|
1239
|
+
declare function checkSettingsFile(filePath: string, providerDefinitions?: readonly IProviderDefinition[]): TSettingsCheck;
|
|
1240
|
+
//#endregion
|
|
1241
|
+
//#region src/command-api/provider/provider-configuration.d.ts
|
|
1242
|
+
interface IProviderSwitchOptions {
|
|
1243
|
+
knownProviders?: Record<string, IProviderProfileSettings>;
|
|
1244
|
+
}
|
|
1245
|
+
interface IActiveModelChangeOptions {
|
|
1246
|
+
settingsPaths?: readonly string[];
|
|
1247
|
+
providerOverride?: string | undefined;
|
|
1248
|
+
}
|
|
1249
|
+
interface IProviderSettingsWriteTargetOptions {
|
|
1250
|
+
settingsPaths?: readonly string[];
|
|
1251
|
+
}
|
|
1252
|
+
interface IActiveModelChangeResult {
|
|
1253
|
+
settingsPath: string;
|
|
1254
|
+
settings: TProviderSettingsDocument;
|
|
1255
|
+
profileName?: string;
|
|
1256
|
+
}
|
|
1257
|
+
declare function resolveProviderSettingsWriteTargetPath(cwd: string, options?: IProviderSettingsWriteTargetOptions): string;
|
|
1258
|
+
declare function applyProviderConfiguration(settingsPath: string, input: IProviderSetupInput, options?: IProviderSettingsBuildOptions): TProviderSettingsDocument;
|
|
1259
|
+
declare function applyProviderSwitch(settingsPath: string, profileName: string, options?: IProviderSwitchOptions): TProviderSettingsDocument;
|
|
1260
|
+
declare function applyActiveModelChange(cwd: string, modelId: string, options?: IActiveModelChangeOptions): IActiveModelChangeResult;
|
|
1157
1261
|
//#endregion
|
|
1158
1262
|
//#region src/command-api/provider/provider-merge.d.ts
|
|
1159
1263
|
declare function readMergedProviderSettingsFromPaths(paths: readonly string[], fs?: IFileSystem): TProviderSettingsDocument;
|
|
1160
1264
|
declare function mergeSettings(base: TProviderSettingsDocument, override: TProviderSettingsDocument): TProviderSettingsDocument;
|
|
1161
1265
|
declare function mergeProviders(base: TProviderSettingsDocument['providers'], override: TProviderSettingsDocument['providers']): TProviderSettingsDocument['providers'];
|
|
1162
|
-
declare function resolveActiveProvider(settings: TProviderSettingsDocument, providerOverride: string | undefined, providerDefinitions: readonly IProviderDefinition
|
|
1266
|
+
declare function resolveActiveProvider(settings: TProviderSettingsDocument, providerOverride: string | undefined, providerDefinitions: readonly IProviderDefinition[]): IProviderConfig | undefined;
|
|
1267
|
+
//#endregion
|
|
1268
|
+
//#region src/command-api/provider/provider-factory.d.ts
|
|
1269
|
+
interface IReadProviderSettingsOptions {
|
|
1270
|
+
providerOverride?: string;
|
|
1271
|
+
providerDefinitions?: readonly IProviderDefinition[];
|
|
1272
|
+
}
|
|
1273
|
+
declare function readMergedProviderSettings(cwd: string): TProviderSettingsDocument;
|
|
1274
|
+
declare function readProviderSettings(cwd: string, options?: IReadProviderSettingsOptions): IProviderConfig;
|
|
1275
|
+
declare function createProviderFromSettings(cwd: string, modelOverride?: string, options?: IReadProviderSettingsOptions): IAIProvider;
|
|
1163
1276
|
//#endregion
|
|
1164
1277
|
//#region src/command-api/help/help-command-api.d.ts
|
|
1165
1278
|
declare const HELP_COMMAND_DESCRIPTION = "Show available commands";
|
|
@@ -1184,12 +1297,12 @@ interface IModelCommandSettingsAdapter {
|
|
|
1184
1297
|
readMergedSettings(): TProviderSettingsDocument;
|
|
1185
1298
|
}
|
|
1186
1299
|
interface IModelCommandModuleOptions {
|
|
1187
|
-
providerDefinitions: readonly IProviderDefinition
|
|
1300
|
+
providerDefinitions: readonly IProviderDefinition[];
|
|
1188
1301
|
settings: IModelCommandSettingsAdapter;
|
|
1189
1302
|
}
|
|
1190
1303
|
interface IBuildModelCommandSubcommandsOptions {
|
|
1191
1304
|
source?: string;
|
|
1192
|
-
providerDefinitions?: readonly IProviderDefinition
|
|
1305
|
+
providerDefinitions?: readonly IProviderDefinition[];
|
|
1193
1306
|
settings?: TProviderSettingsDocument;
|
|
1194
1307
|
}
|
|
1195
1308
|
interface IActiveProviderModelCatalogState {
|
|
@@ -1200,16 +1313,16 @@ interface IActiveProviderModelCatalogState {
|
|
|
1200
1313
|
}
|
|
1201
1314
|
interface IResolveActiveProviderModelCatalogStateOptions {
|
|
1202
1315
|
settings?: TProviderSettingsDocument;
|
|
1203
|
-
providerDefinitions?: readonly IProviderDefinition
|
|
1316
|
+
providerDefinitions?: readonly IProviderDefinition[];
|
|
1204
1317
|
refresh?: boolean;
|
|
1205
1318
|
}
|
|
1206
1319
|
declare function buildModelCommandSubcommands(sourceOrOptions?: string | IBuildModelCommandSubcommandsOptions): ICommand[];
|
|
1207
1320
|
declare function formatModelCommandUsageMessage(options?: {
|
|
1208
1321
|
settings?: TProviderSettingsDocument;
|
|
1209
|
-
providerDefinitions?: readonly IProviderDefinition
|
|
1322
|
+
providerDefinitions?: readonly IProviderDefinition[];
|
|
1210
1323
|
}): string;
|
|
1211
1324
|
declare function formatModelCommandUsageMessageAsync(options?: IResolveActiveProviderModelCatalogStateOptions): Promise<string>;
|
|
1212
|
-
declare function resolveActiveProviderModelCatalog(settings: TProviderSettingsDocument | undefined, providerDefinitions?: readonly IProviderDefinition
|
|
1325
|
+
declare function resolveActiveProviderModelCatalog(settings: TProviderSettingsDocument | undefined, providerDefinitions?: readonly IProviderDefinition[]): IProviderModelCatalog | undefined;
|
|
1213
1326
|
declare function resolveActiveProviderModelCatalogState(options: IResolveActiveProviderModelCatalogStateOptions): Promise<IActiveProviderModelCatalogState | undefined>;
|
|
1214
1327
|
//#endregion
|
|
1215
1328
|
//#region src/command-api/language/language-command-api.d.ts
|
|
@@ -1801,6 +1914,16 @@ interface ISkillActivationHistoryData extends ISkillActivationEvent {
|
|
|
1801
1914
|
readonly message: string;
|
|
1802
1915
|
}
|
|
1803
1916
|
//#endregion
|
|
1917
|
+
//#region src/interactive/interactive-session-agent-jobs.d.ts
|
|
1918
|
+
interface ISpawnAgentJobInput {
|
|
1919
|
+
agentType: string;
|
|
1920
|
+
label: string;
|
|
1921
|
+
mode: 'foreground' | 'background';
|
|
1922
|
+
prompt: string;
|
|
1923
|
+
model?: string;
|
|
1924
|
+
isolation?: TBackgroundTaskIsolation;
|
|
1925
|
+
}
|
|
1926
|
+
//#endregion
|
|
1804
1927
|
//#region src/context/prompt-file-reference-format.d.ts
|
|
1805
1928
|
declare function buildPromptWithFileReferences(input: string, references: readonly IResolvedPromptFileReference[]): string;
|
|
1806
1929
|
declare function hasBlockingPromptFileReferenceDiagnostics(diagnostics: readonly IPromptFileReferenceDiagnostic[]): boolean;
|
|
@@ -1815,6 +1938,93 @@ declare function parsePromptFileReferences(input: string): IPromptFileReferenceT
|
|
|
1815
1938
|
declare function resolvePromptFileReferences(input: string, options: IPromptFileReferenceResolveOptions): Promise<IResolvedPromptFileReferences>;
|
|
1816
1939
|
declare function resolvePromptFileReferencePaths(referencePaths: readonly string[], options: IPromptFileReferenceResolveOptions): Promise<IResolvedPromptFileReferences>;
|
|
1817
1940
|
//#endregion
|
|
1941
|
+
//#region src/interactive/interactive-session-history-tracker.d.ts
|
|
1942
|
+
interface IHistoryTrackerState {
|
|
1943
|
+
history: IHistoryEntry[];
|
|
1944
|
+
memoryEvents: IMemoryEvent[];
|
|
1945
|
+
usedMemoryReferences: IMemoryReference[];
|
|
1946
|
+
contextReferences: IContextReferenceItem[];
|
|
1947
|
+
skillActivationEvents: ISkillActivationEvent[];
|
|
1948
|
+
}
|
|
1949
|
+
declare class SessionHistoryTracker {
|
|
1950
|
+
private readonly cwd;
|
|
1951
|
+
private readonly getSessionId;
|
|
1952
|
+
private readonly getExecuting;
|
|
1953
|
+
private readonly persistSession;
|
|
1954
|
+
private readonly emitSkillActivation;
|
|
1955
|
+
private history;
|
|
1956
|
+
private editCheckpointStore;
|
|
1957
|
+
private memoryEvents;
|
|
1958
|
+
private usedMemoryReferences;
|
|
1959
|
+
private contextReferences;
|
|
1960
|
+
private skillActivationEvents;
|
|
1961
|
+
constructor(cwd: string, getSessionId: () => string, getExecuting: () => boolean, persistSession: () => void, emitSkillActivation: (event: ISkillActivationEvent) => void, editCheckpointStore?: EditCheckpointStore | null);
|
|
1962
|
+
restoreState(state: IHistoryTrackerState): void;
|
|
1963
|
+
getState(): IHistoryTrackerState;
|
|
1964
|
+
append(entry: IHistoryEntry): void;
|
|
1965
|
+
getHistory(): IHistoryEntry[];
|
|
1966
|
+
clearHistory(): void;
|
|
1967
|
+
resetUsedMemoryReferences(): void;
|
|
1968
|
+
recordContextReferenceUsage(records: readonly IPromptFileReferenceRecord[]): void;
|
|
1969
|
+
recordPromptContextReferences(records: readonly IPromptFileReferenceRecord[]): void;
|
|
1970
|
+
listEditCheckpoints(): IEditCheckpointSummary[];
|
|
1971
|
+
inspectEditCheckpoint(checkpointId: string): IEditCheckpointInspection;
|
|
1972
|
+
restoreEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
1973
|
+
rollbackEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
1974
|
+
beginEditCheckpointTurn(prompt: string): Promise<void>;
|
|
1975
|
+
finalizeEditCheckpointTurn(): Promise<void>;
|
|
1976
|
+
setEditCheckpointStore(store: EditCheckpointStore): void;
|
|
1977
|
+
getUsedMemoryReferences(): IMemoryReference[];
|
|
1978
|
+
recordMemoryEvent(event: IMemoryEvent): void;
|
|
1979
|
+
listContextReferences(): IContextReferenceItem[];
|
|
1980
|
+
addContextReference(path: string): Promise<IContextReferenceAddResult>;
|
|
1981
|
+
removeContextReference(path: string): IContextReferenceRemoveResult;
|
|
1982
|
+
clearContextReferences(): IContextReferenceClearResult;
|
|
1983
|
+
getSkillActivationEvents(): ISkillActivationEvent[];
|
|
1984
|
+
recordSkillActivationEvent(event: ISkillActivationEvent, appendHistory: boolean): void;
|
|
1985
|
+
private getCheckpointStore;
|
|
1986
|
+
}
|
|
1987
|
+
//#endregion
|
|
1988
|
+
//#region src/interactive/session-persistence.d.ts
|
|
1989
|
+
interface IInteractiveSessionRecord {
|
|
1990
|
+
id: string;
|
|
1991
|
+
name?: string;
|
|
1992
|
+
cwd: string;
|
|
1993
|
+
createdAt: string;
|
|
1994
|
+
updatedAt: string;
|
|
1995
|
+
messages: TUniversalMessage[];
|
|
1996
|
+
history?: IHistoryEntry[];
|
|
1997
|
+
systemPrompt?: string;
|
|
1998
|
+
toolSchemas?: IToolSchema[];
|
|
1999
|
+
backgroundTasks?: IBackgroundTaskState[];
|
|
2000
|
+
backgroundTaskEvents?: TBackgroundTaskEvent[];
|
|
2001
|
+
backgroundJobGroups?: IBackgroundJobGroupState[];
|
|
2002
|
+
backgroundJobGroupEvents?: TBackgroundJobGroupEvent[];
|
|
2003
|
+
skillActivationEvents?: ISkillActivationEvent[];
|
|
2004
|
+
memoryEvents?: IMemoryEvent[];
|
|
2005
|
+
usedMemoryReferences?: IMemoryReference[];
|
|
2006
|
+
contextReferences?: IContextReferenceItem[];
|
|
2007
|
+
sandboxSnapshotId?: string;
|
|
2008
|
+
}
|
|
2009
|
+
interface IInteractiveSessionStore {
|
|
2010
|
+
save(session: IInteractiveSessionRecord): void;
|
|
2011
|
+
load(id: string): IInteractiveSessionRecord | undefined;
|
|
2012
|
+
list(): IInteractiveSessionRecord[];
|
|
2013
|
+
delete(id: string): void;
|
|
2014
|
+
}
|
|
2015
|
+
interface IResumableSessionSummary {
|
|
2016
|
+
id: string;
|
|
2017
|
+
name?: string;
|
|
2018
|
+
cwd: string;
|
|
2019
|
+
updatedAt: string;
|
|
2020
|
+
messageCount: number;
|
|
2021
|
+
preview: string;
|
|
2022
|
+
}
|
|
2023
|
+
declare function createProjectSessionStore(cwd: string, fs?: IFileSystem): IInteractiveSessionStore;
|
|
2024
|
+
declare function listResumableSessionSummaries(sessionStore: IInteractiveSessionStore | undefined, cwd: string): IResumableSessionSummary[];
|
|
2025
|
+
declare function resolveLatestSessionId(sessionStore: IInteractiveSessionStore | undefined, cwd: string): string | undefined;
|
|
2026
|
+
declare function resolveSessionIdByIdOrName(sessionStore: IInteractiveSessionStore | undefined, idOrName: string): string | undefined;
|
|
2027
|
+
//#endregion
|
|
1818
2028
|
//#region src/interactive/types.d.ts
|
|
1819
2029
|
/** Permission handler result — SDK-owned type (mirrors agent-sessions TPermissionResult).
|
|
1820
2030
|
* true = allow, false = deny, 'allow-session' = allow and remember for this session. */
|
|
@@ -1887,59 +2097,6 @@ interface IContextFileRefreshedEvent {
|
|
|
1887
2097
|
}
|
|
1888
2098
|
type TInteractiveEventName = keyof IInteractiveSessionEvents;
|
|
1889
2099
|
//#endregion
|
|
1890
|
-
//#region src/interactive/i-interactive-session.d.ts
|
|
1891
|
-
/** Minimal session surface consumed by transport adapters and test factories. */
|
|
1892
|
-
interface IInteractiveSession {
|
|
1893
|
-
/** True once the underlying session has been initialized. */
|
|
1894
|
-
readonly isInitialized?: boolean;
|
|
1895
|
-
submit(input: string, displayInput?: string, rawInput?: string): Promise<void>;
|
|
1896
|
-
abort(): void;
|
|
1897
|
-
cancelQueue(): void;
|
|
1898
|
-
shutdown(options?: {
|
|
1899
|
-
reason?: string;
|
|
1900
|
-
message?: string;
|
|
1901
|
-
}): Promise<void>;
|
|
1902
|
-
isExecuting(): boolean;
|
|
1903
|
-
getPendingPrompt(): string | null;
|
|
1904
|
-
getMessages(): TUniversalMessage[];
|
|
1905
|
-
getContextState(): IContextWindowState;
|
|
1906
|
-
getSession(): {
|
|
1907
|
-
getSessionId(): string;
|
|
1908
|
-
};
|
|
1909
|
-
getCwd(): string;
|
|
1910
|
-
executeCommand(name: string, args: string): Promise<ICommandResult | null>;
|
|
1911
|
-
listCommands(): ICommandListEntry[];
|
|
1912
|
-
on<E extends TInteractiveEventName>(event: E, handler: IInteractiveSessionEvents[E]): void;
|
|
1913
|
-
off<E extends TInteractiveEventName>(event: E, handler: IInteractiveSessionEvents[E]): void;
|
|
1914
|
-
listBackgroundTasks(filter?: IBackgroundTaskListFilter): IBackgroundTaskState[];
|
|
1915
|
-
getBackgroundTask(taskId: string): IBackgroundTaskState | undefined;
|
|
1916
|
-
cancelBackgroundTask(taskId: string, reason?: string): Promise<void>;
|
|
1917
|
-
closeBackgroundTask(taskId: string): Promise<void>;
|
|
1918
|
-
sendBackgroundTask(taskId: string, input: IBackgroundTaskInput): Promise<void>;
|
|
1919
|
-
readBackgroundTaskLog(taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
|
|
1920
|
-
listBackgroundJobGroups(): IBackgroundJobGroupState[];
|
|
1921
|
-
getBackgroundJobGroup(groupId: string): IBackgroundJobGroupState | undefined;
|
|
1922
|
-
createBackgroundJobGroup(input: Omit<IBackgroundJobGroupCreateRequest, 'parentSessionId'>): IBackgroundJobGroupState;
|
|
1923
|
-
waitBackgroundJobGroup(groupId: string): Promise<IBackgroundJobGroupState>;
|
|
1924
|
-
getExecutionWorkspaceSnapshot(options?: IExecutionWorkspaceSnapshotOptions): IExecutionWorkspaceSnapshot;
|
|
1925
|
-
listAgentDefinitions(): Array<{
|
|
1926
|
-
name: string;
|
|
1927
|
-
description: string;
|
|
1928
|
-
}>;
|
|
1929
|
-
listAgentJobs(): ISubagentJobState[];
|
|
1930
|
-
spawnAgentJob(input: {
|
|
1931
|
-
agentType: string;
|
|
1932
|
-
label: string;
|
|
1933
|
-
mode: 'foreground' | 'background';
|
|
1934
|
-
prompt: string;
|
|
1935
|
-
model?: string;
|
|
1936
|
-
isolation?: TBackgroundTaskIsolation;
|
|
1937
|
-
}): Promise<ISubagentJobState>;
|
|
1938
|
-
sendAgentJob(jobId: string, prompt: string): Promise<void>;
|
|
1939
|
-
cancelAgentJob(jobId: string, reason?: string): Promise<void>;
|
|
1940
|
-
closeAgentJob(jobId: string): Promise<void>;
|
|
1941
|
-
}
|
|
1942
|
-
//#endregion
|
|
1943
2100
|
//#region src/context/project-detector.d.ts
|
|
1944
2101
|
type TProjectType = 'node' | 'python' | 'rust' | 'go' | 'unknown';
|
|
1945
2102
|
type TPackageManager = 'pnpm' | 'yarn' | 'npm' | 'bun';
|
|
@@ -1986,77 +2143,26 @@ interface ISystemPromptParams {
|
|
|
1986
2143
|
commandDescriptors?: ICapabilityDescriptor[];
|
|
1987
2144
|
}
|
|
1988
2145
|
//#endregion
|
|
1989
|
-
//#region src/
|
|
1990
|
-
interface
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
cwd: string;
|
|
1994
|
-
createdAt: string;
|
|
1995
|
-
updatedAt: string;
|
|
1996
|
-
messages: TUniversalMessage[];
|
|
1997
|
-
history?: IHistoryEntry[];
|
|
1998
|
-
systemPrompt?: string;
|
|
1999
|
-
toolSchemas?: IToolSchema[];
|
|
2000
|
-
backgroundTasks?: IBackgroundTaskState[];
|
|
2001
|
-
backgroundTaskEvents?: TBackgroundTaskEvent[];
|
|
2002
|
-
backgroundJobGroups?: IBackgroundJobGroupState[];
|
|
2003
|
-
backgroundJobGroupEvents?: TBackgroundJobGroupEvent[];
|
|
2004
|
-
skillActivationEvents?: ISkillActivationEvent[];
|
|
2005
|
-
memoryEvents?: IMemoryEvent[];
|
|
2006
|
-
usedMemoryReferences?: IMemoryReference[];
|
|
2007
|
-
contextReferences?: IContextReferenceItem[];
|
|
2008
|
-
sandboxSnapshotId?: string;
|
|
2009
|
-
}
|
|
2010
|
-
interface IInteractiveSessionStore {
|
|
2011
|
-
save(session: IInteractiveSessionRecord): void;
|
|
2012
|
-
load(id: string): IInteractiveSessionRecord | undefined;
|
|
2013
|
-
list(): IInteractiveSessionRecord[];
|
|
2014
|
-
delete(id: string): void;
|
|
2015
|
-
}
|
|
2016
|
-
interface IResumableSessionSummary {
|
|
2017
|
-
id: string;
|
|
2018
|
-
name?: string;
|
|
2019
|
-
cwd: string;
|
|
2020
|
-
updatedAt: string;
|
|
2021
|
-
messageCount: number;
|
|
2022
|
-
preview: string;
|
|
2023
|
-
}
|
|
2024
|
-
declare function createProjectSessionStore(cwd: string, fs?: IFileSystem): IInteractiveSessionStore;
|
|
2025
|
-
declare function listResumableSessionSummaries(sessionStore: IInteractiveSessionStore | undefined, cwd: string): IResumableSessionSummary[];
|
|
2026
|
-
declare function resolveLatestSessionId(sessionStore: IInteractiveSessionStore | undefined, cwd: string): string | undefined;
|
|
2027
|
-
declare function resolveSessionIdByIdOrName(sessionStore: IInteractiveSessionStore | undefined, idOrName: string): string | undefined;
|
|
2028
|
-
//#endregion
|
|
2029
|
-
//#region src/reversible-execution/reversible-execution-policy.d.ts
|
|
2030
|
-
type TReversibleExecutionIsolation = 'none' | 'worktree' | 'provider-sandbox';
|
|
2031
|
-
type TReversibleRollbackLayer = 'none' | 'edit-checkpoint' | 'worktree' | 'provider-sandbox';
|
|
2032
|
-
type TReversibleSideEffect = 'none' | 'file-mutation' | 'shell-process' | 'subagent' | 'unknown';
|
|
2033
|
-
type TReversibleSafetyStatus = 'reversible' | 'read-only' | 'requires-checkpoint' | 'requires-isolation' | 'unknown';
|
|
2034
|
-
interface IReversibleExecutionOptions {
|
|
2035
|
-
mode: 'local-first';
|
|
2036
|
-
isolation?: TReversibleExecutionIsolation;
|
|
2037
|
-
enforceUntrackedSideEffects?: boolean;
|
|
2038
|
-
}
|
|
2039
|
-
interface IReversibleToolSafetyContext {
|
|
2040
|
-
checkpointAvailable: boolean;
|
|
2041
|
-
isolation: TReversibleExecutionIsolation;
|
|
2146
|
+
//#region src/hooks/agent-executor.d.ts
|
|
2147
|
+
/** A minimal session interface for running a prompt. */
|
|
2148
|
+
interface IAgentSession {
|
|
2149
|
+
run(prompt: string): Promise<string>;
|
|
2042
2150
|
}
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2151
|
+
/** Factory that creates a session instance with the given options. */
|
|
2152
|
+
type TSessionFactory = (options: {
|
|
2153
|
+
maxTurns?: number;
|
|
2154
|
+
timeout?: number;
|
|
2155
|
+
}) => IAgentSession;
|
|
2156
|
+
/** Constructor options for AgentExecutor. */
|
|
2157
|
+
interface IAgentExecutorOptions {
|
|
2158
|
+
sessionFactory: TSessionFactory;
|
|
2047
2159
|
}
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
status: TReversibleSafetyStatus;
|
|
2054
|
-
message: string;
|
|
2160
|
+
declare class AgentExecutor implements IHookTypeExecutor {
|
|
2161
|
+
readonly type: "agent";
|
|
2162
|
+
private readonly sessionFactory;
|
|
2163
|
+
constructor(options: IAgentExecutorOptions);
|
|
2164
|
+
execute(definition: THookDefinition, input: IHookInput): Promise<IHookResult>;
|
|
2055
2165
|
}
|
|
2056
|
-
declare function evaluateReversibleToolSafety(input: IReversibleToolSafetyInput): IReversibleToolSafetyReport;
|
|
2057
|
-
declare function wrapReversibleExecutionTools(tools: readonly IToolWithEventService[], options: IReversibleExecutionOptions & {
|
|
2058
|
-
checkpointAvailable: boolean;
|
|
2059
|
-
}): IToolWithEventService[];
|
|
2060
2166
|
//#endregion
|
|
2061
2167
|
//#region src/hooks/prompt-executor.d.ts
|
|
2062
2168
|
/** A minimal provider interface for single-turn completion. */
|
|
@@ -2078,26 +2184,37 @@ declare class PromptExecutor implements IHookTypeExecutor {
|
|
|
2078
2184
|
execute(definition: THookDefinition, input: IHookInput): Promise<IHookResult>;
|
|
2079
2185
|
}
|
|
2080
2186
|
//#endregion
|
|
2081
|
-
//#region src/
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2187
|
+
//#region src/reversible-execution/reversible-execution-policy.d.ts
|
|
2188
|
+
type TReversibleExecutionIsolation = 'none' | 'worktree' | 'provider-sandbox';
|
|
2189
|
+
type TReversibleRollbackLayer = 'none' | 'edit-checkpoint' | 'worktree' | 'provider-sandbox';
|
|
2190
|
+
type TReversibleSideEffect = 'none' | 'file-mutation' | 'shell-process' | 'subagent' | 'unknown';
|
|
2191
|
+
type TReversibleSafetyStatus = 'reversible' | 'read-only' | 'requires-checkpoint' | 'requires-isolation' | 'unknown';
|
|
2192
|
+
interface IReversibleExecutionOptions {
|
|
2193
|
+
mode: 'local-first';
|
|
2194
|
+
isolation?: TReversibleExecutionIsolation;
|
|
2195
|
+
enforceUntrackedSideEffects?: boolean;
|
|
2085
2196
|
}
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
timeout?: number;
|
|
2090
|
-
}) => IAgentSession;
|
|
2091
|
-
/** Constructor options for AgentExecutor. */
|
|
2092
|
-
interface IAgentExecutorOptions {
|
|
2093
|
-
sessionFactory: TSessionFactory;
|
|
2197
|
+
interface IReversibleToolSafetyContext {
|
|
2198
|
+
checkpointAvailable: boolean;
|
|
2199
|
+
isolation: TReversibleExecutionIsolation;
|
|
2094
2200
|
}
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2201
|
+
interface IReversibleToolSafetyInput {
|
|
2202
|
+
toolName: string;
|
|
2203
|
+
toolArgs?: TToolArgs;
|
|
2204
|
+
context: IReversibleToolSafetyContext;
|
|
2205
|
+
}
|
|
2206
|
+
interface IReversibleToolSafetyReport {
|
|
2207
|
+
toolName: string;
|
|
2208
|
+
reversible: boolean;
|
|
2209
|
+
sideEffect: TReversibleSideEffect;
|
|
2210
|
+
rollbackLayer: TReversibleRollbackLayer;
|
|
2211
|
+
status: TReversibleSafetyStatus;
|
|
2212
|
+
message: string;
|
|
2100
2213
|
}
|
|
2214
|
+
declare function evaluateReversibleToolSafety(input: IReversibleToolSafetyInput): IReversibleToolSafetyReport;
|
|
2215
|
+
declare function wrapReversibleExecutionTools(tools: readonly IToolWithEventService[], options: IReversibleExecutionOptions & {
|
|
2216
|
+
checkpointAvailable: boolean;
|
|
2217
|
+
}): IToolWithEventService[];
|
|
2101
2218
|
//#endregion
|
|
2102
2219
|
//#region src/assembly/create-session-types.d.ts
|
|
2103
2220
|
type TAutoCompactThreshold$1 = number | false;
|
|
@@ -2110,7 +2227,7 @@ interface ICreateSessionOptions {
|
|
|
2110
2227
|
/** Loaded AGENTS.md / CLAUDE.md context */
|
|
2111
2228
|
context: ILoadedContext;
|
|
2112
2229
|
/** Terminal I/O for permission prompts */
|
|
2113
|
-
terminal: ITerminalOutput;
|
|
2230
|
+
terminal: ITerminalOutput$1;
|
|
2114
2231
|
/** Project metadata for system prompt */
|
|
2115
2232
|
projectInfo?: IProjectInfo;
|
|
2116
2233
|
/** Initial permission mode (defaults to config.defaultTrustLevel → mode mapping) */
|
|
@@ -2128,7 +2245,7 @@ interface ICreateSessionOptions {
|
|
|
2128
2245
|
/** Callback when context window usage is refreshed */
|
|
2129
2246
|
onContextUpdate?: (state: IContextWindowState) => void;
|
|
2130
2247
|
/** Custom prompt-for-approval function (injected from CLI) */
|
|
2131
|
-
promptForApproval?: (terminal: ITerminalOutput, toolName: string, toolArgs: TToolArgs) => Promise<boolean>;
|
|
2248
|
+
promptForApproval?: (terminal: ITerminalOutput$1, toolName: string, toolArgs: TToolArgs) => Promise<boolean>;
|
|
2132
2249
|
/** Additional tools to register beyond the defaults (e.g. agent-tool) */
|
|
2133
2250
|
additionalTools?: IToolWithEventService[];
|
|
2134
2251
|
/** Additional background task runners composed by the runtime shell. */
|
|
@@ -2278,6 +2395,8 @@ interface IInteractiveSessionStandardOptions {
|
|
|
2278
2395
|
allowedTools?: string[];
|
|
2279
2396
|
/** Text to append to the system prompt. */
|
|
2280
2397
|
appendSystemPrompt?: string;
|
|
2398
|
+
/** Replace the entire system prompt with this string. Takes precedence over the default builder. */
|
|
2399
|
+
systemPrompt?: string;
|
|
2281
2400
|
/** Override config language (e.g., "ko", "en"). Injected into system prompt. */
|
|
2282
2401
|
language?: string;
|
|
2283
2402
|
/** Runtime-composed background task runners. */
|
|
@@ -2331,97 +2450,16 @@ interface IInteractiveSessionInjectedOptions {
|
|
|
2331
2450
|
/** Union of standard and injected construction options. */
|
|
2332
2451
|
type TInteractiveSessionOptions = IInteractiveSessionStandardOptions | IInteractiveSessionInjectedOptions;
|
|
2333
2452
|
//#endregion
|
|
2334
|
-
//#region src/interactive/interactive-session-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
private readonly emitTaskEvent;
|
|
2345
|
-
private readonly emitGroupEvent;
|
|
2346
|
-
private readonly persistSession;
|
|
2347
|
-
private backgroundTasks;
|
|
2348
|
-
private backgroundTaskEvents;
|
|
2349
|
-
private backgroundJobGroups;
|
|
2350
|
-
private backgroundJobGroupEvents;
|
|
2351
|
-
private backgroundTaskUnsubscribe;
|
|
2352
|
-
private backgroundJobUnsubscribe;
|
|
2353
|
-
private backgroundJobOrchestrator;
|
|
2354
|
-
constructor(getManager: () => IBackgroundTaskManager | undefined, onChanged: (cause: TExecutionWorkspaceUpdateCause, entryId?: string) => void, emitTaskEvent: (event: TBackgroundTaskEvent) => void, emitGroupEvent: (event: TBackgroundJobGroupEvent) => void, persistSession: () => void);
|
|
2355
|
-
subscribe(session: Session): void;
|
|
2356
|
-
dispose(): void;
|
|
2357
|
-
restoreState(state: IBackgroundTrackerState): void;
|
|
2358
|
-
getState(): IBackgroundTrackerState;
|
|
2359
|
-
getManagerOrThrow(): IBackgroundTaskManager;
|
|
2360
|
-
getOrchestratorOrThrow(sessionId: string): BackgroundJobOrchestrator;
|
|
2361
|
-
cancelTask(taskId: string, reason?: string): Promise<void>;
|
|
2362
|
-
closeTask(taskId: string): Promise<void>;
|
|
2363
|
-
sendTask(taskId: string, input: IBackgroundTaskInput): Promise<void>;
|
|
2364
|
-
readTaskLog(taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
|
|
2365
|
-
listTasks(filter?: IBackgroundTaskListFilter): IBackgroundTaskState[];
|
|
2366
|
-
getTask(taskId: string): IBackgroundTaskState | undefined;
|
|
2367
|
-
createGroup(input: Omit<IBackgroundJobGroupCreateRequest, 'parentSessionId'>, sessionId: string): IBackgroundJobGroupState;
|
|
2368
|
-
listGroups(sessionId: string): IBackgroundJobGroupState[];
|
|
2369
|
-
getGroup(groupId: string, sessionId: string): IBackgroundJobGroupState | undefined;
|
|
2370
|
-
waitGroup(groupId: string, sessionId: string): Promise<IBackgroundJobGroupState>;
|
|
2371
|
-
readTaskDetail(entryId: string, taskId: string, cursor?: IExecutionDetailCursor): Promise<IExecutionDetailPage>;
|
|
2372
|
-
readGroupDetail(entryId: string, groupId: string, sessionId: string): IExecutionDetailPage;
|
|
2373
|
-
getTaskSnapshots(): IBackgroundTaskState[];
|
|
2374
|
-
getGroupSnapshots(): IBackgroundJobGroupState[];
|
|
2375
|
-
private subscribeGroupEvents;
|
|
2376
|
-
private recordTaskEvent;
|
|
2377
|
-
private recordGroupEvent;
|
|
2378
|
-
}
|
|
2379
|
-
//#endregion
|
|
2380
|
-
//#region src/interactive/interactive-session-history-tracker.d.ts
|
|
2381
|
-
interface IHistoryTrackerState {
|
|
2382
|
-
history: IHistoryEntry[];
|
|
2383
|
-
memoryEvents: IMemoryEvent[];
|
|
2384
|
-
usedMemoryReferences: IMemoryReference[];
|
|
2385
|
-
contextReferences: IContextReferenceItem[];
|
|
2386
|
-
skillActivationEvents: ISkillActivationEvent[];
|
|
2387
|
-
}
|
|
2388
|
-
declare class SessionHistoryTracker {
|
|
2389
|
-
private readonly cwd;
|
|
2390
|
-
private readonly getSessionId;
|
|
2391
|
-
private readonly getExecuting;
|
|
2392
|
-
private readonly persistSession;
|
|
2393
|
-
private readonly emitSkillActivation;
|
|
2394
|
-
private history;
|
|
2395
|
-
private editCheckpointStore;
|
|
2396
|
-
private memoryEvents;
|
|
2397
|
-
private usedMemoryReferences;
|
|
2398
|
-
private contextReferences;
|
|
2399
|
-
private skillActivationEvents;
|
|
2400
|
-
constructor(cwd: string, getSessionId: () => string, getExecuting: () => boolean, persistSession: () => void, emitSkillActivation: (event: ISkillActivationEvent) => void, editCheckpointStore?: EditCheckpointStore | null);
|
|
2401
|
-
restoreState(state: IHistoryTrackerState): void;
|
|
2402
|
-
getState(): IHistoryTrackerState;
|
|
2403
|
-
append(entry: IHistoryEntry): void;
|
|
2404
|
-
getHistory(): IHistoryEntry[];
|
|
2405
|
-
clearHistory(): void;
|
|
2406
|
-
resetUsedMemoryReferences(): void;
|
|
2407
|
-
recordContextReferenceUsage(records: readonly IPromptFileReferenceRecord[]): void;
|
|
2408
|
-
recordPromptContextReferences(records: readonly IPromptFileReferenceRecord[]): void;
|
|
2409
|
-
listEditCheckpoints(): IEditCheckpointSummary[];
|
|
2410
|
-
inspectEditCheckpoint(checkpointId: string): IEditCheckpointInspection;
|
|
2411
|
-
restoreEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
2412
|
-
rollbackEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
2413
|
-
beginEditCheckpointTurn(prompt: string): Promise<void>;
|
|
2414
|
-
finalizeEditCheckpointTurn(): Promise<void>;
|
|
2415
|
-
setEditCheckpointStore(store: EditCheckpointStore): void;
|
|
2416
|
-
getUsedMemoryReferences(): IMemoryReference[];
|
|
2417
|
-
recordMemoryEvent(event: IMemoryEvent): void;
|
|
2418
|
-
listContextReferences(): IContextReferenceItem[];
|
|
2419
|
-
addContextReference(path: string): Promise<IContextReferenceAddResult>;
|
|
2420
|
-
removeContextReference(path: string): IContextReferenceRemoveResult;
|
|
2421
|
-
clearContextReferences(): IContextReferenceClearResult;
|
|
2422
|
-
getSkillActivationEvents(): ISkillActivationEvent[];
|
|
2423
|
-
recordSkillActivationEvent(event: ISkillActivationEvent, appendHistory: boolean): void;
|
|
2424
|
-
private getCheckpointStore;
|
|
2453
|
+
//#region src/interactive/interactive-session-init.d.ts
|
|
2454
|
+
/** Return value of createInteractiveSession — session plus staleness tracking data. */
|
|
2455
|
+
interface ICreatedInteractiveSession {
|
|
2456
|
+
session: Session;
|
|
2457
|
+
/** Per-file entries for AGENTS.md files loaded at startup. Used for staleness detection. */
|
|
2458
|
+
agentsFileEntries: IContextFileEntry[];
|
|
2459
|
+
/** Per-file entries for CLAUDE.md files loaded at startup. Used for staleness detection. */
|
|
2460
|
+
claudeFileEntries: IContextFileEntry[];
|
|
2461
|
+
/** Rebuilds the system message given updated agentsMd and claudeMd strings. */
|
|
2462
|
+
rebuildSystemMessage: (agentsMd: string, claudeMd: string) => string;
|
|
2425
2463
|
}
|
|
2426
2464
|
//#endregion
|
|
2427
2465
|
//#region src/interactive/interactive-session-skill-router.d.ts
|
|
@@ -2469,18 +2507,6 @@ declare class SessionSkillRouter {
|
|
|
2469
2507
|
private executeForegroundCommand;
|
|
2470
2508
|
}
|
|
2471
2509
|
//#endregion
|
|
2472
|
-
//#region src/interactive/interactive-session-init.d.ts
|
|
2473
|
-
/** Return value of createInteractiveSession — session plus staleness tracking data. */
|
|
2474
|
-
interface ICreatedInteractiveSession {
|
|
2475
|
-
session: Session;
|
|
2476
|
-
/** Per-file entries for AGENTS.md files loaded at startup. Used for staleness detection. */
|
|
2477
|
-
agentsFileEntries: IContextFileEntry[];
|
|
2478
|
-
/** Per-file entries for CLAUDE.md files loaded at startup. Used for staleness detection. */
|
|
2479
|
-
claudeFileEntries: IContextFileEntry[];
|
|
2480
|
-
/** Rebuilds the system message given updated agentsMd and claudeMd strings. */
|
|
2481
|
-
rebuildSystemMessage: (agentsMd: string, claudeMd: string) => string;
|
|
2482
|
-
}
|
|
2483
|
-
//#endregion
|
|
2484
2510
|
//#region src/interactive/interactive-session-execution-controller.d.ts
|
|
2485
2511
|
interface IExecutionControllerCallbacks {
|
|
2486
2512
|
getSession: () => Session;
|
|
@@ -2525,40 +2551,6 @@ declare class SessionExecutionController {
|
|
|
2525
2551
|
applyForkSkillResult(result: string): Promise<void>;
|
|
2526
2552
|
}
|
|
2527
2553
|
//#endregion
|
|
2528
|
-
//#region src/tools/agent-tool.d.ts
|
|
2529
|
-
/** Dependencies injected at creation time via createAgentTool factory */
|
|
2530
|
-
interface IAgentToolDeps extends IInProcessSubagentRunnerDeps {
|
|
2531
|
-
cwd?: string;
|
|
2532
|
-
parentSessionId?: string;
|
|
2533
|
-
subagentDepth?: number;
|
|
2534
|
-
subagentManager?: ISubagentManager;
|
|
2535
|
-
backgroundTaskManager?: IBackgroundTaskManager;
|
|
2536
|
-
/** Optional custom agent registry for resolving non-built-in agent types. */
|
|
2537
|
-
customAgentRegistry?: (name: string) => IAgentDefinition | undefined;
|
|
2538
|
-
/** Model-visible and command-visible agent definitions available to this session. */
|
|
2539
|
-
agentDefinitions?: IAgentDefinition[];
|
|
2540
|
-
}
|
|
2541
|
-
/** Store agent tool deps keyed by a session (or any object). */
|
|
2542
|
-
declare function storeAgentToolDeps(key: object, deps: IAgentToolDeps): void;
|
|
2543
|
-
/** Retrieve agent tool deps for a given session key. */
|
|
2544
|
-
declare function retrieveAgentToolDeps(key: object): IAgentToolDeps | undefined;
|
|
2545
|
-
/**
|
|
2546
|
-
* Create an agent tool instance with deps captured in closure.
|
|
2547
|
-
*
|
|
2548
|
-
* Each session gets its own tool instance — no shared mutable state.
|
|
2549
|
-
*/
|
|
2550
|
-
declare function createAgentTool(deps: IAgentToolDeps): ReturnType<typeof createZodFunctionTool>;
|
|
2551
|
-
//#endregion
|
|
2552
|
-
//#region src/interactive/interactive-session-agent-jobs.d.ts
|
|
2553
|
-
interface ISpawnAgentJobInput {
|
|
2554
|
-
agentType: string;
|
|
2555
|
-
label: string;
|
|
2556
|
-
mode: 'foreground' | 'background';
|
|
2557
|
-
prompt: string;
|
|
2558
|
-
model?: string;
|
|
2559
|
-
isolation?: TBackgroundTaskIsolation;
|
|
2560
|
-
}
|
|
2561
|
-
//#endregion
|
|
2562
2554
|
//#region src/interactive/interactive-session-base.d.ts
|
|
2563
2555
|
declare abstract class InteractiveSessionBase {
|
|
2564
2556
|
protected abstract readonly bgTracker: SessionBackgroundTaskTracker;
|
|
@@ -2571,7 +2563,7 @@ declare abstract class InteractiveSessionBase {
|
|
|
2571
2563
|
isExecuting(): boolean;
|
|
2572
2564
|
getPendingPrompt(): string | null;
|
|
2573
2565
|
getStreamingText(): string;
|
|
2574
|
-
getActiveTools():
|
|
2566
|
+
getActiveTools(): SessionExecutionController['activeTools'];
|
|
2575
2567
|
cancelQueue(): void;
|
|
2576
2568
|
executeCommand(name: string, args: string): Promise<ICommandResult | null>;
|
|
2577
2569
|
executeModelCommand(name: string, args: string): Promise<ICommandResult | null>;
|
|
@@ -2630,6 +2622,59 @@ declare abstract class InteractiveSessionBase {
|
|
|
2630
2622
|
closeAgentJob(jobId: string): Promise<void>;
|
|
2631
2623
|
}
|
|
2632
2624
|
//#endregion
|
|
2625
|
+
//#region src/interactive/i-interactive-session.d.ts
|
|
2626
|
+
/** Minimal session surface consumed by transport adapters and test factories. */
|
|
2627
|
+
interface IInteractiveSession {
|
|
2628
|
+
/** True once the underlying session has been initialized. */
|
|
2629
|
+
readonly isInitialized?: boolean;
|
|
2630
|
+
submit(input: string, displayInput?: string, rawInput?: string): Promise<void>;
|
|
2631
|
+
abort(): void;
|
|
2632
|
+
cancelQueue(): void;
|
|
2633
|
+
shutdown(options?: {
|
|
2634
|
+
reason?: string;
|
|
2635
|
+
message?: string;
|
|
2636
|
+
}): Promise<void>;
|
|
2637
|
+
isExecuting(): boolean;
|
|
2638
|
+
getPendingPrompt(): string | null;
|
|
2639
|
+
getMessages(): TUniversalMessage[];
|
|
2640
|
+
getContextState(): IContextWindowState;
|
|
2641
|
+
getSession(): {
|
|
2642
|
+
getSessionId(): string;
|
|
2643
|
+
};
|
|
2644
|
+
getCwd(): string;
|
|
2645
|
+
executeCommand(name: string, args: string): Promise<ICommandResult | null>;
|
|
2646
|
+
listCommands(): ICommandListEntry[];
|
|
2647
|
+
on<E extends TInteractiveEventName>(event: E, handler: IInteractiveSessionEvents[E]): void;
|
|
2648
|
+
off<E extends TInteractiveEventName>(event: E, handler: IInteractiveSessionEvents[E]): void;
|
|
2649
|
+
listBackgroundTasks(filter?: IBackgroundTaskListFilter): IBackgroundTaskState[];
|
|
2650
|
+
getBackgroundTask(taskId: string): IBackgroundTaskState | undefined;
|
|
2651
|
+
cancelBackgroundTask(taskId: string, reason?: string): Promise<void>;
|
|
2652
|
+
closeBackgroundTask(taskId: string): Promise<void>;
|
|
2653
|
+
sendBackgroundTask(taskId: string, input: IBackgroundTaskInput): Promise<void>;
|
|
2654
|
+
readBackgroundTaskLog(taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
|
|
2655
|
+
listBackgroundJobGroups(): IBackgroundJobGroupState[];
|
|
2656
|
+
getBackgroundJobGroup(groupId: string): IBackgroundJobGroupState | undefined;
|
|
2657
|
+
createBackgroundJobGroup(input: Omit<IBackgroundJobGroupCreateRequest, 'parentSessionId'>): IBackgroundJobGroupState;
|
|
2658
|
+
waitBackgroundJobGroup(groupId: string): Promise<IBackgroundJobGroupState>;
|
|
2659
|
+
getExecutionWorkspaceSnapshot(options?: IExecutionWorkspaceSnapshotOptions): IExecutionWorkspaceSnapshot;
|
|
2660
|
+
listAgentDefinitions(): Array<{
|
|
2661
|
+
name: string;
|
|
2662
|
+
description: string;
|
|
2663
|
+
}>;
|
|
2664
|
+
listAgentJobs(): ISubagentJobState[];
|
|
2665
|
+
spawnAgentJob(input: {
|
|
2666
|
+
agentType: string;
|
|
2667
|
+
label: string;
|
|
2668
|
+
mode: 'foreground' | 'background';
|
|
2669
|
+
prompt: string;
|
|
2670
|
+
model?: string;
|
|
2671
|
+
isolation?: TBackgroundTaskIsolation;
|
|
2672
|
+
}): Promise<ISubagentJobState>;
|
|
2673
|
+
sendAgentJob(jobId: string, prompt: string): Promise<void>;
|
|
2674
|
+
cancelAgentJob(jobId: string, reason?: string): Promise<void>;
|
|
2675
|
+
closeAgentJob(jobId: string): Promise<void>;
|
|
2676
|
+
}
|
|
2677
|
+
//#endregion
|
|
2633
2678
|
//#region src/interactive/interactive-session.d.ts
|
|
2634
2679
|
interface IInteractiveSessionShutdownOptions {
|
|
2635
2680
|
reason?: TSessionEndReason;
|
|
@@ -2962,5 +3007,121 @@ declare function promptForApproval(terminal: ITerminalOutput$2, toolName: string
|
|
|
2962
3007
|
* Pass overrides to spy on or replace specific methods. */
|
|
2963
3008
|
declare function createTestInteractiveSession(overrides?: Partial<IInteractiveSession>): IInteractiveSession;
|
|
2964
3009
|
//#endregion
|
|
2965
|
-
export { AUTO_COMPACT_THRESHOLD_SETTINGS_KEY, AgentExecutor, BACKGROUND_COMMAND_DESCRIPTION, BACKGROUND_COMMAND_USAGE, BUILT_IN_AGENTS, BackgroundJobOrchestrator, BuiltinCommandSource, BundlePluginInstaller, BundlePluginLoader, CLEAR_COMMAND_DESCRIPTION, 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 IActiveProviderModelCatalogState, type IAgentBackgroundTaskRequest, type IAgentDefinition, type IAgentExecutorOptions, type IAgentJobHostContext, 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 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 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 IProviderDefinition, type IProviderProfileNameSuggestionInput, type IProviderProfileNameSuggestionOptions, type IProviderProfileSettings, type IProviderSettingsBuildOptions, type IProviderSetupInput, type IProviderSetupPatch, 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 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 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 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 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, assembleSubagentPrompt, buildBackgroundCommandSubcommands, buildLanguageCommandSubcommands, buildMemoryCommandSubcommands, buildModelCommandSubcommands, buildPermissionModeSubcommands, buildPluginCommandSubcommands, buildPromptWithFileReferences, buildProviderProfile, buildProviderSetupPatch, buildRewindCommandSubcommands, buildStatusLineCommandSubcommands, cancelCommandBackgroundTask, checkSettingsDocument, clearCommandContextReferences, clearContextReferences, clearConversationHistory, closeCommandBackgroundTask, compactCommandContext, createAgentTool, createBackgroundGroupExecutionEntryId, createBackgroundProcessTool, createBackgroundTaskExecutionEntryId, createBuiltinCommandModule, createCommandExecutionTool, createCommandMemoryStores, createCommandPendingMemoryStore, createCommandProjectMemoryStore, createContextReferenceItem, createDefaultTools, createExecutionOriginMetadata, createExecutionWorkspaceSnapshot, createExecutionWorkspaceTaskSpawner, createInProcessSubagentRunner, createLineDetailPage, createMainThreadDetailPage, createMainThreadExecutionEntryId, createModelCommandToolProjection, createPluginRegistryReloadRequestedEffect, createPluginTuiRequestedEffect, createProjectSessionStore, createProjectedCommandExecutionTools, createPromptFileReferenceHistoryEntry, createProviderSafeModelCommandToolName, createQuery, createSessionExitRequestedEffect, createSessionPickerRequestedEffect, createSessionRenamedEffect, createSubagentLogger, createSubagentSession, createSystemCommands, createTestInteractiveSession, deleteProviderProfile, deleteUserLocalMemoryItem, disableUserLocalMemoryItem, discoverTaskFiles, evaluateReversibleToolSafety, executeSkill, findProviderDefinition, formatCommandBackgroundTask, formatCommandBackgroundTaskList, formatCommandHelpMessage, formatCommandPermissionsMessage, formatCommandSessionReplayValidationReport, formatEnvReference, formatInvalidPermissionModeMessage, formatLanguageUsageMessage, formatModelCommandUsageMessage, formatModelCommandUsageMessageAsync, formatProjectedModelCommandToolPromptDescription, formatPromptFileReferenceDiagnostics, formatTaskContext, getBuiltInAgent, getForkWorkerSuffix, getProviderCredentialRequirement, getSubagentSuffix, hasBlockingPromptFileReferenceDiagnostics, hasSensitiveCommandMemoryContent, hasUsableSecretReference, inspectCommandEditCheckpoint, inspectUserLocalMemoryItem, inspectUserLocalStorage, isCommandMemoryType, isEnvReference, isMemoryType, 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, readMergedProviderSettingsFromPaths, recordCommandMemoryEvent, removeCommandContextReference, removeContextReference, resetAutoCompactThresholdSetting, resolveActiveProvider, resolveActiveProviderModelCatalog, resolveActiveProviderModelCatalogState, resolveEnvReference, resolveLatestSessionId, resolvePermissionModeAdapter, resolvePluginCommandAdapter, resolvePromptFileReferencePaths, resolvePromptFileReferences, resolveSessionIdByIdOrName, resolveSubagentLogDir, resolveUserLocalStorageRoot, restoreCommandEditCheckpoint, retrieveAgentToolDeps, rollbackCommandEditCheckpoint, sanitizeProviderProfileName, selectRelevantTasks, setCommandAutoCompactThreshold, setCurrentProvider, setUserLocalMemoryItem, storeAgentToolDeps, substituteVariables, suggestProviderProfileName, summarizeBackgroundJobGroup, testProviderProfileCommand, toContextReferenceRecords, toPromptFileReferenceRecords, transitionSelfHostingLoop, updateTaskFileStatus, upsertContextReference, upsertProviderProfile, userPaths, validateCommandSessionReplayLog, validateProviderProfile, wrapEditCheckpointTools, wrapReversibleExecutionTools, writeAutoCompactThresholdSetting, writeCommandPermissionMode };
|
|
3010
|
+
//#region src/config/reset-user-config.d.ts
|
|
3011
|
+
interface IResetUserConfigResult {
|
|
3012
|
+
deleted: boolean;
|
|
3013
|
+
path: string;
|
|
3014
|
+
}
|
|
3015
|
+
declare function resetUserConfig(): IResetUserConfigResult;
|
|
3016
|
+
//#endregion
|
|
3017
|
+
//#region src/config/provider-paths.d.ts
|
|
3018
|
+
declare function getProviderSettingsPaths(cwd: string): string[];
|
|
3019
|
+
//#endregion
|
|
3020
|
+
//#region src/git/git-branch.d.ts
|
|
3021
|
+
declare function resolveGitBranch(cwd: string): string | undefined;
|
|
3022
|
+
//#endregion
|
|
3023
|
+
//#region src/utils/semver-compare.d.ts
|
|
3024
|
+
declare function compareSemverVersions(left: string, right: string): number;
|
|
3025
|
+
declare function isNewerSemverVersion(candidate: string, current: string): boolean;
|
|
3026
|
+
//#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
|
+
//#region src/utils/read-package-version.d.ts
|
|
3068
|
+
declare function readPackageVersion(importMetaUrl: string): string;
|
|
3069
|
+
//#endregion
|
|
3070
|
+
//#region src/update-check/update-check.d.ts
|
|
3071
|
+
declare const CLI_UPDATE_PACKAGE_NAME = "@robota-sdk/agent-cli";
|
|
3072
|
+
declare const CLI_UPDATE_REGISTRY_URL = "https://registry.npmjs.org";
|
|
3073
|
+
declare const CLI_UPDATE_CACHE_TTL_MS: number;
|
|
3074
|
+
declare const CLI_UPDATE_TIMEOUT_MS = 1500;
|
|
3075
|
+
interface ICliUpdateNotice {
|
|
3076
|
+
currentVersion: string;
|
|
3077
|
+
latestVersion: string;
|
|
3078
|
+
installCommand: string;
|
|
3079
|
+
}
|
|
3080
|
+
interface IUpdateCheckCache {
|
|
3081
|
+
packageName: string;
|
|
3082
|
+
checkedAt: string;
|
|
3083
|
+
currentVersion: string;
|
|
3084
|
+
latestVersion?: string;
|
|
3085
|
+
errorMessage?: string;
|
|
3086
|
+
}
|
|
3087
|
+
type TCliUpdateCheckResult = {
|
|
3088
|
+
status: 'skipped';
|
|
3089
|
+
reason: 'disabled';
|
|
3090
|
+
} | {
|
|
3091
|
+
status: 'current';
|
|
3092
|
+
currentVersion: string;
|
|
3093
|
+
latestVersion: string;
|
|
3094
|
+
} | {
|
|
3095
|
+
status: 'update_available';
|
|
3096
|
+
notice: ICliUpdateNotice;
|
|
3097
|
+
} | {
|
|
3098
|
+
status: 'error';
|
|
3099
|
+
errorMessage: string;
|
|
3100
|
+
};
|
|
3101
|
+
interface ICheckForCliUpdateOptions {
|
|
3102
|
+
currentVersion: string;
|
|
3103
|
+
disabled?: boolean;
|
|
3104
|
+
force?: boolean;
|
|
3105
|
+
cachePath?: string;
|
|
3106
|
+
now?: Date;
|
|
3107
|
+
ttlMs?: number;
|
|
3108
|
+
timeoutMs?: number;
|
|
3109
|
+
registryUrl?: string;
|
|
3110
|
+
packageName?: string;
|
|
3111
|
+
fetchImpl?: typeof fetch;
|
|
3112
|
+
}
|
|
3113
|
+
interface IStartupCliUpdatePolicyInput {
|
|
3114
|
+
printMode: boolean;
|
|
3115
|
+
disableUpdateCheck: boolean;
|
|
3116
|
+
}
|
|
3117
|
+
declare function getUserUpdateCheckCachePath(home?: string): string;
|
|
3118
|
+
declare function readUpdateCheckCache(path: string): IUpdateCheckCache | undefined;
|
|
3119
|
+
declare function writeUpdateCheckCache(path: string, cache: IUpdateCheckCache): void;
|
|
3120
|
+
declare function checkForCliUpdate(options: ICheckForCliUpdateOptions): Promise<TCliUpdateCheckResult>;
|
|
3121
|
+
declare function getStartupCliUpdateNotice(options: ICheckForCliUpdateOptions): Promise<ICliUpdateNotice | undefined>;
|
|
3122
|
+
declare function shouldRunStartupCliUpdateCheck(input: IStartupCliUpdatePolicyInput): boolean;
|
|
3123
|
+
declare function formatCliUpdateNotice(notice: ICliUpdateNotice): string;
|
|
3124
|
+
declare function formatCliUpdateCheckMessage(result: TCliUpdateCheckResult): string;
|
|
3125
|
+
//#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 };
|
|
2966
3127
|
//# sourceMappingURL=index.d.ts.map
|