14 Commits

Author SHA1 Message Date
Space-Banane c6efac0159 fix: allow optional blog image URLs
CI / Build & Test (push) Successful in 18s
2026-07-02 12:22:55 +02:00
Space-Banane bc42508849 feat: add polls, deep-dive, ticket messages, and mod API key tools
CI / Build & Test (push) Successful in 17s
- New polls.ts: 13 tools covering full poll lifecycle (create/list/get/
  update/delete/vote/like/dislike/review) and poll comments
- news.ts: get_deep_dive and regenerate_deep_dive for AI analysis
- tickets.ts: create_ticket_message with internal-note and attachment support
- moderation.ts: list/update/revoke mod-managed user API keys
- user.ts: list_my_polls and list_my_poll_votes
- Bump server version to 1.2.0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 22:31:48 +02:00
Space-Banane 8083b0b8a8 fix: remove stale legal:write from api-keys scope list
CI / Build & Test (push) Successful in 17s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 23:53:58 +02:00
Space-Banane e6f6e1c19f docs: update CLAUDE.md files for static legal model
Remove DB-backed legal document system references across all repos.
Update root CLAUDE.md: replace "Legal System" section with static
document workflow; add step to remind Paul about material-change emails.
Update api/: remove LegalDocument model, Legal route table, legal:write
from permission matrix, whoami grace-period bullet.
Update frontend/: update /terms /privacy page descriptions, remove
legal-service.ts, remove legal types, replace banner/grace-period
behaviors with static model.
Update queue-worker/: remove legal-update.ts worker row and queue ref.
Update mcp-server/: remove Legal tool category, tool count 89 → 85.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 23:52:28 +02:00
Space-Banane 163e145b9e feat: remove 4 legal document MCP tools
Delete tools/legal.ts (get_terms_of_service, get_privacy_policy,
list_legal_documents, accept_legal_documents) and remove the
registerLegalTools call from index.ts. Tool count: 89 → 85.
Legal documents are now static; no API endpoints back them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 23:41:59 +02:00
Space-Banane a5b90a2c05 feat: add discussion tools for managing discussion channels and messages
CI / Build & Test (push) Successful in 15s
2026-06-20 19:12:27 +02:00
Space-Banane fa43346e51 feat: update version to 1.1.0 and add new tools for blog, API keys, and sessions
CI / Build & Test (push) Successful in 36s
2026-06-18 16:49:16 +02:00
Space-Banane 4b1ab53543 ci: remove pnpm cache from setup-node
CI / Build & Test (push) Successful in 12s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 22:51:48 +02:00
Space-Banane 03e3de7a67 fix: add pnpm-workspace.yaml and lockfile for CI cache
CI / Build & Test (push) Has been cancelled
pnpm-workspace.yaml anchors the package root so pnpm generates
pnpm-lock.yaml here; required by setup-node's pnpm cache action.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 22:49:31 +02:00
Space-Banane 1b6f8b5ac4 fix: add packageManager field for pnpm/action-setup@v6
CI / Build & Test (push) Failing after 8s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 22:47:31 +02:00
Space-Banane 75ecb6232c ci: add Gitea Actions workflow and unit tests
CI / Build & Test (push) Failing after 5s
- Add .gitea/workflows/ci.yml: runs build + tests on push/PR to main
- Add vitest as dev dependency
- Add src/utils.test.ts: 4 tests covering handleTool success, Error throw,
  non-Error throw, and arg passthrough
- Add src/client.test.ts: 12 tests covering URL building, Authorization header,
  query string params, Content-Type presence/absence, error handling with
  message extraction and statusText fallback, and HTTP method correctness

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 22:09:54 +02:00
Space-Banane a1d47d4819 fix: apply all A-J improvements across MCP server
- A: fix get_user_profile URL (/api/user/profile → /api/users/:username)
- B: fix unban_user to use DELETE /api/mod/users/:id/ban (was POST .../unban)
- C: add check_duplicates tool (GET /api/news/:id/check-duplicates)
- D: add shadowban_user tool (PATCH /api/mod/users/:id/shadowban)
- E: add create_mod_user tool (POST /api/mod/users)
- F: extract handleTool helper in utils.ts; all 37 tools now use it for
     consistent isError:true error responses visible to the AI model
- G: only send Content-Type header when request has a body
- H: support BETTERNEWS_BASE_URL env var for local dev overrides
- I: fix get_news_item_stats description (accessible by own author, not Mod/Admin only)
- J: add .describe() to page/limit/status params in list_all_tickets and list_my_tickets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 22:07:21 +02:00
Space-Banane 81ac5973e6 docs: update README to include installation instructions for AI agent 2026-06-17 21:43:56 +02:00
Space-Banane 6c0a079808 feat: initialize BetterNews MCP server with core functionality
- Add .gitignore to exclude node_modules, dist, and .env files
- Create README.md with setup instructions and API key information
- Add package.json with dependencies, scripts, and project metadata
- Implement BetterNewsClient for API interactions
- Set up index.ts to initialize MCP server and register tools
- Create tools for managing news, comments, sources, users, moderation, and tickets
- Add TypeScript configuration for project compilation
2026-06-17 21:30:52 +02:00