{"locator":"npm:@open-mercato/channel-discord","path":"@open-mercato/channel-discord","npm":"@open-mercato/channel-discord","github":null,"repoPath":"open-mercato/open-mercato#main/packages/channel-discord","kind":"module","type":"official","enterprise":false,"title":"Discord Communication Channel","summary":"Two-way Discord bot channel: REST outbound, real-time Gateway inbound, slash commands and optional AI auto-reply.","whenToUse":"Use when customers or staff talk to the business in a Discord server and those threads belong in the app's communication channels.","whenNotToUse":null,"category":"communication","tags":["discord","chat","bot"],"providers":[{"name":"discord","label":"Discord"}],"moduleIds":["channel_discord"],"requires":[{"raw":"@open-mercato/ai-assistant","resolvesTo":"npm:@open-mercato/ai-assistant"}],"replaces":[],"slotConflicts":[],"renamedFrom":[],"supersededBy":null,"alternatives":[],"status":"active","listed":true,"featured":false,"license":{"spdx":"MIT","kind":"osi","mismatch":false},"version":{"latest":"0.9.0","preview":null,"publishedAt":"2026-10-09","integrity":"sha512-lRYkIihKR+GWtmZJxCCWISTITvIh4PK7H+/GZTIwWZe/loIhMWOlfklT7l4drzyFJCJcY7CU9qvWmM6aoVLTwg==","installableFrom":"2026-10-09","gitRef":null,"recommended":{"0.9":null,"0.8":null,"next":null}},"identity":{"builtFrom":"verified","claimed":false,"source":"npm"},"compat":{"builtFor":{"range":"0.9.0","kind":"exact-pin","lines":["0.8","0.9"],"ranges":{"0.9":"0.9.0","0.8":"0.8.0","next":"0.9.0"}},"lines":{"0.9":{"status":"broken","step":"typecheck","omVersion":"0.9.0","moduleVersion":"0.9.0","at":"2026-10-29T09:03:43Z","receipt":"r_20261029_ba071e2d9535","since":"2026-10-29","precheck":null,"patches":[],"finding":"Typecheck failed: TS7016 Could not find a declaration file for module '@open-mercato/ai-assistant'. 'node_modules/@open-mercato/ai-assistant/dist/index.js' implicitly has an 'any' type."}},"verifiedOn":[]},"anatomy":{"version":"0.9.0","coverage":"full","counts":{"entities":0,"tables":0,"migrations":0,"routes":4,"publicRoutes":1,"aclFeatures":3,"eventsEmitted":0,"eventsConsumed":1,"backendPages":1,"frontendPages":0,"widgets":1,"workers":2,"cli":3,"aiTools":0,"aiAgents":1,"extends":4},"lists":{"aclFeatures":["channel_discord.view","channel_discord.configure","channel_discord.ai_auto_reply.run"],"eventsEmitted":[],"eventsConsumed":["communication_channels.message.received"],"env":["QUEUE_STRATEGY","OM_CHANNEL_DISCORD_REQUEST_TIMEOUT_MS","OM_CHANNEL_DISCORD_GATEWAY_DISABLED"],"hosts":["discord.com","gateway.discord.gg"],"tables":[],"publicRoutes":["POST /api/channel_discord/interactions"],"credentials":[{"key":"botToken","type":"secret","required":true},{"key":"applicationId","type":"text","required":true},{"key":"publicKey","type":"text","required":true},{"key":"guildId","type":"text","required":false},{"key":"defaultChannelId","type":"text","required":false}],"backendPages":["/backend/channel_discord/channels/[id]/ai-auto-reply"]},"callout":"ADDS 4 ROUTES (1 PUBLIC) · 3 PERMISSIONS","diff":{"from":"0.8.0","added":{"tables":0,"routes":0,"publicRoutes":0,"aclFeatures":0,"env":[],"hosts":[]},"removed":{"tables":0,"routes":0,"aclFeatures":0}}},"signals":{"receipt":{"0.9":"broken","0.8":"untested","next":"untested"},"fit":{"0.9":"ok","0.8":"drift","next":"drift"},"anatomy":"full","supplyChain":{"status":"ok","reasons":[]},"hygiene":{"status":"warn","failing":["peer-exact-pin"]},"maintenance":{"status":"current","lastRelease":"2026-10-09","catchUpDays":null},"declaredVsObserved":{"status":"mismatch","notes":["Built for 0.8, 0.9; verified on no line."]}},"tier":"listed","quality":null,"agentPolicy":{"0.9":{"decision":"refuse","reasons":[{"code":"BROKEN","text":"Broken at typecheck on 0.9 since 29 Oct."}]},"0.8":{"decision":"ask","reasons":[{"code":"NOT_VERIFIED","text":"Not yet tested in a new app on 0.8."}],"consentText":"Install @open-mercato/channel-discord@0.8.0"},"next":{"decision":"ask","reasons":[{"code":"NOT_VERIFIED","text":"Not yet tested in a new app on next."}],"consentText":"Install @open-mercato/channel-discord@0.9.0"}},"install":{"cli":"yarn mercato module add @open-mercato/channel-discord@0.9.0","cmm":"npx create-mercato-module install @open-mercato/channel-discord@0.9.0","needsAllowThirdParty":false,"moduleFlag":null},"stats":{"downloads30d":20679,"stars":null},"sigil":{"glyph":"0221212","phase":117,"publicRoutes":true},"links":{"page":"https://modules.openmercato.com/m/@open-mercato/channel-discord","md":"https://modules.openmercato.com/m/@open-mercato/channel-discord.md","json":"https://modules.openmercato.com/m/@open-mercato/channel-discord.json","facts":"https://modules.openmercato.com/m/@open-mercato/channel-discord/v/0.9.0/facts.json","npm":"https://www.npmjs.com/package/@open-mercato/channel-discord","repo":"https://github.com/open-mercato/open-mercato","docs":"https://docs.openmercato.com/user-guide/communication-channels-discord"},"addedAt":"2026-10-23","updatedAt":"2026-10-29T13:10:05Z","_meta":{"com.openmercato.modules/installable":{"0.9":"0.9.0","0.8":"0.8.0","next":"0.9.0"}},"facts":{"factsVersion":1,"extractor":{"engine":"@open-mercato/cli@0.9.0 extractModuleFacts","factsContractVersion":2,"catalog":"om-modules rentgen 1","durationMs":215},"package":{"locator":"npm:@open-mercato/channel-discord","name":"@open-mercato/channel-discord","version":"0.9.0","integrity":"sha512-lRYkIihKR+GWtmZJxCCWISTITvIh4PK7H+/GZTIwWZe/loIhMWOlfklT7l4drzyFJCJcY7CU9qvWmM6aoVLTwg==","source":"npm-tarball","gitRef":null},"gate":{"installable":true,"needsModuleFlag":false,"reason":null,"modules":[{"id":"channel_discord","src":true,"dist":true}]},"kind":"module","license":{"value":"MIT","kind":"osi","mismatch":false,"sources":{"packageJson":"MIT","licenseFile":null,"moduleInfo":null,"integrationTs":"MIT"}},"omPeers":{"@open-mercato/ai-assistant":"0.9.0","@open-mercato/shared":"0.9.0"},"dependencies":{"@open-mercato/core":"0.9.0","@open-mercato/queue":"0.9.0","@open-mercato/ui":"0.9.0"},"agentsMd":false,"readmeExcerpt":null,"modules":[{"id":"channel_discord","title":"Discord Communication Channel","description":"Connect a Discord bot as a two-way communication channel. Outbound via the Discord REST API; inbound in real time via a Gateway worker; signed (Ed25519) Interactions endpoint that acknowledges slash commands / buttons. Optional per-channel AI auto-reply answers straightforward messages and proposes","requires":[],"ejectable":null,"data":{"entities":[],"migrations":{"count":0,"first":null,"last":null},"customEntities":0},"http":{"routes":[{"method":"GET","path":"/api/channel_discord/ai-auto-reply/channels","requireAuth":true,"requireFeatures":[],"hasOpenApi":true,"src":{"file":"src/modules/channel_discord/api/ai-auto-reply/channels/route.ts","line":47}},{"method":"GET","path":"/api/channel_discord/channels/[id]/ai-auto-reply","requireAuth":true,"requireFeatures":[],"hasOpenApi":true,"src":{"file":"src/modules/channel_discord/api/channels/[id]/ai-auto-reply/route.ts","line":76}},{"method":"PUT","path":"/api/channel_discord/channels/[id]/ai-auto-reply","requireAuth":true,"requireFeatures":[],"hasOpenApi":true,"src":{"file":"src/modules/channel_discord/api/channels/[id]/ai-auto-reply/route.ts","line":141}},{"method":"POST","path":"/api/channel_discord/interactions","requireAuth":false,"requireFeatures":[],"hasOpenApi":true,"src":{"file":"src/modules/channel_discord/api/interactions/route.ts","line":67}}],"legacyRouteFiles":0,"authResolved":1},"security":{"aclFeatures":["channel_discord.view","channel_discord.configure","channel_discord.ai_auto_reply.run"],"setupDefaultRoleFeatures":true},"events":{"emits":[],"subscribes":[{"event":"communication_channels.message.received","src":{"file":"src/modules/channel_discord/subscribers/ai-auto-reply.ts","line":32}}]},"ui":{"backendPages":[{"path":"/backend/channel_discord/channels/[id]/ai-auto-reply","requireFeatures":[]}],"frontendPages":[],"widgets":1,"extensionHosts":0},"background":{"workers":[{"queue":"channel_discord_gateway"},{"queue":"channel_discord_interactions"}],"cli":["start-gateway","configure-from-env","register-slash-commands"]},"ai":{"tools":[],"agents":["channel_discord.auto_reply"]},"config":{"credentials":[{"key":"botToken","type":"secret","required":true},{"key":"applicationId","type":"text","required":true},{"key":"publicKey","type":"text","required":true},{"key":"guildId","type":"text","required":false},{"key":"defaultChannelId","type":"text","required":false}],"env":[{"name":"QUEUE_STRATEGY","src":{"file":"src/modules/channel_discord/cli.ts","line":70}},{"name":"OM_CHANNEL_DISCORD_REQUEST_TIMEOUT_MS","src":{"file":"src/modules/channel_discord/lib/discord-rest.ts","line":155}},{"name":"OM_CHANNEL_DISCORD_GATEWAY_DISABLED","src":{"file":"src/modules/channel_discord/workers/discord-gateway.ts","line":196}}]},"network":{"hosts":[{"host":"discord.com","src":{"file":"src/modules/channel_discord/lib/discord-rest.ts","line":22},"confidence":"high"},{"host":"gateway.discord.gg","src":{"file":"src/modules/channel_discord/lib/discord-gateway-client.ts","line":38},"confidence":"low"}],"undeclared":[]},"extends":[{"kind":"specialized-registry","target":"ai:channel_discord.auto_reply"},{"kind":"specialized-registry","target":"integration:channel_discord"},{"kind":"subscriber","target":"communication_channels.message.received"},{"kind":"widget","target":"profile:communication-channels:connect"}],"omImports":{"@open-mercato/ai-assistant":{".":["(dynamic)"],"modules/ai_assistant/lib/ai-agent-definition":["AiAgentDefinition"]},"@open-mercato/core":{"modules/communication_channels/data/entities":["ChannelThreadMapping","CommunicationChannel","ExternalConversation"],"modules/communication_channels/events":["emitCommunicationChannelsEvent"],"modules/communication_channels/lib/access-control":["ChannelAccessDeniedError","assertCanAccessChannel","assertCanManageChannel","channelOrgScopeWhereFromFilter","channelOwnerScopeWhere"],"modules/communication_channels/lib/adapter":["ChannelAdapter","ChannelCapabilities","ChannelNativeContent","ContactHint","ConvertOutboundInput","DeleteChannelMessageInput","EditChannelMessageInput","FetchHistoryInput","GetMessageStatusInput","HistoryPage","InboundMessage","InboundReactionEvent","MessageStatus","NormalizedAttachment","NormalizedInboundMessage","RemoveReactionInput","ResolveContactInput","SendMessageInput","SendMessageResult","SendReactionInput","ValidateCredentialsInput","ValidateCredentialsResult","VerifyWebhookInput"],"modules/communication_channels/lib/adapter-registry-singleton":["hasChannelAdapter","registerChannelAdapter"],"modules/communication_channels/lib/queue":["COMMUNICATION_CHANNELS_QUEUES","getCommunicationChannelsQueue"],"modules/communication_channels/lib/reaction-processor-types":["ReactionInboundJob"],"modules/communication_channels/lib/route-mutation-guard":["validateRouteMutationGuard"],"modules/communication_channels/lib/system-user":["COMMUNICATION_CHANNELS_SYSTEM_USER_ID","resolveCommunicationChannelsSystemUserId"],"modules/communication_channels/workers/inbound-processor":["InboundProcessorPayload"],"modules/directory/utils/organizationScope":["resolveOrganizationScopeForRequest"],"modules/directory/utils/organizationScopeFilter":["resolveOrganizationScopeFilter"],"modules/integrations/lib/credentials-service":["CredentialsService","createCredentialsService"],"modules/integrations/lib/log-service":["IntegrationLogService","createIntegrationLogService"],"modules/messages/data/entities":["Message"]},"@open-mercato/queue":{".":["(dynamic)","Queue","QueuedJob","WorkerMeta","createModuleQueue"]},"@open-mercato/shared":{"lib/auth/server":["getAuthFromRequest"],"lib/boolean":["parseBooleanToken","parseBooleanWithDefault"],"lib/commands":["CommandBus","CommandHandler","registerCommand"],"lib/commands/errors":["getCommandInterceptorHttpRejection"],"lib/commands/flush":["withAtomicFlush"],"lib/crud/errors":["isCrudHttpError"],"lib/crud/optimistic-lock-command":["enforceCommandOptimisticLockWithGuards"],"lib/di/container":["AppContainer","createRequestContainer"],"lib/encryption/find":["findOneWithDecryption","findWithDecryption"],"lib/html/htmlToPlainText":["htmlToPlainText"],"lib/html/sanitizeRichText":["sanitizeRichTextHtml"],"lib/http/fetchWithTimeout":["FetchTimeoutError","fetchWithTimeout"],"lib/i18n/context":["TranslateFn","useT"],"lib/i18n/server":["(dynamic)","resolveTranslations"],"lib/i18n/translate":["createTranslator"],"lib/logger":["createLogger"],"modules/integrations/types":["IntegrationBundle","IntegrationDefinition","IntegrationScope","buildIntegrationDetailWidgetSpotId"],"modules/messages/types":["MessageAction","MessageTypeDefinition"],"modules/registry":["ModuleCli","PageMetadata"],"modules/setup":["ModuleSetupConfig"],"modules/widgets/injection":["InjectionWidgetComponentProps","InjectionWidgetModule","ModuleInjectionTable"],"security/featurePolicy":["authorizeFeatures"]},"@open-mercato/ui":{"backend/CrudForm":["CrudField","CrudForm"],"backend/FlashMessages":["flash"],"backend/Page":["Page","PageBody"],"backend/detail":["ErrorMessage","LoadingMessage","RecordNotFoundState"],"backend/injection/useGuardedMutation":["useGuardedMutation"],"backend/utils/apiCall":["apiCall"],"backend/utils/crud":["updateCrud"],"backend/utils/serverErrors":["createCrudFormError"],"primitives/button":["Button"],"primitives/dialog":["Dialog","DialogContent","DialogFooter","DialogHeader","DialogTitle"],"primitives/input":["Input"],"primitives/label":["Label"],"primitives/password-input":["PasswordInput"],"primitives/tag":["Tag"]}},"collisionKeys":{"moduleId":"channel_discord","tables":[],"aclFeatures":["channel_discord.view","channel_discord.configure","channel_discord.ai_auto_reply.run"],"eventIds":[],"backendRoutes":["/backend/channel_discord/channels/[id]/ai-auto-reply"]},"publicRoutes":1,"glyph":"0221212","lint":[{"code":"peer-exact-pin","severity":"warn","message":"Peer dependencies pin Open Mercato exactly (@open-mercato/ai-assistant 0.9.0 and 1 more). Use a range.","anchor":"i2 §1.4","src":null},{"code":"no-agents-md","severity":"info","message":"No AGENTS.md in the package.","anchor":"g3 §3","src":null},{"code":"public-routes","severity":"info","message":"1 of 4 routes do not require authentication.","anchor":null,"src":{"file":"src/modules/channel_discord/api/interactions/route.ts","line":67}},{"code":"ships-tests","severity":"info","message":"The tarball ships test files.","anchor":null,"src":null},{"code":"version-drift","severity":"info","message":"integration.ts says 1.0.0, package.json says 0.9.0.","anchor":null,"src":{"file":"src/modules/channel_discord/integration.ts","line":5}}]}],"coverage":{"routesAuthResolved":1,"integrationTs":"expanded"},"diagnostics":[]},"receipts":[{"schema":1,"id":"r_20261029_ba071e2d9535","cellKey":"ba071e2d95353f713ae3000265a0ec37fd8c2244dc069fe9d6d19be8b873207b","module":{"locator":"npm:@open-mercato/channel-discord","version":"0.9.0","integrity":"sha512-lRYkIihKR+GWtmZJxCCWISTITvIh4PK7H+/GZTIwWZe/loIhMWOlfklT7l4drzyFJCJcY7CU9qvWmM6aoVLTwg=="},"om":{"line":"0.9","version":"0.9.0","createApp":"create-mercato-app@0.9.0","preset":"classic"},"harness":{"version":"c349007c2b5b","node":"24.21.0","yarn":"4.17.1","runner":"ubuntu-latest","mode":"realistic","patches":[]},"baseline":{"status":"verified","receipt":"r_20261029_e5f612bd10e0"},"requiresInstalled":[],"steps":[{"name":"scaffold","status":"pass","sec":4,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"install","status":"pass","sec":69,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"add","status":"pass","sec":40,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"generate","status":"pass","sec":27,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"typecheck","status":"fail","sec":124,"signature":"c457ff46c6ac5839bab3cee393bb83cecf212eb7","excerpt":"node_modules/@open-mercato/channel-discord/src/modules/channel_discord/lib/ai-agent-directory.ts(48,25): error TS7016: Could not find a declaration file for module '@open-mercato/ai-assistant'. '/home/om-cell/app/node_modules/@open-mercato/ai-assistant/dist/index.js' implicitly has an 'any' type.\n  Try `npm i --save-dev @types/open-mercato__ai-assistant` if it exists or add a new declaration (.d.ts) file containing `declare module '@open-mercato/ai-assistant';`\nnode_modules/@open-mercato/channel-discord/src/modules/channel_discord/subscribers/ai-auto-reply.ts(299,29): error TS7016: Could not find a declaration file for module '@open-mercato/ai-assistant'. '/home/om-cell/app/node_modules/@open-mercato/ai-assistant/dist/index.js' implicitly has an 'any' type.\n  Try `npm i --save-dev @types/open-mercato__ai-assistant` if it exists or add a new declaration (.d.ts) file containing `declare module '@open-mercato/ai-assistant';`","file":"node_modules/@open-mercato/channel-discord/src/modules/channel_discord/lib/ai-agent-directory.ts","line":48},{"name":"initialize","status":"pass","sec":48,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"build","status":"fail","sec":237,"signature":"997ed37880d6c465e76d208cf6af4ae994a5515a","excerpt":"node_modules/@open-mercato/channel-discord/src/modules/channel_discord/lib/ai-agent-directory.ts(48,25): error TS7016: Could not find a declaration file for module '@open-mercato/ai-assistant'. '/home/om-cell/app/node_modules/@open-mercato/ai-assistant/dist/index.js' implicitly has an 'any' type.\n  Try `npm i --save-dev @types/open-mercato__ai-assistant` if it exists or add a new declaration (.d.ts) file containing `declare module '@open-mercato/ai-assistant';`\nnode_modules/@open-mercato/channel-discord/src/modules/channel_discord/subscribers/ai-auto-reply.ts(299,29): error TS7016: Could not find a declaration file for module '@open-mercato/ai-assistant'. '/home/om-cell/app/node_modules/@open-mercato/ai-assistant/dist/index.js' implicitly has an 'any' type.\n  Try `npm i --save-dev @types/open-mercato__ai-assistant` if it exists or add a new declaration (.d.ts) file containing `declare module '@open-mercato/ai-assistant';`\nFailed to type check.","file":"node_modules/@open-mercato/channel-discord/src/modules/channel_discord/lib/ai-agent-directory.ts","line":48},{"name":"start","status":"skipped","sec":null,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"smoke","status":"skipped","sec":null,"signature":null,"excerpt":null,"file":null,"line":null}],"result":{"status":"broken","failedStep":"typecheck","alsoFailed":["build"],"classification":"module-fail","quarantineUntil":null},"transition":{"from":null,"to":"broken","confirmed":true},"run":{"id":40842502780,"attempt":2,"url":"https://github.com/open-mercato/modules/actions/runs/40846683223/job/123356065805","at":"2026-10-29T09:03:43Z","durationSec":639},"attestation":null}],"rules":[{"id":"LST-1","pass":true,"detail":"Descriptor is valid."},{"id":"LST-2","pass":true,"detail":"Stable version exists and is not deprecated."},{"id":"LST-3","pass":true,"detail":"src/modules and dist/modules pair found."},{"id":"LST-4","pass":true,"detail":"License: MIT."},{"id":"LST-5","pass":true,"detail":"No known malware or open critical advisory."},{"id":"LST-6","pass":true,"detail":"Name reviewed at merge."},{"id":"VER-1","pass":false,"detail":"Broken at typecheck on 0.9 since 29 Oct."},{"id":"VER-2","pass":true,"detail":"Fits statically on 0.9: ok."},{"id":"VER-3","pass":true,"detail":"Supply chain: ok."},{"id":"VER-4","pass":true,"detail":"No lint errors."},{"id":"VER-5","pass":true,"detail":"No repository in the descriptor to compare."}],"maintainers":["pat-lewczuk","patryk.andrzejewski","piotrkarwatka"]}
