Studio job
A studio job (pipeline/text2game.js, runTextToGameJob) generates an asset
through a hosted text-to-3D studio's web UI, driven end-to-end through
Skarbiec (credentials) and Weles (browser). Nothing platform-specific is
hardcoded: endpoints and selectors come from the pipeline config, so swapping
studios is a config change, not a code change.
Entry points: glina create <prompt> [--race r], MCP tool
glina_create_asset. (--race prefixes the prompt; the MCP schema limits it
to humans | dwarves | elves | skeletons.)
Steps
Every step is named, and a failure carries its name:
text2game step '<name>' failed: <reason>.
open-session— start a browser session (browser.headless,browser.enginefrom config) and open a page.login:goto/login:user/login:pass/login:submit— navigate tostudio.loginUrl, fillstudio.selectors.loginUser/loginPasswordwith the resolvedcredentials.username/password, clickloginSubmit.studio:goto/studio:prompt/studio:submit— openstudio.generateUrl, fillpromptInput, clickgenerateSubmit.studio:wait-artifact— pollstudio.artifact.pollExpression(a page JavaScript expression) everyintervalMs(default 5 s) until it yields anhttp…string, up totimeoutMs(default 300 s); on timeout:artifact not ready within Nms.artifact:download— fetch the artifact URL (optionalartifact.downloadHeaders); non-2xx:download failed: HTTP N. The file lands at<outDir>/<slug>.glb(defaultassets/models).blender:postprocess(only whenblender.enabled) — import → runblender.processCode(which seesINPUT_PATHandOUTPUT_PATHas injected globals) → export<name>.processed.glb. See Blender session.verify(unlessverify.enabled: false) — the verification gate withthrowOnFail, run against the processed file when one exists, else the download.
Result: { outPath, processedPath, artifactUrl, prompt, verification }.
Invariants
- The browser session closes in a
finally; a failed job never leaks a browser slot. - Credentials exist only in process memory, resolved from
skarbiec://references at config load — never logged, never written. - The example config (
pipeline.config.example.json) targets Hunyuan3D's studio and stores its login as vault itemTEXT2GAME_ACCOUNTwith fieldslogin_email/login_password.