trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
32 lines • 1.28 kB
TypeScript
/**
* Room registry — known Trellis rooms for MCP discovery.
*
* Aggregates deploy metadata from ~/.trellis/vm.json, project .trellis-db.json,
* and optional TRELLIS_ROOM_REGISTRY / TRELLIS_MCP_GATEWAY_ROOMS env JSON.
*
* @module trellis/mcp
*/
export interface RegisteredRoom {
name: string;
url: string;
mcpUrl: string;
apiKey?: string;
source: 'vm' | 'project' | 'registry' | 'env';
deployedAt?: string;
active?: boolean;
}
export interface RoomRegistryOptions {
/** Project directory for .trellis-db.json (default: cwd). */
configDir?: string;
/** Public gateway base URL for connect_room hints (e.g. https://mcp.trellis.computer). */
gatewayPublicUrl?: string;
}
/** MCP HTTP path for a room host (Sprites reserves `/mcp` on *.sprites.app). */
export declare function roomMcpPathForUrl(baseUrl: string): string;
/**
* List all known rooms, de-duplicated by URL (vm.json wins over project config).
*/
export declare function listRegisteredRooms(opts?: RoomRegistryOptions): RegisteredRoom[];
export declare function getRegisteredRoom(nameOrUrl: string, opts?: RoomRegistryOptions): RegisteredRoom | null;
export declare function gatewayPublicUrl(opts?: RoomRegistryOptions): string;
//# sourceMappingURL=room-registry.d.ts.map