Files
transcribe/manifest.ts
T
pastilhasandClaude Opus 5 3d2e4afd4e declare the whisper server as a setting
This plugin ships no web/, so there was nowhere to set its server URL — the only
way in was an HTTP call somebody had to already know about. That is not a
setting, it is a secret handshake, and it is the state this shipped in.

Declared rather than rendered: the platform draws the form on the plugin detail
page and PUTs to this plugin's own /config. It stores nothing, so the URL stays
where this plugin already kept it and the validation against the server still
happens here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043
2026-08-24 04:00:03 +00:00

71 lines
2.8 KiB
TypeScript

import type { PluginManifest } from '@@/plugins/manifest';
/**
* Transcribe — Officer's speech-to-text, talking to a self-hosted whisper.cpp server.
*
* ── What this plugin is, and what it is not ──
*
* It does NOT run Whisper, and it does not ship a model. You point it at a whisper.cpp `/inference`
* server you already run (the same container the platform used to talk to directly) and it forwards to
* it. Nothing is transcribed here — the sidecar's whole job is the request shape: detect the language,
* then transcribe faithfully in it, tuned for one person talking into a phone.
*
* Named for the feature, not the implementation — the same reasoning as `photos` not `immich`. Swapping
* the backend for a different `/inference`-compatible server would not move the mount point or the route
* shape.
*
* ── Where the connection lives ──
*
* A single URL, in a JSON file under `DATA_PATH/transcribe/`, not in Postgres and not in this
* repository. There is only ever one Whisper server for the whole install — unlike `photos_config` or
* `jellyfin_servers`, nobody has a reason to keep more than one — so a file the owner can also edit by
* hand is simpler than a table with one row. See `sidecar/config.ts`.
*
* ── No `osDependencies` ──
*
* Nothing shells out. The sidecar reaches whisper.cpp with `fetch`, the same as the code it replaces did.
*
* ── No `web/`, and no settings screen of its own ──
*
* This plugin ships no dashboard route and no dock tile — `plugin.web` gates the tile, and a
* backend-only plugin has nothing to pin one to. It is reached from a task's right-click menu and by an
* agent that has read its skill, not by a screen.
*/
export const manifest: PluginManifest = {
publisher: 'officerdev',
version: '1.0.0',
platform: '>=1.0.0',
label: 'Transcribe',
summary: 'Speech-to-text over your own whisper.cpp server',
icon: 'AudioLines',
color: '#f97316',
/**
* The whisper.cpp server this talks to. Declared rather than rendered: this plugin ships no `web/`, so
* without a declaration there is nowhere to set it and the only way in is an HTTP call somebody has to
* know about — which is the state it shipped in.
*
* The platform renders the form and PUTs to this plugin's own `/config`. It stores nothing: the URL
* lives where this plugin keeps it, and validation against the server still happens here.
*/
settings: [
{
key: 'url',
label: 'Whisper server',
hint: 'The whisper.cpp server to transcribe through. Checked before it is saved.',
type: 'url',
required: true,
placeholder: 'http://127.0.0.1:8178',
},
],
permissions: [
{
key: 'transcribe',
label: 'Transcribe',
description: 'Turn audio into text over your own whisper.cpp server',
},
],
};