Commit Graph

72 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 343d712e33 fix: prevent duplicate DM notifications for multi-keyword matches
Coordinates respondToMention and notifyNameMention so only one DM is
sent per message, regardless of how many keyword patterns are triggered.
2026-03-12 22:16:05 -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 8f2cd94c82 fix: strip markdown fences and extract JSON from AI response
Node.js CI / CI (push) Successful in 29s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 56s
2026-03-09 14:14:23 -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 e51a56c79f chore: remove news feed feature (#17)
Node.js CI / CI (push) Successful in 28s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 51s
## Summary

- Removes the hourly RSS news posting scheduler and `postNews` module
- Removes the `rss.ts` interface and `lastRssItems` tracking from the `Amari` interface and bot initialisation
- Removes the `news` channel ID from `ids.ts`
- Removes the `rss-parser` dependency

 This PR was created with help from Hikari~ 🌸

Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com>
Reviewed-on: #17
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-09 13:34:18 -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
hikari 5a355e4775 chore: replace .npmrc with pnpm-workspace.yaml
Node.js CI / CI (push) Successful in 37s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m16s
2026-03-02 16:28:17 -08:00
hikari 5e149a29e4 feat: mentorship improvements and name mention notifications (#14)
Node.js CI / CI (push) Successful in 36s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m27s
## Summary

- **Name/title mention notifications**: Amari now notifies Naomi when a message contains her name, common nicknames (`nomi`, `nao`, `nae`, `naonao`), or honorifics (`goddess`, `queen`, `mistress`, `your/her majesty`, `your/her highness`). Uses the same cooldown logic as mention forwarding.
- **Simplified mentee onboarding**: Replaced the lengthy welcome message with a concise prompt asking the new mentee to ping Naomi with their GitHub username and name.
- **Removed offboard notification**: `logMenteeLeave` now only logs a metric silently — no more "user must be offboarded" messages in the channel.
- **Deduplicated welcome messages**: Welcomed mentee IDs are persisted to `data/welcomed.txt` so the onboarding message is only ever sent once, even if the role is re-assigned.

## Test plan

- [ ] Assign mentorship role to a user and confirm the new onboarding message appears
- [ ] Re-assign the role to the same user and confirm no duplicate message is sent
- [ ] Remove a mentee from the server and confirm no offboard message is posted
- [ ] Send a message containing a matched name/honorific and confirm Naomi receives a DM forwarding it

 This PR was created with help from Hikari~ 🌸

Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com>
Reviewed-on: #14
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-02 16:03:14 -08:00
minori 5c39d3d9ce Merge pull request 'deps: update octokit to 5.0.5' (#6) from dependencies/update-octokit into main
Node.js CI / CI (push) Successful in 37s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m47s
2026-03-01 07:02:28 -08:00
minori 1281f3217a Merge pull request 'deps: update fastify to 5.7.1' (#5) from dependencies/update-fastify into main
Node.js CI / CI (push) Successful in 41s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m8s
2026-02-27 07:02:43 -08:00
minori 3e5dfa2799 Merge pull request 'deps: update typescript to 5.9.3' (#9) from dependencies/update-typescript into main
Node.js CI / CI (push) Successful in 40s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m27s
2026-02-26 07:03:02 -08:00
minori dc0fdcc659 Merge pull request 'deps: update @retroachievements/api to 2.9.1' (#3) from dependencies/update--retroachievements-api into main
Node.js CI / CI (push) Successful in 36s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m18s
2026-02-23 20:46:21 -08:00
minori 2198126d1b deps: update @retroachievements/api to 2.10.0
Node.js CI / CI (pull_request) Successful in 44s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m16s
2026-02-14 07:05:09 -08:00
minori 40288728e8 deps: update fastify to 5.7.4
Node.js CI / CI (pull_request) Successful in 33s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m14s
2026-02-13 07:07:36 -08:00
minori 71bcd8e4ff deps: update fastify to 5.7.2
Node.js CI / CI (pull_request) Successful in 44s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 2m12s
2026-02-05 07:11:59 -08:00
minori cbe95550ea deps: update typescript to 5.9.3
Node.js CI / CI (pull_request) Successful in 32s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m28s
2026-02-04 08:36:59 -08:00
minori b2e49b8956 deps: update octokit to 5.0.5
Node.js CI / CI (pull_request) Successful in 36s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m31s
2026-02-04 08:36:37 -08:00
minori 49ab177669 deps: update fastify to 5.7.1
Node.js CI / CI (pull_request) Successful in 38s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m29s
2026-02-04 08:36:30 -08:00
minori a777989980 deps: update @retroachievements/api to 2.9.1
Node.js CI / CI (pull_request) Successful in 34s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m33s
2026-02-04 08:36:13 -08:00
hikari a9c7ebf74d docs: update feedback section to use support forum
Node.js CI / CI (push) Successful in 26s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m30s
2026-01-26 12:37:32 -08:00
naomi 0b19d91444 feat: add alpha and omega reminder
Node.js CI / CI (push) Successful in 27s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m29s
2026-01-08 17:02:02 -08:00
naomi 74bccd903d chore: no more ts reminders
Node.js CI / CI (push) Successful in 28s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 51s
2026-01-08 08:48:05 -08:00
naomi 402acffb5c fix: properly handle duplicated channels
Node.js CI / CI (push) Successful in 27s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m31s
2025-12-30 11:59:57 -08:00
naomi a8a58faf3c feat: automated upload of .gitea/workflows/ci.yml
Node.js CI / CI (push) Successful in 27s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 57s
2025-12-22 19:43:12 +01:00
naomi 579dfe96f5 feat: automated upload of .gitea/workflows/ci.yml
Node.js CI / CI (push) Has been cancelled
Security Scan and Upload / Security & DefectDojo Upload (push) Has been cancelled
2025-12-22 19:36:42 +01:00
naomi 47dd385f05 feat: automated upload of .gitea/workflows/ci.yml
Security Scan and Upload / Security & DefectDojo Upload (push) Has been cancelled
Node.js CI / Lint and Test (push) Failing after 3s
2025-12-22 19:26:24 +01:00
naomi 2851693a70 feat: automated upload of .npmrc
Node.js CI / Lint and Test (push) Has been cancelled
Security Scan and Upload / Security & DefectDojo Upload (push) Has been cancelled
2025-12-22 19:17:12 +01:00
naomi 6ee8189edd feat: automated upload of .gitea/workflows/security.yml
Node.js CI / Lint and Test (push) Successful in 27s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m1s
2025-12-18 03:09:33 +01:00
naomi aaa710eba4 fix: log the curl results, pipx for semgrep (#1)
Node.js CI / Lint and Test (push) Successful in 26s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 50s
### Explanation

_No response_

### Issue

_No response_

### Attestations

- [ ] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/)
- [ ] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/).
- [ ] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/).

### Dependencies

- [ ] I have pinned the dependencies to a specific patch version.

### Style

- [ ] I have run the linter and resolved any errors.
- [ ] My pull request uses an appropriate title, matching the conventional commit standards.
- [ ] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request.

### Tests

- [ ] My contribution adds new code, and I have added tests to cover it.
- [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes.
- [ ] All new and existing tests pass locally with my changes.
- [ ] Code coverage remains at or above the configured threshold.

### Documentation

_No response_

### Versioning

_No response_

Reviewed-on: #1
Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com>
Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
2025-12-18 02:28:21 +01:00
naomi e6112f57cb feat: add tags for new forum channels
Security Scan and Upload / Security & DefectDojo Upload (push) Failing after 24s
Node.js CI / Lint and Test (push) Successful in 26s
2025-12-17 17:18:17 -08:00
naomi 72b7571b92 fix: fcc sprint notifications 2025-12-17 16:27:27 -08:00
naomi 6e35d49a34 chore: add action so I can test it from a branch
Security Scan and Upload / Security & DefectDojo Upload (push) Failing after 23s
Node.js CI / Lint and Test (push) Successful in 26s
2025-12-17 23:09:06 +01:00
naomi 9c53c22130 feat: add reminders for fcc sprints
Node.js CI / Lint and Test (push) Successful in 25s
2025-12-16 18:04:07 -08:00
naomi 9d9d0809d7 feat: update form logic for new platform
Node.js CI / Lint and Test (push) Successful in 26s
2025-12-10 14:52:36 -08:00
naomi 53274ec38c feat: auto-tag the new community fora
Node.js CI / Lint and Test (push) Successful in 1m29s
2025-12-09 12:24:55 -08:00
naomi 9ada4b9cbe feat: prep for mentorship to be self-assignable
Node.js CI / Lint and Test (push) Successful in 28s
2025-12-03 15:27:41 -08:00
naomi 34d71c73aa feat: remove bullying because science did her resume
Node.js CI / Lint and Test (push) Successful in 50s
And I am very proud of her!
2025-11-12 10:05:50 -08:00
naomi 532461202a feat: bully science for failing to complete her resume
Node.js CI / Lint and Test (push) Successful in 50s
2025-11-11 09:32:54 -08:00
naomi 50e46368ed feat: prepare to resume mentorship programme
Node.js CI / Lint and Test (push) Successful in 52s
2025-10-30 17:50:03 -07:00
naomi 1d9e922991 release: v1.0.0
Node.js CI / Lint and Test (push) Successful in 48s
v1.0.0
2025-10-29 17:00:39 -07:00
naomi a132018b9e chore: disable sprint and mentorship reminders
Node.js CI / Lint and Test (push) Successful in 53s
I am OOO so we do not need these.
2025-10-17 16:29:28 -07:00
naomi 99d8353f79 chore: bump analytics
Node.js CI / Lint and Test (push) Successful in 54s
2025-10-08 15:08:13 -07:00
naomi 5cadb9bbee feat: analytics
Node.js CI / Lint and Test (push) Successful in 49s
2025-10-08 08:41:37 -07:00
naomi 36ad30e4a2 feat: let amari handle my progress reminders
Node.js CI / Lint and Test (push) Successful in 50s
2025-10-06 16:53:41 -07:00
naomi 593855d967 feat: filter out RSS posts that violate our Code of Conduct.
Node.js CI / Lint and Test (push) Successful in 49s
2025-10-04 13:48:01 -07:00
naomi d6753ca36f feat: add new form ids for webhooks
Node.js CI / Lint and Test (push) Successful in 54s
2025-09-29 13:02:35 -07:00
naomi 76ec0f5566 chore: no more responding
Node.js CI / Lint and Test (push) Successful in 46s
2025-09-15 12:58:50 -07:00
naomi 996cde5e2f feat: notify when naomi earns achievements
Node.js CI / Lint and Test (push) Successful in 48s
2025-09-10 13:21:08 -07:00
naomi bfaf757d3e feat: track if mentees join or leave
Node.js CI / Lint and Test (push) Successful in 45s
2025-09-02 19:34:24 -07:00