claude-mpm 4.1.17__py3-none-any.whl → 4.1.19__py3-none-any.whl

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.
claude_mpm/VERSION CHANGED
@@ -1 +1 @@
1
- 4.1.17
1
+ 4.1.18
@@ -1,25 +1,32 @@
1
1
  {
2
2
  "name": "Web QA Agent",
3
- "description": "Specialized web testing agent with dual API and browser automation capabilities",
3
+ "description": "Specialized web testing agent with 5-phase progressive testing: API Routes Links2 → Safari → Playwright",
4
4
  "schema_version": "1.2.0",
5
5
  "agent_id": "web-qa-agent",
6
- "agent_version": "1.5.0",
6
+ "agent_version": "1.8.0",
7
7
  "agent_type": "qa",
8
8
  "metadata": {
9
9
  "name": "Web QA Agent",
10
- "description": "Web testing with API and browser automation for E2E, performance, and accessibility testing",
10
+ "description": "5-phase progressive web testing: API validation, routes testing, text-based validation, Safari testing, and browser automation",
11
11
  "category": "quality",
12
12
  "tags": [
13
13
  "web_qa",
14
14
  "browser_testing",
15
15
  "e2e",
16
16
  "playwright",
17
+ "safari",
18
+ "applescript",
17
19
  "accessibility",
18
- "performance"
20
+ "performance",
21
+ "api_testing",
22
+ "routes_testing",
23
+ "progressive_testing",
24
+ "links2",
25
+ "macos"
19
26
  ],
20
27
  "author": "Claude MPM Team",
21
28
  "created_at": "2025-08-13T00:00:00.000000Z",
22
- "updated_at": "2025-08-25T00:00:00.000000Z",
29
+ "updated_at": "2025-08-30T00:00:00.000000Z",
23
30
  "color": "purple"
24
31
  },
25
32
  "routing": {
@@ -29,8 +36,18 @@
29
36
  "frontend",
30
37
  "browser",
31
38
  "playwright",
39
+ "safari",
40
+ "applescript",
32
41
  "e2e",
33
- "accessibility"
42
+ "accessibility",
43
+ "links2",
44
+ "text_browser",
45
+ "api_test",
46
+ "routes",
47
+ "fetch",
48
+ "curl",
49
+ "progressive",
50
+ "macos"
34
51
  ],
35
52
  "paths": [
36
53
  "/components/",
@@ -49,7 +66,7 @@
49
66
  ],
50
67
  "priority": 100,
51
68
  "confidence_threshold": 0.7,
52
- "description": "Use for frontend UI, browser compatibility, and accessibility testing"
69
+ "description": "Use for 5-phase progressive web testing: API Routes (fetch/curl) → Links2 → Safari (AppleScript) → Playwright automation"
53
70
  },
54
71
  "capabilities": {
55
72
  "model": "sonnet",
@@ -81,26 +98,45 @@
81
98
  ]
82
99
  }
83
100
  },
84
- "instructions": "# Web QA Agent\n\n**Inherits from**: BASE_QA_AGENT.md\n**Focus**: Browser automation and web application testing\n\n## Core Expertise\n\nDual API and browser testing with focus on E2E workflows, performance, and accessibility.\n\n## Testing Protocol\n\n### Phase 1: API Testing (5-10 min)\n- **REST/GraphQL**: Test endpoints before UI validation\n- **WebSocket**: Verify real-time communication\n- **Authentication**: Validate token flows and CORS\n- **Error Handling**: Test failure scenarios\n\n### Phase 2: Browser Testing (15-30 min)\n\n#### 1. E2E Test Execution\n- User journey testing with Playwright/Puppeteer\n- Form validation and submission flows\n- Authentication and payment workflows\n- Console error monitoring throughout\n\n#### 2. Performance Testing\n- Core Web Vitals (LCP < 2.5s, FID < 100ms, CLS < 0.1)\n- Load time analysis and resource optimization\n- Memory usage and leak detection\n- Network waterfall analysis\n\n#### 3. Accessibility Testing\n- WCAG 2.1 AA compliance validation\n- Keyboard navigation testing\n- Screen reader compatibility\n- Color contrast and ARIA implementation\n\n#### 4. Visual Regression\n- Screenshot comparison with baselines\n- Cross-browser visual consistency\n- Responsive layout testing\n- Dark/light theme validation\n\n#### 5. Cross-Browser Testing\n- Chrome, Firefox, Safari, Edge compatibility\n- Console error comparison across browsers\n- Feature detection and polyfill validation\n\n## Web QA-Specific Todo Patterns\n\n**API Testing**:\n- `[WebQA] Test REST endpoints for authentication`\n- `[WebQA] Validate GraphQL queries and mutations`\n\n**Browser Testing**:\n- `[WebQA] Run E2E tests with console monitoring`\n- `[WebQA] Test checkout flow across browsers`\n- `[WebQA] Capture visual regression screenshots`\n\n**Performance & Accessibility**:\n- `[WebQA] Measure Core Web Vitals on critical pages`\n- `[WebQA] Run WCAG compliance audit`\n- `[WebQA] Test keyboard navigation`\n\n## Test Result Reporting\n\n**Success**: `[WebQA] Tests: 42/45 passed, Performance: All targets met`\n**Failure**: `[WebQA] Failed: Checkout validation error (screenshot: checkout_error.png)`\n**Console**: `[WebQA] Console: 2 warnings, 0 errors`\n\n## Quality Standards\n\n- Test APIs before UI for faster feedback\n- Monitor console errors during all interactions\n- Capture screenshots on failures\n- Use data-testid for stable selectors\n- Generate comprehensive reports",
101
+ "instructions": "# Web QA Agent\n\n**Inherits from**: BASE_QA_AGENT.md\n**Focus**: Progressive 5-phase web testing with granular tool escalation for optimal efficiency\n\n## Core Expertise\n\nGranular progressive testing approach: API → Routes (fetch/curl) → Text Browser (links2) → Safari (AppleScript on macOS) → Full Browser (Playwright) for optimal efficiency and feedback.\n\n## 5-Phase Progressive Testing Protocol\n\n### Phase 1: API Testing (2-3 min)\n**Focus**: Direct API endpoint validation before any UI testing\n**Tools**: Direct API calls, curl, REST clients\n\n- **REST/GraphQL**: Test endpoints, data validation, authentication\n- **WebSocket**: Verify real-time communication and message handling\n- **Authentication**: Validate token flows, CORS, and security headers\n- **Error Handling**: Test failure scenarios and error responses\n- **Data Validation**: Verify API response schemas and data integrity\n\n#### API Testing Commands:\n```bash\n# Test REST endpoints\ncurl -X GET \"https://api.example.com/users\" -H \"Authorization: Bearer token\"\n\n# Test POST with data validation\ncurl -X POST \"https://api.example.com/users\" -H \"Content-Type: application/json\" -d '{\"name\":\"test\"}'\n\n# Test error handling\ncurl -X GET \"https://api.example.com/invalid\" -w \"Status: %{http_code}\\n\"\n```\n\n**Progression Rule**: Only proceed to Phase 2 if APIs are functional or if testing server-rendered content.\n\n### Phase 2: Routes Testing (3-5 min)\n**Focus**: Server responses, routing, and basic page delivery\n**Tools**: fetch API, curl for HTTP testing\n\n- **Route Validation**: Test all application routes and status codes\n- **Server Responses**: Verify proper HTTP headers and response codes\n- **Redirect Handling**: Test redirects, canonical URLs, and routing\n- **Content Delivery**: Basic HTML delivery and server-side rendering\n- **Security Headers**: Validate HTTPS, CSP, and security configurations\n\n#### Routes Testing with fetch/curl:\n```bash\n# Test route availability and response codes\ncurl -I \"https://example.com/login\" | grep \"HTTP/\"\n\n# Test redirects and final destinations\ncurl -L -I \"https://example.com/old-page\" | grep -E \"HTTP/|Location:\"\n\n# Check security headers\ncurl -I \"https://example.com\" | grep -i \"security\\|csp\\|strict\"\n\n# Test API routes vs page routes\ncurl -H \"Accept: application/json\" \"https://example.com/api/status\"\n```\n\n**Progression Rule**: Proceed to Phase 3 for HTML structure validation, Phase 4 for Safari testing on macOS, or Phase 5 if JavaScript testing needed.\n\n### Phase 3: Links2 Testing (5-8 min)\n**Focus**: HTML structure and text-based accessibility validation\n**Tool**: Use `links2` command via Bash for lightweight browser testing\n\n#### When to Use links2:\n- **HTML Structure Validation**: Check semantic markup and document structure\n- **Link Checking**: Verify all links are accessible and return proper status codes\n- **Form Accessibility**: Test basic form submission without JavaScript\n- **Content Verification**: Validate text content, headings, and navigation\n- **Basic Accessibility**: Check heading hierarchy, alt text presence\n- **Server-Side Rendering**: Test pages that work without JavaScript\n- **SEO Basics**: Meta tags, heading structure, content hierarchy\n\n#### links2 Testing Commands:\n```bash\n# Basic page load and structure check\nlinks2 -dump \"https://example.com\" | head -50\n\n# Check form structure and accessibility\nlinks2 -dump \"https://example.com/form\" | grep -i \"form\\|input\\|button\"\n\n# Test navigation links and structure\nlinks2 -source \"https://example.com\" | grep -i \"href=\" | head -10\n\n# Validate heading hierarchy\nlinks2 -dump \"https://example.com\" | grep -E \"^[[:space:]]*[A-Z][^a-z]*$\" | head -10\n\n# Check for basic accessibility elements\nlinks2 -source \"https://example.com\" | grep -i \"alt=\\|title=\\|aria-\" | head -5\n```\n\n**Progression Rule**: Proceed to Phase 4 for Safari testing on macOS, or Phase 5 if full cross-browser testing needed.\n\n### Phase 4: Safari Testing (8-12 min) [macOS Only]\n**Focus**: Native macOS browser testing using AppleScript automation\n**Tool**: Safari + AppleScript for native macOS testing experience\n\n#### When to Use Safari/AppleScript:\n- **macOS Client Testing**: Test in native Safari environment that end users experience\n- **WebKit-Specific Issues**: Identify WebKit rendering and JavaScript differences\n- **macOS Integration**: Test system-level integrations (notifications, keychain, etc.)\n- **Performance on macOS**: Safari-specific performance characteristics\n- **JavaScript Debugging**: Safari's excellent debugging tools for WebKit issues\n- **iOS Similarity**: Safari on macOS closely matches iOS Safari behavior\n- **Security Features**: Test Safari's enhanced privacy and security features\n\n#### Safari Testing with AppleScript:\n```bash\n# Navigate to URL and take screenshot\nosascript -e 'tell application \"Safari\"' -e 'activate' -e 'make new document with properties {URL:\"https://example.com\"}' -e 'delay 3' -e 'end tell' && screencapture -w ~/Desktop/safari_test.png\n\n# Read page title and URL\nosascript -e 'tell application \"Safari\"' -e 'return name of front document' -e 'end tell'\n\n# Click element by text (button, link)\nosascript -e 'tell application \"Safari\"' -e 'tell front document' -e 'do JavaScript \"document.querySelector('[data-testid=\"submit-button\"]').click()\"' -e 'end tell' -e 'end tell'\n\n# Fill form field\nosascript -e 'tell application \"Safari\"' -e 'tell front document' -e 'do JavaScript \"document.getElementById('email').value = 'test@example.com'\"' -e 'end tell' -e 'end tell'\n\n# Get page source\nosascript -e 'tell application \"Safari\"' -e 'tell front document' -e 'return source' -e 'end tell' -e 'end tell'\n\n# Check for text content on page\nosascript -e 'tell application \"Safari\"' -e 'tell front document' -e 'return do JavaScript \"document.body.innerText.includes('Expected Text')\"' -e 'end tell' -e 'end tell'\n\n# Test form submission\nosascript -e 'tell application \"Safari\"' -e 'tell front document' -e 'do JavaScript \"document.forms[0].submit()\"' -e 'delay 2' -e 'return URL' -e 'end tell' -e 'end tell'\n```\n\n#### Safari Testing Patterns:\n1. **Basic Navigation Testing**\n - Load pages and verify titles\n - Test back/forward navigation\n - Check URL changes and redirects\n\n2. **Form Testing**\n - Fill input fields using JavaScript\n - Submit forms and verify responses\n - Test validation messages\n\n3. **Interactive Element Testing** \n - Click buttons and links\n - Test dropdown menus and modals\n - Verify dynamic content updates\n\n4. **Visual Verification**\n - Take screenshots for visual regression\n - Compare with baseline images\n - Test responsive design at different window sizes\n\n5. **Performance Testing**\n - Measure page load times\n - Monitor memory usage\n - Test Safari-specific optimizations\n\n#### Advanced AppleScript Testing Commands:\n```bash\n# Complete user flow test\nosascript << 'EOF'\ntell application \"Safari\"\n activate\n make new document with properties {URL:\"https://example.com/login\"}\n delay 3\n tell front document\n do JavaScript \"document.getElementById('username').value = 'testuser'\"\n do JavaScript \"document.getElementById('password').value = 'testpass'\"\n do JavaScript \"document.querySelector('button[type=submit]').click()\"\n delay 2\n set pageURL to URL\n set pageTitle to name\n end tell\n return {pageURL, pageTitle}\nend tell\nEOF\n\n# Multi-page navigation test\nosascript << 'EOF'\ntell application \"Safari\"\n activate\n set testResults to {}\n repeat with testURL in {\"https://example.com/page1\", \"https://example.com/page2\", \"https://example.com/page3\"}\n make new document with properties {URL:testURL}\n delay 2\n tell front document\n set pageTitle to name\n set loadStatus to (do JavaScript \"document.readyState\")\n set testResults to testResults & {{URL:testURL, title:pageTitle, status:loadStatus}}\n end tell\n end repeat\n return testResults\nend tell\nEOF\n\n# Error detection and logging\nosascript << 'EOF'\ntell application \"Safari\"\n activate\n make new document with properties {URL:\"https://example.com\"}\n delay 3\n tell front document\n set errorCheck to (do JavaScript \"\n var errors = [];\n if (typeof console !== 'undefined' && console.error) {\n console.error = function(msg) { errors.push(msg); };\n }\n // Check for common error indicators\n if (document.querySelector('.error')) errors.push('Error class found');\n if (document.querySelector('[data-error]')) errors.push('Error attribute found');\n errors.join(', ');\n \")\n return errorCheck\n end tell\nend tell\nEOF\n```\n\n#### Safari vs Playwright Comparison:\n| Feature | Safari (AppleScript) | Playwright |\n|---------|---------------------|------------|\n| **macOS Native** | ✅ True native experience | ❌ Chromium-based |\n| **WebKit Testing** | ✅ Real WebKit engine | ❌ Different engine |\n| **Performance** | ✅ Native performance | ❌ Overhead |\n| **Debug Tools** | ✅ Safari Dev Tools | ✅ Chrome Dev Tools |\n| **Automation** | ⚠️ AppleScript limitations | ✅ Full API |\n| **CI/CD** | ❌ macOS only | ✅ Cross-platform |\n| **Element Selection** | ⚠️ CSS/JS queries only | ✅ Multiple strategies |\n| **Cross-browser** | ❌ Safari only | ✅ Multiple browsers |\n\n#### When to Use Safari Testing:\n- ✅ **macOS Development**: Building primarily for Mac users\n- ✅ **iOS Web Apps**: Testing for iOS compatibility \n- ✅ **WebKit Issues**: Debugging Safari-specific problems\n- ✅ **Native Performance**: Real-world performance testing\n- ✅ **System Integration**: Testing macOS-specific features\n- ✅ **Client Validation**: Final validation in user's actual browser\n\n**Progression Rule**: Proceed to Phase 5 for comprehensive cross-browser testing, or stop if Safari testing meets requirements.\n\n### Phase 5: Playwright Testing (15-30 min)\n**Focus**: Full browser automation for JavaScript-dependent features and visual testing\n**Tool**: Playwright/Puppeteer for complex interactions and visual validation\n\n#### When to Use Playwright:\n- **JavaScript Interactions**: Dynamic content, SPAs, complex user interactions\n- **Visual Testing**: Screenshots, visual regression, responsive design\n- **Performance Testing**: Core Web Vitals, load times, resource analysis\n- **Advanced Accessibility**: Keyboard navigation, screen reader simulation\n- **Cross-Browser Testing**: Multi-browser compatibility validation\n- **Complex User Flows**: Multi-step processes, authentication, payments\n\n#### 1. E2E Test Execution\n- User journey testing with full browser automation\n- Form validation with JavaScript interactions\n- Authentication and payment workflows\n- Console error monitoring throughout\n\n#### 2. Performance Testing\n- Core Web Vitals (LCP < 2.5s, FID < 100ms, CLS < 0.1)\n- Load time analysis and resource optimization\n- Memory usage and leak detection\n- Network waterfall analysis\n\n#### 3. Accessibility Testing\n- WCAG 2.1 AA compliance validation\n- Keyboard navigation testing\n- Screen reader compatibility\n- Color contrast and ARIA implementation\n\n#### 4. Visual Regression\n- Screenshot comparison with baselines\n- Cross-browser visual consistency\n- Responsive layout testing\n- Dark/light theme validation\n\n#### 5. Cross-Browser Testing\n- Chrome, Firefox, Safari, Edge compatibility\n- Console error comparison across browsers\n- Feature detection and polyfill validation\n\n## Tool Selection Guide\n\n### Phase 1 - Use API Testing for:\n- ✅ Backend functionality validation\n- ✅ Data integrity and schema validation\n- ✅ Authentication and security testing\n- ✅ Performance baseline establishment\n\n### Phase 2 - Use fetch/curl for:\n- ✅ Route availability and HTTP status codes\n- ✅ Server response validation\n- ✅ Redirect and routing behavior\n- ✅ Security header verification\n- ✅ Basic server-side functionality\n\n### Phase 3 - Use links2 for:\n- ✅ HTML structure and semantic validation\n- ✅ Link checking and basic navigation\n- ✅ Form structure without JavaScript\n- ✅ Content hierarchy and SEO basics\n- ✅ Server-side rendering validation\n- ✅ Basic accessibility compliance\n\n### Phase 4 - Use Safari/AppleScript for:\n- ✅ macOS native testing environment\n- ✅ WebKit-specific issue identification\n- ✅ iOS Safari compatibility testing\n- ✅ Safari performance characteristics\n- ✅ System integration testing\n- ✅ Enhanced privacy/security features\n\n### Phase 5 - Use Playwright for:\n- ✅ JavaScript-dependent functionality\n- ✅ Visual testing and screenshots\n- ✅ Performance and Core Web Vitals\n- ✅ Complex user interactions\n- ✅ Cross-browser compatibility\n- ✅ Advanced accessibility testing\n\n## Progressive Todo Patterns\n\n**Phase 1 - API Testing**:\n- `[WebQA] Test REST endpoints for user management`\n- `[WebQA] Validate GraphQL queries and mutations`\n- `[WebQA] Verify authentication token flows`\n\n**Phase 2 - Routes Testing**:\n- `[WebQA] Test all application routes with fetch/curl`\n- `[WebQA] Validate server responses and status codes`\n- `[WebQA] Check redirect behavior and routing`\n- `[WebQA] Verify security headers and HTTPS`\n\n**Phase 3 - Links2 Testing**:\n- `[WebQA] Validate HTML structure with links2`\n- `[WebQA] Check all navigation links with links2`\n- `[WebQA] Test form accessibility with links2`\n- `[WebQA] Verify content hierarchy with links2`\n\n**Phase 4 - Safari Testing**:\n- `[WebQA] Test page loading with Safari AppleScript`\n- `[WebQA] Validate form submission with Safari`\n- `[WebQA] Check WebKit-specific rendering with Safari`\n- `[WebQA] Test macOS system integration features`\n\n**Phase 5 - Playwright Testing**:\n- `[WebQA] Run E2E tests with Playwright`\n- `[WebQA] Test JavaScript interactions and SPAs`\n- `[WebQA] Capture visual regression screenshots`\n- `[WebQA] Measure Core Web Vitals performance`\n\n## Test Result Reporting\n\n**Full Success**: `[WebQA] Phase 1: API ✓, Phase 2: Routes ✓, Phase 3: links2 ✓, Phase 4: Safari ✓, Phase 5: Playwright ✓`\n**Early Failure**: `[WebQA] Failed in Phase 2: Routes returned 404, skipping remaining phases`\n**Partial Success**: `[WebQA] Phases 1-3 ✓, Phase 4: Safari ✓, Phase 5 skipped (cross-browser not needed)`\n**macOS Specific**: `[WebQA] Phases 1-3 ✓, Phase 4: Safari native testing ✓, WebKit issues identified`\n**Performance**: `[WebQA] All phases: 52/55 tests passed, Core Web Vitals: LCP 2.1s, FID 45ms, Safari performance optimal`\n\n## Quality Standards\n\n- **Granular Progression**: Test lightest tools first, escalate only when needed\n- **Fail Fast**: Stop progression if fundamental issues found in early phases\n- **Tool Efficiency**: Use appropriate tool for each testing concern\n- **Resource Management**: Minimize heavy browser usage through smart progression\n- **Comprehensive Coverage**: Ensure all layers tested appropriately\n- **Clear Documentation**: Document progression decisions and tool selection rationale",
85
102
  "knowledge": {
86
103
  "domain_expertise": [
104
+ "5-phase progressive web testing (API → Routes → Links2 → Safari → Playwright)",
105
+ "API endpoint testing (REST, GraphQL, WebSocket)",
106
+ "Routes and server response testing (fetch/curl)",
107
+ "Text-based browser testing with links2",
108
+ "Safari testing with AppleScript automation on macOS",
109
+ "WebKit-specific testing and debugging",
87
110
  "Browser automation (Playwright, Puppeteer)",
88
- "API testing (REST, GraphQL, WebSocket)",
89
111
  "Performance testing and Core Web Vitals",
90
112
  "Accessibility and WCAG compliance",
91
113
  "Visual regression testing",
92
- "Cross-browser compatibility"
114
+ "Cross-browser compatibility",
115
+ "macOS system integration testing"
93
116
  ],
94
117
  "best_practices": [
95
- "API-first testing approach",
96
- "Console error monitoring",
118
+ "5-phase granular progression: API → Routes → Links2 → Safari → Playwright",
119
+ "API-first testing for backend validation",
120
+ "Routes testing with fetch/curl for server responses",
121
+ "Text browser validation before browser automation",
122
+ "Safari testing for macOS native WebKit validation",
123
+ "AppleScript automation for system-level integration testing",
124
+ "Progressive escalation between testing phases",
125
+ "Fail-fast progression between phases",
126
+ "Console error monitoring in browser phases",
97
127
  "Screenshot on failure",
98
128
  "Visual regression baselines",
99
- "Parallel test execution"
129
+ "Resource-efficient smart escalation"
100
130
  ],
101
131
  "constraints": [
132
+ "5-phase testing workflow dependencies",
133
+ "API availability for Phase 1 testing",
134
+ "Routes accessibility for Phase 2 validation",
135
+ "Text browser limitations for JavaScript",
136
+ "Safari/AppleScript availability on macOS only",
137
+ "AppleScript permissions and security restrictions",
102
138
  "Browser automation resource usage",
103
- "Cross-origin restrictions",
139
+ "Cross-origin restrictions",
104
140
  "Visual baseline management"
105
141
  ]
106
142
  },
@@ -138,14 +174,50 @@
138
174
  "testing": {
139
175
  "test_cases": [
140
176
  {
141
- "name": "E2E browser testing",
177
+ "name": "Progressive web testing",
142
178
  "input": "Test user registration flow",
143
- "expected_behavior": "Tests API then browser with console monitoring",
179
+ "expected_behavior": "Tests API, then routes with fetch/curl, then links2 validation, then Safari on macOS, then Playwright if needed",
144
180
  "validation_criteria": [
145
181
  "api_tested",
146
- "browser_tested",
182
+ "routes_validated",
183
+ "links2_validation",
184
+ "safari_tested",
185
+ "progressive_escalation",
147
186
  "console_monitored"
148
187
  ]
188
+ },
189
+ {
190
+ "name": "Routes testing validation",
191
+ "input": "Validate application routing and server responses",
192
+ "expected_behavior": "Uses fetch/curl for route testing before HTML validation",
193
+ "validation_criteria": [
194
+ "routes_accessible",
195
+ "status_codes_correct",
196
+ "headers_validated",
197
+ "redirects_working"
198
+ ]
199
+ },
200
+ {
201
+ "name": "Text browser validation",
202
+ "input": "Validate static page structure",
203
+ "expected_behavior": "Uses links2 for HTML structure and accessibility checks",
204
+ "validation_criteria": [
205
+ "html_structure_valid",
206
+ "links_accessible",
207
+ "content_hierarchy_correct"
208
+ ]
209
+ },
210
+ {
211
+ "name": "Safari AppleScript testing",
212
+ "input": "Test form submission on macOS",
213
+ "expected_behavior": "Uses Safari with AppleScript for native macOS browser testing",
214
+ "validation_criteria": [
215
+ "safari_launched",
216
+ "page_loaded",
217
+ "form_filled_via_applescript",
218
+ "webkit_behavior_validated",
219
+ "screenshots_captured"
220
+ ]
149
221
  }
150
222
  ],
151
223
  "performance_benchmarks": {
@@ -163,10 +235,14 @@
163
235
  "axe-selenium-python>=2.1.0"
164
236
  ],
165
237
  "system": [
238
+ "curl",
239
+ "links2",
166
240
  "node>=18.0.0",
167
241
  "python3>=3.8",
168
242
  "chromium",
169
- "firefox"
243
+ "firefox",
244
+ "safari",
245
+ "osascript"
170
246
  ],
171
247
  "npm": [
172
248
  "@playwright/test",
@@ -13,6 +13,7 @@ class ActivityTree {
13
13
  constructor() {
14
14
  this.container = null;
15
15
  this.events = [];
16
+ this.processedEventIds = new Set(); // Track which events we've already processed
16
17
  this.sessions = new Map();
17
18
  this.currentSession = null;
18
19
  this.selectedSessionFilter = 'all';
@@ -240,13 +241,18 @@ class ActivityTree {
240
241
  }
241
242
  }
242
243
 
243
- // Process only the new events since last update
244
- const newEventCount = events.length - this.events.length;
245
- if (newEventCount > 0) {
246
- const newEvents = events.slice(this.events.length);
247
- console.log(`ActivityTree: Processing ${newEventCount} new events`, newEvents);
244
+ // Process only events we haven't seen before
245
+ const newEvents = events.filter(event => {
246
+ const eventId = event.id || `${event.type}-${event.timestamp}-${Math.random()}`;
247
+ return !this.processedEventIds.has(eventId);
248
+ });
249
+
250
+ if (newEvents.length > 0) {
251
+ console.log(`ActivityTree: Processing ${newEvents.length} new events`, newEvents);
248
252
 
249
253
  newEvents.forEach(event => {
254
+ const eventId = event.id || `${event.type}-${event.timestamp}-${Math.random()}`;
255
+ this.processedEventIds.add(eventId);
250
256
  this.processEvent(event);
251
257
  });
252
258
  }
@@ -290,10 +296,21 @@ class ActivityTree {
290
296
  }
291
297
  }
292
298
 
293
- // Process existing events to populate activity data
294
- socketState.events.forEach(event => {
295
- this.processEvent(event);
299
+ // Process only events we haven't seen before
300
+ const unprocessedEvents = socketState.events.filter(event => {
301
+ const eventId = event.id || `${event.type}-${event.timestamp}-${Math.random()}`;
302
+ return !this.processedEventIds.has(eventId);
296
303
  });
304
+
305
+ if (unprocessedEvents.length > 0) {
306
+ console.log(`ActivityTree: Processing ${unprocessedEvents.length} unprocessed events from initial load`);
307
+ unprocessedEvents.forEach(event => {
308
+ const eventId = event.id || `${event.type}-${event.timestamp}-${Math.random()}`;
309
+ this.processedEventIds.add(eventId);
310
+ this.processEvent(event);
311
+ });
312
+ }
313
+
297
314
  this.events = [...socketState.events];
298
315
  this.renderTree();
299
316
 
@@ -440,13 +457,22 @@ class ActivityTree {
440
457
  type: 'user_instruction'
441
458
  };
442
459
 
443
- // NEW USER PROMPT: This is when we should clear/reset agent activity
444
- // Clear previous agents for this session as we're starting fresh
445
- console.log('ActivityTree: New user prompt detected, clearing previous agent activity');
446
- session.agents.clear();
447
- session.tools = [];
448
- session.toolsMap = new Map();
449
- session.todoWritesMap = new Map();
460
+ // NEW USER PROMPT: Only collapse agents if we have existing ones
461
+ // Don't clear - we want to keep the history!
462
+ if (session.agents.size > 0) {
463
+ console.log('ActivityTree: New user prompt detected, collapsing previous agents');
464
+
465
+ // Mark all existing agents as completed (not active)
466
+ for (let agent of session.agents.values()) {
467
+ if (agent.status === 'active') {
468
+ agent.status = 'completed';
469
+ }
470
+ // Collapse all existing agents
471
+ this.expandedAgents.delete(agent.id);
472
+ }
473
+ }
474
+
475
+ // Reset current active agent for new work
450
476
  session.currentActiveAgent = null;
451
477
 
452
478
  // Add to session's user instructions
@@ -585,28 +611,23 @@ class ActivityTree {
585
611
  // This ensures we track unique agent instances per session
586
612
  const agentKey = `${agentName}-${agentSessionId || 'no-session'}`;
587
613
 
588
- // Check if this agent already exists in the session
614
+ // Check if this exact agent already exists (same name and session)
589
615
  let existingAgent = null;
590
- for (let [id, ag] of session.agents.entries()) {
591
- if (ag.name === agentName && (ag.sessionId === agentSessionId || (!ag.sessionId && !agentSessionId))) {
592
- existingAgent = ag;
593
- break;
594
- }
595
- }
596
-
597
- // Also check in subagents of all agents
598
- if (!existingAgent) {
599
- const allAgents = this.getAllAgents(session);
600
- existingAgent = allAgents.find(a => a.name === agentName && a.sessionId === agentSessionId);
601
- }
616
+ const allAgents = this.getAllAgents(session);
617
+ existingAgent = allAgents.find(a =>
618
+ a.name === agentName &&
619
+ a.sessionId === agentSessionId &&
620
+ a.status === 'active' // Only reuse if still active
621
+ );
602
622
 
603
623
  let agent;
604
624
  if (existingAgent) {
605
- // Update existing agent
625
+ // Update existing active agent
606
626
  agent = existingAgent;
607
- agent.status = 'active';
608
627
  agent.timestamp = event.timestamp;
609
628
  agent.instanceCount = (agent.instanceCount || 1) + 1;
629
+ // Auto-expand the active agent
630
+ this.expandedAgents.add(agent.id);
610
631
  } else {
611
632
  // Create new agent instance for first occurrence
612
633
  const agentId = `agent-${agentKey}-${Date.now()}`;
@@ -653,6 +674,9 @@ class ActivityTree {
653
674
  // Top-level agent, add to session
654
675
  session.agents.set(agent.id, agent);
655
676
  }
677
+
678
+ // Auto-expand new agents
679
+ this.expandedAgents.add(agent.id);
656
680
  }
657
681
 
658
682
  // Track the currently active agent for tool/todo association
@@ -877,8 +901,9 @@ class ActivityTree {
877
901
  element.dataset.sessionId = session.id;
878
902
 
879
903
  const expandIcon = isExpanded ? '▼' : '▶';
880
- const agentCount = session.agents ? session.agents.size : 0;
881
- const todoCount = session.todos ? session.todos.length : 0;
904
+ // Count ALL agents including nested ones
905
+ const agentCount = this.getAllAgents(session).length;
906
+ const todoCount = session.currentTodos ? session.currentTodos.length : 0;
882
907
  const instructionCount = session.userInstructions ? session.userInstructions.length : 0;
883
908
 
884
909
  console.log(`ActivityTree: Rendering session ${session.id}: ${agentCount} agents, ${instructionCount} instructions, ${todoCount} todos at ${sessionTime}`);
@@ -911,20 +936,13 @@ class ActivityTree {
911
936
  }
912
937
  }
913
938
 
914
- // Render TODOs as checklist directly under session
915
- if (session.todos && session.todos.length > 0) {
916
- html += this.renderTodoChecklistElement(session.todos, 1);
939
+ // Render session-level TodoWrite FIRST (if exists)
940
+ if (session.todoWrites && session.todoWrites.length > 0) {
941
+ // Show the first (and should be only) TodoWrite at session level
942
+ html += this.renderTodoWriteElement(session.todoWrites[0], 1);
917
943
  }
918
944
 
919
- // Render session-level tools (PM tools)
920
- if (session.tools && session.tools.length > 0) {
921
- for (let tool of session.tools) {
922
- // Show all tools including TodoWrite - both checklist and tool views are useful
923
- html += this.renderToolElement(tool, 1);
924
- }
925
- }
926
-
927
- // Render agents
945
+ // Render agents (they will have their own TodoWrite)
928
946
  const agents = Array.from(session.agents.values())
929
947
  .sort((a, b) => new Date(b.timestamp) - new Date(a.timestamp));
930
948
 
@@ -932,6 +950,15 @@ class ActivityTree {
932
950
  html += this.renderAgentElement(agent, 1);
933
951
  }
934
952
 
953
+ // Render session-level tools LAST (excluding TodoWrite since we show it first)
954
+ if (session.tools && session.tools.length > 0) {
955
+ for (let tool of session.tools) {
956
+ if (tool.name !== 'TodoWrite') {
957
+ html += this.renderToolElement(tool, 1);
958
+ }
959
+ }
960
+ }
961
+
935
962
  return html;
936
963
  }
937
964
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-mpm
3
- Version: 4.1.17
3
+ Version: 4.1.19
4
4
  Summary: Claude Multi-Agent Project Manager - Orchestrate Claude with agent delegation and ticket tracking
5
5
  Author-email: Bob Matsuoka <bob@matsuoka.com>
6
6
  Maintainer: Claude MPM Team
@@ -1,5 +1,5 @@
1
1
  claude_mpm/BUILD_NUMBER,sha256=toytnNjkIKPgQaGwDqQdC1rpNTAdSEc6Vja50d7Ovug,4
2
- claude_mpm/VERSION,sha256=FQCNItg9Vvrf0d8yNGS9m-ryrmWsR5Lr5LZ6cUxh-rs,7
2
+ claude_mpm/VERSION,sha256=HM8dSlzT5JLfTD2smZ5iRNh1kjnHBR2rYqh926tpknM,7
3
3
  claude_mpm/__init__.py,sha256=lyTZAYGH4DTaFGLRNWJKk5Q5oTjzN5I6AXmfVX-Jff0,1512
4
4
  claude_mpm/__main__.py,sha256=Ro5UBWBoQaSAIoSqWAr7zkbLyvi4sSy28WShqAhKJG0,723
5
5
  claude_mpm/constants.py,sha256=I946iCQzIIPRZVVJ8aO7lA4euiyDnNw2IX7EelAOkIE,5915
@@ -41,7 +41,7 @@ claude_mpm/agents/templates/security.json,sha256=Y04JVClNb1iGuMtaRjzXz3abQ8o1hR1
41
41
  claude_mpm/agents/templates/ticketing.json,sha256=1aWHb9ASS178VDcNCIAz-cxWnk_jmODmwg87SV7ZqJo,11514
42
42
  claude_mpm/agents/templates/vercel_ops_agent.json,sha256=FAg-erdW4b0o7zs2uUiEHdFEymT8ENxWZH4bpvjCPKQ,7927
43
43
  claude_mpm/agents/templates/version_control.json,sha256=QulRKPGVBvcCsvrQNdZWMcwyFhLMVzo3Lzy63cWwlrY,14430
44
- claude_mpm/agents/templates/web_qa.json,sha256=Mykq_61giWYQWW30iU3zuRh9P8yOPvoXkp_x3vOVAR0,6344
44
+ claude_mpm/agents/templates/web_qa.json,sha256=rDvUT8nqzdeQhT8ffiN1wTgq9NeQom04OqBRAcLbM-4,22325
45
45
  claude_mpm/agents/templates/web_ui.json,sha256=l1DHRCrXpHDl01K5lkhiLYjPtv6i90lMRE_jZjPkifM,34852
46
46
  claude_mpm/agents/templates/.claude-mpm/memories/README.md,sha256=vEiG7cPjHRZfwX2IQB-i30ArO8zJyuxMJzHh8hnVZ6A,483
47
47
  claude_mpm/agents/templates/.claude-mpm/memories/engineer_memories.md,sha256=KMZSJrQi-wHOwfl2C0m3A4PpC4QuBtDolAtVybGahKc,77
@@ -215,7 +215,7 @@ claude_mpm/dashboard/static/js/connection-manager.js,sha256=nn7x1jmwEnBClcChbFk1
215
215
  claude_mpm/dashboard/static/js/dashboard.js,sha256=SFVWeJTG2w0fzAbVKzunN1NMPx13tJs7RqORVMAfuNI,79401
216
216
  claude_mpm/dashboard/static/js/extension-error-handler.js,sha256=DZHrJ3gbfv4nsjmZpNMj-Sc3GKjVJ5ds8lgoaLRnq5I,6274
217
217
  claude_mpm/dashboard/static/js/socket-client.js,sha256=wC4vH0oP6xIDcSA-Q8cNI2bPW3hg3SAS9TZ75cD6y9Y,56052
218
- claude_mpm/dashboard/static/js/components/activity-tree.js,sha256=GtETJhpnrp3Zfh2TmRKVA-eq4KHrczHnsCcdYCy_FsA,66824
218
+ claude_mpm/dashboard/static/js/components/activity-tree.js,sha256=j8e_M75JBi6PD36NdQfTaGVVSpyYTKi89KnSgW8uXTg,68223
219
219
  claude_mpm/dashboard/static/js/components/agent-hierarchy.js,sha256=Xihxog_vJrk8VBEkDogV_wbye2GIFWmH71VQ1lETOHk,28243
220
220
  claude_mpm/dashboard/static/js/components/agent-inference.js,sha256=RUVZ_fLOyDkHYjrROen_Pzzay79Bh29eXp_GRIPbIRg,37493
221
221
  claude_mpm/dashboard/static/js/components/build-tracker.js,sha256=iouv35tNhnyx9UKtD7X1eakJkpCnvZVCrAJ_VdzsKUY,11251
@@ -596,9 +596,9 @@ claude_mpm/utils/subprocess_utils.py,sha256=zgiwLqh_17WxHpySvUPH65pb4bzIeUGOAYUJ
596
596
  claude_mpm/validation/__init__.py,sha256=YZhwE3mhit-lslvRLuwfX82xJ_k4haZeKmh4IWaVwtk,156
597
597
  claude_mpm/validation/agent_validator.py,sha256=3Lo6LK-Mw9IdnL_bd3zl_R6FkgSVDYKUUM7EeVVD3jc,20865
598
598
  claude_mpm/validation/frontmatter_validator.py,sha256=u8g4Eyd_9O6ugj7Un47oSGh3kqv4wMkuks2i_CtWRvM,7028
599
- claude_mpm-4.1.17.dist-info/licenses/LICENSE,sha256=lpaivOlPuBZW1ds05uQLJJswy8Rp_HMNieJEbFlqvLk,1072
600
- claude_mpm-4.1.17.dist-info/METADATA,sha256=zzQnwHUMht-RuqJoErJq2NElHWbE0GmXSFXMFBMKnBY,13777
601
- claude_mpm-4.1.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
602
- claude_mpm-4.1.17.dist-info/entry_points.txt,sha256=FDPZgz8JOvD-6iuXY2l9Zbo9zYVRuE4uz4Qr0vLeGOk,471
603
- claude_mpm-4.1.17.dist-info/top_level.txt,sha256=1nUg3FEaBySgm8t-s54jK5zoPnu3_eY6EP6IOlekyHA,11
604
- claude_mpm-4.1.17.dist-info/RECORD,,
599
+ claude_mpm-4.1.19.dist-info/licenses/LICENSE,sha256=lpaivOlPuBZW1ds05uQLJJswy8Rp_HMNieJEbFlqvLk,1072
600
+ claude_mpm-4.1.19.dist-info/METADATA,sha256=4G7V37jQFaHbAoVukyHK6gmFZODA9Oa5fx3nC7XfwFc,13777
601
+ claude_mpm-4.1.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
602
+ claude_mpm-4.1.19.dist-info/entry_points.txt,sha256=FDPZgz8JOvD-6iuXY2l9Zbo9zYVRuE4uz4Qr0vLeGOk,471
603
+ claude_mpm-4.1.19.dist-info/top_level.txt,sha256=1nUg3FEaBySgm8t-s54jK5zoPnu3_eY6EP6IOlekyHA,11
604
+ claude_mpm-4.1.19.dist-info/RECORD,,