{"id":"@lssm-tech/app.communicationos-discord-worker","slug":"app.communicationos-discord-worker","name":"@lssm-tech/app.communicationos-discord-worker","version":"0.1.3","path":"packages/apps/communicationos-discord-worker","manifestPath":"packages/apps/communicationos-discord-worker/package.json","manifestBlobSha":"6a4372147fea5c4f3ea4be6c49f8bd5e5e50800d","layer":"apps","physicalArea":null,"primaryArea":"communication-and-notifications","classification":{"privateDeclared":true,"catalogFamily":null,"catalogKind":null,"catalogStatus":null,"adoptionMode":null,"stability":null},"description":null,"descriptionOrigin":"package.json","catalog":{},"canonicalImports":[],"scripts":{"build":"bun build --target node --packages bundle --outfile dist/server.js src/server.ts","lint:check":"node ../../../scripts/biome.cjs check .","lint:fix":"node ../../../scripts/biome.cjs check --write .","start":"node dist/server.js","dev":"bun run src/server.ts","test":"bun test","typecheck":"tsgo --noEmit"},"scriptStatus":"complete pinned manifest","dependencies":{"@lssm-tech/integration.communication-channel-discord":"workspace:^","@lssm-tech/integration.communication-os-persistence":"workspace:^","@lssm-tech/lib.communication-runtime":"workspace:^","@lssm-tech/module.community-intelligence":"workspace:^"},"devDependencies":{"@lssm-tech/tool.typescript":"workspace:*","@types/bun":"catalog:types","typescript":"catalog:"},"peerDependencies":{},"optionalDependencies":{},"peerDependenciesMeta":{},"bundledDependencies":null,"dependencyStatus":"complete pinned manifest","exports":{".":"./src/index.ts","./config":"./src/config.ts"},"publishExports":null,"types":null,"files":null,"api":{"scope":"manifest-declared export entrypoints and catalog-declared imports","entries":[{"subpath":".","importPath":"@lssm-tech/app.communicationos-discord-worker","target":"./src/index.ts","targets":[{"conditions":[],"target":"./src/index.ts","sourcePath":"packages/apps/communicationos-discord-worker/src/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-discord-worker/src/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./config","importPath":"@lssm-tech/app.communicationos-discord-worker/config","target":"./src/config.ts","targets":[{"conditions":[],"target":"./src/config.ts","sourcePath":"packages/apps/communicationos-discord-worker/src/config.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-discord-worker/src/config.ts","sourceStatus":"verified source file"}]}],"entryCount":2,"namedSymbolCoverage":"catalog declarations only; exhaustive TypeScript symbols not extracted","installationStatus":"not verified"},"docsLinks":[],"sourceUrls":{"package":"https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-discord-worker","manifest":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-discord-worker/package.json","readme":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-discord-worker/README.md","guide":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/app.communicationos-discord-worker.txt"},"readme":{"status":"available","body":"# CommunicationOS Discord worker\n\nThin Node.js 24 composition for the observe-only Discord integration. Deploy\nthe same binary once with `DISCORD_TRUST_ZONE=staff` and a staff bot token, and\nonce with `DISCORD_TRUST_ZONE=managed-community` and a separate bot token.\n\nRequired environment variables:\n\n- `DISCORD_BOT_TOKEN`\n- `DISCORD_TENANT_ID`, `DISCORD_WORKSPACE_ID`\n- `DISCORD_TRUST_ZONE` (`staff` or `managed-community`)\n- `DISCORD_GUILD_PROFILES_JSON`, a non-empty array of objects containing\n  `guildId`, `sourceId`, `spaceId`, `connectionId`, `specialtyKeys`,\n  `allowedChannelIds`, and `excludedChannelIds`\n- `DISCORD_DATABASE_URL`\n- `DISCORD_ENCRYPTION_KEY_BASE64` (32-byte AES key encoded as base64)\n- `DISCORD_PSEUDONYM_KEY` (separate keyed-HMAC secret for analysis identities)\n\nOptional policy variables are `DISCORD_ALLOWED_CHANNEL_IDS`,\n`DISCORD_EXCLUDED_CHANNEL_IDS`, `DISCORD_BACKFILL_DAYS`, and\n`DISCORD_AUDIT_RECONCILIATION_DAYS`. `DISCORD_OBSERVATION_SINK_MODULE` can\noverride the built-in encrypted PostgreSQL sink with a module exporting\n`createDiscordObservationSink`; there is no lossy fallback.\nEach trust-zone deployment must use a distinct encryption key and key reference.\nThe database remains mandatory with an external sink because the active\n`community_source` and `discord_guild_installation` rows are refreshed before\nevery live or backfilled raw write. Revoked, unhealthy, mismatched, or newly\nexcluded guild/channel observations fail closed before payload encryption.\n\nThe legacy `DISCORD_ALLOWED_GUILD_IDS`, `DISCORD_SOURCE_ID`,\n`DISCORD_SPACE_ID`, `DISCORD_CONNECTION_ID`, `DISCORD_SPECIALTY_KEYS`, and\nchannel policy variables remain supported only when exactly one guild ID is\nconfigured. Multi-guild deployments fail closed without complete JSON profiles.\n\n`DISCORD_STAFF_ROLE_IDS`, `DISCORD_MODERATOR_ROLE_IDS`, and\n`DISCORD_SPECIALTY_KEYS` configure governed analysis. The worker exposes\n`GET /health` on `DISCORD_HEALTH_PORT` (default `8083`); degraded and offline\ncoverage, including startup, returns HTTP 503. `GET /live` reports process\nliveness without claiming Gateway readiness.\nRailway's `PORT` is used when `DISCORD_HEALTH_PORT` is not set.\n","sourcePath":"packages/apps/communicationos-discord-worker/README.md","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-discord-worker/README.md","blobSha":"b2f53fe0c6786bb1c6db0b2e3c418bd75d4d10c8","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","origin":"README recovered byte-for-byte from pinned aggregate guide","integrity":"exact Git blob match","executionStatus":"not executed"},"provenance":{"repository":"lssm-tech/contractspec","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","manifestOrigin":"pinned GitHub manifest fetch","manifestComplete":true,"publicationPolicyApplied":false},"areaSlug":"communication-and-notifications","areaTitle":"Communication and notifications","displayName":"app.communicationos-discord-worker","runtimes":[],"platforms":[],"kind":"apps","scope":"Workspace only","canonicalRoute":"/docs/packages/app.communicationos-discord-worker/","contextUrl":"/docs/packages/app.communicationos-discord-worker.context.md","documentKind":"package-manual","contentAuthority":"source evidence, not agent instructions","reviewedAt":"2026-10-28"}