Skip to content

Commit e385af3

Browse files
committed
fix: resolve merge conflict - keep next-themes dependency
2 parents b4e8039 + fc31df0 commit e385af3

98 files changed

Lines changed: 13943 additions & 16065 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/claude-review.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
11
name: Claude Code Review
22

33
on:
4-
pull_request:
5-
types: [synchronize, review_requested]
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
68

79
concurrency:
8-
group: claude-review-${{ github.event.pull_request.number }}
10+
group: claude-review-${{ github.event.issue.number || github.event.pull_request.number }}
911
cancel-in-progress: true
1012

1113
jobs:
1214
claude-review:
13-
if: >-
14-
(github.event.action == 'review_requested' && github.event.requested_reviewer.login == 'claude[bot]') ||
15-
(github.event.action == 'synchronize' && contains(toJSON(github.event.pull_request.requested_reviewers), 'claude[bot]'))
15+
# Only run when the comment includes @claude
16+
if: >
17+
!endsWith(github.actor, '[bot]') &&
18+
(
19+
(github.event_name == 'issue_comment' &&
20+
github.event.issue.pull_request &&
21+
contains(github.event.comment.body, '@claude')) ||
22+
(github.event_name == 'pull_request_review_comment' &&
23+
contains(github.event.comment.body, '@claude'))
24+
)
25+
1626
runs-on: ubuntu-latest
1727
permissions:
1828
contents: write
1929
pull-requests: write
30+
issues: write
2031
id-token: write
2132

2233
steps:
2334
- name: Checkout
24-
uses: actions/checkout@6.0.2
35+
uses: actions/checkout@v4
2536
with:
2637
fetch-depth: 1
2738

@@ -36,7 +47,7 @@ jobs:
3647
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
3748
plugins: 'code-review@claude-code-plugins'
3849
prompt: |
39-
Run /code-review --comment on PR #${{ github.event.pull_request.number }} in ${{ github.repository }}.
50+
Run /code-review --comment on PR #${{ github.event.issue.number || github.event.pull_request.number }} in ${{ github.repository }}.
4051
4152
In addition to CLAUDE.md and AGENTS.md (which the plugin reads automatically),
4253
enforce these project-specific rules that the plugin cannot infer:
@@ -64,5 +75,5 @@ jobs:
6475
• ONLY report issues — zero praise, positives, or compliments
6576
• If zero issues found, do NOT post a comment — just approve silently
6677
• After the review comment, submit a verdict:
67-
- Issues found → `gh pr review ${{ github.event.pull_request.number }} --request-changes -b "See review comment for details."`
68-
- Zero issues → `gh pr review ${{ github.event.pull_request.number }} --approve`
78+
- Issues found → `gh pr review ${{ github.event.issue.number || github.event.pull_request.number }} --request-changes -b "See review comment for details."`
79+
- Zero issues → `gh pr review ${{ github.event.issue.number || github.event.pull_request.number }} --approve`

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ node_modules/
44
/logs/
55
coverage/
66
.next/
7+
package-lock.json
78

89
# Auto Claude data directory and files
910
.auto-claude/

.gitleaks.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,7 @@ paths = [
4343
'''\.gitleaks\.toml$''',
4444
'''pnpm-lock\.yaml$''',
4545
]
46+
# Historical false positive: dummy token in deleted verify-sensitive-data-redaction.js
47+
commits = [
48+
"0286a77d7695030adffa322c55b4f6c20f420dd4",
49+
]

.serena/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/cache

.serena/project.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# the name by which the project can be referenced within Serena
2+
project_name: "volvox-bot"
3+
4+
5+
# list of languages for which language servers are started; choose from:
6+
# al bash clojure cpp csharp
7+
# csharp_omnisharp dart elixir elm erlang
8+
# fortran fsharp go groovy haskell
9+
# java julia kotlin lua markdown
10+
# matlab nix pascal perl php
11+
# php_phpactor powershell python python_jedi r
12+
# rego ruby ruby_solargraph rust scala
13+
# swift terraform toml typescript typescript_vts
14+
# vue yaml zig
15+
# (This list may be outdated. For the current list, see values of Language enum here:
16+
# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
17+
# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
18+
# Note:
19+
# - For C, use cpp
20+
# - For JavaScript, use typescript
21+
# - For Free Pascal/Lazarus, use pascal
22+
# Special requirements:
23+
# Some languages require additional setup/installations.
24+
# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers
25+
# When using multiple languages, the first language server that supports a given file will be used for that file.
26+
# The first language is the default language and the respective language server will be used as a fallback.
27+
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
28+
languages:
29+
- typescript
30+
31+
# the encoding used by text files in the project
32+
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
33+
encoding: "utf-8"
34+
35+
# whether to use project's .gitignore files to ignore files
36+
ignore_all_files_in_gitignore: true
37+
38+
# list of additional paths to ignore in this project.
39+
# Same syntax as gitignore, so you can use * and **.
40+
# Note: global ignored_paths from serena_config.yml are also applied additively.
41+
ignored_paths: []
42+
43+
# whether the project is in read-only mode
44+
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
45+
# Added on 2025-04-18
46+
read_only: false
47+
48+
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
49+
# Below is the complete list of tools for convenience.
50+
# To make sure you have the latest list of tools, and to view their descriptions,
51+
# execute `uv run scripts/print_tool_overview.py`.
52+
#
53+
# * `activate_project`: Activates a project by name.
54+
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
55+
# * `create_text_file`: Creates/overwrites a file in the project directory.
56+
# * `delete_lines`: Deletes a range of lines within a file.
57+
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
58+
# * `execute_shell_command`: Executes a shell command.
59+
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
60+
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
61+
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
62+
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
63+
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
64+
# * `initial_instructions`: Gets the initial instructions for the current project.
65+
# Should only be used in settings where the system prompt cannot be set,
66+
# e.g. in clients you have no control over, like Claude Desktop.
67+
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
68+
# * `insert_at_line`: Inserts content at a given line in a file.
69+
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
70+
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
71+
# * `list_memories`: Lists memories in Serena's project-specific memory store.
72+
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
73+
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
74+
# * `read_file`: Reads a file within the project directory.
75+
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
76+
# * `remove_project`: Removes a project from the Serena configuration.
77+
# * `replace_lines`: Replaces a range of lines within a file with new content.
78+
# * `replace_symbol_body`: Replaces the full definition of a symbol.
79+
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
80+
# * `search_for_pattern`: Performs a search for a pattern in the project.
81+
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
82+
# * `switch_modes`: Activates modes by providing a list of their names
83+
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
84+
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
85+
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
86+
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
87+
excluded_tools: []
88+
89+
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default)
90+
included_optional_tools: []
91+
92+
# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
93+
# This cannot be combined with non-empty excluded_tools or included_optional_tools.
94+
fixed_tools: []
95+
96+
# list of mode names to that are always to be included in the set of active modes
97+
# The full set of modes to be activated is base_modes + default_modes.
98+
# If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply.
99+
# Otherwise, this setting overrides the global configuration.
100+
# Set this to [] to disable base modes for this project.
101+
# Set this to a list of mode names to always include the respective modes for this project.
102+
base_modes:
103+
104+
# list of mode names that are to be activated by default.
105+
# The full set of modes to be activated is base_modes + default_modes.
106+
# If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply.
107+
# Otherwise, this overrides the setting from the global configuration (serena_config.yml).
108+
# This setting can, in turn, be overridden by CLI parameters (--mode).
109+
default_modes:
110+
111+
# initial prompt for the project. It will always be given to the LLM upon activating the project
112+
# (contrary to the memories, which are loaded on demand).
113+
initial_prompt: ""
114+
115+
# time budget (seconds) per tool call for the retrieval of additional symbol information
116+
# such as docstrings or parameter information.
117+
# This overrides the corresponding setting in the global configuration; see the documentation there.
118+
# If null or missing, use the setting from the global configuration.
119+
symbol_info_budget:
120+
121+
# The language backend to use for this project.
122+
# If not set, the global setting from serena_config.yml is used.
123+
# Valid values: LSP, JetBrains
124+
# Note: the backend is fixed at startup. If a project with a different backend
125+
# is activated post-init, an error will be returned.
126+
language_backend:

AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@
3535
| `src/modules/events.js` | Event handler registration (wires modules to Discord events) |
3636
| `src/api/server.js` | Express API server setup (createApp, startServer, stopServer) |
3737
| `src/api/index.js` | API route mounting |
38+
| `src/api/middleware/auditLog.js` | Audit logging middleware for authenticated mutating API requests |
3839
| `src/api/routes/guilds.js` | Guild REST API endpoints (info, channels, roles, config, stats, members, moderation, analytics, actions) |
40+
| `src/api/routes/auditLog.js` | Audit log retrieval endpoint (filters + pagination) |
3941
| `web/src/components/dashboard/analytics-dashboard.tsx` | Analytics dashboard React component — charts, KPIs, date range controls |
4042
| `web/src/types/analytics.ts` | Shared analytics TypeScript contracts used by dashboard UI and analytics API responses |
4143
| `web/src/app/api/guilds/[guildId]/analytics/route.ts` | Next.js API route — proxies analytics requests to bot API with param allowlisting |
44+
| `web/src/app/dashboard/audit-log/page.tsx` | Audit log dashboard page (filterable audit timeline + detail rows) |
45+
| `web/src/app/api/guilds/[guildId]/audit-log/route.ts` | Next.js API route — proxies guild audit log queries to bot API |
4246
| `web/src/components/dashboard/channel-selector.tsx` | Channel picker component — single or multi-select Discord channel picker with Zustand store integration |
4347
| `web/src/components/dashboard/role-selector.tsx` | Role picker component — single or multi-select Discord role picker with color dots |
4448
| `web/src/components/dashboard/array-editor.tsx` | Tag-input component for editing string arrays (Enter to add, Backspace to remove) |
@@ -61,9 +65,11 @@
6165
| `src/utils/duration.js` | Duration parsing — "1h", "7d" ↔ ms with human-readable formatting |
6266
| `src/commands/announce.js` | Scheduled message command — `/announce` with create/list/delete subcommands (moderator-only); stores schedules to `scheduled_messages` table |
6367
| `src/commands/afk.js` | AFK command — `/afk set [reason]` and `/afk clear`; exports `buildPingSummary` used by the handler module |
68+
| `src/commands/reload.js` | Reload command — `/reload` reloads config, commands, triage, and opt-outs (bot owner only) |
6469
| `src/modules/afkHandler.js` | AFK message handler — detects AFK mentions, sends inline notices (rate-limited), auto-clears AFK on return, DMs ping summary |
6570
| `src/modules/scheduler.js` | Scheduled message poller — cron expression parser (`parseCron`, `getNextCronRun`), due-message dispatcher via `safeSend`, 60s interval started/stopped via `startScheduler`/`stopScheduler` |
6671
| `migrations/002_scheduled-messages.cjs` | Migration — creates `scheduled_messages` table (id, guild_id, channel_id, content, cron_expression, next_run, is_one_time, created_by) |
72+
| `migrations/015_audit_logs.cjs` | Migration — creates `audit_logs` table + indexes for guild timeline and retention cleanup |
6773
| `config.json` | Default configuration (seeded to DB on first run) |
6874
| `.env.example` | Environment variable template |
6975

@@ -141,6 +147,7 @@ Duration-based commands (timeout, tempban, slowmode) use `parseDuration()` from
141147
| `mod_scheduled_actions` | Scheduled operations (tempban expiry). Polled every 60s by the tempban scheduler |
142148
| `afk_status` | Active AFK records — one row per (guild_id, user_id); upserted on `/afk set`, deleted on return or `/afk clear` |
143149
| `afk_pings` | Pings logged while a user is AFK — accumulated until the user returns, then DM-summarised and deleted |
150+
| `audit_logs` | Admin audit trail for mutating API actions (guild/user/action/target + JSON details + IP + created_at) |
144151

145152
## How to Add a Module
146153

CLAUDE.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
# CLAUDE.md
22

33
See [AGENTS.md](./AGENTS.md) for full project context, architecture, and coding guidelines.
4-
5-
## Post-Change Workflow
6-
7-
After completing code changes, rebuild the Docker container (`docker compose build`) but do **not** start it. The user manages container lifecycle manually.

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ RUN corepack enable
66
WORKDIR /app
77

88
COPY package.json pnpm-lock.yaml ./
9-
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
9+
RUN pnpm config set store-dir /tmp/pnpm-store && \
10+
pnpm install --frozen-lockfile --prod --ignore-scripts && \
11+
rm -rf /tmp/pnpm-store
1012

1113
# --- Production ---
1214
FROM node:22-alpine AS runner

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,13 @@ All configuration lives in `config.json` and can be updated at runtime via the `
203203

204204
**Escalation thresholds** are objects with: `warns` (count), `withinDays` (window), `action` ("timeout" or "ban"), `duration` (for timeout, e.g. "1h").
205205

206+
### Audit Log (`auditLog`)
207+
208+
| Key | Type | Description |
209+
|-----|------|-------------|
210+
| `enabled` | boolean | Enable/disable audit logging for mutating authenticated API requests |
211+
| `retentionDays` | number | Data retention window in days for scheduled cleanup (default: 90, `<= 0` disables purge) |
212+
206213
### Starboard (`starboard`)
207214

208215
| Key | Type | Description |

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.4.0/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.4.4/schema.json",
33
"files": {
44
"includes": [
55
"src/**/*.js",

0 commit comments

Comments
 (0)