import { type TrajectoryDepth, type TrajectoryStatus, type TrajectorySummary } from "./types.js"; import type { TrajectoryCheckpoint, TrajectoryEvent, TrajectoryLedger, TrajectoryMutationInput, TrajectoryRecord, TrajectoryTraversal } from "./types.js"; /** * Create a phase-level trajectory in the ledger. * * Per D-04, phase trajectory ID format is `traj-phase-{N}`. * Per D-31, new trajectories start in "planning" status. * Per D-15/D-36, orchestrator creates phase trajectories explicitly. * * @param input - Phase trajectory creation parameters. * @returns Updated ledger and created trajectory. * @throws {Error} If a trajectory with the same phase number already exists. */ export declare function createPhaseTrajectory(input: { projectRoot: string; phaseNumber: number | string; rootSessionId: string; phaseName?: string; }): { ledger: TrajectoryLedger; trajectory: TrajectoryRecord; }; /** * Transition a trajectory to a target status, validating against TRAJECTORY_TRANSITIONS. * * Per D-31 to D-35, transitions support both automatic (event-based) and * manual (orchestrator tool call) paths. This is the manual transition function. * * Idempotent: transitioning to the current state is a no-op. * * @param projectRoot - Project root whose ledger should be used. * @param trajectoryId - Target trajectory ID. * @param targetStatus - Desired target status. * @returns Updated ledger and trajectory. * @throws {Error} When the trajectory doesn't exist or the transition is invalid. */ export declare function transitionTrajectory(projectRoot: string, trajectoryId: string, targetStatus: TrajectoryStatus): { ledger: TrajectoryLedger; trajectory: TrajectoryRecord; }; /** * Add an event to a trajectory with automatic state transitions. * * Per D-32 to D-34, certain event types trigger automatic state transitions. * If the event type matches TRAJECTORY_AUTO_TRANSITIONS, and the transition * is valid per TRAJECTORY_TRANSITIONS, the trajectory's status is updated. * * @param projectRoot - Project root whose ledger should be used. * @param trajectoryId - Target trajectory ID. * @param eventType - Event type string (may trigger auto-transition). * @param summary - Human-readable event summary. * @returns Updated ledger and trajectory. * @throws {Error} When the trajectory doesn't exist. */ export declare function addTrajectoryEvent(projectRoot: string, trajectoryId: string, eventType: string, summary: string): { ledger: TrajectoryLedger; trajectory: TrajectoryRecord; }; /** * Inspect the trajectory ledger, optionally focusing on a single trajectory. * * @param input - Project root and optional trajectory ID. * @returns Ledger plus optional selected trajectory. */ export declare function inspectTrajectoryLedger(input: { projectRoot: string; trajectoryId?: string; }): { ledger: TrajectoryLedger; trajectory?: TrajectoryRecord; }; /** * Attach evidence references to a trajectory, creating the trajectory when needed. * * @param input - Trajectory identity, optional lineage, and evidence references. * @returns Updated ledger and trajectory. */ export declare function attachTrajectoryEvidence(input: TrajectoryMutationInput): { ledger: TrajectoryLedger; trajectory: TrajectoryRecord; }; /** * Record a resumability checkpoint against an existing or newly created trajectory. * * @param input - Trajectory target, checkpoint identity, summary, and evidence references. * @returns Updated ledger and trajectory. */ export declare function checkpointTrajectory(input: TrajectoryMutationInput & { checkpointId?: string; summary: string; }): { ledger: TrajectoryLedger; trajectory: TrajectoryRecord; checkpoint: TrajectoryCheckpoint; }; /** * Record an evidence event against an existing or newly created trajectory. * * @param input - Trajectory target, event identity, event type, summary, and evidence references. * @returns Updated ledger and trajectory. */ export declare function eventTrajectory(input: TrajectoryMutationInput & { eventId?: string; eventType: string; summary: string; }): { ledger: TrajectoryLedger; trajectory: TrajectoryRecord; event: TrajectoryEvent; }; /** * Close a trajectory after verification while preserving all existing evidence. * * @param input - Target trajectory ID and optional close summary. * @returns Updated ledger and closed trajectory. * @throws {Error} When the target trajectory does not exist. */ export declare function closeTrajectory(input: { projectRoot: string; trajectoryId: string; summary?: string; }): { ledger: TrajectoryLedger; trajectory: TrajectoryRecord; }; /** * Traverse trajectory records by root session, concrete session, or trajectory ID. * * Supports progressive disclosure via the `depth` parameter (D-27 to D-30): * - "summary": returns status + event count + phase name + duration * - "detailed": returns event types + summaries (strips evidence refs) * - "full": returns all data (default, backward compat) * * @param input - Traversal filter, project root, and optional depth. * @returns Traversal projection at the requested depth level. */ export declare function traverseTrajectory(input: { projectRoot: string; rootSessionId?: string; sessionId?: string; trajectoryId?: string; depth?: TrajectoryDepth; }): TrajectoryTraversal | { summaries: TrajectorySummary[]; }; /** * Create an empty trajectory ledger value for tests and callers that need a seed object. * * @returns Empty versioned trajectory ledger. */ export declare function createTrajectoryLedger(): TrajectoryLedger; //# sourceMappingURL=store-operations.d.ts.map