Function dumpJson

  • Dumps an arbitrary nested object as a fenced JSON block scoped to the current signal.

    Resolves the active pending or scheduled signal automatically from execution context. Automatically detects backtest/live mode from execution context.

    Parameters

    • dto: { bucketName: string; description: string; dumpId: string; json: object }
      • bucketName: string

        Bucket name grouping dumps by strategy or agent name

      • description: string

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

      • dumpId: string

        Unique identifier for this dump entry

      • json: object

        Arbitrary nested object to serialize with JSON.stringify

    Returns Promise<void>

    Promise that resolves when the dump is complete

    Error if no pending or scheduled signal exists

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

    import { dumpJson } from "backtest-kit";

    await dumpJson({ bucketName: "my-strategy", dumpId: "signal-state", json: { entries: [], partials: [] }, description: "Signal state snapshot" });