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>
25 lines
641 B
JSON
25 lines
641 B
JSON
{
|
|
"name": "collabcentral",
|
|
"version": "1.0.0",
|
|
"description": "Micro-service for sending messages to the organization.",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"start": "node --env-file=.env index.js",
|
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
},
|
|
"author": "Joseph B. McQueen",
|
|
"license": "ISC",
|
|
"type": "module",
|
|
"dependencies": {
|
|
"body-parser": "^1.20.2",
|
|
"cookie-parser": "^1.4.6",
|
|
"express": "^4.18.2",
|
|
"form-data": "^4.0.0",
|
|
"multer": "^1.4.5-lts.1",
|
|
"node-cron": "^3.0.2",
|
|
"node-fetch": "^3.3.2",
|
|
"p-queue": "^7.4.1",
|
|
"sharp": "^0.32.6",
|
|
"uuid": "^9.0.1"
|
|
}
|
|
}
|