generated from nhcarrigan/template
1ebe240475
## Summary This PR adds a suite of slash commands and a context menu command to Amari, along with shared utilities and quality improvements across the board. ### New Commands - **`/create-issue`** — generates a GitHub issue on a specified repo using AI-drafted content (title, description, acceptance criteria) - **`/create-task`** — creates a task in Naomi's Leantime instance with an AI-drafted description and configurable priority - **`/onboard-mentee`** — automates the mentorship onboarding flow (GitHub invite, forum thread, role assignment) - **Forward to Owner** (context menu, message command) — forwards any message to Naomi with action buttons (contributed by @teklu) ### Shared Utilities - **`src/utils/makeAiRequest.ts`** — a single wrapper around the Anthropic SDK for all AI calls, with Amari's personality prompt baked in and full error handling - **`src/events/handleInteractionCreate.ts`** — extracted interaction handler (was inline in `index.ts`) to keep complexity under control ### Quality Improvements - `ephemeral: true` → `flags: [ MessageFlags.Ephemeral ]` (deprecated API removed) - Full `try/catch` + `logger.error` audit across all modules (`logMenteeJoin`, `checkAchievements`, `processMentorshipRole`, `processGitHubEvent`) - `deployGlobal.ts` replaced with a static `commands.json` payload for manual registration - Amari's personality prompt updated to reflect her actual character — warm, observant, and relentlessly caring ### Notes - `CLIENT_ID` is needed in 1Password at `op://Environment Variables - Naomi/Amari/client id` for the `commands.json` registration call - The forward-to-owner command (PR #13, contributed by @teklu) is fully preserved with original commit authorship ✨ This PR was created with help from Hikari~ 🌸 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Co-authored-by: Teklu <tekluabayneh@gmail.com> Reviewed-on: #16 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com>
37 lines
950 B
JSON
37 lines
950 B
JSON
{
|
|
"name": "amari",
|
|
"version": "1.0.0",
|
|
"description": "",
|
|
"main": "index.js",
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"start": "op run --env-file=prod.env -- node prod/index.js",
|
|
"lint": "eslint src --max-warnings 0",
|
|
"test": "echo \"Error: no test specified\" && exit 0"
|
|
},
|
|
"keywords": [],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"packageManager": "pnpm@10.15.0",
|
|
"devDependencies": {
|
|
"@nhcarrigan/eslint-config": "5.2.0",
|
|
"@nhcarrigan/typescript-config": "4.0.0",
|
|
"@types/node": "24.3.0",
|
|
"@types/node-schedule": "2.1.8",
|
|
"eslint": "9.33.0",
|
|
"typescript": "5.9.3"
|
|
},
|
|
"dependencies": {
|
|
"@anthropic-ai/sdk": "0.78.0",
|
|
"@nhcarrigan/discord-analytics": "0.0.6",
|
|
"@nhcarrigan/logger": "1.1.1",
|
|
"@retroachievements/api": "2.10.0",
|
|
"discord.js": "14.22.0",
|
|
"fastify": "5.7.4",
|
|
"node-schedule": "2.1.1",
|
|
"octokit": "5.0.5",
|
|
"rss-parser": "3.13.0"
|
|
}
|
|
}
|