Extends the single-Novi codebase into a multi-bot mass-messenger where each bot has its own token, avatar, label, and per-user authorization. - Secrets moved out of config.json: per-bot tokens in gitignored config/botTokens.json (with enabled flag), service-account OAuth in gitignored config/token.json (rewritten by refresh cron), integration and Google keys in .env. - Single Webex integration handles OAuth for all bots via a per-app redirect URI derived from OAUTH_CALLBACK_URL_TEMPLATE. - New requireBot middleware and getBotConfig helper reject requests for unknown or disabled bots at the /CollabCentral/:app boundary. - New /info endpoint plus dynamic frontend loading (sendMessage, monitorJobs) so pages self-describe per bot, including bot avatar fetched from Webex /people/me at startup. - Job draft state keyed by cookieId + appName so each bot has its own building queue; job list/detail endpoints filter by appName so users only see jobs from bots they are authorized on. - New jobDetail page for a readable per-job view; completed jobs are retained for 30 days by the cleanup cron. - Completion adaptive cards use per-bot avatar and label. - Miscellaneous fixes: off-by-two in the send loop, removed three dead send/process variants, added defensive init for jobs.* on load, dropped the deprecated crypto npm shim, and cleaned up stray logger labels and typos. Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
1.3 KiB
Text
26 lines
1.3 KiB
Text
# --- Server ----------------------------------------------------------------
|
|
SERVER_PORT=1450
|
|
|
|
# --- OAuth callback URL template ------------------------------------------
|
|
# The `:app` placeholder is replaced per-request with the bot's appName.
|
|
# IMPORTANT: every bot's resolved URL must be registered as an allowed
|
|
# redirect URI in the Webex integration portal
|
|
# (developer.webex.com -> My Apps -> <integration> -> Redirect URIs).
|
|
#
|
|
# Example: with the template below and bots `novi` and `techupdates`, register:
|
|
# https://bot.example.com/CollabCentral/novi/oauth
|
|
# https://bot.example.com/CollabCentral/techupdates/oauth
|
|
#
|
|
# When you add a new bot, register its redirect URI before users try to log in.
|
|
OAUTH_CALLBACK_URL_TEMPLATE=https://bot.example.com/CollabCentral/:app/oauth
|
|
|
|
# --- Webex integration (single integration used by all bots' OAuth) -------
|
|
WEBEX_INTEGRATION_CLIENT_ID=your-integration-client-id
|
|
WEBEX_INTEGRATION_CLIENT_SECRET=your-integration-client-secret
|
|
|
|
# --- Webex service account (used for group/people lookups) ----------------
|
|
WEBEX_SERVICE_ACCOUNT_CLIENT_ID=your-service-account-client-id
|
|
WEBEX_SERVICE_ACCOUNT_CLIENT_SECRET=your-service-account-client-secret
|
|
|
|
# --- Google Translate -----------------------------------------------------
|
|
GOOGLE_TRANSLATE_API_KEY=your-google-translate-api-key
|