@robota-sdk/agent-framework 3.0.0-beta.78 → 3.0.0-beta.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +190 -41
- package/dist/node/createInteractiveRuntime-CKt44Pva.d.cts +9457 -0
- package/dist/node/createInteractiveRuntime-CKt44Pva.d.cts.map +1 -0
- package/dist/node/createInteractiveRuntime-GD7gJ7ig.d.ts +9457 -0
- package/dist/node/createInteractiveRuntime-GD7gJ7ig.d.ts.map +1 -0
- package/dist/node/index.cjs +29 -3
- package/dist/node/index.d.cts +1646 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.d.ts +1350 -189
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +29 -3
- package/dist/node/index.js.map +1 -1
- package/dist/node/interactive-BpTvVVtf.cjs +122 -0
- package/dist/node/interactive-Bqe03GGe.js +123 -0
- package/dist/node/interactive-Bqe03GGe.js.map +1 -0
- package/dist/node/testing/index.cjs +2 -2
- package/dist/node/testing/index.d.cts +240 -0
- package/dist/node/testing/index.d.cts.map +1 -0
- package/dist/node/testing/index.d.ts +98 -15
- package/dist/node/testing/index.d.ts.map +1 -1
- package/dist/node/testing/index.js +2 -2
- package/dist/node/testing/index.js.map +1 -1
- package/package.json +70 -24
- package/dist/node/index-BeYNnJed.d.ts +0 -2656
- package/dist/node/index-BeYNnJed.d.ts.map +0 -1
- package/dist/node/index-DLFjpsfm.d.ts +0 -2658
- package/dist/node/index-DLFjpsfm.d.ts.map +0 -1
- package/dist/node/interactive-C93XBn4U.js +0 -111
- package/dist/node/interactive-C93XBn4U.js.map +0 -1
- package/dist/node/interactive-D1dVksoo.cjs +0 -110
package/dist/node/index.d.ts
CHANGED
|
@@ -1,21 +1,524 @@
|
|
|
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 {
|
|
3
|
-
import {
|
|
4
|
-
import { IBackgroundTaskRunner as IBackgroundTaskRunner$1 } from "@robota-sdk/agent-executor";
|
|
1
|
+
import { $ as IHostBundlePluginLoaderOptions, $a as ICommandHostPresetApplication, $c as EXECUTION_ORIGIN_METADATA_KEYS, $i as THostSettingsScope, $n as ICommandSessionInfo, $o as IPromptFileReferenceResolveOptions, $r as writeCommandPermissionMode, $s as isSafeSessionId, $t as IReversibleToolSafetyReport, A as hasBlockingPromptFileReferenceDiagnostics, Aa as deleteProviderProfile, Ac as IOutputStylePrompt, Ai as IActiveModelChangeResult, Al as IEditCheckpointRestoreResult, An as createSystemCommands, Ao as GOAL_SIGNAL_TOOL_NAME, Ar as isStatusLineCommandSettingsPatch, As as ICommandWorkspaceAdapter, At as ISkillPromptContext, B as IForkExecutionOptions, Ba as TSystemCommandLifecycle, Bc as IBackgroundTaskRunner, Bi as TSettingsScope, Bl as TEffortSelection, Bn as REWIND_COMMAND_ARGUMENT_HINT, Bo as IContextReferenceClearResult, Br as TPermissionRuleKind, Bs as IAdvisorStatus, Bt as TSubagentRunnerFactory, C as TSettingsMergeRule, Ca as IProviderProfileSettings, Cc as TWorkspaceProjectAuthorityCandidate, Ci as readProviderSettings, Cl as IOrgPolicy, Cn as IContributionSource, Co as IStartupMemory, Cr as isAppearanceSettingsPatch, Cs as ICommandPickerAdapter, Ct as BuiltinCommandSource, D as buildPromptWithFileReferences, Da as TProviderSettingsDocument, Dc as TWorkspaceProjectStateDirectories, Di as readMergedProviderSettingsFromSources, Dl as IEditCheckpointInspectionPlan, Dn as TEnvResolvedSettings, Do as isMemoryType, Dr as STATUSLINE_COMMAND_DESCRIPTION, Ds as ICommandSandboxStatus, Dt as retrieveAgentToolDeps, E as parsePromptFileReferences, Ea as IProviderSetupPatch, Ec as TWorkspaceProjectSettingsWriteDecision, Ei as mergeSettings, El as IEditCheckpointInspection, En as IResolvedConfig, Eo as ProjectMemoryStore, Er as STATUSLINE_COMMAND_ARGUMENT_HINT, Es as ICommandSandboxAdapter, Et as createAgentTool, F as IPromptHistoryOptions, Fa as ICommandModule, Fc as IAgentJobLogs, Fi as resolveProviderSettingsWriteTarget, Fl as IAgentDefinition, Fn as createCommandMemoryStores, Fo as IGoalSignal, Fr as IPermissionsCommandState, Fs as TRemoteControlStatus, Ft as ICreateSessionOptions, G as selectCommandModules, Ga as ICommandHostCatalog, Gc as ISpawnProcessTaskRequest, Gi as IProjectSettingsPath, Gn as listCommandEditCheckpointBranches, Go as createContextReferenceItem, Gr as groupPermissionRulesBySource, Gs as IHostToolResultSpillStore, Gt as ISubagentPromptOptions, H as ISkillExecutionResult, Ha as ICommandHostAdapterAccess, Hc as ICreateExecutionWorkspaceTaskSpawnerOptions, Hi as readSettings, Hl as parseModelEffort, Hn as buildRewindCommandSubcommands, Ho as IContextReferenceRemoveResult, Hr as buildPermissionModeSubcommands, Hs as formatAdvisorSpec, Ht as ISubagentOptions, I as IRemoteCommandPolicy, Ia as TCommandModuleSessionRequirement, Ic as IAgentJobMonitors, Ii as createWorkspaceProjectSettingsStore, Il as IProviderErrorGuidance, In as hasSensitiveCommandMemoryContent, Io as IGoalStartOptions, Ir as PERMISSIONS_COMMAND_DESCRIPTION, Is as TSandboxCommandMode, It as TSessionResponseFormat, J as BundlePluginInstaller, Ja as ICommandHostContextReferences, Jc as createMainThreadDetailPage, Ji as TSettingsSource, Jn as rollbackCommandEditCheckpoint, Jo as toContextReferenceRecords, Jr as parsePermissionModeArgument, Js as createNodeHostSessionStore, Jt as getForkWorkerSuffix, K as SystemCommandExecutor, Ka as ICommandHostCheckpoints, Kc as createExecutionWorkspaceTaskSpawner, Ki as IWorkspaceProjectSettingsSource, Kn as listCommandEditCheckpoints, Ko as listActiveContextReferences, Kr as isPermissionMode, Ks as IInteractiveSessionRecord$1, Kt as TSubagentSuffix, L as createDefaultRemoteCommandPolicy, La as DuplicateSystemCommandSemanticRoleError, Lc as IAgentJobSchedules, Li as createNodeHostSettingsStore, Ll as IModelEffortInputs, Ln as isCommandMemoryType, Lo as TGoalDecision, Lr as PERMISSION_MODE_ARGUMENT_HINT, Ls as ADVISOR_OFF, Lt as IToolCallHandoffPolicy, M as IExecutionResult$1, Ma as setCurrentProvider, Mc as IAgentJobDispatch, Mi as applyActiveModelChange, Ml as IEditCheckpointTurnInput, Mn as MEMORY_COMMAND_DESCRIPTION, Mo as DEFAULT_GOAL_MAX_ITERATIONS, Mr as IPresetApplicationResult, Ms as IHandoffStaysBehind, Mt as preprocessShellCommands, N as TInteractivePermissionHandler, Na as upsertProviderProfile, Nc as IAgentJobGroups, Ni as applyProviderConfiguration, Nl as TEditCheckpointFileRestoreAction, Nn as MEMORY_COMMAND_USAGE, No as DEFAULT_GOAL_NO_PROGRESS_LIMIT, Nr as applyPresetToSession, Ns as IPermissionRuleLayer, Nt as substituteVariables, O as createPromptFileReferenceHistoryEntry, Oa as buildProviderProfile, Oc as TWorkspaceProjectStateNamespace, Oi as resolveActiveProvider, Ol as IEditCheckpointManifest, On as TSandboxSettings, Oo as buildGoalContinuationPrompt, Or as applyStatusLineSettings, Os as ICommandSettingsAdapter, Ot as storeAgentToolDeps, P as TPermissionResultValue$1, Pa as validateProviderProfile, Pc as IAgentJobHostContext, Pi as applyProviderSwitch, Pl as ICapabilityDescriptor, Pn as buildMemoryCommandSubcommands, Po as GoalController, Pr as IPermissionRuleGroup, Ps as IWorkspaceMoveRequest, Pt as ILivePromptTracePort, Q as MarketplaceClient, Qa as ICommandHostPlan, Qc as createExecutionWorkspaceSnapshot, Qi as createNodeHostSettingsSource, Qn as EXIT_COMMAND_DESCRIPTION, Qo as IPromptFileReferenceLimits, Qr as retryCommandPermissionDenial, Qs as createUserSessionStore, Qt as IReversibleToolSafetyInput, R as ISkillActivationHistoryData, Ra as ISystemCommand, Rc as MONITOR_SHELL_TOOL, Ri as ISettingsDocumentStore, Rl as IModelEffortResolution, Rn as listCommandUsedMemoryReferences, Ro as extractGoalSignal, Rr as PERMISSION_MODE_COMMAND_DESCRIPTION, Rs as IAdvisorSetResult, Rt as IToolCallHandoffProvenance, S as IHookDefinitionSource, Sa as ILegacyProviderSettings, Sc as TWorkspaceProjectAccess, Si as readMergedProviderSettings, Sl as ICommandResult, Sn as inspectSkillSources, So as IProjectMemorySummary, Sr as applyAppearanceSettings, Ss as ICommandPermissionRulesAdapter, St as TMarketplaceSource, T as resolvePromptFileReferences, Ta as IProviderSetupInput, Tc as TWorkspaceProjectSettingsTarget, Ti as mergeProviders, Tl as IEditCheckpointFileRecord, Tn as ILoadContextOptions, To as MEMORY_INDEX_MAX_LINES, Tr as DEFAULT_STATUS_LINE_COMMAND_SETTINGS, Ts as ICommandRemoteControlAdapter, Tt as CommandRegistry, U as executeSkill, Ua as ICommandHostAgentJobs, Uc as IExecutionWorkspaceTaskSpawner, Ui as updateModelInSettings, Ul as resolveModelEffort, Un as forkCommandEditCheckpoint, Uo as IContextReferenceUpsertResult, Ur as formatCommandPermissionsMessage, Us as parseAdvisorSpec, Ut as ISubagentParentContext, V as ISkillExecutionCallbacks, Va as TSystemCommandSemanticRole, Vc as IBackgroundTaskSpawnerGroupRequest, Vi as deleteSettings, Vl as TEffortSource, Vn as REWIND_COMMAND_DESCRIPTION, Vo as IContextReferenceInventoryLimits, Vr as VALID_PERMISSION_MODES, Vs as ICommandAdvisorAdapter, Vt as createInProcessSubagentRunner, W as findUnknownModuleNames, Wa as ICommandHostBackgroundTasks, Wc as ISpawnAgentTaskRequest, Wi as writeSettings, Wn as inspectCommandEditCheckpoint, Wo as clearContextReferences, Wr as formatInvalidPermissionModeMessage, Ws as resolveStartupAdvisorSpec, Wt as createSubagentSession, X as IInstalledPluginRecord, Xa as ICommandHostGoal, Xc as TExecutionAttachOutcome, Xi as readSettingsSourceText, Xn as CLEAR_COMMAND_DESCRIPTION, Xo as IPromptFileReferenceDiagnostic, Xr as readCommandPermissionsState, Xs as createProjectSessionStore, Xt as IReversibleExecutionOptions, Y as IBundlePluginInstallerOptions, Ya as ICommandHostContextWindow, Yc as IResolveExecutionAttachInput, Yi as createWorkspaceProjectSettingsSources, Yn as switchCommandEditCheckpointBranch, Yo as upsertContextReference, Yr as readCommandPermissionMode, Ys as createNodeToolResultSpillStore, Yt as getSubagentSuffix, Z as TInstalledPluginsRegistry, Za as ICommandHostMemory, Zc as resolveExecutionAttach, Zi as INodeHostSettingsSource, Zn as COST_COMMAND_DESCRIPTION, Zo as IPromptFileReferenceHistoryData, Zr as resolvePermissionModeAdapter, Zs as createUserPromptHistoryFile, Zt as IReversibleToolSafetyContext, _ as ISessionRecordRestoreResult, _a as resetAutoCompactThresholdSetting, _c as IWorkspaceTrustCause, _i as HELP_COMMAND_DESCRIPTION, _l as ICommandSessionReplayValidationReport, _n as ISkillRootInspection, _o as IMemoryRetrievalResult, _r as resolvePluginCommandAdapter, _s as ICommandMCPOAuthStatus, _t as IKnownMarketplaceEntry, a as PeerMessageIngress, aa as AUTO_COMPACT_THRESHOLD_SETTINGS_KEY, ac as WorkspaceSessionLogSource, ai as formatLanguageUsageMessage, al as BackgroundJobOrchestrator, an as wrapReversibleExecutionTools, ao as IMemoryBudget, ar as createSessionExitHostAction, as as EditCheckpointStore, at as IBundlePluginHookIssue, b as createSubagentLogger, ba as IProviderCommandModuleOptions, bc as IWorkspaceTrustStoreSnapshot, bi as ProviderConfigError, bl as IUnknownCommandModuleName, bn as SkillCommandSource, bo as IAppendMemoryInput, br as IAppearanceSettings, bs as ICommandOutputStyleSummary, bt as IMarketplacePluginEntry, c as IInteractiveSessionShutdownOptions, ca as TAutoCompactThreshold, cc as IWorkspaceAncestorTextEntry, ci as BACKGROUND_COMMAND_USAGE, cl as ISessionUsageRecord, cn as PromptExecutor, co as IMemoryStore, cr as formatCommandSessionReplayValidationReport, cs as ICommandEffortAdapter, ct as IBundlePluginMcpFault, d as IAuthenticatedExternalEvent, da as compactCommandContext, dc as IWorkspaceIdentityResolver, di as closeCommandBackgroundTask, dl as ICommandSessionIdentity, dn as IAgentExecutorOptions, do as ISemanticMemoryAdapter, dr as validateCommandSessionReplayLog, ds as ICommandMCPActivationAdapter, dt as IBundleSkill, ea as TSettingsCheck, ec as listResumableSessionSummaries, ei as LANGUAGE_COMMAND_ARGUMENT_HINT, el as createBackgroundGroupExecutionEntryId, en as TReversibleExecutionIsolation, eo as ICommandHostSessionAccess, er as RENAME_COMMAND_DESCRIPTION, es as IPromptFileReferenceToken, et as createHostBundlePluginLoader, f as IExternalEventReceipt, fa as listCommandContextReferences, fc as IWorkspaceProjectAuthority, fi as formatCommandBackgroundTask, fl as ICommandSessionModel, fn as IAgentSession, fo as ISemanticMemoryQueryResult, fr as PLUGIN_COMMAND_ARGUMENT_HINT, fs as ICommandMCPActivationSummary, ft as ILoadedBundlePlugin, g as IInteractiveSession$1, ga as removeCommandContextReference, gc as IWorkspaceProjectStateStorage, gi as readCommandBackgroundTaskLog, gl as ICommandHostNoCapability, gn as ISkillRootDescriptor, go as IMemoryPendingRecord, gr as createShowPluginManagerIntent, gs as ICommandMCPOAuthRedirectPrompt, gt as NodeHostPluginSettingsStore, h as TExternalEventSettlement, ha as readCommandContextState, hc as IWorkspaceProjectSettingsWriter, hi as parseCommandBackgroundLogCursor, hl as ICommandSessionRuntime, hn as listFrameworkProjectContributionPaths, ho as IMemoryExtractionInput, hr as buildPluginCommandSubcommands, hs as ICommandMCPOAuthLogoutResult, ht as IPluginSettings, i as IInteractiveRuntime, ia as testProviderProfileCommand, ic as WorkspaceSessionLogSink, ii as buildLanguageCommandSubcommands, il as parseExecutionWorkspaceEntryId, in as evaluateReversibleToolSafety, io as IDurableMemoryReader, ir as clearConversationHistory, is as wrapEditCheckpointTools, it as IBundlePluginFeatures, j as toPromptFileReferenceRecords, ja as mergeProviderPatch, jc as IPresetApplicationOptions, ji as IProviderSwitchOptions, jl as IEditCheckpointSummary, jn as MEMORY_COMMAND_ARGUMENT_HINT, jo as createGoalStatusTool, jr as readStatusLineSettings, js as IHandoffProgress, jt as TShellExecFn, k as formatPromptFileReferenceDiagnostics, ka as buildProviderSetupPatch, kc as TWorkspaceTrustState, ki as IActiveModelChangeOptions, kl as IEditCheckpointRecorder, kn as TSettings, ko as buildGoalStartPrompt, kr as buildStatusLineCommandSubcommands, ks as ICommandSettingsDocument, kt as IAgentToolDeps, l as InteractiveSession, la as addCommandContextReference, lc as IWorkspaceDirectoryEntry, li as buildBackgroundCommandSubcommands, ll as ICommandSessionContextWindow, ln as TProviderFactory, lo as IMemoryWriter, lr as parseSessionNameArgument, ls as ICommandHandoffAdapter, lt as IBundlePluginMcpServer, m as IExternalEventSourceOptions, ma as readAutoCompactThresholdSource, mc as IWorkspaceProjectReader, mi as listCommandBackgroundTasks, ml as ICommandSessionPreset, mn as IProjectContributionPath, mo as IMemoryCandidate, mr as RELOAD_PLUGINS_COMMAND_DESCRIPTION, ms as ICommandMCPOAuthLoginResult, mt as TEnabledPlugins, na as checkSettingsDocument, nc as resolveSessionIdByIdOrName, ni as RECOMMENDED_RESPONSE_LANGUAGES, nl as createExecutionOriginMetadata, nn as TReversibleSafetyStatus, no as ICommandHostUserInteraction, nr as RESUME_COMMAND_DESCRIPTION, ns as IResolvedPromptFileReferences, nt as loadHostBundlePluginsFromScopes, o as IGenerateSessionNameOptions, oa as DEFAULT_AUTO_COMPACT_THRESHOLD, oc as IRestrictedWorkspaceProjectAccess, oi as parseLanguageArgument, ol as IBackgroundJobOrchestratorOptions, on as IPromptExecutorOptions, oo as IMemoryCurationQueue, or as createSessionRenameHostAction, os as ICommandCostBudget, ot as IBundlePluginInspection, p as IExternalEventSource, pa as readAutoCompactThreshold, pc as IWorkspaceProjectMutation, pi as formatCommandBackgroundTaskList, pl as ICommandSessionPermissions, pn as TSessionFactory, po as IAutomaticMemoryConfig, pr as PLUGIN_COMMAND_DESCRIPTION, ps as ICommandMCPOAuthLoginRequest, pt as TBundlePluginSkipReason, q as PluginCommandSource, qa as ICommandHostContext, qc as createLineDetailPage, qi as TProjectSettingsScope, qn as restoreCommandEditCheckpoint, qo as removeContextReference, qr as listCommandSessionAllowedTools, qs as IInteractiveSessionStore$1, qt as assembleSubagentPrompt, r as createInteractiveRuntime, ra as probeProviderProfile, rc as WorkspaceProjectSessionStore, ri as TRecommendedResponseLanguage, rl as createMainThreadExecutionEntryId, rn as TReversibleSideEffect, ro as ICommandHostWorkspace, rr as VALIDATE_SESSION_COMMAND_DESCRIPTION, rs as TPromptFileReferenceDiagnosticCode, rt as BundlePluginLoader, s as generateSessionName, sa as ICompactContextResult, sc as ITrustedWorkspaceProjectAccess, si as BACKGROUND_COMMAND_DESCRIPTION, sl as summarizeBackgroundJobGroup, sn as IPromptProvider, so as IMemoryRecaller, sr as createShowSessionPickerIntent, ss as ICommandCostBudgetAdapter, st as IBundlePluginManifest, t as IInteractiveRuntimeOptions, ta as checkNodeHostSettingsFile, tc as resolveLatestSessionId, ti as LANGUAGE_COMMAND_DESCRIPTION, tl as createBackgroundTaskExecutionEntryId, tn as TReversibleRollbackLayer, to as ICommandHostTerminalHandoff, tr as RENAME_COMMAND_USAGE, ts as IResolvedPromptFileReference, tt as loadHostBundlePluginInspectionFromScopes, u as ExternalEventIngress, ua as clearCommandContextReferences, uc as IWorkspaceIdentity, ui as cancelCommandBackgroundTask, ul as ICommandSessionHistory, un as AgentExecutor, uo as IPerTurnRecallConfig, ur as readCommandSessionInfo, us as ICommandHostAdapters, ut as IBundlePluginSkip, v as restoreSessionRecordIntoSession, va as setCommandAutoCompactThreshold, vc as IWorkspaceTrustGrant, vi as formatCommandHelpMessage, vl as ICommandSkillListEntry, vn as ISkillSourceInspection, vo as TMemoryCandidateStatus, vr as APPEARANCE_SETTINGS_KEYS, vs as ICommandMCPSourceProblem, vt as IMarketplaceClientOptions, w as resolvePromptFileReferencePaths, wa as IProviderSettingsBuildOptions, wc as TWorkspaceProjectMutationDecision, wi as resolveEnvDefaultProvider, wl as IEditCheckpointFileInspection, wn as createWorkspaceProjectContributionSource, wo as MEMORY_INDEX_MAX_BYTES, wr as readAppearanceSettings, ws as ICommandProcessAdapter, wt as createBuiltinCommandModule, x as resolveSubagentLogDir, xa as IProviderCommandSettingsAdapter, xc as TWorkspaceContributionKind, xi as createProviderFromSettings, xl as TAutoCompactThresholdSource, xn as TSkillSkipReason, xo as IAppendMemoryResult, xr as TAppearanceSettingsPatch, xs as ICommandPermissionModeAdapter, xt as TKnownMarketplacesRegistry, y as TInteractiveSessionOptions, ya as writeAutoCompactThresholdSetting, yc as IWorkspaceTrustStore, yi as IReadProviderSettingsOptions, yl as IModelReapplyOptions, yn as ISkillSourceSkip, yo as TMemoryPolicyMode, yr as DEFAULT_APPEARANCE_SETTINGS, ys as ICommandOutputStyleRegistryAdapter, yt as IMarketplaceManifest, z as createSkillExecutionPort, za as ISystemCommandSemanticRoles, zc as MonitorCommandRefusedError, zi as TSettingsData, zl as TEffortDisposition, zn as recordCommandMemoryEvent, zo as IContextReferenceAddResult, zr as RUNTIME_RULE_SOURCE, zs as IAdvisorSpec, zt as IInProcessSubagentRunnerDeps } from "./createInteractiveRuntime-GD7gJ7ig.js";
|
|
2
|
+
import { IAIProvider, IActionRequest, IChatOptions, IDestroyResult, IEventService, IFileSystem, IFileSystemAsync, IGroupChatOrchestrationSpec, IHandoffOrchestrationSpec, IHierarchicalOrchestrationSpec, IHistoryEntry, IModelFallbackNotice, IModelRef, IOrchestrationDelegation, IOrchestrationRunResult, IOrchestrationStepResult, IParallelOrchestrationSpec, IProviderDefinition, IProviderDefinitionConfig, IProviderRequest, IRawProviderResponse, ISequentialOrchestrationSpec, ITerminalOutput as ITerminalOutput$2, IToolSchema, IToolWithEventService, IUserInteraction, TActionResponse, TPermissionMode, TRoleModelMap, TToolArgs, TUniversalMessage, TUniversalValue } from "@robota-sdk/agent-core";
|
|
3
|
+
import { IAgentDriver, ICommandInfo, IExecutionResult, IInteractionChannel, IInteractiveSession, IInteractiveSessionStore, IPlanArtifact, ISessionCommands, ISessionEvents, ISessionGoal, ISessionIdentity, ISessionTurnSubmission, InteractionEvent, TPlanStepStatus } from "@robota-sdk/agent-interface-session";
|
|
4
|
+
import { IBackgroundTaskManager, IBackgroundTaskRunner as IBackgroundTaskRunner$1, ISubagentManager } from "@robota-sdk/agent-executor";
|
|
5
5
|
import { createZodFunctionTool } from "@robota-sdk/agent-tools";
|
|
6
|
-
|
|
6
|
+
import { Session } from "@robota-sdk/agent-session";
|
|
7
|
+
import { ITransportCompletionRecord, ITransportEntry, ITransportFailureRecord, ITransportLifecycleRegistryView, ITransportRegistryView, ITransportRunnerAdapter, ITransportSavedConfig, ITransportSettingsCapability, ITransportSettingsRepository, TBoundConfigurableTransport, TBoundTransportAdapter, TTransportAdapter } from "@robota-sdk/agent-interface-transport";
|
|
8
|
+
import { TBackgroundPrimitive } from "@robota-sdk/agent-interface-execution";
|
|
9
|
+
//#region src/transport-host/headless/headless-output-format.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* Leaf module for the output-format vocabulary (issue #2052: the ONE owner of the type and the
|
|
12
|
+
* runtime constant together).
|
|
13
|
+
*
|
|
14
|
+
* Split out of `headless-runner.ts` so `headless-output.ts` can depend on {@link TOutputFormat}
|
|
15
|
+
* without importing back from `headless-runner.ts`, which previously created an import cycle
|
|
16
|
+
* between the two.
|
|
17
|
+
*/
|
|
18
|
+
declare const OUTPUT_FORMATS: readonly ["text", "json", "stream-json"];
|
|
19
|
+
type TOutputFormat = (typeof OUTPUT_FORMATS)[number];
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/transport-host/headless/headless-session.d.ts
|
|
22
|
+
/** Session roles required by the headless runner and transport. */
|
|
23
|
+
interface IHeadlessSession extends ISessionTurnSubmission, ISessionEvents, ISessionCommands, ISessionGoal, ISessionIdentity {}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/transport-host/headless/headless-runner.d.ts
|
|
26
|
+
/** GOAL-001: options for an autonomous headless goal run. */
|
|
27
|
+
interface IHeadlessGoalOptions {
|
|
28
|
+
maxIterations?: number;
|
|
29
|
+
}
|
|
30
|
+
interface IHeadlessRunnerOptions {
|
|
31
|
+
session: IHeadlessSession;
|
|
32
|
+
outputFormat: TOutputFormat;
|
|
33
|
+
/** Optional startup resolution projected into ordinary print results. */
|
|
34
|
+
effortResolution?: IModelEffortResolution;
|
|
35
|
+
providerErrorGuidance?: IProviderErrorGuidance;
|
|
36
|
+
}
|
|
37
|
+
declare function createHeadlessRunner(options: IHeadlessRunnerOptions): {
|
|
38
|
+
run: (prompt: string) => Promise<number>;
|
|
39
|
+
runGoal: (objective: string, goalOptions?: IHeadlessGoalOptions) => Promise<number>;
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/command-api/org-policy/org-policy-parse-error.d.ts
|
|
43
|
+
/**
|
|
44
|
+
* Issue #2023: an org policy file that EXISTS and cannot be understood is an error condition, never
|
|
45
|
+
* silently equated with a missing one.
|
|
46
|
+
*
|
|
47
|
+
* The loader returned `null` for both, and every enforcement site reads `null` as "no policy
|
|
48
|
+
* configured" — `orgPolicy?.allowedProviders && …` does not fire when the policy is absent. So a
|
|
49
|
+
* corrupted file removed provider allowlisting, blocked commands and the plaintext-key requirement
|
|
50
|
+
* at once, with no signal, and produced behaviour identical to having deployed no policy at all.
|
|
51
|
+
* An administrator could not tell those apart.
|
|
52
|
+
*
|
|
53
|
+
* This mirrors `SettingsParseError` (CLI-069) and the trusted-device store, which answer the same
|
|
54
|
+
* question the same way one and two files over. The sanctioned-degradation comment it replaces was
|
|
55
|
+
* not wrong to care about startup — a MISSING policy still returns `null` and still does not throw,
|
|
56
|
+
* which is the common case. What changes is the case where an administrator deployed a file and it
|
|
57
|
+
* cannot be read.
|
|
58
|
+
*/
|
|
59
|
+
declare class OrgPolicyParseError extends Error {
|
|
60
|
+
readonly filePath: string;
|
|
61
|
+
constructor(filePath: string, reason: string);
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
7
64
|
//#region src/command-api/org-policy/org-policy-loader.d.ts
|
|
8
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Read the organization policy, or `null` when none is deployed.
|
|
67
|
+
*
|
|
68
|
+
* **`null` means "no policy file", and nothing else** (issue #2023). Every enforcement site spells
|
|
69
|
+
* its guard `orgPolicy?.<field> && <violation>`, so `null` is read as "no restrictions" — which is
|
|
70
|
+
* correct for an administrator who deployed no policy and catastrophic for one whose policy file was
|
|
71
|
+
* truncated by a partial write or mangled by a sync tool. Returning `null` for both made those two
|
|
72
|
+
* indistinguishable, and the second silently removed provider allowlisting, blocked commands and the
|
|
73
|
+
* plaintext-key requirement together.
|
|
74
|
+
*
|
|
75
|
+
* A file that EXISTS and cannot be understood therefore throws. That answers the concern the
|
|
76
|
+
* sanctioned-degradation comment here used to state — "malformed org-policy.json must not crash CLI
|
|
77
|
+
* startup" — rather than deleting it: a **missing** file is the common case and still returns `null`
|
|
78
|
+
* without throwing. What throws is a file an administrator put there that cannot be read, which is
|
|
79
|
+
* their error to see.
|
|
80
|
+
*
|
|
81
|
+
* `settings-io.ts` (CLI-069) and the trusted-device store answer the same question the same way, one
|
|
82
|
+
* and two files over. This loader was the one that did not.
|
|
83
|
+
*/
|
|
84
|
+
declare function loadOrgPolicy(policyPath: string): IOrgPolicy | null;
|
|
9
85
|
declare function formatOrgPolicyViolationMessage(reason: string, adminContact: string | undefined): string;
|
|
10
86
|
declare function isApiKeyPlaintext(apiKey: string | undefined): boolean;
|
|
11
87
|
//#endregion
|
|
88
|
+
//#region src/workspace-trust/workspace-authority.d.ts
|
|
89
|
+
declare function assertWorkspaceProjectAuthority(candidate: TWorkspaceProjectAuthorityCandidate): IWorkspaceProjectAuthority;
|
|
90
|
+
declare function getWorkspaceProjectReader(authority: IWorkspaceProjectAuthority): IWorkspaceProjectReader;
|
|
91
|
+
declare function getWorkspaceProjectIdentity(authority: IWorkspaceProjectAuthority): IWorkspaceIdentity;
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/workspace-trust/project-state-storage.d.ts
|
|
94
|
+
declare function getWorkspaceProjectStateStorage(authority: IWorkspaceProjectAuthority, namespace: TWorkspaceProjectStateNamespace): IWorkspaceProjectStateStorage;
|
|
95
|
+
declare function assertWorkspaceProjectStateStorage(candidate: TWorkspaceProjectAuthorityCandidate): IWorkspaceProjectStateStorage;
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/workspace-trust/project-settings-writer.d.ts
|
|
98
|
+
declare function createWorkspaceProjectSettingsWriter(authority: IWorkspaceProjectAuthority, decision: TWorkspaceProjectSettingsWriteDecision): IWorkspaceProjectSettingsWriter;
|
|
99
|
+
declare function assertWorkspaceProjectSettingsWriter(candidate: TWorkspaceProjectAuthorityCandidate): IWorkspaceProjectSettingsWriter;
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/workspace-trust/project-mutation.d.ts
|
|
102
|
+
declare function createWorkspaceProjectMutation(authority: IWorkspaceProjectAuthority, decision: TWorkspaceProjectMutationDecision): IWorkspaceProjectMutation;
|
|
103
|
+
declare function assertWorkspaceProjectMutation(candidate: TWorkspaceProjectAuthorityCandidate): IWorkspaceProjectMutation;
|
|
104
|
+
/** Internal same-grant check for adapters that combine reads/state with project mutation. */
|
|
105
|
+
declare function assertWorkspaceProjectMutationForAuthority(mutation: IWorkspaceProjectMutation, authority: IWorkspaceProjectAuthority): IWorkspaceProjectMutation;
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/workspace-trust/project-reader.d.ts
|
|
108
|
+
declare function assertWorkspaceProjectReader(candidate: TWorkspaceProjectAuthorityCandidate): IWorkspaceProjectReader;
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/workspace-trust/pretrust-contribution-inspector.d.ts
|
|
111
|
+
type TPreTrustProjectPathKind = TWorkspaceContributionKind | 'absent' | 'unavailable';
|
|
112
|
+
interface IPreTrustProjectPathInspection {
|
|
113
|
+
readonly relativePath: string;
|
|
114
|
+
readonly kind: TPreTrustProjectPathKind;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Inspect only metadata for owner-declared project paths before trust is granted. The same
|
|
118
|
+
* identity-revalidating, no-follow path walk used by trusted readers is called without exposing
|
|
119
|
+
* their content-reading authority. A replaced root or unsafe ancestor yields no metadata claim.
|
|
120
|
+
*/
|
|
121
|
+
declare function inspectPreTrustProjectPaths(identity: IWorkspaceIdentity, relativePaths: readonly string[]): readonly IPreTrustProjectPathInspection[];
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/workspace-trust/workspace-authority-required-error.d.ts
|
|
124
|
+
/** Fail-closed response for project APIs without an accepted runtime authority. */
|
|
125
|
+
declare class WorkspaceAuthorityRequiredError extends Error {
|
|
126
|
+
readonly name = "WorkspaceAuthorityRequiredError";
|
|
127
|
+
readonly code = "WORKSPACE_AUTHORITY_REQUIRED";
|
|
128
|
+
constructor(message?: string, cause?: Error);
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/workspace-trust/workspace-trust-service.d.ts
|
|
132
|
+
interface IWorkspaceTrustServiceOptions {
|
|
133
|
+
readonly identityResolver: IWorkspaceIdentityResolver;
|
|
134
|
+
readonly store: IWorkspaceTrustStore;
|
|
135
|
+
readonly projectStateDirectories?: TWorkspaceProjectStateDirectories;
|
|
136
|
+
}
|
|
137
|
+
declare function createRestrictedWorkspaceProjectAccess(trustState: IRestrictedWorkspaceProjectAccess['trustState'], displayPath?: string, cause?: Error, identity?: IWorkspaceIdentity): IRestrictedWorkspaceProjectAccess;
|
|
138
|
+
declare class WorkspaceTrustService {
|
|
139
|
+
private readonly options;
|
|
140
|
+
private readonly issuerGenerations;
|
|
141
|
+
private readonly projectStateDirectories;
|
|
142
|
+
constructor(options: IWorkspaceTrustServiceOptions);
|
|
143
|
+
private identityKey;
|
|
144
|
+
private recordGeneration;
|
|
145
|
+
inspect(cwd: string): Promise<TWorkspaceProjectAccess>;
|
|
146
|
+
/** The trusted branch: re-resolve the identity so a moved or replaced worktree cannot keep authority. */
|
|
147
|
+
private mintTrustedAccess;
|
|
148
|
+
grant(cwd: string): Promise<TWorkspaceProjectAccess>;
|
|
149
|
+
revoke(cwd: string): Promise<TWorkspaceProjectAccess>;
|
|
150
|
+
}
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/workspace-trust/node-host-workspace-trust.d.ts
|
|
153
|
+
/** Resolve a Git worktree to a replacement-safe host identity. */
|
|
154
|
+
declare function createNodeWorkspaceIdentityResolver(): IWorkspaceIdentityResolver;
|
|
155
|
+
/** Create the owner-only, replacement-safe persistent grant store used by the Node host. */
|
|
156
|
+
declare function createNodeWorkspaceTrustStore(filePath: string): IWorkspaceTrustStore;
|
|
157
|
+
/** Compose the default Node resolver, caller-selected persistent store, and authority service. */
|
|
158
|
+
declare function createNodeWorkspaceTrustService(filePath: string, projectStateDirectories?: TWorkspaceProjectStateDirectories): WorkspaceTrustService;
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region src/command-api/provider/provider-profile-names.d.ts
|
|
161
|
+
interface IProviderProfileNameSuggestionInput {
|
|
162
|
+
type: string;
|
|
163
|
+
}
|
|
164
|
+
interface IProviderProfileNameSuggestionOptions {
|
|
165
|
+
existingProfileNames?: readonly string[];
|
|
166
|
+
}
|
|
167
|
+
declare function suggestProviderProfileName(input: IProviderProfileNameSuggestionInput, options?: IProviderProfileNameSuggestionOptions): string;
|
|
168
|
+
declare function sanitizeProviderProfileName(value: string | undefined): string | undefined;
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region src/contributions/node-host-contribution-source.d.ts
|
|
171
|
+
/** Explicit root-bounded adapter for host-owned contribution content. */
|
|
172
|
+
declare function createNodeHostContributionSource(root: string): IContributionSource;
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/contributions/initial-contribution-sources.d.ts
|
|
175
|
+
/** Default host-owned contribution roots. Project content is intentionally absent. */
|
|
176
|
+
declare function createDefaultUserContributionSources(userHome: string): readonly IContributionSource[];
|
|
177
|
+
/** Compose the initial contribution sources from one explicit trusted-or-restricted decision. */
|
|
178
|
+
declare function createContributionSourcesForProjectAccess(projectAccess: TWorkspaceProjectAccess, userHome: string): readonly IContributionSource[];
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/transport-host/headless/HeadlessInteractionChannel.d.ts
|
|
181
|
+
interface IHeadlessInteractionChannelOptions {
|
|
182
|
+
cwd: string;
|
|
183
|
+
livePromptTrace?: ILivePromptTracePort;
|
|
184
|
+
provider: IAIProvider;
|
|
185
|
+
providerErrorGuidance?: IProviderErrorGuidance;
|
|
186
|
+
promptFileReferenceTag?: string;
|
|
187
|
+
modelCommandToolPrefix?: string;
|
|
188
|
+
subagentHookEnvironmentNames?: ICreateSessionOptions['subagentHookEnvironmentNames'];
|
|
189
|
+
observerFailureWarningCode?: ICreateSessionOptions['observerFailureWarningCode'];
|
|
190
|
+
commandHookShell?: string;
|
|
191
|
+
/** Resolved organization policy enforced by the interactive session. */
|
|
192
|
+
orgPolicy?: IOrgPolicy;
|
|
193
|
+
projectAccess?: TWorkspaceProjectAccess;
|
|
194
|
+
projectSettingsPaths?: readonly IProjectSettingsPath[];
|
|
195
|
+
baselinePermissionAllow?: readonly string[];
|
|
196
|
+
/** Host-selected task-context root; absent means the framework scans no task directory. */
|
|
197
|
+
taskContext?: IResolvedConfig['taskContext'];
|
|
198
|
+
contributionSources?: readonly IContributionSource[];
|
|
199
|
+
skillRoots?: readonly ISkillRootDescriptor[];
|
|
200
|
+
outputFormat: TOutputFormat;
|
|
201
|
+
/**
|
|
202
|
+
* CLI-076: the resolved model id (the same value the CLI header displays). Forwarded verbatim to the
|
|
203
|
+
* session so an explicit `--model` override actually reaches the provider chat call. Absent ⇒ the
|
|
204
|
+
* session resolves the model from config (no silent substitution of the requested model).
|
|
205
|
+
*/
|
|
206
|
+
model?: string;
|
|
207
|
+
/** CLI-1988: resolved provider-neutral response style. */
|
|
208
|
+
outputStyle?: IOutputStylePrompt;
|
|
209
|
+
/** ARCH-013: resolved preset effort, threaded to the session's `effort` seam. */
|
|
210
|
+
effort?: ICreateSessionOptions['effort'];
|
|
211
|
+
/** Provider generation options resolved by the print/goal preset. */
|
|
212
|
+
temperature?: number;
|
|
213
|
+
maxOutputTokens?: number;
|
|
214
|
+
/** Response language and preset prompt seed, distinct from a replacing system prompt. */
|
|
215
|
+
language?: string;
|
|
216
|
+
presetSystemPrompt?: string;
|
|
217
|
+
/** Structured response policy, including JSON schema requests. */
|
|
218
|
+
responseFormat?: ICreateSessionOptions['responseFormat'];
|
|
219
|
+
/** FLOW-008: startup source/effective metadata projected into headless results. */
|
|
220
|
+
effortResolution?: IModelEffortResolution;
|
|
221
|
+
permissionMode?: TPermissionMode;
|
|
222
|
+
maxTurns?: number;
|
|
223
|
+
sessionStore?: IInteractiveSessionStore;
|
|
224
|
+
disableSessionLoops?: boolean;
|
|
225
|
+
resolveDefaultLoopPrompt?: () => string;
|
|
226
|
+
/** Continue/resume an existing session by id (print-mode parity with TUI). */
|
|
227
|
+
resumeSessionId?: string;
|
|
228
|
+
/** Fork the resumed session into a new independent session instead of appending. */
|
|
229
|
+
forkSession?: boolean;
|
|
230
|
+
sessionName?: string;
|
|
231
|
+
bare?: boolean;
|
|
232
|
+
/** See `IInteractiveSessionOptions.skipConfiguredHooks`. */
|
|
233
|
+
skipConfiguredHooks?: boolean;
|
|
234
|
+
allowedTools?: readonly string[];
|
|
235
|
+
deniedTools?: readonly string[];
|
|
236
|
+
appendSystemPrompt?: string;
|
|
237
|
+
systemPrompt?: string;
|
|
238
|
+
/** Name reported to the underlying agent config (resolved by the CLI, e.g. preset agentName). */
|
|
239
|
+
agentName?: string;
|
|
240
|
+
/** Active preset id selected at startup (PRESET-011 runtime state). Defaults to 'default'. */
|
|
241
|
+
activePresetId?: string;
|
|
242
|
+
/** Preset persona block composed as a `source: 'persona'` system-prompt section (priority 5). */
|
|
243
|
+
persona?: string;
|
|
244
|
+
/** Preset execution capability: activate agent runtime + subagent/background dispatch. */
|
|
245
|
+
enableParallelSubagents?: boolean;
|
|
246
|
+
/** Preset execution capability: run a post-task self-verification step. */
|
|
247
|
+
selfVerification?: boolean;
|
|
248
|
+
backgroundTaskRunners?: IBackgroundTaskRunner$1[];
|
|
249
|
+
subagentRunnerFactory?: TSubagentRunnerFactory;
|
|
250
|
+
/**
|
|
251
|
+
* ARCH-005: subagent definitions contributed by the composition root (the capability packs
|
|
252
|
+
* `assembleProduct` merged). Forwarded to the session's `agentDefinitions` seam; absent ⇒ unchanged.
|
|
253
|
+
*/
|
|
254
|
+
agentDefinitions?: readonly IAgentDefinition[];
|
|
255
|
+
/** Ordered host-owned relative directories for discovered agent definitions. */
|
|
256
|
+
agentDefinitionRoots?: readonly string[];
|
|
257
|
+
pluginDirectories?: {
|
|
258
|
+
readonly user?: string;
|
|
259
|
+
readonly project?: string;
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* ARCH-006: tools contributed by the composition root (the capability packs `assembleProduct` merged)
|
|
263
|
+
* and, when the profile hands the packs the whole tool surface, the suppressed framework default tier
|
|
264
|
+
* (`defaultTools: []`). Forwarded to the session's tool-composition seam; absent ⇒ unchanged.
|
|
265
|
+
*/
|
|
266
|
+
additionalTools?: IToolWithEventService[];
|
|
267
|
+
defaultTools?: readonly IToolWithEventService[];
|
|
268
|
+
commandModules?: readonly ICommandModule[];
|
|
269
|
+
commandHostAdapters?: ICommandHostAdapters;
|
|
270
|
+
/** Host-owned shell adapter used only when a skill explicitly requests shell interpolation. */
|
|
271
|
+
shellExec: TShellExecFn;
|
|
272
|
+
/**
|
|
273
|
+
* SELFHOST-008 P6: optional durable-memory store injected by the surface (agent-cli). Forwarded into
|
|
274
|
+
* `buildRuntimeSession`; absent ⇒ memory OFF (today's behavior). Enablement/policy is surface-owned.
|
|
275
|
+
*/
|
|
276
|
+
memoryStore?: IMemoryStore;
|
|
277
|
+
/** SELFHOST-008 P6: optional automatic post-turn capture policy (absent ⇒ capture OFF). */
|
|
278
|
+
automaticMemory?: IAutomaticMemoryConfig;
|
|
279
|
+
/** SELFHOST-008 P6: optional per-turn recall policy (absent ⇒ recall OFF, startup-only injection). */
|
|
280
|
+
recallMemory?: IPerTurnRecallConfig;
|
|
281
|
+
}
|
|
282
|
+
declare class HeadlessInteractionChannel {
|
|
283
|
+
private readonly opts;
|
|
284
|
+
private exitCode;
|
|
285
|
+
constructor(options: IHeadlessInteractionChannelOptions);
|
|
286
|
+
run(prompt: string): Promise<void>;
|
|
287
|
+
/**
|
|
288
|
+
* GOAL-001: run an autonomous goal to completion (or a stop condition) in headless mode.
|
|
289
|
+
* Mirrors {@link run} but drives the framework goal loop instead of a single prompt.
|
|
290
|
+
*/
|
|
291
|
+
runGoal(objective: string, options?: {
|
|
292
|
+
maxIterations?: number;
|
|
293
|
+
}): Promise<void>;
|
|
294
|
+
private createSession;
|
|
295
|
+
getExitCode(): number;
|
|
296
|
+
}
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region src/transport-host/headless/headless-transport.d.ts
|
|
299
|
+
interface IHeadlessTransportOptions {
|
|
300
|
+
/** Output format: 'text', 'json', or 'stream-json'. */
|
|
301
|
+
outputFormat: TOutputFormat;
|
|
302
|
+
/** The prompt to execute. */
|
|
303
|
+
prompt: string;
|
|
304
|
+
}
|
|
305
|
+
interface IHeadlessTransport extends ITransportRunnerAdapter<IInteractiveSession> {
|
|
306
|
+
attach(session: IHeadlessSession): void;
|
|
307
|
+
getExitCode(): number;
|
|
308
|
+
}
|
|
309
|
+
declare function createHeadlessTransport(options: IHeadlessTransportOptions): IHeadlessTransport;
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region src/transport-host/programmatic/ProgrammaticInteractionChannel.d.ts
|
|
312
|
+
declare class ProgrammaticInteractionChannel implements IInteractionChannel {
|
|
313
|
+
/** Full structured event stream pushed by the framework, in order. */
|
|
314
|
+
readonly events: InteractionEvent[];
|
|
315
|
+
availableCommands: ICommandInfo[];
|
|
316
|
+
busy: boolean;
|
|
317
|
+
started: boolean;
|
|
318
|
+
stopped: boolean;
|
|
319
|
+
private submitHandler;
|
|
320
|
+
private readonly userActionResponses;
|
|
321
|
+
onSubmit(handler: (text: string) => Promise<void>): void;
|
|
322
|
+
write(event: InteractionEvent): void;
|
|
323
|
+
/**
|
|
324
|
+
* CMD-004 unified ask. Resolves from the pre-supplied queue (FIFO); an empty queue resolves
|
|
325
|
+
* `{ type: 'cancelled' }` so a programmatic run never blocks on an un-answered question.
|
|
326
|
+
*/
|
|
327
|
+
askUser(_request: IActionRequest): Promise<TActionResponse>;
|
|
328
|
+
setAvailableCommands(commands: ICommandInfo[]): void;
|
|
329
|
+
setBusy(busy: boolean): void;
|
|
330
|
+
start(): Promise<void>;
|
|
331
|
+
stop(): Promise<void>;
|
|
332
|
+
/** Push a user submission into the framework (the programmatic "user types and presses enter"). */
|
|
333
|
+
submit(text: string): Promise<void>;
|
|
334
|
+
/** Pre-answer the next `askUser` (CMD-004 unified ask). */
|
|
335
|
+
queueUserAction(response: TActionResponse): void;
|
|
336
|
+
}
|
|
337
|
+
//#endregion
|
|
338
|
+
//#region src/transport-host/programmatic/createProgrammaticAgent.d.ts
|
|
339
|
+
interface ICreateProgrammaticAgentOptions {
|
|
340
|
+
/** Provider that answers the agent loop (e.g. a real provider, or the scripted provider in tests). */
|
|
341
|
+
provider: IAIProvider;
|
|
342
|
+
/** Working directory for session creation. */
|
|
343
|
+
cwd: string;
|
|
344
|
+
/** Trusted-or-restricted project decision made by the host. Absence is Restricted. */
|
|
345
|
+
projectAccess?: TWorkspaceProjectAccess;
|
|
346
|
+
/** Explicit user settings layers for the underlying interactive session. */
|
|
347
|
+
userSettingsSources?: readonly INodeHostSettingsSource[];
|
|
348
|
+
/** Slash-command modules to register (defaults to none). */
|
|
349
|
+
commandModules?: readonly ICommandModule[];
|
|
350
|
+
/** Optional session store for persistence. */
|
|
351
|
+
sessionStore?: IInteractiveSessionStore;
|
|
352
|
+
/** Permission mode for tool execution (e.g. `'bypassPermissions'` for unattended driving). */
|
|
353
|
+
permissionMode?: TPermissionMode;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Construct an in-process {@link IAgentDriver} bound to a real `InteractiveSession`. The returned
|
|
357
|
+
* driver's accessors are the shared `read*` helpers applied to the captured event stream.
|
|
358
|
+
*/
|
|
359
|
+
declare function createProgrammaticAgent(options: ICreateProgrammaticAgentOptions): IAgentDriver;
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region src/transport-host/transport-registry.d.ts
|
|
362
|
+
declare class TransportRegistry {
|
|
363
|
+
private readonly entries;
|
|
364
|
+
private readonly settings;
|
|
365
|
+
private generation;
|
|
366
|
+
private state;
|
|
367
|
+
private startOperation;
|
|
368
|
+
private stopOperation;
|
|
369
|
+
private preemptionStopOperation;
|
|
370
|
+
private startingTransport;
|
|
371
|
+
private preemptionStopFailure;
|
|
372
|
+
/**
|
|
373
|
+
* TRANS-010 (issue #2480): settings storage is an injected repository. A string is accepted as the
|
|
374
|
+
* path of a settings file and wrapped in the file repository, so the existing shell and tests keep
|
|
375
|
+
* their call shape.
|
|
376
|
+
*/
|
|
377
|
+
constructor(settings: string | ITransportSettingsRepository);
|
|
378
|
+
/** The lifecycle/shape agreement every entry must satisfy, on the way in and on a replace. */
|
|
379
|
+
private assertRegisterableShape;
|
|
380
|
+
register(transport: TBoundTransportAdapter): void;
|
|
381
|
+
/**
|
|
382
|
+
* Swap the adapter registered under `transport.name` for a new instance of the same name.
|
|
383
|
+
*
|
|
384
|
+
* Narrower than an unregister: the name must ALREADY be registered and the count cannot change, so
|
|
385
|
+
* `stopAll` keeps its promise to reach everything. An entry is a claim about WHICH instance is
|
|
386
|
+
* live, and reconnect makes it false (issue #2043).
|
|
387
|
+
*
|
|
388
|
+
* Returns nothing and stops nothing: every caller that abandons an adapter already stops it on the
|
|
389
|
+
* path that abandoned it, and a registry that stopped it here would do so at a moment the caller
|
|
390
|
+
* did not choose.
|
|
391
|
+
*/
|
|
392
|
+
replace(transport: TBoundTransportAdapter): void;
|
|
393
|
+
getAll(): ITransportEntry[];
|
|
394
|
+
getEnabled(): TBoundTransportAdapter[];
|
|
395
|
+
setEnabled(name: string, enabled: boolean): Promise<void>;
|
|
396
|
+
setOptions(name: string, options: Record<string, TUniversalValue>): Promise<void>;
|
|
397
|
+
/**
|
|
398
|
+
* TRANS-002 (issue #2480): hand the persisted options to a transport BEFORE it starts. Non-empty
|
|
399
|
+
* options a transport cannot receive (`configure` absent) or refuses (`validateOptions` false) are
|
|
400
|
+
* a typed configuration error rather than a silent ignore — the former "read, displayed, never
|
|
401
|
+
* applied" state.
|
|
402
|
+
*/
|
|
403
|
+
private deliverOptions;
|
|
404
|
+
startAll(): Promise<void>;
|
|
405
|
+
waitForCompletion(): Promise<ITransportCompletionRecord[]>;
|
|
406
|
+
waitForFailure(): Promise<ITransportFailureRecord | undefined>;
|
|
407
|
+
stopAll(): Promise<IDestroyResult>;
|
|
408
|
+
private performStop;
|
|
409
|
+
private performStart;
|
|
410
|
+
private requireConfigurable;
|
|
411
|
+
}
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/transport-host/bind-transport-adapter.d.ts
|
|
414
|
+
/** Bind the exact session port outside the registry while preserving configure-before-attach. */
|
|
415
|
+
declare function bindTransportAdapter<TSession, TAdapter extends TTransportAdapter<TSession>>(adapter: TAdapter, session: TSession): TAdapter extends ITransportSettingsCapability ? TBoundConfigurableTransport : TBoundTransportAdapter;
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region src/transport-host/transport-settings-repository.d.ts
|
|
418
|
+
/** Reads/writes the `transports` section of one settings file. */
|
|
419
|
+
declare function createFileTransportSettingsRepository(settingsPath: string): ITransportSettingsRepository;
|
|
420
|
+
/** Holds transport settings in memory — tests, and hosts with no settings file. */
|
|
421
|
+
declare function createMemoryTransportSettingsRepository(initial?: Record<string, ITransportSavedConfig>): ITransportSettingsRepository;
|
|
422
|
+
//#endregion
|
|
423
|
+
//#region src/assembly/context-capacity-hint.d.ts
|
|
424
|
+
/**
|
|
425
|
+
* NEUT-005 wave 2 — surface-derived context-capacity hint.
|
|
426
|
+
*
|
|
427
|
+
* The zero-dependency `agent-core` layer emits a product-neutral hard-capacity notice and exposes
|
|
428
|
+
* the `IAgentConfig.contextCapacityHint` seam (a surface tier injects its own concrete remediation
|
|
429
|
+
* wording). This framework tier owns command composition, so it can derive that wording from the
|
|
430
|
+
* surface's OWN registered command set rather than hardcoding product vocabulary in a neutral core:
|
|
431
|
+
* when a `compact` command is composed into the session, the notice can point users at it; when no
|
|
432
|
+
* such command exists, no product wording is emitted and the neutral core default stands.
|
|
433
|
+
*/
|
|
434
|
+
/**
|
|
435
|
+
* Derive the concrete remediation hint for the hard-capacity notice from the composed command set.
|
|
436
|
+
* Returns `undefined` when no context-reduction command is registered, leaving the neutral core
|
|
437
|
+
* default (`DEFAULT_CONTEXT_CAPACITY_HINT`) in force.
|
|
438
|
+
*/
|
|
439
|
+
declare function deriveContextCapacityHint(contextReductionCommandName: string | undefined): string | undefined;
|
|
440
|
+
//#endregion
|
|
441
|
+
//#region src/interactive/interactive-session-fork-record.d.ts
|
|
442
|
+
/**
|
|
443
|
+
* A moved conversation's copy under a name no other record in `sessionStore` holds (issue #3081).
|
|
444
|
+
* The copy often lands in the same store as its source — every Restricted move, and a move within
|
|
445
|
+
* one worktree — and a name lookup matches the first record, so a shared name would make
|
|
446
|
+
* `--resume <name>` pick either one.
|
|
447
|
+
*/
|
|
448
|
+
declare function withUniqueSessionName(record: IInteractiveSessionRecord$1, sessionStore: IInteractiveSessionStore$1): IInteractiveSessionRecord$1;
|
|
449
|
+
//#endregion
|
|
450
|
+
//#region src/plan/plan-controller.d.ts
|
|
451
|
+
/** An approval decision: flip to `acceptEdits`. */
|
|
452
|
+
type TPlanApproveDecision = {
|
|
453
|
+
action: 'approve';
|
|
454
|
+
nextMode: TPermissionMode;
|
|
455
|
+
plan: IPlanArtifact;
|
|
456
|
+
};
|
|
457
|
+
/** A revert decision: return the mode to `plan`. */
|
|
458
|
+
type TPlanRevertDecision = {
|
|
459
|
+
action: 'revert';
|
|
460
|
+
nextMode: TPermissionMode;
|
|
461
|
+
plan: IPlanArtifact;
|
|
462
|
+
};
|
|
463
|
+
/** A no-mode-change decision (e.g. presenting the plan for review). */
|
|
464
|
+
type TPlanContinueDecision = {
|
|
465
|
+
action: 'continue';
|
|
466
|
+
plan: IPlanArtifact;
|
|
467
|
+
};
|
|
468
|
+
/** The controller's decision after a plan-phase transition. */
|
|
469
|
+
type TPlanDecision = TPlanApproveDecision | TPlanRevertDecision | TPlanContinueDecision;
|
|
470
|
+
/** Injected seams so the controller stays deterministic and testable. */
|
|
471
|
+
interface IPlanControllerDeps {
|
|
472
|
+
now: () => string;
|
|
473
|
+
createId: () => string;
|
|
474
|
+
}
|
|
475
|
+
declare class PlanController {
|
|
476
|
+
private readonly deps;
|
|
477
|
+
private plan;
|
|
478
|
+
constructor(deps?: IPlanControllerDeps);
|
|
479
|
+
getState(): IPlanArtifact | null;
|
|
480
|
+
/**
|
|
481
|
+
* Begin drafting a plan (phase `planning`). Throws on an empty objective. Step descriptions are
|
|
482
|
+
* seeded as `pending` steps with generated ids. Returns the seeded artifact.
|
|
483
|
+
*/
|
|
484
|
+
start(objective: string, stepDescriptions?: readonly string[]): IPlanArtifact;
|
|
485
|
+
/** Restore a persisted plan on resume. */
|
|
486
|
+
restore(plan: IPlanArtifact): void;
|
|
487
|
+
/** Present the drafted plan for review (`planning` → `awaiting-approval`). */
|
|
488
|
+
requestApproval(): TPlanContinueDecision;
|
|
489
|
+
/**
|
|
490
|
+
* Approve the plan (`awaiting-approval` → `executing`). Returns the decision to flip the mode to
|
|
491
|
+
* `acceptEdits`; the controller does NOT apply it. Throws unless awaiting approval.
|
|
492
|
+
*/
|
|
493
|
+
approve(): TPlanApproveDecision;
|
|
494
|
+
/**
|
|
495
|
+
* Revert to planning, returning the mode back to `plan`. Intentionally has NO phase guard — it is
|
|
496
|
+
* the escape hatch usable from ANY phase (reject while awaiting approval, bail mid-execution, or
|
|
497
|
+
* re-open a completed plan for another cycle). The mode flip is always the safe direction (`→ plan`,
|
|
498
|
+
* which re-blocks mutation), so an any-phase revert can never widen permissions.
|
|
499
|
+
*/
|
|
500
|
+
revert(): TPlanRevertDecision;
|
|
501
|
+
/** Finish the plan (`executing` → `completed`), reverting the mode to `plan` for the next cycle. */
|
|
502
|
+
complete(): TPlanRevertDecision;
|
|
503
|
+
/** Update one step's status (todo tracking). Throws on an unknown step id (surfaces caller bugs). */
|
|
504
|
+
markStep(stepId: string, status: TPlanStepStatus): IPlanArtifact;
|
|
505
|
+
private requirePlan;
|
|
506
|
+
}
|
|
507
|
+
//#endregion
|
|
12
508
|
//#region src/query.d.ts
|
|
13
509
|
interface ICreateQueryOptions {
|
|
14
510
|
/** AI provider instance (required). */
|
|
15
511
|
provider: IAIProvider;
|
|
16
512
|
/** Working directory. Defaults to process.cwd(). */
|
|
17
513
|
cwd?: string;
|
|
18
|
-
/**
|
|
514
|
+
/** Host-owned initial project decision. Absence produces an observable Restricted query. */
|
|
515
|
+
projectAccess?: TWorkspaceProjectAccess;
|
|
516
|
+
/** Explicit user settings layers for this query's session. */
|
|
517
|
+
userSettingsSources?: readonly INodeHostSettingsSource[];
|
|
518
|
+
/**
|
|
519
|
+
* Permission mode. Defaults to `'default'`: with no `permissionHandler`, anything that would ask is
|
|
520
|
+
* denied (issue #3081). Pass `'bypassPermissions'` explicitly for unattended driving.
|
|
521
|
+
*/
|
|
19
522
|
permissionMode?: TPermissionMode;
|
|
20
523
|
/** Maximum agentic turns per query. */
|
|
21
524
|
maxTurns?: number;
|
|
@@ -30,8 +533,10 @@ interface ICreateQueryOptions {
|
|
|
30
533
|
type: 'text' | 'json_object';
|
|
31
534
|
};
|
|
32
535
|
}
|
|
33
|
-
/**
|
|
34
|
-
type TQueryFunction = (prompt: string) => Promise<string
|
|
536
|
+
/** Callable query surface plus its immutable initial project-access decision. */
|
|
537
|
+
type TQueryFunction = ((prompt: string) => Promise<string>) & {
|
|
538
|
+
readonly projectAccess: TWorkspaceProjectAccess;
|
|
539
|
+
};
|
|
35
540
|
/**
|
|
36
541
|
* Create a prompt-only query function bound to a provider.
|
|
37
542
|
*
|
|
@@ -43,7 +548,116 @@ type TQueryFunction = (prompt: string) => Promise<string>;
|
|
|
43
548
|
* const answer = await query('List all TypeScript files');
|
|
44
549
|
* ```
|
|
45
550
|
*/
|
|
46
|
-
declare function createQuery(options: ICreateQueryOptions):
|
|
551
|
+
declare function createQuery(options: ICreateQueryOptions): TQueryFunction;
|
|
552
|
+
//#endregion
|
|
553
|
+
//#region src/advisor/advisor-controller.d.ts
|
|
554
|
+
/** A resolved advisor: the provider instance to ask and where it sends what it is given. */
|
|
555
|
+
interface IAdvisorTarget {
|
|
556
|
+
readonly provider: IAIProvider;
|
|
557
|
+
readonly model: string;
|
|
558
|
+
/**
|
|
559
|
+
* Where the conversation goes: the provider type together with the endpoint it talks to. Consent
|
|
560
|
+
* is keyed on it, and it decides whether history leaves for somewhere the main model does not
|
|
561
|
+
* already send it — two endpoints of one provider type are two destinations.
|
|
562
|
+
*/
|
|
563
|
+
readonly destination: string;
|
|
564
|
+
/** Defaults to the model's known window. */
|
|
565
|
+
readonly contextWindow?: number;
|
|
566
|
+
}
|
|
567
|
+
/** Host-supplied: build the provider a spec names. Throws when the profile does not exist. */
|
|
568
|
+
type TAdvisorTargetResolver = (spec: IAdvisorSpec) => IAdvisorTarget;
|
|
569
|
+
/** Per-destination consent to send conversation history there, persisted by the host. */
|
|
570
|
+
interface IAdvisorConsentStore {
|
|
571
|
+
has(destination: string): boolean;
|
|
572
|
+
grant(destination: string): void;
|
|
573
|
+
}
|
|
574
|
+
interface IAdvisorControllerOptions {
|
|
575
|
+
/** The advisor configured when the session starts; absent means no Advisor tool this session. */
|
|
576
|
+
readonly spec?: IAdvisorSpec;
|
|
577
|
+
readonly resolveTarget: TAdvisorTargetResolver;
|
|
578
|
+
readonly consent: IAdvisorConsentStore;
|
|
579
|
+
/** The organization's provider allowlist (profile names). */
|
|
580
|
+
readonly allowedProfiles?: readonly string[];
|
|
581
|
+
/** The kill switch: no tool, and nothing can turn the advisor on. */
|
|
582
|
+
readonly killSwitch?: boolean;
|
|
583
|
+
readonly maxCallsPerTurn?: number;
|
|
584
|
+
readonly maxCallsPerSession?: number;
|
|
585
|
+
}
|
|
586
|
+
type TAdvisorOutcome = 'answered' | 'repeated' | 'declined' | 'disabled' | 'limit';
|
|
587
|
+
interface IAdvisorConsultation {
|
|
588
|
+
readonly outcome: TAdvisorOutcome;
|
|
589
|
+
/** What the main model receives as the tool result. */
|
|
590
|
+
readonly text: string;
|
|
591
|
+
}
|
|
592
|
+
/** One consultation, as the calling session sees it. */
|
|
593
|
+
interface IAdvisorConsultRequest {
|
|
594
|
+
readonly question?: string;
|
|
595
|
+
/** The calling session's conversation, ending in the Advisor call itself. */
|
|
596
|
+
readonly history: readonly TUniversalMessage[];
|
|
597
|
+
readonly systemPrompt: string;
|
|
598
|
+
/**
|
|
599
|
+
* Where the main model sends the conversation now (`<type>@<host>`). Unknown means every advisor
|
|
600
|
+
* destination counts as a different one.
|
|
601
|
+
*/
|
|
602
|
+
readonly mainDestination?: string;
|
|
603
|
+
readonly sessionId: string;
|
|
604
|
+
/** Identifies the turn the call belongs to; the per-turn limit and answer reuse are per turn. */
|
|
605
|
+
readonly turnId: string;
|
|
606
|
+
readonly ask?: IUserInteraction['ask'];
|
|
607
|
+
readonly signal?: AbortSignal;
|
|
608
|
+
/** Where the advisor's token usage is recorded: the same place the session records turn usage. */
|
|
609
|
+
readonly recordUsage?: (entries: readonly IHistoryEntry[]) => void;
|
|
610
|
+
}
|
|
611
|
+
declare class AdvisorController {
|
|
612
|
+
private readonly options;
|
|
613
|
+
private spec;
|
|
614
|
+
private enabled;
|
|
615
|
+
private readonly registered;
|
|
616
|
+
private readonly killSwitch;
|
|
617
|
+
private readonly maxCallsPerTurn;
|
|
618
|
+
private readonly maxCallsPerSession;
|
|
619
|
+
private sessionCalls;
|
|
620
|
+
private cachedTarget;
|
|
621
|
+
private readonly turns;
|
|
622
|
+
private readonly pendingConsent;
|
|
623
|
+
/** Destinations the user refused this session: not asked again until the next session. */
|
|
624
|
+
private readonly deniedConsent;
|
|
625
|
+
constructor(options: IAdvisorControllerOptions);
|
|
626
|
+
/** Whether the Advisor tool belongs in this session's tool list. Fixed for the session's life. */
|
|
627
|
+
isRegistered(): boolean;
|
|
628
|
+
status(): IAdvisorStatus;
|
|
629
|
+
/** The name the transcript shows on the Advisor tool line. */
|
|
630
|
+
displayLabel(): string;
|
|
631
|
+
/** `/advisor <spec>` or `/advisor off`. Changes the target only, never the tool. */
|
|
632
|
+
set(value: string): IAdvisorSetResult;
|
|
633
|
+
consult(request: IAdvisorConsultRequest): Promise<IAdvisorConsultation>;
|
|
634
|
+
private attempt;
|
|
635
|
+
private isAllowed;
|
|
636
|
+
private targetFor;
|
|
637
|
+
private resolveQuietly;
|
|
638
|
+
private hasConsent;
|
|
639
|
+
private turnState;
|
|
640
|
+
private recordUsage;
|
|
641
|
+
}
|
|
642
|
+
//#endregion
|
|
643
|
+
//#region src/advisor/advisor-tool.d.ts
|
|
644
|
+
declare const ADVISOR_TOOL_NAME = "Advisor";
|
|
645
|
+
/** The unbound tool a host adds to a session's tools when the advisor is configured at start. */
|
|
646
|
+
declare function createAdvisorTool(controller: AdvisorController): IToolWithEventService;
|
|
647
|
+
//#endregion
|
|
648
|
+
//#region src/advisor/provider-destination.d.ts
|
|
649
|
+
/**
|
|
650
|
+
* `<type>@<host>`: the configured base URL's host, else the type's default base URL or endpoint. A
|
|
651
|
+
* default port (80, 443) is left out, so one endpoint always has one name.
|
|
652
|
+
*/
|
|
653
|
+
declare function describeProviderDestination(config: {
|
|
654
|
+
readonly name: string;
|
|
655
|
+
readonly baseURL?: string;
|
|
656
|
+
}, providerDefinitions: readonly IProviderDefinition[]): string;
|
|
657
|
+
/** Record where `provider` sends requests; called where the provider is built from its settings. */
|
|
658
|
+
declare function rememberProviderDestination(provider: IAIProvider, destination: string): void;
|
|
659
|
+
/** Where `provider` sends requests, when that was recorded; otherwise unknown. */
|
|
660
|
+
declare function providerDestinationOf(provider: IAIProvider): string | undefined;
|
|
47
661
|
//#endregion
|
|
48
662
|
//#region src/user-local/storage.d.ts
|
|
49
663
|
declare const USER_LOCAL_STORAGE_CATEGORIES: readonly ["preferences", "view-state", "memory-projections", "task-associations", "workflow-metadata", "inspection-index"];
|
|
@@ -83,8 +697,7 @@ interface IUserLocalStorageInspection {
|
|
|
83
697
|
}
|
|
84
698
|
interface IResolveUserLocalStorageRootOptions {
|
|
85
699
|
readonly activeRepositoryRoot: string;
|
|
86
|
-
readonly
|
|
87
|
-
readonly storageRoot?: string;
|
|
700
|
+
readonly storageRoot: string;
|
|
88
701
|
readonly fsAsync?: IFileSystemAsync;
|
|
89
702
|
}
|
|
90
703
|
interface IInspectUserLocalStorageOptions extends IResolveUserLocalStorageRootOptions {
|
|
@@ -152,14 +765,129 @@ declare function disableUserLocalMemoryItem(options: IUserLocalMemoryItemOptions
|
|
|
152
765
|
declare function deleteUserLocalMemoryItem(options: IUserLocalMemoryItemOptions): Promise<IUserLocalMemoryDeleteResult>;
|
|
153
766
|
declare function readEnabledUserLocalMemoryItem(options: IUserLocalMemoryItemOptions): Promise<IUserLocalMemoryItemProjection | null>;
|
|
154
767
|
//#endregion
|
|
768
|
+
//#region src/memory/file-system-memory-store.d.ts
|
|
769
|
+
declare class WorkspaceMemoryStore implements IMemoryStore {
|
|
770
|
+
private readonly project;
|
|
771
|
+
private readonly pending;
|
|
772
|
+
private readonly retrieval;
|
|
773
|
+
constructor(storage: IWorkspaceProjectStateStorage, now?: () => Date);
|
|
774
|
+
loadStartupMemory(): Promise<IStartupMemory>;
|
|
775
|
+
list(): Promise<IProjectMemorySummary>;
|
|
776
|
+
readTopic(topic: string): Promise<string>;
|
|
777
|
+
append(input: IAppendMemoryInput): Promise<IAppendMemoryResult>;
|
|
778
|
+
recall(query: string, budget: IMemoryBudget): Promise<IMemoryRetrievalResult>;
|
|
779
|
+
getPending(id: string): Promise<IMemoryPendingRecord | undefined>;
|
|
780
|
+
listPending(status?: TMemoryCandidateStatus): Promise<IMemoryPendingRecord[]>;
|
|
781
|
+
markPending(id: string, status: TMemoryCandidateStatus, reason: string): Promise<IMemoryPendingRecord>;
|
|
782
|
+
upsertPending(candidate: IMemoryCandidate, status: TMemoryCandidateStatus, reason: string): Promise<void>;
|
|
783
|
+
}
|
|
784
|
+
/** Create the memory port adapter for an accepted workspace `memory` state facet. */
|
|
785
|
+
declare function createWorkspaceMemoryStore(storage: IWorkspaceProjectStateStorage, now?: () => Date): IMemoryStore;
|
|
786
|
+
//#endregion
|
|
787
|
+
//#region src/memory/memory-approval.d.ts
|
|
788
|
+
interface IApprovedMemoryCandidate {
|
|
789
|
+
record: IMemoryPendingRecord;
|
|
790
|
+
saved: IAppendMemoryResult;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* The one approval path for a queued memory candidate. Only a `pending` candidate can be approved, and
|
|
794
|
+
* its text is checked for sensitive content again, so a skipped, rejected or already-saved record — or
|
|
795
|
+
* one that a stricter filter now flags — never reaches durable memory.
|
|
796
|
+
*/
|
|
797
|
+
declare function approvePendingMemoryCandidate(store: IMemoryStore, id: string): Promise<IApprovedMemoryCandidate>;
|
|
798
|
+
//#endregion
|
|
799
|
+
//#region src/memory/semantic-memory-store.d.ts
|
|
800
|
+
declare class SemanticMemoryStore implements IMemoryStore {
|
|
801
|
+
private readonly base;
|
|
802
|
+
private readonly adapter;
|
|
803
|
+
constructor(base: IMemoryStore, adapter: ISemanticMemoryAdapter);
|
|
804
|
+
loadStartupMemory(): Promise<IStartupMemory>;
|
|
805
|
+
list(): Promise<IProjectMemorySummary>;
|
|
806
|
+
readTopic(topic: string): Promise<string>;
|
|
807
|
+
/**
|
|
808
|
+
* Durable base write first (authoritative), then a guarded semantic index — but only when the base actually wrote a
|
|
809
|
+
* new entry (not a dedup). An index failure is a declared degradation: the durable write is kept, the vector write is
|
|
810
|
+
* skipped (re-indexable later).
|
|
811
|
+
*/
|
|
812
|
+
append(input: IAppendMemoryInput): Promise<IAppendMemoryResult>;
|
|
813
|
+
recall(query: string, budget: IMemoryBudget): Promise<IMemoryRetrievalResult>;
|
|
814
|
+
getPending(id: string): Promise<IMemoryPendingRecord | undefined>;
|
|
815
|
+
listPending(status?: TMemoryCandidateStatus): Promise<IMemoryPendingRecord[]>;
|
|
816
|
+
markPending(id: string, status: TMemoryCandidateStatus, reason: string): Promise<IMemoryPendingRecord>;
|
|
817
|
+
upsertPending(candidate: IMemoryCandidate, status: TMemoryCandidateStatus, reason: string): Promise<void>;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Compose a base `IMemoryStore` with a semantic adapter into a semantic-upgraded store (mirrors
|
|
821
|
+
* `createFileSystemMemoryStore`). The surface supplies the concrete `ISemanticMemoryAdapter`.
|
|
822
|
+
*/
|
|
823
|
+
declare function createSemanticMemoryStore(base: IMemoryStore, adapter: ISemanticMemoryAdapter): IMemoryStore;
|
|
824
|
+
//#endregion
|
|
825
|
+
//#region src/memory/memory-candidate-extractor.d.ts
|
|
826
|
+
interface IMemoryCandidateExtractor {
|
|
827
|
+
extract(input: IMemoryExtractionInput): IMemoryCandidate[];
|
|
828
|
+
}
|
|
829
|
+
/** A memory-cue trigger: the first capture group of `pattern` becomes the candidate text. */
|
|
830
|
+
interface IMemoryExtractorTrigger {
|
|
831
|
+
pattern: RegExp;
|
|
832
|
+
confidence: number;
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* NEUT-007: extractor POLICY — trigger phrases and classification vocabulary are
|
|
836
|
+
* locale/domain policy, injectable by the composition root. The library holds no
|
|
837
|
+
* baked-in locale/domain heuristics beyond the documented default below.
|
|
838
|
+
*/
|
|
839
|
+
interface IMemoryExtractorPolicy {
|
|
840
|
+
/** Memory-cue triggers, evaluated in order against the user message. */
|
|
841
|
+
triggers: readonly IMemoryExtractorTrigger[];
|
|
842
|
+
/** Vocabulary classifying a candidate as project-scoped memory. */
|
|
843
|
+
projectTerms: RegExp;
|
|
844
|
+
/** Vocabulary classifying a candidate as user-preference memory. */
|
|
845
|
+
preferenceTerms: RegExp;
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* The DOCUMENTED default policy: bilingual (English/Korean) memory cues plus a
|
|
849
|
+
* software-project vocabulary. Composition roots supply their own
|
|
850
|
+
* `IMemoryExtractorPolicy` to replace it (other locales, other domains).
|
|
851
|
+
*/
|
|
852
|
+
declare const DEFAULT_MEMORY_EXTRACTOR_POLICY: IMemoryExtractorPolicy;
|
|
853
|
+
declare class RegexMemoryCandidateExtractor implements IMemoryCandidateExtractor {
|
|
854
|
+
private readonly policy;
|
|
855
|
+
constructor(policy?: IMemoryExtractorPolicy);
|
|
856
|
+
extract(input: IMemoryExtractionInput): IMemoryCandidate[];
|
|
857
|
+
}
|
|
858
|
+
//#endregion
|
|
155
859
|
//#region src/self-hosting/self-hosting-verification.d.ts
|
|
156
860
|
type TSelfHostingVerificationPhase = 'checkpoint' | 'edit' | 'handoff' | 'verify' | 'recover';
|
|
157
861
|
type TSelfHostingLoopState = 'idle' | 'checkpointed' | 'editing' | 'verifying' | 'passed' | 'failed' | 'rolled_back' | 'cancelled';
|
|
158
862
|
type TSelfHostingLoopEvent = 'checkpoint_created' | 'edits_started' | 'edits_applied' | 'verify_passed' | 'verify_failed' | 'rollback_completed' | 'cancelled';
|
|
863
|
+
/**
|
|
864
|
+
* Repo-process command templates injected by the composition root (NEUT-001).
|
|
865
|
+
*
|
|
866
|
+
* The library ships NO default commands: which package manager, verification
|
|
867
|
+
* commands, or CI-like gate a repository uses is the host project's policy.
|
|
868
|
+
* Placeholders: `{scope}` in `packageVerify` templates is replaced with each
|
|
869
|
+
* package scope; `{baseRef}` in the `repoVerify` template is replaced with the
|
|
870
|
+
* plan's base ref.
|
|
871
|
+
*/
|
|
872
|
+
interface ISelfHostingCommandTemplates {
|
|
873
|
+
/** Per-scope verification commands, applied to every package scope in order. */
|
|
874
|
+
packageVerify: readonly {
|
|
875
|
+
name: string;
|
|
876
|
+
template: string;
|
|
877
|
+
}[];
|
|
878
|
+
/** Optional repo-wide verification gate appended after the per-scope steps. */
|
|
879
|
+
repoVerify?: {
|
|
880
|
+
description: string;
|
|
881
|
+
template: string;
|
|
882
|
+
};
|
|
883
|
+
}
|
|
159
884
|
interface ISelfHostingVerificationPlanInput {
|
|
160
885
|
changedFiles: readonly string[];
|
|
161
886
|
packageScopes?: readonly string[];
|
|
162
|
-
|
|
887
|
+
/** Base git ref to verify against. Required — the library has no repo-specific default. */
|
|
888
|
+
baseRef: string;
|
|
889
|
+
/** Verification command templates. Required — the library has no repo-specific default. */
|
|
890
|
+
commandTemplates: ISelfHostingCommandTemplates;
|
|
163
891
|
}
|
|
164
892
|
interface ISelfHostingVerificationStep {
|
|
165
893
|
id: string;
|
|
@@ -177,30 +905,197 @@ interface ISelfHostingVerificationPlan {
|
|
|
177
905
|
declare function planSelfHostingVerification(input: ISelfHostingVerificationPlanInput): ISelfHostingVerificationPlan;
|
|
178
906
|
declare function transitionSelfHostingLoop(state: TSelfHostingLoopState, event: TSelfHostingLoopEvent): TSelfHostingLoopState;
|
|
179
907
|
//#endregion
|
|
908
|
+
//#region src/evals/eval-types.d.ts
|
|
909
|
+
/**
|
|
910
|
+
* A metric scores one run's SSOT result. A `boolean` is a direct pass/fail; a `number` is a score in `[0, 1]`
|
|
911
|
+
* where higher is better (compared against the definition threshold). A numeric score outside `[0, 1]` is
|
|
912
|
+
* clamped by the runner. Pure — no IO, no provider.
|
|
913
|
+
*/
|
|
914
|
+
interface IMetric {
|
|
915
|
+
readonly name: string;
|
|
916
|
+
score(result: IExecutionResult$1, evalCase?: IEvalCase): number | boolean;
|
|
917
|
+
}
|
|
918
|
+
/** One eval case: the prompt driven through the agent, plus an optional expected reference for a metric to use. */
|
|
919
|
+
interface IEvalCase {
|
|
920
|
+
readonly input: string;
|
|
921
|
+
readonly expected?: string;
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* An eval definition: a dataset of cases scored by metrics against a pass threshold.
|
|
925
|
+
* `threshold` is the aggregate mean-score bar in `[0, 1]` (default `1`). Because a `boolean` score normalizes to
|
|
926
|
+
* `1`/`0`, for boolean metrics the aggregate IS the pass rate (e.g. One-Shot CI Pass Rate ≥ 0.8).
|
|
927
|
+
*/
|
|
928
|
+
interface IEvalDefinition {
|
|
929
|
+
readonly name?: string;
|
|
930
|
+
readonly cases: readonly IEvalCase[];
|
|
931
|
+
readonly metrics: readonly IMetric[];
|
|
932
|
+
readonly threshold?: number;
|
|
933
|
+
}
|
|
934
|
+
/** One metric's outcome for one case: the raw score and its `[0, 1]`-normalized value. */
|
|
935
|
+
interface IEvalMetricScore {
|
|
936
|
+
readonly metric: string;
|
|
937
|
+
readonly score: number | boolean;
|
|
938
|
+
readonly normalized: number;
|
|
939
|
+
}
|
|
940
|
+
/** One case's outcome: each metric's score plus the case's mean normalized score. */
|
|
941
|
+
interface IEvalCaseResult {
|
|
942
|
+
readonly input: string;
|
|
943
|
+
readonly scores: readonly IEvalMetricScore[];
|
|
944
|
+
readonly caseScore: number;
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* The eval report: per-case results, the aggregate `overallScore` (mean of every case×metric normalized score),
|
|
948
|
+
* the resolved `threshold`, and the overall `passed` verdict (`overallScore >= threshold`). This verdict is what
|
|
949
|
+
* the `robota eval` CI gate (P2) maps to a process exit code.
|
|
950
|
+
*/
|
|
951
|
+
interface IEvalReport {
|
|
952
|
+
readonly name?: string;
|
|
953
|
+
readonly results: readonly IEvalCaseResult[];
|
|
954
|
+
readonly overallScore: number;
|
|
955
|
+
readonly threshold: number;
|
|
956
|
+
readonly passed: boolean;
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* The injected run function: produce a run result for one case input. The library defines NO provider and NO
|
|
960
|
+
* agent config — the caller supplies this (the default is built from `createAgentRuntime().createSession()`,
|
|
961
|
+
* capturing the terminal `complete`-event `IExecutionResult`; see `createSessionRunFn`).
|
|
962
|
+
*/
|
|
963
|
+
type TEvalRunFn = (input: string) => Promise<IExecutionResult$1>;
|
|
964
|
+
//#endregion
|
|
965
|
+
//#region src/evals/runner.d.ts
|
|
966
|
+
/**
|
|
967
|
+
* Validate + normalize an eval definition. Throws on an empty case/metric set or an out-of-range threshold;
|
|
968
|
+
* returns the definition with `threshold` defaulted to `1`. Exposed so a caller can fail fast before a run.
|
|
969
|
+
*/
|
|
970
|
+
declare function defineEval(def: IEvalDefinition): IEvalDefinition;
|
|
971
|
+
/**
|
|
972
|
+
* Run every case through `runFn`, score each run-result with each metric, and aggregate to a report.
|
|
973
|
+
*
|
|
974
|
+
* Cases run sequentially (deterministic; a shared provider is not hammered in parallel). `overallScore` is the
|
|
975
|
+
* mean of every case×metric normalized score, and `passed = overallScore >= threshold` — the verdict the CI
|
|
976
|
+
* gate maps to an exit code.
|
|
977
|
+
*/
|
|
978
|
+
declare function runEval(def: IEvalDefinition, runFn: TEvalRunFn): Promise<IEvalReport>;
|
|
979
|
+
//#endregion
|
|
980
|
+
//#region src/runtime/agent-runtime.d.ts
|
|
981
|
+
interface IAgentRuntimeConfig {
|
|
982
|
+
cwd: string;
|
|
983
|
+
provider: IAIProvider;
|
|
984
|
+
/** Host-owned initial project decision. Absence produces an observable Restricted runtime. */
|
|
985
|
+
projectAccess?: TWorkspaceProjectAccess;
|
|
986
|
+
/** Explicit user settings layers for sessions created by this runtime. */
|
|
987
|
+
userSettingsSources?: readonly INodeHostSettingsSource[];
|
|
988
|
+
commandModules?: readonly ICommandModule[];
|
|
989
|
+
commandHostAdapters?: ICommandHostAdapters;
|
|
990
|
+
backgroundTaskRunners?: IBackgroundTaskRunner$1[];
|
|
991
|
+
subagentRunnerFactory?: TSubagentRunnerFactory;
|
|
992
|
+
/** Runtime default; explicit undefined disables persistence for sessions that omit an override. */
|
|
993
|
+
sessionStore?: IInteractiveSessionStore$1 | undefined;
|
|
994
|
+
transportRegistry?: ITransportRegistryView;
|
|
995
|
+
reloadPluginCommandSource?: (registry: CommandRegistry) => void;
|
|
996
|
+
orgPolicy?: IOrgPolicy;
|
|
997
|
+
/** REMOTE-006: optional remote-command policy. Absent → allow (local == remote); provide one only to restrict. */
|
|
998
|
+
remoteCommandPolicy?: IRemoteCommandPolicy;
|
|
999
|
+
}
|
|
1000
|
+
/** Session-specific options for IAgentRuntime.createSession(). Runtime fields (cwd, provider, etc.) are inherited automatically. */
|
|
1001
|
+
interface IHeadlessSessionOptions {
|
|
1002
|
+
permissionMode?: TPermissionMode;
|
|
1003
|
+
maxTurns?: number;
|
|
1004
|
+
/** Omitted inherits the runtime store; explicit undefined disables persistence for this session. */
|
|
1005
|
+
sessionStore?: IInteractiveSessionStore$1 | undefined;
|
|
1006
|
+
sessionName?: string;
|
|
1007
|
+
bare?: boolean;
|
|
1008
|
+
allowedTools?: string[];
|
|
1009
|
+
/** Denied tool names — added to permissions.deny. denied > allowed. */
|
|
1010
|
+
deniedTools?: string[];
|
|
1011
|
+
/** Override the model from config. When set, takes precedence over config.provider.model. */
|
|
1012
|
+
model?: string;
|
|
1013
|
+
appendSystemPrompt?: string;
|
|
1014
|
+
/** Replace the entire system prompt. Takes precedence over the default builder. */
|
|
1015
|
+
systemPrompt?: string;
|
|
1016
|
+
shellExec?: TShellExecFn;
|
|
1017
|
+
agentName?: string;
|
|
1018
|
+
/** Additional tools registered alongside the default CLI tools. */
|
|
1019
|
+
additionalTools?: IToolWithEventService[];
|
|
1020
|
+
/** Resume an existing persisted session by ID. Requires sessionStore to be configured. */
|
|
1021
|
+
resumeSessionId?: string;
|
|
1022
|
+
/** Request structured output from the provider for this session (issue #2056: incl. `json_schema`). */
|
|
1023
|
+
responseFormat?: TSessionResponseFormat;
|
|
1024
|
+
}
|
|
1025
|
+
interface IAgentRuntime {
|
|
1026
|
+
readonly cwd: string;
|
|
1027
|
+
readonly provider: IAIProvider;
|
|
1028
|
+
readonly projectAccess: TWorkspaceProjectAccess;
|
|
1029
|
+
readonly commandModules: readonly ICommandModule[];
|
|
1030
|
+
readonly commandHostAdapters: ICommandHostAdapters;
|
|
1031
|
+
readonly backgroundTaskRunners: IBackgroundTaskRunner$1[];
|
|
1032
|
+
readonly subagentRunnerFactory: TSubagentRunnerFactory | undefined;
|
|
1033
|
+
readonly sessionStore: IInteractiveSessionStore$1 | undefined;
|
|
1034
|
+
readonly transportRegistry: ITransportRegistryView | undefined;
|
|
1035
|
+
readonly reloadPluginCommandSource: (registry: CommandRegistry) => void;
|
|
1036
|
+
createSession(opts: IHeadlessSessionOptions): InteractiveSession;
|
|
1037
|
+
}
|
|
1038
|
+
declare function createAgentRuntime(config: IAgentRuntimeConfig): IAgentRuntime;
|
|
1039
|
+
//#endregion
|
|
1040
|
+
//#region src/evals/session-run-fn.d.ts
|
|
1041
|
+
/**
|
|
1042
|
+
* Build a default `runFn` bound to an agent runtime. Each invocation runs one case in its own session, captures
|
|
1043
|
+
* that session's terminal `complete`/`interrupted` `IExecutionResult` (an `error` event rejects), and shuts the
|
|
1044
|
+
* session down before returning.
|
|
1045
|
+
*/
|
|
1046
|
+
declare function createSessionRunFn(runtime: IAgentRuntime, options?: IHeadlessSessionOptions): TEvalRunFn;
|
|
1047
|
+
//#endregion
|
|
1048
|
+
//#region src/evals/metric-helpers.d.ts
|
|
1049
|
+
/**
|
|
1050
|
+
* The run response equals the expected string. Two forms:
|
|
1051
|
+
* - `exactMatch('foo')` — a fixed expected applied to every case (homogeneous).
|
|
1052
|
+
* - `exactMatch()` — reads each case's `evalCase.expected` (per-case; makes `parseEvalCases`' field live).
|
|
1053
|
+
* `trim` (default true) trims both sides before comparing.
|
|
1054
|
+
*/
|
|
1055
|
+
declare function exactMatch(expected?: string, options?: {
|
|
1056
|
+
trim?: boolean;
|
|
1057
|
+
}): IMetric;
|
|
1058
|
+
/** The run response contains `substring`. */
|
|
1059
|
+
declare function includesText(substring: string): IMetric;
|
|
1060
|
+
/** The run response matches `pattern`. */
|
|
1061
|
+
declare function regexMatch(pattern: RegExp): IMetric;
|
|
1062
|
+
/** The run response parses as JSON (a format probe — no domain schema opinion). */
|
|
1063
|
+
declare function responseIsJson(): IMetric;
|
|
1064
|
+
/** The run's tool trajectory includes a call to the named tool. */
|
|
1065
|
+
declare function usedTool(name: string): IMetric;
|
|
1066
|
+
//#endregion
|
|
1067
|
+
//#region src/evals/dataset.d.ts
|
|
1068
|
+
/**
|
|
1069
|
+
* Parse a consumer-supplied dataset into `IEvalCase[]`.
|
|
1070
|
+
* - `'json'` — a JSON array of `{ input, expected? }` rows.
|
|
1071
|
+
* - `'jsonl'` — one JSON `{ input, expected? }` object per non-blank line.
|
|
1072
|
+
* Throws on malformed input (a broken corpus is a loud failure, not a silent skip).
|
|
1073
|
+
*/
|
|
1074
|
+
declare function parseEvalCases(text: string, format: 'json' | 'jsonl'): IEvalCase[];
|
|
1075
|
+
//#endregion
|
|
1076
|
+
//#region src/evals/format.d.ts
|
|
1077
|
+
/** A compact human/CI-readable report: a per-case line each + an overall `PASS`/`FAIL` line against the threshold. */
|
|
1078
|
+
declare function formatEvalReport(report: IEvalReport): string;
|
|
1079
|
+
//#endregion
|
|
180
1080
|
//#region src/agents/built-in-agents.d.ts
|
|
181
1081
|
/**
|
|
182
1082
|
* All built-in agent definitions shipped with the SDK.
|
|
183
1083
|
* Order matters: general-purpose is the default fallback.
|
|
184
1084
|
*/
|
|
185
1085
|
declare const BUILT_IN_AGENTS: IAgentDefinition[];
|
|
186
|
-
/**
|
|
187
|
-
* Look up a built-in agent definition by name.
|
|
188
|
-
* Returns `undefined` if no built-in agent matches.
|
|
189
|
-
*/
|
|
190
|
-
declare function getBuiltInAgent(name: string): IAgentDefinition | undefined;
|
|
191
1086
|
//#endregion
|
|
192
1087
|
//#region src/tools/command-execution-tool.d.ts
|
|
193
1088
|
type TModelCommandDescriptor$1 = Pick<ICapabilityDescriptor, 'name' | 'description' | 'argumentHint'>;
|
|
194
1089
|
interface ICommandExecutionToolDeps {
|
|
195
1090
|
isModelInvocable: (command: string) => boolean;
|
|
196
|
-
execute: (command: string, args: string) => Promise<ICommandResult
|
|
1091
|
+
execute: (command: string, args: string) => Promise<ICommandResult | null>;
|
|
197
1092
|
commandNames?: readonly string[];
|
|
198
1093
|
commandDescriptors?: readonly TModelCommandDescriptor$1[];
|
|
199
1094
|
}
|
|
200
1095
|
declare function createCommandExecutionTool(deps: ICommandExecutionToolDeps): ReturnType<typeof createZodFunctionTool>;
|
|
201
1096
|
//#endregion
|
|
202
1097
|
//#region src/tools/model-command-tool-projection.d.ts
|
|
203
|
-
declare const MODEL_COMMAND_TOOL_PREFIX: "
|
|
1098
|
+
declare const MODEL_COMMAND_TOOL_PREFIX: "command_";
|
|
204
1099
|
declare const PROVIDER_SAFE_TOOL_NAME_PATTERN: RegExp;
|
|
205
1100
|
type TModelCommandDescriptor = Pick<ICapabilityDescriptor, 'name' | 'description' | 'argumentHint' | 'requiresPermission'>;
|
|
206
1101
|
interface IProjectedModelCommandTool {
|
|
@@ -218,12 +1113,13 @@ interface IModelCommandToolProjection {
|
|
|
218
1113
|
}
|
|
219
1114
|
interface IProjectedCommandExecutionToolsDeps {
|
|
220
1115
|
isModelInvocable: (command: string) => boolean;
|
|
221
|
-
execute: (command: string, args: string) => Promise<ICommandResult
|
|
1116
|
+
execute: (command: string, args: string) => Promise<ICommandResult | null>;
|
|
222
1117
|
commandDescriptors: readonly TModelCommandDescriptor[];
|
|
1118
|
+
toolNamePrefix?: string;
|
|
223
1119
|
}
|
|
224
1120
|
declare function normalizeModelCommandName(command: string): string;
|
|
225
|
-
declare function createProviderSafeModelCommandToolName(commandName: string): string;
|
|
226
|
-
declare function createModelCommandToolProjection(commandDescriptors: readonly TModelCommandDescriptor[]): IModelCommandToolProjection;
|
|
1121
|
+
declare function createProviderSafeModelCommandToolName(commandName: string, prefix?: string): string;
|
|
1122
|
+
declare function createModelCommandToolProjection(commandDescriptors: readonly TModelCommandDescriptor[], toolNamePrefix?: string): IModelCommandToolProjection;
|
|
227
1123
|
declare function formatProjectedModelCommandToolPromptDescription(projection: IProjectedModelCommandTool): string;
|
|
228
1124
|
declare function createProjectedCommandExecutionTools(deps: IProjectedCommandExecutionToolsDeps): Array<ReturnType<typeof createZodFunctionTool>>;
|
|
229
1125
|
//#endregion
|
|
@@ -236,28 +1132,175 @@ interface IBackgroundProcessToolDeps {
|
|
|
236
1132
|
}
|
|
237
1133
|
declare function createBackgroundProcessTool(deps: IBackgroundProcessToolDeps): ReturnType<typeof createZodFunctionTool>;
|
|
238
1134
|
//#endregion
|
|
239
|
-
//#region src/
|
|
1135
|
+
//#region src/orchestration/shared.d.ts
|
|
240
1136
|
/**
|
|
241
|
-
*
|
|
1137
|
+
* Neutral run context threaded into each spawned subagent request. Shared by
|
|
1138
|
+
* every orchestration primitive (`sequential`/`parallel`/`handoff`/…).
|
|
1139
|
+
*/
|
|
1140
|
+
interface IOrchestrationRunContext {
|
|
1141
|
+
/** The parent session id the run belongs to. */
|
|
1142
|
+
parentSessionId: string;
|
|
1143
|
+
/** The working directory for spawned subagents. */
|
|
1144
|
+
cwd: string;
|
|
1145
|
+
/** Depth of this orchestration in the hierarchy (0 = root). */
|
|
1146
|
+
depth?: number;
|
|
1147
|
+
}
|
|
1148
|
+
//#endregion
|
|
1149
|
+
//#region src/orchestration/sequential.d.ts
|
|
1150
|
+
/**
|
|
1151
|
+
* Neutral run context threaded into each spawned subagent request.
|
|
1152
|
+
* Alias of the shared {@link IOrchestrationRunContext}, kept as the
|
|
1153
|
+
* sequential-specific public name for back-compat.
|
|
1154
|
+
*/
|
|
1155
|
+
type ISequentialRunContext = IOrchestrationRunContext;
|
|
1156
|
+
/**
|
|
1157
|
+
* Dependencies for the `sequential` orchestration mechanism.
|
|
242
1158
|
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
1159
|
+
* The `manager` is the `agent-executor` `ISubagentManager` — the port surface
|
|
1160
|
+
* over `ISubagentRunner`. At the composition root it is built over the real
|
|
1161
|
+
* runner (`createInProcessSubagentRunner` in-process, or the child-process
|
|
1162
|
+
* runner from `agent-subagent-runner` injected at the `agent-cli` root). The
|
|
1163
|
+
* framework NEVER depends on `agent-subagent-runner` (that would be a cycle);
|
|
1164
|
+
* it composes only over the injected `ISubagentManager`.
|
|
1165
|
+
*/
|
|
1166
|
+
interface ISequentialOrchestratorDeps {
|
|
1167
|
+
/** The subagent manager (over `ISubagentRunner`) that runs each step. */
|
|
1168
|
+
manager: ISubagentManager;
|
|
1169
|
+
/** Run context threaded into each spawned subagent request. */
|
|
1170
|
+
context: IOrchestrationRunContext;
|
|
1171
|
+
/** Optional event service; when present, lifecycle events are emitted. */
|
|
1172
|
+
events?: IEventService;
|
|
1173
|
+
}
|
|
1174
|
+
/**
|
|
1175
|
+
* Run a `sequential` orchestration: execute each step in order over the injected
|
|
1176
|
+
* `ISubagentManager`, threading each step's output into the next (when
|
|
1177
|
+
* `threadOutput` is not disabled), and emitting neutral lifecycle events over the
|
|
1178
|
+
* event-service. Returns the per-step results plus the final aggregate output
|
|
1179
|
+
* (the last step's output).
|
|
1180
|
+
*/
|
|
1181
|
+
declare function runSequential(spec: ISequentialOrchestrationSpec, deps: ISequentialOrchestratorDeps): Promise<IOrchestrationRunResult>;
|
|
1182
|
+
//#endregion
|
|
1183
|
+
//#region src/orchestration/parallel.d.ts
|
|
1184
|
+
/**
|
|
1185
|
+
* Dependencies for the `parallel` orchestration mechanism. Same shape as the
|
|
1186
|
+
* sequential deps — the injected `ISubagentManager` (over `ISubagentRunner`)
|
|
1187
|
+
* runs each step; the framework never depends on `agent-subagent-runner`.
|
|
1188
|
+
*/
|
|
1189
|
+
interface IParallelOrchestratorDeps {
|
|
1190
|
+
/** The subagent manager (over `ISubagentRunner`) that runs each step. */
|
|
1191
|
+
manager: ISubagentManager;
|
|
1192
|
+
/** Run context threaded into each spawned subagent request. */
|
|
1193
|
+
context: IOrchestrationRunContext;
|
|
1194
|
+
/** Optional event service; when present, lifecycle events are emitted. */
|
|
1195
|
+
events?: IEventService;
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* Run a `parallel` orchestration: execute the steps concurrently over the
|
|
1199
|
+
* injected `ISubagentManager` under a bounded concurrency pool
|
|
1200
|
+
* (`maxConcurrency`; unbounded when omitted or `<= 0`), then aggregate. Each
|
|
1201
|
+
* step runs with only its own prompt (no threading). Results are returned in
|
|
1202
|
+
* original step order regardless of completion order; the aggregate output is
|
|
1203
|
+
* every step's output joined in order (blank-line separated). Emits neutral
|
|
1204
|
+
* lifecycle events over the event-service; step events interleave by nature.
|
|
1205
|
+
*/
|
|
1206
|
+
declare function runParallel(spec: IParallelOrchestrationSpec, deps: IParallelOrchestratorDeps): Promise<IOrchestrationRunResult>;
|
|
1207
|
+
//#endregion
|
|
1208
|
+
//#region src/orchestration/handoff.d.ts
|
|
1209
|
+
/**
|
|
1210
|
+
* A neutral handoff policy: given the current step's output and id, return the
|
|
1211
|
+
* id of the step to transfer control to, or `null` to stop. This is the ONLY
|
|
1212
|
+
* injected policy — keeping WHICH step receives control a caller decision means
|
|
1213
|
+
* the primitive itself carries no app-domain routing logic (library-neutral).
|
|
1214
|
+
*/
|
|
1215
|
+
type ResolveHandoff = (output: string, currentStepId: string) => string | null;
|
|
1216
|
+
/**
|
|
1217
|
+
* Dependencies for the `handoff` orchestration mechanism. Adds the neutral
|
|
1218
|
+
* `resolveHandoff` policy to the shared manager/context/events surface.
|
|
1219
|
+
*/
|
|
1220
|
+
interface IHandoffOrchestratorDeps {
|
|
1221
|
+
/** The subagent manager (over `ISubagentRunner`) that runs each step. */
|
|
1222
|
+
manager: ISubagentManager;
|
|
1223
|
+
/** Run context threaded into each spawned subagent request. */
|
|
1224
|
+
context: IOrchestrationRunContext;
|
|
1225
|
+
/** Optional event service; when present, lifecycle events are emitted. */
|
|
1226
|
+
events?: IEventService;
|
|
1227
|
+
/** Caller-supplied policy resolving the next step to transfer control to (or `null` to stop). */
|
|
1228
|
+
resolveHandoff: ResolveHandoff;
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* Run a `handoff` orchestration: control starts at `entryStepId`; after each
|
|
1232
|
+
* step the injected `resolveHandoff` policy decides which step (if any) receives
|
|
1233
|
+
* control next, transferring loop ownership. The receiving step is threaded the
|
|
1234
|
+
* previous step's output. A `maxHandoffs` bound (default: step count) guards a
|
|
1235
|
+
* policy that never terminates. Returns the per-step results in execution order
|
|
1236
|
+
* plus the final control-holder's output. Emits neutral lifecycle events.
|
|
1237
|
+
*/
|
|
1238
|
+
declare function runHandoff(spec: IHandoffOrchestrationSpec, deps: IHandoffOrchestratorDeps): Promise<IOrchestrationRunResult>;
|
|
1239
|
+
//#endregion
|
|
1240
|
+
//#region src/orchestration/hierarchical.d.ts
|
|
1241
|
+
/**
|
|
1242
|
+
* A neutral delegation policy: given the manager step's latest output and the
|
|
1243
|
+
* current round, return the worker delegations to run next, or an empty
|
|
1244
|
+
* array / `null` to finish. Keeping WHICH workers run a caller decision means
|
|
1245
|
+
* the primitive itself carries no app-domain routing (library-neutral).
|
|
1246
|
+
*/
|
|
1247
|
+
type PlanDelegation = (managerOutput: string, round: number) => IOrchestrationDelegation[] | null;
|
|
1248
|
+
/**
|
|
1249
|
+
* Dependencies for the `hierarchical` orchestration mechanism. Adds the neutral
|
|
1250
|
+
* `planDelegation` policy to the shared manager/context/events surface.
|
|
1251
|
+
*/
|
|
1252
|
+
interface IHierarchicalOrchestratorDeps {
|
|
1253
|
+
/** The subagent manager (over `ISubagentRunner`) that runs each step. */
|
|
1254
|
+
manager: ISubagentManager;
|
|
1255
|
+
/** Run context threaded into each spawned subagent request. */
|
|
1256
|
+
context: IOrchestrationRunContext;
|
|
1257
|
+
/** Optional event service; when present, lifecycle events are emitted. */
|
|
1258
|
+
events?: IEventService;
|
|
1259
|
+
/** Caller-supplied policy turning the manager's output into worker delegations (or `null` to stop). */
|
|
1260
|
+
planDelegation: PlanDelegation;
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Run a `hierarchical` (manager-delegation) orchestration: the manager step runs
|
|
1264
|
+
* (threaded the previous round's aggregated worker output), the injected
|
|
1265
|
+
* `planDelegation` policy turns its output into worker delegations, those workers
|
|
1266
|
+
* run, and their aggregated output feeds the manager's next round — until the
|
|
1267
|
+
* policy returns an empty/`null` plan (the manager is done) or `maxRounds` is
|
|
1268
|
+
* exceeded. Returns the per-step results in execution order plus the manager's
|
|
1269
|
+
* final output. Emits neutral lifecycle events over the event-service.
|
|
1270
|
+
*/
|
|
1271
|
+
declare function runHierarchical(spec: IHierarchicalOrchestrationSpec, deps: IHierarchicalOrchestratorDeps): Promise<IOrchestrationRunResult>;
|
|
1272
|
+
//#endregion
|
|
1273
|
+
//#region src/orchestration/group-chat.d.ts
|
|
1274
|
+
/**
|
|
1275
|
+
* A neutral turn-selection policy: given the running history and the id of the
|
|
1276
|
+
* step that just took a turn, return the id of the step to take the next turn,
|
|
1277
|
+
* or `null` to end. Keeping WHO speaks next a caller decision means the
|
|
1278
|
+
* primitive itself carries no app-domain turn logic (library-neutral).
|
|
1279
|
+
*/
|
|
1280
|
+
type SelectNextStep = (history: IOrchestrationStepResult[], lastStepId: string) => string | null;
|
|
1281
|
+
/**
|
|
1282
|
+
* Dependencies for the `group-chat` orchestration mechanism. Adds the neutral
|
|
1283
|
+
* `selectNextStep` policy to the shared manager/context/events surface.
|
|
1284
|
+
*/
|
|
1285
|
+
interface IGroupChatOrchestratorDeps {
|
|
1286
|
+
/** The subagent manager (over `ISubagentRunner`) that runs each step. */
|
|
1287
|
+
manager: ISubagentManager;
|
|
1288
|
+
/** Run context threaded into each spawned subagent request. */
|
|
1289
|
+
context: IOrchestrationRunContext;
|
|
1290
|
+
/** Optional event service; when present, lifecycle events are emitted. */
|
|
1291
|
+
events?: IEventService;
|
|
1292
|
+
/** Caller-supplied policy selecting the next step to take a turn (or `null` to end). */
|
|
1293
|
+
selectNextStep: SelectNextStep;
|
|
1294
|
+
}
|
|
1295
|
+
/**
|
|
1296
|
+
* Run a `group-chat` (turn-taking) orchestration: starting at `firstStepId` (or
|
|
1297
|
+
* the first step), each selected step takes a turn — threaded the prior turns'
|
|
1298
|
+
* outputs — then the injected `selectNextStep` policy picks who goes next, `null`
|
|
1299
|
+
* ending the run. A `maxTurns` bound (default: step count) guards a policy that
|
|
1300
|
+
* never ends; exceeding it fails the run. Returns the per-step results in turn
|
|
1301
|
+
* order plus the last turn's output. Emits neutral lifecycle events.
|
|
1302
|
+
*/
|
|
1303
|
+
declare function runGroupChat(spec: IGroupChatOrchestrationSpec, deps: IGroupChatOrchestratorDeps): Promise<IOrchestrationRunResult>;
|
|
261
1304
|
//#endregion
|
|
262
1305
|
//#region src/context/task-context.d.ts
|
|
263
1306
|
type TTaskFileStatus = 'todo' | 'in-progress' | 'blocked' | 'completed' | 'unknown';
|
|
@@ -274,18 +1317,17 @@ interface ITaskContextFile {
|
|
|
274
1317
|
interface ITaskSelectionOptions {
|
|
275
1318
|
currentBranch?: string;
|
|
276
1319
|
maxTasks?: number;
|
|
1320
|
+
/**
|
|
1321
|
+
* NEUT-004: host-selected task-file scan directory relative to cwd; absence disables the scan.
|
|
1322
|
+
*/
|
|
1323
|
+
dir?: string;
|
|
277
1324
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
declare function readCurrentGitBranch(cwd: string, fs?: IFileSystem): string | undefined;
|
|
283
|
-
declare function discoverTaskFiles(cwd: string, fs?: IFileSystem): string[];
|
|
284
|
-
declare function parseTaskFile(taskPath: string, cwd: string, fs?: IFileSystem): ITaskContextFile;
|
|
1325
|
+
declare function readCurrentGitBranchFromNodeHost(cwd: string, fs?: IFileSystem): string | undefined;
|
|
1326
|
+
declare function discoverTaskFiles(reader: IWorkspaceProjectReader, dir: string): string[];
|
|
1327
|
+
declare function parseTaskFile(taskPath: string, reader: IWorkspaceProjectReader): ITaskContextFile;
|
|
285
1328
|
declare function selectRelevantTasks(tasks: readonly ITaskContextFile[], options?: ITaskSelectionOptions): ITaskContextFile[];
|
|
286
1329
|
declare function formatTaskContext(tasks: readonly ITaskContextFile[]): string;
|
|
287
|
-
declare function loadTaskContext(
|
|
288
|
-
declare function updateTaskFileStatus(taskPath: string, status: TTaskFileStatus, options?: IUpdateTaskFileStatusOptions, fs?: IFileSystem): void;
|
|
1330
|
+
declare function loadTaskContext(reader: IWorkspaceProjectReader, options?: ITaskSelectionOptions): string;
|
|
289
1331
|
//#endregion
|
|
290
1332
|
//#region src/interaction/input-parser.d.ts
|
|
291
1333
|
type TParsedInput = {
|
|
@@ -306,31 +1348,70 @@ declare function tokeniseSlashCommand(text: string): {
|
|
|
306
1348
|
/** Parse raw user input into a structured command or message. */
|
|
307
1349
|
declare function parseInput(text: string): TParsedInput;
|
|
308
1350
|
//#endregion
|
|
309
|
-
//#region src/
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
1351
|
+
//#region src/permissions/permission-prompt.d.ts
|
|
1352
|
+
/**
|
|
1353
|
+
* Issue #2351: the permission pattern a "don't ask again" answer for this invocation grants — the
|
|
1354
|
+
* scope the enforcer remembers, so every prompt surface prints the same words.
|
|
1355
|
+
*
|
|
1356
|
+
* The rule is owned by agent-session; this is the framework's OWN facade over it rather than a
|
|
1357
|
+
* pass-through re-export of the owner's binding. `agent-ui-terminal`'s permission prompt reads it
|
|
1358
|
+
* and depends on this package alone, never on agent-session, and `sdk-public-surface` refuses the
|
|
1359
|
+
* public graph passing through the owner directly.
|
|
1360
|
+
*/
|
|
1361
|
+
declare function consentScopeFor(toolName: string, toolArgs: TToolArgs): string;
|
|
1362
|
+
declare function promptForApproval(terminal: ITerminalOutput$2, toolName: string, toolArgs: TToolArgs): Promise<TPermissionResultValue$1>;
|
|
314
1363
|
//#endregion
|
|
315
|
-
//#region src/
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
1364
|
+
//#region src/config/settings-inspection.d.ts
|
|
1365
|
+
type TSettingsLayerState = 'absent' | 'ok' | 'empty' | 'unreadable' | 'invalid-json' | 'schema-invalid';
|
|
1366
|
+
interface ISettingsSchemaIssue {
|
|
1367
|
+
readonly path: string;
|
|
1368
|
+
readonly code: string;
|
|
1369
|
+
}
|
|
1370
|
+
/** Structured cause of a non-`ok`, non-`absent` layer state. Never carries file content. */
|
|
1371
|
+
interface ISettingsLayerCause {
|
|
1372
|
+
readonly state: Exclude<TSettingsLayerState, 'absent' | 'ok'>;
|
|
1373
|
+
/** `unreadable`: the errno code of the failed read (`EACCES`, `EISDIR`, …) when the error had one. */
|
|
1374
|
+
readonly errno?: string;
|
|
1375
|
+
/** `invalid-json`: the byte offset the parser reported, when it reported one. */
|
|
1376
|
+
readonly offset?: number;
|
|
1377
|
+
/** `schema-invalid`: the failing paths and issue codes. */
|
|
1378
|
+
readonly issues?: readonly ISettingsSchemaIssue[];
|
|
1379
|
+
}
|
|
1380
|
+
interface ISettingsLayerInspection {
|
|
1381
|
+
readonly source: TSettingsSource;
|
|
1382
|
+
readonly displayName: string;
|
|
1383
|
+
readonly kind: TSettingsSource['kind'];
|
|
1384
|
+
readonly scope: TSettingsSource['scope'];
|
|
1385
|
+
readonly state: TSettingsLayerState;
|
|
1386
|
+
readonly cause?: ISettingsLayerCause;
|
|
1387
|
+
/** The schema-validated document of an `ok` layer, before `$ENV:` resolution. */
|
|
1388
|
+
readonly settings?: TSettings;
|
|
1389
|
+
}
|
|
1390
|
+
interface ISettingsKeyProvenance {
|
|
1391
|
+
readonly key: string;
|
|
1392
|
+
readonly rule: TSettingsMergeRule;
|
|
1393
|
+
/** Display names of the layers that declared the key, in precedence order (lowest first). */
|
|
1394
|
+
readonly contributors: readonly string[];
|
|
329
1395
|
}
|
|
330
|
-
|
|
1396
|
+
interface ISettingsInspection {
|
|
1397
|
+
readonly layers: readonly ISettingsLayerInspection[];
|
|
1398
|
+
/**
|
|
1399
|
+
* The merge of every `ok` layer with the loader's own `mergeSettings`. When `partial` is true a
|
|
1400
|
+
* present layer is broken and session start will refuse the configuration; this view then shows
|
|
1401
|
+
* what the healthy layers alone would produce, and says so.
|
|
1402
|
+
*/
|
|
1403
|
+
readonly merged: TEnvResolvedSettings;
|
|
1404
|
+
readonly partial: boolean;
|
|
1405
|
+
readonly provenance: readonly ISettingsKeyProvenance[];
|
|
1406
|
+
/** Effective settings-layer definitions only, in merge order. No hook commands or prompts. */
|
|
1407
|
+
readonly hookSources: readonly IHookDefinitionSource[];
|
|
1408
|
+
}
|
|
1409
|
+
/** Read-only inspection of every settings layer plus the merged view and its provenance. */
|
|
1410
|
+
declare function inspectSettingsLayers(sources: readonly TSettingsSource[]): ISettingsInspection;
|
|
331
1411
|
//#endregion
|
|
332
|
-
//#region src/
|
|
333
|
-
declare function
|
|
1412
|
+
//#region src/config/permission-rule-layers.d.ts
|
|
1413
|
+
declare function readPermissionRuleLayers(sources: readonly TSettingsSource[]): IPermissionRuleLayer[];
|
|
1414
|
+
declare function createSettingsPermissionRulesAdapter(sources: readonly TSettingsSource[]): ICommandPermissionRulesAdapter;
|
|
334
1415
|
//#endregion
|
|
335
1416
|
//#region src/config/settings-parse-error.d.ts
|
|
336
1417
|
/**
|
|
@@ -344,135 +1425,40 @@ declare class SettingsParseError extends Error {
|
|
|
344
1425
|
constructor(filePath: string, parseMessage: string);
|
|
345
1426
|
}
|
|
346
1427
|
//#endregion
|
|
1428
|
+
//#region src/config/no-current-provider-profile-error.d.ts
|
|
1429
|
+
/**
|
|
1430
|
+
* CONFIG-002: `updateModelInSettings` writes the active model into
|
|
1431
|
+
* `providers[currentProvider]`. When the settings file names no active profile there is nothing
|
|
1432
|
+
* the canonical loader would accept, so the writer refuses instead of emitting the legacy flat
|
|
1433
|
+
* `provider` shape that `loadConfig()` rejects.
|
|
1434
|
+
*/
|
|
1435
|
+
declare class NoCurrentProviderProfileError extends Error {
|
|
1436
|
+
readonly filePath: string;
|
|
1437
|
+
constructor(filePath: string);
|
|
1438
|
+
}
|
|
1439
|
+
//#endregion
|
|
347
1440
|
//#region src/config/reset-user-config.d.ts
|
|
348
1441
|
interface IResetUserConfigResult {
|
|
349
1442
|
deleted: boolean;
|
|
350
1443
|
path: string;
|
|
351
1444
|
}
|
|
352
|
-
declare function resetUserConfig(): IResetUserConfigResult;
|
|
353
|
-
//#endregion
|
|
354
|
-
//#region src/config/provider-paths.d.ts
|
|
355
|
-
declare function getProviderSettingsPaths(cwd: string): string[];
|
|
1445
|
+
declare function resetUserConfig(path: string): IResetUserConfigResult;
|
|
356
1446
|
//#endregion
|
|
357
1447
|
//#region src/git/git-branch.d.ts
|
|
358
|
-
|
|
1448
|
+
/** Explicit host-filesystem Git metadata adapter. This does not establish project trust. */
|
|
1449
|
+
declare function resolveGitBranchFromNodeHost(cwd: string): string | undefined;
|
|
359
1450
|
//#endregion
|
|
360
1451
|
//#region src/utils/semver-compare.d.ts
|
|
361
1452
|
declare function compareSemverVersions(left: string, right: string): number;
|
|
362
1453
|
declare function isNewerSemverVersion(candidate: string, current: string): boolean;
|
|
363
1454
|
//#endregion
|
|
1455
|
+
//#region src/utils/trim-char.d.ts
|
|
1456
|
+
/** Remove every trailing character in `chars`. Equivalent to `value.replace(/[chars]+$/, '')`. */
|
|
1457
|
+
declare function trimTrailingChars(value: string, chars: string): string;
|
|
1458
|
+
//#endregion
|
|
364
1459
|
//#region src/utils/read-package-version.d.ts
|
|
365
1460
|
declare function readPackageVersion(importMetaUrl: string): string;
|
|
366
1461
|
//#endregion
|
|
367
|
-
//#region src/update-check/update-check.d.ts
|
|
368
|
-
declare const CLI_UPDATE_PACKAGE_NAME = "@robota-sdk/agent-cli";
|
|
369
|
-
declare const CLI_UPDATE_REGISTRY_URL = "https://registry.npmjs.org";
|
|
370
|
-
declare const CLI_UPDATE_CACHE_TTL_MS: number;
|
|
371
|
-
declare const CLI_UPDATE_TIMEOUT_MS = 1500;
|
|
372
|
-
interface ICliUpdateNotice {
|
|
373
|
-
currentVersion: string;
|
|
374
|
-
latestVersion: string;
|
|
375
|
-
installCommand: string;
|
|
376
|
-
}
|
|
377
|
-
interface IUpdateCheckCache {
|
|
378
|
-
packageName: string;
|
|
379
|
-
checkedAt: string;
|
|
380
|
-
currentVersion: string;
|
|
381
|
-
latestVersion?: string;
|
|
382
|
-
errorMessage?: string;
|
|
383
|
-
}
|
|
384
|
-
type TCliUpdateCheckResult = {
|
|
385
|
-
status: 'skipped';
|
|
386
|
-
reason: 'disabled';
|
|
387
|
-
} | {
|
|
388
|
-
status: 'current';
|
|
389
|
-
currentVersion: string;
|
|
390
|
-
latestVersion: string;
|
|
391
|
-
} | {
|
|
392
|
-
status: 'update_available';
|
|
393
|
-
notice: ICliUpdateNotice;
|
|
394
|
-
} | {
|
|
395
|
-
status: 'error';
|
|
396
|
-
errorMessage: string;
|
|
397
|
-
};
|
|
398
|
-
interface ICheckForCliUpdateOptions {
|
|
399
|
-
currentVersion: string;
|
|
400
|
-
disabled?: boolean;
|
|
401
|
-
force?: boolean;
|
|
402
|
-
cachePath?: string;
|
|
403
|
-
now?: Date;
|
|
404
|
-
ttlMs?: number;
|
|
405
|
-
timeoutMs?: number;
|
|
406
|
-
registryUrl?: string;
|
|
407
|
-
packageName?: string;
|
|
408
|
-
fetchImpl?: typeof fetch;
|
|
409
|
-
}
|
|
410
|
-
interface IStartupCliUpdatePolicyInput {
|
|
411
|
-
printMode: boolean;
|
|
412
|
-
disableUpdateCheck: boolean;
|
|
413
|
-
}
|
|
414
|
-
declare function getUserUpdateCheckCachePath(home?: string): string;
|
|
415
|
-
declare function readUpdateCheckCache(path: string): IUpdateCheckCache | undefined;
|
|
416
|
-
declare function writeUpdateCheckCache(path: string, cache: IUpdateCheckCache): void;
|
|
417
|
-
declare function checkForCliUpdate(options: ICheckForCliUpdateOptions): Promise<TCliUpdateCheckResult>;
|
|
418
|
-
declare function getStartupCliUpdateNotice(options: ICheckForCliUpdateOptions): Promise<ICliUpdateNotice | undefined>;
|
|
419
|
-
declare function shouldRunStartupCliUpdateCheck(input: IStartupCliUpdatePolicyInput): boolean;
|
|
420
|
-
declare function formatCliUpdateNotice(notice: ICliUpdateNotice): string;
|
|
421
|
-
declare function formatCliUpdateCheckMessage(result: TCliUpdateCheckResult): string;
|
|
422
|
-
//#endregion
|
|
423
|
-
//#region src/runtime/agent-runtime.d.ts
|
|
424
|
-
interface IAgentRuntimeConfig {
|
|
425
|
-
cwd: string;
|
|
426
|
-
provider: IAIProvider;
|
|
427
|
-
commandModules?: readonly ICommandModule[];
|
|
428
|
-
commandHostAdapters?: ICommandHostAdapters;
|
|
429
|
-
backgroundTaskRunners?: IBackgroundTaskRunner$1[];
|
|
430
|
-
subagentRunnerFactory?: TSubagentRunnerFactory;
|
|
431
|
-
sessionStore?: IInteractiveSessionStore;
|
|
432
|
-
transportRegistry?: ITransportRegistryView<IInteractiveSession>;
|
|
433
|
-
reloadPluginCommandSource?: (registry: CommandRegistry) => void;
|
|
434
|
-
orgPolicy?: IOrgPolicy;
|
|
435
|
-
}
|
|
436
|
-
/** Session-specific options for IAgentRuntime.createSession(). Runtime fields (cwd, provider, etc.) are inherited automatically. */
|
|
437
|
-
interface IHeadlessSessionOptions {
|
|
438
|
-
permissionMode?: TPermissionMode;
|
|
439
|
-
maxTurns?: number;
|
|
440
|
-
sessionStore?: IInteractiveSessionStore;
|
|
441
|
-
sessionName?: string;
|
|
442
|
-
bare?: boolean;
|
|
443
|
-
allowedTools?: string[];
|
|
444
|
-
/** Denied tool names — added to permissions.deny. denied > allowed. */
|
|
445
|
-
deniedTools?: string[];
|
|
446
|
-
/** Override the model from config. When set, takes precedence over config.provider.model. */
|
|
447
|
-
model?: string;
|
|
448
|
-
appendSystemPrompt?: string;
|
|
449
|
-
/** Replace the entire system prompt. Takes precedence over the default builder. */
|
|
450
|
-
systemPrompt?: string;
|
|
451
|
-
shellExec?: TShellExecFn;
|
|
452
|
-
agentName?: string;
|
|
453
|
-
/** Additional tools registered alongside the default CLI tools. */
|
|
454
|
-
additionalTools?: IToolWithEventService[];
|
|
455
|
-
/** Resume an existing persisted session by ID. Requires sessionStore to be configured. */
|
|
456
|
-
resumeSessionId?: string;
|
|
457
|
-
/** Request structured output from the provider for this session. */
|
|
458
|
-
responseFormat?: {
|
|
459
|
-
type: 'text' | 'json_object';
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
interface IAgentRuntime {
|
|
463
|
-
readonly cwd: string;
|
|
464
|
-
readonly provider: IAIProvider;
|
|
465
|
-
readonly commandModules: readonly ICommandModule[];
|
|
466
|
-
readonly commandHostAdapters: ICommandHostAdapters;
|
|
467
|
-
readonly backgroundTaskRunners: IBackgroundTaskRunner$1[];
|
|
468
|
-
readonly subagentRunnerFactory: TSubagentRunnerFactory | undefined;
|
|
469
|
-
readonly sessionStore: IInteractiveSessionStore | undefined;
|
|
470
|
-
readonly transportRegistry: ITransportRegistryView<IInteractiveSession> | undefined;
|
|
471
|
-
readonly reloadPluginCommandSource: (registry: CommandRegistry) => void;
|
|
472
|
-
createSession(opts: IHeadlessSessionOptions): InteractiveSession;
|
|
473
|
-
}
|
|
474
|
-
declare function createAgentRuntime(config: IAgentRuntimeConfig): IAgentRuntime;
|
|
475
|
-
//#endregion
|
|
476
1462
|
//#region src/runtime/stateless-runtime.d.ts
|
|
477
1463
|
interface IStatelessRuntimeConfig {
|
|
478
1464
|
provider: IAIProvider;
|
|
@@ -481,5 +1467,180 @@ interface IStatelessRuntimeConfig {
|
|
|
481
1467
|
}
|
|
482
1468
|
declare function createStatelessRuntime(config: IStatelessRuntimeConfig): IAgentRuntime;
|
|
483
1469
|
//#endregion
|
|
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 };
|
|
1470
|
+
//#region src/runtime/runtime-host.d.ts
|
|
1471
|
+
/** Normalized, explicitly discriminated input for every `InteractiveSession` construction path. */
|
|
1472
|
+
type SessionRecipe = TInteractiveSessionOptions;
|
|
1473
|
+
/** Build a runtime `InteractiveSession` from a normalized recipe. The single construction seam. */
|
|
1474
|
+
declare function buildRuntimeSession(recipe: SessionRecipe): InteractiveSession;
|
|
1475
|
+
interface IRuntimeHostOptions {
|
|
1476
|
+
/** The resolved session-build options — the consumer resolves settings/preset/args and passes them in. */
|
|
1477
|
+
session: SessionRecipe;
|
|
1478
|
+
/** The transport registry (e.g. the loopback WS sidecar); the host owns its start/stop lifecycle. */
|
|
1479
|
+
transportRegistry?: ITransportLifecycleRegistryView;
|
|
1480
|
+
/** Bind each raw adapter to this newly constructed session before registration/start. */
|
|
1481
|
+
bindTransports?: (session: IInteractiveSession$1) => void;
|
|
1482
|
+
}
|
|
1483
|
+
interface IRuntimeHostHandle {
|
|
1484
|
+
/** The live runtime session every presentation drives. */
|
|
1485
|
+
readonly session: InteractiveSession;
|
|
1486
|
+
/** Stop the transports and shut the session down (bounded); idempotent. */
|
|
1487
|
+
shutdown(message?: string): Promise<void>;
|
|
1488
|
+
/** Return the complete ordered runner aggregate, including registry-owned abandonment on stop. */
|
|
1489
|
+
waitForCompletion(): Promise<ITransportCompletionRecord[]>;
|
|
1490
|
+
/** Report only the first real failed runner outcome; normal stop abandonment is not a failure. */
|
|
1491
|
+
waitForFailure(): Promise<ITransportFailureRecord | undefined>;
|
|
1492
|
+
}
|
|
1493
|
+
/**
|
|
1494
|
+
* Build the runtime session and start its transports. Returns a handle the caller renders over (TUI) or simply
|
|
1495
|
+
* keeps alive (headless `--serve`). The caller owns the process-lifetime wait; `shutdown()` tears it down.
|
|
1496
|
+
*/
|
|
1497
|
+
declare function startRuntimeHost(opts: IRuntimeHostOptions): Promise<IRuntimeHostHandle>;
|
|
1498
|
+
//#endregion
|
|
1499
|
+
//#region src/routing/role-model-routing.d.ts
|
|
1500
|
+
/** Resolve the PRIMARY model for a role (first of its fallback chain); `undefined` if the role is unmapped. */
|
|
1501
|
+
declare function resolveRoleModel(map: TRoleModelMap, roleKey: string): IModelRef | undefined;
|
|
1502
|
+
/** The full ordered fallback chain for a role (primary first, then fallbacks); empty if unmapped. */
|
|
1503
|
+
declare function resolveRoleFallbackChain(map: TRoleModelMap, roleKey: string): IModelRef[];
|
|
1504
|
+
/**
|
|
1505
|
+
* Walk a role's fallback chain, trying each `IModelRef` in order until one succeeds. `run(ref)` performs
|
|
1506
|
+
* the actual execution against the given provider+model over the DIP; on a thrown error it advances to
|
|
1507
|
+
* the next fallback (an alternate provider AND model). Throws the LAST error if the whole chain is
|
|
1508
|
+
* exhausted, or immediately if the chain is empty.
|
|
1509
|
+
*
|
|
1510
|
+
* `shouldRetry(err)` gates advancing to the next fallback (default: retry ALL errors). A caller that
|
|
1511
|
+
* only wants provider/transient failures to fall back — not auth/4xx/config errors that will fail
|
|
1512
|
+
* identically on every provider — should pass a predicate; a non-retryable error then rethrows
|
|
1513
|
+
* immediately instead of burning the chain and masking the root cause.
|
|
1514
|
+
*/
|
|
1515
|
+
declare function runWithRoleFallback<T>(chain: IModelRef[], run: (ref: IModelRef) => Promise<T>, shouldRetry?: (err: unknown) => boolean): Promise<T>;
|
|
1516
|
+
//#endregion
|
|
1517
|
+
//#region src/routing/fallback-provider.d.ts
|
|
1518
|
+
/** One model a request may move to, and how to reach it. */
|
|
1519
|
+
interface IFallbackModelTarget {
|
|
1520
|
+
/** The provider (vendor) and model this entry answers on. */
|
|
1521
|
+
ref: IModelRef;
|
|
1522
|
+
/** Build the provider for this entry. A throw means it cannot be reached, and the chain moves on. */
|
|
1523
|
+
create: () => IAIProvider;
|
|
1524
|
+
}
|
|
1525
|
+
interface IFallbackProviderOptions {
|
|
1526
|
+
/** Context window of a model, or `undefined` when unknown. Defaults to the registered metadata. */
|
|
1527
|
+
contextWindowOf?: (model: string) => number | undefined;
|
|
1528
|
+
/** Told once per entry that could not be built. */
|
|
1529
|
+
onUnreachable?: (target: IFallbackModelTarget, error: unknown) => void;
|
|
1530
|
+
/** Told of every move, beside the request's own `onModelFallback`; for a host with no turn view. */
|
|
1531
|
+
onFallback?: (notice: IModelFallbackNotice) => void;
|
|
1532
|
+
/**
|
|
1533
|
+
* The chain as the user wrote it, kept so a host that swaps the primary can read it again for the
|
|
1534
|
+
* new one rather than drop it.
|
|
1535
|
+
*/
|
|
1536
|
+
entries?: readonly string[];
|
|
1537
|
+
}
|
|
1538
|
+
declare class FallbackProvider implements IAIProvider {
|
|
1539
|
+
private readonly primary;
|
|
1540
|
+
private readonly fallbacks;
|
|
1541
|
+
private readonly options;
|
|
1542
|
+
readonly name: string;
|
|
1543
|
+
readonly version: string;
|
|
1544
|
+
private readonly built;
|
|
1545
|
+
/** Chain position each recent run moved to; a run not listed is on the primary. */
|
|
1546
|
+
private readonly runPositions;
|
|
1547
|
+
private readonly contextWindowOf;
|
|
1548
|
+
capabilityTable?: IAIProvider['capabilityTable'];
|
|
1549
|
+
effortTable?: IAIProvider['effortTable'];
|
|
1550
|
+
endpointIsVendorDefault?: IAIProvider['endpointIsVendorDefault'];
|
|
1551
|
+
canPropagateTraceContext?: IAIProvider['canPropagateTraceContext'];
|
|
1552
|
+
configureNativeWebTools?: IAIProvider['configureNativeWebTools'];
|
|
1553
|
+
getCapabilities?: IAIProvider['getCapabilities'];
|
|
1554
|
+
constructor(primary: IAIProvider, fallbacks: readonly IFallbackModelTarget[], options?: IFallbackProviderOptions);
|
|
1555
|
+
/** The models a request may move to, in order. */
|
|
1556
|
+
get chain(): readonly IModelRef[];
|
|
1557
|
+
/** The options this chain was built with, to build the same chain over another primary. */
|
|
1558
|
+
get chainOptions(): Readonly<IFallbackProviderOptions>;
|
|
1559
|
+
resolveModelRoute(model: string, executionId?: string): IModelRef;
|
|
1560
|
+
chat(messages: TUniversalMessage[], options?: IChatOptions): Promise<TUniversalMessage>;
|
|
1561
|
+
generateResponse(payload: IProviderRequest): Promise<IRawProviderResponse>;
|
|
1562
|
+
supportsTools(): boolean;
|
|
1563
|
+
validateConfig(): boolean;
|
|
1564
|
+
dispose(): Promise<void>;
|
|
1565
|
+
close(): Promise<void>;
|
|
1566
|
+
private startPosition;
|
|
1567
|
+
private refAt;
|
|
1568
|
+
/**
|
|
1569
|
+
* The chain positions this request may use: from where its run stands, skipping any model whose
|
|
1570
|
+
* context window is smaller than the requested one's when the request asks for that.
|
|
1571
|
+
*/
|
|
1572
|
+
private candidatePositions;
|
|
1573
|
+
/** Only a window known to be at least as large counts; an unknown one on either side proves nothing. */
|
|
1574
|
+
private keepsContextWindow;
|
|
1575
|
+
private providerAt;
|
|
1576
|
+
private remember;
|
|
1577
|
+
/**
|
|
1578
|
+
* The request for another model: the same conversation, tools and settings, on that model. What
|
|
1579
|
+
* belongs to the primary's vendor stays behind — a hosted tool it was required to offer, its vendor
|
|
1580
|
+
* option blocks and an effort resolution made against its table — and a trace context goes only
|
|
1581
|
+
* where it can be carried. A hosted tool the request WITHHELD stays withheld: the next model must
|
|
1582
|
+
* not offer what the caller refused.
|
|
1583
|
+
*/
|
|
1584
|
+
private fallbackOptions;
|
|
1585
|
+
}
|
|
1586
|
+
//#endregion
|
|
1587
|
+
//#region src/routing/model-fallback-chain.d.ts
|
|
1588
|
+
/** A request moves along at most this many models after the primary. */
|
|
1589
|
+
declare const MAX_FALLBACK_MODELS = 3;
|
|
1590
|
+
/** The settings key holding the chain. */
|
|
1591
|
+
declare const FALLBACK_MODEL_SETTINGS_KEY = "fallbackModel";
|
|
1592
|
+
interface IModelFallbackPrimary {
|
|
1593
|
+
/** The settings profile the primary comes from; absent for a legacy or environment config. */
|
|
1594
|
+
profile?: string;
|
|
1595
|
+
/** The primary's resolved config, on the model the session runs. */
|
|
1596
|
+
config: IProviderDefinitionConfig;
|
|
1597
|
+
}
|
|
1598
|
+
interface IResolveModelFallbackChainInput {
|
|
1599
|
+
/** The entries as written, flag or settings. */
|
|
1600
|
+
entries: readonly string[];
|
|
1601
|
+
/** Merged provider settings. */
|
|
1602
|
+
settings: TProviderSettingsDocument;
|
|
1603
|
+
primary: IModelFallbackPrimary;
|
|
1604
|
+
providerDefinitions: readonly IProviderDefinition[];
|
|
1605
|
+
/** The organization's provider allowlist, by profile name. */
|
|
1606
|
+
allowedProviders?: readonly string[];
|
|
1607
|
+
}
|
|
1608
|
+
interface IModelFallbackChain {
|
|
1609
|
+
targets: IFallbackModelTarget[];
|
|
1610
|
+
/** Why entries were left out, one line each, for the user. */
|
|
1611
|
+
notices: string[];
|
|
1612
|
+
}
|
|
1613
|
+
/** Split a comma-separated `--fallback-model` value into its entries. */
|
|
1614
|
+
declare function parseFallbackModelList(value: string | undefined): string[] | undefined;
|
|
1615
|
+
/** The chain written in settings, or `undefined` when none is. */
|
|
1616
|
+
declare function readFallbackModelSetting(settings: TProviderSettingsDocument): string[] | undefined;
|
|
1617
|
+
/**
|
|
1618
|
+
* The entries to use: the flag's when it is given, the settings' otherwise. The flag replaces the
|
|
1619
|
+
* settings rather than adding to them, so one run can try a different chain.
|
|
1620
|
+
*/
|
|
1621
|
+
declare function selectFallbackModelEntries(flag: readonly string[] | undefined, settings: TProviderSettingsDocument): readonly string[];
|
|
1622
|
+
/**
|
|
1623
|
+
* Read the chain: entries in order, the primary and repeats removed, entries the organization does
|
|
1624
|
+
* not allow dropped, and at most {@link MAX_FALLBACK_MODELS} kept. Every drop is announced.
|
|
1625
|
+
*/
|
|
1626
|
+
declare function resolveModelFallbackChain(input: IResolveModelFallbackChainInput): IModelFallbackChain;
|
|
1627
|
+
interface IApplyModelFallbackInput extends IResolveModelFallbackChainInput {
|
|
1628
|
+
/** The primary provider. */
|
|
1629
|
+
provider: IAIProvider;
|
|
1630
|
+
/** How the decorator reports; `entries` is filled in from `entries` above. */
|
|
1631
|
+
providerOptions?: Omit<IFallbackProviderOptions, 'entries'>;
|
|
1632
|
+
}
|
|
1633
|
+
/**
|
|
1634
|
+
* Put the chain in front of `provider`: a {@link FallbackProvider} whenever the user wrote a chain,
|
|
1635
|
+
* even one whose every entry was dropped for this primary, because the chain belongs to the session
|
|
1636
|
+
* and a later primary may keep entries this one could not. The notices say what was dropped.
|
|
1637
|
+
*/
|
|
1638
|
+
declare function applyModelFallback(input: IApplyModelFallbackInput): {
|
|
1639
|
+
provider: IAIProvider;
|
|
1640
|
+
notices: string[];
|
|
1641
|
+
};
|
|
1642
|
+
/** The note shown when a turn moved to another model. */
|
|
1643
|
+
declare function describeModelFallback(notice: IModelFallbackNotice): string;
|
|
1644
|
+
//#endregion
|
|
1645
|
+
export { ADVISOR_OFF, ADVISOR_TOOL_NAME, APPEARANCE_SETTINGS_KEYS, AUTO_COMPACT_THRESHOLD_SETTINGS_KEY, AdvisorController, AgentExecutor, BACKGROUND_COMMAND_DESCRIPTION, BACKGROUND_COMMAND_USAGE, BUILT_IN_AGENTS, BackgroundJobOrchestrator, BuiltinCommandSource, BundlePluginInstaller, BundlePluginLoader, CLEAR_COMMAND_DESCRIPTION, COST_COMMAND_DESCRIPTION, CommandRegistry, DEFAULT_APPEARANCE_SETTINGS, DEFAULT_AUTO_COMPACT_THRESHOLD, DEFAULT_GOAL_MAX_ITERATIONS, DEFAULT_GOAL_NO_PROGRESS_LIMIT, DEFAULT_MEMORY_EXTRACTOR_POLICY, DEFAULT_STATUS_LINE_COMMAND_SETTINGS, DuplicateSystemCommandSemanticRoleError, EXECUTION_ORIGIN_METADATA_KEYS, EXIT_COMMAND_DESCRIPTION, EditCheckpointStore, ExternalEventIngress, FALLBACK_MODEL_SETTINGS_KEY, FallbackProvider, GOAL_SIGNAL_TOOL_NAME, GoalController, HELP_COMMAND_DESCRIPTION, HeadlessInteractionChannel, type IActiveModelChangeOptions, type IActiveModelChangeResult, type IAdvisorConsentStore, type IAdvisorControllerOptions, type IAdvisorSetResult, type IAdvisorSpec, type IAdvisorStatus, type IAdvisorTarget, type IAgentDefinition, type IAgentExecutorOptions, type IAgentJobDispatch, type IAgentJobGroups, type IAgentJobHostContext, type IAgentJobLogs, type IAgentJobMonitors, type IAgentJobSchedules, type IAgentRuntime, type IAgentRuntimeConfig, type IAgentSession, type IAgentToolDeps, type IAppearanceSettings, type IAppendMemoryInput, type IAppendMemoryResult, type IApplyModelFallbackInput, type IApprovedMemoryCandidate, type IAuthenticatedExternalEvent, type IAutomaticMemoryConfig, type IBackgroundJobOrchestratorOptions, type IBackgroundProcessToolDeps, type IBackgroundTaskRunner, type IBackgroundTaskSpawnerGroupRequest, type IBundlePluginFeatures, type IBundlePluginHookIssue, type IBundlePluginInspection, type IBundlePluginInstallerOptions, type IBundlePluginManifest, type IBundlePluginMcpFault, type IBundlePluginMcpServer, type IBundlePluginSkip, type IBundleSkill, type ICommandAdvisorAdapter, type ICommandCostBudget, type ICommandCostBudgetAdapter, type ICommandEffortAdapter, type ICommandExecutionToolDeps, type ICommandHandoffAdapter, type ICommandHostAdapterAccess, type ICommandHostAdapters, type ICommandHostAgentJobs, type ICommandHostBackgroundTasks, type ICommandHostCatalog, type ICommandHostCheckpoints, type ICommandHostContext, type ICommandHostContextReferences, type ICommandHostContextWindow, type ICommandHostGoal, type ICommandHostMemory, type ICommandHostNoCapability, type ICommandHostPlan, type ICommandHostPresetApplication, type ICommandHostSessionAccess, type ICommandHostTerminalHandoff, type ICommandHostUserInteraction, type ICommandHostWorkspace, type ICommandMCPActivationAdapter, type ICommandMCPActivationSummary, type ICommandMCPOAuthLoginRequest, type ICommandMCPOAuthLoginResult, type ICommandMCPOAuthLogoutResult, type ICommandMCPOAuthRedirectPrompt, type ICommandMCPOAuthStatus, type ICommandMCPSourceProblem, type ICommandModule, type ICommandOutputStyleRegistryAdapter, type ICommandOutputStyleSummary, type ICommandPermissionModeAdapter, type ICommandPermissionRulesAdapter, type ICommandPickerAdapter, type ICommandProcessAdapter, type ICommandRemoteControlAdapter, type ICommandSandboxAdapter, type ICommandSandboxStatus, type ICommandSessionContextWindow, type ICommandSessionHistory, type ICommandSessionIdentity, type ICommandSessionInfo, type ICommandSessionModel, type ICommandSessionPermissions, type ICommandSessionPreset, type ICommandSessionReplayValidationReport, type ICommandSessionRuntime, type ICommandSettingsAdapter, type ICommandSettingsDocument, type ICommandSkillListEntry, type ICommandWorkspaceAdapter, type ICompactContextResult, type IContextReferenceAddResult, type IContextReferenceClearResult, type IContextReferenceInventoryLimits, type IContextReferenceRemoveResult, type IContextReferenceUpsertResult, type IContributionSource, type ICreateExecutionWorkspaceTaskSpawnerOptions, type ICreateProgrammaticAgentOptions, type ICreateQueryOptions, type ICreateSessionOptions, type IDurableMemoryReader, type IEditCheckpointFileInspection, type IEditCheckpointFileRecord, type IEditCheckpointInspection, type IEditCheckpointInspectionPlan, type IEditCheckpointManifest, type IEditCheckpointRecorder, type IEditCheckpointRestoreResult, type IEditCheckpointSummary, type IEditCheckpointTurnInput, type IEvalCase, type IEvalCaseResult, type IEvalDefinition, type IEvalMetricScore, type IEvalReport, type IExecutionWorkspaceTaskSpawner, type IExternalEventReceipt, type IExternalEventSource, type IExternalEventSourceOptions, type IFallbackModelTarget, type IFallbackProviderOptions, type IForkExecutionOptions, type IGenerateSessionNameOptions, type IGoalSignal, type IGoalStartOptions, type IGroupChatOrchestratorDeps, type IHandoffOrchestratorDeps, type IHandoffProgress, type IHandoffStaysBehind, type IHeadlessInteractionChannelOptions, type IHeadlessRunnerOptions, type IHeadlessSession, type IHeadlessSessionOptions, type IHeadlessTransport, type IHeadlessTransportOptions, type IHierarchicalOrchestratorDeps, type IHostBundlePluginLoaderOptions, type IHostToolResultSpillStore, type IInProcessSubagentRunnerDeps, type IInspectUserLocalStorageOptions, type IInstalledPluginRecord, type IInteractiveRuntime, type IInteractiveRuntimeOptions, type IInteractiveSessionShutdownOptions, type IKnownMarketplaceEntry, type ILegacyProviderSettings, type ILivePromptTracePort, type ILoadContextOptions, type ILoadedBundlePlugin, type IMarketplaceClientOptions, type IMarketplaceManifest, type IMarketplacePluginEntry, type IMemoryBudget, type IMemoryCandidate, type IMemoryCandidateExtractor, type IMemoryCurationQueue, type IMemoryExtractorPolicy, type IMemoryExtractorTrigger, type IMemoryPendingRecord, type IMemoryRecaller, type IMemoryStore, type IMemoryWriter, type IMetric, type IModelCommandToolProjection, type IModelEffortInputs, type IModelEffortResolution, type IModelFallbackChain, type IModelFallbackPrimary, type IModelReapplyOptions, type INodeHostSettingsSource, type IOrchestrationRunContext, type IOrgPolicy, type IOutputStylePrompt, type IParallelOrchestratorDeps, type IPerTurnRecallConfig, type IPermissionRuleGroup, type IPermissionRuleLayer, type IPermissionsCommandState, type IPlanControllerDeps, type IPluginSettings, type IPreTrustProjectPathInspection, type IPresetApplicationOptions, type IPresetApplicationResult, type IProjectContributionPath, type IProjectMemorySummary, type IProjectSettingsPath, type IProjectedCommandExecutionToolsDeps, type IProjectedModelCommandTool, type IPromptExecutorOptions, type IPromptFileReferenceDiagnostic, type IPromptFileReferenceHistoryData, type IPromptFileReferenceLimits, type IPromptFileReferenceResolveOptions, type IPromptFileReferenceToken, type IPromptHistoryOptions, type IPromptProvider, type IProviderCommandModuleOptions, type IProviderCommandSettingsAdapter, type IProviderErrorGuidance, type IProviderProfileNameSuggestionInput, type IProviderProfileNameSuggestionOptions, type IProviderProfileSettings, type IProviderSettingsBuildOptions, type IProviderSetupInput, type IProviderSetupPatch, type IProviderSwitchOptions, type IReadProviderSettingsOptions, type IRemoteCommandPolicy, type IResetUserConfigResult, type IResolveExecutionAttachInput, type IResolveModelFallbackChainInput, type IResolveUserLocalStorageRootOptions, type IResolvedConfig, type IResolvedPromptFileReference, type IResolvedPromptFileReferences, type IRestrictedWorkspaceProjectAccess, type IReversibleExecutionOptions, type IReversibleToolSafetyContext, type IReversibleToolSafetyInput, type IReversibleToolSafetyReport, type IRuntimeHostHandle, type IRuntimeHostOptions, type ISelfHostingCommandTemplates, type ISelfHostingVerificationPlan, type ISelfHostingVerificationPlanInput, type ISelfHostingVerificationStep, type ISemanticMemoryAdapter, type ISemanticMemoryQueryResult, type ISequentialOrchestratorDeps, type ISequentialRunContext, type ISessionRecordRestoreResult, type ISessionUsageRecord, type ISettingsDocumentStore, type ISettingsInspection, type ISettingsKeyProvenance, type ISettingsLayerCause, type ISettingsLayerInspection, type ISettingsSchemaIssue, type ISkillActivationHistoryData, type ISkillExecutionCallbacks, type ISkillExecutionResult, type ISkillPromptContext, type ISkillRootDescriptor, type ISkillRootInspection, type ISkillSourceInspection, type ISkillSourceSkip, type ISpawnAgentTaskRequest, type ISpawnProcessTaskRequest, type IStartupMemory, type IStatelessRuntimeConfig, type ISubagentOptions, type ISubagentParentContext, type ISubagentPromptOptions, type ISystemCommand, type ISystemCommandSemanticRoles, type ITaskContextFile, type ITaskSelectionOptions, type IToolCallHandoffPolicy, type IToolCallHandoffProvenance, type ITrustedWorkspaceProjectAccess, type IUnknownCommandModuleName, type IUserLocalMemoryDeleteResult, type IUserLocalMemoryItemOptions, type IUserLocalMemoryItemProjection, type IUserLocalMemoryListOptions, type IUserLocalMemoryListProjection, type IUserLocalMemorySetOptions, type IUserLocalStorageCategoryDefinition, type IUserLocalStorageCategoryProjection, type IUserLocalStorageInspection, type IUserLocalStorageItemSummary, type IWorkspaceAncestorTextEntry, type IWorkspaceDirectoryEntry, type IWorkspaceIdentity, type IWorkspaceIdentityResolver, type IWorkspaceMoveRequest, type IWorkspaceProjectAuthority, type IWorkspaceProjectMutation, type IWorkspaceProjectReader, type IWorkspaceProjectSettingsSource, type IWorkspaceProjectSettingsWriter, type IWorkspaceProjectStateStorage, type IWorkspaceTrustCause, type IWorkspaceTrustGrant, type IWorkspaceTrustServiceOptions, type IWorkspaceTrustStore, type IWorkspaceTrustStoreSnapshot, InteractiveSession, LANGUAGE_COMMAND_ARGUMENT_HINT, LANGUAGE_COMMAND_DESCRIPTION, MAX_FALLBACK_MODELS, MEMORY_COMMAND_ARGUMENT_HINT, MEMORY_COMMAND_DESCRIPTION, MEMORY_COMMAND_USAGE, MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, MODEL_COMMAND_TOOL_PREFIX, MONITOR_SHELL_TOOL, MarketplaceClient, MonitorCommandRefusedError, NoCurrentProviderProfileError, NodeHostPluginSettingsStore, OUTPUT_FORMATS, OrgPolicyParseError, PERMISSIONS_COMMAND_DESCRIPTION, PERMISSION_MODE_ARGUMENT_HINT, PERMISSION_MODE_COMMAND_DESCRIPTION, PLUGIN_COMMAND_ARGUMENT_HINT, PLUGIN_COMMAND_DESCRIPTION, PROVIDER_SAFE_TOOL_NAME_PATTERN, PeerMessageIngress, PlanController, type PlanDelegation, PluginCommandSource, ProgrammaticInteractionChannel, 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, RUNTIME_RULE_SOURCE, RegexMemoryCandidateExtractor, type ResolveHandoff, STATUSLINE_COMMAND_ARGUMENT_HINT, STATUSLINE_COMMAND_DESCRIPTION, type SelectNextStep, SemanticMemoryStore, SettingsParseError, SkillCommandSource, SystemCommandExecutor, type TAdvisorTargetResolver, type TAppearanceSettingsPatch, type TAutoCompactThreshold, type TAutoCompactThresholdSource, type TBundlePluginSkipReason, type TCommandModuleSessionRequirement, type TEditCheckpointFileRestoreAction, type TEffortDisposition, type TEffortSelection, type TEffortSource, type TEnabledPlugins, type TEvalRunFn, type TExecutionAttachOutcome, type TExternalEventSettlement, type TGoalDecision, type THostSettingsScope, type TInstalledPluginsRegistry, type TInteractiveSessionOptions, type TKnownMarketplacesRegistry, type TMarketplaceSource, type TMemoryCandidateStatus, type TMemoryPolicyMode, type TOutputFormat, type TParsedInput, type TPermissionRuleKind, type TPlanDecision, type TProjectSettingsScope, type TPromptFileReferenceDiagnosticCode, type TProviderFactory, type TProviderSettingsDocument, type TQueryFunction, type TRecommendedResponseLanguage, type TRemoteControlStatus, type TReversibleExecutionIsolation, type TReversibleRollbackLayer, type TReversibleSafetyStatus, type TReversibleSideEffect, type TSandboxCommandMode, type TSandboxSettings, type TSelfHostingLoopEvent, type TSelfHostingLoopState, type TSelfHostingVerificationPhase, type TSessionFactory, type TSessionResponseFormat, type TSettings, type TSettingsCheck, type TSettingsData, type TSettingsLayerState, type TSettingsMergeRule, type TSettingsScope, type TSettingsSource, type TShellExecFn, type TSkillSkipReason, type TSubagentRunnerFactory, type TSubagentSuffix, type TSystemCommandLifecycle, type TSystemCommandSemanticRole, type TTaskFileStatus, type TUserLocalMemoryCategory, type TUserLocalMemoryCommandExecutionEffect, type TUserLocalStorageCategory, type TWorkspaceContributionKind, type TWorkspaceProjectAccess, type TWorkspaceProjectAuthorityCandidate, type TWorkspaceProjectMutationDecision, type TWorkspaceProjectSettingsTarget, type TWorkspaceProjectSettingsWriteDecision, type TWorkspaceProjectStateDirectories, type TWorkspaceProjectStateNamespace, type TWorkspaceTrustState, TransportRegistry, USER_LOCAL_MEMORY_CATEGORIES, USER_LOCAL_STORAGE_CATEGORIES, USER_LOCAL_STORAGE_CATEGORY_DEFINITIONS, VALIDATE_SESSION_COMMAND_DESCRIPTION, VALID_PERMISSION_MODES, WorkspaceAuthorityRequiredError, WorkspaceMemoryStore, WorkspaceProjectSessionStore, WorkspaceSessionLogSink, WorkspaceSessionLogSource, WorkspaceTrustService, addCommandContextReference, applyActiveModelChange, applyAppearanceSettings, applyModelFallback, applyPresetToSession, applyProviderConfiguration, applyProviderSwitch, applyStatusLineSettings, approvePendingMemoryCandidate, assembleSubagentPrompt, assertWorkspaceProjectAuthority, assertWorkspaceProjectMutation, assertWorkspaceProjectMutationForAuthority, assertWorkspaceProjectReader, assertWorkspaceProjectSettingsWriter, assertWorkspaceProjectStateStorage, bindTransportAdapter, buildBackgroundCommandSubcommands, buildGoalContinuationPrompt, buildGoalStartPrompt, buildLanguageCommandSubcommands, buildMemoryCommandSubcommands, buildPermissionModeSubcommands, buildPluginCommandSubcommands, buildPromptWithFileReferences, buildProviderProfile, buildProviderSetupPatch, buildRewindCommandSubcommands, buildRuntimeSession, buildStatusLineCommandSubcommands, cancelCommandBackgroundTask, checkNodeHostSettingsFile, checkSettingsDocument, clearCommandContextReferences, clearContextReferences, clearConversationHistory, closeCommandBackgroundTask, compactCommandContext, compareSemverVersions, consentScopeFor, createAdvisorTool, createAgentRuntime, createAgentTool, createBackgroundGroupExecutionEntryId, createBackgroundProcessTool, createBackgroundTaskExecutionEntryId, createBuiltinCommandModule, createCommandExecutionTool, createCommandMemoryStores, createContextReferenceItem, createContributionSourcesForProjectAccess, createDefaultRemoteCommandPolicy, createDefaultUserContributionSources, createExecutionOriginMetadata, createExecutionWorkspaceSnapshot, createExecutionWorkspaceTaskSpawner, createFileTransportSettingsRepository, createGoalStatusTool, createHeadlessRunner, createHeadlessTransport, createHostBundlePluginLoader, createInProcessSubagentRunner, createInteractiveRuntime, createLineDetailPage, createMainThreadDetailPage, createMainThreadExecutionEntryId, createMemoryTransportSettingsRepository, createModelCommandToolProjection, createNodeHostContributionSource, createNodeHostSessionStore, createNodeHostSettingsSource, createNodeHostSettingsStore, createNodeToolResultSpillStore, createNodeWorkspaceIdentityResolver, createNodeWorkspaceTrustService, createNodeWorkspaceTrustStore, createProgrammaticAgent, createProjectSessionStore, createProjectedCommandExecutionTools, createPromptFileReferenceHistoryEntry, createProviderFromSettings, createProviderSafeModelCommandToolName, createQuery, createRestrictedWorkspaceProjectAccess, createSemanticMemoryStore, createSessionExitHostAction, createSessionRenameHostAction, createSessionRunFn, createSettingsPermissionRulesAdapter, createShowPluginManagerIntent, createShowSessionPickerIntent, createSkillExecutionPort, createStatelessRuntime, createSubagentLogger, createSubagentSession, createSystemCommands, createUserPromptHistoryFile, createUserSessionStore, createWorkspaceMemoryStore, createWorkspaceProjectContributionSource, createWorkspaceProjectMutation, createWorkspaceProjectSettingsSources, createWorkspaceProjectSettingsStore, createWorkspaceProjectSettingsWriter, defineEval, deleteProviderProfile, deleteSettings, deleteUserLocalMemoryItem, deriveContextCapacityHint, describeModelFallback, describeProviderDestination, disableUserLocalMemoryItem, discoverTaskFiles, evaluateReversibleToolSafety, exactMatch, executeSkill, extractGoalSignal, findUnknownModuleNames, forkCommandEditCheckpoint, formatAdvisorSpec, formatCommandBackgroundTask, formatCommandBackgroundTaskList, formatCommandHelpMessage, formatCommandPermissionsMessage, formatCommandSessionReplayValidationReport, formatEvalReport, formatInvalidPermissionModeMessage, formatLanguageUsageMessage, formatOrgPolicyViolationMessage, formatProjectedModelCommandToolPromptDescription, formatPromptFileReferenceDiagnostics, formatTaskContext, generateSessionName, getForkWorkerSuffix, getSubagentSuffix, getWorkspaceProjectIdentity, getWorkspaceProjectReader, getWorkspaceProjectStateStorage, groupPermissionRulesBySource, hasBlockingPromptFileReferenceDiagnostics, hasSensitiveCommandMemoryContent, includesText, inspectCommandEditCheckpoint, inspectPreTrustProjectPaths, inspectSettingsLayers, inspectSkillSources, inspectUserLocalMemoryItem, inspectUserLocalStorage, isApiKeyPlaintext, isAppearanceSettingsPatch, isCommandMemoryType, isMemoryType, isNewerSemverVersion, isPermissionMode, isSafeSessionId, isSlashCommand, isStatusLineCommandSettingsPatch, listActiveContextReferences, listCommandBackgroundTasks, listCommandContextReferences, listCommandEditCheckpointBranches, listCommandEditCheckpoints, listCommandSessionAllowedTools, listCommandUsedMemoryReferences, listFrameworkProjectContributionPaths, listResumableSessionSummaries, listUserLocalMemoryItems, loadHostBundlePluginInspectionFromScopes, loadHostBundlePluginsFromScopes, loadOrgPolicy, loadTaskContext, mergeProviderPatch, mergeProviders, mergeSettings, normalizeModelCommandName, parseAdvisorSpec, parseCommandBackgroundLogCursor, parseEvalCases, parseExecutionWorkspaceEntryId, parseFallbackModelList, parseInput, parseLanguageArgument, parseModelEffort, parsePermissionModeArgument, parsePromptFileReferences, parseSessionNameArgument, parseTaskFile, planSelfHostingVerification, preprocessShellCommands, probeProviderProfile, promptForApproval, providerDestinationOf, readAppearanceSettings, readAutoCompactThreshold, readAutoCompactThresholdSource, readCommandBackgroundTaskLog, readCommandContextState, readCommandPermissionMode, readCommandPermissionsState, readCommandSessionInfo, readCurrentGitBranchFromNodeHost, readEnabledUserLocalMemoryItem, readFallbackModelSetting, readMergedProviderSettings, readMergedProviderSettingsFromSources, readPackageVersion, readPermissionRuleLayers, readProviderSettings, readSettings, readSettingsSourceText, readStatusLineSettings, recordCommandMemoryEvent, regexMatch, rememberProviderDestination, removeCommandContextReference, removeContextReference, resetAutoCompactThresholdSetting, resetUserConfig, resolveActiveProvider, resolveEnvDefaultProvider, resolveExecutionAttach, resolveGitBranchFromNodeHost, resolveLatestSessionId, resolveModelEffort, resolveModelFallbackChain, resolvePermissionModeAdapter, resolvePluginCommandAdapter, resolvePromptFileReferencePaths, resolvePromptFileReferences, resolveProviderSettingsWriteTarget, resolveRoleFallbackChain, resolveRoleModel, resolveSessionIdByIdOrName, resolveStartupAdvisorSpec, resolveSubagentLogDir, resolveUserLocalStorageRoot, responseIsJson, restoreCommandEditCheckpoint, restoreSessionRecordIntoSession, retrieveAgentToolDeps, retryCommandPermissionDenial, rollbackCommandEditCheckpoint, runEval, runGroupChat, runHandoff, runHierarchical, runParallel, runSequential, runWithRoleFallback, sanitizeProviderProfileName, selectCommandModules, selectFallbackModelEntries, selectRelevantTasks, setCommandAutoCompactThreshold, setCurrentProvider, setUserLocalMemoryItem, startRuntimeHost, storeAgentToolDeps, substituteVariables, suggestProviderProfileName, summarizeBackgroundJobGroup, switchCommandEditCheckpointBranch, testProviderProfileCommand, toContextReferenceRecords, toPromptFileReferenceRecords, tokeniseSlashCommand, transitionSelfHostingLoop, trimTrailingChars, updateModelInSettings, upsertContextReference, upsertProviderProfile, usedTool, validateCommandSessionReplayLog, validateProviderProfile, withUniqueSessionName, wrapEditCheckpointTools, wrapReversibleExecutionTools, writeAutoCompactThresholdSetting, writeCommandPermissionMode, writeSettings };
|
|
485
1646
|
//# sourceMappingURL=index.d.ts.map
|