Skip to content

five-on-it / apps/creator/src

apps/creator/src ​

Process entrypoint of the creator runner (apps/creator): it claims the platform's creations from the API (POST /creator/claim, a long poll, with the runners' secret), runs each with its model (FOI_CREATOR: the scripted one, OpenRouter's or Claude's) over the MCP tools in this process (runner.ts), FOI_CREATOR_CONCURRENCY at a time, and tells the API how each ended. On OpenRouter it reads the models' prices first (it does not start on a model OpenRouter does not list), which bound each call; on Claude it checks that Anthropic takes the key and has the models, priced at Anthropic's list prices. A creation whose owner picked a model (job.model) is made with it: its model is made the first time one is asked for (pick.ts, kept by id; on OpenRouter its price read then); one that names none with its tier's (the default models, or a city's). Stopped (SIGINT, SIGTERM), it fails the creations under way as no fault of their briefs (their creations given back) and goes.