capsule AI-native Unix-like composition layer

capsule.yaml

2,967 bytes · 91 lines · capsule://quake0day/[email protected] raw on github

apiVersion: capsule.dev/v0.1
kind: Capsule
name: cverse-inference-core
version: 0.1.0
type: subsystem
purpose:
  summary: 'The core Python inference service that provides a unified gRPC interface
    for various AI capabilities. It dynamically registers and dispatches requests
    to different AI model plugins (ASR, LLM, TTS, Avatar, VoiceLLM, RAG).

    '
  owns:
  - gRPC server implementation for AI services
  - Plugin registration and discovery mechanism
  - Core inference service definitions and types
  does_not_own:
  - Specific AI model implementations (delegates to plugins)
  - Go orchestration logic
  - Frontend UI
interfaces:
  provides:
  - kind: http_api
    name: asr-grpc
    description: gRPC API for Automatic Speech Recognition.
  - kind: http_api
    name: avatar-grpc
    description: gRPC API for avatar generation.
  - kind: http_api
    name: llm-grpc
    description: gRPC API for Large Language Models.
  - kind: http_api
    name: rag-grpc
    description: gRPC API for Retrieval Augmented Generation.
  - kind: http_api
    name: tts-grpc
    description: gRPC API for Text-to-Speech.
  - kind: http_api
    name: voice-llm-grpc
    description: gRPC API for Voice-enabled Large Language Models.
  requires:
  - kind: library
    name: asr-plugin
    from_capsule: cverse-asr-inference-adapter
    description: Interface for ASR model plugins.
  - kind: library
    name: avatar-plugin
    from_capsule: cverse-avatar-inference-adapter
    description: Interface for avatar model plugins.
  - kind: library
    name: llm-plugin
    from_capsule: cverse-llm-inference-adapter
    description: Interface for LLM plugins.
  - kind: library
    name: rag-plugin
    from_capsule: cverse-rag-inference-adapter
    description: Interface for RAG plugins.
  - kind: library
    name: tts-plugin
    from_capsule: cverse-tts-inference-adapter
    description: Interface for TTS model plugins.
  - kind: library
    name: voice-llm-plugin
    from_capsule: cverse-voice-llm-inference-adapter
    description: Interface for VoiceLLM plugins.
dependencies:
  capsules:
  - name: cverse-protobuf
    version: '>=0.1.0'
agent:
  summary_for_ai: 'An AI agent working on this capsule would focus on improving the
    plugin architecture, enhancing gRPC service stability, or optimizing the dispatching
    mechanism. It requires strong Python skills and understanding of gRPC and plugin-based
    architectures.

    '
  avoid:
  - Implementing specific AI models directly within the core service.
  - Modifying Go backend logic.
verification:
  invariants:
  - gRPC endpoints must be available and respond to requests.
  - Plugins must be discoverable and loadable at runtime.
  - The core service must provide a consistent interface for all AI capabilities.
x-reuse:
  notes: 'Configuration details are expected to be provided via `INFERENCE_CONFIG_PATH`
    pointing to a project-specific YAML file.

    '
x-reconstruct:
  install: install.json