@sgrs/client-ts
    Preparing search index...

    Function createClient

    @sgrs/client-ts — TypeScript client for the SGRS governance platform

    Unified HTTP + optional NATS real-time event transport.

    HTTP-only usage (no nats package required):

    import { createClient } from '@sgrs/client-ts';

    const client = createClient({ baseUrl: 'http://localhost:3003' });
    const result = await client.scopes.list();

    With real-time NATS events (requires: npm install nats):

    import { createClient } from '@sgrs/client-ts';

    const client = createClient({
    baseUrl: 'http://localhost:3003',
    nats: { servers: 'nats://localhost:4222' },
    });
    await client.connect();

    // CRITICAL PATH — veto propagation to all swarm agents
    client.events.onVetoActivated('acme', (event) => {
    console.log('Veto raised by', event.activatedBy);
    });

    // Finality convergence
    client.events.onFinalityFinal('acme', 'scope-1', (event) => {
    console.log('Converged at round', event.round);
    });

    await client.close(); // drain + disconnect