/** * Copyright 2025 Vybestack LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @plan PLAN-20260211-SESSIONRECORDING.P21 * @requirement REQ-MGT-001, REQ-MGT-002, REQ-MGT-003 * @pseudocode session-management.md lines 70-130 * * Session management commands (core layer). Returns data objects only — * no table formatting, no console output, no terminal colors. */ import { type SessionSummary } from './types.js'; /** * Result of listing sessions for a project. */ export interface ListSessionsResult { sessions: SessionSummary[]; } /** * Successful session deletion result. */ export interface DeleteSessionResult { ok: true; deletedSessionId: string; } /** * Failed session deletion result. */ export interface DeleteSessionError { ok: false; error: string; } /** * List all sessions matching the given project hash, sorted newest-first. * * @pseudocode session-management.md lines 75-98 */ export declare function listSessions(chatsDir: string, projectHash: string): Promise; /** * Delete a session identified by ref (session ID, prefix, or 1-based index). * Refuses to delete a session that is actively locked by another process. * * @pseudocode session-management.md lines 105-150 */ export declare function deleteSession(ref: string, chatsDir: string, projectHash: string): Promise;