Skip to content
Français

ConversationStore

import type { ConversationStore } from "@elie-laloum/outpost";
  • nameRequired
    string
    Store name, such as claude or transport:<namespace>:<format>. Outpost pairs it with the conversation id to skip restoring a conversation the sandbox already holds.
  • formatOptional
    string | undefined
    Persisted format this store reads and writes, such as claude, codex, copilot, kimi or harness. A harness rejects a store of another format at creation with code configuration, and createTransportConversations() requires a base store that declares one.
  • locateRequired
    (id: string, repository: string, home?: string) => Promise<ConversationRecord>
    Finds a captured conversation on the host from its id, the repository and an optional home, before it is restored. Rejects when the conversation is missing.
  • captureRequired
    (id: string, context: ConversationContext) => Promise<ConversationRecord>
    Saves conversation id from the context’s sandbox to the host after a turn and returns its record.
  • restoreRequired
    (record: ConversationRecord, context: ConversationContext) => Promise<void>
    Writes a located record into the context’s sandbox before a continued turn, relocating recorded paths to the sandbox workspace.
export interface ConversationStore {
  readonly name: string;
  readonly format?: string;
  locate(
    id: string,
    repository: string,
    home?: string,
  ): Promise<ConversationRecord>;
  capture(
    id: string,
    context: ConversationContext,
  ): Promise<ConversationRecord>;
  restore(
    record: ConversationRecord,
    context: ConversationContext,
  ): Promise<void>;
}