import { type GoalRecord, type GoalResult } from "../core/goals-store.js"; import type { SubAgentSnapshot } from "../core/subagent-manager.js"; import type { AppAttachment } from "../app-sidecar/attachments.js"; /** `_gg/goals/list` row: the sidecar's GoalSummary, addressed by session id. */ export interface AcpGoalSummary { id: string; name: string; goal: string; context: GoalRecord["context"]; path: string; createdAt: string; lastActiveMs: number; lastActiveDisplay: string; /** The id `session/load` / `session/resume` take; null starts a fresh coordinator. */ agentSessionId: string | null; /** * Standing instructions, so a client's goal settings can show what is set * (absent = none). The desktop app reads them from the record the same way. */ instructions?: string; /** Never `running`: ggcoder computes it without a live run (the client overlays that). */ status: "briefing" | "paused" | "interrupted" | "idle"; } /** pew2 wire `GoalWorker`. */ export interface AcpGoalWorker { id: string; name: string; agent?: string; state: "starting" | "running" | "completed" | "failed" | "interrupted" | "closed"; activity?: string; startedAt?: number; elapsedMs?: number; toolUses?: number; model?: string; error?: string; } /** Every goal, most recently active first. */ export declare function listAcpGoals(agentDir: string): Promise; /** Create a goal from `_gg/goals/create` params; the store's own error text on failure. */ export declare function createAcpGoal(agentDir: string, params: unknown): Promise>; /** The worker roster for `_gg/goal_state`. A reaped worker reads as closed. */ export declare function goalWorkers(snapshots: readonly SubAgentSnapshot[]): AcpGoalWorker[]; /** * ACP `image` prompt blocks as the app's attachment shape, so they take the * same `prepareAttachments` → `promptWithAttachments` path the desktop does. * Blocks carrying only a `uri` (no inline data) are skipped. */ export declare function acpImageAttachments(blocks: unknown): AppAttachment[];