Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

682 B
Raw Blame
/** A fake reader fs over a path → text map; `link` paths stat as links, `kind` overrides what a path stats as. */
import type { ReaderFs } from '../../hooks/data/files'

export function readableFs(files: Record<string, string>, options: { link?: string[]; kind?: Record<string, string> } = {}): ReaderFs {
  return {
    read: async path => files[path] ?? Promise.reject(new Error('ENOENT')),
    stat: async path => {
      const text = files[path]

      if (text === undefined) throw new Error('ENOENT')

      return { mtimeMs: 1, size: text.length, kind: options.kind?.[path] ?? 'file', isLink: options.link?.includes(path) === true }
    },
    list: async () => [],
  }
}