import { type Goal, type GoalProvenance } from "../goals/state"; export declare const GJC_SESSION_FILE_ENV = "GJC_SESSION_FILE"; export declare const GJC_SESSION_ID_ENV = "GJC_SESSION_ID"; export declare const GJC_SESSION_CWD_ENV = "GJC_SESSION_CWD"; declare const REQUEST_VERSION = 1; export declare const DEFAULT_ULTRAGOAL_OBJECTIVE = "Complete the durable ultragoal plan in .gjc/ultragoal/goals.json, including later accepted/appended stories, under the original brief constraints; use .gjc/ultragoal/ledger.jsonl as the audit trail."; export interface PendingGoalModeRequest { version: typeof REQUEST_VERSION; kind: "goal_mode_request"; source: "ultragoal"; objective: string; createdAt: string; goalsPath?: string; provenance: Extract; /** * Session id that produced this request (from GJC_SESSION_ID). When present, * only the originating session may consume it, so concurrent sessions sharing * the same `.gjc` project state never auto-run each other's ultragoal. */ sessionId?: string; } export type CurrentSessionGoalModeWriteResult = { status: "unavailable"; reason: "missing_session_file" | "empty_session_file"; } | { status: "existing_goal"; goal: Goal; } | { status: "updated"; goal: Goal; sessionFile: string; }; export declare function isUltragoalCreateGoalsInvocation(args: readonly string[]): boolean; export declare function readUltragoalGjcObjective(cwd: string, sessionId?: string | null): Promise<{ objective: string; goalsPath: string; provenance: Extract; }>; export declare function writePendingGoalModeRequest(input: { cwd: string; objective: string; goalsPath?: string; sessionId?: string | null; provenance?: Extract; }): Promise; export declare function writeCurrentSessionGoalModeState(input: { sessionFile?: string | null; objective: string; provenance?: Goal["provenance"]; }): Promise; export declare function consumePendingGoalModeRequest(cwd: string, currentSessionId?: string | null): Promise; export declare function buildGjcRuntimeSessionEnv(input: { sessionFile?: string | null; sessionId?: string | null; cwd?: string | null; }): Record; export {};