File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,6 +65,25 @@ function datamachine_code_has_datamachine_integration(): bool {
6565 return class_exists ('DataMachine\Abilities\PermissionHelper ' );
6666}
6767
68+ /**
69+ * Register DMC-owned bundle artifact hooks.
70+ *
71+ * Bundle artifact type discovery can run before the rest of DMC's Data Machine
72+ * integrations are available. Keep these hooks registered independently so
73+ * imported agent bundles can materialize DMC-owned artifacts during install.
74+ */
75+ function datamachine_code_register_bundle_artifacts (): void {
76+ static $ registered = false ;
77+
78+ if ( $ registered ) {
79+ return ;
80+ }
81+
82+ $ registered = true ;
83+ ( new \DataMachineCode \Bundle \WorkspacePreloadArtifact () )->register ();
84+ }
85+ datamachine_code_register_bundle_artifacts ();
86+
6887/**
6988 * Register optional Data Machine integrations.
7089 */
@@ -77,10 +96,6 @@ function datamachine_code_register_datamachine_integrations(): void {
7796
7897 $ registered = true ;
7998
80- // Bundle artifact types are Data Machine-specific and are only registered
81- // when the bundle importer substrate is present.
82- ( new \DataMachineCode \Bundle \WorkspacePreloadArtifact () )->register ();
83-
8499 // Project active workspace identity into Data Machine's engine_data snapshot.
85100 \DataMachineCode \Runtime \ActiveWorkspaceProjector::register ();
86101
You can’t perform that action at this time.
0 commit comments