@robota-sdk/agent-sdk 3.0.0-beta.60 → 3.0.0-beta.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,8 @@
1
- import { ICompactEvent, ITerminalOutput, ISessionLogger, TPermissionHandler, Session, SessionStore, FileSessionLogger } from '@robota-sdk/agent-sessions';
2
- export { ICompactEvent, ISpinner, ITerminalOutput, TCompactTrigger } from '@robota-sdk/agent-sessions';
3
- import { TUniversalValue, TSessionEndReason, TPermissionMode, IToolWithEventService, IContextWindowState, IProviderProfileConfig, IProviderDefinition, IProviderSetupStepDefinition, TProviderSetupField, IProviderProbeResult, TToolArgs, IHistoryEntry, THooksConfig, IAIProvider, IHookTypeExecutor, IHookDefinition, IHookInput, IHookResult, TTrustLevel, TUniversalMessage } from '@robota-sdk/agent-core';
4
- export { IAIProvider, IContextTokenUsage, IContextWindowState, IHistoryEntry, IHookInput, IPermissionLists, THookEvent, THooksConfig, TPermissionDecision, TPermissionMode, TRUST_TO_MODE, TToolArgs, TTrustLevel, chatEntryToMessage, evaluatePermission, getMessagesForAPI, isChatEntry, messageToHistoryEntry, runHooks } from '@robota-sdk/agent-core';
5
- import { IBackgroundTaskManager, TBackgroundTaskStatus, IBackgroundTaskError, IBackgroundTaskListFilter, IBackgroundTaskState, IBackgroundTaskLogCursor, IBackgroundTaskLogPage, TBackgroundTaskEvent, ISubagentRunner, IBackgroundTaskRunner, IBackgroundTaskInput, ISubagentJobState, TBackgroundTaskIsolation, ISubagentJobResult, ISubagentManager } from '@robota-sdk/agent-runtime';
6
- export { BackgroundTaskError, BackgroundTaskManager, IAgentBackgroundTaskRequest, IBackgroundTaskError, IBackgroundTaskHandle, IBackgroundTaskInput, IBackgroundTaskListFilter, IBackgroundTaskLogCursor, IBackgroundTaskLogPage, IBackgroundTaskManager, IBackgroundTaskManagerOptions, IBackgroundTaskRequest, IBackgroundTaskResult, IBackgroundTaskRunner, IBackgroundTaskStart, IBackgroundTaskState, IBaseBackgroundTaskRequest, IPreparedSubagentWorktree, IProcessBackgroundTaskRequest, ISerializableProviderProfile, ISubagentJobHandle, ISubagentJobResult, ISubagentJobStart, ISubagentJobState, ISubagentManager, ISubagentManagerOptions, ISubagentRunner, ISubagentSpawnRequest, ISubagentWorktreeAdapter, ISubagentWorktreePrepareRequest, IWorktreeSubagentRunnerOptions, SubagentManager, TBackgroundPermissionPolicy, TBackgroundPrimitive, TBackgroundTaskErrorCategory, TBackgroundTaskEvent, TBackgroundTaskEventListener, TBackgroundTaskIdFactory, TBackgroundTaskIsolation, TBackgroundTaskKind, TBackgroundTaskMode, TBackgroundTaskRunnerEvent, TBackgroundTaskStatus, TBackgroundTaskTimeoutReason, TBackgroundTaskTransitionEvent, TSubagentJobMode, TSubagentJobStatus, WorktreeSubagentRunner, createWorktreeSubagentRunner, getBackgroundTaskTransitions, isTerminalBackgroundTaskStatus, transitionBackgroundTaskStatus } from '@robota-sdk/agent-runtime';
7
- import { createZodFunctionTool } from '@robota-sdk/agent-tools';
8
- export { TToolResult } from '@robota-sdk/agent-tools';
1
+ import { ISessionReplayValidationResult, ICompactEvent, ITerminalOutput, ISessionLogger, TPermissionHandler, Session, FileSessionLogger } from '@robota-sdk/agent-sessions';
2
+ import { TUniversalValue, TSessionEndReason, IHistoryEntry, TPermissionMode, IToolWithEventService, IContextWindowState, IProviderProfileConfig, IProviderDefinition, TProviderSetupField, IProviderSetupStepDefinition, IProviderSetupHelpLink, IProviderProbeResult, IProviderModelCatalog, TToolArgs, THooksConfig, IAIProvider, IHookTypeExecutor, IHookDefinition, IHookInput, IHookResult, TTrustLevel, TUniversalMessage, IToolSchema } from '@robota-sdk/agent-core';
3
+ import { IBackgroundTaskManager, TBackgroundTaskStatus, IBackgroundTaskError, IBackgroundTaskState, IBackgroundTaskLogCursor, TBackgroundTaskKind, TBackgroundPrimitive, TBackgroundTaskMode, TBackgroundTaskIsolation, TBackgroundPermissionPolicy, IBackgroundTaskListFilter, IBackgroundTaskLogPage, TBackgroundTaskEvent, ISubagentRunner, IBackgroundTaskRunner, IBackgroundTaskInput, ISubagentJobState, ISubagentJobResult, ISubagentManager } from '@robota-sdk/agent-runtime';
4
+ export { BackgroundTaskError, BackgroundTaskManager, DEFAULT_BACKGROUND_TASK_LOG_PAGE_SIZE, IAgentBackgroundTaskRequest, IBackgroundTaskError, IBackgroundTaskHandle, IBackgroundTaskInput, IBackgroundTaskListFilter, IBackgroundTaskLogCursor, IBackgroundTaskLogPage, IBackgroundTaskManager, IBackgroundTaskManagerOptions, IBackgroundTaskRequest, IBackgroundTaskResult, IBackgroundTaskRunner, IBackgroundTaskStart, IBackgroundTaskState, IBaseBackgroundTaskRequest, ICreateLimitedOutputCaptureOptions, ILimitedOutputCapture, IPreparedSubagentWorktree, IProcessBackgroundTaskRequest, ISerializableProviderProfile, ISubagentJobHandle, ISubagentJobResult, ISubagentJobStart, ISubagentJobState, ISubagentManager, ISubagentManagerOptions, ISubagentRunner, ISubagentSpawnRequest, ISubagentWorktreeAdapter, ISubagentWorktreePrepareRequest, IWorktreeSubagentRunnerOptions, SubagentManager, TBackgroundPermissionPolicy, TBackgroundPrimitive, TBackgroundTaskErrorCategory, TBackgroundTaskEvent, TBackgroundTaskEventListener, TBackgroundTaskIdFactory, TBackgroundTaskIsolation, TBackgroundTaskKind, TBackgroundTaskMode, TBackgroundTaskRunnerEvent, TBackgroundTaskStatus, TBackgroundTaskTimeoutReason, TBackgroundTaskTransitionEvent, TSubagentJobMode, TSubagentJobStatus, WorktreeSubagentRunner, appendPrefixedLogLines, createBackgroundTaskLogPage, createLimitedOutputCapture, createWorktreeSubagentRunner, getBackgroundTaskTransitions, isTerminalBackgroundTaskStatus, transitionBackgroundTaskStatus } from '@robota-sdk/agent-runtime';
5
+ import { ISandboxClient, IWorkspaceManifest, createZodFunctionTool } from '@robota-sdk/agent-tools';
9
6
 
10
7
  type TCapabilityKind = 'builtin-command' | 'skill' | 'agent' | 'tool';
11
8
  type TCapabilitySafety = 'read-only' | 'write' | 'process' | 'network' | 'background-agent';
@@ -37,7 +34,7 @@ interface ICommand {
37
34
  argumentHint?: string;
38
35
  /** When true, models cannot invoke this skill autonomously */
39
36
  disableModelInvocation?: boolean;
40
- /** When true, models may invoke this command through the command execution tool */
37
+ /** When true, models may invoke this command through the SDK-projected command tool */
41
38
  modelInvocable?: boolean;
42
39
  /** When false, users cannot invoke this skill directly */
43
40
  userInvocable?: boolean;
@@ -100,6 +97,8 @@ type TCommandEffect = {
100
97
  name: string;
101
98
  } | {
102
99
  type: 'conversation-history-cleared';
100
+ } | {
101
+ type: 'session-execution-started';
103
102
  } | {
104
103
  type: 'statusline-settings-patch';
105
104
  patch: TStatusLineCommandSettingsPatch;
@@ -114,11 +113,13 @@ interface ICommandChoicePromptOption {
114
113
  type TCommandInteractionPrompt = {
115
114
  kind: 'choice';
116
115
  title: string;
116
+ description?: string;
117
117
  options: readonly ICommandChoicePromptOption[];
118
118
  maxVisible?: number;
119
119
  } | {
120
120
  kind: 'text';
121
121
  title: string;
122
+ description?: string;
122
123
  placeholder?: string;
123
124
  allowEmpty?: boolean;
124
125
  masked?: boolean;
@@ -230,6 +231,186 @@ declare class BackgroundJobOrchestrator {
230
231
  }
231
232
  declare function summarizeBackgroundJobGroup(group: IBackgroundJobGroupState): IBackgroundJobGroupSummary;
232
233
 
234
+ declare const EXECUTION_ORIGIN_METADATA_KEYS: {
235
+ readonly kind: "executionOriginKind";
236
+ readonly sessionId: "executionOriginSessionId";
237
+ readonly turnId: "executionOriginTurnId";
238
+ readonly commandName: "executionOriginCommandName";
239
+ readonly toolCallId: "executionOriginToolCallId";
240
+ readonly skillId: "executionOriginSkillId";
241
+ readonly label: "executionOriginLabel";
242
+ };
243
+ type TExecutionEntryKind = 'main_thread' | 'background_task' | 'background_group';
244
+ type TExecutionWorkspaceStatus = 'active' | 'idle' | TBackgroundTaskStatus;
245
+ type TExecutionAttention = 'none' | 'unread' | 'failed' | 'permission' | 'completed';
246
+ type TExecutionWorkspaceVisibility = 'default' | 'collapsed';
247
+ type TExecutionControl = 'select' | 'cancel' | 'close' | 'send' | 'read_log' | 'wait';
248
+ type TExecutionOriginKind = 'user_prompt' | 'slash_command' | 'model_command' | 'tool_call' | 'skill' | 'transport' | 'system';
249
+ type TExecutionDetailRecordKind = 'message' | 'tool_activity' | 'process_output' | 'progress' | 'result' | 'error' | 'group_summary';
250
+ type TExecutionWorkspaceUpdateCause = 'main_thread' | 'background_task' | 'background_group';
251
+ interface IExecutionOrigin {
252
+ readonly kind: TExecutionOriginKind;
253
+ readonly sessionId: string;
254
+ readonly turnId?: string;
255
+ readonly commandName?: string;
256
+ readonly toolCallId?: string;
257
+ readonly skillId?: string;
258
+ readonly label?: string;
259
+ }
260
+ interface IExecutionWorkspaceEntry {
261
+ readonly id: string;
262
+ readonly sourceId: string;
263
+ readonly kind: TExecutionEntryKind;
264
+ readonly parentId?: string;
265
+ readonly groupId?: string;
266
+ readonly origin: IExecutionOrigin;
267
+ readonly taskKind?: TBackgroundTaskKind;
268
+ readonly status: TExecutionWorkspaceStatus;
269
+ readonly title: string;
270
+ readonly subtitle?: string;
271
+ readonly preview?: string;
272
+ readonly currentAction?: string;
273
+ readonly unread: boolean;
274
+ readonly attention: TExecutionAttention;
275
+ readonly visibility: TExecutionWorkspaceVisibility;
276
+ readonly updatedAt: string;
277
+ readonly controls: readonly TExecutionControl[];
278
+ }
279
+ interface IExecutionWorkspaceFilter {
280
+ readonly includeMainThread?: boolean;
281
+ readonly kinds?: readonly TExecutionEntryKind[];
282
+ readonly visibility?: readonly TExecutionWorkspaceVisibility[];
283
+ }
284
+ interface IExecutionWorkspaceSnapshot {
285
+ readonly sessionId: string;
286
+ readonly selectedEntryId?: string;
287
+ readonly updatedAt: string;
288
+ readonly entries: readonly IExecutionWorkspaceEntry[];
289
+ }
290
+ interface IExecutionWorkspaceSnapshotOptions {
291
+ readonly selectedEntryId?: string;
292
+ readonly filter?: IExecutionWorkspaceFilter;
293
+ }
294
+ interface IExecutionWorkspaceEvent {
295
+ readonly type: 'execution_workspace_updated';
296
+ readonly cause: TExecutionWorkspaceUpdateCause;
297
+ readonly entryId?: string;
298
+ readonly snapshot: IExecutionWorkspaceSnapshot;
299
+ }
300
+ interface IExecutionDetailCursor {
301
+ readonly offset: number;
302
+ }
303
+ interface IExecutionDetailRecord {
304
+ readonly id: string;
305
+ readonly kind: TExecutionDetailRecordKind;
306
+ readonly text: string;
307
+ readonly timestamp?: string;
308
+ readonly sourceId?: string;
309
+ }
310
+ interface IExecutionDetailPage {
311
+ readonly entryId: string;
312
+ readonly cursor?: IExecutionDetailCursor;
313
+ readonly nextCursor?: IExecutionDetailCursor;
314
+ readonly records: readonly IExecutionDetailRecord[];
315
+ }
316
+ interface ICreateMainThreadEntryInput {
317
+ readonly sessionId: string;
318
+ readonly isExecuting: boolean;
319
+ readonly hasPendingPrompt: boolean;
320
+ readonly historyLength: number;
321
+ readonly updatedAt: string;
322
+ readonly preview?: string;
323
+ }
324
+ interface ICreateExecutionWorkspaceSnapshotInput {
325
+ readonly sessionId: string;
326
+ readonly mainThread: ICreateMainThreadEntryInput;
327
+ readonly tasks: readonly IBackgroundTaskState[];
328
+ readonly groups: readonly IBackgroundJobGroupState[];
329
+ readonly selectedEntryId?: string;
330
+ readonly filter?: IExecutionWorkspaceFilter;
331
+ }
332
+ interface IExecutionWorkspaceEntryRef {
333
+ readonly kind: TExecutionEntryKind;
334
+ readonly sourceId: string;
335
+ }
336
+ interface ICreateMainThreadDetailPageInput {
337
+ readonly entryId: string;
338
+ readonly history: readonly IHistoryEntry[];
339
+ readonly cursor?: IExecutionDetailCursor;
340
+ }
341
+ interface ICreateLineDetailPageInput {
342
+ readonly entryId: string;
343
+ readonly lines: readonly string[];
344
+ readonly cursor?: IBackgroundTaskLogCursor;
345
+ readonly nextCursor?: IBackgroundTaskLogCursor;
346
+ readonly kind?: TExecutionDetailRecordKind;
347
+ }
348
+ declare function createMainThreadExecutionEntryId(sessionId: string): string;
349
+ declare function createBackgroundTaskExecutionEntryId(taskId: string): string;
350
+ declare function createBackgroundGroupExecutionEntryId(groupId: string): string;
351
+ declare function parseExecutionWorkspaceEntryId(entryId: string): IExecutionWorkspaceEntryRef | undefined;
352
+ declare function createExecutionOriginMetadata(origin: IExecutionOrigin): Record<string, TBackgroundPrimitive>;
353
+
354
+ declare function createExecutionWorkspaceSnapshot(input: ICreateExecutionWorkspaceSnapshotInput): IExecutionWorkspaceSnapshot;
355
+
356
+ declare function createMainThreadDetailPage(input: ICreateMainThreadDetailPageInput): IExecutionDetailPage;
357
+ declare function createLineDetailPage(input: ICreateLineDetailPageInput): IExecutionDetailPage;
358
+
359
+ interface ISpawnAgentTaskRequest {
360
+ readonly label: string;
361
+ readonly agentType: string;
362
+ readonly prompt: string;
363
+ readonly mode?: TBackgroundTaskMode;
364
+ readonly parentTaskId?: string;
365
+ readonly depth?: number;
366
+ readonly cwd?: string;
367
+ readonly model?: string;
368
+ readonly isolation?: TBackgroundTaskIsolation;
369
+ readonly allowedTools?: readonly string[];
370
+ readonly disallowedTools?: readonly string[];
371
+ readonly permissionPolicy?: TBackgroundPermissionPolicy;
372
+ readonly timeoutMs?: number;
373
+ readonly idleTimeoutMs?: number;
374
+ readonly maxRuntimeMs?: number;
375
+ readonly outputLimitBytes?: number;
376
+ readonly maxTextDeltas?: number;
377
+ readonly repetitionWindow?: number;
378
+ readonly repetitionThreshold?: number;
379
+ }
380
+ interface ISpawnProcessTaskRequest {
381
+ readonly command: string;
382
+ readonly label?: string;
383
+ readonly mode?: TBackgroundTaskMode;
384
+ readonly parentTaskId?: string;
385
+ readonly depth?: number;
386
+ readonly cwd?: string;
387
+ readonly shell?: string;
388
+ readonly env?: Record<string, string>;
389
+ readonly stdin?: string;
390
+ readonly timeoutMs?: number;
391
+ readonly idleTimeoutMs?: number;
392
+ readonly maxRuntimeMs?: number;
393
+ readonly outputLimitBytes?: number;
394
+ }
395
+ interface IBackgroundTaskSpawnerGroupRequest {
396
+ readonly waitPolicy: IBackgroundJobGroupCreateRequest['waitPolicy'];
397
+ readonly taskIds: readonly string[];
398
+ readonly label?: string;
399
+ }
400
+ interface IExecutionWorkspaceTaskSpawner {
401
+ spawnAgent(request: ISpawnAgentTaskRequest): Promise<IBackgroundTaskState>;
402
+ spawnProcess(request: ISpawnProcessTaskRequest): Promise<IBackgroundTaskState>;
403
+ createGroup(request: IBackgroundTaskSpawnerGroupRequest): IBackgroundJobGroupState;
404
+ }
405
+ interface ICreateExecutionWorkspaceTaskSpawnerOptions {
406
+ readonly manager: IBackgroundTaskManager;
407
+ readonly groupOrchestrator: BackgroundJobOrchestrator;
408
+ readonly sessionId: string;
409
+ readonly cwd: string;
410
+ readonly origin: IExecutionOrigin;
411
+ }
412
+ declare function createExecutionWorkspaceTaskSpawner(options: ICreateExecutionWorkspaceTaskSpawnerOptions): IExecutionWorkspaceTaskSpawner;
413
+
233
414
  declare const PLUGIN_COMMAND_DESCRIPTION = "Manage plugins";
234
415
  declare const PLUGIN_COMMAND_ARGUMENT_HINT = "manage | install <name@marketplace> | uninstall <name@marketplace> | enable <name@marketplace> | disable <name@marketplace> | marketplace <action>";
235
416
  declare const RELOAD_PLUGINS_COMMAND_DESCRIPTION = "Reload all plugin resources";
@@ -446,6 +627,94 @@ interface IMemoryEvent {
446
627
  data?: Record<string, TUniversalValue>;
447
628
  }
448
629
 
630
+ type TPromptFileReferenceReason = 'manual' | 'prompt-reference';
631
+ type TPromptFileReferenceDiagnosticCode = 'not-found' | 'outside-root' | 'directory-not-supported' | 'file-too-large' | 'total-too-large' | 'too-many-references' | 'max-depth' | 'circular-reference' | 'unreadable';
632
+ interface IPromptFileReferenceToken {
633
+ original: string;
634
+ path: string;
635
+ index: number;
636
+ }
637
+ interface IPromptFileReferenceRecord {
638
+ originalReference: string;
639
+ sourcePath: string;
640
+ relativePath: string;
641
+ reason: TPromptFileReferenceReason;
642
+ depth: number;
643
+ byteLength: number;
644
+ }
645
+ interface IResolvedPromptFileReference extends IPromptFileReferenceRecord {
646
+ content: string;
647
+ }
648
+ interface IPromptFileReferenceDiagnostic {
649
+ code: TPromptFileReferenceDiagnosticCode;
650
+ severity: 'error';
651
+ reference: string;
652
+ message: string;
653
+ path?: string;
654
+ }
655
+ interface IPromptFileReferenceLimits {
656
+ maxDepth?: number;
657
+ maxReferences?: number;
658
+ maxFileBytes?: number;
659
+ maxTotalBytes?: number;
660
+ }
661
+ interface IPromptFileReferenceResolveOptions {
662
+ cwd: string;
663
+ limits?: IPromptFileReferenceLimits;
664
+ reason?: TPromptFileReferenceReason;
665
+ }
666
+ interface IResolvedPromptFileReferences {
667
+ references: IResolvedPromptFileReference[];
668
+ diagnostics: IPromptFileReferenceDiagnostic[];
669
+ }
670
+ interface IPromptFileReferenceHistoryData {
671
+ message: string;
672
+ references: IPromptFileReferenceRecord[];
673
+ }
674
+
675
+ type TContextReferenceLoadType = 'manual' | 'prompt-reference';
676
+ type TContextReferenceStatus = 'active' | 'observed';
677
+ interface IContextReferenceItem {
678
+ id: string;
679
+ sourcePath: string;
680
+ relativePath: string;
681
+ originalReference: string;
682
+ loadType: TContextReferenceLoadType;
683
+ status: TContextReferenceStatus;
684
+ byteLength: number;
685
+ loadedAt: string;
686
+ lastUsedAt?: string;
687
+ }
688
+ interface IContextReferenceInventoryLimits {
689
+ maxActiveReferences?: number;
690
+ maxActiveBytes?: number;
691
+ maxObservedReferences?: number;
692
+ }
693
+ interface IContextReferenceAddResult {
694
+ reference?: IContextReferenceItem;
695
+ evicted: IContextReferenceItem[];
696
+ diagnostics: string[];
697
+ }
698
+ interface IContextReferenceRemoveResult {
699
+ removed?: IContextReferenceItem;
700
+ }
701
+ interface IContextReferenceClearResult {
702
+ removed: IContextReferenceItem[];
703
+ }
704
+ interface IContextReferenceUpsertResult {
705
+ references: IContextReferenceItem[];
706
+ evicted: IContextReferenceItem[];
707
+ }
708
+ declare function createContextReferenceItem(record: IPromptFileReferenceRecord, loadType: TContextReferenceLoadType, status: TContextReferenceStatus, timestamp?: string): IContextReferenceItem;
709
+ declare function upsertContextReference(references: readonly IContextReferenceItem[], item: IContextReferenceItem, limits?: IContextReferenceInventoryLimits): IContextReferenceUpsertResult;
710
+ declare function removeContextReference(references: readonly IContextReferenceItem[], query: string): {
711
+ references: IContextReferenceItem[];
712
+ result: IContextReferenceRemoveResult;
713
+ };
714
+ declare function clearContextReferences(references: readonly IContextReferenceItem[]): IContextReferenceClearResult;
715
+ declare function listActiveContextReferences(references: readonly IContextReferenceItem[]): IContextReferenceItem[];
716
+ declare function toContextReferenceRecords(references: readonly IContextReferenceItem[]): IPromptFileReferenceRecord[];
717
+
449
718
  type TAutoCompactThreshold$1 = number | false;
450
719
  declare const DEFAULT_AUTO_COMPACT_THRESHOLD = 0.835;
451
720
  declare const AUTO_COMPACT_THRESHOLD_SETTINGS_KEY = "autoCompactThreshold";
@@ -467,11 +736,35 @@ declare function writeAutoCompactThresholdSetting(context: ICommandHostContext,
467
736
  declare function resetAutoCompactThresholdSetting(context: ICommandHostContext): boolean;
468
737
  /** Run manual compaction through the command host facade and return before/after state. */
469
738
  declare function compactCommandContext(context: ICommandHostContext, instructions?: string): Promise<ICompactContextResult>;
739
+ /** List context reference inventory entries through the command host facade. */
740
+ declare function listCommandContextReferences(context: ICommandHostContext): IContextReferenceItem[];
741
+ /** Add a manual context reference through the command host facade. */
742
+ declare function addCommandContextReference(context: ICommandHostContext, path: string): Promise<IContextReferenceAddResult>;
743
+ /** Remove a context reference through the command host facade. */
744
+ declare function removeCommandContextReference(context: ICommandHostContext, path: string): IContextReferenceRemoveResult;
745
+ /** Clear all context references through the command host facade. */
746
+ declare function clearCommandContextReferences(context: ICommandHostContext): IContextReferenceClearResult;
470
747
 
471
748
  interface ICommandListEntry {
472
749
  name: string;
473
750
  description: string;
474
751
  }
752
+ interface ICommandSkillListEntry {
753
+ readonly name: string;
754
+ readonly description: string;
755
+ readonly source: string;
756
+ readonly modelInvocable: boolean;
757
+ readonly userInvocable: boolean;
758
+ readonly argumentHint?: string;
759
+ readonly context?: string;
760
+ readonly agent?: string;
761
+ }
762
+ type TCommandInvocationSource = 'user' | 'model';
763
+ interface ICommandSkillActivationRequest {
764
+ readonly invocationSource: TCommandInvocationSource;
765
+ readonly displayInput?: string;
766
+ readonly rawInput?: string;
767
+ }
475
768
  type TAutoCompactThresholdSource = 'default' | 'settings' | 'session';
476
769
  interface ICommandSessionRuntime {
477
770
  clearHistory(): void;
@@ -485,8 +778,14 @@ interface ICommandSessionRuntime {
485
778
  getAutoCompactThreshold?(): number | false;
486
779
  setAutoCompactThreshold?(threshold: TAutoCompactThreshold$1): void;
487
780
  }
781
+ interface ICommandSessionReplayValidationReport {
782
+ logFile: string;
783
+ entryCount: number;
784
+ validation: ISessionReplayValidationResult;
785
+ }
488
786
  interface ICommandHostContext {
489
787
  clearConversationHistory?(): void;
788
+ validateCurrentSessionReplayLog?(): ICommandSessionReplayValidationReport;
490
789
  getSession(): ICommandSessionRuntime;
491
790
  getContextState(): IContextWindowState;
492
791
  getAutoCompactThreshold(): TAutoCompactThreshold$1;
@@ -494,8 +793,15 @@ interface ICommandHostContext {
494
793
  setAutoCompactThreshold?(threshold: TAutoCompactThreshold$1, source?: TAutoCompactThresholdSource): void;
495
794
  getCommandHostAdapters?(): ICommandHostAdapters;
496
795
  compactContext(instructions?: string): Promise<void>;
796
+ listContextReferences?(): IContextReferenceItem[];
797
+ addContextReference?(path: string): Promise<IContextReferenceAddResult>;
798
+ removeContextReference?(path: string): IContextReferenceRemoveResult;
799
+ clearContextReferences?(): IContextReferenceClearResult;
497
800
  getCwd(): string;
801
+ getCommandInvocationSource?(): TCommandInvocationSource;
498
802
  listCommands?(): ICommandListEntry[];
803
+ listSkills?(): ICommandSkillListEntry[];
804
+ executeSkillCommandByName?(name: string, args: string, request: ICommandSkillActivationRequest): Promise<ICommandResult | null>;
499
805
  listEditCheckpoints(): IEditCheckpointSummary[];
500
806
  inspectEditCheckpoint?(checkpointId: string): IEditCheckpointInspection;
501
807
  restoreEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
@@ -573,6 +879,9 @@ interface IProviderSettingsBuildOptions {
573
879
  }
574
880
  declare function upsertProviderProfile(settings: TProviderSettingsDocument, profileName: string, profile: IProviderProfileSettings): TProviderSettingsDocument;
575
881
  declare function setCurrentProvider(settings: TProviderSettingsDocument, profileName: string): TProviderSettingsDocument;
882
+ declare function deleteProviderProfile(settings: TProviderSettingsDocument, profileName: string, options?: {
883
+ replacementCurrentProvider?: string;
884
+ }): TProviderSettingsDocument;
576
885
  declare function validateProviderProfile(profileName: string, profile: IProviderProfileSettings, options?: IProviderSettingsBuildOptions): void;
577
886
  declare function buildProviderSetupPatch(input: IProviderSetupInput, options?: IProviderSettingsBuildOptions): IProviderSetupPatch;
578
887
  declare function buildProviderProfile(input: IProviderSetupInput, options?: IProviderSettingsBuildOptions): IProviderProfileSettings;
@@ -588,6 +897,16 @@ interface IProviderCommandModuleOptions {
588
897
  settings: IProviderCommandSettingsAdapter;
589
898
  }
590
899
 
900
+ interface IProviderProfileNameSuggestionInput {
901
+ type: string;
902
+ model?: string;
903
+ }
904
+ interface IProviderProfileNameSuggestionOptions {
905
+ existingProfileNames?: readonly string[];
906
+ }
907
+ declare function suggestProviderProfileName(input: IProviderProfileNameSuggestionInput, options?: IProviderProfileNameSuggestionOptions): string;
908
+ declare function sanitizeProviderProfileName(value: string | undefined): string | undefined;
909
+
591
910
  type TProviderSetupType = string;
592
911
  type TPromptInput = (label: string, masked?: boolean) => Promise<string>;
593
912
  interface IProviderSetupPromptStep extends IProviderSetupStepDefinition {
@@ -596,8 +915,18 @@ interface IProviderSetupPromptStep extends IProviderSetupStepDefinition {
596
915
  interface IProviderSetupFlowState {
597
916
  type: TProviderSetupType;
598
917
  steps: readonly IProviderSetupPromptStep[];
918
+ setupHelpLinks: readonly IProviderSetupHelpLink[];
599
919
  stepIndex: number;
600
920
  values: Partial<Record<TProviderSetupField, string>>;
921
+ existingProfileNames: readonly string[];
922
+ profileName?: string;
923
+ setCurrent?: boolean;
924
+ }
925
+ interface IProviderSetupFlowOptions {
926
+ existingProfileNames?: readonly string[];
927
+ initialValues?: Partial<Record<TProviderSetupField, string>>;
928
+ profileName?: string;
929
+ setCurrent?: boolean;
601
930
  }
602
931
  type TProviderSetupFlowSubmitResult = {
603
932
  status: 'next';
@@ -610,14 +939,15 @@ type TProviderSetupFlowSubmitResult = {
610
939
  state: IProviderSetupFlowState;
611
940
  message: string;
612
941
  };
613
- declare function createProviderSetupFlow(type: TProviderSetupType, providerDefinitions: readonly IProviderDefinition[]): IProviderSetupFlowState;
942
+ declare function createProviderSetupFlow(type: TProviderSetupType, providerDefinitions: readonly IProviderDefinition[], options?: IProviderSetupFlowOptions): IProviderSetupFlowState;
614
943
  declare function formatProviderSetupSelectionPrompt(providerDefinitions: readonly IProviderDefinition[]): string;
615
944
  declare function resolveProviderSetupSelection(rawValue: string, providerDefinitions: readonly IProviderDefinition[]): TProviderSetupType;
616
945
  declare function getProviderSetupStep(state: IProviderSetupFlowState): IProviderSetupPromptStep;
617
946
  declare function submitProviderSetupValue(state: IProviderSetupFlowState, rawValue: string): TProviderSetupFlowSubmitResult;
618
- declare function runProviderSetupPromptFlow(type: TProviderSetupType, promptInput: TPromptInput, providerDefinitions: readonly IProviderDefinition[]): Promise<IProviderSetupInput>;
619
- declare function formatProviderSetupPromptLabel(step: IProviderSetupPromptStep): string;
947
+ declare function runProviderSetupPromptFlow(type: TProviderSetupType, promptInput: TPromptInput, providerDefinitions: readonly IProviderDefinition[], options?: IProviderSetupFlowOptions): Promise<IProviderSetupInput>;
948
+ declare function formatProviderSetupPromptLabel(step: IProviderSetupPromptStep, setupHelpLinks?: readonly IProviderSetupHelpLink[]): string;
620
949
  declare function formatProviderSetupChoiceLabel(definition: IProviderDefinition): string;
950
+ declare function formatProviderSetupHelpLinks(setupHelpLinks?: readonly IProviderSetupHelpLink[]): string;
621
951
  declare function validateProviderSetupValue(step: IProviderSetupPromptStep, value: string): string | undefined;
622
952
 
623
953
  declare function isEnvReference(value: string): boolean;
@@ -644,7 +974,37 @@ declare function closeCommandBackgroundTask(context: ICommandHostContext, taskId
644
974
 
645
975
  declare const MODEL_COMMAND_DESCRIPTION = "Change AI model";
646
976
  declare const MODEL_COMMAND_ARGUMENT_HINT = "<model-id>";
647
- declare function buildModelCommandSubcommands(source?: string): ICommand[];
977
+ interface IModelCommandSettingsAdapter {
978
+ readMergedSettings(): TProviderSettingsDocument;
979
+ }
980
+ interface IModelCommandModuleOptions {
981
+ providerDefinitions: readonly IProviderDefinition[];
982
+ settings: IModelCommandSettingsAdapter;
983
+ }
984
+ interface IBuildModelCommandSubcommandsOptions {
985
+ source?: string;
986
+ providerDefinitions?: readonly IProviderDefinition[];
987
+ settings?: TProviderSettingsDocument;
988
+ }
989
+ interface IActiveProviderModelCatalogState {
990
+ providerType: string;
991
+ catalog?: IProviderModelCatalog;
992
+ refreshAttempted: boolean;
993
+ refreshMessage?: string;
994
+ }
995
+ interface IResolveActiveProviderModelCatalogStateOptions {
996
+ settings?: TProviderSettingsDocument;
997
+ providerDefinitions?: readonly IProviderDefinition[];
998
+ refresh?: boolean;
999
+ }
1000
+ declare function buildModelCommandSubcommands(sourceOrOptions?: string | IBuildModelCommandSubcommandsOptions): ICommand[];
1001
+ declare function formatModelCommandUsageMessage(options?: {
1002
+ settings?: TProviderSettingsDocument;
1003
+ providerDefinitions?: readonly IProviderDefinition[];
1004
+ }): string;
1005
+ declare function formatModelCommandUsageMessageAsync(options?: IResolveActiveProviderModelCatalogStateOptions): Promise<string>;
1006
+ declare function resolveActiveProviderModelCatalog(settings: TProviderSettingsDocument | undefined, providerDefinitions?: readonly IProviderDefinition[]): IProviderModelCatalog | undefined;
1007
+ declare function resolveActiveProviderModelCatalogState(options: IResolveActiveProviderModelCatalogStateOptions): Promise<IActiveProviderModelCatalogState | undefined>;
648
1008
 
649
1009
  declare const LANGUAGE_COMMAND_DESCRIPTION = "Set response language";
650
1010
  declare const LANGUAGE_COMMAND_ARGUMENT_HINT = "<code>";
@@ -668,7 +1028,7 @@ declare function formatLanguageUsageMessage(commandName?: string): string;
668
1028
 
669
1029
  declare const PERMISSION_MODE_COMMAND_DESCRIPTION = "Show/change permission mode";
670
1030
  declare const PERMISSION_MODE_ARGUMENT_HINT = "plan | default | acceptEdits | bypassPermissions";
671
- declare const PERMISSIONS_COMMAND_DESCRIPTION = "Show permission rules";
1031
+ declare const PERMISSIONS_COMMAND_DESCRIPTION = "Show/change permission mode and permission rules";
672
1032
  interface IPermissionsCommandState {
673
1033
  readonly mode: TPermissionMode;
674
1034
  readonly sessionAllowed: readonly string[];
@@ -690,6 +1050,7 @@ declare const RENAME_COMMAND_DESCRIPTION = "Rename the current session";
690
1050
  declare const RENAME_COMMAND_USAGE = "Usage: rename <name>";
691
1051
  declare const RESUME_COMMAND_DESCRIPTION = "Resume a previous session";
692
1052
  declare const COST_COMMAND_DESCRIPTION = "Show session info";
1053
+ declare const VALIDATE_SESSION_COMMAND_DESCRIPTION = "Validate current session replay log";
693
1054
  declare const EXIT_COMMAND_DESCRIPTION = "Exit CLI";
694
1055
  interface ICommandSessionInfo {
695
1056
  sessionId: string;
@@ -701,6 +1062,8 @@ declare function createSessionRenamedEffect(name: string): TCommandEffect;
701
1062
  declare function createSessionPickerRequestedEffect(): TCommandEffect;
702
1063
  declare function createSessionExitRequestedEffect(): TCommandEffect;
703
1064
  declare function readCommandSessionInfo(context: ICommandHostContext): ICommandSessionInfo;
1065
+ declare function validateCommandSessionReplayLog(context: ICommandHostContext): ICommandSessionReplayValidationReport;
1066
+ declare function formatCommandSessionReplayValidationReport(report: ICommandSessionReplayValidationReport): string;
704
1067
 
705
1068
  declare const REWIND_COMMAND_DESCRIPTION = "List, inspect, restore, or rollback edit checkpoints.";
706
1069
  declare const REWIND_COMMAND_ARGUMENT_HINT = "list | inspect CHECKPOINT_ID | restore CHECKPOINT_ID | code CHECKPOINT_ID | rollback CHECKPOINT_ID";
@@ -1175,11 +1538,6 @@ declare class SystemCommandExecutor {
1175
1538
  /** Built-in system commands. */
1176
1539
  declare function createSystemCommands(): ISystemCommand[];
1177
1540
 
1178
- /**
1179
- * Build a skill prompt from slash command input.
1180
- * Supports variable substitution and shell command preprocessing.
1181
- */
1182
-
1183
1541
  /** Context variables available during skill prompt processing */
1184
1542
  interface SkillPromptContext {
1185
1543
  /** Current session ID — substituted for ${CLAUDE_SESSION_ID} */
@@ -1204,8 +1562,6 @@ declare function substituteVariables(content: string, args: string, context?: Sk
1204
1562
  * Commands have a 5-second timeout.
1205
1563
  */
1206
1564
  declare function preprocessShellCommands(content: string): Promise<string>;
1207
- /** Build a skill prompt from a slash command input and registry */
1208
- declare function buildSkillPrompt(input: string, registry: CommandRegistry, context?: SkillPromptContext): Promise<string | null>;
1209
1565
 
1210
1566
  /**
1211
1567
  * Skill execution logic.
@@ -1247,6 +1603,36 @@ interface ISkillExecutionResult {
1247
1603
  */
1248
1604
  declare function executeSkill(skill: ICommand, args: string, callbacks: ISkillExecutionCallbacks, context?: SkillPromptContext): Promise<ISkillExecutionResult>;
1249
1605
 
1606
+ type TSkillActivationSource = 'skill' | 'plugin';
1607
+ type TSkillActivationInvocation = 'user-slash' | 'model-tool';
1608
+ type TSkillActivationMode = 'inject' | 'fork';
1609
+ type TSkillActivationStatus = 'started' | 'completed' | 'failed';
1610
+ interface ISkillActivationEvent {
1611
+ readonly type: 'skill-activation';
1612
+ readonly skillName: string;
1613
+ readonly source: TSkillActivationSource;
1614
+ readonly invocation: TSkillActivationInvocation;
1615
+ readonly mode: TSkillActivationMode;
1616
+ readonly status: TSkillActivationStatus;
1617
+ readonly timestamp: string;
1618
+ readonly qualifiedName?: string;
1619
+ readonly error?: string;
1620
+ }
1621
+ interface ISkillActivationHistoryData extends ISkillActivationEvent {
1622
+ readonly message: string;
1623
+ }
1624
+
1625
+ declare function buildPromptWithFileReferences(input: string, references: readonly IResolvedPromptFileReference[]): string;
1626
+ declare function hasBlockingPromptFileReferenceDiagnostics(diagnostics: readonly IPromptFileReferenceDiagnostic[]): boolean;
1627
+ declare function formatPromptFileReferenceDiagnostics(diagnostics: readonly IPromptFileReferenceDiagnostic[]): string;
1628
+ declare function toPromptFileReferenceRecords(references: readonly IResolvedPromptFileReference[]): IPromptFileReferenceRecord[];
1629
+ declare function createPromptFileReferenceHistoryEntry(references: readonly IResolvedPromptFileReference[]): IHistoryEntry<IPromptFileReferenceHistoryData>;
1630
+
1631
+ declare function parsePromptFileReferences(input: string): IPromptFileReferenceToken[];
1632
+
1633
+ declare function resolvePromptFileReferences(input: string, options: IPromptFileReferenceResolveOptions): Promise<IResolvedPromptFileReferences>;
1634
+ declare function resolvePromptFileReferencePaths(referencePaths: readonly string[], options: IPromptFileReferenceResolveOptions): Promise<IResolvedPromptFileReferences>;
1635
+
1250
1636
  /**
1251
1637
  * Types for InteractiveSession — event-driven session wrapper.
1252
1638
  */
@@ -1288,6 +1674,7 @@ interface IExecutionResult {
1288
1674
  toolSummaries: IToolSummary[];
1289
1675
  contextState: IContextWindowState;
1290
1676
  usage?: IUsageSnapshot;
1677
+ promptFileReferences?: IPromptFileReferenceRecord[];
1291
1678
  }
1292
1679
  /** Summary of a tool call extracted from history. */
1293
1680
  interface IToolSummary {
@@ -1307,8 +1694,11 @@ interface IInteractiveSessionEvents {
1307
1694
  context_update: (state: IContextWindowState) => void;
1308
1695
  compact: (event: ICompactEvent) => void;
1309
1696
  interrupted: (result: IExecutionResult) => void;
1697
+ skill_activation: (event: ISkillActivationEvent) => void;
1310
1698
  background_task_event: (event: TBackgroundTaskEvent) => void;
1311
1699
  background_job_group_event: (event: TBackgroundJobGroupEvent) => void;
1700
+ execution_workspace_event: (event: IExecutionWorkspaceEvent) => void;
1701
+ user_message: (content: string) => void;
1312
1702
  }
1313
1703
  type TInteractiveEventName = keyof IInteractiveSessionEvents;
1314
1704
  /**
@@ -1623,6 +2013,45 @@ declare function wrapReversibleExecutionTools(tools: readonly IToolWithEventServ
1623
2013
  checkpointAvailable: boolean;
1624
2014
  }): IToolWithEventService[];
1625
2015
 
2016
+ interface IInteractiveSessionRecord {
2017
+ id: string;
2018
+ name?: string;
2019
+ cwd: string;
2020
+ createdAt: string;
2021
+ updatedAt: string;
2022
+ messages: TUniversalMessage[];
2023
+ history?: IHistoryEntry[];
2024
+ systemPrompt?: string;
2025
+ toolSchemas?: IToolSchema[];
2026
+ backgroundTasks?: IBackgroundTaskState[];
2027
+ backgroundTaskEvents?: TBackgroundTaskEvent[];
2028
+ backgroundJobGroups?: IBackgroundJobGroupState[];
2029
+ backgroundJobGroupEvents?: TBackgroundJobGroupEvent[];
2030
+ skillActivationEvents?: ISkillActivationEvent[];
2031
+ memoryEvents?: IMemoryEvent[];
2032
+ usedMemoryReferences?: IMemoryReference[];
2033
+ contextReferences?: IContextReferenceItem[];
2034
+ sandboxSnapshotId?: string;
2035
+ }
2036
+ interface IInteractiveSessionStore {
2037
+ save(session: IInteractiveSessionRecord): void;
2038
+ load(id: string): IInteractiveSessionRecord | undefined;
2039
+ list(): IInteractiveSessionRecord[];
2040
+ delete(id: string): void;
2041
+ }
2042
+ interface IResumableSessionSummary {
2043
+ id: string;
2044
+ name?: string;
2045
+ cwd: string;
2046
+ updatedAt: string;
2047
+ messageCount: number;
2048
+ preview: string;
2049
+ }
2050
+ declare function createProjectSessionStore(cwd: string): IInteractiveSessionStore;
2051
+ declare function listResumableSessionSummaries(sessionStore: IInteractiveSessionStore | undefined, cwd: string): IResumableSessionSummary[];
2052
+ declare function resolveLatestSessionId(sessionStore: IInteractiveSessionStore | undefined, cwd: string): string | undefined;
2053
+ declare function resolveSessionIdByIdOrName(sessionStore: IInteractiveSessionStore | undefined, idOrName: string): string | undefined;
2054
+
1626
2055
  /**
1627
2056
  * Session factory — assembles a fully-configured Session from config, context,
1628
2057
  * tools, and provider.
@@ -1650,7 +2079,7 @@ interface ICreateSessionOptions {
1650
2079
  /** Maximum number of agentic turns per run() call. Undefined = unlimited. */
1651
2080
  maxTurns?: number;
1652
2081
  /** Optional session store for persistence */
1653
- sessionStore?: SessionStore;
2082
+ sessionStore?: IInteractiveSessionStore;
1654
2083
  /** Inject a pre-constructed AI provider (used by tests to avoid real API calls) */
1655
2084
  provider?: IAIProvider;
1656
2085
  /** Custom permission handler (overrides terminal-based prompts, used by Ink UI) */
@@ -1714,6 +2143,8 @@ interface ICreateSessionOptions {
1714
2143
  editCheckpointRecorder?: IEditCheckpointRecorder;
1715
2144
  /** Opt-in local-first reversible execution policy for write/shell tools. */
1716
2145
  reversibleExecution?: IReversibleExecutionOptions;
2146
+ /** Optional provider sandbox client used by sandbox-aware built-in tools. */
2147
+ sandboxClient?: ISandboxClient;
1717
2148
  }
1718
2149
 
1719
2150
  /**
@@ -1724,7 +2155,10 @@ interface ICreateSessionOptions {
1724
2155
  * Create the default set of CLI tools.
1725
2156
  * Returns the 8 standard tools as IToolWithEventService[].
1726
2157
  */
1727
- declare function createDefaultTools(): IToolWithEventService[];
2158
+ interface ICreateDefaultToolsOptions {
2159
+ sandboxClient?: ISandboxClient;
2160
+ }
2161
+ declare function createDefaultTools(options?: ICreateDefaultToolsOptions): IToolWithEventService[];
1728
2162
 
1729
2163
  /**
1730
2164
  * Framework system prompt suffixes for subagent sessions.
@@ -1808,7 +2242,7 @@ interface IInteractiveSessionStandardOptions {
1808
2242
  permissionMode?: ICreateSessionOptions['permissionMode'];
1809
2243
  maxTurns?: number;
1810
2244
  permissionHandler?: TInteractivePermissionHandler;
1811
- sessionStore?: SessionStore;
2245
+ sessionStore?: IInteractiveSessionStore;
1812
2246
  sessionName?: string;
1813
2247
  resumeSessionId?: string;
1814
2248
  forkSession?: boolean;
@@ -1836,6 +2270,14 @@ interface IInteractiveSessionStandardOptions {
1836
2270
  config?: IResolvedConfig;
1837
2271
  /** Opt-in local-first reversible execution policy for write/shell tools. */
1838
2272
  reversibleExecution?: IReversibleExecutionOptions;
2273
+ /** Optional provider sandbox client used by sandbox-aware built-in tools. */
2274
+ sandboxClient?: ISandboxClient;
2275
+ /** Fresh-session workspace manifest applied through the sandbox client. */
2276
+ workspaceManifest?: IWorkspaceManifest;
2277
+ /** Sandbox target root for workspace manifest entries. Defaults to /workspace. */
2278
+ sandboxWorkspaceRoot?: string;
2279
+ /** Provider sandbox snapshot id to restore before replaying saved messages. */
2280
+ sandboxSnapshotId?: string;
1839
2281
  }
1840
2282
  /** Test/advanced construction: inject pre-built session directly. */
1841
2283
  interface IInteractiveSessionInjectedOptions {
@@ -1845,7 +2287,7 @@ interface IInteractiveSessionInjectedOptions {
1845
2287
  permissionMode?: ICreateSessionOptions['permissionMode'];
1846
2288
  maxTurns?: number;
1847
2289
  permissionHandler?: TInteractivePermissionHandler;
1848
- sessionStore?: SessionStore;
2290
+ sessionStore?: IInteractiveSessionStore;
1849
2291
  sessionName?: string;
1850
2292
  resumeSessionId?: string;
1851
2293
  forkSession?: boolean;
@@ -1895,6 +2337,7 @@ declare class InteractiveSession {
1895
2337
  private backgroundJobGroupEvents;
1896
2338
  private memoryEvents;
1897
2339
  private usedMemoryReferences;
2340
+ private contextReferences;
1898
2341
  private editCheckpointStore;
1899
2342
  private resumeSessionId?;
1900
2343
  private forkSession;
@@ -1903,10 +2346,18 @@ declare class InteractiveSession {
1903
2346
  private backgroundJobOrchestrator;
1904
2347
  private readonly commandModules;
1905
2348
  private readonly commandHostAdapters?;
2349
+ private readonly skillCommandSource;
2350
+ private skillActivationEvents;
1906
2351
  private autoCompactThresholdSource;
1907
2352
  private shuttingDown;
1908
2353
  private shutdownPromise;
2354
+ private readonly sandboxClient?;
2355
+ private sandboxSnapshotId?;
2356
+ private commandInvocationSource;
1909
2357
  constructor(options: IInteractiveSessionOptions);
2358
+ private configureInjectedSession;
2359
+ private restoreSessionRecordIfNeeded;
2360
+ private startAsyncInitializationIfNeeded;
1910
2361
  private initializeAsync;
1911
2362
  private ensureInitialized;
1912
2363
  private getSessionOrThrow;
@@ -1915,16 +2366,22 @@ declare class InteractiveSession {
1915
2366
  private emit;
1916
2367
  submit(input: string, displayInput?: string, rawInput?: string): Promise<void>;
1917
2368
  executeCommand(name: string, args: string): Promise<ICommandResult | null>;
2369
+ private executeCommandWithInvocationSource;
1918
2370
  executeModelCommand(name: string, args: string): Promise<ICommandResult | null>;
1919
- executeSkillCommand(skill: ICommand, args: string, displayInput?: string, rawInput?: string): Promise<ISkillExecutionResult>;
2371
+ getCommandInvocationSource(): TCommandInvocationSource;
2372
+ executeSkillCommandByName(name: string, args: string, request: ICommandSkillActivationRequest): Promise<ICommandResult | null>;
2373
+ private executeUserResolvedSkillCommand;
1920
2374
  listCommands(): Array<{
1921
2375
  name: string;
1922
2376
  description: string;
1923
2377
  }>;
2378
+ listSkills(): ICommandSkillListEntry[];
1924
2379
  listModelInvocableCommands(): Array<{
1925
2380
  name: string;
1926
2381
  description: string;
1927
2382
  }>;
2383
+ getSkillActivationEvents(): ISkillActivationEvent[];
2384
+ private findSkillCommand;
1928
2385
  abort(): void;
1929
2386
  shutdown(options?: IInteractiveSessionShutdownOptions): Promise<void>;
1930
2387
  cancelQueue(): void;
@@ -1951,6 +2408,10 @@ declare class InteractiveSession {
1951
2408
  rollbackEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
1952
2409
  getUsedMemoryReferences(): IMemoryReference[];
1953
2410
  recordMemoryEvent(event: IMemoryEvent): void;
2411
+ listContextReferences(): IContextReferenceItem[];
2412
+ addContextReference(path: string): Promise<IContextReferenceAddResult>;
2413
+ removeContextReference(path: string): IContextReferenceRemoveResult;
2414
+ clearContextReferences(): IContextReferenceClearResult;
1954
2415
  listBackgroundTasks(filter?: IBackgroundTaskListFilter): IBackgroundTaskState[];
1955
2416
  getBackgroundTask(taskId: string): IBackgroundTaskState | undefined;
1956
2417
  cancelBackgroundTask(taskId: string, reason?: string): Promise<void>;
@@ -1961,6 +2422,11 @@ declare class InteractiveSession {
1961
2422
  listBackgroundJobGroups(): IBackgroundJobGroupState[];
1962
2423
  getBackgroundJobGroup(groupId: string): IBackgroundJobGroupState | undefined;
1963
2424
  waitBackgroundJobGroup(groupId: string): Promise<IBackgroundJobGroupState>;
2425
+ getExecutionWorkspaceSnapshot(options?: IExecutionWorkspaceSnapshotOptions): IExecutionWorkspaceSnapshot;
2426
+ listExecutionWorkspaceEntries(filter?: IExecutionWorkspaceFilter): IExecutionWorkspaceEntry[];
2427
+ getExecutionWorkspaceEntry(entryId: string): IExecutionWorkspaceEntry | undefined;
2428
+ readExecutionWorkspaceDetail(entryId: string, cursor?: IExecutionDetailCursor): Promise<IExecutionDetailPage>;
2429
+ createExecutionWorkspaceTaskSpawner(origin: IExecutionOrigin): IExecutionWorkspaceTaskSpawner;
1964
2430
  listAgentDefinitions(): Array<{
1965
2431
  name: string;
1966
2432
  description: string;
@@ -1980,7 +2446,15 @@ declare class InteractiveSession {
1980
2446
  closeAgentJob(jobId: string): Promise<void>;
1981
2447
  setName(name: string): void;
1982
2448
  attachTransport(transport: ITransportAdapter): void;
2449
+ private executeSkillWithActivation;
2450
+ private recordSkillActivation;
2451
+ private recordSkillActivationEvent;
1983
2452
  private executeForkSkillCommand;
2453
+ private readBackgroundTaskDetail;
2454
+ private readBackgroundGroupDetail;
2455
+ private getMainThreadUpdatedAt;
2456
+ private getMainThreadPreview;
2457
+ private emitExecutionWorkspaceUpdated;
1984
2458
  private getBackgroundTaskManagerOrThrow;
1985
2459
  private getBackgroundTaskManager;
1986
2460
  private getBackgroundJobOrchestratorOrThrow;
@@ -1994,6 +2468,7 @@ declare class InteractiveSession {
1994
2468
  private getBackgroundTaskSnapshots;
1995
2469
  private getBackgroundJobGroupSnapshots;
1996
2470
  private persistCurrentSession;
2471
+ private captureSandboxSnapshot;
1997
2472
  private startForkSkillExecution;
1998
2473
  private finishForkSkillExecution;
1999
2474
  private recordForkSkillError;
@@ -2002,6 +2477,8 @@ declare class InteractiveSession {
2002
2477
  private applyForkSkillResult;
2003
2478
  private executeForegroundCommand;
2004
2479
  private executePrompt;
2480
+ private recordContextReferenceUsage;
2481
+ private recordPromptContextReferences;
2005
2482
  private getEditCheckpointStore;
2006
2483
  private beginEditCheckpointTurn;
2007
2484
  private finalizeEditCheckpointTurn;
@@ -2047,6 +2524,109 @@ interface ICreateQueryOptions {
2047
2524
  */
2048
2525
  declare function createQuery(options: ICreateQueryOptions): (prompt: string) => Promise<string>;
2049
2526
 
2527
+ declare const USER_LOCAL_STORAGE_CATEGORIES: readonly ["preferences", "view-state", "memory-projections", "task-associations", "workflow-metadata", "inspection-index"];
2528
+ type TUserLocalStorageCategory = (typeof USER_LOCAL_STORAGE_CATEGORIES)[number];
2529
+ interface IUserLocalStorageCategoryDefinition {
2530
+ readonly category: TUserLocalStorageCategory;
2531
+ readonly purpose: string;
2532
+ readonly mayExecuteCommands: false;
2533
+ }
2534
+ interface IUserLocalStorageItemSummary {
2535
+ readonly root: string;
2536
+ readonly category: TUserLocalStorageCategory;
2537
+ readonly key: string;
2538
+ readonly summary: string;
2539
+ readonly source: string;
2540
+ readonly scope: string;
2541
+ readonly storageLocation: string;
2542
+ readonly createdAt?: string;
2543
+ readonly lastUsedAt?: string;
2544
+ readonly enabled: boolean;
2545
+ readonly deleteAvailable: boolean;
2546
+ readonly disableAvailable: boolean;
2547
+ }
2548
+ interface IUserLocalStorageCategoryProjection {
2549
+ readonly category: TUserLocalStorageCategory;
2550
+ readonly purpose: string;
2551
+ readonly mayExecuteCommands: false;
2552
+ readonly storageLocation: string;
2553
+ readonly itemCount: number;
2554
+ readonly items: readonly IUserLocalStorageItemSummary[];
2555
+ }
2556
+ interface IUserLocalStorageInspection {
2557
+ readonly root: string;
2558
+ readonly activeRepositoryRoot: string;
2559
+ readonly categories: readonly IUserLocalStorageCategoryProjection[];
2560
+ readonly generatedAt: string;
2561
+ }
2562
+ interface IResolveUserLocalStorageRootOptions {
2563
+ readonly activeRepositoryRoot: string;
2564
+ readonly homeDir?: string;
2565
+ readonly storageRoot?: string;
2566
+ }
2567
+ interface IInspectUserLocalStorageOptions extends IResolveUserLocalStorageRootOptions {
2568
+ readonly now?: () => Date;
2569
+ readonly createDirectories?: boolean;
2570
+ }
2571
+ declare const USER_LOCAL_STORAGE_CATEGORY_DEFINITIONS: readonly IUserLocalStorageCategoryDefinition[];
2572
+ declare function resolveUserLocalStorageRoot(options: IResolveUserLocalStorageRootOptions): Promise<string>;
2573
+ declare function inspectUserLocalStorage(options: IInspectUserLocalStorageOptions): Promise<IUserLocalStorageInspection>;
2574
+
2575
+ declare const USER_LOCAL_MEMORY_CATEGORIES: readonly ["view-preference", "last-visible-cwd", "background-selection", "task-association", "display-preference", "inspection-choice"];
2576
+ type TUserLocalMemoryCategory = (typeof USER_LOCAL_MEMORY_CATEGORIES)[number];
2577
+ type TUserLocalMemoryCommandExecutionEffect = 'none';
2578
+ interface IUserLocalMemoryItemProjection {
2579
+ readonly root: string;
2580
+ readonly category: TUserLocalMemoryCategory;
2581
+ readonly key: string;
2582
+ readonly summary: string;
2583
+ readonly valueSummary: string;
2584
+ readonly source: string;
2585
+ readonly scope: string;
2586
+ readonly storageLocation: string;
2587
+ readonly createdAt: string;
2588
+ readonly lastUsedAt: string;
2589
+ readonly enabled: boolean;
2590
+ readonly displayNavigationRule: string;
2591
+ readonly commandExecutionEffect: TUserLocalMemoryCommandExecutionEffect;
2592
+ readonly deleteAvailable: true;
2593
+ readonly disableAvailable: true;
2594
+ }
2595
+ interface IUserLocalMemoryListProjection {
2596
+ readonly root: string;
2597
+ readonly activeRepositoryRoot: string;
2598
+ readonly items: readonly IUserLocalMemoryItemProjection[];
2599
+ }
2600
+ interface IUserLocalMemorySetOptions extends IResolveUserLocalStorageRootOptions {
2601
+ readonly category: TUserLocalMemoryCategory;
2602
+ readonly key: string;
2603
+ readonly value: string;
2604
+ readonly summary: string;
2605
+ readonly source: string;
2606
+ readonly scope?: string;
2607
+ readonly now?: () => Date;
2608
+ }
2609
+ interface IUserLocalMemoryItemOptions extends IResolveUserLocalStorageRootOptions {
2610
+ readonly category: TUserLocalMemoryCategory;
2611
+ readonly key: string;
2612
+ readonly now?: () => Date;
2613
+ }
2614
+ interface IUserLocalMemoryListOptions extends IResolveUserLocalStorageRootOptions {
2615
+ readonly now?: () => Date;
2616
+ }
2617
+ interface IUserLocalMemoryDeleteResult {
2618
+ readonly category: TUserLocalMemoryCategory;
2619
+ readonly key: string;
2620
+ readonly deleted: boolean;
2621
+ }
2622
+
2623
+ declare function setUserLocalMemoryItem(options: IUserLocalMemorySetOptions): Promise<IUserLocalMemoryItemProjection>;
2624
+ declare function listUserLocalMemoryItems(options: IUserLocalMemoryListOptions): Promise<IUserLocalMemoryListProjection>;
2625
+ declare function inspectUserLocalMemoryItem(options: IUserLocalMemoryItemOptions): Promise<IUserLocalMemoryItemProjection>;
2626
+ declare function disableUserLocalMemoryItem(options: IUserLocalMemoryItemOptions): Promise<IUserLocalMemoryItemProjection>;
2627
+ declare function deleteUserLocalMemoryItem(options: IUserLocalMemoryItemOptions): Promise<IUserLocalMemoryDeleteResult>;
2628
+ declare function readEnabledUserLocalMemoryItem(options: IUserLocalMemoryItemOptions): Promise<IUserLocalMemoryItemProjection | null>;
2629
+
2050
2630
  type TSelfHostingVerificationPhase = 'checkpoint' | 'edit' | 'handoff' | 'verify' | 'recover';
2051
2631
  type TSelfHostingLoopState = 'idle' | 'checkpointed' | 'editing' | 'verifying' | 'passed' | 'failed' | 'rolled_back' | 'cancelled';
2052
2632
  type TSelfHostingLoopEvent = 'checkpoint_created' | 'edits_started' | 'edits_applied' | 'verify_passed' | 'verify_failed' | 'rollback_completed' | 'cancelled';
@@ -2118,16 +2698,45 @@ declare function retrieveAgentToolDeps(key: object): IAgentToolDeps | undefined;
2118
2698
  */
2119
2699
  declare function createAgentTool(deps: IAgentToolDeps): ReturnType<typeof createZodFunctionTool>;
2120
2700
 
2701
+ type TModelCommandDescriptor$1 = Pick<ICapabilityDescriptor, 'name' | 'description' | 'argumentHint'>;
2121
2702
  interface ICommandExecutionToolDeps {
2122
2703
  isModelInvocable: (command: string) => boolean;
2123
2704
  execute: (command: string, args: string) => Promise<ICommandResult | null>;
2705
+ commandNames?: readonly string[];
2706
+ commandDescriptors?: readonly TModelCommandDescriptor$1[];
2124
2707
  }
2125
2708
  declare function createCommandExecutionTool(deps: ICommandExecutionToolDeps): ReturnType<typeof createZodFunctionTool>;
2126
2709
 
2710
+ declare const MODEL_COMMAND_TOOL_PREFIX: "robota_command_";
2711
+ declare const PROVIDER_SAFE_TOOL_NAME_PATTERN: RegExp;
2712
+ type TModelCommandDescriptor = Pick<ICapabilityDescriptor, 'name' | 'description' | 'argumentHint'>;
2713
+ interface IProjectedModelCommandTool {
2714
+ readonly commandName: string;
2715
+ readonly toolName: string;
2716
+ readonly description: string;
2717
+ readonly descriptor: TModelCommandDescriptor;
2718
+ }
2719
+ interface IModelCommandToolProjection {
2720
+ readonly commandTools: readonly IProjectedModelCommandTool[];
2721
+ readonly toolNameToCommandName: ReadonlyMap<string, string>;
2722
+ readonly commandNameToToolName: ReadonlyMap<string, string>;
2723
+ }
2724
+ interface IProjectedCommandExecutionToolsDeps {
2725
+ isModelInvocable: (command: string) => boolean;
2726
+ execute: (command: string, args: string) => Promise<ICommandResult | null>;
2727
+ commandDescriptors: readonly TModelCommandDescriptor[];
2728
+ }
2729
+ declare function normalizeModelCommandName(command: string): string;
2730
+ declare function createProviderSafeModelCommandToolName(commandName: string): string;
2731
+ declare function createModelCommandToolProjection(commandDescriptors: readonly TModelCommandDescriptor[]): IModelCommandToolProjection;
2732
+ declare function formatProjectedModelCommandToolPromptDescription(projection: IProjectedModelCommandTool): string;
2733
+ declare function createProjectedCommandExecutionTools(deps: IProjectedCommandExecutionToolsDeps): Array<ReturnType<typeof createZodFunctionTool>>;
2734
+
2127
2735
  interface IBackgroundProcessToolDeps {
2128
2736
  backgroundTaskManager: IBackgroundTaskManager;
2129
2737
  cwd?: string;
2130
2738
  parentSessionId?: string;
2739
+ metadata?: Record<string, TBackgroundPrimitive>;
2131
2740
  }
2132
2741
  declare function createBackgroundProcessTool(deps: IBackgroundProcessToolDeps): ReturnType<typeof createZodFunctionTool>;
2133
2742
 
@@ -2190,4 +2799,4 @@ declare function updateTaskFileStatus(taskPath: string, status: TTaskFileStatus,
2190
2799
  */
2191
2800
  declare function promptForApproval(terminal: ITerminalOutput, toolName: string, toolArgs: TToolArgs): Promise<boolean>;
2192
2801
 
2193
- 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, EXIT_COMMAND_DESCRIPTION, EditCheckpointStore, HELP_COMMAND_DESCRIPTION, type IAgentDefinition, type IAgentExecutorOptions, type IAgentSession, type IAgentToolDeps, type IAppendMemoryInput, type IAppendMemoryResult, type IBackgroundJobGroupCreateRequest, type IBackgroundJobGroupState, type IBackgroundJobGroupSummary, type IBackgroundJobOrchestratorOptions, type IBackgroundJobResultEnvelope, type IBackgroundProcessToolDeps, 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 ICommandSessionRuntime, type ICommandSettingsAdapter, type ICommandSettingsDocument, type ICommandSource, type ICompactContextResult, type ICreateQueryOptions, type IDiffLine, type IEditCheckpointFileInspection, type IEditCheckpointFileRecord, type IEditCheckpointInspection, type IEditCheckpointInspectionPlan, type IEditCheckpointManifest, type IEditCheckpointRecorder, type IEditCheckpointRestoreResult, type IEditCheckpointSummary, type IEditCheckpointTurnInput, type IExecutionResult, type IForkExecutionOptions, type IInProcessSubagentRunnerDeps, type IInstalledPluginRecord, type IInstalledPluginsRegistry, type IInteractiveSessionEvents, type IInteractiveSessionOptions, type IInteractiveSessionShutdownOptions, type IKnownMarketplaceEntry, type IKnownMarketplacesRegistry, type ILegacyProviderSettings, type ILoadedBundlePlugin, type IMarketplaceClientOptions, type IMarketplaceManifest, type IMarketplacePluginEntry, type IMarketplaceSource, type IMemoryCandidate, type IMemoryEvent, type IMemoryPendingRecord, type IMemoryReference, type IPermissionsCommandState, type IPluginSettings, type IProjectMemorySummary, type IPromptExecutorOptions, type IPromptProvider, type IProviderCommandModuleOptions, type IProviderCommandSettingsAdapter, type IProviderProfileSettings, type IProviderSettingsBuildOptions, type IProviderSetupFlowState, type IProviderSetupInput, type IProviderSetupPatch, type IProviderSetupPromptStep, type IReversibleExecutionOptions, type IReversibleToolSafetyContext, type IReversibleToolSafetyInput, type IReversibleToolSafetyReport, type ISelfHostingVerificationPlan, type ISelfHostingVerificationPlanInput, type ISelfHostingVerificationStep, type ISkillExecutionCallbacks, type ISkillExecutionResult, type IStartupMemory, type IStatusLineCommandSettings, type ISubagentOptions, type ISubagentPromptOptions, type ISystemCommand, type ITaskContextFile, type ITaskSelectionOptions, type IToolState, type IToolSummary, type ITransportAdapter, type IUpdateTaskFileStatusOptions, type IUsageSnapshot, 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, MarketplaceClient, PERMISSIONS_COMMAND_DESCRIPTION, PERMISSION_MODE_ARGUMENT_HINT, PERMISSION_MODE_COMMAND_DESCRIPTION, PLUGIN_COMMAND_ARGUMENT_HINT, PLUGIN_COMMAND_DESCRIPTION, 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$1 as TAutoCompactThreshold, type TAutoCompactThresholdSource, type TBackgroundJobGroupEvent, type TBackgroundJobGroupEventListener, type TBackgroundJobGroupIdFactory, type TBackgroundJobGroupStatus, type TBackgroundJobWaitPolicy, type TCapabilityKind, type TCapabilitySafety, type TCommandEffect, type TCommandInteractionPrompt, type TCommandModuleSessionRequirement, type TCommandResultDataValue, type TEditCheckpointFileRestoreAction, type TEnabledPlugins, type TInteractiveEventName, type TInteractivePermissionHandler, type TMemoryCandidateStatus, type TMemoryType, type TPermissionResultValue, type TPluginInstallScope, type TPromptInput, type TProviderFactory, type TProviderSettingsDocument, type TProviderSetupFlowSubmitResult, type TProviderSetupType, type TRecommendedResponseLanguage, type TReversibleExecutionIsolation, type TReversibleRollbackLayer, type TReversibleSafetyStatus, type TReversibleSideEffect, type TSelfHostingLoopEvent, type TSelfHostingLoopState, type TSelfHostingVerificationPhase, type TSessionFactory, type TStatusLineCommandSettingsPatch, type TSubagentRunnerFactory, type TSystemCommandLifecycle, type TTaskFileStatus, VALID_PERMISSION_MODES, assembleSubagentPrompt, buildBackgroundCommandSubcommands, buildLanguageCommandSubcommands, buildMemoryCommandSubcommands, buildModelCommandSubcommands, buildPermissionModeSubcommands, buildPluginCommandSubcommands, buildProviderProfile, buildProviderSetupPatch, buildRewindCommandSubcommands, buildSkillPrompt, buildStatusLineCommandSubcommands, cancelCommandBackgroundTask, clearConversationHistory, closeCommandBackgroundTask, compactCommandContext, createAgentTool, createBackgroundProcessTool, createBuiltinCommandModule, createCommandExecutionTool, createCommandMemoryStores, createCommandPendingMemoryStore, createCommandProjectMemoryStore, createDefaultTools, createPluginRegistryReloadRequestedEffect, createPluginTuiRequestedEffect, createProviderSetupFlow, createQuery, createSessionExitRequestedEffect, createSessionPickerRequestedEffect, createSessionRenamedEffect, createSubagentLogger, createSubagentSession, createSystemCommands, discoverTaskFiles, evaluateReversibleToolSafety, executeSkill, formatCommandBackgroundTask, formatCommandBackgroundTaskList, formatCommandHelpMessage, formatCommandPermissionsMessage, formatEnvReference, formatInvalidPermissionModeMessage, formatLanguageUsageMessage, formatProviderSetupChoiceLabel, formatProviderSetupPromptLabel, formatProviderSetupSelectionPrompt, formatTaskContext, getBuiltInAgent, getForkWorkerSuffix, getProviderSetupStep, getSubagentSuffix, hasSensitiveCommandMemoryContent, hasUsableSecretReference, inspectCommandEditCheckpoint, isCommandMemoryType, isEnvReference, isMemoryType, isPermissionMode, isStatusLineCommandSettingsPatch, listCommandBackgroundTasks, listCommandEditCheckpoints, listCommandSessionAllowedTools, listCommandUsedMemoryReferences, loadTaskContext, mergeProviderPatch, parseCommandBackgroundLogCursor, parseFrontmatter, parseLanguageArgument, parsePermissionModeArgument, parseSessionNameArgument, parseTaskFile, planSelfHostingVerification, preprocessShellCommands, probeProviderProfile, projectPaths, promptForApproval, readAutoCompactThreshold, readAutoCompactThresholdSource, readCommandBackgroundTaskLog, readCommandContextState, readCommandPermissionMode, readCommandPermissionsState, readCommandSessionInfo, readCurrentGitBranch, recordCommandMemoryEvent, resetAutoCompactThresholdSetting, resolveEnvReference, resolvePermissionModeAdapter, resolvePluginCommandAdapter, resolveProviderSetupSelection, resolveSubagentLogDir, restoreCommandEditCheckpoint, retrieveAgentToolDeps, rollbackCommandEditCheckpoint, runProviderSetupPromptFlow, selectRelevantTasks, setCommandAutoCompactThreshold, setCurrentProvider, storeAgentToolDeps, submitProviderSetupValue, substituteVariables, summarizeBackgroundJobGroup, testProviderProfileCommand, transitionSelfHostingLoop, updateTaskFileStatus, upsertProviderProfile, userPaths, validateProviderProfile, validateProviderSetupValue, wrapEditCheckpointTools, wrapReversibleExecutionTools, writeAutoCompactThresholdSetting, writeCommandPermissionMode };
2802
+ 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 IAgentDefinition, type IAgentExecutorOptions, type IAgentSession, type IAgentToolDeps, type IAppendMemoryInput, type IAppendMemoryResult, type IBackgroundJobGroupCreateRequest, type IBackgroundJobGroupState, type IBackgroundJobGroupSummary, type IBackgroundJobOrchestratorOptions, type IBackgroundJobResultEnvelope, type IBackgroundProcessToolDeps, type IBackgroundTaskSpawnerGroupRequest, 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 IContextReferenceAddResult, type IContextReferenceClearResult, type IContextReferenceInventoryLimits, type IContextReferenceItem, type IContextReferenceRemoveResult, type IContextReferenceUpsertResult, type ICreateExecutionWorkspaceSnapshotInput, type ICreateExecutionWorkspaceTaskSpawnerOptions, 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 IInstalledPluginsRegistry, type IInteractiveSessionEvents, type IInteractiveSessionOptions, type IInteractiveSessionRecord, type IInteractiveSessionShutdownOptions, type IInteractiveSessionStore, type IKnownMarketplaceEntry, type IKnownMarketplacesRegistry, type ILegacyProviderSettings, type ILoadedBundlePlugin, type IMarketplaceClientOptions, type IMarketplaceManifest, type IMarketplacePluginEntry, type IMarketplaceSource, type IMemoryCandidate, type IMemoryEvent, type IMemoryPendingRecord, type IMemoryReference, type IModelCommandModuleOptions, type IModelCommandSettingsAdapter, type IModelCommandToolProjection, type IPermissionsCommandState, type IPluginSettings, 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 IProviderSetupFlowOptions, type IProviderSetupFlowState, type IProviderSetupInput, type IProviderSetupPatch, type IProviderSetupPromptStep, 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 ISkillActivationEvent, type ISkillActivationHistoryData, type ISkillExecutionCallbacks, type ISkillExecutionResult, type ISpawnAgentTaskRequest, type ISpawnProcessTaskRequest, type IStartupMemory, type IStatusLineCommandSettings, type ISubagentOptions, type ISubagentPromptOptions, type ISystemCommand, type ITaskContextFile, type ITaskSelectionOptions, type IToolState, type IToolSummary, type ITransportAdapter, type IUpdateTaskFileStatusOptions, type IUsageSnapshot, type IUserLocalMemoryDeleteResult, type IUserLocalMemoryItemOptions, type IUserLocalMemoryItemProjection, type IUserLocalMemoryListOptions, type IUserLocalMemoryListProjection, type IUserLocalMemorySetOptions, type IUserLocalStorageCategoryDefinition, type IUserLocalStorageCategoryProjection, type IUserLocalStorageInspection, type IUserLocalStorageItemSummary, 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$1 as TAutoCompactThreshold, type TAutoCompactThresholdSource, type TBackgroundJobGroupEvent, type TBackgroundJobGroupEventListener, type TBackgroundJobGroupIdFactory, type TBackgroundJobGroupStatus, type TBackgroundJobWaitPolicy, 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 TInteractiveEventName, type TInteractivePermissionHandler, type TMemoryCandidateStatus, type TMemoryType, type TPermissionResultValue, type TPluginInstallScope, type TPromptFileReferenceDiagnosticCode, type TPromptFileReferenceReason, type TPromptInput, type TProviderFactory, type TProviderSettingsDocument, type TProviderSetupFlowSubmitResult, type TProviderSetupType, type TRecommendedResponseLanguage, type TReversibleExecutionIsolation, type TReversibleRollbackLayer, type TReversibleSafetyStatus, type TReversibleSideEffect, type TSelfHostingLoopEvent, type TSelfHostingLoopState, type TSelfHostingVerificationPhase, type TSessionFactory, type TSkillActivationInvocation, type TSkillActivationMode, type TSkillActivationSource, type TSkillActivationStatus, type TStatusLineCommandSettingsPatch, 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, clearCommandContextReferences, clearContextReferences, clearConversationHistory, closeCommandBackgroundTask, compactCommandContext, createAgentTool, createBackgroundGroupExecutionEntryId, createBackgroundProcessTool, createBackgroundTaskExecutionEntryId, createBuiltinCommandModule, createCommandExecutionTool, createCommandMemoryStores, createCommandPendingMemoryStore, createCommandProjectMemoryStore, createContextReferenceItem, createDefaultTools, createExecutionOriginMetadata, createExecutionWorkspaceSnapshot, createExecutionWorkspaceTaskSpawner, createLineDetailPage, createMainThreadDetailPage, createMainThreadExecutionEntryId, createModelCommandToolProjection, createPluginRegistryReloadRequestedEffect, createPluginTuiRequestedEffect, createProjectSessionStore, createProjectedCommandExecutionTools, createPromptFileReferenceHistoryEntry, createProviderSafeModelCommandToolName, createProviderSetupFlow, createQuery, createSessionExitRequestedEffect, createSessionPickerRequestedEffect, createSessionRenamedEffect, createSubagentLogger, createSubagentSession, createSystemCommands, deleteProviderProfile, deleteUserLocalMemoryItem, disableUserLocalMemoryItem, discoverTaskFiles, evaluateReversibleToolSafety, executeSkill, formatCommandBackgroundTask, formatCommandBackgroundTaskList, formatCommandHelpMessage, formatCommandPermissionsMessage, formatCommandSessionReplayValidationReport, formatEnvReference, formatInvalidPermissionModeMessage, formatLanguageUsageMessage, formatModelCommandUsageMessage, formatModelCommandUsageMessageAsync, formatProjectedModelCommandToolPromptDescription, formatPromptFileReferenceDiagnostics, formatProviderSetupChoiceLabel, formatProviderSetupHelpLinks, formatProviderSetupPromptLabel, formatProviderSetupSelectionPrompt, formatTaskContext, getBuiltInAgent, getForkWorkerSuffix, getProviderSetupStep, getSubagentSuffix, hasBlockingPromptFileReferenceDiagnostics, hasSensitiveCommandMemoryContent, hasUsableSecretReference, inspectCommandEditCheckpoint, inspectUserLocalMemoryItem, inspectUserLocalStorage, isCommandMemoryType, isEnvReference, isMemoryType, isPermissionMode, isStatusLineCommandSettingsPatch, listActiveContextReferences, listCommandBackgroundTasks, listCommandContextReferences, listCommandEditCheckpoints, listCommandSessionAllowedTools, listCommandUsedMemoryReferences, listResumableSessionSummaries, listUserLocalMemoryItems, loadTaskContext, mergeProviderPatch, normalizeModelCommandName, parseCommandBackgroundLogCursor, parseExecutionWorkspaceEntryId, parseFrontmatter, parseLanguageArgument, parsePermissionModeArgument, parsePromptFileReferences, parseSessionNameArgument, parseTaskFile, planSelfHostingVerification, preprocessShellCommands, probeProviderProfile, projectPaths, promptForApproval, readAutoCompactThreshold, readAutoCompactThresholdSource, readCommandBackgroundTaskLog, readCommandContextState, readCommandPermissionMode, readCommandPermissionsState, readCommandSessionInfo, readCurrentGitBranch, readEnabledUserLocalMemoryItem, recordCommandMemoryEvent, removeCommandContextReference, removeContextReference, resetAutoCompactThresholdSetting, resolveActiveProviderModelCatalog, resolveActiveProviderModelCatalogState, resolveEnvReference, resolveLatestSessionId, resolvePermissionModeAdapter, resolvePluginCommandAdapter, resolvePromptFileReferencePaths, resolvePromptFileReferences, resolveProviderSetupSelection, resolveSessionIdByIdOrName, resolveSubagentLogDir, resolveUserLocalStorageRoot, restoreCommandEditCheckpoint, retrieveAgentToolDeps, rollbackCommandEditCheckpoint, runProviderSetupPromptFlow, sanitizeProviderProfileName, selectRelevantTasks, setCommandAutoCompactThreshold, setCurrentProvider, setUserLocalMemoryItem, storeAgentToolDeps, submitProviderSetupValue, substituteVariables, suggestProviderProfileName, summarizeBackgroundJobGroup, testProviderProfileCommand, toContextReferenceRecords, toPromptFileReferenceRecords, transitionSelfHostingLoop, updateTaskFileStatus, upsertContextReference, upsertProviderProfile, userPaths, validateCommandSessionReplayLog, validateProviderProfile, validateProviderSetupValue, wrapEditCheckpointTools, wrapReversibleExecutionTools, writeAutoCompactThresholdSetting, writeCommandPermissionMode };