Releases: simonwittber/AgentBridge
Releases · simonwittber/AgentBridge
Release list
v0.5.0
Added
register_commandtool: creates a persistent customIAgentCommandfrom C# source. The command is saved toAssets/AgentBridgeScripts/, compiled by the included asmdef, and discovered viaTypeCacheafter domain reload. Supportsstring,int,float, andboolparameters with JSON marshaling.
Changed
- Server startup instructions in
serve.gonow include guidance onregister_commandfor domain-specific tasks that need to run more than once.
MCP context size
=== MCP context size (fixed tools only) ===
tool bytes ~tokens
-------------------------------------------
screenshot 234 58
help 205 51
set_project 138 34
-------------------------------------------
TOTAL (3 tools) 577 144
note: dynamic core tools from Unity are registered at runtime via the 'core' flag
v0.3.1
Added
screenshotnow usesScreenCapture.CaptureScreenshotAsTexture()in play mode and a synchronous scene-view camera render in edit mode. The command returns immediately and fires ascreenshot_readynotification withpath,width, andheightwhen the image is saved.max_sizestill applies.- Notification system: AgentBridge writes
Temp/agent/notifications/<ts>-<uid>.jsonfiles for lifecycle events. Inservemode,dffrnt-agentpolls this directory every 500 ms and forwards each event to MCP clients as anotifications/message. Events:compile_started,compile_finished(includeserror_count),compile_failure(includes error details),refresh_started,refresh_finished,play_mode_entered,play_mode_exited,scene_opened(includesname,path,mode),screenshot_ready(includespath,width,height),script_started,script_failed. - Unity project auto-discovery:
dffrnt-agentchecks the current working directory and all immediate subdirectories for a Unity project (presence ofAssets/andProjectSettings/). Directories without a~suffix take priority. No--projectflag needed when running from the project root or a parent folder. - Tools list refresh: after
set_projectloads commands from Unity, the server sends anotifications/tools/list_changedevent so MCP clients pick up the new tools without a reconnect. agent_idfield: requests and responses include an optionalagent_idstring. Pass--agent-id <id>todffrnt-agentto tag all commands from one agent instance. The session heartbeat also includes the currentagent_idso multiple agents can see which agent holds the bridge.- Auto-compile timer: when a script file change is detected and no manual
compilecommand arrives within 10 seconds, AgentBridge triggers compilation automatically. This prevents stale compile state when the user switches back to the Editor after an agent writes scripts. - Global project registry: AgentBridge writes
%APPDATA%/AgentBridge/<hash>.jsonon each heartbeat and deletes it on quit. The file contains the project path, PID, and timestamp.dffrnt-agentuses this to discover running projects without aset_projectcall. list_projectsMCP tool: returns all Unity projects currently running with AgentBridge. Validates each entry by PID liveness and a 30-second timestamp window.- MCP server startup instructions: the server now tells MCP clients to call
list_projectsthenset_projectwhen no project is connected. MainThreadstatic class inScriptCommand.cs: providesMT.Run(() => ...)for scripts to marshal Unity API calls from the background thread back to the main thread. Available in allexecute_scriptsnippets via theusing MT = LLMDevTools.MainThreadalias injected by the wrapper.console_logsnow accepts an optionalfilterstring argument. When provided, only entries whose message contains the filter string (case-insensitive) are returned. Omitting the argument returns all entries as before.
Changed
execute_scriptnow runs the compiled script on the Unity main thread. Unity API calls are safe withoutMT.Run. The command is still non-blocking: compilation runs on a background thread, and the script runs on the main thread once compiled.execute_scriptnow compiles with debug symbols (-debug+) and loads the PDB alongside the assembly. Exception stack traces include source line numbers.execute_scriptrejects code containingThread.Sleep: it blocks the main thread and freezes the Unity Editor.profiler_startnow works in edit mode and play mode. The play-mode-only restriction is removed.profiler_get_samplesreturns aunitfield ("ms"or"bytes") and includes aliasedlastMs/avgMs/minMs/maxMsfields for time markers.- When scripts need recompilation or assets need reimport, AgentBridge now triggers
compileorrefreshautomatically and replays the blocked command after completion. Previously a hard error was returned. Commands that are always safe to run (log checks, script execution, asset writes) are not affected. - Renamed
SceneBridge.SilentlyClearDirtyScenestoSaveDirtyScenesWithoutPrompt. The old name implied that the method discards changes, but it saves named scenes without a prompt. - Removed the unused
_wasPlayingBeforeReloadfield fromAgentBridge. Unity firesExitingPlayModebeforeOnBeforeReload, so the field was alwaysfalsewhen read. - Renamed
SceneBridge.FtoToFloatacross all callers, includingMaterialCommands. - Renamed
PathUtils.IsWritabletoIsAllowedWritePath. The method checks whether a path is in an allowed write location, not whether the file system permits writes. AppendLognow logs a Unity Console warning on failure instead of silently swallowing the exception.AgentLogWindownow displays notification events (from the notifications directory) as distinct log entries. Non-error notifications appear in yellow; error notifications appear in red.console_logsnow reads only the entries currently visible in the Unity Console window using the internalUnityEditor.LogEntriesAPI, instead of parsing the entireEditor.logfile. Returns only current console state, not historical data.
Removed
profiler_measure: removed. Useexecute_scriptto fire aProfilerMarkerandprofiler_get_samplesto read the results.- Historical log file parsing from
ConsoleBridge. Replaced with internalLogEntriesAPI that returns only current console window entries.
MCP context size
=== MCP context size (fixed tools only) ===
tool bytes ~tokens
-------------------------------------------
screenshot 234 58
help 205 51
set_project 138 34
-------------------------------------------
TOTAL (3 tools) 577 144
note: dynamic core tools from Unity are registered at runtime via the 'core' flag
v0.3.0
Added
scriptable_get: read a named serialized field from a ScriptableObject asset by pathscriptable_set: write a named serialized field on a ScriptableObject asset and save it to disk
Changed
screenshotno longer returns base64 image data inline. It saves to a PNG file and returns the absolute path. Usemax_sizeto downscale before saving.execute_scriptnow loads compiled assemblies into a collectibleAssemblyLoadContextso they are garbage-collected after each call, preventing domain reload slowdown over time.set_projectnow callslist_commandsimmediately after setting the project path, so Unity commands are available without a separate discovery step. The response includescommands_loadedon success or awarningif Unity is not reachable.open_projectandcreate_projectnow return achoose_unity_versionresponse listing all detected installs when multiple Unity versions are installed andunity_pathwas not specified. Re-call withunity_pathset to the desired entry.help(no argument) always returns at least the Go-side commands (set_project,open_project,create_project,find_unity_installs) and includes a_warningwith instructions to callset_projectwhen Unity commands have not been loaded yet.
Removed
invoketool removed from the MCP server. All Unity commands are now registered as discrete named tools at startup. LLMs can no longer route arbitrary command names through a generic escape hatch.IAgentCommand.Coreproperty removed. All registered commands are now exposed as named MCP tools; there is no longer a distinction between core and non-core commands.
MCP context size
=== MCP context size (fixed tools only) ===
tool bytes ~tokens
-------------------------------------------
screenshot 234 58
help 205 51
set_project 138 34
-------------------------------------------
TOTAL (3 tools) 577 144
note: dynamic core tools from Unity are registered at runtime via the 'core' flag
v0.2.0
Added
- Transform tools:
set_transform,duplicate_object,reparent_object - Profiler tools:
profiler_start,profiler_stop,profiler_clear,profiler_get_samplesusingUnity.Profiling.ProfilerRecorder profiler_benchmark: fires a namedProfilerMarkerwith real CPU work to produce measurable timing samples (use withprofiler_start)helptool: returns full description and argument details for any command on demandscreenshotnow returns the image inline (base64 PNG) with optionalmax_sizedownscaleexecute_script: compile and run C# code snippets in the EditorIAgentCommand.Coreproperty: command classes declare themselves as core withbool Core => true- Go integration tests for profiler commands and
execute_script, including a live data-capture test that fires aProfilerMarkerand verifiessampleCount > 0
Changed
play_mode(single command withactionparameter) replaced byplay_enterandplay_exit(no arguments each)run_tests(single command withmodeparameter) replaced byrun_editor_testsandrun_playmode_testscommandsrenamed tolist_commandsconsole_logssimplified:limitandtypefilter arguments removed; always returns all buffered logs- MCP tools/list context cost reduced by 31% (from ~3,000 to ~2,063 tokens) by moving argument descriptions behind the
helptool serve.gonow loads core tools dynamically from Unity at startup vialist_commandsinstead of a hardcoded allowlist. No Go recompile needed when adding new Unity commands.agent_schema.jsonremoved; no offline schema cache needed.- Dropped
profiler_set_deepandprofiler_get_frame(required internal Unity APIs with no public equivalent) - Removed
--schemaCLI flag fromdffrnt-agent
MCP context size
=== MCP context size (fixed tools only) ===
tool bytes ~tokens
-------------------------------------------
screenshot 234 58
help 205 51
invoke 161 40
set_project 138 34
-------------------------------------------
TOTAL (4 tools) 738 184
note: dynamic core tools from Unity are registered at runtime via the 'core' flag
v0.1.0
Added
- File-based IPC queue with FIFO ordering, session heartbeat, and domain-reload recovery
- Go harness (
dffrnt-agent) withsendandserve(MCP stdio) subcommands - Core:
status,compile,refresh,commands,focus - Scene management:
scene_info,scene_open,scene_save,scene_new - Hierarchy and objects:
hierarchy,object_find/create/delete/active/rename/select,objects_find - Components:
component_get,component_set,component_add - Assets:
asset_find,asset_info,asset_set,asset_create,asset_delete,asset_move,asset_copy,asset_write_text - Materials:
material_get,material_set - Prefabs:
prefab_open,prefab_save - Packages:
package_list,package_add,package_remove,package_search - Reflection:
reflect_assemblies,reflect_types,reflect_members - Editor utilities:
menu_item,uuid,undo,redo,console_logs,play_mode,screenshot,selection_get,run_tests - Editor preferences and player settings:
editor_pref_get/set,player_settings_get/set - Tags and layers:
tags_layers,tag_add,layer_add - Build:
build