Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

473 B
Raw Blame
// Shim: openclaw/plugin-sdk/json-store → vendored fs-safe json helpers.
import { tryReadJsonSync, writeJsonSync } from '../_generated/vendor/fs-safe/dist/json.js';

/** Read small JSON blobs synchronously for token/state caches. */
export function loadJsonFile<T = unknown>(filePath: string): T | undefined {
  return (tryReadJsonSync(filePath) as T | undefined) ?? undefined;
}

/** Persist small JSON blobs synchronously. */
export const saveJsonFile = writeJsonSync;