Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

@houston-ai/engine-client

TypeScript SDK for the Houston Engine. Consumed by the Houston desktop app, Houston Mobile, and third-party integrations.

Install

pnpm add @houston-ai/engine-client

Usage

import { HoustonClient, EngineWebSocket } from "@houston-ai/engine-client";

const engine = new HoustonClient({
  baseUrl: "http://127.0.0.1:53871",
  token: "<bearer>",
});

// REST
const workspaces = await engine.listWorkspaces();
const alpha = await engine.createWorkspace({ name: "alpha", provider: "anthropic" });

// WebSocket — automatic reconnect, typed envelope
const ws = new EngineWebSocket(engine);
const unsub = ws.on("event", (env) => {
  console.log(env.kind, env.payload);
});
ws.connect();

Desktop-app-specific bootstrap (reads window.__HOUSTON_ENGINE__ injected by the Tauri supervisor) lives at app/src/lib/engine.ts.

Type parity

DTOs live in src/types.ts and mirror the Rust types in engine/houston-engine-protocol/src/lib.rs. The Rust side is the source of truth. A future codegen step (ts-rs or specta) will remove the manual sync.

Protocol reference