#6292·CodeWhale

Add TypeSafe/Jev as a key-gated built-in agent tool

Author: HmbownCreated Sep 17, 2026Updated Sep 17, 2026

What

Add TypeSafe / 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