Image Editor session flow and lifecycle
Use list_sessions → select_region → request_edit → optional undo → export. list_sessions exposes only sessions explicitly granted to this Agent that still pass the image-project write check, with context such as projectId and fileKey. A region uses normalized 0..1 coordinates relative to the visible canvas, not pixels. select_region clears and replaces the entire mask, including a user’s hand-painted selection; ask before replacing a selection the user may want to keep.
request_edit consumes the mask at command execution time. The current browser rejects it with selection_required when no selection exists; treat the returned browser reason as runtime truth. A successful edit is loaded into the visible canvas, added to browser history, and advances the image project’s current revision. Do not store the full prompt in knowledge or routing telemetry; the editor action redacts arguments.prompt.
undo is one step in the shared browser canvas history and can therefore undo the user’s own latest operation. At the history floor it silently changes nothing while still returning {undone:true}. There is no Agent redo action, and undo does not refund a completed edit. export renders the current canvas as PNG, uploads it as a new image-project revision managed through File Center, and returns imageKey and assetUrl; it does not post an image into the conversation.
Closing or disconnecting the browser invalidates the session. For “session is not open” or “disconnected,” call list_sessions again instead of retrying the old ID. Distinguish not found, grant required, disconnected conflict, action timeout, and a browser rejection with its reason, such as missing_region or selection_required. Revoke and takeover cancellations are terminal for that grant, not retry signals.
Related actions
Section titled “Related actions”arinova.image_editor.list_sessions, arinova.image_editor.select_region, arinova.image_editor.request_edit, arinova.image_editor.undo, arinova.image_editor.export
Also known as
image edit flow, select region, inpaint selection, editor undo, export edited image, 局部重繪
Build a7f47a5ca54ddcf7806cd48b81ce1b9827042766