import { type GoalRecord, type GoalResult } from "@kenkaiiii/gg-engine/internal/core/goals-store.js"; import type { SubAgentSnapshot } from "@kenkaiiii/gg-engine/internal/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; /** * `running` when some process holds the goal's run marker (this one, the * desktop app, another `ggcoder acp`). A client that knows of a live run of * its own may still overlay `running` on top. */ status: "briefing" | "running" | "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[];