On this page

event

Intent

A reusable semantic event with optional payload and explicit operation/workflow listeners.

Exact selection subject:

yaml
subject: event

The current Runtime IR is evidence, not authority. Target improvements needed for a usable template contract are called out explicitly.

Scope envelope

ScopeContext
eachevent: EventContext
allevents: EventContext[]
collection candidatescollects.group, collects.feature

For collects.<dimension>, the singular collector is added beside the plural selected-subject array. A collector is valid only when ownership is semantically provable.

Context tree

Context pathTypeMeaning / template use
event.idstringOpaque stable semantic identity.
event.nameNameContextStable semantic identity and finite naming variants.
event.descriptionstring|nullHuman semantic description.
event.tagsstring[]Semantic classifiers; empty when none.
event.explanationsExplanationContext[]Advisory usage/security/implementation notes.
event.groupSemanticLinkContext|nullOwning semantic group.
event.featureSemanticLinkContext|nullCanonical owning feature.
event.payloadSemanticValueContext|nullProperty/schema payload using the shared semantic-value contract.
event.listenersEventListenerContext[]Known listeners.
event.listeners[].kindoperation|workflowListener kind.
event.listeners[].targetSemanticLinkContextResolved listener.

Usage rules

  • Target kind is explicit; templates never infer operation/workflow from pointer prefixes.
  • Do not invent broker/transport facets until proven.

Runtime IR implications to audit

  • Current event model is broadly useful; reverse emitter links can be derived if packs prove the need.

Template example — Handlebars / TypeScript event

hbs
export class
{{file.symbol}}
{ static readonly name = "{{event.name.qualified}}"; // payload type is rendered
by a pack-owned semantic-value macro constructor(public readonly payload:
{{renderValue event.payload file.dependencies}}) {} }

The example uses semantic context only. Any renderType/render_type helper shown is a pack-owned macro/partial consuming the documented TypeContext, not hidden Dryv context.

Audit questions

  • Can a real event pack generate code without parsing raw IR storage conventions?
  • Is any field here present only because the current IR happens to store it?
  • Does any nested item need first-class selection of its own?
Search in