You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent bridge cannot read or set the timeline duration #171
The MCP server has 19 tools covering layers, params, custom shaders and screenshots. None of them touch the composition duration, and get_project_state does not report it either. So an agent can see almost everything about a composition except how long it is.
Reading is the bigger half. A looping scene hardcodes its period in the shader, and if Dur does not match, the loop silently fails to close. The agent has no way to detect that. Building scenes through this server I have had to read the field off the timeline by hand every time, and once I got it wrong by inferring it from the thumbnail slider in the publish dialog.
The fix looks small, because the pieces are already there. useTimelineStore is imported in src/lib/agent-bridge/commands.ts and used for seedDurationFromMedia. setDuration already clamps through clampDuration and re-clamps currentTime, so there is no new validation to write.
Plus a tool file in packages/shader-lab-mcp/src/tools/ following the existing proxy() pattern.
I went through the 21 open PRs first. #167 rewrites the compositionSize line inside getProjectState and #164 changes the default duration, but neither exposes duration to the bridge, so the gap survives V3. Happy to rebase on #167 if it lands first.
Would you take a PR? I can send the read side on its own if you would rather not give an agent the write side.
Activity