@cratis/screenplay-language 1.7.0 → 2.0.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.
@@ -47,6 +47,7 @@ export const sliceItems: CompletionEntry[] = [
47
47
  { label: 'event', insertText: 'event ${1:Name}\n ${2:property} ${3:Type}', documentation: 'Declares an event type — an immutable, past-tense fact.' },
48
48
  { label: 'command', insertText: 'command ${1:Name}\n ${2:property} ${3:Type}', documentation: 'Declares a command — an imperative intent that produces events.' },
49
49
  { label: 'query', insertText: 'query ${1:Name} => ${2:ReadModel}', documentation: 'Declares a read-side entry point mapping to a return type.' },
50
+ { label: 'query observable', insertText: 'query ${1:Name} => observable ${2:ReadModel}', documentation: 'Declares a live read — the query keeps pushing as the read model changes, instead of answering once.' },
50
51
  { label: 'projection', insertText: 'projection ${1:Name} => ${2:ReadModel}\n from ${3:EventType}', documentation: 'Declares how events project into a read model (PDL).' },
51
52
  { label: 'capture', insertText: 'capture ${1:Name}\n source ${2:api}', documentation: 'Declares a change data capture converting external data into events (CDL).' },
52
53
  { label: 'reactor', insertText: 'reactor ${1:Name}\n on ${2:EventType}', documentation: 'Declares an event reaction rule.' },
@@ -58,7 +59,7 @@ export const commandItems: CompletionEntry[] = [
58
59
  { label: 'identifier property', insertText: '${1:property} ${2:Type} identifier', documentation: 'Marks the property a runtime resolves the event source id from. At most one per command.' },
59
60
  { label: 'authorize', insertText: 'authorize ${1:PolicyName}', documentation: 'References the policies that must pass for the command to execute.' },
60
61
  { label: 'validate', insertText: 'validate\n ${1:property} not empty message "${2:message}"', documentation: 'Declarative validation rules with messages.' },
61
- { label: 'validate csharp', insertText: `validate ${fenced('csharp')}`, documentation: 'Imperative validation in C#, yielding ValidationError.' },
62
+ { label: 'validate csharp', insertText: `validate ${fenced('csharp')}`, documentation: 'Imperative validation in C#, yielding the message of every rule the artifact breaks.' },
62
63
  { label: 'produces', insertText: 'produces ${1:EventType}\n ${2:property} = ${3:source}', documentation: 'Declares the event the command emits, with property mappings.' },
63
64
  { label: 'produces when', insertText: 'produces when ${1:condition}\n ${2:EventType}\n ${3:property} = ${4:source}', documentation: 'Conditionally emits an event when the condition holds.' },
64
65
  { label: 'handler', insertText: 'handler\n ', documentation: 'Fully imperative command implementation — file reference or inline C#, instead of produces.' },
@@ -115,11 +116,16 @@ export const specificationItems: CompletionEntry[] = [
115
116
  { label: 'then error "..."', insertText: 'then error "${1:reason}"', documentation: 'A rejection, for the named reason.' },
116
117
  ];
117
118
 
119
+ export const ruleItems: CompletionEntry[] = [
120
+ { label: 'file', insertText: 'file ${1:Path}', documentation: 'Gives the named predicate its implementation in an external C# file.' },
121
+ { label: 'csharp', insertText: fenced('csharp'), documentation: 'Gives the named predicate its implementation as inline C# returning a bool.' },
122
+ ];
123
+
118
124
  export const policyItems: CompletionEntry[] = [
119
125
  { label: 'require authenticated', insertText: 'require authenticated', documentation: 'Requires an authenticated caller.' },
120
126
  { label: 'require role', insertText: 'require role "${1:role}"', documentation: 'Requires the caller to have a role.' },
121
127
  { label: 'require claim', insertText: 'require claim "${1:claim}" matches ${2:subject}', documentation: 'Requires a claim to match the subject or a value.' },
122
- { label: 'csharp', insertText: fenced('csharp'), documentation: 'Fully custom policy logic in C#, returning PolicyResult.' },
128
+ { label: 'csharp', insertText: fenced('csharp'), documentation: 'Fully custom policy logic in C#, returning a bool.' },
123
129
  ];
124
130
 
125
131
  export const validateItems: CompletionEntry[] = [
@@ -127,6 +133,9 @@ export const validateItems: CompletionEntry[] = [
127
133
  { label: 'max', insertText: '${1:property} max ${2:500} message "${3:message}"', documentation: 'Maximum length or value.' },
128
134
  { label: 'min', insertText: '${1:property} min ${2:1} message "${3:message}"', documentation: 'Minimum length or value.' },
129
135
  { label: 'matches', insertText: '${1:property} matches "${2:pattern}" message "${3:message}"', documentation: 'The property must match a regular expression.' },
136
+ { label: 'rule', insertText: '${1:property} rule ${2:PredicateName} message "${3:message}"', documentation: 'Names a predicate — optionally followed by an indented `file` reference or inline `csharp` block giving it a body; bare, it just states that a constraint exists.' },
137
+ { label: '==', insertText: '${1:property} == ${2:value} message "${3:message}"', documentation: 'The property must equal the value.' },
138
+ { label: '!=', insertText: '${1:property} != ${2:value} message "${3:message}"', documentation: 'The property must not equal the value.' },
130
139
  { label: 'length ==', insertText: '${1:property} length == ${2:3} message "${3:message}"', documentation: 'The property must have an exact length.' },
131
140
  { label: 'all >', insertText: '${1:collection}.${2:property} all > ${3:0} message "${4:message}"', documentation: 'Every element of a collection must satisfy the comparison.' },
132
141
  ];
@@ -164,7 +173,12 @@ export const contextVariableItems: CompletionEntry[] = [
164
173
  { label: '$context.causedBy.name', insertText: '$context.causedBy.name', documentation: 'Display name of the identity that caused the command or query.' },
165
174
  { label: '$context.causedBy.userName', insertText: '$context.causedBy.userName', documentation: 'User name of the identity that caused the command or query.' },
166
175
  { label: '$context.causation.type', insertText: '$context.causation.type', documentation: 'What caused this — a command, a reactor, a schedule.' },
167
- { label: '$context.identity.id', insertText: '$context.identity.id', documentation: 'Subject of the caller from the auth token.' },
176
+ { label: '$context.identity.id', insertText: '$context.identity.id', documentation: 'The identifier of the caller from the auth token.' },
177
+ { label: '$context.identity.name', insertText: '$context.identity.name', documentation: 'The display name of the caller.' },
178
+ { label: '$context.identity.userName', insertText: '$context.identity.userName', documentation: 'The user name of the caller.' },
179
+ { label: '$context.identity.isAuthenticated', insertText: '$context.identity.isAuthenticated', documentation: 'Whether the caller is authenticated.' },
180
+ { label: '$context.identity.roles', insertText: '$context.identity.roles', documentation: 'The roles the caller holds.' },
181
+ { label: '$context.identity.claims.', insertText: '$context.identity.claims.${1:name}', documentation: 'The value of a claim the caller carries.' },
168
182
  { label: '$env.', insertText: '$env.${1:VAR_NAME}', documentation: 'An environment variable.' },
169
183
  { label: '$eventContext.occurred', insertText: '$eventContext.occurred', documentation: 'Timestamp of the event being projected (PDL).' },
170
184
  ];
@@ -1,11 +1,18 @@
1
1
  // Copyright (c) Cratis. All rights reserved.
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
- import { enclosingChain, fenceMap, indentOf } from './document-context';
4
+ import { enclosingChain, fenceMap, indentOf, nearestEnclosingLine } from './document-context';
5
5
  import { getSubLanguage } from './sub-language-registry';
6
6
  import * as items from './completion-items';
7
7
  import { CompletionEntry } from './completion-items';
8
8
 
9
+ // Matches a validation rule line ending in "rule <Name>" (optionally followed by a
10
+ // message clause) - both the command form ("<property> rule <Name>") and the
11
+ // concept implied-subject form ("rule <Name>"). Its first word is the property
12
+ // name, not "rule", so it can't be recognized through the chain[0] keyword switch
13
+ // the way "on <EventType>" or "handler" are - hence the dedicated regex check.
14
+ const RULE_LINE_PATTERN = /(?:^|\s)rule\s+[A-Za-z_]\w*(?:\s+message\s+.*)?$/;
15
+
9
16
  export type CompletionPlan =
10
17
  | { kind: 'none' }
11
18
  | { kind: 'entries'; entries: CompletionEntry[] }
@@ -118,5 +125,10 @@ export function planCompletions(
118
125
  return { kind: 'types' };
119
126
  }
120
127
 
128
+ const enclosingLine = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent);
129
+ if (enclosingLine && RULE_LINE_PATTERN.test(enclosingLine)) {
130
+ return { kind: 'entries', entries: items.ruleItems };
131
+ }
132
+
121
133
  return { kind: 'entries', entries: completionEntriesFor(chain) };
122
134
  }
@@ -18,6 +18,7 @@ export declare const constraintItems: CompletionEntry[];
18
18
  export declare const reactorItems: CompletionEntry[];
19
19
  export declare const reactorOnItems: CompletionEntry[];
20
20
  export declare const specificationItems: CompletionEntry[];
21
+ export declare const ruleItems: CompletionEntry[];
21
22
  export declare const policyItems: CompletionEntry[];
22
23
  export declare const validateItems: CompletionEntry[];
23
24
  export declare const screenItems: CompletionEntry[];
@@ -1 +1 @@
1
- {"version":3,"file":"completion-items.d.ts","sourceRoot":"","sources":["../completion-items.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IAC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, past-tense fact.' },
35
35
  { label: 'command', insertText: 'command ${1:Name}\n ${2:property} ${3:Type}', documentation: 'Declares a command — an imperative intent that produces events.' },
36
36
  { label: 'query', insertText: 'query ${1:Name} => ${2:ReadModel}', documentation: 'Declares a read-side entry point mapping to a return type.' },
37
+ { label: 'query observable', insertText: 'query ${1:Name} => observable ${2:ReadModel}', documentation: 'Declares a live read — the query keeps pushing as the read model changes, instead of answering once.' },
37
38
  { label: 'projection', insertText: 'projection ${1:Name} => ${2:ReadModel}\n from ${3:EventType}', documentation: 'Declares how events project into a read model (PDL).' },
38
39
  { label: 'capture', insertText: 'capture ${1:Name}\n source ${2:api}', documentation: 'Declares a change data capture converting external data into events (CDL).' },
39
40
  { label: 'reactor', insertText: 'reactor ${1:Name}\n on ${2:EventType}', documentation: 'Declares an event reaction rule.' },
@@ -44,7 +45,7 @@ export const commandItems = [
44
45
  { label: 'identifier property', insertText: '${1:property} ${2:Type} identifier', documentation: 'Marks the property a runtime resolves the event source id from. At most one per command.' },
45
46
  { label: 'authorize', insertText: 'authorize ${1:PolicyName}', documentation: 'References the policies that must pass for the command to execute.' },
46
47
  { label: 'validate', insertText: 'validate\n ${1:property} not empty message "${2:message}"', documentation: 'Declarative validation rules with messages.' },
47
- { label: 'validate csharp', insertText: `validate ${fenced('csharp')}`, documentation: 'Imperative validation in C#, yielding ValidationError.' },
48
+ { label: 'validate csharp', insertText: `validate ${fenced('csharp')}`, documentation: 'Imperative validation in C#, yielding the message of every rule the artifact breaks.' },
48
49
  { label: 'produces', insertText: 'produces ${1:EventType}\n ${2:property} = ${3:source}', documentation: 'Declares the event the command emits, with property mappings.' },
49
50
  { label: 'produces when', insertText: 'produces when ${1:condition}\n ${2:EventType}\n ${3:property} = ${4:source}', documentation: 'Conditionally emits an event when the condition holds.' },
50
51
  { label: 'handler', insertText: 'handler\n ', documentation: 'Fully imperative command implementation — file reference or inline C#, instead of produces.' },
@@ -92,17 +93,24 @@ export const specificationItems = [
92
93
  { label: 'then error', insertText: 'then error', documentation: 'A rejection, for a reason this specification does not name.' },
93
94
  { label: 'then error "..."', insertText: 'then error "${1:reason}"', documentation: 'A rejection, for the named reason.' },
94
95
  ];
96
+ export const ruleItems = [
97
+ { label: 'file', insertText: 'file ${1:Path}', documentation: 'Gives the named predicate its implementation in an external C# file.' },
98
+ { label: 'csharp', insertText: fenced('csharp'), documentation: 'Gives the named predicate its implementation as inline C# returning a bool.' },
99
+ ];
95
100
  export const policyItems = [
96
101
  { label: 'require authenticated', insertText: 'require authenticated', documentation: 'Requires an authenticated caller.' },
97
102
  { label: 'require role', insertText: 'require role "${1:role}"', documentation: 'Requires the caller to have a role.' },
98
103
  { label: 'require claim', insertText: 'require claim "${1:claim}" matches ${2:subject}', documentation: 'Requires a claim to match the subject or a value.' },
99
- { label: 'csharp', insertText: fenced('csharp'), documentation: 'Fully custom policy logic in C#, returning PolicyResult.' },
104
+ { label: 'csharp', insertText: fenced('csharp'), documentation: 'Fully custom policy logic in C#, returning a bool.' },
100
105
  ];
101
106
  export const validateItems = [
102
107
  { label: 'not empty', insertText: '${1:property} not empty message "${2:message}"', documentation: 'The property must have a value.' },
103
108
  { label: 'max', insertText: '${1:property} max ${2:500} message "${3:message}"', documentation: 'Maximum length or value.' },
104
109
  { label: 'min', insertText: '${1:property} min ${2:1} message "${3:message}"', documentation: 'Minimum length or value.' },
105
110
  { label: 'matches', insertText: '${1:property} matches "${2:pattern}" message "${3:message}"', documentation: 'The property must match a regular expression.' },
111
+ { label: 'rule', insertText: '${1:property} rule ${2:PredicateName} message "${3:message}"', documentation: 'Names a predicate — optionally followed by an indented `file` reference or inline `csharp` block giving it a body; bare, it just states that a constraint exists.' },
112
+ { label: '==', insertText: '${1:property} == ${2:value} message "${3:message}"', documentation: 'The property must equal the value.' },
113
+ { label: '!=', insertText: '${1:property} != ${2:value} message "${3:message}"', documentation: 'The property must not equal the value.' },
106
114
  { label: 'length ==', insertText: '${1:property} length == ${2:3} message "${3:message}"', documentation: 'The property must have an exact length.' },
107
115
  { label: 'all >', insertText: '${1:collection}.${2:property} all > ${3:0} message "${4:message}"', documentation: 'Every element of a collection must satisfy the comparison.' },
108
116
  ];
@@ -136,7 +144,12 @@ export const contextVariableItems = [
136
144
  { label: '$context.causedBy.name', insertText: '$context.causedBy.name', documentation: 'Display name of the identity that caused the command or query.' },
137
145
  { label: '$context.causedBy.userName', insertText: '$context.causedBy.userName', documentation: 'User name of the identity that caused the command or query.' },
138
146
  { label: '$context.causation.type', insertText: '$context.causation.type', documentation: 'What caused this — a command, a reactor, a schedule.' },
139
- { label: '$context.identity.id', insertText: '$context.identity.id', documentation: 'Subject of the caller from the auth token.' },
147
+ { label: '$context.identity.id', insertText: '$context.identity.id', documentation: 'The identifier of the caller from the auth token.' },
148
+ { label: '$context.identity.name', insertText: '$context.identity.name', documentation: 'The display name of the caller.' },
149
+ { label: '$context.identity.userName', insertText: '$context.identity.userName', documentation: 'The user name of the caller.' },
150
+ { label: '$context.identity.isAuthenticated', insertText: '$context.identity.isAuthenticated', documentation: 'Whether the caller is authenticated.' },
151
+ { label: '$context.identity.roles', insertText: '$context.identity.roles', documentation: 'The roles the caller holds.' },
152
+ { label: '$context.identity.claims.', insertText: '$context.identity.claims.${1:name}', documentation: 'The value of a claim the caller carries.' },
140
153
  { label: '$env.', insertText: '$env.${1:VAR_NAME}', documentation: 'An environment variable.' },
141
154
  { label: '$eventContext.occurred', insertText: '$eventContext.occurred', documentation: 'Timestamp of the event being projected (PDL).' },
142
155
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"completion-items.js","sourceRoot":"","sources":["../completion-items.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAQrG,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,GAAG,yBAAyB,CAAC;AAEhE,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC5C,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,8BAA8B,EAAE,aAAa,EAAE,2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AE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAE,0BAA0B,EAAE;IAC/F,EAAE,KAAK,EAAE,wBAAwB,EAAE,UAAU,EAAE,wBAAwB,EAAE,aAAa,EAAE,+CAA+C,EAAE;CAC5I,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"completion-planner.d.ts","sourceRoot":"","sources":["../completion-planner.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,cAAc,GACpB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,eAAe,EAAE,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAExB,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAmDvE;AAID,wBAAgB,eAAe,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACnB,cAAc,CA2ChB"}
1
+ {"version":3,"file":"completion-planner.d.ts","sourceRoot":"","sources":["../completion-planner.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASrD,MAAM,MAAM,cAAc,GACpB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,eAAe,EAAE,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAExB,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAmDvE;AAID,wBAAgB,eAAe,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACnB,cAAc,CAgDhB"}
@@ -1,8 +1,14 @@
1
1
  // Copyright (c) Cratis. All rights reserved.
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
- import { enclosingChain, fenceMap, indentOf } from './document-context';
3
+ import { enclosingChain, fenceMap, indentOf, nearestEnclosingLine } from './document-context';
4
4
  import { getSubLanguage } from './sub-language-registry';
5
5
  import * as items from './completion-items';
6
+ // Matches a validation rule line ending in "rule <Name>" (optionally followed by a
7
+ // message clause) - both the command form ("<property> rule <Name>") and the
8
+ // concept implied-subject form ("rule <Name>"). Its first word is the property
9
+ // name, not "rule", so it can't be recognized through the chain[0] keyword switch
10
+ // the way "on <EventType>" or "handler" are - hence the dedicated regex check.
11
+ const RULE_LINE_PATTERN = /(?:^|\s)rule\s+[A-Za-z_]\w*(?:\s+message\s+.*)?$/;
6
12
  export function completionEntriesFor(chain) {
7
13
  const construct = chain[0];
8
14
  if (construct === undefined)
@@ -96,6 +102,10 @@ export function planCompletions(lines, lineIndex, textBefore) {
96
102
  if (chain[0] === 'query' && /^\s+(?:by|filter)\s+[a-z_]\w*\s+[\w[\]?]*$/.test(textBefore)) {
97
103
  return { kind: 'types' };
98
104
  }
105
+ const enclosingLine = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent);
106
+ if (enclosingLine && RULE_LINE_PATTERN.test(enclosingLine)) {
107
+ return { kind: 'entries', entries: items.ruleItems };
108
+ }
99
109
  return { kind: 'entries', entries: completionEntriesFor(chain) };
100
110
  }
101
111
  //# sourceMappingURL=completion-planner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"completion-planner.js","sourceRoot":"","sources":["../completion-planner.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAc5C,MAAM,UAAU,oBAAoB,CAAC,KAAe;IAChD,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,aAAa,CAAC;IACxD,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC9C,IAAI,WAAW;QAAE,OAAO,WAAW,CAAC,WAAW,IAAI,EAAE,CAAC;IACtD,QAAQ,SAAS,EAAE,CAAC;QAChB,KAAK,QAAQ;YACT,OAAO,KAAK,CAAC,WAAW,CAAC;QAC7B,KAAK,SAAS;YACV,OAAO,KAAK,CAAC,YAAY,CAAC;QAC9B,KAAK,OAAO;YACR,OAAO,KAAK,CAAC,UAAU,CAAC;QAC5B,KAAK,SAAS;YACV,OAAO,KAAK,CAAC,YAAY,CAAC;QAC9B,KAAK,MAAM;YACP,OAAO,KAAK,CAAC,SAAS,CAAC;QAC3B,KAAK,SAAS;YACV,OAAO,KAAK,CAAC,YAAY,CAAC;QAC9B,KAAK,UAAU;YACX,OAAO,KAAK,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E,SAAS,EAAE,eAAe,CAAC,CAAC;IACtF,IAAI,aAAa,IAAI,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;QACzD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IACzD,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC;AACrE,CAAC"}
@@ -2,4 +2,5 @@ export declare function indentOf(line: string): number;
2
2
  export declare function firstWord(line: string): string;
3
3
  export declare function fenceMap(lines: string[]): boolean[];
4
4
  export declare function enclosingChain(lines: string[], fences: boolean[], lineIndex: number, indent: number): string[];
5
+ export declare function nearestEnclosingLine(lines: string[], fences: boolean[], lineIndex: number, indent: number): string | undefined;
5
6
  //# sourceMappingURL=document-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-context.d.ts","sourceRoot":"","sources":["../document-context.ts"],"names":[],"mappings":"AAGA,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAID,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAYnD;AAMD,wBAAgB,cAAc,CAC1B,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,OAAO,EAAE,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACf,MAAM,EAAE,CAcV"}
1
+ {"version":3,"file":"document-context.d.ts","sourceRoot":"","sources":["../document-context.ts"],"names":[],"mappings":"AAGA,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAID,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAYnD;AAMD,wBAAgB,cAAc,CAC1B,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,OAAO,EAAE,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACf,MAAM,EAAE,CAcV;AAOD,wBAAgB,oBAAoB,CAChC,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,OAAO,EAAE,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACf,MAAM,GAAG,SAAS,CAUpB"}
@@ -42,4 +42,22 @@ export function enclosingChain(lines, fences, lineIndex, indent) {
42
42
  }
43
43
  return chain;
44
44
  }
45
+ // Returns the full trimmed text of the nearest enclosing block opener above a
46
+ // position — the same line enclosingChain's first entry is derived from, but kept
47
+ // whole rather than reduced to its first word. Used where the construct is not
48
+ // identified by a fixed leading keyword, such as a validation rule line, whose
49
+ // first word is the property it applies to rather than "rule".
50
+ export function nearestEnclosingLine(lines, fences, lineIndex, indent) {
51
+ for (let index = lineIndex - 1; index >= 0 && indent > 0; index--) {
52
+ if (fences[index])
53
+ continue;
54
+ const line = lines[index];
55
+ if (line.trim().length === 0)
56
+ continue;
57
+ if (indentOf(line) < indent) {
58
+ return line.trim();
59
+ }
60
+ }
61
+ return undefined;
62
+ }
45
63
  //# sourceMappingURL=document-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-context.js","sourceRoot":"","sources":["../document-context.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,MAAM,UAAU,QAAQ,CAAC,IAAY;IACjC,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAY;IAClC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC7C,CAAC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@ -1 +1 @@
1
- {"version":3,"file":"keyword-docs.d.ts","sourceRoot":"","sources":["../keyword-docs.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA0F9C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGhD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAgBtD,CAAC"}
1
+ {"version":3,"file":"keyword-docs.d.ts","sourceRoot":"","sources":["../keyword-docs.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4F9C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGhD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsBtD,CAAC"}
@@ -20,6 +20,7 @@ export const keywordDocs = {
20
20
  event: 'An event type — an immutable, past-tense fact. Properties use concepts or primitives.',
21
21
  command: 'An imperative intent. Declares authorization, validation, and what events it produces — declaratively, or via a full handler.',
22
22
  query: 'A read-side entry point mapping to a return type, with an optional description, parameters and performer.',
23
+ observable: 'Qualifies a query return type as a live read — `query <Name> => observable <ReadModel>` keeps pushing as the read model changes, instead of answering once.',
23
24
  performer: 'The code that performs a query — a `file <Path>` reference or an inline `csharp`/`sql` block. The query\'s counterpart to a command handler.',
24
25
  from: 'Fills a query parameter from the query context instead of the caller, as in `filter tenantId TenantId from $context.tenant`.',
25
26
  projection: 'Declares how events project into a read model, using the embedded Projection Declaration Language (PDL).',
@@ -32,6 +33,7 @@ export const keywordDocs = {
32
33
  produces: 'Declares the events a command emits — single, multiple, or conditional.',
33
34
  handler: 'A fully imperative command implementation — a `file <Path>` reference or an inline `csharp` block, instead of `produces`.',
34
35
  when: 'Guards a produced event or a capture append with a condition.',
36
+ rule: 'Names a predicate. Bare, it states that a constraint exists without expressing what it computes — nothing resolves the name. Optionally followed by an indented `file <Path>` reference or inline `csharp` block giving it a body.',
35
37
  require: 'A policy condition: `authenticated`, `role "..."`, or `claim "..." matches ...`.',
36
38
  authenticated: 'Requires an authenticated caller.',
37
39
  role: 'Requires the caller to have the given role.',
@@ -106,7 +108,13 @@ export const contextVariableDocs = {
106
108
  '$context.causedBy.userName': 'The user name of the identity that caused the command or query.',
107
109
  '$context.causation': 'What caused the command or query — `type`, `occurred`, `properties`.',
108
110
  '$context.causation.type': 'What caused the command or query — a command, a reactor, a schedule.',
109
- '$context.identity.id': 'The subject of the caller from the auth token.',
111
+ '$context.identity': 'The caller a decision is made about — `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`.',
112
+ '$context.identity.id': 'The identifier of the caller from the auth token.',
113
+ '$context.identity.name': 'The display name of the caller.',
114
+ '$context.identity.userName': 'The user name of the caller.',
115
+ '$context.identity.isAuthenticated': 'Whether the caller is authenticated.',
116
+ '$context.identity.roles': 'The roles the caller holds.',
117
+ '$context.identity.claims': 'The claims the caller carries — `$context.identity.claims.<name>` reads one.',
110
118
  '$env': 'An environment variable, e.g. `$env.SERVICE_NAME`.',
111
119
  '$secrets': 'An encrypted secret resolved at runtime, e.g. `$secrets.azureAdClientId` — stays symbolic in the compiled tree.',
112
120
  '$strings': 'A localized string resolved from the `.strings` file of the active locale, e.g. `$strings.invoices.title`.',
@@ -1 +1 @@
1
- {"version":3,"file":"keyword-docs.js","sourceRoot":"","sources":["../keyword-docs.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,MAAM,CAAC,MAAM,WAAW,GAA2B;IAC/C,MAAM,EAAE,0FAA0F;IAClG,MAAM,EAAE,6EAA6E;IACrF,OAAO,EAAE,gKAAgK;IACzK,IAAI,EAAE,iJAAiJ;IACvJ,MAAM,EAAE,kKAAkK;IAC1K,UAAU,EAAE,sIAAsI;IAClJ,MAAM,EAAE,gGA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AAU,EAAE,4GAA4G;IACxH,wBAAwB,EAAE,6CAA6C;CAC1E,CAAC"}
@@ -7,6 +7,7 @@ export declare const clauseKeywords: string[];
7
7
  export declare const codeBlockTags: string[];
8
8
  export declare const contextRoots: string[];
9
9
  export declare const causedByProperties: string[];
10
+ export declare const identityProperties: string[];
10
11
  export declare const sliceTypes: string[];
11
12
  export declare const primitiveTypes: string[];
12
13
  export declare const conceptAttributes: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../language.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,MAAM,MAAM,GAAG,cAAc,eAAe,CAAC,CAAC;AAEpD,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,eAAO,MAAM,sBAAsB,EAAE,SAAS,CAAC,uBAK9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAoB7B,CAAC;AAEF,eAAO,MAAM,cAAc,UA2D1B,CAAC;AAEF,eAAO,MAAM,aAAa,UAAmD,CAAC;AAG9E,eAAO,MAAM,YAAY,UAQxB,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAkC,CAAC;AAElE,eAAO,MAAM,UAAU,UAA0D,CAAC;AAElF,eAAO,MAAM,cAAc,UAAmE,CAAC;AAE/F,eAAO,MAAM,iBAAiB,UAAyB,CAAC;AAExD,eAAO,MAAM,qBAAqB,EAAE,SAAS,CAAC,qBA2B7C,CAAC"}
1
+ {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../language.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,MAAM,MAAM,GAAG,cAAc,eAAe,CAAC,CAAC;AAEpD,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,eAAO,MAAM,sBAAsB,EAAE,SAAS,CAAC,uBAK9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAoB7B,CAAC;AAEF,eAAO,MAAM,cAAc,UA6D1B,CAAC;AAEF,eAAO,MAAM,aAAa,UAAmD,CAAC;AAG9E,eAAO,MAAM,YAAY,UAQxB,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAkC,CAAC;AAIlE,eAAO,MAAM,kBAAkB,UAAmE,CAAC;AAEnG,eAAO,MAAM,UAAU,UAA0D,CAAC;AAElF,eAAO,MAAM,cAAc,UAAmE,CAAC;AAE/F,eAAO,MAAM,iBAAiB,UAAyB,CAAC;AAExD,eAAO,MAAM,qBAAqB,EAAE,SAAS,CAAC,qBA2B7C,CAAC"}
package/dist/language.js CHANGED
@@ -41,6 +41,7 @@ export const clauseKeywords = [
41
41
  'produces',
42
42
  'handler',
43
43
  'performer',
44
+ 'observable',
44
45
  'identifier',
45
46
  'reason',
46
47
  'from',
@@ -51,6 +52,7 @@ export const clauseKeywords = [
51
52
  'message',
52
53
  'not',
53
54
  'empty',
55
+ 'rule',
54
56
  'matches',
55
57
  'all',
56
58
  'max',
@@ -100,6 +102,9 @@ export const contextRoots = [
100
102
  'identity',
101
103
  ];
102
104
  export const causedByProperties = ['subject', 'name', 'userName'];
105
+ // The properties a `$context.identity.` path can name — the members of Identity. Everything after
106
+ // `claims.` is the name of a claim rather than a member, so it is never checked.
107
+ export const identityProperties = ['id', 'name', 'userName', 'isAuthenticated', 'roles', 'claims'];
103
108
  export const sliceTypes = ['StateChange', 'StateView', 'Automation', 'Translate'];
104
109
  export const primitiveTypes = ['Uuid', 'String', 'Int', 'Decimal', 'Bool', 'Date', 'DateTime'];
105
110
  export const conceptAttributes = ['@pii', '@sensitive'];
@@ -125,7 +130,7 @@ export const languageConfiguration = {
125
130
  offSide: true,
126
131
  },
127
132
  indentationRules: {
128
- increaseIndentPattern: /^\s*(module|feature|slice|policy|persona|authentication|provider|event|command|query|type|screen|projection|capture|reactor|constraint|layout|template|validate|produces|handler|performer|section|concurrency|seed|for)\b.*$/,
133
+ increaseIndentPattern: /^\s*(module|feature|slice|policy|persona|authentication|provider|event|command|query|type|screen|projection|capture|reactor|constraint|layout|template|validate|produces|handler|performer|rule|section|concurrency|seed|for)\b.*$/,
129
134
  // Dedents are always explicit in an offside language — never auto-dedent.
130
135
  decreaseIndentPattern: /(?!)/,
131
136
  },
@@ -1 +1 @@
1
- {"version":3,"file":"language.js","sourceRoot":"","sources":["../language.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAMrG,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEvC,MAAM,CAAC,MAAM,sBAAsB,GAAsC;IACrE,EAAE,EAAE,UAAU;IACd,UAAU,EAAE,CAAC,OAAO,CAAC;IACrB,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,MAAM,CAAC;IAC7C,SAAS,EAAE,CAAC,mBAAmB,CAAC;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,MAAM;IACN,QAAQ;IACR,SAAS;IACT,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,OAAO;IACP,OAAO;IACP,SAAS;IACT,OAAO;IACP,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,eAAe;IACf,MAAM;CACT,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,aAAa;IACb,UAAU;IACV,SAAS;IACT,eAAe;IACf,MAAM;IACN,OAAO;IACP,SAAS;IACT,WAAW;IACX,UAAU;IACV,UAAU;IACV,SAAS;IACT,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,SAAS;IACT,KAAK;IACL,OAAO;IACP,SAAS;IACT,KAAK;IACL,KAAK;IACL,KAAK;IACL,QAAQ;IACR,OAAO;IACP,MAAM;IACN,OAAO;IACP,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,K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U,CAAC,CAAC;AAE/F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAoC;IAClE,QAAQ,EAAE;QACN,WAAW,EAAE,IAAI;KACpB;IACD,QAAQ,EAAE;QACN,CAAC,GAAG,EAAE,GAAG,CAAC;QACV,CAAC,GAAG,EAAE,GAAG,CAAC;KACb;IACD,gBAAgB,EAAE;QACd,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE;QACzB,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE;QACzB,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE;KAC5B;IACD,gBAAgB,EAAE;QACd,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE;QACzB,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE;QACzB,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE;KAC5B;IACD,OAAO,EAAE;QACL,OAAO,EAAE,IAAI;KAChB;IACD,gBAAgB,EAAE;QACd,qBAAqB,EACjB,oOAAoO;QACxO,0EAA0E;QAC1E,qBAAqB,EAAE,MAAM;KAChC;CACJ,CAAC"}
package/dist/symbols.js CHANGED
@@ -115,7 +115,7 @@ export function scanDocument(lines) {
115
115
  });
116
116
  continue;
117
117
  }
118
- const queryMatch = trimmed.match(/^query\s+(\w+)\s*=>\s*([\w[\]]+)\s*$/);
118
+ const queryMatch = trimmed.match(/^query\s+(\w+)\s*=>\s*(?:observable\s+)?([\w[\]?]+)\s*$/);
119
119
  if (queryMatch) {
120
120
  // The return type names a read model, which no construct declares — only the
121
121
  // 'by' and 'filter' parameters resolve against the document's own types.
@@ -1 +1 @@
1
- {"version":3,"file":"symbols.js","sourceRoot":"","sources":["../symbols.ts"],"names":[],"mappings":"AAAA,6CAA6C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M,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,kBAAkB,CAAC;CAChC;AAwFD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CA0HhE"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../validation.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,CAAC;AAErD,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,kBAAkB,CAAC;CAChC;AAwFD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAkIhE"}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Cratis. All rights reserved.
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
- import { causedByProperties, contextRoots, primitiveTypes, sliceTypes } from './language';
3
+ import { causedByProperties, contextRoots, identityProperties, primitiveTypes, sliceTypes } from './language';
4
4
  import { fenceMap, indentOf } from './document-context';
5
5
  import { knownEventNames, knownTypeNames, scanDocument, } from './symbols';
6
6
  function issue(severity, line, startColumn, length, message) {
@@ -134,6 +134,11 @@ export function validateLines(lines) {
134
134
  !causedByProperties.includes(segments[1])) {
135
135
  issues.push(tokenIssue('warning', index, line, path, `Unknown $context.causedBy property '${segments[1]}' — expected ${causedByProperties.join(', ')}.`));
136
136
  }
137
+ else if (segments[0] === 'identity' &&
138
+ segments.length > 1 &&
139
+ !identityProperties.includes(segments[1])) {
140
+ issues.push(tokenIssue('warning', index, line, path, `Unknown $context.identity property '${segments[1]}' — expected ${identityProperties.join(', ')}.`));
141
+ }
137
142
  }
138
143
  }
139
144
  const fenceLines = lines
@@ -1 +1 @@
1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AI,CAAC,IAAI,CAAC,GAAG,CAAC,CAC/I,CAAC;YACN,CAAC;iBAAM,IACH,QAAQ,CAAC,CAAC,CAAC,KAAK,UAAU;gBAC1B,QAAQ,CAAC,MAAM,GAAG,CAAC;gBACnB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC3C,CAAC;gBACC,MAAM,CAAC,IAAI,CACP,UAAU,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,uCAAuC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAC/I,CAAC;YACN,CAAC;QACL,CAAC;IACL,CAAC;IAED,MAAM,UAAU,GAAG,KAAK;SACnB,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;SACvC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACpD,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,2DAA2D,CAAC,CAAC,CAAC;IAClI,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -49,3 +49,25 @@ export function enclosingChain(
49
49
  }
50
50
  return chain;
51
51
  }
52
+
53
+ // Returns the full trimmed text of the nearest enclosing block opener above a
54
+ // position — the same line enclosingChain's first entry is derived from, but kept
55
+ // whole rather than reduced to its first word. Used where the construct is not
56
+ // identified by a fixed leading keyword, such as a validation rule line, whose
57
+ // first word is the property it applies to rather than "rule".
58
+ export function nearestEnclosingLine(
59
+ lines: string[],
60
+ fences: boolean[],
61
+ lineIndex: number,
62
+ indent: number,
63
+ ): string | undefined {
64
+ for (let index = lineIndex - 1; index >= 0 && indent > 0; index--) {
65
+ if (fences[index]) continue;
66
+ const line = lines[index];
67
+ if (line.trim().length === 0) continue;
68
+ if (indentOf(line) < indent) {
69
+ return line.trim();
70
+ }
71
+ }
72
+ return undefined;
73
+ }
package/keyword-docs.ts CHANGED
@@ -21,6 +21,7 @@ export const keywordDocs: Record<string, string> = {
21
21
  event: 'An event type — an immutable, past-tense fact. Properties use concepts or primitives.',
22
22
  command: 'An imperative intent. Declares authorization, validation, and what events it produces — declaratively, or via a full handler.',
23
23
  query: 'A read-side entry point mapping to a return type, with an optional description, parameters and performer.',
24
+ observable: 'Qualifies a query return type as a live read — `query <Name> => observable <ReadModel>` keeps pushing as the read model changes, instead of answering once.',
24
25
  performer: 'The code that performs a query — a `file <Path>` reference or an inline `csharp`/`sql` block. The query\'s counterpart to a command handler.',
25
26
  from: 'Fills a query parameter from the query context instead of the caller, as in `filter tenantId TenantId from $context.tenant`.',
26
27
  projection: 'Declares how events project into a read model, using the embedded Projection Declaration Language (PDL).',
@@ -33,6 +34,7 @@ export const keywordDocs: Record<string, string> = {
33
34
  produces: 'Declares the events a command emits — single, multiple, or conditional.',
34
35
  handler: 'A fully imperative command implementation — a `file <Path>` reference or an inline `csharp` block, instead of `produces`.',
35
36
  when: 'Guards a produced event or a capture append with a condition.',
37
+ rule: 'Names a predicate. Bare, it states that a constraint exists without expressing what it computes — nothing resolves the name. Optionally followed by an indented `file <Path>` reference or inline `csharp` block giving it a body.',
36
38
  require: 'A policy condition: `authenticated`, `role "..."`, or `claim "..." matches ...`.',
37
39
  authenticated: 'Requires an authenticated caller.',
38
40
  role: 'Requires the caller to have the given role.',
@@ -109,7 +111,13 @@ export const contextVariableDocs: Record<string, string> = {
109
111
  '$context.causedBy.userName': 'The user name of the identity that caused the command or query.',
110
112
  '$context.causation': 'What caused the command or query — `type`, `occurred`, `properties`.',
111
113
  '$context.causation.type': 'What caused the command or query — a command, a reactor, a schedule.',
112
- '$context.identity.id': 'The subject of the caller from the auth token.',
114
+ '$context.identity': 'The caller a decision is made about — `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`.',
115
+ '$context.identity.id': 'The identifier of the caller from the auth token.',
116
+ '$context.identity.name': 'The display name of the caller.',
117
+ '$context.identity.userName': 'The user name of the caller.',
118
+ '$context.identity.isAuthenticated': 'Whether the caller is authenticated.',
119
+ '$context.identity.roles': 'The roles the caller holds.',
120
+ '$context.identity.claims': 'The claims the caller carries — `$context.identity.claims.<name>` reads one.',
113
121
  '$env': 'An environment variable, e.g. `$env.SERVICE_NAME`.',
114
122
  '$secrets': 'An encrypted secret resolved at runtime, e.g. `$secrets.azureAdClientId` — stays symbolic in the compiled tree.',
115
123
  '$strings': 'A localized string resolved from the `.strings` file of the active locale, e.g. `$strings.invoices.title`.',
package/language.ts CHANGED
@@ -49,6 +49,7 @@ export const clauseKeywords = [
49
49
  'produces',
50
50
  'handler',
51
51
  'performer',
52
+ 'observable',
52
53
  'identifier',
53
54
  'reason',
54
55
  'from',
@@ -59,6 +60,7 @@ export const clauseKeywords = [
59
60
  'message',
60
61
  'not',
61
62
  'empty',
63
+ 'rule',
62
64
  'matches',
63
65
  'all',
64
66
  'max',
@@ -112,6 +114,10 @@ export const contextRoots = [
112
114
 
113
115
  export const causedByProperties = ['subject', 'name', 'userName'];
114
116
 
117
+ // The properties a `$context.identity.` path can name — the members of Identity. Everything after
118
+ // `claims.` is the name of a claim rather than a member, so it is never checked.
119
+ export const identityProperties = ['id', 'name', 'userName', 'isAuthenticated', 'roles', 'claims'];
120
+
115
121
  export const sliceTypes = ['StateChange', 'StateView', 'Automation', 'Translate'];
116
122
 
117
123
  export const primitiveTypes = ['Uuid', 'String', 'Int', 'Decimal', 'Bool', 'Date', 'DateTime'];
@@ -141,7 +147,7 @@ export const languageConfiguration: languages.LanguageConfiguration = {
141
147
  },
142
148
  indentationRules: {
143
149
  increaseIndentPattern:
144
- /^\s*(module|feature|slice|policy|persona|authentication|provider|event|command|query|type|screen|projection|capture|reactor|constraint|layout|template|validate|produces|handler|performer|section|concurrency|seed|for)\b.*$/,
150
+ /^\s*(module|feature|slice|policy|persona|authentication|provider|event|command|query|type|screen|projection|capture|reactor|constraint|layout|template|validate|produces|handler|performer|rule|section|concurrency|seed|for)\b.*$/,
145
151
  // Dedents are always explicit in an offside language — never auto-dedent.
146
152
  decreaseIndentPattern: /(?!)/,
147
153
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/screenplay-language",
3
- "version": "1.7.0",
3
+ "version": "2.0.0",
4
4
  "description": "Monaco language service for the Cratis Screenplay DSL — syntax highlighting, IntelliSense, hover and diagnostics for .play files",
5
5
  "license": "MIT",
6
6
  "repository": {
package/symbols.ts CHANGED
@@ -192,7 +192,7 @@ export function scanDocument(lines: string[]): DocumentSymbols {
192
192
  continue;
193
193
  }
194
194
 
195
- const queryMatch = trimmed.match(/^query\s+(\w+)\s*=>\s*([\w[\]]+)\s*$/);
195
+ const queryMatch = trimmed.match(/^query\s+(\w+)\s*=>\s*(?:observable\s+)?([\w[\]?]+)\s*$/);
196
196
  if (queryMatch) {
197
197
  // The return type names a read model, which no construct declares — only the
198
198
  // 'by' and 'filter' parameters resolve against the document's own types.
package/validation.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Cratis. All rights reserved.
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
- import { causedByProperties, contextRoots, primitiveTypes, sliceTypes } from './language';
4
+ import { causedByProperties, contextRoots, identityProperties, primitiveTypes, sliceTypes } from './language';
5
5
  import { fenceMap, indentOf } from './document-context';
6
6
  import {
7
7
  DocumentSymbols,
@@ -216,6 +216,14 @@ export function validateLines(lines: string[]): ValidationIssue[] {
216
216
  issues.push(
217
217
  tokenIssue('warning', index, line, path, `Unknown $context.causedBy property '${segments[1]}' — expected ${causedByProperties.join(', ')}.`),
218
218
  );
219
+ } else if (
220
+ segments[0] === 'identity' &&
221
+ segments.length > 1 &&
222
+ !identityProperties.includes(segments[1])
223
+ ) {
224
+ issues.push(
225
+ tokenIssue('warning', index, line, path, `Unknown $context.identity property '${segments[1]}' — expected ${identityProperties.join(', ')}.`),
226
+ );
219
227
  }
220
228
  }
221
229
  }