editor-ai-sidebar is a WordPress plugin for sites that add several language-model helpers to the block editor. It provides one sidebar, a fixed set of result types and an explicit approve step, and it makes no model calls of its own. It is MIT licensed, and v0.1.0 was released on 18 November 2026.
It was written from scratch from an idea, as part of a set of utilities built between 11 and 19 November 2026 by language-model coding agents under the editor’s direction. It has not run on a live site, and the README records no measured result.
A site with five AI helpers in the editor ends up with five panels, five spinners and five ideas of what “accept” means. Some write to the post the moment the model answers. An editor who has learned that one panel waits for a click assumes the next one does too, and an unchecked line goes live.
There is a quieter failure. A helper that writes to the database while the editor is open can be undone by the editor itself. The block editor keeps its own copy of the title, excerpt, registered meta and block attributes, and the next save sends that copy back. The helper’s write vanishes, or half of it does.
text, list and fields, in a single or choices layout. Providers cannot ship their own JavaScript.A provider is a plugin that adds a definition to the editor_ai_sidebar_actions filter. Registry validates each definition once per request, keeps the good ones and records the rest with a reason such as invalid_id or core_field_server_write. This is the smallest provider from the README.
add_filter('editor_ai_sidebar_actions', function (array $actions): array {
$actions['my-plugin/shout'] = [
'id' => 'my-plugin/shout',
'label' => __('Shout the title', 'my-plugin'),
'group' => 'headlines',
'needs' => ['title'],
'result' => ['layout' => 'single', 'item_type' => 'text'],
'apply' => ['mode' => 'editor', 'operation' => 'set_title'],
'run' => function (array $request): array {
return [
'layout' => 'single',
'items' => [['id' => 'a', 'type' => 'text', 'value' => strtoupper($request['context']['title'])]],
];
},
];
return $actions;
});
Opening the sidebar makes one request for the action list. A click sends only the declared context, read from the unsaved editor state. While the provider’s run executes, WriteWatch watches the post and the action’s targets, and a provider that writes early has its result thrown away. A valid result gets a 128-bit random id and a record holding the user, post, action, a SHA-256 hash of each item, a hash of the context and an expiry, 30 minutes by default. Records, jobs and locks share one small custom table.
Approve sends the id, approved: true, the value and the context hash. The server refuses unless the record is unexpired, unused, issued to this user for this post and action, matches the value, and the context has not changed. If the post changed, the editor must confirm “Apply anyway”. The title, excerpt, content, status, date, slug and author can never be server targets, for the reason above.
edit_post, action, capability, selection, context size, rate limit, daily cap and availability, in that order, before any provider code runs.EDITOR_AI_SIDEBAR_DISABLED.insert_blocks escapes its values.Cache-Control: no-store and a contract version header.UPDATE ... WHERE hits < cap, tested with two store instances interleaved on MySQL.There are no open issues. This is v0.1.0. The suite has 99 PHP tests and 998 assertions, including MySQL integration tests on a throwaway MySQL 8, plus 56 passing script tests under Node. Static analysis and code style checks pass. The PHP unit tests use stubs and mocks. Two example providers ship, with canned results only. No real provider has been connected, and the CI workflow has not run on GitHub yet.
Requires WordPress 6.4 or later, PHP 8.1 or later and the block editor. There are no runtime dependencies.
composer require indianopinion/editor-ai-sidebar
The package is not on Packagist yet, so add a Composer vcs repository entry for https://github.com/IndianOpinion/editor-ai-sidebar first.
Or unpack the release zip into wp-content/plugins/editor-ai-sidebar/ and activate it.