Files
obra__episodic-memory/test/sync-cli-options.test.ts
Jesse Vincent 30916f8cad feat(harness): add Cursor (#113) and opencode (#117) support
Adds Cursor (live transcripts + opt-in state.vscdb backfill) and opencode (DB->JSONL export) as harnesses, following the existing Codex pattern. opencode summarization is fixed to route via transcript text instead of a doomed claude --resume, and hasConversationContent recognizes opencode_message lines. Harness union is 'claude'|'codex'|'cursor'|'opencode'. Also pins conversation timestamps to en-US/UTC in every renderer (#130) and restores valid YAML in the search agent frontmatter (#153).

Co-authored-by: vicnaum <vicnaum@users.noreply.github.com>

Co-authored-by: slandau3 <slandau3@users.noreply.github.com>

Co-authored-by: arimu1 <arimu1@users.noreply.github.com>

Claude-Session: https://claude.ai/code/session_0112vdwZphiWzfCYfaXMes4C
2026-09-08 18:47:47 +00:00

32 lines
1.0 KiB
TypeScript

import { describe, expect, it } from 'vitest';
import { spawnSync } from 'child_process';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
const REPO_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
const SYNC_CLI = join(REPO_ROOT, 'dist', 'sync-cli.js');
describe('sync-cli options', () => {
it('fails when --only is missing a harness value', () => {
const result = spawnSync(process.execPath, [SYNC_CLI, '--only'], {
env: { ...process.env },
timeout: 5000,
encoding: 'utf-8',
});
expect(result.status).toBe(1);
expect(result.stderr).toContain('Invalid --only value');
});
it('fails when --summary-limit is missing a numeric value', () => {
const result = spawnSync(process.execPath, [SYNC_CLI, '--summary-limit', '--only', 'opencode'], {
env: { ...process.env },
timeout: 5000,
encoding: 'utf-8',
});
expect(result.status).toBe(1);
expect(result.stderr).toContain('Invalid --summary-limit value');
});
});