Skip to content

Configuration

wrangler.jsonc is the canonical source for an instance’s bindings, migrations, secrets, and variables. This page lists everything an instance reads, including the keys contributed by the built-in providers.

Secrets are set at deploy with --secrets-file (never committed to wrangler.jsonc).

SecretRequiredPurpose
SYNC_SHARED_SECRETYesBearer token guarding every HTTP route. The CLI sends it on every call.
AI_GATEWAY_TOKENYesAI Gateway token with Run permission, used for extraction.

Variables live in the vars block of wrangler.jsonc. Required variables fail fast at runtime if missing or blank; the rest fall back to the listed default.

VariableRequiredDefaultPurpose
AI_GATEWAY_ACCOUNT_IDYesThe account that owns the AI Gateway.
AI_GATEWAY_IDYesThe AI Gateway name.
FOLLOW_UP_MODELYesclaude-sonnet-4-6The model id used for follow-up extraction.
SYNC_LOOKBACK_MINUTESNo10How far back a scheduled sync looks for updated notes.
INITIAL_BACKFILL_DAYSNo30Lookback window for the initial backfill.
FOLLOW_UP_BACKSTOP_LOOKBACK_HOURSNo48Window the follow-up backstop cron re-scans.
FOLLOW_UP_BACKFILL_DEFAULT_DAYSNo30Default since window for follow-ups backfill.

Each provider declares the keys it reads in its configSchema. Only the declared keys are passed to the provider at runtime.

KeyKindRequired
GRANOLA_API_KEYsecretYes
GRANOLA_API_BASE_URLvarNo
GRANOLA_PAGE_SIZEvarNo
GRANOLA_REQUESTS_PER_SECONDvarNo
KeyKindRequired
LINEAR_API_KEYsecretYes
LINEAR_TEAM_IDvarYes

No configuration. Empty configSchema.

BindingTypeClassSource
DBD1 databasecore (notewright-db)
FOLLOW_UP_AGENTDurable ObjectFollowUpAgentcore
SPEAKER_CONTEXT_AGENTDurable ObjectSpeakerContextAgentcore
GRANOLA_SYNC_AGENTDurable ObjectGranolaSyncAgentGranola provider
TagNew SQLite classSource
v2FollowUpAgentcore
v3SpeakerContextAgentcore
granola-v1GranolaSyncAgentGranola provider
VariablePurpose
NOTEWRIGHT_URLTarget instance base URL (CI escape hatch, with NOTEWRIGHT_SECRET).
NOTEWRIGHT_SECRETShared secret for the target instance.
NOTEWRIGHT_CONFIG_DIROverride the CLI config directory (used by tests).
NOTEWRIGHT_DISABLE_KEYCHAINSet to 1 to force the plain-file secret fallback instead of the OS keychain.

See the CLI overview for how these interact with linked instances and the keychain.