Skip to content

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

1.5 KB
Raw Blame
import { readFileSync } from 'node:fs';
import { expect, it } from 'bun:test';

for (const path of ['docs/public/configuration.mdx', 'docs/public/usage/openai-compatible-provider.mdx']) {
  it(`documents per-session provider endpoints in ${path}`, () => {
    const source = readFileSync(path, 'utf8');
    expect(source).toContain('CLAUDE_MEM_OPENAI_COMPAT_SESSION_ENDPOINTS');
    expect(source).toContain('"baseUrl"');
    expect(source).toContain('"modelMap"');
    expect(source).toContain('CLAUDE_MEM_OPENAI_COMPAT_MODEL_FROM_SESSION');
    expect(source).toContain('410');
    expect(source).toContain('with or without a model marker');
    expect(source).toContain('credential or billing complaint');
    expect(source).toContain('remain configured and usable');
    // The classifier recognizes these retirement words; the docs drifted to
    // "gone" once already, so each one is pinned here.
    for (const marker of ['deprecated', 'retired', 'decommissioned', 'sunset', 'no longer served']) {
      expect(source).toContain(marker);
    }
    expect(source).not.toMatch(/410[^\n]*\bgone\b/i);
    // The mapped fallback is translated by the same map when the map names it.
    expect(source).toContain('translated through the same');
    const row = source.split('\n').find(line => line.startsWith('| `CLAUDE_MEM_OPENAI_COMPAT_SESSION_ENDPOINTS` |'));
    expect(row).toBeString();
    expect(row!.split('|')).toHaveLength(5); // key, default, description, plus the two edge pipes
  });
}