capsule AI-native Unix-like composition layer

capsule.yaml

1,815 bytes · 56 lines · capsule://quake0day/[email protected] raw on github

apiVersion: capsule.dev/v0.1
kind: Capsule
name: cverse-livekit-adapter
version: 0.1.0
type: adapter
purpose:
  summary: 'Provides Go-based integration with LiveKit, a WebRTC platform, for managing
    real-time rooms, generating access tokens, and handling media streams. This capsule
    abstracts LiveKit interactions for the Go orchestration server.

    '
  owns:
  - LiveKit room management logic
  - LiveKit token generation
  - LiveKit media processing utilities (VP8 chunking)
  does_not_own:
  - The LiveKit server itself
  - Direct WebRTC peer connection management
  - Go orchestration server business logic
interfaces:
  provides:
  - kind: library
    name: livekit-server-sdk
    description: Go library for interacting with LiveKit server.
  requires:
  - kind: env
    name: LIVEKIT_API_KEY
    description: API key for LiveKit server authentication.
  - kind: env
    name: LIVEKIT_API_SECRET
    description: API secret for LiveKit server authentication.
  - kind: env
    name: LIVEKIT_WS_URL
    description: WebSocket URL for the LiveKit server.
agent:
  summary_for_ai: 'An AI agent working on this capsule would focus on updating LiveKit
    SDK versions, optimizing room management strategies, or enhancing media stream
    handling related to LiveKit. It requires strong Go programming skills and knowledge
    of LiveKit APIs.

    '
  avoid:
  - Modifying LiveKit server internals.
  - Implementing core Go orchestration logic.
verification:
  invariants:
  - LiveKit room creation and token generation must be reliable.
  - Media stream processing must be efficient and correct.
x-reuse:
  notes: 'Requires a running LiveKit server instance and corresponding API credentials
    (`LIVEKIT_API_KEY`, `LIVEKIT_API_SECRET`, `LIVEKIT_WS_URL`).

    '
x-reconstruct:
  install: install.json