Codumentor logo Codumentor

Trial Plugin

The Trial Plugin displays a cosmetic "Trial" badge in the chat header of the Web UI. It does not enforce any trial logic — it is purely a visual indicator.

Overview

The Trial plugin:

  1. Registers a UI extension manifest that places a custom <x-trial-badge> element in the chat-header
  2. The frontend renders a compact pill-style badge using Shadow DOM, styled with CSS custom properties
  3. Badge text and visibility are driven by server-side YAML config — no frontend rebuild is required

Configuration

plugins:
  - module: codumentor.plugins.trial
    class: TrialPlugin
    priority: 1
    args:
      enabled: true
      badge_text: "Trial"

Configuration Parameters

UI Widget

The frontend component is a plain HTMLElement with Shadow DOM:

The badge uses CSS custom properties (--color-bg-inset, --color-border, --color-text-secondary) so it adapts to the active theme automatically.

How It Works

The Python backend returns a UI manifest from ui_manifest() that mirrors ui/plugins/trial/manifest.json but is driven by the runtime config. This means operators can change the badge text or disable the widget entirely without rebuilding the frontend bundle.

The plugin does not register any event bus hooks, API routes, or agent tools — it is purely a UI extension.

Notes