0ae59f3550
Introduces RECAP_MODE=multi alongside single-mode self-host: - Tenant auth + accounts (magic-link via System SMTP), per-tenant credit pool, anonymous trial minting with per-IP/-64 caps - Self-serve Pro/Max purchase: inline Lightning (BTCPay) + card (Zaprite), prepaid 30-day periods, expiry-reminder emails - Core-decoupling: relay owns cloud tier/expiry keyed by Recaps user-id - SQLite (better-sqlite3) schema for multi-mode; filesystem unchanged for single - StartOS actions/versions through 0.2.155
43 lines
1.9 KiB
TypeScript
43 lines
1.9 KiB
TypeScript
import { sdk } from '../sdk'
|
|
import { setApiKey } from './setApiKey'
|
|
import { setLicense } from './setLicense'
|
|
import { setAdminPassword } from './setAdminPassword'
|
|
import { setAnthropicApiKey } from './setAnthropicApiKey'
|
|
import { setOpenAIApiKey } from './setOpenAIApiKey'
|
|
import { setOpenAICompatible } from './setOpenAICompatible'
|
|
import { setOllamaUrl } from './setOllamaUrl'
|
|
import { setWhisperEndpoint } from './setWhisperEndpoint'
|
|
import { setPodcastIndex } from './setPodcastIndex'
|
|
import { enableMultiTenantMode } from './enableMultiTenantMode'
|
|
import { setRecapPublicUrl } from './setRecapPublicUrl'
|
|
import { setTenantDefaultCredits } from './setTenantDefaultCredits'
|
|
import { setTrialCreditsPerVisitor } from './setTrialCreditsPerVisitor'
|
|
import { setTrialsPerIpPerDay } from './setTrialsPerIpPerDay'
|
|
import { setReplenishPeriod } from './setReplenishPeriod'
|
|
import { setRelayOperatorKey } from './setRelayOperatorKey'
|
|
|
|
// NOTE: setRelayUrl was removed in 0.2.34. The relay base URL is now
|
|
// hardcoded in server/relay-default.js and updated via Recap version
|
|
// releases — end users should never see or configure it.
|
|
//
|
|
// Multi-tenant cloud-mode actions (added 0.2.77) — these only matter
|
|
// when recap_mode === 'multi'. In single mode they're inert: the
|
|
// fields they manipulate exist in the config but nothing reads them.
|
|
export const actions = sdk.Actions.of()
|
|
.addAction(setApiKey)
|
|
.addAction(setAnthropicApiKey)
|
|
.addAction(setOpenAIApiKey)
|
|
.addAction(setOpenAICompatible)
|
|
.addAction(setOllamaUrl)
|
|
.addAction(setWhisperEndpoint)
|
|
.addAction(setPodcastIndex)
|
|
.addAction(setLicense)
|
|
.addAction(setAdminPassword)
|
|
.addAction(enableMultiTenantMode)
|
|
.addAction(setRecapPublicUrl)
|
|
.addAction(setTenantDefaultCredits)
|
|
.addAction(setTrialCreditsPerVisitor)
|
|
.addAction(setTrialsPerIpPerDay)
|
|
.addAction(setReplenishPeriod)
|
|
.addAction(setRelayOperatorKey)
|