Skip to content

Commit bd1d45f

Browse files
committed
docs(libmodule): finalize module ownership smoke
1 parent 5dcdf94 commit bd1d45f

10 files changed

Lines changed: 91 additions & 103 deletions

File tree

CHANGELOG.md

Lines changed: 35 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@
9898
commands extend `BaseModuleCommand`, services/capabilities are provided
9999
through `ModuleRuntime`, and EasyLibrary's legacy `ModuleManager` is no
100100
longer imported by the examples.
101+
- Added OP-68J smoke evidence for the final EasyLibrary module-core removal:
102+
EasyLibrary without `LibModule` reports `provider=disabled`, package-backed
103+
LibModule loads real fixtures with services/capabilities/reload/disable/enable
104+
and standalone LibModule reports `Module provider switch: auto -> standalone`.
101105
- Validated OP-60 live loading against the local PMMP smoke server. LibModule
102106
loaded as `source=package-backed-virtual` from
103107
`plugin_data/EasyLibrary/packages/libmodule/1.0.0-dev` and as
@@ -106,7 +110,10 @@
106110
- Confirmed the portable runtime provider smoke with a real module fixture.
107111
`EasyModuleBasicExample` exercised `examples:hello` service/capability
108112
registration, resources, reload, disable-runtime, enable and refresh while
109-
EasyLibrary kept the active PMMP host provider as `core`.
113+
EasyLibrary still used the transitional host provider.
114+
- Confirmed the OP-68J fixture matrix with four example plugins:
115+
`EasyModuleBasicExample`, `EasyModuleEconomyProviderExample`,
116+
`EasyModuleFarmConsumerExample` and `EasyModuleDiagnosticsExample`.
110117
- Added focused tests for the copied status constants, health report statuses,
111118
summary schema, summary entry shape and doctor-compatible read model output.
112119
- Added focused tests proving the provider contract exposes metadata, summary
@@ -161,8 +168,13 @@
161168
repository pattern instead of leaving the remote metadata blank.
162169
- Reworked the example plugin docs as `LibModule` authoring references instead
163170
of EasyLibrary-backed module examples. The docs now explain that PMMP
164-
discovery/resource registration remains a host-adapter responsibility until
165-
OP-68I/OP-68J finish the migration.
171+
discovery/resource registration remains a host-adapter responsibility while
172+
`LibModule` owns module authoring and runtime behavior.
173+
- Fixed the example plugin source layout for PMMP's `src-namespace-prefix`
174+
loader. Each example plugin main class now lives directly under
175+
`examples/*/src/`, matching its configured namespace prefix.
176+
- Updated `ModuleRuntimeViewProvider` provider kinds to the current
177+
`disabled`, `package-backed` and `standalone` vocabulary.
166178
- Updated `LibModuleInfo` and `package.yml` metadata to report
167179
contracts/read-model/provider-contract/provider-probe/dependency-resolver
168180
manifest/source, loader-boundary and registry/service readiness while still
@@ -189,64 +201,29 @@
189201
PHAR entries, package ZIP entries, checksums, EasyLibrary package contract and
190202
local Package Safety Gate install layout.
191203

192-
### Not Yet Included
204+
### Still Not A Stable Promise
193205

194-
- The production `imperazim\module` runtime is not extracted in this slice.
195-
- `ModuleManager`, lifecycle, commands, events and service registry are not
196-
moved yet.
197-
- `ModuleRuntimeViewProvider` is read-only; it does not expose enable, disable,
198-
reload, refresh or manager access.
199-
- `LibModuleRuntimeProvider` is a runtime wrapper only. It can expose a wrapped
200-
`ModuleRuntime` read model, but it does not yet scan module folders, load PHP
201-
files through PMMP plugin ownership or register PMMP commands/listeners/tasks
202-
by itself. Pure PHP scanner/file-loader helpers exist, but host registration
203-
remains an EasyLibrary adapter responsibility during OP-68.
204-
- `DependencyResolver` uses `ModuleDependencyNode`, not the full EasyLibrary
205-
runtime `ModuleInterface`.
206-
- `ModuleManifest` models and validates arrays only. YAML/PMMP `Config` reading
207-
and lifecycle ownership remain host-owned.
208-
- `ModuleManifestReader` is still a contract only. A concrete recursive
209-
manifest path scanner exists, but the concrete YAML reader remains
210-
host-owned.
211-
- `ModuleClassNameResolver` only calculates the expected class name. Fallback
212-
PHP file loading and `ModuleInterface` validation now exist as separate
213-
concrete helpers so hosts can choose when to load code.
214-
- `ModuleRegistry` stores portable dependency nodes, not live module instances
215-
with PocketMine plugin owners.
216-
- `ModuleServiceRegistry` stores metadata descriptors, not live service
217-
objects, and does not dispatch service events.
218-
- `ModuleCapabilityMap` models provider/preference decisions only; persistence
219-
remains host-owned.
220-
- `ModuleLifecycleInventory` models resource ownership and cleanup order only.
221-
It does not execute cleanup and does not store live PMMP objects, closures,
222-
component handles or service objects.
223-
- `ModuleInterface` is a future host-neutral contract. EasyLibrary's current
224-
production runtime still uses its core `ModuleManager`-centric contract until
225-
the later runtime migration OPs are implemented.
226-
- The new `BaseModule` authoring core is host-neutral and the PMMP-facing
227-
authoring helper classes exist in `LibModule`. Filesystem discovery, concrete
228-
host registration and example migration are still pending before EasyLibrary
229-
can delete its remaining module core.
230-
- Module commands are owned by `LibModule`, but command registration in a live
231-
server is still host-owned. EasyLibrary uses a temporary adapter during
232-
OP-68 while the old core runtime is removed.
233-
- `ModuleSettings` is a model only. Reading/writing YAML, migrating existing
234-
EasyLibrary `modules.yml` and binding to PMMP data folders remain host adapter
235-
responsibilities.
236-
- `ModuleRuntime` is portable only. It does not scan folders, read YAML, load
237-
PHP files, validate `BaseModule` or register PMMP commands/listeners/tasks
206+
- No stable tag or stable release should be published from this dev baseline
207+
alone.
208+
- PMMP-specific host policy remains explicit host integration work. LibModule
209+
owns module API/runtime/commands/examples, while EasyLibrary currently owns
210+
the official package-backed/standalone bridge that discovers plugin metadata,
211+
reads host files and exposes diagnostics.
212+
- Copy-into-server examples are smoke-tested through EasyLibrary's bridge, but
213+
final stable authoring docs still need the release-candidate pass.
214+
- Persistence of `ModuleSettings` remains host-owned: LibModule provides the
215+
portable model, while EasyLibrary writes its current `modules.yml`.
216+
- `ModuleRuntime` remains intentionally portable. It can run modules and own
217+
services/capabilities, but it does not pretend to replace PMMP plugin loading
238218
without a host adapter.
239-
- No stable tag or stable release should be published from this baseline alone.
240219

241220
### Why
242221

243-
The repository needed the same foundation as the other official libs before the
244-
runtime can be moved safely. Splitting repository setup from runtime extraction
245-
keeps the next changes smaller, makes CI/release behavior visible early and
246-
avoids a half-migrated package that looks installable but cannot yet replace
247-
EasyLibrary's module core.
222+
The repository needed the same foundation as the other official libs before it
223+
could become the real module home. Splitting repository setup, release assets,
224+
API movement, command ownership, examples and smoke validation kept the
225+
migration inspectable instead of turning it into one huge opaque rewrite.
248226

249-
OP-68F completes the public repository baseline before OP-68G starts publishing
250-
real dev release assets. That order keeps documentation, issue routing,
251-
security policy, quality checks and Discord notifications ready before the
252-
package manager is asked to download `LibModule` artifacts.
227+
OP-68F completed the public repository baseline before OP-68G published real
228+
dev release assets. OP-68H moved examples/docs here, and OP-68J proved the
229+
package-backed, standalone and no-LibModule runtime shapes in PMMP.

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ LibModule is the standalone home for the EasyLibrary module system.
1212
This repository is currently a **3.0-dev runtime extraction**: it provides the
1313
official standalone/package project shape, release automation, examples,
1414
documentation, portable read models, host-neutral runtime contracts, a portable
15-
runtime and package catalog metadata validated by the OP-60 smoke matrix.
15+
runtime, module commands, authoring examples and package catalog metadata
16+
validated by the OP-68J smoke matrix.
1617

1718
## Current Status
1819

@@ -39,14 +40,15 @@ runtime and package catalog metadata validated by the OP-60 smoke matrix.
3940
| PMMP authoring helpers | Ready |
4041
| Module commands | Ready |
4142
| EasyLibrary runtime adapter | Smoke passed |
43+
| OP-68J package-backed/standalone/no-LibModule matrix | Smoke passed |
4244
| EasyLibrary package catalog entry | Smoke passed |
4345
| Stable release | Not published yet |
4446

45-
The OP-60 smoke matrix passed for package-backed virtual loading, standalone
46-
loading and a real EasyLibrary module fixture. `LibModule` exposes the portable
47-
runtime, provider wrapper and catalog metadata that EasyLibrary needs to load it
48-
as a package-backed or standalone plugin while EasyLibrary keeps PMMP-specific
49-
host adapters in the core.
47+
The OP-68J smoke matrix passed for package-backed virtual loading, standalone
48+
loading, no-LibModule fallback and real module fixtures. `LibModule` now owns
49+
the public module API, portable runtime, provider wrapper, commands and
50+
examples; EasyLibrary keeps only the host bridge that discovers LibModule and
51+
reports the active provider.
5052

5153
## What This Library Will Own
5254

@@ -116,17 +118,21 @@ The following pieces are already present:
116118
`ModuleRuntimeCommandAdapter`, `StructuralModuleCommandRuntimeProvider`,
117119
`ModuleCommandRunner`, `ModulesCommand` and `NativeModulesCommand`.
118120
`/easymodule`, `/emodule` and `/modules` are now command surfaces owned by
119-
`LibModule`; EasyLibrary can temporarily adapt its legacy provider while
120-
OP-68 finishes removing the old core runtime;
121+
`LibModule`; EasyLibrary adapts the active LibModule provider through its
122+
host bridge;
121123
- OP-60 live smoke evidence: `elprobe run libmodule` reports
122124
`functional=yes` for both package-backed virtual and standalone loading;
125+
- OP-68J live smoke evidence: EasyLibrary without LibModule reports
126+
`provider=disabled`; package-backed LibModule loads real fixtures with
127+
services/capabilities/reload/disable/enable; standalone LibModule reports
128+
`Module provider switch: auto -> standalone`;
123129
- examples showing the `LibModule` authoring API with `BaseModule`,
124130
`ModuleContext`, `BaseModuleCommand`, services, capabilities and diagnostics;
125131
- docs describing the extraction boundary and current scaffold status.
126132

127-
PMMP host adapters such as YAML reading through `pocketmine\utils\Config`,
128-
listener/task registration and copy-into-server example smoke are still being
129-
extracted from EasyLibrary 3.0-dev after OP-68H.
133+
PMMP host integration is intentionally split: LibModule owns the module API and
134+
runtime, while EasyLibrary owns the package/plugin bridge that discovers loaded
135+
plugins, reads host metadata and exposes diagnostics.
130136

131137
## Installation
132138

@@ -149,10 +155,10 @@ use imperazim\module\BaseModule;
149155
use imperazim\module\ModuleContext;
150156
```
151157

152-
Do not publish a stable copy-into-server module authoring promise from this dev
153-
baseline alone. The portable `LibModule` runtime is active/catalog-ready and
154-
the public authoring classes/examples exist here, but EasyLibrary still owns
155-
part of the PMMP host adapter until the rest of OP-68 is complete.
158+
Do not treat this dev baseline as a stable 1.0 release yet. The portable
159+
`LibModule` runtime is active/catalog-ready and the public authoring
160+
classes/examples exist here, but the 3.0-dev line still needs the final release
161+
candidate pass before stable publication.
156162

157163
## Examples
158164

@@ -255,6 +261,9 @@ notification workflow documentation and remote About/topics metadata.
255261
OP-68H moved the authoring examples and usage docs out of EasyLibrary's legacy
256262
core tree and into this repository. The examples now use `ModuleContext` and
257263
the `LibModule` public helpers instead of EasyLibrary's legacy `ModuleManager`.
264+
OP-68J validated those examples in PMMP through EasyLibrary's LibModule bridge:
265+
package-backed fixtures discovered modules, services, capabilities, resources,
266+
doctor/failure output, reload, disable and enable successfully.
258267

259268
## License
260269

docs/examples.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,22 @@ These examples are intentionally no longer written against EasyLibrary's legacy
1515

1616
## Current Host Status
1717

18-
OP-68H moves the authoring examples and docs into `LibModule`. The examples are
19-
authoring references for the new API, not a stable copy-into-server promise yet.
18+
OP-68H moved the authoring examples and docs into `LibModule`. OP-68J then
19+
loaded these examples in a real PMMP package-backed smoke through EasyLibrary's
20+
LibModule bridge.
2021

21-
During the rest of OP-68, EasyLibrary still owns part of the PMMP host adapter:
22+
EasyLibrary still owns the host bridge that discovers plugin metadata and
23+
connects loaded plugins to the active LibModule runtime:
2224

2325
- plugin/module source discovery;
2426
- YAML reading through the PocketMine environment;
25-
- PMMP command, listener and task registration;
26-
- compatibility with old `ModuleManager`-centric modules.
27+
- PMMP command, listener and task registration policy;
28+
- package-backed or standalone provider selection.
2729

2830
That means a host must explicitly wire these examples into a `ModuleRuntime`
2931
session and register any PMMP resources it wants to expose. The files under
30-
`examples/` show the module shape and the runtime contracts that the host will
31-
load once OP-68I removes the remaining EasyLibrary legacy runtime.
32+
`examples/` show the module shape and the runtime contracts that EasyLibrary's
33+
bridge can now load from package-backed LibModule.
3234

3335
## Included Examples
3436

docs/provider-contract-slice.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ of EasyLibrary.
1616

1717
- provider id;
1818
- provider name;
19-
- provider kind: `core`, `package-backed` or `standalone`;
19+
- provider kind: `disabled`, `package-backed` or `standalone`;
2020
- provider plugin name and version;
2121
- whether the provider is external to the host core;
2222
- `summary(): ModuleRuntimeSummary`;
@@ -33,8 +33,9 @@ of EasyLibrary.
3333
- PMMP command registration;
3434
- PMMP plugin ownership rules.
3535

36-
Those operations still belong to EasyLibrary's current core provider until a
37-
later runtime extraction step proves the host adapter.
36+
Those operations are intentionally outside the read-only view. In the current
37+
3.0-dev line, LibModule owns the runtime implementation and EasyLibrary calls
38+
the richer host-facing adapter when command/lifecycle mutation is required.
3839

3940
## Why This Exists
4041

@@ -45,16 +46,16 @@ is trusted to own command/lifecycle mutation.
4546

4647
## Current Status
4748

48-
`LibModule` can define and test a read-only provider contract.
49-
50-
EasyLibrary still owns the active provider implementation:
49+
`LibModule` defines and tests a read-only provider contract, and the later
50+
OP-68J smoke matrix validated it in all active provider modes:
5151

5252
```text
53-
CoreModuleRuntimeProvider -> ModuleRuntimeProvider -> ModuleRuntimeViewProvider
53+
disabled
54+
package-backed
55+
standalone
5456
```
5557

56-
`LibModule` is still not an official package catalog runtime.
57-
58-
OP-44 builds on this contract with
59-
[`provider-probe-slice.md`](provider-probe-slice.md), adding a concrete
60-
`LibModuleRuntimeProvider` probe while keeping `runtime-ready=false`.
58+
OP-44 built on this contract with
59+
[`provider-probe-slice.md`](provider-probe-slice.md). OP-55/OP-58 then attached
60+
the portable runtime to `LibModuleRuntimeProvider`, and OP-68J validated
61+
package-backed and standalone ownership in PMMP.

docs/scaffold-status.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
`LibModule` is intentionally in 3.0-dev extraction mode.
44

5-
The repository can now be validated, built and released as a dev artifact, but
6-
the PMMP host adapter is still being completed. The portable runtime, command
7-
surface, authoring API and examples now live here; EasyLibrary still owns the
8-
transitional host bridge until OP-68I/OP-68J prove parity.
5+
The repository can now be validated, built and released as a dev artifact. The
6+
portable runtime, command surface, authoring API and examples now live here;
7+
OP-68J proved parity through EasyLibrary's package-backed, standalone and
8+
no-LibModule smoke matrix.
99

1010
## Ready
1111

@@ -18,19 +18,18 @@ transitional host bridge until OP-68I/OP-68J prove parity.
1818
- Portable module constants and read models.
1919
- Read-only module provider contract.
2020
- Authoring examples updated for the `LibModule` public API.
21+
- Package-backed and standalone PMMP smoke through EasyLibrary.
22+
- Disabled-provider fallback when LibModule is not installed.
2123

2224
## Not Ready
2325

24-
- Full PMMP host adapter ownership.
2526
- Copy-into-server example smoke as the only supported module workflow.
26-
- Official EasyLibrary package catalog entry.
2727
- Stable release.
28-
- Standalone production usage without EasyLibrary host integration.
28+
- Standalone production guidance outside EasyLibrary host integration.
2929

3030
## Guardrails
3131

3232
- Keep `imperazim\module` owned by `LibModule`; EasyLibrary transitional code
33-
must stay under `imperazim\library\module`.
34-
- Do not remove the remaining EasyLibrary host bridge until external provider
35-
tests prove parity.
33+
must stay outside that namespace.
34+
- Keep EasyLibrary host bridge code under `imperazim\library\libmodule`.
3635
- Do not publish a stable release from scaffold-only code.

examples/01-basic-plugin/src/easylibraryexamples/basic/BasicExamplePlugin.php renamed to examples/01-basic-plugin/src/BasicExamplePlugin.php

File renamed without changes.

examples/02-economy-provider-plugin/src/easylibraryexamples/economy/EconomyProviderExamplePlugin.php renamed to examples/02-economy-provider-plugin/src/EconomyProviderExamplePlugin.php

File renamed without changes.

examples/03-farm-consumer-plugin/src/easylibraryexamples/farm/FarmConsumerExamplePlugin.php renamed to examples/03-farm-consumer-plugin/src/FarmConsumerExamplePlugin.php

File renamed without changes.

examples/04-diagnostics-plugin/src/easylibraryexamples/diagnostics/DiagnosticsExamplePlugin.php renamed to examples/04-diagnostics-plugin/src/DiagnosticsExamplePlugin.php

File renamed without changes.

src/imperazim/module/runtime/ModuleRuntimeViewProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @experimental 3.0-dev provider contract for the future LibModule split.
1717
*/
1818
interface ModuleRuntimeViewProvider {
19-
public const KIND_CORE = 'core';
19+
public const KIND_DISABLED = 'disabled';
2020
public const KIND_PACKAGE_BACKED = 'package-backed';
2121
public const KIND_STANDALONE = 'standalone';
2222

0 commit comments

Comments
 (0)