defineShardwireApp
Declares a minimal app contract: required **`events`** / **`actions`**, optional **`filters`** per event, optional **`name`**. Do not use this for transport, secrets, intents, or startup policy — keep those elsewhere.
function exported from src/dx/app-manifest.ts.
Summary
Declares a minimal app contract: required events / actions, optional filters per event, optional name. Do not use this for transport, secrets, intents, or startup policy — keep those elsewhere.
Signature
/**
* Declares a minimal app contract: required **`events`** / **`actions`**, optional **`filters`** per event, optional **`name`**.
* Do not use this for transport, secrets, intents, or startup policy — keep those elsewhere.
*
* @see https://shardwire.js.org/docs/reference/contracts-and-diagnostics/define-shardwire-app/
*/
export function defineShardwireApp(definition: ShardwireAppManifestDefinition): ShardwireAppManifest;Related Guides
CapabilityExplanationReasonCode
Reference for `CapabilityExplanationReasonCode`, exported as part of the public Shardwire surface.
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.