Skip to content

Commit f26762c

Browse files
committed
Merge main into contained site lifecycle branch
2 parents 0386578 + 3313a87 commit f26762c

41 files changed

Lines changed: 1262 additions & 166 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,204 @@
22

33
All notable changes to this project will be documented in this file. Entries are generated by homeboy from git commits.
44

5+
## [0.8.4] - 2026-06-19
6+
7+
### Changed
8+
- Add browser contained site open primitive
9+
- Add browser preview lifecycle contracts
10+
- Add RuntimeRunResult to run registry
11+
- Split neutral runtime contract shapes
12+
- Add browser contained site status primitives
13+
- Add browser recipe DTO
14+
- Support local browser runtime packages
15+
- Focus browser hydration fix
16+
- Add browser blueprint refs
17+
- Dedupe agent task extra plugins
18+
- Register provider runtime ability aliases
19+
- Defer extra plugin activation until after mount
20+
- Add Studio and Homeboy boundary contracts
21+
- Exit CLI after settled commands
22+
- Pass provider runtime contract to generic runs
23+
- Materialize workspace preload artifacts
24+
- Expose provider runtime invocation names
25+
- Enforce generic production boundary
26+
- Remove Data Machine runtime tool coupling
27+
- Propagate agent task extra plugins
28+
- Decouple WordPress browser diagnostics from generic probe
29+
- Normalize runtime failure envelopes
30+
- Expose generic ability runtime recipe preset
31+
- Add runtime preset registry
32+
- Add addressable run cancellation
33+
- Add generic ability runtime run primitive
34+
- Make agent normalizer compatibility explicit
35+
- Allow generic runtime episode payload fields
36+
- Add materialization result envelope
37+
- Allow advisory browser route drain
38+
- Resolve browser storage state refs from artifacts
39+
- Add browser storage state export command
40+
- Add runtime overlay descriptor discovery
41+
- Add source root preparation primitive
42+
- Extract structured artifact materializer
43+
- Add runtime run status transitions
44+
- Extract agent outcome classifier
45+
- Add command validation descriptors
46+
- Extract browser probe result builder
47+
- Extract browser ability descriptors
48+
- Extract recipe run result finalization
49+
- Extract agent runtime config resolver
50+
- Extract patch approval filter
51+
- Extract browser runner artifact templates
52+
- Extract host agent request preparation
53+
- Extract recipe site seed helpers
54+
- Extract agent sandbox runtime config helpers
55+
- Tighten primitive parity fixtures
56+
- Extract recipe run workflow evidence helpers
57+
- Add generic command agent runner
58+
- Add generic tool call artifact contract
59+
- Extract browser actions runner
60+
- Extract PHP agent run result builder
61+
- Deduplicate lifecycle PHP snippets
62+
- Extract recipe runtime setup helper
63+
- Extract recipe run artifact finalizers
64+
- Extract PHP agent process runner
65+
- Extract editor command runners
66+
- Extract browser probe runner
67+
- Consolidate utility primitives
68+
- Extract browser DOM snapshot primitive
69+
- Extract recipe benchmark artifact helpers
70+
- Remove duplicate parent-site seed export helpers
71+
- Expose reusable browser storage state
72+
- Extract recipe run phase executor
73+
- Expose browser waterfall artifacts
74+
- Split generic primitive contract tests
75+
- Extract browser visual compare runner
76+
- Adopt shared PHP path policy cleaners
77+
- Adopt run-plan helpers for PHP fanout
78+
- Document browser runtime primitive gap
79+
- Extract browser runner tool registration template
80+
- Adopt runtime dependency plan in materializers
81+
- Clean up brittle contract test helpers
82+
- Migrate remaining browser summaries to artifact sessions
83+
- Add generic runtime recipe resolver
84+
- Add generic browser task intent builder
85+
- Add signed browser callback contracts
86+
- Centralize prepared source package hydration
87+
- Migrate visual compare artifacts to sessions
88+
- Centralize runner runtime internals
89+
- Harden primitive contract parity guards
90+
- Extract generic run plan scheduler helpers
91+
- Extract browser runner metrics template helpers
92+
- Add generic browser provider connector bridge inheritance
93+
- Expand runtime dependency plan adoption
94+
- Refactor brittle tests around test kit helpers
95+
- Preserve runtime overlay schema library hints
96+
- Add browser materialization envelope primitive
97+
- Derive recipe policy command dependencies
98+
- Extract browser runner boot phase templates
99+
- Extract generic fanout run plan helpers
100+
- Add agent runtime invocation boundary
101+
- Migrate browser action artifacts to sessions
102+
- Align PHP tool policy descriptors
103+
- Introduce runtime dependency plan contract
104+
- Add generic recipe source package primitives
105+
- Add fixture import bootstrap primitives
106+
- Add generic runtime overlay bundle primitive
107+
- Add fixture auth storage state helper
108+
- Add generic host command runner evidence
109+
- Load tool policy normalizer in browser task test
110+
- Add generic evidence artifact envelope
111+
- Normalize sandbox tool policies from allowed tools
112+
- Add connector credential resolver registry
113+
- Add browser-local task defaults
114+
- Add executable browser DTO and persisted artifact bundle result
115+
- Centralize preview topology diagnostics
116+
- Share bench command step primitives
117+
- Trust component manifest entrypoints
118+
- Add runtime tool policy resolver
119+
- Add PHP JSON codec primitive
120+
- Add generic editor save action primitive
121+
- Add recipe run result envelope
122+
- Add MCP client config renderer
123+
- Bridge agent task status taxonomies
124+
- Add browser artifact session primitive
125+
- Add browser task builder primitive
126+
- Add browser artifact lifecycle refs
127+
- Add browser provider bridge policy primitive
128+
- Consolidate PHP host command callsites
129+
- Align PHP path policy with runtime core
130+
- Add shared redaction policy profiles
131+
- Add shared artifact and mount path primitives
132+
- Guard task input schema parity
133+
- Harden redacted artifact capture
134+
- Normalize agent task run results
135+
- Add managed host command wrapper
136+
- Extract host command executor into runtime core
137+
- Add core artifact capture policy
138+
- Clarify generic runtime contract authority
139+
- Use registry metadata for command dispatch
140+
- Clean up reviewer access auth planning
141+
- Add generic runtime primitive contracts
142+
- Add runtime backend provider recipe hooks
143+
- Tighten bootstrap component manifest boundary
144+
- Consolidate smoke test harness helpers
145+
- Extract recipe source boundary helpers
146+
- Make browser artifact persistence idempotent
147+
- Add shared runtime redaction primitive
148+
- Align browser probe command contract
149+
- Centralize artifact layout writer primitives
150+
- Share command arg parsing primitives
151+
- Centralize sandbox PHP template fragments
152+
- Add shared file tree policy helpers
153+
- Add backend package adapter registry
154+
- Add agent terminal result contract
155+
- Harden agent workload envelope boundary
156+
- Neutralize core fixture docs
157+
- Add command artifact schema contracts
158+
- Centralize artifact redaction writes
159+
- Centralize runtime env secret handling
160+
- Extract prepared source staging primitive
161+
- Add runtime overlay registry seam
162+
- Decouple agent sandbox stack flags
163+
- Add core command argument codecs
164+
- Add runtime command result envelopes
165+
- Add component plugin entrypoint contract
166+
- Add runtime backend registry
167+
- Make transfer proof private hosts configurable
168+
- Validate recipe schema during ingestion
169+
- Centralize generated PHP snippets
170+
- Add artifact bundle writer
171+
- Align task input agent bundle contract
172+
- Clean up host boundary leaks
173+
- List recipe commands from registry in help
174+
- Preserve caller cwd in source CLI entrypoint
175+
- Document the agent runtime contract
176+
- Add source checkout CLI entrypoint
177+
- Improve PHP execution failure diagnostics
178+
- Add typed recipe artifact materialization
179+
- Capture hidden Playground crash diagnostics
180+
- Improve runtime overlay validation diagnostics
181+
- Bridge runtime ability tools
182+
- Document Codex cookbook provider stack
183+
- Improve Playground crash diagnostics
184+
- Add agent runtime diagnostics summary
185+
- Add Playground bundle artifact to replay packages
186+
187+
### Fixed
188+
- Fix browser blueprint REST hydration
189+
- Fix check smoke blockers
190+
- Fix Agents API execution target registration
191+
- Fix evidence bundle identity and recipe artifacts
192+
- Fix browser runner template harness
193+
- Fix browser provider request permission
194+
- Fix safe VFS mount materialization
195+
- Fix backend registry schema validation
196+
- Fix artifact redaction for large inputs
197+
- Fix routed preview host handling
198+
- Fix artifact collection for cyclic browser errors
199+
- fix runtime ability lifecycle smoke
200+
- fix runtime component ability lifecycle replay
201+
- map package.json version targets to their artifact paths for deploy verification
202+
5203
## [0.8.3] - 2026-06-15
6204

7205
### Changed

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,23 +1015,21 @@ Boot a sandbox with caller-supplied runtime components mounted, then verify the
10151015

10161016
```bash
10171017
npm run wp-codebox -- agent-runtime-probe \
1018-
--component agents-api=../agents-api \
1019-
--component data-machine=../data-machine \
1020-
--component data-machine-code=../data-machine-code \
1018+
--component agent-runtime=../agent-runtime \
1019+
--component runtime-tools=../runtime-tools \
10211020
--json
10221021
```
10231022

1024-
Use `--component <slug>=<path>` for each runtime component your sandbox needs. The legacy `--agents-api`, `--data-machine`, and `--data-machine-code` flags remain accepted as compatibility aliases, but new automation should use `--component` so WP Codebox core stays portable across agent stacks.
1023+
Use `--component <slug>=<path>` for each runtime component your sandbox needs. This is the neutral replacement for component-specific aliases; new automation should use `--component` so WP Codebox core stays portable across agent stacks.
10251024

10261025
### `agent-sandbox-run`
10271026

10281027
Run one natural-language task through a sandboxed agent stack.
10291028

10301029
```bash
10311030
npm run wp-codebox -- agent-sandbox-run \
1032-
--component agents-api=../agents-api \
1033-
--component data-machine=../data-machine \
1034-
--component data-machine-code=../data-machine-code \
1031+
--component agent-runtime=../agent-runtime \
1032+
--component runtime-tools=../runtime-tools \
10351033
--agent sandbox-agent \
10361034
--task "Add a Dry Rub filter to the wing locations map" \
10371035
--provider example-ai \
@@ -1056,9 +1054,8 @@ Run several task descriptions, one isolated sandbox per task, with bounded concu
10561054

10571055
```bash
10581056
npm run wp-codebox -- agent-sandbox-batch \
1059-
--component agents-api=../agents-api \
1060-
--component data-machine=../data-machine \
1061-
--component data-machine-code=../data-machine-code \
1057+
--component agent-runtime=../agent-runtime \
1058+
--component runtime-tools=../runtime-tools \
10621059
--task "Fix issue A" \
10631060
--task "Investigate issue B" \
10641061
--concurrency 2 \

docs/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ unless this index says otherwise.
2929
- [Benchmark contract](./benchmark-contract.md) documents benchmark evidence
3030
shape without making benchmark scoring a core runtime concern.
3131

32+
## Example Consumer Integration Notes
33+
34+
- [Example consumer boundary contracts](./example-consumer-boundary-contracts.md)
35+
documents runtime profile, preview lease, and browser session handoff seams for
36+
host adapters. Named products in that note are examples only; the runtime
37+
contracts remain caller-neutral.
38+
3239
## Audits And Historical Plans
3340

3441
- [Browser runtime dependency audit](./browser-runtime-dependency-audit.md) is a
Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
# Studio/Homeboy Boundary Contracts
1+
# Example Consumer Boundary Contracts
22

3-
WP Codebox exposes small public seams for hosts that need to prepare browser-backed WordPress sandboxes without reading raw task payloads.
3+
WP Codebox exposes small public seams for hosts that need to prepare
4+
browser-backed WordPress sandboxes without reading raw task payloads. The seams
5+
are generic runtime contracts. Named products may appear in integration notes as
6+
example consumers, but they are not runtime concepts and must not define schema
7+
fields, package boundaries, or artifact semantics.
48

59
## Runtime Profile
610

7-
`runtime-core` exports `RUNTIME_PROFILE_SCHEMA`, `RuntimeProfile`, and `runtimeProfile()` from `@automattic/wp-codebox-core` and `wp-codebox-workspace/core/contracts`.
11+
`runtime-core` exports `RUNTIME_PROFILE_SCHEMA`, `RuntimeProfile`, and
12+
`runtimeProfile()` from `@automattic/wp-codebox-core` and
13+
`wp-codebox-workspace/core/contracts`.
814

915
Shape: `wp-codebox/runtime-profile/v1`.
1016

@@ -18,23 +24,37 @@ Shape: `wp-codebox/runtime-profile/v1`.
1824

1925
## Preview Lease
2026

21-
`runtime-core` exports `PREVIEW_LEASE_SCHEMA`, `PreviewLease`, and `previewLease()`.
27+
`runtime-core` exports `PREVIEW_LEASE_SCHEMA`, `PreviewLease`, and
28+
`previewLease()`.
2229

2330
Shape: `wp-codebox/preview-lease/v1`.
2431

2532
- `preview_public_url`: reviewer/public preview URL when leased by a host.
2633
- `site_url`: canonical WordPress site URL.
2734
- `local_url`: local browser/Playground URL.
2835
- `lease`: lease id, status, provider, owner, and timestamps.
29-
- `alignment`: evidence that preview, site, and local URLs point at the same runtime.
36+
- `alignment`: evidence that preview, site, and local URLs point at the same
37+
runtime.
3038

31-
## Browser Product DTOs
39+
## Browser Session DTOs
3240

33-
The WordPress plugin exposes these helpers for Studio Native and Homeboy integrations:
41+
The WordPress plugin exposes these helpers for host integrations that need a
42+
bounded browser session handoff:
3443

3544
- `WP_Codebox_Browser_Task_Builder::product_browser_session_dto( $session )`
3645
- `WP_Codebox_Browser_Task_Builder::browser_preview_boot_config( $session )`
3746
- `wp_codebox_browser_session_product_dto` filter
3847
- `wp_codebox_browser_preview_boot_config` filter
3948

40-
The DTOs include session identity, task label, target, preview boot config, preview lease/alignment data, artifact refs, and readiness signals. They intentionally omit raw `task_payload`, raw blueprint bodies, plugin package data, runtime source bundles, and secret-like fields.
49+
The DTOs include session identity, task label, target, preview boot config,
50+
preview lease/alignment data, artifact refs, and readiness signals. They
51+
intentionally omit raw `task_payload`, raw blueprint bodies, plugin package data,
52+
runtime source bundles, and secret-like fields.
53+
54+
## Example Consumers
55+
56+
Studio Web, Homeboy, Static Site Importer, hosted services, CI jobs, local tools,
57+
and other callers can consume these seams through their own adapters. Those
58+
adapters own product-specific defaults, queue state, deploy behavior, import
59+
semantics, and review UX. WP Codebox owns the generic runtime profile, preview
60+
lease, browser session DTO, and artifact boundaries.

examples/agent-runtime/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ Set local checkout paths, then run the preset:
66

77
```bash
88
AGENTS_API_PATH=/path/to/agents-api \
9-
DATA_MACHINE_PATH=/path/to/data-machine \
10-
DATA_MACHINE_CODE_PATH=/path/to/data-machine-code \
9+
RUNTIME_ENGINE_PATH=/path/to/runtime-engine \
10+
RUNTIME_TOOLS_PATH=/path/to/runtime-tools \
1111
PROVIDER_PLUGIN_PATH=/path/to/ai-provider-plugin \
1212
npm run wp-codebox -- agent-runtime-probe \
1313
--component agents-api="$AGENTS_API_PATH" \
14-
--component data-machine="$DATA_MACHINE_PATH" \
15-
--component data-machine-code="$DATA_MACHINE_CODE_PATH" \
14+
--component runtime-engine="$RUNTIME_ENGINE_PATH" \
15+
--component runtime-tools="$RUNTIME_TOOLS_PATH" \
1616
--provider-plugin "$PROVIDER_PLUGIN_PATH" \
1717
--artifacts ./artifacts \
1818
--json
1919
```
2020

21-
The preset mounts each `--component` at its declared slug, uses WordPress `7.0` by default, activates the plugins in dependency order, and returns a JSON readiness packet. It intentionally does not require provider credentials or model calls. Legacy stack-specific flags such as `--agents-api` still work as compatibility aliases; new examples should prefer generic `--component` entries.
21+
The preset mounts each `--component` at its declared slug, uses WordPress `7.0` by default, activates the plugins in dependency order, and returns a JSON readiness packet. It intentionally does not require provider credentials or model calls. Stack-specific shortcuts should be replaced with generic `--component` entries.

examples/agent-runtime/probe.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
$plugins = array(
66
'agents-api/agents-api.php',
7-
'data-machine/data-machine.php',
8-
'data-machine-code/data-machine-code.php',
7+
'runtime-engine/runtime-engine.php',
8+
'runtime-tools/runtime-tools.php',
99
);
1010

1111
$activation_results = array();
@@ -31,10 +31,8 @@
3131
'signals' => array(
3232
'agents_api_loaded' => defined('AGENTS_API_LOADED'),
3333
'agents_chat_ability_available' => (new WP_Codebox_Agent_Runtime_Invoker())->is_agents_api_ready(),
34-
'data_machine_version' => defined('DATAMACHINE_VERSION') ? DATAMACHINE_VERSION : null,
35-
'data_machine_permission_helper' => class_exists('DataMachine\\Abilities\\PermissionHelper'),
36-
'data_machine_code_version' => defined('DATAMACHINE_CODE_VERSION') ? DATAMACHINE_CODE_VERSION : null,
37-
'data_machine_code_workspace' => class_exists('DataMachineCode\\Workspace\\Workspace'),
34+
'runtime_engine_active' => is_plugin_active('runtime-engine/runtime-engine.php'),
35+
'runtime_tools_active' => is_plugin_active('runtime-tools/runtime-tools.php'),
3836
),
3937
),
4038
JSON_PRETTY_PRINT

examples/recipes/cookbook/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ files plus dry-run evidence limited to shareable metadata.
2525

2626
### `codex-agent-smoke.json`
2727

28-
Runs a headless Data Machine agent inside a disposable WordPress Playground
28+
Runs a headless agent runtime inside a disposable WordPress Playground
2929
sandbox using the Codex provider. This is the smallest end-to-end recipe for
3030
proving that WP Codebox can mount the agent runtime stack, overlay a
3131
`php-ai-client` branch with provider-supplied request auth, activate a Codex
@@ -36,8 +36,8 @@ uses explicit placeholder input paths so callers can see the full contract shape
3636
and replace each path with their prepared local checkout or artifact:
3737

3838
- `/sample/prepared-component-stack/agents-api`
39-
- `/sample/prepared-component-stack/data-machine`
40-
- `/sample/prepared-component-stack/data-machine-code`
39+
- `/sample/prepared-component-stack/runtime-engine`
40+
- `/sample/prepared-component-stack/runtime-tools`
4141
- `/sample/prepared-provider-stack/php-ai-client`
4242
- `/sample/prepared-provider-stack/ai-provider-for-openai`
4343

@@ -49,7 +49,7 @@ a dry-run plan with the sandbox backend, overlays, extra plugins, secret
4949
environment names, and resolved agent command arguments.
5050

5151
- The component stack provides the WordPress plugins needed by the sandbox agent
52-
runtime: `agents-api`, `data-machine`, and `data-machine-code`.
52+
runtime: `agents-api`, `runtime-engine`, and `runtime-tools`.
5353
- The provider stack provides the `php-ai-client` overlay and provider plugin
5454
selected by `provider=codex` and
5555
`provider-plugin-slugs=ai-provider-for-openai`.

0 commit comments

Comments
 (0)