@vibetasks/mcp-server 0.6.5 → 0.6.6
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/README.md +117 -2
- package/dist/human-tasks-I5NY4ML3.js +454 -0
- package/dist/index.js +5736 -317
- package/dist/session-start-S2KRSBNH.js +90 -0
- package/package.json +60 -59
- package/dist/session-start-OIAJ7YIL.js +0 -49
package/README.md
CHANGED
|
@@ -4,7 +4,10 @@ Model Context Protocol (MCP) server for VibeTasks integration with Claude Code,
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
7
|
+
- **14 MCP Tools** for full task management + RLM codebase queries
|
|
8
|
+
- 11 task tools (create, read, update, delete, search, complete, vibing status, context notes, batch create with subtasks, log sessions)
|
|
9
|
+
- 3 RLM tools (query massive codebases, get stats, clear cache)
|
|
10
|
+
- **RLM (Recursive Language Models)**: Query 10M+ token codebases with 29% better accuracy and 3x cost reduction
|
|
8
11
|
- **Status Workflow**: `todo` -> `vibing` -> `done` - track what you're actively working on
|
|
9
12
|
- **Context Notes**: "Where I left off" notes to capture your progress and next steps
|
|
10
13
|
- **Project Auto-Detection**: Automatically tags tasks with project name from git repository
|
|
@@ -46,13 +49,27 @@ Edit your Claude Code config file:
|
|
|
46
49
|
"command": "vibetasks-mcp",
|
|
47
50
|
"env": {
|
|
48
51
|
"TASKFLOW_SUPABASE_URL": "https://your-project.supabase.co",
|
|
49
|
-
"TASKFLOW_SUPABASE_KEY": "your-supabase-anon-key"
|
|
52
|
+
"TASKFLOW_SUPABASE_KEY": "your-supabase-anon-key",
|
|
53
|
+
"ANTHROPIC_API_KEY": "sk-ant-your-key-here"
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
```
|
|
55
59
|
|
|
60
|
+
**Note:** `ANTHROPIC_API_KEY` is optional but required for RLM tools (`rlm_query_codebase`, `rlm_get_codebase_stats`). If not provided, only the 11 standard task tools will be available.
|
|
61
|
+
|
|
62
|
+
**Environment Variables:**
|
|
63
|
+
- `TASKFLOW_SUPABASE_URL` - Your Supabase project URL (required)
|
|
64
|
+
- `TASKFLOW_SUPABASE_KEY` - Your Supabase anon key (required)
|
|
65
|
+
- `ANTHROPIC_API_KEY` - Claude API key for RLM tools (optional)
|
|
66
|
+
- `RLM_MAX_DEPTH` - Max recursion depth for RLM (default: 3)
|
|
67
|
+
- `RLM_VERBOSE` - Enable RLM debug logs (default: false)
|
|
68
|
+
- `RLM_SUB_MODEL` - Model for RLM sub-queries (default: claude-haiku-4-5-20241022)
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
```
|
|
72
|
+
|
|
56
73
|
**Restart Claude Code** after updating the config.
|
|
57
74
|
|
|
58
75
|
### Manual Installation (Development)
|
|
@@ -152,6 +169,31 @@ Create a parent task with subtasks in one call (perfect for TodoWrite integratio
|
|
|
152
169
|
|
|
153
170
|
**Use case:** When using Claude's TodoWrite feature, automatically mirror your todo list to VibeTasks for persistent tracking beyond the session.
|
|
154
171
|
|
|
172
|
+
#### Using Copyable Values in Instructions
|
|
173
|
+
|
|
174
|
+
When creating tasks with specific values users need to copy (app names, IDs, URLs, etc.), use **markdown backticks** in the `instructions` field to make values copyable with one click:
|
|
175
|
+
|
|
176
|
+
**Example:**
|
|
177
|
+
```typescript
|
|
178
|
+
{
|
|
179
|
+
title: "Create OAuth App",
|
|
180
|
+
instructions: "1. Go to Apple Developer Console\n2. Create app with name: `VibeTasks`\n3. Set Bundle ID: `com.sparktory.vibetasks`\n4. Save the **App ID** for later"
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**What the user sees:**
|
|
185
|
+
- "Create app with name:" as plain text
|
|
186
|
+
- `VibeTasks` highlighted with a hover copy button
|
|
187
|
+
- `com.sparktory.vibetasks` highlighted with copy button
|
|
188
|
+
- "App ID" in bold (markdown)
|
|
189
|
+
|
|
190
|
+
**Supported markdown in instructions:**
|
|
191
|
+
- `` `inline code` `` → Copyable with button
|
|
192
|
+
- `**bold**` → Emphasized text
|
|
193
|
+
- `*italic*` → Italic text
|
|
194
|
+
- `[links](url)` → Clickable links
|
|
195
|
+
- ` ```code blocks``` ` → Multi-line code
|
|
196
|
+
|
|
155
197
|
#### list_tasks
|
|
156
198
|
Get tasks with optional status filter:
|
|
157
199
|
```
|
|
@@ -231,6 +273,79 @@ Manually log a session:
|
|
|
231
273
|
duration_minutes: 45
|
|
232
274
|
```
|
|
233
275
|
|
|
276
|
+
### RLM Tools (Recursive Language Models)
|
|
277
|
+
|
|
278
|
+
RLM tools enable querying massive codebases (10M+ tokens) with no context window limits. Based on MIT's RLM paper, these tools treat your codebase as an external environment that can be recursively explored.
|
|
279
|
+
|
|
280
|
+
#### rlm_query_codebase
|
|
281
|
+
|
|
282
|
+
Query your entire codebase with complex questions:
|
|
283
|
+
|
|
284
|
+
```
|
|
285
|
+
@vibetasks rlm_query_codebase
|
|
286
|
+
query: "How does user authentication work from login button to database?"
|
|
287
|
+
focused: true
|
|
288
|
+
maxFiles: 100
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**Parameters:**
|
|
292
|
+
- `query` (required): Your question about the codebase
|
|
293
|
+
- `focused` (default: true): Pre-filter relevant files using semantic search (faster, cheaper)
|
|
294
|
+
- `maxFiles` (default: 100): Maximum files to include in focused mode
|
|
295
|
+
- `verbose` (default: false): Show detailed execution logs
|
|
296
|
+
- `maxDepth` (default: 3): Maximum recursion depth
|
|
297
|
+
|
|
298
|
+
**Example Queries:**
|
|
299
|
+
- "List all API endpoints with their HTTP methods and routes"
|
|
300
|
+
- "Find all TODO and FIXME comments grouped by priority"
|
|
301
|
+
- "What files depend on UserService and how do they use it?"
|
|
302
|
+
- "How does the payment flow work end-to-end?"
|
|
303
|
+
- "Find all database queries that don't use prepared statements"
|
|
304
|
+
|
|
305
|
+
**Benefits:**
|
|
306
|
+
- **No context limits**: Handles 10M+ tokens (thousands of files)
|
|
307
|
+
- **Better accuracy**: 29% more accurate than base LLM (MIT paper)
|
|
308
|
+
- **Lower cost**: 3x cheaper than loading full context
|
|
309
|
+
- **No information loss**: Uses recursive search, not summarization
|
|
310
|
+
|
|
311
|
+
**Cost:**
|
|
312
|
+
- Small codebase (~500k tokens): $0.01 - $0.05 per query
|
|
313
|
+
- Large codebase (10M tokens): $0.50 - $2.00 per query
|
|
314
|
+
- vs Base LLM: 15-60x cost reduction
|
|
315
|
+
|
|
316
|
+
**How it works:**
|
|
317
|
+
1. Loads codebase into Python REPL environment (not LLM context)
|
|
318
|
+
2. LLM writes Python code to search/filter context
|
|
319
|
+
3. LLM recursively calls itself on relevant chunks
|
|
320
|
+
4. Aggregates results and returns answer
|
|
321
|
+
|
|
322
|
+
#### rlm_get_codebase_stats
|
|
323
|
+
|
|
324
|
+
Get statistics about your codebase without running a query:
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
@vibetasks rlm_get_codebase_stats
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Returns:
|
|
331
|
+
- File count
|
|
332
|
+
- Total size (bytes)
|
|
333
|
+
- Estimated tokens
|
|
334
|
+
- Estimated cost for RLM query
|
|
335
|
+
- Top file types
|
|
336
|
+
|
|
337
|
+
Use this before running expensive queries to understand scope.
|
|
338
|
+
|
|
339
|
+
#### rlm_clear_cache
|
|
340
|
+
|
|
341
|
+
Clear the RLM context cache to force reloading files:
|
|
342
|
+
|
|
343
|
+
```
|
|
344
|
+
@vibetasks rlm_clear_cache
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
Useful when files have changed and you want fresh context.
|
|
348
|
+
|
|
234
349
|
### MCP Resources
|
|
235
350
|
|
|
236
351
|
Resources provide automatic context to AI:
|
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
// src/templates/human-tasks/apple-oauth.ts
|
|
2
|
+
function createAppleOAuthTask(config) {
|
|
3
|
+
return {
|
|
4
|
+
title: "\u{1F464} Setup Apple Sign In",
|
|
5
|
+
description: `Configure Apple OAuth for ${config.appName}. This requires access to Apple Developer Portal (humans only).`,
|
|
6
|
+
subtasks: [
|
|
7
|
+
{
|
|
8
|
+
title: "Create App ID in Apple Developer Portal",
|
|
9
|
+
completed: false,
|
|
10
|
+
link: {
|
|
11
|
+
url: "https://developer.apple.com/account/resources/identifiers/list",
|
|
12
|
+
label: "Open Apple Developer"
|
|
13
|
+
},
|
|
14
|
+
instructions: `1. Click **+** to create new identifier
|
|
15
|
+
2. Select **App IDs** \u2192 Continue
|
|
16
|
+
3. Choose **App** \u2192 Continue
|
|
17
|
+
4. Enter details:
|
|
18
|
+
- Description: \`${config.appName}\`
|
|
19
|
+
- Bundle ID: \`${config.bundleId}\`
|
|
20
|
+
- Capabilities: Enable **Sign in with Apple**
|
|
21
|
+
5. Click **Register**
|
|
22
|
+
6. **Save the App ID** (you'll need it in next step)`,
|
|
23
|
+
warning: "Don't share your Team ID publicly. It's sensitive.",
|
|
24
|
+
tip: "You can find your Team ID in Account \u2192 Membership"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: "Create Services ID",
|
|
28
|
+
completed: false,
|
|
29
|
+
link: {
|
|
30
|
+
url: "https://developer.apple.com/account/resources/identifiers/list/serviceId",
|
|
31
|
+
label: "Open Services"
|
|
32
|
+
},
|
|
33
|
+
instructions: `1. Click **+** to create new identifier
|
|
34
|
+
2. Select **Services IDs** \u2192 Continue
|
|
35
|
+
3. Enter details:
|
|
36
|
+
- Description: \`${config.appName} Web\`
|
|
37
|
+
- Identifier: \`${config.bundleId}.web\`
|
|
38
|
+
- Enable **Sign in with Apple**
|
|
39
|
+
4. Click **Continue** \u2192 **Register**
|
|
40
|
+
5. Click on the Services ID you just created
|
|
41
|
+
6. Click **Configure** next to Sign in with Apple
|
|
42
|
+
7. Add your domain and return URLs:
|
|
43
|
+
- Domains: \`localhost\` (for dev), your production domain
|
|
44
|
+
- Return URLs: \`http://localhost:3000/api/auth/callback/apple\`
|
|
45
|
+
8. Click **Done** \u2192 **Save**
|
|
46
|
+
9. **Copy the Services ID** (you'll give this to VibBot)`,
|
|
47
|
+
warning: "Return URLs must match exactly (including http/https)",
|
|
48
|
+
tip: "Add both localhost (dev) and production URLs to avoid reconfiguring later"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: "Generate Private Key",
|
|
52
|
+
completed: false,
|
|
53
|
+
link: {
|
|
54
|
+
url: "https://developer.apple.com/account/resources/authkeys/list",
|
|
55
|
+
label: "Open Keys"
|
|
56
|
+
},
|
|
57
|
+
instructions: `1. Click **+** to create new key
|
|
58
|
+
2. Enter key name: \`${config.appName} Sign In Key\`
|
|
59
|
+
3. Enable **Sign in with Apple**
|
|
60
|
+
4. Click **Configure** \u2192 Select your App ID \u2192 **Save**
|
|
61
|
+
5. Click **Continue** \u2192 **Register**
|
|
62
|
+
6. **Download the .p8 key file** (you can only download once!)
|
|
63
|
+
7. **Save the Key ID** (10 characters, shown at the top)
|
|
64
|
+
|
|
65
|
+
\u26A0\uFE0F **CRITICAL**: Store the .p8 file safely. You cannot download it again.`,
|
|
66
|
+
warning: "You can only download the private key ONCE. Save it immediately.",
|
|
67
|
+
tip: "Store in password manager or .secrets/ folder (never commit to git)"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: "Hand back to VibBot",
|
|
71
|
+
completed: false,
|
|
72
|
+
aiPrompt: `I've completed Apple OAuth setup. Here are the credentials:
|
|
73
|
+
|
|
74
|
+
Services ID: [paste here]
|
|
75
|
+
Team ID: [paste here]
|
|
76
|
+
Key ID: [paste here]
|
|
77
|
+
Private Key Path: [path to .p8 file]
|
|
78
|
+
|
|
79
|
+
Please configure the app with these credentials.`,
|
|
80
|
+
instructions: `Copy the above template, fill in your credentials, and send to VibBot.
|
|
81
|
+
|
|
82
|
+
VibBot will:
|
|
83
|
+
1. Store credentials in .env file (never committed)
|
|
84
|
+
2. Configure auth provider
|
|
85
|
+
3. Test the integration
|
|
86
|
+
4. Create a test task for you to verify login works`,
|
|
87
|
+
tip: "VibBot will guide you through testing once credentials are configured"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// src/templates/human-tasks/google-oauth.ts
|
|
94
|
+
function createGoogleOAuthTask(config) {
|
|
95
|
+
return {
|
|
96
|
+
title: "\u{1F464} Setup Google OAuth 2.0",
|
|
97
|
+
description: `Configure Google OAuth for ${config.appName}. Requires Google Cloud Console access.`,
|
|
98
|
+
subtasks: [
|
|
99
|
+
{
|
|
100
|
+
title: "Create Google Cloud Project",
|
|
101
|
+
completed: false,
|
|
102
|
+
link: {
|
|
103
|
+
url: "https://console.cloud.google.com/projectcreate",
|
|
104
|
+
label: "Open Google Cloud Console"
|
|
105
|
+
},
|
|
106
|
+
instructions: `1. Enter project details:
|
|
107
|
+
- Project name: \`${config.appName}\`
|
|
108
|
+
- Organization: (optional, select if you have one)
|
|
109
|
+
2. Click **Create**
|
|
110
|
+
3. Wait for project creation (~30 seconds)
|
|
111
|
+
4. **Copy the Project ID** (you'll need it later)`,
|
|
112
|
+
tip: "Project ID is permanent and used in API calls. Project name can be changed later."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
title: "Enable Google Sign-In API",
|
|
116
|
+
completed: false,
|
|
117
|
+
link: {
|
|
118
|
+
url: "https://console.cloud.google.com/apis/library",
|
|
119
|
+
label: "Open API Library"
|
|
120
|
+
},
|
|
121
|
+
instructions: `1. Make sure your project is selected (top dropdown)
|
|
122
|
+
2. Search for **"Google+ API"** or **"Google Identity"**
|
|
123
|
+
3. Click on **Google+ API**
|
|
124
|
+
4. Click **Enable**
|
|
125
|
+
5. Wait for activation (~10 seconds)`,
|
|
126
|
+
warning: "Make sure you selected the correct project before enabling APIs"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
title: "Configure OAuth Consent Screen",
|
|
130
|
+
completed: false,
|
|
131
|
+
link: {
|
|
132
|
+
url: "https://console.cloud.google.com/apis/credentials/consent",
|
|
133
|
+
label: "Open Consent Screen"
|
|
134
|
+
},
|
|
135
|
+
instructions: `1. Select **User Type**:
|
|
136
|
+
- **External** (for public apps)
|
|
137
|
+
- **Internal** (for Google Workspace only)
|
|
138
|
+
2. Click **Create**
|
|
139
|
+
3. Fill in App Information:
|
|
140
|
+
- App name: \`${config.appName}\`
|
|
141
|
+
- User support email: [your email]
|
|
142
|
+
- Developer contact: [your email]
|
|
143
|
+
4. Click **Save and Continue**
|
|
144
|
+
5. Scopes: Click **Add or Remove Scopes**
|
|
145
|
+
- Add: \`email\`, \`profile\`, \`openid\`
|
|
146
|
+
${config.scopes.length > 0 ? ` - Also add: ${config.scopes.map((s) => `\`${s}\``).join(", ")}` : ""}
|
|
147
|
+
6. Click **Update** \u2192 **Save and Continue**
|
|
148
|
+
7. Test users (for External apps):
|
|
149
|
+
- Add your email for testing
|
|
150
|
+
8. Click **Save and Continue** \u2192 **Back to Dashboard**`,
|
|
151
|
+
tip: "Start with External type. You can change to Internal later if you have Google Workspace."
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
title: "Create OAuth Client ID",
|
|
155
|
+
completed: false,
|
|
156
|
+
link: {
|
|
157
|
+
url: "https://console.cloud.google.com/apis/credentials",
|
|
158
|
+
label: "Open Credentials"
|
|
159
|
+
},
|
|
160
|
+
instructions: `1. Click **Create Credentials** \u2192 **OAuth client ID**
|
|
161
|
+
2. Application type: **Web application**
|
|
162
|
+
3. Name: \`${config.appName} Web Client\`
|
|
163
|
+
4. Authorized redirect URIs:
|
|
164
|
+
${config.redirectUris.map((uri) => ` - \`${uri}\``).join("\n")}
|
|
165
|
+
5. Click **Create**
|
|
166
|
+
6. **Copy both**:
|
|
167
|
+
- Client ID (long string starting with numbers)
|
|
168
|
+
- Client Secret (random string)
|
|
169
|
+
7. Click **OK**
|
|
170
|
+
|
|
171
|
+
\u{1F389} You now have OAuth credentials!`,
|
|
172
|
+
warning: "Client Secret is sensitive - store it in .env file, never commit to git",
|
|
173
|
+
tip: "Add both localhost (dev) and production URLs now to avoid reconfiguring"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
title: "Hand back to VibBot",
|
|
177
|
+
completed: false,
|
|
178
|
+
aiPrompt: `I've completed Google OAuth setup. Here are the credentials:
|
|
179
|
+
|
|
180
|
+
Client ID: [paste here]
|
|
181
|
+
Client Secret: [paste here]
|
|
182
|
+
Project ID: [paste here]
|
|
183
|
+
|
|
184
|
+
Please configure the app with these credentials.`,
|
|
185
|
+
instructions: `Copy the template above, fill in your credentials, and send to VibBot.
|
|
186
|
+
|
|
187
|
+
VibBot will:
|
|
188
|
+
1. Store credentials in .env.local file
|
|
189
|
+
2. Configure NextAuth or your auth provider
|
|
190
|
+
3. Test the integration
|
|
191
|
+
4. Create a test task for you to verify "Sign in with Google" works`,
|
|
192
|
+
tip: "VibBot will create a secure .env.local file that is gitignored automatically"
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// src/templates/human-tasks/github-app.ts
|
|
199
|
+
function createGitHubAppTask(config) {
|
|
200
|
+
return {
|
|
201
|
+
title: "\u{1F464} Create GitHub App",
|
|
202
|
+
description: `Setup GitHub App for ${config.appName}. Requires GitHub account with owner permissions.`,
|
|
203
|
+
subtasks: [
|
|
204
|
+
{
|
|
205
|
+
title: "Create New GitHub App",
|
|
206
|
+
completed: false,
|
|
207
|
+
link: {
|
|
208
|
+
url: "https://github.com/settings/apps/new",
|
|
209
|
+
label: "Create GitHub App"
|
|
210
|
+
},
|
|
211
|
+
instructions: `1. Fill in basic information:
|
|
212
|
+
- GitHub App name: \`${config.appName}\`
|
|
213
|
+
- Homepage URL: \`https://github.com/yourusername/${config.appName.toLowerCase().replace(/\s+/g, "-")}\`
|
|
214
|
+
- Description: What your app does
|
|
215
|
+
2. Webhook:
|
|
216
|
+
- Active: **\u2713 Checked**
|
|
217
|
+
- Webhook URL: \`${config.webhookUrl}\`
|
|
218
|
+
- Webhook secret: (click Generate) \u2192 **Copy this!**
|
|
219
|
+
3. Permissions:
|
|
220
|
+
${config.permissions.map((p) => ` - ${p.name}: **${p.access}**`).join("\n")}
|
|
221
|
+
4. Subscribe to events:
|
|
222
|
+
${config.events.map((e) => ` - [x] ${e}`).join("\n")}
|
|
223
|
+
5. Where can this app be installed: **Only on this account**
|
|
224
|
+
6. Click **Create GitHub App**`,
|
|
225
|
+
warning: "Save the webhook secret immediately - you cannot view it again!",
|
|
226
|
+
tip: "Use ngrok for webhook URL during development: `ngrok http 3000`"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
title: "Generate Private Key",
|
|
230
|
+
completed: false,
|
|
231
|
+
instructions: `After creating the app:
|
|
232
|
+
|
|
233
|
+
1. Scroll to **Private keys** section
|
|
234
|
+
2. Click **Generate a private key**
|
|
235
|
+
3. A .pem file will download automatically
|
|
236
|
+
4. **Save this file securely** (e.g., \`.secrets/github-app-key.pem\`)
|
|
237
|
+
|
|
238
|
+
\u26A0\uFE0F **CRITICAL**: This key authenticates your app. Never commit to git.`,
|
|
239
|
+
warning: "Private key can only be generated once per key. Download immediately.",
|
|
240
|
+
tip: "Add *.pem to your .gitignore if not already there"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
title: "Get App ID and Installation ID",
|
|
244
|
+
completed: false,
|
|
245
|
+
instructions: `1. Scroll to **About** section
|
|
246
|
+
- **Copy App ID** (6-digit number)
|
|
247
|
+
|
|
248
|
+
2. Scroll to **Install App** (left sidebar)
|
|
249
|
+
3. Click **Install** next to your username/org
|
|
250
|
+
4. Choose:
|
|
251
|
+
- **All repositories** or **Only select repositories**
|
|
252
|
+
5. Click **Install**
|
|
253
|
+
6. After installation, note the URL:
|
|
254
|
+
- Format: \`https://github.com/settings/installations/XXXXXXXX\`
|
|
255
|
+
- **Copy the installation ID** (the XXXXXXXX number)`,
|
|
256
|
+
tip: "Installation ID is per-account. If you install on multiple orgs, each has its own ID."
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
title: "Hand back to VibBot",
|
|
260
|
+
completed: false,
|
|
261
|
+
aiPrompt: `I've completed GitHub App setup. Here are the credentials:
|
|
262
|
+
|
|
263
|
+
App ID: [paste here]
|
|
264
|
+
Installation ID: [paste here]
|
|
265
|
+
Webhook Secret: [paste here]
|
|
266
|
+
Private Key Path: [path to .pem file]
|
|
267
|
+
|
|
268
|
+
Please configure the app with these credentials.`,
|
|
269
|
+
instructions: `Copy the template, fill in credentials, send to VibBot.
|
|
270
|
+
|
|
271
|
+
VibBot will:
|
|
272
|
+
1. Store credentials in .env file
|
|
273
|
+
2. Configure webhook endpoint
|
|
274
|
+
3. Test webhook delivery
|
|
275
|
+
4. Create integration tests`,
|
|
276
|
+
codeSnippet: {
|
|
277
|
+
language: "bash",
|
|
278
|
+
code: `# Test webhook (VibBot will do this automatically)
|
|
279
|
+
curl -X POST ${config.webhookUrl} \\
|
|
280
|
+
-H "Content-Type: application/json" \\
|
|
281
|
+
-H "X-GitHub-Event: ping" \\
|
|
282
|
+
-d '{"zen": "Design for failure."}'`,
|
|
283
|
+
label: "Webhook test command"
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
]
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// src/templates/human-tasks/stripe-integration.ts
|
|
291
|
+
function createStripeIntegrationTask(config) {
|
|
292
|
+
return {
|
|
293
|
+
title: "\u{1F464} Setup Stripe Payment Processing",
|
|
294
|
+
description: `Configure Stripe for ${config.appName}. Requires Stripe account (free to create).`,
|
|
295
|
+
subtasks: [
|
|
296
|
+
{
|
|
297
|
+
title: "Create Stripe Account",
|
|
298
|
+
completed: false,
|
|
299
|
+
link: {
|
|
300
|
+
url: "https://dashboard.stripe.com/register",
|
|
301
|
+
label: "Sign up for Stripe"
|
|
302
|
+
},
|
|
303
|
+
instructions: `1. Create Stripe account (if you don't have one)
|
|
304
|
+
2. Verify your email
|
|
305
|
+
3. Complete business details:
|
|
306
|
+
- Business name: \`${config.appName}\`
|
|
307
|
+
- Business type: Individual or Company
|
|
308
|
+
- Industry: Software
|
|
309
|
+
4. Skip tax forms for now (can complete later)
|
|
310
|
+
5. Click **Start using Stripe**`,
|
|
311
|
+
tip: "You can use Stripe in Test Mode before activating your account (no business verification needed)"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
title: "Get API Keys",
|
|
315
|
+
completed: false,
|
|
316
|
+
link: {
|
|
317
|
+
url: "https://dashboard.stripe.com/test/apikeys",
|
|
318
|
+
label: "View API Keys"
|
|
319
|
+
},
|
|
320
|
+
instructions: `1. Make sure you're in **Test Mode** (toggle in top right)
|
|
321
|
+
2. Find your keys:
|
|
322
|
+
- **Publishable key**: Starts with \`pk_test_\`
|
|
323
|
+
- **Secret key**: Click **Reveal** \u2192 Starts with \`sk_test_\`
|
|
324
|
+
3. **Copy both keys**
|
|
325
|
+
|
|
326
|
+
\u{1F4DD} **Note**: These are TEST keys. You'll get production keys later.`,
|
|
327
|
+
warning: "Secret key is sensitive - never commit to git or share publicly",
|
|
328
|
+
tip: "Test mode is free and unlimited. Use it for development."
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
title: "Create Products/Prices",
|
|
332
|
+
completed: false,
|
|
333
|
+
link: {
|
|
334
|
+
url: "https://dashboard.stripe.com/test/products",
|
|
335
|
+
label: "Create Products"
|
|
336
|
+
},
|
|
337
|
+
instructions: `For each product you want to sell:
|
|
338
|
+
|
|
339
|
+
1. Click **Add product**
|
|
340
|
+
2. Enter details:
|
|
341
|
+
- Name: Product name
|
|
342
|
+
- Description: What customer gets
|
|
343
|
+
3. Pricing:
|
|
344
|
+
- One-time or Recurring (subscription)
|
|
345
|
+
- Amount: Price in dollars
|
|
346
|
+
- Currency: USD
|
|
347
|
+
4. Click **Add product**
|
|
348
|
+
5. **Copy the Price ID** (starts with \`price_\`)
|
|
349
|
+
|
|
350
|
+
Repeat for all products: ${config.products.join(", ")}`,
|
|
351
|
+
tip: "You can create multiple price points for the same product (e.g., monthly/yearly)"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
title: "Setup Webhook Endpoint",
|
|
355
|
+
completed: false,
|
|
356
|
+
link: {
|
|
357
|
+
url: "https://dashboard.stripe.com/test/webhooks",
|
|
358
|
+
label: "Configure Webhooks"
|
|
359
|
+
},
|
|
360
|
+
instructions: `1. Click **Add endpoint**
|
|
361
|
+
2. Endpoint URL: \`https://yourdomain.com/api/webhooks/stripe\`
|
|
362
|
+
- For local dev: Use ngrok (\`ngrok http 3000\`)
|
|
363
|
+
- Example: \`https://abc123.ngrok.io/api/webhooks/stripe\`
|
|
364
|
+
3. Select events to listen to:
|
|
365
|
+
${config.webhookEvents.map((e) => ` - [x] ${e}`).join("\n")}
|
|
366
|
+
4. Click **Add endpoint**
|
|
367
|
+
5. **Copy the Signing Secret** (starts with \`whsec_\`)`,
|
|
368
|
+
warning: "Webhook signing secret is used to verify events are from Stripe. Keep it secure.",
|
|
369
|
+
codeSnippet: {
|
|
370
|
+
language: "bash",
|
|
371
|
+
code: `# Install Stripe CLI for local webhook testing
|
|
372
|
+
brew install stripe/stripe-cli/stripe
|
|
373
|
+
|
|
374
|
+
# Login
|
|
375
|
+
stripe login
|
|
376
|
+
|
|
377
|
+
# Forward webhooks to localhost
|
|
378
|
+
stripe listen --forward-to localhost:3000/api/webhooks/stripe`,
|
|
379
|
+
label: "Local webhook testing (optional)"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
title: "Enable Customer Portal (Optional)",
|
|
384
|
+
completed: false,
|
|
385
|
+
link: {
|
|
386
|
+
url: "https://dashboard.stripe.com/test/settings/billing/portal",
|
|
387
|
+
label: "Configure Portal"
|
|
388
|
+
},
|
|
389
|
+
instructions: `If you want customers to manage their subscriptions:
|
|
390
|
+
|
|
391
|
+
1. Click **Activate test link**
|
|
392
|
+
2. Configure features:
|
|
393
|
+
- [x] Update payment method
|
|
394
|
+
- [x] Cancel subscription
|
|
395
|
+
- [x] View invoice history
|
|
396
|
+
3. Branding:
|
|
397
|
+
- Accent color: Your brand color
|
|
398
|
+
- Logo: (optional)
|
|
399
|
+
4. Click **Save**
|
|
400
|
+
5. **Copy the Portal link** (for testing)`,
|
|
401
|
+
tip: "Customer Portal lets users manage billing without contacting you"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
title: "Hand back to VibBot",
|
|
405
|
+
completed: false,
|
|
406
|
+
aiPrompt: `I've completed Stripe setup. Here are the credentials:
|
|
407
|
+
|
|
408
|
+
**Test Mode Keys:**
|
|
409
|
+
Publishable Key: [paste pk_test_...]
|
|
410
|
+
Secret Key: [paste sk_test_...]
|
|
411
|
+
Webhook Signing Secret: [paste whsec_...]
|
|
412
|
+
|
|
413
|
+
**Product IDs:**
|
|
414
|
+
${config.products.map((p) => `- ${p}: [paste price_...]`).join("\n")}
|
|
415
|
+
|
|
416
|
+
Please configure the app with these credentials.`,
|
|
417
|
+
instructions: `Copy the template, fill in credentials, send to VibBot.
|
|
418
|
+
|
|
419
|
+
VibBot will:
|
|
420
|
+
1. Store credentials in .env.local file
|
|
421
|
+
2. Configure Stripe SDK
|
|
422
|
+
3. Create payment endpoint
|
|
423
|
+
4. Setup webhook handler
|
|
424
|
+
5. Create test purchase flow`,
|
|
425
|
+
tip: "VibBot will create a test checkout that you can verify with Stripe test card: 4242 4242 4242 4242"
|
|
426
|
+
}
|
|
427
|
+
]
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// src/templates/human-tasks/index.ts
|
|
432
|
+
var TEMPLATE_KEYWORDS = {
|
|
433
|
+
"apple-oauth": ["apple oauth", "apple sign in", "sign in with apple", "apple developer"],
|
|
434
|
+
"google-oauth": ["google oauth", "google sign in", "sign in with google", "google cloud console"],
|
|
435
|
+
"github-app": ["github app", "github webhook", "github integration", "github oauth app"],
|
|
436
|
+
"stripe": ["stripe", "payment", "checkout", "subscription", "stripe integration"]
|
|
437
|
+
};
|
|
438
|
+
function detectTemplate(description) {
|
|
439
|
+
const lowerDesc = description.toLowerCase();
|
|
440
|
+
for (const [template, keywords] of Object.entries(TEMPLATE_KEYWORDS)) {
|
|
441
|
+
if (keywords.some((keyword) => lowerDesc.includes(keyword))) {
|
|
442
|
+
return template;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return null;
|
|
446
|
+
}
|
|
447
|
+
export {
|
|
448
|
+
TEMPLATE_KEYWORDS,
|
|
449
|
+
createAppleOAuthTask,
|
|
450
|
+
createGitHubAppTask,
|
|
451
|
+
createGoogleOAuthTask,
|
|
452
|
+
createStripeIntegrationTask,
|
|
453
|
+
detectTemplate
|
|
454
|
+
};
|