SDK packages
Choose the part your app needs.
Each package page is made from its checked-in package metadata and README.
@brydio/api
Typed access to Brydio projects, files, chats, and named connections from an app screen. Version 0.1.0-alpha.5.
@brydio/api
Typed project, file, chat, and named-connection calls for a Brydio app screen. Every request travels through @brydio/app; the screen receives no token, cookie, API address, or connection credential.
import { api } from '@brydio/api';
const projects = await api.projects.list();
const issues = await api.connections.use('github').request({
path: '/repos/brydio/brydio/issues',
query: { state: 'open' },
});
The manifest needs the matching projects, files, chats, or exact connection:<name> host grant. Reads run after Brydio checks the current person. Writes wait for the person's Allow once approval.
Read the @brydio/api bridge section for the security boundary and wire contract.
This package is MIT licensed. While the SDK is 0.x, a minor version may contain a breaking change. Read the repository changelog before upgrading.
@brydio/app
The runtime a Brydio app's screen runs on, inside its worker: the tree, the bridge to the host, and the Preact adapter. Version 0.1.0-alpha.5.
@brydio/app
The runtime a Brydio screen uses to draw a catalogue tree and call its tools, data, navigation, toast, and host context bridge.
import { tools } from '@brydio/app';
import { mount } from '@brydio/app/preact';
function Home() {
return (
<bry-button
label="Add item"
onPress={() => tools.call('create_item', { title: 'New item' })}
/>
);
}
void mount(Home);
The worker has no DOM, network, cookies, or storage. Brydio draws every element and checks every call. Read the bridge reference and the catalogue before adding a screen.
This package is MIT licensed. While the SDK is 0.x, a minor version may contain a breaking change. Read the repository changelog before upgrading.
@brydio/cli
brydio build, validate and dev: turn an app's source into the bundle Brydio loads. Version 0.1.0-alpha.5.
@brydio/cli
The brydio command builds, validates, tests, develops, and publishes a Brydio app.
bun add -d @brydio/cli
bunx brydio build
bunx brydio validate
bunx brydio test
brydio dev serves a local build for a Brydio workspace that permits development apps. brydio publish validates, pictures, signs when a key is configured, and uploads one immutable app version.
Read the publish checklist for every check and refusal code. The standalone npm create @brydio/app flow is not part of this release; use the templates from the repository or brydio create from a checkout.
This package needs Bun 1.3 or newer and is MIT licensed. While the SDK is 0.x, a minor version may contain a breaking change. Read the repository changelog before upgrading.
@brydio/fake-host
A pretend Brydio for testing an app's screens: builds the app, runs a built screen in a worker, draws nothing, and answers its tools from fixtures. Version 0.1.0-alpha.5.
@brydio/fake-host
A local Brydio host for screen tests. It runs a built screen in a worker, checks the same tree rules and budgets, answers tools from fixtures, and lets a test inspect or act on the drawn tree.
import { afterEach, expect, test } from 'bun:test';
import { testApp } from '@brydio/fake-host';
const app = await testApp(import.meta.dir);
afterEach(() => app.stopAll());
test('adds an item', async () => {
const host = app.start('home', { fixtures: { items: [] } });
await host.mounted();
host.press(await host.waitFor(() => host.byText('Add item')));
expect(host.calls.map(call => call.tool)).toEqual(['create_item']);
});
Run the app's tests with brydio test. The command builds once, then runs its *.test.ts files against that build.
This package is MIT licensed. While the SDK is 0.x, a minor version may contain a breaking change. Read the repository changelog before upgrading.
@brydio/manifest
The shape of a Brydio app's manifest, its collections' schemas, and the checks that say what is wrong with one. Version 0.1.0-alpha.5.
@brydio/manifest
The schema and validation rules for .brydio/app.json. It covers app identity, placements, screens, collections, generated and custom tools, grants, and migrations.
import { defineManifest } from '@brydio/manifest';
export const manifest = defineManifest({
name: 'checklist',
version: '0.1.0',
screens: { home: { entry: 'screens/home.js' } },
placements: [{ kind: 'project-tab', screen: 'home', label: 'Checklist' }],
});
Read the manifest reference for every field, schema type, grant, migration operation, and limit. The publish checklist lists every validation code and its refusal message.
This package is MIT licensed. While the SDK is 0.x, a minor version may contain a breaking change. Read the repository changelog before upgrading.
@brydio/ui
The catalogue of elements a Brydio app draws with: their names, settings and events. Version 0.1.0-alpha.5.
@brydio/ui
The catalogue of elements a Brydio app draws with: their names, settings and events, as data (CATALOGUE) and as types. brydio validate, the worker runtime and the fake host all read it. Brydio's own packages/app/src/apps/catalogue/elements.ts is the original, and test/catalogue.test.ts holds the two to each other.
@brydio/ui/web: the same elements as web components
For HTML views only: an MCP App from an outside server, or anything Brydio shows outside its own window. Link the build and write the elements:
<script type="module" src="…/@brydio/ui/web"></script>
<bry-button label="Save" variant="primary"></bry-button>
Each element has the catalogue's name, its settings as properties and as kebab-case attributes (hideLabel is hide-label; a list or a record is JSON), and its events as DOM events of the same name (press, change, …) that bubble out of the element. The classes are made from CATALOGUE when the build loads, so an element added to the catalogue is here after a build, with no second copy to write.
App screens don't use this. Brydio draws them with its own React kit, and nothing built on the SDK needs the web components.
Why Lit
The web components are built on Lit, pinned to one major version (lit 3 in package.json).
- It's small: about 5 KB.
- It's maintained by Google, and it's what Adobe Spectrum's web components are built on.
- It adds nothing beyond the web component standard that we'd have to migrate away from. A Lit element is a custom element with reactive properties and a template.
FAST wasn't chosen: when it changed course, Microsoft's own toolkit for extension UIs, built on it, was deprecated rather than rewritten, and every extension using it was stranded. Stencil and similar tools weren't chosen because they compile to a runtime we wouldn't own.
Lit is imported in exactly one file, src/web/base.ts. Every element extends its BryElement and takes html and css from there, so replacing Lit means changing that file and rebuilding. test/web.test.ts fails if any other file imports it.