diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index aa3e9aa5b6..62bb75050c 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -9,6 +9,8 @@ import * as path from 'node:path'; import { inspect } from 'node:util'; import process from 'node:process'; import { z } from 'zod'; +import type { ConversationRecord } from '../services/chatRecordingService.js'; +export type { ConversationRecord }; import { AuthType, createContentGenerator, @@ -228,6 +230,25 @@ export interface ResolvedExtensionSetting { source?: string; } +export interface TrajectoryProvider { + /** Prefix used to identify sessions from this provider (e.g., 'ext:') */ + prefix: string; + /** Optional display name for UI Tabs */ + displayName?: string; + /** Return an array of conversational tags/ids */ + listSessions(workspaceUri?: string): Promise< + Array<{ + id: string; + mtime: string; + name?: string; + displayName?: string; + messageCount?: number; + }> + >; + /** Load a single conversation payload */ + loadSession(id: string): Promise; +} + export interface AgentRunConfig { maxTimeMinutes?: number; maxTurns?: number; @@ -377,6 +398,8 @@ export interface GeminiCLIExtension { * Used to migrate an extension to a new repository source. */ migratedTo?: string; + /** Loaded JS module for trajectory decoding */ + trajectoryProviderModule?: TrajectoryProvider; } export interface ExtensionInstallMetadata {