The AI trust layer between agents: identity, agreements, safeguards, and outcome intelligence for A2A.

Viewing files at commit fd993cf6d9f8Commit detailsView latest

tests/mcp.test.ts 29 lines · 1.5 KB · typescript
1
import { describe, expect, it } from 'vitest';
2
import {
3
  HOSTED_OPENCLASP_TOOL_NAMES,
4
  OPENCLASP_MCP_INSTRUCTIONS,
5
  OPENCLASP_TOOL_NAMES,
6
} from '../packages/mcp-server/src/server.js';
7
8
describe('MCP surface', () => {
9
  it('exposes the complete documented tool set', () => {
10
    expect(OPENCLASP_TOOL_NAMES).toHaveLength(32);
11
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toHaveLength(31);
12
    expect(HOSTED_OPENCLASP_TOOL_NAMES).not.toContain('openclasp_create_identity');
13
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_connect_to_agent');
14
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_respond_invitation');
15
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_inbox');
16
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_heartbeat');
17
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_assess_counterparty');
18
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_verify_receipt');
19
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_setup');
20
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_get_identity');
21
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_switch_agent');
22
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_save_contract');
23
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_permit_mediation');
24
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_find_agent');
25
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_search_agents');
26
    expect(OPENCLASP_MCP_INSTRUCTIONS.length).toBeLessThanOrEqual(512);
27
    expect(OPENCLASP_MCP_INSTRUCTIONS).toContain('openclasp_connection_status');
28
  });
29
});