import { type ParsedArgs, type RunpaneAgent } from './commands'; import type { BoundarySchema } from './boundaryDecoder'; interface OrchestrationLink { label: string; url: string; kind?: 'evidence' | 'output' | 'ticket' | 'pull-request' | 'other'; provenance?: string; addedAt: string; } interface OrchestrationReport { summary: string; status: 'reported' | 'verified'; evidence: OrchestrationLink[]; reportedAt: string; provenance: string; } interface OrchestrationAssociation { paneId: string; panelIds: string[]; attachedAt: string; } interface OrchestrationActivity { id: string; kind: 'created' | 'updated' | 'associated' | 'detached' | 'working' | 'blocked' | 'idle' | 'unknown' | 'report'; message: string; at: string; source: 'user' | 'agent' | 'system'; paneId?: string; panelId?: string; } type OrchestrationAgent = 'claude' | 'codex' | 'cursor'; interface OrchestrationSessionRecord { runtime?: 'windows' | 'wsl'; wslDistribution?: string; id: string; name: string; archived?: boolean; isPinned?: boolean; agent: OrchestrationAgent; internalSessionId: string; panelIds: Record; goal: string; context: string; decisions: string[]; blockers: string[]; nextAction: string; evidence: OrchestrationLink[]; outputs: OrchestrationLink[]; associations: OrchestrationAssociation[]; activity: OrchestrationActivity[]; report?: OrchestrationReport; reportActivityId?: string; reportAcceptedAt?: string; revision: number; createdAt: string; updatedAt: string; } interface RunpaneSessionListResult { ok: true; sessions: OrchestrationSessionRecord[]; selectedSessionId?: string; } interface RunpaneSessionResult { ok: true; session: OrchestrationSessionRecord; panelId?: string; internalSessionId?: string; } interface RepoSummary { id: number; name: string; path: string; active: boolean; environment?: string; sessionCount: number; } interface RepoListResult { ok: true; repos: RepoSummary[]; } interface PaneCreateRequest { repo: string | { id: number; } | { path: string; } | { name: string; } | { active: true; }; panes: PaneCreateItem[]; dryRun?: boolean; timeoutMs?: number; waitReady?: boolean; readyTimeoutMs?: number; concurrency?: number; noFocus?: boolean; focus?: boolean; source?: 'user' | 'agent'; associateSession?: string; expectReport?: boolean; } interface PaneCreateItem { name: string; worktreeName?: string; branch?: string; baseBranch?: string; sessionPrompt?: string; pinned?: boolean; tool: PaneToolSpec; /** A native session id the new Pane's agent resumes, as panes adopt --resume. */ resume?: string; } type PaneToolSpec = { agent: RunpaneAgent; title?: string; initialInput?: string; initialInputAsFilePointer?: boolean; initialInputAttachments?: string[]; } | { command: string; agentType?: RunpaneAgent; title?: string; initialInput?: string; initialInputAsFilePointer?: boolean; initialInputAttachments?: string[]; }; interface PromptWarning { code: 'leading-bang-runs-shell' | 'leading-hash-memory' | 'leading-slash-command' | 'leading-at-mention'; message: string; } interface PaneCreateSuccessItem { /** False when the pane was created but did not become ready or take its initial input. */ ok: boolean; index: number; name?: string; pinned: boolean; sessionId?: string; paneId?: string; panelId?: string; tool?: { title: string; command: string; agent?: RunpaneAgent; }; active?: boolean; focused?: boolean; worktreePath?: string; nextCommand?: string; readiness?: PanelReadiness; initialInput?: InitialInputDeliveryResult; association?: { sessionId: string; ok: boolean; error?: string; }; promptFile?: string; attachments?: string[]; warnings?: PromptWarning[]; expectedReport?: ExpectedReport; /** Set when setup waits for a slot; the agent starts after setup, so there is no panel yet. */ setupQueue?: { position: number; message: string; }; /** The base a worktree Pane started from; `notice` says when it could not be refreshed from the remote. */ base?: PaneBase; } interface PaneBase { ref: string; commit?: string; refresh: 'fetched' | 'recent' | 'skipped' | 'failed'; notice?: string; } interface PaneCreateFailureItem { ok: false; index: number; name?: string; sessionId?: string; paneId?: string; panelId?: string; worktreePath?: string; error: { message: string; code?: string; }; } interface PaneCreateResult { /** Epoch of the pre-dispatch journal position. */ epoch?: string; ok: boolean; generation?: number; repo: RepoSummary; items: Array; } interface InitialInputDeliveryResult { delivered: boolean; submitted: boolean; inputBytes: number; strategy?: 'codex-ctrl-enter' | 'enter' | 'argument'; sequenceName?: 'codex-ctrl-enter-cr' | 'enter-cr' | 'argument'; verifiedSubmitted?: boolean; verification?: 'observed' | 'unverifiable'; delivery?: Delivery; staged?: boolean; attempts?: number; sentAt?: string; blocked?: PanelBlockedState; error?: { message: string; code?: string; }; nextCommand?: string; } interface PaneSummary { id: string; paneId: string; name: string; status: string; agentStatus: 'active' | 'idle'; agentState?: 'ready' | 'working' | 'blocked' | 'none'; worktreePath: string; repoId: number; repoName?: string; panelCount: number; pinned: boolean; createdAt?: string; lastActivity?: string; archived?: boolean; ownership: 'pane' | 'external'; } interface PaneListResult { ok: true; repo?: RepoSummary; panes: PaneSummary[]; } /** The latest `runpane report` from an agent panel. */ export interface AgentReport { state: 'ready' | 'blocked' | 'failed' | 'done'; pr?: number; head?: string; summary?: string; summaryTruncated?: true; summaryPath?: string; question?: string; reportedAt: string; } interface PanelSummary { id: string; panelId: string; paneId: string; type: string; title: string; active: boolean; initialized?: boolean; running?: boolean; agentType?: string; agentDetection?: 'declared' | 'command' | 'process' | 'screen'; launchCommand?: string; isCliPanel?: boolean; dock?: boolean; position?: number; createdAt?: string; lastActiveAt?: string; report?: AgentReport; /** Saved agent session ID that reopens this panel. */ resumeId?: string; /** Which rule resumes with resumeId: derived Agent Farm, the panel's configured command, or built-in agent capture. */ resumeSource?: 'agent-farm' | 'configured' | 'agent'; } interface PanelListResult { ok: true; paneId: string; panels: PanelSummary[]; } interface PanelCreateRequest { paneId: string; type?: 'terminal'; tool: PaneToolSpec; /** A native session id the new tab resumes, as panes adopt --resume. */ resume?: string; noFocus?: boolean; focus?: boolean; source?: 'user' | 'agent'; waitReady?: boolean; readyTimeoutMs?: number; expectReport?: boolean; } /** The report Pane waits for after `--expect-report`. */ interface ExpectedReport { since: string; } interface PanelCreateResult { /** Epoch of the pre-dispatch journal position. */ epoch?: string; ok: boolean; generation?: number; paneId: string; panelId: string; title: string; active: boolean; focused: boolean; tool: { title: string; command: string; agent?: RunpaneAgent; }; readiness?: PanelReadiness; initialInput?: InitialInputDeliveryResult; promptFile?: string; attachments?: string[]; warnings?: PromptWarning[]; expectedReport?: ExpectedReport; nextCommand?: string; } interface PanelInputRequest { panelId: string; input: string; /** panels submit only: send `Read and follow ` in place of the text. */ asFilePointer?: boolean; /** panels submit only: absolute paths of `--attach` files to copy beside the prompt file. */ attachments?: string[]; interrupt?: boolean; source?: 'user' | 'agent'; /** panels submit only. */ expectReport?: boolean; } interface PanelStateSummary { initialized: boolean; running?: boolean; isAlternateScreen?: boolean; activityStatus?: 'active' | 'idle'; isCliReady?: boolean; isCliPanel?: boolean; agentType?: RunpaneAgent; lastActivity?: string; } /** Where a prompt sent to a Claude or Codex composer went, and what Pane read to know. */ interface Delivery { state: 'taken' | 'queued' | 'in-composer' | 'unknown'; evidence: 'transcript' | 'screen' | 'argv' | 'acp-receipt'; message?: string; } interface PanelBlockedState { kind: 'first-run-dialog' | 'codex-update' | 'agent-prompt' | 'submission_unverified' | 'composer-unknown' | 'unknown'; message: string; suggestedCommand?: string; } /** Why a `ready` wait on a launched command did not match. */ interface PanelReadinessReason { code: 'no-agent-detected' | 'agent-not-ready' | 'command-exited'; message: string; } interface PanelReadiness { ok: boolean; condition: string; matched: boolean; timedOut: boolean; elapsedMs: number; state: PanelStateSummary; blocked?: PanelBlockedState; reason?: PanelReadinessReason; nextCommand?: string; } interface PanelScreenResult { ok: true; panelId: string; paneId?: string; source: 'alternateScreen' | 'scrollback' | 'persistedOutput' | 'empty'; limit: number; returnedLineCount: number; hasMore: boolean; text: string; state: PanelStateSummary; composer: { isPresent: boolean; hasUndeliveredText: boolean; ghostText?: string; }; nextCommand?: string; } interface PanelSubmitResult { /** Epoch of the pre-dispatch journal position. */ epoch?: string; ok: boolean; generation?: number; panelId: string; paneId?: string; inputBytes: number; enter: 'cr' | 'tab' | 'none'; sequenceName: 'codex-ctrl-enter-cr' | 'enter-cr' | 'tab' | 'acp'; operationId?: string; verifiedSubmitted: boolean; verification?: 'observed' | 'unverifiable'; delivery?: Delivery; sentAt: string; blocked?: PanelBlockedState; promptFile?: string; attachments?: string[]; warnings?: PromptWarning[]; expectedReport?: ExpectedReport; nextCommand?: string; } type WorkspaceEntryKind = 'agent.ready' | 'agent.busy' | 'agent.blocked' | 'agent.unknown' | 'agent.idle' | 'pane.created' | 'pane.gone' | 'panel.exited' | 'panel.stopped' | 'agent.report' | 'agent.report.missing' | 'pane.associated' | 'pane.detached' | 'pr.conflicted' | 'pr.checks' | 'pr.merged' | 'pr.closed' | 'pr.head' | 'pr.base_changed' | 'pr.base_deleted' | 'pr.review' | 'pr.comment' | 'pr.stopped' | 'github.unavailable' | 'github.recovered'; interface WorkspacePanelSummary { panelId: string; title: string; agentType?: string; agentState?: 'blocked' | 'working' | 'idle' | 'unknown'; running?: boolean; } interface WorkspaceEntry { gen: number; at: string; kind: WorkspaceEntryKind; paneId: string; paneName: string; repoId?: number; repoName?: string; worktreePath?: string; panelId?: string; panelTitle?: string; agentType?: string; from?: 'blocked' | 'working' | 'idle' | 'unknown'; to?: 'blocked' | 'working' | 'idle' | 'unknown'; source: 'agent' | 'exit' | 'session' | 'github'; reason?: string | null; settledMs?: number; idleMs?: number; idleCount?: number; heldInput?: string; heldInputPresent?: boolean; exitCode?: number; running?: boolean; baseline?: true; replay?: true; changedWhileAway?: boolean; sessionId?: string; sessionName?: string; pr?: { number: number; url: string; headOid: string; }; base?: { from: string; to: string; }; checks?: 'passed' | 'failed'; failingChecks?: string[]; panels?: WorkspacePanelSummary[]; report?: AgentReport; lastOutput?: string; lastOutputSource?: 'transcript' | 'screen'; expectedSince?: string; screenLines?: string[]; } interface WorkspaceStateResult { ok: true; epoch: string; generation: number; entries: WorkspaceEntry[]; } export declare const repoListResultSchema: BoundarySchema; export declare const paneListResultSchema: BoundarySchema; export declare const runpaneSessionListResultSchema: BoundarySchema; export declare const runpaneSessionResultSchema: BoundarySchema; export declare const paneCreateResultSchema: BoundarySchema; export declare const panelListResultSchema: BoundarySchema; export declare const panelCreateResultSchema: BoundarySchema; export declare const panelScreenResultSchema: BoundarySchema; export declare const panelSubmitResultSchema: BoundarySchema; export declare const workspaceStateResultSchema: BoundarySchema; export declare function runReposList(parsed: ParsedArgs): Promise; export declare function runReposAdd(parsed: ParsedArgs): Promise; export declare function runPanesList(parsed: ParsedArgs): Promise; export declare function runSessionsList(parsed: ParsedArgs): Promise; export declare function runSessionsCreate(parsed: ParsedArgs): Promise; export declare function runSessionsGet(parsed: ParsedArgs): Promise; export declare function runSessionsUpdate(parsed: ParsedArgs): Promise; export declare function runSessionsPin(parsed: ParsedArgs, pinned: boolean): Promise; export declare function runSessionsSetAgent(parsed: ParsedArgs): Promise; export declare function runSessionsAssociate(parsed: ParsedArgs): Promise; export declare function runSessionsDetach(parsed: ParsedArgs): Promise; export declare function runSessionsOverview(parsed: ParsedArgs): Promise; export declare function runLockAcquire(parsed: ParsedArgs): Promise; export declare function runLockRelease(parsed: ParsedArgs): Promise; export declare function runLockList(parsed: ParsedArgs): Promise; export declare function runLoopsList(parsed: ParsedArgs): Promise; export declare function runLoopsSave(parsed: ParsedArgs): Promise; export declare function runLoopsRun(parsed: ParsedArgs): Promise; export declare function runLoopsSetEnabled(parsed: ParsedArgs, enabled: boolean): Promise; export declare function runLoopsDelete(parsed: ParsedArgs): Promise; export declare function runPanesCost(parsed: ParsedArgs): Promise; export declare function runWorkspaceState(parsed: ParsedArgs): Promise; export declare function runPrWatchCommand(parsed: ParsedArgs): Promise; interface DispatchWatchTarget { paneId: string; panelId?: string; } export declare function runWatch(parsed: ParsedArgs, dispatch?: DispatchWatchTarget): Promise; export declare function runPanesCreate(parsed: ParsedArgs): Promise; export declare function runPanesAdopt(parsed: ParsedArgs): Promise; export declare function runPanesArchive(parsed: ParsedArgs): Promise; export declare function runPanesPin(parsed: ParsedArgs, pinned: boolean): Promise; export declare function runPanesRename(parsed: ParsedArgs): Promise; export declare function runPanesFocus(parsed: ParsedArgs): Promise; export declare function runPanelsList(parsed: ParsedArgs): Promise; export declare function runPanelsCreate(parsed: ParsedArgs): Promise; export declare function runPanelsOpen(parsed: ParsedArgs): Promise; export declare function runPanelsOutput(parsed: ParsedArgs): Promise; export declare function runPanelsInput(parsed: ParsedArgs): Promise; export declare function runPanelsScreen(parsed: ParsedArgs): Promise; export declare function runPanelsLastMessage(parsed: ParsedArgs): Promise; export declare function runReport(parsed: ParsedArgs, env?: NodeJS.ProcessEnv): Promise; export declare function runInbox(parsed: ParsedArgs, env?: NodeJS.ProcessEnv): Promise; export declare function runInboxAck(parsed: ParsedArgs, env?: NodeJS.ProcessEnv): Promise; export declare function runPanelsSubmit(parsed: ParsedArgs): Promise; /** * Mark the composer line that shows ghost text (a placeholder or the agent's * suggested next prompt), so it does not read as typed input. */ export declare function markSuggestionLine(text: string, ghostText: string | undefined): string; /** The prompt file Pane wrote and any leading-character warnings, for human output. */ export declare function printPromptNotes(result: { promptFile?: string; attachments?: string[]; warnings?: PromptWarning[]; expectedReport?: ExpectedReport; }, prefix?: string): void; export declare function runPanelsSubmitComposer(parsed: ParsedArgs): Promise; export declare function runPanelsWait(parsed: ParsedArgs): Promise; export declare function runPanelsResume(parsed: ParsedArgs): Promise; export declare function runAgentsDoctor(parsed: ParsedArgs): Promise; export declare function buildPanelInputRequest(parsed: ParsedArgs, command?: 'input' | 'submit'): PanelInputRequest; export declare function buildPanelCreateRequest(parsed: ParsedArgs): Promise; export declare function buildPaneCreateRequest(parsed: ParsedArgs): Promise; export {}; //# sourceMappingURL=localControl.d.ts.map