Extension Points
中文:扩展点
UModel is designed so contributors can add model packs, schema kinds, providers, clients, and query capabilities without breaking public contracts.
Model Packs
Model packs are the safest first contribution path. Each pack is a directory with UModel YAML definitions and optional runtime sample data.
Expected assets:
- EntitySet definitions.
- Dataset definitions.
- Link definitions.
- Storage definitions.
- Small sample
entities.jsonandrelations.jsonwhen possible. - A README with scenario, assets, and queries.
Reference: examples/quickstart-multidomain.
Schema Kinds
Schema source lives under schemas/.
When adding or changing a schema kind:
- Update the schema YAML.
- Register the model in
schemas/manifest.yamlwhen needed. - Regenerate generated assets with
make expand. - Regenerate schema docs with
make doc. - Update concept and reference docs.
- Run
make verify.
GraphStore Providers
GraphStore providers implement the storage contract used by UModel Service, EntityStore, and Query Service.
Provider changes should preserve:
- Workspace isolation.
- UModel element writes and reads.
- Entity and relation writes.
- Query semantics for
.umodel,.entity, and.topo. - Explain metadata exposing the active provider.
Reference: GraphStore Providers.
Query Capabilities
Query changes usually touch multiple surfaces:
- Grammar under
internal/query/grammar. - Parser, planner, executor, and explain output.
- Provider behavior when pushdown or graph operations change.
- CLI examples.
- Web UI query examples.
- AgentGateway query tools.
- Documentation under Query Service Guide.
Keep the boundary rule: domain reads go through Query Service.
Public API And SDKs
When REST contracts change:
- Update api/openapi/openapi.yaml.
- Update server routes and tests.
- Update SDK clients or generated SDK expectations.
- Update CLI and Web UI if they expose the behavior.
- Update docs and examples.
The minimal Go REST client lives under sdk/go/service.
Web UI
The Web UI should remain aligned with public REST APIs and must not depend on internal server packages or private frontend packages.
When adding UI features:
- Use OpenAPI-backed or existing REST endpoints.
- Keep read flows behind Query Service.
- Keep model writes, entity writes, and relation writes explicit.
- Update Web UI Architecture and Web UI API Map when navigation or API usage changes.
Contribution Checklist
- Public contract updated.
- Tests updated.
- Example data updated when behavior is user-visible.
- Docs updated in the same pull request.
make guardpasses.- Relevant service, SDK, or UI verification passes.