72 lines
2.5 KiB
Markdown
72 lines
2.5 KiB
Markdown
# PR-01 - StudioEventBus Foundation
|
|
|
|
## Briefing
|
|
|
|
The Studio now has a normative event model in spec, but `prometeu-studio` still relies on direct UI wiring.
|
|
|
|
This PR introduces the generic `StudioEventBus` foundation that later Studio code will use for:
|
|
|
|
- shell-level observation,
|
|
- workspace-local activity,
|
|
- workspace-to-global propagation,
|
|
- project launcher and shell interactions.
|
|
|
|
## Objective
|
|
|
|
Implement the typed Studio event infrastructure in application code so future Studio work can publish and observe events without string routing or ad hoc direct coupling.
|
|
|
|
## Dependencies
|
|
|
|
- [`../specs/2. Studio UI Foundations Specification.md`](../specs/2.%20Studio%20UI%20Foundations%20Specification.md)
|
|
- [`../specs/3. Studio Components Module Specification.md`](../specs/3.%20Studio%20Components%20Module%20Specification.md) for downstream UI implications
|
|
|
|
## Scope
|
|
|
|
- introduce a generic typed `StudioEventBus`
|
|
- introduce a workspace-local bus model
|
|
- support automatic workspace-to-global propagation
|
|
- introduce DTO-style event payload contracts
|
|
- add the minimum initial event set needed by the shell wave
|
|
- add tests for propagation and subscription behavior
|
|
|
|
## Non-Goals
|
|
|
|
- implementing every future Studio event now
|
|
- integrating the full packer event lane now
|
|
- redesigning the whole shell in this PR
|
|
- moving visual controls into `prometeu-studio-components`
|
|
|
|
## Execution Method
|
|
|
|
1. Introduce a small event contract in `prometeu-studio`.
|
|
2. Use typed DTO events, preferably immutable.
|
|
3. Make subscription and unsubscription explicit and safe.
|
|
4. Implement one global bus and one workspace bus type.
|
|
5. Ensure every workspace event is automatically republished to the global bus.
|
|
6. Keep propagation one-way: workspace to global.
|
|
7. Add tests for:
|
|
- typed subscription
|
|
- unsubscription
|
|
- workspace-to-global propagation
|
|
- no accidental global-to-workspace rebroadcast
|
|
|
|
## Acceptance Criteria
|
|
|
|
- `prometeu-studio` has a generic typed `StudioEventBus`
|
|
- workspace buses exist and can be attached to the global bus
|
|
- every workspace-published event is observable on the global bus
|
|
- callers do not need to publish the same event twice manually
|
|
- event payloads are DTO-style and not string-based
|
|
- automated tests cover the propagation baseline
|
|
|
|
## Validation
|
|
|
|
- unit tests for bus behavior
|
|
- basic smoke coverage for publish/subscribe and nested propagation
|
|
|
|
## Affected Artifacts
|
|
|
|
- `prometeu-studio` application infrastructure
|
|
- future shell integration points
|
|
- tests for Studio UI foundation code
|