/** * Copyright Daytona Platforms Inc. * SPDX-License-Identifier: Apache-2.0 */ /** * Manages Daytona sandbox sessions and persists session-sandbox mappings * Stores data per-project in ~/.local/share/opencode/storage/daytona/{projectId}.json */ import { type Sandbox } from '@daytona/sdk'; import type { PluginInput } from '@opencode-ai/plugin'; export declare class DaytonaSessionManager { private readonly apiKey; private readonly dataStorage; private sessionSandboxes; private currentProjectId?; readonly repoPath: string; constructor(apiKey: string, storageDir: string, repoPath: string); /** * Check if a sandbox is fully initialized (has process property) */ private isFullyInitialized; /** * Check if a sandbox is partially initialized (has id but not process) */ private isPartiallyInitialized; /** * Load sessions for a specific project into memory */ private loadProjectSessions; /** * Set the current project context */ setProjectContext(projectId: string): void; /** * Get branch number for a sandbox */ getBranchNumberForSandbox(projectId: string, sandboxId: string): number | undefined; /** * Get or create a sandbox for the given session ID */ getSandbox(sessionId: string, projectId: string, worktree: string, pluginCtx?: PluginInput): Promise; /** * Delete the sandbox associated with the given session ID */ deleteSandbox(sessionId: string, projectId: string): Promise; }