Files
boocode/apps/server/src/services/__tests__/agents.test.ts
indifferentketchup 93d3f86c2b v2.2-paseo-providers: Paseo provider stack + v2.2.1 pane-scoped chat fixes
Ship Paseo-equivalent provider snapshot, AgentComposerBar, ACP dispatch
rewrite with streaming/persist, permission prompts, and agent commands.
Follow-up: pane-scoped chat resolution, CoderMessageList tool timeline,
WS user-delta replace, and inference orphan tool_call stripping.
Archive openspec v2-2; update CHANGELOG and CURRENT.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 15:18:31 +00:00

34 lines
1.0 KiB
TypeScript

import { describe, it, expect } from 'vitest';
import { isAgentRegistryMarkdown, parseAgentsMd } from '../agents.js';
describe('isAgentRegistryMarkdown', () => {
it('rejects Cursor navigation AGENTS.md at repo root', () => {
expect(
isAgentRegistryMarkdown('# Agent navigation\n\n## Doc map\n'),
).toBe(false);
});
it('accepts the global data/AGENTS.md registry shape', () => {
expect(isAgentRegistryMarkdown('# Agents\n\n## Code Reviewer\n---\n')).toBe(true);
});
});
describe('parseAgentsMd', () => {
it('does not emit errors for navigation sections when file is skipped upstream', () => {
// When isAgentRegistryMarkdown returns false, getAgentsForProject never calls this.
// Sanity: a nav-shaped file would produce six "missing fence" errors if parsed.
const nav = `# Agent navigation
## Doc map
| Need | Read |
|------|------|
## Task routing
Start here
`;
const r = parseAgentsMd(nav);
expect(r.agents).toHaveLength(0);
expect(r.errors.length).toBeGreaterThan(0);
});
});