Package v0.2.12→v0.2.124: manifest, actions, version graph
This commit is contained in:
@@ -22,19 +22,19 @@ export const configFile = FileHelper.json(
|
||||
// hardware (if configured) or 503 every request.
|
||||
relay_gemini_api_key: z.string().default(''),
|
||||
|
||||
// ── Operator hardware (optional fallback) ──
|
||||
// When a Pro/Max user exceeds their monthly Gemini cap, the relay
|
||||
// routes overflow here. Leave empty to hard-cap at the Gemini limit
|
||||
// and return 402 once exceeded (no fallback).
|
||||
relay_parakeet_base_url: z.string().default(''),
|
||||
relay_gemma_base_url: z.string().default(''),
|
||||
// Model identifiers to send in the upstream request bodies. The
|
||||
// operator's Ollama or Parakeet wrapper may serve different models
|
||||
// depending on what's been pulled; making these config-driven
|
||||
// means the operator can swap models without rebuilding the relay.
|
||||
// Live-reloaded — change applies to the next request.
|
||||
relay_parakeet_model: z.string().default('parakeet-tdt-0.6b-v3'),
|
||||
relay_gemma_model: z.string().default('gemma3:27b'),
|
||||
// ── Service discovery (operator-hardware wiring) ──
|
||||
// URL of a Spark-Control-style /api/endpoints JSON document that
|
||||
// lists local LLM / STT services on the operator's LAN. The relay
|
||||
// reads this (60s TTL) to find the transcribe + analyze backends
|
||||
// for the hardware path, and POSTs /api/audio/diarize-chunk to
|
||||
// the same host. This is the SINGLE source of truth for which
|
||||
// hardware URLs and models the relay uses — there is no longer a
|
||||
// per-endpoint manual-override fallback (removed in v0.2.84;
|
||||
// Spark Control became the canonical wiring).
|
||||
//
|
||||
// Empty string disables the operator-hardware path entirely —
|
||||
// the relay will return 503 from any hardware-routed request.
|
||||
relay_spark_control_url: z.string().default(''),
|
||||
|
||||
// ── Gemini model selection ──
|
||||
// Operator can pick which Gemini SKU is used per pipeline step
|
||||
@@ -82,6 +82,17 @@ export const configFile = FileHelper.json(
|
||||
relay_admin_password_salt: z.string().default(''),
|
||||
relay_admin_session_secret: z.string().default(''),
|
||||
|
||||
// ── Output storage policy ──
|
||||
// When true, the relay persists per-job transcript + analysis
|
||||
// JSON for REAL USER traffic (jobs from Recap clients) to
|
||||
// /data/relay-outputs/. Test-run jobs (source=admin-test) are
|
||||
// ALWAYS persisted regardless of this flag — they're the
|
||||
// operator's own benchmarking content with no privacy concern.
|
||||
// Default off: real-user transcripts pass through and aren't
|
||||
// written to disk unless the operator explicitly opts in for
|
||||
// their own debugging.
|
||||
relay_save_user_outputs: z.boolean().default(false),
|
||||
|
||||
// ── Tier quotas (operator-adjustable without redeploy) ──
|
||||
// JSON blob driving credits.js. Defaults match the v1 product
|
||||
// spec: Core lifetime-5, Pro 50/mo with 25 Gemini cap, Max
|
||||
@@ -103,5 +114,124 @@ export const configFile = FileHelper.json(
|
||||
max: { lifetime: null, monthly: null, geminiCapMonthly: 50 },
|
||||
}),
|
||||
),
|
||||
|
||||
// ── BTCPay (credit-purchase flow) ──
|
||||
// When configured, the relay exposes /relay/credits/buy so users
|
||||
// can top up their credit balance directly via Lightning/onchain.
|
||||
// Empty fields → the purchase route returns 503 ("not configured")
|
||||
// — the rest of the relay continues to work.
|
||||
relay_btcpay_base_url: z.string().default(''),
|
||||
// Internal Start9 hostname for server-to-server BTCPay calls
|
||||
// (e.g. http://btcpayserver.startos:23000). Auto-populated by
|
||||
// the one-click setup wizard when BTCPay is co-installed; falls
|
||||
// back to relay_btcpay_base_url when empty. mDNS / clearnet
|
||||
// hostnames don't resolve from inside the docker container, so
|
||||
// this internal alias is required when BTCPay sits behind one.
|
||||
relay_btcpay_internal_url: z.string().default(''),
|
||||
// Public BUYER-facing URL — used to rewrite the checkout link
|
||||
// BTCPay returns from invoice-create (which contains the internal
|
||||
// hostname we called it on). Buyers can be anywhere on the
|
||||
// internet so this must be a clearnet domain when possible.
|
||||
// Falls back to relay_btcpay_base_url (LAN-only) when empty,
|
||||
// which limits credit purchases to operator's local network.
|
||||
relay_btcpay_public_url: z.string().default(''),
|
||||
relay_btcpay_store_id: z.string().default(''),
|
||||
relay_btcpay_api_key: z.string().default(''),
|
||||
relay_btcpay_webhook_secret: z.string().default(''),
|
||||
|
||||
// ── Zaprite (card rail) ──
|
||||
// Hosted-checkout API for the "Pay by card" rail. Set via the "Set
|
||||
// Zaprite Connection" action. api_key empty = card rail disabled (the
|
||||
// UI hides "Pay by card"). No webhook secret: the webhook is verified
|
||||
// by re-fetching the order from Zaprite's authenticated API.
|
||||
relay_zaprite_base_url: z.string().default('https://api.zaprite.com'),
|
||||
relay_zaprite_api_key: z.string().default(''),
|
||||
relay_zaprite_currency: z.string().default('USD'),
|
||||
|
||||
// ── Credit packages (operator-editable bundle pricing) ──
|
||||
// JSON array, ordered as it should appear in the buyer UI. Each
|
||||
// entry is { credits: number, sats: number }. Defaults match
|
||||
// the initial Recap pricing — operator can adjust via the
|
||||
// "Set Credit Packages" action.
|
||||
relay_credit_packages_json: z
|
||||
.string()
|
||||
.default(
|
||||
JSON.stringify([
|
||||
{ credits: 5, sats: 4000 },
|
||||
{ credits: 10, sats: 6000 },
|
||||
{ credits: 20, sats: 10000 },
|
||||
])
|
||||
),
|
||||
|
||||
// ── Tier prices (USD per active subscription) ──
|
||||
// Operator-set monthly price per tier. Used by the dashboard to
|
||||
// estimate revenue and operating margin against Gemini cost. Pure
|
||||
// accounting — the relay itself does no billing; Keysat handles
|
||||
// license sales. Defaults match the current keysat.xyz price list
|
||||
// ($0/$5/$15) but the operator can override to whatever they're
|
||||
// actually charging customers for this relay's tier comping.
|
||||
relay_tier_prices_usd_json: z.string().default(
|
||||
JSON.stringify({ core: 0, pro: 5, max: 15 }),
|
||||
),
|
||||
|
||||
// ── Card-rail (Zaprite) subscription prices ──
|
||||
// The amount actually CHARGED to a card buyer, in the smallest unit
|
||||
// of relay_zaprite_currency (cents for USD). Distinct from
|
||||
// relay_tier_prices_usd_json (dashboard accounting only). Set via the
|
||||
// "Set Zaprite Connection" action. Default ≈ parity with the sat
|
||||
// prices ($21 / $42); raise to add a card premium for processing fees.
|
||||
relay_tier_prices_fiat_cents_json: z.string().default(
|
||||
JSON.stringify({ pro: 2100, max: 4200 }),
|
||||
),
|
||||
|
||||
// ── Chunking / concurrency knobs ──
|
||||
// Edited via the dashboard's Settings tab (PUT /admin/settings).
|
||||
// ONE canonical default per knob, defined here exactly once. All
|
||||
// backend code reads from the live-reloaded snapshot at request
|
||||
// time — no hardcoded fallbacks anywhere else in the codebase.
|
||||
//
|
||||
// Gemini backend (relay → Google Gemini API):
|
||||
relay_gemini_tx_chunk_minutes: z.number().int().min(1).max(120).default(30),
|
||||
relay_gemini_tx_concurrency: z.number().int().min(1).max(32).default(12),
|
||||
relay_gemini_analyze_window_minutes: z.number().int().min(1).max(60).default(18),
|
||||
relay_gemini_analyze_overlap_minutes: z.number().int().min(0).max(10).default(2),
|
||||
relay_gemini_analyze_concurrency: z.number().int().min(1).max(32).default(12),
|
||||
// Hardware backend (relay → operator's Parakeet + Gemma/vLLM):
|
||||
relay_hardware_tx_chunk_minutes: z.number().int().min(1).max(120).default(5),
|
||||
relay_hardware_tx_concurrency: z.number().int().min(1).max(32).default(4),
|
||||
relay_hardware_analyze_window_minutes: z.number().int().min(1).max(60).default(18),
|
||||
relay_hardware_analyze_overlap_minutes: z.number().int().min(0).max(10).default(2),
|
||||
relay_hardware_analyze_concurrency: z.number().int().min(1).max(32).default(8),
|
||||
// Diarization suppression thresholds (Phase 2 cluster cleanup).
|
||||
// See server/speaker-clustering.js for how these shape the
|
||||
// post-cluster pass that demotes small spurious clusters.
|
||||
relay_hardware_anchor_min_speaking_sec: z.number().int().min(5).max(120).default(30),
|
||||
relay_hardware_small_cluster_max_speaking_sec: z.number().int().min(1).max(60).default(15),
|
||||
relay_hardware_uncertain_margin_pct: z.number().int().min(0).max(30).default(10),
|
||||
// Floor below which both the analyze planner emits a single window
|
||||
// covering the whole transcript (single-shot fast path) and TX
|
||||
// chunking is bypassed. Tunable for benchmarking.
|
||||
relay_analyze_cutoff_minutes: z.number().int().min(1).max(60).default(25),
|
||||
|
||||
// ── Editable LLM prompts ──
|
||||
// Empty string = use the hardcoded default at request time. The
|
||||
// dashboard's Settings tab edits these; the textareas can also
|
||||
// be reset to default, which clears the field to "" so future
|
||||
// default-prompt changes in code flow through automatically.
|
||||
relay_transcribe_prompt: z.string().default(''),
|
||||
relay_analyze_prompt: z.string().default(''),
|
||||
|
||||
// ── Post-cluster polish pass (Phase 2) ──
|
||||
// Default ON; operator can disable via Settings tab if they
|
||||
// want raw fast output or are debugging analyze quality
|
||||
// independently from polish quality.
|
||||
relay_post_cluster_polish_enabled: z.boolean().default(true),
|
||||
// Operator-editable polish prompts. Empty = fall through to
|
||||
// the hardcoded defaults in server/post-cluster-polish.js.
|
||||
// Same three-layer override pattern (per-session override →
|
||||
// operator-promoted default → code default) as the analyze
|
||||
// and transcribe prompts.
|
||||
relay_polish_name_inference_prompt: z.string().default(''),
|
||||
relay_polish_summary_rewrite_prompt: z.string().default(''),
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user