feat(devtools): clean dead Dev tabs + per-tool example inputs in the Tools console#256
Merged
Conversation
Both tabs called `/api/dev/{registry,send,sessions}` — a backend that was
never implemented or mounted (there is no dev.ts route), so they 404'd into a
silent `.catch(() => {})`. Leftover UI from the retired AgentCenter / connector
stack that the cleanup never removed.
- DevPage: drop ConnectorsTab + SessionsTab (and the now-unused Section import).
- DevCategoryList / dev tab union / UrlAdopter: drop the two tabs; the default
/dev redirect now lands on `tools`.
- Delete ui/src/api/dev.ts (devApi) and its `api.dev` namespace wiring.
- demo: drop the 3 dead /api/dev MSW handlers (version/topology/media kept).
No backend change — `/api/dev/*` never existed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tools declare a runnable sample via `.meta({ examples: [...] })` on their
inputSchema. z.toJSONSchema surfaces it as a top-level `examples`, which both
the /api/tools detail route and the /cli manifest already return — so the
example reaches the Tools tab AND `alice <group> <verb> --help` with zero new
plumbing. The Tools tab now seeds its form from examples[0] instead of blank.
Pure metadata — examples never affect runtime (unlike .default(), which would
change execute behavior for optional fields).
Wired on two tools (equity ratios, market search) to prove the path end-to-end;
the rest get examples next.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Each data tool now declares a runnable sample via `.meta({ examples: [...] })`
on its inputSchema, so the Tools tab pre-fills and `alice <group> <verb> --help`
shows a sample. Covers thinking (calculate), analysis (calculateIndicator),
equity (profile/financials/earnings/insiders/discover), economy (all 7 FRED/BLS/
EIA), and news (glob/grep/read). (ratios + market search landed with the
mechanism commit.)
trading tools are intentionally NOT covered here — pre-filling a runnable
sample on broker mutations (placeOrder/closePosition/cancel/commit/push/sync)
is a boundary call, pending review.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ive)
18 of 19 trading tools now declare `.meta({ examples: [...] })` (listUTAs has a
zero-field schema, so it's skipped). `source` uses an 'alpaca-paper' placeholder.
Read-only tools get representative samples. Mutation tools (placeOrder /
modifyOrder / closePosition / cancelOrder / tradingCommit / tradingPush /
tradingSync) use conservative placeholder values, per the agreed boundary call
— note these stage operations; real execution still requires commit + push +
manual approval, so a stray Execute on a pre-filled form does not place an order.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Health-check pass on the Dev console ahead of the tool-layer work, plus a small mechanism that makes the Tools tab actually usable for debugging.
Remove two dead Dev tabs —
ConnectorsandSessionsboth called/api/dev/{registry,send,sessions}, a backend that was never implemented or mounted (nodev.tsroute), so they 404'd into a silent.catch(()=>{}). Leftover UI from the retired AgentCenter/connector stack. Drops the tabs,ui/src/api/dev.ts, the demo MSW handlers, the sidebar entries, the tab-type union, and the URL redirect. The Dev console now has only real pages: Tools / Snapshots / Logs / Simulator. No backend change (/api/dev/*never existed).Per-tool example inputs. Tools declare a runnable sample via
.meta({ examples: [...] })on theirinputSchema.z.toJSONSchemasurfaces it as a top-levelexamples, and both the/api/tools/:namedetail route and the/cli/:wsId/manifestalready returnz.toJSONSchema(inputSchema)— so the example reaches both the Tools tab (form pre-fill) andalice <group> <verb> --helpwith zero new plumbing. Pure metadata; never affects runtime (unlike.default()).ToolExecutePanelnow seeds its form fromexamples[0]instead of blank.listUTAs(zero-field schema) is skipped;inbox_pushis a workspace-only tool and isn't in the Tools console.sourceuses analpaca-paperplaceholder.Test plan
npx tsc --noEmitcleancd ui && npx tsc -bcleanpnpm test— 1728 passing.meta({ examples })flows throughz.toJSONSchemafor real tools (equity ratios →[{"symbol":"AAPL",...}], market search →[{"query":"apple"}])connectors/sessions/api/devreferences after the tab removalBoundary touch
Touches the tool layer (
.metaonsrc/tool/*inputSchema, including trading — descriptions/examples only, no execution-logic change) and the UI (Dev console). No trading-execution, auth, broker-credential, or migration changes. Trading mutation examples are staging-only placeholders.Known gap (deferred)
ToolExecutePanelcan't pre-fill array/object params (simulatePriceChange.priceChanges,placeOrder.takeProfit/stopLoss) — they'dJSON.stringifyinto a text box and fail server validation on execute. The example renders correctly in the detail/CLI view; only the form's complex-input handling is the gap. Good candidate for the next devtools pass.🤖 Generated with Claude Code