diff --git a/docs/runtime-sessions.md b/docs/runtime-sessions.md index e4f13bcf..5c38393f 100644 --- a/docs/runtime-sessions.md +++ b/docs/runtime-sessions.md @@ -6,8 +6,13 @@ upgrade), the history goes with it. The `wp-coding-agents-runtime-sessions.php` mu-plugin keeps a copy on the site, in the Agents API conversation store, so the runtime can put it back. -Setup and upgrade install the mu-plugin on colocated sites. Hosts that install -mu-plugins themselves copy `templates/wp-coding-agents-runtime-sessions.php`. +Setup and upgrade install the mu-plugin on colocated sites. An +`--external-wordpress` setup with `--wordpress-mount ` copies it into +`/wp-content/mu-plugins`. The copy only happens when the file is missing +or different, and it leaves the mount's ownership and mode alone because the +remote host owns those files. Without a mount, setup skips the mu-plugin. Hosts +that install mu-plugins themselves copy +`templates/wp-coding-agents-runtime-sessions.php`. ## Commands @@ -76,3 +81,7 @@ trip with a Pi session fixture (`tests/fixtures/runtime-sessions/pi-session.json written by Pi's `SessionManager`). It downloads WP-CLI, Agents API and the SQLite integration unless `WP_CLI_PHAR`, `AGENTS_API_DIR` and `SQLITE_INTEGRATION_DIR` point at local copies. + +`tests/external-wordpress-runtime.sh` checks the external install. It covers a +first install into the mount, a repeat run that leaves the file untouched, and a +run without a mount that still succeeds. diff --git a/lib/common.sh b/lib/common.sh index 8d280f6a..b8578ce3 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -311,15 +311,17 @@ write_file() { fi } -# mu_plugin_template_sync