import { AgentSession, type AgentSessionOptions } from "../core/agent-session.js"; import { type GoalBriefExtras, type GoalRecord } from "../core/goals-store.js"; import type { ChildModelPick } from "../core/subagent-manager.js"; /** * Little Ken's faces in the Workers view's dialogue box. GG Goals picks one * for the spoken line it ends a message with (`[ken:face] …`). Must match * KEN_FACES in gg-app/src/goal-ken-talk.ts, which reads the line (an unknown * face falls back to neutral there). */ export declare const KEN_FACES: readonly ["neutral", "happy", "excited", "thinking", "focused", "surprised", "worried", "sad", "proud", "wink"]; /** * GG Goals: the orchestrator a Goal window talks to. It is its own agent, not * GG Coder with a note attached: its identity and the goal brief form its * system prompt, it has no plan mode (it plans in the conversation), and its * prompt cache is keyed apart from coding sessions. */ export declare const GOALS_SYSTEM_PROMPT: string; /** Agent tools GG Goals always has, instead of finding them via tool_search. */ export declare const GOALS_CORE_TOOLS: readonly string[]; export type GoalsAgentOptions = Omit & { /** The goal this session coordinates; its folder is the session's cwd. */ goal: { dir: string; record: GoalRecord; }; /** Memory and attached projects' rules, read once for the session (see loadGoalBriefExtras). */ extras?: GoalBriefExtras; /** True once the user has started the goal. Read live: the phase changes mid-session. */ isActive?: () => boolean; /** The workers' model. Read at each spawn: the user can change it any time. */ getChildModel?: () => ChildModelPick | undefined; }; /** * The model GG Goals' workers ("critters") run on, from the goal's pick. A * pick whose model is gone from the registry, or now belongs to a different * provider, is ignored, so workers fall back to GG Goals' own model. */ export declare function goalCritterPick(record: GoalRecord | undefined): ChildModelPick | undefined; /** GG Goals' full prompt body: identity first, then this goal's brief. */ export declare function buildGoalsAgentPrompt(goal: { dir: string; record: GoalRecord; }, extras?: GoalBriefExtras): string; /** * Read what GG Goals' brief carries besides the goal, once per session: its * memory, and each attached folder's instruction files (AGENTS.md, CLAUDE.md…). * GG Goals' own cwd is the goal folder, so without this it never saw the rules * of the projects it works in. A folder that can't be read just has no rules. */ export declare function loadGoalBriefExtras(goal: { dir: string; record: GoalRecord; }): Promise; /** * Tools that do or start work: held until the user starts the goal, then * GG Goals' own. It does small and connected work itself (a worker starts * cold and re-reads everything; live runs showed one session beating a * single worker on every such goal), and starts workers for big independent * parts. Same tool schemas either way, so the cached tool block never changes. */ export declare const GOALS_START_TOOLS: ReadonlySet; /** * Tools GG Goals never has: UI component adoption and image generation (not * part of a goal's work), and the one-shot \`subagent\`, which always runs in * GG Goals' own goal folder and can't be pointed at an attached folder; * spawn_agent is the only way it starts workers. */ export declare const GOALS_WITHOUT_TOOLS: readonly string[]; /** What editing, running or starting work returns during the briefing. */ export declare const BRIEFING_ERROR = "Not yet: the goal hasn't started. During the briefing you only read (read, ls, find, web search) and ask. Editing, running commands and starting workers open once the user starts the goal. If the user has told you to go ahead, ask the start question now with ask_user (the goal starts when they pick it); never begin the work before that."; /** Error text ask_user returns while GG Goals has not spoken yet. */ export declare const GREET_FIRST_ERROR = "Not yet: write to the user first. Greet them and say the goal back in your own words as a normal message, then ask."; /** * Hold ask_user until GG Goals has written something to the user. A question * card as the very first thing in a new goal reads as an interrogation, and a * card shown before the turn's text would sit above the greeting. Once there * is any assistant text (this run or an earlier one), the tool is untouched. */ /** * Added to the answer that starts the goal. The kickoff told GG Goals not to * start work in its first reply, and the start question usually rides on that * same reply's card: without this it stopped right after the user started the * goal (live run, "Add a blog"), and the goal sat idle. */ export declare const GOAL_STARTED_NOTE = "\n\nThe goal has started. Start the work now, in this reply: do it yourself, or start workers for its big independent parts."; /** * Create a GG Goals session. Sessions are stored like coding sessions, keyed by * the goal folder, so the goal list and goal deletion find them there. */ export declare function createGoalsAgentSession(options: GoalsAgentOptions): AgentSession;