Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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=<workload.json>`',
'- 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.',
Expand Down
12 changes: 6 additions & 6 deletions tests/php-agents-md-section.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand All @@ -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")
Loading