@cratis/screenplay-language 4.123.0 → 4.124.1

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 (402) hide show
  1. package/README.md +50 -0
  2. package/dist/bundles/TypeReferenceSymbol.js +2 -0
  3. package/dist/bundles/TypeReferenceSymbol.js.map +1 -0
  4. package/dist/bundles/_virtual/_virtual/_rolldown/runtime.js +1 -0
  5. package/dist/bundles/bmp-word-characters.js +2 -0
  6. package/dist/bundles/bmp-word-characters.js.map +1 -0
  7. package/dist/bundles/case-authoring.js +3 -0
  8. package/dist/bundles/case-authoring.js.map +1 -0
  9. package/dist/bundles/code-actions.js +2 -0
  10. package/dist/bundles/code-actions.js.map +1 -0
  11. package/dist/bundles/compiler/Authoring/QuickFixes.js +5 -0
  12. package/dist/bundles/compiler/Authoring/QuickFixes.js.map +1 -0
  13. package/dist/bundles/compiler/Dependencies/DeclaredDependencies.js +2 -0
  14. package/dist/bundles/compiler/Dependencies/DeclaredDependencies.js.map +1 -0
  15. package/dist/bundles/compiler/Dependencies/DeclaredDependencyTargets.js +2 -0
  16. package/dist/bundles/compiler/Dependencies/DeclaredDependencyTargets.js.map +1 -0
  17. package/dist/bundles/compiler/Dependencies/DependencyGraph.js +2 -0
  18. package/dist/bundles/compiler/Dependencies/DependencyGraph.js.map +1 -0
  19. package/dist/bundles/compiler/Dependencies/DependencyKind.js +2 -0
  20. package/dist/bundles/compiler/Dependencies/DependencyKind.js.map +1 -0
  21. package/dist/bundles/compiler/Dependencies/InvalidDependencyQuery.js +2 -0
  22. package/dist/bundles/compiler/Dependencies/InvalidDependencyQuery.js.map +1 -0
  23. package/dist/bundles/compiler/Dependencies/SliceReferences.js +2 -0
  24. package/dist/bundles/compiler/Dependencies/SliceReferences.js.map +1 -0
  25. package/dist/bundles/compiler/Dependencies/StronglyConnectedGroups.js +2 -0
  26. package/dist/bundles/compiler/Dependencies/StronglyConnectedGroups.js.map +1 -0
  27. package/dist/bundles/compiler/Dependencies/index.js +1 -0
  28. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js +2 -0
  29. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js.map +1 -0
  30. package/dist/bundles/compiler/Diagnostics/ProductionDestinationDiagnostics.js +2 -0
  31. package/dist/bundles/compiler/Diagnostics/ProductionDestinationDiagnostics.js.map +1 -0
  32. package/dist/bundles/compiler/Diagnostics/SourceLocation.js +2 -0
  33. package/dist/bundles/compiler/Diagnostics/SourceLocation.js.map +1 -0
  34. package/dist/bundles/compiler/Files/AuthoredOrder.js +2 -0
  35. package/dist/bundles/compiler/Files/AuthoredOrder.js.map +1 -0
  36. package/dist/bundles/compiler/Files/OrderingRoot.js +1 -0
  37. package/dist/bundles/compiler/Files/PlayApplicationAssembly.js +2 -0
  38. package/dist/bundles/compiler/Files/PlayApplicationAssembly.js.map +1 -0
  39. package/dist/bundles/compiler/Files/PlayFolderMerge.js +2 -0
  40. package/dist/bundles/compiler/Files/PlayFolderMerge.js.map +1 -0
  41. package/dist/bundles/compiler/Files/PlayImports.js +1 -0
  42. package/dist/bundles/compiler/Files/PlayPlacement.js +2 -0
  43. package/dist/bundles/compiler/Files/PlayPlacement.js.map +1 -0
  44. package/dist/bundles/compiler/Files/TimelineOrder.js +2 -0
  45. package/dist/bundles/compiler/Files/TimelineOrder.js.map +1 -0
  46. package/dist/bundles/compiler/Parsing/AuthorizeParser.js +2 -0
  47. package/dist/bundles/compiler/Parsing/AuthorizeParser.js.map +1 -0
  48. package/dist/bundles/compiler/Parsing/CaptureParser.js +2 -0
  49. package/dist/bundles/compiler/Parsing/CaptureParser.js.map +1 -0
  50. package/dist/bundles/compiler/Parsing/CodeBlockParser.js +3 -0
  51. package/dist/bundles/compiler/Parsing/CodeBlockParser.js.map +1 -0
  52. package/dist/bundles/compiler/Parsing/CommandDestinationTypes.js +2 -0
  53. package/dist/bundles/compiler/Parsing/CommandDestinationTypes.js.map +1 -0
  54. package/dist/bundles/compiler/Parsing/CommandParser.js +2 -0
  55. package/dist/bundles/compiler/Parsing/CommandParser.js.map +1 -0
  56. package/dist/bundles/compiler/Parsing/CommandReadSources.js +2 -0
  57. package/dist/bundles/compiler/Parsing/CommandReadSources.js.map +1 -0
  58. package/dist/bundles/compiler/Parsing/CommandResponseParser.js +2 -0
  59. package/dist/bundles/compiler/Parsing/CommandResponseParser.js.map +1 -0
  60. package/dist/bundles/compiler/Parsing/CommandStreamCandidates.js +2 -0
  61. package/dist/bundles/compiler/Parsing/CommandStreamCandidates.js.map +1 -0
  62. package/dist/bundles/compiler/Parsing/CompositeStreamIdValidator.js +2 -0
  63. package/dist/bundles/compiler/Parsing/CompositeStreamIdValidator.js.map +1 -0
  64. package/dist/bundles/compiler/Parsing/CompositionParser.js +2 -0
  65. package/dist/bundles/compiler/Parsing/CompositionParser.js.map +1 -0
  66. package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js +2 -0
  67. package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js.map +1 -0
  68. package/dist/bundles/compiler/Parsing/ConditionParser.js +2 -0
  69. package/dist/bundles/compiler/Parsing/ConditionParser.js.map +1 -0
  70. package/dist/bundles/compiler/Parsing/ConstraintParser.js +2 -0
  71. package/dist/bundles/compiler/Parsing/ConstraintParser.js.map +1 -0
  72. package/dist/bundles/compiler/Parsing/ConstraintPropertyValidator.js +2 -0
  73. package/dist/bundles/compiler/Parsing/ConstraintPropertyValidator.js.map +1 -0
  74. package/dist/bundles/compiler/Parsing/DeclarationParsers.js +2 -0
  75. package/dist/bundles/compiler/Parsing/DeclarationParsers.js.map +1 -0
  76. package/dist/bundles/compiler/Parsing/DependencySourceParser.js +2 -0
  77. package/dist/bundles/compiler/Parsing/DependencySourceParser.js.map +1 -0
  78. package/dist/bundles/compiler/Parsing/DependsOnParser.js +2 -0
  79. package/dist/bundles/compiler/Parsing/DependsOnParser.js.map +1 -0
  80. package/dist/bundles/compiler/Parsing/DescriptionParser.js +2 -0
  81. package/dist/bundles/compiler/Parsing/DescriptionParser.js.map +1 -0
  82. package/dist/bundles/compiler/Parsing/DocumentationParser.js +2 -0
  83. package/dist/bundles/compiler/Parsing/DocumentationParser.js.map +1 -0
  84. package/dist/bundles/compiler/Parsing/EventMetadataParser.js +2 -0
  85. package/dist/bundles/compiler/Parsing/EventMetadataParser.js.map +1 -0
  86. package/dist/bundles/compiler/Parsing/EventSourceParser.js +2 -0
  87. package/dist/bundles/compiler/Parsing/EventSourceParser.js.map +1 -0
  88. package/dist/bundles/compiler/Parsing/EventSourceValidator.js +2 -0
  89. package/dist/bundles/compiler/Parsing/EventSourceValidator.js.map +1 -0
  90. package/dist/bundles/compiler/Parsing/EventSubjectValidator.js +2 -0
  91. package/dist/bundles/compiler/Parsing/EventSubjectValidator.js.map +1 -0
  92. package/dist/bundles/compiler/Parsing/ExpressionParser.js +2 -0
  93. package/dist/bundles/compiler/Parsing/ExpressionParser.js.map +1 -0
  94. package/dist/bundles/compiler/Parsing/FeatureBody.js +2 -0
  95. package/dist/bundles/compiler/Parsing/FeatureBody.js.map +1 -0
  96. package/dist/bundles/compiler/Parsing/FileImportParser.js +2 -0
  97. package/dist/bundles/compiler/Parsing/FileImportParser.js.map +1 -0
  98. package/dist/bundles/compiler/Parsing/FileReferences.js +2 -0
  99. package/dist/bundles/compiler/Parsing/FileReferences.js.map +1 -0
  100. package/dist/bundles/compiler/Parsing/GuardedActionParser.js +2 -0
  101. package/dist/bundles/compiler/Parsing/GuardedActionParser.js.map +1 -0
  102. package/dist/bundles/compiler/Parsing/GuardedActionShadowing.js +2 -0
  103. package/dist/bundles/compiler/Parsing/GuardedActionShadowing.js.map +1 -0
  104. package/dist/bundles/compiler/Parsing/GuardedActionValidator.js +2 -0
  105. package/dist/bundles/compiler/Parsing/GuardedActionValidator.js.map +1 -0
  106. package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js +2 -0
  107. package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js.map +1 -0
  108. package/dist/bundles/compiler/Parsing/IdentityParser.js +2 -0
  109. package/dist/bundles/compiler/Parsing/IdentityParser.js.map +1 -0
  110. package/dist/bundles/compiler/Parsing/IdentityValidator.js +2 -0
  111. package/dist/bundles/compiler/Parsing/IdentityValidator.js.map +1 -0
  112. package/dist/bundles/compiler/Parsing/ImplementationParser.js +3 -0
  113. package/dist/bundles/compiler/Parsing/ImplementationParser.js.map +1 -0
  114. package/dist/bundles/compiler/Parsing/ImportDiscovery.js +1 -0
  115. package/dist/bundles/compiler/Parsing/InlineEventValidator.js +2 -0
  116. package/dist/bundles/compiler/Parsing/InlineEventValidator.js.map +1 -0
  117. package/dist/bundles/compiler/Parsing/InputUses.js +2 -0
  118. package/dist/bundles/compiler/Parsing/InputUses.js.map +1 -0
  119. package/dist/bundles/compiler/Parsing/InteractionAlternatives.js +2 -0
  120. package/dist/bundles/compiler/Parsing/InteractionAlternatives.js.map +1 -0
  121. package/dist/bundles/compiler/Parsing/LineReader.js +2 -0
  122. package/dist/bundles/compiler/Parsing/LineReader.js.map +1 -0
  123. package/dist/bundles/compiler/Parsing/LineText.js +2 -0
  124. package/dist/bundles/compiler/Parsing/LineText.js.map +1 -0
  125. package/dist/bundles/compiler/Parsing/ModuleBody.js +2 -0
  126. package/dist/bundles/compiler/Parsing/ModuleBody.js.map +1 -0
  127. package/dist/bundles/compiler/Parsing/OperationParser.js +2 -0
  128. package/dist/bundles/compiler/Parsing/OperationParser.js.map +1 -0
  129. package/dist/bundles/compiler/Parsing/OperationValidator.js +2 -0
  130. package/dist/bundles/compiler/Parsing/OperationValidator.js.map +1 -0
  131. package/dist/bundles/compiler/Parsing/ParserContext.js +2 -0
  132. package/dist/bundles/compiler/Parsing/ParserContext.js.map +1 -0
  133. package/dist/bundles/compiler/Parsing/PersonaCallerValidator.js +2 -0
  134. package/dist/bundles/compiler/Parsing/PersonaCallerValidator.js.map +1 -0
  135. package/dist/bundles/compiler/Parsing/PolicyParser.js +2 -0
  136. package/dist/bundles/compiler/Parsing/PolicyParser.js.map +1 -0
  137. package/dist/bundles/compiler/Parsing/ProducesParser.js +2 -0
  138. package/dist/bundles/compiler/Parsing/ProducesParser.js.map +1 -0
  139. package/dist/bundles/compiler/Parsing/ProjectionExpressionParser.js +2 -0
  140. package/dist/bundles/compiler/Parsing/ProjectionExpressionParser.js.map +1 -0
  141. package/dist/bundles/compiler/Parsing/ProjectionParser.js +2 -0
  142. package/dist/bundles/compiler/Parsing/ProjectionParser.js.map +1 -0
  143. package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js +2 -0
  144. package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js.map +1 -0
  145. package/dist/bundles/compiler/Parsing/PropertyLineParser.js +2 -0
  146. package/dist/bundles/compiler/Parsing/PropertyLineParser.js.map +1 -0
  147. package/dist/bundles/compiler/Parsing/PublicEventMetadataValidator.js +2 -0
  148. package/dist/bundles/compiler/Parsing/PublicEventMetadataValidator.js.map +1 -0
  149. package/dist/bundles/compiler/Parsing/PublicEventUsageCollector.js +2 -0
  150. package/dist/bundles/compiler/Parsing/PublicEventUsageCollector.js.map +1 -0
  151. package/dist/bundles/compiler/Parsing/PublicEventUsageValidator.js +2 -0
  152. package/dist/bundles/compiler/Parsing/PublicEventUsageValidator.js.map +1 -0
  153. package/dist/bundles/compiler/Parsing/PurposeParser.js +2 -0
  154. package/dist/bundles/compiler/Parsing/PurposeParser.js.map +1 -0
  155. package/dist/bundles/compiler/Parsing/PurposeValidator.js +2 -0
  156. package/dist/bundles/compiler/Parsing/PurposeValidator.js.map +1 -0
  157. package/dist/bundles/compiler/Parsing/QueryParser.js +2 -0
  158. package/dist/bundles/compiler/Parsing/QueryParser.js.map +1 -0
  159. package/dist/bundles/compiler/Parsing/ReactionIdentityParser.js +2 -0
  160. package/dist/bundles/compiler/Parsing/ReactionIdentityParser.js.map +1 -0
  161. package/dist/bundles/compiler/Parsing/ReactionParser.js +2 -0
  162. package/dist/bundles/compiler/Parsing/ReactionParser.js.map +1 -0
  163. package/dist/bundles/compiler/Parsing/ReactionRefusalValidator.js +2 -0
  164. package/dist/bundles/compiler/Parsing/ReactionRefusalValidator.js.map +1 -0
  165. package/dist/bundles/compiler/Parsing/RedeliveryValues.js +2 -0
  166. package/dist/bundles/compiler/Parsing/RedeliveryValues.js.map +1 -0
  167. package/dist/bundles/compiler/Parsing/RefusalDeclarations.js +2 -0
  168. package/dist/bundles/compiler/Parsing/RefusalDeclarations.js.map +1 -0
  169. package/dist/bundles/compiler/Parsing/RefusalValueWalker.js +2 -0
  170. package/dist/bundles/compiler/Parsing/RefusalValueWalker.js.map +1 -0
  171. package/dist/bundles/compiler/Parsing/ResponseDateValues.js +2 -0
  172. package/dist/bundles/compiler/Parsing/ResponseDateValues.js.map +1 -0
  173. package/dist/bundles/compiler/Parsing/ResponseValidator.js +2 -0
  174. package/dist/bundles/compiler/Parsing/ResponseValidator.js.map +1 -0
  175. package/dist/bundles/compiler/Parsing/ScreenParser.js +2 -0
  176. package/dist/bundles/compiler/Parsing/ScreenParser.js.map +1 -0
  177. package/dist/bundles/compiler/Parsing/ScreenplayParser.js +2 -0
  178. package/dist/bundles/compiler/Parsing/ScreenplayParser.js.map +1 -0
  179. package/dist/bundles/compiler/Parsing/SeedParser.js +2 -0
  180. package/dist/bundles/compiler/Parsing/SeedParser.js.map +1 -0
  181. package/dist/bundles/compiler/Parsing/SliceParser.js +2 -0
  182. package/dist/bundles/compiler/Parsing/SliceParser.js.map +1 -0
  183. package/dist/bundles/compiler/Parsing/SourceLine.js +2 -0
  184. package/dist/bundles/compiler/Parsing/SourceLine.js.map +1 -0
  185. package/dist/bundles/compiler/Parsing/SourceLineSplitter.js +3 -0
  186. package/dist/bundles/compiler/Parsing/SourceLineSplitter.js.map +1 -0
  187. package/dist/bundles/compiler/Parsing/SourceOptionsParser.js +2 -0
  188. package/dist/bundles/compiler/Parsing/SourceOptionsParser.js.map +1 -0
  189. package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js +2 -0
  190. package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js.map +1 -0
  191. package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js +2 -0
  192. package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js.map +1 -0
  193. package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js +2 -0
  194. package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js.map +1 -0
  195. package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js +2 -0
  196. package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js.map +1 -0
  197. package/dist/bundles/compiler/Parsing/SpecificationParser.js +2 -0
  198. package/dist/bundles/compiler/Parsing/SpecificationParser.js.map +1 -0
  199. package/dist/bundles/compiler/Parsing/SpecificationRedeliveryValidator.js +2 -0
  200. package/dist/bundles/compiler/Parsing/SpecificationRedeliveryValidator.js.map +1 -0
  201. package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js +2 -0
  202. package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js.map +1 -0
  203. package/dist/bundles/compiler/Parsing/SpecificationRouteComparison.js +2 -0
  204. package/dist/bundles/compiler/Parsing/SpecificationRouteComparison.js.map +1 -0
  205. package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js +2 -0
  206. package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js.map +1 -0
  207. package/dist/bundles/compiler/Parsing/StructuredValueParser.js +3 -0
  208. package/dist/bundles/compiler/Parsing/StructuredValueParser.js.map +1 -0
  209. package/dist/bundles/compiler/Parsing/TriggerDataParser.js +2 -0
  210. package/dist/bundles/compiler/Parsing/TriggerDataParser.js.map +1 -0
  211. package/dist/bundles/compiler/Parsing/UiBindingParser.js +2 -0
  212. package/dist/bundles/compiler/Parsing/UiBindingParser.js.map +1 -0
  213. package/dist/bundles/compiler/ScreenplayCompiler.js +2 -0
  214. package/dist/bundles/compiler/ScreenplayCompiler.js.map +1 -0
  215. package/dist/bundles/compiler/Syntax/AuthoringProductionResolver.js +2 -0
  216. package/dist/bundles/compiler/Syntax/AuthoringProductionResolver.js.map +1 -0
  217. package/dist/bundles/compiler/Syntax/CaptureEventsSource.js +2 -0
  218. package/dist/bundles/compiler/Syntax/CaptureEventsSource.js.map +1 -0
  219. package/dist/bundles/compiler/Syntax/DependencySources.js +2 -0
  220. package/dist/bundles/compiler/Syntax/DependencySources.js.map +1 -0
  221. package/dist/bundles/compiler/Syntax/EventDeclarations.js +2 -0
  222. package/dist/bundles/compiler/Syntax/EventDeclarations.js.map +1 -0
  223. package/dist/bundles/compiler/Syntax/EventSourceCatalog.js +2 -0
  224. package/dist/bundles/compiler/Syntax/EventSourceCatalog.js.map +1 -0
  225. package/dist/bundles/compiler/Syntax/EventSourceReadConfidence.js +2 -0
  226. package/dist/bundles/compiler/Syntax/EventSourceReadConfidence.js.map +1 -0
  227. package/dist/bundles/compiler/Syntax/ExactMathFacts.js +2 -0
  228. package/dist/bundles/compiler/Syntax/ExactMathFacts.js.map +1 -0
  229. package/dist/bundles/compiler/Syntax/ExactNumber.js +2 -0
  230. package/dist/bundles/compiler/Syntax/ExactNumber.js.map +1 -0
  231. package/dist/bundles/compiler/Syntax/InvalidSyntaxJson.js +2 -0
  232. package/dist/bundles/compiler/Syntax/InvalidSyntaxJson.js.map +1 -0
  233. package/dist/bundles/compiler/Syntax/LegacyWireProjection.js +2 -0
  234. package/dist/bundles/compiler/Syntax/LegacyWireProjection.js.map +1 -0
  235. package/dist/bundles/compiler/Syntax/Operations.js +2 -0
  236. package/dist/bundles/compiler/Syntax/Operations.js.map +1 -0
  237. package/dist/bundles/compiler/Syntax/PersonaCallers.js +2 -0
  238. package/dist/bundles/compiler/Syntax/PersonaCallers.js.map +1 -0
  239. package/dist/bundles/compiler/Syntax/ProductionDestinations.js +2 -0
  240. package/dist/bundles/compiler/Syntax/ProductionDestinations.js.map +1 -0
  241. package/dist/bundles/compiler/Syntax/PublicEventInvariants.js +2 -0
  242. package/dist/bundles/compiler/Syntax/PublicEventInvariants.js.map +1 -0
  243. package/dist/bundles/compiler/Syntax/ScreenplaySyntaxWalker.js +2 -0
  244. package/dist/bundles/compiler/Syntax/ScreenplaySyntaxWalker.js.map +1 -0
  245. package/dist/bundles/compiler/Syntax/SourceOptions.js +2 -0
  246. package/dist/bundles/compiler/Syntax/SourceOptions.js.map +1 -0
  247. package/dist/bundles/compiler/Syntax/SpecificationCaseOrigin.js +2 -0
  248. package/dist/bundles/compiler/Syntax/SpecificationCaseOrigin.js.map +1 -0
  249. package/dist/bundles/compiler/Syntax/StreamIdFormatter.js +2 -0
  250. package/dist/bundles/compiler/Syntax/StreamIdFormatter.js.map +1 -0
  251. package/dist/bundles/compiler/Syntax/StrictSyntaxJson.js +1 -0
  252. package/dist/bundles/compiler/Syntax/Structure.js +2 -0
  253. package/dist/bundles/compiler/Syntax/Structure.js.map +1 -0
  254. package/dist/bundles/compiler/Syntax/SyntaxCollections.js +2 -0
  255. package/dist/bundles/compiler/Syntax/SyntaxCollections.js.map +1 -0
  256. package/dist/bundles/compiler/Syntax/SyntaxInvariants.js +2 -0
  257. package/dist/bundles/compiler/Syntax/SyntaxInvariants.js.map +1 -0
  258. package/dist/bundles/compiler/Syntax/SyntaxJson.js +2 -0
  259. package/dist/bundles/compiler/Syntax/SyntaxJson.js.map +1 -0
  260. package/dist/bundles/compiler/Syntax/SyntaxMemberContracts.js +2 -0
  261. package/dist/bundles/compiler/Syntax/SyntaxMemberContracts.js.map +1 -0
  262. package/dist/bundles/compiler/Syntax/index.js +1 -0
  263. package/dist/bundles/compiler/Text/ImplementationHintText.js +2 -0
  264. package/dist/bundles/compiler/Text/ImplementationHintText.js.map +1 -0
  265. package/dist/bundles/compiler/Text/ReservedWords.js +2 -0
  266. package/dist/bundles/compiler/Text/ReservedWords.js.map +1 -0
  267. package/dist/bundles/compiler/Text/SourceStreamNames.js +2 -0
  268. package/dist/bundles/compiler/Text/SourceStreamNames.js.map +1 -0
  269. package/dist/bundles/compiler/Text/StringLiteral.js +3 -0
  270. package/dist/bundles/compiler/Text/StringLiteral.js.map +1 -0
  271. package/dist/bundles/compiler/Text/ordinalIgnoreCaseKey.js +2 -0
  272. package/dist/bundles/compiler/Text/ordinalIgnoreCaseKey.js.map +1 -0
  273. package/dist/bundles/compiler/Text/patterns.js +2 -0
  274. package/dist/bundles/compiler/Text/patterns.js.map +1 -0
  275. package/dist/bundles/compiler/index.js +1 -0
  276. package/dist/bundles/completion-items.js +21 -0
  277. package/dist/bundles/completion-items.js.map +1 -0
  278. package/dist/bundles/completion-planner.js +5 -0
  279. package/dist/bundles/completion-planner.js.map +1 -0
  280. package/dist/bundles/completions.js +2 -0
  281. package/dist/bundles/completions.js.map +1 -0
  282. package/dist/bundles/dependency-completions.js +3 -0
  283. package/dist/bundles/dependency-completions.js.map +1 -0
  284. package/dist/bundles/dependency-target-analysis.js +2 -0
  285. package/dist/bundles/dependency-target-analysis.js.map +1 -0
  286. package/dist/bundles/diagnostic-codes.js +2 -0
  287. package/dist/bundles/diagnostic-codes.js.map +1 -0
  288. package/dist/bundles/diagnostics.js +2 -0
  289. package/dist/bundles/diagnostics.js.map +1 -0
  290. package/dist/bundles/document-context.js +2 -0
  291. package/dist/bundles/document-context.js.map +1 -0
  292. package/dist/bundles/documentation-item.js +2 -0
  293. package/dist/bundles/documentation-item.js.map +1 -0
  294. package/dist/bundles/event-analysis-source.js +2 -0
  295. package/dist/bundles/event-analysis-source.js.map +1 -0
  296. package/dist/bundles/event-context-catalog.js +2 -0
  297. package/dist/bundles/event-context-catalog.js.map +1 -0
  298. package/dist/bundles/event-context.js +4 -0
  299. package/dist/bundles/event-context.js.map +1 -0
  300. package/dist/bundles/event-source-authoring.js +13 -0
  301. package/dist/bundles/event-source-authoring.js.map +1 -0
  302. package/dist/bundles/example-analysis.js +3 -0
  303. package/dist/bundles/example-analysis.js.map +1 -0
  304. package/dist/bundles/example-authoring.js +3 -0
  305. package/dist/bundles/example-authoring.js.map +1 -0
  306. package/dist/bundles/example-declaration-items.js +2 -0
  307. package/dist/bundles/example-declaration-items.js.map +1 -0
  308. package/dist/bundles/example-values.js +2 -0
  309. package/dist/bundles/example-values.js.map +1 -0
  310. package/dist/bundles/file-imports.js +2 -0
  311. package/dist/bundles/file-imports.js.map +1 -0
  312. package/dist/bundles/file-references.js +2 -0
  313. package/dist/bundles/file-references.js.map +1 -0
  314. package/dist/bundles/hover-content.js +6 -0
  315. package/dist/bundles/hover-content.js.map +1 -0
  316. package/dist/bundles/hover.js +2 -0
  317. package/dist/bundles/hover.js.map +1 -0
  318. package/dist/bundles/index.js +2 -104
  319. package/dist/bundles/index.js.map +1 -7
  320. package/dist/bundles/inlay-hints.js +2 -0
  321. package/dist/bundles/inlay-hints.js.map +1 -0
  322. package/dist/bundles/inline-completions.js +2 -0
  323. package/dist/bundles/inline-completions.js.map +1 -0
  324. package/dist/bundles/inline-event-validation.js +2 -0
  325. package/dist/bundles/inline-event-validation.js.map +1 -0
  326. package/dist/bundles/keyword-docs.js +2 -0
  327. package/dist/bundles/keyword-docs.js.map +1 -0
  328. package/dist/bundles/language.js +2 -0
  329. package/dist/bundles/language.js.map +1 -0
  330. package/dist/bundles/named-rule-context.js +2 -0
  331. package/dist/bundles/named-rule-context.js.map +1 -0
  332. package/dist/bundles/operation-authoring.js +7 -0
  333. package/dist/bundles/operation-authoring.js.map +1 -0
  334. package/dist/bundles/persona-analysis.js +2 -0
  335. package/dist/bundles/persona-analysis.js.map +1 -0
  336. package/dist/bundles/production-destinations.js +2 -0
  337. package/dist/bundles/production-destinations.js.map +1 -0
  338. package/dist/bundles/purpose-items.js +2 -0
  339. package/dist/bundles/purpose-items.js.map +1 -0
  340. package/dist/bundles/reaction-authoring.js +5 -0
  341. package/dist/bundles/reaction-authoring.js.map +1 -0
  342. package/dist/bundles/refusal-context.js +2 -0
  343. package/dist/bundles/refusal-context.js.map +1 -0
  344. package/dist/bundles/response-analysis.js +7 -0
  345. package/dist/bundles/response-analysis.js.map +1 -0
  346. package/dist/bundles/response-completions.js +2 -0
  347. package/dist/bundles/response-completions.js.map +1 -0
  348. package/dist/bundles/response-tokens.js +3 -0
  349. package/dist/bundles/response-tokens.js.map +1 -0
  350. package/dist/bundles/scope-items.js +18 -0
  351. package/dist/bundles/scope-items.js.map +1 -0
  352. package/dist/bundles/structure-completions.js +7 -0
  353. package/dist/bundles/structure-completions.js.map +1 -0
  354. package/dist/bundles/sub-language-registry.js +2 -0
  355. package/dist/bundles/sub-language-registry.js.map +1 -0
  356. package/dist/bundles/sub-languages/capture/CompletionProvider.js +2 -0
  357. package/dist/bundles/sub-languages/capture/CompletionProvider.js.map +1 -0
  358. package/dist/bundles/sub-languages/capture/HoverProvider.js +60 -0
  359. package/dist/bundles/sub-languages/capture/HoverProvider.js.map +1 -0
  360. package/dist/bundles/sub-languages/capture/Validator.js +2 -0
  361. package/dist/bundles/sub-languages/capture/Validator.js.map +1 -0
  362. package/dist/bundles/sub-languages/capture/index.js +2 -40
  363. package/dist/bundles/sub-languages/capture/index.js.map +1 -7
  364. package/dist/bundles/sub-languages/capture/language.js +2 -0
  365. package/dist/bundles/sub-languages/capture/language.js.map +1 -0
  366. package/dist/bundles/sub-languages/cdl.js +2 -0
  367. package/dist/bundles/sub-languages/cdl.js.map +1 -0
  368. package/dist/bundles/sub-languages/pdl.js +2 -0
  369. package/dist/bundles/sub-languages/pdl.js.map +1 -0
  370. package/dist/bundles/sub-languages/projection/CodeActionProvider.js +2 -0
  371. package/dist/bundles/sub-languages/projection/CodeActionProvider.js.map +1 -0
  372. package/dist/bundles/sub-languages/projection/CompletionProvider.js +2 -0
  373. package/dist/bundles/sub-languages/projection/CompletionProvider.js.map +1 -0
  374. package/dist/bundles/sub-languages/projection/HoverProvider.js +43 -0
  375. package/dist/bundles/sub-languages/projection/HoverProvider.js.map +1 -0
  376. package/dist/bundles/sub-languages/projection/Validator.js +5 -0
  377. package/dist/bundles/sub-languages/projection/Validator.js.map +1 -0
  378. package/dist/bundles/sub-languages/projection/index.js +3 -75
  379. package/dist/bundles/sub-languages/projection/index.js.map +1 -7
  380. package/dist/bundles/sub-languages/projection/language.js +2 -0
  381. package/dist/bundles/sub-languages/projection/language.js.map +1 -0
  382. package/dist/bundles/symbols.js +3 -0
  383. package/dist/bundles/symbols.js.map +1 -0
  384. package/dist/bundles/themes/screenplay-dark.js +2 -0
  385. package/dist/bundles/themes/screenplay-dark.js.map +1 -0
  386. package/dist/bundles/themes/screenplay-light.js +2 -0
  387. package/dist/bundles/themes/screenplay-light.js.map +1 -0
  388. package/dist/bundles/tokens.js +2 -0
  389. package/dist/bundles/tokens.js.map +1 -0
  390. package/dist/bundles/validation.js +3 -0
  391. package/dist/bundles/validation.js.map +1 -0
  392. package/dist/completion-items.d.ts.map +1 -1
  393. package/dist/diagnostic-codes.d.ts +6 -0
  394. package/dist/diagnostic-codes.d.ts.map +1 -1
  395. package/dist/keyword-docs.d.ts.map +1 -1
  396. package/dist/language.d.ts.map +1 -1
  397. package/dist/tokens.d.ts.map +1 -1
  398. package/package.json +4 -3
  399. package/dist/bundles/chunk-4CLLEMBX.js +0 -42
  400. package/dist/bundles/chunk-4CLLEMBX.js.map +0 -7
  401. package/dist/bundles/chunk-AYDF3IFZ.js +0 -2
  402. package/dist/bundles/chunk-AYDF3IFZ.js.map +0 -7
@@ -0,0 +1 @@
1
+ import{DiagnosticCodes as e}from"./Diagnostics/DiagnosticCodes.js";import"./Text/patterns.js";import{eventDeclarations as t}from"./Syntax/EventDeclarations.js";import{operationDeclarations as n}from"./Syntax/Operations.js";import{AuthoringProductionResolver as r}from"./Syntax/AuthoringProductionResolver.js";import"./Syntax/DependencySources.js";import{ScreenplaySyntaxWalker as i}from"./Syntax/ScreenplaySyntaxWalker.js";import{isExactNumberToken as a,parseExactNumber as o}from"./Syntax/ExactNumber.js";import{unescapeString as s}from"./Text/StringLiteral.js";import{EventSourceCatalog as c}from"./Syntax/EventSourceCatalog.js";import{implicitDestination as l,requiresExplicitDestinations as u}from"./Syntax/ProductionDestinations.js";import{InvalidExactNumber as d,canonicalExactText as f,exactIsIntegral as p}from"./Syntax/ExactMathFacts.js";import{synthesizePersonaCaller as m}from"./Syntax/PersonaCallers.js";import"./Syntax/SpecificationCaseOrigin.js";import{sourceLocation as h}from"./Diagnostics/SourceLocation.js";import"./Parsing/SpecificationCommandExamples.js";import{DeclaredDependencyTargets as g}from"./Dependencies/DeclaredDependencyTargets.js";import{describePlacement as _,documentPlacement as v,isDocumentPlacement as y}from"./Files/PlayPlacement.js";import"./Syntax/InvalidSyntaxJson.js";import"./Syntax/SourceOptions.js";import{isSourceStreamName as b,isSourceStreamTypeName as x,sourceStreamPattern as S}from"./Text/SourceStreamNames.js";import{sliceTypes as C}from"./Syntax/Structure.js";import{consumedEvents as w,eventsSourceKind as T,fromSetting as E,isEventsSource as D}from"./Syntax/CaptureEventsSource.js";import{eventBodyReservedWords as O}from"./Text/ReservedWords.js";import"./Files/AuthoredOrder.js";import{dependencyKinds as k}from"./Dependencies/DependencyKind.js";import{InvalidDependencyQuery as A}from"./Dependencies/InvalidDependencyQuery.js";import{SliceReferenceCollector as j,buildingReadModelReferences as M,referenceClassifications as N,sliceReferences as P}from"./Dependencies/SliceReferences.js";import{stronglyConnectedGroups as F}from"./Dependencies/StronglyConnectedGroups.js";import{DependencyGraph as I}from"./Dependencies/DependencyGraph.js";import{streamIdFailureMessage as L,tryFormatInteger as R,tryFormatText as z,tryFormatUuidText as B}from"./Syntax/StreamIdFormatter.js";import{parseForAuthoring as V}from"./ScreenplayCompiler.js";import{applyQuickFixEdits as H,isQuickFixDiagnostic as U,legacyOptionalTypeLength as W,prepareQuickFixes as G}from"./Authoring/QuickFixes.js";import"./Dependencies/index.js";import{EventSourceReadConfidence as K}from"./Syntax/EventSourceReadConfidence.js";import"./Syntax/SyntaxJson.js";import"./Syntax/index.js";import"./Files/OrderingRoot.js";import{mergeDocuments as q}from"./Files/PlayFolderMerge.js";import"./Files/PlayImports.js";import{parsePlacedDocuments as J}from"./Files/PlayApplicationAssembly.js";export{r as AuthoringProductionResolver,g as DeclaredDependencyTargets,I as DependencyGraph,e as DiagnosticCodes,c as EventSourceCatalog,K as EventSourceReadConfidence,A as InvalidDependencyQuery,d as InvalidExactNumber,i as ScreenplaySyntaxWalker,j as SliceReferenceCollector,H as applyQuickFixEdits,M as buildingReadModelReferences,f as canonicalExactText,w as consumedEvents,k as dependencyKinds,_ as describePlacement,v as documentPlacement,O as eventBodyReservedWords,t as eventDeclarations,T as eventsSourceKind,p as exactIsIntegral,E as fromSetting,l as implicitDestination,y as isDocumentPlacement,D as isEventsSource,a as isExactNumberToken,U as isQuickFixDiagnostic,b as isSourceStreamName,x as isSourceStreamTypeName,W as legacyOptionalTypeLength,q as mergeDocuments,n as operationDeclarations,o as parseExactNumber,V as parseForAuthoring,J as parsePlacedDocuments,G as prepareQuickFixes,N as referenceClassifications,u as requiresExplicitDestinations,P as sliceReferences,C as sliceTypes,h as sourceLocation,S as sourceStreamPattern,L as streamIdFailureMessage,F as stronglyConnectedGroups,m as synthesizePersonaCaller,R as tryFormatInteger,z as tryFormatText,B as tryFormatUuidText,s as unescapeString};
@@ -0,0 +1,21 @@
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{identityProperties as e}from"./language.js";import{documentationItem as t}from"./documentation-item.js";import{purposeReferenceItem as n}from"./purpose-items.js";import{eventContextPaths as r}from"./event-context-catalog.js";import"./event-context.js";import{exampleDeclarationItems as i}from"./example-declaration-items.js";import"./scope-items.js";const a=[{label:`optional`,insertText:`optional`,documentation:`Allows the complete value, including a collection, to be absent.`}],fenced=e=>`\`\`\`${e}\n\${1}\n\`\`\``,o=[{label:`description`,insertText:'description "${1:caller details}"',documentation:`Describes the caller metadata.`},{label:`detail from claim`,insertText:'${1:detail} ${2:Type} from claim "${3:claim}"',documentation:`One typed detail sourced from a token claim.`},{label:`detail from query`,insertText:"${1:detail} ${2:Type} from query ${3:Query} by \\$identity.id",documentation:`A keyed, single-result query authorized without additional caller details.`},{label:`detail from code`,insertText:"${1:detail} ${2:Type}\n ```csharp\n ${3:return value;}\n ```",documentation:`An opaque inline source; authoring metadata, not executable.`},{label:`detail from file`,insertText:"${1:detail} ${2:Type}\n file ${3:Path}",documentation:`One file source; no refresh or cache directives.`}];function contextVariableEntries(t){let n=[...new Map((t.identityDetails??[]).map(e=>[e.name,e])).values()];return[...U,...n.filter(t=>!e.includes(t.name)).map(e=>({label:`$identity.${e.name}`,insertText:`\\$identity.${e.name}`,detail:e.type,documentation:`Declared caller detail. Authoring metadata only; executable reads report PLAY0268 until admitted (#600).`}))]}const s=[{label:`identity`,insertText:'identity\n ${1:detail} ${2:Type} from claim "${3:claim}"',documentation:`Typed additional caller details; authoring metadata only, at most one block per application.`},{label:`purpose`,insertText:'purpose ${1:Name}\n description "${2:processing intent}"\n basis ${3|consent,contract,legalObligation,vitalInterests,publicTask,legitimateInterests|}',documentation:`Report-only processing metadata. Not legal advice; referenced by module, feature and slice.`},...i,{label:`eventsource`,insertText:"eventsource ${1:Name}\n identifier ${2:Type}\n stream ${3:Name}",documentation:`Application-owned source with nested streams, admitted by ESM v8. Pin the stored name before renaming a source with stored events; Default is reserved.`},{label:`system`,insertText:'system ${1:Name}\n description "${2:external system}"',documentation:`Application-scoped external system; not admitted by any supported executable model (ESM) version yet.`},{label:`import`,insertText:"import ${1:Module}.${2:Type}",documentation:`Imports a type from another module by its qualified name.`},{label:`import from`,insertText:'import ${1:Module}.${2:Event} from "${3:origin}"',documentation:`Imports a public event contract with a nonblank opaque origin, not a file path. An import has no local shape, so executable binding still refuses it with PLAY0268.`},{label:`import "…"`,insertText:'import "${1:**/*.play}"',documentation:"Imports other `.play` files by path or glob, relative to this file's folder, as whole documents of the application."},{label:`concept`,insertText:"concept ${1:Name} : ${2|Uuid,String,Int,Decimal,Bool,Date,DateTime|}",documentation:`Declares a formalized value type wrapping a primitive.`},{label:`concept (enum)`,insertText:"concept ${1:Name} : Enum\n ${2:value}",documentation:`Declares an enumeration concept with a fixed set of values.`},{label:`concept (pii with reason)`,insertText:'concept ${1:Name} : ${2|String,Uuid,Int,Decimal,Bool,Date,DateTime|} pii\n pii reason "${3:why this value is personal data}"',documentation:`Declares a personal-data concept together with the reason it is personal data.`},{label:`type`,insertText:"type ${1:Name}\n ${2:property} ${3:Type}",documentation:`Declares a composite value type — a named shape built from several properties.`},{label:`policy`,insertText:"policy ${1:Name}\n require ${2:authenticated}",documentation:`Declares a named authorization rule for commands and queries.`},{label:`module`,insertText:`module \${1:Name}
2
+ `,documentation:`Declares the top-level namespace — maps to a bounded context.`},{label:`domain`,insertText:"domain ${1:Name}",documentation:`The domain the file belongs to — optional, at most one per file, before everything else.`},{label:`persona`,insertText:'persona ${1:Name}\n description "${2:who they are}"',documentation:`A named role interacting with the application, with the policies it holds.`},{label:`authentication`,insertText:"authentication\n provider ${1:Name}\n ${2:setting} ${3:value}",documentation:`Declares the identity providers of the application — at most one block per file.`},{label:`seed`,insertText:`seed
3
+ for \${1:EventSourceId}
4
+ \${2:EventType}`,documentation:`Declares events to seed into the event store per event source id.`},{label:`layout`,insertText:"layout ${1:Name}\n ${2:slot}",documentation:`Declares the application shell with named slots.`},{label:`theme`,insertText:"theme ${1:Name}\n compatible with ${2:Package}",documentation:`Declares a theme and the component packages it is compatible with.`},{label:`ui profile`,insertText:"ui profile ${1:Name}\n target platform ${2:web}\n layout ${3:Layout}\n theme ${4:Theme}",documentation:`Binds a target platform and size to a layout, theme and component packages.`},{label:`behavior`,insertText:"behavior ${1:Name}\n on ${2:click}\n ${3:execute command}",documentation:"A named interaction wiring, attached to a screen, form or dialog with `uses`."},{label:`trigger`,insertText:"trigger ${1:Name}\n ${2:property} ${3:Type}",documentation:`Declares an integration signal a reaction can run on.`}],c=[{label:`uses`,insertText:"uses ${1:System}",documentation:`Exactly one application-scoped external system.`},{label:`description`,insertText:'description "${1:intent}"',documentation:`Describes operation intent, without requiring code.`},{label:`input`,insertText:"${1:input} ${2:Type}",documentation:`Typed operation input; no identifier or generated modifier.`},{label:`execute`,insertText:`execute
5
+ description "\${1:effect}"`,documentation:`Optional execution intent; not admitted by any supported executable model (ESM) version yet.`},{label:`compensate`,insertText:`compensate
6
+ description "\${1:undo intent}"`,documentation:`Optional compensation intent; not admitted by any supported executable model (ESM) version yet.`}],l=[{label:`hint`,insertText:'hint "${1:implementation guidance}"',documentation:`Ordered authoring guidance; not an executable implementation role.`},{label:`file`,insertText:"file ${1:Path}",documentation:`Selects the phase’s sole source attachment.`},...[`csharp`,`typescript`,`react`,`html`,`sql`].map(e=>({label:e,insertText:fenced(e),documentation:`Selects the phase’s sole inline source; not admitted by any supported executable model (ESM) version yet.`}))],u=[{label:`description`,insertText:'description "${1:phase intent}"',documentation:`A description-only phase is valid, pending intent.`},{label:`implementation`,insertText:`implementation
7
+ hint "\${1:guidance}"`,documentation:`Hints with optional source; phase owns File/Code, wrapper owns hints only.`},...l.filter(e=>e.label!==`hint`)],d=[{label:`description`,insertText:'description "${1:what this value represents}"',documentation:`Report-only authoring description; not a validation or compliance note.`},{label:`file`,insertText:"file ${1:Path}",documentation:`Names the repository relative file this declaration is realized by, so the document can be navigated back to the code.`},{label:`pii reason`,insertText:'pii reason "${1:why this value is personal data}"',documentation:`A free-text concept note, not a lawful basis.`},{label:`secret reason`,insertText:'secret reason "${1:why this value is an operational secret}"',documentation:`Records why the secret marker applies.`},{label:`secret scope`,insertText:"secret scope ${1|subject,namespace,global|}",documentation:`Explicit encryption scope; omitted scope keeps Chronicle’s Subject default.`},{label:`pii special`,insertText:"pii special ${1|racialOrEthnicOrigin,politicalOpinions,religiousOrPhilosophicalBeliefs,tradeUnionMembership,genetic,biometric,health,sexLifeOrSexualOrientation|}",documentation:`GDPR Art. 9(1) special category of personal data.`},{label:`pii criminal`,insertText:`pii criminal`,documentation:`Personal data relating to criminal convictions and offenses (GDPR Art. 10).`},{label:`validate`,insertText:'validate\n ${1:not empty} message "${2:message}"',documentation:`Validation rules that travel with the value everywhere it appears.`}],f=[{label:`file`,insertText:"file ${1:Path}",documentation:`Names the repository relative file this declaration is realized by, so the document can be navigated back to the code.`},{label:`description`,insertText:'description "${1:what this shape represents}"',documentation:`A human-readable description of the type.`},{label:`property`,insertText:"${1:property} ${2:Type}",documentation:`A property of the type — a name and a type reference.`}],p=[n,t,...i,{label:`operation`,insertText:"operation ${1:Name}\n uses ${2:System}\n ${3:input} ${4:Type}",documentation:`Reusable slice-owned operation intent; not admitted by any supported executable model (ESM) version yet.`},{label:`file`,insertText:"file ${1:Path}",documentation:`Names the repository relative file this declaration is realized by, so the document can be navigated back to the code.`},{label:`public event`,insertText:"public event ${1:Name}\n ${2:property} ${3:Type}",documentation:`Declares a public event: a contract this application publishes. Admitted by ESM v9; an outbound Translate slice produces it through a projection that targets it.`},{label:`event from`,insertText:'event ${1:Name} from "${2:origin}"\n ${3:property} ${4:Type}',documentation:`An event with an opaque origin naming the application that owns it, not a path or declaration reference. It is a public event admitted by ESM v9; consume it with a capture over source events.`},{label:`direction`,insertText:"direction ${1|inbound,outbound|}",documentation:`Translate direction, inbound or outbound, admitted by ESM v9. No transport or delivery guarantee is implied.`},{label:`event`,insertText:"event ${1:Name}\n ${2:property} ${3:Type}",documentation:`Declares an event type — an immutable, past-tense fact.`},{label:`event generation`,insertText:"event ${1:Name} generation ${2:2}\n ${3:property} ${4:Type}",documentation:`Declares a complete numbered event generation; start at 1 and do not skip a number.`},{label:`command`,insertText:"command ${1:Name}\n ${2:property} ${3:Type}",documentation:`Declares a command — an imperative intent that produces events.`},{label:`query`,insertText:"query ${1:Name} => ${2:ReadModel}",documentation:`Declares a read-side entry point mapping to a return type.`},{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.`},{label:`readmodel`,insertText:"readmodel ${1:Name}\n ${2:property} ${3:Type}",documentation:`Declares the shape of a read model — its properties — that a projection, reducer or query fills and returns.`},{label:`reducer`,insertText:"reducer ${1:Name} => ${2:ReadModel}\n on ${3:EventType}\n ```csharp\n ${4}\n ```",documentation:`Declares a reducer building a read model from events with imperative code, for what a projection cannot express.`},{label:`specification`,insertText:"specification ${1:Name}\n given ${2:EventType}\n when ${3:Command}\n then ${4:EventType}",documentation:`Given/when/then acceptance criteria for the slice.`},{label:`projection`,insertText:"projection ${1:Name} => ${2:ReadModel}\n from ${3:EventType}",documentation:`Declares how events project into a read model (PDL).`},{label:`capture`,insertText:"capture ${1:Name}\n source ${2:api}",documentation:`Declares a change data capture converting external data into events (CDL).`},{label:`reaction`,insertText:"reaction ${1:Name}\n when ${2:Trigger}",documentation:`Declares behavior that runs when something happens.`},{label:`screen`,insertText:"screen ${1:Name}\n data ${2:ReadModel} via query ${3:QueryName}",documentation:`Declares a UI screen.`},{label:`constraint`,insertText:"constraint ${1:Name}\n unique ${2:property} on ${3:EventType}",documentation:`Declares a server-side rule enforced before events are committed.`}],m=[t,{label:`property`,insertText:"${1:property} ${2:Type}",documentation:`An input of the command — a name and a type reference.`},{label:`produces operation`,insertText:"produces operation ${1:Name}\n uses ${2:System}\n ${3:input} ${4:Type} = ${5:source}",documentation:`Declares ordered operation intent; not admitted by any supported executable model (ESM) version yet (PLAY0268).`},{label:`returns property`,insertText:"returns @${1:property}",documentation:`Scalar response from a direct command property, only on acceptance. Executable as ESM v7.`},{label:`returns block`,insertText:"returns\n ${1:field} = ${2:property}",documentation:`Unnamed record response with inferred or explicit field types, only on acceptance. Executable as ESM v7.`},{label:`produces event`,insertText:"produces event ${1:Name}\n ${2:property} ${3:Type} = ${4:source}",documentation:`Declares a slice-owned generation-1 event and maps its properties. An omitted for uses the command identifier.`},{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.`},{label:`authorize`,insertText:"authorize ${1:PolicyName}",documentation:`References the policies that must pass for the command to execute.`},{label:`reads`,insertText:"reads ${1:View} by ${2:property}",documentation:`Declares a view the command consults. Executable binding is not yet supported.`},{label:`reads as`,insertText:"reads ${1:View} as ${2:alias} by ${3:property}",documentation:`Names one instance of a view; every instance needs a unique alias when reading the same view more than once.`},{label:`validate`,insertText:'validate\n ${1:property} not empty message "${2:message}"',documentation:`Declarative validation rules with messages.`},{label:`validate csharp`,insertText:`validate\n ${fenced(`csharp`)}`,documentation:`Imperative validation in C#, yielding the message of every rule the artifact breaks.`},{label:`produces`,insertText:"produces ${1:EventType}\n ${2:property} = ${3:source}",documentation:`Declares the event the command emits, with property mappings.`},{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.`},{label:`description`,insertText:'description "${1:what the command asks for}"',documentation:`A human-readable description.`},{label:`concurrency`,insertText:`concurrency
8
+ \${1|eventSource,sourceType,streamType,streamId,events|}`,documentation:`The scope of the concurrency check made when the command appends events.`},{label:`handler`,insertText:`handler
9
+ `,documentation:`Fully imperative command implementation — file reference or inline C#, instead of produces.`}],h=[{label:`property`,insertText:"${1:property} ${2:Type}",documentation:`A property of the event — a name and a type reference.`},{label:`description`,insertText:'description "${1:what happened}"',documentation:`Authoring metadata, as one line or a text/markdown fence.`},{label:`documentation`,insertText:"documentation\n ```markdown\n ${1:Details}\n ```",documentation:`Authoring-only Markdown documentation.`},{label:`id`,insertText:'id "${1:OldName}"',documentation:`Preserves a previous persisted event name after a rename. Leave absent for new events.`},{label:`tag`,insertText:"tag ${1:audit}",documentation:`An event-type tag stamped on every occurrence.`}],g=[...h,{label:`for`,insertText:"for ${1:identifier}",documentation:`Explicitly names the command identifier used as the event source.`},{label:`property mapping`,insertText:"${1:property} ${2:Type} = ${3:source}",documentation:`Declares and maps an event property on one line.`}],_=[{label:`when`,insertText:"when ${1:condition}",documentation:`Guards the produced event with a condition.`}],v=[{label:`hint`,insertText:'hint "${1:implementation guidance}"',documentation:`Ordered nonblank guidance for a handler implementation. Not an execution guarantee.`},{label:`file`,insertText:"file ${1:Path}",documentation:`Selects one existing model-relative attachment.`},...[`csharp`,`typescript`,`react`,`html`,`sql`].map(e=>({label:e,insertText:fenced(e),documentation:`Selects one inline payload. Handler execution remains unsupported.`}))],y=[{label:`implementation`,insertText:`implementation
10
+ hint "\${1:implementation guidance}"`,documentation:`Handler-only implementation intent with optional file or tagged fence. With no payload it is pending.`},{label:`file`,insertText:"file ${1:Path}",documentation:`Delegates the command implementation to an external C# file.`},{label:`csharp`,insertText:fenced(`csharp`),documentation:`Inline C# returning the events to append.`}],b=[{label:`description`,insertText:'description "${1:what this query is trying to accomplish}"',documentation:`What the query is for, in prose — what a generator or reviewer works from.`},{label:`by`,insertText:"by ${1:param} ${2:Type}",documentation:`Declares the identifying parameter of the query.`},{label:`filter`,insertText:"filter ${1:param} ${2:Type} optional",documentation:`Declares an optional filter parameter supplied by the caller.`},{label:`filter from context`,insertText:"filter ${1:param} ${2:Type} from $context.${3|tenant,causedBy.subject,occurred|}",documentation:`Declares a parameter filled from the query context instead of the caller.`},{label:`authorize`,insertText:"authorize ${1:PolicyName}",documentation:`References the policies that must pass for the query to execute.`},{label:`performer`,insertText:`performer
11
+ `,documentation:`The code that performs the query — a file reference or an inline csharp/sql block.`}],x=[{label:`file`,insertText:"file ${1:Path}",documentation:`Delegates the query implementation to an external file.`},{label:`csharp`,insertText:fenced(`csharp`),documentation:`Inline C# returning the query result, with the QueryContext in scope as context.`},{label:`sql`,insertText:fenced(`sql`),documentation:`Inline SQL returning the query result.`}],S=[{label:`description`,insertText:'description "${1:invariant intent}"',documentation:`Report-only description, distinct from the violation message.`},{label:`unique`,insertText:"unique ${1:property} on ${2:EventType}",documentation:`Enforces a unique property value across an event type.`},{label:`unique event`,insertText:"unique event ${1:EventType}",documentation:`Enforces that the event type occurs at most once per event source.`},{label:`file`,insertText:"file ${1:Path}",documentation:`Delegates the constraint to a custom C# implementation.`}],C=[t,{label:`runs as system`,insertText:`runs as system`,documentation:`Authenticated system identity with no roles for returned commands. Syntax-only (PLAY0268, #383).`},{label:`runs as system role`,insertText:'runs as system role "${1:Role}"',documentation:`Exact system roles for every returned or invoked command, not imperative pipeline calls. Syntax-only (PLAY0268, #383).`},{label:`description`,insertText:'description "${1:what this reaction does}"',documentation:`What the reaction does — a complete statement of intent before any code exists.`},{label:`when`,insertText:"when ${1:Trigger}",documentation:`An event, a declared trigger or a host signal that sets the reaction off. A trigger needs no body.`},{label:`every`,insertText:"every ${1:15} ${2|seconds,minutes,hours,days|}",documentation:`Runs the reaction on an interval.`},{label:`at`,insertText:"at ${1:08:00}",documentation:"Runs the reaction at a time of day — every day unless narrowed with `on <Weekday>` or `on day <n>`."},{label:`where`,insertText:"where ${1:condition}",documentation:`Narrows which occurrences actually run the reaction.`}],w=[{label:`reads`,insertText:"reads ${1:View}",documentation:"The view this trigger consults. Optionally use `as <alias> by <trigger value>`; clock triggers take no values and cannot use `by`."},{label:`description`,insertText:'description "${1:what this reaction does}"',documentation:`What this particular reaction does — enough on its own, with no file to point at.`},{label:`produces`,insertText:"produces ${1:EventType}",documentation:`An event the reaction appends.`},{label:`invokes`,insertText:"invokes ${1:Command}",documentation:`A command the reaction hands on. A command is asked for, not produced — it may still be rejected.`},{label:`file`,insertText:"file ${1:Path}",documentation:`Delegates the reaction to an external C# file.`},{label:`csharp`,insertText:fenced(`csharp`),documentation:`Inline C# returning event side effects.`}],T=`Syntax-only; reaction refusal handling and redelivery are not yet executable (PLAY0268).`,E=[{label:`on refused`,insertText:`on refused
12
+ acknowledge`,documentation:`Handles validation and constraint refusals, not authorization. ${T}`},{label:`on refused by validation`,insertText:`on refused by validation
13
+ acknowledge`,documentation:`Handles validation refusals. ${T}`},{label:`on refused by constraint`,insertText:`on refused by constraint \${1:Name}
14
+ acknowledge`,documentation:`Handles a named constraint refusal; omit the name for any constraint. ${T}`},{label:`on refused by authorization`,insertText:`on refused by authorization
15
+ acknowledge`,documentation:`Explicitly handles unauthorized results, never Unsupported. ${T}`}],D=[{label:`acknowledge`,insertText:`acknowledge`,documentation:`Acknowledges alone, without productions. ${T}`},{label:`produces`,insertText:"produces ${1:Event}\n ${2:reason} = \\$refusal.reason",documentation:`Records the refusal with ordinary event productions. ${T}`}],O=[{label:`file`,insertText:"file ${1:Path}",documentation:`Names the repository relative file this declaration is realized by, so the document can be navigated back to the code.`},{label:`description`,insertText:'description "${1:when this occurs}"',documentation:`What makes an occurrence of this trigger happen.`},{label:`value`,insertText:"${1:name} ${2:Type}",documentation:`A value an occurrence hands the reaction. The type is optional.`}],k=[{label:`parameter`,insertText:"parameter ${1:name} ${2:Type}",documentation:`One typed value, supplied exactly once by every case.`},{label:`case`,insertText:"case ${1:Name}\n ${2:parameter} = ${3:value}",documentation:`One named complete set of concrete parameter values.`},{label:`given caller as`,insertText:"given caller as ${1:Persona}",documentation:`An authenticated deterministic witness of a top-level persona; no body. Use explicit callers for negation, ownership claims and implementations.`},{label:`description`,insertText:'description "${1:rule or case witnessed}"',documentation:`Authoring-only description of what this scenario demonstrates.`},{label:`when redelivered`,insertText:"when redelivered ${1:Event} to ${2:Reaction}\n for ${3:value}",documentation:`Selects exactly one given event occurrence for one event-trigger reaction; does not append it again. ${T}`},{label:`given operation fails`,insertText:"given operation ${1:Name} fails",documentation:`Failure fixture leaf; not admitted by any supported executable model (ESM) version yet (PLAY0268).`},{label:`then operation`,insertText:"then operation ${1:Name}\n ${2:input} = ${3:value}",documentation:`Partial requested-operation assertion; not admitted by any supported executable model (ESM) version yet (PLAY0268).`},{label:`then compensated`,insertText:"then compensated ${1:Name}",documentation:`Compensation assertion leaf; not admitted by any supported executable model (ESM) version yet (PLAY0268).`},{label:`file`,insertText:"file ${1:Path}",documentation:`Names the repository relative file this declaration is realized by, so the document can be navigated back to the code.`},{label:`given`,insertText:"given ${1:EventType}\n ${2:property} = ${3:value}",documentation:`Establishes prior state by replaying an event before the command runs.`},{label:`given readmodel`,insertText:"given readmodel ${1:ReadModelType}\n ${2:property} = ${3:value}",documentation:`Establishes prior read model state directly.`},{label:`when`,insertText:"when ${1:CommandType}\n ${2:property} = ${3:value}",documentation:`The command being exercised.`},{label:`then`,insertText:"then ${1:EventType}\n ${2:property} = ${3:value}",documentation:`An event expected to be produced by the command.`},{label:`then readmodel`,insertText:"then readmodel ${1:ReadModelType}\n ${2:property} = ${3:value}",documentation:`The read model state expected after the command.`},{label:`then no readmodel`,insertText:"then no readmodel ${1:ReadModelType} for ${2:key}",documentation:`Asserts that precisely one keyed read-model instance does not exist; another key may still be present.`},{label:`then query`,insertText:"then query ${1:QueryName}\n arguments\n ${2:argument} = ${3:value}\n result\n ${4:property} = ${5:value}",documentation:`The ordered query results expected for explicit arguments. Remove the result block to assert an empty result.`},{label:`then error`,insertText:`then error`,documentation:`A rejection, for a reason this specification does not name.`},{label:`then error "..."`,insertText:'then error "${1:reason}"',documentation:`A rejection, for the named reason.`},{label:`given clock`,insertText:'given clock "${1:2026-10-05T08:00:00Z}"',documentation:`The instant the scenario happens at - the occurrence time of everything it does. At most once.`},{label:`given capture`,insertText:"given capture ${1:Capture}\n ${2:field} = ${3:value}",documentation:`A record the capture's source held before.`},{label:`when clock`,insertText:'when clock "${1:2026-10-05T09:00:00Z}"',documentation:`The clock reaches an instant, as the action.`},{label:`when trigger`,insertText:"when trigger ${1:Trigger}\n ${2:value} = ${3:value}",documentation:`An application trigger fires, as the action.`},{label:`when capture`,insertText:"when capture ${1:Capture}\n ${2:field} = ${3:value}",documentation:`The record a capture's source holds now, as the action.`},{label:`when query`,insertText:"when query ${1:Query}\n ${2:argument} = ${3:value}",documentation:`Performs a query, as the action.`},{label:`then result`,insertText:"then result\n ${1:property} = ${2:value}",documentation:"One result the query performed by `when query` returns, in order."},{label:`then no result`,insertText:`then no result`,documentation:"The query performed by `when query` returns nothing."},{label:`then no events`,insertText:`then no events`,documentation:`Syntax-only assertion of no new events after a non-append action (PLAY0268); cannot accompany event, error or denial expectations.`}],A={given:[{label:`operation`,insertText:"operation ${1:Name} fails",documentation:`Syntax-only failure fixture; no children.`},{label:`clock`,insertText:'clock "${1:2026-10-05T08:00:00Z}"',documentation:`The instant the scenario happens at - the occurrence time of everything it does.`},{label:`capture`,insertText:"capture ${1:Capture}\n ${2:field} = ${3:value}",documentation:`A record the capture's source held before. Repeat it for several records.`},{label:`readmodel`,insertText:"readmodel ${1:ReadModelType}\n ${2:property} = ${3:value}",documentation:`Establishes prior read model state directly.`},{label:`caller`,insertText:`caller
16
+ \${1:authenticated}`,documentation:`The identity the scenario runs as.`}],when:[{label:`redelivered`,insertText:"redelivered ${1:Event} to ${2:Reaction}\n for ${3:value}",documentation:`Selects exactly one given event occurrence for one reaction. ${T}`},{label:`clock`,insertText:'clock "${1:2026-10-05T09:00:00Z}"',documentation:`The clock reaches an instant - what a scheduled reaction responds to.`},{label:`trigger`,insertText:"trigger ${1:Trigger}\n ${2:value} = ${3:value}",documentation:`An application trigger fires, with the values it carries.`},{label:`capture`,insertText:"capture ${1:Capture}\n ${2:field} = ${3:value}",documentation:`The record a capture's source holds now.`},{label:`query`,insertText:"query ${1:Query}\n ${2:argument} = ${3:value}",documentation:"Performs a query; assert what it returns with `then result` or `then no result`."},{label:`append`,insertText:"append ${1:EventType}\n ${2:property} = ${3:value}",documentation:`An event occurs, instead of a command being executed.`}],then:[{label:`operation`,insertText:"operation ${1:Name}\n ${2:input} = ${3:value}",documentation:`Syntax-only partial operation assertion; not admitted by any supported executable model (ESM) version yet.`},{label:`compensated`,insertText:"compensated ${1:Name}",documentation:`Syntax-only compensation assertion; no children.`},{label:`returns value`,insertText:"returns ${1:value}",documentation:`Scalar response expectation, compared by semantic value equality. Executable as ESM v7.`},{label:`returns block`,insertText:"returns\n ${1:field} = ${2:value}",documentation:`Nonempty subset of response fields asserted by name. Executable as ESM v7.`},{label:`result`,insertText:"result\n ${1:property} = ${2:value}",documentation:"One result the query performed by `when query` returns, in order."},{label:`result exactly`,insertText:"result exactly\n ${1:property} = ${2:value}",documentation:`One result, with every property asserted.`},{label:`no result`,insertText:`no result`,documentation:"The query performed by `when query` returns nothing."},{label:`no events`,insertText:`no events`,documentation:`Syntax-only assertion of no new events after a non-append action; not yet executable (PLAY0268).`},{label:`readmodel`,insertText:"readmodel ${1:ReadModelType}\n ${2:property} = ${3:value}",documentation:`The read model state expected afterwards.`},{label:`error`,insertText:'error "${1:reason}"',documentation:`A rejection, for the named reason.`},{label:`denied`,insertText:`denied`,documentation:`The action is denied to the caller.`}]},j=[{label:`hint`,insertText:'hint "${1:predicate guidance}"',documentation:`Ordered nonblank authoring guidance. Does not execute or confirm the predicate.`},{label:`file`,insertText:"file ${1:Path}",documentation:`The sole named-rule predicate attachment.`},{label:`csharp`,insertText:fenced(`csharp`),documentation:`Opaque named-rule predicate returning a bool. Requires an admitting target.`}],M=[{label:`implementation`,insertText:`implementation
17
+ hint "\${1:predicate guidance}"`,documentation:`Command named-rule intent with optional file or tagged fence. Pending intent cannot bind.`},...j.filter(e=>e.label!==`hint`)],N=[{label:`file`,insertText:"file ${1:Path}",documentation:`Gives the named predicate its implementation in an external C# file.`},{label:`csharp`,insertText:fenced(`csharp`),documentation:`Gives the named predicate its implementation as inline C# returning a bool.`}],P=[{label:`description`,insertText:'description "${1:authorization intent}"',documentation:`Report-only description; does not supply an implementation.`},{label:`require authenticated`,insertText:`require authenticated`,documentation:`Requires an authenticated caller.`},{label:`require role`,insertText:'require role "${1:role}"',documentation:`Requires the caller to have a role.`},{label:`require not role`,insertText:'require not role "${1:role}"',documentation:`Excludes callers with a role. Add authenticated to require a signed-in caller.`},{label:`require not claim`,insertText:'require not claim "${1:claim}" matches ${2:subject}',documentation:`Requires that no claim value matches the subject or a value.`},{label:`require claim`,insertText:'require claim "${1:claim}" matches ${2:subject}',documentation:`Requires a claim to match the subject or a value.`},{label:`csharp`,insertText:fenced(`csharp`),documentation:`Fully custom policy logic in C#, returning a bool.`}],F=[{label:`not empty`,insertText:'${1:property} not empty message "${2:message}"',documentation:`The property must have a value.`},{label:`max`,insertText:'${1:property} max ${2:500} message "${3:message}"',documentation:`Maximum length or value.`},{label:`min`,insertText:'${1:property} min ${2:1} message "${3:message}"',documentation:`Minimum length or value.`},{label:`matches`,insertText:'${1:property} matches "${2:pattern}" message "${3:message}"',documentation:`The property must match a regular expression.`},{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."},{label:`==`,insertText:'${1:property} == ${2:value} message "${3:message}"',documentation:`The property must equal the value.`},{label:`!=`,insertText:'${1:property} != ${2:value} message "${3:message}"',documentation:`The property must not equal the value.`},{label:`length ==`,insertText:'${1:property} length == ${2:3} message "${3:message}"',documentation:`The property must have an exact length.`},{label:`all >`,insertText:'${1:collection}.${2:property} all > ${3:0} message "${4:message}"',documentation:`Every element of a collection must satisfy the comparison.`}],I=[{label:`description`,insertText:'description "${1:screen intent}"',documentation:`Report-only description, not a localizable screen title.`},{label:`data`,insertText:"data ${1:ReadModel} via query ${2:QueryName}",documentation:`Binds a read model to the screen through a query.`},{label:`action`,insertText:"action ${1:CommandName}",documentation:`Makes a command available as an action on the screen.`},{label:`action "…"`,insertText:'action "${1:Label}"\n when item.${2:status} == "${3:open}" execute ${4:CommandName}\n otherwise hidden',documentation:`One labeled button selecting the first matching command; hidden without a subject or match.`},{label:`layout`,insertText:"layout ${1:LayoutName}",documentation:`Uses a layout template and fills its slots.`},{label:`section`,insertText:"section ${1:name}",documentation:`A named structural section of the screen.`},{label:`table`,insertText:'table ${1:name}\n column ${2:property} label "${3:text}"',documentation:`A table widget over a read model or collection.`},{label:`summary`,insertText:'summary ${1:ReadModel}\n field ${2:property} label "${3:text}"',documentation:`A summary widget showing labeled fields.`},{label:`title`,insertText:'title "${1:text}"',documentation:`The title of the screen or section.`},{label:`file`,insertText:"file ${1:Path}",documentation:`Full external implementation — Stage uses the referenced file.`},{label:`react`,insertText:fenced(`react`),documentation:`Inline React/TSX component receiving the data contract as Props.`},{label:`typescript`,insertText:fenced(`typescript`),documentation:`Inline plain TypeScript.`},{label:`html`,insertText:fenced(`html`),documentation:`Inline static HTML.`}],L=[{label:`navigate to`,insertText:"navigate to ${1:ScreenName}",documentation:`Navigates to a screen after the action completes.`},{label:`label`,insertText:'label "${1:text}"',documentation:`The display label of the action.`}],R=[{label:`when … execute`,insertText:'when item.${1:status} == "${2:open}" execute ${3:CommandName}',documentation:`First matching alternative selects the command; authorization never falls through.`},{label:`otherwise hidden`,insertText:`otherwise hidden`,documentation:`Hides the action when no alternative matches; also the default.`},{label:`otherwise execute`,insertText:"otherwise execute ${1:CommandName}",documentation:`Selects a fallback command when no alternative matches and a subject exists.`},...L.filter(e=>e.label!==`label`)],z=[{label:`execute`,insertText:"execute ${1:CommandName}",documentation:`Executes a command; denial never selects another alternative.`},{label:`navigate to`,insertText:"navigate to ${1:ScreenName}",documentation:`Navigates to the named screen.`},{label:`open dialog`,insertText:"open dialog ${1:DialogTemplate}",documentation:`Opens a dialog.`},{label:`notify`,insertText:'notify info "${1:Message}"',documentation:`Displays a message.`},{label:`confirm`,insertText:`confirm "\${1:Message}"
18
+ on success
19
+ execute \${2:CommandName}`,documentation:`Asks before continuing.`},{label:`refresh`,insertText:"refresh ${1:QueryName}",documentation:`Refreshes a query-backed element.`}],B=[{label:`when …`,insertText:'when item.${1:status} == "${2:open}"\n execute ${3:CommandName}',documentation:`Selects a whole action list once against the rendered subject at gesture time.`},{label:`otherwise`,insertText:`otherwise
20
+ notify info "\${1:Message}"`,documentation:`Final fallback list; without a subject nothing runs, including fallback.`},...z],V=[{label:`with … from`,insertText:"with ${1:property} from item.${2:property}",documentation:`Explicit input binding for this command alternative, before same-name item fields or its form.`}],H=[{label:`column`,insertText:'column ${1:property} label "${2:text}"',documentation:`A column bound to a property.`},{label:`on row-click`,insertText:"on row-click navigate to ${1:ScreenName} by ${2:param}",documentation:`Navigates when a row is clicked.`}],U=[...e.map(e=>({label:`$identity.${e}${e===`claims`?`.`:``}`,insertText:`$identity.${e}${e===`claims`?".${1:name}":``}`,documentation:`The caller's ${e}, equivalent to $context.identity.${e}.`})),{label:`$context.occurred`,insertText:`$context.occurred`,documentation:`When the command or query was received.`},{label:`$context.tenant`,insertText:`$context.tenant`,documentation:`The tenant the command or query is executing for.`},{label:`$context.command.`,insertText:"$context.command.${1:property}",documentation:`A property of the command being handled.`},{label:`$context.arguments.`,insertText:"$context.arguments.${1:name}",documentation:`An argument of the query being performed.`},{label:`$context.causedBy.subject`,insertText:`$context.causedBy.subject`,documentation:`Subject of the identity that caused the command or query.`},{label:`$context.causedBy.name`,insertText:`$context.causedBy.name`,documentation:`Display name of the identity that caused the command or query.`},{label:`$context.causedBy.userName`,insertText:`$context.causedBy.userName`,documentation:`User name of the identity that caused the command or query.`},{label:`$context.causation.type`,insertText:`$context.causation.type`,documentation:`What caused this — a command, a reactor, a schedule.`},{label:`$context.identity.id`,insertText:`$context.identity.id`,documentation:`The identifier of the caller from the auth token.`},{label:`$context.identity.name`,insertText:`$context.identity.name`,documentation:`The display name of the caller.`},{label:`$context.identity.userName`,insertText:`$context.identity.userName`,documentation:`The user name of the caller.`},{label:`$context.identity.isAuthenticated`,insertText:`$context.identity.isAuthenticated`,documentation:`Whether the caller is authenticated.`},{label:`$context.identity.roles`,insertText:`$context.identity.roles`,documentation:`The roles the caller holds.`},{label:`$context.identity.claims.`,insertText:"$context.identity.claims.${1:name}",documentation:`The value of a claim the caller carries.`},{label:`$env.`,insertText:"$env.${1:VAR_NAME}",documentation:`An environment variable.`},...r.filter(e=>e.name!==`value`).map(e=>({label:`$eventContext.${e.path}`,insertText:`$eventContext.${e.path}`,documentation:`${e.description} (PDL)`}))],W={StateChange:[`operation`,`file`,`description`,`event`,`event generation`,`command`,`constraint`,`screen`,`specification`],StateView:[`file`,`description`,`readmodel`,`query`,`query observable`,`projection`,`reducer`,`screen`,`specification`,`event`,`event generation`],Automation:[`operation`,`file`,`description`,`reaction`,`reducer`,`command`,`event`,`event generation`,`readmodel`,`specification`],Translate:[`file`,`description`,`capture`,`event`,`event generation`,`specification`]};function sliceItemsFor(e){let t=e?W[e]:void 0;return t?p.filter(n=>n.label===`purpose`||n.label===`example`||n.label===`documentation`||n.label===`public event`||n.label===`event from`||n.label===`direction`&&e===`Translate`||t.includes(n.label)):p}export{V as actionArgumentItems,L as actionItems,m as commandItems,M as commandRuleItems,d as conceptItems,S as constraintItems,contextVariableEntries,U as contextVariableItems,h as eventItems,R as guardedActionItems,y as handlerItems,o as identityItems,v as implementationItems,g as inlineEventItems,z as interactionActionItems,B as interactionChoiceItems,E as invocationItems,j as namedRuleImplementationItems,l as operationImplementationItems,c as operationItems,u as operationPhaseItems,a as optionalTypeItems,x as performerItems,P as policyItems,_ as producesItems,b as queryItems,C as reactionItems,w as reactionTriggerItems,D as refusalItems,N as ruleItems,I as screenItems,p as sliceItems,sliceItemsFor,k as specificationItems,A as specificationStepItems,H as tableItems,s as topLevelItems,O as triggerItems,f as typeItems,F as validateItems};
21
+ //# sourceMappingURL=completion-items.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion-items.js","names":["optionalTypeItems","tag","identityItems","details","symbols","detail","contextVariableItems","identityProperties","topLevelItems","exampleDeclarationItems","operationItems","operationImplementationItems","language","operationPhaseItems","item","conceptItems","typeItems","sliceItems","purposeReferenceItem","documentationItem","commandItems","eventItems","inlineEventItems","producesItems","implementationItems","handlerItems","queryItems","performerItems","constraintItems","reactionItems","reactionTriggerItems","refusalAvailability","invocationItems","refusalItems","triggerItems","specificationItems","specificationStepItems","namedRuleImplementationItems","commandRuleItems","ruleItems","policyItems","validateItems","screenItems","actionItems","guardedActionItems","interactionActionItems","interactionChoiceItems","actionArgumentItems","tableItems","property","eventContextPaths","path","sliceMembers","members","sliceType"],"sources":["../../completion-items.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { DocumentSymbols } from './symbols';\nimport { documentationItem } from './documentation-item';\nimport { purposeReferenceItem } from './purpose-items';\n\nimport { eventContextPaths } from './event-context';\nimport { identityProperties } from './language';\nimport { exampleDeclarationItems } from './example-declaration-items';\n\nexport const optionalTypeItems: CompletionEntry[] = [\n { label: 'optional', insertText: 'optional', documentation: 'Allows the complete value, including a collection, to be absent.' },\n];\n\nexport interface CompletionEntry {\n label: string;\n insertText: string;\n documentation: string;\n sortText?: string;\n detail?: string;\n}\n\nconst fenced = (tag: string) => `\\`\\`\\`${tag}\\n\\${1}\\n\\`\\`\\``;\n\nexport { exampleDeclarationItems } from './example-declaration-items';\n\nexport const identityItems: CompletionEntry[] = [\n { label: 'description', insertText: 'description \"${1:caller details}\"', documentation: 'Describes the caller metadata.' },\n { label: 'detail from claim', insertText: '${1:detail} ${2:Type} from claim \"${3:claim}\"', documentation: 'One typed detail sourced from a token claim.' },\n { label: 'detail from query', insertText: '${1:detail} ${2:Type} from query ${3:Query} by \\\\$identity.id', documentation: 'A keyed, single-result query authorized without additional caller details.' },\n { label: 'detail from code', insertText: '${1:detail} ${2:Type}\\n ```csharp\\n ${3:return value;}\\n ```', documentation: 'An opaque inline source; authoring metadata, not executable.' },\n { label: 'detail from file', insertText: '${1:detail} ${2:Type}\\n file ${3:Path}', documentation: 'One file source; no refresh or cache directives.' },\n];\n\nexport function contextVariableEntries(symbols: DocumentSymbols): CompletionEntry[] {\n const details = [...new Map((symbols.identityDetails ?? []).map(detail => [detail.name, detail])).values()];\n return [...contextVariableItems, ...details.filter(detail => !identityProperties.includes(detail.name)).map(detail => ({ label: `$identity.${detail.name}`, insertText: `\\\\$identity.${detail.name}`, detail: detail.type, documentation: 'Declared caller detail. Authoring metadata only; executable reads report PLAY0268 until admitted (#600).' }))];\n}\n\nexport const topLevelItems: CompletionEntry[] = [\n { label: 'identity', insertText: 'identity\\n ${1:detail} ${2:Type} from claim \"${3:claim}\"', documentation: 'Typed additional caller details; authoring metadata only, at most one block per application.' },\n { label: 'purpose', insertText: 'purpose ${1:Name}\\n description \"${2:processing intent}\"\\n basis ${3|consent,contract,legalObligation,vitalInterests,publicTask,legitimateInterests|}', documentation: 'Report-only processing metadata. Not legal advice; referenced by module, feature and slice.' },\n ...exampleDeclarationItems,\n { label: 'eventsource', insertText: 'eventsource ${1:Name}\\n identifier ${2:Type}\\n stream ${3:Name}', documentation: 'Application-owned source with nested streams, admitted by ESM v8. Pin the stored name before renaming a source with stored events; Default is reserved.' },\n { label: 'system', insertText: 'system ${1:Name}\\n description \"${2:external system}\"', documentation: 'Application-scoped external system; not admitted by any supported executable model (ESM) version yet.' },\n { label: 'import', insertText: 'import ${1:Module}.${2:Type}', documentation: 'Imports a type from another module by its qualified name.' },\n { label: 'import from', insertText: 'import ${1:Module}.${2:Event} from \"${3:origin}\"', documentation: 'Imports a public event contract with a nonblank opaque origin, not a file path. An import has no local shape, so executable binding still refuses it with PLAY0268.' },\n { label: 'import \"…\"', insertText: 'import \"${1:**/*.play}\"', documentation: 'Imports other `.play` files by path or glob, relative to this file\\'s folder, as whole documents of the application.' },\n { label: 'concept', insertText: 'concept ${1:Name} : ${2|Uuid,String,Int,Decimal,Bool,Date,DateTime|}', documentation: 'Declares a formalized value type wrapping a primitive.' },\n { label: 'concept (enum)', insertText: 'concept ${1:Name} : Enum\\n ${2:value}', documentation: 'Declares an enumeration concept with a fixed set of values.' },\n { label: 'concept (pii with reason)', insertText: 'concept ${1:Name} : ${2|String,Uuid,Int,Decimal,Bool,Date,DateTime|} pii\\n pii reason \"${3:why this value is personal data}\"', documentation: 'Declares a personal-data concept together with the reason it is personal data.' },\n { label: 'type', insertText: 'type ${1:Name}\\n ${2:property} ${3:Type}', documentation: 'Declares a composite value type — a named shape built from several properties.' },\n { label: 'policy', insertText: 'policy ${1:Name}\\n require ${2:authenticated}', documentation: 'Declares a named authorization rule for commands and queries.' },\n { label: 'module', insertText: 'module ${1:Name}\\n ', documentation: 'Declares the top-level namespace — maps to a bounded context.' },\n { label: 'domain', insertText: 'domain ${1:Name}', documentation: 'The domain the file belongs to — optional, at most one per file, before everything else.' },\n { label: 'persona', insertText: 'persona ${1:Name}\\n description \"${2:who they are}\"', documentation: 'A named role interacting with the application, with the policies it holds.' },\n { label: 'authentication', insertText: 'authentication\\n provider ${1:Name}\\n ${2:setting} ${3:value}', documentation: 'Declares the identity providers of the application — at most one block per file.' },\n { label: 'seed', insertText: 'seed\\n for ${1:EventSourceId}\\n ${2:EventType}', documentation: 'Declares events to seed into the event store per event source id.' },\n { label: 'layout', insertText: 'layout ${1:Name}\\n ${2:slot}', documentation: 'Declares the application shell with named slots.' },\n { label: 'theme', insertText: 'theme ${1:Name}\\n compatible with ${2:Package}', documentation: 'Declares a theme and the component packages it is compatible with.' },\n { label: 'ui profile', insertText: 'ui profile ${1:Name}\\n target platform ${2:web}\\n layout ${3:Layout}\\n theme ${4:Theme}', documentation: 'Binds a target platform and size to a layout, theme and component packages.' },\n { label: 'behavior', insertText: 'behavior ${1:Name}\\n on ${2:click}\\n ${3:execute command}', documentation: 'A named interaction wiring, attached to a screen, form or dialog with `uses`.' },\n { label: 'trigger', insertText: 'trigger ${1:Name}\\n ${2:property} ${3:Type}', documentation: 'Declares an integration signal a reaction can run on.' },\n];\n\nexport const operationItems: CompletionEntry[] = [\n { label: 'uses', insertText: 'uses ${1:System}', documentation: 'Exactly one application-scoped external system.' },\n { label: 'description', insertText: 'description \"${1:intent}\"', documentation: 'Describes operation intent, without requiring code.' },\n { label: 'input', insertText: '${1:input} ${2:Type}', documentation: 'Typed operation input; no identifier or generated modifier.' },\n { label: 'execute', insertText: 'execute\\n description \"${1:effect}\"', documentation: 'Optional execution intent; not admitted by any supported executable model (ESM) version yet.' },\n { label: 'compensate', insertText: 'compensate\\n description \"${1:undo intent}\"', documentation: 'Optional compensation intent; not admitted by any supported executable model (ESM) version yet.' },\n];\n\nexport const operationImplementationItems: CompletionEntry[] = [\n { label: 'hint', insertText: 'hint \"${1:implementation guidance}\"', documentation: 'Ordered authoring guidance; not an executable implementation role.' },\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Selects the phase’s sole source attachment.' },\n ...['csharp', 'typescript', 'react', 'html', 'sql'].map(language => ({ label: language, insertText: fenced(language), documentation: 'Selects the phase’s sole inline source; not admitted by any supported executable model (ESM) version yet.' })),\n];\n\nexport const operationPhaseItems: CompletionEntry[] = [\n { label: 'description', insertText: 'description \"${1:phase intent}\"', documentation: 'A description-only phase is valid, pending intent.' },\n { label: 'implementation', insertText: 'implementation\\n hint \"${1:guidance}\"', documentation: 'Hints with optional source; phase owns File/Code, wrapper owns hints only.' },\n ...operationImplementationItems.filter(item => item.label !== 'hint'),\n];\n\nexport const conceptItems: CompletionEntry[] = [\n { label: 'description', insertText: 'description \"${1:what this value represents}\"', documentation: 'Report-only authoring description; not a validation or compliance note.' },\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Names the repository relative file this declaration is realized by, so the document can be navigated back to the code.' },\n { label: 'pii reason', insertText: 'pii reason \"${1:why this value is personal data}\"', documentation: 'A free-text concept note, not a lawful basis.' },\n { label: 'secret reason', insertText: 'secret reason \"${1:why this value is an operational secret}\"', documentation: 'Records why the secret marker applies.' },\n { label: 'secret scope', insertText: 'secret scope ${1|subject,namespace,global|}', documentation: 'Explicit encryption scope; omitted scope keeps Chronicle’s Subject default.' },\n { label: 'pii special', insertText: 'pii special ${1|racialOrEthnicOrigin,politicalOpinions,religiousOrPhilosophicalBeliefs,tradeUnionMembership,genetic,biometric,health,sexLifeOrSexualOrientation|}', documentation: 'GDPR Art. 9(1) special category of personal data.' },\n { label: 'pii criminal', insertText: 'pii criminal', documentation: 'Personal data relating to criminal convictions and offenses (GDPR Art. 10).' },\n { label: 'validate', insertText: 'validate\\n ${1:not empty} message \"${2:message}\"', documentation: 'Validation rules that travel with the value everywhere it appears.' },\n];\n\nexport const typeItems: CompletionEntry[] = [\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Names the repository relative file this declaration is realized by, so the document can be navigated back to the code.' },\n { label: 'description', insertText: 'description \"${1:what this shape represents}\"', documentation: 'A human-readable description of the type.' },\n { label: 'property', insertText: '${1:property} ${2:Type}', documentation: 'A property of the type — a name and a type reference.' },\n];\n\nexport const sliceItems: CompletionEntry[] = [\n purposeReferenceItem,\n documentationItem,\n ...exampleDeclarationItems,\n { label: 'operation', insertText: 'operation ${1:Name}\\n uses ${2:System}\\n ${3:input} ${4:Type}', documentation: 'Reusable slice-owned operation intent; not admitted by any supported executable model (ESM) version yet.' },\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Names the repository relative file this declaration is realized by, so the document can be navigated back to the code.' },\n { label: 'public event', insertText: 'public event ${1:Name}\\n ${2:property} ${3:Type}', documentation: 'Declares a public event: a contract this application publishes. Admitted by ESM v9; an outbound Translate slice produces it through a projection that targets it.' },\n { label: 'event from', insertText: 'event ${1:Name} from \"${2:origin}\"\\n ${3:property} ${4:Type}', documentation: 'An event with an opaque origin naming the application that owns it, not a path or declaration reference. It is a public event admitted by ESM v9; consume it with a capture over source events.' },\n { label: 'direction', insertText: 'direction ${1|inbound,outbound|}', documentation: 'Translate direction, inbound or outbound, admitted by ESM v9. No transport or delivery guarantee is implied.' },\n { label: 'event', insertText: 'event ${1:Name}\\n ${2:property} ${3:Type}', documentation: 'Declares an event type — an immutable, past-tense fact.' },\n { label: 'event generation', insertText: 'event ${1:Name} generation ${2:2}\\n ${3:property} ${4:Type}', documentation: 'Declares a complete numbered event generation; start at 1 and do not skip a number.' },\n { label: 'command', insertText: 'command ${1:Name}\\n ${2:property} ${3:Type}', documentation: 'Declares a command — an imperative intent that produces events.' },\n { label: 'query', insertText: 'query ${1:Name} => ${2:ReadModel}', documentation: 'Declares a read-side entry point mapping to a return type.' },\n { 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.' },\n { label: 'readmodel', insertText: 'readmodel ${1:Name}\\n ${2:property} ${3:Type}', documentation: 'Declares the shape of a read model — its properties — that a projection, reducer or query fills and returns.' },\n { label: 'reducer', insertText: 'reducer ${1:Name} => ${2:ReadModel}\\n on ${3:EventType}\\n ```csharp\\n ${4}\\n ```', documentation: 'Declares a reducer building a read model from events with imperative code, for what a projection cannot express.' },\n { label: 'specification', insertText: 'specification ${1:Name}\\n given ${2:EventType}\\n when ${3:Command}\\n then ${4:EventType}', documentation: 'Given/when/then acceptance criteria for the slice.' },\n { label: 'projection', insertText: 'projection ${1:Name} => ${2:ReadModel}\\n from ${3:EventType}', documentation: 'Declares how events project into a read model (PDL).' },\n { label: 'capture', insertText: 'capture ${1:Name}\\n source ${2:api}', documentation: 'Declares a change data capture converting external data into events (CDL).' },\n { label: 'reaction', insertText: 'reaction ${1:Name}\\n when ${2:Trigger}', documentation: 'Declares behavior that runs when something happens.' },\n { label: 'screen', insertText: 'screen ${1:Name}\\n data ${2:ReadModel} via query ${3:QueryName}', documentation: 'Declares a UI screen.' },\n { label: 'constraint', insertText: 'constraint ${1:Name}\\n unique ${2:property} on ${3:EventType}', documentation: 'Declares a server-side rule enforced before events are committed.' },\n];\n\nexport const commandItems: CompletionEntry[] = [\n documentationItem,\n { label: 'property', insertText: '${1:property} ${2:Type}', documentation: 'An input of the command — a name and a type reference.' },\n { label: 'produces operation', insertText: 'produces operation ${1:Name}\\n uses ${2:System}\\n ${3:input} ${4:Type} = ${5:source}', documentation: 'Declares ordered operation intent; not admitted by any supported executable model (ESM) version yet (PLAY0268).' },\n { label: 'returns property', insertText: 'returns @${1:property}', documentation: 'Scalar response from a direct command property, only on acceptance. Executable as ESM v7.' },\n { label: 'returns block', insertText: 'returns\\n ${1:field} = ${2:property}', documentation: 'Unnamed record response with inferred or explicit field types, only on acceptance. Executable as ESM v7.' },\n { label: 'produces event', insertText: 'produces event ${1:Name}\\n ${2:property} ${3:Type} = ${4:source}', documentation: 'Declares a slice-owned generation-1 event and maps its properties. An omitted for uses the command identifier.' },\n { 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.' },\n { label: 'authorize', insertText: 'authorize ${1:PolicyName}', documentation: 'References the policies that must pass for the command to execute.' },\n { label: 'reads', insertText: 'reads ${1:View} by ${2:property}', documentation: 'Declares a view the command consults. Executable binding is not yet supported.' },\n { label: 'reads as', insertText: 'reads ${1:View} as ${2:alias} by ${3:property}', documentation: 'Names one instance of a view; every instance needs a unique alias when reading the same view more than once.' },\n { label: 'validate', insertText: 'validate\\n ${1:property} not empty message \"${2:message}\"', documentation: 'Declarative validation rules with messages.' },\n { label: 'validate csharp', insertText: `validate\\n ${fenced('csharp')}`, documentation: 'Imperative validation in C#, yielding the message of every rule the artifact breaks.' },\n { label: 'produces', insertText: 'produces ${1:EventType}\\n ${2:property} = ${3:source}', documentation: 'Declares the event the command emits, with property mappings.' },\n { 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.' },\n { label: 'description', insertText: 'description \"${1:what the command asks for}\"', documentation: 'A human-readable description.' },\n { label: 'concurrency', insertText: 'concurrency\\n ${1|eventSource,sourceType,streamType,streamId,events|}', documentation: 'The scope of the concurrency check made when the command appends events.' },\n { label: 'handler', insertText: 'handler\\n ', documentation: 'Fully imperative command implementation — file reference or inline C#, instead of produces.' },\n];\n\nexport const eventItems: CompletionEntry[] = [\n { label: 'property', insertText: '${1:property} ${2:Type}', documentation: 'A property of the event — a name and a type reference.' },\n { label: 'description', insertText: 'description \"${1:what happened}\"', documentation: 'Authoring metadata, as one line or a text/markdown fence.' },\n { label: 'documentation', insertText: 'documentation\\n ```markdown\\n ${1:Details}\\n ```', documentation: 'Authoring-only Markdown documentation.' },\n { label: 'id', insertText: 'id \"${1:OldName}\"', documentation: 'Preserves a previous persisted event name after a rename. Leave absent for new events.' },\n { label: 'tag', insertText: 'tag ${1:audit}', documentation: 'An event-type tag stamped on every occurrence.' },\n];\n\nexport const inlineEventItems: CompletionEntry[] = [\n ...eventItems,\n { label: 'for', insertText: 'for ${1:identifier}', documentation: 'Explicitly names the command identifier used as the event source.' },\n { label: 'property mapping', insertText: '${1:property} ${2:Type} = ${3:source}', documentation: 'Declares and maps an event property on one line.' },\n];\n\nexport const producesItems: CompletionEntry[] = [\n { label: 'when', insertText: 'when ${1:condition}', documentation: 'Guards the produced event with a condition.' },\n];\n\nexport const implementationItems: CompletionEntry[] = [\n { label: 'hint', insertText: 'hint \"${1:implementation guidance}\"', documentation: 'Ordered nonblank guidance for a handler implementation. Not an execution guarantee.' },\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Selects one existing model-relative attachment.' },\n ...['csharp', 'typescript', 'react', 'html', 'sql'].map(language => ({ label: language, insertText: fenced(language), documentation: 'Selects one inline payload. Handler execution remains unsupported.' })),\n];\n\nexport const handlerItems: CompletionEntry[] = [\n { label: 'implementation', insertText: 'implementation\\n hint \"${1:implementation guidance}\"', documentation: 'Handler-only implementation intent with optional file or tagged fence. With no payload it is pending.' },\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Delegates the command implementation to an external C# file.' },\n { label: 'csharp', insertText: fenced('csharp'), documentation: 'Inline C# returning the events to append.' },\n];\n\nexport const queryItems: CompletionEntry[] = [\n { label: 'description', insertText: 'description \"${1:what this query is trying to accomplish}\"', documentation: 'What the query is for, in prose — what a generator or reviewer works from.' },\n { label: 'by', insertText: 'by ${1:param} ${2:Type}', documentation: 'Declares the identifying parameter of the query.' },\n { label: 'filter', insertText: 'filter ${1:param} ${2:Type} optional', documentation: 'Declares an optional filter parameter supplied by the caller.' },\n { label: 'filter from context', insertText: 'filter ${1:param} ${2:Type} from $context.${3|tenant,causedBy.subject,occurred|}', documentation: 'Declares a parameter filled from the query context instead of the caller.' },\n { label: 'authorize', insertText: 'authorize ${1:PolicyName}', documentation: 'References the policies that must pass for the query to execute.' },\n { label: 'performer', insertText: 'performer\\n ', documentation: 'The code that performs the query — a file reference or an inline csharp/sql block.' },\n];\n\nexport const performerItems: CompletionEntry[] = [\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Delegates the query implementation to an external file.' },\n { label: 'csharp', insertText: fenced('csharp'), documentation: 'Inline C# returning the query result, with the QueryContext in scope as context.' },\n { label: 'sql', insertText: fenced('sql'), documentation: 'Inline SQL returning the query result.' },\n];\n\nexport const constraintItems: CompletionEntry[] = [\n { label: 'description', insertText: 'description \"${1:invariant intent}\"', documentation: 'Report-only description, distinct from the violation message.' },\n { label: 'unique', insertText: 'unique ${1:property} on ${2:EventType}', documentation: 'Enforces a unique property value across an event type.' },\n { label: 'unique event', insertText: 'unique event ${1:EventType}', documentation: 'Enforces that the event type occurs at most once per event source.' },\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Delegates the constraint to a custom C# implementation.' },\n];\n\nexport const reactionItems: CompletionEntry[] = [\n documentationItem,\n { label: 'runs as system', insertText: 'runs as system', documentation: 'Authenticated system identity with no roles for returned commands. Syntax-only (PLAY0268, #383).' },\n { label: 'runs as system role', insertText: 'runs as system role \"${1:Role}\"', documentation: 'Exact system roles for every returned or invoked command, not imperative pipeline calls. Syntax-only (PLAY0268, #383).' },\n { label: 'description', insertText: 'description \"${1:what this reaction does}\"', documentation: 'What the reaction does — a complete statement of intent before any code exists.' },\n { label: 'when', insertText: 'when ${1:Trigger}', documentation: 'An event, a declared trigger or a host signal that sets the reaction off. A trigger needs no body.' },\n { label: 'every', insertText: 'every ${1:15} ${2|seconds,minutes,hours,days|}', documentation: 'Runs the reaction on an interval.' },\n { label: 'at', insertText: 'at ${1:08:00}', documentation: 'Runs the reaction at a time of day — every day unless narrowed with `on <Weekday>` or `on day <n>`.' },\n { label: 'where', insertText: 'where ${1:condition}', documentation: 'Narrows which occurrences actually run the reaction.' },\n];\n\nexport const reactionTriggerItems: CompletionEntry[] = [\n { label: 'reads', insertText: 'reads ${1:View}', documentation: 'The view this trigger consults. Optionally use `as <alias> by <trigger value>`; clock triggers take no values and cannot use `by`.' },\n { label: 'description', insertText: 'description \"${1:what this reaction does}\"', documentation: 'What this particular reaction does — enough on its own, with no file to point at.' },\n { label: 'produces', insertText: 'produces ${1:EventType}', documentation: 'An event the reaction appends.' },\n { label: 'invokes', insertText: 'invokes ${1:Command}', documentation: 'A command the reaction hands on. A command is asked for, not produced — it may still be rejected.' },\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Delegates the reaction to an external C# file.' },\n { label: 'csharp', insertText: fenced('csharp'), documentation: 'Inline C# returning event side effects.' },\n];\n\nconst refusalAvailability = 'Syntax-only; reaction refusal handling and redelivery are not yet executable (PLAY0268).';\n\nexport const invocationItems: CompletionEntry[] = [\n { label: 'on refused', insertText: 'on refused\\n acknowledge', documentation: `Handles validation and constraint refusals, not authorization. ${refusalAvailability}` },\n { label: 'on refused by validation', insertText: 'on refused by validation\\n acknowledge', documentation: `Handles validation refusals. ${refusalAvailability}` },\n { label: 'on refused by constraint', insertText: 'on refused by constraint ${1:Name}\\n acknowledge', documentation: `Handles a named constraint refusal; omit the name for any constraint. ${refusalAvailability}` },\n { label: 'on refused by authorization', insertText: 'on refused by authorization\\n acknowledge', documentation: `Explicitly handles unauthorized results, never Unsupported. ${refusalAvailability}` },\n];\n\nexport const refusalItems: CompletionEntry[] = [\n { label: 'acknowledge', insertText: 'acknowledge', documentation: `Acknowledges alone, without productions. ${refusalAvailability}` },\n { label: 'produces', insertText: 'produces ${1:Event}\\n ${2:reason} = \\\\$refusal.reason', documentation: `Records the refusal with ordinary event productions. ${refusalAvailability}` },\n];\n\nexport const triggerItems: CompletionEntry[] = [\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Names the repository relative file this declaration is realized by, so the document can be navigated back to the code.' },\n { label: 'description', insertText: 'description \"${1:when this occurs}\"', documentation: 'What makes an occurrence of this trigger happen.' },\n { label: 'value', insertText: '${1:name} ${2:Type}', documentation: 'A value an occurrence hands the reaction. The type is optional.' },\n];\n\nexport const specificationItems: CompletionEntry[] = [\n { label: 'parameter', insertText: 'parameter ${1:name} ${2:Type}', documentation: 'One typed value, supplied exactly once by every case.' },\n { label: 'case', insertText: 'case ${1:Name}\\n ${2:parameter} = ${3:value}', documentation: 'One named complete set of concrete parameter values.' },\n { label: 'given caller as', insertText: 'given caller as ${1:Persona}', documentation: 'An authenticated deterministic witness of a top-level persona; no body. Use explicit callers for negation, ownership claims and implementations.' },\n { label: 'description', insertText: 'description \"${1:rule or case witnessed}\"', documentation: 'Authoring-only description of what this scenario demonstrates.' },\n { label: 'when redelivered', insertText: 'when redelivered ${1:Event} to ${2:Reaction}\\n for ${3:value}', documentation: `Selects exactly one given event occurrence for one event-trigger reaction; does not append it again. ${refusalAvailability}` },\n { label: 'given operation fails', insertText: 'given operation ${1:Name} fails', documentation: 'Failure fixture leaf; not admitted by any supported executable model (ESM) version yet (PLAY0268).' },\n { label: 'then operation', insertText: 'then operation ${1:Name}\\n ${2:input} = ${3:value}', documentation: 'Partial requested-operation assertion; not admitted by any supported executable model (ESM) version yet (PLAY0268).' },\n { label: 'then compensated', insertText: 'then compensated ${1:Name}', documentation: 'Compensation assertion leaf; not admitted by any supported executable model (ESM) version yet (PLAY0268).' },\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Names the repository relative file this declaration is realized by, so the document can be navigated back to the code.' },\n { label: 'given', insertText: 'given ${1:EventType}\\n ${2:property} = ${3:value}', documentation: 'Establishes prior state by replaying an event before the command runs.' },\n { label: 'given readmodel', insertText: 'given readmodel ${1:ReadModelType}\\n ${2:property} = ${3:value}', documentation: 'Establishes prior read model state directly.' },\n { label: 'when', insertText: 'when ${1:CommandType}\\n ${2:property} = ${3:value}', documentation: 'The command being exercised.' },\n { label: 'then', insertText: 'then ${1:EventType}\\n ${2:property} = ${3:value}', documentation: 'An event expected to be produced by the command.' },\n { label: 'then readmodel', insertText: 'then readmodel ${1:ReadModelType}\\n ${2:property} = ${3:value}', documentation: 'The read model state expected after the command.' },\n { label: 'then no readmodel', insertText: 'then no readmodel ${1:ReadModelType} for ${2:key}', documentation: 'Asserts that precisely one keyed read-model instance does not exist; another key may still be present.' },\n { label: 'then query', insertText: 'then query ${1:QueryName}\\n arguments\\n ${2:argument} = ${3:value}\\n result\\n ${4:property} = ${5:value}', documentation: 'The ordered query results expected for explicit arguments. Remove the result block to assert an empty result.' },\n { label: 'then error', insertText: 'then error', documentation: 'A rejection, for a reason this specification does not name.' },\n { label: 'then error \"...\"', insertText: 'then error \"${1:reason}\"', documentation: 'A rejection, for the named reason.' },\n { label: 'given clock', insertText: 'given clock \"${1:2026-10-05T08:00:00Z}\"', documentation: 'The instant the scenario happens at - the occurrence time of everything it does. At most once.' },\n { label: 'given capture', insertText: 'given capture ${1:Capture}\\n ${2:field} = ${3:value}', documentation: 'A record the capture\\'s source held before.' },\n { label: 'when clock', insertText: 'when clock \"${1:2026-10-05T09:00:00Z}\"', documentation: 'The clock reaches an instant, as the action.' },\n { label: 'when trigger', insertText: 'when trigger ${1:Trigger}\\n ${2:value} = ${3:value}', documentation: 'An application trigger fires, as the action.' },\n { label: 'when capture', insertText: 'when capture ${1:Capture}\\n ${2:field} = ${3:value}', documentation: 'The record a capture\\'s source holds now, as the action.' },\n { label: 'when query', insertText: 'when query ${1:Query}\\n ${2:argument} = ${3:value}', documentation: 'Performs a query, as the action.' },\n { label: 'then result', insertText: 'then result\\n ${1:property} = ${2:value}', documentation: 'One result the query performed by `when query` returns, in order.' },\n { label: 'then no result', insertText: 'then no result', documentation: 'The query performed by `when query` returns nothing.' },\n { label: 'then no events', insertText: 'then no events', documentation: 'Syntax-only assertion of no new events after a non-append action (PLAY0268); cannot accompany event, error or denial expectations.' },\n];\n\n// What follows a 'given', 'when' or 'then' already typed in a specification.\nexport const specificationStepItems: Record<'given' | 'when' | 'then', CompletionEntry[]> = {\n given: [\n { label: 'operation', insertText: 'operation ${1:Name} fails', documentation: 'Syntax-only failure fixture; no children.' },\n { label: 'clock', insertText: 'clock \"${1:2026-10-05T08:00:00Z}\"', documentation: 'The instant the scenario happens at - the occurrence time of everything it does.' },\n { label: 'capture', insertText: 'capture ${1:Capture}\\n ${2:field} = ${3:value}', documentation: 'A record the capture\\'s source held before. Repeat it for several records.' },\n { label: 'readmodel', insertText: 'readmodel ${1:ReadModelType}\\n ${2:property} = ${3:value}', documentation: 'Establishes prior read model state directly.' },\n { label: 'caller', insertText: 'caller\\n ${1:authenticated}', documentation: 'The identity the scenario runs as.' },\n ],\n when: [\n { label: 'redelivered', insertText: 'redelivered ${1:Event} to ${2:Reaction}\\n for ${3:value}', documentation: `Selects exactly one given event occurrence for one reaction. ${refusalAvailability}` },\n { label: 'clock', insertText: 'clock \"${1:2026-10-05T09:00:00Z}\"', documentation: 'The clock reaches an instant - what a scheduled reaction responds to.' },\n { label: 'trigger', insertText: 'trigger ${1:Trigger}\\n ${2:value} = ${3:value}', documentation: 'An application trigger fires, with the values it carries.' },\n { label: 'capture', insertText: 'capture ${1:Capture}\\n ${2:field} = ${3:value}', documentation: 'The record a capture\\'s source holds now.' },\n { label: 'query', insertText: 'query ${1:Query}\\n ${2:argument} = ${3:value}', documentation: 'Performs a query; assert what it returns with `then result` or `then no result`.' },\n { label: 'append', insertText: 'append ${1:EventType}\\n ${2:property} = ${3:value}', documentation: 'An event occurs, instead of a command being executed.' },\n ],\n then: [\n { label: 'operation', insertText: 'operation ${1:Name}\\n ${2:input} = ${3:value}', documentation: 'Syntax-only partial operation assertion; not admitted by any supported executable model (ESM) version yet.' },\n { label: 'compensated', insertText: 'compensated ${1:Name}', documentation: 'Syntax-only compensation assertion; no children.' },\n { label: 'returns value', insertText: 'returns ${1:value}', documentation: 'Scalar response expectation, compared by semantic value equality. Executable as ESM v7.' },\n { label: 'returns block', insertText: 'returns\\n ${1:field} = ${2:value}', documentation: 'Nonempty subset of response fields asserted by name. Executable as ESM v7.' },\n { label: 'result', insertText: 'result\\n ${1:property} = ${2:value}', documentation: 'One result the query performed by `when query` returns, in order.' },\n { label: 'result exactly', insertText: 'result exactly\\n ${1:property} = ${2:value}', documentation: 'One result, with every property asserted.' },\n { label: 'no result', insertText: 'no result', documentation: 'The query performed by `when query` returns nothing.' },\n { label: 'no events', insertText: 'no events', documentation: 'Syntax-only assertion of no new events after a non-append action; not yet executable (PLAY0268).' },\n { label: 'readmodel', insertText: 'readmodel ${1:ReadModelType}\\n ${2:property} = ${3:value}', documentation: 'The read model state expected afterwards.' },\n { label: 'error', insertText: 'error \"${1:reason}\"', documentation: 'A rejection, for the named reason.' },\n { label: 'denied', insertText: 'denied', documentation: 'The action is denied to the caller.' },\n ],\n};\n\nexport const namedRuleImplementationItems: CompletionEntry[] = [\n { label: 'hint', insertText: 'hint \"${1:predicate guidance}\"', documentation: 'Ordered nonblank authoring guidance. Does not execute or confirm the predicate.' },\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'The sole named-rule predicate attachment.' },\n { label: 'csharp', insertText: fenced('csharp'), documentation: 'Opaque named-rule predicate returning a bool. Requires an admitting target.' },\n];\n\nexport const commandRuleItems: CompletionEntry[] = [\n { label: 'implementation', insertText: 'implementation\\n hint \"${1:predicate guidance}\"', documentation: 'Command named-rule intent with optional file or tagged fence. Pending intent cannot bind.' },\n ...namedRuleImplementationItems.filter(item => item.label !== 'hint'),\n];\n\nexport const ruleItems: CompletionEntry[] = [\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Gives the named predicate its implementation in an external C# file.' },\n { label: 'csharp', insertText: fenced('csharp'), documentation: 'Gives the named predicate its implementation as inline C# returning a bool.' },\n];\n\nexport const policyItems: CompletionEntry[] = [\n { label: 'description', insertText: 'description \"${1:authorization intent}\"', documentation: 'Report-only description; does not supply an implementation.' },\n { label: 'require authenticated', insertText: 'require authenticated', documentation: 'Requires an authenticated caller.' },\n { label: 'require role', insertText: 'require role \"${1:role}\"', documentation: 'Requires the caller to have a role.' },\n { label: 'require not role', insertText: 'require not role \"${1:role}\"', documentation: 'Excludes callers with a role. Add authenticated to require a signed-in caller.' },\n { label: 'require not claim', insertText: 'require not claim \"${1:claim}\" matches ${2:subject}', documentation: 'Requires that no claim value matches the subject or a value.' },\n { label: 'require claim', insertText: 'require claim \"${1:claim}\" matches ${2:subject}', documentation: 'Requires a claim to match the subject or a value.' },\n { label: 'csharp', insertText: fenced('csharp'), documentation: 'Fully custom policy logic in C#, returning a bool.' },\n];\n\nexport const validateItems: CompletionEntry[] = [\n { label: 'not empty', insertText: '${1:property} not empty message \"${2:message}\"', documentation: 'The property must have a value.' },\n { label: 'max', insertText: '${1:property} max ${2:500} message \"${3:message}\"', documentation: 'Maximum length or value.' },\n { label: 'min', insertText: '${1:property} min ${2:1} message \"${3:message}\"', documentation: 'Minimum length or value.' },\n { label: 'matches', insertText: '${1:property} matches \"${2:pattern}\" message \"${3:message}\"', documentation: 'The property must match a regular expression.' },\n { 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.' },\n { label: '==', insertText: '${1:property} == ${2:value} message \"${3:message}\"', documentation: 'The property must equal the value.' },\n { label: '!=', insertText: '${1:property} != ${2:value} message \"${3:message}\"', documentation: 'The property must not equal the value.' },\n { label: 'length ==', insertText: '${1:property} length == ${2:3} message \"${3:message}\"', documentation: 'The property must have an exact length.' },\n { label: 'all >', insertText: '${1:collection}.${2:property} all > ${3:0} message \"${4:message}\"', documentation: 'Every element of a collection must satisfy the comparison.' },\n];\n\nexport const screenItems: CompletionEntry[] = [\n { label: 'description', insertText: 'description \"${1:screen intent}\"', documentation: 'Report-only description, not a localizable screen title.' },\n { label: 'data', insertText: 'data ${1:ReadModel} via query ${2:QueryName}', documentation: 'Binds a read model to the screen through a query.' },\n { label: 'action', insertText: 'action ${1:CommandName}', documentation: 'Makes a command available as an action on the screen.' },\n { label: 'action \"…\"', insertText: 'action \"${1:Label}\"\\n when item.${2:status} == \"${3:open}\" execute ${4:CommandName}\\n otherwise hidden', documentation: 'One labeled button selecting the first matching command; hidden without a subject or match.' },\n { label: 'layout', insertText: 'layout ${1:LayoutName}', documentation: 'Uses a layout template and fills its slots.' },\n { label: 'section', insertText: 'section ${1:name}', documentation: 'A named structural section of the screen.' },\n { label: 'table', insertText: 'table ${1:name}\\n column ${2:property} label \"${3:text}\"', documentation: 'A table widget over a read model or collection.' },\n { label: 'summary', insertText: 'summary ${1:ReadModel}\\n field ${2:property} label \"${3:text}\"', documentation: 'A summary widget showing labeled fields.' },\n { label: 'title', insertText: 'title \"${1:text}\"', documentation: 'The title of the screen or section.' },\n { label: 'file', insertText: 'file ${1:Path}', documentation: 'Full external implementation — Stage uses the referenced file.' },\n { label: 'react', insertText: fenced('react'), documentation: 'Inline React/TSX component receiving the data contract as Props.' },\n { label: 'typescript', insertText: fenced('typescript'), documentation: 'Inline plain TypeScript.' },\n { label: 'html', insertText: fenced('html'), documentation: 'Inline static HTML.' },\n];\n\nexport const actionItems: CompletionEntry[] = [\n { label: 'navigate to', insertText: 'navigate to ${1:ScreenName}', documentation: 'Navigates to a screen after the action completes.' },\n { label: 'label', insertText: 'label \"${1:text}\"', documentation: 'The display label of the action.' },\n];\n\nexport const guardedActionItems: CompletionEntry[] = [\n { label: 'when … execute', insertText: 'when item.${1:status} == \"${2:open}\" execute ${3:CommandName}', documentation: 'First matching alternative selects the command; authorization never falls through.' },\n { label: 'otherwise hidden', insertText: 'otherwise hidden', documentation: 'Hides the action when no alternative matches; also the default.' },\n { label: 'otherwise execute', insertText: 'otherwise execute ${1:CommandName}', documentation: 'Selects a fallback command when no alternative matches and a subject exists.' },\n ...actionItems.filter(item => item.label !== 'label'),\n];\n\nexport const interactionActionItems: CompletionEntry[] = [\n { label: 'execute', insertText: 'execute ${1:CommandName}', documentation: 'Executes a command; denial never selects another alternative.' },\n { label: 'navigate to', insertText: 'navigate to ${1:ScreenName}', documentation: 'Navigates to the named screen.' },\n { label: 'open dialog', insertText: 'open dialog ${1:DialogTemplate}', documentation: 'Opens a dialog.' },\n { label: 'notify', insertText: 'notify info \"${1:Message}\"', documentation: 'Displays a message.' },\n { label: 'confirm', insertText: 'confirm \"${1:Message}\"\\n on success\\n execute ${2:CommandName}', documentation: 'Asks before continuing.' },\n { label: 'refresh', insertText: 'refresh ${1:QueryName}', documentation: 'Refreshes a query-backed element.' },\n];\n\nexport const interactionChoiceItems: CompletionEntry[] = [\n { label: 'when …', insertText: 'when item.${1:status} == \"${2:open}\"\\n execute ${3:CommandName}', documentation: 'Selects a whole action list once against the rendered subject at gesture time.' },\n { label: 'otherwise', insertText: 'otherwise\\n notify info \"${1:Message}\"', documentation: 'Final fallback list; without a subject nothing runs, including fallback.' },\n ...interactionActionItems,\n];\n\nexport const actionArgumentItems: CompletionEntry[] = [\n { label: 'with … from', insertText: 'with ${1:property} from item.${2:property}', documentation: 'Explicit input binding for this command alternative, before same-name item fields or its form.' },\n];\n\nexport const tableItems: CompletionEntry[] = [\n { label: 'column', insertText: 'column ${1:property} label \"${2:text}\"', documentation: 'A column bound to a property.' },\n { label: 'on row-click', insertText: 'on row-click navigate to ${1:ScreenName} by ${2:param}', documentation: 'Navigates when a row is clicked.' },\n];\n\nexport const contextVariableItems: CompletionEntry[] = [\n ...identityProperties.map(property => ({\n label: `$identity.${property}${property === 'claims' ? '.' : ''}`,\n insertText: `$identity.${property}${property === 'claims' ? '.${1:name}' : ''}`,\n documentation: `The caller's ${property}, equivalent to $context.identity.${property}.`,\n })),\n { label: '$context.occurred', insertText: '$context.occurred', documentation: 'When the command or query was received.' },\n { label: '$context.tenant', insertText: '$context.tenant', documentation: 'The tenant the command or query is executing for.' },\n { label: '$context.command.', insertText: '$context.command.${1:property}', documentation: 'A property of the command being handled.' },\n { label: '$context.arguments.', insertText: '$context.arguments.${1:name}', documentation: 'An argument of the query being performed.' },\n { label: '$context.causedBy.subject', insertText: '$context.causedBy.subject', documentation: 'Subject of the identity that caused the command or query.' },\n { label: '$context.causedBy.name', insertText: '$context.causedBy.name', documentation: 'Display name of the identity that caused the command or query.' },\n { label: '$context.causedBy.userName', insertText: '$context.causedBy.userName', documentation: 'User name of the identity that caused the command or query.' },\n { label: '$context.causation.type', insertText: '$context.causation.type', documentation: 'What caused this — a command, a reactor, a schedule.' },\n { label: '$context.identity.id', insertText: '$context.identity.id', documentation: 'The identifier of the caller from the auth token.' },\n { label: '$context.identity.name', insertText: '$context.identity.name', documentation: 'The display name of the caller.' },\n { label: '$context.identity.userName', insertText: '$context.identity.userName', documentation: 'The user name of the caller.' },\n { label: '$context.identity.isAuthenticated', insertText: '$context.identity.isAuthenticated', documentation: 'Whether the caller is authenticated.' },\n { label: '$context.identity.roles', insertText: '$context.identity.roles', documentation: 'The roles the caller holds.' },\n { label: '$context.identity.claims.', insertText: '$context.identity.claims.${1:name}', documentation: 'The value of a claim the caller carries.' },\n { label: '$env.', insertText: '$env.${1:VAR_NAME}', documentation: 'An environment variable.' },\n // Every $eventContext path the event-context catalog lists, for projections - the underlying value of a concept\n // is left out, it reads the same as the member it belongs to.\n ...eventContextPaths\n .filter((path) => path.name !== 'value')\n .map((path) => ({ label: `$eventContext.${path.path}`, insertText: `$eventContext.${path.path}`, documentation: `${path.description} (PDL)` })),\n];\n\nexport { moduleScopeItems as moduleItems, featureScopeItems as featureItems } from './scope-items';\n\n// What a slice of each type can hold. A slice of an unknown type keeps everything.\nconst sliceMembers: Record<string, readonly string[]> = {\n StateChange: ['operation', 'file', 'description', 'event', 'event generation', 'command', 'constraint', 'screen', 'specification'],\n StateView: ['file', 'description', 'readmodel', 'query', 'query observable', 'projection', 'reducer', 'screen', 'specification', 'event', 'event generation'],\n Automation: ['operation', 'file', 'description', 'reaction', 'reducer', 'command', 'event', 'event generation', 'readmodel', 'specification'],\n Translate: ['file', 'description', 'capture', 'event', 'event generation', 'specification'],\n};\n\nexport function sliceItemsFor(sliceType: string | undefined): CompletionEntry[] {\n const members = sliceType ? sliceMembers[sliceType] : undefined;\n return members ? sliceItems.filter(item => item.label === 'purpose' || item.label === 'example' || item.label === 'documentation' || item.label === 'public event' || item.label === 'event from' || (item.label === 'direction' && sliceType === 'Translate') || members.includes(item.label)) : sliceItems;\n}\n"],"mappings":"sZAWA,MAAaA,EAAuC,CAChD,CAAE,MAAO,WAAY,WAAY,WAAY,cAAe,kEAAmE,CACnI,EAUM,OAAU,GAAgB,SAASC,EAAI,iBAIhCC,EAAmC,CAC5C,CAAE,MAAO,cAAe,WAAY,oCAAqC,cAAe,gCAAiC,EACzH,CAAE,MAAO,oBAAqB,WAAY,gDAAi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BA,EAAK,QAAU,aAAewC,IAAc,aAAgBD,EAAQ,SAASvC,EAAK,KAAK,CAAC,EAAIG,CACtS"}
@@ -0,0 +1,5 @@
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{enclosingChain as e,enclosingHeaders as t,fenceMap as n,indentOf as r,nearestEnclosingLine as i,withoutComment as a}from"./document-context.js";import{purposeItems as o}from"./purpose-items.js";import{authenticationItems as s,behaviorItems as c,contributeItems as l,featureScopeItems as u,formItems as d,layoutItems as f,moduleScopeItems as p,outcomeItems as m,personaItems as h,readModelItems as g,reducerItems as _,seedItems as v,templateItems as y,themeItems as b,uiProfileItems as x}from"./scope-items.js";import{actionArgumentItems as S,actionItems as C,commandItems as w,commandRuleItems as T,conceptItems as E,constraintItems as D,eventItems as O,guardedActionItems as k,handlerItems as A,identityItems as j,implementationItems as M,inlineEventItems as ee,interactionActionItems as N,interactionChoiceItems as P,invocationItems as F,namedRuleImplementationItems as I,operationImplementationItems as L,operationItems as R,operationPhaseItems as z,optionalTypeItems as B,performerItems as V,policyItems as H,producesItems as U,queryItems as W,reactionItems as G,reactionTriggerItems as K,refusalItems as q,ruleItems as J,screenItems as Y,sliceItemsFor as X,specificationItems as Z,specificationStepItems as Q,tableItems as te,topLevelItems as ne,triggerItems as re,typeItems as ie,validateItems as ae}from"./completion-items.js";import{scanDocument as $}from"./symbols.js";import{responseCompletions as oe}from"./response-completions.js";import{exampleCompletions as se}from"./example-authoring.js";import{refusalContext as ce}from"./refusal-context.js";import{namedRuleContext as le}from"./named-rule-context.js";import{dependencyTargetCompletions as ue}from"./dependency-completions.js";import{structureCompletion as de}from"./structure-completions.js";import{getSubLanguage as fe}from"./sub-language-registry.js";const pe=/(?:^|\s)rule\s+[A-Za-z_]\w*(?:\s+severity\s+(?:information|warning|error))?(?:\s+message\s+.*)?$/,declaredIn=(e,t)=>e.some(e=>RegExp(`^${t}\\b`).test(e));function topLevelEntries(e){return ne.filter(t=>!(t.label===`domain`&&declaredIn(e,`domain`))&&!(t.label===`authentication`&&declaredIn(e,`authentication`))&&!(t.label===`identity`&&declaredIn(e,`identity`)))}const isTemplate=e=>/^(?:screen|dialog)\s+template\b/.test(e??``);function expansionEntry(e,t){let n=e.split(`
2
+ `).map((e,n)=>n===0?e:e.slice(Math.min(t,r(e)))).join(`
3
+ `);return{label:e.split(`
4
+ `)[0].trim(),insertText:n.replace(/[$}\\]/g,`\\$&`),documentation:`Expands the whole block from what the command and its events declare.`}}function completionEntriesFor(e,t={headers:[],document:[]}){let n=e[0];if(n===void 0||n===`domain`)return topLevelEntries(t.document);let r=fe(n);if(r)return r.completions??[];let i=t.headers[0];switch(n){case`purpose`:return o;case`module`:return p;case`feature`:return u;case`slice`:return X(i?.split(/\s+/)[1]);case`concept`:return E;case`type`:return ie;case`command`:return w;case`public`:case`event`:return O;case`readmodel`:return g;case`reducer`:return _;case`form`:return d;case`contribute`:return l;case`behavior`:return c;case`persona`:return h;case`identity`:return j;case`authentication`:return s;case`seed`:return v;case`theme`:return b;case`ui`:return x;case`on`:case`success`:case`failure`:case`confirm`:return m;case`layout`:return f;case`system`:return R.filter(e=>e.label===`description`);case`operation`:return R;case`execute`:case`compensate`:return z;case`produces`:return U;case`handler`:return A;case`implementation`:return e[1]===`handler`?M:[`execute`,`compensate`].includes(e[1])?L:[];case`query`:return W;case`performer`:return V;case`constraint`:return D;case`reaction`:return G;case`invokes`:return e.includes(`reaction`)?F:[];case`trigger`:return re;case`when`:case`every`:case`at`:return e.includes(`reaction`)?K:[];case`specification`:return Z;case`policy`:return H;case`validate`:return ae;case`action`:return C;case`table`:case`summary`:return te;case`screen`:return isTemplate(i)?y:Y;case`dialog`:return y;default:return isTemplate(t.headers.find(e=>isTemplate(e)))?y:e.includes(`screen`)||n===`section`?Y:e.includes(`produces`)?U:[]}}function planCompletions(o,s,c,l=$(o)){let u=n(o);if(u[s]||a(c).length<c.length)return{kind:`none`};if(/^\s*concept\s+[\p{L}\p{Mn}\p{Nd}\p{Pc}]+\s*:\s*\w+\s+(?:(?:pii|personal|secret)\s+)*\w*$/u.test(c))return{kind:`entries`,entries:[`pii`,`secret`].filter(e=>!RegExp(`\\b${e}\\b`).test(c)).map(e=>({label:e,insertText:e,documentation:e===`pii`?`personal data (GDPR Art. 4(1)); renders Chronicle [PII]`:`Operational secret; renders [Encrypted] + [NotAudited].`}))};let d=e(o,u,s,r(c))[0]===`concept`;if(d&&/^\s*(?:secret|sensitive|@sensitive)\s+scope\s+\w*$/.test(c))return{kind:`entries`,entries:[`subject`,`namespace`,`global`].map(e=>({label:e,insertText:e,documentation:`Explicit secret encryption scope.`}))};if(d&&/^\s*(?:pii|personal|@pii)\s+special\s+\w*$/.test(c))return{kind:`entries`,entries:[`racialOrEthnicOrigin`,`politicalOpinions`,`religiousOrPhilosophicalBeliefs`,`tradeUnionMembership`,`genetic`,`biometric`,`health`,`sexLifeOrSexualOrientation`].map(e=>({label:e,insertText:e,documentation:`GDPR Art. 9(1) special category.`}))};let f=se(o,s,c)??oe(o,s,c,$(o));if(f!==null)return{kind:`entries`,entries:f};let p=ue(o,s,c,l);if(p!==null)return{kind:`entries`,entries:p};let m=c.match(/^\s*import\s+"([^"]*)$/);if(m)return{kind:`playFiles`,replaceLength:m[1].length};if(/["/]$/.test(c))return{kind:`none`};let h=ce(o,s,r(o[s]??c));if(/\$refusal\.\w*$/.test(c))return{kind:`entries`,entries:h===void 0?[]:[`reason`,`message`,.../^on\s+refused\s+by\s+constraint(?:\s|$)/.test(h)?[`constraint`]:[]].map(e=>({label:e,insertText:e,documentation:`String refusal value; syntax-only, not yet executable (PLAY0268).`}))};let g=c.match(/\$[\w.]*$/);if(g)return{kind:`contextVariables`,replaceLength:g[0].length};let _=o[s]??``,v=c.trim().length===0?c.length:r(_),y=e(o,u,s,v);if(y.includes(`screen`)){let e=v,t=!1;for(let n=s-1;n>=0;n--){if(u[n])continue;let i=a(o[n]);if(!(i.trim().length===0||r(i)>=e)){if(e=r(i),/^\s*action\s+(?:"|\$strings\.)/.test(i)){t=!0;break}if(/^\s*screen\b/.test(i))break}}if(t){if(/^\s*(?:when\b.*|otherwise)\s+execute\s+[\w.]*$/.test(c))return{kind:`commands`};if(y[0]===`action`)return{kind:`entries`,entries:k};if([`when`,`otherwise`].includes(y[0])){let e=i(o,u,s,v)??``;return{kind:`entries`,entries:/\bexecute\s+[\w.]+$/.test(e)?S:[]}}}}if([`on`,`when`,`otherwise`].includes(y[0])){let e=v;for(let t=s-1;t>=0;t--){if(u[t])continue;let n=a(o[t]);if(!(n.trim().length===0||r(n)>=e)){if(e=r(n),/^\s*on\s+(?:click|double click|select)\s*$/.test(n))return{kind:`entries`,entries:y[0]===`on`?P:N};if(/^\s*(?:screen|behavior|specification|reaction)\b/.test(n))break}}}if(y[0]===`on`&&h!==void 0)return{kind:`entries`,entries:q};let b=le(o,s,v);if(b===`implementation`)return{kind:`entries`,entries:I};if(b===`rule`)return{kind:`entries`,entries:T};let x=[`public`,`event`,`command`,`type`,`readmodel`,`trigger`,`when`,`every`,`at`].includes(y[0])||y[0]===`produces`&&/^produces\s+event\b/.test(i(o,u,s,v)??``),C=c.trimStart().split(/\s+/)[0],w=y[0]===`command`&&[`reads`,`authorize`,`produces`].includes(C)||y[0]===`event`&&C===`tag`||[`trigger`,`when`,`every`,`at`].includes(y[0])&&[`description`,`file`,`reads`,`produces`,`invokes`].includes(C),optionalPrefix=e=>e!==null&&`optional`.startsWith(e[1]),E=x&&!w&&optionalPrefix(c.match(/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?\s+(\w*)$/)),D=y[0]===`query`&&optionalPrefix(c.match(/^\s*(?:by|filter)\s+[a-z_]\w*\s+[\w.]+(?:\[\])?\s+(\w*)$/))||optionalPrefix(c.match(/^\s*query\s+[A-Za-z_]\w*\s*=>\s*(?:observable\s+)?[\w.]+(?:\[\])?\s+(\w*)$/)),O=(y[0]===`event`||y[0]===`produces`&&/^produces\s+event\b/.test(i(o,u,s,v)??``))&&!w?c.match(/^\s*@?[a-z_]\w*\s+([\w.]+)\s+(\w*)$/):null,A=l.concepts.find(e=>e.name===O?.[1]),j=A?.primitive??O?.[1],M=(j===`String`||j===`Uuid`||j===`Int`&&A!==void 0)&&!A?.attributes.some(e=>[`pii`,`personal`,`secret`,`sensitive`].includes(e.replace(/^@/,``))),F=O!==null&&M&&`subject`.startsWith(O[2]),L=[...(E||D)&&!/=>\s*observable\s+$/.test(c)?B:[],...F?[{label:`subject`,insertText:`subject`,documentation:`One required scalar event data-subject identity; not pii or secret. Report-only lineage metadata (PLAY0270), no ESM or provider output yet.`}]:[]];if(L.length>0)return{kind:`entries`,entries:L};if(/\bauthorize\s+[\w\s]*$/.test(c)||y[0]===`authorize`)return{kind:`policies`};if(/\bwhen\s+\w*$/.test(c)&&y.includes(`reaction`))return{kind:`triggers`};if(/\bon\s+\w*$/.test(c)&&y.includes(`constraint`))return{kind:`events`};if(/\binvokes\s+\w*$/.test(c)&&y.includes(`reaction`))return{kind:`commands`};if(/\b(?:on|unique\s+event)\s+\w*$/.test(c)&&y[0]===`constraint`)return{kind:`events`};if(/\bproduces\s+\w*$/.test(c))return{kind:`producesTargets`};if(/\bnavigate\s+to\s+\w*$/.test(c))return{kind:`screens`};if(y[0]===`specification`){if(/^\s*when\s+query\s+[\w.]*$/.test(c))return{kind:`queries`};let e=c.match(/^\s*(given|when|then)\s+\w*$/);if(e)return{kind:`entries`,entries:Q[e[1]]}}if(/\b(?:via|then)\s+query\s+[\w.]*$/.test(c))return{kind:`queries`};if((y[0]===`event`||y[0]===`command`||y[0]===`type`)&&/^\s+[a-z_]\w*\s+[\w[\]?]*$/.test(c)||y[0]===`query`&&/^\s+(?:by|filter)\s+[a-z_]\w*\s+[\w[\]?]*$/.test(c))return{kind:`types`};let z=i(o,u,s,v);if(z&&/^produces\s+operation\b/.test(z))return{kind:`entries`,entries:R};if(z&&/^produces\s+event\b/.test(z))return/^\s+@?[a-z_]\w*\s+[\w[\]?]*$/.test(c)?{kind:`types`}:{kind:`entries`,entries:ee};if(z&&pe.test(z))return{kind:`entries`,entries:J};let V=t(o,u,s,v);if(y[0]===`for`&&y.includes(`seed`))return{kind:`events`};let H=completionEntriesFor(y,{headers:V,document:o}),U=y[0]===`command`?de(o,s,` `.repeat(v),``,l):null;return{kind:`entries`,entries:U?[expansionEntry(U.text,v),...H]:H}}export{completionEntriesFor,planCompletions};
5
+ //# sourceMappingURL=completion-planner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion-planner.js","names":["items.moduleItems","items.featureItems","items.sliceItemsFor","items.conceptItems","items.typeItems","items.commandItems","items.eventItems","scope.readModelItems","scope.reducerItems","scope.formItems","scope.contributeItems","scope.behaviorItems","scope.personaItems","items.identityItems","scope.authenticationItems","scope.seedItems","scope.themeItems","scope.uiProfileItems","scope.outcomeItems","scope.layoutItems","items.operationItems","items.operationPhaseItems","items.producesItems","items.handlerItems","items.implementationItems","items.operationImplementationItems","items.queryItems","items.performerItems","items.constraintItems","items.reactionItems","items.invocationItems","items.triggerItems","items.reactionTriggerItems","items.specificationItems","items.policyItems","items.validateItems","items.actionItems","items.tableItems","scope.templateItems","items.screenItems","items.guardedActionItems","items.actionArgumentItems","items.interactionChoiceItems","items.interactionActionItems","items.refusalItems","items.namedRuleImplementationItems","items.commandRuleItems","items.optionalTypeItems","items.specificationStepItems","items.inlineEventItems","items.ruleItems","RULE_LINE_PATTERN","document","keyword","line","topLevelItems","item","header","relative","text","index","indent","indentOf","construct","chain","where","subLanguage","getSubLanguage","purposeItems","moduleScopeItems","featureScopeItems","sliceItemsFor","conceptItems","typeItems","commandItems","eventItems","readModelItems","reducerItems","formItems","contributeItems","behaviorItems","personaItems","identityItems","authenticationItems","seedItems","themeItems","uiProfileItems","outcomeItems","layoutItems","operationItems","operationPhaseItems","producesItems","handlerItems","implementationItems","operationImplementationItems","queryItems","performerItems","constraintItems","reactionItems","invocationItems","triggerItems","reactionTriggerItems","specificationItems","policyItems","validateItems","actionItems","tableItems","templateItems","screenItems","candidate","scanDocument","lines","fences","fenceMap","lineIndex","withoutComment","textBefore","marker","inConcept","enclosingChain","scope","category","responseEntries","exampleCompletions","responseCompletions","dependencyEntries","dependencyTargetCompletions","symbols","importPath","refusal","refusalContext","member","contextVariableMatch","currentLine","effectiveIndent","parentIndent","guarded","parent","guardedActionItems","nearestEnclosingLine","actionArgumentItems","interactionChoiceItems","interactionActionItems","refusalItems","ruleContext","namedRuleContext","namedRuleImplementationItems","commandRuleItems","propertyOwner","propertyName","reservedProperty","match","afterPropertyType","afterQueryType","subjectModifier","subjectConcept","concept","subjectType","subjectTarget","attribute","afterSubjectType","modifierEntries","optionalTypeItems","step","specificationStepItems","enclosingLine","inlineEventItems","ruleItems","headers","enclosingHeaders","entries","expansion","structureCompletion"],"sources":["../../completion-planner.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { enclosingChain, enclosingHeaders, fenceMap, indentOf, nearestEnclosingLine, withoutComment } from './document-context';\nimport { refusalContext } from './refusal-context';\nimport { namedRuleContext } from './named-rule-context';\nimport { responseCompletions } from './response-completions';\nimport { dependencyTargetCompletions } from './dependency-completions';\nimport { exampleCompletions } from './example-authoring';\nimport { DocumentSymbols, scanDocument } from './symbols';\nimport { structureCompletion } from './structure-completions';\nimport { getSubLanguage } from './sub-language-registry';\nimport * as items from './completion-items';\nimport * as scope from './scope-items';\nimport { CompletionEntry } from './completion-items';\nimport { purposeItems } from './purpose-items';\n\n// Matches a validation rule line ending in \"rule <Name>\" (optionally followed by a\n// message clause) - both the command form (\"<property> rule <Name>\") and the\n// concept implied-subject form (\"rule <Name>\"). Its first word is the property\n// name, not \"rule\", so it can't be recognized through the chain[0] keyword switch\n// the way \"on <EventType>\" or \"handler\" are - hence the dedicated regex check.\nconst RULE_LINE_PATTERN = /(?:^|\\s)rule\\s+[A-Za-z_]\\w*(?:\\s+severity\\s+(?:information|warning|error))?(?:\\s+message\\s+.*)?$/;\n\nexport type CompletionPlan =\n | { kind: 'none' }\n | { kind: 'entries'; entries: CompletionEntry[] }\n | { kind: 'contextVariables'; replaceLength: number }\n | { kind: 'playFiles'; replaceLength: number }\n | { kind: 'policies' }\n | { kind: 'events' }\n | { kind: 'triggers' }\n | { kind: 'commands' }\n | { kind: 'producesTargets' }\n | { kind: 'screens' }\n | { kind: 'queries' }\n | { kind: 'types' };\n\n// What the position sits inside, beyond the keyword chain: the whole header of each enclosing block, so a\n// slice's type and a template's kind are known, and the document's own lines, so a declaration that may\n// appear once is not offered again.\nexport interface CompletionScope {\n headers: readonly string[];\n document: readonly string[];\n}\n\nconst declaredIn = (document: readonly string[], keyword: string) => document.some(line => new RegExp(`^${keyword}\\\\b`).test(line));\n\nfunction topLevelEntries(document: readonly string[]): CompletionEntry[] {\n return items.topLevelItems.filter(item => !(item.label === 'domain' && declaredIn(document, 'domain')) && !(item.label === 'authentication' && declaredIn(document, 'authentication')) && !(item.label === 'identity' && declaredIn(document, 'identity')));\n}\n\nconst isTemplate = (header: string | undefined) => /^(?:screen|dialog)\\s+template\\b/.test(header ?? '');\n\n// A whole block as one completion entry. Continuation lines are indented relative to the line it is inserted on,\n// which is how the editors indent a multi-line snippet.\nfunction expansionEntry(text: string, indent: number): CompletionEntry {\n const relative = text.split('\\n').map((line, index) => (index === 0 ? line : line.slice(Math.min(indent, indentOf(line))))).join('\\n');\n const label = text.split('\\n')[0].trim();\n return { label, insertText: relative.replace(/[$}\\\\]/g, '\\\\$&'), documentation: 'Expands the whole block from what the command and its events declare.' };\n}\n\nexport function completionEntriesFor(chain: string[], where: CompletionScope = { headers: [], document: [] }): CompletionEntry[] {\n const construct = chain[0];\n if (construct === undefined || construct === 'domain') return topLevelEntries(where.document);\n const subLanguage = getSubLanguage(construct);\n if (subLanguage) return subLanguage.completions ?? [];\n const header = where.headers[0];\n switch (construct) {\n case 'purpose':\n return purposeItems;\n case 'module':\n return items.moduleItems;\n case 'feature':\n return items.featureItems;\n case 'slice':\n return items.sliceItemsFor(header?.split(/\\s+/)[1]);\n case 'concept':\n return items.conceptItems;\n case 'type':\n return items.typeItems;\n case 'command':\n return items.commandItems;\n case 'public':\n case 'event':\n return items.eventItems;\n case 'readmodel':\n return scope.readModelItems;\n case 'reducer':\n return scope.reducerItems;\n case 'form':\n return scope.formItems;\n case 'contribute':\n return scope.contributeItems;\n case 'behavior':\n return scope.behaviorItems;\n case 'persona':\n return scope.personaItems;\n case 'identity':\n return items.identityItems;\n case 'authentication':\n return scope.authenticationItems;\n case 'seed':\n return scope.seedItems;\n case 'theme':\n return scope.themeItems;\n case 'ui':\n return scope.uiProfileItems;\n case 'on':\n case 'success':\n case 'failure':\n case 'confirm':\n return scope.outcomeItems;\n case 'layout':\n return scope.layoutItems;\n case 'system':\n return items.operationItems.filter(item => item.label === 'description');\n case 'operation':\n return items.operationItems;\n case 'execute':\n case 'compensate':\n return items.operationPhaseItems;\n case 'produces':\n return items.producesItems;\n case 'handler':\n return items.handlerItems;\n case 'implementation':\n return chain[1] === 'handler' ? items.implementationItems : ['execute', 'compensate'].includes(chain[1]) ? items.operationImplementationItems : [];\n case 'query':\n return items.queryItems;\n case 'performer':\n return items.performerItems;\n case 'constraint':\n return items.constraintItems;\n case 'reaction':\n return items.reactionItems;\n case 'invokes':\n return chain.includes('reaction') ? items.invocationItems : [];\n case 'trigger':\n return items.triggerItems;\n case 'when':\n case 'every':\n case 'at':\n return chain.includes('reaction') ? items.reactionTriggerItems : [];\n case 'specification':\n return items.specificationItems;\n case 'policy':\n return items.policyItems;\n case 'validate':\n return items.validateItems;\n case 'action':\n return items.actionItems;\n case 'table':\n case 'summary':\n return items.tableItems;\n case 'screen':\n return isTemplate(header) ? scope.templateItems : items.screenItems;\n case 'dialog':\n return scope.templateItems;\n default:\n if (isTemplate(where.headers.find(candidate => isTemplate(candidate)))) return scope.templateItems;\n // Sections inside a screen expose the screen vocabulary.\n if (chain.includes('screen') || construct === 'section') return items.screenItems;\n if (chain.includes('produces')) return items.producesItems;\n return [];\n }\n}\n\n// Decides what to complete at a position, without any editor dependency — the\n// Monaco service and the VSCode extension both materialize the plan into items.\nexport function planCompletions(\n lines: string[],\n lineIndex: number,\n textBefore: string,\n symbols: DocumentSymbols = scanDocument(lines),\n): CompletionPlan {\n const fences = fenceMap(lines);\n if (fences[lineIndex] || withoutComment(textBefore).length < textBefore.length) return { kind: 'none' };\n if (/^\\s*concept\\s+[\\p{L}\\p{Mn}\\p{Nd}\\p{Pc}]+\\s*:\\s*\\w+\\s+(?:(?:pii|personal|secret)\\s+)*\\w*$/u.test(textBefore)) {\n return { kind: 'entries', entries: ['pii', 'secret'].filter(marker => !new RegExp(`\\\\b${marker}\\\\b`).test(textBefore)).map(marker => ({ label: marker, insertText: marker, documentation: marker === 'pii' ? 'personal data (GDPR Art. 4(1)); renders Chronicle [PII]' : 'Operational secret; renders [Encrypted] + [NotAudited].' })) };\n }\n const inConcept = enclosingChain(lines, fences, lineIndex, indentOf(textBefore))[0] === 'concept';\n if (inConcept && /^\\s*(?:secret|sensitive|@sensitive)\\s+scope\\s+\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: ['subject', 'namespace', 'global'].map(scope => ({ label: scope, insertText: scope, documentation: 'Explicit secret encryption scope.' })) };\n }\n if (inConcept && /^\\s*(?:pii|personal|@pii)\\s+special\\s+\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: ['racialOrEthnicOrigin', 'politicalOpinions', 'religiousOrPhilosophicalBeliefs', 'tradeUnionMembership', 'genetic', 'biometric', 'health', 'sexLifeOrSexualOrientation'].map(category => ({ label: category, insertText: category, documentation: 'GDPR Art. 9(1) special category.' })) };\n }\n const responseEntries = exampleCompletions(lines, lineIndex, textBefore) ?? responseCompletions(lines, lineIndex, textBefore, scanDocument(lines));\n if (responseEntries !== null) return { kind: 'entries', entries: responseEntries };\n const dependencyEntries = dependencyTargetCompletions(lines, lineIndex, textBefore, symbols);\n if (dependencyEntries !== null) return { kind: 'entries', entries: dependencyEntries };\n\n // Inside the quotes of a file import, what is wanted is a path - replacing what has been typed so far.\n const importPath = textBefore.match(/^\\s*import\\s+\"([^\"]*)$/);\n if (importPath) {\n return { kind: 'playFiles', replaceLength: importPath[1].length };\n }\n\n // A quote or a slash only asks for a completion inside an import path.\n if (/[\"/]$/.test(textBefore)) return { kind: 'none' };\n\n const refusal = refusalContext(lines, lineIndex, indentOf(lines[lineIndex] ?? textBefore));\n if (/\\$refusal\\.\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: refusal === undefined ? [] : ['reason', 'message', ...(/^on\\s+refused\\s+by\\s+constraint(?:\\s|$)/.test(refusal) ? ['constraint'] : [])].map(member => ({ label: member, insertText: member, documentation: 'String refusal value; syntax-only, not yet executable (PLAY0268).' })) };\n }\n const contextVariableMatch = textBefore.match(/\\$[\\w.]*$/);\n if (contextVariableMatch) {\n return { kind: 'contextVariables', replaceLength: contextVariableMatch[0].length };\n }\n\n const currentLine = lines[lineIndex] ?? '';\n const effectiveIndent =\n textBefore.trim().length === 0 ? textBefore.length : indentOf(currentLine);\n const chain = enclosingChain(lines, fences, lineIndex, effectiveIndent);\n if (chain.includes('screen')) {\n let parentIndent = effectiveIndent;\n let guarded = false;\n for (let index = lineIndex - 1; index >= 0; index--) {\n if (fences[index]) continue;\n const parent = withoutComment(lines[index]);\n if (parent.trim().length === 0 || indentOf(parent) >= parentIndent) continue;\n parentIndent = indentOf(parent);\n if (/^\\s*action\\s+(?:\"|\\$strings\\.)/.test(parent)) { guarded = true; break; }\n if (/^\\s*screen\\b/.test(parent)) break;\n }\n if (guarded) {\n if (/^\\s*(?:when\\b.*|otherwise)\\s+execute\\s+[\\w.]*$/.test(textBefore)) return { kind: 'commands' };\n if (chain[0] === 'action') return { kind: 'entries', entries: items.guardedActionItems };\n if (['when', 'otherwise'].includes(chain[0])) {\n const parent = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? '';\n return { kind: 'entries', entries: /\\bexecute\\s+[\\w.]+$/.test(parent) ? items.actionArgumentItems : [] };\n }\n }\n }\n if (['on', 'when', 'otherwise'].includes(chain[0])) {\n let parentIndent = effectiveIndent;\n for (let index = lineIndex - 1; index >= 0; index--) {\n if (fences[index]) continue;\n const parent = withoutComment(lines[index]);\n if (parent.trim().length === 0 || indentOf(parent) >= parentIndent) continue;\n parentIndent = indentOf(parent);\n if (/^\\s*on\\s+(?:click|double click|select)\\s*$/.test(parent)) {\n return { kind: 'entries', entries: chain[0] === 'on' ? items.interactionChoiceItems : items.interactionActionItems };\n }\n if (/^\\s*(?:screen|behavior|specification|reaction)\\b/.test(parent)) break;\n }\n }\n if (chain[0] === 'on' && refusal !== undefined) return { kind: 'entries', entries: items.refusalItems };\n const ruleContext = namedRuleContext(lines, lineIndex, effectiveIndent);\n if (ruleContext === 'implementation') return { kind: 'entries', entries: items.namedRuleImplementationItems };\n if (ruleContext === 'rule') return { kind: 'entries', entries: items.commandRuleItems };\n\n const propertyOwner = ['public', 'event', 'command', 'type', 'readmodel', 'trigger', 'when', 'every', 'at'].includes(chain[0]) ||\n (chain[0] === 'produces' && /^produces\\s+event\\b/.test(nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? ''));\n const propertyName = textBefore.trimStart().split(/\\s+/)[0];\n const reservedProperty = (chain[0] === 'command' && ['reads', 'authorize', 'produces'].includes(propertyName)) ||\n (chain[0] === 'event' && propertyName === 'tag') ||\n (['trigger', 'when', 'every', 'at'].includes(chain[0]) && ['description', 'file', 'reads', 'produces', 'invokes'].includes(propertyName));\n const optionalPrefix = (match: RegExpMatchArray | null) => match !== null && 'optional'.startsWith(match[1]);\n const afterPropertyType = propertyOwner && !reservedProperty && optionalPrefix(textBefore.match(/^\\s*@?[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+(\\w*)$/));\n const afterQueryType = (chain[0] === 'query' && optionalPrefix(textBefore.match(/^\\s*(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+(\\w*)$/))) ||\n optionalPrefix(textBefore.match(/^\\s*query\\s+[A-Za-z_]\\w*\\s*=>\\s*(?:observable\\s+)?[\\w.]+(?:\\[\\])?\\s+(\\w*)$/));\n const eventPropertyOwner = chain[0] === 'event' || (chain[0] === 'produces' && /^produces\\s+event\\b/.test(nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? ''));\n const subjectModifier = eventPropertyOwner && !reservedProperty ? textBefore.match(/^\\s*@?[a-z_]\\w*\\s+([\\w.]+)\\s+(\\w*)$/) : null;\n const subjectConcept = symbols.concepts.find(concept => concept.name === subjectModifier?.[1]);\n const subjectType = subjectConcept?.primitive ?? subjectModifier?.[1];\n const subjectTarget = (subjectType === 'String' || subjectType === 'Uuid' || (subjectType === 'Int' && subjectConcept !== undefined)) &&\n !subjectConcept?.attributes.some(attribute => ['pii', 'personal', 'secret', 'sensitive'].includes(attribute.replace(/^@/, '')));\n const afterSubjectType = subjectModifier !== null && subjectTarget && 'subject'.startsWith(subjectModifier[2]);\n const modifierEntries = [\n ...((afterPropertyType || afterQueryType) && !/=>\\s*observable\\s+$/.test(textBefore) ? items.optionalTypeItems : []),\n ...(afterSubjectType ? [{ label: 'subject', insertText: 'subject', documentation: 'One required scalar event data-subject identity; not pii or secret. Report-only lineage metadata (PLAY0270), no ESM or provider output yet.' }] : []),\n ];\n if (modifierEntries.length > 0) return { kind: 'entries', entries: modifierEntries };\n\n if (/\\bauthorize\\s+[\\w\\s]*$/.test(textBefore) || chain[0] === 'authorize') {\n return { kind: 'policies' };\n }\n if (/\\bwhen\\s+\\w*$/.test(textBefore) && chain.includes('reaction')) {\n return { kind: 'triggers' };\n }\n if (/\\bon\\s+\\w*$/.test(textBefore) && chain.includes('constraint')) {\n return { kind: 'events' };\n }\n if (/\\binvokes\\s+\\w*$/.test(textBefore) && chain.includes('reaction')) {\n return { kind: 'commands' };\n }\n if (/\\b(?:on|unique\\s+event)\\s+\\w*$/.test(textBefore) && chain[0] === 'constraint') {\n return { kind: 'events' };\n }\n if (/\\bproduces\\s+\\w*$/.test(textBefore)) {\n return { kind: 'producesTargets' };\n }\n if (/\\bnavigate\\s+to\\s+\\w*$/.test(textBefore)) {\n return { kind: 'screens' };\n }\n if (chain[0] === 'specification') {\n if (/^\\s*when\\s+query\\s+[\\w.]*$/.test(textBefore)) return { kind: 'queries' };\n const step = textBefore.match(/^\\s*(given|when|then)\\s+\\w*$/);\n if (step) return { kind: 'entries', entries: items.specificationStepItems[step[1] as 'given' | 'when' | 'then'] };\n }\n if (/\\b(?:via|then)\\s+query\\s+[\\w.]*$/.test(textBefore)) {\n return { kind: 'queries' };\n }\n if (\n (chain[0] === 'event' || chain[0] === 'command' || chain[0] === 'type') &&\n /^\\s+[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)\n ) {\n return { kind: 'types' };\n }\n if (chain[0] === 'query' && /^\\s+(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)) {\n return { kind: 'types' };\n }\n\n const enclosingLine = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent);\n if (enclosingLine && /^produces\\s+operation\\b/.test(enclosingLine)) return { kind: 'entries', entries: items.operationItems };\n if (enclosingLine && /^produces\\s+event\\b/.test(enclosingLine)) {\n if (/^\\s+@?[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)) return { kind: 'types' };\n return { kind: 'entries', entries: items.inlineEventItems };\n }\n if (enclosingLine && RULE_LINE_PATTERN.test(enclosingLine)) {\n return { kind: 'entries', entries: items.ruleItems };\n }\n\n const headers = enclosingHeaders(lines, fences, lineIndex, effectiveIndent);\n if (chain[0] === 'for' && chain.includes('seed')) return { kind: 'events' };\n const entries = completionEntriesFor(chain, { headers, document: lines });\n const expansion = chain[0] === 'command' ? structureCompletion(lines, lineIndex, ' '.repeat(effectiveIndent), '', symbols) : null;\n return { kind: 'entries', entries: expansion ? [expansionEntry(expansion.text, effectiveIndent), ...entries] : entries };\n}\n"],"mappings":"q1DAsBA,MAAMmD,GAAoB,mGAwBpB,YAAc,EAA6B,IAAoBC,EAA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K,GAAiC,CACpH,CACA,GAAI,mCAAmC,KAAK/C,CAAU,EAClD,MAAO,CAAE,KAAM,SAAU,EAQ7B,IALKpD,EAAM,KAAO,SAAWA,EAAM,KAAO,WAAaA,EAAM,KAAO,SAChE,6BAA6B,KAAKoD,CAAU,GAI5CpD,EAAM,KAAO,SAAW,6CAA6C,KAAKoD,CAAU,EACpF,MAAO,CAAE,KAAM,OAAQ,EAG3B,IAAMiD,EAAgB1B,EAAqB5B,EAAOC,EAAQE,EAAWoB,CAAe,EACpF,GAAI+B,GAAiB,0BAA0B,KAAKA,CAAa,EAAG,MAAO,CAAE,KAAM,UAAW,QAASjJ,CAAqB,EAC5H,GAAIiJ,GAAiB,sBAAsB,KAAKA,CAAa,EAEzD,MADI,+BAA+B,KAAKjD,CAAU,EAAU,CAAE,KAAM,OAAQ,EACrE,CAAE,KAAM,UAAW,QAASnE,EAAuB,EAE9D,GAAIoH,GAAiBlH,GAAkB,KAAKkH,CAAa,EACrD,MAAO,CAAE,KAAM,UAAW,QAASnH,CAAgB,EAGvD,IAAMsH,EAAUC,EAAiB1D,EAAOC,EAAQE,EAAWoB,CAAe,EAC1E,GAAItE,EAAM,KAAO,OAASA,EAAM,SAAS,MAAM,EAAG,MAAO,CAAE,KAAM,QAAS,EAC1E,IAAM0G,EAAU,qBAAqB1G,EAAO,CAAE,UAAS,SAAU+C,CAAM,CAAC,EAClE4D,EAAY3G,EAAM,KAAO,UAAY4G,GAAoB7D,EAAOG,EAAW,IAAI,OAAOoB,CAAe,EAAG,GAAIP,CAAO,EAAI,KAC7H,MAAO,CAAE,KAAM,UAAW,QAAS4C,EAAY,CAAC,eAAeA,EAAU,KAAMrC,CAAe,EAAG,GAAGoC,CAAO,EAAIA,CAAQ,CAC3H"}
@@ -0,0 +1,2 @@
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{primitiveTypes as e}from"./language.js";import{typeReferenceSymbol as t,typeReferenceText as n}from"./TypeReferenceSymbol.js";import{contextVariableEntries as r,producesItems as i}from"./completion-items.js";import{knownEventNames as a,knownTriggerNames as o,symbolsForBuffer as s}from"./symbols.js";import{responseCompletions as c}from"./response-completions.js";import{exampleCompletions as l}from"./example-authoring.js";import{operationCompletions as u}from"./operation-authoring.js";import{eventSourceCompletions as d}from"./event-source-authoring.js";import{planCompletions as f}from"./completion-planner.js";function createCompletionProvider(p,m={}){return{triggerCharacters:[` `,`$`,`@`,`.`,`"`,`/`],provideCompletionItems(h,g){let _=h.getLinesContent(),v=g.lineNumber-1,y=(_[v]??``).substring(0,g.column-1),b=m.application?.(h),x=s(_,b),S=l(_,v,y,x)??d(_,v,y,x)??u(_,v,y,x)??c(_,v,y,x),C=S===null?f(_,v,y,x):{kind:`entries`,entries:S};if(C.kind===`none`)return{suggestions:[]};let w=h.getWordUntilPosition(g),T=new p.Range(g.lineNumber,w.startColumn,g.lineNumber,w.endColumn),E=p.languages.CompletionItemKind,D=p.languages.CompletionItemInsertTextRule.InsertAsSnippet,snippet=e=>({label:e.label,kind:e.insertText.includes(`$`)?E.Snippet:E.Keyword,insertText:e.insertText,insertTextRules:D,documentation:e.documentation,sortText:e.sortText,detail:e.detail,range:T}),symbolItem=(e,t,n)=>({label:e,kind:t,insertText:e,detail:n,range:T}),eventNames=()=>{let e=new Set(x.events.filter(e=>e.inline).map(e=>e.name));return[...new Set(a(x))].map(t=>symbolItem(t,E.Event,e.has(t)?`inline event`:`event`))};switch(C.kind){case`playFiles`:{let e=new p.Range(g.lineNumber,g.column-C.replaceLength,g.lineNumber,g.column);return{suggestions:(m.playFiles?.(h)??[]).map(t=>({label:t,kind:t.includes(`*`)?E.Folder:E.File,insertText:t,range:e}))}}case`contextVariables`:{let e=new p.Range(g.lineNumber,g.column-C.replaceLength,g.lineNumber,w.endColumn);return{suggestions:r(x).map(t=>({...snippet(t),range:e}))}}case`policies`:return{suggestions:x.policies.map(e=>symbolItem(e.name,E.Reference,`policy`))};case`events`:return{suggestions:eventNames()};case`triggers`:return{suggestions:[...new Set(o(x))].map(e=>symbolItem(e,E.Event,`trigger`))};case`commands`:return{suggestions:x.commands.map(e=>symbolItem(e.name,E.Method,`command`))};case`producesTargets`:return{suggestions:[...i.map(snippet),...eventNames()]};case`screens`:return{suggestions:x.screens.map(e=>symbolItem(e.name,E.Interface,`screen`))};case`queries`:return{suggestions:x.queries.map(e=>symbolItem(e.name,E.Function,`query => ${n(e.returnTypeReference??t(e.returnType))}`))};case`types`:return{suggestions:[...x.concepts.map(e=>symbolItem(e.name,E.Class,`concept : ${e.primitive}${e.attributes.length?` `+e.attributes.join(` `):``}`)),...x.types.map(e=>symbolItem(e.name,E.Struct,`type (${e.properties.length} properties)`)),...e.map(e=>symbolItem(e,E.Struct,`primitive`))]};case`entries`:return{suggestions:C.entries.map(snippet)}}}}}export{createCompletionProvider};
2
+ //# sourceMappingURL=completions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completions.js","names":["lines","model","lineIndex","position","textBefore","application","options","symbols","symbolsForBuffer","responseEntries","exampleCompletions","eventSourceCompletions","operationCompletions","responseCompletions","plan","planCompletions","word","range","monaco","kinds","asSnippet","entry","name","inlineNames","event","knownEventNames","pathRange","path","variableRange","contextVariableEntries","policy","knownTriggerNames","command","producesItems","screen","query","typeReferenceText","typeReferenceSymbol","concept","type","primitiveTypes","primitive"],"sources":["../../completions.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { editor, languages } from 'monaco-editor';\nimport { typeReferenceSymbol, typeReferenceText } from './TypeReferenceSymbol';\nimport { Monaco, primitiveTypes } from './language';\nimport { DocumentSymbols, knownEventNames, knownTriggerNames, symbolsForBuffer } from './symbols';\nimport { responseCompletions } from './response-completions';\nimport { exampleCompletions } from './example-authoring';\nimport { operationCompletions } from './operation-authoring';\nimport { eventSourceCompletions } from './event-source-authoring';\nimport { planCompletions } from './completion-planner';\nimport { contextVariableEntries, producesItems, CompletionEntry } from './completion-items';\n\n// What a host knows beyond the one model the editor holds.\nexport interface CompletionOptions {\n // The paths a file import written in the model can name, relative to the model's folder - typically\n // importablePaths over the host's .play files. Without it, an import path is not completed.\n playFiles?: (model: editor.ITextModel) => readonly string[];\n application?: (model: editor.ITextModel) => DocumentSymbols;\n // Notify after changing application documents or placement, even when this buffer is unchanged.\n onDidChangeApplication?: (listener: () => void) => { dispose(): void };\n}\n\nexport function createCompletionProvider(monaco: Monaco, options: CompletionOptions = {}): languages.CompletionItemProvider {\n return {\n triggerCharacters: [' ', '$', '@', '.', '\"', '/'],\n\n provideCompletionItems(model, position) {\n const lines = model.getLinesContent();\n const lineIndex = position.lineNumber - 1;\n const currentLine = lines[lineIndex] ?? '';\n const textBefore = currentLine.substring(0, position.column - 1);\n const application = options.application?.(model);\n const symbols = symbolsForBuffer(lines, application);\n const responseEntries = exampleCompletions(lines, lineIndex, textBefore, symbols) ?? eventSourceCompletions(lines, lineIndex, textBefore, symbols) ?? operationCompletions(lines, lineIndex, textBefore, symbols) ?? responseCompletions(lines, lineIndex, textBefore, symbols);\n const plan = responseEntries === null ? planCompletions(lines, lineIndex, textBefore, symbols) : { kind: 'entries' as const, entries: responseEntries };\n if (plan.kind === 'none') return { suggestions: [] };\n\n const word = model.getWordUntilPosition(position);\n const range = new monaco.Range(\n position.lineNumber,\n word.startColumn,\n position.lineNumber,\n word.endColumn,\n );\n const kinds = monaco.languages.CompletionItemKind;\n const asSnippet = monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet;\n\n const snippet = (entry: CompletionEntry): languages.CompletionItem => ({\n label: entry.label,\n kind: entry.insertText.includes('$') ? kinds.Snippet : kinds.Keyword,\n insertText: entry.insertText,\n insertTextRules: asSnippet,\n documentation: entry.documentation,\n sortText: entry.sortText,\n detail: entry.detail,\n range,\n });\n const symbolItem = (\n name: string,\n kind: languages.CompletionItemKind,\n detail: string,\n ): languages.CompletionItem => ({\n label: name,\n kind,\n insertText: name,\n detail,\n range,\n });\n const eventNames = () => {\n const inlineNames = new Set(symbols.events.filter(event => event.inline).map(event => event.name));\n return [...new Set(knownEventNames(symbols))].map((name) => symbolItem(name, kinds.Event, inlineNames.has(name) ? 'inline event' : 'event'));\n };\n\n switch (plan.kind) {\n case 'playFiles': {\n const pathRange = new monaco.Range(\n position.lineNumber,\n position.column - plan.replaceLength,\n position.lineNumber,\n position.column,\n );\n return {\n suggestions: (options.playFiles?.(model) ?? []).map((path) => ({\n label: path,\n kind: path.includes('*') ? kinds.Folder : kinds.File,\n insertText: path,\n range: pathRange,\n })),\n };\n }\n case 'contextVariables': {\n const variableRange = new monaco.Range(\n position.lineNumber,\n position.column - plan.replaceLength,\n position.lineNumber,\n word.endColumn,\n );\n return {\n suggestions: contextVariableEntries(symbols).map((entry) => ({\n ...snippet(entry),\n range: variableRange,\n })),\n };\n }\n case 'policies':\n return {\n suggestions: symbols.policies.map((policy) =>\n symbolItem(policy.name, kinds.Reference, 'policy'),\n ),\n };\n case 'events':\n return { suggestions: eventNames() };\n case 'triggers':\n return {\n suggestions: [...new Set(knownTriggerNames(symbols))].map((name) =>\n symbolItem(name, kinds.Event, 'trigger'),\n ),\n };\n case 'commands':\n return {\n suggestions: symbols.commands.map((command) =>\n symbolItem(command.name, kinds.Method, 'command'),\n ),\n };\n case 'producesTargets':\n return { suggestions: [...producesItems.map(snippet), ...eventNames()] };\n case 'screens':\n return {\n suggestions: symbols.screens.map((screen) =>\n symbolItem(screen.name, kinds.Interface, 'screen'),\n ),\n };\n case 'queries':\n return {\n suggestions: symbols.queries.map((query) =>\n symbolItem(query.name, kinds.Function, `query => ${typeReferenceText(query.returnTypeReference ?? typeReferenceSymbol(query.returnType))}`),\n ),\n };\n case 'types':\n return {\n suggestions: [\n ...symbols.concepts.map((concept) =>\n symbolItem(\n concept.name,\n kinds.Class,\n `concept : ${concept.primitive}${concept.attributes.length ? ' ' + concept.attributes.join(' ') : ''}`,\n ),\n ),\n ...symbols.types.map((type) =>\n symbolItem(\n type.name,\n kinds.Struct,\n `type (${type.properties.length} properties)`,\n ),\n ),\n ...primitiveTypes.map((primitive) =>\n symbolItem(primitive, kinds.Struct, 'primitive'),\n ),\n ],\n };\n case 'entries':\n return { suggestions: plan.entries.map(snippet) };\n }\n },\n };\n}\n"],"mappings":"+pBAwBA,SAAgB,yBAAyB,EAAgB,EAA6B,CAAC,EAAqC,CACxH,MAAO,CACH,kBAAmB,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAEhD,uBAAuB,EAAO,EAAU,CACpC,IAAMA,EAAQC,EAAM,gBAAgB,EAC9BC,EAAYC,EAAS,WAAa,EAElCC,GADcJ,EAAME,IAAc,GAAA,CACT,UAAU,EAAGC,EAAS,OAAS,CAAC,EACzDE,EAAcC,EAAQ,cAAcL,CAAK,EACzCM,EAAUC,EAAiBR,EAAOK,CAAW,EAC7CI,EAAkBC,EAAmBV,EAAOE,EAAWE,EAAYG,CAAO,GAAKI,EAAuBX,EAAOE,EAAWE,EAAYG,CAAO,GAAKK,EAAqBZ,EAAOE,EAAWE,EAAYG,CAAO,GAAKM,EAAoBb,EAAOE,EAAWE,EAAYG,CAAO,EACxQO,EAAOL,IAAoB,KAAOM,EAAgBf,EAAOE,EAAWE,EAAYG,CAAO,EAAI,CAAE,KAAM,UAAoB,QAASE,CAAgB,EACtJ,GAAIK,EAAK,OAAS,OAAQ,MAAO,CAAE,YAAa,CAAC,CAAE,EAEnD,IAAME,EAAOf,EAAM,qBAAqBE,CAAQ,EAC1Cc,EAAQ,IAAIC,EAAO,MACrBf,EAAS,WACTa,EAAK,YACLb,EAAS,WACTa,EAAK,SACT,EACMG,EAAQD,EAAO,UAAU,mBACzBE,EAAYF,EAAO,UAAU,6BAA6B,gBAE1D,QAAW,IAAsD,CACnE,MAAOG,EAAM,MACb,KAAMA,EAAM,WAAW,SAAS,GAAG,EAAIF,EAAM,QAAUA,EAAM,QAC7D,WAAYE,EAAM,WAClB,gBAAiBD,EACjB,cAAeC,EAAM,cACrB,SAAUA,EAAM,SAChB,OAAQA,EAAM,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D,WAAWe,EAAMH,EAAM,MAAO,SAAS,CAC3C,CACJ,EACJ,IAAK,WACD,MAAO,CACH,YAAaZ,EAAQ,SAAS,IAAK,GAC/B,WAAWyB,EAAQ,KAAMb,EAAM,OAAQ,SAAS,CACpD,CACJ,EACJ,IAAK,kBACD,MAAO,CAAE,YAAa,CAAC,GAAGc,EAAc,IAAI,OAAO,EAAG,GAAG,WAAW,CAAC,CAAE,EAC3E,IAAK,UACD,MAAO,CACH,YAAa1B,EAAQ,QAAQ,IAAK,GAC9B,WAAW2B,EAAO,KAAMf,EAAM,UAAW,QAAQ,CACrD,CACJ,EACJ,IAAK,UACD,MAAO,CACH,YAAaZ,EAAQ,QAAQ,IAAK,GAC9B,WAAW4B,EAAM,KAAMhB,EAAM,SAAU,YAAYiB,EAAkBD,EAAM,qBAAuBE,EAAoBF,EAAM,UAAU,CAAC,GAAG,CAC9I,CACJ,EACJ,IAAK,QACD,MAAO,CACH,YAAa,CACT,GAAG5B,EAAQ,SAAS,IAAK,GACrB,WACI+B,EAAQ,KACRnB,EAAM,MACN,aAAamB,EAAQ,YAAYA,EAAQ,WAAW,OAAS,IAAMA,EAAQ,WAAW,KAAK,GAAG,EAAI,IACtG,CACJ,EACA,GAAG/B,EAAQ,MAAM,IAAK,GAClB,WACIgC,EAAK,KACLpB,EAAM,OACN,SAASoB,EAAK,WAAW,OAAO,aACpC,CACJ,EACA,GAAGC,EAAe,IAAK,GACnB,WAAWC,EAAWtB,EAAM,OAAQ,WAAW,CACnD,CACJ,CACJ,EACJ,IAAK,UACD,MAAO,CAAE,YAAaL,EAAK,QAAQ,IAAI,OAAO,CAAE,CACxD,CACJ,CACJ,CACJ"}
@@ -0,0 +1,3 @@
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{fenceMap as e,withoutComment as t}from"./document-context.js";import{responseAnalysis as n}from"./response-analysis.js";import{symbolsForBuffer as r}from"./symbols.js";function dependencyTargetCompletions(i,a,o,s){if(e(i)[a]||t(o).length<o.length)return null;let c=o.match(/^\s*depends\s+on\s+((?:[A-Za-z_]\w*\.)*)([A-Za-z_]\w*)?$/);if(!c)return null;let l=r(i,s);return n(i,l.authoringDocuments??l.authoringSources?.filter(e=>e!==i.join(`
2
+ `))??[],l.authoringPlacement,l.authoringPath,l.authoringPlacementResolved).dependencies.completions(a,c[1],l.authoringPlacement)}export{dependencyTargetCompletions};
3
+ //# sourceMappingURL=dependency-completions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependency-completions.js","names":["fenceMap","lines","line","withoutComment","before","match","symbols","symbolsForBuffer","application","responseAnalysis","source"],"sources":["../../dependency-completions.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { fenceMap, withoutComment } from './document-context';\nimport { responseAnalysis } from './response-analysis';\nimport { DocumentSymbols, symbolsForBuffer } from './symbols';\nimport { CompletionEntry } from './completion-items';\n\nexport function dependencyTargetCompletions(lines: string[], line: number, before: string, application: DocumentSymbols): CompletionEntry[] | null {\n if (fenceMap(lines)[line] || withoutComment(before).length < before.length) return null;\n const match = before.match(/^\\s*depends\\s+on\\s+((?:[A-Za-z_]\\w*\\.)*)([A-Za-z_]\\w*)?$/);\n if (!match) return null;\n const symbols = symbolsForBuffer(lines, application);\n const analysis = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [],\n symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n return analysis.dependencies.completions(line, match[1], symbols.authoringPlacement);\n}\n"],"mappings":"gOAQA,SAAgB,4BAA4B,EAAiB,EAAc,EAAgB,EAAwD,CAC/I,GAAIA,EAASC,CAAK,CAAC,CAACC,IAASC,EAAeC,CAAM,CAAC,CAAC,OAASA,EAAO,OAAQ,OAAO,KACnF,IAAMC,EAAQD,EAAO,MAAM,0DAA0D,EACrF,GAAI,CAACC,EAAO,OAAO,KACnB,IAAMC,EAAUC,EAAiBN,EAAOO,CAAW,EAGnD,OAFiBC,EAAiBR,EAAOK,EAAQ,oBAAsBA,EAAQ,kBAAkB,OAAO,GAAUI,IAAWT,EAAM,KAAK;CAAI,CAAC,GAAK,CAAC,EAC/IK,EAAQ,mBAAoBA,EAAQ,cAAeA,EAAQ,0BACjD,CAAC,CAAC,aAAa,YAAYJ,EAAMG,EAAM,GAAIC,EAAQ,kBAAkB,CACvF"}
@@ -0,0 +1,2 @@
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{DeclaredDependencyTargets as e}from"./compiler/Dependencies/DeclaredDependencyTargets.js";import"./compiler/index.js";function dependencyTargetAnalysis(t,n,r,i,a){let o=t,s=n,c=e.containersOf(o).filter(e=>![...e.scope,e.name].some(e=>a.has(e))),l=/* @__PURE__ */ new Map,u=/* @__PURE__ */ new Map,inventory=(e,t,n)=>{for(let a of e){let e=[...t,a.name];if(n){if(a.location.path===r&&a.location.line>0)for(let t of i(a.location.line-1))l.set(t,e)}else{let t=e.join(`.`);u.set(t,[...u.get(t)??[],...(a.dependsOn??[]).map(e=>({target:e.target,...e.location}))])}inventory(a.features,e,n)}};return inventory(o.modules,[],!1),inventory(s.modules,[],!0),{completions(t,n,i){let o=l.get(t)??i;if(!o?.length||o.some(e=>a.has(e))||!c.some(e=>[...e.scope,e.name].join(`.`)===o.join(`.`)))return[];let s=new Set((u.get(o.join(`.`))??[]).filter(e=>e.path!==r||e.line!==t+1).map(t=>e.resolve(t.target,o,c).resolved));return e.candidates(o,c).flatMap(({container:t,reference:r,tier:i})=>{if(s.has(t))return[];let a=[...t.scope,t.name].join(`.`);if(n&&(r=n+t.name,e.resolve(r,o,c).resolved!==t))return[];let l=t.scope.length===0?`module`:i===0?`sibling feature`:i===`qualified`?`feature in ${t.scope.join(`.`)}`:`feature of ${t.scope.join(`.`)}`,u=c.indexOf(t);return[{label:n?t.name:r,insertText:n?t.name:r,documentation:`${a} — ${l}.`,detail:l,sortText:`${String(i===`qualified`?o.length:i).padStart(6,`0`)}:${String(u).padStart(6,`0`)}`}]})}}}export{dependencyTargetAnalysis};
2
+ //# sourceMappingURL=dependency-target-analysis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependency-target-analysis.js","names":["application","syntax","local","localSyntax","containers","DeclaredDependencyTargets","container","hiddenScopes","part","contexts","declared","node","nodes","address","parent","sourceLocal","path","line","range","key","dependency","from","placement","existing","qualifier","reference","relation","tier","order"],"sources":["../../dependency-target-analysis.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ApplicationSyntax, DeclaredDependencyTargets, FeatureSyntax } from '@cratis/screenplay-compiler';\nimport { CompletionEntry } from './completion-items';\n\n// Keep compiler-owned resolution private to this cached analysis. Its public shape only contains\n// editor entries, never compiler syntax or container types.\nexport function dependencyTargetAnalysis(syntax: unknown, localSyntax: unknown, path: string, range: (line: number) => number[], hiddenScopes: ReadonlySet<string>): {\n completions(line: number, qualifier: string, placement?: readonly string[]): CompletionEntry[];\n} {\n const application = syntax as ApplicationSyntax;\n const local = localSyntax as ApplicationSyntax;\n const containers = DeclaredDependencyTargets.containersOf(application).filter(container => ![...container.scope, container.name].some(part => hiddenScopes.has(part)));\n const contexts = new Map<number, readonly string[]>();\n const declared = new Map<string, { target: string; path?: string; line: number }[]>();\n const inventory = (nodes: readonly { name: string; location: { path?: string; line: number }; dependsOn?: readonly { target: string; location: { path?: string; line: number } }[]; features: readonly FeatureSyntax[] }[], parent: readonly string[], sourceLocal: boolean): void => {\n for (const node of nodes) {\n const address = [...parent, node.name];\n if (sourceLocal) {\n if (node.location.path === path && node.location.line > 0) for (const line of range(node.location.line - 1)) contexts.set(line, address);\n } else {\n const key = address.join('.');\n declared.set(key, [...declared.get(key) ?? [], ...(node.dependsOn ?? []).map(dependency => ({ target: dependency.target, ...dependency.location }))]);\n }\n inventory(node.features, address, sourceLocal);\n }\n };\n inventory(application.modules, [], false);\n inventory(local.modules, [], true);\n return {\n completions(line, qualifier, placement) {\n const from = contexts.get(line) ?? placement;\n if (!from?.length || from.some(part => hiddenScopes.has(part)) || !containers.some(container => [...container.scope, container.name].join('.') === from.join('.'))) return [];\n const existing = new Set((declared.get(from.join('.')) ?? []).filter(dependency => dependency.path !== path || dependency.line !== line + 1)\n .map(dependency => DeclaredDependencyTargets.resolve(dependency.target, from, containers).resolved));\n return DeclaredDependencyTargets.candidates(from, containers).flatMap(({ container, reference, tier }) => {\n if (existing.has(container)) return [];\n const address = [...container.scope, container.name].join('.');\n if (qualifier) {\n // A typed qualification may be longer than the shortest candidate spelling.\n reference = qualifier + container.name;\n if (DeclaredDependencyTargets.resolve(reference, from, containers).resolved !== container) return [];\n }\n const relation = container.scope.length === 0 ? 'module'\n : tier === 0 ? 'sibling feature'\n : tier !== 'qualified' ? `feature of ${container.scope.join('.')}` : `feature in ${container.scope.join('.')}`;\n const order = containers.indexOf(container);\n return [{ label: qualifier ? container.name : reference, insertText: qualifier ? container.name : reference,\n documentation: `${address} — ${relation}.`, detail: relation,\n sortText: `${String(tier === 'qualified' ? from.length : tier).padStart(6, '0')}:${String(order).padStart(6, '0')}` }];\n });\n },\n };\n}\n"],"mappings":"8KAQA,SAAgB,yBAAyB,EAAiB,EAAsB,EAAc,EAAmC,EAE/H,CACE,IAAMA,EAAcC,EACdC,EAAQC,EACRC,EAAaC,EAA0B,aAAaL,CAAW,CAAC,CAAC,OAAO,GAAa,CAAC,CAAC,GAAGM,EAAU,MAAOA,EAAU,IAAI,CAAC,CAAC,KAAK,GAAQC,EAAa,IAAIC,CAAI,CAAC,CAAC,EAC/JC,kBAAW,IAAI,IACfC,kBAAW,IAAI,IACf,WAAa,EAAyM,EAA2B,IAA+B,CAClR,IAAK,IAAMC,KAAQC,EAAO,CACtB,IAAMC,EAAU,CAAC,GAAGC,EAAQH,EAAK,IAAI,EACrC,GAAII,EACI,IAAAJ,EAAK,SAAS,OAASK,GAAQL,EAAK,SAAS,KAAO,EAAG,IAAK,IAAMM,K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G,EAC7D,GAAIkB,IAEA,EAAYA,EAAYlB,EAAU,KAC9BD,EAA0B,QAAQoB,EAAWJ,EAAMjB,CAAU,CAAC,CAAC,WAAaE,GAAW,MAAO,CAAC,EAEvG,IAAMoB,EAAWpB,EAAU,MAAM,SAAW,EAAI,SAC1CqB,IAAS,EAAI,kBACTA,IAAS,YAA0D,cAAcrB,EAAU,MAAM,KAAK,GAAG,IAAlF,cAAcA,EAAU,MAAM,KAAK,GAAG,IACjEsB,EAAQxB,EAAW,QAAQE,CAAS,EAC1C,MAAO,CAAC,CAAE,MAAOkB,EAAYlB,EAAU,KAAOmB,EAAW,WAAYD,EAAYlB,EAAU,KAAOmB,EAC9F,cAAe,GAAGZ,EAAQ,KAAKa,EAAS,GAAI,OAAQA,EACpD,SAAU,GAAG,OAAOC,IAAS,YAAcN,EAAK,OAASM,CAAI,CAAC,CAAC,SAAS,EAAG,GAAG,EAAE,GAAG,OAAOC,CAAK,CAAC,CAAC,SAAS,EAAG,GAAG,GAAI,CAAC,CAC7H,CAAC,CACL,CACJ,CACJ"}
@@ -0,0 +1,2 @@
1
+ const e={repeatedSingularDeclarationAcrossFiles:`PLAY0172`,invalidIdentityDeclaration:`PLAY0633`,duplicateIdentity:`PLAY0634`,invalidIdentityDetail:`PLAY0635`,unknownIdentitySource:`PLAY0636`,identityDetailWithoutSource:`PLAY0637`,identitySourceWithBody:`PLAY0638`,duplicateIdentityDetail:`PLAY0639`,builtInIdentityDetail:`PLAY0640`,unknownIdentityQuery:`PLAY0641`,invalidIdentityQuery:`PLAY0642`,identityQueryWithoutKey:`PLAY0643`,invalidIdentityQueryKey:`PLAY0644`,identityQueryAuthorizationDependency:`PLAY0645`,identityQueryTypeMismatch:`PLAY0646`,invalidReactionIdentity:`PLAY0647`,gatedInvocationWithoutIdentity:`PLAY0648`,unusedReactionIdentity:`PLAY0649`,unusedReactionRole:`PLAY0650`,unsatisfiedReactionIdentity:`PLAY0651`,reactionPrivilegeEscalation:`PLAY0652`,commandProducesPublicEvent:`PLAY0607`,publicEventRequiresOutboundTranslation:`PLAY0608`,outboundPublicEventCount:`PLAY0609`,foreignPublicEventConsumer:`PLAY0610`,outboundTranslationInput:`PLAY0611`,inboundTranslationOutput:`PLAY0612`,foreignPublicEventProduced:`PLAY0613`,publicTranslationRequiresDirection:`PLAY0614`,translationConstructDirection:`PLAY0615`,inboundTranslationInput:`PLAY0616`,outboundTranslationOutput:`PLAY0617`,eventTargetOutsideOutboundTranslation:`PLAY0618`,eventsSourceOutsideInboundTranslation:`PLAY0619`,invalidCaptureEventsSource:`PLAY0620`,invalidDescription:`PLAY0145`,emptyDescription:`PLAY0146`,duplicateDescription:`PLAY0147`,unknownConceptDirective:`PLAY0010`,attributeReasonWithoutAttribute:`PLAY0012`,duplicateAttributeReason:`PLAY0013`,legacyComplianceMarker:`PLAY0565`,unknownComplianceMarker:`PLAY0566`,invalidSecretScope:`PLAY0567`,duplicateSecretScope:`PLAY0568`,secretScopeIgnoredForPii:`PLAY0569`,invalidPersonalDataQualifier:`PLAY0570`,duplicateSpecialCategory:`PLAY0571`,invalidPurposeDeclaration:`PLAY0596`,invalidPurposeVocabulary:`PLAY0597`,duplicatePurposeField:`PLAY0598`,duplicatePurposeDeclaration:`PLAY0599`,unknownPurpose:`PLAY0600`,purposeInterestMismatch:`PLAY0601`,personalDataWithoutPurpose:`PLAY0602`,specialDataWithoutCondition:`PLAY0603`,criminalDataWithoutAuthorization:`PLAY0604`,purposeWithoutBasis:`PLAY0605`,unusedPurpose:`PLAY0606`,duplicateEventSubject:`PLAY0590`,invalidSubjectType:`PLAY0591`,protectedSubjectType:`PLAY0592`,invalidSubjectOwner:`PLAY0593`,readModelSubjectNotSupported:`PLAY0594`,invalidSubjectModifierOrder:`PLAY0595`,conflictingScreenDataBinding:`PLAY0530`,screenDataQueryMismatch:`PLAY0531`,actionWithoutInputSurface:`PLAY0532`,commandWithoutInputSurface:`PLAY0533`,readModelFieldWithoutOrigin:`PLAY0534`,queryParameterNotHeldByView:`PLAY0535`,unconsumedEvent:`PLAY0536`,unreachableScreen:`PLAY0537`,invalidSpecificationCallerPersona:`PLAY0572`,unsynthesizablePersonaCaller:`PLAY0573`,personaWithoutGate:`PLAY0574`,gateWithoutPersona:`PLAY0575`,ambiguousPersonaCaller:`PLAY0576`,invalidSpecificationParameter:`PLAY0577`,invalidSpecificationCase:`PLAY0578`,duplicateSpecificationParameter:`PLAY0579`,duplicateSpecificationCase:`PLAY0580`,incompleteSpecificationTable:`PLAY0581`,invalidSpecificationCaseAssignment:`PLAY0582`,invalidSpecificationCaseValue:`PLAY0583`,invalidSpecificationCaseReference:`PLAY0584`,optionalSpecificationParameterTarget:`PLAY0585`,specificationCaseNameCollision:`PLAY0586`,incompatibleSpecificationParameterType:`PLAY0587`,unusedSpecificationParameter:`PLAY0588`,singularSpecificationTableExpansion:`PLAY0589`,invalidActionAlternative:`PLAY0341`,guardedActionWithoutAlternatives:`PLAY0342`,misplacedActionOtherwise:`PLAY0343`,unsupportedActionConditionOperand:`PLAY0344`,unknownActionSubjectField:`PLAY0345`,unresolvedActionSubject:`PLAY0346`,unreachableActionAlternative:`PLAY0347`,unknownActionArgumentProperty:`PLAY0348`,invalidRefusalBranch:`PLAY0538`,invalidRefusalBranchBody:`PLAY0539`,unreachableRefusalBranch:`PLAY0540`,invalidRefusalValue:`PLAY0541`,unknownRefusalConstraint:`PLAY0542`,unmatchedRedeliveredOccurrence:`PLAY0543`,unknownRedeliveryReaction:`PLAY0544`,invalidNoEventsExpectation:`PLAY0545`,indeterminateNegatedClaimTarget:`PLAY0546`,invalidAbsentReadModelStep:`PLAY0453`,unknownConstraintProperty:`PLAY0391`,invalidSpecificationExample:`PLAY0518`,duplicateSpecificationAssignment:`PLAY0519`,unknownReadModelProperty:`PLAY0514`,piiNotSupportedOnIdentifier:`PLAY0515`,invalidEventSourceDeclaration:`PLAY0503`,invalidCommandStream:`PLAY0504`,invalidSpecificationStream:`PLAY0547`,specificationStreamOnCommand:`PLAY0548`,invalidSpecificationStreamRoute:`PLAY0549`,invalidSpecificationStreamEventSource:`PLAY0550`,specificationStreamContradictsCommand:`PLAY0551`,ambiguousCommandStream:`PLAY0505`,unsupportedStreamIdType:`PLAY0506`,redundantSourceStreamId:`PLAY0507`,eventFromLaterSlice:`PLAY0516`,timelineCycleGroup:`PLAY0517`,invalidSpecificationExampleBody:`PLAY0526`,undeclaredDependency:`PLAY0552`,unusedDependencyDeclaration:`PLAY0553`,invalidDependencyTarget:`PLAY0554`,repeatedDependencyDeclaration:`PLAY0555`,mutualDependencyDeclarations:`PLAY0556`,authorizationRefusalWithoutIdentity:`PLAY0557`,invalidDocumentation:`PLAY0558`,conflictingDocumentationAcrossFiles:`PLAY0559`,unsupportedInteractionAlternatives:`PLAY0560`,mixedInteractionAlternatives:`PLAY0561`,interactionAlternativeWithoutActions:`PLAY0562`,inlineInteractionAlternative:`PLAY0563`,legacyInteractionWhere:`PLAY0564`,ambiguousReference:`PLAY0198`,invalidImplementationBlock:`PLAY0492`,invalidImplementationHint:`PLAY0493`,conflictingImplementationSources:`PLAY0494`,eventSourceIdInPayload:`PLAY0469`,explicitProducesTargetsRequired:`PLAY0470`,redundantEventId:`PLAY0471`,invalidEventId:`PLAY0472`,inlineEventCollision:`PLAY0473`,inlineEventOutsideCommand:`PLAY0474`,inlineEventGeneration:`PLAY0475`,reservedProductionMetadata:`PLAY0476`,invalidEventDocumentation:`PLAY0477`,tabIndentation:`PLAY0006`,unknownPrimitiveType:`PLAY0008`,unknownSliceType:`PLAY0028`,duplicateCommandIdentifier:`PLAY0036`,unknownContextPath:`PLAY0153`,unknownContextCausedByProperty:`PLAY0154`,unknownContextIdentityProperty:`PLAY0155`,unclosedCodeBlock:`PLAY0164`,unknownType:`PLAY0165`,unknownEvent:`PLAY0166`,unknownPolicy:`PLAY0167`,duplicateDeclaration:`PLAY0168`,unknownEventContextMember:`PLAY0295`,unknownEventContextPath:`PLAY0296`,eventContextPathBelowCollection:`PLAY0297`,missingEventContextPath:`PLAY0298`,unresolvedDynamicKeySource:`PLAY0299`,invalidFileImport:`PLAY0454`,omittedProductionDestination:`PLAY0478`,legacyOptionalSuffix:`PLAY0479`,invalidOptionalModifierOrder:`PLAY0480`,optionalReadsNotSupported:`PLAY0481`,unavailableResponseExecution:`PLAY0268`,generatedPropertyOutsideCommand:`PLAY0482`,invalidGeneratedType:`PLAY0483`,invalidGeneratedModifierOrder:`PLAY0484`,generatedPropertyInput:`PLAY0485`,invalidCommandResponse:`PLAY0486`,invalidResponseSource:`PLAY0487`,duplicateResponseField:`PLAY0488`,invalidResponseShape:`PLAY0489`,invalidGeneratedFixture:`PLAY0490`,invalidReturnExpectation:`PLAY0491`};export{e as diagnosticCodes};
2
+ //# sourceMappingURL=diagnostic-codes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic-codes.js","names":["diagnosticCodes"],"sources":["../../diagnostic-codes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// The PLAY codes the editor reports. Every one of them mirrors a condition the compiler checks and\n// carries the compiler's own code for it, so the same problem is called the same thing whether it was\n// found by the CLI or by a squiggle - see Documentation/screenplay/diagnostics.md for the catalogue.\n//\n// A code is only ever added here for a condition the compiler can also report. The editor makes a few\n// structural checks the compiler does not - the capture and projection validators are where they live -\n// and those stay codeless deliberately: minting a PLAY number for something no compiler run can emit\n// would make the catalogue describe two different tools.\nexport const diagnosticCodes = {\n repeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n invalidIdentityDeclaration: 'PLAY0633',\n duplicateIdentity: 'PLAY0634',\n invalidIdentityDetail: 'PLAY0635',\n unknownIdentitySource: 'PLAY0636',\n identityDetailWithoutSource: 'PLAY0637',\n identitySourceWithBody: 'PLAY0638',\n duplicateIdentityDetail: 'PLAY0639',\n builtInIdentityDetail: 'PLAY0640',\n unknownIdentityQuery: 'PLAY0641',\n invalidIdentityQuery: 'PLAY0642',\n identityQueryWithoutKey: 'PLAY0643',\n invalidIdentityQueryKey: 'PLAY0644',\n identityQueryAuthorizationDependency: 'PLAY0645',\n identityQueryTypeMismatch: 'PLAY0646',\n invalidReactionIdentity: 'PLAY0647',\n gatedInvocationWithoutIdentity: 'PLAY0648',\n unusedReactionIdentity: 'PLAY0649',\n unusedReactionRole: 'PLAY0650',\n unsatisfiedReactionIdentity: 'PLAY0651',\n reactionPrivilegeEscalation: 'PLAY0652',\n // Preserve supplied C# whole-model diagnostics; these checks are not yet run by the editor.\n commandProducesPublicEvent: 'PLAY0607',\n publicEventRequiresOutboundTranslation: 'PLAY0608',\n outboundPublicEventCount: 'PLAY0609',\n foreignPublicEventConsumer: 'PLAY0610',\n outboundTranslationInput: 'PLAY0611',\n inboundTranslationOutput: 'PLAY0612',\n foreignPublicEventProduced: 'PLAY0613',\n publicTranslationRequiresDirection: 'PLAY0614',\n translationConstructDirection: 'PLAY0615',\n inboundTranslationInput: 'PLAY0616',\n outboundTranslationOutput: 'PLAY0617',\n eventTargetOutsideOutboundTranslation: 'PLAY0618',\n eventsSourceOutsideInboundTranslation: 'PLAY0619',\n invalidCaptureEventsSource: 'PLAY0620',\n invalidDescription: 'PLAY0145',\n emptyDescription: 'PLAY0146',\n duplicateDescription: 'PLAY0147',\n unknownConceptDirective: 'PLAY0010',\n attributeReasonWithoutAttribute: 'PLAY0012',\n duplicateAttributeReason: 'PLAY0013',\n legacyComplianceMarker: 'PLAY0565',\n unknownComplianceMarker: 'PLAY0566',\n invalidSecretScope: 'PLAY0567',\n duplicateSecretScope: 'PLAY0568',\n secretScopeIgnoredForPii: 'PLAY0569',\n invalidPersonalDataQualifier: 'PLAY0570',\n duplicateSpecialCategory: 'PLAY0571',\n invalidPurposeDeclaration: 'PLAY0596',\n invalidPurposeVocabulary: 'PLAY0597',\n duplicatePurposeField: 'PLAY0598',\n duplicatePurposeDeclaration: 'PLAY0599',\n unknownPurpose: 'PLAY0600',\n purposeInterestMismatch: 'PLAY0601',\n personalDataWithoutPurpose: 'PLAY0602',\n specialDataWithoutCondition: 'PLAY0603',\n criminalDataWithoutAuthorization: 'PLAY0604',\n purposeWithoutBasis: 'PLAY0605',\n unusedPurpose: 'PLAY0606',\n duplicateEventSubject: 'PLAY0590',\n invalidSubjectType: 'PLAY0591',\n protectedSubjectType: 'PLAY0592',\n invalidSubjectOwner: 'PLAY0593',\n readModelSubjectNotSupported: 'PLAY0594',\n invalidSubjectModifierOrder: 'PLAY0595',\n // Supplied compiler diagnostics are preserved, even for checks only the C# tool can run.\n // See Documentation/screenplay/editor-diagnostics.md for the validation boundary.\n conflictingScreenDataBinding: 'PLAY0530',\n screenDataQueryMismatch: 'PLAY0531',\n actionWithoutInputSurface: 'PLAY0532',\n commandWithoutInputSurface: 'PLAY0533',\n readModelFieldWithoutOrigin: 'PLAY0534',\n queryParameterNotHeldByView: 'PLAY0535',\n unconsumedEvent: 'PLAY0536',\n unreachableScreen: 'PLAY0537',\n invalidSpecificationCallerPersona: 'PLAY0572',\n unsynthesizablePersonaCaller: 'PLAY0573',\n personaWithoutGate: 'PLAY0574',\n gateWithoutPersona: 'PLAY0575',\n ambiguousPersonaCaller: 'PLAY0576',\n invalidSpecificationParameter: 'PLAY0577',\n invalidSpecificationCase: 'PLAY0578',\n duplicateSpecificationParameter: 'PLAY0579',\n duplicateSpecificationCase: 'PLAY0580',\n incompleteSpecificationTable: 'PLAY0581',\n invalidSpecificationCaseAssignment: 'PLAY0582',\n invalidSpecificationCaseValue: 'PLAY0583',\n invalidSpecificationCaseReference: 'PLAY0584',\n optionalSpecificationParameterTarget: 'PLAY0585',\n specificationCaseNameCollision: 'PLAY0586',\n incompatibleSpecificationParameterType: 'PLAY0587',\n unusedSpecificationParameter: 'PLAY0588',\n singularSpecificationTableExpansion: 'PLAY0589',\n invalidActionAlternative: 'PLAY0341',\n guardedActionWithoutAlternatives: 'PLAY0342',\n misplacedActionOtherwise: 'PLAY0343',\n unsupportedActionConditionOperand: 'PLAY0344',\n unknownActionSubjectField: 'PLAY0345',\n unresolvedActionSubject: 'PLAY0346',\n unreachableActionAlternative: 'PLAY0347',\n unknownActionArgumentProperty: 'PLAY0348',\n invalidRefusalBranch: 'PLAY0538',\n invalidRefusalBranchBody: 'PLAY0539',\n unreachableRefusalBranch: 'PLAY0540',\n invalidRefusalValue: 'PLAY0541',\n unknownRefusalConstraint: 'PLAY0542',\n unmatchedRedeliveredOccurrence: 'PLAY0543',\n unknownRedeliveryReaction: 'PLAY0544',\n invalidNoEventsExpectation: 'PLAY0545',\n indeterminateNegatedClaimTarget: 'PLAY0546',\n invalidAbsentReadModelStep: 'PLAY0453',\n unknownConstraintProperty: 'PLAY0391',\n invalidSpecificationExample: 'PLAY0518',\n duplicateSpecificationAssignment: 'PLAY0519',\n unknownReadModelProperty: 'PLAY0514',\n piiNotSupportedOnIdentifier: 'PLAY0515',\n invalidEventSourceDeclaration: 'PLAY0503',\n invalidCommandStream: 'PLAY0504',\n invalidSpecificationStream: 'PLAY0547',\n specificationStreamOnCommand: 'PLAY0548',\n invalidSpecificationStreamRoute: 'PLAY0549',\n invalidSpecificationStreamEventSource: 'PLAY0550',\n specificationStreamContradictsCommand: 'PLAY0551',\n ambiguousCommandStream: 'PLAY0505',\n unsupportedStreamIdType: 'PLAY0506',\n redundantSourceStreamId: 'PLAY0507',\n eventFromLaterSlice: 'PLAY0516',\n timelineCycleGroup: 'PLAY0517',\n invalidSpecificationExampleBody: 'PLAY0526',\n undeclaredDependency: 'PLAY0552',\n unusedDependencyDeclaration: 'PLAY0553',\n invalidDependencyTarget: 'PLAY0554',\n repeatedDependencyDeclaration: 'PLAY0555',\n mutualDependencyDeclarations: 'PLAY0556',\n authorizationRefusalWithoutIdentity: 'PLAY0557',\n invalidDocumentation: 'PLAY0558',\n conflictingDocumentationAcrossFiles: 'PLAY0559',\n unsupportedInteractionAlternatives: 'PLAY0560',\n mixedInteractionAlternatives: 'PLAY0561',\n interactionAlternativeWithoutActions: 'PLAY0562',\n inlineInteractionAlternative: 'PLAY0563',\n legacyInteractionWhere: 'PLAY0564',\n ambiguousReference: 'PLAY0198',\n invalidImplementationBlock: 'PLAY0492',\n invalidImplementationHint: 'PLAY0493',\n conflictingImplementationSources: 'PLAY0494',\n eventSourceIdInPayload: 'PLAY0469',\n explicitProducesTargetsRequired: 'PLAY0470',\n redundantEventId: 'PLAY0471',\n invalidEventId: 'PLAY0472',\n inlineEventCollision: 'PLAY0473',\n inlineEventOutsideCommand: 'PLAY0474',\n inlineEventGeneration: 'PLAY0475',\n reservedProductionMetadata: 'PLAY0476',\n invalidEventDocumentation: 'PLAY0477',\n tabIndentation: 'PLAY0006',\n unknownPrimitiveType: 'PLAY0008',\n unknownSliceType: 'PLAY0028',\n duplicateCommandIdentifier: 'PLAY0036',\n unknownContextPath: 'PLAY0153',\n unknownContextCausedByProperty: 'PLAY0154',\n unknownContextIdentityProperty: 'PLAY0155',\n unclosedCodeBlock: 'PLAY0164',\n unknownType: 'PLAY0165',\n unknownEvent: 'PLAY0166',\n unknownPolicy: 'PLAY0167',\n duplicateDeclaration: 'PLAY0168',\n unknownEventContextMember: 'PLAY0295',\n unknownEventContextPath: 'PLAY0296',\n eventContextPathBelowCollection: 'PLAY0297',\n missingEventContextPath: 'PLAY0298',\n unresolvedDynamicKeySource: 'PLAY0299',\n invalidFileImport: 'PLAY0454',\n omittedProductionDestination: 'PLAY0478',\n legacyOptionalSuffix: 'PLAY0479',\n invalidOptionalModifierOrder: 'PLAY0480',\n optionalReadsNotSupported: 'PLAY0481',\n unavailableResponseExecution: 'PLAY0268',\n generatedPropertyOutsideCommand: 'PLAY0482',\n invalidGeneratedType: 'PLAY0483',\n invalidGeneratedModifierOrder: 'PLAY0484',\n generatedPropertyInput: 'PLAY0485',\n invalidCommandResponse: 'PLAY0486',\n invalidResponseSource: 'PLAY0487',\n duplicateResponseField: 'PLAY0488',\n invalidResponseShape: 'PLAY0489',\n invalidGeneratedFixture: 'PLAY0490',\n invalidReturnExpectation: 'PLAY0491',\n} as const;\n\nexport type Diag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kBAAmB,WACnB,YAAa,WACb,aAAc,WACd,cAAe,WACf,qBAAsB,WACtB,0BAA2B,WAC3B,wBAAyB,WACzB,gCAAiC,WACjC,wBAAyB,WACzB,2BAA4B,WAC5B,kBAAmB,WACnB,6BAA8B,WAC9B,qBAAsB,WACtB,6BAA8B,WAC9B,0BAA2B,WAC3B,6BAA8B,WAC9B,gCAAiC,WACjC,qBAAsB,WACtB,8BAA+B,WAC/B,uBAAwB,WACxB,uBAAwB,WACxB,sBAAuB,WACvB,uBAAwB,WACxB,qBAAsB,WACtB,wBAAyB,WACzB,yBAA0B,UAC9B"}
@@ -0,0 +1,2 @@
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import"./language.js";import{symbolsForBuffer as e}from"./symbols.js";import{validateLines as t}from"./validation.js";const n=`screenplay`;function validate(n,r,i={}){let a=r.getLinesContent(),o=e(a,i.application?.(r));return t(a,{application:o,path:o.authoringPath,placement:o.authoringPlacement}).map(e=>({severity:e.severity===`error`?n.MarkerSeverity.Error:e.severity===`information`?n.MarkerSeverity.Info:n.MarkerSeverity.Warning,tags:e.code===`PLAY0479`||e.code===`PLAY0565`?[n.MarkerTag.Deprecated]:void 0,message:e.message,code:e.code,startLineNumber:e.line+1,startColumn:e.startColumn,endLineNumber:e.line+1,endColumn:e.endColumn}))}function watch(e,t,r){let i,run=()=>{t.isDisposed()||(t.getLanguageId()===`screenplay`?e.editor.setModelMarkers(t,n,validate(e,t,r)):e.editor.setModelMarkers(t,n,[]))},schedule=()=>{i!==void 0&&clearTimeout(i),i=setTimeout(run,300)},a=r.onDidChangeApplication?.(run);t.onDidChangeContent(schedule),t.onDidChangeLanguage(run),t.onWillDispose(()=>{a?.dispose(),i!==void 0&&clearTimeout(i)}),run()}function attachDiagnostics(e,t={}){e.editor.getModels().forEach(n=>watch(e,n,t)),e.editor.onDidCreateModel(n=>watch(e,n,t))}export{attachDiagnostics,validate};
2
+ //# sourceMappingURL=diagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics.js","names":["owner","lines","model","application","symbolsForBuffer","options","validateLines","issue","monaco","handle","contextChange"],"sources":["../../diagnostics.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { editor } from 'monaco-editor';\nimport { Monaco, languageId } from './language';\nimport { validateLines } from './validation';\nimport { CompletionOptions } from './completions';\nimport { symbolsForBuffer } from './symbols';\n\nconst owner = 'screenplay';\nconst validationDelay = 300;\n\nexport function validate(monaco: Monaco, model: editor.ITextModel, options: CompletionOptions = {}): editor.IMarkerData[] {\n const lines = model.getLinesContent();\n const application = symbolsForBuffer(lines, options.application?.(model));\n return validateLines(lines, { application, path: application.authoringPath, placement: application.authoringPlacement }).map((issue) => ({\n severity:\n issue.severity === 'error'\n ? monaco.MarkerSeverity.Error\n : issue.severity === 'information'\n ? monaco.MarkerSeverity.Info\n : monaco.MarkerSeverity.Warning,\n tags: (issue.code === 'PLAY0479' || issue.code === 'PLAY0565') ? [monaco.MarkerTag.Deprecated] : undefined,\n message: issue.message,\n code: issue.code,\n startLineNumber: issue.line + 1,\n startColumn: issue.startColumn,\n endLineNumber: issue.line + 1,\n endColumn: issue.endColumn,\n }));\n}\n\nfunction watch(monaco: Monaco, model: editor.ITextModel, options: CompletionOptions): void {\n let handle: ReturnType<typeof setTimeout> | undefined;\n\n const run = () => {\n if (model.isDisposed()) return;\n if (model.getLanguageId() !== languageId) {\n monaco.editor.setModelMarkers(model, owner, []);\n return;\n }\n monaco.editor.setModelMarkers(model, owner, validate(monaco, model, options));\n };\n const schedule = () => {\n if (handle !== undefined) clearTimeout(handle);\n handle = setTimeout(run, validationDelay);\n };\n\n const contextChange = options.onDidChangeApplication?.(run);\n model.onDidChangeContent(schedule);\n model.onDidChangeLanguage(run);\n model.onWillDispose(() => {\n contextChange?.dispose();\n if (handle !== undefined) clearTimeout(handle);\n });\n run();\n}\n\nexport function attachDiagnostics(monaco: Monaco, options: CompletionOptions = {}): void {\n monaco.editor.getModels().forEach((model) => watch(monaco, model, options));\n monaco.editor.onDidCreateModel((model) => watch(monaco, model, options));\n}\n"],"mappings":"uKASA,MAAMA,EAAQ,aAGd,SAAgB,SAAS,EAAgB,EAA0B,EAA6B,CAAC,EAAyB,CACtH,IAAMC,EAAQC,EAAM,gBAAgB,EAC9BC,EAAcC,EAAiBH,EAAOI,EAAQ,cAAcH,CAAK,CAAC,EACxE,OAAOI,EAAcL,EAAO,CAAE,cAAa,KAAME,EAAY,cAAe,UAAWA,EAAY,kBAAmB,CAAC,CAAC,CAAC,IAAK,IAAW,CACrI,SACII,EAAM,WAAa,QACbC,EAAO,eAAe,MACtBD,EAAM,WAAa,cACfC,EAAO,eAAe,KACtBA,EAAO,eAAe,QACpC,KAAOD,EAAM,OAAS,YAAcA,EAAM,OAAS,WAAc,CAACC,EAAO,UAAU,UAAU,EAAI,IAAA,GACjG,QAASD,EAAM,QACf,KAAMA,EAAM,KACZ,gBAAiBA,EAAM,KAAO,EAC9B,YAAaA,EAAM,YACnB,cAAeA,EAAM,KAAO,EAC5B,UAAWA,EAAM,SACrB,EAAE,CACN,CAEA,SAAS,MAAM,EAAgB,EAA0B,EAAkC,CACvF,IAAIE,EAEE,QAAY,CACVP,EAAM,WAAW,IACjBA,EAAM,cAAc,IAAA,aAIxBM,EAAO,OAAO,gBAAgBN,EAAOF,EAAO,SAASQ,EAAQN,EAAOG,CAAO,CAAC,EAHxEG,EAAO,OAAO,gBAAgBN,EAAOF,EAAO,CAAC,CAAC,EAItD,EACM,aAAiB,CACfS,IAAW,IAAA,IAAW,aAAaA,CAAM,EAC7C,EAAS,WAAW,IAAK,GAAe,CAC5C,EAEMC,EAAgBL,EAAQ,yBAAyB,GAAG,EAC1DH,EAAM,mBAAmB,QAAQ,EACjCA,EAAM,oBAAoB,GAAG,EAC7BA,EAAM,kBAAoB,CACtBQ,GAAe,QAAQ,EACnBD,IAAW,IAAA,IAAW,aAAaA,CAAM,CACjD,CAAC,EACD,IAAI,CACR,CAEA,SAAgB,kBAAkB,EAAgB,EAA6B,CAAC,EAAS,CACrFD,EAAO,OAAO,UAAU,CAAC,CAAC,QAAS,GAAU,MAAMA,EAAQN,EAAOG,CAAO,CAAC,EAC1EG,EAAO,OAAO,iBAAkB,GAAU,MAAMA,EAAQN,EAAOG,CAAO,CAAC,CAC3E"}
@@ -0,0 +1,2 @@
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";function withoutComment(e){let t=!1,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(i===`\\`&&t&&r+1<e.length)r++;else if(i===`"`&&!n)t=!t;else if(i==="`"&&!t)n=!n;else if(!t&&!n&&i===`/`&&e[r+1]===`/`)return e.slice(0,r)}return e}function indentOf(e){return e.length-e.trimStart().length}function firstWord(e){return e.trim().split(/\s+/)[0]??``}function fenceMap(e){let t=Array(e.length).fill(!1),n=!1;for(let r=0;r<e.length;r++)/^\s*```(?:[a-z]+)?\s*$/.test(e[r])&&(!n||/^\s*```\s*$/.test(e[r]))?(t[r]=!0,n=!n):t[r]=n;return t}function enclosingChain(e,t,n,r){let i=[],a=r;for(let r=n-1;r>=0&&a>0;r--){if(t[r])continue;let n=withoutComment(e[r]);if(n.trim().length===0)continue;let o=indentOf(n);o<a&&(i.push(firstWord(n)),a=o)}return i}function nearestEnclosingLine(e,t,n,r){for(let i=n-1;i>=0&&r>0;i--){if(t[i])continue;let n=withoutComment(e[i]);if(n.trim().length!==0&&indentOf(n)<r)return n.trim()}}function enclosingHeaders(e,t,n,r){let i=[],a=r;for(let r=n-1;r>=0&&a>0;r--){if(t[r])continue;let n=withoutComment(e[r]);if(n.trim().length===0)continue;let o=indentOf(n);o<a&&(i.push(n.trim()),a=o)}return i}export{enclosingChain,enclosingHeaders,fenceMap,firstWord,indentOf,nearestEnclosingLine,withoutComment};
2
+ //# sourceMappingURL=document-context.js.map