import type { ApiClient } from '../api-client'; import { type AgentChatMode, type AgentCommandType, type AgentServerConfig, type CommandDispatch, type CommandResult, type ProjectConfigResponse } from '../types'; import type { RepoSyncResult } from '../repo-sync'; /** Options for command execution */ export interface ExecuteCommandOptions { commandId?: string; client?: ApiClient; serverConfig?: AgentServerConfig; activeChatMode?: AgentChatMode; activeChatModeExplicit?: boolean; availableChatModes?: AgentChatMode[]; agentId?: string; projectDir?: string; projectConfig?: ProjectConfigResponse; mcpConfigPath?: string; tenantCode?: string; browserLocalPort?: number; /** * `commandId` is passed through so a Docker-mode config sync/setup that * detects a customization change and fires `performDockerRebuild()` can * tell `shutdown()` to exclude this very command from its in-flight drain * wait (it can only be removed from `inFlightCommands` after this handler * returns, so waiting on it would needlessly delay the rebuild). See * `ConfigSyncDeps.onDockerRebuild`'s doc comment. */ onSetup?: (commandId?: string) => Promise; onConfigSync?: (commandId?: string) => Promise; /** * `commandId` is passed through so the handler can tell `shutdown()` to * exclude this very command from its in-flight drain wait (it can only be * removed from `inFlightCommands` after this handler returns, so waiting on * it would deadlock). See `ProjectAgent.performReboot`/`performUpdate`. */ onReboot?: (commandId?: string) => Promise; onUpdate?: (commandId?: string) => Promise; onSyncRepository?: (repositoryCode: string, branch?: string) => Promise; /** * E2E 専用のブラウザーセッションを子プロセス実行前にメインプロセスへ * 事前登録するコールバック。e2e_test ハンドラにのみ渡す。 */ getOrCreateBrowserSession?: (sessionId: string) => Promise; /** E2E 専用のブラウザーセッションを実行後にクローズするコールバック。 */ closeBrowserSession?: (sessionId: string) => Promise; } export declare function executeCommand(command: CommandDispatch, options?: ExecuteCommandOptions): Promise; export declare function executeCommand(type: AgentCommandType, payload: Record, options?: ExecuteCommandOptions): Promise; export { executeShellCommand } from './shell-executor'; export { fileDelete, fileList, fileMkdir, fileRead, fileRename, fileWrite } from './file-executor'; export { processKill, processList } from './process-executor'; //# sourceMappingURL=index.d.ts.map