From 43e7fbf0a2c74ddad6a42c34bf729b58c48297bc Mon Sep 17 00:00:00 2001 From: Chris Huber Date: Thu, 18 Jun 2026 11:53:37 -0400 Subject: [PATCH] Remove product-specific runtime bundle metadata --- src/Registry/register-agent-runtime-bundle-importer.php | 8 +++++--- tests/runtime-agent-bundle-importer-smoke.php | 6 +----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Registry/register-agent-runtime-bundle-importer.php b/src/Registry/register-agent-runtime-bundle-importer.php index 9e470d2..ed29608 100644 --- a/src/Registry/register-agent-runtime-bundle-importer.php +++ b/src/Registry/register-agent-runtime-bundle-importer.php @@ -228,12 +228,14 @@ static function ( $result, array $spec, array $input = array(), int $index = 0 ) $config = is_array( $agent['agent_config'] ?? null ) ? $agent['agent_config'] : array(); $meta = is_array( $agent['meta'] ?? null ) ? $agent['meta'] : array(); - if ( is_array( $config['datamachine_bundle'] ?? null ) ) { + $bundle_slug = $string_value( $bundle['bundle_slug'] ?? null ); + $bundle_version = $string_value( $bundle['bundle_version'] ?? null ); + if ( '' !== $bundle_slug || '' !== $bundle_version ) { $meta = array_merge( array( 'source_type' => 'runtime-agent-bundle', - 'source_package' => $string_value( $config['datamachine_bundle']['bundle_slug'] ?? null, $bundle['bundle_slug'] ?? null ), - 'source_version' => $string_value( $config['datamachine_bundle']['bundle_version'] ?? null, $bundle['bundle_version'] ?? null ), + 'source_package' => $bundle_slug, + 'source_version' => $bundle_version, ), $meta ); diff --git a/tests/runtime-agent-bundle-importer-smoke.php b/tests/runtime-agent-bundle-importer-smoke.php index cc145d3..b8ac582 100644 --- a/tests/runtime-agent-bundle-importer-smoke.php +++ b/tests/runtime-agent-bundle-importer-smoke.php @@ -54,11 +54,7 @@ public function get_error_data(): mixed { 'agent_slug' => 'studio-web-static-site-generator', 'agent_name' => 'Static Site Generator', 'agent_config' => array( - 'studio_web' => array( 'prompt' => 'Cook a site.' ), - 'datamachine_bundle' => array( - 'bundle_slug' => 'studio-web-static-site-generator', - 'bundle_version' => '1.2.3', - ), + 'studio_web' => array( 'prompt' => 'Cook a site.' ), ), ), );