@robota-sdk/agent-framework 3.0.0-beta.75 → 3.0.0-beta.77
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/LICENSE +661 -21
- package/README.md +54 -36
- package/dist/node/index-BeYNnJed.d.ts +2656 -0
- package/dist/node/index-BeYNnJed.d.ts.map +1 -0
- package/dist/node/index-DLFjpsfm.d.ts +2658 -0
- package/dist/node/index-DLFjpsfm.d.ts.map +1 -0
- package/dist/node/index.cjs +3 -110
- package/dist/node/index.d.ts +13 -2468
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +3 -110
- package/dist/node/index.js.map +1 -1
- package/dist/node/interactive-C93XBn4U.js +111 -0
- package/dist/node/interactive-C93XBn4U.js.map +1 -0
- package/dist/node/interactive-D1dVksoo.cjs +110 -0
- package/dist/node/testing/index.cjs +2 -0
- package/dist/node/testing/index.d.ts +157 -0
- package/dist/node/testing/index.d.ts.map +1 -0
- package/dist/node/testing/index.js +3 -0
- package/dist/node/testing/index.js.map +1 -0
- package/package.json +21 -8
package/dist/node/index.d.ts
CHANGED
|
@@ -1,2466 +1,14 @@
|
|
|
1
|
-
import { IActionRequest, IActionResponse, IBackgroundJobGroupCreateRequest, IBackgroundJobGroupCreateRequest as IBackgroundJobGroupCreateRequest$1, IBackgroundJobGroupState, IBackgroundJobGroupState as IBackgroundJobGroupState$1, IBackgroundJobGroupSummary, IBackgroundJobGroupSummary as IBackgroundJobGroupSummary$1, IBackgroundJobResultEnvelope, ICapabilityDescriptor, ICommand, ICommandAvailablePlugin, ICommandChoicePromptOption, ICommandInfo, ICommandInstalledPlugin, ICommandInteraction, ICommandInteractionHint, ICommandListEntry, ICommandMarketplaceSource, ICommandPluginAdapter, ICommandPluginAdapter as ICommandPluginAdapter$1, ICommandPluginReloadResult, ICommandResult, ICommandSource, IConfigurableTransport, IContextFileRefreshedEvent, IContextReferenceItem, ICreateExecutionWorkspaceSnapshotInput, ICreateLineDetailPageInput, ICreateMainThreadDetailPageInput, ICreateMainThreadEntryInput, IDiffLine, IExecutionDetailCursor, IExecutionDetailPage, IExecutionDetailRecord, IExecutionOrigin, IExecutionOrigin as IExecutionOrigin$1, IExecutionResult, IExecutionWorkspaceEntry, IExecutionWorkspaceEntryRef, IExecutionWorkspaceEntryRef as IExecutionWorkspaceEntryRef$1, IExecutionWorkspaceEvent, IExecutionWorkspaceFilter, IExecutionWorkspaceSnapshot, IExecutionWorkspaceSnapshotOptions, IInteractionChannel, IInteractiveSession, IInteractiveSessionEvents, IInteractiveSessionRecord, IInteractiveSessionStore, IMemoryEvent, IMemoryReference, IPermissionRequest, IPickItem, IPromptFileReferenceRecord, IResumableSessionSummary, ISkillActivationEvent, IStatusLineCommandSettings, IToolState, IToolSummary, ITransportAdapter, ITransportAdapter as ITransportAdapter$1, ITransportConfig, ITransportRegistryView, IUsageSnapshot, InteractionEvent, TBackgroundJobGroupEvent, TBackgroundJobGroupEventListener, TBackgroundJobGroupEventListener as TBackgroundJobGroupEventListener$1, TBackgroundJobGroupIdFactory, TBackgroundJobGroupIdFactory as TBackgroundJobGroupIdFactory$1, TBackgroundJobGroupStatus, TBackgroundJobWaitPolicy, TCapabilityKind, TCapabilitySafety, TCommandEffect, TCommandInteractionPrompt, TCommandResultDataValue, TContextReferenceLoadType, TContextReferenceStatus, TExecutionAttention, TExecutionControl, TExecutionDetailRecordKind, TExecutionEntryKind, TExecutionOriginKind, TExecutionWorkspaceStatus, TExecutionWorkspaceUpdateCause, TExecutionWorkspaceVisibility, TInteractiveEventName, TInteractivePermissionHandler, TMemoryType, TPermissionResultValue, TPluginInstallScope, TPromptFileReferenceReason, TSkillActivationInvocation, TSkillActivationMode, TSkillActivationSource, TSkillActivationStatus, TStatusLineCommandSettingsPatch } from "@robota-sdk/agent-interface-transport";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { $ as IPreparedSubagentWorktree, $a as IBackgroundTaskManager, $i as IMemoryCandidate, $n as updateModelInSettings, $r as applyProviderConfiguration, $t as parseFrontmatter, A as IAgentExecutorOptions, Aa as toContextReferenceRecords, Ai as ICapabilityDescriptor, An as RESUME_COMMAND_DESCRIPTION, Ao as ICommandSettingsAdapter, Ar as closeCommandBackgroundTask, At as createSystemCommands, B as resolveSessionIdByIdOrName, Ba as wrapEditCheckpointTools, Bi as ICompactContextResult, Bn as DEFAULT_STATUS_LINE_COMMAND_SETTINGS, Bo as IOrgPolicy, Br as createProviderFromSettings, Bt as IBundlePluginManifest, C as evaluateReversibleToolSafety, Ca as IContextReferenceInventoryLimits, Ci as setCurrentProvider, Cn as rollbackCommandEditCheckpoint, Co as BackgroundJobOrchestrator, Cr as buildLanguageCommandSubcommands, Ct as ISkillExecutionCallbacks, D as PromptExecutor, Da as createContextReferenceItem, Di as TCommandModuleSessionRequirement, Dn as ICommandSessionInfo, Do as ICommandPermissionModeAdapter, Dr as BACKGROUND_COMMAND_USAGE, Dt as TShellExecFn, E as IPromptProvider, Ea as clearContextReferences, Ei as ICommandModule, En as EXIT_COMMAND_DESCRIPTION, Eo as ICommandHostAdapters, Er as BACKGROUND_COMMAND_DESCRIPTION, Et as ISkillPromptContext, F as IInteractiveSessionStore, Fa as IPromptFileReferenceResolveOptions, Fi as ICommandSkillListEntry, Fn as createSessionRenamedEffect, Fo as buildPluginCommandSubcommands, Fr as readCommandBackgroundTaskLog, Ft as IInstalledPluginRecord, G as createPromptFileReferenceHistoryEntry, Ga as IEditCheckpointInspectionPlan, Gi as listCommandContextReferences, Gn as isStatusLineCommandSettingsPatch, Gr as mergeSettings, Gt as PluginSettingsStore, H as resolvePromptFileReferences, Ha as IEditCheckpointFileInspection, Hi as addCommandContextReference, Hn as STATUSLINE_COMMAND_DESCRIPTION, Hr as readProviderSettings, Ht as ILoadedBundlePlugin, I as createProjectSessionStore, Ia as IPromptFileReferenceToken, Ii as IModelReapplyOptions, In as formatCommandSessionReplayValidationReport, Io as createPluginRegistryReloadRequestedEffect, Ir as HELP_COMMAND_DESCRIPTION, It as TInstalledPluginsRegistry, J as toPromptFileReferenceRecords, Ja as IEditCheckpointRestoreResult, Ji as readCommandContextState, Jn as TSettingsScope, Jr as IActiveModelChangeOptions, Jt as IMarketplaceManifest, K as formatPromptFileReferenceDiagnostics, Ka as IEditCheckpointManifest, Ki as readAutoCompactThreshold, Kn as readStatusLineSettings, Kr as readMergedProviderSettingsFromPaths, Kt as IKnownMarketplaceEntry, L as createUserSessionStore, La as IResolvedPromptFileReference, Li as TAutoCompactThresholdSource, Ln as parseSessionNameArgument, Lo as createPluginTuiRequestedEffect, Lr as formatCommandHelpMessage, Lt as MarketplaceClient, M as TSessionFactory, Ma as IPromptFileReferenceDiagnostic, Mi as ICommandHostContext, Mn as clearConversationHistory, Mo as PLUGIN_COMMAND_ARGUMENT_HINT, Mr as formatCommandBackgroundTaskList, Mt as PluginCommandSource, N as TInteractivePermissionHandler, Na as IPromptFileReferenceHistoryData, Ni as ICommandSessionReplayValidationReport, Nn as createSessionExitRequestedEffect, No as PLUGIN_COMMAND_DESCRIPTION, Nr as listCommandBackgroundTasks, Nt as BundlePluginInstaller, O as TProviderFactory, Oa as listActiveContextReferences, Oi as ISystemCommand, On as RENAME_COMMAND_DESCRIPTION, Oo as ICommandPickerAdapter, Or as buildBackgroundCommandSubcommands, Ot as preprocessShellCommands, P as TPermissionResultValue, Pa as IPromptFileReferenceLimits, Pi as ICommandSessionRuntime, Pn as createSessionPickerRequestedEffect, Po as RELOAD_PLUGINS_COMMAND_DESCRIPTION, Pr as parseCommandBackgroundLogCursor, Pt as IBundlePluginInstallerOptions, Q as storeAgentToolDeps, Qa as IBackgroundTaskHandle, Qi as writeAutoCompactThresholdSetting, Qn as resolveSettingsPathForScope, Qr as applyActiveModelChange, Qt as SkillCommandSource, R as listResumableSessionSummaries, Ra as IResolvedPromptFileReferences, Ri as AUTO_COMPACT_THRESHOLD_SETTINGS_KEY, Rn as readCommandSessionInfo, Ro as resolvePluginCommandAdapter, Rr as IReadProviderSettingsOptions, Rt as BundlePluginLoader, S as TReversibleSideEffect, Sa as IContextReferenceClearResult, Si as mergeProviderPatch, Sn as restoreCommandEditCheckpoint, So as parseExecutionWorkspaceEntryId, Sr as TRecommendedResponseLanguage, St as IForkExecutionOptions, T as IPromptExecutorOptions, Ta as IContextReferenceUpsertResult, Ti as validateProviderProfile, Tn as COST_COMMAND_DESCRIPTION, To as summarizeBackgroundJobGroup, Tr as parseLanguageArgument, Tt as executeSkill, U as parsePromptFileReferences, Ua as IEditCheckpointFileRecord, Ui as clearCommandContextReferences, Un as applyStatusLineSettings, Ur as resolveEnvDefaultProvider, Ut as TEnabledPlugins, V as resolvePromptFileReferencePaths, Va as EditCheckpointStore, Vi as TAutoCompactThreshold, Vn as STATUSLINE_COMMAND_ARGUMENT_HINT, Vr as readMergedProviderSettings, Vt as IBundleSkill, W as buildPromptWithFileReferences, Wa as IEditCheckpointInspection, Wi as compactCommandContext, Wn as buildStatusLineCommandSubcommands, Wr as mergeProviders, Wt as IPluginSettings, X as createAgentTool, Xa as IEditCheckpointTurnInput, Xi as resetAutoCompactThresholdSetting, Xn as getUserSettingsPath, Xr as IProviderSettingsWriteTargetOptions, Xt as TKnownMarketplacesRegistry, Y as IAgentToolDeps, Ya as IEditCheckpointSummary, Yi as removeCommandContextReference, Yn as deleteSettings, Yr as IActiveModelChangeResult, Yt as IMarketplacePluginEntry, Z as retrieveAgentToolDeps, Za as TEditCheckpointFileRestoreAction, Zi as setCommandAutoCompactThreshold, Zn as readSettings, Zr as IProviderSwitchOptions, Zt as TMarketplaceSource, _ as IReversibleToolSafetyInput, _a as IGoalSignal, _i as IProviderSetupPatch, _n as REWIND_COMMAND_ARGUMENT_HINT, _o as EXECUTION_ORIGIN_METADATA_KEYS, _r as resolvePermissionModeAdapter, _t as formatEnvReference, a as TInteractiveSessionOptions, aa as IStartupMemory, ai as probeProviderProfile, an as ICommandProjectMemoryStore, ao as TBackgroundTaskIdFactory, ar as PERMISSIONS_COMMAND_DESCRIPTION, at as ISubagentRunner, b as TReversibleRollbackLayer, ba as extractGoalSignal, bi as buildProviderSetupPatch, bn as inspectCommandEditCheckpoint, bo as createExecutionOriginMetadata, br as LANGUAGE_COMMAND_DESCRIPTION, bt as resolveEnvReference, c as ISubagentPromptOptions, ca as ProjectMemoryStore, ci as IProviderProfileNameSuggestionOptions, cn as MEMORY_COMMAND_USAGE, co as IBackgroundTaskSpawnerGroupRequest, cr as VALID_PERMISSION_MODES, ct as ISubagentWorktreePrepareRequest, d as getSubagentSuffix, da as buildGoalStartPrompt, di as IProviderCommandModuleOptions, dn as createCommandPendingMemoryStore, do as ISpawnAgentTaskRequest, dr as formatInvalidPermissionModeMessage, dt as TSubagentRunnerFactory, ea as IMemoryPendingRecord, ei as applyProviderSwitch, en as BuiltinCommandSource, eo as IBackgroundTaskManagerOptions, er as writeSettings, et as ISubagentJobHandle, f as createDefaultTools, fa as GOAL_SIGNAL_TOOL_NAME, fi as IProviderCommandSettingsAdapter, fn as createCommandProjectMemoryStore, fo as ISpawnProcessTaskRequest, fr as isPermissionMode, ft as createInProcessSubagentRunner, g as IReversibleToolSafetyContext, ga as GoalController, gi as IProviderSetupInput, gn as recordCommandMemoryEvent, go as createExecutionWorkspaceSnapshot, gr as readCommandPermissionsState, gt as IAgentDefinition, h as IReversibleExecutionOptions, ha as DEFAULT_GOAL_NO_PROGRESS_LIMIT, hi as IProviderSettingsBuildOptions, hn as listCommandUsedMemoryReferences, ho as createMainThreadDetailPage, hr as readCommandPermissionMode, ht as IResolvedConfig, i as IInteractiveSession, ia as IProjectMemorySummary, ii as checkSettingsFile, in as ICommandPendingMemoryStore, io as ILimitedOutputCapture, ir as IPermissionsCommandState, it as ISubagentManagerOptions, j as IAgentSession, ja as upsertContextReference, ji as IAgentJobHostContext, jn as VALIDATE_SESSION_COMMAND_DESCRIPTION, jo as ICommandSettingsDocument, jr as formatCommandBackgroundTask, jt as SystemCommandExecutor, k as AgentExecutor, ka as removeContextReference, ki as TSystemCommandLifecycle, kn as RENAME_COMMAND_USAGE, ko as ICommandProcessAdapter, kr as cancelCommandBackgroundTask, kt as substituteVariables, l as assembleSubagentPrompt, la as isMemoryType, li as sanitizeProviderProfileName, ln as buildMemoryCommandSubcommands, lo as ICreateExecutionWorkspaceTaskSpawnerOptions, lr as buildPermissionModeSubcommands, lt as IWorktreeSubagentRunnerOptions, m as ICreateSessionResult, ma as DEFAULT_GOAL_MAX_ITERATIONS, mi as IProviderProfileSettings, mn as isCommandMemoryType, mo as createLineDetailPage, mr as parsePermissionModeArgument, mt as createSubagentSession, n as IInteractiveSessionShutdownOptions, na as IAppendMemoryInput, ni as TSettingsCheck, nn as CommandRegistry, no as IBackgroundTaskStart, nr as IPresetApplicationResult, nt as ISubagentJobStart, o as createSubagentLogger, oa as MEMORY_INDEX_MAX_BYTES, oi as testProviderProfileCommand, on as MEMORY_COMMAND_ARGUMENT_HINT, oo as TBackgroundTaskRunnerEvent, or as PERMISSION_MODE_ARGUMENT_HINT, ot as ISubagentSpawnRequest, p as ICreateSessionOptions, pa as createGoalStatusTool, pi as ILegacyProviderSettings, pn as hasSensitiveCommandMemoryContent, po as createExecutionWorkspaceTaskSpawner, pr as listCommandSessionAllowedTools, pt as ISubagentOptions, q as hasBlockingPromptFileReferenceDiagnostics, qa as IEditCheckpointRecorder, qi as readAutoCompactThresholdSource, qn as TSettingsData, qr as resolveActiveProvider, qt as IMarketplaceClientOptions, r as InteractiveSession, ra as IAppendMemoryResult, ri as checkSettingsDocument, rn as ICommandMemoryStores, ro as ICreateLimitedOutputCaptureOptions, rr as applyPresetToSession, rt as ISubagentManager, s as resolveSubagentLogDir, sa as MEMORY_INDEX_MAX_LINES, si as IProviderProfileNameSuggestionInput, sn as MEMORY_COMMAND_DESCRIPTION, so as TBackgroundTaskTransitionEvent, sr as PERMISSION_MODE_COMMAND_DESCRIPTION, st as ISubagentWorktreeAdapter, t as generateSessionName, ta as TMemoryCandidateStatus, ti as resolveProviderSettingsWriteTargetPath, tn as createBuiltinCommandModule, to as IBackgroundTaskRunner, tr as IPresetApplicationOptions, tt as ISubagentJobResult, u as getForkWorkerSuffix, ua as buildGoalContinuationPrompt, ui as suggestProviderProfileName, un as createCommandMemoryStores, uo as IExecutionWorkspaceTaskSpawner, ur as formatCommandPermissionsMessage, ut as IInProcessSubagentRunnerDeps, v as IReversibleToolSafetyReport, va as IGoalStartOptions, vi as TProviderSettingsDocument, vn as REWIND_COMMAND_DESCRIPTION, vo as createBackgroundGroupExecutionEntryId, vr as writeCommandPermissionMode, vt as hasUsableSecretReference, w as wrapReversibleExecutionTools, wa as IContextReferenceRemoveResult, wi as upsertProviderProfile, wn as CLEAR_COMMAND_DESCRIPTION, wo as IBackgroundJobOrchestratorOptions, wr as formatLanguageUsageMessage, wt as ISkillExecutionResult, x as TReversibleSafetyStatus, xa as IContextReferenceAddResult, xi as deleteProviderProfile, xn as listCommandEditCheckpoints, xo as createMainThreadExecutionEntryId, xr as RECOMMENDED_RESPONSE_LANGUAGES, xt as ISkillActivationHistoryData, y as TReversibleExecutionIsolation, ya as TGoalDecision, yi as buildProviderProfile, yn as buildRewindCommandSubcommands, yo as createBackgroundTaskExecutionEntryId, yr as LANGUAGE_COMMAND_ARGUMENT_HINT, yt as isEnvReference, z as resolveLatestSessionId, za as TPromptFileReferenceDiagnosticCode, zi as DEFAULT_AUTO_COMPACT_THRESHOLD, zn as validateCommandSessionReplayLog, zo as ICommandResult$1, zr as ProviderConfigError, zt as IBundlePluginFeatures } from "./index-BeYNnJed.js";
|
|
2
|
+
import { IInteractionChannel, ITransportRegistryView, TBackgroundPrimitive } from "@robota-sdk/agent-interface-transport";
|
|
3
|
+
import { IAIProvider, IFileSystem, IFileSystemAsync, ITerminalOutput as ITerminalOutput$1, IToolWithEventService, TPermissionMode, TToolArgs } from "@robota-sdk/agent-core";
|
|
4
|
+
import { IBackgroundTaskRunner as IBackgroundTaskRunner$1 } from "@robota-sdk/agent-executor";
|
|
5
|
+
import { createZodFunctionTool } from "@robota-sdk/agent-tools";
|
|
6
6
|
|
|
7
|
-
//#region src/command-api/org-policy/org-policy-types.d.ts
|
|
8
|
-
interface IOrgPolicy {
|
|
9
|
-
/** Allowed provider profile names. Undefined = all allowed. */
|
|
10
|
-
allowedProviders?: string[];
|
|
11
|
-
/** Slash command names blocked by policy (without leading slash). */
|
|
12
|
-
blockedCommands?: string[];
|
|
13
|
-
/** If true, API keys must be stored as env references ($ENV:VAR), not plaintext. */
|
|
14
|
-
requireApiKeyFromEnv?: boolean;
|
|
15
|
-
/** Shown in policy violation messages so users know who to contact. */
|
|
16
|
-
adminContact?: string;
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
7
|
//#region src/command-api/org-policy/org-policy-loader.d.ts
|
|
20
8
|
declare function loadOrgPolicy(): IOrgPolicy | null;
|
|
21
9
|
declare function formatOrgPolicyViolationMessage(reason: string, adminContact: string | undefined): string;
|
|
22
10
|
declare function isApiKeyPlaintext(apiKey: string | undefined): boolean;
|
|
23
11
|
//#endregion
|
|
24
|
-
//#region src/command-api/plugin/plugin-command-api.d.ts
|
|
25
|
-
declare const PLUGIN_COMMAND_DESCRIPTION = "Manage plugins";
|
|
26
|
-
declare const PLUGIN_COMMAND_ARGUMENT_HINT = "manage | install <name@marketplace> | uninstall <name@marketplace> | enable <name@marketplace> | disable <name@marketplace> | marketplace <action>";
|
|
27
|
-
declare const RELOAD_PLUGINS_COMMAND_DESCRIPTION = "Reload all plugin resources";
|
|
28
|
-
declare function createPluginTuiRequestedEffect(): TCommandEffect;
|
|
29
|
-
declare function createPluginRegistryReloadRequestedEffect(): TCommandEffect;
|
|
30
|
-
declare function resolvePluginCommandAdapter(context: ICommandHostContext): ICommandPluginAdapter$1 | undefined;
|
|
31
|
-
declare function buildPluginCommandSubcommands(): ICommand[];
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/command-api/host-adapters.d.ts
|
|
34
|
-
interface ICommandSettingsDocument {
|
|
35
|
-
[key: string]: TUniversalValue;
|
|
36
|
-
}
|
|
37
|
-
interface ICommandSettingsAdapter<TSettings extends ICommandSettingsDocument = ICommandSettingsDocument> {
|
|
38
|
-
read(): TSettings;
|
|
39
|
-
write(settings: TSettings): void;
|
|
40
|
-
}
|
|
41
|
-
interface ICommandProcessAdapter {
|
|
42
|
-
requestExit(reason?: TSessionEndReason): void;
|
|
43
|
-
requestRestart(reason: TSessionEndReason, message: string): void;
|
|
44
|
-
}
|
|
45
|
-
interface ICommandPickerAdapter<TItem extends ICommandSettingsDocument> {
|
|
46
|
-
pick(items: readonly TItem[]): Promise<TItem | undefined> | TItem | undefined;
|
|
47
|
-
}
|
|
48
|
-
interface ICommandPermissionModeAdapter {
|
|
49
|
-
getPermissionMode(): TPermissionMode;
|
|
50
|
-
setPermissionMode(mode: TPermissionMode): void;
|
|
51
|
-
listSessionAllowedTools(): readonly string[];
|
|
52
|
-
}
|
|
53
|
-
interface ICommandHostAdapters {
|
|
54
|
-
settings?: ICommandSettingsAdapter;
|
|
55
|
-
process?: ICommandProcessAdapter;
|
|
56
|
-
permissionMode?: ICommandPermissionModeAdapter;
|
|
57
|
-
plugin?: ICommandPluginAdapter;
|
|
58
|
-
}
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region src/background-tasks/background-job-orchestrator.d.ts
|
|
61
|
-
interface IBackgroundJobOrchestratorOptions {
|
|
62
|
-
manager: IBackgroundTaskManager$1;
|
|
63
|
-
now?: () => string;
|
|
64
|
-
idFactory?: TBackgroundJobGroupIdFactory$1;
|
|
65
|
-
initialGroups?: readonly IBackgroundJobGroupState$1[];
|
|
66
|
-
}
|
|
67
|
-
declare class BackgroundJobOrchestrator {
|
|
68
|
-
private readonly manager;
|
|
69
|
-
private readonly now;
|
|
70
|
-
private readonly idFactory;
|
|
71
|
-
private readonly unsubscribeManager;
|
|
72
|
-
private readonly listeners;
|
|
73
|
-
private readonly groups;
|
|
74
|
-
private sequence;
|
|
75
|
-
constructor(options: IBackgroundJobOrchestratorOptions);
|
|
76
|
-
createGroup(request: IBackgroundJobGroupCreateRequest$1): IBackgroundJobGroupState$1;
|
|
77
|
-
listGroups(): IBackgroundJobGroupState$1[];
|
|
78
|
-
getGroup(groupId: string): IBackgroundJobGroupState$1 | undefined;
|
|
79
|
-
waitGroup(groupId: string): Promise<IBackgroundJobGroupState$1>;
|
|
80
|
-
subscribe(listener: TBackgroundJobGroupEventListener$1): () => void;
|
|
81
|
-
dispose(): void;
|
|
82
|
-
private nextGroupId;
|
|
83
|
-
private restoreGroup;
|
|
84
|
-
private createRecord;
|
|
85
|
-
private captureExistingTerminalTasks;
|
|
86
|
-
private handleTaskEvent;
|
|
87
|
-
private captureTask;
|
|
88
|
-
private evaluateCompletion;
|
|
89
|
-
private emit;
|
|
90
|
-
}
|
|
91
|
-
declare function summarizeBackgroundJobGroup(group: IBackgroundJobGroupState$1): IBackgroundJobGroupSummary$1;
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/background-tasks/execution-workspace-types.d.ts
|
|
94
|
-
declare const EXECUTION_ORIGIN_METADATA_KEYS: {
|
|
95
|
-
readonly kind: "executionOriginKind";
|
|
96
|
-
readonly sessionId: "executionOriginSessionId";
|
|
97
|
-
readonly turnId: "executionOriginTurnId";
|
|
98
|
-
readonly commandName: "executionOriginCommandName";
|
|
99
|
-
readonly toolCallId: "executionOriginToolCallId";
|
|
100
|
-
readonly skillId: "executionOriginSkillId";
|
|
101
|
-
readonly label: "executionOriginLabel";
|
|
102
|
-
};
|
|
103
|
-
declare function createMainThreadExecutionEntryId(sessionId: string): string;
|
|
104
|
-
declare function createBackgroundTaskExecutionEntryId(taskId: string): string;
|
|
105
|
-
declare function createBackgroundGroupExecutionEntryId(groupId: string): string;
|
|
106
|
-
declare function parseExecutionWorkspaceEntryId(entryId: string): IExecutionWorkspaceEntryRef$1 | undefined;
|
|
107
|
-
declare function createExecutionOriginMetadata(origin: IExecutionOrigin$1): Record<string, TBackgroundPrimitive$1>;
|
|
108
|
-
//#endregion
|
|
109
|
-
//#region src/background-tasks/execution-workspace-projection.d.ts
|
|
110
|
-
declare function createExecutionWorkspaceSnapshot(input: ICreateExecutionWorkspaceSnapshotInput): IExecutionWorkspaceSnapshot;
|
|
111
|
-
//#endregion
|
|
112
|
-
//#region src/background-tasks/execution-workspace-detail.d.ts
|
|
113
|
-
declare function createMainThreadDetailPage(input: ICreateMainThreadDetailPageInput): IExecutionDetailPage;
|
|
114
|
-
declare function createLineDetailPage(input: ICreateLineDetailPageInput): IExecutionDetailPage;
|
|
115
|
-
//#endregion
|
|
116
|
-
//#region src/background-tasks/execution-workspace-spawner.d.ts
|
|
117
|
-
interface ISpawnAgentTaskRequest {
|
|
118
|
-
readonly label: string;
|
|
119
|
-
readonly agentType: string;
|
|
120
|
-
readonly prompt: string;
|
|
121
|
-
readonly mode?: TBackgroundTaskMode$1;
|
|
122
|
-
readonly parentTaskId?: string;
|
|
123
|
-
readonly depth?: number;
|
|
124
|
-
readonly cwd?: string;
|
|
125
|
-
readonly model?: string;
|
|
126
|
-
readonly isolation?: TBackgroundTaskIsolation$1;
|
|
127
|
-
readonly allowedTools?: readonly string[];
|
|
128
|
-
readonly disallowedTools?: readonly string[];
|
|
129
|
-
readonly permissionPolicy?: TBackgroundPermissionPolicy$1;
|
|
130
|
-
readonly timeoutMs?: number;
|
|
131
|
-
readonly idleTimeoutMs?: number;
|
|
132
|
-
readonly maxRuntimeMs?: number;
|
|
133
|
-
readonly outputLimitBytes?: number;
|
|
134
|
-
readonly maxTextDeltas?: number;
|
|
135
|
-
readonly repetitionWindow?: number;
|
|
136
|
-
readonly repetitionThreshold?: number;
|
|
137
|
-
}
|
|
138
|
-
interface ISpawnProcessTaskRequest {
|
|
139
|
-
readonly command: string;
|
|
140
|
-
readonly label?: string;
|
|
141
|
-
readonly mode?: TBackgroundTaskMode$1;
|
|
142
|
-
readonly parentTaskId?: string;
|
|
143
|
-
readonly depth?: number;
|
|
144
|
-
readonly cwd?: string;
|
|
145
|
-
readonly shell?: string;
|
|
146
|
-
readonly env?: Record<string, string>;
|
|
147
|
-
readonly stdin?: string;
|
|
148
|
-
readonly timeoutMs?: number;
|
|
149
|
-
readonly idleTimeoutMs?: number;
|
|
150
|
-
readonly maxRuntimeMs?: number;
|
|
151
|
-
readonly outputLimitBytes?: number;
|
|
152
|
-
}
|
|
153
|
-
interface IBackgroundTaskSpawnerGroupRequest {
|
|
154
|
-
readonly waitPolicy: IBackgroundJobGroupCreateRequest['waitPolicy'];
|
|
155
|
-
readonly taskIds: readonly string[];
|
|
156
|
-
readonly label?: string;
|
|
157
|
-
}
|
|
158
|
-
interface IExecutionWorkspaceTaskSpawner {
|
|
159
|
-
spawnAgent(request: ISpawnAgentTaskRequest): Promise<IBackgroundTaskState$1>;
|
|
160
|
-
spawnProcess(request: ISpawnProcessTaskRequest): Promise<IBackgroundTaskState$1>;
|
|
161
|
-
createGroup(request: IBackgroundTaskSpawnerGroupRequest): IBackgroundJobGroupState;
|
|
162
|
-
}
|
|
163
|
-
interface ICreateExecutionWorkspaceTaskSpawnerOptions {
|
|
164
|
-
readonly manager: IBackgroundTaskManager$1;
|
|
165
|
-
readonly groupOrchestrator: BackgroundJobOrchestrator;
|
|
166
|
-
readonly sessionId: string;
|
|
167
|
-
readonly cwd: string;
|
|
168
|
-
readonly origin: IExecutionOrigin;
|
|
169
|
-
}
|
|
170
|
-
declare function createExecutionWorkspaceTaskSpawner(options: ICreateExecutionWorkspaceTaskSpawnerOptions): IExecutionWorkspaceTaskSpawner;
|
|
171
|
-
//#endregion
|
|
172
|
-
//#region src/checkpoints/edit-checkpoint-types.d.ts
|
|
173
|
-
interface IEditCheckpointRecorder {
|
|
174
|
-
captureFile(filePath: string): Promise<void> | void;
|
|
175
|
-
}
|
|
176
|
-
interface IEditCheckpointTurnInput {
|
|
177
|
-
sessionId: string;
|
|
178
|
-
prompt: string;
|
|
179
|
-
}
|
|
180
|
-
interface IEditCheckpointSummary {
|
|
181
|
-
id: string;
|
|
182
|
-
sessionId: string;
|
|
183
|
-
sequence: number;
|
|
184
|
-
prompt: string;
|
|
185
|
-
createdAt: string;
|
|
186
|
-
fileCount: number;
|
|
187
|
-
}
|
|
188
|
-
interface IEditCheckpointFileRecord {
|
|
189
|
-
originalPath: string;
|
|
190
|
-
existed: boolean;
|
|
191
|
-
snapshotFile?: string;
|
|
192
|
-
}
|
|
193
|
-
interface IEditCheckpointManifest extends IEditCheckpointSummary {
|
|
194
|
-
version: 1;
|
|
195
|
-
files: IEditCheckpointFileRecord[];
|
|
196
|
-
}
|
|
197
|
-
type TEditCheckpointFileRestoreAction = 'restore-preimage' | 'delete-created-file';
|
|
198
|
-
interface IEditCheckpointFileInspection {
|
|
199
|
-
originalPath: string;
|
|
200
|
-
relativePath: string;
|
|
201
|
-
existed: boolean;
|
|
202
|
-
restoreAction: TEditCheckpointFileRestoreAction;
|
|
203
|
-
snapshotAvailable: boolean;
|
|
204
|
-
snapshotSizeBytes?: number;
|
|
205
|
-
}
|
|
206
|
-
interface IEditCheckpointInspectionPlan {
|
|
207
|
-
checkpointIds: string[];
|
|
208
|
-
fileCount: number;
|
|
209
|
-
}
|
|
210
|
-
interface IEditCheckpointInspection {
|
|
211
|
-
target: IEditCheckpointSummary;
|
|
212
|
-
capturedFiles: IEditCheckpointFileInspection[];
|
|
213
|
-
restoreToCheckpoint: IEditCheckpointInspectionPlan;
|
|
214
|
-
rollbackThroughCheckpoint: IEditCheckpointInspectionPlan;
|
|
215
|
-
}
|
|
216
|
-
interface IEditCheckpointRestoreResult {
|
|
217
|
-
target: IEditCheckpointSummary;
|
|
218
|
-
restoredCheckpointCount: number;
|
|
219
|
-
restoredFileCount: number;
|
|
220
|
-
removedCheckpointCount: number;
|
|
221
|
-
}
|
|
222
|
-
//#endregion
|
|
223
|
-
//#region src/checkpoints/edit-checkpoint-store.d.ts
|
|
224
|
-
interface IEditCheckpointStoreOptions {
|
|
225
|
-
cwd: string;
|
|
226
|
-
now?: () => Date;
|
|
227
|
-
}
|
|
228
|
-
declare class EditCheckpointStore {
|
|
229
|
-
private readonly fs;
|
|
230
|
-
private readonly fsAsync;
|
|
231
|
-
private readonly cwd;
|
|
232
|
-
private readonly rootDir;
|
|
233
|
-
private readonly now;
|
|
234
|
-
private activeTurn;
|
|
235
|
-
constructor(options: IEditCheckpointStoreOptions, fs?: IFileSystem, fsAsync?: IFileSystemAsync);
|
|
236
|
-
beginTurn(input: IEditCheckpointTurnInput): Promise<IEditCheckpointSummary>;
|
|
237
|
-
captureFile(filePath: string): Promise<void>;
|
|
238
|
-
finalizeTurn(): Promise<IEditCheckpointSummary | undefined>;
|
|
239
|
-
list(sessionId: string): IEditCheckpointSummary[];
|
|
240
|
-
inspect(sessionId: string, checkpointId: string): IEditCheckpointInspection;
|
|
241
|
-
restoreToCheckpoint(sessionId: string, checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
242
|
-
rollbackThroughCheckpoint(sessionId: string, checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
243
|
-
private createFileRecord;
|
|
244
|
-
private restoreFile;
|
|
245
|
-
private loadManifests;
|
|
246
|
-
private nextSequence;
|
|
247
|
-
private writeManifest;
|
|
248
|
-
private sessionDir;
|
|
249
|
-
private checkpointDir;
|
|
250
|
-
}
|
|
251
|
-
//#endregion
|
|
252
|
-
//#region src/checkpoints/edit-checkpoint-tools.d.ts
|
|
253
|
-
declare function wrapEditCheckpointTools(tools: readonly IToolWithEventService[], recorder: IEditCheckpointRecorder): IToolWithEventService[];
|
|
254
|
-
//#endregion
|
|
255
|
-
//#region src/context/prompt-file-reference-types.d.ts
|
|
256
|
-
type TPromptFileReferenceDiagnosticCode = 'not-found' | 'outside-root' | 'directory-not-supported' | 'file-too-large' | 'total-too-large' | 'too-many-references' | 'max-depth' | 'circular-reference' | 'unreadable';
|
|
257
|
-
interface IPromptFileReferenceToken {
|
|
258
|
-
original: string;
|
|
259
|
-
path: string;
|
|
260
|
-
index: number;
|
|
261
|
-
}
|
|
262
|
-
interface IResolvedPromptFileReference extends IPromptFileReferenceRecord {
|
|
263
|
-
content: string;
|
|
264
|
-
}
|
|
265
|
-
interface IPromptFileReferenceDiagnostic {
|
|
266
|
-
code: TPromptFileReferenceDiagnosticCode;
|
|
267
|
-
severity: 'error';
|
|
268
|
-
reference: string;
|
|
269
|
-
message: string;
|
|
270
|
-
path?: string;
|
|
271
|
-
}
|
|
272
|
-
interface IPromptFileReferenceLimits {
|
|
273
|
-
maxDepth?: number;
|
|
274
|
-
maxReferences?: number;
|
|
275
|
-
maxFileBytes?: number;
|
|
276
|
-
maxTotalBytes?: number;
|
|
277
|
-
}
|
|
278
|
-
interface IPromptFileReferenceResolveOptions {
|
|
279
|
-
cwd: string;
|
|
280
|
-
limits?: IPromptFileReferenceLimits;
|
|
281
|
-
reason?: TPromptFileReferenceReason;
|
|
282
|
-
fsAsync?: IFileSystemAsync;
|
|
283
|
-
}
|
|
284
|
-
interface IResolvedPromptFileReferences {
|
|
285
|
-
references: IResolvedPromptFileReference[];
|
|
286
|
-
diagnostics: IPromptFileReferenceDiagnostic[];
|
|
287
|
-
}
|
|
288
|
-
interface IPromptFileReferenceHistoryData {
|
|
289
|
-
message: string;
|
|
290
|
-
references: IPromptFileReferenceRecord[];
|
|
291
|
-
}
|
|
292
|
-
//#endregion
|
|
293
|
-
//#region src/context/context-reference-inventory.d.ts
|
|
294
|
-
interface IContextReferenceInventoryLimits {
|
|
295
|
-
maxActiveReferences?: number;
|
|
296
|
-
maxActiveBytes?: number;
|
|
297
|
-
maxObservedReferences?: number;
|
|
298
|
-
}
|
|
299
|
-
interface IContextReferenceAddResult {
|
|
300
|
-
reference?: IContextReferenceItem;
|
|
301
|
-
evicted: IContextReferenceItem[];
|
|
302
|
-
diagnostics: string[];
|
|
303
|
-
}
|
|
304
|
-
interface IContextReferenceRemoveResult {
|
|
305
|
-
removed?: IContextReferenceItem;
|
|
306
|
-
}
|
|
307
|
-
interface IContextReferenceClearResult {
|
|
308
|
-
removed: IContextReferenceItem[];
|
|
309
|
-
}
|
|
310
|
-
interface IContextReferenceUpsertResult {
|
|
311
|
-
references: IContextReferenceItem[];
|
|
312
|
-
evicted: IContextReferenceItem[];
|
|
313
|
-
}
|
|
314
|
-
declare function createContextReferenceItem(record: IPromptFileReferenceRecord, loadType: TContextReferenceLoadType, status: TContextReferenceStatus, timestamp?: string): IContextReferenceItem;
|
|
315
|
-
declare function upsertContextReference(references: readonly IContextReferenceItem[], item: IContextReferenceItem, limits?: IContextReferenceInventoryLimits): IContextReferenceUpsertResult;
|
|
316
|
-
declare function removeContextReference(references: readonly IContextReferenceItem[], query: string): {
|
|
317
|
-
references: IContextReferenceItem[];
|
|
318
|
-
result: IContextReferenceRemoveResult;
|
|
319
|
-
};
|
|
320
|
-
declare function clearContextReferences(references: readonly IContextReferenceItem[]): IContextReferenceClearResult;
|
|
321
|
-
declare function listActiveContextReferences(references: readonly IContextReferenceItem[]): IContextReferenceItem[];
|
|
322
|
-
declare function toContextReferenceRecords(references: readonly IContextReferenceItem[]): IPromptFileReferenceRecord[];
|
|
323
|
-
//#endregion
|
|
324
|
-
//#region src/memory/project-memory-store.d.ts
|
|
325
|
-
declare const MEMORY_INDEX_MAX_LINES = 200;
|
|
326
|
-
declare const MEMORY_INDEX_MAX_BYTES: number;
|
|
327
|
-
interface IStartupMemory {
|
|
328
|
-
content: string;
|
|
329
|
-
path: string;
|
|
330
|
-
lineCount: number;
|
|
331
|
-
truncated: boolean;
|
|
332
|
-
}
|
|
333
|
-
interface IMemoryTopicSummary {
|
|
334
|
-
name: string;
|
|
335
|
-
path: string;
|
|
336
|
-
}
|
|
337
|
-
interface IProjectMemorySummary {
|
|
338
|
-
indexPath: string;
|
|
339
|
-
topicsPath: string;
|
|
340
|
-
topics: IMemoryTopicSummary[];
|
|
341
|
-
}
|
|
342
|
-
interface IAppendMemoryInput {
|
|
343
|
-
type: TMemoryType;
|
|
344
|
-
topic: string;
|
|
345
|
-
text: string;
|
|
346
|
-
}
|
|
347
|
-
interface IAppendMemoryResult {
|
|
348
|
-
indexPath: string;
|
|
349
|
-
topicPath: string;
|
|
350
|
-
topic: string;
|
|
351
|
-
deduplicated: boolean;
|
|
352
|
-
}
|
|
353
|
-
declare function isMemoryType(value: string): value is TMemoryType;
|
|
354
|
-
declare class ProjectMemoryStore {
|
|
355
|
-
private readonly cwd;
|
|
356
|
-
private readonly now;
|
|
357
|
-
constructor(cwd: string, now?: () => Date);
|
|
358
|
-
getIndexPath(): string;
|
|
359
|
-
getTopicsPath(): string;
|
|
360
|
-
loadStartupMemory(): IStartupMemory;
|
|
361
|
-
list(): IProjectMemorySummary;
|
|
362
|
-
readTopic(topic: string): string;
|
|
363
|
-
append(input: IAppendMemoryInput): IAppendMemoryResult;
|
|
364
|
-
}
|
|
365
|
-
//#endregion
|
|
366
|
-
//#region src/memory/automatic-memory-types.d.ts
|
|
367
|
-
type TMemoryCandidateStatus = 'pending' | 'approved' | 'rejected' | 'saved' | 'skipped';
|
|
368
|
-
interface IMemoryCandidate {
|
|
369
|
-
id: string;
|
|
370
|
-
type: TMemoryType;
|
|
371
|
-
topic: string;
|
|
372
|
-
text: string;
|
|
373
|
-
sourceMessageIds: string[];
|
|
374
|
-
confidence: number;
|
|
375
|
-
createdAt: string;
|
|
376
|
-
reason: string;
|
|
377
|
-
}
|
|
378
|
-
interface IMemoryPendingRecord extends IMemoryCandidate {
|
|
379
|
-
status: TMemoryCandidateStatus;
|
|
380
|
-
updatedAt: string;
|
|
381
|
-
decisionReason?: string;
|
|
382
|
-
}
|
|
383
|
-
//#endregion
|
|
384
|
-
//#region src/agents/agent-definition-types.d.ts
|
|
385
|
-
/**
|
|
386
|
-
* Definition of an agent that can be spawned as a subagent.
|
|
387
|
-
*
|
|
388
|
-
* Built-in agents and custom (user-defined) agents share this shape.
|
|
389
|
-
* Optional fields inherit from the parent session when omitted.
|
|
390
|
-
*/
|
|
391
|
-
interface IAgentDefinition {
|
|
392
|
-
/** Unique name used to reference the agent (e.g., 'Explore', 'Plan'). */
|
|
393
|
-
name: string;
|
|
394
|
-
/** Human-readable description of the agent's purpose. */
|
|
395
|
-
description: string;
|
|
396
|
-
/** Markdown body content used as the agent's system prompt. */
|
|
397
|
-
systemPrompt: string;
|
|
398
|
-
/** Model override (e.g., 'claude-haiku-4-5', 'sonnet', 'opus'). Inherits parent model when omitted. */
|
|
399
|
-
model?: string;
|
|
400
|
-
/** Maximum number of agentic turns the subagent may execute. */
|
|
401
|
-
maxTurns?: number;
|
|
402
|
-
/** Allowlist of tool names. Only these tools are available when set. */
|
|
403
|
-
tools?: string[];
|
|
404
|
-
/** Denylist of tool names. These tools are removed from the inherited set. */
|
|
405
|
-
disallowedTools?: string[];
|
|
406
|
-
}
|
|
407
|
-
//#endregion
|
|
408
|
-
//#region src/config/config-types.d.ts
|
|
409
|
-
/**
|
|
410
|
-
* Fully resolved config after merging all settings files and applying defaults.
|
|
411
|
-
*/
|
|
412
|
-
interface IResolvedConfig {
|
|
413
|
-
defaultTrustLevel: 'safe' | 'moderate' | 'full';
|
|
414
|
-
/** Response language code (e.g., "ko", "en"). Undefined = no language constraint. */
|
|
415
|
-
language?: string;
|
|
416
|
-
/** Active provider profile key when providers/currentProvider are used. */
|
|
417
|
-
currentProvider?: string;
|
|
418
|
-
provider: {
|
|
419
|
-
name: string;
|
|
420
|
-
model: string;
|
|
421
|
-
apiKey: string | undefined;
|
|
422
|
-
baseURL?: string;
|
|
423
|
-
timeout?: number;
|
|
424
|
-
options?: Record<string, TUniversalValue>;
|
|
425
|
-
};
|
|
426
|
-
permissions: {
|
|
427
|
-
allow: string[];
|
|
428
|
-
deny: string[];
|
|
429
|
-
};
|
|
430
|
-
env: Record<string, string>;
|
|
431
|
-
hooks?: THooksConfig;
|
|
432
|
-
/** Plugin enablement map: plugin name -> enabled/disabled */
|
|
433
|
-
enabledPlugins?: Record<string, boolean>;
|
|
434
|
-
/** Extra marketplace sources: name -> { source } */
|
|
435
|
-
extraKnownMarketplaces?: Record<string, {
|
|
436
|
-
source: {
|
|
437
|
-
type: string;
|
|
438
|
-
repo?: string;
|
|
439
|
-
url?: string;
|
|
440
|
-
path?: string;
|
|
441
|
-
ref?: string;
|
|
442
|
-
};
|
|
443
|
-
}>;
|
|
444
|
-
/** Auto-compact threshold as a 0-1 fraction. Set false to disable automatic compaction. */
|
|
445
|
-
autoCompactThreshold?: number | false;
|
|
446
|
-
/** Transport enable/disable + options: transport name -> { enabled, options } */
|
|
447
|
-
transports?: Record<string, {
|
|
448
|
-
enabled?: boolean;
|
|
449
|
-
options?: Record<string, unknown>;
|
|
450
|
-
}>;
|
|
451
|
-
}
|
|
452
|
-
//#endregion
|
|
453
|
-
//#region src/context/context-file-tracker.d.ts
|
|
454
|
-
/** A single context file entry tracked with its content hash. */
|
|
455
|
-
interface IContextFileEntry {
|
|
456
|
-
/** Absolute path to the file. */
|
|
457
|
-
filePath: string;
|
|
458
|
-
/** Content as read at load time. */
|
|
459
|
-
content: string;
|
|
460
|
-
/** SHA-256 hex digest of `content`. */
|
|
461
|
-
contentHash: string;
|
|
462
|
-
}
|
|
463
|
-
//#endregion
|
|
464
|
-
//#region src/context/context-loader.d.ts
|
|
465
|
-
interface ILoadedContext {
|
|
466
|
-
/** Concatenated content of all AGENTS.md files found (root-first) */
|
|
467
|
-
agentsMd: string;
|
|
468
|
-
/** Concatenated content of all CLAUDE.md files found (root-first) */
|
|
469
|
-
claudeMd: string;
|
|
470
|
-
/** Startup project memory index loaded from .robota/memory/MEMORY.md, if present */
|
|
471
|
-
memoryMd?: string;
|
|
472
|
-
/** Formatted active task context loaded from .agents/tasks/*.md, if present */
|
|
473
|
-
taskContext?: string;
|
|
474
|
-
/** Extracted "Compact Instructions" section from CLAUDE.md, if present */
|
|
475
|
-
compactInstructions?: string;
|
|
476
|
-
/** Per-file entries for all AGENTS.md files, root-first. Present for staleness detection. */
|
|
477
|
-
agentsFileEntries?: IContextFileEntry[];
|
|
478
|
-
/** Per-file entries for all CLAUDE.md files, root-first. Present for staleness detection. */
|
|
479
|
-
claudeFileEntries?: IContextFileEntry[];
|
|
480
|
-
}
|
|
481
|
-
//#endregion
|
|
482
|
-
//#region src/assembly/create-subagent-session.d.ts
|
|
483
|
-
/** Options for creating a subagent session. */
|
|
484
|
-
interface ISubagentOptions {
|
|
485
|
-
/** Agent definition (built-in or custom). */
|
|
486
|
-
agentDefinition: IAgentDefinition;
|
|
487
|
-
/** Parent's resolved config (for provider, permissions, etc.). */
|
|
488
|
-
parentConfig: IResolvedConfig;
|
|
489
|
-
/** Parent's loaded context (CLAUDE.md, AGENTS.md). */
|
|
490
|
-
parentContext: ILoadedContext;
|
|
491
|
-
/** Parent session's available tools (to inherit/filter). */
|
|
492
|
-
parentTools: IToolWithEventService[];
|
|
493
|
-
/** AI provider instance. */
|
|
494
|
-
provider: IAIProvider;
|
|
495
|
-
/** Terminal output interface. */
|
|
496
|
-
terminal: ITerminalOutput$1;
|
|
497
|
-
/** Stable session ID for transcript files. */
|
|
498
|
-
sessionId?: string;
|
|
499
|
-
/** Optional logger for subagent transcripts. */
|
|
500
|
-
sessionLogger?: ISessionLogger;
|
|
501
|
-
/** Whether this is a fork worker (uses fork suffix instead of standard). */
|
|
502
|
-
isForkWorker?: boolean;
|
|
503
|
-
/** Permission mode from parent (bypassPermissions, acceptEdits, etc.). */
|
|
504
|
-
permissionMode?: TPermissionMode;
|
|
505
|
-
/** Permission handler from parent. */
|
|
506
|
-
permissionHandler?: TPermissionHandler;
|
|
507
|
-
/** Plugin hooks configuration from parent session. */
|
|
508
|
-
hooks?: Record<string, unknown>;
|
|
509
|
-
/** Hook type executors from parent session (prompt, agent, etc.). */
|
|
510
|
-
hookTypeExecutors?: IHookTypeExecutor[];
|
|
511
|
-
/** Streaming callback. */
|
|
512
|
-
onTextDelta?: (delta: string) => void;
|
|
513
|
-
/** Tool execution callback. */
|
|
514
|
-
onToolExecution?: (event: {
|
|
515
|
-
type: 'start' | 'end';
|
|
516
|
-
toolName: string;
|
|
517
|
-
toolArgs?: TToolArgs;
|
|
518
|
-
success?: boolean;
|
|
519
|
-
denied?: boolean;
|
|
520
|
-
toolResultData?: string;
|
|
521
|
-
executionId?: string;
|
|
522
|
-
}) => void;
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* Create a fully-configured Session for subagent execution.
|
|
526
|
-
*
|
|
527
|
-
* Assembles provider, tools, and system prompt from parent context and
|
|
528
|
-
* agent definition, then returns a new Session instance.
|
|
529
|
-
*/
|
|
530
|
-
declare function createSubagentSession(options: ISubagentOptions): Session;
|
|
531
|
-
//#endregion
|
|
532
|
-
//#region src/subagents/in-process-subagent-runner.d.ts
|
|
533
|
-
interface IInProcessSubagentRunnerDeps {
|
|
534
|
-
config: IResolvedConfig;
|
|
535
|
-
context: ILoadedContext;
|
|
536
|
-
tools: IToolWithEventService[];
|
|
537
|
-
terminal: ITerminalOutput;
|
|
538
|
-
provider: IAIProvider;
|
|
539
|
-
permissionMode?: TPermissionMode;
|
|
540
|
-
permissionHandler?: TPermissionHandler;
|
|
541
|
-
hooks?: ISubagentOptions['hooks'];
|
|
542
|
-
hookTypeExecutors?: IHookTypeExecutor[];
|
|
543
|
-
onTextDelta?: (delta: string) => void;
|
|
544
|
-
onToolExecution?: (event: {
|
|
545
|
-
type: 'start' | 'end';
|
|
546
|
-
toolName: string;
|
|
547
|
-
toolArgs?: TToolArgs;
|
|
548
|
-
success?: boolean;
|
|
549
|
-
denied?: boolean;
|
|
550
|
-
toolResultData?: string;
|
|
551
|
-
executionId?: string;
|
|
552
|
-
}) => void;
|
|
553
|
-
customAgentRegistry?: (name: string) => IAgentDefinition | undefined;
|
|
554
|
-
}
|
|
555
|
-
type TSubagentRunnerFactory = (deps: IInProcessSubagentRunnerDeps) => ISubagentRunner$1;
|
|
556
|
-
declare function createInProcessSubagentRunner(deps: IInProcessSubagentRunnerDeps): ISubagentRunner$1;
|
|
557
|
-
//#endregion
|
|
558
|
-
//#region src/command-api/context/context-command-api.d.ts
|
|
559
|
-
type TAutoCompactThreshold = number | false;
|
|
560
|
-
declare const DEFAULT_AUTO_COMPACT_THRESHOLD = 0.835;
|
|
561
|
-
declare const AUTO_COMPACT_THRESHOLD_SETTINGS_KEY = "autoCompactThreshold";
|
|
562
|
-
interface ICompactContextResult {
|
|
563
|
-
before: IContextWindowState;
|
|
564
|
-
after: IContextWindowState;
|
|
565
|
-
beforeMessageCount: number;
|
|
566
|
-
afterMessageCount: number;
|
|
567
|
-
}
|
|
568
|
-
/** Read context-window state through the command host facade. */
|
|
569
|
-
declare function readCommandContextState(context: ICommandHostContext): IContextWindowState;
|
|
570
|
-
/** Read the effective automatic compact policy through the command host facade. */
|
|
571
|
-
declare function readAutoCompactThreshold(context: ICommandHostContext): TAutoCompactThreshold;
|
|
572
|
-
/** Read the source of the effective automatic compact policy. */
|
|
573
|
-
declare function readAutoCompactThresholdSource(context: ICommandHostContext): TAutoCompactThresholdSource;
|
|
574
|
-
/** Update the active session's automatic compact policy through the command host facade. */
|
|
575
|
-
declare function setCommandAutoCompactThreshold(context: ICommandHostContext, threshold: TAutoCompactThreshold, source: TAutoCompactThresholdSource): void;
|
|
576
|
-
/** Persist an automatic compact policy value through the host settings adapter, when present. */
|
|
577
|
-
declare function writeAutoCompactThresholdSetting(context: ICommandHostContext, threshold: TAutoCompactThreshold): boolean;
|
|
578
|
-
/** Remove the persisted automatic compact policy through the host settings adapter, when present. */
|
|
579
|
-
declare function resetAutoCompactThresholdSetting(context: ICommandHostContext): boolean;
|
|
580
|
-
/** Run manual compaction through the command host facade and return before/after state. */
|
|
581
|
-
declare function compactCommandContext(context: ICommandHostContext, instructions?: string): Promise<ICompactContextResult>;
|
|
582
|
-
/** List context reference inventory entries through the command host facade. */
|
|
583
|
-
declare function listCommandContextReferences(context: ICommandHostContext): IContextReferenceItem[];
|
|
584
|
-
/** Add a manual context reference through the command host facade. */
|
|
585
|
-
declare function addCommandContextReference(context: ICommandHostContext, path: string): Promise<IContextReferenceAddResult>;
|
|
586
|
-
/** Remove a context reference through the command host facade. */
|
|
587
|
-
declare function removeCommandContextReference(context: ICommandHostContext, path: string): IContextReferenceRemoveResult;
|
|
588
|
-
/** Clear all context references through the command host facade. */
|
|
589
|
-
declare function clearCommandContextReferences(context: ICommandHostContext): IContextReferenceClearResult;
|
|
590
|
-
//#endregion
|
|
591
|
-
//#region src/command-api/host-context.d.ts
|
|
592
|
-
interface ICommandSkillListEntry {
|
|
593
|
-
readonly name: string;
|
|
594
|
-
readonly description: string;
|
|
595
|
-
readonly source: string;
|
|
596
|
-
readonly modelInvocable: boolean;
|
|
597
|
-
readonly userInvocable: boolean;
|
|
598
|
-
readonly argumentHint?: string;
|
|
599
|
-
readonly context?: string;
|
|
600
|
-
readonly agent?: string;
|
|
601
|
-
}
|
|
602
|
-
type TCommandInvocationSource = 'user' | 'model';
|
|
603
|
-
interface ICommandSkillActivationRequest {
|
|
604
|
-
readonly invocationSource: TCommandInvocationSource;
|
|
605
|
-
readonly displayInput?: string;
|
|
606
|
-
readonly rawInput?: string;
|
|
607
|
-
}
|
|
608
|
-
type TAutoCompactThresholdSource = 'default' | 'settings' | 'session';
|
|
609
|
-
/**
|
|
610
|
-
* Live model re-application options (PRESET-013). Carries the model group a preset switch may
|
|
611
|
-
* re-apply to a running session; `maxOutputTokens` maps to the agent's `maxTokens` channel.
|
|
612
|
-
*/
|
|
613
|
-
interface IModelReapplyOptions {
|
|
614
|
-
model?: string;
|
|
615
|
-
effort?: TModelEffort;
|
|
616
|
-
temperature?: number;
|
|
617
|
-
maxOutputTokens?: number;
|
|
618
|
-
}
|
|
619
|
-
interface ICommandSessionRuntime {
|
|
620
|
-
clearHistory(): void;
|
|
621
|
-
compact(instructions?: string): Promise<void>;
|
|
622
|
-
getContextState(): IContextWindowState;
|
|
623
|
-
getPermissionMode(): TPermissionMode;
|
|
624
|
-
setPermissionMode(mode: TPermissionMode): void;
|
|
625
|
-
getSessionId(): string;
|
|
626
|
-
getMessageCount(): number;
|
|
627
|
-
getSessionAllowedTools(): readonly string[];
|
|
628
|
-
getAutoCompactThreshold(): number | false;
|
|
629
|
-
getFullHistory(): IHistoryEntry[];
|
|
630
|
-
getHistory(): TUniversalMessage[];
|
|
631
|
-
setAutoCompactThreshold?(threshold: TAutoCompactThreshold): void;
|
|
632
|
-
getSessionTokenUsage?(): {
|
|
633
|
-
inputTokens: number;
|
|
634
|
-
outputTokens: number;
|
|
635
|
-
} | undefined;
|
|
636
|
-
getModelId?(): string | undefined;
|
|
637
|
-
/** Re-apply model/effort/temperature/maxOutputTokens to the live session (PRESET-013). */
|
|
638
|
-
applyModelOptions?(options: IModelReapplyOptions): void;
|
|
639
|
-
/** Read the active preset id (PRESET-011 runtime state). */
|
|
640
|
-
getActivePresetId?(): string;
|
|
641
|
-
/** Set the active preset id (PRESET-011 runtime state — pure state, no option re-application). */
|
|
642
|
-
setActivePresetId?(id: string): void;
|
|
643
|
-
/** Toggle subagent dispatch live for the running session (PRESET-016 runtime gate). */
|
|
644
|
-
setParallelSubagentsEnabled?(enabled: boolean): void;
|
|
645
|
-
}
|
|
646
|
-
interface ICommandSessionReplayValidationReport {
|
|
647
|
-
logFile: string;
|
|
648
|
-
entryCount: number;
|
|
649
|
-
validation: ISessionReplayValidationResult;
|
|
650
|
-
}
|
|
651
|
-
interface ICommandHostContext {
|
|
652
|
-
clearConversationHistory?(): void;
|
|
653
|
-
validateCurrentSessionReplayLog?(): ICommandSessionReplayValidationReport;
|
|
654
|
-
getAgentJobCapability?(): IAgentJobHostContext | undefined;
|
|
655
|
-
getSession(): ICommandSessionRuntime;
|
|
656
|
-
/** PRESET-014 — re-apply a preset persona to the live system prompt. */
|
|
657
|
-
applyPersona?(persona: string): void;
|
|
658
|
-
/** PRESET-017 — toggle the verify-before-done self-verification section on the live prompt. */
|
|
659
|
-
applySelfVerification?(enabled: boolean): void;
|
|
660
|
-
/** PRESET-015 — re-apply command-module selection to the live session. */
|
|
661
|
-
applyCommandModuleSelection?(enabled: readonly string[] | undefined, disabled: readonly string[] | undefined): void;
|
|
662
|
-
getContextState(): IContextWindowState;
|
|
663
|
-
getAutoCompactThreshold(): TAutoCompactThreshold;
|
|
664
|
-
getAutoCompactThresholdSource?(): TAutoCompactThresholdSource;
|
|
665
|
-
setAutoCompactThreshold?(threshold: TAutoCompactThreshold, source?: TAutoCompactThresholdSource): void;
|
|
666
|
-
getCommandHostAdapters?(): ICommandHostAdapters;
|
|
667
|
-
compactContext(instructions?: string): Promise<void>;
|
|
668
|
-
listContextReferences?(): IContextReferenceItem[];
|
|
669
|
-
addContextReference?(path: string): Promise<IContextReferenceAddResult>;
|
|
670
|
-
removeContextReference?(path: string): IContextReferenceRemoveResult;
|
|
671
|
-
clearContextReferences?(): IContextReferenceClearResult;
|
|
672
|
-
getCwd(): string;
|
|
673
|
-
getCommandInvocationSource?(): TCommandInvocationSource;
|
|
674
|
-
listCommands?(): ICommandListEntry[];
|
|
675
|
-
listSkills?(): ICommandSkillListEntry[];
|
|
676
|
-
executeSkillCommandByName?(name: string, args: string, request: ICommandSkillActivationRequest): Promise<ICommandResult | null>;
|
|
677
|
-
listEditCheckpoints(): IEditCheckpointSummary[];
|
|
678
|
-
inspectEditCheckpoint?(checkpointId: string): IEditCheckpointInspection;
|
|
679
|
-
restoreEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
680
|
-
rollbackEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
681
|
-
getUsedMemoryReferences(): IMemoryReference[];
|
|
682
|
-
recordMemoryEvent(event: IMemoryEvent): void;
|
|
683
|
-
listBackgroundTasks(filter?: IBackgroundTaskListFilter): IBackgroundTaskState[];
|
|
684
|
-
readBackgroundTaskLog(taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
|
|
685
|
-
cancelBackgroundTask(taskId: string, reason?: string): Promise<void>;
|
|
686
|
-
closeBackgroundTask(taskId: string): Promise<void>;
|
|
687
|
-
}
|
|
688
|
-
interface IAgentJobHostContext {
|
|
689
|
-
listAgentDefinitions(): Array<{
|
|
690
|
-
name: string;
|
|
691
|
-
description: string;
|
|
692
|
-
}>;
|
|
693
|
-
listAgentJobs(): ISubagentJobState[];
|
|
694
|
-
spawnAgentJob(input: {
|
|
695
|
-
agentType: string;
|
|
696
|
-
label: string;
|
|
697
|
-
mode: 'foreground' | 'background';
|
|
698
|
-
prompt: string;
|
|
699
|
-
model?: string;
|
|
700
|
-
isolation?: TBackgroundTaskIsolation;
|
|
701
|
-
}): Promise<ISubagentJobState>;
|
|
702
|
-
sendAgentJob(jobId: string, prompt: string): Promise<void>;
|
|
703
|
-
cancelAgentJob(jobId: string, reason?: string): Promise<void>;
|
|
704
|
-
closeAgentJob(jobId: string): Promise<void>;
|
|
705
|
-
createBackgroundJobGroup(input: Omit<IBackgroundJobGroupCreateRequest, 'parentSessionId'>): IBackgroundJobGroupState;
|
|
706
|
-
waitBackgroundJobGroup(groupId: string): Promise<IBackgroundJobGroupState>;
|
|
707
|
-
/**
|
|
708
|
-
* FLOW-005: schedule a recurring/one-shot agent wake. On each cron fire the agent loop
|
|
709
|
-
* re-enters with `agentInstruction` (FLOW-001/002). `cronExpression` may be a standard cron
|
|
710
|
-
* string or an ISO timestamp (one-shot).
|
|
711
|
-
*/
|
|
712
|
-
spawnScheduledWake(input: {
|
|
713
|
-
label: string;
|
|
714
|
-
cronExpression: string;
|
|
715
|
-
agentInstruction: string;
|
|
716
|
-
}): Promise<IBackgroundTaskState>;
|
|
717
|
-
/**
|
|
718
|
-
* FLOW-005: monitor a process's output and wake the agent with `agentInstruction` when a
|
|
719
|
-
* line matches `matchPattern` (FLOW-004).
|
|
720
|
-
*/
|
|
721
|
-
spawnMonitorWake(input: {
|
|
722
|
-
label: string;
|
|
723
|
-
command: string;
|
|
724
|
-
matchPattern: string;
|
|
725
|
-
agentInstruction: string;
|
|
726
|
-
}): Promise<IBackgroundTaskState>;
|
|
727
|
-
readBackgroundTaskLog(taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
|
|
728
|
-
}
|
|
729
|
-
//#endregion
|
|
730
|
-
//#region src/command-api/contracts.d.ts
|
|
731
|
-
type TSystemCommandLifecycle = 'inline' | 'blocking' | 'background';
|
|
732
|
-
/** A user-visible command with descriptor metadata and execute logic. */
|
|
733
|
-
interface ISystemCommand {
|
|
734
|
-
name: string;
|
|
735
|
-
/** User-friendly display label (e.g., "Interaction Mode"). Falls back to `name` if not set. */
|
|
736
|
-
displayName?: string;
|
|
737
|
-
description: string;
|
|
738
|
-
/** Optional usage example shown in /help output (e.g., "/compact Summarize the context"). */
|
|
739
|
-
example?: string;
|
|
740
|
-
modelInvocable?: boolean;
|
|
741
|
-
userInvocable?: boolean;
|
|
742
|
-
argumentHint?: string;
|
|
743
|
-
safety?: TCapabilitySafety;
|
|
744
|
-
subcommands?: readonly ICommand[];
|
|
745
|
-
lifecycle?: TSystemCommandLifecycle;
|
|
746
|
-
/**
|
|
747
|
-
* Whether executing this command requires explicit user permission/confirmation.
|
|
748
|
-
* - `false`: runs immediately without any approval gate
|
|
749
|
-
* - `true`: user confirmation is required before execution
|
|
750
|
-
* - `undefined` (default): derived from `safety` — `'read-only'` → false, others → true
|
|
751
|
-
*/
|
|
752
|
-
requiresPermission?: boolean;
|
|
753
|
-
execute(context: ICommandHostContext, args: string): Promise<ICommandResult> | ICommandResult;
|
|
754
|
-
}
|
|
755
|
-
//#endregion
|
|
756
|
-
//#region src/command-api/command-module.d.ts
|
|
757
|
-
type TCommandModuleSessionRequirement = 'agent-runtime';
|
|
758
|
-
/** Composable command capability module. */
|
|
759
|
-
interface ICommandModule {
|
|
760
|
-
/** Stable module id for diagnostics and duplicate handling. */
|
|
761
|
-
readonly name: string;
|
|
762
|
-
/** Slash palette/autocomplete command sources contributed by this module. */
|
|
763
|
-
readonly commandSources?: readonly ICommandSource[];
|
|
764
|
-
/** Executable system commands contributed by this module. */
|
|
765
|
-
readonly systemCommands?: readonly ISystemCommand[];
|
|
766
|
-
/** Additional model-visible descriptors not derived from executable commands. */
|
|
767
|
-
readonly commandDescriptors?: readonly ICapabilityDescriptor[];
|
|
768
|
-
/** Runtime facilities required by this module. */
|
|
769
|
-
readonly sessionRequirements?: readonly TCommandModuleSessionRequirement[];
|
|
770
|
-
/** Interaction hints consumed by createInteractiveRuntime for disambiguation dialogs. */
|
|
771
|
-
readonly interactionHints?: Record<string, ICommandInteractionHint>;
|
|
772
|
-
}
|
|
773
|
-
//#endregion
|
|
774
|
-
//#region src/command-api/provider/provider-settings.d.ts
|
|
775
|
-
interface IProviderProfileSettings extends IProviderProfileConfig {
|
|
776
|
-
[key: string]: TUniversalValue;
|
|
777
|
-
}
|
|
778
|
-
interface ILegacyProviderSettings {
|
|
779
|
-
[key: string]: TUniversalValue;
|
|
780
|
-
name?: string;
|
|
781
|
-
model?: string;
|
|
782
|
-
apiKey?: string;
|
|
783
|
-
baseURL?: string;
|
|
784
|
-
timeout?: number;
|
|
785
|
-
options?: Record<string, TUniversalValue>;
|
|
786
|
-
}
|
|
787
|
-
type TProviderSettingsDocument = Record<string, TUniversalValue> & {
|
|
788
|
-
currentProvider?: string;
|
|
789
|
-
providers?: Record<string, IProviderProfileSettings>;
|
|
790
|
-
provider?: ILegacyProviderSettings;
|
|
791
|
-
};
|
|
792
|
-
interface IProviderSetupInput {
|
|
793
|
-
profile: string;
|
|
794
|
-
type: string;
|
|
795
|
-
model?: string;
|
|
796
|
-
apiKey?: string;
|
|
797
|
-
apiKeyEnv?: string;
|
|
798
|
-
baseURL?: string;
|
|
799
|
-
timeout?: number;
|
|
800
|
-
setCurrent?: boolean;
|
|
801
|
-
}
|
|
802
|
-
interface IProviderSetupPatch {
|
|
803
|
-
currentProvider?: string;
|
|
804
|
-
providers: Record<string, IProviderProfileSettings>;
|
|
805
|
-
}
|
|
806
|
-
interface IProviderSettingsBuildOptions {
|
|
807
|
-
providerDefinitions?: readonly IProviderDefinition[];
|
|
808
|
-
/** Environment map for configure-time checks (test seam, default: process.env). */
|
|
809
|
-
env?: Record<string, string | undefined>;
|
|
810
|
-
}
|
|
811
|
-
declare function upsertProviderProfile(settings: TProviderSettingsDocument, profileName: string, profile: IProviderProfileSettings): TProviderSettingsDocument;
|
|
812
|
-
declare function setCurrentProvider(settings: TProviderSettingsDocument, profileName: string): TProviderSettingsDocument;
|
|
813
|
-
declare function deleteProviderProfile(settings: TProviderSettingsDocument, profileName: string, options?: {
|
|
814
|
-
replacementCurrentProvider?: string;
|
|
815
|
-
}): TProviderSettingsDocument;
|
|
816
|
-
declare function validateProviderProfile(profileName: string, profile: IProviderProfileSettings, options?: IProviderSettingsBuildOptions): void;
|
|
817
|
-
declare function buildProviderSetupPatch(input: IProviderSetupInput, options?: IProviderSettingsBuildOptions): IProviderSetupPatch;
|
|
818
|
-
declare function buildProviderProfile(input: IProviderSetupInput, options?: IProviderSettingsBuildOptions): IProviderProfileSettings;
|
|
819
|
-
declare function mergeProviderPatch(settings: TProviderSettingsDocument, patch: IProviderSetupPatch): TProviderSettingsDocument;
|
|
820
|
-
//#endregion
|
|
821
|
-
//#region src/command-api/provider/provider-command-types.d.ts
|
|
822
|
-
interface IProviderCommandSettingsAdapter {
|
|
823
|
-
readMergedSettings(): TProviderSettingsDocument;
|
|
824
|
-
readTargetSettings(): TProviderSettingsDocument;
|
|
825
|
-
writeTargetSettings(settings: TProviderSettingsDocument): void;
|
|
826
|
-
}
|
|
827
|
-
interface IProviderCommandModuleOptions {
|
|
828
|
-
providerDefinitions: readonly IProviderDefinition[];
|
|
829
|
-
settings: IProviderCommandSettingsAdapter;
|
|
830
|
-
orgPolicy?: IOrgPolicy;
|
|
831
|
-
}
|
|
832
|
-
//#endregion
|
|
833
|
-
//#region src/command-api/provider/provider-profile-names.d.ts
|
|
834
|
-
interface IProviderProfileNameSuggestionInput {
|
|
835
|
-
type: string;
|
|
836
|
-
}
|
|
837
|
-
interface IProviderProfileNameSuggestionOptions {
|
|
838
|
-
existingProfileNames?: readonly string[];
|
|
839
|
-
}
|
|
840
|
-
declare function suggestProviderProfileName(input: IProviderProfileNameSuggestionInput, options?: IProviderProfileNameSuggestionOptions): string;
|
|
841
|
-
declare function sanitizeProviderProfileName(value: string | undefined): string | undefined;
|
|
842
|
-
//#endregion
|
|
843
|
-
//#region src/command-api/provider/provider-command-probe.d.ts
|
|
844
|
-
declare function testProviderProfileCommand(currentProvider: string | undefined, providers: Record<string, IProviderProfileSettings> | undefined, profileArg: string | undefined, options: IProviderCommandModuleOptions): Promise<ICommandResult>;
|
|
845
|
-
declare function probeProviderProfile(profile: IProviderProfileConfig): Promise<IProviderProbeResult>;
|
|
846
|
-
//#endregion
|
|
847
|
-
//#region src/command-api/provider/settings-check.d.ts
|
|
848
|
-
type TSettingsCheck = 'missing' | 'valid' | 'corrupt' | 'incomplete';
|
|
849
|
-
declare function checkSettingsDocument(settings: TProviderSettingsDocument, providerDefinitions?: readonly IProviderDefinition[]): TSettingsCheck;
|
|
850
|
-
declare function checkSettingsFile(filePath: string, providerDefinitions?: readonly IProviderDefinition[]): TSettingsCheck;
|
|
851
|
-
//#endregion
|
|
852
|
-
//#region src/command-api/provider/provider-configuration.d.ts
|
|
853
|
-
interface IProviderSwitchOptions {
|
|
854
|
-
knownProviders?: Record<string, IProviderProfileSettings>;
|
|
855
|
-
}
|
|
856
|
-
interface IActiveModelChangeOptions {
|
|
857
|
-
settingsPaths?: readonly string[];
|
|
858
|
-
providerOverride?: string | undefined;
|
|
859
|
-
}
|
|
860
|
-
interface IProviderSettingsWriteTargetOptions {
|
|
861
|
-
settingsPaths?: readonly string[];
|
|
862
|
-
}
|
|
863
|
-
interface IActiveModelChangeResult {
|
|
864
|
-
settingsPath: string;
|
|
865
|
-
settings: TProviderSettingsDocument;
|
|
866
|
-
profileName?: string;
|
|
867
|
-
}
|
|
868
|
-
declare function resolveProviderSettingsWriteTargetPath(cwd: string, options?: IProviderSettingsWriteTargetOptions): string;
|
|
869
|
-
declare function applyProviderConfiguration(settingsPath: string, input: IProviderSetupInput, options?: IProviderSettingsBuildOptions): TProviderSettingsDocument;
|
|
870
|
-
declare function applyProviderSwitch(settingsPath: string, profileName: string, options?: IProviderSwitchOptions): TProviderSettingsDocument;
|
|
871
|
-
declare function applyActiveModelChange(cwd: string, modelId: string, options?: IActiveModelChangeOptions): IActiveModelChangeResult;
|
|
872
|
-
//#endregion
|
|
873
|
-
//#region src/command-api/provider/provider-merge.d.ts
|
|
874
|
-
declare function readMergedProviderSettingsFromPaths(paths: readonly string[], fs?: IFileSystem): TProviderSettingsDocument;
|
|
875
|
-
declare function mergeSettings(base: TProviderSettingsDocument, override: TProviderSettingsDocument): TProviderSettingsDocument;
|
|
876
|
-
declare function mergeProviders(base: TProviderSettingsDocument['providers'], override: TProviderSettingsDocument['providers']): TProviderSettingsDocument['providers'];
|
|
877
|
-
declare function resolveActiveProvider(settings: TProviderSettingsDocument, providerOverride: string | undefined, providerDefinitions: readonly IProviderDefinition[]): IProviderConfig | undefined;
|
|
878
|
-
//#endregion
|
|
879
|
-
//#region src/command-api/provider/provider-factory.d.ts
|
|
880
|
-
interface IReadProviderSettingsOptions {
|
|
881
|
-
providerOverride?: string;
|
|
882
|
-
providerDefinitions?: readonly IProviderDefinition[];
|
|
883
|
-
/** Environment map for env-default synthesis (test seam, default: process.env). */
|
|
884
|
-
env?: Record<string, string | undefined>;
|
|
885
|
-
}
|
|
886
|
-
/**
|
|
887
|
-
* Missing or unusable provider configuration at session start.
|
|
888
|
-
* Typed so callers can map it to a distinct exit code without message matching.
|
|
889
|
-
*/
|
|
890
|
-
declare class ProviderConfigError extends Error {
|
|
891
|
-
constructor(message: string);
|
|
892
|
-
}
|
|
893
|
-
declare function readMergedProviderSettings(cwd: string): TProviderSettingsDocument;
|
|
894
|
-
/**
|
|
895
|
-
* Zero-config fallback: synthesize an in-memory provider config from the first
|
|
896
|
-
* definition (in order) whose defaults are complete — `$ENV:` apiKey reference with the
|
|
897
|
-
* referenced variable set, plus a default model. Settings profiles always win; nothing
|
|
898
|
-
* is persisted. Returns undefined when no definition qualifies.
|
|
899
|
-
*/
|
|
900
|
-
declare function resolveEnvDefaultProvider(providerDefinitions: readonly IProviderDefinition[], env?: Record<string, string | undefined>): IProviderConfig | undefined;
|
|
901
|
-
declare function readProviderSettings(cwd: string, options?: IReadProviderSettingsOptions): IProviderConfig;
|
|
902
|
-
declare function createProviderFromSettings(cwd: string, modelOverride?: string, options?: IReadProviderSettingsOptions): IAIProvider;
|
|
903
|
-
//#endregion
|
|
904
|
-
//#region src/command-api/help/help-command-api.d.ts
|
|
905
|
-
declare const HELP_COMMAND_DESCRIPTION = "Show available commands";
|
|
906
|
-
declare function formatCommandHelpMessage(context: ICommandHostContext): string;
|
|
907
|
-
//#endregion
|
|
908
|
-
//#region src/command-api/background/background-command-api.d.ts
|
|
909
|
-
declare const BACKGROUND_COMMAND_DESCRIPTION = "List and control background tasks";
|
|
910
|
-
declare const BACKGROUND_COMMAND_USAGE = "Usage: background list | background read <task-id> [offset] | background cancel <task-id> | background close <task-id>";
|
|
911
|
-
declare function buildBackgroundCommandSubcommands(): ICommand[];
|
|
912
|
-
declare function formatCommandBackgroundTask(task: IBackgroundTaskState): string;
|
|
913
|
-
declare function formatCommandBackgroundTaskList(tasks: IBackgroundTaskState[]): string;
|
|
914
|
-
declare function parseCommandBackgroundLogCursor(value?: string): IBackgroundTaskLogCursor | undefined;
|
|
915
|
-
declare function listCommandBackgroundTasks(context: ICommandHostContext, filter?: IBackgroundTaskListFilter): IBackgroundTaskState[];
|
|
916
|
-
declare function readCommandBackgroundTaskLog(context: ICommandHostContext, taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
|
|
917
|
-
declare function cancelCommandBackgroundTask(context: ICommandHostContext, taskId: string, reason?: string): Promise<void>;
|
|
918
|
-
declare function closeCommandBackgroundTask(context: ICommandHostContext, taskId: string): Promise<void>;
|
|
919
|
-
//#endregion
|
|
920
|
-
//#region src/command-api/language/language-command-api.d.ts
|
|
921
|
-
declare const LANGUAGE_COMMAND_DESCRIPTION = "Set response language";
|
|
922
|
-
declare const LANGUAGE_COMMAND_ARGUMENT_HINT = "<code>";
|
|
923
|
-
declare const RECOMMENDED_RESPONSE_LANGUAGES: readonly [{
|
|
924
|
-
readonly code: "ko";
|
|
925
|
-
readonly description: "Korean";
|
|
926
|
-
}, {
|
|
927
|
-
readonly code: "en";
|
|
928
|
-
readonly description: "English";
|
|
929
|
-
}, {
|
|
930
|
-
readonly code: "ja";
|
|
931
|
-
readonly description: "Japanese";
|
|
932
|
-
}, {
|
|
933
|
-
readonly code: "zh";
|
|
934
|
-
readonly description: "Chinese";
|
|
935
|
-
}];
|
|
936
|
-
type TRecommendedResponseLanguage = (typeof RECOMMENDED_RESPONSE_LANGUAGES)[number]['code'];
|
|
937
|
-
declare function buildLanguageCommandSubcommands(source?: string): ICommand[];
|
|
938
|
-
declare function parseLanguageArgument(args: string): string | undefined;
|
|
939
|
-
declare function formatLanguageUsageMessage(commandName?: string): string;
|
|
940
|
-
//#endregion
|
|
941
|
-
//#region src/command-api/permissions/permission-mode-command-api.d.ts
|
|
942
|
-
declare const PERMISSION_MODE_COMMAND_DESCRIPTION = "Show/change permission mode";
|
|
943
|
-
declare const PERMISSION_MODE_ARGUMENT_HINT = "plan | default | acceptEdits | bypassPermissions";
|
|
944
|
-
declare const PERMISSIONS_COMMAND_DESCRIPTION = "Show/change permission mode and permission rules";
|
|
945
|
-
interface IPermissionsCommandState {
|
|
946
|
-
readonly mode: TPermissionMode;
|
|
947
|
-
readonly sessionAllowed: readonly string[];
|
|
948
|
-
}
|
|
949
|
-
declare const VALID_PERMISSION_MODES: readonly TPermissionMode[];
|
|
950
|
-
declare function buildPermissionModeSubcommands(source?: string): ICommand[];
|
|
951
|
-
declare function parsePermissionModeArgument(args: string): string | undefined;
|
|
952
|
-
declare function isPermissionMode(value: string): value is TPermissionMode;
|
|
953
|
-
declare function formatInvalidPermissionModeMessage(): string;
|
|
954
|
-
declare function resolvePermissionModeAdapter(context: ICommandHostContext): ICommandPermissionModeAdapter;
|
|
955
|
-
declare function readCommandPermissionMode(context: ICommandHostContext): TPermissionMode;
|
|
956
|
-
declare function writeCommandPermissionMode(context: ICommandHostContext, mode: TPermissionMode): void;
|
|
957
|
-
declare function listCommandSessionAllowedTools(context: ICommandHostContext): readonly string[];
|
|
958
|
-
declare function readCommandPermissionsState(context: ICommandHostContext): IPermissionsCommandState;
|
|
959
|
-
declare function formatCommandPermissionsMessage(state: IPermissionsCommandState): string;
|
|
960
|
-
//#endregion
|
|
961
|
-
//#region src/command-api/preset/preset-application.d.ts
|
|
962
|
-
/**
|
|
963
|
-
* Resolved-preset option subset that can be re-applied to a *live* session.
|
|
964
|
-
*
|
|
965
|
-
* This is a framework-owned shape. The agent-preset package's `TResolvedPresetOptions` satisfies it
|
|
966
|
-
* structurally, so a consumer can hand a `resolvePreset(...)` result straight to
|
|
967
|
-
* {@link applyPresetToSession} without framework importing agent-preset (no dependency cycle).
|
|
968
|
-
*
|
|
969
|
-
* PRESET-012 carries the permission/trust group (`permissionMode`); PRESET-013 adds the model group
|
|
970
|
-
* (`model`, `effort`, `temperature`, `maxOutputTokens`); PRESET-014 adds the `persona` block,
|
|
971
|
-
* re-applied to the live system prompt; PRESET-015 adds the command-module selection group
|
|
972
|
-
* (`enabledCommandModules`/`disabledCommandModules`), re-filtered against the session-start set.
|
|
973
|
-
*/
|
|
974
|
-
interface IPresetApplicationOptions {
|
|
975
|
-
permissionMode?: TPermissionMode;
|
|
976
|
-
model?: string;
|
|
977
|
-
effort?: TModelEffort;
|
|
978
|
-
temperature?: number;
|
|
979
|
-
maxOutputTokens?: number;
|
|
980
|
-
/** PRESET-014 — preset persona re-applied to the live system prompt. */
|
|
981
|
-
persona?: string;
|
|
982
|
-
/** PRESET-015 — allowlist of command-module names to keep on the live session. */
|
|
983
|
-
enabledCommandModules?: readonly string[];
|
|
984
|
-
/** PRESET-015 — denylist of command-module names to remove from the live session. */
|
|
985
|
-
disabledCommandModules?: readonly string[];
|
|
986
|
-
/** PRESET-016 — runtime gate toggle for subagent dispatch on the live session. */
|
|
987
|
-
enableParallelSubagents?: boolean;
|
|
988
|
-
/** PRESET-017 — toggle the verify-before-done self-verification section on the live prompt. */
|
|
989
|
-
selfVerification?: boolean;
|
|
990
|
-
}
|
|
991
|
-
/** Outcome of {@link applyPresetToSession}: which option groups were re-applied vs. skipped. */
|
|
992
|
-
interface IPresetApplicationResult {
|
|
993
|
-
/** Option-group keys whose value was present and applied to the live session. */
|
|
994
|
-
readonly applied: readonly string[];
|
|
995
|
-
/** Option-group keys absent from the resolved options (left untouched). */
|
|
996
|
-
readonly skipped: readonly string[];
|
|
997
|
-
}
|
|
998
|
-
/**
|
|
999
|
-
* Re-apply a resolved preset to a live session and record it as the active preset.
|
|
1000
|
-
*
|
|
1001
|
-
* This is the single entry point for live preset switching. It first records the active preset id
|
|
1002
|
-
* (PRESET-011 runtime state) — the runtime's `setActivePresetId` is optional, so it is invoked
|
|
1003
|
-
* defensively. It then re-applies each option group it owns; PRESET-012 applies the permission
|
|
1004
|
-
* posture via the existing `writeCommandPermissionMode` seam, and PRESET-013 re-applies the model
|
|
1005
|
-
* group (`model`/`effort`/`temperature`/`maxOutputTokens`) via the runtime's optional
|
|
1006
|
-
* `applyModelOptions`. PRESET-014 re-applies the `persona` group via the host context's optional
|
|
1007
|
-
* `applyPersona` seam. PRESET-015 re-applies the command-module selection group via the host
|
|
1008
|
-
* context's optional `applyCommandModuleSelection` seam. PRESET-016 toggles the parallel-subagents
|
|
1009
|
-
* runtime gate via the runtime's optional `setParallelSubagentsEnabled` seam. PRESET-017 toggles
|
|
1010
|
-
* the verify-before-done self-verification section via the host context's optional
|
|
1011
|
-
* `applySelfVerification` seam. Groups absent from `options` are left untouched and reported under
|
|
1012
|
-
* `skipped`.
|
|
1013
|
-
*/
|
|
1014
|
-
declare function applyPresetToSession(context: ICommandHostContext, presetId: string, options: IPresetApplicationOptions): IPresetApplicationResult;
|
|
1015
|
-
//#endregion
|
|
1016
|
-
//#region src/config/settings-io.d.ts
|
|
1017
|
-
type TSettingsData = Record<string, TUniversalValue>;
|
|
1018
|
-
declare function getUserSettingsPath(): string;
|
|
1019
|
-
type TSettingsScope = 'user' | 'project-local';
|
|
1020
|
-
declare function resolveSettingsPathForScope(cwd: string, scope: TSettingsScope | undefined): string;
|
|
1021
|
-
/**
|
|
1022
|
-
* CLI-069: missing file → empty defaults (non-error); an EXISTING file that
|
|
1023
|
-
* fails to parse throws SettingsParseError — no warn-and-continue masking.
|
|
1024
|
-
*/
|
|
1025
|
-
declare function readSettings(path: string): TSettingsData;
|
|
1026
|
-
declare function writeSettings(path: string, settings: TSettingsData): void;
|
|
1027
|
-
declare function updateModelInSettings(settingsPath: string, modelId: string): void;
|
|
1028
|
-
declare function deleteSettings(path: string): boolean;
|
|
1029
|
-
//#endregion
|
|
1030
|
-
//#region src/command-api/statusline/statusline-command-api.d.ts
|
|
1031
|
-
declare const STATUSLINE_COMMAND_DESCRIPTION = "Configure TUI status-line visibility and fields such as model, context, tokens, session, and git branch.";
|
|
1032
|
-
declare const STATUSLINE_COMMAND_ARGUMENT_HINT = "on | off | reset | git on | git off";
|
|
1033
|
-
declare const DEFAULT_STATUS_LINE_COMMAND_SETTINGS: Readonly<IStatusLineCommandSettings>;
|
|
1034
|
-
declare function buildStatusLineCommandSubcommands(source?: string): ICommand[];
|
|
1035
|
-
declare function isStatusLineCommandSettingsPatch(value: Record<string, TUniversalValue>): value is TStatusLineCommandSettingsPatch;
|
|
1036
|
-
declare function readStatusLineSettings(settings: TSettingsData): IStatusLineCommandSettings;
|
|
1037
|
-
declare function applyStatusLineSettings(settingsPath: string, patch: TStatusLineCommandSettingsPatch): IStatusLineCommandSettings;
|
|
1038
|
-
//#endregion
|
|
1039
|
-
//#region src/command-api/session/session-command-api.d.ts
|
|
1040
|
-
declare const CLEAR_COMMAND_DESCRIPTION = "Clear conversation history";
|
|
1041
|
-
declare const RENAME_COMMAND_DESCRIPTION = "Rename the current session";
|
|
1042
|
-
declare const RENAME_COMMAND_USAGE = "Usage: rename <name>";
|
|
1043
|
-
declare const RESUME_COMMAND_DESCRIPTION = "Resume a previous session";
|
|
1044
|
-
declare const COST_COMMAND_DESCRIPTION = "Show session token usage and estimated cost. /cost budget <amount> sets a monthly budget.";
|
|
1045
|
-
declare const VALIDATE_SESSION_COMMAND_DESCRIPTION = "Validate current session replay log";
|
|
1046
|
-
declare const EXIT_COMMAND_DESCRIPTION = "Exit CLI";
|
|
1047
|
-
interface ICommandSessionInfo {
|
|
1048
|
-
sessionId: string;
|
|
1049
|
-
messageCount: number;
|
|
1050
|
-
}
|
|
1051
|
-
declare function clearConversationHistory(context: ICommandHostContext): void;
|
|
1052
|
-
declare function parseSessionNameArgument(args: string): string | undefined;
|
|
1053
|
-
declare function createSessionRenamedEffect(name: string): TCommandEffect;
|
|
1054
|
-
declare function createSessionPickerRequestedEffect(): TCommandEffect;
|
|
1055
|
-
declare function createSessionExitRequestedEffect(): TCommandEffect;
|
|
1056
|
-
declare function readCommandSessionInfo(context: ICommandHostContext): ICommandSessionInfo;
|
|
1057
|
-
declare function validateCommandSessionReplayLog(context: ICommandHostContext): ICommandSessionReplayValidationReport;
|
|
1058
|
-
declare function formatCommandSessionReplayValidationReport(report: ICommandSessionReplayValidationReport): string;
|
|
1059
|
-
//#endregion
|
|
1060
|
-
//#region src/command-api/checkpoint/rewind-command-api.d.ts
|
|
1061
|
-
declare const REWIND_COMMAND_DESCRIPTION = "List, inspect, restore, or rollback edit checkpoints.";
|
|
1062
|
-
declare const REWIND_COMMAND_ARGUMENT_HINT = "list | inspect CHECKPOINT_ID | restore CHECKPOINT_ID | code CHECKPOINT_ID | rollback CHECKPOINT_ID";
|
|
1063
|
-
declare function buildRewindCommandSubcommands(source?: string): ICommand[];
|
|
1064
|
-
declare function listCommandEditCheckpoints(context: ICommandHostContext): readonly IEditCheckpointSummary[];
|
|
1065
|
-
declare function inspectCommandEditCheckpoint(context: ICommandHostContext, checkpointId: string): IEditCheckpointInspection;
|
|
1066
|
-
declare function restoreCommandEditCheckpoint(context: ICommandHostContext, checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
1067
|
-
declare function rollbackCommandEditCheckpoint(context: ICommandHostContext, checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
1068
|
-
//#endregion
|
|
1069
|
-
//#region src/command-api/memory/memory-command-api.d.ts
|
|
1070
|
-
declare const MEMORY_COMMAND_DESCRIPTION = "Project memory command. Use it to inspect project memory when stored context may help, save durable preferences, project conventions, feedback, or references worth reusing across sessions, review pending candidates, and report memory provenance. Do not store secrets, credentials, or transient facts.";
|
|
1071
|
-
declare const MEMORY_COMMAND_ARGUMENT_HINT = "list | show [topic] | add <user|feedback|project|reference> <topic> <text> | pending | approve <id> | reject <id> | used";
|
|
1072
|
-
declare const MEMORY_COMMAND_USAGE = "Usage: memory list | memory show [topic] | memory add <user|feedback|project|reference> <topic> <text> | memory pending | memory approve <id> | memory reject <id> | memory used";
|
|
1073
|
-
interface ICommandProjectMemoryStore {
|
|
1074
|
-
list(): IProjectMemorySummary;
|
|
1075
|
-
loadStartupMemory(): IStartupMemory;
|
|
1076
|
-
readTopic(topic: string): string;
|
|
1077
|
-
append(input: IAppendMemoryInput): IAppendMemoryResult;
|
|
1078
|
-
}
|
|
1079
|
-
interface ICommandPendingMemoryStore {
|
|
1080
|
-
get(id: string): IMemoryPendingRecord | undefined;
|
|
1081
|
-
list(status?: TMemoryCandidateStatus): IMemoryPendingRecord[];
|
|
1082
|
-
mark(id: string, status: TMemoryCandidateStatus, reason: string): IMemoryPendingRecord;
|
|
1083
|
-
upsert(candidate: IMemoryCandidate, status: TMemoryCandidateStatus, reason: string): void;
|
|
1084
|
-
}
|
|
1085
|
-
interface ICommandMemoryStores {
|
|
1086
|
-
project: ICommandProjectMemoryStore;
|
|
1087
|
-
pending: ICommandPendingMemoryStore;
|
|
1088
|
-
}
|
|
1089
|
-
declare function buildMemoryCommandSubcommands(source?: string): ICommand[];
|
|
1090
|
-
declare function createCommandProjectMemoryStore(cwd: string, now?: () => Date): ICommandProjectMemoryStore;
|
|
1091
|
-
declare function createCommandPendingMemoryStore(cwd: string, now?: () => Date): ICommandPendingMemoryStore;
|
|
1092
|
-
declare function createCommandMemoryStores(context: ICommandHostContext, now?: () => Date): ICommandMemoryStores;
|
|
1093
|
-
declare function isCommandMemoryType(value: string): value is TMemoryType;
|
|
1094
|
-
declare function hasSensitiveCommandMemoryContent(text: string): boolean;
|
|
1095
|
-
declare function listCommandUsedMemoryReferences(context: ICommandHostContext): readonly IMemoryReference[];
|
|
1096
|
-
declare function recordCommandMemoryEvent(context: ICommandHostContext, event: Omit<IMemoryEvent, 'at'>, now?: () => Date): void;
|
|
1097
|
-
//#endregion
|
|
1098
|
-
//#region src/commands/command-registry.d.ts
|
|
1099
|
-
/** Aggregates commands from multiple sources */
|
|
1100
|
-
declare class CommandRegistry {
|
|
1101
|
-
private sources;
|
|
1102
|
-
addSource(source: ICommandSource): void;
|
|
1103
|
-
replaceSource(name: string, source?: ICommandSource): void;
|
|
1104
|
-
addModule(module: ICommandModule): void;
|
|
1105
|
-
/** Get all commands, optionally filtered by prefix */
|
|
1106
|
-
getCommands(filter?: string): ICommand[];
|
|
1107
|
-
/** Resolve a short name to its fully qualified plugin:name form */
|
|
1108
|
-
resolveQualifiedName(shortName: string): string | null;
|
|
1109
|
-
/** Get subcommands for a specific command */
|
|
1110
|
-
getSubcommands(commandName: string): ICommand[];
|
|
1111
|
-
getCapabilityDescriptors(): ICapabilityDescriptor[];
|
|
1112
|
-
}
|
|
1113
|
-
//#endregion
|
|
1114
|
-
//#region src/commands/builtin-source.d.ts
|
|
1115
|
-
/** Command source for SDK-owned built-in commands. */
|
|
1116
|
-
declare class BuiltinCommandSource implements ICommandSource {
|
|
1117
|
-
readonly name = "builtin";
|
|
1118
|
-
private readonly commands;
|
|
1119
|
-
constructor(systemCommands?: readonly ISystemCommand[]);
|
|
1120
|
-
getCommands(): ICommand[];
|
|
1121
|
-
}
|
|
1122
|
-
declare function createBuiltinCommandModule(): ICommandModule;
|
|
1123
|
-
//#endregion
|
|
1124
|
-
//#region src/commands/skill-source.d.ts
|
|
1125
|
-
interface IFrontmatter {
|
|
1126
|
-
name?: string;
|
|
1127
|
-
description?: string;
|
|
1128
|
-
argumentHint?: string;
|
|
1129
|
-
disableModelInvocation?: boolean;
|
|
1130
|
-
userInvocable?: boolean;
|
|
1131
|
-
allowedTools?: string[];
|
|
1132
|
-
model?: string;
|
|
1133
|
-
effort?: string;
|
|
1134
|
-
context?: string;
|
|
1135
|
-
agent?: string;
|
|
1136
|
-
}
|
|
1137
|
-
/** Parse YAML-like frontmatter between --- markers */
|
|
1138
|
-
declare function parseFrontmatter(content: string): IFrontmatter | null;
|
|
1139
|
-
/** Command source that discovers skills from multiple directories */
|
|
1140
|
-
declare class SkillCommandSource implements ICommandSource {
|
|
1141
|
-
readonly name = "skill";
|
|
1142
|
-
private readonly cwd;
|
|
1143
|
-
private readonly home;
|
|
1144
|
-
private readonly fs;
|
|
1145
|
-
private cachedCommands;
|
|
1146
|
-
constructor(cwd: string, home?: string, fs?: IFileSystem);
|
|
1147
|
-
getCommands(): ICommand[];
|
|
1148
|
-
getModelInvocableSkills(): ICommand[];
|
|
1149
|
-
getUserInvocableSkills(): ICommand[];
|
|
1150
|
-
}
|
|
1151
|
-
//#endregion
|
|
1152
|
-
//#region src/plugins/marketplace-types.d.ts
|
|
1153
|
-
/**
|
|
1154
|
-
* Shared types for marketplace client and registry.
|
|
1155
|
-
*/
|
|
1156
|
-
/** Source specification for a marketplace. */
|
|
1157
|
-
type TMarketplaceSource = {
|
|
1158
|
-
type: 'github';
|
|
1159
|
-
repo: string;
|
|
1160
|
-
ref?: string;
|
|
1161
|
-
} | {
|
|
1162
|
-
type: 'git';
|
|
1163
|
-
url: string;
|
|
1164
|
-
ref?: string;
|
|
1165
|
-
} | {
|
|
1166
|
-
type: 'local';
|
|
1167
|
-
path: string;
|
|
1168
|
-
} | {
|
|
1169
|
-
type: 'url';
|
|
1170
|
-
url: string;
|
|
1171
|
-
};
|
|
1172
|
-
/** A single plugin entry in a marketplace manifest. */
|
|
1173
|
-
interface IMarketplacePluginEntry {
|
|
1174
|
-
name: string;
|
|
1175
|
-
title: string;
|
|
1176
|
-
description: string;
|
|
1177
|
-
source: string | {
|
|
1178
|
-
type: 'github';
|
|
1179
|
-
repo: string;
|
|
1180
|
-
} | {
|
|
1181
|
-
type: 'url';
|
|
1182
|
-
url: string;
|
|
1183
|
-
};
|
|
1184
|
-
tags: string[];
|
|
1185
|
-
}
|
|
1186
|
-
/** Manifest format read from `.claude-plugin/marketplace.json`. */
|
|
1187
|
-
interface IMarketplaceManifest {
|
|
1188
|
-
name: string;
|
|
1189
|
-
version: string;
|
|
1190
|
-
plugins: IMarketplacePluginEntry[];
|
|
1191
|
-
}
|
|
1192
|
-
/** Entry in known_marketplaces.json. */
|
|
1193
|
-
interface IKnownMarketplaceEntry {
|
|
1194
|
-
source: TMarketplaceSource;
|
|
1195
|
-
installLocation: string;
|
|
1196
|
-
lastUpdated: string;
|
|
1197
|
-
}
|
|
1198
|
-
/** Shape of known_marketplaces.json. */
|
|
1199
|
-
type TKnownMarketplacesRegistry = Record<string, IKnownMarketplaceEntry>;
|
|
1200
|
-
/** Exec function type for running shell commands. Injected at composition root. */
|
|
1201
|
-
type TExecFn = (command: string, options: {
|
|
1202
|
-
timeout: number;
|
|
1203
|
-
stdio?: string;
|
|
1204
|
-
}) => string | Buffer;
|
|
1205
|
-
/** Options for constructing a MarketplaceClient. */
|
|
1206
|
-
interface IMarketplaceClientOptions {
|
|
1207
|
-
/** Base plugins directory (e.g., `~/.robota/plugins`). */
|
|
1208
|
-
pluginsDir: string;
|
|
1209
|
-
/** Shell exec adapter — must be provided at composition root (e.g., execSync). */
|
|
1210
|
-
exec: TExecFn;
|
|
1211
|
-
}
|
|
1212
|
-
//#endregion
|
|
1213
|
-
//#region src/plugins/plugin-settings-store.d.ts
|
|
1214
|
-
/** Persisted marketplace source entry. */
|
|
1215
|
-
interface IPersistedMarketplaceSource {
|
|
1216
|
-
source: TMarketplaceSource;
|
|
1217
|
-
}
|
|
1218
|
-
/** Shape of the plugin-related keys in settings.json. */
|
|
1219
|
-
interface IPluginSettings {
|
|
1220
|
-
enabledPlugins: Record<string, boolean>;
|
|
1221
|
-
extraKnownMarketplaces: Record<string, IPersistedMarketplaceSource>;
|
|
1222
|
-
}
|
|
1223
|
-
/** Centralized settings store for plugin configuration. */
|
|
1224
|
-
declare class PluginSettingsStore {
|
|
1225
|
-
private readonly settingsPath;
|
|
1226
|
-
private readonly fs;
|
|
1227
|
-
constructor(settingsPath: string, fs?: IFileSystem);
|
|
1228
|
-
/** Read the full settings file from disk. */
|
|
1229
|
-
private readAll;
|
|
1230
|
-
/** Write the full settings file to disk. */
|
|
1231
|
-
private writeAll;
|
|
1232
|
-
/** Get the enabledPlugins map. */
|
|
1233
|
-
getEnabledPlugins(): Record<string, boolean>;
|
|
1234
|
-
/** Set a single plugin's enabled state. */
|
|
1235
|
-
setPluginEnabled(pluginId: string, enabled: boolean): void;
|
|
1236
|
-
/** Remove a plugin from enabledPlugins. */
|
|
1237
|
-
removePluginEntry(pluginId: string): void;
|
|
1238
|
-
/** Get all persisted marketplace sources. */
|
|
1239
|
-
getMarketplaceSources(): Record<string, IPersistedMarketplaceSource>;
|
|
1240
|
-
/** Add or update a marketplace source. */
|
|
1241
|
-
setMarketplaceSource(name: string, source: TMarketplaceSource): void;
|
|
1242
|
-
/** Remove a marketplace source. */
|
|
1243
|
-
removeMarketplaceSource(name: string): void;
|
|
1244
|
-
private getEnabledPluginsFrom;
|
|
1245
|
-
private getMarketplaceSourcesFrom;
|
|
1246
|
-
}
|
|
1247
|
-
//#endregion
|
|
1248
|
-
//#region src/plugins/bundle-plugin-types.d.ts
|
|
1249
|
-
/**
|
|
1250
|
-
* Types for the BundlePlugin system.
|
|
1251
|
-
*
|
|
1252
|
-
* A BundlePlugin is a directory-based plugin package that bundles
|
|
1253
|
-
* skills, hooks, agents, and MCP server configurations.
|
|
1254
|
-
*/
|
|
1255
|
-
/** Feature flags indicating what a bundle plugin provides. */
|
|
1256
|
-
interface IBundlePluginFeatures {
|
|
1257
|
-
commands?: boolean;
|
|
1258
|
-
agents?: boolean;
|
|
1259
|
-
skills?: boolean;
|
|
1260
|
-
hooks?: boolean;
|
|
1261
|
-
mcp?: boolean;
|
|
1262
|
-
}
|
|
1263
|
-
/** Manifest read from `.claude-plugin/plugin.json`. */
|
|
1264
|
-
interface IBundlePluginManifest {
|
|
1265
|
-
name: string;
|
|
1266
|
-
version: string;
|
|
1267
|
-
description: string;
|
|
1268
|
-
features: IBundlePluginFeatures;
|
|
1269
|
-
}
|
|
1270
|
-
/** A skill loaded from a bundle plugin's `skills/` directory. */
|
|
1271
|
-
interface IBundleSkill {
|
|
1272
|
-
name: string;
|
|
1273
|
-
description: string;
|
|
1274
|
-
skillContent: string;
|
|
1275
|
-
[key: string]: unknown;
|
|
1276
|
-
}
|
|
1277
|
-
/** A fully loaded bundle plugin with all its assets. */
|
|
1278
|
-
interface ILoadedBundlePlugin {
|
|
1279
|
-
manifest: IBundlePluginManifest;
|
|
1280
|
-
skills: IBundleSkill[];
|
|
1281
|
-
commands: IBundleSkill[];
|
|
1282
|
-
hooks: Record<string, unknown>;
|
|
1283
|
-
mcpConfig?: unknown;
|
|
1284
|
-
agents: string[];
|
|
1285
|
-
pluginDir: string;
|
|
1286
|
-
}
|
|
1287
|
-
/** Map of plugin identifiers to enabled/disabled state. */
|
|
1288
|
-
type TEnabledPlugins = Record<string, boolean>;
|
|
1289
|
-
//#endregion
|
|
1290
|
-
//#region src/plugins/bundle-plugin-loader.d.ts
|
|
1291
|
-
/** Loader for directory-based bundle plugins from the cache directory. */
|
|
1292
|
-
declare class BundlePluginLoader {
|
|
1293
|
-
private readonly pluginsDir;
|
|
1294
|
-
private readonly enabledPlugins;
|
|
1295
|
-
private readonly fs;
|
|
1296
|
-
constructor(pluginsDir: string, enabledPlugins?: TEnabledPlugins, fs?: IFileSystem);
|
|
1297
|
-
/** Load all discovered and enabled bundle plugins (sync). */
|
|
1298
|
-
loadPluginsSync(): ILoadedBundlePlugin[];
|
|
1299
|
-
/** Load all discovered and enabled bundle plugins (async wrapper). */
|
|
1300
|
-
loadAll(): Promise<ILoadedBundlePlugin[]>;
|
|
1301
|
-
/**
|
|
1302
|
-
* Discover and load plugins from the cache directory.
|
|
1303
|
-
*
|
|
1304
|
-
* Directory structure: `<pluginsDir>/cache/<marketplace>/<plugin>/<version>/`
|
|
1305
|
-
* For each marketplace/plugin pair, the latest version (lexicographically last) is loaded.
|
|
1306
|
-
*/
|
|
1307
|
-
private discoverAndLoad;
|
|
1308
|
-
/** Read and validate a plugin.json manifest. Returns null if the manifest structure is invalid. */
|
|
1309
|
-
private readManifest;
|
|
1310
|
-
/**
|
|
1311
|
-
* Check if a plugin is explicitly disabled.
|
|
1312
|
-
* Checks both `name@marketplace` and `name` keys.
|
|
1313
|
-
* Plugins not listed in enabledPlugins are enabled by default.
|
|
1314
|
-
*/
|
|
1315
|
-
private isDisabled;
|
|
1316
|
-
/** Load a single plugin's skills, hooks, agents, and MCP config. */
|
|
1317
|
-
private loadPlugin;
|
|
1318
|
-
/** Load skills from the plugin's skills/ directory. */
|
|
1319
|
-
private loadSkills;
|
|
1320
|
-
/** Load commands from the plugin's commands/ directory (flat .md files). */
|
|
1321
|
-
private loadCommands;
|
|
1322
|
-
/** Load hooks from hooks/hooks.json if present. */
|
|
1323
|
-
private loadHooks;
|
|
1324
|
-
/** Load MCP server configuration from `.mcp.json` at the plugin root if present. */
|
|
1325
|
-
private loadMcpConfig;
|
|
1326
|
-
/** Load agent definitions from agents/ directory if present. */
|
|
1327
|
-
private loadAgents;
|
|
1328
|
-
}
|
|
1329
|
-
//#endregion
|
|
1330
|
-
//#region src/plugins/marketplace-client.d.ts
|
|
1331
|
-
/** Manages marketplace registries via shallow git clones. */
|
|
1332
|
-
declare class MarketplaceClient {
|
|
1333
|
-
private readonly pluginsDir;
|
|
1334
|
-
private readonly exec;
|
|
1335
|
-
private readonly marketplacesDir;
|
|
1336
|
-
private readonly registryPath;
|
|
1337
|
-
private readonly fs;
|
|
1338
|
-
constructor(options: IMarketplaceClientOptions & {
|
|
1339
|
-
fs?: IFileSystem;
|
|
1340
|
-
});
|
|
1341
|
-
/**
|
|
1342
|
-
* Add a marketplace by cloning its repository.
|
|
1343
|
-
*
|
|
1344
|
-
* 1. Shallow git clone (`--depth 1`) to `marketplaces/<name>/`.
|
|
1345
|
-
* 2. Read `.claude-plugin/marketplace.json` for the `name` field.
|
|
1346
|
-
* 3. Register in `known_marketplaces.json`.
|
|
1347
|
-
*
|
|
1348
|
-
* Returns the registered marketplace name from the manifest.
|
|
1349
|
-
*/
|
|
1350
|
-
addMarketplace(source: TMarketplaceSource): string;
|
|
1351
|
-
/**
|
|
1352
|
-
* Remove a marketplace.
|
|
1353
|
-
* Uninstalls all plugins from that marketplace, then deletes the clone directory
|
|
1354
|
-
* and removes from the registry.
|
|
1355
|
-
*/
|
|
1356
|
-
removeMarketplace(name: string): void;
|
|
1357
|
-
/**
|
|
1358
|
-
* Update a marketplace by running git pull on its clone.
|
|
1359
|
-
* The manifest is re-read from disk on demand (via fetchManifest), so the
|
|
1360
|
-
* updated manifest is automatically available after pull.
|
|
1361
|
-
*/
|
|
1362
|
-
updateMarketplace(name: string): void;
|
|
1363
|
-
/** List all registered marketplaces. */
|
|
1364
|
-
listMarketplaces(): Array<{
|
|
1365
|
-
name: string;
|
|
1366
|
-
source: TMarketplaceSource;
|
|
1367
|
-
lastUpdated: string;
|
|
1368
|
-
}>;
|
|
1369
|
-
/** Read the marketplace manifest from a registered marketplace's clone. */
|
|
1370
|
-
fetchManifest(marketplaceName: string): IMarketplaceManifest;
|
|
1371
|
-
/** Get the clone directory path for a registered marketplace. */
|
|
1372
|
-
getMarketplaceDir(name: string): string;
|
|
1373
|
-
/**
|
|
1374
|
-
* Get the current git SHA (first 12 chars) for a marketplace clone.
|
|
1375
|
-
* Used as a version identifier when plugins lack explicit versions.
|
|
1376
|
-
*/
|
|
1377
|
-
getMarketplaceSha(name: string): string;
|
|
1378
|
-
/** List all available plugins across all marketplaces. */
|
|
1379
|
-
listAvailablePlugins(): Array<IMarketplacePluginEntry & {
|
|
1380
|
-
marketplace: string;
|
|
1381
|
-
}>;
|
|
1382
|
-
/** Resolve a marketplace source to a git clone URL. */
|
|
1383
|
-
private resolveCloneUrl;
|
|
1384
|
-
/** Read and parse a marketplace.json from a file path. */
|
|
1385
|
-
private readManifestFromPath;
|
|
1386
|
-
}
|
|
1387
|
-
//#endregion
|
|
1388
|
-
//#region src/plugins/bundle-plugin-installer.d.ts
|
|
1389
|
-
/** Record of an installed plugin in installed_plugins.json. */
|
|
1390
|
-
interface IInstalledPluginRecord {
|
|
1391
|
-
pluginName: string;
|
|
1392
|
-
marketplace: string;
|
|
1393
|
-
version: string;
|
|
1394
|
-
installPath: string;
|
|
1395
|
-
installedAt: string;
|
|
1396
|
-
}
|
|
1397
|
-
/** Shape of installed_plugins.json. */
|
|
1398
|
-
type TInstalledPluginsRegistry = Record<string, IInstalledPluginRecord>;
|
|
1399
|
-
/** Options for constructing a BundlePluginInstaller. */
|
|
1400
|
-
interface IBundlePluginInstallerOptions {
|
|
1401
|
-
/** Base plugins directory (e.g., `~/.robota/plugins`). */
|
|
1402
|
-
pluginsDir: string;
|
|
1403
|
-
/** Shared settings store for enable/disable persistence. */
|
|
1404
|
-
settingsStore: PluginSettingsStore;
|
|
1405
|
-
/** MarketplaceClient for reading marketplace manifests. */
|
|
1406
|
-
marketplaceClient: MarketplaceClient;
|
|
1407
|
-
/** Shell exec adapter — must be provided at composition root (e.g., execSync). */
|
|
1408
|
-
exec: TExecFn;
|
|
1409
|
-
/** File system adapter for testability. */
|
|
1410
|
-
fs?: IFileSystem;
|
|
1411
|
-
}
|
|
1412
|
-
/** Installs, uninstalls, enables, and disables bundle plugins. */
|
|
1413
|
-
declare class BundlePluginInstaller {
|
|
1414
|
-
private readonly pluginsDir;
|
|
1415
|
-
private readonly cacheDir;
|
|
1416
|
-
private readonly registryPath;
|
|
1417
|
-
private readonly settingsStore;
|
|
1418
|
-
private readonly marketplaceClient;
|
|
1419
|
-
private readonly exec;
|
|
1420
|
-
private readonly fs;
|
|
1421
|
-
constructor(options: IBundlePluginInstallerOptions);
|
|
1422
|
-
/**
|
|
1423
|
-
* Install a plugin from a marketplace.
|
|
1424
|
-
*
|
|
1425
|
-
* 1. Read marketplace manifest to find the plugin entry.
|
|
1426
|
-
* 2. Resolve source (relative path, github, or url).
|
|
1427
|
-
* 3. Copy/clone to `cache/<marketplace>/<plugin>/<version>/`.
|
|
1428
|
-
* 4. Record in `installed_plugins.json`.
|
|
1429
|
-
*/
|
|
1430
|
-
install(pluginName: string, marketplaceName: string): Promise<void>;
|
|
1431
|
-
/**
|
|
1432
|
-
* Uninstall a plugin.
|
|
1433
|
-
* Removes from cache and from installed_plugins.json.
|
|
1434
|
-
*/
|
|
1435
|
-
uninstall(pluginId: string): Promise<void>;
|
|
1436
|
-
/** Enable a plugin by setting its enabledPlugins entry to true. */
|
|
1437
|
-
enable(pluginId: string): Promise<void>;
|
|
1438
|
-
/** Disable a plugin by setting its enabledPlugins entry to false. */
|
|
1439
|
-
disable(pluginId: string): Promise<void>;
|
|
1440
|
-
/** Get all installed plugins. */
|
|
1441
|
-
getInstalledPlugins(): TInstalledPluginsRegistry;
|
|
1442
|
-
/** Get plugins installed from a specific marketplace. */
|
|
1443
|
-
getPluginsByMarketplace(marketplaceName: string): IInstalledPluginRecord[];
|
|
1444
|
-
/** Resolve the version for a plugin entry. */
|
|
1445
|
-
private resolveVersion;
|
|
1446
|
-
/**
|
|
1447
|
-
* Normalize source object — Claude Code manifests use `source` key instead of `type`.
|
|
1448
|
-
* e.g., { source: "url", url: "..." } → { type: "url", url: "..." }
|
|
1449
|
-
*/
|
|
1450
|
-
private normalizeSource;
|
|
1451
|
-
/** Resolve the source and install the plugin. */
|
|
1452
|
-
private resolveAndInstall;
|
|
1453
|
-
/** Clone a git repository to the target directory. */
|
|
1454
|
-
private cloneToDir;
|
|
1455
|
-
/** Read the installed_plugins.json registry. */
|
|
1456
|
-
private readRegistry;
|
|
1457
|
-
/** Write the installed_plugins.json registry. */
|
|
1458
|
-
private writeRegistry;
|
|
1459
|
-
}
|
|
1460
|
-
//#endregion
|
|
1461
|
-
//#region src/commands/plugin-source.d.ts
|
|
1462
|
-
/**
|
|
1463
|
-
* Command source that discovers skills and commands from loaded BundlePlugins.
|
|
1464
|
-
*
|
|
1465
|
-
* - Skills: exposed as `/name` with `(plugin-name)` hint in description.
|
|
1466
|
-
* - Commands: exposed as `/plugin:command` (already namespaced by the loader).
|
|
1467
|
-
*/
|
|
1468
|
-
declare class PluginCommandSource implements ICommandSource {
|
|
1469
|
-
readonly name = "plugin";
|
|
1470
|
-
private readonly plugins;
|
|
1471
|
-
constructor(plugins: ILoadedBundlePlugin[]);
|
|
1472
|
-
getCommands(): ICommand[];
|
|
1473
|
-
}
|
|
1474
|
-
//#endregion
|
|
1475
|
-
//#region src/commands/system-command-executor.d.ts
|
|
1476
|
-
/** Registry for system commands. */
|
|
1477
|
-
declare class SystemCommandExecutor {
|
|
1478
|
-
private readonly commands;
|
|
1479
|
-
constructor(commands?: ISystemCommand[]);
|
|
1480
|
-
/** Register an additional command. */
|
|
1481
|
-
register(command: ISystemCommand): void;
|
|
1482
|
-
/** Replace the entire command set (used by live preset command-module re-selection — PRESET-015). */
|
|
1483
|
-
replaceCommands(commands: readonly ISystemCommand[]): void;
|
|
1484
|
-
/** Execute a command by name. Returns null if command not found. */
|
|
1485
|
-
execute(name: string, session: ICommandHostContext, args: string): Promise<ICommandResult | null>;
|
|
1486
|
-
getCommand(name: string): ISystemCommand | undefined;
|
|
1487
|
-
/** Resolve whether a command requires permission confirmation. */
|
|
1488
|
-
resolveRequiresPermission(command: ISystemCommand): boolean;
|
|
1489
|
-
executeCommand(command: ISystemCommand, session: ICommandHostContext, args: string): Promise<ICommandResult>;
|
|
1490
|
-
/** List all registered commands. */
|
|
1491
|
-
listCommands(): ISystemCommand[];
|
|
1492
|
-
listModelInvocableCommands(): ICapabilityDescriptor[];
|
|
1493
|
-
isModelInvocable(name: string): boolean;
|
|
1494
|
-
executeModelInvocable(name: string, session: ICommandHostContext, args: string): Promise<ICommandResult | null>;
|
|
1495
|
-
/** Check if a command exists. */
|
|
1496
|
-
hasCommand(name: string): boolean;
|
|
1497
|
-
}
|
|
1498
|
-
//#endregion
|
|
1499
|
-
//#region src/commands/system-command.d.ts
|
|
1500
|
-
/** Built-in system commands. */
|
|
1501
|
-
declare function createSystemCommands(): ISystemCommand[];
|
|
1502
|
-
//#endregion
|
|
1503
|
-
//#region src/utils/skill-prompt.d.ts
|
|
1504
|
-
/** Shell exec function for skill preprocessing — injected from composition root. */
|
|
1505
|
-
type TShellExecFn = (command: string) => string;
|
|
1506
|
-
/** Context variables available during skill prompt processing */
|
|
1507
|
-
interface SkillPromptContext {
|
|
1508
|
-
/** Current session ID — substituted for ${CLAUDE_SESSION_ID} */
|
|
1509
|
-
sessionId?: string;
|
|
1510
|
-
/** Directory containing SKILL.md — substituted for ${CLAUDE_SKILL_DIR} */
|
|
1511
|
-
skillDir?: string;
|
|
1512
|
-
}
|
|
1513
|
-
/**
|
|
1514
|
-
* Substitute variables in skill content.
|
|
1515
|
-
*
|
|
1516
|
-
* Supported variables:
|
|
1517
|
-
* - `$ARGUMENTS` — all arguments passed to the skill
|
|
1518
|
-
* - `$ARGUMENTS[N]` — argument by index (0-based)
|
|
1519
|
-
* - `$N` — shorthand for `$ARGUMENTS[N]` (single digit, 0-9)
|
|
1520
|
-
* - `${CLAUDE_SESSION_ID}` — current session ID
|
|
1521
|
-
* - `${CLAUDE_SKILL_DIR}` — directory containing SKILL.md
|
|
1522
|
-
*/
|
|
1523
|
-
declare function substituteVariables(content: string, args: string, context?: SkillPromptContext): string;
|
|
1524
|
-
/**
|
|
1525
|
-
* Preprocess shell commands in skill content.
|
|
1526
|
-
* Matches `` !`...` `` patterns and replaces them with command output.
|
|
1527
|
-
* If no exec function is provided, shell patterns are replaced with empty string.
|
|
1528
|
-
*/
|
|
1529
|
-
declare function preprocessShellCommands(content: string, exec?: TShellExecFn): Promise<string>;
|
|
1530
|
-
//#endregion
|
|
1531
|
-
//#region src/commands/skill-executor.d.ts
|
|
1532
|
-
/** Options passed to the fork execution callback */
|
|
1533
|
-
interface IForkExecutionOptions {
|
|
1534
|
-
/** Agent identity to use (e.g., 'Explore', 'Plan') */
|
|
1535
|
-
agent?: string;
|
|
1536
|
-
/** Tools the subagent is allowed to use */
|
|
1537
|
-
allowedTools?: string[];
|
|
1538
|
-
}
|
|
1539
|
-
/** Callback interface for skill execution infrastructure */
|
|
1540
|
-
interface ISkillExecutionCallbacks {
|
|
1541
|
-
/**
|
|
1542
|
-
* Run skill content in an isolated subagent session.
|
|
1543
|
-
* The content becomes the subagent's prompt.
|
|
1544
|
-
* Returns the subagent's response.
|
|
1545
|
-
*/
|
|
1546
|
-
runInFork?: (content: string, options: IForkExecutionOptions) => Promise<string>;
|
|
1547
|
-
/** Shell exec function for preprocessing `` !`cmd` `` patterns — injected from composition root. */
|
|
1548
|
-
shellExec?: TShellExecFn;
|
|
1549
|
-
}
|
|
1550
|
-
/** Result of skill execution */
|
|
1551
|
-
interface ISkillExecutionResult {
|
|
1552
|
-
/** Execution mode used */
|
|
1553
|
-
mode: 'fork' | 'inject';
|
|
1554
|
-
/** For inject mode: the prompt to send as a user message */
|
|
1555
|
-
prompt?: string;
|
|
1556
|
-
/** For fork mode: the subagent's response */
|
|
1557
|
-
result?: string;
|
|
1558
|
-
}
|
|
1559
|
-
/**
|
|
1560
|
-
* Execute a skill command.
|
|
1561
|
-
*
|
|
1562
|
-
* When `context: 'fork'`, the skill runs in an isolated subagent session
|
|
1563
|
-
* via the `runInFork` callback. Throws if `runInFork` is not available.
|
|
1564
|
-
* For non-fork skills, the content is returned as a prompt for injection
|
|
1565
|
-
* into the current session.
|
|
1566
|
-
*/
|
|
1567
|
-
declare function executeSkill(skill: ICommand, args: string, callbacks: ISkillExecutionCallbacks, context?: SkillPromptContext): Promise<ISkillExecutionResult>;
|
|
1568
|
-
//#endregion
|
|
1569
|
-
//#region src/commands/skill-activation-events.d.ts
|
|
1570
|
-
interface ISkillActivationHistoryData extends ISkillActivationEvent {
|
|
1571
|
-
readonly message: string;
|
|
1572
|
-
}
|
|
1573
|
-
//#endregion
|
|
1574
|
-
//#region src/interactive/interactive-session-background-tracker.d.ts
|
|
1575
|
-
interface IBackgroundTrackerState {
|
|
1576
|
-
tasks: IBackgroundTaskState[];
|
|
1577
|
-
taskEvents: TBackgroundTaskEvent[];
|
|
1578
|
-
groups: IBackgroundJobGroupState[];
|
|
1579
|
-
groupEvents: TBackgroundJobGroupEvent[];
|
|
1580
|
-
}
|
|
1581
|
-
declare class SessionBackgroundTaskTracker {
|
|
1582
|
-
private readonly getManager;
|
|
1583
|
-
private readonly onChanged;
|
|
1584
|
-
private readonly emitTaskEvent;
|
|
1585
|
-
private readonly emitGroupEvent;
|
|
1586
|
-
private readonly persistSession;
|
|
1587
|
-
private readonly onWake?;
|
|
1588
|
-
private readonly appendSystemNote?;
|
|
1589
|
-
private backgroundTasks;
|
|
1590
|
-
private backgroundTaskEvents;
|
|
1591
|
-
private backgroundJobGroups;
|
|
1592
|
-
private backgroundJobGroupEvents;
|
|
1593
|
-
private backgroundTaskUnsubscribe;
|
|
1594
|
-
private backgroundJobUnsubscribe;
|
|
1595
|
-
private backgroundJobOrchestrator;
|
|
1596
|
-
constructor(getManager: () => IBackgroundTaskManager | undefined, onChanged: (cause: TExecutionWorkspaceUpdateCause, entryId?: string) => void, emitTaskEvent: (event: TBackgroundTaskEvent) => void, emitGroupEvent: (event: TBackgroundJobGroupEvent) => void, persistSession: () => void, onWake?: ((instruction: string, taskId: string) => void) | undefined, appendSystemNote?: ((message: string) => void) | undefined);
|
|
1597
|
-
subscribe(session: Session): void;
|
|
1598
|
-
/**
|
|
1599
|
-
* FLOW-003: re-spawn restored sleeping scheduled wakes so they fire again after a resume,
|
|
1600
|
-
* and surface a one-time note for any whose fire time elapsed while the CLI was closed.
|
|
1601
|
-
*/
|
|
1602
|
-
private reArmRestoredSchedules;
|
|
1603
|
-
dispose(): void;
|
|
1604
|
-
restoreState(state: IBackgroundTrackerState): void;
|
|
1605
|
-
getState(): IBackgroundTrackerState;
|
|
1606
|
-
getManagerOrThrow(): IBackgroundTaskManager;
|
|
1607
|
-
getOrchestratorOrThrow(sessionId: string): BackgroundJobOrchestrator;
|
|
1608
|
-
cancelTask(taskId: string, reason?: string): Promise<void>;
|
|
1609
|
-
closeTask(taskId: string): Promise<void>;
|
|
1610
|
-
sendTask(taskId: string, input: IBackgroundTaskInput): Promise<void>;
|
|
1611
|
-
readTaskLog(taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
|
|
1612
|
-
listTasks(filter?: IBackgroundTaskListFilter): IBackgroundTaskState[];
|
|
1613
|
-
getTask(taskId: string): IBackgroundTaskState | undefined;
|
|
1614
|
-
createGroup(input: Omit<IBackgroundJobGroupCreateRequest, 'parentSessionId'>, sessionId: string): IBackgroundJobGroupState;
|
|
1615
|
-
listGroups(sessionId: string): IBackgroundJobGroupState[];
|
|
1616
|
-
getGroup(groupId: string, sessionId: string): IBackgroundJobGroupState | undefined;
|
|
1617
|
-
waitGroup(groupId: string, sessionId: string): Promise<IBackgroundJobGroupState>;
|
|
1618
|
-
readTaskDetail(entryId: string, taskId: string, cursor?: IExecutionDetailCursor): Promise<IExecutionDetailPage>;
|
|
1619
|
-
readGroupDetail(entryId: string, groupId: string, sessionId: string): IExecutionDetailPage;
|
|
1620
|
-
getTaskSnapshots(): IBackgroundTaskState[];
|
|
1621
|
-
getGroupSnapshots(): IBackgroundJobGroupState[];
|
|
1622
|
-
private subscribeGroupEvents;
|
|
1623
|
-
private recordTaskEvent;
|
|
1624
|
-
private recordGroupEvent;
|
|
1625
|
-
}
|
|
1626
|
-
//#endregion
|
|
1627
|
-
//#region src/tools/agent-tool.d.ts
|
|
1628
|
-
/** Dependencies injected at creation time via createAgentTool factory */
|
|
1629
|
-
interface IAgentToolDeps extends IInProcessSubagentRunnerDeps {
|
|
1630
|
-
cwd?: string;
|
|
1631
|
-
parentSessionId?: string;
|
|
1632
|
-
subagentDepth?: number;
|
|
1633
|
-
subagentManager?: ISubagentManager;
|
|
1634
|
-
backgroundTaskManager?: IBackgroundTaskManager;
|
|
1635
|
-
/** Optional custom agent registry for resolving non-built-in agent types. */
|
|
1636
|
-
customAgentRegistry?: (name: string) => IAgentDefinition | undefined;
|
|
1637
|
-
/** Model-visible and command-visible agent definitions available to this session. */
|
|
1638
|
-
agentDefinitions?: IAgentDefinition[];
|
|
1639
|
-
/** PRESET-016 — runtime gate; when present and returns false, subagent dispatch is refused. */
|
|
1640
|
-
isParallelSubagentsEnabled?: () => boolean;
|
|
1641
|
-
}
|
|
1642
|
-
/** Store agent tool deps keyed by a session (or any object). */
|
|
1643
|
-
declare function storeAgentToolDeps(key: object, deps: IAgentToolDeps): void;
|
|
1644
|
-
/** Retrieve agent tool deps for a given session key. */
|
|
1645
|
-
declare function retrieveAgentToolDeps(key: object): IAgentToolDeps | undefined;
|
|
1646
|
-
/**
|
|
1647
|
-
* Create an agent tool instance with deps captured in closure.
|
|
1648
|
-
*
|
|
1649
|
-
* Each session gets its own tool instance — no shared mutable state.
|
|
1650
|
-
*/
|
|
1651
|
-
declare function createAgentTool(deps: IAgentToolDeps): ReturnType<typeof createZodFunctionTool>;
|
|
1652
|
-
//#endregion
|
|
1653
|
-
//#region src/interactive/interactive-session-agent-jobs.d.ts
|
|
1654
|
-
interface ISpawnAgentJobInput {
|
|
1655
|
-
agentType: string;
|
|
1656
|
-
label: string;
|
|
1657
|
-
mode: 'foreground' | 'background';
|
|
1658
|
-
prompt: string;
|
|
1659
|
-
model?: string;
|
|
1660
|
-
isolation?: TBackgroundTaskIsolation;
|
|
1661
|
-
}
|
|
1662
|
-
//#endregion
|
|
1663
|
-
//#region src/context/prompt-file-reference-format.d.ts
|
|
1664
|
-
declare function buildPromptWithFileReferences(input: string, references: readonly IResolvedPromptFileReference[]): string;
|
|
1665
|
-
declare function hasBlockingPromptFileReferenceDiagnostics(diagnostics: readonly IPromptFileReferenceDiagnostic[]): boolean;
|
|
1666
|
-
declare function formatPromptFileReferenceDiagnostics(diagnostics: readonly IPromptFileReferenceDiagnostic[]): string;
|
|
1667
|
-
declare function toPromptFileReferenceRecords(references: readonly IResolvedPromptFileReference[]): IPromptFileReferenceRecord[];
|
|
1668
|
-
declare function createPromptFileReferenceHistoryEntry(references: readonly IResolvedPromptFileReference[]): IHistoryEntry<IPromptFileReferenceHistoryData>;
|
|
1669
|
-
//#endregion
|
|
1670
|
-
//#region src/context/prompt-file-reference-parser.d.ts
|
|
1671
|
-
declare function parsePromptFileReferences(input: string): IPromptFileReferenceToken[];
|
|
1672
|
-
//#endregion
|
|
1673
|
-
//#region src/context/prompt-file-reference-resolver.d.ts
|
|
1674
|
-
declare function resolvePromptFileReferences(input: string, options: IPromptFileReferenceResolveOptions): Promise<IResolvedPromptFileReferences>;
|
|
1675
|
-
declare function resolvePromptFileReferencePaths(referencePaths: readonly string[], options: IPromptFileReferenceResolveOptions): Promise<IResolvedPromptFileReferences>;
|
|
1676
|
-
//#endregion
|
|
1677
|
-
//#region src/interactive/interactive-session-history-tracker.d.ts
|
|
1678
|
-
interface IHistoryTrackerState {
|
|
1679
|
-
history: IHistoryEntry[];
|
|
1680
|
-
memoryEvents: IMemoryEvent[];
|
|
1681
|
-
usedMemoryReferences: IMemoryReference[];
|
|
1682
|
-
contextReferences: IContextReferenceItem[];
|
|
1683
|
-
skillActivationEvents: ISkillActivationEvent[];
|
|
1684
|
-
}
|
|
1685
|
-
declare class SessionHistoryTracker {
|
|
1686
|
-
private readonly cwd;
|
|
1687
|
-
private readonly getSessionId;
|
|
1688
|
-
private readonly getExecuting;
|
|
1689
|
-
private readonly persistSession;
|
|
1690
|
-
private readonly emitSkillActivation;
|
|
1691
|
-
private readonly emitMemoryEvent;
|
|
1692
|
-
private history;
|
|
1693
|
-
private editCheckpointStore;
|
|
1694
|
-
private memoryEvents;
|
|
1695
|
-
private usedMemoryReferences;
|
|
1696
|
-
private contextReferences;
|
|
1697
|
-
private systemContextReferences;
|
|
1698
|
-
private skillActivationEvents;
|
|
1699
|
-
constructor(cwd: string, getSessionId: () => string, getExecuting: () => boolean, persistSession: () => void, emitSkillActivation: (event: ISkillActivationEvent) => void, emitMemoryEvent: (event: IMemoryEvent) => void, editCheckpointStore?: EditCheckpointStore | null);
|
|
1700
|
-
restoreState(state: IHistoryTrackerState): void;
|
|
1701
|
-
getState(): IHistoryTrackerState;
|
|
1702
|
-
append(entry: IHistoryEntry): void;
|
|
1703
|
-
getHistory(): IHistoryEntry[];
|
|
1704
|
-
clearHistory(): void;
|
|
1705
|
-
resetUsedMemoryReferences(): void;
|
|
1706
|
-
recordContextReferenceUsage(records: readonly IPromptFileReferenceRecord[]): void;
|
|
1707
|
-
recordPromptContextReferences(records: readonly IPromptFileReferenceRecord[]): void;
|
|
1708
|
-
listEditCheckpoints(): IEditCheckpointSummary[];
|
|
1709
|
-
inspectEditCheckpoint(checkpointId: string): IEditCheckpointInspection;
|
|
1710
|
-
restoreEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
1711
|
-
rollbackEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
1712
|
-
beginEditCheckpointTurn(prompt: string): Promise<void>;
|
|
1713
|
-
finalizeEditCheckpointTurn(): Promise<void>;
|
|
1714
|
-
setEditCheckpointStore(store: EditCheckpointStore): void;
|
|
1715
|
-
getUsedMemoryReferences(): IMemoryReference[];
|
|
1716
|
-
recordMemoryEvent(event: IMemoryEvent): void;
|
|
1717
|
-
recordSystemContextFiles(entries: readonly IContextFileEntry[]): void;
|
|
1718
|
-
listContextReferences(): IContextReferenceItem[];
|
|
1719
|
-
listInjectionContextReferences(): IContextReferenceItem[];
|
|
1720
|
-
addContextReference(path: string): Promise<IContextReferenceAddResult>;
|
|
1721
|
-
removeContextReference(path: string): IContextReferenceRemoveResult;
|
|
1722
|
-
clearContextReferences(): IContextReferenceClearResult;
|
|
1723
|
-
getSkillActivationEvents(): ISkillActivationEvent[];
|
|
1724
|
-
recordSkillActivationEvent(event: ISkillActivationEvent, appendHistory: boolean): void;
|
|
1725
|
-
private getCheckpointStore;
|
|
1726
|
-
}
|
|
1727
|
-
//#endregion
|
|
1728
|
-
//#region src/interactive/session-persistence.d.ts
|
|
1729
|
-
declare function createProjectSessionStore(cwd: string, fs?: IFileSystem): IInteractiveSessionStore;
|
|
1730
|
-
declare function listResumableSessionSummaries(sessionStore: IInteractiveSessionStore | undefined, cwd: string): IResumableSessionSummary[];
|
|
1731
|
-
declare function resolveLatestSessionId(sessionStore: IInteractiveSessionStore | undefined, cwd: string): string | undefined;
|
|
1732
|
-
declare function resolveSessionIdByIdOrName(sessionStore: IInteractiveSessionStore | undefined, idOrName: string): string | undefined;
|
|
1733
|
-
//#endregion
|
|
1734
|
-
//#region src/context/project-detector.d.ts
|
|
1735
|
-
type TProjectType = 'node' | 'python' | 'rust' | 'go' | 'unknown';
|
|
1736
|
-
type TPackageManager = 'pnpm' | 'yarn' | 'npm' | 'bun';
|
|
1737
|
-
type TLanguage = 'typescript' | 'javascript' | 'python' | 'rust' | 'go' | 'unknown';
|
|
1738
|
-
interface IProjectInfo {
|
|
1739
|
-
type: TProjectType;
|
|
1740
|
-
name?: string;
|
|
1741
|
-
packageManager?: TPackageManager;
|
|
1742
|
-
language: TLanguage;
|
|
1743
|
-
}
|
|
1744
|
-
//#endregion
|
|
1745
|
-
//#region src/context/system-prompt-builder.d.ts
|
|
1746
|
-
interface ISystemPromptParams {
|
|
1747
|
-
/**
|
|
1748
|
-
* Preset persona block (portable personality/behaviour). When set and non-blank it is
|
|
1749
|
-
* composed as a `source: 'persona'` section with priority 5; empty/undefined adds no section.
|
|
1750
|
-
*/
|
|
1751
|
-
persona?: string;
|
|
1752
|
-
/**
|
|
1753
|
-
* PRESET-017: when true, a concise verify-before-done directive is composed as a
|
|
1754
|
-
* `source: 'self-verification'` section with priority 6; false/undefined adds no section.
|
|
1755
|
-
*/
|
|
1756
|
-
selfVerification?: boolean;
|
|
1757
|
-
/** Concatenated AGENTS.md content (may be empty string) */
|
|
1758
|
-
agentsMd: string;
|
|
1759
|
-
/** Concatenated CLAUDE.md content (may be empty string) */
|
|
1760
|
-
claudeMd: string;
|
|
1761
|
-
/** Startup project memory index loaded from .robota/memory/MEMORY.md */
|
|
1762
|
-
memoryMd?: string;
|
|
1763
|
-
/** Formatted active task context loaded from .agents/tasks/*.md */
|
|
1764
|
-
taskContext?: string;
|
|
1765
|
-
/** Human-readable tool descriptions, one per entry */
|
|
1766
|
-
toolDescriptions: string[];
|
|
1767
|
-
/** Active permission mode — the value the permission gate enforces */
|
|
1768
|
-
permissionMode: TPermissionMode;
|
|
1769
|
-
/** Detected project metadata */
|
|
1770
|
-
projectInfo: IProjectInfo;
|
|
1771
|
-
/** Current working directory */
|
|
1772
|
-
cwd?: string;
|
|
1773
|
-
/** Response language code (e.g., "ko", "en"). If set, AI must respond in this language. */
|
|
1774
|
-
language?: string;
|
|
1775
|
-
/** Discovered skills to expose in the system prompt */
|
|
1776
|
-
skills?: Array<{
|
|
1777
|
-
name: string;
|
|
1778
|
-
description: string;
|
|
1779
|
-
disableModelInvocation?: boolean;
|
|
1780
|
-
}>;
|
|
1781
|
-
/** Discovered agents to expose in the system prompt */
|
|
1782
|
-
agents?: Array<{
|
|
1783
|
-
name: string;
|
|
1784
|
-
description: string;
|
|
1785
|
-
}>;
|
|
1786
|
-
/** Command descriptors to expose to the model */
|
|
1787
|
-
commandDescriptors?: ICapabilityDescriptor[];
|
|
1788
|
-
}
|
|
1789
|
-
//#endregion
|
|
1790
|
-
//#region src/hooks/agent-executor.d.ts
|
|
1791
|
-
/** A minimal session interface for running a prompt. */
|
|
1792
|
-
interface IAgentSession {
|
|
1793
|
-
run(prompt: string): Promise<string>;
|
|
1794
|
-
}
|
|
1795
|
-
/** Factory that creates a session instance with the given options. */
|
|
1796
|
-
type TSessionFactory = (options: {
|
|
1797
|
-
maxTurns?: number;
|
|
1798
|
-
timeout?: number;
|
|
1799
|
-
}) => IAgentSession;
|
|
1800
|
-
/** Constructor options for AgentExecutor. */
|
|
1801
|
-
interface IAgentExecutorOptions {
|
|
1802
|
-
sessionFactory: TSessionFactory;
|
|
1803
|
-
}
|
|
1804
|
-
declare class AgentExecutor implements IHookTypeExecutor {
|
|
1805
|
-
readonly type: "agent";
|
|
1806
|
-
private readonly sessionFactory;
|
|
1807
|
-
constructor(options: IAgentExecutorOptions);
|
|
1808
|
-
execute(definition: THookDefinition, input: IHookInput): Promise<IHookResult>;
|
|
1809
|
-
}
|
|
1810
|
-
//#endregion
|
|
1811
|
-
//#region src/hooks/prompt-executor.d.ts
|
|
1812
|
-
/** A minimal provider interface for single-turn completion. */
|
|
1813
|
-
interface IPromptProvider {
|
|
1814
|
-
complete(prompt: string): Promise<string>;
|
|
1815
|
-
}
|
|
1816
|
-
/** Factory that creates a provider instance, optionally for a specific model. */
|
|
1817
|
-
type TProviderFactory = (model?: string) => IPromptProvider;
|
|
1818
|
-
/** Constructor options for PromptExecutor. */
|
|
1819
|
-
interface IPromptExecutorOptions {
|
|
1820
|
-
providerFactory: TProviderFactory;
|
|
1821
|
-
defaultModel?: string;
|
|
1822
|
-
}
|
|
1823
|
-
declare class PromptExecutor implements IHookTypeExecutor {
|
|
1824
|
-
readonly type: "prompt";
|
|
1825
|
-
private readonly providerFactory;
|
|
1826
|
-
private readonly defaultModel;
|
|
1827
|
-
constructor(options: IPromptExecutorOptions);
|
|
1828
|
-
execute(definition: THookDefinition, input: IHookInput): Promise<IHookResult>;
|
|
1829
|
-
}
|
|
1830
|
-
//#endregion
|
|
1831
|
-
//#region src/reversible-execution/reversible-execution-policy.d.ts
|
|
1832
|
-
type TReversibleExecutionIsolation = 'none' | 'worktree' | 'provider-sandbox';
|
|
1833
|
-
type TReversibleRollbackLayer = 'none' | 'edit-checkpoint' | 'worktree' | 'provider-sandbox';
|
|
1834
|
-
type TReversibleSideEffect = 'none' | 'file-mutation' | 'shell-process' | 'subagent' | 'unknown';
|
|
1835
|
-
type TReversibleSafetyStatus = 'reversible' | 'read-only' | 'requires-checkpoint' | 'requires-isolation' | 'unknown';
|
|
1836
|
-
interface IReversibleExecutionOptions {
|
|
1837
|
-
mode: 'local-first';
|
|
1838
|
-
isolation?: TReversibleExecutionIsolation;
|
|
1839
|
-
enforceUntrackedSideEffects?: boolean;
|
|
1840
|
-
}
|
|
1841
|
-
interface IReversibleToolSafetyContext {
|
|
1842
|
-
checkpointAvailable: boolean;
|
|
1843
|
-
isolation: TReversibleExecutionIsolation;
|
|
1844
|
-
}
|
|
1845
|
-
interface IReversibleToolSafetyInput {
|
|
1846
|
-
toolName: string;
|
|
1847
|
-
toolArgs?: TToolArgs;
|
|
1848
|
-
context: IReversibleToolSafetyContext;
|
|
1849
|
-
}
|
|
1850
|
-
interface IReversibleToolSafetyReport {
|
|
1851
|
-
toolName: string;
|
|
1852
|
-
reversible: boolean;
|
|
1853
|
-
sideEffect: TReversibleSideEffect;
|
|
1854
|
-
rollbackLayer: TReversibleRollbackLayer;
|
|
1855
|
-
status: TReversibleSafetyStatus;
|
|
1856
|
-
message: string;
|
|
1857
|
-
}
|
|
1858
|
-
declare function evaluateReversibleToolSafety(input: IReversibleToolSafetyInput): IReversibleToolSafetyReport;
|
|
1859
|
-
declare function wrapReversibleExecutionTools(tools: readonly IToolWithEventService[], options: IReversibleExecutionOptions & {
|
|
1860
|
-
checkpointAvailable: boolean;
|
|
1861
|
-
}): IToolWithEventService[];
|
|
1862
|
-
//#endregion
|
|
1863
|
-
//#region src/assembly/create-session-types.d.ts
|
|
1864
|
-
type TAutoCompactThreshold$1 = number | false;
|
|
1865
|
-
/** Options for the createSession factory */
|
|
1866
|
-
interface ICreateSessionOptions {
|
|
1867
|
-
/** Resolved CLI configuration (model, API key, permissions) */
|
|
1868
|
-
config: IResolvedConfig;
|
|
1869
|
-
/** Working directory used for project context, skills, and agent definitions. */
|
|
1870
|
-
cwd?: string;
|
|
1871
|
-
/** Loaded AGENTS.md / CLAUDE.md context */
|
|
1872
|
-
context: ILoadedContext;
|
|
1873
|
-
/** Terminal I/O for permission prompts */
|
|
1874
|
-
terminal: ITerminalOutput$1;
|
|
1875
|
-
/** Project metadata for system prompt */
|
|
1876
|
-
projectInfo?: IProjectInfo;
|
|
1877
|
-
/** Initial permission mode (defaults to config.defaultTrustLevel → mode mapping) */
|
|
1878
|
-
permissionMode?: TPermissionMode;
|
|
1879
|
-
/** Maximum number of agentic turns per run() call. Undefined = unlimited. */
|
|
1880
|
-
maxTurns?: number;
|
|
1881
|
-
/** Optional session store for persistence */
|
|
1882
|
-
sessionStore?: IInteractiveSessionStore;
|
|
1883
|
-
/** Inject a pre-constructed AI provider (used by tests to avoid real API calls) */
|
|
1884
|
-
provider?: IAIProvider;
|
|
1885
|
-
/** Custom permission handler (overrides terminal-based prompts, used by Ink UI) */
|
|
1886
|
-
permissionHandler?: TPermissionHandler;
|
|
1887
|
-
/** Callback for text deltas — enables streaming text to the UI in real-time */
|
|
1888
|
-
onTextDelta?: (delta: string) => void;
|
|
1889
|
-
/** Callback when context window usage is refreshed */
|
|
1890
|
-
onContextUpdate?: (state: IContextWindowState) => void;
|
|
1891
|
-
/** Custom prompt-for-approval function (injected from CLI) */
|
|
1892
|
-
promptForApproval?: (terminal: ITerminalOutput$1, toolName: string, toolArgs: TToolArgs) => Promise<TPermissionResult>;
|
|
1893
|
-
/** Additional tools to register beyond the defaults (e.g. agent-tool) */
|
|
1894
|
-
additionalTools?: IToolWithEventService[];
|
|
1895
|
-
/** Additional background task runners composed by the runtime shell. */
|
|
1896
|
-
backgroundTaskRunners?: IBackgroundTaskRunner[];
|
|
1897
|
-
/** Runtime shell override for subagent execution. Defaults to the SDK in-process runner. */
|
|
1898
|
-
subagentRunnerFactory?: TSubagentRunnerFactory;
|
|
1899
|
-
/** Enable agent tool, agent definitions, and subagent runtime wiring for this session. */
|
|
1900
|
-
enableAgentRuntime?: boolean;
|
|
1901
|
-
/**
|
|
1902
|
-
* Preset execution capability: when true the assembly turns on `enableAgentRuntime`
|
|
1903
|
-
* so subagent/background dispatch is active for this session. Threaded from the
|
|
1904
|
-
* preset's `enableParallelSubagents` flag.
|
|
1905
|
-
*/
|
|
1906
|
-
enableParallelSubagents?: boolean;
|
|
1907
|
-
/**
|
|
1908
|
-
* Preset execution capability: when true the framework composes a verify-before-done
|
|
1909
|
-
* self-verification section into the system prompt (PRESET-017), as a normal
|
|
1910
|
-
* priority-sorted `source: 'self-verification'` section.
|
|
1911
|
-
*/
|
|
1912
|
-
selfVerification?: boolean;
|
|
1913
|
-
/** Callback when a tool starts or finishes execution — enables real-time tool display in UI */
|
|
1914
|
-
onToolExecution?: (event: {
|
|
1915
|
-
type: 'start' | 'end';
|
|
1916
|
-
toolName: string;
|
|
1917
|
-
toolArgs?: TToolArgs;
|
|
1918
|
-
success?: boolean;
|
|
1919
|
-
denied?: boolean;
|
|
1920
|
-
toolResultData?: string;
|
|
1921
|
-
executionId?: string;
|
|
1922
|
-
}) => void;
|
|
1923
|
-
/** Callback when context is compacted */
|
|
1924
|
-
onCompact?: (summary: string) => void;
|
|
1925
|
-
/** Callback with structured compaction metadata */
|
|
1926
|
-
onCompactEvent?: (event: ICompactEvent) => void;
|
|
1927
|
-
/** Instructions to include in the compaction prompt (e.g. from CLAUDE.md) */
|
|
1928
|
-
compactInstructions?: string;
|
|
1929
|
-
/** Auto-compact threshold as a 0-1 fraction. Set false to disable automatic compaction. */
|
|
1930
|
-
autoCompactThreshold?: TAutoCompactThreshold$1;
|
|
1931
|
-
/** Custom system prompt builder function */
|
|
1932
|
-
systemPromptBuilder?: (params: ISystemPromptParams) => string;
|
|
1933
|
-
/** Custom tool descriptions for the system prompt */
|
|
1934
|
-
toolDescriptions?: string[];
|
|
1935
|
-
/** Session logger — injected for pluggable session event logging. */
|
|
1936
|
-
sessionLogger?: ISessionLogger;
|
|
1937
|
-
/** Provider factory for prompt hook executors (DI). */
|
|
1938
|
-
providerFactory?: TProviderFactory;
|
|
1939
|
-
/** Session factory for agent hook executors (DI). */
|
|
1940
|
-
sessionFactory?: TSessionFactory;
|
|
1941
|
-
/** Additional hook type executors beyond the defaults (prompt, agent). */
|
|
1942
|
-
additionalHookExecutors?: IHookTypeExecutor[];
|
|
1943
|
-
/** Override session ID (used when resuming a session to reuse the original ID) */
|
|
1944
|
-
sessionId?: string;
|
|
1945
|
-
/** Pre-approved tool names — added to permissions.allow as ToolName(*) patterns. */
|
|
1946
|
-
allowedTools?: string[];
|
|
1947
|
-
/** Denied tool names — added to permissions.deny as ToolName(*) patterns. denied > allowed. */
|
|
1948
|
-
deniedTools?: string[];
|
|
1949
|
-
/** Override the model from config. When set, takes precedence over config.provider.model. */
|
|
1950
|
-
model?: string;
|
|
1951
|
-
/**
|
|
1952
|
-
* Reasoning-effort dial for this session, threaded to the provider request builder.
|
|
1953
|
-
* Resolved from a preset's `effort` (PRESET-008). When unset, the framework→provider
|
|
1954
|
-
* seam defaults it to `'high'`. Native-effort providers map it onto their request
|
|
1955
|
-
* parameter; providers without native effort ignore it as a documented no-op.
|
|
1956
|
-
*/
|
|
1957
|
-
effort?: TModelEffort;
|
|
1958
|
-
/** Text to append to the generated system prompt. */
|
|
1959
|
-
appendSystemPrompt?: string;
|
|
1960
|
-
/** Preset persona block composed as a `source: 'persona'` system-prompt section (priority 5). */
|
|
1961
|
-
persona?: string;
|
|
1962
|
-
/** Model command execution bridge. */
|
|
1963
|
-
modelCommandExecutor?: (command: string, args: string) => Promise<ICommandResult | null>;
|
|
1964
|
-
/** Predicate for commands allowed through the model command execution bridge. */
|
|
1965
|
-
isModelCommandInvocable?: (command: string) => boolean;
|
|
1966
|
-
/** Model-visible command descriptors. */
|
|
1967
|
-
commandDescriptors?: ICapabilityDescriptor[];
|
|
1968
|
-
/** Recorder used to snapshot files before Write/Edit tools mutate them. */
|
|
1969
|
-
editCheckpointRecorder?: IEditCheckpointRecorder;
|
|
1970
|
-
/** Opt-in local-first reversible execution policy for write/shell tools. */
|
|
1971
|
-
reversibleExecution?: IReversibleExecutionOptions;
|
|
1972
|
-
/** Optional provider sandbox client used by sandbox-aware built-in tools. */
|
|
1973
|
-
sandboxClient?: ISandboxClient;
|
|
1974
|
-
/** Name reported to the underlying Robota agent config. Defaults to 'agent'. */
|
|
1975
|
-
agentName?: string;
|
|
1976
|
-
/** Active preset id selected at startup (PRESET-011 runtime state). Defaults to 'default'. */
|
|
1977
|
-
activePresetId?: string;
|
|
1978
|
-
/** Request structured output from the provider for this session. */
|
|
1979
|
-
responseFormat?: {
|
|
1980
|
-
type: 'text' | 'json_object';
|
|
1981
|
-
};
|
|
1982
|
-
}
|
|
1983
|
-
/** Result of createSession — session instance plus a system-message rebuilder for context refresh. */
|
|
1984
|
-
interface ICreateSessionResult {
|
|
1985
|
-
session: Session;
|
|
1986
|
-
/**
|
|
1987
|
-
* Rebuild the system message using updated context strings.
|
|
1988
|
-
* Called by staleness detection when AGENTS.md or CLAUDE.md files change between turns.
|
|
1989
|
-
* PRESET-014: an optional `overrides.persona` re-applies a preset persona to the live prompt;
|
|
1990
|
-
* PRESET-017: an optional `overrides.selfVerification` toggles the verify-before-done section.
|
|
1991
|
-
* Either override is retained for subsequent (override-less) rebuilds.
|
|
1992
|
-
*/
|
|
1993
|
-
rebuildSystemMessage: (agentsMd: string, claudeMd: string, overrides?: {
|
|
1994
|
-
persona?: string;
|
|
1995
|
-
selfVerification?: boolean;
|
|
1996
|
-
}) => string;
|
|
1997
|
-
}
|
|
1998
|
-
//#endregion
|
|
1999
|
-
//#region src/assembly/create-tools.d.ts
|
|
2000
|
-
/**
|
|
2001
|
-
* Create the default set of CLI tools.
|
|
2002
|
-
* Returns the 8 standard tools as IToolWithEventService[].
|
|
2003
|
-
*/
|
|
2004
|
-
interface ICreateDefaultToolsOptions {
|
|
2005
|
-
sandboxClient?: ISandboxClient;
|
|
2006
|
-
cwd?: string;
|
|
2007
|
-
}
|
|
2008
|
-
declare function createDefaultTools(options?: ICreateDefaultToolsOptions): IToolWithEventService[];
|
|
2009
|
-
//#endregion
|
|
2010
|
-
//#region src/assembly/subagent-prompts.d.ts
|
|
2011
|
-
/**
|
|
2012
|
-
* Framework system prompt suffixes for subagent sessions.
|
|
2013
|
-
*
|
|
2014
|
-
* These functions generate the standard prompt content injected into
|
|
2015
|
-
* subagent sessions to control output format and behavior.
|
|
2016
|
-
*/
|
|
2017
|
-
/** Options for assembling a subagent system prompt. */
|
|
2018
|
-
interface ISubagentPromptOptions {
|
|
2019
|
-
/** Agent definition markdown body. */
|
|
2020
|
-
agentBody: string;
|
|
2021
|
-
/** CLAUDE.md content to include. */
|
|
2022
|
-
claudeMd?: string;
|
|
2023
|
-
/** AGENTS.md content to include. */
|
|
2024
|
-
agentsMd?: string;
|
|
2025
|
-
/** When true, use fork worker suffix instead of standard subagent suffix. */
|
|
2026
|
-
isForkWorker: boolean;
|
|
2027
|
-
}
|
|
2028
|
-
/**
|
|
2029
|
-
* Returns the standard subagent suffix appended to agent body for normal subagents.
|
|
2030
|
-
*/
|
|
2031
|
-
declare function getSubagentSuffix(): string;
|
|
2032
|
-
/**
|
|
2033
|
-
* Returns the fork worker suffix for context:fork skill workers.
|
|
2034
|
-
*/
|
|
2035
|
-
declare function getForkWorkerSuffix(): string;
|
|
2036
|
-
/**
|
|
2037
|
-
* Assembles the full system prompt for a subagent.
|
|
2038
|
-
*
|
|
2039
|
-
* Assembly order:
|
|
2040
|
-
* 1. Agent definition body
|
|
2041
|
-
* 2. CLAUDE.md content (if provided)
|
|
2042
|
-
* 3. AGENTS.md content (if provided)
|
|
2043
|
-
* 4. Framework suffix (fork worker OR standard subagent)
|
|
2044
|
-
*/
|
|
2045
|
-
declare function assembleSubagentPrompt(options: ISubagentPromptOptions): string;
|
|
2046
|
-
//#endregion
|
|
2047
|
-
//#region src/assembly/subagent-logger.d.ts
|
|
2048
|
-
/**
|
|
2049
|
-
* Create a FileSessionLogger for a subagent session.
|
|
2050
|
-
*
|
|
2051
|
-
* The logger writes JSONL files into a `subagents/` subdirectory under the
|
|
2052
|
-
* parent session's log folder. The directory is created if it does not exist.
|
|
2053
|
-
*
|
|
2054
|
-
* @param parentSessionId - ID of the parent session (used as directory name)
|
|
2055
|
-
* @param agentId - Unique identifier for this subagent run
|
|
2056
|
-
* @param baseLogsDir - Root logs directory (e.g., `.robota/logs`)
|
|
2057
|
-
* @returns A FileSessionLogger writing to the subagent directory
|
|
2058
|
-
*/
|
|
2059
|
-
declare function createSubagentLogger(parentSessionId: string, _agentId: string, baseLogsDir: string, fs?: IFileSystem): FileSessionLogger;
|
|
2060
|
-
/**
|
|
2061
|
-
* Resolve the subagent log directory path without creating it.
|
|
2062
|
-
*
|
|
2063
|
-
* Useful when the caller needs the path for display or configuration
|
|
2064
|
-
* but does not want to create the directory immediately.
|
|
2065
|
-
*
|
|
2066
|
-
* @param parentSessionId - ID of the parent session
|
|
2067
|
-
* @param baseLogsDir - Root logs directory
|
|
2068
|
-
* @returns The resolved subagent log directory path
|
|
2069
|
-
*/
|
|
2070
|
-
declare function resolveSubagentLogDir(parentSessionId: string, baseLogsDir: string): string;
|
|
2071
|
-
//#endregion
|
|
2072
|
-
//#region src/interactive/interactive-session-options.d.ts
|
|
2073
|
-
/** Standard construction: cwd + provider. Config/context loaded internally. */
|
|
2074
|
-
interface IInteractiveSessionStandardOptions {
|
|
2075
|
-
cwd: string;
|
|
2076
|
-
provider: IAIProvider;
|
|
2077
|
-
permissionMode?: ICreateSessionOptions['permissionMode'];
|
|
2078
|
-
maxTurns?: number;
|
|
2079
|
-
permissionHandler?: TInteractivePermissionHandler;
|
|
2080
|
-
sessionStore?: IInteractiveSessionStore;
|
|
2081
|
-
sessionName?: string;
|
|
2082
|
-
resumeSessionId?: string;
|
|
2083
|
-
forkSession?: boolean;
|
|
2084
|
-
/** Skip AGENTS.md/CLAUDE.md loading and plugin discovery. */
|
|
2085
|
-
bare?: boolean;
|
|
2086
|
-
/** Pre-approved tool names passed to createSession. */
|
|
2087
|
-
allowedTools?: string[];
|
|
2088
|
-
/** Denied tool names — added to permissions.deny. denied > allowed. */
|
|
2089
|
-
deniedTools?: string[];
|
|
2090
|
-
/** Override the model from config. When set, takes precedence over config.provider.model. */
|
|
2091
|
-
model?: string;
|
|
2092
|
-
/** Text to append to the system prompt. */
|
|
2093
|
-
appendSystemPrompt?: string;
|
|
2094
|
-
/** Preset persona block composed as a `source: 'persona'` system-prompt section (priority 5). */
|
|
2095
|
-
persona?: string;
|
|
2096
|
-
/** Replace the entire system prompt with this string. Takes precedence over the default builder. */
|
|
2097
|
-
systemPrompt?: string;
|
|
2098
|
-
/** Override config language (e.g., "ko", "en"). Injected into system prompt. */
|
|
2099
|
-
language?: string;
|
|
2100
|
-
/** Runtime-composed background task runners. */
|
|
2101
|
-
backgroundTaskRunners?: IBackgroundTaskRunner[];
|
|
2102
|
-
/** Runtime shell override for subagent execution. */
|
|
2103
|
-
subagentRunnerFactory?: TSubagentRunnerFactory;
|
|
2104
|
-
/** Optional command modules composed into this session. */
|
|
2105
|
-
commandModules?: readonly ICommandModule[];
|
|
2106
|
-
/** Host adapters available to composed command modules. */
|
|
2107
|
-
commandHostAdapters?: ICommandHostAdapters;
|
|
2108
|
-
/** Shell exec function for preprocessing `` !`cmd` `` patterns in skills — injected from composition root. */
|
|
2109
|
-
shellExec?: TShellExecFn;
|
|
2110
|
-
/** Model-visible command descriptors derived from the composed command executor. */
|
|
2111
|
-
commandDescriptors?: readonly ICapabilityDescriptor[];
|
|
2112
|
-
/** Provider definitions for hot-swap via /provider switch. */
|
|
2113
|
-
providerDefinitions?: readonly import('@robota-sdk/agent-core').IProviderDefinition[];
|
|
2114
|
-
/** Model command execution bridge. */
|
|
2115
|
-
modelCommandExecutor?: (command: string, args: string) => Promise<ICommandResult | null>;
|
|
2116
|
-
/** Predicate for commands allowed through the model command execution bridge. */
|
|
2117
|
-
isModelCommandInvocable?: (command: string) => boolean;
|
|
2118
|
-
/** Preloaded config to avoid duplicate discovery when caller needs it too. */
|
|
2119
|
-
config?: IResolvedConfig;
|
|
2120
|
-
/** Opt-in local-first reversible execution policy for write/shell tools. */
|
|
2121
|
-
reversibleExecution?: IReversibleExecutionOptions;
|
|
2122
|
-
/** Optional provider sandbox client used by sandbox-aware built-in tools. */
|
|
2123
|
-
sandboxClient?: ISandboxClient;
|
|
2124
|
-
/** Fresh-session workspace manifest applied through the sandbox client. */
|
|
2125
|
-
workspaceManifest?: IWorkspaceManifest;
|
|
2126
|
-
/** Sandbox target root for workspace manifest entries. Defaults to /workspace. */
|
|
2127
|
-
sandboxWorkspaceRoot?: string;
|
|
2128
|
-
/** Provider sandbox snapshot id to restore before replaying saved messages. */
|
|
2129
|
-
sandboxSnapshotId?: string;
|
|
2130
|
-
/** Name reported to the underlying Robota agent config. Defaults to 'agent'. */
|
|
2131
|
-
agentName?: string;
|
|
2132
|
-
/** Active preset id selected at startup (PRESET-011 runtime state). Defaults to 'default'. */
|
|
2133
|
-
activePresetId?: string;
|
|
2134
|
-
/** Preset execution capability: activate agent runtime + subagent/background dispatch. */
|
|
2135
|
-
enableParallelSubagents?: boolean;
|
|
2136
|
-
/** Preset execution capability: run a post-task self-verification step. */
|
|
2137
|
-
selfVerification?: boolean;
|
|
2138
|
-
/** Organization policy for enforcing provider restrictions, command blocks, and API key rules. */
|
|
2139
|
-
orgPolicy?: IOrgPolicy;
|
|
2140
|
-
/** Additional tools registered alongside the default CLI tools. */
|
|
2141
|
-
additionalTools?: IToolWithEventService[];
|
|
2142
|
-
/** Request structured output from the provider for this session. */
|
|
2143
|
-
responseFormat?: {
|
|
2144
|
-
type: 'text' | 'json_object';
|
|
2145
|
-
};
|
|
2146
|
-
}
|
|
2147
|
-
/** Test/advanced construction: inject pre-built session directly. */
|
|
2148
|
-
interface IInteractiveSessionInjectedOptions {
|
|
2149
|
-
session: Session;
|
|
2150
|
-
cwd?: string;
|
|
2151
|
-
provider?: IAIProvider;
|
|
2152
|
-
permissionMode?: ICreateSessionOptions['permissionMode'];
|
|
2153
|
-
maxTurns?: number;
|
|
2154
|
-
permissionHandler?: TInteractivePermissionHandler;
|
|
2155
|
-
sessionStore?: IInteractiveSessionStore;
|
|
2156
|
-
sessionName?: string;
|
|
2157
|
-
resumeSessionId?: string;
|
|
2158
|
-
forkSession?: boolean;
|
|
2159
|
-
/** Optional command modules composed into this injected session. */
|
|
2160
|
-
commandModules?: readonly ICommandModule[];
|
|
2161
|
-
/** Host adapters available to composed command modules. */
|
|
2162
|
-
commandHostAdapters?: ICommandHostAdapters;
|
|
2163
|
-
}
|
|
2164
|
-
/** Union of standard and injected construction options. */
|
|
2165
|
-
type TInteractiveSessionOptions = IInteractiveSessionStandardOptions | IInteractiveSessionInjectedOptions;
|
|
2166
|
-
//#endregion
|
|
2167
|
-
//#region src/interactive/interactive-session-init.d.ts
|
|
2168
|
-
/** Return value of createInteractiveSession — session plus staleness tracking data. */
|
|
2169
|
-
interface ICreatedInteractiveSession {
|
|
2170
|
-
session: Session;
|
|
2171
|
-
/** Per-file entries for AGENTS.md files loaded at startup. Used for staleness detection. */
|
|
2172
|
-
agentsFileEntries: IContextFileEntry[];
|
|
2173
|
-
/** Per-file entries for CLAUDE.md files loaded at startup. Used for staleness detection. */
|
|
2174
|
-
claudeFileEntries: IContextFileEntry[];
|
|
2175
|
-
/**
|
|
2176
|
-
* Rebuilds the system message given updated agentsMd and claudeMd strings. PRESET-014: an
|
|
2177
|
-
* optional `overrides.persona` re-applies a preset persona to the live prompt; PRESET-017: an
|
|
2178
|
-
* optional `overrides.selfVerification` toggles the verify-before-done section. Either override
|
|
2179
|
-
* is retained for subsequent (override-less) rebuilds.
|
|
2180
|
-
*/
|
|
2181
|
-
rebuildSystemMessage: (agentsMd: string, claudeMd: string, overrides?: {
|
|
2182
|
-
persona?: string;
|
|
2183
|
-
selfVerification?: boolean;
|
|
2184
|
-
}) => string;
|
|
2185
|
-
}
|
|
2186
|
-
//#endregion
|
|
2187
|
-
//#region src/interactive/interactive-session-skill-router.d.ts
|
|
2188
|
-
declare class SessionSkillRouter {
|
|
2189
|
-
private readonly getSession;
|
|
2190
|
-
private readonly getSessionId;
|
|
2191
|
-
private readonly onSubmit;
|
|
2192
|
-
private readonly onApplyResult;
|
|
2193
|
-
private readonly recordSkillActivation;
|
|
2194
|
-
private readonly runSkillInFork;
|
|
2195
|
-
/** Called when a fork-context skill needs full lifecycle management (executing flag etc.) */
|
|
2196
|
-
private readonly onForkSkill;
|
|
2197
|
-
/** Called for blocking commands — wraps execution with thinking/executing lifecycle */
|
|
2198
|
-
private readonly onBlockingCommand;
|
|
2199
|
-
private readonly shellExec?;
|
|
2200
|
-
readonly commandExecutor: SystemCommandExecutor;
|
|
2201
|
-
/** Command modules received at construction — retained for live re-selection (PRESET-015). */
|
|
2202
|
-
private readonly allCommandModules;
|
|
2203
|
-
private readonly skillCommandSource;
|
|
2204
|
-
private readonly commandHostAdapters?;
|
|
2205
|
-
private commandInvocationSource;
|
|
2206
|
-
constructor(commandModules: readonly ICommandModule[], cwd: string, commandHostAdapters: ICommandHostAdapters | undefined, getSession: () => ICommandHostContext, getSessionId: () => string, onSubmit: (prompt: string, displayInput?: string, rawInput?: string) => Promise<void>, onApplyResult: (result: string) => Promise<void>, recordSkillActivation: (event: ISkillActivationEvent, appendHistory: boolean) => void, runSkillInFork: (content: string, options: IForkExecutionOptions) => Promise<string>, /** Called when a fork-context skill needs full lifecycle management (executing flag etc.) */
|
|
2207
|
-
|
|
2208
|
-
onForkSkill: (skill: ICommand, args: string, displayInput: string | undefined, qualifiedName: string | undefined, invocation: ISkillActivationEvent['invocation']) => Promise<ISkillExecutionResult>, /** Called for blocking commands — wraps execution with thinking/executing lifecycle */
|
|
2209
|
-
|
|
2210
|
-
onBlockingCommand: (execute: () => Promise<ICommandResult>) => Promise<ICommandResult>, shellExec?: TShellExecFn | undefined);
|
|
2211
|
-
/** PRESET-015 — re-filter the session's command modules and rebuild the executor live. */
|
|
2212
|
-
reapplyCommandModuleSelection(enabled: readonly string[] | undefined, disabled: readonly string[] | undefined): void;
|
|
2213
|
-
getCommandInvocationSource(): TCommandInvocationSource;
|
|
2214
|
-
getCommandHostAdapters(): ICommandHostAdapters;
|
|
2215
|
-
listCommands(): Array<{
|
|
2216
|
-
name: string;
|
|
2217
|
-
displayName?: string;
|
|
2218
|
-
description: string;
|
|
2219
|
-
example?: string;
|
|
2220
|
-
}>;
|
|
2221
|
-
listSkills(): ICommandSkillListEntry[];
|
|
2222
|
-
listModelInvocableCommands(): Array<{
|
|
2223
|
-
name: string;
|
|
2224
|
-
description: string;
|
|
2225
|
-
}>;
|
|
2226
|
-
findSkillCommand(name: string): ICommand | undefined;
|
|
2227
|
-
executeCommand(name: string, args: string): Promise<ICommandResult | null>;
|
|
2228
|
-
executeCommandWithSource(source: TCommandInvocationSource, command: ISystemCommand, args: string): Promise<ICommandResult>;
|
|
2229
|
-
executeModelCommand(name: string, args: string): Promise<ICommandResult | null>;
|
|
2230
|
-
executeSkillCommandByName(name: string, args: string, request: ICommandSkillActivationRequest): Promise<ICommandResult | null>;
|
|
2231
|
-
executeUserResolvedSkillCommand(skill: ICommand, args: string, displayInput: string | undefined, rawInput: string | undefined, invocation: ISkillActivationEvent['invocation']): Promise<ISkillExecutionResult>;
|
|
2232
|
-
executeSkillWithActivation(skill: ICommand, args: string, invocation: ISkillActivationEvent['invocation'], qualifiedName?: string): Promise<ISkillExecutionResult>;
|
|
2233
|
-
private emitSkillActivation;
|
|
2234
|
-
private executeForegroundCommand;
|
|
2235
|
-
}
|
|
2236
|
-
//#endregion
|
|
2237
|
-
//#region src/interactive/interactive-session-execution-controller.d.ts
|
|
2238
|
-
interface IExecutionControllerCallbacks {
|
|
2239
|
-
getSession: () => Session;
|
|
2240
|
-
getSessionOrThrow: () => Session;
|
|
2241
|
-
getCwd: () => string;
|
|
2242
|
-
getContextState: () => IContextWindowState;
|
|
2243
|
-
getExecutionWorkspaceSnapshot: () => IExecutionWorkspaceSnapshot;
|
|
2244
|
-
emit: <E extends string>(event: E, ...args: unknown[]) => void;
|
|
2245
|
-
persistSession: () => void;
|
|
2246
|
-
}
|
|
2247
|
-
/** Origin of a turn — distinguishes a human prompt from an agent-wakeup (FLOW-002). */
|
|
2248
|
-
type TTurnSource = 'user' | 'agent-wakeup';
|
|
2249
|
-
/** Options threaded through submit/executePrompt for non-user turns (FLOW-002). */
|
|
2250
|
-
interface ITurnOptions {
|
|
2251
|
-
turnSource?: TTurnSource;
|
|
2252
|
-
/** When set, the in-flight wake for this background task id is cleared on turn completion. */
|
|
2253
|
-
wakeTaskId?: string;
|
|
2254
|
-
}
|
|
2255
|
-
/** A submit callback that optionally carries turn options (default = user turn). */
|
|
2256
|
-
type TSubmitFn = (prompt: string, displayInput?: string, rawInput?: string, options?: ITurnOptions) => Promise<void>;
|
|
2257
|
-
declare class SessionExecutionController {
|
|
2258
|
-
private readonly histTracker;
|
|
2259
|
-
private readonly skillRouter;
|
|
2260
|
-
private readonly callbacks;
|
|
2261
|
-
executing: boolean;
|
|
2262
|
-
streamingText: string;
|
|
2263
|
-
flushTimer: ReturnType<typeof setTimeout> | null;
|
|
2264
|
-
activeTools: IToolState[];
|
|
2265
|
-
pendingPrompt: string | null;
|
|
2266
|
-
pendingDisplayInput: string | undefined;
|
|
2267
|
-
pendingRawInput: string | undefined;
|
|
2268
|
-
pendingTurnOptions: ITurnOptions;
|
|
2269
|
-
shuttingDown: boolean;
|
|
2270
|
-
/** FLOW-002: background task ids with an in-flight wake turn (coalesces duplicate wakes). */
|
|
2271
|
-
readonly wakeTaskIds: Set<string>;
|
|
2272
|
-
constructor(histTracker: SessionHistoryTracker, skillRouter: SessionSkillRouter, callbacks: IExecutionControllerCallbacks);
|
|
2273
|
-
clearPendingQueue(): void;
|
|
2274
|
-
clearStreaming(): void;
|
|
2275
|
-
flushStreaming(): void;
|
|
2276
|
-
handleTextDelta(delta: string): void;
|
|
2277
|
-
handleCompactEvent(event: ICompactEvent): void;
|
|
2278
|
-
handleToolExecution(event: {
|
|
2279
|
-
type: 'start' | 'end';
|
|
2280
|
-
toolName: string;
|
|
2281
|
-
toolArgs?: TToolArgs;
|
|
2282
|
-
success?: boolean;
|
|
2283
|
-
denied?: boolean;
|
|
2284
|
-
toolResultData?: string;
|
|
2285
|
-
executionId?: string;
|
|
2286
|
-
}): void;
|
|
2287
|
-
emitExecutionWorkspaceUpdated(cause: TExecutionWorkspaceUpdateCause, entryId?: string): void;
|
|
2288
|
-
private drainPendingQueue;
|
|
2289
|
-
executePrompt(input: string, displayInput: string | undefined, rawInput: string | undefined, agentsFileEntries: IContextFileEntry[], claudeFileEntries: IContextFileEntry[], rebuildSystemMessage: ICreatedInteractiveSession['rebuildSystemMessage'] | null, setEntries: (agents: IContextFileEntry[], claude: IContextFileEntry[]) => void, submit: TSubmitFn, turnOptions?: ITurnOptions): Promise<void>;
|
|
2290
|
-
executeForkSkillCommand(skill: ICommand, args: string, displayInput: string | undefined, qualifiedName: string | undefined, invocation: ISkillActivationEvent['invocation'], submit: (p: string, d?: string, r?: string) => Promise<void>): Promise<ISkillExecutionResult>;
|
|
2291
|
-
executeForegroundCommand(execute: () => Promise<ICommandResult>, submit: (p: string, d?: string, r?: string) => Promise<void>): Promise<ICommandResult>;
|
|
2292
|
-
applyForkSkillResult(result: string): Promise<void>;
|
|
2293
|
-
}
|
|
2294
|
-
//#endregion
|
|
2295
|
-
//#region src/interactive/interactive-session-base.d.ts
|
|
2296
|
-
declare abstract class InteractiveSessionBase {
|
|
2297
|
-
protected abstract readonly bgTracker: SessionBackgroundTaskTracker;
|
|
2298
|
-
protected abstract readonly histTracker: SessionHistoryTracker;
|
|
2299
|
-
protected abstract readonly skillRouter: SessionSkillRouter;
|
|
2300
|
-
protected abstract readonly execCtrl: SessionExecutionController;
|
|
2301
|
-
protected abstract getSessionOrThrow(): Session;
|
|
2302
|
-
protected abstract ensureInitialized(): Promise<void>;
|
|
2303
|
-
protected abstract getCwd(): string;
|
|
2304
|
-
isExecuting(): boolean;
|
|
2305
|
-
getPendingPrompt(): string | null;
|
|
2306
|
-
getStreamingText(): string;
|
|
2307
|
-
getActiveTools(): SessionExecutionController['activeTools'];
|
|
2308
|
-
cancelQueue(): void;
|
|
2309
|
-
executeCommand(name: string, args: string): Promise<ICommandResult | null>;
|
|
2310
|
-
executeModelCommand(name: string, args: string): Promise<ICommandResult | null>;
|
|
2311
|
-
getCommandInvocationSource(): TCommandInvocationSource;
|
|
2312
|
-
executeSkillCommandByName(name: string, args: string, request: ICommandSkillActivationRequest): Promise<ICommandResult | null>;
|
|
2313
|
-
listCommands(): Array<{
|
|
2314
|
-
name: string;
|
|
2315
|
-
displayName?: string;
|
|
2316
|
-
description: string;
|
|
2317
|
-
example?: string;
|
|
2318
|
-
}>;
|
|
2319
|
-
listSkills(): ICommandSkillListEntry[];
|
|
2320
|
-
listModelInvocableCommands(): Array<{
|
|
2321
|
-
name: string;
|
|
2322
|
-
description: string;
|
|
2323
|
-
}>;
|
|
2324
|
-
getCommandHostAdapters(): ICommandHostAdapters;
|
|
2325
|
-
getSkillActivationEvents(): ISkillActivationEvent[];
|
|
2326
|
-
getContextState(): IContextWindowState;
|
|
2327
|
-
compactContext(instructions?: string): Promise<void>;
|
|
2328
|
-
getFullHistory(): IHistoryEntry[];
|
|
2329
|
-
getMessages(): TUniversalMessage[];
|
|
2330
|
-
listEditCheckpoints(): IEditCheckpointSummary[];
|
|
2331
|
-
inspectEditCheckpoint(checkpointId: string): IEditCheckpointInspection;
|
|
2332
|
-
restoreEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
2333
|
-
rollbackEditCheckpoint(checkpointId: string): Promise<IEditCheckpointRestoreResult>;
|
|
2334
|
-
getUsedMemoryReferences(): IMemoryReference[];
|
|
2335
|
-
recordMemoryEvent(event: IMemoryEvent): void;
|
|
2336
|
-
listContextReferences(): IContextReferenceItem[];
|
|
2337
|
-
addContextReference(path: string): Promise<IContextReferenceAddResult>;
|
|
2338
|
-
removeContextReference(path: string): IContextReferenceRemoveResult;
|
|
2339
|
-
clearContextReferences(): IContextReferenceClearResult;
|
|
2340
|
-
listBackgroundTasks(filter?: IBackgroundTaskListFilter): IBackgroundTaskState[];
|
|
2341
|
-
getBackgroundTask(taskId: string): IBackgroundTaskState | undefined;
|
|
2342
|
-
cancelBackgroundTask(taskId: string, reason?: string): Promise<void>;
|
|
2343
|
-
closeBackgroundTask(taskId: string): Promise<void>;
|
|
2344
|
-
sendBackgroundTask(taskId: string, input: IBackgroundTaskInput): Promise<void>;
|
|
2345
|
-
readBackgroundTaskLog(taskId: string, cursor?: IBackgroundTaskLogCursor): Promise<IBackgroundTaskLogPage>;
|
|
2346
|
-
createBackgroundJobGroup(input: Omit<IBackgroundJobGroupCreateRequest, 'parentSessionId'>): IBackgroundJobGroupState;
|
|
2347
|
-
listBackgroundJobGroups(): IBackgroundJobGroupState[];
|
|
2348
|
-
getBackgroundJobGroup(groupId: string): IBackgroundJobGroupState | undefined;
|
|
2349
|
-
waitBackgroundJobGroup(groupId: string): Promise<IBackgroundJobGroupState>;
|
|
2350
|
-
getExecutionWorkspaceSnapshot(options?: IExecutionWorkspaceSnapshotOptions): IExecutionWorkspaceSnapshot;
|
|
2351
|
-
listExecutionWorkspaceEntries(filter?: IExecutionWorkspaceFilter): IExecutionWorkspaceEntry[];
|
|
2352
|
-
getExecutionWorkspaceEntry(entryId: string): IExecutionWorkspaceEntry | undefined;
|
|
2353
|
-
readExecutionWorkspaceDetail(entryId: string, cursor?: IExecutionDetailCursor): Promise<IExecutionDetailPage>;
|
|
2354
|
-
createExecutionWorkspaceTaskSpawner(origin: IExecutionOrigin): IExecutionWorkspaceTaskSpawner;
|
|
2355
|
-
listAgentDefinitions(): Array<{
|
|
2356
|
-
name: string;
|
|
2357
|
-
description: string;
|
|
2358
|
-
}>;
|
|
2359
|
-
listAgentJobs(): ISubagentJobState[];
|
|
2360
|
-
spawnAgentJob(input: ISpawnAgentJobInput): Promise<ISubagentJobState>;
|
|
2361
|
-
waitAgentJob(jobId: string): Promise<ISubagentJobResult>;
|
|
2362
|
-
sendAgentJob(jobId: string, prompt: string): Promise<void>;
|
|
2363
|
-
cancelAgentJob(jobId: string, reason?: string): Promise<void>;
|
|
2364
|
-
closeAgentJob(jobId: string): Promise<void>;
|
|
2365
|
-
spawnScheduledWake(input: {
|
|
2366
|
-
label: string;
|
|
2367
|
-
cronExpression: string;
|
|
2368
|
-
agentInstruction: string;
|
|
2369
|
-
}): Promise<IBackgroundTaskState>;
|
|
2370
|
-
spawnMonitorWake(input: {
|
|
2371
|
-
label: string;
|
|
2372
|
-
command: string;
|
|
2373
|
-
matchPattern: string;
|
|
2374
|
-
agentInstruction: string;
|
|
2375
|
-
}): Promise<IBackgroundTaskState>;
|
|
2376
|
-
}
|
|
2377
|
-
//#endregion
|
|
2378
|
-
//#region src/interactive/interactive-session.d.ts
|
|
2379
|
-
interface IInteractiveSessionShutdownOptions {
|
|
2380
|
-
reason?: TSessionEndReason;
|
|
2381
|
-
message?: string;
|
|
2382
|
-
}
|
|
2383
|
-
declare class InteractiveSession extends InteractiveSessionBase implements ISession, IAgentJobHostContext, IInteractiveSession {
|
|
2384
|
-
private session;
|
|
2385
|
-
private readonly listeners;
|
|
2386
|
-
private initialized;
|
|
2387
|
-
private initPromise;
|
|
2388
|
-
private sessionStore?;
|
|
2389
|
-
private sessionName?;
|
|
2390
|
-
private cwd?;
|
|
2391
|
-
private pendingRestoreMessages;
|
|
2392
|
-
private resumeSessionId?;
|
|
2393
|
-
private forkSession;
|
|
2394
|
-
private autoCompactThresholdSource;
|
|
2395
|
-
private shutdownPromise;
|
|
2396
|
-
private readonly sandboxClient?;
|
|
2397
|
-
private sandboxSnapshotId?;
|
|
2398
|
-
private agentsFileEntries;
|
|
2399
|
-
private claudeFileEntries;
|
|
2400
|
-
private rebuildSystemMessage;
|
|
2401
|
-
private providerDefinitions;
|
|
2402
|
-
private orgPolicy;
|
|
2403
|
-
protected readonly bgTracker: SessionBackgroundTaskTracker;
|
|
2404
|
-
protected readonly histTracker: SessionHistoryTracker;
|
|
2405
|
-
protected readonly skillRouter: SessionSkillRouter;
|
|
2406
|
-
protected readonly execCtrl: SessionExecutionController;
|
|
2407
|
-
constructor(options: TInteractiveSessionOptions);
|
|
2408
|
-
private configureInjectedSession;
|
|
2409
|
-
private restoreSessionRecordIfNeeded;
|
|
2410
|
-
private startAsyncInitializationIfNeeded;
|
|
2411
|
-
private initializeAsync;
|
|
2412
|
-
protected ensureInitialized(): Promise<void>;
|
|
2413
|
-
protected getSessionOrThrow(): Session;
|
|
2414
|
-
getCwd(): string;
|
|
2415
|
-
get sessionId(): string;
|
|
2416
|
-
on<E extends TInteractiveEventName>(event: E, handler: IInteractiveSessionEvents[E]): void;
|
|
2417
|
-
off<E extends TInteractiveEventName>(event: E, handler: IInteractiveSessionEvents[E]): void;
|
|
2418
|
-
private emit;
|
|
2419
|
-
submit(input: string, displayInput?: string, rawInput?: string, options?: ITurnOptions): Promise<void>;
|
|
2420
|
-
/**
|
|
2421
|
-
* FLOW-002: re-enter the agent loop with a non-user turn triggered by a background wake
|
|
2422
|
-
* (a scheduled fire or, later, a monitor match). Coalesces by source task id so repeated
|
|
2423
|
-
* wakes for the same task while one is still in flight collapse to a single turn.
|
|
2424
|
-
*/
|
|
2425
|
-
requestWakeup(instruction: string, sourceTaskId: string): void;
|
|
2426
|
-
abort(): void;
|
|
2427
|
-
shutdown(options?: IInteractiveSessionShutdownOptions): Promise<void>;
|
|
2428
|
-
get isInitialized(): boolean;
|
|
2429
|
-
getAutoCompactThresholdSource(): TAutoCompactThresholdSource;
|
|
2430
|
-
getAutoCompactThreshold(): number | false;
|
|
2431
|
-
getSession(): Session;
|
|
2432
|
-
/**
|
|
2433
|
-
* PRESET-014: re-apply a preset persona to the live system prompt. Recomposes the system
|
|
2434
|
-
* message from the currently tracked AGENTS.md/CLAUDE.md entries (the same content the staleness
|
|
2435
|
-
* refresh uses) plus the new persona, then propagates it to the session. No-op before init,
|
|
2436
|
-
* when the rebuild closure is not yet available.
|
|
2437
|
-
*/
|
|
2438
|
-
applyPersona(persona: string): void;
|
|
2439
|
-
/**
|
|
2440
|
-
* PRESET-017: toggle the verify-before-done self-verification section on the live system prompt.
|
|
2441
|
-
* Recomposes the system message from the currently tracked AGENTS.md/CLAUDE.md entries plus the
|
|
2442
|
-
* new selfVerification flag, then propagates it to the session. No-op before init, when the
|
|
2443
|
-
* rebuild closure is not yet available.
|
|
2444
|
-
*/
|
|
2445
|
-
applySelfVerification(enabled: boolean): void;
|
|
2446
|
-
/**
|
|
2447
|
-
* PRESET-015: re-apply a preset's command-module selection to the live session by delegating to
|
|
2448
|
-
* the skill router, which re-filters the session-start module set and rebuilds the executor.
|
|
2449
|
-
*/
|
|
2450
|
-
applyCommandModuleSelection(enabled: readonly string[] | undefined, disabled: readonly string[] | undefined): void;
|
|
2451
|
-
getAgentJobCapability(): IAgentJobHostContext;
|
|
2452
|
-
setAutoCompactThreshold(threshold: TAutoCompactThreshold, source?: TAutoCompactThresholdSource): void;
|
|
2453
|
-
clearConversationHistory(): void;
|
|
2454
|
-
getName(): string | undefined;
|
|
2455
|
-
attachTransport(transport: ITransportAdapter$1<IInteractiveSession>): void;
|
|
2456
|
-
setName(name: string): void;
|
|
2457
|
-
private getBackgroundTaskManager;
|
|
2458
|
-
private captureSandboxSnapshot;
|
|
2459
|
-
private persistCurrentSession;
|
|
2460
|
-
private switchProvider;
|
|
2461
|
-
executeCommand(name: string, args: string): Promise<ICommandResult | null>;
|
|
2462
|
-
}
|
|
2463
|
-
//#endregion
|
|
2464
12
|
//#region src/query.d.ts
|
|
2465
13
|
interface ICreateQueryOptions {
|
|
2466
14
|
/** AI provider instance (required). */
|
|
@@ -2645,7 +193,7 @@ declare function getBuiltInAgent(name: string): IAgentDefinition | undefined;
|
|
|
2645
193
|
type TModelCommandDescriptor$1 = Pick<ICapabilityDescriptor, 'name' | 'description' | 'argumentHint'>;
|
|
2646
194
|
interface ICommandExecutionToolDeps {
|
|
2647
195
|
isModelInvocable: (command: string) => boolean;
|
|
2648
|
-
execute: (command: string, args: string) => Promise<ICommandResult | null>;
|
|
196
|
+
execute: (command: string, args: string) => Promise<ICommandResult$1 | null>;
|
|
2649
197
|
commandNames?: readonly string[];
|
|
2650
198
|
commandDescriptors?: readonly TModelCommandDescriptor$1[];
|
|
2651
199
|
}
|
|
@@ -2670,7 +218,7 @@ interface IModelCommandToolProjection {
|
|
|
2670
218
|
}
|
|
2671
219
|
interface IProjectedCommandExecutionToolsDeps {
|
|
2672
220
|
isModelInvocable: (command: string) => boolean;
|
|
2673
|
-
execute: (command: string, args: string) => Promise<ICommandResult | null>;
|
|
221
|
+
execute: (command: string, args: string) => Promise<ICommandResult$1 | null>;
|
|
2674
222
|
commandDescriptors: readonly TModelCommandDescriptor[];
|
|
2675
223
|
}
|
|
2676
224
|
declare function normalizeModelCommandName(command: string): string;
|
|
@@ -2740,7 +288,7 @@ declare function loadTaskContext(cwd: string, options?: ITaskSelectionOptions, f
|
|
|
2740
288
|
declare function updateTaskFileStatus(taskPath: string, status: TTaskFileStatus, options?: IUpdateTaskFileStatusOptions, fs?: IFileSystem): void;
|
|
2741
289
|
//#endregion
|
|
2742
290
|
//#region src/interaction/input-parser.d.ts
|
|
2743
|
-
type
|
|
291
|
+
type TParsedInput = {
|
|
2744
292
|
type: 'slash-command';
|
|
2745
293
|
name: string;
|
|
2746
294
|
args: string[];
|
|
@@ -2756,7 +304,7 @@ declare function tokeniseSlashCommand(text: string): {
|
|
|
2756
304
|
args: string[];
|
|
2757
305
|
};
|
|
2758
306
|
/** Parse raw user input into a structured command or message. */
|
|
2759
|
-
declare function parseInput(text: string):
|
|
307
|
+
declare function parseInput(text: string): TParsedInput;
|
|
2760
308
|
//#endregion
|
|
2761
309
|
//#region src/interaction/InteractiveRuntime.d.ts
|
|
2762
310
|
interface IInteractiveRuntime {
|
|
@@ -2774,18 +322,15 @@ interface IInteractiveRuntimeOptions {
|
|
|
2774
322
|
cwd?: string;
|
|
2775
323
|
/** Session store for persistence. */
|
|
2776
324
|
sessionStore?: IInteractiveSessionStore;
|
|
325
|
+
/** Permission mode for tool execution (parity with the TUI/headless channels). */
|
|
326
|
+
permissionMode?: TPermissionMode;
|
|
2777
327
|
/** Test escape hatch — skips session creation when supplied. */
|
|
2778
328
|
_testSession?: IInteractiveSession;
|
|
2779
329
|
}
|
|
2780
330
|
declare function createInteractiveRuntime(options: IInteractiveRuntimeOptions): IInteractiveRuntime;
|
|
2781
331
|
//#endregion
|
|
2782
332
|
//#region src/permissions/permission-prompt.d.ts
|
|
2783
|
-
declare function promptForApproval(terminal: ITerminalOutput$
|
|
2784
|
-
//#endregion
|
|
2785
|
-
//#region src/testing/create-test-interactive-session.d.ts
|
|
2786
|
-
/** Creates a stub IInteractiveSession for use in tests. All methods return sensible defaults.
|
|
2787
|
-
* Pass overrides to spy on or replace specific methods. */
|
|
2788
|
-
declare function createTestInteractiveSession(overrides?: Partial<IInteractiveSession>): IInteractiveSession;
|
|
333
|
+
declare function promptForApproval(terminal: ITerminalOutput$1, toolName: string, toolArgs: TToolArgs): Promise<TPermissionResultValue>;
|
|
2789
334
|
//#endregion
|
|
2790
335
|
//#region src/config/settings-parse-error.d.ts
|
|
2791
336
|
/**
|
|
@@ -2936,5 +481,5 @@ interface IStatelessRuntimeConfig {
|
|
|
2936
481
|
}
|
|
2937
482
|
declare function createStatelessRuntime(config: IStatelessRuntimeConfig): IAgentRuntime;
|
|
2938
483
|
//#endregion
|
|
2939
|
-
export { AUTO_COMPACT_THRESHOLD_SETTINGS_KEY, AgentExecutor, BACKGROUND_COMMAND_DESCRIPTION, BACKGROUND_COMMAND_USAGE, BUILT_IN_AGENTS, BackgroundJobOrchestrator, BuiltinCommandSource, BundlePluginInstaller, BundlePluginLoader, CLEAR_COMMAND_DESCRIPTION, CLI_UPDATE_CACHE_TTL_MS, CLI_UPDATE_PACKAGE_NAME, CLI_UPDATE_REGISTRY_URL, CLI_UPDATE_TIMEOUT_MS, COST_COMMAND_DESCRIPTION, CommandRegistry, DEFAULT_AUTO_COMPACT_THRESHOLD, DEFAULT_STATUS_LINE_COMMAND_SETTINGS, EXECUTION_ORIGIN_METADATA_KEYS, EXIT_COMMAND_DESCRIPTION, EditCheckpointStore, HELP_COMMAND_DESCRIPTION, type IActionRequest, type IActionResponse, type IActiveModelChangeOptions, type IActiveModelChangeResult, type IAgentBackgroundTaskRequest, type IAgentDefinition, type IAgentExecutorOptions, type IAgentJobHostContext, type IAgentRuntime, type IAgentRuntimeConfig, type IAgentSession, type IAgentToolDeps, type IAppendMemoryInput, type IAppendMemoryResult, type IBackgroundJobGroupCreateRequest, type IBackgroundJobGroupState, type IBackgroundJobGroupSummary, type IBackgroundJobOrchestratorOptions, type IBackgroundJobResultEnvelope, type IBackgroundProcessToolDeps, type IBackgroundTaskError, type IBackgroundTaskHandle, type IBackgroundTaskInput, type IBackgroundTaskListFilter, type IBackgroundTaskLogCursor, type IBackgroundTaskLogPage, type IBackgroundTaskManager, type IBackgroundTaskManagerOptions, type IBackgroundTaskResult, type IBackgroundTaskRunner, type IBackgroundTaskSpawnerGroupRequest, type IBackgroundTaskStart, type IBackgroundTaskState, type IBaseBackgroundTaskRequest, type IBundlePluginFeatures, type IBundlePluginInstallerOptions, type IBundlePluginManifest, type IBundleSkill, type ICapabilityDescriptor, type ICheckForCliUpdateOptions, type ICliUpdateNotice, type ICommand, type ICommandAvailablePlugin, type ICommandChoicePromptOption, type ICommandExecutionToolDeps, type ICommandHostAdapters, type ICommandHostContext, type ICommandInfo, type ICommandInstalledPlugin, type ICommandInteraction, type ICommandInteractionHint, type ICommandListEntry, type ICommandMarketplaceSource, type ICommandMemoryStores, type ICommandModule, type ICommandPendingMemoryStore, type ICommandPermissionModeAdapter, type ICommandPickerAdapter, type ICommandPluginAdapter, type ICommandPluginReloadResult, type ICommandProcessAdapter, type ICommandProjectMemoryStore, type ICommandResult, type ICommandSessionInfo, type ICommandSessionReplayValidationReport, type ICommandSessionRuntime, type ICommandSettingsAdapter, type ICommandSettingsDocument, type ICommandSkillListEntry, type ICommandSource, type ICompactContextResult, type IConfigurableTransport, type IContextFileRefreshedEvent, type IContextReferenceAddResult, type IContextReferenceClearResult, type IContextReferenceInventoryLimits, type IContextReferenceItem, type IContextReferenceRemoveResult, type IContextReferenceUpsertResult, type ICreateExecutionWorkspaceSnapshotInput, type ICreateExecutionWorkspaceTaskSpawnerOptions, type ICreateLimitedOutputCaptureOptions, type ICreateLineDetailPageInput, type ICreateMainThreadDetailPageInput, type ICreateMainThreadEntryInput, type ICreateQueryOptions, type ICreateSessionOptions, type ICreateSessionResult, type IDiffLine, type IEditCheckpointFileInspection, type IEditCheckpointFileRecord, type IEditCheckpointInspection, type IEditCheckpointInspectionPlan, type IEditCheckpointManifest, type IEditCheckpointRecorder, type IEditCheckpointRestoreResult, type IEditCheckpointSummary, type IEditCheckpointTurnInput, type IExecutionDetailCursor, type IExecutionDetailPage, type IExecutionDetailRecord, type IExecutionOrigin, type IExecutionResult, type IExecutionWorkspaceEntry, type IExecutionWorkspaceEntryRef, type IExecutionWorkspaceEvent, type IExecutionWorkspaceFilter, type IExecutionWorkspaceSnapshot, type IExecutionWorkspaceSnapshotOptions, type IExecutionWorkspaceTaskSpawner, type IForkExecutionOptions, type IHeadlessSessionOptions, type IInProcessSubagentRunnerDeps, type IInspectUserLocalStorageOptions, type IInstalledPluginRecord, type IInteractionChannel, type IInteractiveRuntime, type IInteractiveRuntimeOptions, type IInteractiveSession, type IInteractiveSessionEvents, type IInteractiveSessionRecord, type IInteractiveSessionShutdownOptions, type IInteractiveSessionStore, type IKnownMarketplaceEntry, type ILegacyProviderSettings, type ILimitedOutputCapture, type ILoadedBundlePlugin, type IMarketplaceClientOptions, type IMarketplaceManifest, type IMarketplacePluginEntry, type IMemoryCandidate, type IMemoryEvent, type IMemoryPendingRecord, type IMemoryReference, type IModelCommandToolProjection, type IModelReapplyOptions, type IOrgPolicy, type IPermissionRequest, type IPermissionsCommandState, type IPickItem, type IPluginSettings, type IPreparedSubagentWorktree, type IPresetApplicationOptions, type IPresetApplicationResult, type IProcessBackgroundTaskRequest, type IProjectMemorySummary, type IProjectedCommandExecutionToolsDeps, type IProjectedModelCommandTool, type IPromptExecutorOptions, type IPromptFileReferenceDiagnostic, type IPromptFileReferenceHistoryData, type IPromptFileReferenceLimits, type IPromptFileReferenceRecord, type IPromptFileReferenceResolveOptions, type IPromptFileReferenceToken, type IPromptProvider, type IProviderCommandModuleOptions, type IProviderCommandSettingsAdapter, type IProviderProfileNameSuggestionInput, type IProviderProfileNameSuggestionOptions, type IProviderProfileSettings, type IProviderSettingsBuildOptions, type IProviderSettingsWriteTargetOptions, type IProviderSetupInput, type IProviderSetupPatch, type IProviderSwitchOptions, type IReadProviderSettingsOptions, type IResetUserConfigResult, type IResolveUserLocalStorageRootOptions, type IResolvedConfig, type IResolvedPromptFileReference, type IResolvedPromptFileReferences, type IResumableSessionSummary, type IReversibleExecutionOptions, type IReversibleToolSafetyContext, type IReversibleToolSafetyInput, type IReversibleToolSafetyReport, type ISelfHostingVerificationPlan, type ISelfHostingVerificationPlanInput, type ISelfHostingVerificationStep, type ISerializableProviderProfile, type ISkillActivationEvent, type ISkillActivationHistoryData, type ISkillExecutionCallbacks, type ISkillExecutionResult, type ISpawnAgentTaskRequest, type ISpawnProcessTaskRequest, type IStartupCliUpdatePolicyInput, type IStartupMemory, type IStatelessRuntimeConfig, type IStatusLineCommandSettings, type ISubagentJobHandle, type ISubagentJobResult, type ISubagentJobStart, type ISubagentJobState, type ISubagentManager, type ISubagentManagerOptions, type ISubagentOptions, type ISubagentPromptOptions, type ISubagentRunner, type ISubagentSpawnRequest, type ISubagentWorktreeAdapter, type ISubagentWorktreePrepareRequest, type ISystemCommand, type ITaskContextFile, type ITaskSelectionOptions, type IToolState, type IToolSummary, type ITransportAdapter, type ITransportConfig, type IUpdateCheckCache, type IUpdateTaskFileStatusOptions, type IUsageSnapshot, type IUserLocalMemoryDeleteResult, type IUserLocalMemoryItemOptions, type IUserLocalMemoryItemProjection, type IUserLocalMemoryListOptions, type IUserLocalMemoryListProjection, type IUserLocalMemorySetOptions, type IUserLocalStorageCategoryDefinition, type IUserLocalStorageCategoryProjection, type IUserLocalStorageInspection, type IUserLocalStorageItemSummary, type IWorktreeSubagentRunnerOptions, type InteractionEvent, InteractiveSession, LANGUAGE_COMMAND_ARGUMENT_HINT, LANGUAGE_COMMAND_DESCRIPTION, MEMORY_COMMAND_ARGUMENT_HINT, MEMORY_COMMAND_DESCRIPTION, MEMORY_COMMAND_USAGE, MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, MODEL_COMMAND_TOOL_PREFIX, MarketplaceClient, PERMISSIONS_COMMAND_DESCRIPTION, PERMISSION_MODE_ARGUMENT_HINT, PERMISSION_MODE_COMMAND_DESCRIPTION, PLUGIN_COMMAND_ARGUMENT_HINT, PLUGIN_COMMAND_DESCRIPTION, PROVIDER_SAFE_TOOL_NAME_PATTERN, type ParsedInput, PluginCommandSource, PluginSettingsStore, ProjectMemoryStore, PromptExecutor, ProviderConfigError, RECOMMENDED_RESPONSE_LANGUAGES, RELOAD_PLUGINS_COMMAND_DESCRIPTION, RENAME_COMMAND_DESCRIPTION, RENAME_COMMAND_USAGE, RESUME_COMMAND_DESCRIPTION, REWIND_COMMAND_ARGUMENT_HINT, REWIND_COMMAND_DESCRIPTION, STATUSLINE_COMMAND_ARGUMENT_HINT, STATUSLINE_COMMAND_DESCRIPTION, SettingsParseError, SkillCommandSource, type SkillPromptContext, SystemCommandExecutor, type TAutoCompactThreshold, type TAutoCompactThresholdSource, type TBackgroundJobGroupEvent, type TBackgroundJobGroupEventListener, type TBackgroundJobGroupIdFactory, type TBackgroundJobGroupStatus, type TBackgroundJobWaitPolicy, type TBackgroundPermissionPolicy, type TBackgroundPrimitive, type TBackgroundTaskErrorCategory, type TBackgroundTaskEvent, type TBackgroundTaskEventListener, type TBackgroundTaskIdFactory, type TBackgroundTaskIsolation, type TBackgroundTaskKind, type TBackgroundTaskMode, type TBackgroundTaskRequest, type TBackgroundTaskRunnerEvent, type TBackgroundTaskStatus, type TBackgroundTaskTimeoutReason, type TBackgroundTaskTransitionEvent, type TCapabilityKind, type TCapabilitySafety, type TCliUpdateCheckResult, type TCommandEffect, type TCommandInteractionPrompt, type TCommandModuleSessionRequirement, type TCommandResultDataValue, type TContextReferenceLoadType, type TContextReferenceStatus, type TEditCheckpointFileRestoreAction, type TEnabledPlugins, type TExecutionAttention, type TExecutionControl, type TExecutionDetailRecordKind, type TExecutionEntryKind, type TExecutionOriginKind, type TExecutionWorkspaceStatus, type TExecutionWorkspaceUpdateCause, type TExecutionWorkspaceVisibility, type TInstalledPluginsRegistry, type TInteractiveEventName, type TInteractivePermissionHandler, type TInteractiveSessionOptions, type TKnownMarketplacesRegistry, type TMarketplaceSource, type TMemoryCandidateStatus, type TMemoryType, type TPermissionResultValue, type TPluginInstallScope, type TPromptFileReferenceDiagnosticCode, type TPromptFileReferenceReason, type TProviderFactory, type TProviderSettingsDocument, type TQueryFunction, type TRecommendedResponseLanguage, type TReversibleExecutionIsolation, type TReversibleRollbackLayer, type TReversibleSafetyStatus, type TReversibleSideEffect, type TSelfHostingLoopEvent, type TSelfHostingLoopState, type TSelfHostingVerificationPhase, type TSessionFactory, type TSettingsCheck, type TSettingsData, type TSettingsScope, type TShellExecFn, type TSkillActivationInvocation, type TSkillActivationMode, type TSkillActivationSource, type TSkillActivationStatus, type TStatusLineCommandSettingsPatch, type TSubagentJobMode, type TSubagentJobStatus, type TSubagentRunnerFactory, type TSystemCommandLifecycle, type TTaskFileStatus, type TUserLocalMemoryCategory, type TUserLocalMemoryCommandExecutionEffect, type TUserLocalStorageCategory, USER_LOCAL_MEMORY_CATEGORIES, USER_LOCAL_STORAGE_CATEGORIES, USER_LOCAL_STORAGE_CATEGORY_DEFINITIONS, VALIDATE_SESSION_COMMAND_DESCRIPTION, VALID_PERMISSION_MODES, addCommandContextReference, applyActiveModelChange, applyPresetToSession, applyProviderConfiguration, applyProviderSwitch, applyStatusLineSettings, assembleSubagentPrompt, buildBackgroundCommandSubcommands, buildLanguageCommandSubcommands, buildMemoryCommandSubcommands, buildPermissionModeSubcommands, buildPluginCommandSubcommands, buildPromptWithFileReferences, buildProviderProfile, buildProviderSetupPatch, buildRewindCommandSubcommands, buildStatusLineCommandSubcommands, cancelCommandBackgroundTask, checkForCliUpdate, checkSettingsDocument, checkSettingsFile, clearCommandContextReferences, clearContextReferences, clearConversationHistory, closeCommandBackgroundTask, compactCommandContext, compareSemverVersions, createAgentRuntime, createAgentTool, createBackgroundGroupExecutionEntryId, createBackgroundProcessTool, createBackgroundTaskExecutionEntryId, createBuiltinCommandModule, createCommandExecutionTool, createCommandMemoryStores, createCommandPendingMemoryStore, createCommandProjectMemoryStore, createContextReferenceItem, createDefaultTools, createExecutionOriginMetadata, createExecutionWorkspaceSnapshot, createExecutionWorkspaceTaskSpawner, createInProcessSubagentRunner, createInteractiveRuntime, createLineDetailPage, createMainThreadDetailPage, createMainThreadExecutionEntryId, createModelCommandToolProjection, createPluginRegistryReloadRequestedEffect, createPluginTuiRequestedEffect, createProjectSessionStore, createProjectedCommandExecutionTools, createPromptFileReferenceHistoryEntry, createProviderFromSettings, createProviderSafeModelCommandToolName, createQuery, createSessionExitRequestedEffect, createSessionPickerRequestedEffect, createSessionRenamedEffect, createStatelessRuntime, createSubagentLogger, createSubagentSession, createSystemCommands, createTestInteractiveSession, deleteProviderProfile, deleteSettings, deleteUserLocalMemoryItem, disableUserLocalMemoryItem, discoverTaskFiles, evaluateReversibleToolSafety, executeSkill, formatCliUpdateCheckMessage, formatCliUpdateNotice, formatCommandBackgroundTask, formatCommandBackgroundTaskList, formatCommandHelpMessage, formatCommandPermissionsMessage, formatCommandSessionReplayValidationReport, formatEnvReference, formatInvalidPermissionModeMessage, formatLanguageUsageMessage, formatOrgPolicyViolationMessage, formatProjectedModelCommandToolPromptDescription, formatPromptFileReferenceDiagnostics, formatTaskContext, getBuiltInAgent, getForkWorkerSuffix, getProviderSettingsPaths, getStartupCliUpdateNotice, getSubagentSuffix, getUserSettingsPath, getUserUpdateCheckCachePath, hasBlockingPromptFileReferenceDiagnostics, hasSensitiveCommandMemoryContent, hasUsableSecretReference, inspectCommandEditCheckpoint, inspectUserLocalMemoryItem, inspectUserLocalStorage, isApiKeyPlaintext, isCommandMemoryType, isEnvReference, isMemoryType, isNewerSemverVersion, isPermissionMode, isSlashCommand, isStatusLineCommandSettingsPatch, listActiveContextReferences, listCommandBackgroundTasks, listCommandContextReferences, listCommandEditCheckpoints, listCommandSessionAllowedTools, listCommandUsedMemoryReferences, listResumableSessionSummaries, listUserLocalMemoryItems, loadOrgPolicy, loadTaskContext, mergeProviderPatch, mergeProviders, mergeSettings, normalizeModelCommandName, parseCommandBackgroundLogCursor, parseExecutionWorkspaceEntryId, parseFrontmatter, parseInput, parseLanguageArgument, parsePermissionModeArgument, parsePromptFileReferences, parseSessionNameArgument, parseTaskFile, planSelfHostingVerification, preprocessShellCommands, probeProviderProfile, projectPaths, promptForApproval, readAutoCompactThreshold, readAutoCompactThresholdSource, readCommandBackgroundTaskLog, readCommandContextState, readCommandPermissionMode, readCommandPermissionsState, readCommandSessionInfo, readCurrentGitBranch, readEnabledUserLocalMemoryItem, readMergedProviderSettings, readMergedProviderSettingsFromPaths, readPackageVersion, readProviderSettings, readSettings, readStatusLineSettings, readUpdateCheckCache, recordCommandMemoryEvent, removeCommandContextReference, removeContextReference, resetAutoCompactThresholdSetting, resetUserConfig, resolveActiveProvider, resolveEnvDefaultProvider, resolveEnvReference, resolveGitBranch, resolveLatestSessionId, resolvePermissionModeAdapter, resolvePluginCommandAdapter, resolvePromptFileReferencePaths, resolvePromptFileReferences, resolveProviderSettingsWriteTargetPath, resolveSessionIdByIdOrName, resolveSettingsPathForScope, resolveSubagentLogDir, resolveUserLocalStorageRoot, restoreCommandEditCheckpoint, retrieveAgentToolDeps, rollbackCommandEditCheckpoint, sanitizeProviderProfileName, selectRelevantTasks, setCommandAutoCompactThreshold, setCurrentProvider, setUserLocalMemoryItem, shouldRunStartupCliUpdateCheck, storeAgentToolDeps, substituteVariables, suggestProviderProfileName, summarizeBackgroundJobGroup, testProviderProfileCommand, toContextReferenceRecords, toPromptFileReferenceRecords, tokeniseSlashCommand, transitionSelfHostingLoop, updateModelInSettings, updateTaskFileStatus, upsertContextReference, upsertProviderProfile, userPaths, validateCommandSessionReplayLog, validateProviderProfile, wrapEditCheckpointTools, wrapReversibleExecutionTools, writeAutoCompactThresholdSetting, writeCommandPermissionMode, writeSettings, writeUpdateCheckCache };
|
|
484
|
+
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_GOAL_MAX_ITERATIONS, DEFAULT_GOAL_NO_PROGRESS_LIMIT, DEFAULT_STATUS_LINE_COMMAND_SETTINGS, EXECUTION_ORIGIN_METADATA_KEYS, EXIT_COMMAND_DESCRIPTION, EditCheckpointStore, GOAL_SIGNAL_TOOL_NAME, GoalController, HELP_COMMAND_DESCRIPTION, type IActiveModelChangeOptions, type IActiveModelChangeResult, type IAgentDefinition, type IAgentExecutorOptions, type IAgentJobHostContext, type IAgentRuntime, type IAgentRuntimeConfig, type IAgentSession, type IAgentToolDeps, type IAppendMemoryInput, type IAppendMemoryResult, type IBackgroundJobOrchestratorOptions, type IBackgroundProcessToolDeps, type IBackgroundTaskHandle, type IBackgroundTaskManager, type IBackgroundTaskManagerOptions, type IBackgroundTaskRunner, type IBackgroundTaskSpawnerGroupRequest, type IBackgroundTaskStart, type IBundlePluginFeatures, type IBundlePluginInstallerOptions, type IBundlePluginManifest, type IBundleSkill, type ICheckForCliUpdateOptions, type ICliUpdateNotice, type ICommandExecutionToolDeps, type ICommandHostAdapters, type ICommandHostContext, type ICommandMemoryStores, type ICommandModule, type ICommandPendingMemoryStore, type ICommandPermissionModeAdapter, type ICommandPickerAdapter, type ICommandProcessAdapter, type ICommandProjectMemoryStore, type ICommandSessionInfo, type ICommandSessionReplayValidationReport, type ICommandSessionRuntime, type ICommandSettingsAdapter, type ICommandSettingsDocument, type ICommandSkillListEntry, type ICompactContextResult, type IContextReferenceAddResult, type IContextReferenceClearResult, type IContextReferenceInventoryLimits, type IContextReferenceRemoveResult, type IContextReferenceUpsertResult, type ICreateExecutionWorkspaceTaskSpawnerOptions, type ICreateLimitedOutputCaptureOptions, type ICreateQueryOptions, type ICreateSessionOptions, type ICreateSessionResult, type IEditCheckpointFileInspection, type IEditCheckpointFileRecord, type IEditCheckpointInspection, type IEditCheckpointInspectionPlan, type IEditCheckpointManifest, type IEditCheckpointRecorder, type IEditCheckpointRestoreResult, type IEditCheckpointSummary, type IEditCheckpointTurnInput, type IExecutionWorkspaceTaskSpawner, type IForkExecutionOptions, type IGoalSignal, type IGoalStartOptions, type IHeadlessSessionOptions, type IInProcessSubagentRunnerDeps, type IInspectUserLocalStorageOptions, type IInstalledPluginRecord, type IInteractiveRuntime, type IInteractiveRuntimeOptions, type IInteractiveSessionShutdownOptions, type IKnownMarketplaceEntry, type ILegacyProviderSettings, type ILimitedOutputCapture, type ILoadedBundlePlugin, type IMarketplaceClientOptions, type IMarketplaceManifest, type IMarketplacePluginEntry, type IMemoryCandidate, type IMemoryPendingRecord, type IModelCommandToolProjection, type IModelReapplyOptions, type IOrgPolicy, type IPermissionsCommandState, type IPluginSettings, type IPreparedSubagentWorktree, type IPresetApplicationOptions, type IPresetApplicationResult, type IProjectMemorySummary, type IProjectedCommandExecutionToolsDeps, type IProjectedModelCommandTool, type IPromptExecutorOptions, type IPromptFileReferenceDiagnostic, type IPromptFileReferenceHistoryData, type IPromptFileReferenceLimits, type IPromptFileReferenceResolveOptions, type IPromptFileReferenceToken, type IPromptProvider, type IProviderCommandModuleOptions, type IProviderCommandSettingsAdapter, type IProviderProfileNameSuggestionInput, type IProviderProfileNameSuggestionOptions, type IProviderProfileSettings, type IProviderSettingsBuildOptions, type IProviderSettingsWriteTargetOptions, type IProviderSetupInput, type IProviderSetupPatch, type IProviderSwitchOptions, type IReadProviderSettingsOptions, type IResetUserConfigResult, type IResolveUserLocalStorageRootOptions, type IResolvedConfig, type IResolvedPromptFileReference, type IResolvedPromptFileReferences, type IReversibleExecutionOptions, type IReversibleToolSafetyContext, type IReversibleToolSafetyInput, type IReversibleToolSafetyReport, type ISelfHostingVerificationPlan, type ISelfHostingVerificationPlanInput, type ISelfHostingVerificationStep, type ISkillActivationHistoryData, type ISkillExecutionCallbacks, type ISkillExecutionResult, type ISkillPromptContext, type ISpawnAgentTaskRequest, type ISpawnProcessTaskRequest, type IStartupCliUpdatePolicyInput, type IStartupMemory, type IStatelessRuntimeConfig, type ISubagentJobHandle, type ISubagentJobResult, type ISubagentJobStart, type ISubagentManager, type ISubagentManagerOptions, type ISubagentOptions, type ISubagentPromptOptions, type ISubagentRunner, type ISubagentSpawnRequest, type ISubagentWorktreeAdapter, type ISubagentWorktreePrepareRequest, type ISystemCommand, type ITaskContextFile, type ITaskSelectionOptions, type IUpdateCheckCache, type IUpdateTaskFileStatusOptions, type IUserLocalMemoryDeleteResult, type IUserLocalMemoryItemOptions, type IUserLocalMemoryItemProjection, type IUserLocalMemoryListOptions, type IUserLocalMemoryListProjection, type IUserLocalMemorySetOptions, type IUserLocalStorageCategoryDefinition, type IUserLocalStorageCategoryProjection, type IUserLocalStorageInspection, type IUserLocalStorageItemSummary, type IWorktreeSubagentRunnerOptions, InteractiveSession, LANGUAGE_COMMAND_ARGUMENT_HINT, LANGUAGE_COMMAND_DESCRIPTION, MEMORY_COMMAND_ARGUMENT_HINT, MEMORY_COMMAND_DESCRIPTION, MEMORY_COMMAND_USAGE, MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, MODEL_COMMAND_TOOL_PREFIX, MarketplaceClient, PERMISSIONS_COMMAND_DESCRIPTION, PERMISSION_MODE_ARGUMENT_HINT, PERMISSION_MODE_COMMAND_DESCRIPTION, PLUGIN_COMMAND_ARGUMENT_HINT, PLUGIN_COMMAND_DESCRIPTION, PROVIDER_SAFE_TOOL_NAME_PATTERN, PluginCommandSource, PluginSettingsStore, ProjectMemoryStore, PromptExecutor, ProviderConfigError, RECOMMENDED_RESPONSE_LANGUAGES, RELOAD_PLUGINS_COMMAND_DESCRIPTION, RENAME_COMMAND_DESCRIPTION, RENAME_COMMAND_USAGE, RESUME_COMMAND_DESCRIPTION, REWIND_COMMAND_ARGUMENT_HINT, REWIND_COMMAND_DESCRIPTION, STATUSLINE_COMMAND_ARGUMENT_HINT, STATUSLINE_COMMAND_DESCRIPTION, SettingsParseError, SkillCommandSource, SystemCommandExecutor, type TAutoCompactThreshold, type TAutoCompactThresholdSource, type TBackgroundTaskIdFactory, type TBackgroundTaskRunnerEvent, type TBackgroundTaskTransitionEvent, type TCliUpdateCheckResult, type TCommandModuleSessionRequirement, type TEditCheckpointFileRestoreAction, type TEnabledPlugins, type TGoalDecision, type TInstalledPluginsRegistry, type TInteractiveSessionOptions, type TKnownMarketplacesRegistry, type TMarketplaceSource, type TMemoryCandidateStatus, type TParsedInput, type TPromptFileReferenceDiagnosticCode, type TProviderFactory, type TProviderSettingsDocument, type TQueryFunction, type TRecommendedResponseLanguage, type TReversibleExecutionIsolation, type TReversibleRollbackLayer, type TReversibleSafetyStatus, type TReversibleSideEffect, type TSelfHostingLoopEvent, type TSelfHostingLoopState, type TSelfHostingVerificationPhase, type TSessionFactory, type TSettingsCheck, type TSettingsData, type TSettingsScope, type TShellExecFn, type TSubagentRunnerFactory, type TSystemCommandLifecycle, type TTaskFileStatus, type TUserLocalMemoryCategory, type TUserLocalMemoryCommandExecutionEffect, type TUserLocalStorageCategory, USER_LOCAL_MEMORY_CATEGORIES, USER_LOCAL_STORAGE_CATEGORIES, USER_LOCAL_STORAGE_CATEGORY_DEFINITIONS, VALIDATE_SESSION_COMMAND_DESCRIPTION, VALID_PERMISSION_MODES, addCommandContextReference, applyActiveModelChange, applyPresetToSession, applyProviderConfiguration, applyProviderSwitch, applyStatusLineSettings, assembleSubagentPrompt, buildBackgroundCommandSubcommands, buildGoalContinuationPrompt, buildGoalStartPrompt, buildLanguageCommandSubcommands, buildMemoryCommandSubcommands, buildPermissionModeSubcommands, buildPluginCommandSubcommands, buildPromptWithFileReferences, buildProviderProfile, buildProviderSetupPatch, buildRewindCommandSubcommands, buildStatusLineCommandSubcommands, cancelCommandBackgroundTask, checkForCliUpdate, checkSettingsDocument, checkSettingsFile, clearCommandContextReferences, clearContextReferences, clearConversationHistory, closeCommandBackgroundTask, compactCommandContext, compareSemverVersions, createAgentRuntime, createAgentTool, createBackgroundGroupExecutionEntryId, createBackgroundProcessTool, createBackgroundTaskExecutionEntryId, createBuiltinCommandModule, createCommandExecutionTool, createCommandMemoryStores, createCommandPendingMemoryStore, createCommandProjectMemoryStore, createContextReferenceItem, createDefaultTools, createExecutionOriginMetadata, createExecutionWorkspaceSnapshot, createExecutionWorkspaceTaskSpawner, createGoalStatusTool, createInProcessSubagentRunner, createInteractiveRuntime, createLineDetailPage, createMainThreadDetailPage, createMainThreadExecutionEntryId, createModelCommandToolProjection, createPluginRegistryReloadRequestedEffect, createPluginTuiRequestedEffect, createProjectSessionStore, createProjectedCommandExecutionTools, createPromptFileReferenceHistoryEntry, createProviderFromSettings, createProviderSafeModelCommandToolName, createQuery, createSessionExitRequestedEffect, createSessionPickerRequestedEffect, createSessionRenamedEffect, createStatelessRuntime, createSubagentLogger, createSubagentSession, createSystemCommands, createUserSessionStore, deleteProviderProfile, deleteSettings, deleteUserLocalMemoryItem, disableUserLocalMemoryItem, discoverTaskFiles, evaluateReversibleToolSafety, executeSkill, extractGoalSignal, formatCliUpdateCheckMessage, formatCliUpdateNotice, formatCommandBackgroundTask, formatCommandBackgroundTaskList, formatCommandHelpMessage, formatCommandPermissionsMessage, formatCommandSessionReplayValidationReport, formatEnvReference, formatInvalidPermissionModeMessage, formatLanguageUsageMessage, formatOrgPolicyViolationMessage, formatProjectedModelCommandToolPromptDescription, formatPromptFileReferenceDiagnostics, formatTaskContext, generateSessionName, getBuiltInAgent, getForkWorkerSuffix, getProviderSettingsPaths, getStartupCliUpdateNotice, getSubagentSuffix, getUserSettingsPath, getUserUpdateCheckCachePath, hasBlockingPromptFileReferenceDiagnostics, hasSensitiveCommandMemoryContent, hasUsableSecretReference, inspectCommandEditCheckpoint, inspectUserLocalMemoryItem, inspectUserLocalStorage, isApiKeyPlaintext, isCommandMemoryType, isEnvReference, isMemoryType, isNewerSemverVersion, isPermissionMode, isSlashCommand, isStatusLineCommandSettingsPatch, listActiveContextReferences, listCommandBackgroundTasks, listCommandContextReferences, listCommandEditCheckpoints, listCommandSessionAllowedTools, listCommandUsedMemoryReferences, listResumableSessionSummaries, listUserLocalMemoryItems, loadOrgPolicy, loadTaskContext, mergeProviderPatch, mergeProviders, mergeSettings, normalizeModelCommandName, parseCommandBackgroundLogCursor, parseExecutionWorkspaceEntryId, parseFrontmatter, parseInput, parseLanguageArgument, parsePermissionModeArgument, parsePromptFileReferences, parseSessionNameArgument, parseTaskFile, planSelfHostingVerification, preprocessShellCommands, probeProviderProfile, projectPaths, promptForApproval, readAutoCompactThreshold, readAutoCompactThresholdSource, readCommandBackgroundTaskLog, readCommandContextState, readCommandPermissionMode, readCommandPermissionsState, readCommandSessionInfo, readCurrentGitBranch, readEnabledUserLocalMemoryItem, readMergedProviderSettings, readMergedProviderSettingsFromPaths, readPackageVersion, readProviderSettings, readSettings, readStatusLineSettings, readUpdateCheckCache, recordCommandMemoryEvent, removeCommandContextReference, removeContextReference, resetAutoCompactThresholdSetting, resetUserConfig, resolveActiveProvider, resolveEnvDefaultProvider, resolveEnvReference, resolveGitBranch, resolveLatestSessionId, resolvePermissionModeAdapter, resolvePluginCommandAdapter, resolvePromptFileReferencePaths, resolvePromptFileReferences, resolveProviderSettingsWriteTargetPath, resolveSessionIdByIdOrName, resolveSettingsPathForScope, resolveSubagentLogDir, resolveUserLocalStorageRoot, restoreCommandEditCheckpoint, retrieveAgentToolDeps, rollbackCommandEditCheckpoint, sanitizeProviderProfileName, selectRelevantTasks, setCommandAutoCompactThreshold, setCurrentProvider, setUserLocalMemoryItem, shouldRunStartupCliUpdateCheck, storeAgentToolDeps, substituteVariables, suggestProviderProfileName, summarizeBackgroundJobGroup, testProviderProfileCommand, toContextReferenceRecords, toPromptFileReferenceRecords, tokeniseSlashCommand, transitionSelfHostingLoop, updateModelInSettings, updateTaskFileStatus, upsertContextReference, upsertProviderProfile, userPaths, validateCommandSessionReplayLog, validateProviderProfile, wrapEditCheckpointTools, wrapReversibleExecutionTools, writeAutoCompactThresholdSetting, writeCommandPermissionMode, writeSettings, writeUpdateCheckCache };
|
|
2940
485
|
//# sourceMappingURL=index.d.ts.map
|