@@ -124,17 +124,15 @@ async function createProjectStack() {
124124 baseUrl,
125125 controlDriverUrl : controlDbUrl ,
126126 appBundles : createFsAppBundleResolver ( ) ,
127- // Project-mode per-project plugins. Identical to the cloud default
128- // except for the AppPlugin tail — we eagerly load the local
129- // artifact bundle (if present) so the single project picks up
130- // schema definitions without needing a control-plane app row.
127+ // Project-mode per-project plugins. The control plane (created by
128+ // `createCloudStack`'s preset) is the sole owner of identity,
129+ // authentication, security, audit, tenant catalogs, and packages —
130+ // their tables live in `control.db`. Each per-project kernel only
131+ // registers the engines needed to materialize that project's
132+ // **business data** schemas + records.
131133 basePlugins : async ( { projectId } : { projectId : string } ) => {
132134 const { ObjectQLPlugin } = await import ( '@objectstack/objectql' ) ;
133135 const { MetadataPlugin } = await import ( '@objectstack/metadata' ) ;
134- const { createTenantPlugin } = await import ( '@objectstack/service-tenant' ) ;
135- const { AuthPlugin } = await import ( '@objectstack/plugin-auth' ) ;
136- const { SecurityPlugin } = await import ( '@objectstack/plugin-security' ) ;
137- const { AuditPlugin } = await import ( '@objectstack/plugin-audit' ) ;
138136 const { AppPlugin } = await import ( '@objectstack/runtime' ) ;
139137
140138 let artifactBundle : any = null ;
@@ -155,10 +153,6 @@ async function createProjectStack() {
155153 environmentId : projectId ,
156154 artifactSource : { mode : 'local-file' , path : localArtifactPath } ,
157155 } ) ,
158- createTenantPlugin ( { registerSystemObjects : true } ) ,
159- new AuthPlugin ( { secret : authSecret , baseUrl } ) ,
160- new SecurityPlugin ( ) ,
161- new AuditPlugin ( ) ,
162156 ] ;
163157 if ( artifactBundle ) plugins . push ( new AppPlugin ( artifactBundle ) ) ;
164158 return plugins ;
0 commit comments