Commit 32bb1d7
fix(console): the API console lists the whole AI family, and the tool preview stops linking to a 404 (framework#3718) (#2925)
#2921 fixed this page for ONE server-side builder, `buildAIRoutes()`. The
`/api/v1/ai/**` family is seven builders plus one route mounted by
`objectos-runtime`, so the AI group still showed under half of what exists.
All 26 routes are here now, grouped as cloud's ledger groups them
(objectstack-ai/cloud#903 widens the audit on the server side).
Fourteen entries added: `/agents` ×2, `/assistant` ×3, `/tools` ×2,
`/pending-actions` ×4, `/evals/runs`, `/conversations/:id/debug`, `/usage`.
Two behavioural details carried over from the #2921 finding rather than
re-learned:
- `/agents/:agentName/chat` and `/assistant/chat` are dual-mode on the same
`stream !== false` flag `/chat` is, so their "try it" templates send
`stream: false`. Without it the console buffers an SSE body through
`res.text()` and renders a wall of `data:` frames for a JSON-shaped request.
- `/tools/:toolName/execute` needs `{ parameters: {} }`; `/evals/runs` needs
`{ caseId }` and makes real paid LLM calls, which its description says.
Separately, ToolPreview's "Open in API Console" deep-linked to
`/api/v1/ai/tools/:toolName/invoke`. That verb has never been mounted — the
route is `/execute` — so the one first-party caller of the tool routes pointed
at a guaranteed 404, the same shape as the three dead AI endpoints #2921
removed from this very page.
Mount gating is documented where it matters: four of the seven builders are
conditional on a metadata service and/or a data engine, so on a stripped host
those routes 404 because they are NOT MOUNTED, which is a different fact from
"they do not exist" — the distinction #2921 was about.
Verification: `vitest run apps/console/src/pages/developer` 8/8 across 2 files;
eslint on both changed files 0 errors (10 pre-existing warnings, none on
touched lines). Data and one string literal — no component or hook logic.
Claude-Session: https://claude.ai/code/session_01WJX6GnuNix7HisBc92THMN
Co-authored-by: Claude <noreply@anthropic.com>1 parent b5efe85 commit 32bb1d7
2 files changed
Lines changed: 59 additions & 5 deletions
File tree
- apps/console/src/pages/developer/hooks
- packages/app-shell/src/views/metadata-admin/previews
Lines changed: 54 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
58 | 75 | | |
59 | 76 | | |
60 | 77 | | |
| |||
74 | 91 | | |
75 | 92 | | |
76 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
77 | 127 | | |
78 | 128 | | |
79 | 129 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
0 commit comments