Class JsonResultStore

java.lang.Object
dev.dokimos.mcp.store.JsonResultStore
All Implemented Interfaces:
ResultStore

public class JsonResultStore extends Object implements ResultStore
Stores run records as a JSON array in a local file. Default location: ~/.dokimos/mcp-results.json
  • Constructor Details

    • JsonResultStore

      public JsonResultStore()
    • JsonResultStore

      public JsonResultStore(Path filePath)
  • Method Details

    • save

      public void save(RunRecord record)
      Description copied from interface: ResultStore
      Saves a run record. Overwrites if a record with the same ID exists.
      Specified by:
      save in interface ResultStore
    • get

      public Optional<RunRecord> get(String runId)
      Description copied from interface: ResultStore
      Returns a run by ID, or empty if not found.
      Specified by:
      get in interface ResultStore
    • list

      public List<RunRecord> list(String datasetName, int limit)
      Description copied from interface: ResultStore
      Lists runs, most recent first.
      Specified by:
      list in interface ResultStore
      Parameters:
      datasetName - optional filter by dataset name (null for all)
      limit - maximum number to return (0 for all)
      Returns:
      matching records