LibreChat/api/server/routes/agents/channels.js
Dustin Healy cd4652279c
🌐 feat: Connect Organization Slack Workspaces to Agents (#17811)
* feat: Route shared Slack installations through durable channel workers

* fix: Retain workspace metadata projection after helper cleanup

* fix: Honor configured proxy for Slack credential verification

* feat: Complete Shared Slack Workspace Setup and Routing

* fix: Integrate Shared Routing Retirement and Helm Startup

* fix: Cache Gateway Preparation and Recover OAuth Notifications

* fix: Route Organization-Owned Slack Apps Through the Shared Gateway

* 🔒 fix: Close Shared Slack Lifecycle and Retry Boundaries

* test: Isolate Channel Policy Route From Workspace Startup
2026-11-10 21:04:10 -08:00

26 lines
1.1 KiB
JavaScript

const express = require('express');
const { PermissionBits } = require('librechat-data-provider');
const { canAccessAgentResource, requireSameOrigin } = require('~/server/middleware');
const handlers = require('~/server/services/Channels');
const workspaceBindings = require('~/server/services/SlackWorkspaceBindings');
const { checkRemoteAgentsFeature } = require('./middleware');
const router = express.Router({ mergeParams: true });
router.use(checkRemoteAgentsFeature);
router.use(
canAccessAgentResource({
requiredPermission: PermissionBits.SHARE,
resourceIdParam: 'agentId',
}),
);
router.get('/', handlers.list);
router.post('/', handlers.create);
router.post('/workspace-connections', requireSameOrigin, workspaceBindings.create);
router.get('/:channelId/workspace-routes', workspaceBindings.read);
router.post('/:channelId/workspace-routes', requireSameOrigin, workspaceBindings.assign);
router.delete('/:channelId/workspace-routes', requireSameOrigin, workspaceBindings.remove);
router.get('/:channelId/manifest', handlers.manifest);
router.patch('/:channelId', handlers.update);
router.delete('/:channelId', handlers.remove);
module.exports = router;