Layers
graph TD
R[WorkManager runtime] --> H[Virtufin.Worker.Host]
W[Worker package] --> K[Virtufin.Worker.DevKit]
W --> D[Domain devkit]
K --> H
D --> K
D --> H
R -.loads.-> W
Rules
- Host → nothing. The runtime ships the host contract; it must not know a worker toolkit exists.
- Toolkit → host only. The toolkit may derive from
WorkerBase<,>and useICloudEventCodec<,>; it must not reference a domain devkit. - Domain devkit → toolkit + host. One domain's codecs and bases.
- Worker → domain devkit + toolkit. A worker package is a thin subclass and its config constants.
Type identity
The WorkManager loads each worker into its own AssemblyLoadContext, which
resolves dependencies by simple assembly name from the host first. Two
consequences follow:
- The host contract assembly must be the only assembly with its name; the runtime and the worker then share the same types.
- A renamed host assembly needs a coordinated cutover (see Compatibility).