Commit 446b9a9
feat(inspector): primitive execution & always-visible event logs (#160)
* Update .gitignore to include board directory and restore PROMPT.md entry
* feat(inspector): add manual event types and /api/execute-primitive endpoint
- Add "manual" to AgnosticInspectorEvent.source union
- Add 6 manual event types (manual_tool_call, manual_tool_result, etc.)
- Map manual events to "agent" category in getEventCategory/getEventSummary
- Add POST /api/execute-primitive endpoint dispatching by kind (tool/resource/prompt)
- Record manual events before/after execution with source: "manual"
- 30s default timeout, overrideable via request body
- Extend recordAgentEvent with optional source parameter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(inspector): make RightPanel always-visible with all three tabs
- Remove isStreaming from RightPanelProps and all usages
- Always render Agent, Events, and Logs tabs
- Replace handleClear/isClearDisabled with switch(activeTab) dispatch
- Update right-panel tests for always-visible behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(inspector): enable browse-mode action button when onExecute provided
- Action button enabled with primary style when onExecute prop exists
- onClick switches to action mode (shows form), does not execute immediately
- Remains disabled with "Coming soon" when onExecute is absent
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(inspector): add executePrimitive utility with per-kind response mappers
- mapToolResponse: maps tool call results to ExecutionResult (ok=!isError)
- mapResourceResponse: maps resource read results with uri+mimeType
- mapPromptResponse: maps prompt messages with role/content handling
- executePrimitive: fetches /api/execute-primitive, dispatches to correct mapper
- All mappers never throw, always return ExecutionResult
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(inspector): wire onExecute through InspectorDashboard to PrimitiveDetail
- Create handleExecutePrimitive in InspectorDashboard binding serverId as connectionId
- Add onExecute prop to McpPrimitivesPanel and thread to PrimitiveDetail
- selectedPrimitive.serverId used as connectionId for execute-primitive API
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(inspector): add visual badge for manual events in AgentPanel
- Show "MANUAL" badge on events with source: "manual"
- Add manualBadge styles (amber accent color)
- Manual events appear in Agent panel with visual distinction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test(inspector): add unit tests for executePrimitive mappers
- mapToolResponse: success content, error flag, empty data
- mapResourceResponse: contents mapping, empty data
- mapPromptResponse: messages with roles, empty data
- executePrimitive: success flow, network error, non-200 response
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(inspector): add executePrimitive utility and wire onExecute through component tree
- executePrimitive with per-kind mappers (tool/resource/prompt)
- createExecuteFn binds baseUrl + connectionId for ExecuteFn signature
- Wire onExecute through InspectorDashboard -> McpPrimitivesPanel -> PrimitiveDetail
- Thread baseUrl through to fetch calls (consistent with other hooks)
- 22 unit tests for mappers and executePrimitive function
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(inspector): clear timeout timer after execute-primitive completes
- Wrap Promise.race in try/finally to clear setTimeout on success
- Prevents timer leak on successful executions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test(inspector): add endpoint integration and manual event type tests
- Backend /api/execute-primitive endpoint integration tests
- Manual event type mapping tests (getEventCategory, getEventSummary)
- VALID_INSPECTOR_EVENT_TYPES validation for all 6 manual types
- 83 additional tests for comprehensive coverage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address PR review feedback (redundant ternary, switch default, JSDoc)
- Remove no-op ternary for structuredContent in mapToolResponse
- Add exhaustive default case to kind switch in executePrimitive
- Add @param JSDoc for source parameter in recordAgentEvent
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: gabrypavanello <gabry.pavanello@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 35b6093 commit 446b9a9
File tree
15 files changed
+2466
-366
lines changed- packages/inspector
- src
- dashboard/react
- components
- utils
- types
- tests
15 files changed
+2466
-366
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
| 1128 | + | |
1128 | 1129 | | |
1129 | 1130 | | |
1130 | 1131 | | |
1131 | 1132 | | |
1132 | | - | |
| 1133 | + | |
| 1134 | + | |
1133 | 1135 | | |
1134 | 1136 | | |
1135 | 1137 | | |
1136 | 1138 | | |
1137 | 1139 | | |
1138 | 1140 | | |
1139 | 1141 | | |
1140 | | - | |
| 1142 | + | |
1141 | 1143 | | |
1142 | 1144 | | |
1143 | 1145 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
566 | 567 | | |
567 | 568 | | |
568 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
569 | 576 | | |
570 | 577 | | |
571 | 578 | | |
| |||
808 | 815 | | |
809 | 816 | | |
810 | 817 | | |
| 818 | + | |
811 | 819 | | |
812 | 820 | | |
813 | 821 | | |
| |||
868 | 876 | | |
869 | 877 | | |
870 | 878 | | |
871 | | - | |
872 | 879 | | |
873 | 880 | | |
874 | 881 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| |||
231 | 234 | | |
232 | 235 | | |
233 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
234 | 240 | | |
235 | 241 | | |
236 | 242 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| |||
1781 | 1783 | | |
1782 | 1784 | | |
1783 | 1785 | | |
| 1786 | + | |
1784 | 1787 | | |
1785 | 1788 | | |
1786 | 1789 | | |
| |||
1973 | 1976 | | |
1974 | 1977 | | |
1975 | 1978 | | |
1976 | | - | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
1977 | 1984 | | |
1978 | 1985 | | |
1979 | 1986 | | |
| |||
Lines changed: 19 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1395 | 1395 | | |
1396 | 1396 | | |
1397 | 1397 | | |
1398 | | - | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
1406 | 1417 | | |
1407 | 1418 | | |
1408 | 1419 | | |
| |||
Lines changed: 46 additions & 79 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | | - | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
| |||
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 75 | | |
77 | 76 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | | - | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
137 | 112 | | |
138 | 113 | | |
139 | | - | |
140 | | - | |
| 114 | + | |
141 | 115 | | |
| 116 | + | |
| 117 | + | |
142 | 118 | | |
143 | | - | |
144 | | - | |
| 119 | + | |
| 120 | + | |
145 | 121 | | |
146 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
147 | 126 | | |
148 | | - | |
| 127 | + | |
149 | 128 | | |
150 | 129 | | |
151 | | - | |
152 | | - | |
153 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
154 | 133 | | |
155 | 134 | | |
156 | 135 | | |
| |||
162 | 141 | | |
163 | 142 | | |
164 | 143 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
190 | 157 | | |
191 | 158 | | |
192 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
834 | 848 | | |
835 | 849 | | |
836 | 850 | | |
| |||
0 commit comments