Osy#betaRun it on Osyrin: osyrin.com

Reference / Config

App configuration

The cross-cutting settings an app declares in one place — the app config object. Two kinds live here: the external providers and credentials your app depends on (secrets, OAuth clients, an embedding provider) and the app-wide policies (data classifications, audit-trail access, an MCP tool surface). Each is one typed declaration.

stableconfigguide

Summary#

Some things belong to the whole app, not to any one entity or function: the API keys it needs, the OAuth providers it signs users in with, the model it embeds text with, the sensitivity policy over its data. Those are declared once, as typed properties on the app config object, so there is a single place to look and the compiler checks each one.

They fall into two groups: what the app depends on (secrets, OAuth clients, an embedding provider) and policies over the app (classifications, audit access, an MCP surface).

Description#

What the app depends on#

Policies over the app#

  • data classifications (app.Classifications) — app.Classifications maps a data-sensitivity level (a DataClass — PII, Financial, Secret, …) to the [Role] members allowed to read fields marked at that level. You declare the mapping once; fields opt in with a classification attribute.
  • audit read access (app.Audit) — app.Audit declares who may read the app's audit trail. The platform records entity changes automatically; this gates the reading of that record.
  • workflow run retention (app.Workflow) — app.Workflow declares how long FINISHED workflow runs are kept. Undeclared, a completed run is kept for ever with everything it owns; a window reaps it, and a run still in progress is never reaped whatever its age. It is also a ceiling on how long audit read access (app.Audit) can keep the workflow transition trail.
  • MCP tool server (app.McpServer) — app.McpServer exposes the app to an MCP client (an AI agent) as a set of tools, grouped into catalogs, each with its own visibility.

UI surfaces the app owns#

  • UI surfaces (app.Ui) — app.Ui nominates the app's own components for the system surfaces the platform would otherwise draw a bare fallback for: ConnectionSurface (the server dropped — see Connection), NotFoundSurface (404), ForbiddenSurface (403), and ErrorSurface (an unexpected load failure).

One object, checked at compile time#

Because each of these is a typed declaration rather than a config file parsed at boot, a missing provider, a misspelled role, or a secret that no code reads is caught when the app compiles — not in production. The use declaration is the companion in the manifest: use brings a capability's tables and types into the app; the config object here tunes how the app uses them.

See also#

Related

declaring secrets (app.Secrets)

`app.Secrets` declares the named secrets your app uses — API keys, tokens, client secrets. Each is `new…

OAuth clients (app.OAuthClients)

`app.OAuthClients` declares the third-party OAuth providers your app uses — for signing users in (Login), for…

embedding provider (app.Embedding)

`app.Embedding` declares the embedding model the app uses to turn text into vectors for semantic search over…

per-environment config (app.Config)

`app.Config` declares your app's per-environment settings — values that differ between development and production, like…

your own file store (app.BlobStore)

`app.BlobStore` names a class of yours that keeps the app's file content — an S3 or R2 bucket, a table, anything you…

exporting your app's logs (app.LogExport)

`app.LogExport` names a class of yours implementing `IBlobStore` — an S3 or R2 bucket, a table, anything you can reach…

data held somewhere else (app.DataSources)

`app.DataSources` registers the places an app's data can live besides its own database — a warehouse, a SaaS table API…

settings a package asks its app for (app settings)

A package — or an app — declares a setting by marking a class `[AppSetting("Name")]`. The app that uses it fills it in…

The Llm kit — call a model, and know what each call cost

`Osysharp.Llm` is the road every model call takes, written in Osy#: the operator's AI switch, the app's router, a…

The Snowflake kit — warehouse tables as entities, and exports back

An optional package that makes Snowflake tables ordinary Osy# entities: your app reads them with LINQ, and each query…

The Databricks kit — lakehouse tables as entities, and exports back

An optional package that makes Databricks tables ordinary Osy# entities: your app reads them with LINQ, and each query…

data sent somewhere else, as it changes (app.Exports)

`app.Exports` sends an entity's changes to another system — a warehouse, a lake, a SaaS table — as they commit. Each…

data classifications (app.Classifications)

Classifications map a data-sensitivity level (a `DataClass` — PII, Financial, Secret, …) to the `[Role]` members…

audit read access (app.Audit)

`app.Audit` configures the app's audit trails — WHO may read each one, and whether it is recorded at all. An app that…

MCP tool server (app.McpServer)

`app.McpServer` exposes your app OUTWARD, to somebody else's agent, as a set of tools. Tools are grouped into named…

UI surfaces (app.Ui)

`app.Ui` nominates the app's own components for the "system surfaces" the platform would otherwise render a bare…

use

Declares a capability your app depends on, written inside the `app { }` manifest block. It provisions the capability…

warehouse-time budgets (a data-source query is budgeted before it leaves)

Every query an application sends to a registered data source is metered and budgeted, in milliseconds of provider time…