Guides
Manifests
Define the minimum app contract with `defineShardwireApp()` and derive a matching minimum secret scope from it.
Manifests describe what an app needs from the bridge, not how the bridge is deployed.
The point of a manifest
- declare required events
- declare required actions
- declare which subscription filter keys the app expects to use
Example
import { defineShardwireApp, generateSecretScope } from 'shardwire';
export const manifest = defineShardwireApp({
name: 'moderation-worker',
events: ['messageCreate', 'guildMemberAdd'],
actions: ['sendMessage', 'timeoutMember'],
filters: {
messageCreate: ['guildId', 'channelId'],
},
});
export const minimumScope = generateSecretScope(manifest);What the manifest is not
Do not turn the manifest into a transport or deployment config bucket.
Keep these elsewhere:
- secrets
- bridge URL
- bot intents
- strict startup policy
- expected maximum scope
That separation keeps manifests portable and reviewable.