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

917 B
Raw Blame
import { test } from 'vitest';
import assert from 'node:assert/strict';
import { mkdtempSync, writeFileSync, rmSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { parseAdr } from '../plugins/ruflo-adr/scripts/lib/parse-adrs.mjs';
for (const [name, context, suffix] of [
  ['context at EOF', 'Keep persistent indexing consistent.', ''],
  ['literal Z inside context', 'Use Zero-copy storage for indexes.', '\n\n## Decision\nAccepted.'],
  ['first paragraph only', 'First paragraph.', '\n\nSecond paragraph.'],
]) {
  test(name, () => {
    const dir = mkdtempSync(join(tmpdir(), 'adr-context-'));
    try {
      const file = join(dir, '001-context.md');
      writeFileSync(file, `# ADR-001: Context\n\n## Context\n${context}${suffix}`);
      assert.equal(parseAdr(file, dir).context, context);
    } finally { rmSync(dir, { recursive: true, force: true }); }
  });
}