Skip to content

TransBox Plugin Development Docs ​

For: MOD authors / engineers integrating private ASR, MT or TTS / AI agents that implement plugins straight from these docs.

These docs are organised as knowledge cards: one topic per page, every fact written exactly once, other pages only link. Editing the docs? Find the single card that owns the topic — never repeat the same fact across pages.

The single source of truth for the contract is the client source code (src/transbox/plugins/, src/transbox/ui/bridge/). If a page disagrees with the source, the source wins; please report mismatches in the Plugin Hub.

This directory mirrors docs/plugin-dev/ in the client repository — same structure, same content. The Plugin Specification page lives at its original URL and keeps only copy-paste assets.


Five-minute quick start ​

  1. Copy an official example folder (extensions/example_glossary_gaming/, extensions/community_select_translate/, extensions/community_cloud_mimo_asr/, …).
  2. Edit id / name in mod.json (id must be globally unique, e.g. myteam.mt.deeplx; never use the builtin.* segment).
  3. Drop it into a scan directory → Settings → Extension Workshop → Refresh → flip the enable switch.
  4. Engine types (asr / mt / tts) also need to be selected as the active engine on their settings page; data types (theme / glossary / i18n) take effect as soon as they are enabled.

Details: Quick start.


Doc map ​

Getting started ​

CardIn one line
Quick startWhat the smallest working plugin looks like
Layout & mod.jsonWhat a plugin folder must contain; every field lives here
Runtime architecture & lifecycleScan roots / dual-track / enable-disable / mutual exclusion

By plugin type ​

CardIn one line
Type overview & selection12 type values — which one do I need?
glossaryZero code, just terms.json
themetheme.json token theming + caption bar parameters
UI extensions (QML)Replace backplate / VU meter / caption view
middlewareIntercept at any pipeline stage
asrWire up a private speech-recognition engine
mtWire up DeepL / an LLM / local translation
ttsVoice list / voice cloning / streaming / speed
interpretationEnd-to-end SI (bypasses local ASR→MT→TTS)
assistantInterview copilot / answering overlay
toolSelect-to-translate / global-hotkey tools
i18nFull UI language pack + self-contained plugin strings
caption_extractorAdd caption extraction for another video site

Host SPI (what plugins call on the host) ​

CardIn one line
SPI index & cheat sheetEvery method at a glance + base-class powers
Captions & translationPush text into the caption chain / call the active MT engine
Config & private dataThis plugin's config / KV / data directory
Session & host stateHistory context / pipeline state / installed plugins
Global hotkeysDeclarative hotkeys and runtime registration
Model artifactsDeclare weight repos; the host downloads and checks readiness
Event busPlugin ↔ host events and the standard event table
Speech & feedbackspeak / toast / capture exclusion
Plugin windowsMulti-instance, always-on-top, click-through, capture-safe QML windows
File pickers & long tasksSystem file dialogs / cancellable progress

Provider contracts (mandatory signatures) ​

CardIn one line
Capabilities & read-only contractHow the host asks about capabilities without starting your service
Provider signatures & data typesMT / ASR / TTS signatures + Transcript and friends
Local-service engine contractLazy startup / ports / devices / child processes / persistence

Config & UI ​

CardIn one line
config_schemaField types, visibility rules, presets, compute device
Custom settings viewWhen you need "Get a key" / "Test connection"
UI slotsReplaceable slot list + background-slot guidelines

Debug & publish ​

CardIn one line
Hot debuggingEdit → refresh → read the log
Packaging & size limitExport a zip; the 20 MB hard limit and your options
Publish channelsSteam Workshop / web Plugin Hub
Prerequisite pluginsrequires_plugins + locating directories by id
Host runtimesrequires_runtime; don't ship binaries in the package

Reference ​

CardIn one line
Example libraryWhich folder to copy for each type
Language codes & translatable languagestarget_langs vs supported_langs, normalization, the 33-language table
Threading contractWhich API may be called from which thread
Runtime environment & red linesBundled libs / libs vendor / no pip at runtime
Compatibility & version gatestarget_app_version (required), naming migration, min_app_version, retired types
Host implementation statusWhat is actually exposed (don't guess non-existent hooks)

Find a page by goal ​

I want to…Read these
Get a minimal plugin runningQuick start → Layout & mod.json
Wire up a cloud ASR / MT / TTSType overview → the matching type card → config_schema
Declare which languages an MT model can translate intomt → Language codes & translatable languages
Wire up a local inference service (llama-server etc.)Local-service engine contract (required reading) → Model artifacts
Work on UI / themingUI slots → theme
Add a glossary / language pack (no code)glossary / i18n
Have an AI write the pluginThe "hand it to an AI" prompt in Quick start + Layout & mod.json + the matching type card
Ship itPackaging & size limit → Publish channels

The three most common traps ​

Local-service plugins (those that spawn llama-server / tts-server / a custom HTTP service) must read Local-service engine contract first. All three traps below are user-visible bugs.

  1. Never start a local service in initialize() — the host performs read-only queries when the settings page is opened or model/voice status is checked. The old pattern makes users wait seconds and burn gigabytes of VRAM just for opening a settings page. Start the service in ensure_loaded() or at the request entry point.
  2. Don't default to ports 8080/8081/8082 — in practice they are often taken by Steam's steamwebhelper and similar. Use a high, uncommon range and fall back to the next free port.
  3. Persist server-side voice registries yourself — if they only live in memory, users must re-register after every restart (measured: tts-server behaves exactly like this).

Two more frequent issues:

  1. Never hard-code a sibling plugin's directory name — workshop installs name the folder after the plugin id. Use host.plugin_dir(id) (see Prerequisite plugins).
  2. Don't ship large binaries or models inside the package — the upload channel caps at 20 MB. Binaries go through Host runtimes; weights go through Model artifacts.

Old Plugin Specification sections → new cards ​

The Plugin Specification page (1700+ lines) has been split into the cards above. To avoid writing the same fact twice, that page now keeps only copy-paste code assets; every other section points at a card:

Plugin Spec sectionWhere it lives now
§0 Direct Prompt for AI AgentsStays on the page (§0 Prompt-and-Go)
§1 Directory StructureLayout & mod.json
§2 mod.json Field TableLayout & mod.json
§3 Supported type ValuesType overview & selection
§3.1 caption_extractorCaption extraction for video sites
§4 entrypoint RulesLayout & mod.json
§5.1 Glossaryglossary
§5.2 Themetheme
§5.3 i18n (language pack)i18n
§5.4 Plugin i18n contributionsi18n
§5.5 tooltool
§6 config_schemaconfig_schema
§6.2 QML consumption & hot reloadUI extensions (QML)
§6.3 Cloud custom settings viewCustom settings view
§7.0 Standalone Development StubStays on the page (for developing without host source)
§7.1–7.9 Base classes / data types / Host SPIProvider signatures & data types + SPI index & cheat sheet
§7.10 Local model artifacts & external runtimeModel artifacts
§7.11 requires_runtimeHost runtimes
§8 Minimal Runnable Templates (7)Stays on the page (complete code you can copy and rename)
§9 Local hot debuggingHot debugging
§10 In-app publishing & updatesPackaging & size limit + Publish channels
§11 Self-contained plugin localesi18n
§12 Runtime environment & hard rulesRuntime environment & red lines
§13 Official example indexExample library
§14 Implementation checklist for AI agentsStays on the page
§15 UI Slots (summary)UI slots + QML slots & HostContext

PageContents
Plugin SpecificationPrompt-and-Go template / standalone SDK stub / 7 complete templates / AI checklist
Client internalsPython class loading, config assembly and the security model (plugin contracts live in this card tree)
QML slots & HostContextSlot properties, hostContext subsystems, settings_view injection
Local source & dev environmentClient source setup (uv / Python 3.11–3.12)
Workshop & self-publishExport a zip, Steam upload, local extension-directory distribution
Web Plugin Hub (author/ops manual)Author-centre uploads, subscriptions, review and operations

The core team reserves the right to evolve this specification. Please open a GitHub issue for questions.

TransBox — empowering borderless cross-language communication for everyone