Skip to content

five-on-it / apps/creator/src/fake-model

apps/creator/src/fake-model ​

The scripted model (FOI_CREATOR=fake): it plays a known-good sequence of tool calls that makes a small game on test-mission-basics, whatever the brief says but its missions' number ("2 missions" in its words, 1 to 3: the bundled game's two solo ones, and a third of its own) and its title (the brief's first words, to its first comma), so the queue, the steps, cancelling, the budget and the result are tested end to end without a real model (none may be called in the tests). A new draft is read about, created, written and built; a revised one is read, written and built again; a later turn of the conversation reads the draft, writes it again (with the missions the owner names, "3 missions") and builds it, and answers that it changed as asked. A fix the studio asks for (a brief or a message that starts "Fix 2 issues", any number, POST /drafts/:id/fix) reads the draft, sets its level spec to the catalogue's example city (which solves with no issue) and says it fixed them. Its answers carry what a model may wrongly say (a fenced map, the draft's id, a tool's name) for the platform to take out before its owner reads them (plainReply). Each call takes delayMs (abortable: a cancel stops it at once) and costs costUsd; its games' blurb can be set (FOI_CREATOR_FAKE_BLURB: the tests' blocked word, for moderation to refuse).

Interfaces ​

Variables ​

Functions ​