11import { ObjectKernel , Plugin , IHttpServer , ObjectKernelConfig } from '@objectstack/core' ;
2- import { createRestApiPlugin , RestApiPluginConfig } from '@objectstack/rest' ;
32
43export interface RuntimeConfig {
54 /**
@@ -8,11 +7,6 @@ export interface RuntimeConfig {
87 * If not provided, Runtime expects a server plugin (like HonoServerPlugin) to be registered manually.
98 */
109 server ?: IHttpServer ;
11-
12- /**
13- * API Registry Configuration
14- */
15- api ?: RestApiPluginConfig ;
1610
1711 /**
1812 * Kernel Configuration
@@ -26,8 +20,13 @@ export interface RuntimeConfig {
2620 * High-level entry point for bootstrapping an ObjectStack application.
2721 * Wraps ObjectKernel and provides standard orchestration for:
2822 * - HTTP Server binding
29- * - API Registry (REST Routes)
3023 * - Plugin Management
24+ *
25+ * REST API is opt-in — register it explicitly:
26+ * ```ts
27+ * import { createRestApiPlugin } from '@objectstack/rest';
28+ * runtime.use(createRestApiPlugin());
29+ * ```
3130 */
3231export class Runtime {
3332 readonly kernel : ObjectKernel ;
@@ -37,17 +36,8 @@ export class Runtime {
3736
3837 // If external server provided, register it immediately
3938 if ( config . server ) {
40- // If the provided server is not already an HttpServer wrapper, wrap it?
41- // Since IHttpServer is the interface, we assume it complies.
42- // But HttpServer class in runtime is an adapter.
43- // If user passes raw Hono, it won't work unless they wrapped it.
44- // We'll assume they pass a compliant IHttpServer.
4539 this . kernel . registerService ( 'http.server' , config . server ) ;
4640 }
47-
48- // Register API Registry by default
49- // This plugin is passive (wait for services) so it's safe to add early.
50- this . kernel . use ( createRestApiPlugin ( config . api ) ) ;
5141 }
5242
5343 /**
0 commit comments