fix(02): revise plans based on checker feedback

- 02-01 Task 3: Add concrete REPL verification command for PluginManifest.parse
- 02-02 Task 1: Add FieldDef case class to placeholder types in PluginRegistration.scala
- 02-02 Task 1: Document PluginEnv as placeholder to be expanded in 02-03
- 02-03 Task 3: Remove duplicate Main.scala code, keep only corrected version
- 02-03: Add SummerPlugin.scala to files_modified for PluginEnv update
This commit is contained in:
Jakub Zych
2026-02-05 13:29:45 +01:00
parent 336acf5572
commit 5f2e7b87c9
3 changed files with 68 additions and 79 deletions

View File

@@ -136,7 +136,9 @@ case class PluginRegistration(
// Event subscriptions (Phase 2 extension API)
events: List[EventSubscription] = List.empty,
// Extensions to other plugins (Phase 2 extension API)
extensions: List[ExtensionDef] = List.empty
extensions: List[ExtensionDef] = List.empty,
// Form field definitions (for YAML-driven forms)
fields: List[FieldDef] = List.empty
)
object PluginRegistration:
@@ -149,6 +151,7 @@ case class NavigationDef(id: String, label: String, url: String, icon: String =
case class SettingDef(key: String, label: String, icon: String = "")
case class EventSubscription(eventType: String, handler: String)
case class ExtensionDef(target: String, extensionClass: String)
case class FieldDef(name: String, fieldType: String)
```
**SummerPlugin.scala:**
@@ -172,6 +175,9 @@ trait SummerPlugin:
* Async boot phase - can perform effects.
* Called after all dependencies have booted.
* Use for: database setup, event subscriptions, service initialization.
*
* PluginEnv is a placeholder that will be expanded in 02-03 to include
* EventService and ExtensionRegistry when the extension API is implemented.
*/
def boot: ZIO[PluginEnv, PluginError, Unit] = ZIO.unit
@@ -181,12 +187,15 @@ trait SummerPlugin:
*/
def shutdown: ZIO[Any, Nothing, Unit] = ZIO.unit
/** Environment available to plugins during boot */
/**
* Environment available to plugins during boot.
* Initially just PluginContext; extended in 02-03 to include EventService & ExtensionRegistry.
*/
type PluginEnv = PluginContext
```
</action>
<verify>Run `./mill summercms.compile` - all types compile without errors</verify>
<done>PluginState enum with all lifecycle states, PluginContext, PluginRegistration with placeholder defs, SummerPlugin trait</done>
<done>PluginState enum with all lifecycle states, PluginContext, PluginRegistration with placeholder defs including FieldDef, SummerPlugin trait</done>
</task>
<task type="auto">