@prmichaelsen/reddit-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +23 -0
- package/.env.example +13 -0
- package/AGENT.md +1772 -0
- package/README.md +54 -0
- package/agent/commands/acp.clarification-capture.md +386 -0
- package/agent/commands/acp.clarification-create.md +432 -0
- package/agent/commands/acp.clarifications-research.md +326 -0
- package/agent/commands/acp.command-create.md +432 -0
- package/agent/commands/acp.design-create.md +286 -0
- package/agent/commands/acp.design-reference.md +355 -0
- package/agent/commands/acp.index.md +423 -0
- package/agent/commands/acp.init.md +546 -0
- package/agent/commands/acp.package-create.md +895 -0
- package/agent/commands/acp.package-info.md +212 -0
- package/agent/commands/acp.package-install.md +539 -0
- package/agent/commands/acp.package-list.md +280 -0
- package/agent/commands/acp.package-publish.md +541 -0
- package/agent/commands/acp.package-remove.md +293 -0
- package/agent/commands/acp.package-search.md +307 -0
- package/agent/commands/acp.package-update.md +361 -0
- package/agent/commands/acp.package-validate.md +540 -0
- package/agent/commands/acp.pattern-create.md +386 -0
- package/agent/commands/acp.plan.md +577 -0
- package/agent/commands/acp.proceed.md +882 -0
- package/agent/commands/acp.project-create.md +675 -0
- package/agent/commands/acp.project-info.md +312 -0
- package/agent/commands/acp.project-list.md +226 -0
- package/agent/commands/acp.project-remove.md +379 -0
- package/agent/commands/acp.project-set.md +227 -0
- package/agent/commands/acp.project-update.md +307 -0
- package/agent/commands/acp.projects-restore.md +228 -0
- package/agent/commands/acp.projects-sync.md +347 -0
- package/agent/commands/acp.report.md +407 -0
- package/agent/commands/acp.resume.md +239 -0
- package/agent/commands/acp.sessions.md +301 -0
- package/agent/commands/acp.status.md +293 -0
- package/agent/commands/acp.sync.md +364 -0
- package/agent/commands/acp.task-create.md +500 -0
- package/agent/commands/acp.update.md +302 -0
- package/agent/commands/acp.validate.md +466 -0
- package/agent/commands/acp.version-check-for-updates.md +276 -0
- package/agent/commands/acp.version-check.md +191 -0
- package/agent/commands/acp.version-update.md +289 -0
- package/agent/commands/command.template.md +339 -0
- package/agent/commands/git.commit.md +526 -0
- package/agent/commands/git.init.md +514 -0
- package/agent/design/.gitkeep +0 -0
- package/agent/design/design.template.md +154 -0
- package/agent/design/requirements.md +332 -0
- package/agent/design/requirements.template.md +387 -0
- package/agent/index/.gitkeep +0 -0
- package/agent/index/local.main.template.yaml +37 -0
- package/agent/manifest.template.yaml +13 -0
- package/agent/manifest.yaml +61 -0
- package/agent/milestones/.gitkeep +0 -0
- package/agent/milestones/milestone-1-foundation-listings-mvp.md +140 -0
- package/agent/milestones/milestone-1-{title}.template.md +206 -0
- package/agent/milestones/milestone-2-content-interaction.md +56 -0
- package/agent/milestones/milestone-3-users-and-messaging.md +54 -0
- package/agent/milestones/milestone-4-subreddits-and-flair.md +56 -0
- package/agent/milestones/milestone-5-moderation.md +53 -0
- package/agent/milestones/milestone-6-advanced-features-and-polish.md +56 -0
- package/agent/package.template.yaml +86 -0
- package/agent/patterns/.gitkeep +0 -0
- package/agent/patterns/bootstrap.template.md +1237 -0
- package/agent/patterns/pattern.template.md +382 -0
- package/agent/progress.template.yaml +161 -0
- package/agent/progress.yaml +223 -0
- package/agent/schemas/package.schema.yaml +276 -0
- package/agent/scripts/acp.common.sh +1781 -0
- package/agent/scripts/acp.yaml-parser.sh +985 -0
- package/agent/tasks/.gitkeep +0 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-1-project-scaffolding.md +75 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-2-reddit-oauth.md +71 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-3-reddit-api-client.md +71 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-4-listing-tools.md +65 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-5-search-tools.md +43 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-6-testing-verification.md +49 -0
- package/agent/tasks/milestone-2-content-interaction/task-7-post-tools.md +56 -0
- package/agent/tasks/milestone-2-content-interaction/task-8-comment-tools.md +49 -0
- package/agent/tasks/milestone-2-content-interaction/task-9-vote-save-report-tools.md +50 -0
- package/agent/tasks/milestone-3-users-and-messaging/task-10-account-tools.md +44 -0
- package/agent/tasks/milestone-3-users-and-messaging/task-11-user-profile-tools.md +50 -0
- package/agent/tasks/milestone-3-users-and-messaging/task-12-private-message-tools.md +50 -0
- package/agent/tasks/milestone-4-subreddits-and-flair/task-13-subreddit-tools.md +47 -0
- package/agent/tasks/milestone-4-subreddits-and-flair/task-14-flair-tools.md +46 -0
- package/agent/tasks/milestone-4-subreddits-and-flair/task-15-http-transport.md +53 -0
- package/agent/tasks/milestone-5-moderation/task-16-mod-action-tools.md +48 -0
- package/agent/tasks/milestone-5-moderation/task-17-mod-listing-tools.md +47 -0
- package/agent/tasks/milestone-5-moderation/task-18-mod-management-tools.md +42 -0
- package/agent/tasks/milestone-6-advanced-features-and-polish/task-19-multireddit-tools.md +49 -0
- package/agent/tasks/milestone-6-advanced-features-and-polish/task-20-wiki-tools.md +47 -0
- package/agent/tasks/milestone-6-advanced-features-and-polish/task-21-documentation-polish.md +65 -0
- package/agent/tasks/task-1-{title}.template.md +244 -0
- package/dist/auth/oauth.d.ts +15 -0
- package/dist/auth/oauth.d.ts.map +1 -0
- package/dist/client/reddit.d.ts +28 -0
- package/dist/client/reddit.d.ts.map +1 -0
- package/dist/factory.d.ts +2 -0
- package/dist/factory.d.ts.map +1 -0
- package/dist/factory.js +30394 -0
- package/dist/factory.js.map +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31955 -0
- package/dist/index.js.map +7 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +30401 -0
- package/dist/server.js.map +7 -0
- package/dist/tools/listings.d.ts +4 -0
- package/dist/tools/listings.d.ts.map +1 -0
- package/dist/tools/search.d.ts +4 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/transport/http.d.ts +7 -0
- package/dist/transport/http.d.ts.map +1 -0
- package/dist/types/index.d.ts +78 -0
- package/dist/types/index.d.ts.map +1 -0
- package/esbuild.build.js +21 -0
- package/jest.config.js +18 -0
- package/package.json +46 -0
- package/src/auth/oauth.ts +200 -0
- package/src/client/reddit.ts +245 -0
- package/src/factory.ts +5 -0
- package/src/index.ts +31 -0
- package/src/server.ts +36 -0
- package/src/tools/listings.ts +202 -0
- package/src/tools/search.ts +85 -0
- package/src/transport/http.ts +49 -0
- package/src/types/index.ts +83 -0
- package/tests/fixtures/reddit-responses.ts +132 -0
- package/tests/helpers/mock-client.ts +36 -0
- package/tests/unit/auth.test.ts +89 -0
- package/tests/unit/client.test.ts +218 -0
- package/tests/unit/listings.test.ts +113 -0
- package/tests/unit/search.test.ts +59 -0
- package/tests/unit/server.test.ts +14 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Task 13: Subreddit Tools
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M4 - Subreddits & Flair](../../milestones/milestone-4-subreddits-and-flair.md)
|
|
4
|
+
**Design Reference**: [Requirements](../../design/requirements.md)
|
|
5
|
+
**Estimated Time**: 2.5 hours
|
|
6
|
+
**Dependencies**: Task 6
|
|
7
|
+
**Status**: Not Started
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
Implement tools for subreddit discovery, info, rules, subscription management, and search.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
### 1. Create src/tools/subreddits.ts
|
|
20
|
+
|
|
21
|
+
Register 8 tools:
|
|
22
|
+
|
|
23
|
+
| Tool | Endpoint | Parameters | Scope |
|
|
24
|
+
|------|----------|------------|-------|
|
|
25
|
+
| `reddit_subreddit_about` | GET /r/{subreddit}/about | subreddit | read |
|
|
26
|
+
| `reddit_subreddit_rules` | GET /r/{subreddit}/about/rules | subreddit | read |
|
|
27
|
+
| `reddit_subscribe` | POST /api/subscribe | sr_name, action=sub | subscribe |
|
|
28
|
+
| `reddit_unsubscribe` | POST /api/subscribe | sr_name, action=unsub | subscribe |
|
|
29
|
+
| `reddit_subreddits_mine` | GET /subreddits/mine/subscriber | limit, after, before | mysubreddits |
|
|
30
|
+
| `reddit_subreddits_popular` | GET /subreddits/popular | limit, after, before | read |
|
|
31
|
+
| `reddit_subreddits_new` | GET /subreddits/new | limit, after, before | read |
|
|
32
|
+
| `reddit_subreddits_search` | GET /subreddits/search | q, limit, after, before | read |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Verification
|
|
37
|
+
|
|
38
|
+
- [ ] `reddit_subreddit_about` returns subreddit metadata
|
|
39
|
+
- [ ] `reddit_subreddit_rules` returns rules list
|
|
40
|
+
- [ ] Subscribe/unsubscribe toggle subscription
|
|
41
|
+
- [ ] `reddit_subreddits_mine` lists user's subscriptions
|
|
42
|
+
- [ ] `reddit_subreddits_search` finds subreddits by query
|
|
43
|
+
- [ ] Unit tests for each tool
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
**Next Task**: [Task 14: Flair Tools](task-14-flair-tools.md)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Task 14: Flair Tools
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M4 - Subreddits & Flair](../../milestones/milestone-4-subreddits-and-flair.md)
|
|
4
|
+
**Design Reference**: [Requirements](../../design/requirements.md)
|
|
5
|
+
**Estimated Time**: 1.5 hours
|
|
6
|
+
**Dependencies**: Task 13
|
|
7
|
+
**Status**: Not Started
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
Implement tools for reading and setting flair on posts and users.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
### 1. Create src/tools/flair.ts
|
|
20
|
+
|
|
21
|
+
Register 3 tools:
|
|
22
|
+
|
|
23
|
+
| Tool | Endpoint | Parameters | Scope |
|
|
24
|
+
|------|----------|------------|-------|
|
|
25
|
+
| `reddit_link_flair` | GET /r/{subreddit}/api/link_flair_v2 | subreddit | flair |
|
|
26
|
+
| `reddit_user_flair` | GET /r/{subreddit}/api/user_flair_v2 | subreddit | flair |
|
|
27
|
+
| `reddit_select_flair` | POST /r/{subreddit}/api/selectflair | subreddit, flair_template_id, link? (fullname), name? (username), text? | flair |
|
|
28
|
+
|
|
29
|
+
### 2. Select flair details
|
|
30
|
+
- If `link` provided: sets link flair on a post
|
|
31
|
+
- If `name` provided: sets user flair
|
|
32
|
+
- `flair_template_id` from the link_flair or user_flair listing
|
|
33
|
+
- Optional `text` to customize flair text
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Verification
|
|
38
|
+
|
|
39
|
+
- [ ] `reddit_link_flair` returns available post flair templates
|
|
40
|
+
- [ ] `reddit_user_flair` returns available user flair templates
|
|
41
|
+
- [ ] `reddit_select_flair` sets flair on a post or user
|
|
42
|
+
- [ ] Unit tests for each tool
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
**Next Task**: [Task 15: HTTP Transport](task-15-http-transport.md)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Task 15: HTTP Transport
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M4 - Subreddits & Flair](../../milestones/milestone-4-subreddits-and-flair.md)
|
|
4
|
+
**Design Reference**: [Requirements](../../design/requirements.md)
|
|
5
|
+
**Estimated Time**: 2 hours
|
|
6
|
+
**Dependencies**: Task 4
|
|
7
|
+
**Status**: Not Started
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
Implement the streamable HTTP transport, following the youtube-mcp pattern.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
### 1. Implement src/transport/http.ts
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
export async function startHttpTransport(
|
|
23
|
+
server: McpServer,
|
|
24
|
+
options: { port: number; host: string }
|
|
25
|
+
): Promise<void>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- Use MCP SDK's `StreamableHTTPServerTransport`
|
|
29
|
+
- Per-session transport creation
|
|
30
|
+
- Routes:
|
|
31
|
+
- POST /mcp — MCP requests
|
|
32
|
+
- GET /health — health check (`{ status: "ok" }`)
|
|
33
|
+
- Anything else — 404
|
|
34
|
+
|
|
35
|
+
### 2. Update src/index.ts
|
|
36
|
+
- Parse --transport flag (stdio | http)
|
|
37
|
+
- Parse --port and --host flags
|
|
38
|
+
- Fallback to TRANSPORT, HTTP_PORT, HTTP_HOST env vars
|
|
39
|
+
- Default: stdio on port 3000
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Verification
|
|
44
|
+
|
|
45
|
+
- [ ] HTTP transport serves MCP requests on /mcp
|
|
46
|
+
- [ ] Health check returns 200 with `{ status: "ok" }`
|
|
47
|
+
- [ ] Unknown routes return 404
|
|
48
|
+
- [ ] Transport selection works via CLI flags and env vars
|
|
49
|
+
- [ ] Unit tests for HTTP transport
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
**Next Task**: [Task 16: Mod Action Tools](../milestone-5-moderation/task-16-mod-action-tools.md)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Task 16: Mod Action Tools
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M5 - Moderation](../../milestones/milestone-5-moderation.md)
|
|
4
|
+
**Design Reference**: [Requirements](../../design/requirements.md)
|
|
5
|
+
**Estimated Time**: 2 hours
|
|
6
|
+
**Dependencies**: Task 6
|
|
7
|
+
**Status**: Not Started
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
Implement moderator action tools — approve, remove, distinguish, ignore reports, lock/unlock.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
### 1. Create src/tools/moderation.ts
|
|
20
|
+
|
|
21
|
+
Register 7 tools:
|
|
22
|
+
|
|
23
|
+
| Tool | Endpoint | Parameters | Scope |
|
|
24
|
+
|------|----------|------------|-------|
|
|
25
|
+
| `reddit_approve` | POST /api/approve | id (fullname) | modposts |
|
|
26
|
+
| `reddit_remove` | POST /api/remove | id, spam? (boolean) | modposts |
|
|
27
|
+
| `reddit_distinguish` | POST /api/distinguish | id, how (yes/no/admin/special) | modposts |
|
|
28
|
+
| `reddit_ignore_reports` | POST /api/ignore_reports | id | modposts |
|
|
29
|
+
| `reddit_unignore_reports` | POST /api/unignore_reports | id | modposts |
|
|
30
|
+
| `reddit_lock` | POST /api/lock | id | modposts |
|
|
31
|
+
| `reddit_unlock` | POST /api/unlock | id | modposts |
|
|
32
|
+
|
|
33
|
+
### 2. Distinguish details
|
|
34
|
+
- `how`: "yes" = mod distinguish, "no" = remove distinguish, "admin" = admin, "special" = special
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Verification
|
|
39
|
+
|
|
40
|
+
- [ ] All 7 mod action tools registered
|
|
41
|
+
- [ ] Each tool requires modposts scope
|
|
42
|
+
- [ ] `reddit_remove` supports spam flag
|
|
43
|
+
- [ ] `reddit_distinguish` handles all `how` values
|
|
44
|
+
- [ ] Unit tests for each tool
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
**Next Task**: [Task 17: Mod Listing Tools](task-17-mod-listing-tools.md)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Task 17: Mod Listing Tools
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M5 - Moderation](../../milestones/milestone-5-moderation.md)
|
|
4
|
+
**Design Reference**: [Requirements](../../design/requirements.md)
|
|
5
|
+
**Estimated Time**: 2 hours
|
|
6
|
+
**Dependencies**: Task 16
|
|
7
|
+
**Status**: Not Started
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
Implement tools for viewing moderation queues, reports, spam, edited items, and the moderation log.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
### 1. Add to src/tools/moderation.ts (or create src/tools/mod-listings.ts)
|
|
20
|
+
|
|
21
|
+
Register 5 tools:
|
|
22
|
+
|
|
23
|
+
| Tool | Endpoint | Parameters | Scope |
|
|
24
|
+
|------|----------|------------|-------|
|
|
25
|
+
| `reddit_modqueue` | GET /r/{subreddit}/about/modqueue | subreddit, limit, after, before | modposts |
|
|
26
|
+
| `reddit_reports` | GET /r/{subreddit}/about/reports | subreddit, limit, after, before | modposts |
|
|
27
|
+
| `reddit_spam` | GET /r/{subreddit}/about/spam | subreddit, limit, after, before | modposts |
|
|
28
|
+
| `reddit_edited` | GET /r/{subreddit}/about/edited | subreddit, limit, after, before | modposts |
|
|
29
|
+
| `reddit_modlog` | GET /r/{subreddit}/about/log | subreddit, type?, mod?, limit, after, before | modlog |
|
|
30
|
+
|
|
31
|
+
### 2. Modlog details
|
|
32
|
+
- `type` filter: banuser, unbanuser, removelink, removecomment, approvelink, approvecomment, etc.
|
|
33
|
+
- `mod` filter: moderator username
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Verification
|
|
38
|
+
|
|
39
|
+
- [ ] All 5 mod listing tools registered
|
|
40
|
+
- [ ] `reddit_modqueue` returns items awaiting review
|
|
41
|
+
- [ ] `reddit_modlog` supports type and mod filters
|
|
42
|
+
- [ ] Pagination works correctly
|
|
43
|
+
- [ ] Unit tests for each tool
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
**Next Task**: [Task 18: Mod Management Tools](task-18-mod-management-tools.md)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Task 18: Mod Management Tools
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M5 - Moderation](../../milestones/milestone-5-moderation.md)
|
|
4
|
+
**Design Reference**: [Requirements](../../design/requirements.md)
|
|
5
|
+
**Estimated Time**: 1.5 hours
|
|
6
|
+
**Dependencies**: Task 16
|
|
7
|
+
**Status**: Not Started
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
Implement tools for listing moderators, approved contributors, banned users, and muted users.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
### 1. Add to src/tools/moderation.ts
|
|
20
|
+
|
|
21
|
+
Register 4 tools:
|
|
22
|
+
|
|
23
|
+
| Tool | Endpoint | Parameters | Scope |
|
|
24
|
+
|------|----------|------------|-------|
|
|
25
|
+
| `reddit_moderators` | GET /r/{subreddit}/about/moderators | subreddit | read |
|
|
26
|
+
| `reddit_contributors` | GET /r/{subreddit}/about/contributors | subreddit, limit, after, before | modcontributors |
|
|
27
|
+
| `reddit_banned` | GET /r/{subreddit}/about/banned | subreddit, limit, after, before | modcontributors |
|
|
28
|
+
| `reddit_muted` | GET /r/{subreddit}/about/muted | subreddit, limit, after, before | modcontributors |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Verification
|
|
33
|
+
|
|
34
|
+
- [ ] All 4 tools registered with correct scopes
|
|
35
|
+
- [ ] `reddit_moderators` returns mod list
|
|
36
|
+
- [ ] `reddit_banned` returns banned user list with reasons
|
|
37
|
+
- [ ] Pagination works for contributor/banned/muted lists
|
|
38
|
+
- [ ] Unit tests for each tool
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
**Next Task**: [Task 19: Multireddit Tools](../milestone-6-advanced-features-and-polish/task-19-multireddit-tools.md)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Task 19: Multireddit Tools
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M6 - Advanced Features & Polish](../../milestones/milestone-6-advanced-features-and-polish.md)
|
|
4
|
+
**Design Reference**: [Requirements](../../design/requirements.md)
|
|
5
|
+
**Estimated Time**: 2 hours
|
|
6
|
+
**Dependencies**: Task 6
|
|
7
|
+
**Status**: Not Started
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
Implement tools for managing multireddits (custom feeds) — list, get, create, update, delete, and manage subreddits within them.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
### 1. Create src/tools/multireddits.ts
|
|
20
|
+
|
|
21
|
+
Register 7 tools:
|
|
22
|
+
|
|
23
|
+
| Tool | Endpoint | Parameters | Scope |
|
|
24
|
+
|------|----------|------------|-------|
|
|
25
|
+
| `reddit_multi_mine` | GET /api/multi/mine | — | read |
|
|
26
|
+
| `reddit_multi_get` | GET /api/multi/{multipath} | multipath | read |
|
|
27
|
+
| `reddit_multi_create` | POST /api/multi/{multipath} | multipath, model (JSON: display_name, subreddits, visibility) | subscribe |
|
|
28
|
+
| `reddit_multi_update` | PUT /api/multi/{multipath} | multipath, model (JSON) | subscribe |
|
|
29
|
+
| `reddit_multi_delete` | DELETE /api/multi/{multipath} | multipath | subscribe |
|
|
30
|
+
| `reddit_multi_add_sub` | PUT /api/multi/{multipath}/r/{srname} | multipath, srname, model ({name: srname}) | subscribe |
|
|
31
|
+
| `reddit_multi_remove_sub` | DELETE /api/multi/{multipath}/r/{srname} | multipath, srname | subscribe |
|
|
32
|
+
|
|
33
|
+
### 2. Multipath format
|
|
34
|
+
- Format: `/user/{username}/m/{multiname}`
|
|
35
|
+
- Example: `/user/spez/m/frontpage`
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Verification
|
|
40
|
+
|
|
41
|
+
- [ ] `reddit_multi_mine` returns user's multireddits
|
|
42
|
+
- [ ] CRUD operations work on multireddits
|
|
43
|
+
- [ ] Add/remove subreddit from multi works
|
|
44
|
+
- [ ] Multipath format correctly handled
|
|
45
|
+
- [ ] Unit tests for each tool
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
**Next Task**: [Task 20: Wiki Tools](task-20-wiki-tools.md)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Task 20: Wiki Tools
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M6 - Advanced Features & Polish](../../milestones/milestone-6-advanced-features-and-polish.md)
|
|
4
|
+
**Design Reference**: [Requirements](../../design/requirements.md)
|
|
5
|
+
**Estimated Time**: 2 hours
|
|
6
|
+
**Dependencies**: Task 6
|
|
7
|
+
**Status**: Not Started
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
Implement tools for reading, editing, and browsing subreddit wiki pages and their revision history.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
### 1. Create src/tools/wiki.ts
|
|
20
|
+
|
|
21
|
+
Register 5 tools:
|
|
22
|
+
|
|
23
|
+
| Tool | Endpoint | Parameters | Scope |
|
|
24
|
+
|------|----------|------------|-------|
|
|
25
|
+
| `reddit_wiki_page` | GET /r/{subreddit}/wiki/{page} | subreddit, page | wikiread |
|
|
26
|
+
| `reddit_wiki_edit` | POST /r/{subreddit}/api/wiki/edit | subreddit, page, content, reason? | wikiedit |
|
|
27
|
+
| `reddit_wiki_pages` | GET /r/{subreddit}/wiki/pages | subreddit | wikiread |
|
|
28
|
+
| `reddit_wiki_revisions` | GET /r/{subreddit}/wiki/revisions | subreddit, limit, after, before | wikiread |
|
|
29
|
+
| `reddit_wiki_page_revisions` | GET /r/{subreddit}/wiki/revisions/{page} | subreddit, page, limit, after, before | wikiread |
|
|
30
|
+
|
|
31
|
+
### 2. Wiki edit details
|
|
32
|
+
- `content` is the full wiki page content (markdown)
|
|
33
|
+
- `reason` is an optional edit reason (like a commit message)
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Verification
|
|
38
|
+
|
|
39
|
+
- [ ] `reddit_wiki_page` returns wiki page content
|
|
40
|
+
- [ ] `reddit_wiki_edit` updates a wiki page
|
|
41
|
+
- [ ] `reddit_wiki_pages` lists all wiki pages in a subreddit
|
|
42
|
+
- [ ] Revision history tools return edit history
|
|
43
|
+
- [ ] Unit tests for each tool
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
**Next Task**: [Task 21: Documentation & Polish](task-21-documentation-polish.md)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Task 21: Documentation & Polish
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M6 - Advanced Features & Polish](../../milestones/milestone-6-advanced-features-and-polish.md)
|
|
4
|
+
**Design Reference**: [Requirements](../../design/requirements.md)
|
|
5
|
+
**Estimated Time**: 3 hours
|
|
6
|
+
**Dependencies**: Tasks 1-20
|
|
7
|
+
**Status**: Not Started
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
Complete README documentation, CHANGELOG, factory export for mcp-auth, and ensure the package is publish-ready.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
### 1. Create comprehensive README.md
|
|
20
|
+
- Project overview and description
|
|
21
|
+
- Quick start guide (OAuth setup, configuration)
|
|
22
|
+
- All 88 tools documented in a reference table
|
|
23
|
+
- OAuth scopes per category
|
|
24
|
+
- Transport options (stdio/HTTP)
|
|
25
|
+
- Claude Desktop configuration example
|
|
26
|
+
- Rate limit information
|
|
27
|
+
- Environment variables reference
|
|
28
|
+
|
|
29
|
+
### 2. Create CHANGELOG.md
|
|
30
|
+
- Document all milestones as releases
|
|
31
|
+
- List tools added per milestone
|
|
32
|
+
|
|
33
|
+
### 3. Finalize factory export (src/factory.ts)
|
|
34
|
+
```typescript
|
|
35
|
+
export function createServer(accessToken: string): McpServer
|
|
36
|
+
```
|
|
37
|
+
- Used by reddit-mcp-server for mcp-auth integration
|
|
38
|
+
- Creates server with raw access token (no OAuth flow)
|
|
39
|
+
|
|
40
|
+
### 4. Package verification
|
|
41
|
+
- Ensure package.json exports are correct
|
|
42
|
+
- Verify `npm pack` produces clean package
|
|
43
|
+
- Check no dev files included in package
|
|
44
|
+
- Verify all tools registered (count = 88)
|
|
45
|
+
|
|
46
|
+
### 5. Final test pass
|
|
47
|
+
- Run full test suite
|
|
48
|
+
- Verify coverage >= 70%
|
|
49
|
+
- Check for any TODO/FIXME items
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Verification
|
|
54
|
+
|
|
55
|
+
- [ ] README documents all 88 tools
|
|
56
|
+
- [ ] CHANGELOG covers all milestones
|
|
57
|
+
- [ ] Factory export creates server from access token
|
|
58
|
+
- [ ] `npm pack` produces clean package
|
|
59
|
+
- [ ] All tests pass
|
|
60
|
+
- [ ] No TODO/FIXME items remaining
|
|
61
|
+
- [ ] Package publishable to npm
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
**Related Design Docs**: [Requirements](../../design/requirements.md)
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# Task {N}: {Descriptive Task Name}
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M{N} - Milestone Name](../milestones/milestone-{N}-{name}.md)
|
|
4
|
+
**Design Reference**: [{Design Name}](../design/{namespace}.{design-name}.md) | None
|
|
5
|
+
**Estimated Time**: [e.g., "2 hours", "4 hours", "1 day"]
|
|
6
|
+
**Dependencies**: [List prerequisite tasks, or "None"]
|
|
7
|
+
**Status**: Not Started | In Progress | Completed
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
[Clearly state what this task accomplishes. Be specific and focused on a single, achievable goal.]
|
|
14
|
+
|
|
15
|
+
**Example**: "Create the basic project structure with all necessary configuration files and directory organization for a TypeScript-based MCP server."
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Context
|
|
20
|
+
|
|
21
|
+
[Provide background information that helps understand why this task is necessary and how it fits into the larger milestone.]
|
|
22
|
+
|
|
23
|
+
**Example**: "This task establishes the foundation for the project. Without proper structure and configuration, subsequent development tasks cannot proceed. The structure follows industry best practices for TypeScript projects and MCP server organization."
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Steps
|
|
28
|
+
|
|
29
|
+
[Provide a detailed, sequential list of actions to complete this task. Each step should be concrete and actionable.]
|
|
30
|
+
|
|
31
|
+
### 1. [Step Category or Action]
|
|
32
|
+
[Detailed description of what to do]
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Command examples if applicable
|
|
36
|
+
command --with-flags
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
// Code examples if applicable
|
|
41
|
+
const example = "code";
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. [Next Step]
|
|
45
|
+
[Detailed description]
|
|
46
|
+
|
|
47
|
+
### 3. [Next Step]
|
|
48
|
+
[Detailed description]
|
|
49
|
+
|
|
50
|
+
**Example**:
|
|
51
|
+
|
|
52
|
+
### 1. Create Project Directory
|
|
53
|
+
Create the root directory for the project and navigate into it:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
mkdir -p my-project
|
|
57
|
+
cd my-project
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 2. Initialize npm Project
|
|
61
|
+
Initialize a new npm project with default settings:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm init -y
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 3. Update package.json
|
|
68
|
+
Edit the generated package.json to include proper metadata and scripts:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"name": "my-project",
|
|
73
|
+
"version": "0.1.0",
|
|
74
|
+
"description": "Description of what this project does",
|
|
75
|
+
"main": "dist/index.js",
|
|
76
|
+
"type": "module",
|
|
77
|
+
"scripts": {
|
|
78
|
+
"build": "node esbuild.build.js",
|
|
79
|
+
"dev": "tsx watch src/index.ts",
|
|
80
|
+
"start": "node dist/index.js",
|
|
81
|
+
"test": "vitest",
|
|
82
|
+
"typecheck": "tsc --noEmit"
|
|
83
|
+
},
|
|
84
|
+
"keywords": ["mcp", "relevant", "keywords"],
|
|
85
|
+
"author": "Your Name",
|
|
86
|
+
"license": "MIT"
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 4. Create Directory Structure
|
|
91
|
+
Create all necessary directories:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
mkdir -p src/{types,utils,tools}
|
|
95
|
+
mkdir -p tests/{unit,integration}
|
|
96
|
+
mkdir -p agent/{design,milestones,patterns,tasks}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 5. Create Configuration Files
|
|
100
|
+
Create TypeScript configuration, build scripts, and other config files.
|
|
101
|
+
|
|
102
|
+
**tsconfig.json**:
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"compilerOptions": {
|
|
106
|
+
"target": "ES2022",
|
|
107
|
+
"module": "Node16",
|
|
108
|
+
"moduleResolution": "Node16",
|
|
109
|
+
"lib": ["ES2022"],
|
|
110
|
+
"outDir": "./dist",
|
|
111
|
+
"rootDir": "./src",
|
|
112
|
+
"strict": true,
|
|
113
|
+
"esModuleInterop": true,
|
|
114
|
+
"skipLibCheck": true,
|
|
115
|
+
"forceConsistentCasingInFileNames": true,
|
|
116
|
+
"resolveJsonModule": true,
|
|
117
|
+
"declaration": true,
|
|
118
|
+
"declarationMap": true,
|
|
119
|
+
"sourceMap": true
|
|
120
|
+
},
|
|
121
|
+
"include": ["src/**/*"],
|
|
122
|
+
"exclude": ["node_modules", "dist", "tests"]
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
[Continue with other config files...]
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Verification
|
|
131
|
+
|
|
132
|
+
[Provide a checklist of items to verify the task is complete. Each item should be objectively verifiable.]
|
|
133
|
+
|
|
134
|
+
- [ ] Verification item 1: [Specific condition to check]
|
|
135
|
+
- [ ] Verification item 2: [Specific condition to check]
|
|
136
|
+
- [ ] Verification item 3: [Specific condition to check]
|
|
137
|
+
- [ ] Verification item 4: [Specific condition to check]
|
|
138
|
+
- [ ] Verification item 5: [Specific condition to check]
|
|
139
|
+
|
|
140
|
+
**Example**:
|
|
141
|
+
- [ ] Project directory created and contains expected subdirectories
|
|
142
|
+
- [ ] package.json exists and contains correct metadata
|
|
143
|
+
- [ ] tsconfig.json exists and is valid JSON
|
|
144
|
+
- [ ] All configuration files created (.gitignore, .env.example, etc.)
|
|
145
|
+
- [ ] Directory structure matches specification
|
|
146
|
+
- [ ] No syntax errors in configuration files
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Expected Output
|
|
151
|
+
|
|
152
|
+
[Describe what the project should look like after this task is complete.]
|
|
153
|
+
|
|
154
|
+
**File Structure**:
|
|
155
|
+
```
|
|
156
|
+
project-root/
|
|
157
|
+
├── file1
|
|
158
|
+
├── file2
|
|
159
|
+
└── directory/
|
|
160
|
+
└── file3
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Key Files Created**:
|
|
164
|
+
- `file1`: [Purpose]
|
|
165
|
+
- `file2`: [Purpose]
|
|
166
|
+
- `directory/file3`: [Purpose]
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Key Design Decisions (Optional)
|
|
171
|
+
|
|
172
|
+
<!-- This section is populated by @acp.clarification-capture when
|
|
173
|
+
create commands are invoked with --from-clar, --from-chat, or
|
|
174
|
+
--from-context. It can also be manually authored.
|
|
175
|
+
Omit this section entirely if no decisions to capture.
|
|
176
|
+
|
|
177
|
+
Group decisions by agent-inferred category using tables:
|
|
178
|
+
|
|
179
|
+
### {Category}
|
|
180
|
+
|
|
181
|
+
| Decision | Choice | Rationale |
|
|
182
|
+
|---|---|---|
|
|
183
|
+
| {decision} | {choice} | {rationale} |
|
|
184
|
+
-->
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Common Issues and Solutions
|
|
189
|
+
|
|
190
|
+
[Document potential problems and how to resolve them:]
|
|
191
|
+
|
|
192
|
+
### Issue 1: [Problem description]
|
|
193
|
+
**Symptom**: [What the user will see]
|
|
194
|
+
**Solution**: [How to fix it]
|
|
195
|
+
|
|
196
|
+
### Issue 2: [Problem description]
|
|
197
|
+
**Symptom**: [What the user will see]
|
|
198
|
+
**Solution**: [How to fix it]
|
|
199
|
+
|
|
200
|
+
**Example**:
|
|
201
|
+
|
|
202
|
+
### Issue 1: npm init fails
|
|
203
|
+
**Symptom**: Error message about permissions or missing npm
|
|
204
|
+
**Solution**: Ensure Node.js and npm are installed correctly. Run `node --version` and `npm --version` to verify.
|
|
205
|
+
|
|
206
|
+
### Issue 2: TypeScript configuration errors
|
|
207
|
+
**Symptom**: tsc complains about invalid configuration
|
|
208
|
+
**Solution**: Validate JSON syntax in tsconfig.json. Ensure all required fields are present.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Resources
|
|
213
|
+
|
|
214
|
+
[Link to relevant documentation, examples, or references:]
|
|
215
|
+
|
|
216
|
+
- [Resource 1 Name](URL): Description
|
|
217
|
+
- [Resource 2 Name](URL): Description
|
|
218
|
+
- [Resource 3 Name](URL): Description
|
|
219
|
+
|
|
220
|
+
**Example**:
|
|
221
|
+
- [TypeScript Handbook](https://www.typescriptlang.org/docs/): Official TypeScript documentation
|
|
222
|
+
- [esbuild Documentation](https://esbuild.github.io/): Build tool documentation
|
|
223
|
+
- [MCP SDK Documentation](https://github.com/modelcontextprotocol/sdk): MCP protocol reference
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Notes
|
|
228
|
+
|
|
229
|
+
[Any additional context, warnings, or considerations:]
|
|
230
|
+
|
|
231
|
+
- Note 1: [Important information]
|
|
232
|
+
- Note 2: [Important information]
|
|
233
|
+
- Note 3: [Important information]
|
|
234
|
+
|
|
235
|
+
**Example**:
|
|
236
|
+
- This task creates the foundation for all subsequent work
|
|
237
|
+
- Configuration files may need adjustment based on specific project requirements
|
|
238
|
+
- Keep .env files out of version control (ensure .gitignore is correct)
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
**Next Task**: [Link to next task: task-{N+1}-{name}.md]
|
|
243
|
+
**Related Design Docs**: [Links to relevant design documents]
|
|
244
|
+
**Estimated Completion Date**: [YYYY-MM-DD or "TBD"]
|