purple-ai 0.0.8 → 0.0.9

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.
Binary file
Binary file
Binary file
@@ -8,11 +8,15 @@
8
8
  * - purple_update_status: Full status update with all fields
9
9
  * - purple_set_phase: Quick helper to set just the phase
10
10
  * - purple_report_progress: Report ticket progress during implementation
11
+ * - purple_set_feature_folder: Set feature folder for progress.json monitoring
12
+ * - purple_progress_start_ticket: Mark a ticket as in_progress
13
+ * - purple_progress_complete_ticket: Mark a ticket as completed
11
14
  *
12
15
  * Communication flow:
13
16
  * Claude Agent -> MCP Server (stdio) -> HTTP POST localhost:7685 -> Purple CLI
14
17
  *
15
18
  * Changelog:
19
+ * - 2026-01-13: Added feature folder and progress tracking tools
16
20
  * - 2026-01-12: Initial implementation
17
21
  */
18
22
  export {};
@@ -8,11 +8,15 @@
8
8
  * - purple_update_status: Full status update with all fields
9
9
  * - purple_set_phase: Quick helper to set just the phase
10
10
  * - purple_report_progress: Report ticket progress during implementation
11
+ * - purple_set_feature_folder: Set feature folder for progress.json monitoring
12
+ * - purple_progress_start_ticket: Mark a ticket as in_progress
13
+ * - purple_progress_complete_ticket: Mark a ticket as completed
11
14
  *
12
15
  * Communication flow:
13
16
  * Claude Agent -> MCP Server (stdio) -> HTTP POST localhost:7685 -> Purple CLI
14
17
  *
15
18
  * Changelog:
19
+ * - 2026-01-13: Added feature folder and progress tracking tools
16
20
  * - 2026-01-12: Initial implementation
17
21
  */
18
22
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -21,6 +25,7 @@ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextpro
21
25
  // Purple CLI status server endpoints
22
26
  const PURPLE_STATUS_URL = "http://127.0.0.1:7685/status";
23
27
  const PURPLE_STANDARDS_COMPLETE_URL = "http://127.0.0.1:7685/standards-complete";
28
+ const PURPLE_SET_FEATURE_FOLDER_URL = "http://127.0.0.1:7685/set-feature-folder";
24
29
  // Tool definitions
25
30
  const TOOLS = [
26
31
  {
@@ -137,6 +142,59 @@ const TOOLS = [
137
142
  additionalProperties: false,
138
143
  },
139
144
  },
145
+ {
146
+ name: "purple_set_feature_folder",
147
+ description: "Set the active feature folder for progress tracking. Call this when starting work on a feature to enable real-time progress.json monitoring. The folder should be the feature documentation folder (e.g., 'workbench/documentation/260113-my-feature').",
148
+ inputSchema: {
149
+ type: "object",
150
+ properties: {
151
+ folder: {
152
+ type: "string",
153
+ description: 'Absolute or relative path to the feature folder containing progress.json (e.g., "workbench/documentation/260113-my-feature")',
154
+ },
155
+ },
156
+ required: ["folder"],
157
+ additionalProperties: false,
158
+ },
159
+ },
160
+ {
161
+ name: "purple_progress_start_ticket",
162
+ description: "Mark a ticket as in_progress and show it in the Purple progress panel. Call this when starting work on a ticket.",
163
+ inputSchema: {
164
+ type: "object",
165
+ properties: {
166
+ ticketId: {
167
+ type: "string",
168
+ description: 'The ticket ID (e.g., "FCB-003")',
169
+ },
170
+ ticketName: {
171
+ type: "string",
172
+ description: 'The ticket name/description (e.g., "Firebase authentication service")',
173
+ },
174
+ agent: {
175
+ type: "string",
176
+ description: 'The agent name (e.g., "senior-engineer"). Defaults to "senior-engineer".',
177
+ },
178
+ },
179
+ required: ["ticketId"],
180
+ additionalProperties: false,
181
+ },
182
+ },
183
+ {
184
+ name: "purple_progress_complete_ticket",
185
+ description: "Mark a ticket as completed and remove it from the active list. Call this when a ticket is done.",
186
+ inputSchema: {
187
+ type: "object",
188
+ properties: {
189
+ ticketId: {
190
+ type: "string",
191
+ description: 'The ticket ID (e.g., "FCB-003")',
192
+ },
193
+ },
194
+ required: ["ticketId"],
195
+ additionalProperties: false,
196
+ },
197
+ },
140
198
  ];
141
199
  /**
142
200
  * Sends a status update to the Purple CLI via HTTP POST.
@@ -183,6 +241,26 @@ async function sendStandardsComplete(payload) {
183
241
  console.error("Failed to send standards complete signal (Purple may not be active):", error);
184
242
  }
185
243
  }
244
+ /**
245
+ * Sets the active feature folder for progress.json monitoring.
246
+ */
247
+ async function sendSetFeatureFolder(payload) {
248
+ try {
249
+ const response = await fetch(PURPLE_SET_FEATURE_FOLDER_URL, {
250
+ method: "POST",
251
+ headers: {
252
+ "Content-Type": "application/json",
253
+ },
254
+ body: JSON.stringify(payload),
255
+ });
256
+ if (!response.ok) {
257
+ console.error(`Set feature folder failed with HTTP ${response.status}: ${response.statusText}`);
258
+ }
259
+ }
260
+ catch (error) {
261
+ console.error("Failed to set feature folder (Purple may not be active):", error);
262
+ }
263
+ }
186
264
  /**
187
265
  * Main function to initialize and run the MCP server
188
266
  */
@@ -264,6 +342,39 @@ async function main() {
264
342
  ],
265
343
  };
266
344
  }
345
+ case "purple_set_feature_folder": {
346
+ const typedArgs = args;
347
+ // Send feature folder to Purple for progress.json monitoring
348
+ await sendSetFeatureFolder({ folder: typedArgs.folder });
349
+ return {
350
+ content: [
351
+ {
352
+ type: "text",
353
+ text: `Feature folder set to: ${typedArgs.folder}`,
354
+ },
355
+ ],
356
+ };
357
+ }
358
+ case "purple_progress_start_ticket": {
359
+ const typedArgs = args;
360
+ payload = {
361
+ tool: name,
362
+ ticketId: typedArgs.ticketId,
363
+ ticketName: typedArgs.ticketName || "",
364
+ agent: typedArgs.agent || "senior-engineer",
365
+ ticketAction: "start",
366
+ };
367
+ break;
368
+ }
369
+ case "purple_progress_complete_ticket": {
370
+ const typedArgs = args;
371
+ payload = {
372
+ tool: name,
373
+ ticketId: typedArgs.ticketId,
374
+ ticketAction: "complete",
375
+ };
376
+ break;
377
+ }
267
378
  default:
268
379
  return {
269
380
  content: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "purple-ai",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Purple - AI-powered workspace management CLI that wraps Claude Code",
5
5
  "main": "bin/purple.js",
6
6
  "bin": {