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

Viewing files at commit db34577898cfCommit detailsView latest

tests/mcp.test.ts 39 lines · 2.3 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(42);
11
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toHaveLength(41);
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_get_live_session');
16
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_record_session_event');
17
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_heartbeat');
18
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_list_threads');
19
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_get_thread');
20
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_send_message');
21
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_reply');
22
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_submit_completion_report');
23
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_list_feedback_requests');
24
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_submit_interaction_feedback');
25
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_checkpoint');
26
    expect(HOSTED_OPENCLASP_TOOL_NAMES).toContain('openclasp_complete_live_session');
27
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_assess_counterparty');
28
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_verify_receipt');
29
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_setup');
30
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_get_identity');
31
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_switch_agent');
32
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_save_contract');
33
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_permit_mediation');
34
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_find_agent');
35
    expect(OPENCLASP_TOOL_NAMES).toContain('openclasp_search_agents');
36
    expect(OPENCLASP_MCP_INSTRUCTIONS.length).toBeLessThanOrEqual(512);
37
    expect(OPENCLASP_MCP_INSTRUCTIONS).toContain('openclasp_connection_status');
38
  });
39
});