diff --git a/packages/wordpress-plugin/src/class-wp-codebox-agents-md-section.php b/packages/wordpress-plugin/src/class-wp-codebox-agents-md-section.php index ef1a00c2..a147b468 100644 --- a/packages/wordpress-plugin/src/class-wp-codebox-agents-md-section.php +++ b/packages/wordpress-plugin/src/class-wp-codebox-agents-md-section.php @@ -79,20 +79,15 @@ public static function render(): string { $lines = array( '## WP Codebox', '', - 'Disposable WordPress sandboxes for coding-agent tasks, runtime workloads, and fuzzing. They cannot touch the host; they return artifact bundles the host reviews and applies back. Abilities: `wp-codebox/*`. CLI mirrors the same service layer.', + 'Disposable, isolated WordPress sites backed by WordPress Playground. Blow them up freely: CLI workloads, tests, fuzz, and browser/headless Playground sessions run here so the host install stays intact. Results return as artifact bundles. Abilities: `wp-codebox/*`. CLI mirrors the same service layer.', '', '**Default routing**', - '- Agent task: `' . $wp . ' codebox run-agent-task --goal=\'...\' --format=json`', - '- Waves: `codebox run-agent-task-batch` / `codebox run-agent-task-fanout`', - '- Runtime / WordPress workload: `codebox run-runtime-task` / `codebox run-wordpress-workload`', + '- WordPress workload: `' . $wp . ' codebox run-wordpress-workload --input-file=`', + '- Runtime task: `codebox run-runtime-task`', + '- Fuzz suite: `codebox run-fuzz-suite`', + '- Browser Playground session: `codebox browser-session create`', '- Readiness: `codebox resolve-runtime-requirements`', - '- Artifacts: `codebox artifacts list` → `codebox artifacts inspect` → `codebox artifacts preflight-apply` → `stage-apply` → `codebox artifacts apply`', - '- Playground: `codebox browser-session create`', - '', - '**Safety**', - '- `artifacts apply` mutates the host. Always `preflight-apply` and inspect first; pass only `--approved-files`.', - '- Credentials via `secret_env` names. Never print secret values in prompts, payloads, logs, or artifacts.', - '- WP-CLI bypasses ability permission callbacks; shell access is the permission boundary.', + '- Evidence: `codebox artifacts list` → `codebox artifacts inspect`', '', '**Discovery**', '`' . $wp . ' codebox --help`. Live help is authoritative.', diff --git a/tests/php-agents-md-section.test.ts b/tests/php-agents-md-section.test.ts index f8da89cf..26719edf 100644 --- a/tests/php-agents-md-section.test.ts +++ b/tests/php-agents-md-section.test.ts @@ -77,18 +77,16 @@ assert.equal(result.freshness, "generated") const rendered: string = result.rendered assert.ok(rendered.startsWith("## WP Codebox\n"), "section starts with its heading") -for (const heading of ["**Default routing**", "**Safety**", "**Discovery**"]) { +for (const heading of ["**Default routing**", "**Discovery**"]) { assert.ok(rendered.includes(heading), `contains ${heading}`) } for (const verb of [ - "codebox run-agent-task", - "codebox run-agent-task-fanout", "codebox run-wordpress-workload", + "codebox run-runtime-task", + "codebox run-fuzz-suite", + "codebox browser-session create", "codebox resolve-runtime-requirements", "codebox artifacts inspect", - "codebox artifacts preflight-apply", - "codebox artifacts apply", - "codebox browser-session create", "codebox --help", ]) { assert.ok(rendered.includes(verb), `routes to ${verb}`) @@ -98,6 +96,8 @@ assert.ok( "uses the host-filtered WP-CLI prefix" ) assert.ok(!rendered.includes(result.default_cmd + " codebox"), "filtered prefix replaces the default") +assert.ok(!rendered.includes("run-agent-task"), "nested agent-task CLI stays outside this section") +assert.ok(!rendered.includes("preflight-apply"), "host apply-back stays outside this section") assert.ok(!/datamachine|DataMachine/.test(rendered), "no host composer names leak into generic guidance") console.log("php-agents-md-section: OK")