Commit Graph

4 Commits

Author SHA1 Message Date
hikari 30d4c7b09e feat: port alt-text and query commands from Cordelia
Adds owner-only /alt-text and /query slash commands, migrating
Cordelia's AI functionality into Amari with updated style and auth.
2026-03-12 23:21:14 -07:00
hikari f61ea3b3cb feat: add /remind command for meeting notifications
Adds an owner-only slash command that sends a meeting waiting room
notification to a specified Discord user in the general channel.
2026-03-12 22:12:39 -07:00
hikari ec6a4469e1 feat: replace create-task and create-issue with unified create-ticket (#18)
Node.js CI / CI (push) Successful in 28s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 53s
## Summary

- Removes `/create-task` (LeanTime) and `/create-issue` (Gitea) slash commands
- Introduces `/create-ticket` with a `platform` choice argument: **LeanTime**, **Asana**, **Gitea**, **GitHub**
- User provides only a `description`; the AI generates both the title and a fleshed-out body
- `owner` and `repo` arguments are optional but validated at runtime when Gitea or GitHub is selected
- Adds `ASANA_KEY` to `prod.env` (1Password reference — key needs to be added to vault)
- Command remains restricted to Naomi's user ID

## Test plan

- [ ] Register updated `commands.json` against the Discord API
- [ ] Add `ASANA_KEY` to 1Password vault at `op://Environment Variables - Naomi/Amari/asana key`
- [ ] Test `/create-ticket platform:LeanTime description:...` creates a task on the LeanTime board
- [ ] Test `/create-ticket platform:Asana description:...` creates a task in Naomi's Asana project
- [ ] Test `/create-ticket platform:Gitea owner:nhcarrigan repo:amari description:...` creates a Gitea issue
- [ ] Test `/create-ticket platform:GitHub owner:naomi-lgbt repo:... description:...` creates a GitHub issue
- [ ] Test that omitting `owner`/`repo` for Gitea/GitHub returns a helpful error
- [ ] Verify AI generates a sensible title and description from the raw description

 This issue was created with help from Hikari~ 🌸

Reviewed-on: #18
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-09 14:09:08 -07:00
hikari 1ebe240475 feat: add slash commands and context menu command (#16)
Node.js CI / CI (push) Successful in 28s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 2m41s
## 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>
2026-03-03 15:05:09 -08:00