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:
- Registers a UI extension manifest that places a custom
<x-trial-badge>element in thechat-header - The frontend renders a compact pill-style badge using Shadow DOM, styled with CSS custom properties
- 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
- enabled (optional): Whether the badge is shown (default:
true). Whenfalse, the plugin returnsNonefromui_manifest()and the badge is not rendered. - badge_text (optional): The text displayed inside the badge (default:
"Trial").
UI Widget
The frontend component is a plain HTMLElement with Shadow DOM:
- Custom element:
<x-trial-badge> - Placement:
chat-header - Priority:
100 - Bundle:
/ui/extensions/plugins/trial/index.js
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
- The badge is cosmetic only; it does not enforce trial limits, expiration, or feature gating
- No event types, commands, or snapshot keys are consumed
- Source:
src/codumentor/plugins/trial/trial_plugin.py(backend),ui/plugins/trial/src/index.ts(frontend)