@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,223 @@
|
|
|
1
|
+
project:
|
|
2
|
+
name: reddit-mcp
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
started: 2026-03-10
|
|
5
|
+
status: in_progress
|
|
6
|
+
description: |
|
|
7
|
+
MCP server wrapping the Reddit API for AI agents
|
|
8
|
+
|
|
9
|
+
milestones:
|
|
10
|
+
- id: M1
|
|
11
|
+
title: Foundation + Listings MVP
|
|
12
|
+
status: completed
|
|
13
|
+
tasks_total: 6
|
|
14
|
+
tasks_complete: 6
|
|
15
|
+
estimated_weeks: 1
|
|
16
|
+
file: agent/milestones/milestone-1-foundation-listings-mvp.md
|
|
17
|
+
- id: M2
|
|
18
|
+
title: Content Interaction
|
|
19
|
+
status: not_started
|
|
20
|
+
tasks_total: 3
|
|
21
|
+
tasks_complete: 0
|
|
22
|
+
estimated_weeks: 1
|
|
23
|
+
file: agent/milestones/milestone-2-content-interaction.md
|
|
24
|
+
- id: M3
|
|
25
|
+
title: Users & Messaging
|
|
26
|
+
status: not_started
|
|
27
|
+
tasks_total: 3
|
|
28
|
+
tasks_complete: 0
|
|
29
|
+
estimated_weeks: 1
|
|
30
|
+
file: agent/milestones/milestone-3-users-and-messaging.md
|
|
31
|
+
- id: M4
|
|
32
|
+
title: Subreddits & Flair
|
|
33
|
+
status: not_started
|
|
34
|
+
tasks_total: 3
|
|
35
|
+
tasks_complete: 0
|
|
36
|
+
estimated_weeks: 1
|
|
37
|
+
file: agent/milestones/milestone-4-subreddits-and-flair.md
|
|
38
|
+
- id: M5
|
|
39
|
+
title: Moderation
|
|
40
|
+
status: not_started
|
|
41
|
+
tasks_total: 3
|
|
42
|
+
tasks_complete: 0
|
|
43
|
+
estimated_weeks: 1
|
|
44
|
+
file: agent/milestones/milestone-5-moderation.md
|
|
45
|
+
- id: M6
|
|
46
|
+
title: Advanced Features & Polish
|
|
47
|
+
status: not_started
|
|
48
|
+
tasks_total: 3
|
|
49
|
+
tasks_complete: 0
|
|
50
|
+
estimated_weeks: 1
|
|
51
|
+
file: agent/milestones/milestone-6-advanced-features-and-polish.md
|
|
52
|
+
|
|
53
|
+
tasks:
|
|
54
|
+
milestone_1:
|
|
55
|
+
- id: T1
|
|
56
|
+
title: Project Scaffolding
|
|
57
|
+
status: completed
|
|
58
|
+
estimated_hours: 2
|
|
59
|
+
file: agent/tasks/milestone-1-foundation-listings-mvp/task-1-project-scaffolding.md
|
|
60
|
+
- id: T2
|
|
61
|
+
title: Reddit OAuth 2.0
|
|
62
|
+
status: completed
|
|
63
|
+
estimated_hours: 3
|
|
64
|
+
dependencies: [T1]
|
|
65
|
+
file: agent/tasks/milestone-1-foundation-listings-mvp/task-2-reddit-oauth.md
|
|
66
|
+
- id: T3
|
|
67
|
+
title: Reddit API Client Wrapper
|
|
68
|
+
status: completed
|
|
69
|
+
estimated_hours: 3
|
|
70
|
+
dependencies: [T2]
|
|
71
|
+
file: agent/tasks/milestone-1-foundation-listings-mvp/task-3-reddit-api-client.md
|
|
72
|
+
- id: T4
|
|
73
|
+
title: Listing Tools
|
|
74
|
+
status: completed
|
|
75
|
+
estimated_hours: 3
|
|
76
|
+
dependencies: [T3]
|
|
77
|
+
file: agent/tasks/milestone-1-foundation-listings-mvp/task-4-listing-tools.md
|
|
78
|
+
- id: T5
|
|
79
|
+
title: Search Tools
|
|
80
|
+
status: completed
|
|
81
|
+
estimated_hours: 1.5
|
|
82
|
+
dependencies: [T4]
|
|
83
|
+
file: agent/tasks/milestone-1-foundation-listings-mvp/task-5-search-tools.md
|
|
84
|
+
- id: T6
|
|
85
|
+
title: Testing & Verification
|
|
86
|
+
status: completed
|
|
87
|
+
estimated_hours: 3
|
|
88
|
+
dependencies: [T1, T2, T3, T4, T5]
|
|
89
|
+
file: agent/tasks/milestone-1-foundation-listings-mvp/task-6-testing-verification.md
|
|
90
|
+
milestone_2:
|
|
91
|
+
- id: T7
|
|
92
|
+
title: Post Tools
|
|
93
|
+
status: not_started
|
|
94
|
+
estimated_hours: 3
|
|
95
|
+
dependencies: [T6]
|
|
96
|
+
file: agent/tasks/milestone-2-content-interaction/task-7-post-tools.md
|
|
97
|
+
- id: T8
|
|
98
|
+
title: Comment Tools
|
|
99
|
+
status: not_started
|
|
100
|
+
estimated_hours: 2
|
|
101
|
+
dependencies: [T7]
|
|
102
|
+
file: agent/tasks/milestone-2-content-interaction/task-8-comment-tools.md
|
|
103
|
+
- id: T9
|
|
104
|
+
title: Vote, Save & Report Tools
|
|
105
|
+
status: not_started
|
|
106
|
+
estimated_hours: 1.5
|
|
107
|
+
dependencies: [T7]
|
|
108
|
+
file: agent/tasks/milestone-2-content-interaction/task-9-vote-save-report-tools.md
|
|
109
|
+
milestone_3:
|
|
110
|
+
- id: T10
|
|
111
|
+
title: Account Tools
|
|
112
|
+
status: not_started
|
|
113
|
+
estimated_hours: 2
|
|
114
|
+
dependencies: [T6]
|
|
115
|
+
file: agent/tasks/milestone-3-users-and-messaging/task-10-account-tools.md
|
|
116
|
+
- id: T11
|
|
117
|
+
title: User Profile Tools
|
|
118
|
+
status: not_started
|
|
119
|
+
estimated_hours: 2.5
|
|
120
|
+
dependencies: [T6]
|
|
121
|
+
file: agent/tasks/milestone-3-users-and-messaging/task-11-user-profile-tools.md
|
|
122
|
+
- id: T12
|
|
123
|
+
title: Private Message Tools
|
|
124
|
+
status: not_started
|
|
125
|
+
estimated_hours: 2
|
|
126
|
+
dependencies: [T6]
|
|
127
|
+
file: agent/tasks/milestone-3-users-and-messaging/task-12-private-message-tools.md
|
|
128
|
+
milestone_4:
|
|
129
|
+
- id: T13
|
|
130
|
+
title: Subreddit Tools
|
|
131
|
+
status: not_started
|
|
132
|
+
estimated_hours: 2.5
|
|
133
|
+
dependencies: [T6]
|
|
134
|
+
file: agent/tasks/milestone-4-subreddits-and-flair/task-13-subreddit-tools.md
|
|
135
|
+
- id: T14
|
|
136
|
+
title: Flair Tools
|
|
137
|
+
status: not_started
|
|
138
|
+
estimated_hours: 1.5
|
|
139
|
+
dependencies: [T13]
|
|
140
|
+
file: agent/tasks/milestone-4-subreddits-and-flair/task-14-flair-tools.md
|
|
141
|
+
- id: T15
|
|
142
|
+
title: HTTP Transport
|
|
143
|
+
status: not_started
|
|
144
|
+
estimated_hours: 2
|
|
145
|
+
dependencies: [T4]
|
|
146
|
+
file: agent/tasks/milestone-4-subreddits-and-flair/task-15-http-transport.md
|
|
147
|
+
milestone_5:
|
|
148
|
+
- id: T16
|
|
149
|
+
title: Mod Action Tools
|
|
150
|
+
status: not_started
|
|
151
|
+
estimated_hours: 2
|
|
152
|
+
dependencies: [T6]
|
|
153
|
+
file: agent/tasks/milestone-5-moderation/task-16-mod-action-tools.md
|
|
154
|
+
- id: T17
|
|
155
|
+
title: Mod Listing Tools
|
|
156
|
+
status: not_started
|
|
157
|
+
estimated_hours: 2
|
|
158
|
+
dependencies: [T16]
|
|
159
|
+
file: agent/tasks/milestone-5-moderation/task-17-mod-listing-tools.md
|
|
160
|
+
- id: T18
|
|
161
|
+
title: Mod Management Tools
|
|
162
|
+
status: not_started
|
|
163
|
+
estimated_hours: 1.5
|
|
164
|
+
dependencies: [T16]
|
|
165
|
+
file: agent/tasks/milestone-5-moderation/task-18-mod-management-tools.md
|
|
166
|
+
milestone_6:
|
|
167
|
+
- id: T19
|
|
168
|
+
title: Multireddit Tools
|
|
169
|
+
status: not_started
|
|
170
|
+
estimated_hours: 2
|
|
171
|
+
dependencies: [T6]
|
|
172
|
+
file: agent/tasks/milestone-6-advanced-features-and-polish/task-19-multireddit-tools.md
|
|
173
|
+
- id: T20
|
|
174
|
+
title: Wiki Tools
|
|
175
|
+
status: not_started
|
|
176
|
+
estimated_hours: 2
|
|
177
|
+
dependencies: [T6]
|
|
178
|
+
file: agent/tasks/milestone-6-advanced-features-and-polish/task-20-wiki-tools.md
|
|
179
|
+
- id: T21
|
|
180
|
+
title: Documentation & Polish
|
|
181
|
+
status: not_started
|
|
182
|
+
estimated_hours: 3
|
|
183
|
+
dependencies: [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]
|
|
184
|
+
file: agent/tasks/milestone-6-advanced-features-and-polish/task-21-documentation-polish.md
|
|
185
|
+
|
|
186
|
+
documentation:
|
|
187
|
+
design_documents: 1
|
|
188
|
+
milestone_documents: 6
|
|
189
|
+
pattern_documents: 0
|
|
190
|
+
task_documents: 21
|
|
191
|
+
|
|
192
|
+
progress:
|
|
193
|
+
planning: 100
|
|
194
|
+
implementation: 17
|
|
195
|
+
overall: 20
|
|
196
|
+
|
|
197
|
+
recent_work:
|
|
198
|
+
- date: 2026-03-10
|
|
199
|
+
items:
|
|
200
|
+
- Created requirements.md with 88 Reddit API endpoints mapped to MCP tools
|
|
201
|
+
- Created 6 milestone documents
|
|
202
|
+
- Created 21 task documents organized by milestone
|
|
203
|
+
- Updated progress.yaml with full project plan
|
|
204
|
+
- "Completed M1: Foundation + Listings MVP (all 6 tasks)"
|
|
205
|
+
- Implemented project scaffolding (package.json, tsconfig, esbuild, jest)
|
|
206
|
+
- Implemented Reddit OAuth 2.0 with token refresh and file storage
|
|
207
|
+
- Implemented Reddit API client with error handling, retry, rate limits
|
|
208
|
+
- Implemented 9 listing tools + 2 search tools (11 total)
|
|
209
|
+
- Created 5 test suites (36 tests passing)
|
|
210
|
+
- Implemented stdio and HTTP transports
|
|
211
|
+
|
|
212
|
+
next_steps:
|
|
213
|
+
- Start M2 Task 7: Post Tools
|
|
214
|
+
- Continue with M2 Content Interaction (submit, comment, vote, save)
|
|
215
|
+
- Then M3 Users & Messaging
|
|
216
|
+
|
|
217
|
+
notes:
|
|
218
|
+
- Following youtube-mcp reference pattern (same architecture)
|
|
219
|
+
- No official Reddit Node.js SDK — using raw fetch with OAuth headers
|
|
220
|
+
- Rate limit: 100 QPM per OAuth client ID
|
|
221
|
+
- 88 total MCP tools planned across 6 milestones
|
|
222
|
+
|
|
223
|
+
current_blockers: []
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# Package YAML Schema
|
|
2
|
+
# Schema for validating ACP package.yaml files
|
|
3
|
+
# Version: 1.0.0
|
|
4
|
+
|
|
5
|
+
schema_version: 1.0.0
|
|
6
|
+
description: Schema for ACP package.yaml files
|
|
7
|
+
|
|
8
|
+
# Required fields that must be present
|
|
9
|
+
required_fields:
|
|
10
|
+
- name
|
|
11
|
+
- version
|
|
12
|
+
- description
|
|
13
|
+
- author
|
|
14
|
+
- license
|
|
15
|
+
- repository
|
|
16
|
+
|
|
17
|
+
# Field definitions with validation rules
|
|
18
|
+
fields:
|
|
19
|
+
name:
|
|
20
|
+
type: string
|
|
21
|
+
pattern: "^[a-z0-9-]+$"
|
|
22
|
+
description: "Package name (lowercase, alphanumeric, hyphens only)"
|
|
23
|
+
error_message: "Package name must be lowercase letters, numbers, and hyphens only"
|
|
24
|
+
|
|
25
|
+
version:
|
|
26
|
+
type: string
|
|
27
|
+
pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+$"
|
|
28
|
+
description: "Semantic version (X.Y.Z)"
|
|
29
|
+
error_message: "Version must be in semantic versioning format (e.g., 1.0.0)"
|
|
30
|
+
|
|
31
|
+
description:
|
|
32
|
+
type: string
|
|
33
|
+
min_length: 10
|
|
34
|
+
max_length: 200
|
|
35
|
+
description: "One-line package description"
|
|
36
|
+
error_message: "Description must be between 10 and 200 characters"
|
|
37
|
+
|
|
38
|
+
author:
|
|
39
|
+
type: string
|
|
40
|
+
min_length: 2
|
|
41
|
+
description: "Package author name"
|
|
42
|
+
error_message: "Author name must be at least 2 characters"
|
|
43
|
+
|
|
44
|
+
license:
|
|
45
|
+
type: string
|
|
46
|
+
description: "License identifier (e.g., MIT, Apache-2.0)"
|
|
47
|
+
error_message: "License must be specified"
|
|
48
|
+
|
|
49
|
+
repository:
|
|
50
|
+
type: string
|
|
51
|
+
pattern: "^https?://.*\\.git$"
|
|
52
|
+
description: "Git repository URL (must end with .git)"
|
|
53
|
+
error_message: "Repository must be a valid git URL ending with .git"
|
|
54
|
+
|
|
55
|
+
homepage:
|
|
56
|
+
type: string
|
|
57
|
+
pattern: "^https?://.*"
|
|
58
|
+
required: false
|
|
59
|
+
description: "Package homepage URL"
|
|
60
|
+
error_message: "Homepage must be a valid HTTP/HTTPS URL"
|
|
61
|
+
|
|
62
|
+
tags:
|
|
63
|
+
type: array
|
|
64
|
+
item_type: string
|
|
65
|
+
required: false
|
|
66
|
+
description: "Tags for package discovery"
|
|
67
|
+
|
|
68
|
+
release:
|
|
69
|
+
type: object
|
|
70
|
+
required: false
|
|
71
|
+
description: "Release configuration"
|
|
72
|
+
fields:
|
|
73
|
+
branch:
|
|
74
|
+
type: string
|
|
75
|
+
description: "Release branch name (e.g., main, master, mainline)"
|
|
76
|
+
branches:
|
|
77
|
+
type: array
|
|
78
|
+
item_type: string
|
|
79
|
+
required: false
|
|
80
|
+
description: "Additional valid release branches"
|
|
81
|
+
|
|
82
|
+
contents:
|
|
83
|
+
type: object
|
|
84
|
+
required: true
|
|
85
|
+
description: "Package contents (patterns, commands, designs)"
|
|
86
|
+
fields:
|
|
87
|
+
patterns:
|
|
88
|
+
type: array
|
|
89
|
+
item_type: object
|
|
90
|
+
required: false
|
|
91
|
+
description: "List of pattern files (each with 'name' field)"
|
|
92
|
+
item_fields:
|
|
93
|
+
name:
|
|
94
|
+
type: string
|
|
95
|
+
required: true
|
|
96
|
+
description: "Pattern filename (e.g., namespace.pattern-name.md)"
|
|
97
|
+
description:
|
|
98
|
+
type: string
|
|
99
|
+
required: false
|
|
100
|
+
description: "Pattern description"
|
|
101
|
+
experimental:
|
|
102
|
+
type: boolean
|
|
103
|
+
required: false
|
|
104
|
+
default: false
|
|
105
|
+
description: "Mark as experimental (requires --experimental flag to install)"
|
|
106
|
+
commands:
|
|
107
|
+
type: array
|
|
108
|
+
item_type: object
|
|
109
|
+
required: false
|
|
110
|
+
description: "List of command files (each with 'name' field)"
|
|
111
|
+
item_fields:
|
|
112
|
+
name:
|
|
113
|
+
type: string
|
|
114
|
+
required: true
|
|
115
|
+
description: "Command filename (e.g., namespace.command-name.md)"
|
|
116
|
+
description:
|
|
117
|
+
type: string
|
|
118
|
+
required: false
|
|
119
|
+
description: "Command description"
|
|
120
|
+
scripts:
|
|
121
|
+
type: array
|
|
122
|
+
item_type: string
|
|
123
|
+
required: true
|
|
124
|
+
description: "Script dependencies for this command (must match command frontmatter)"
|
|
125
|
+
pattern: "^[a-z0-9-]+\\.[a-z0-9-]+\\.sh$"
|
|
126
|
+
experimental:
|
|
127
|
+
type: boolean
|
|
128
|
+
required: false
|
|
129
|
+
default: false
|
|
130
|
+
description: "Mark as experimental (requires --experimental flag to install)"
|
|
131
|
+
designs:
|
|
132
|
+
type: array
|
|
133
|
+
item_type: object
|
|
134
|
+
required: false
|
|
135
|
+
description: "List of design files (each with 'name' field)"
|
|
136
|
+
item_fields:
|
|
137
|
+
name:
|
|
138
|
+
type: string
|
|
139
|
+
required: true
|
|
140
|
+
description: "Design filename (e.g., namespace.design-name.md)"
|
|
141
|
+
description:
|
|
142
|
+
type: string
|
|
143
|
+
required: false
|
|
144
|
+
description: "Design description"
|
|
145
|
+
experimental:
|
|
146
|
+
type: boolean
|
|
147
|
+
required: false
|
|
148
|
+
default: false
|
|
149
|
+
description: "Mark as experimental (requires --experimental flag to install)"
|
|
150
|
+
scripts:
|
|
151
|
+
type: array
|
|
152
|
+
item_type: object
|
|
153
|
+
required: false
|
|
154
|
+
description: "List of script files (each with 'name' field)"
|
|
155
|
+
item_fields:
|
|
156
|
+
name:
|
|
157
|
+
type: string
|
|
158
|
+
required: true
|
|
159
|
+
pattern: "^[a-z0-9-]+\\.[a-z0-9-]+\\.sh$"
|
|
160
|
+
description: "Script filename with namespace (e.g., namespace.script-name.sh)"
|
|
161
|
+
description:
|
|
162
|
+
type: string
|
|
163
|
+
required: false
|
|
164
|
+
description: "Script description"
|
|
165
|
+
experimental:
|
|
166
|
+
type: boolean
|
|
167
|
+
required: false
|
|
168
|
+
default: false
|
|
169
|
+
description: "Mark as experimental (requires --experimental flag to install)"
|
|
170
|
+
# Templates: Source code files, configurations, and project scaffolding
|
|
171
|
+
#
|
|
172
|
+
# Templates are installed to agent/files/ (preserving subdirectory structure)
|
|
173
|
+
# NOT to project root like patterns/commands/designs go to agent/
|
|
174
|
+
# Users copy files from agent/files/ to their project as needed
|
|
175
|
+
#
|
|
176
|
+
# Variable Substitution:
|
|
177
|
+
# - Templates can contain {{VARIABLE_NAME}} placeholders
|
|
178
|
+
# - User prompted for values during installation
|
|
179
|
+
# - Variables must be declared in variables array
|
|
180
|
+
#
|
|
181
|
+
# Security:
|
|
182
|
+
# - target paths validated (no ../, no absolute paths)
|
|
183
|
+
# - User warned when overwriting existing files
|
|
184
|
+
# - Conflict detection before overwriting
|
|
185
|
+
#
|
|
186
|
+
# Validation Rules:
|
|
187
|
+
# 1. name must be valid file path (no .., no absolute paths)
|
|
188
|
+
# 2. target must be relative path (starts with ./ or directory name)
|
|
189
|
+
# 3. target must not escape project root (no ../)
|
|
190
|
+
# 4. variables must be UPPER_SNAKE_CASE
|
|
191
|
+
# 5. File must exist in agent/files/ directory
|
|
192
|
+
# 6. If experimental: true, file must have appropriate metadata
|
|
193
|
+
files:
|
|
194
|
+
type: array
|
|
195
|
+
item_type: object
|
|
196
|
+
required: false
|
|
197
|
+
description: "Template source files (code, configs, etc.) to bundle with package"
|
|
198
|
+
item_fields:
|
|
199
|
+
name:
|
|
200
|
+
type: string
|
|
201
|
+
required: true
|
|
202
|
+
pattern: "^[a-zA-Z0-9_/.@-]+$"
|
|
203
|
+
description: "Path to template file relative to agent/files/ directory"
|
|
204
|
+
examples:
|
|
205
|
+
- "config/tsconfig.json"
|
|
206
|
+
- "src/schemas/example.schema.ts"
|
|
207
|
+
- "config/package.json.template"
|
|
208
|
+
description:
|
|
209
|
+
type: string
|
|
210
|
+
required: true
|
|
211
|
+
min_length: 10
|
|
212
|
+
max_length: 200
|
|
213
|
+
description: "What this template provides"
|
|
214
|
+
target:
|
|
215
|
+
type: string
|
|
216
|
+
required: true
|
|
217
|
+
pattern: "^\\./|^[a-zA-Z0-9_/-]+/$"
|
|
218
|
+
description: "Where to install (relative to project root, must be relative path)"
|
|
219
|
+
examples:
|
|
220
|
+
- "./"
|
|
221
|
+
- "src/schemas/"
|
|
222
|
+
- "config/"
|
|
223
|
+
required:
|
|
224
|
+
type: boolean
|
|
225
|
+
required: false
|
|
226
|
+
default: false
|
|
227
|
+
description: "Must be installed (true) or optional (false)"
|
|
228
|
+
variables:
|
|
229
|
+
type: array
|
|
230
|
+
item_type: string
|
|
231
|
+
required: false
|
|
232
|
+
description: "Placeholder variables for {{VARIABLE}} substitution in template"
|
|
233
|
+
item_pattern: "^[A-Z_][A-Z0-9_]*$"
|
|
234
|
+
examples:
|
|
235
|
+
- "PACKAGE_NAME"
|
|
236
|
+
- "AUTHOR_NAME"
|
|
237
|
+
- "PROJECT_DESCRIPTION"
|
|
238
|
+
experimental:
|
|
239
|
+
type: boolean
|
|
240
|
+
required: false
|
|
241
|
+
default: false
|
|
242
|
+
description: "Mark as experimental (requires --experimental flag to install)"
|
|
243
|
+
|
|
244
|
+
requires:
|
|
245
|
+
type: object
|
|
246
|
+
required: false
|
|
247
|
+
description: "Compatibility requirements"
|
|
248
|
+
fields:
|
|
249
|
+
acp:
|
|
250
|
+
type: string
|
|
251
|
+
pattern: "^>=?[0-9]+\\.[0-9]+\\.[0-9]+$"
|
|
252
|
+
description: "Minimum ACP version (e.g., >=2.0.0)"
|
|
253
|
+
npm:
|
|
254
|
+
type: object
|
|
255
|
+
required: false
|
|
256
|
+
description: "Required npm packages"
|
|
257
|
+
pip:
|
|
258
|
+
type: object
|
|
259
|
+
required: false
|
|
260
|
+
description: "Required Python packages"
|
|
261
|
+
cargo:
|
|
262
|
+
type: object
|
|
263
|
+
required: false
|
|
264
|
+
description: "Required Rust packages"
|
|
265
|
+
go:
|
|
266
|
+
type: object
|
|
267
|
+
required: false
|
|
268
|
+
description: "Required Go packages"
|
|
269
|
+
|
|
270
|
+
# Reserved package names that cannot be used
|
|
271
|
+
reserved_names:
|
|
272
|
+
- acp
|
|
273
|
+
- local
|
|
274
|
+
- core
|
|
275
|
+
- system
|
|
276
|
+
- global
|