@eventcatalog/language-server 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +71 -0
  2. package/SPEC.md +1939 -0
  3. package/dist/ast-utils.d.ts +96 -0
  4. package/dist/ast-utils.d.ts.map +1 -0
  5. package/dist/ast-utils.js +241 -0
  6. package/dist/ast-utils.js.map +1 -0
  7. package/dist/compiler.d.ts +7 -0
  8. package/dist/compiler.d.ts.map +1 -0
  9. package/dist/compiler.js +654 -0
  10. package/dist/compiler.js.map +1 -0
  11. package/dist/ec-completion-provider.d.ts +15 -0
  12. package/dist/ec-completion-provider.d.ts.map +1 -0
  13. package/dist/ec-completion-provider.js +202 -0
  14. package/dist/ec-completion-provider.js.map +1 -0
  15. package/dist/ec-module.d.ts +18 -0
  16. package/dist/ec-module.d.ts.map +1 -0
  17. package/dist/ec-module.js +27 -0
  18. package/dist/ec-module.js.map +1 -0
  19. package/dist/ec-scope-provider.d.ts +2 -0
  20. package/dist/ec-scope-provider.d.ts.map +1 -0
  21. package/dist/ec-scope-provider.js +2 -0
  22. package/dist/ec-scope-provider.js.map +1 -0
  23. package/dist/ec-scope.d.ts +10 -0
  24. package/dist/ec-scope.d.ts.map +1 -0
  25. package/dist/ec-scope.js +18 -0
  26. package/dist/ec-scope.js.map +1 -0
  27. package/dist/ec-validator.d.ts +9 -0
  28. package/dist/ec-validator.d.ts.map +1 -0
  29. package/dist/ec-validator.js +238 -0
  30. package/dist/ec-validator.js.map +1 -0
  31. package/dist/formatter.d.ts +6 -0
  32. package/dist/formatter.d.ts.map +1 -0
  33. package/dist/formatter.js +88 -0
  34. package/dist/formatter.js.map +1 -0
  35. package/dist/generated/ast.d.ts +970 -0
  36. package/dist/generated/ast.d.ts.map +1 -0
  37. package/dist/generated/ast.js +1537 -0
  38. package/dist/generated/ast.js.map +1 -0
  39. package/dist/generated/grammar.d.ts +7 -0
  40. package/dist/generated/grammar.d.ts.map +1 -0
  41. package/dist/generated/grammar.js +6062 -0
  42. package/dist/generated/grammar.js.map +1 -0
  43. package/dist/generated/module.d.ts +14 -0
  44. package/dist/generated/module.d.ts.map +1 -0
  45. package/dist/generated/module.js +21 -0
  46. package/dist/generated/module.js.map +1 -0
  47. package/dist/graph-types.d.ts +32 -0
  48. package/dist/graph-types.d.ts.map +1 -0
  49. package/dist/graph-types.js +2 -0
  50. package/dist/graph-types.js.map +1 -0
  51. package/dist/graph.d.ts +4 -0
  52. package/dist/graph.d.ts.map +1 -0
  53. package/dist/graph.js +931 -0
  54. package/dist/graph.js.map +1 -0
  55. package/dist/index.d.ts +12 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +10 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/main-browser.d.ts +2 -0
  60. package/dist/main-browser.d.ts.map +1 -0
  61. package/dist/main-browser.js +16 -0
  62. package/dist/main-browser.js.map +1 -0
  63. package/dist/main.d.ts +2 -0
  64. package/dist/main.d.ts.map +1 -0
  65. package/dist/main.js +15 -0
  66. package/dist/main.js.map +1 -0
  67. package/package.json +55 -0
  68. package/specification/00-overview.md +99 -0
  69. package/specification/01-domain.md +80 -0
  70. package/specification/02-service.md +50 -0
  71. package/specification/03-event.md +28 -0
  72. package/specification/04-command.md +25 -0
  73. package/specification/05-query.md +25 -0
  74. package/specification/06-channel.md +131 -0
  75. package/specification/08-container.md +54 -0
  76. package/specification/09-data-product.md +39 -0
  77. package/specification/10-flow.md +163 -0
  78. package/specification/11-diagram.md +3 -0
  79. package/specification/12-user.md +54 -0
  80. package/specification/13-team.md +62 -0
  81. package/specification/14-relationships.md +89 -0
  82. package/specification/15-versioning.md +41 -0
  83. package/specification/16-annotations.md +100 -0
  84. package/specification/17-examples.md +373 -0
  85. package/specification/18-grammar.md +242 -0
  86. package/specification/19-visualizer.md +197 -0
  87. package/specification/build-spec.sh +49 -0
  88. package/syntaxes/ec.tmLanguage.json +61 -0
@@ -0,0 +1,131 @@
1
+ # Channel
2
+
3
+ A communication channel (topic, queue, exchange, etc.).
4
+
5
+ ```
6
+ channel <id> {
7
+ version <semver>
8
+ name "<display name>"
9
+ summary "<text>"
10
+ owner <owner-ref>
11
+
12
+ address "<address-string>"
13
+ protocol "<protocol>"
14
+
15
+ // Channel parameters
16
+ parameter <name> {
17
+ description "<text>"
18
+ default "<value>"
19
+ enum ["<val1>", "<val2>"]
20
+ examples ["<ex1>", "<ex2>"]
21
+ }
22
+
23
+ // Routing
24
+ route <channel-ref> // repeatable
25
+
26
+ // Annotations
27
+ @badge(...)
28
+ @repository(...)
29
+ }
30
+ ```
31
+
32
+ ## Channel-to-Channel Routing
33
+
34
+ Channels can route to other channels using the `route` statement. This models message pipelines where data flows through multiple channels (e.g., Kafka topic → Kafka topic → MQTT broker):
35
+
36
+ ```
37
+ channel SensorIngestion {
38
+ version 1.0.0
39
+ protocol "Kafka"
40
+ route SensorFiltered
41
+ }
42
+
43
+ channel SensorFiltered {
44
+ version 1.0.0
45
+ protocol "Kafka"
46
+ route MqttDevices
47
+ }
48
+
49
+ channel MqttDevices {
50
+ version 1.0.0
51
+ protocol "MQTT"
52
+ }
53
+ ```
54
+
55
+ This creates a chain: `SensorIngestion → SensorFiltered → MqttDevices`.
56
+
57
+ A channel can route to multiple targets (fan-out):
58
+
59
+ ```
60
+ channel Ingestion {
61
+ version 1.0.0
62
+ route Analytics
63
+ route Archive
64
+ }
65
+ ```
66
+
67
+ Routes can include versioned references:
68
+
69
+ ```
70
+ channel Source {
71
+ version 1.0.0
72
+ route Target@2.0.0
73
+ }
74
+ ```
75
+
76
+ ## Service-to-Channel Routing
77
+
78
+ Services send/receive messages through channels:
79
+
80
+ ```
81
+ service OrderService {
82
+ version 1.0.0
83
+
84
+ // Simple — no channel
85
+ sends event OrderCreated
86
+
87
+ // To a single channel
88
+ sends event OrderCreated to orders-topic
89
+
90
+ // To a channel with version (using @ syntax)
91
+ sends event OrderCreated to orders-topic@1.0.0
92
+
93
+ // To multiple channels (comma-separated)
94
+ sends event OrderCreated to orders-topic, orders-backup-topic
95
+
96
+ // To multiple channels with versions
97
+ sends event OrderCreated to orders-topic@1.0.0, orders-backup-topic@2.0.0
98
+
99
+ // Receiving from a single channel
100
+ receives event PaymentProcessed from payment-events
101
+
102
+ // Receiving from multiple channels
103
+ receives event PaymentProcessed from payment-events, payment-retry-queue
104
+
105
+ // Receiving from channels with versions
106
+ receives event PaymentProcessed from payment-events@1.0.0, payment-retry-queue@2.1.0
107
+ }
108
+ ```
109
+
110
+ ## EBNF
111
+
112
+ ```ebnf
113
+ channel_decl = "channel" identifier "{" common_props
114
+ { channel_body_item } "}" ;
115
+ channel_body_item= address_prop | protocol_prop | parameter_decl
116
+ | route_stmt | annotation ;
117
+ address_prop = "address" string_lit ;
118
+ protocol_prop = "protocol" string_lit ;
119
+ parameter_decl = "parameter" identifier "{" { param_prop } "}" ;
120
+ param_prop = "description" string_lit
121
+ | "default" string_lit
122
+ | "enum" "[" string_lit { "," string_lit } "]"
123
+ | "examples" "[" string_lit { "," string_lit } "]" ;
124
+ route_stmt = "route" resource_ref ;
125
+
126
+ channel_clause = to_clause | from_clause ;
127
+ to_clause = "to" channel_ref_list ;
128
+ from_clause = "from" channel_ref_list ;
129
+ channel_ref_list = channel_ref { "," channel_ref } ;
130
+ channel_ref = identifier [ "@" version_lit ] ;
131
+ ```
@@ -0,0 +1,54 @@
1
+ # Container
2
+
3
+ A data store, cache, or external system.
4
+
5
+ ```
6
+ container <id> {
7
+ version <semver>
8
+ name "<display name>"
9
+ summary "<text>"
10
+ owner <owner-ref>
11
+
12
+ // Required
13
+ container-type <database | cache | objectStore | searchIndex
14
+ | dataWarehouse | dataLake | externalSaaS | other>
15
+
16
+ // Optional
17
+ deprecated true
18
+ draft true
19
+ technology "<tech-string>" // e.g., "postgres@15", "redis@7"
20
+ authoritative true
21
+ access-mode <read | write | readWrite | appendOnly>
22
+ classification <public | internal | confidential | regulated>
23
+ residency "<location>"
24
+ retention "<duration>" // e.g., "90d", "10y"
25
+
26
+ // Relationships
27
+ service <service-ref> // repeatable
28
+
29
+ // Annotations
30
+ @badge(...)
31
+ @repository(...)
32
+ }
33
+ ```
34
+
35
+ ## EBNF
36
+
37
+ ```ebnf
38
+ container_decl = "container" identifier "{" common_props
39
+ { container_body_item } "}" ;
40
+ container_body_item = container_type_prop | technology_prop
41
+ | authoritative_prop | access_mode_prop
42
+ | classification_prop | residency_prop
43
+ | retention_prop
44
+ | service_ref_stmt | annotation ;
45
+ container_type_prop = "container-type" container_type_enum ;
46
+ container_type_enum = "database" | "cache" | "objectStore" | "searchIndex"
47
+ | "dataWarehouse" | "dataLake" | "externalSaaS" | "other" ;
48
+ technology_prop = "technology" string_lit ;
49
+ authoritative_prop = "authoritative" bool_lit ;
50
+ access_mode_prop = "access-mode" ( "read" | "write" | "readWrite" | "appendOnly" ) ;
51
+ classification_prop = "classification" ( "public" | "internal" | "confidential" | "regulated" ) ;
52
+ residency_prop = "residency" string_lit ;
53
+ retention_prop = "retention" string_lit ;
54
+ ```
@@ -0,0 +1,39 @@
1
+ # Data Product
2
+
3
+ An analytical data product.
4
+
5
+ ```
6
+ data-product <id> {
7
+ version <semver>
8
+ name "<display name>"
9
+ summary "<text>"
10
+ owner <owner-ref>
11
+ deprecated true
12
+ draft true
13
+
14
+ // Data lineage
15
+ input <message-type> <resource-ref> // repeatable
16
+ output <message-type> <resource-ref> { // repeatable, with optional contract
17
+ contract {
18
+ path "<path>"
19
+ name "<name>"
20
+ type "<type>"
21
+ }
22
+ }
23
+
24
+ // Annotations
25
+ @badge(...)
26
+ }
27
+ ```
28
+
29
+ ## EBNF
30
+
31
+ ```ebnf
32
+ data_product_decl = "data-product" identifier "{" common_props
33
+ { dp_body_item } "}" ;
34
+ dp_body_item = input_stmt | output_stmt | annotation ;
35
+ input_stmt = "input" message_type resource_ref ;
36
+ output_stmt = "output" message_type resource_ref [ "{" contract_block "}" ] ;
37
+ contract_block = "contract" "{" "path" string_lit "name" string_lit
38
+ [ "type" string_lit ] "}" ;
39
+ ```
@@ -0,0 +1,163 @@
1
+ # Flow
2
+
3
+ Flows define step-by-step business processes using a PM-friendly `when`-block syntax. Resources are referenced by name only — types are resolved from the catalog.
4
+
5
+ ```
6
+ flow <id> {
7
+ version <semver>
8
+ name "<display name>"
9
+ summary "<text>"
10
+ owner <owner-ref>
11
+
12
+ // Entry chain — the starting sequence
13
+ <Name> ["<label>"] -> <Name> ["<label>"] -> ...
14
+
15
+ // When blocks — react to events
16
+ when <TriggerName>
17
+ <ServiceName> "<description>"
18
+ -> "<label>": <OutputName>
19
+
20
+ // Convergence — multiple triggers must complete
21
+ when <TriggerA> and <TriggerB>
22
+ <ServiceName> "<description>"
23
+ }
24
+ ```
25
+
26
+ ## Actors and External Systems
27
+
28
+ To use actors and external systems in flows, define them as top-level resources. The flow resolves their type automatically by name:
29
+
30
+ ```
31
+ actor Customer {
32
+ name "Customer"
33
+ summary "End user on the storefront"
34
+ }
35
+
36
+ external-system WarehouseWMS {
37
+ name "Warehouse WMS"
38
+ summary "Legacy warehouse management system"
39
+ }
40
+ ```
41
+
42
+ Both support optional bodies with `name`, `summary`, and annotations. They can also be bare (no body):
43
+
44
+ ```
45
+ actor Customer
46
+ external-system WarehouseWMS
47
+ ```
48
+
49
+ ## Flow References
50
+
51
+ Resources in flows are referenced by name only (no type keywords like `service` or `event`). Types are resolved from catalog definitions or sibling `.ec` files. If no matching definition is found, the default type is `step`. Compilers may warn on unresolved flow references.
52
+
53
+ Each reference can include an optional label:
54
+
55
+ - `Customer "places an order"` — name with display label
56
+ - `PlaceOrder` — bare name (no label)
57
+ - `PaymentService "processes the payment"` — service with description
58
+
59
+ ## Entry Chains
60
+
61
+ The entry chain defines the starting sequence of a flow. It uses arrow (`->`) syntax:
62
+
63
+ ```
64
+ Customer "places an order"
65
+ -> PlaceOrder
66
+ -> OrderService "creates the order"
67
+ -> OrderCreated
68
+ ```
69
+
70
+ Multiple sources can converge into a chain using commas:
71
+
72
+ ```
73
+ EventA, EventB -> MergingService
74
+ ```
75
+
76
+ ## When Blocks
77
+
78
+ `when` blocks define reactions to events. Each block starts with one or more trigger names, followed by actions:
79
+
80
+ ```
81
+ when OrderCreated
82
+ PaymentService "processes the payment"
83
+ -> "success": PaymentProcessed
84
+ -> "failure": PaymentFailed
85
+ InventoryService "reserves stock"
86
+ -> StockReserved
87
+ ```
88
+
89
+ ### Labeled Outputs
90
+
91
+ Action outputs can have optional labels (quoted strings followed by a colon):
92
+
93
+ ```
94
+ -> "success": PaymentProcessed // labeled output
95
+ -> StockReserved // unlabeled output
96
+ ```
97
+
98
+ ### Convergence
99
+
100
+ Use `and` to require multiple triggers before actions execute:
101
+
102
+ ```
103
+ when PaymentProcessed and StockReserved
104
+ FulfillmentService "ships the order"
105
+ -> OrderShipped
106
+ ```
107
+
108
+ ### Terminal Actions
109
+
110
+ Actions without outputs are terminal steps:
111
+
112
+ ```
113
+ when OrderShipped
114
+ WarehouseWMS "syncs with legacy WMS"
115
+ NotificationService "notifies the customer"
116
+ ```
117
+
118
+ ## Example
119
+
120
+ ```
121
+ flow OrderFulfillment {
122
+ version 1.0.0
123
+ name "Order Fulfillment"
124
+ summary "End-to-end order processing from placement to delivery"
125
+ owner fulfillment-team
126
+
127
+ Customer "places an order"
128
+ -> PlaceOrder
129
+ -> OrderService "creates the order"
130
+ -> OrderCreated
131
+
132
+ when OrderCreated
133
+ PaymentService "processes the payment"
134
+ -> "success": PaymentProcessed
135
+ -> "failure": PaymentFailed
136
+ InventoryService "reserves stock"
137
+ -> StockReserved
138
+
139
+ when PaymentFailed
140
+ NotificationService "notifies the customer of failure"
141
+
142
+ when PaymentProcessed and StockReserved
143
+ FulfillmentService "ships the order"
144
+ -> OrderShipped
145
+
146
+ when OrderShipped
147
+ WarehouseWMS "syncs with legacy WMS"
148
+ NotificationService "notifies the customer"
149
+ -> CustomerNotified
150
+ }
151
+ ```
152
+
153
+ ## EBNF
154
+
155
+ ```ebnf
156
+ flow_decl = "flow" identifier "{" common_props
157
+ { flow_entry_chain | flow_when_block } "}" ;
158
+ flow_entry_chain = flow_ref { "," flow_ref } ( "->" flow_ref )+ ;
159
+ flow_when_block = "when" flow_ref { "and" flow_ref } flow_action+ ;
160
+ flow_action = flow_ref { flow_output } ;
161
+ flow_output = "->" [ string_lit ":" ] flow_ref ;
162
+ flow_ref = identifier [ string_lit ] ;
163
+ ```
@@ -0,0 +1,3 @@
1
+ # Diagram
2
+
3
+ _Removed from V1. May be added in a future version._
@@ -0,0 +1,54 @@
1
+ # User
2
+
3
+ A user definition for ownership and team membership.
4
+
5
+ ```
6
+ user <id> {
7
+ name "<display name>"
8
+ avatar "<url>"
9
+ role "<role>"
10
+ email "<email>"
11
+ slack "<url>"
12
+ ms-teams "<url>"
13
+
14
+ // Team membership
15
+ team <team-id>
16
+
17
+ // Ownership declarations
18
+ owns domain <id>
19
+ owns service <id>
20
+ owns event <id>
21
+ owns command <id>
22
+ owns query <id>
23
+ }
24
+ ```
25
+
26
+ ## Example
27
+
28
+ ```
29
+ user dboyne {
30
+ name "David Boyne"
31
+ avatar "https://avatars.githubusercontent.com/u/3268013"
32
+ role "Principal Engineer"
33
+ email "david@company.com"
34
+
35
+ owns domain Payment
36
+ owns service PaymentService
37
+ }
38
+ ```
39
+
40
+ ## EBNF
41
+
42
+ ```ebnf
43
+ user_decl = "user" identifier "{" user_props "}" ;
44
+ user_props = "name" string_lit
45
+ | "avatar" string_lit
46
+ | "role" string_lit
47
+ | "email" string_lit
48
+ | "slack" string_lit
49
+ | "ms-teams" string_lit
50
+ | owns_stmt
51
+ | "team" identifier ;
52
+ owns_stmt = "owns" resource_type_kw identifier ;
53
+ resource_type_kw = "domain" | "service" | "event" | "command" | "query" ;
54
+ ```
@@ -0,0 +1,62 @@
1
+ # Team
2
+
3
+ A team definition for ownership and membership.
4
+
5
+ ```
6
+ team <id> {
7
+ name "<display name>"
8
+ summary "<text>"
9
+ email "<email>"
10
+ slack "<url>"
11
+ ms-teams "<url>"
12
+
13
+ // Members
14
+ member <user-id> // repeatable
15
+
16
+ // Ownership declarations
17
+ owns domain <id>
18
+ owns service <id>
19
+ owns event <id>
20
+ owns command <id>
21
+ owns query <id>
22
+ }
23
+ ```
24
+
25
+ ## Owner References
26
+
27
+ Owners are referenced by team or user ID:
28
+
29
+ ```
30
+ service OrderService {
31
+ version 1.0.0
32
+ owner payment-team // team reference
33
+ owner dboyne // user reference
34
+ }
35
+ ```
36
+
37
+ ## Example
38
+
39
+ ```
40
+ team orders-team {
41
+ name "Orders Team"
42
+ summary "Responsible for order lifecycle"
43
+ email "orders@company.com"
44
+ slack "https://company.slack.com/channels/orders"
45
+
46
+ member dboyne
47
+ member jane-doe
48
+ }
49
+ ```
50
+
51
+ ## EBNF
52
+
53
+ ```ebnf
54
+ team_decl = "team" identifier "{" team_props "}" ;
55
+ team_props = "name" string_lit
56
+ | "summary" string_lit
57
+ | "email" string_lit
58
+ | "slack" string_lit
59
+ | "ms-teams" string_lit
60
+ | "member" identifier
61
+ | owns_stmt ;
62
+ ```
@@ -0,0 +1,89 @@
1
+ # Relationships & Pointers
2
+
3
+ ## Resource References
4
+
5
+ Resources can be referenced by ID alone (resolves to `latest`) or with an explicit version:
6
+
7
+ ```
8
+ // Reference by ID only (latest version)
9
+ receives event OrderCreated
10
+
11
+ // Reference by ID + version using @ syntax
12
+ receives event OrderCreated@2.0.0
13
+
14
+ // Reference with single channel routing
15
+ sends event OrderCreated to orders-topic
16
+
17
+ // Reference with channel version
18
+ sends event OrderCreated@1.0.0 to orders-topic@1.0.0
19
+
20
+ // Reference with multiple channels
21
+ sends event OrderCreated to orders-topic, backup-topic
22
+ receives event PaymentProcessed from payment-events, payment-retry
23
+ ```
24
+
25
+ ## Inline vs. Reference
26
+
27
+ Resources can be defined inline (creating them) or referenced (linking to existing):
28
+
29
+ ```
30
+ service OrderService {
31
+ version 1.0.0
32
+
33
+ // Inline definition — creates the event
34
+ sends event OrderCreated {
35
+ version 1.0.0
36
+ summary "A new order was placed"
37
+ }
38
+
39
+ // Reference only — links to an existing event
40
+ receives event PaymentProcessed
41
+ receives event PaymentProcessed@2.0.0
42
+ }
43
+ ```
44
+
45
+ Inline messages do not support the `channel` statement — use `to`/`from` on the `sends`/`receives` statement for channel routing.
46
+
47
+ ## Pointer Syntax Summary
48
+
49
+ | Syntax | Meaning |
50
+ | ----------------------------- | ----------------------------- |
51
+ | `<id>` | Latest version of resource |
52
+ | `<id>@<version>` | Specific version |
53
+ | `<id> to <channel>` | With single channel routing |
54
+ | `<id> to <channel>@<version>` | Channel with specific version |
55
+ | `<id> to <ch1>, <ch2>, <ch3>` | Multiple channels |
56
+ | `<id> from <channel>` | Received from channel |
57
+ | `<id> from <ch1>, <ch2>` | Received from multiple |
58
+
59
+ ## Data Relationships
60
+
61
+ ```
62
+ writes-to container <container-ref>
63
+ reads-from container <container-ref>
64
+ ```
65
+
66
+ ## EBNF
67
+
68
+ ```ebnf
69
+ resource_ref = identifier [ "@" version_lit ] ;
70
+ message_type = "event" | "command" | "query" ;
71
+
72
+ sends_stmt = "sends" message_type resource_ref [ channel_clause ]
73
+ | "sends" message_type identifier inline_block ;
74
+ receives_stmt = "receives" message_type resource_ref [ channel_clause ]
75
+ | "receives" message_type identifier inline_block ;
76
+
77
+ channel_clause = to_clause | from_clause ;
78
+ to_clause = "to" channel_ref_list ;
79
+ from_clause = "from" channel_ref_list ;
80
+ channel_ref_list = channel_ref { "," channel_ref } ;
81
+ channel_ref = identifier [ "@" version_lit ] ;
82
+
83
+ writes_to_stmt = "writes-to" "container" resource_ref ;
84
+ reads_from_stmt = "reads-from" "container" resource_ref ;
85
+ flow_ref_stmt = "flow" resource_ref ;
86
+ data_product_ref_stmt = "data-product" resource_ref ;
87
+
88
+ inline_block = "{" message_props "}" ;
89
+ ```
@@ -0,0 +1,41 @@
1
+ # Versioning
2
+
3
+ ## Declaring Versions
4
+
5
+ Every versioned resource requires a version:
6
+
7
+ ```
8
+ event OrderCreated {
9
+ version 1.0.0
10
+ }
11
+ ```
12
+
13
+ ## Referencing Versions
14
+
15
+ ```
16
+ // Latest (default - no version specified)
17
+ receives event OrderCreated
18
+
19
+ // Specific version using @ syntax
20
+ receives event OrderCreated@2.0.0
21
+
22
+ // Channel with version
23
+ sends event OrderProcessed to payments-channel@1.0.0
24
+
25
+ // Multiple channels with versions
26
+ receives event PaymentFailed from channel-a@1.0.0, channel-b@2.1.0
27
+ ```
28
+
29
+ ## Version Defaults
30
+
31
+ When no version is specified in a reference, it resolves to `latest`.
32
+
33
+ ## EBNF
34
+
35
+ ```ebnf
36
+ int = digit { digit } ;
37
+ version_lit = int "." int "." int [ "-" prerelease ] ;
38
+ version_prop = "version" version_lit ;
39
+ version_ref = "@" version_lit ;
40
+ resource_ref = identifier [ version_ref ] ;
41
+ ```