@looprun-ai/vercel
v0.4.0
Published
looprun on the Vercel AI SDK — RESERVED (not implemented). The backend seam contract lives in @looprun-ai/core; @looprun-ai/mastra is the v0 backend.
Maintainers
Readme
@looprun-ai/vercel — reserved
The Vercel AI SDK backend for looprun is not implemented yet; the v0 backend is
@looprun-ai/mastra.
The backend seam contract
A looprun backend is thin by design — every deterministic mechanic lives framework-free in
@looprun-ai/core (runtime/). A new backend implements exactly three glue points:
- Tool wiring with a pre-call veto — before a tool executes, run
evaluatePreTool(spec, ledger, world, tool, args); on deny, short-circuit the call and hand the model the correction as the tool result (the model retries within the same generation). After execution, feedrecordToolResult. On the Vercel AI SDK this maps to wrappingtool.executeor usingprepareStep. - A generate loop honoring the terminal protocol —
toolChoice: 'required', a stop condition when a terminal tool (isTerminal) is called, and the forced-terminal fallback (forcedTerminalPrompt) when the model ends without one. - Reply finalization —
finalizeReply(spec, theme, world, ledger, text, redrive, redrives)withredrive= one bounded NO-TOOLS text re-generation. Never a framework retry that re-runs the whole generation (it re-executes side-effecting tools; measured ~100× slower).
