feat: add Slack bot integration

This commit is contained in:
xmanrui 2026-08-17 14:52:30 +08:00
parent bee4c2927f
commit 7d44861a07
28 changed files with 3021 additions and 661 deletions

View file

@ -4,7 +4,7 @@ import { join, resolve } from 'node:path';
import { createTokenConnectionSupervisor } from './connection-supervisor.mjs';
function harnessOrigin(webServer, configured) {
export function harnessOrigin(webServer, configured) {
if (configured !== undefined) return new URL(configured);
const port = webServer?.port;
if (!Number.isInteger(port) || port < 1 || port > 65_535) {
@ -13,7 +13,7 @@ function harnessOrigin(webServer, configured) {
return new URL(`http://127.0.0.1:${port}`);
}
function pluginPaths(config, channel) {
export function pluginPaths(config, channel) {
const dshHome = resolve(config.dshHome ?? process.env.DSH_HOME ?? join(homedir(), '.dsh'));
const root = resolve(config.dataDir ?? join(dshHome, 'integrations', `dsh-${channel}`));
return {