Skip to content

SDK · generated client

Install the generated client. Do not write a second one.

@sylphx-bots/capability-sdk is generated from the Product Contract. The author-facing surface is exact typed methods on createSylphxBotsClient. Private transport is injected and is not exported.

Package

Package: @sylphx-bots/capability-sdk

Authoring surface constant: AUTHORING_SURFACE = crates/sylphx-bots-tools/idl/capability-idl.v2.json

This is not Platform sylphx-sdk.

Generated usage

import { createSylphxBotsClient } from "@sylphx-bots/capability-sdk";

const client = createSylphxBotsClient(async (capabilityId, version, input) => {
  return runtimeCall(capabilityId, version, input);
});

await client.direct.channel_send({ text: "hello", target: "telegram:chat" });
await client.direct.goal_get({ /* generated GoalGetInput */ });

Exact method names come from the generated file. Do not add invoke or broker.call.

First call

Transport stays private to the runtime that admitted the session. Tokens do not belong on this site. First success is the tutorial, not a form on this host.