Core
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
The core layer is what every Cephalon app pulls in. It is the smallest, most stable surface — pure contracts and the composition engine.
Packages
Section titled “Packages”| Package | Maturity | What it ships |
|---|---|---|
Cephalon.Abstractions | M4 | Pure interfaces and types modules build against — IModule, ModuleDescriptor, Capability, ICapabilityRegistry, app-model types, transport types, technology contributor contracts. |
Cephalon.Engine | M3 | The composition engine — module discovery, dependency ordering, manifest v2, capability registry, lifecycle execution, integrity verification, cell boundary & CDC capture catalogs. |
Cephalon.Scaffolding | M3 | Project / folder / package scaffolding that powers cephalon new. Apps consume this only at scaffold time. |
Cephalon.ReferenceDocs | M2 | Optional reference-doc tooling that turns XML comments into Markdown for the docs site. Build-time only. |
Engine contract at a glance
Section titled “Engine contract at a glance”The engine guarantees, in order:
- Validate the module set (no duplicate descriptors, no conflicting capability providers).
- Order modules deterministically based on
DependsOn. - Register module services into the DI container.
- Compose capabilities and language packs from base + project + package contributions.
- Execute lifecycle hooks (
OnRegister→OnStart;OnStopruns in reverse order). - Expose the runtime manifest, runtime catalogs, and health aggregation.
The full ordered contract lives in Reference → Architecture → Runtime contracts.
What AddCephalonAspNetCore() does
Section titled “What AddCephalonAspNetCore() does”The AspNetCore host adapter wires the engine into ASP.NET Core’s WebApplicationBuilder. It:
- registers the engine builder as a singleton.
- registers
IRuntimeManifestfor DI consumers. - maps
/engine/manifest,/engine/runtime,/engine/snapshotHTTP routes. - maps the REST behavior pipeline.
- wires OpenAPI + Scalar for documenting the behaviors.
- exposes
app.MapCephalon()which finalises the route registrations.
See Hosts for the equivalent on Cephalon.Worker and other adapters.
Source-doc snapshots
Section titled “Source-doc snapshots”Cross-references
Section titled “Cross-references”- Concepts — the smallest mental model.
- Architecture — the layered view.
- Module authoring — how to build on top.
- Reference → API — the generated API reference for the current version.