System One
Settings-only provider of the system-one:v1 typed decision capability and an explicit inference-endpoint:v1 HTTP export.
init.ts: plugin identity/lifecycle, command routing, provider registration.definition.ts: only the settings subcommand.adapter.ts: structured web payload or CLI parsing; defaults to settings and avoids echoing secret-bearing parser errors.db.ts: public settings, encrypted API-key persistence, transactional legacy plaintext migration, and provider-only decryption via the core NIP-44 helper.provider.ts: TypeSafe evaluation requests, provider model fallback, payload limit, bounded timeout/retries, and typed answer validation.inference.ts: advertises System One bridge metadata and POST /v1/systemone, validates HTTP requests, and invokes this plugin's decision capability. Core owns bridge-key authentication and bounded body reading.runtime.ts: initialized local settings database handle.commands/settings/definition.ts: configuration options.commands/settings/handler.ts: validation, save/clear-key semantics, text or web responses.commands/settings/web.ts: compact editable form; the API key is a blank password input and no secret appears in the UI tree.
NR builds domain-specific questions and invokes the capability with a null model to inherit the configured default. No CRUD/AI scaffold commands or generated AI-tool skill remain.
plugins/systemone architecture
Implements settings-only System One typed decisions and a shared HTTP bridge endpoint with omitted/null model inheritance, encrypted upstream credentials, and core-owned client authentication.
Source map
adapter.ts— Defaults to settings, parses CLI or structured settings input, dispatches the settings handler, and suppresses potentially secret-bearing parser errors.db.ts— Initializes SQLite settings storage, validates and transactionally saves configuration, encrypts and migrates API keys, and exposes public settings and provider-only key decryption.definition.ts— Defines the System One command with settings as its sole subcommand.inference.ts— Advertises the System One inference bridge and POST /v1/systemone. Defaults omitted HTTP models to null, reports invalid request field paths, checks upstream configuration, invokes this plugin exact typed decision provider, validates answers, and returns JSON or errors without credentials.init.ts— Defines plugin identity and lifecycle, initializes settings storage and runtime, routes settings commands, and registers decision and HTTP inference endpoint providers.provider.ts— Implements system-one:v1 evaluation with configured model fallback, a 256 KiB payload limit, a 30-second deadline, HTTP 429/529 retries, and typed answer validation.runtime.ts— Stores and exposes the initialized SQLite database handle for the capability provider.