renforge
v0.7.6Inspect, drive and debug a running Ren'Py game: state, screenshots, guarded clicks, saves, builds.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
renforge_info Renforge Info
Call this first. It returns the active project target (dashboard, "serve_default" or cwd), plus local runtime hints and RenForge version. Use this to determine the project path you should pass to project-scoped tools.
renforge_context Renforge Context
Return the same full payload as `renforge_info`, including active project discovery, dashboard/runtime hints, and RenForge version. This is an alias, not a reduced view.
renforge_inspect_image Renforge Inspect Image
Inspect a local image file and optionally crop/zoom it before returning PNG bytes. Use this for artifact review without launching the game.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Local image path to load and inspect. |
crop_height | integer | Optional crop height in pixels; 0 keeps full height. |
crop_width | integer | Optional crop width in pixels; 0 keeps full width. |
crop_x | integer | Pixel offset from left for the crop rectangle origin. |
crop_y | integer | Pixel offset from top for the crop rectangle origin. |
scale | number | Scale multiplier applied after crop; > 1 zooms in, < 1 zooms out. |
renforge_inspect_project Renforge Inspect Project
Read-only static analysis of a Ren'Py project: scan metadata and file structure without starting the game engine. Use this for safe project triage before runtime actions.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Absolute or relative Ren'Py project root containing `game/`. |
renforge_scan_project Renforge Scan Project
Search project scripts with bounded output. Use `sections`, `file_glob`, and `symbol` for focused indexing, then paginate with `offset` and `limit` for stable batches.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root to index for static analysis. |
file_glob | string | Optional filename glob filter for targeted scan files. |
limit | integer | Maximum items per page. Keep values bounded to avoid large payloads. |
offset | integer | Zero-based pagination offset for scan results. |
sections | Optional sections: `files`, `variables`, `graph`, `labels`, `jumps`, `calls`, `menus`, `characters`, `images`, and `unresolved_targets`. | |
symbol | string | Filter matches for this symbol; empty keeps section-wide scan. |
renforge_find_references Renforge Find References
Find symbol definitions and references across scripts and templates with the same pagination controls as scan. Useful before editing or renaming project identifiers.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root where symbol references should be resolved. |
symbol * | string | Symbol name to resolve (for example label, define, or python identifier). |
file_glob | string | Optional glob filter limiting candidate files. |
limit | integer | Maximum results to return; keep this bounded for large codebases. |
offset | integer | Zero-based pagination offset for matches. |
renforge_parse_lint Renforge Parse Lint
Parse existing Ren'Py lint output text and return normalized diagnostics. This does not run Ren'Py, does not execute code, and does not touch the runtime.
| Parameter | Type | Description |
|---|---|---|
text * | string | Existing Ren'Py lint output text to parse. |
renforge_validate Renforge Validate
Run Ren'Py `lint` against a clean shadow copy of the project tree: no live session artifacts, optional staged bytes overlaid, and RenForge never publishes staged or copied bytes into the project. Lint executes the project's `init python` blocks with your privileges, so the shadow does not sandbox arbitrary writes made by project code. The shadow omits RenForge-injected files using `.renforge/control/artifacts.json` when available plus the known `zzrenforge_*` and `00renforge_session_*` prefixes. Linked directories are never copied byte-for-byte and are reported in `skipped_links`; a link under…
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Ren'Py project root containing `game/`. |
checks | Optional checks. Only `["lint"]` is supported; any other value is rejected. | |
keep_shadow | boolean | Keep the temporary shadow after validation and return `shadow_path`; cleanup then belongs to the caller. |
staged | Optional overlay map from a project-relative (`game/script.rpy`) or game-relative (`script.rpy`) path to UTF-8 text. Staged bytes live only in the temporary shadow and count against shadow quotas. | |
timeout | number | Lint timeout in seconds. `0` derives `min(180, max(1, attestation_timeout*3))` (90 seconds by default); explicit values are clamped to 1-600. |
version | string | Ren'Py SDK version selector: `stable` (default) or an explicit version such as `8.5.3`. `stable` honors `RENPY_SDK_STABLE_VERSION`. The project tree is never searched for an SDK. |
renforge_launch Renforge Launch
Start or attach a running game session with Live Editor enabled by default (pass editor=false for non-editor runtime launch). Launch starts the background startup flow, usually returning while startup is still in progress; poll `renforge_launch_status` and capture with `renforge_screenshot` before interaction. Saves and HOME default to the user's own; pass `savedir=temporary` (or set `RENFORGE_ISOLATION=temporary`) to isolate saves, persistent data, preferences, and HOME so the session does not read or write the user's normal Ren'Py state. The ready payload includes `session_id` and an `isolat…
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root passed to the launcher and runtime bridge. |
audio | string | Audio strategy: `auto`, `native`, `dummy`, or `none`; both `dummy` and `none` use SDL dummy audio. |
cleanup_on_stop | boolean | When true, stop removes only the disposable session directory created for isolated `savedir`/`home` (saves plus private HOME). Arbitrary save directories, explicit HOME paths, and existing user files… |
display | string | Display strategy: `auto`, `native`, `xvfb`, or `external`. The accepted token `none` returns an error because Ren'Py requires a display surface. |
editor | boolean | Enable/disable live editor injection; default True for interactive work. |
home | string | Process HOME for the launched game. Omitted, empty, or `auto` follows `savedir`: a private directory for `savedir=temporary`, so preferences and `~/.renpy` writes miss the user's files, otherwise the… |
language | Optional Ren'Py language code set as `RENPY_LANGUAGE` for a fresh game process. Ren'Py persists it as `preferences.language`, so this changes the stored preference, not just one session; for verificat… | |
persistent | string | Persistent state follows the selected save directory. Omitted or `auto` selects `empty` for a fresh temporary directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; it… |
preferences | string | Preferences share Ren'Py's persistent storage. Omitted or `auto` selects `empty` for a fresh temporary save directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; prefe… |
savedir | string | Save location. `temporary` isolates the session: saves, persistent data, preferences, and HOME go to a disposable folder, so the game cannot read or write the user's normal Ren'Py saves. Omitted, empt… |
timeout | number | Ren'Py background startup deadline in seconds (0 uses the launcher default). This does not control the MCP response wait; poll `renforge_launch_status` after a `starting` result. |
version | string | Launcher version selector, either `stable` or an explicit semantic version (for example `8.5.3`). |
warp | string | Optional Ren'Py `file.rpy:line` startup target; this launch tool does not resolve label names. A warp launch replaces a running game like `renforge_jump`: with every isolation knob omitted or `auto`,… |
renforge_launch_status Renforge Launch Status
Poll launch progress and return `idle`, `starting`, `ready`, `failed`, `closing`, or `closed`. Use after any launch start when the first call has not returned an immediate ready state. A ready payload repeats `session_id` and the `isolation` object from launch (only `isolation` for a game started by another process).
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root currently being launched or running. |
renforge_jump Renforge Jump
Restart into a specific label/file position and keep interacting in a fresh game session. If needed, this may download and cache the required SDK before restart. Isolation matches `renforge_launch` (opt in with `savedir=temporary`). With every isolation knob omitted or `auto`, a relaunch that replaces an isolated game this server (or its dashboard) owns stays isolated; it still gets a fresh session, so slots imported into the old one are not carried over. Use for deterministic positioning before scripted checks.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root containing the target game. |
target * | string | Label name or `file:line` destination for relaunch. |
home | string | Process HOME for the launched game. Omitted, empty, or `auto` follows `savedir`: a private directory for `savedir=temporary`, so preferences and `~/.renpy` writes miss the user's files, otherwise the… |
persistent | string | Persistent state follows the selected save directory. Omitted or `auto` selects `empty` for a fresh temporary directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; it… |
preferences | string | Preferences share Ren'Py's persistent storage. Omitted or `auto` selects `empty` for a fresh temporary save directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; prefe… |
savedir | string | Save location. `temporary` isolates the session: saves, persistent data, preferences, and HOME go to a disposable folder, so the game cannot read or write the user's normal Ren'Py saves. Omitted, empt… |
version | string | Runtime version to use when restarting at target. |
renforge_new_game Renforge New Game
Restart at `start` and begin a new story progression. This may download and cache the required SDK before the fresh launch. Isolation matches `renforge_launch` (opt in with `savedir=temporary`). With every isolation knob omitted or `auto`, a relaunch that replaces an isolated game this server (or its dashboard) owns stays isolated; it still gets a fresh session, so slots imported into the old one are not carried over. Prefer this for clean scenario entry rather than reusing unstable runtime state.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root containing the game to restart. |
home | string | Process HOME for the launched game. Omitted, empty, or `auto` follows `savedir`: a private directory for `savedir=temporary`, so preferences and `~/.renpy` writes miss the user's files, otherwise the… |
persistent | string | Persistent state follows the selected save directory. Omitted or `auto` selects `empty` for a fresh temporary directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; it… |
preferences | string | Preferences share Ren'Py's persistent storage. Omitted or `auto` selects `empty` for a fresh temporary save directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; prefe… |
savedir | string | Save location. `temporary` isolates the session: saves, persistent data, preferences, and HOME go to a disposable folder, so the game cannot read or write the user's normal Ren'Py saves. Omitted, empt… |
version | string | Runtime version used for the fresh launch. |
renforge_stop Renforge Stop
Stop the live runtime and cleanup the launch/session state. Running games may be interrupted, and active quick-save/lock state should be considered volatile after stop.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root whose active launch should be stopped. |
renforge_game_state Renforge Game State
Read full live state for debugging and monitoring. Use this before/after interactions to verify state deltas without changing variables directly. Request optional sections such as `metrics` and `audio`.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with an active live session. |
include | Optional sections to include in addition to default state (for example metrics, audio). |
renforge_game_state_compact Renforge Game State Compact
Read bounded live state with explicit variable limits and payload caps for large sessions. Use this in loops and scripts to keep responses predictable.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with an active live session. |
max_depth | integer | Maximum object nesting depth to serialize, from 0 through 20. |
max_items | integer | Maximum variable count before trimming, from 1 through 10000. |
max_output_bytes | integer | Payload cap in bytes, from 64 through 2000000. |
state_profile | string | Compact shape policy: `minimal`, `interaction`, `debug`, or `full`. |
variable_names | Restrict output to these variable names. | |
variable_prefix | string | Filter variable names by this prefix. |
renforge_inspect_screen Renforge Inspect Screen
Inspect a named active screen, including layer, scope and arguments. Useful for branch verification before choosing click or hover selectors.
| Parameter | Type | Description |
|---|---|---|
name * | string | Screen name to inspect in the live bridge state. |
project_path * | string | Project root with active game session. |
renforge_eval Renforge Eval
Evaluate an arbitrary Python expression in the running store namespace. This may call project functions and mutate runtime state or access the filesystem, start processes, and use the network with the game process's permissions. Prefer `renforge_get_var` for plain reads and use this only for controlled diagnostics. Pass `authorize=true` when `RENFORGE_POLICY=enforce`, unless this operation is allowlisted.
| Parameter | Type | Description |
|---|---|---|
expr * | string | Python expression to evaluate in the store namespace. |
project_path * | string | Project root with active live session. |
authorize | boolean | Explicitly authorize this open-world expression when `RENFORGE_POLICY=enforce`. |
renforge_set_var Renforge Set Var
Write a game variable directly in the live store namespace. This mutates state immediately and should be used after validating the current state snapshot.
| Parameter | Type | Description |
|---|---|---|
name * | string | Variable name to set. |
project_path * | string | Project root with active live session. |
value * | Value to write to the variable (JSON-compatible serializable object). |
renforge_get_var Renforge Get Var
Read one named variable from the live store. JSON-safe values are returned as-is; other objects are replaced by a type label without calling conversion hooks such as `__repr__`. Resolving the name can still run a store property getter. Prefer this over `renforge_eval` when you only need a named lookup.
| Parameter | Type | Description |
|---|---|---|
name * | string | Variable name to read. |
project_path * | string | Project root with active live session. |
renforge_poll_events Renforge Poll Events
Read queued runtime events since a stream index. Use this for deterministic event-driven debugging instead of polling live UI repeatedly.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
since | integer | Exclusive cursor position for pagination of event history. |
renforge_get_errors Renforge Get Errors
Read recent runtime and bridge errors. Run this after risky actions or after a stop to confirm the game did not crash with hidden diagnostics.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root; this can still read bounded crash files after the runtime stops. |
since | integer | Exclusive cursor for paginating older logs/diagnostics. |
renforge_wait_until Renforge Wait Until
Wait for one stable condition (`label`, `screen`, or `expr`). Prefer `label` or `screen` when possible; `expr` is arbitrary Python evaluated repeatedly in the store namespace and may mutate game state, access the filesystem, start processes, or use the network with the game process's permissions. Keep timeout bounded.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
expr | Expression condition to evaluate and await success. Evaluated repeatedly during waiting. | |
include | Optional fields to include in compact state output. | |
interval | number | Polling interval in seconds. |
label | Target label to wait for; provide either label, screen, or expression. | |
max_depth | integer | Maximum object nesting depth in compact state, from 0 through 20. |
max_items | integer | Maximum list/map items in compact state, from 1 through 10000. |
max_output_bytes | integer | Payload cap for the result, from 64 through 2000000 bytes. |
screen | Target screen name to wait for. | |
state_profile | string | Returned state shape: `minimal`, `interaction`, `debug`, or `full`. |
timeout | number | Maximum wait time, a finite value between 0 and 120 seconds. |
renforge_advance Renforge Advance
Advance one dialogue event from the currently active queue. Prefer `renforge_control(action="advance")` only when you intentionally need control-command consistency with other navigation actions.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root of the running live session. |
renforge_control Renforge Control
Run a runtime control action (`advance`, `rollback`, `toggle_skip`, `toggle_auto`, `toggle_afm`, `game_menu`, `hide_windows`, `quick_save`, `quick_load`, `reload_script`, `restart_interaction`, `quit`). Use `quick_load` with care: it replaces live state. `quit` stops the active game session. `renforge_advance` is a narrower alternative for pure advance actions. Destructive actions require `authorize=true` when `RENFORGE_POLICY=enforce`.
| Parameter | Type | Description |
|---|---|---|
action * | string | Control verb name to execute. |
project_path * | string | Project root with running live session. |
authorize | boolean | Explicitly authorize destructive actions when `RENFORGE_POLICY=enforce`; ignored for lower-risk actions. |
effect_timeout | number | Maximum seconds to wait when `wait_for_effect` is enabled. |
interaction_id | string | Optional interaction correlation id used for safety checks and logs. |
wait_for_effect | boolean | Wait until bridge reports visible state effect before returning. |
renforge_send_input Renforge Send Input
Send exactly one input command path (text, key, or scroll object) into the live game. Keep calls scoped and single-purpose; for deterministic workflows prefer one action per invocation.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
key | Readable named key such as `enter`, `esc`, an arrow, `pageup`, `pagedown`, `backspace`, `delete`, `home`, `end`, `space`, `tab`, or a function key. | |
scroll | Logical-coordinate object `{"x": number, "y": number, "direction": "up"|"down", "amount": integer?}`. | |
submit | boolean | Press Enter after injected text; only valid with text input, not key or scroll. |
text | Text to inject as character-by-character text input. |
renforge_saves Renforge Saves
List, load, save, or import named slots in a single command family. `list` reads the running (usually isolated) session; `list_user` observes host slots in the host Ren'Py save folder and `game/saves` without a running game and never writes. `import` copies selected host slots into the isolated session savedir (never bind-mounts the user tree) and is refused unless the session was launched with `savedir=temporary`. `load` replaces live state and `save` can overwrite the chosen slot. Verify slot names before mutating gameplay progress. `load` requires `authorize=true` when `RENFORGE_POLICY=enfo…
| Parameter | Type | Description |
|---|---|---|
action * | string | One of `list`, `list_user`, `import`, `load`, or `save`. |
project_path * | string | Project root of the live game (or of the project whose host saves should be listed or imported). |
authorize | boolean | Explicitly authorize `load` when `RENFORGE_POLICY=enforce`; ignored for list, list_user, import, and save. |
extra_info | Optional save metadata for save actions. | |
pattern | Optional glob for `list_user` or `import`, matched against the whole slot name: `*` any run of characters, `?` one character, `[ab]` one of a set (for example `1-*` or `auto-?`). At most 256 character… | |
regexp | Optional regex filter for `list`, applied by Ren'Py's `renpy.list_slots` in the game. | |
slot | Slot label used by save/load/import. Import also accepts `slots` or `pattern`. | |
slots | Optional list of host slot names to copy for `import` (at most 1000 names of at most 256 characters). |
renforge_list_choices Renforge List Choices
List on-screen menu choices with index and text ordering. Call before `renforge_select_choice` to pick valid entries for the current menu state.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root of the running live session. |
renforge_select_choice Renforge Select Choice
Select a menu choice by case-insensitive text or zero-based index. Text matching prefers an exact match, then uses the shortest case-insensitive substring match. Use list output first to avoid ambiguous partial text.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root of the running live session. |
index | Zero-based choice index fallback when text is omitted. | |
text | Visible text to match; preferred over index. |
renforge_list_ui_elements Renforge List Ui Elements
List focusable UI elements with bounds and element metadata. Use this first for semantic interaction planning; it is narrower than a full scene readout and aligned to click/hover workflows.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
element_type | string | Optional element type/class filter (for example button, label). |
screen | string | Optional active screen filter. |
text | string | Optional text filter to narrow focusable candidates. |
renforge_click_element Renforge Click Element
Click a semantic UI element by text/id/screen (preferred). Falls back safely through fresh frame guards and returns focus hints when another element captures the hit test. Use `renforge_click_at` only as coordinate fallback.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
effect_timeout | number | How long to wait when `wait_for_effect` is true. |
element_id | string | Exact control id override when text is unstable. |
exact | boolean | Enable strict text matching. |
expected_frame_id | string | Optional frame id from a recent scene/listing call; when supplied it rejects a stale frame. |
interaction_id | string | Optional interaction correlation id for logs/troubleshooting. |
screen | string | Optional screen name filter to scope semantic lookup. |
text | string | Preferred visible text matcher for the target control. |
wait_for_effect | boolean | Wait for a visual effect/state update before returning. |
renforge_hover_element Renforge Hover Element
Move cursor over a semantic control by text/id/screen. Prefer this before click when checking hover states or tooltips.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
element_id | string | Element id matcher for precise targeting. |
exact | boolean | Require exact text match. |
expected_frame_id | string | Frame id expected from recent scene/listing calls. |
screen | string | Screen filter for ambiguous UI states. |
text | string | Text matcher for the control to hover. |
renforge_get_ui_element_bounds Renforge Get Ui Element Bounds
Resolve semantic element bounds without clicking. Use this after list output to verify target geometry before any pointer action.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
element_id | string | Element id matcher for a precise target. |
exact | boolean | Require exact text matching. |
expected_frame_id | string | Optional frame guard token for freshness. |
screen | string | Optional screen filter for targeted lookup. |
text | string | Text matcher for the element. |
renforge_editor Renforge Editor
Drive the in-game Live Editor with public actions `status`, `select`, and `save`. `select` uses the overlay hit path in `logical` or `screenshot` coordinates. `save` is the overlay Save (reload + attest), not a silent source write. `save` with `dry_run=true` returns a unified source diff and applies nothing: it skips shadow validation, publish, reload, and attestation, and creates no transaction. Never call private `editor_task0_*` handlers.
| Parameter | Type | Description |
|---|---|---|
action * | string | One of `status`, `select`, or `save`. |
project_path * | string | Project root with an active live session and Live Editor. |
coordinate_space | string | `logical` (default) or `screenshot` coordinates. |
dry_run | boolean | `save` only. Preview the source diff without writing, linting, reloading, or creating a transaction. Cannot be combined with x/y. |
expected_frame_id | string | Optional frame id from a recent screenshot or listing; rejects a stale frame. |
x | Required for `select`. Optional destination for `save` when applying a move. | |
y | Required for `select`. Optional destination for `save` when applying a move. |
renforge_click_at Renforge Click At
Click a coordinate in screenshot or logical space. Use semantic click first (`renforge_click_element`) and fall back when text/id selectors are unavailable. Combine with coordinate space and frame/state guards.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
x * | number | Horizontal coordinate in selected coordinate space. |
y * | number | Vertical coordinate in selected coordinate space. |
coordinate_space | string | `logical` (default) or `screenshot` coordinates. |
expected_frame_id | string | Frame id that must match for safety checks. |
expected_state | Optional expected runtime state dictionary before click. |
renforge_get_displayable_bounds Renforge Get Displayable Bounds
Read placement bounds for a rendered displayable tag by tag name. Use this to diagnose layout changes or anchor calculations before moving elements.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
tag * | string | Displayable tag name to resolve. |
layer | string | Optional Ren'Py layer override. |
renforge_position_element Renforge Position Element
Reposition a shown image tag live and return new logical bounds. This mutates runtime placement only; after converging with scene/measure tools, write the final values into the `.rpy` source.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
tag * | string | Displayable tag to reposition. |
layer | string | Optional Ren'Py layer override. |
rotate | Rotation in degrees. | |
xalign | Alternative x alignment offset. | |
xanchor | Anchor point for x placement (0..1). | |
xoffset | Relative x offset in pixels. | |
xpos | X position: an integer is absolute logical pixels; a float is a screen fraction (for example 0.5). | |
yalign | Alternative y alignment offset. | |
yanchor | Anchor point for y placement (0..1). | |
yoffset | Relative y offset in pixels. | |
ypos | Y position: an integer is absolute logical pixels; a float is a screen fraction (for example 0.5). | |
zoom | Scale factor for the displayable. |
renforge_hit_test Renforge Hit Test
Inspect which interactive nodes sit under a coordinate. Use this when click targets look stale or overlays may absorb events, and prefer semantic selectors once ambiguity is resolved.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
x * | number | X coordinate for hit testing. |
y * | number | Y coordinate for hit testing. |
coordinate_space | string | Coordinate system for the test point (`logical` or `screenshot`). |
renforge_diff_screenshots Renforge Diff Screenshots
Diff two PNG frames and return whether pixels changed plus the minimal changed rectangle. Use for regression checks between pre/post actions.
| Parameter | Type | Description |
|---|---|---|
before_path * | string | Path to baseline PNG file. |
project_path * | string | Project root used for path resolution of before/after images. |
after_path | string | Path to comparison PNG; omit to compare against current live frame. |
threshold | integer | Pixel-difference threshold; higher values reduce sensitivity. |
renforge_scene_tree Renforge Scene Tree
Read the full scene graph (logical scene data). Unlike `renforge_list_ui_elements` this is broad and includes non-focusable nodes, so use it for full-tree inspection when semantic selectors are ambiguous. `save_as` or `diff_against` may create `.renforge/scenes/`; `save_as` writes and overwrites the named JSON snapshot. Omit both options for read-only inspection. With `include=["overflow"]` only `text`, `button`, and `input` nodes get an overflow verdict: the effective ceiling is the tighter of the widget's absolute `xmaximum`/`ymaximum` (minus integer padding and margins) and the child text's…
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
detail | string | Detail granularity (`semantic`, `layout`, or `raw`) for scene nodes. |
diff_against | string | Optional snapshot name for diff context; compare against existing `.renforge/scenes/<name>.json` entry. |
format | string | Return format (`json` or `wireframe`). |
ids | Optional element id filters. | |
include | Optional expensive node properties: `color`, `style`, and `overflow`. | |
layers | Optional layer filters. | |
max_items | integer | Maximum total nodes, from 1 through 10000. |
max_output_bytes | integer | Payload cap, from 64 through 2000000 bytes. |
max_output_depth | integer | Maximum traversal depth before truncation, from 0 through 20. |
save_as | string | Optional snapshot name saved under `.renforge/scenes/<name>.json`; reusing a name overwrites it. |
screen | string | Optional active screen filter. |
types | Optional node type filters. |
renforge_measure Renforge Measure
Measure geometry between scene nodes without visual inspection. `contrast` samples the live frame and reports a WCAG ratio. Use this to detect layout drift after positional edits.
| Parameter | Type | Description |
|---|---|---|
action * | string | One of `align`, `gap`, `distribute`, `center`, `overlap`, `fit`, or `contrast`. |
project_path * | string | Project root with active live session. |
targets * | array | Scene node `id` strings or literal bounds objects `{"x": number, "y": number, "width": number, "height": number}`. |
tolerance | Optional tolerance; adds a pass verdict (for contrast, the minimum WCAG ratio). | |
within | Optional scene node id or literal `{x,y,width,height}` bounds used as the containing region. |
renforge_screenshot Renforge Screenshot
Capture the current live frame and return an in-memory image response (no persistent file write). Use this to inspect UI state before clicks or scenario actions.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
crop_height | integer | Crop height; 0 disables cropping in Y. |
crop_width | integer | Crop width; 0 disables cropping in X. |
crop_x | integer | Crop origin x in logical coordinates. |
crop_y | integer | Crop origin y in logical coordinates. |
crosshair_x | integer | Crosshair x coordinate; both x/y must be set together. |
crosshair_y | integer | Crosshair y coordinate; both x/y must be set together. |
grid | integer | Guide overlay grid spacing in pixels. |
height | integer | Target capture height. Set one axis and keep aspect ratio via runtime logic. |
rulers | boolean | Draw rulers along frame edges for measurement. |
scale | number | Scale factor applied after crop/resize. |
width | integer | Target capture width. Set one axis and keep aspect ratio via runtime logic. |
renforge_capture_screenshot Renforge Capture Screenshot
Persist the current frame under `.renforge/captures/` and return the output path plus hash. This writes disk and may overwrite an existing name.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
crop_height | integer | Crop height; 0 disables cropping in Y. |
crop_width | integer | Crop width; 0 disables cropping in X. |
crop_x | integer | Crop origin x in logical coordinates. |
crop_y | integer | Crop origin y in logical coordinates. |
crosshair_x | integer | Crosshair x coordinate; both x/y must be set together. |
crosshair_y | integer | Crosshair y coordinate; both x/y must be set together. |
grid | integer | Guide overlay grid spacing in pixels. |
height | integer | Target capture height. |
name | string | Capture base filename (letters, digits, dot, dash, underscore). |
rulers | boolean | Draw rulers along frame edges for measurement. |
scale | number | Scale factor applied after crop/resize. |
width | integer | Target capture width. |
renforge_estimate_translation Renforge Estimate Translation
Estimate geometric translation between two images for visual text alignment workflows. This is file-only and read-only.
| Parameter | Type | Description |
|---|---|---|
after_path * | string | Path to comparison image. |
before_path * | string | Path to baseline image. |
max_shift | integer | Maximum per-axis shift considered during matching. |
region_height | integer | Optional crop region height. |
region_width | integer | Optional crop region width. |
region_x | integer | Optional crop region X origin. |
region_y | integer | Optional crop region Y origin. |
threshold | integer | Similarity threshold for matching pixels. |
renforge_find_image_on_screen Renforge Find Image On Screen
Find a template image on the current frame and return matches with bounds in screenshot coordinates. Use this to close the control loop after screenshot capture and click fallback.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root with active live session. |
template_path * | string | Template image path relative to project or absolute. |
max_matches | integer | Maximum number of matches to return. |
region_height | integer | Optional region height; set width/height together. |
region_width | integer | Optional region width; set width/height together. |
region_x | integer | Optional region x origin to limit search area. |
region_y | integer | Optional region y origin to limit search area. |
threshold | number | Match confidence threshold. |
renforge_run_scenario Renforge Run Scenario
Run a scripted scenario pipeline of multiple interaction steps in one call and return grouped diagnostics. `eval`, `assert`, and expression-based `wait` steps execute arbitrary Python that may mutate state, access the filesystem, start processes, or use the network. Validate expectations and review capture output on failure. Destructive or open-world steps require `authorize=true` when `RENFORGE_POLICY=enforce`.
renforge_autopilot Renforge Autopilot
Auto-play branches by stopping any current manual session and launching a fresh session for every replay. It writes incremental progress to `.renforge/autopilot.json` and may download/cache the required SDK. Best for broad checks; not deterministic and potentially expensive.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root for the live session. |
max_runs | integer | Maximum scenario runs before stopping. |
max_steps | integer | Maximum steps per run. |
renforge_assets Renforge Assets
Run static asset validation and return missing/orphaned image or audio references. Useful before build and before submitting translation/build changes.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root to inspect. |
renforge_languages Renforge Languages
List translation languages currently present under `game/tl/`. Use this before generating or exporting localized files.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root for translation inventory. |
renforge_translation_stats Renforge Translation Stats
Compute missing/covered translation stats for a language before generation. Run this first, then gate calls to translation generation. This may download and cache the required SDK before analysis.
| Parameter | Type | Description |
|---|---|---|
language * | string | Language code or name under `game/tl/`. |
project_path * | string | Project root to analyze. |
renforge_generate_translations Renforge Generate Translations
Generate or update translation files under `game/tl/<language>/`. This may download and cache the SDK before writing output. It writes files, so treat it as destructive when run against production trees and prefer checking stats first.
| Parameter | Type | Description |
|---|---|---|
language * | string | Language code/name to generate. |
project_path * | string | Project root to write translation files for. |
renforge_export_dialogue Renforge Export Dialogue
Export dialogue for translators or external tooling. This may download and cache the SDK, then writes and overwrites `dialogue.txt` at the project root.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root whose dialogue should be exported. |
language | string | Optional language variant to export. |
renforge_web_build Renforge Web Build
Run the Ren'Py web build pipeline and write browser assets. It may download/cache the Ren'Py SDK, but requires the separately installed Web DLC and does not download external toolchains or the Web DLC. Destination controls output.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root for build output. |
destination | string | Optional output directory override. |
renforge_distribute Renforge Distribute
Build desktop distribution packages and write them to destination. This executes packaging toolchains and may download and cache the SDK; it can be slow or destructive when output paths are reused.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Project root to package. |
destination | string | Optional output directory override. |
package | string | Package target (for example `pc`, `mac`, `linux`). |
renforge_search_docs Renforge Search Docs
Search local Ren'Py documentation snippets by keyword before opening results. Use this to identify canonical topic IDs before `renforge_get_doc`. This may download and cache the SDK when docs are not already available.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query for Ren'Py documentation corpus. |
renforge_get_doc Renforge Get Doc
Read a single Ren'Py documentation topic. For discovery, run `renforge_search_docs` and `renforge_list_docs` first to avoid guessing IDs. This may download and cache the SDK before resolving doc content.
| Parameter | Type | Description |
|---|---|---|
topic * | string | Topic identifier or slug in the doc catalog. |
renforge_list_docs Renforge List Docs
List available Ren'Py documentation topics. Use this as the discovery step before any topic-specific docs read. This may download and cache the SDK if docs are not already available.