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>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user