Interface IDumpInstance

Interface for dump instance implementations. Instances are scoped to (signalId, bucketName) via constructor. Methods receive only the payload and dumpId.

interface IDumpInstance {
    dispose(): void;
    dumpAgentAnswer(
        messages: MessageModel<MessageRole>[],
        dumpId: string,
        description: string,
    ): Promise<void>;
    dumpError(
        content: string,
        dumpId: string,
        description: string,
    ): Promise<void>;
    dumpJson(json: object, dumpId: string, description: string): Promise<void>;
    dumpRecord(
        record: Record<string, unknown>,
        dumpId: string,
        description: string,
    ): Promise<void>;
    dumpTable(
        rows: Record<string, unknown>[],
        dumpId: string,
        description: string,
    ): Promise<void>;
    dumpText(
        content: string,
        dumpId: string,
        description: string,
    ): Promise<void>;
}

Methods

  • Releases any resources held by this instance.

    Returns void

  • Persist the full message history of one agent invocation.

    Parameters

    • messages: MessageModel<MessageRole>[]

      Full chat history (system, user, assistant, tool)

    • dumpId: string

      Unique identifier for this dump entry

    • description: string

      Human-readable label describing the agent invocation context; included in the BM25 index for Memory search

    Returns Promise<void>

  • Persist an error description.

    Parameters

    • content: string

      Error message or description to dump

    • dumpId: string

      Unique identifier for this dump entry

    • description: string

      Human-readable label describing the error context; included in the BM25 index for Memory search

    Returns Promise<void>

  • Persist an arbitrary nested object as a fenced JSON block.

    Parameters

    • json: object

      Arbitrary object to serialize with JSON.stringify

    • dumpId: string

      Unique identifier for this dump entry

    • description: string

      Human-readable label describing the object contents; included in the BM25 index for Memory search

    Returns Promise<void>

    Prefer dumpRecord - flat key-value structure maps naturally to markdown tables and SQL storage

  • Persist a flat key-value record.

    Parameters

    • record: Record<string, unknown>

      Arbitrary flat object to dump

    • dumpId: string

      Unique identifier for this dump entry

    • description: string

      Human-readable label describing the record contents; included in the BM25 index for Memory search

    Returns Promise<void>

  • Persist an array of objects as a table. Column headers are derived from the union of all keys across all rows.

    Parameters

    • rows: Record<string, unknown>[]

      Array of arbitrary objects to dump

    • dumpId: string

      Unique identifier for this dump entry

    • description: string

      Human-readable label describing the table contents; included in the BM25 index for Memory search

    Returns Promise<void>

  • Persist a raw text or markdown string.

    Parameters

    • content: string

      Arbitrary text content to dump

    • dumpId: string

      Unique identifier for this dump entry

    • description: string

      Human-readable label describing the content; included in the BM25 index for Memory search

    Returns Promise<void>