Files
podman/backend/src/livekit/token.ts
T
Kartikeya 6559ad3944 feat(backend): scaffold PodMan agent pipeline + token server
Express server with /health and a LiveKit token endpoint. Module skeletons
for the full loop: vision (Gemini), GitHub fusion, collision detector (pure,
testable), intervention engine, and continual-learning memory store. Approve
native build scripts (esbuild/genai/protobufjs) at the workspace root.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 14:16:58 -07:00

26 lines
581 B
TypeScript

import { AccessToken } from 'livekit-server-sdk';
import { env } from '../env.js';
/**
* Mint a LiveKit access token so an engineer's browser can join a pod room
* and publish screen + mic + cam tracks.
*/
export async function createPodToken(
podId: string,
identity: string,
name?: string,
): Promise<string> {
const at = new AccessToken(env.livekit.apiKey, env.livekit.apiSecret, {
identity,
name,
});
at.addGrant({
room: podId,
roomJoin: true,
canPublish: true,
canSubscribe: true,
canPublishData: true,
});
return at.toJwt();
}