Commit 2dd6afd
Add missing metadata API routes to test mock
The test mock in simulateBrowser.ts was missing critical HTTP handlers for metadata API endpoints that the ObjectStackClient uses to query agents and tools:
1. Added GET /api/v1/meta handler (base route that returns all metadata types)
2. Added generic GET /api/v1/meta/:type handler (for querying any metadata type like 'agent', 'tool', etc.)
Without these handlers, the client's meta.getTypes() and meta.getItems('agent'/'tool') calls would fail in tests, making it appear that agents and tools were not registered even though the broker shim was correctly querying MetadataService.
This was the final missing piece - the broker shim fix in commit 322a2a6 made agents/tools queryable from the kernel, but the test infrastructure couldn't actually test it because the HTTP routes weren't mocked.
Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/b6593eda-d805-4d4d-8a8d-10f5438b7a25
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>1 parent 322a2a6 commit 2dd6afd
1 file changed
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
145 | 156 | | |
146 | 157 | | |
147 | 158 | | |
| |||
194 | 205 | | |
195 | 206 | | |
196 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
197 | 224 | | |
198 | 225 | | |
199 | 226 | | |
| |||
0 commit comments