/** * @mastra/opencode * * OpenCode plugin that brings Mastra Observational Memory into opencode sessions. * * Mastra OM compresses long conversation history into structured observations * using an Observer (extract) and Reflector (condense) architecture. * * Configuration is read from .opencode/mastra.json in the project root. * * @example .opencode/mastra.json * ```json * { * "model": "google/gemini-2.5-flash", * "observation": { "messageTokens": 20000 }, * "reflection": { "observationTokens": 90000 }, * "storagePath": ".opencode/memory/observations.db" * } * ``` */ import type { ObservationalMemoryOptions } from '@mastra/core/memory'; import type { Plugin } from '@opencode-ai/plugin'; export type { ObservationalMemoryOptions }; /** * Plugin config read from .opencode/mastra.json. * Extends Mastra's ObservationalMemoryOptions with opencode-specific fields. * * In the opencode plugin context, pass string model IDs * (e.g., 'google/gemini-2.5-flash') — Mastra's provider registry resolves them. */ export interface MastraOMPluginConfig extends ObservationalMemoryOptions { /** * Path to the SQLite database file for observation storage. * Relative to the project root. * * @default '.opencode/memory/observations.db' */ storagePath?: string; } export declare const MastraPlugin: Plugin; //# sourceMappingURL=index.d.ts.map