DiagnoseShardwireAppOptions
Options for diagnoseShardwireApp. Surplus negotiation uses `unused_negotiated_*` **warnings** only. *
interface exported from src/discord/types.ts.
Summary
Options for diagnoseShardwireApp. Surplus negotiation uses unused_negotiated_* warnings only. *
Signature
export interface DiagnoseShardwireAppOptions {
/** When set, issues `missing_intent` if the bot bridge intents omit requirements for manifest events. */
botIntents?: readonly BotIntentName[];
/**
* When true (set internally by `app.ready({ strict: true })`), missing `botIntents` for intent-requiring manifests is an error.
* Default false: emit `bot_intents_unknown` warning instead.
*/
strictIntentCheck?: boolean;
/**
* Runtime `app.on` subscriptions: each `name` must appear in `manifest.events`.
* Any non-empty `filter` must only use keys listed under `manifest.filters[name]` for that event.
*
* **`app.ready({ strict: true, manifest })` snapshot:** only handlers already registered when `ready` runs are
* included here (whatever the caller passes). Registering `app.on(...)` after a successful strict `ready` is allowed
* and is **not** re-validated against the manifest by Shardwire.
*/
subscriptions?: readonly EventSubscription[];
/**
* Explicit opt-in maximum: when set, emits **`severity: 'error'`** if negotiated events or actions fall outside
* these allow-lists (`scope_broader_than_expected`). Use `'*'` on `events` or `actions` to skip that axis.
* The manifest never implies a maximum by itself; broader-than-manifest alone is only **`unused_negotiated_*` warnings**.
*/
expectedScope?: SecretPermissions;
}Structure
Related Guides
diagnoseShardwireApp
Compares the manifest contract to negotiated capabilities, optional `expectedScope`, optional `botIntents`, and optional runtime subscriptions. **`report.ok`** is `true` iff there are zero issues with `severity: 'error'` (warnings never flip it). **Surplus negotiation** (events or actions granted but not listed on the manifest) emits **`unused_negotiated_*`** issues with `severity: 'warning'` only — useful for review, never treated as a hard failure and never affects `report.ok`. **`expectedScope`** is the only way to turn “broader than I want” into **`severity: 'error'`** (`scope_broader_than_expected`). **Manifest filter keys:** `unsupported_filter_key` means not in the Shardwire catalog. `filter_key_absent_from_event_metadata` means the key is catalog-valid but **never** appears on matching metadata for that event (structurally impossible), not “might rarely match” or other traffic heuristics.
formatShardwireDiagnosis
Returns a multi-line, human-readable summary of a ShardwireAppDiagnosisReport for logs, CI output, or printing after a strict-startup failure (`ShardwireStrictStartupError`).