Add TypeSafe/Jev as a key-gated built-in agent tool
- Dominant language
- Rust
- Stars
- 41k
- Forks
- 3.6k
- Avg merge
- 13h 59m
- Merged PRs (30d)
- 299
Description
## What
Add [TypeSafe](https://docs.typesafe.ai/introduction) / [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev)
(System One model: calibrated decisions, not text generation) to Codewhale as a
**key-gated built-in agent tool**.
## Shape
- User adds `TYPESAFE_API_KEY` to their setup (env var or `/settings`, like other provider keys).
- When the key is present, the agent's tool list gains a `typesafe_ask` tool:
state + typed questions in, calibrated answers out.
- The model reads the tool description and decides when a gut-check judgment
is worth a call — e.g. "is this shell command destructive?", "which of these
approaches fits the codebase?", "how risky is this refactor?" — then branches
on the typed result instead of vibes.
## Why a built-in tool, not MCP
Same capability as an MCP server with no extra process to install and
supervise. Jev's API is one HTTP call (`POST https://api.typesafe.ai/v1/systemone`,
Bearer auth, `state` + `questions` in `choice`/`score`/`noul` flavors), so no
SDK is needed — `reqwest` is already a dependency.
## Possible phase two (not this issue)
Use Jev inside Codewhale's own routing (model selection, escalation
decisions). Bigger design commitment; revisit once the tool exists and we see
how it behaves in practice.
## Acceptance
- [ ] `TYPESAFE_API_KEY` configurable via env and `/settings`
- [ ] `typesafe_ask` tool appears in the agent tool list iff the key is set
- [ ] Tool round-trips all three question types and returns typed answers with probabilities
- [ ] Documented in the tools/settings docs
Contributor guide
Research direction
Start by tracing existing provider-key handling, the /settings entry point, and built-in agent-tool registration; compare their patterns with the existing reqwest usage. Done means TYPESAFE_API_KEY works through env and /settings, typesafe_ask is available only when configured, all three question flavors round-trip typed probabilistic answers, and the tools/settings documentation is updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ai, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100