Convilyn developers

Developer Portal Client

Publish your own tool servers through the Developer Portal with ConvilynClient — workflows are authored in the chat Builder — and sign human-confirmation handshakes with confirmation tokens.

ConvilynClient

ConvilynClient is a fetch-based client for the Developer Portal (/api/v1/developers/*) — the third-party author/publish surface, matching the Python convilyn-author SDK. You build and test your own tool server locally (ToolServer, runComplianceChecks), then integrate it by registering through the portal. Authenticate with a cvl_ developer key as a Bearer token (CONVILYN_API_KEY); the base URL is ${CONVILYN_PLATFORM_URL}/api/v1.

import { ConvilynClient } from "@convilyn/sdk-author";
 
// 1) Register once (no auth) → mint + capture a cvl_ key. Save it; shown once.
const client = new ConvilynClient();
const { api_key } = await client.register({
  email: "dev@example.com",
  name: "Dev",
});
// …or: new ConvilynClient({ apiKey: myCvlKey }) / export CONVILYN_API_KEY=cvl_…
 
// 2) Submit your own tool server for verification.
const server = await client.submitServer({
  manifest: myToolServer.manifest().toWire(),
  endpoint_url: "https://my-server.example.com",
});
await client.testServer(server.server_id); // sandbox test
await client.serverStatus(server.server_id); // → verified / active / rejected
MethodEndpoint
client.register({ email, name })POST /developers/register (no auth)
client.submitServer({ manifest, endpoint_url })POST /developers/servers
client.listServers()GET /developers/servers
client.serverStatus(id)GET /developers/servers/{id}/status
client.testServer(id)POST /developers/servers/{id}/test
client.deactivateServer(id)DELETE /developers/servers/{id}

A non-2xx response throws ConvilynApiError (with .status and .body); an authed call with no key throws ConvilynAuthorError before any network call.

Confirmation tokens

For tools that require a human confirmation handshake, the SDK signs and verifies confirmation tokens byte-for-byte compatibly with the gateway and the Python/Go author SDKs.

import {
  mintConfirmationToken,
  verifyConfirmationToken,
  CONFIRMATION_TTL_SECONDS,
} from "@convilyn/sdk-author";
 
const secret = process.env.CONVILYN_TOOL_CONFIRMATION_SECRET!;
const expiresAtUnix = Math.floor(Date.now() / 1000) + CONFIRMATION_TTL_SECONDS;
 
const token = mintConfirmationToken({
  toolName: "submit_order",
  arguments: args,
  expiresAtUnix,
  secret,
});
 
verifyConfirmationToken({
  toolName: "submit_order",
  arguments: argsWithToken,
  token,
  secret,
});
// throws ConfirmationInvalidError on a malformed/expired/mismatched token

The argument digest strips volatile presigned-URL params, so a re-presigned URL still matches the originally-confirmed arguments.

Where to go next