Project Files
dist / types.d.ts
/**
* @file types.ts
* @description Type definitions for persona-manager plugin.
* Defines persona profiles, conversation context, and tool result shapes.
*/
/** A loaded persona profile definition. */
export interface PersonaProfile {
/** Unique identifier for this persona (kebab-case). */
readonly id: string;
/** Human-readable display name. */
readonly name: string;
/** Detailed persona description / backstory. */
readonly description: string;
/** The system prompt injected when this persona is active. */
readonly systemPrompt: string;
/** Optional greeting message used to start a conversation. */
readonly greeting?: string;
/** Optional tags for categorising personas. */
readonly tags?: ReadonlyArray<string>;
/** Optional example dialogs demonstrating the persona's voice. */
readonly examples?: ReadonlyArray<ExampleDialog>;
/** Arbitrary metadata (model parameters, temperature, etc.). */
readonly metadata?: Record<string, unknown>;
}
/** An example dialog entry showing persona voice. */
export interface ExampleDialog {
readonly role: "user" | "assistant";
readonly content: string;
}
/** A single message in the conversation history. */
export interface ConversationMessage {
readonly role: "user" | "assistant" | "system";
readonly content: string;
readonly timestamp: number;
}
/** Tracks the active persona and conversation state. */
export interface ConversationContext {
/** The currently active persona ID. */
readonly activePersonaId: string | null;
/** Display name of the active persona. */
readonly activePersonaName: string;
/** The system prompt currently injected into the model. */
readonly systemPrompt: string;
/** Number of messages in the current conversation. */
readonly messageCount: number;
}
/** Result of listing available personas. */
export interface ListPersonasResult {
readonly personas: ReadonlyArray<{
readonly id: string;
readonly name: string;
readonly description: string;
readonly tags?: ReadonlyArray<string>;
}>;
readonly count: number;
}
/** Result of switching to a persona. */
export interface SwitchPersonaResult {
readonly previousPersona: string | null;
readonly activePersona: PersonaProfile;
readonly contextReset: boolean;
}
/** Result of querying the active persona. */
export interface GetPersonaResult {
readonly active: boolean;
readonly persona: PersonaProfile | null;
readonly context: ConversationContext;
}
/** Parameters for saving a new persona profile. */
export interface SavePersonaParams {
/** Display name (e.g. "Marie Curie"). */
readonly name: string;
/** Persona description / backstory. */
readonly description: string;
/** System prompt injected when this persona is active. */
readonly systemPrompt: string;
/** Optional greeting message. */
readonly greeting?: string;
/** Optional tags for categorising. */
readonly tags?: ReadonlyArray<string>;
/** Whether to overwrite an existing profile with the same ID. */
readonly overwrite?: boolean;
}
/** Result of saving a persona profile. */
export interface SavePersonaResult {
readonly id: string;
readonly name: string;
readonly description: string;
readonly systemPrompt: string;
readonly greeting?: string;
readonly tags?: ReadonlyArray<string>;
readonly filePath: string;
readonly success: boolean;
readonly overwritten: boolean;
readonly message: string;
}
//# sourceMappingURL=types.d.ts.map