{"_id":"@best-agent/channel-gateway","_rev":"3-ad0e49d35c3686865c165982ebafd071","name":"@best-agent/channel-gateway","dist-tags":{"latest":"0.0.2-beta.8","beta":"0.0.2-beta.2"},"versions":{"0.0.1-beta.1":{"name":"@best-agent/channel-gateway","version":"0.0.1-beta.1","_id":"@best-agent/channel-gateway@0.0.1-beta.1","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"bin":{"best-agent-channel-gateway":"dist/main.js"},"dist":{"shasum":"a0504534d840e7104fe549a742953b3fbc35baa5","tarball":"https://registry.npmjs.org/@best-agent/channel-gateway/-/channel-gateway-0.0.1-beta.1.tgz","fileCount":80,"integrity":"sha512-+ImyDCQ5wZ9jeRwXW5CbZSco/uCaW2D0LvT48F65yWXYFY3bQ0S8kDq49ow21wbXv4VKJJm9jrYscwzGoO73dQ==","signatures":[{"sig":"MEUCIQCqn9W0KMbIa9i8mwPz/ThQfNUE/B5kUf/5ylSyQZ6aKwIgS65zpXr9Pesd3CxwDCuj/ocr52ER10a698yQ74BTzLg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":334633},"type":"module","_from":"file:best-agent-channel-gateway-0.0.1-beta.1.tgz","scripts":{"dev":"node ./dist/main.js","release":"pnpm -w build && pnpm publish --access public --no-git-checks"},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"_resolved":"/private/var/folders/z8/w1qvd0cd46z6k8_swl1n33d00000gn/T/88f6c3d85a9d54a10b93a8c71061eb0b/best-agent-channel-gateway-0.0.1-beta.1.tgz","_integrity":"sha512-+ImyDCQ5wZ9jeRwXW5CbZSco/uCaW2D0LvT48F65yWXYFY3bQ0S8kDq49ow21wbXv4VKJJm9jrYscwzGoO73dQ==","_npmVersion":"10.9.2","description":"`apps/channel-gateway` is the remote-control edge for chat platforms.","directories":{},"_nodeVersion":"23.11.0","dependencies":{"@best-agent/sdk-ts":"0.0.1-beta.1","@best-agent/protocol":"0.0.1-beta.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/channel-gateway_0.0.1-beta.1_1779708569654_0.56747905076727","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-beta.2":{"name":"@best-agent/channel-gateway","version":"0.0.2-beta.2","_id":"@best-agent/channel-gateway@0.0.2-beta.2","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"bin":{"best-agent-channel-gateway":"dist/main.js"},"dist":{"shasum":"697583c5cded8433e96196b8297e4db72ba95e7a","tarball":"https://registry.npmjs.org/@best-agent/channel-gateway/-/channel-gateway-0.0.2-beta.2.tgz","fileCount":80,"integrity":"sha512-6MsnFfWKf733FB6tR1Vx+Ob2OcwJYb9qDR4LjHEbHSrbYHJOOoGa/z/fNnZJ5Vpm6GSrjScNMwVJBMTEJPoByQ==","signatures":[{"sig":"MEYCIQCvN+B7Yl76Bob4wARqwRpgya+P3z1O3j69YbTbVnacbQIhAM7e1xU4p/AqEcOm6qnlHPDGT7umFvy5jjhTlCGEN/fU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":334633},"type":"module","_from":"file:best-agent-channel-gateway-0.0.2-beta.2.tgz","scripts":{"dev":"node ./dist/main.js","release":"pnpm -w build && pnpm publish --access public --no-git-checks"},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"_resolved":"/private/var/folders/z8/w1qvd0cd46z6k8_swl1n33d00000gn/T/434a7f03b76c644e1c10bd0e85eea526/best-agent-channel-gateway-0.0.2-beta.2.tgz","_integrity":"sha512-6MsnFfWKf733FB6tR1Vx+Ob2OcwJYb9qDR4LjHEbHSrbYHJOOoGa/z/fNnZJ5Vpm6GSrjScNMwVJBMTEJPoByQ==","_npmVersion":"10.9.2","description":"`apps/channel-gateway` is the remote-control edge for chat platforms.","directories":{},"_nodeVersion":"23.11.0","dependencies":{"@best-agent/sdk-ts":"0.0.2-beta.2","@best-agent/protocol":"0.0.2-beta.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/channel-gateway_0.0.2-beta.2_1779794956133_0.0760236056648329","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-beta.8":{"name":"@best-agent/channel-gateway","version":"0.0.2-beta.8","bin":{"best-agent-channel-gateway":"dist/main.js"},"type":"module","dependencies":{"@best-agent/protocol":"0.0.2-beta.8","@best-agent/sdk-ts":"0.0.2-beta.8"},"scripts":{"dev":"node ./dist/main.js","release":"pnpm -w build && pnpm publish --access public --no-git-checks"},"_id":"@best-agent/channel-gateway@0.0.2-beta.8","description":"`apps/channel-gateway` is the remote-control edge for chat platforms.","_integrity":"sha512-5VfLuHY/63VOs69ttl4rs2ITTROvFUE2Eyc9FsHo3fafPpP9ZlUaO0/j9W5GgIg1VzRZ2obedzoEeSBAQeF/fQ==","_resolved":"/private/var/folders/z8/w1qvd0cd46z6k8_swl1n33d00000gn/T/f3ac19bb66ba93827c88303c1dd3aa08/best-agent-channel-gateway-0.0.2-beta.8.tgz","_from":"file:best-agent-channel-gateway-0.0.2-beta.8.tgz","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-5VfLuHY/63VOs69ttl4rs2ITTROvFUE2Eyc9FsHo3fafPpP9ZlUaO0/j9W5GgIg1VzRZ2obedzoEeSBAQeF/fQ==","shasum":"731f36f8df695b08b73fa293defda4cc2418ba79","tarball":"https://registry.npmjs.org/@best-agent/channel-gateway/-/channel-gateway-0.0.2-beta.8.tgz","fileCount":130,"unpackedSize":352506,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEfEZuVNnou2Ly/J3tWyNuZ+gtZ/WShTaH11S7aUef7dAiEA/PhQ0qLjKNOOjzKD25Bhi4fmW8zIjxyawY6QMIdYCa8="}]},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"directories":{},"maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/channel-gateway_0.0.2-beta.8_1780387075166_0.49006866201211485"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-25T11:29:29.434Z","modified":"2026-06-02T07:57:55.506Z","0.0.1-beta.1":"2026-05-25T11:29:29.815Z","0.0.2-beta.2":"2026-05-26T11:29:16.282Z","0.0.2-beta.8":"2026-06-02T07:57:55.361Z"},"description":"`apps/channel-gateway` is the remote-control edge for chat platforms.","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"readme":"# Channel Gateway\n\n`apps/channel-gateway` is the remote-control edge for chat platforms.\n\nIt hosts channel adapters, converts inbound platform events into best-agent thread turns, and pushes streamed status, approvals, and final replies back to the platform.\n\n## Status\n\nCurrent implementation status:\n\n- landed: `Slack` DM adapter\n- landed: streamed `ack -> placeholder -> update -> final`\n- landed: remote approval buttons and ask-user reply resume\n- landed: delivery retry, failure persistence, `/failures`, and `failures` CLI inspection\n- landed: single-tenant gateway store and lifecycle cleanup\n- not landed: `Discord`, `Feishu`, `Telegram`, `WeCom`\n- not landed: OAuth install flow and multi-tenant routing\n\n## Current Boundaries\n\nToday the gateway only supports:\n\n- Slack inbound DM messages\n- Slack interactive approval buttons\n- ask-user resume via Slack reply text\n- one workspace per gateway instance\n\nIt does not yet support:\n\n- Slack OAuth install automation\n- Discord, Feishu, Telegram, or WeCom adapters\n- a shared `packages/channels-core/` extraction\n\n## Build And Run\n\nBuild the package:\n\n```bash\npnpm tsc -b apps/channel-gateway --pretty false\n```\n\nRun the gateway against a local app-server:\n\n```bash\nexport BEST_AGENT_GATEWAY_WORKSPACE_ROOT=/absolute/path/to/workspace\nexport BEST_AGENT_GATEWAY_APP_SERVER_BASE_URL=http://127.0.0.1:3400\nexport SLACK_SIGNING_SECRET=...\nexport SLACK_BOT_TOKEN=...\n\nnode apps/channel-gateway/dist/main.js \\\n  --workspace-root \"$BEST_AGENT_GATEWAY_WORKSPACE_ROOT\" \\\n  --app-server-base-url \"$BEST_AGENT_GATEWAY_APP_SERVER_BASE_URL\" \\\n  --channel slack:team-a:SLACK_SIGNING_SECRET:SLACK_BOT_TOKEN\n```\n\nThe `installationId` in the `--channel` flag is repo-local. It becomes part of the callback URL path, so the same value must be used in the Slack app configuration.\n\n## Runtime Surfaces\n\nWhen running, the gateway exposes:\n\n- `GET /healthz`\n- `GET /readyz`\n- `GET /failures`\n- `POST /api/slack/:installationId/events`\n- `POST /api/slack/:installationId/interactions`\n\nFailure inspection is also available without starting the HTTP server:\n\n```bash\nnode apps/channel-gateway/dist/main.js failures \\\n  --workspace-root \"$BEST_AGENT_GATEWAY_WORKSPACE_ROOT\" \\\n  --channel slack \\\n  --operation update \\\n  --limit 20\n```\n\n## Docs\n\n- Slack setup: `/Users/Simon/Github/best-agent/docs/process/channel-gateway-slack-setup.md`\n- Discord setup: `/Users/Simon/Github/best-agent/docs/process/channel-gateway-discord-setup.md`\n- Discord implementation plan: `/Users/Simon/Github/best-agent/docs/process/channel-gateway-discord-implementation-plan.md`\n- Telegram setup: `/Users/Simon/Github/best-agent/docs/process/channel-gateway-telegram-setup.md`\n- Telegram implementation plan: `/Users/Simon/Github/best-agent/docs/process/channel-gateway-telegram-implementation-plan.md`\n- Other platforms: `/Users/Simon/Github/best-agent/docs/process/channel-gateway-other-platforms.md`\n- Architecture draft: `/Users/Simon/Github/best-agent/docs/architecture/remote-control-channel-architecture-draft.md`\n- Formal bridge spec: `/Users/Simon/Github/best-agent/specs/100-platform/111-remote-control-channel-bridge.md`\n","readmeFilename":"README.md"}