@cratis/screenplay-language 4.156.1 → 4.158.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +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 a positional enumeration. Reordering or inserting members changes their stored numbers.' },\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: 'generate uuid', insertText: 'generate uuid', documentation: 'Random UUID v4; 122 random bits. Implicit on Uuid concepts; String UUIDs are lowercase by default.' },\n { label: 'generate uuidv7', insertText: 'generate uuidv7', documentation: 'Time-ordered UUID v7; 74 random bits. Exposes time, not monotonic within a millisecond.' },\n { label: 'generate ulid', insertText: 'generate ulid', documentation: '26 uppercase Crockford base32 characters; 80 random bits. String concepts only.' },\n { label: 'generate typeid', insertText: 'generate typeid \"${1:user}\"', documentation: 'TypeID 0.3, lowercase UUIDv7 base32; 74 random bits. Empty prefix has no separator.' },\n { label: 'generate nanoid', insertText: 'generate nanoid ${1:21}', documentation: 'String from a distinct printable ASCII alphabet; size × log2(alphabet size) random bits. Default: 21 × 6 = 126 bits.' },\n { label: 'generate bytes', insertText: 'generate bytes ${1:32} ${2|base64url,hex,base32|}', documentation: 'Cryptographic random bytes, RFC 4648 without padding; 8 × count bits. Case applies only to hex/base32.' },\n { label: 'generate pattern', insertText: 'generate pattern \"${1:ORD-#{7}}\"', documentation: 'Parsed and printed, not yet executable (#616 phase 3).' },\n { label: 'generate random', insertText: 'generate random ${1:1}..${2:9}', documentation: 'Int range; parsed and printed, not yet executable (#616 phase 3).' },\n { label: 'generate rule', insertText: 'generate rule ${1:Name}', documentation: 'Implementation attachment; parsed and printed, not yet executable (#616 phase 3).' },\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: 'by parts', insertText: 'by\\n ${1:part} ${2:Type}\\n ${3:part} ${4:Type}', documentation: 'Declares a composite lookup. Supply every key part for a single instance.' },\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: 'from', insertText: 'from ${1:Source.Stream}', documentation: 'Observe matching routed facts only, without filtering stream ids. ESM v10.' },\n { label: 'runs as system', insertText: 'runs as system', documentation: 'Authenticated system identity with no roles for returned commands. Admitted by released ESM v10; claims are unknown.' },\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. Admitted by released ESM v10; claims are unknown.' },\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: 'Text needs a non-whitespace character; null, empty and whitespace-only text fail. Uses Unicode White_Space (.NET char.IsWhiteSpace), including U+0085 but not U+FEFF, not JavaScript trim(). Collections need at least one element. Applies to concept and command rules in every ESM version; no trimming. Identity text is unchanged.' },\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,gDAAiD,cAAe,8CAA+C,EACzJ,CAAE,MAAO,oBAAqB,WAAY,gEAAiE,cAAe,4EAA6E,EACvM,CAAE,MAAO,mBAAoB,WAAY,wEAAyE,cAAe,8DAA+D,EAChM,CAAE,MAAO,mBAAoB,WAAY,4CAA6C,cAAe,kDAAmD,CAC5J,EAEA,SAAgB,uBAAuB,EAA6C,CAChF,IAAMC,EAAU,CAAC,GAAG,IAAI,KAAKC,EAAQ,iBAAmB,CAAC,EAAA,CAAG,IAAI,GAAU,CAACC,EAAO,KAAMA,CAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAC1G,MAAO,CAAC,GAAGC,EAAsB,GAAGH,EAAQ,OAAO,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,CAC5E,IAAMC,EAAUC,EAAYF,EAAaE,GAAa,IAAA,GACtD,OAAOD,EAAUpC,EAAW,OAAO,GAAQH,EAAK,QAAU,WAAaA,EAAK,QAAU,WAAaA,EAAK,QAAU,iBAAmBA,EAAK,QAAU,gBAAkBA,EAAK,QAAU,cAAiBA,EAAK,QAAU,aAAewC,IAAc,aAAgBD,EAAQ,SAASvC,EAAK,KAAK,CAAC,EAAIG,CACtS"}
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 a positional enumeration. Reordering or inserting members changes their stored numbers.' },\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: 'generate uuid', insertText: 'generate uuid', documentation: 'Random UUID v4; 122 random bits. Implicit on Uuid concepts; String UUIDs are lowercase by default.' },\n { label: 'generate uuidv7', insertText: 'generate uuidv7', documentation: 'Time-ordered UUID v7; 74 random bits. Exposes time, not monotonic within a millisecond.' },\n { label: 'generate ulid', insertText: 'generate ulid', documentation: '26 uppercase Crockford base32 characters; 80 random bits. String concepts only.' },\n { label: 'generate typeid', insertText: 'generate typeid \"${1:user}\"', documentation: 'TypeID 0.3, lowercase UUIDv7 base32; 74 random bits. Empty prefix has no separator.' },\n { label: 'generate nanoid', insertText: 'generate nanoid ${1:21}', documentation: 'String from a distinct printable ASCII alphabet; size × log2(alphabet size) random bits. Default: 21 × 6 = 126 bits.' },\n { label: 'generate bytes', insertText: 'generate bytes ${1:32} ${2|base64url,hex,base32|}', documentation: 'Cryptographic random bytes, RFC 4648 without padding; 8 × count bits. Case applies only to hex/base32.' },\n { label: 'generate pattern', insertText: 'generate pattern \"${1:ORD-#{7}}\"', documentation: 'Parsed and printed, not yet executable (#616 phase 3).' },\n { label: 'generate random', insertText: 'generate random ${1:1}..${2:9}', documentation: 'Int range; parsed and printed, not yet executable (#616 phase 3).' },\n { label: 'generate rule', insertText: 'generate rule ${1:Name}', documentation: 'Implementation attachment; parsed and printed, not yet executable (#616 phase 3).' },\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: 'by parts', insertText: 'by\\n ${1:part} ${2:Type}\\n ${3:part} ${4:Type}', documentation: 'Declares a composite lookup. Supply every key part for a single instance.' },\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: 'from', insertText: 'from ${1:Source.Stream}', documentation: 'Observe matching routed facts only, without filtering stream ids. ESM v10.' },\n { label: 'runs as system', insertText: 'runs as system', documentation: 'Authenticated system identity with no roles for returned commands. Admitted by released ESM v10; claims are unknown.' },\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. Admitted by released ESM v10; claims are unknown.' },\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 is 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 and delivers it again to one named event-trigger reaction; the event is not appended again. Executable from ESM v17.' },\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: 'Asserts the action appended no events, including after when append, where no reaction appended anything. Executable from ESM v17; 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 and delivers it again to one named reaction; the event is not appended again. Executable from ESM v17.' },\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: 'Asserts the action appended no events, including after when append. Executable from ESM v17.' },\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: 'Text needs a non-whitespace character; null, empty and whitespace-only text fail. Uses Unicode White_Space (.NET char.IsWhiteSpace), including U+0085 but not U+FEFF, not JavaScript trim(). Collections need at least one element. Applies to concept and command rules in every ESM version; no trimming. Identity text is unchanged.' },\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,gDAAiD,cAAe,8CAA+C,EACzJ,CAAE,MAAO,oBAAqB,WAAY,gEAAiE,cAAe,4EAA6E,EACvM,CAAE,MAAO,mBAAoB,WAAY,wEAAyE,cAAe,8DAA+D,EAChM,CAAE,MAAO,mBAAoB,WAAY,4CAA6C,cAAe,kDAAmD,CAC5J,EAEA,SAAgB,uBAAuB,EAA6C,CAChF,IAAMC,EAAU,CAAC,GAAG,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CAAC,YAAa,OAAQ,cAAe,WAAY,UAAW,UAAW,QAAS,mBAAoB,YAAa,eAAe,EAC5I,UAAW,CAAC,OAAQ,cAAe,UAAW,QAAS,mBAAoB,eAAe,CAC9F,EAEA,SAAgB,cAAc,EAAkD,CAC5E,IAAMC,EAAUC,EAAYF,EAAaE,GAAa,IAAA,GACtD,OAAOD,EAAUpC,EAAW,OAAO,GAAQH,EAAK,QAAU,WAAaA,EAAK,QAAU,WAAaA,EAAK,QAAU,iBAAmBA,EAAK,QAAU,gBAAkBA,EAAK,QAAU,cAAiBA,EAAK,QAAU,aAAewC,IAAc,aAAgBD,EAAQ,SAASvC,EAAK,KAAK,CAAC,EAAIG,CACtS"}
@@ -1,4 +1,4 @@
1
- import"./_virtual/_virtual/_rolldown/runtime.js";import{typeReferenceText as e}from"./TypeReferenceSymbol.js";import{isSourceStreamName as t,isSourceStreamTypeName as n,sourceStreamPattern as r}from"./compiler/Text/SourceStreamNames.js";import"./compiler/index.js";import{enclosingChain as i,fenceMap as a,indentOf as o,withoutComment as s}from"./document-context.js";import{responseAnalysis as c}from"./response-analysis.js";import{symbolsForBuffer as l}from"./symbols.js";const u=`Event sources, streams and declarative command routes are admitted in executable semantic model (ESM) v8. A route classifies events; it does not supply an identity destination. Property-path mappings and handler routes remain unadmitted (PLAY0268).`,d=`Specification event routes, including example routes, are admitted in executable semantic model (ESM) v8. Redelivery remains unadmitted (PLAY0268) (#433), independently of its locator route.`,f=r(`^\\s*stream\\s+(?:[A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)?\\.?)?$`),p=r(`^\\s*streamId\\s*=\\s*([\\w.]*)$`),m=r(`^\\s*identifier\\s+[\\w.]*$`),h=r(`^\\s*streamId\\s+[\\w.]*$`);function analyzeEventSources(e,t){return t=l(e,t),c(e,t?.authoringDocuments??t?.authoringSources?.filter(t=>t!==e.join(`
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{typeReferenceText as e}from"./TypeReferenceSymbol.js";import{isSourceStreamName as t,isSourceStreamTypeName as n,sourceStreamPattern as r}from"./compiler/Text/SourceStreamNames.js";import"./compiler/index.js";import{enclosingChain as i,fenceMap as a,indentOf as o,withoutComment as s}from"./document-context.js";import{responseAnalysis as c}from"./response-analysis.js";import{symbolsForBuffer as l}from"./symbols.js";const u=`Event sources, streams and declarative command routes are admitted in executable semantic model (ESM) v8. A route classifies events; it does not supply an identity destination. Property-path mappings and handler routes remain unadmitted (PLAY0268).`,d=`Specification event routes, including example routes, are admitted in executable semantic model (ESM) v8. Redelivery is executable from ESM v17, independently of its locator route.`,f=r(`^\\s*stream\\s+(?:[A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)?\\.?)?$`),p=r(`^\\s*streamId\\s*=\\s*([\\w.]*)$`),m=r(`^\\s*identifier\\s+[\\w.]*$`),h=r(`^\\s*streamId\\s+[\\w.]*$`);function analyzeEventSources(e,t){return t=l(e,t),c(e,t?.authoringDocuments??t?.authoringSources?.filter(t=>t!==e.join(`
2
2
  `))??[],t?.authoringPlacement,t?.authoringPath,t?.authoringPlacementResolved).eventSources}function eventSourceDetails(t,n){return[`**${n?`stream ${t.name}.${n.name}`:`eventsource ${t.name}`}**`,n?.description??t.description??``,t.identifier?`Identifier type: ${e(t.identifier)}`:`No identifier type declared.`,n?n.streamIdParts.length>0?`Stream id parts: ${n.streamIdParts.map(t=>`${t.name} ${e(t.type)}`).join(`, `)}`:n.streamId?`Stream id type: ${e(n.streamId)}`:`Unkeyed stream.`:t.streams.map(t=>`${t.name}${t.streamIdParts.length>0?` — ${t.streamIdParts.map(t=>`${t.name} ${e(t.type)}`).join(`, `)}`:t.streamId?` — ${e(t.streamId)}`:` — unkeyed`}`).join(`
3
3
  `),n?.id??(n?null:t.id)?`Stored-name pin (rename-only metadata; not a semantic ID).`:``,u].filter(Boolean).join(`
4
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"event-source-authoring.js","names":["eventSourceAvailability","specificationRouteAvailability","routePrefix","sourceStreamPattern","keyPrefix","identifierTypePrefix","streamTypePrefix","symbolsForBuffer","lines","symbols","responseAnalysis","source","stream","typeReferenceText","part","analysis","location","route","name","line","start","end","withoutComment","candidate","resolution","sourcePart","prefix","filter","resolved","reference","context","blockLocation","declaration","confidence","mapping","expression","typed","parts","properties","optional","collection","index","matches","property","types","type","indentOf","indent","owner","text","fenceMap","before","chain","enclosingChain","target","primitive","concept","concepts","path","segment","fields","isSourceStreamName","mapped","literal","qualified","matching","entry","names","ownsStream","partType","streamId","isSourceStreamTypeName"],"sources":["../../event-source-authoring.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 { CompletionEntry } from './completion-items';\nimport { enclosingChain, fenceMap, indentOf, withoutComment } from './document-context';\nimport { AuthoredEventSource } from './AuthoredEventSource';\nimport { AuthoredStream } from './AuthoredStream';\nimport { isSourceStreamName, isSourceStreamTypeName, sourceStreamPattern } from '@cratis/screenplay-compiler';\nimport { DocumentSymbols, symbolsForBuffer } from './symbols';\nimport { responseAnalysis } from './response-analysis';\nimport { typeReferenceText } from './TypeReferenceSymbol';\n\nexport const eventSourceAvailability = 'Event sources, streams and declarative command routes are admitted in executable semantic model (ESM) v8. A route classifies events; it does not supply an identity destination. Property-path mappings and handler routes remain unadmitted (PLAY0268).';\n\nexport const specificationRouteAvailability = 'Specification event routes, including example routes, are admitted in executable semantic model (ESM) v8. Redelivery remains unadmitted (PLAY0268) (#433), independently of its locator route.';\n\nconst routePrefix = sourceStreamPattern('^\\\\s*stream\\\\s+(?:[A-Za-z_]\\\\w*(?:\\\\.[A-Za-z_]\\\\w*)?\\\\.?)?$');\nconst keyPrefix = sourceStreamPattern('^\\\\s*streamId\\\\s*=\\\\s*([\\\\w.]*)$');\nconst identifierTypePrefix = sourceStreamPattern('^\\\\s*identifier\\\\s+[\\\\w.]*$');\nconst streamTypePrefix = sourceStreamPattern('^\\\\s*streamId\\\\s+[\\\\w.]*$');\n\nexport function analyzeEventSources(lines: string[], symbols?: DocumentSymbols) {\n symbols = symbolsForBuffer(lines, symbols);\n return responseAnalysis(lines, symbols?.authoringDocuments ?? symbols?.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols?.authoringPlacement, symbols?.authoringPath, symbols?.authoringPlacementResolved).eventSources;\n}\n\nexport function eventSourceDetails(source: AuthoredEventSource, stream?: AuthoredStream): string {\n return [`**${stream ? `stream ${source.name}.${stream.name}` : `eventsource ${source.name}`}**`,\n stream?.description ?? source.description ?? '',\n source.identifier ? `Identifier type: ${typeReferenceText(source.identifier)}` : 'No identifier type declared.',\n stream ? stream.streamIdParts.length > 0 ? `Stream id parts: ${stream.streamIdParts.map(part => `${part.name} ${typeReferenceText(part.type)}`).join(', ')}` : stream.streamId ? `Stream id type: ${typeReferenceText(stream.streamId)}` : 'Unkeyed stream.' : source.streams.map(stream => `${stream.name}${stream.streamIdParts.length > 0 ? ` — ${stream.streamIdParts.map(part => `${part.name} ${typeReferenceText(part.type)}`).join(', ')}` : stream.streamId ? ` — ${typeReferenceText(stream.streamId)}` : ' — unkeyed'}`).join('\\n'),\n (stream?.id ?? (!stream ? source.id : null)) ? 'Stored-name pin (rename-only metadata; not a semantic ID).' : '', eventSourceAvailability].filter(Boolean).join('\\n\\n');\n}\n\nexport function eventSourceReferenceAt(lines: string[], line: number, start: number, end: number, symbols?: DocumentSymbols) {\n const analysis = analyzeEventSources(lines, symbols);\n const at = (route: typeof analysis.routes[number]) => {\n const location = route.referenceLocation;\n const name = `${route.eventSource}.${route.stream}`;\n return location?.line === line + 1 && start >= location.column && end <= location.column + name.length &&\n withoutComment(lines[line] ?? '').slice(location.column - 1, location.column - 1 + name.length) === name;\n };\n const candidate = analysis.ambiguousCandidates.find(at);\n if (candidate) return { route: candidate, resolution: { state: 'ambiguous', source: undefined, stream: undefined }, target: undefined };\n const route = analysis.routes.find(at);\n if (!route) return null;\n const resolution = analysis.resolve(route.eventSource, route.stream);\n const sourcePart = end <= route.referenceLocation!.column + route.eventSource.length;\n return { route, resolution, target: resolution.state === 'unique' ? sourcePart ? resolution.source : resolution.stream : undefined };\n}\n\n// The location is a typed header start. Match its exact prefix, never search comments or another\n// occurrence of the same name. Both hosts use this to navigate to the authored identifier.\nexport function eventSourceIdentifier(location: { line: number; column: number; path?: string }, name: string, source: string) {\n const line = withoutComment(source.split(/\\r?\\n/)[location.line - 1] ?? '');\n const prefix = line.slice(location.column - 1).match(/^(?:eventsource|stream)\\s+/)?.[0];\n return prefix && line.slice(location.column - 1 + prefix.length, location.column - 1 + prefix.length + name.length) === name\n ? { ...location, column: location.column + prefix.length } : undefined;\n}\n\nexport function eventSourceHover(lines: string[], line: number, start: number, end: number, symbols?: DocumentSymbols): string | null {\n symbols = symbolsForBuffer(lines, symbols);\n const analysis = analyzeEventSources(lines, symbols);\n const filter = analysis.contexts.get(line)?.observer?.from;\n if (filter?.location.line === line + 1 && /^\\s*from\\s+/.test(withoutComment(lines[line] ?? ''))) {\n const resolved = analysis.resolve(filter.eventSource, filter.stream ?? undefined);\n return resolved.source ? `${eventSourceDetails(resolved.source, resolved.stream)}\\n\\nObserves routed facts only. Stream ids are not filtered. Admitted by ESM v10.` : 'Unresolved observer filter (PLAY0665).';\n }\n const reference = eventSourceReferenceAt(lines, line, start, end, symbols);\n if (reference) return reference.resolution.source && reference.resolution.stream ? eventSourceDetails(reference.resolution.source, reference.resolution.stream) + (analysis.contexts.get(line)?.event ? `\\n\\n${specificationRouteAvailability}` : '')\n : `Physical stream owner: ${reference.resolution.state}; no route selected. ${'reasons' in reference.resolution ? reference.resolution.reasons.join(' ') : ''} ${eventSourceAvailability}`;\n const context = analysis.contexts.get(line);\n if (context?.event?.noStream?.location.line === line + 1 && start >= context.event.noStream.location.column && end <= context.event.noStream.location.column + 9)\n return `Assert an unrouted event; omitting a route on then leaves it unasserted. ${specificationRouteAvailability}`;\n if (context?.event && context.route?.streamId?.location.line === line + 1 && start === context.route.streamId.location.column && end === start + 8)\n return `Concrete literal stream id, not a command property mapping. ${specificationRouteAvailability}`;\n const blockLocation = context?.route?.directiveLocations?.streamId ?? context?.stream?.directiveLocations?.streamId;\n if (blockLocation?.line === line + 1 && start === blockLocation.column && end === start + 8)\n return `Composite stream id: named parts, not a pre-joined value. ${context?.event ? specificationRouteAvailability : eventSourceAvailability}`;\n for (const part of context?.route?.streamIdParts ?? []) {\n if (part.location.line === line + 1 && start === part.location.column && end === start + part.property.length)\n return `Authored stream id part **${part.property}**. ${context?.event ? `Concrete literal. ${specificationRouteAvailability}` : eventSourceAvailability}`;\n }\n const declaration = context?.stream ?? context?.source;\n if (declaration) {\n const name = eventSourceIdentifier(declaration.location, declaration.name, lines.join('\\n'));\n if (name?.line === line + 1 && start === name.column && end === start + declaration.name.length && context?.source) {\n const confidence = analysis.resolve(context.source.name, context.stream?.name);\n return eventSourceDetails(context.source, context.stream) + (confidence.state === 'unique' ? '' : `\\n\\nPhysical ownership: ${confidence.state}. ${confidence.reasons.join(' ')}`);\n }\n }\n const mapping = context?.route ? [context.route.streamId, ...context.route.streamIdParts].find(mapping => mapping?.location.line === line + 1) : undefined;\n if (mapping && context?.command) {\n if (mapping.location.line === line + 1 && start === mapping.location.column && end === start + 8)\n return `Authored stream id mapping. ${eventSourceAvailability}`;\n const expression = mapping.source as { kind?: string; path?: string; location?: { line: number; column: number } };\n if (expression.kind === 'PathExpressionSyntax' && expression.path && expression.location?.line === line + 1 &&\n start >= expression.location.column && end <= expression.location.column + expression.path.length) {\n const typed = responseAnalysis(lines, symbols?.authoringDocuments ?? symbols?.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols?.authoringPlacement, symbols?.authoringPath, symbols?.authoringPlacementResolved);\n const prefix = expression.path.slice(0, end - expression.location.column);\n const parts = prefix.split('.');\n let properties = context.command.properties;\n let optional = false;\n let collection = false;\n for (const [index, part] of parts.entries()) {\n const matches = properties.filter(property => property.name === part);\n if (matches.length !== 1) break;\n const property = matches[0];\n optional ||= property.type.isOptional;\n collection ||= property.type.isCollection;\n if (index === parts.length - 1)\n return `**${part}** — ${typeReferenceText({ ...property.type, isOptional: optional, isCollection: collection })}. Command source for authored stream id. ${eventSourceAvailability}`;\n const types = typed.operations.types.filter(type => type.name === property.type.name);\n if (types.length !== 1 || collection) break;\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n }\n }\n if (context?.source && /^\\s*id\\s+\"/.test(withoutComment(lines[line] ?? '')) && start === indentOf(lines[line]) + 1 && end === start + 2)\n return `Stored-name pin: rename-only metadata, not a semantic identity or an automatic refactor. ${eventSourceAvailability}`;\n const type = context?.stream?.streamIdParts.find(part => part.type.location?.line === line + 1)?.type ?? context?.stream?.streamId ?? context?.source?.identifier;\n if (type && type.location?.line === line + 1 && start >= type.location.column && end <= type.location.column + type.name.length)\n return `${typeReferenceText(type)} — authored ${context?.stream ? 'stream id' : 'identifier'} type. ${eventSourceAvailability}`;\n return null;\n}\n\nfunction streamIdHeader(lines: string[], line: number, owner: number): number | null {\n const indent = indentOf(lines[line] ?? '');\n for (let index = line - 1; index > owner; index--) {\n const text = withoutComment(lines[index]);\n if (!text.trim() || indentOf(text) >= indent) continue;\n return text.trim() === 'streamId' ? index : null;\n }\n return null;\n}\n\nexport function eventSourceCompletions(lines: string[], line: number, before: string, symbols: DocumentSymbols): CompletionEntry[] | null {\n // .NET word characters are UTF-16 code units; supplementary letters are not identifiers.\n if (fenceMap(lines)[line] || withoutComment(before).length < before.length || /[\\uD800-\\uDFFF]/.test(before)) return null;\n const analysis = analyzeEventSources(lines, symbols);\n const context = analysis.contexts.get(line);\n const indent = before.trim() ? indentOf(lines[line]) : before.length;\n const chain = enclosingChain(lines, fenceMap(lines), line, indent);\n if (context?.observer && ['reaction', 'reducer'].includes(chain[0])) {\n if (/^\\s*from\\s+[\\w.]*$/.test(before) && (!context.observer.from || context.observer.from.location.line === line + 1)) {\n const prefix = before.trim().split(/\\s+/)[1] ?? '';\n return analysis.declarations.filter(source => analysis.resolve(source.name).state === 'unique').flatMap(source => [\n { name: source.name, source, stream: undefined },\n ...source.streams.filter(stream => analysis.resolve(source.name, stream.name).state === 'unique').map(stream => ({ name: `${source.name}.${stream.name}`, source, stream }))\n ]).filter(target => target.name.startsWith(prefix)).map(target => ({ label: target.name, insertText: prefix.includes('.') ? target.stream?.name ?? target.name : target.name, documentation: 'Observes routed facts from this source or stream. Stream ids are not filtered. ESM v10.' }));\n }\n }\n if (context?.route && indent > indentOf(lines[context.route.location.line - 1])) {\n const stream = analysis.resolve(context.route.eventSource, context.route.stream).stream;\n if (stream?.streamIdParts.length) {\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n const literal = (name: string) => {\n const primitive = typed.operations.concepts.find(concept => concept.name === name)?.type ?? name;\n return primitive === 'Int' ? '0' : primitive === 'Uuid' ? '\"00000000-0000-0000-0000-000000000000\"' : '\"${1:value}\"';\n };\n if (streamIdHeader(lines, line, context.route.location.line - 1) !== null) {\n const mapping = sourceStreamPattern('^\\\\s*([A-Za-z_]\\\\w*)\\\\s*=(?!=|>)\\\\s*([\\\\w.]*)$').exec(before);\n if (mapping) {\n const part = stream.streamIdParts.find(part => part.name === mapping[1]);\n if (!part) return [];\n if (context.event) return [{ label: part.name, insertText: literal(part.type.name), documentation: specificationRouteAvailability }];\n if (!context.command) return [];\n const concepts = typed.operations.concepts.filter(concept => concept.name === part.type.name);\n if (part.type.isOptional || part.type.isCollection || !(['String', 'Uuid'].includes(part.type.name) || concepts.length === 1 && ['String', 'Uuid', 'Int'].includes(concepts[0].type) && concepts[0].values.length === 0)) return [];\n const path = mapping[2].split('.');\n let properties = context.command.properties;\n for (const segment of path.slice(0, -1)) {\n const fields = properties.filter(property => property.name === segment && !property.type.isOptional && !property.type.isCollection);\n if (fields.length !== 1) return [];\n const types = typed.operations.types.filter(type => type.name === fields[0].type.name);\n if (types.length !== 1) return [];\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n return properties.filter(property => isSourceStreamName(property.name) && property.type.name === part.type.name && !property.type.isOptional && !property.type.isCollection)\n .map(property => ({ label: property.name, insertText: property.name, documentation: `${typeReferenceText(property.type)} — command source for authored stream id. ${eventSourceAvailability}` }));\n }\n const mapped = new Set(context.route.streamIdParts.filter(part => part.location.line !== line + 1).map(part => part.property));\n return stream.streamIdParts.filter(part => !mapped.has(part.name) && part.name.startsWith(before.trim()))\n .map(part => ({ label: part.name, insertText: `${part.name} = ${context.event ? literal(part.type.name) : ''}`, documentation: context.event ? specificationRouteAvailability : eventSourceAvailability }));\n }\n if (/^\\s*(?:streamId)?$/.test(before)) return [{ label: 'streamId parts', insertText: `streamId\\n${stream.streamIdParts.map((part, index) => ` ${part.name} = ${context.event ? literal(part.type.name) : `\\${${index + 1}:source}`}`).join('\\n')}`, documentation: context.event ? specificationRouteAvailability : eventSourceAvailability }];\n return [];\n }\n }\n if (context?.event && indent > indentOf(lines[context.event.location.line - 1])) {\n if (context.route && indent > indentOf(lines[context.route.location.line - 1])) {\n const target = analysis.resolve(context.route.eventSource, context.route.stream).stream?.streamId;\n if (!target || context.route.streamId && context.route.streamId.location.line !== line + 1) return [];\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n const primitive = typed.operations.concepts.find(concept => concept.name === target.name)?.type ?? target.name;\n const literal = primitive === 'Int' ? '0' : primitive === 'Uuid' ? '\"00000000-0000-0000-0000-000000000000\"' : '\"${1:value}\"';\n if (/^\\s*(?:streamId\\s*=\\s*)?$/.test(before) || 'streamId'.startsWith(before.trim()))\n return [{ label: 'streamId', insertText: before.includes('=') ? literal : `streamId = ${literal}`, documentation: `Concrete ${typeReferenceText(target)} literal. ${specificationRouteAvailability}` }];\n return [];\n }\n if (routePrefix.test(before) && (!context.event.stream || context.event.stream.location.line === line + 1) && !context.event.noStream) {\n const qualified = before.trim().split(/\\s+/)[1] ?? '';\n // Specification payload lines require '=', so imported value types cannot compete\n // with a route here as they do under a command. Physical ownership still must be unique.\n const targets = analysis.declarations.flatMap(source => source.streams.filter(stream => analysis.resolve(source.name, stream.name).state === 'unique')\n .map(stream => ({ name: `${source.name}.${stream.name}`, source, stream })));\n return targets.filter(target => isSourceStreamName(target.source.name) && isSourceStreamName(target.stream.name) && (!qualified.includes('.') || target.name.startsWith(qualified.slice(0, qualified.lastIndexOf('.') + 1))))\n .map(target => ({ label: target.name, insertText: qualified.includes('.') ? target.stream.name : target.name, documentation: `${eventSourceDetails(target.source, target.stream)}\\n\\n${specificationRouteAvailability}` }));\n }\n if (context.event.stream || context.event.noStream)\n return !before.trim() || 'stream'.startsWith(before.trim()) || 'no stream'.startsWith(before.trim()) ? [] : null;\n const entries = [{ label: 'stream', insertText: 'stream ${1:Source.Stream}', documentation: specificationRouteAvailability },\n ...(context.expectation ? [{ label: 'no stream', insertText: /^\\s*no\\s+/.test(before) ? 'stream' : 'no stream', documentation: `Assert an unrouted fact. ${specificationRouteAvailability}` }] : [])];\n const matching = entries.filter(entry => entry.label.startsWith(before.trim()));\n return matching.length > 0 ? matching : null;\n }\n if (context?.command && indent > indentOf(lines[context.command.location.line - 1]) &&\n (!context.route || indent <= indentOf(lines[context.route.location.line - 1])) && routePrefix.test(before)) {\n // A property named stream remains legal. Only offer routes whose complete-input\n // candidates have no known value-type competitor; never silently rewrite ambiguity.\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const names = new Set([...typed.operations.concepts, ...typed.operations.types].map(type => type.name));\n // targets already exclude competing imports from the authoritative parsed documents.\n // Scanned symbols can retain an import removed from the current unsaved buffer.\n const qualified = before.trim().split(/\\s+/)[1] ?? '';\n return analysis.targets.filter(target => isSourceStreamName(target.source.name) && isSourceStreamName(target.stream.name) && (context.production || !names.has(target.name)) && (!qualified.includes('.') || target.name.startsWith(qualified.slice(0, qualified.lastIndexOf('.') + 1))))\n .map(target => ({ label: target.name, insertText: qualified.includes('.') ? target.stream.name : target.name, documentation: eventSourceDetails(target.source, target.stream) }));\n }\n if (context?.route && context.command && indent > indentOf(lines[context.route.location.line - 1]) && keyPrefix.test(before)) {\n const target = analysis.resolve(context.route.eventSource, context.route.stream).stream?.streamId;\n if (!target) return [];\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const concepts = typed.operations.concepts.filter(concept => concept.name === target.name);\n const supported = ['String', 'Uuid'].includes(target.name) || concepts.length === 1 && ['String', 'Uuid', 'Int'].includes(concepts[0].type) && concepts[0].values.length === 0;\n if (!supported || target.isOptional || target.isCollection) return [];\n const parts = keyPrefix.exec(before)![1].split('.');\n let properties = context.command.properties;\n for (const part of parts.slice(0, -1)) {\n const matches = properties.filter(property => property.name === part);\n if (matches.length !== 1 || matches[0].type.isOptional || matches[0].type.isCollection) return [];\n const types = typed.operations.types.filter(type => type.name === matches[0].type.name);\n if (types.length !== 1) return [];\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n return properties.filter(property => isSourceStreamName(property.name) && property.type.name === target.name && !property.type.isOptional && !property.type.isCollection)\n .map(property => ({ label: property.name, insertText: property.name, documentation: `${typeReferenceText(property.type)} — command source for authored stream id. ${eventSourceAvailability}` }));\n }\n if (context?.source && indent > indentOf(lines[context.source.location.line - 1])) {\n const ownsStream = context.stream && indent > indentOf(lines[context.stream.location.line - 1]);\n const partType = ownsStream && streamIdHeader(lines, line, context.stream!.location.line - 1) !== null && sourceStreamPattern('^\\\\s*[A-Za-z_]\\\\w*\\\\s+[\\\\w.]*$').test(before);\n if (partType || (ownsStream ? streamTypePrefix : identifierTypePrefix).test(before)) {\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const streamId = partType || /^\\s*streamId\\b/.test(before);\n return [...(streamId ? ['String', 'Uuid'] : ['String', 'Uuid', 'Int', 'Decimal', 'Bool', 'Date', 'DateTime']), ...typed.operations.concepts.filter(concept => !streamId || ['String', 'Uuid', 'Int'].includes(concept.type) && concept.values.length === 0).map(concept => concept.name)]\n .filter(isSourceStreamTypeName).map(name => ({ label: name, insertText: name, documentation: eventSourceAvailability }));\n }\n if (/^\\s*$/.test(before)) return ownsStream ? [\n { label: 'streamId', insertText: 'streamId ${1:Type}', documentation: eventSourceAvailability },\n { label: 'streamId parts', insertText: 'streamId\\n ${1:first} ${2:Type}\\n ${3:second} ${4:Type}', documentation: eventSourceAvailability },\n { label: 'description', insertText: 'description \"${1:Description}\"', documentation: 'Authored description.' }\n ] : [\n { label: 'identifier', insertText: 'identifier ${1:Type}', documentation: eventSourceAvailability },\n { label: 'stream', insertText: 'stream ${1:Name}', documentation: eventSourceAvailability },\n { label: 'description', insertText: 'description \"${1:Description}\"', documentation: 'Authored description.' }\n ];\n }\n return null;\n}\n"],"mappings":"0dAYA,MAAaA,EAA0B,2PAE1BC,EAAiC,iMAExCC,EAAcC,EAAoB,6DAA6D,EAC/FC,EAAYD,EAAoB,kCAAkC,EAClEE,EAAuBF,EAAoB,6BAA6B,EACxEG,EAAmBH,EAAoB,2BAA2B,EAExE,SAAgB,oBAAoB,EAAiB,EAA2B,CAE5E,MADA,GAAUI,EAAiBC,EAAOC,CAAO,EAClCC,EAAiBF,EAAOC,GAAS,oBAAsBA,GAAS,kBAAkB,OAAO,GAAUE,IAAWH,EAAM,KAAK;CAAI,CAAC,GAAK,CAAC,EAAGC,GAAS,mBAAoBA,GAAS,cAAeA,GAAS,0BAA0B,CAAC,CAAC,YAC5O,CAEA,SAAgB,mBAAmB,EAA6B,EAAiC,CAC7F,MAAO,CAAC,KAAKG,EAAS,UAAUD,EAAO,KAAK,GAAGC,EAAO,OAAS,eAAeD,EAAO,OAAO,IACxFC,GAAQ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AAS,OAAO,GAAW,CAACkC,GAAY,CAAC,SAAU,OAAQ,KAAK,CAAC,CAAC,SAASd,EAAQ,IAAI,GAAKA,EAAQ,OAAO,SAAW,CAAC,CAAC,CAAC,IAAI,GAAWA,EAAQ,IAAI,CAAC,CAAC,CACpR,OAAOe,CAAsB,CAAC,CAAC,IAAI,IAAS,CAAE,MAAOrD,EAAM,WAAYA,EAAM,cAAelB,CAAwB,EAAE,CAC/H,CACA,GAAI,QAAQ,KAAKmD,CAAM,EAAG,OAAOiB,EAAa,CAC1C,CAAE,MAAO,WAAY,WAAY,qBAAsB,cAAepE,CAAwB,EAC9F,CAAE,MAAO,iBAAkB,WAAY,4DAA6D,cAAeA,CAAwB,EAC3I,CAAE,MAAO,cAAe,WAAY,iCAAkC,cAAe,uBAAwB,CACjH,EAAI,CACA,CAAE,MAAO,aAAc,WAAY,uBAAwB,cAAeA,CAAwB,EAClG,CAAE,MAAO,SAAU,WAAY,mBAAoB,cAAeA,CAAwB,EAC1F,CAAE,MAAO,cAAe,WAAY,iCAAkC,cAAe,uBAAwB,CACjH,CACJ,CACA,OAAO,IACX"}
1
+ {"version":3,"file":"event-source-authoring.js","names":["eventSourceAvailability","specificationRouteAvailability","routePrefix","sourceStreamPattern","keyPrefix","identifierTypePrefix","streamTypePrefix","symbolsForBuffer","lines","symbols","responseAnalysis","source","stream","typeReferenceText","part","analysis","location","route","name","line","start","end","withoutComment","candidate","resolution","sourcePart","prefix","filter","resolved","reference","context","blockLocation","declaration","confidence","mapping","expression","typed","parts","properties","optional","collection","index","matches","property","types","type","indentOf","indent","owner","text","fenceMap","before","chain","enclosingChain","target","primitive","concept","concepts","path","segment","fields","isSourceStreamName","mapped","literal","qualified","matching","entry","names","ownsStream","partType","streamId","isSourceStreamTypeName"],"sources":["../../event-source-authoring.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 { CompletionEntry } from './completion-items';\nimport { enclosingChain, fenceMap, indentOf, withoutComment } from './document-context';\nimport { AuthoredEventSource } from './AuthoredEventSource';\nimport { AuthoredStream } from './AuthoredStream';\nimport { isSourceStreamName, isSourceStreamTypeName, sourceStreamPattern } from '@cratis/screenplay-compiler';\nimport { DocumentSymbols, symbolsForBuffer } from './symbols';\nimport { responseAnalysis } from './response-analysis';\nimport { typeReferenceText } from './TypeReferenceSymbol';\n\nexport const eventSourceAvailability = 'Event sources, streams and declarative command routes are admitted in executable semantic model (ESM) v8. A route classifies events; it does not supply an identity destination. Property-path mappings and handler routes remain unadmitted (PLAY0268).';\n\nexport const specificationRouteAvailability = 'Specification event routes, including example routes, are admitted in executable semantic model (ESM) v8. Redelivery is executable from ESM v17, independently of its locator route.';\n\nconst routePrefix = sourceStreamPattern('^\\\\s*stream\\\\s+(?:[A-Za-z_]\\\\w*(?:\\\\.[A-Za-z_]\\\\w*)?\\\\.?)?$');\nconst keyPrefix = sourceStreamPattern('^\\\\s*streamId\\\\s*=\\\\s*([\\\\w.]*)$');\nconst identifierTypePrefix = sourceStreamPattern('^\\\\s*identifier\\\\s+[\\\\w.]*$');\nconst streamTypePrefix = sourceStreamPattern('^\\\\s*streamId\\\\s+[\\\\w.]*$');\n\nexport function analyzeEventSources(lines: string[], symbols?: DocumentSymbols) {\n symbols = symbolsForBuffer(lines, symbols);\n return responseAnalysis(lines, symbols?.authoringDocuments ?? symbols?.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols?.authoringPlacement, symbols?.authoringPath, symbols?.authoringPlacementResolved).eventSources;\n}\n\nexport function eventSourceDetails(source: AuthoredEventSource, stream?: AuthoredStream): string {\n return [`**${stream ? `stream ${source.name}.${stream.name}` : `eventsource ${source.name}`}**`,\n stream?.description ?? source.description ?? '',\n source.identifier ? `Identifier type: ${typeReferenceText(source.identifier)}` : 'No identifier type declared.',\n stream ? stream.streamIdParts.length > 0 ? `Stream id parts: ${stream.streamIdParts.map(part => `${part.name} ${typeReferenceText(part.type)}`).join(', ')}` : stream.streamId ? `Stream id type: ${typeReferenceText(stream.streamId)}` : 'Unkeyed stream.' : source.streams.map(stream => `${stream.name}${stream.streamIdParts.length > 0 ? ` — ${stream.streamIdParts.map(part => `${part.name} ${typeReferenceText(part.type)}`).join(', ')}` : stream.streamId ? ` — ${typeReferenceText(stream.streamId)}` : ' — unkeyed'}`).join('\\n'),\n (stream?.id ?? (!stream ? source.id : null)) ? 'Stored-name pin (rename-only metadata; not a semantic ID).' : '', eventSourceAvailability].filter(Boolean).join('\\n\\n');\n}\n\nexport function eventSourceReferenceAt(lines: string[], line: number, start: number, end: number, symbols?: DocumentSymbols) {\n const analysis = analyzeEventSources(lines, symbols);\n const at = (route: typeof analysis.routes[number]) => {\n const location = route.referenceLocation;\n const name = `${route.eventSource}.${route.stream}`;\n return location?.line === line + 1 && start >= location.column && end <= location.column + name.length &&\n withoutComment(lines[line] ?? '').slice(location.column - 1, location.column - 1 + name.length) === name;\n };\n const candidate = analysis.ambiguousCandidates.find(at);\n if (candidate) return { route: candidate, resolution: { state: 'ambiguous', source: undefined, stream: undefined }, target: undefined };\n const route = analysis.routes.find(at);\n if (!route) return null;\n const resolution = analysis.resolve(route.eventSource, route.stream);\n const sourcePart = end <= route.referenceLocation!.column + route.eventSource.length;\n return { route, resolution, target: resolution.state === 'unique' ? sourcePart ? resolution.source : resolution.stream : undefined };\n}\n\n// The location is a typed header start. Match its exact prefix, never search comments or another\n// occurrence of the same name. Both hosts use this to navigate to the authored identifier.\nexport function eventSourceIdentifier(location: { line: number; column: number; path?: string }, name: string, source: string) {\n const line = withoutComment(source.split(/\\r?\\n/)[location.line - 1] ?? '');\n const prefix = line.slice(location.column - 1).match(/^(?:eventsource|stream)\\s+/)?.[0];\n return prefix && line.slice(location.column - 1 + prefix.length, location.column - 1 + prefix.length + name.length) === name\n ? { ...location, column: location.column + prefix.length } : undefined;\n}\n\nexport function eventSourceHover(lines: string[], line: number, start: number, end: number, symbols?: DocumentSymbols): string | null {\n symbols = symbolsForBuffer(lines, symbols);\n const analysis = analyzeEventSources(lines, symbols);\n const filter = analysis.contexts.get(line)?.observer?.from;\n if (filter?.location.line === line + 1 && /^\\s*from\\s+/.test(withoutComment(lines[line] ?? ''))) {\n const resolved = analysis.resolve(filter.eventSource, filter.stream ?? undefined);\n return resolved.source ? `${eventSourceDetails(resolved.source, resolved.stream)}\\n\\nObserves routed facts only. Stream ids are not filtered. Admitted by ESM v10.` : 'Unresolved observer filter (PLAY0665).';\n }\n const reference = eventSourceReferenceAt(lines, line, start, end, symbols);\n if (reference) return reference.resolution.source && reference.resolution.stream ? eventSourceDetails(reference.resolution.source, reference.resolution.stream) + (analysis.contexts.get(line)?.event ? `\\n\\n${specificationRouteAvailability}` : '')\n : `Physical stream owner: ${reference.resolution.state}; no route selected. ${'reasons' in reference.resolution ? reference.resolution.reasons.join(' ') : ''} ${eventSourceAvailability}`;\n const context = analysis.contexts.get(line);\n if (context?.event?.noStream?.location.line === line + 1 && start >= context.event.noStream.location.column && end <= context.event.noStream.location.column + 9)\n return `Assert an unrouted event; omitting a route on then leaves it unasserted. ${specificationRouteAvailability}`;\n if (context?.event && context.route?.streamId?.location.line === line + 1 && start === context.route.streamId.location.column && end === start + 8)\n return `Concrete literal stream id, not a command property mapping. ${specificationRouteAvailability}`;\n const blockLocation = context?.route?.directiveLocations?.streamId ?? context?.stream?.directiveLocations?.streamId;\n if (blockLocation?.line === line + 1 && start === blockLocation.column && end === start + 8)\n return `Composite stream id: named parts, not a pre-joined value. ${context?.event ? specificationRouteAvailability : eventSourceAvailability}`;\n for (const part of context?.route?.streamIdParts ?? []) {\n if (part.location.line === line + 1 && start === part.location.column && end === start + part.property.length)\n return `Authored stream id part **${part.property}**. ${context?.event ? `Concrete literal. ${specificationRouteAvailability}` : eventSourceAvailability}`;\n }\n const declaration = context?.stream ?? context?.source;\n if (declaration) {\n const name = eventSourceIdentifier(declaration.location, declaration.name, lines.join('\\n'));\n if (name?.line === line + 1 && start === name.column && end === start + declaration.name.length && context?.source) {\n const confidence = analysis.resolve(context.source.name, context.stream?.name);\n return eventSourceDetails(context.source, context.stream) + (confidence.state === 'unique' ? '' : `\\n\\nPhysical ownership: ${confidence.state}. ${confidence.reasons.join(' ')}`);\n }\n }\n const mapping = context?.route ? [context.route.streamId, ...context.route.streamIdParts].find(mapping => mapping?.location.line === line + 1) : undefined;\n if (mapping && context?.command) {\n if (mapping.location.line === line + 1 && start === mapping.location.column && end === start + 8)\n return `Authored stream id mapping. ${eventSourceAvailability}`;\n const expression = mapping.source as { kind?: string; path?: string; location?: { line: number; column: number } };\n if (expression.kind === 'PathExpressionSyntax' && expression.path && expression.location?.line === line + 1 &&\n start >= expression.location.column && end <= expression.location.column + expression.path.length) {\n const typed = responseAnalysis(lines, symbols?.authoringDocuments ?? symbols?.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols?.authoringPlacement, symbols?.authoringPath, symbols?.authoringPlacementResolved);\n const prefix = expression.path.slice(0, end - expression.location.column);\n const parts = prefix.split('.');\n let properties = context.command.properties;\n let optional = false;\n let collection = false;\n for (const [index, part] of parts.entries()) {\n const matches = properties.filter(property => property.name === part);\n if (matches.length !== 1) break;\n const property = matches[0];\n optional ||= property.type.isOptional;\n collection ||= property.type.isCollection;\n if (index === parts.length - 1)\n return `**${part}** — ${typeReferenceText({ ...property.type, isOptional: optional, isCollection: collection })}. Command source for authored stream id. ${eventSourceAvailability}`;\n const types = typed.operations.types.filter(type => type.name === property.type.name);\n if (types.length !== 1 || collection) break;\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n }\n }\n if (context?.source && /^\\s*id\\s+\"/.test(withoutComment(lines[line] ?? '')) && start === indentOf(lines[line]) + 1 && end === start + 2)\n return `Stored-name pin: rename-only metadata, not a semantic identity or an automatic refactor. ${eventSourceAvailability}`;\n const type = context?.stream?.streamIdParts.find(part => part.type.location?.line === line + 1)?.type ?? context?.stream?.streamId ?? context?.source?.identifier;\n if (type && type.location?.line === line + 1 && start >= type.location.column && end <= type.location.column + type.name.length)\n return `${typeReferenceText(type)} — authored ${context?.stream ? 'stream id' : 'identifier'} type. ${eventSourceAvailability}`;\n return null;\n}\n\nfunction streamIdHeader(lines: string[], line: number, owner: number): number | null {\n const indent = indentOf(lines[line] ?? '');\n for (let index = line - 1; index > owner; index--) {\n const text = withoutComment(lines[index]);\n if (!text.trim() || indentOf(text) >= indent) continue;\n return text.trim() === 'streamId' ? index : null;\n }\n return null;\n}\n\nexport function eventSourceCompletions(lines: string[], line: number, before: string, symbols: DocumentSymbols): CompletionEntry[] | null {\n // .NET word characters are UTF-16 code units; supplementary letters are not identifiers.\n if (fenceMap(lines)[line] || withoutComment(before).length < before.length || /[\\uD800-\\uDFFF]/.test(before)) return null;\n const analysis = analyzeEventSources(lines, symbols);\n const context = analysis.contexts.get(line);\n const indent = before.trim() ? indentOf(lines[line]) : before.length;\n const chain = enclosingChain(lines, fenceMap(lines), line, indent);\n if (context?.observer && ['reaction', 'reducer'].includes(chain[0])) {\n if (/^\\s*from\\s+[\\w.]*$/.test(before) && (!context.observer.from || context.observer.from.location.line === line + 1)) {\n const prefix = before.trim().split(/\\s+/)[1] ?? '';\n return analysis.declarations.filter(source => analysis.resolve(source.name).state === 'unique').flatMap(source => [\n { name: source.name, source, stream: undefined },\n ...source.streams.filter(stream => analysis.resolve(source.name, stream.name).state === 'unique').map(stream => ({ name: `${source.name}.${stream.name}`, source, stream }))\n ]).filter(target => target.name.startsWith(prefix)).map(target => ({ label: target.name, insertText: prefix.includes('.') ? target.stream?.name ?? target.name : target.name, documentation: 'Observes routed facts from this source or stream. Stream ids are not filtered. ESM v10.' }));\n }\n }\n if (context?.route && indent > indentOf(lines[context.route.location.line - 1])) {\n const stream = analysis.resolve(context.route.eventSource, context.route.stream).stream;\n if (stream?.streamIdParts.length) {\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n const literal = (name: string) => {\n const primitive = typed.operations.concepts.find(concept => concept.name === name)?.type ?? name;\n return primitive === 'Int' ? '0' : primitive === 'Uuid' ? '\"00000000-0000-0000-0000-000000000000\"' : '\"${1:value}\"';\n };\n if (streamIdHeader(lines, line, context.route.location.line - 1) !== null) {\n const mapping = sourceStreamPattern('^\\\\s*([A-Za-z_]\\\\w*)\\\\s*=(?!=|>)\\\\s*([\\\\w.]*)$').exec(before);\n if (mapping) {\n const part = stream.streamIdParts.find(part => part.name === mapping[1]);\n if (!part) return [];\n if (context.event) return [{ label: part.name, insertText: literal(part.type.name), documentation: specificationRouteAvailability }];\n if (!context.command) return [];\n const concepts = typed.operations.concepts.filter(concept => concept.name === part.type.name);\n if (part.type.isOptional || part.type.isCollection || !(['String', 'Uuid'].includes(part.type.name) || concepts.length === 1 && ['String', 'Uuid', 'Int'].includes(concepts[0].type) && concepts[0].values.length === 0)) return [];\n const path = mapping[2].split('.');\n let properties = context.command.properties;\n for (const segment of path.slice(0, -1)) {\n const fields = properties.filter(property => property.name === segment && !property.type.isOptional && !property.type.isCollection);\n if (fields.length !== 1) return [];\n const types = typed.operations.types.filter(type => type.name === fields[0].type.name);\n if (types.length !== 1) return [];\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n return properties.filter(property => isSourceStreamName(property.name) && property.type.name === part.type.name && !property.type.isOptional && !property.type.isCollection)\n .map(property => ({ label: property.name, insertText: property.name, documentation: `${typeReferenceText(property.type)} — command source for authored stream id. ${eventSourceAvailability}` }));\n }\n const mapped = new Set(context.route.streamIdParts.filter(part => part.location.line !== line + 1).map(part => part.property));\n return stream.streamIdParts.filter(part => !mapped.has(part.name) && part.name.startsWith(before.trim()))\n .map(part => ({ label: part.name, insertText: `${part.name} = ${context.event ? literal(part.type.name) : ''}`, documentation: context.event ? specificationRouteAvailability : eventSourceAvailability }));\n }\n if (/^\\s*(?:streamId)?$/.test(before)) return [{ label: 'streamId parts', insertText: `streamId\\n${stream.streamIdParts.map((part, index) => ` ${part.name} = ${context.event ? literal(part.type.name) : `\\${${index + 1}:source}`}`).join('\\n')}`, documentation: context.event ? specificationRouteAvailability : eventSourceAvailability }];\n return [];\n }\n }\n if (context?.event && indent > indentOf(lines[context.event.location.line - 1])) {\n if (context.route && indent > indentOf(lines[context.route.location.line - 1])) {\n const target = analysis.resolve(context.route.eventSource, context.route.stream).stream?.streamId;\n if (!target || context.route.streamId && context.route.streamId.location.line !== line + 1) return [];\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n const primitive = typed.operations.concepts.find(concept => concept.name === target.name)?.type ?? target.name;\n const literal = primitive === 'Int' ? '0' : primitive === 'Uuid' ? '\"00000000-0000-0000-0000-000000000000\"' : '\"${1:value}\"';\n if (/^\\s*(?:streamId\\s*=\\s*)?$/.test(before) || 'streamId'.startsWith(before.trim()))\n return [{ label: 'streamId', insertText: before.includes('=') ? literal : `streamId = ${literal}`, documentation: `Concrete ${typeReferenceText(target)} literal. ${specificationRouteAvailability}` }];\n return [];\n }\n if (routePrefix.test(before) && (!context.event.stream || context.event.stream.location.line === line + 1) && !context.event.noStream) {\n const qualified = before.trim().split(/\\s+/)[1] ?? '';\n // Specification payload lines require '=', so imported value types cannot compete\n // with a route here as they do under a command. Physical ownership still must be unique.\n const targets = analysis.declarations.flatMap(source => source.streams.filter(stream => analysis.resolve(source.name, stream.name).state === 'unique')\n .map(stream => ({ name: `${source.name}.${stream.name}`, source, stream })));\n return targets.filter(target => isSourceStreamName(target.source.name) && isSourceStreamName(target.stream.name) && (!qualified.includes('.') || target.name.startsWith(qualified.slice(0, qualified.lastIndexOf('.') + 1))))\n .map(target => ({ label: target.name, insertText: qualified.includes('.') ? target.stream.name : target.name, documentation: `${eventSourceDetails(target.source, target.stream)}\\n\\n${specificationRouteAvailability}` }));\n }\n if (context.event.stream || context.event.noStream)\n return !before.trim() || 'stream'.startsWith(before.trim()) || 'no stream'.startsWith(before.trim()) ? [] : null;\n const entries = [{ label: 'stream', insertText: 'stream ${1:Source.Stream}', documentation: specificationRouteAvailability },\n ...(context.expectation ? [{ label: 'no stream', insertText: /^\\s*no\\s+/.test(before) ? 'stream' : 'no stream', documentation: `Assert an unrouted fact. ${specificationRouteAvailability}` }] : [])];\n const matching = entries.filter(entry => entry.label.startsWith(before.trim()));\n return matching.length > 0 ? matching : null;\n }\n if (context?.command && indent > indentOf(lines[context.command.location.line - 1]) &&\n (!context.route || indent <= indentOf(lines[context.route.location.line - 1])) && routePrefix.test(before)) {\n // A property named stream remains legal. Only offer routes whose complete-input\n // candidates have no known value-type competitor; never silently rewrite ambiguity.\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const names = new Set([...typed.operations.concepts, ...typed.operations.types].map(type => type.name));\n // targets already exclude competing imports from the authoritative parsed documents.\n // Scanned symbols can retain an import removed from the current unsaved buffer.\n const qualified = before.trim().split(/\\s+/)[1] ?? '';\n return analysis.targets.filter(target => isSourceStreamName(target.source.name) && isSourceStreamName(target.stream.name) && (context.production || !names.has(target.name)) && (!qualified.includes('.') || target.name.startsWith(qualified.slice(0, qualified.lastIndexOf('.') + 1))))\n .map(target => ({ label: target.name, insertText: qualified.includes('.') ? target.stream.name : target.name, documentation: eventSourceDetails(target.source, target.stream) }));\n }\n if (context?.route && context.command && indent > indentOf(lines[context.route.location.line - 1]) && keyPrefix.test(before)) {\n const target = analysis.resolve(context.route.eventSource, context.route.stream).stream?.streamId;\n if (!target) return [];\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const concepts = typed.operations.concepts.filter(concept => concept.name === target.name);\n const supported = ['String', 'Uuid'].includes(target.name) || concepts.length === 1 && ['String', 'Uuid', 'Int'].includes(concepts[0].type) && concepts[0].values.length === 0;\n if (!supported || target.isOptional || target.isCollection) return [];\n const parts = keyPrefix.exec(before)![1].split('.');\n let properties = context.command.properties;\n for (const part of parts.slice(0, -1)) {\n const matches = properties.filter(property => property.name === part);\n if (matches.length !== 1 || matches[0].type.isOptional || matches[0].type.isCollection) return [];\n const types = typed.operations.types.filter(type => type.name === matches[0].type.name);\n if (types.length !== 1) return [];\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n return properties.filter(property => isSourceStreamName(property.name) && property.type.name === target.name && !property.type.isOptional && !property.type.isCollection)\n .map(property => ({ label: property.name, insertText: property.name, documentation: `${typeReferenceText(property.type)} — command source for authored stream id. ${eventSourceAvailability}` }));\n }\n if (context?.source && indent > indentOf(lines[context.source.location.line - 1])) {\n const ownsStream = context.stream && indent > indentOf(lines[context.stream.location.line - 1]);\n const partType = ownsStream && streamIdHeader(lines, line, context.stream!.location.line - 1) !== null && sourceStreamPattern('^\\\\s*[A-Za-z_]\\\\w*\\\\s+[\\\\w.]*$').test(before);\n if (partType || (ownsStream ? streamTypePrefix : identifierTypePrefix).test(before)) {\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const streamId = partType || /^\\s*streamId\\b/.test(before);\n return [...(streamId ? ['String', 'Uuid'] : ['String', 'Uuid', 'Int', 'Decimal', 'Bool', 'Date', 'DateTime']), ...typed.operations.concepts.filter(concept => !streamId || ['String', 'Uuid', 'Int'].includes(concept.type) && concept.values.length === 0).map(concept => concept.name)]\n .filter(isSourceStreamTypeName).map(name => ({ label: name, insertText: name, documentation: eventSourceAvailability }));\n }\n if (/^\\s*$/.test(before)) return ownsStream ? [\n { label: 'streamId', insertText: 'streamId ${1:Type}', documentation: eventSourceAvailability },\n { label: 'streamId parts', insertText: 'streamId\\n ${1:first} ${2:Type}\\n ${3:second} ${4:Type}', documentation: eventSourceAvailability },\n { label: 'description', insertText: 'description \"${1:Description}\"', documentation: 'Authored description.' }\n ] : [\n { label: 'identifier', insertText: 'identifier ${1:Type}', documentation: eventSourceAvailability },\n { label: 'stream', insertText: 'stream ${1:Name}', documentation: eventSourceAvailability },\n { label: 'description', insertText: 'description \"${1:Description}\"', documentation: 'Authored description.' }\n ];\n }\n return null;\n}\n"],"mappings":"0dAYA,MAAaA,EAA0B,2PAE1BC,EAAiC,uLAExCC,EAAcC,EAAoB,6DAA6D,EAC/FC,EAAYD,EAAoB,kCAAkC,EAClEE,EAAuBF,EAAoB,6BAA6B,EACxEG,EAAmBH,EAAoB,2BAA2B,EAExE,SAAgB,oBAAoB,EAAiB,EAA2B,CAE5E,MADA,GAAUI,EAAiBC,EAAOC,CAAO,EAClCC,EAAiBF,EAAOC,GAAS,oBAAsBA,GAAS,kBAAkB,OAAO,GAAUE,IAAWH,EAAM,KAAK;CAAI,CAAC,GAAK,CAAC,EAAGC,GAAS,mBAAoBA,GAAS,cAAeA,GAAS,0BAA0B,CAAC,CAAC,YAC5O,CAEA,SAAgB,mBAAmB,EAA6B,EAAiC,CAC7F,MAAO,CAAC,KAAKG,EAAS,UAAUD,EAAO,KAAK,GAAGC,EAAO,OAAS,eAAeD,EAAO,OAAO,IACxFC,GAAQ,aAAeD,EAAO,aAAe,GAC7CA,EAAO,WAAa,oBAAoBE,EAAkBF,EAAO,UAAU,IAAM,+BACjFC,EAASA,EAAO,cAAc,OAAS,EAAI,oBAAoBA,EAAO,cAAc,IAAI,GAAQ,GAAGE,EAAK,KAAK,GAAGD,EAAkBC,EAAK,IAAI,GAAG,CAAC,CAAC,KAAK,IAAI,IAAMF,EAAO,SAAW,mBAAmBC,EAAkBD,EAAO,QAAQ,IAAM,kBAAoBD,EAAO,QAAQ,IAAI,GAAU,GAAGC,EAAO,OAAOA,EAAO,cAAc,OAAS,EAAI,MAAMA,EAAO,cAAc,IAAI,GAAQ,GAAGE,EAAK,KAAK,GAAGD,EAAkBC,EAAK,IAAI,GAAG,CAAC,CAAC,KAA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