@@ -226,6 +226,26 @@ export const commandRegistry = [
226226 recipe : true ,
227227 handler : { kind : "playground" , method : "runEditorOpen" } ,
228228 } ,
229+ {
230+ id : "wordpress.editor-actions" ,
231+ description : "Open a generic WordPress block editor target, run a bounded editor action script, and capture replayable mutation evidence artifacts." ,
232+ acceptedArgs : [
233+ { name : "target" , description : "Editor target to open; defaults to post-new." , format : "post-new|site" } ,
234+ { name : "post-id" , description : "Existing post ID to open in the post editor." , format : "positive integer" } ,
235+ { name : "post-type" , description : "Post type for post-new or post-id targets; defaults to post." , format : "post type slug" } ,
236+ { name : "url" , description : "Explicit editor path or absolute URL to open instead of resolving a target." , format : "path or URL" } ,
237+ { name : "steps-json" , description : "Ordered editor action script: open, insertBlock, selectBlock, and inspectState." , required : true , format : "JSON array (inline or @<path>)" } ,
238+ { name : "wait-selector" , description : "Selector that marks the editor as ready; defaults to the block editor shell." , format : "CSS selector" } ,
239+ { name : "wait-timeout" , description : "Timeout for navigation and editor-ready waits." , format : "duration, e.g. 15s or 500ms" } ,
240+ { name : "step-timeout" , description : "Per-action timeout applied to each editor action step." , format : "duration, e.g. 15s or 500ms" } ,
241+ { name : "timeout" , description : "Total-script timeout bounding the whole editor action run." , format : "duration, e.g. 30s or 1500ms" } ,
242+ { name : "capture" , description : "Comma-separated artifacts to capture after actions." , format : "steps,console,errors,html,screenshot,editor-state" } ,
243+ ] ,
244+ outputShape : "JSON summary plus files/browser/editor-action-steps.jsonl, editor-action-summary.json, editor-action-state.json, and optional console/errors/html/screenshot artifacts." ,
245+ policyRequirement : "Runtime policy commands must include wordpress.editor-actions." ,
246+ recipe : true ,
247+ handler : { kind : "playground" , method : "runEditorActions" } ,
248+ } ,
229249 {
230250 id : "wordpress.browser-actions.evaluate" ,
231251 description : "Policy capability gating arbitrary page-side JavaScript (the evaluate step) inside wordpress.browser-actions. Non-JS interaction steps do not require this capability." ,
0 commit comments