@cratis/screenplay-language 4.145.1 → 4.147.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js +1 -1
  2. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js.map +1 -1
  3. package/dist/bundles/compiler/Parsing/GenerationParser.js +2 -0
  4. package/dist/bundles/compiler/Parsing/GenerationParser.js.map +1 -0
  5. package/dist/bundles/compiler/Parsing/ResponseValidator.js +1 -1
  6. package/dist/bundles/compiler/Parsing/ResponseValidator.js.map +1 -1
  7. package/dist/bundles/compiler/Parsing/ScreenplayParser.js +1 -1
  8. package/dist/bundles/compiler/Parsing/ScreenplayParser.js.map +1 -1
  9. package/dist/bundles/compiler/Syntax/ScreenplaySyntaxWalker.js +1 -1
  10. package/dist/bundles/compiler/Syntax/ScreenplaySyntaxWalker.js.map +1 -1
  11. package/dist/bundles/compiler/Syntax/SyntaxCollections.js +1 -1
  12. package/dist/bundles/compiler/Syntax/SyntaxCollections.js.map +1 -1
  13. package/dist/bundles/compiler/Syntax/SyntaxJson.js +1 -1
  14. package/dist/bundles/compiler/Syntax/SyntaxJson.js.map +1 -1
  15. package/dist/bundles/completion-items.js +1 -1
  16. package/dist/bundles/completion-items.js.map +1 -1
  17. package/dist/bundles/completion-planner.js +2 -2
  18. package/dist/bundles/completion-planner.js.map +1 -1
  19. package/dist/bundles/diagnostic-codes.js +1 -1
  20. package/dist/bundles/diagnostic-codes.js.map +1 -1
  21. package/dist/bundles/generation-completions.js +2 -0
  22. package/dist/bundles/generation-completions.js.map +1 -0
  23. package/dist/bundles/hover-content.js +5 -5
  24. package/dist/bundles/hover-content.js.map +1 -1
  25. package/dist/bundles/response-completions.js +1 -1
  26. package/dist/bundles/response-completions.js.map +1 -1
  27. package/dist/bundles/symbols.js +1 -1
  28. package/dist/bundles/symbols.js.map +1 -1
  29. package/dist/bundles/tokens.js +1 -1
  30. package/dist/bundles/tokens.js.map +1 -1
  31. package/dist/bundles/validation.js +1 -1
  32. package/dist/bundles/validation.js.map +1 -1
  33. package/dist/completion-items.d.ts.map +1 -1
  34. package/dist/completion-planner.d.ts.map +1 -1
  35. package/dist/diagnostic-codes.d.ts +13 -0
  36. package/dist/diagnostic-codes.d.ts.map +1 -1
  37. package/dist/generation-completions.d.ts +3 -0
  38. package/dist/generation-completions.d.ts.map +1 -0
  39. package/dist/hover-content.d.ts.map +1 -1
  40. package/dist/response-completions.d.ts.map +1 -1
  41. package/dist/symbols.d.ts +1 -0
  42. package/dist/symbols.d.ts.map +1 -1
  43. package/dist/tokens.d.ts.map +1 -1
  44. package/dist/validation.d.ts.map +1 -1
  45. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import"./_virtual/_virtual/_rolldown/runtime.js";import{enclosingChain as e,enclosingHeaders as t,fenceMap as n,indentOf as r,nearestEnclosingLine as i,withoutComment as a}from"./document-context.js";import{purposeItems as o}from"./purpose-items.js";import{authenticationItems as s,behaviorItems as c,contributeItems as l,featureScopeItems as u,formItems as d,layoutItems as f,moduleScopeItems as p,outcomeItems as m,personaItems as h,readModelItems as g,reducerItems as _,seedItems as v,templateItems as y,themeItems as b,uiProfileItems as x}from"./scope-items.js";import{actionArgumentItems as ee,actionItems as S,commandItems as C,commandRuleItems as w,conceptItems as T,constraintItems as E,eventItems as D,guardedActionItems as O,handlerItems as k,identityItems as A,implementationItems as j,inlineEventItems as M,interactionActionItems as te,interactionChoiceItems as N,invocationItems as P,namedRuleImplementationItems as ne,operationImplementationItems as F,operationItems as I,operationPhaseItems as L,optionalTypeItems as R,performerItems as z,policyItems as B,producesItems as V,queryItems as H,reactionItems as U,reactionTriggerItems as W,refusalItems as G,ruleItems as K,screenItems as q,sliceItemsFor as J,specificationItems as Y,specificationStepItems as X,tableItems as re,topLevelItems as ie,triggerItems as ae,typeItems as oe,validateItems as se}from"./completion-items.js";import{scanDocument as Z}from"./symbols.js";import{responseCompletions as ce}from"./response-completions.js";import{exampleCompletions as le}from"./example-authoring.js";import{refusalContext as Q}from"./refusal-context.js";import{namedRuleContext as ue}from"./named-rule-context.js";import{dependencyTargetCompletions as de}from"./dependency-completions.js";import{structureCompletion as fe}from"./structure-completions.js";import{getSubLanguage as pe}from"./sub-language-registry.js";import{readModelKeyCompletions as me}from"./read-model-key-completions.js";const $={label:`stream`,insertText:"stream ${1:Source.Stream}",documentation:`Replace the whole command route for this event production. ESM v10.`},he=/(?:^|\s)rule\s+[A-Za-z_]\w*(?:\s+severity\s+(?:information|warning|error))?(?:\s+message\s+.*)?$/,declaredIn=(e,t)=>e.some(e=>RegExp(`^${t}\\b`).test(e));function topLevelEntries(e){return ie.filter(t=>!(t.label===`domain`&&declaredIn(e,`domain`))&&!(t.label===`authentication`&&declaredIn(e,`authentication`))&&!(t.label===`identity`&&declaredIn(e,`identity`)))}const isTemplate=e=>/^(?:screen|dialog)\s+template\b/.test(e??``);function expansionEntry(e,t){let n=e.split(`
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{enclosingChain as e,enclosingHeaders as t,fenceMap as n,indentOf as r,nearestEnclosingLine as i,withoutComment as a}from"./document-context.js";import{purposeItems as o}from"./purpose-items.js";import{authenticationItems as s,behaviorItems as c,contributeItems as l,featureScopeItems as u,formItems as d,layoutItems as f,moduleScopeItems as p,outcomeItems as m,personaItems as h,readModelItems as g,reducerItems as _,seedItems as v,templateItems as y,themeItems as b,uiProfileItems as x}from"./scope-items.js";import{actionArgumentItems as ee,actionItems as S,commandItems as C,commandRuleItems as w,conceptItems as T,constraintItems as E,eventItems as D,guardedActionItems as O,handlerItems as k,identityItems as A,implementationItems as j,inlineEventItems as M,interactionActionItems as N,interactionChoiceItems as te,invocationItems as P,namedRuleImplementationItems as F,operationImplementationItems as I,operationItems as L,operationPhaseItems as R,optionalTypeItems as ne,performerItems as z,policyItems as B,producesItems as V,queryItems as H,reactionItems as U,reactionTriggerItems as W,refusalItems as G,ruleItems as K,screenItems as q,sliceItemsFor as J,specificationItems as Y,specificationStepItems as X,tableItems as re,topLevelItems as ie,triggerItems as ae,typeItems as oe,validateItems as se}from"./completion-items.js";import{scanDocument as Z}from"./symbols.js";import{responseCompletions as ce}from"./response-completions.js";import{exampleCompletions as le}from"./example-authoring.js";import{refusalContext as ue}from"./refusal-context.js";import{generationCompletions as de}from"./generation-completions.js";import{namedRuleContext as Q}from"./named-rule-context.js";import{dependencyTargetCompletions as fe}from"./dependency-completions.js";import{structureCompletion as pe}from"./structure-completions.js";import{getSubLanguage as me}from"./sub-language-registry.js";import{readModelKeyCompletions as he}from"./read-model-key-completions.js";const $={label:`stream`,insertText:"stream ${1:Source.Stream}",documentation:`Replace the whole command route for this event production. ESM v10.`},ge=/(?:^|\s)rule\s+[A-Za-z_]\w*(?:\s+severity\s+(?:information|warning|error))?(?:\s+message\s+.*)?$/,declaredIn=(e,t)=>e.some(e=>RegExp(`^${t}\\b`).test(e));function topLevelEntries(e){return ie.filter(t=>!(t.label===`domain`&&declaredIn(e,`domain`))&&!(t.label===`authentication`&&declaredIn(e,`authentication`))&&!(t.label===`identity`&&declaredIn(e,`identity`)))}const isTemplate=e=>/^(?:screen|dialog)\s+template\b/.test(e??``);function expansionEntry(e,t){let n=e.split(`
2
2
  `).map((e,n)=>n===0?e:e.slice(Math.min(t,r(e)))).join(`
3
3
  `);return{label:e.split(`
4
- `)[0].trim(),insertText:n.replace(/[$}\\]/g,`\\$&`),documentation:`Expands the whole block from what the command and its events declare.`}}function completionEntriesFor(e,t={headers:[],document:[]}){let n=e[0];if(n===void 0||n===`domain`)return topLevelEntries(t.document);let r=pe(n);if(r)return r.completions??[];let i=t.headers[0];switch(n){case`purpose`:return o;case`module`:return p;case`feature`:return u;case`slice`:return J(i?.split(/\s+/)[1]);case`concept`:return/:\s*Enum\b/.test(i??``)?[...T,{label:`enum member (numbered)`,insertText:"${1:value} = ${2:0}",documentation:`Every member must declare a unique int32 number. Keep published numbers unchanged; specifications name members, not numbers.`}]:T;case`type`:return oe;case`command`:return C;case`public`:case`event`:return D;case`readmodel`:return g;case`reducer`:return _;case`form`:return d;case`contribute`:return l;case`behavior`:return c;case`persona`:return h;case`identity`:return A;case`authentication`:return s;case`seed`:return v;case`theme`:return b;case`ui`:return x;case`on`:case`success`:case`failure`:case`confirm`:return m;case`layout`:return f;case`system`:return I.filter(e=>e.label===`description`);case`operation`:return I;case`execute`:case`compensate`:return L;case`produces`:return e.includes(`command`)?[...V,$]:V;case`handler`:return k;case`implementation`:return e[1]===`handler`?j:[`execute`,`compensate`].includes(e[1])?F:[];case`reads`:return[{label:`by parts`,insertText:"by\n ${1:part} = ${2:source}\n ${3:part} = ${4:source}",documentation:`Supply every composite read-model key part by name.`}];case`query`:return H;case`performer`:return z;case`constraint`:return E;case`reaction`:return U;case`invokes`:return e.includes(`reaction`)?P:[];case`trigger`:return ae;case`when`:case`every`:case`at`:return e.includes(`reaction`)?W:[];case`specification`:return Y;case`policy`:return B;case`validate`:return se;case`action`:return S;case`table`:case`summary`:return re;case`screen`:return isTemplate(i)?y:q;case`dialog`:return y;default:return isTemplate(t.headers.find(e=>isTemplate(e)))?y:e.includes(`screen`)||n===`section`?q:e.includes(`produces`)?e.includes(`command`)?[...V,$]:V:[]}}function planCompletions(o,s,c,l=Z(o)){let u=n(o);if(u[s]||a(c).length<c.length)return{kind:`none`};if(/^\s*concept\s+[\p{L}\p{Mn}\p{Nd}\p{Pc}]+\s*:\s*\w+\s+(?:(?:pii|personal|secret)\s+)*\w*$/u.test(c))return{kind:`entries`,entries:[`pii`,`secret`].filter(e=>!RegExp(`\\b${e}\\b`).test(c)).map(e=>({label:e,insertText:e,documentation:e===`pii`?`personal data (GDPR Art. 4(1)); renders Chronicle [PII]`:`Operational secret; renders [Encrypted] + [NotAudited].`}))};let d=e(o,u,s,r(c))[0]===`concept`;if(d&&/^\s*(?:secret|sensitive|@sensitive)\s+scope\s+\w*$/.test(c))return{kind:`entries`,entries:[`subject`,`namespace`,`global`].map(e=>({label:e,insertText:e,documentation:`Explicit secret encryption scope.`}))};if(d&&/^\s*(?:pii|personal|@pii)\s+special\s+\w*$/.test(c))return{kind:`entries`,entries:[`racialOrEthnicOrigin`,`politicalOpinions`,`religiousOrPhilosophicalBeliefs`,`tradeUnionMembership`,`genetic`,`biometric`,`health`,`sexLifeOrSexualOrientation`].map(e=>({label:e,insertText:e,documentation:`GDPR Art. 9(1) special category.`}))};let f=le(o,s,c)??ce(o,s,c,Z(o));if(f!==null)return{kind:`entries`,entries:f};let p=me(o,s,c,l);if(p!==null)return{kind:`entries`,entries:p};let m=de(o,s,c,l);if(m!==null)return{kind:`entries`,entries:m};let h=c.match(/^\s*import\s+"([^"]*)$/);if(h)return{kind:`playFiles`,replaceLength:h[1].length};if(/["/]$/.test(c))return{kind:`none`};let g=Q(o,s,r(o[s]??c));if(/\$refusal\.\w*$/.test(c))return{kind:`entries`,entries:g===void 0?[]:[`reason`,`message`,.../^on\s+refused\s+by\s+constraint(?:\s|$)/.test(g)?[`constraint`]:[]].map(e=>({label:e,insertText:e,documentation:`String refusal value; syntax-only, not yet executable (PLAY0268).`}))};let _=c.match(/\$[\w.]*$/);if(_)return{kind:`contextVariables`,replaceLength:_[0].length};let v=o[s]??``,y=c.trim().length===0?c.length:r(v),b=e(o,u,s,y);if(b.includes(`screen`)){let e=y,t=!1;for(let n=s-1;n>=0;n--){if(u[n])continue;let i=a(o[n]);if(!(i.trim().length===0||r(i)>=e)){if(e=r(i),/^\s*action\s+(?:"|\$strings\.)/.test(i)){t=!0;break}if(/^\s*screen\b/.test(i))break}}if(t){if(/^\s*(?:when\b.*|otherwise)\s+execute\s+[\w.]*$/.test(c))return{kind:`commands`};if(b[0]===`action`)return{kind:`entries`,entries:O};if([`when`,`otherwise`].includes(b[0])){let e=i(o,u,s,y)??``;return{kind:`entries`,entries:/\bexecute\s+[\w.]+$/.test(e)?ee:[]}}}}if([`on`,`when`,`otherwise`].includes(b[0])){let e=y;for(let t=s-1;t>=0;t--){if(u[t])continue;let n=a(o[t]);if(!(n.trim().length===0||r(n)>=e)){if(e=r(n),/^\s*on\s+(?:click|double click|select)\s*$/.test(n))return{kind:`entries`,entries:b[0]===`on`?N:te};if(/^\s*(?:screen|behavior|specification|reaction)\b/.test(n))break}}}if(b[0]===`on`&&g!==void 0)return{kind:`entries`,entries:G};let x=ue(o,s,y);if(x===`implementation`)return{kind:`entries`,entries:ne};if(x===`rule`)return{kind:`entries`,entries:w};let S=[`public`,`event`,`command`,`type`,`readmodel`,`trigger`,`when`,`every`,`at`].includes(b[0])||b[0]===`produces`&&/^produces\s+event\b/.test(i(o,u,s,y)??``),C=c.trimStart().split(/\s+/)[0],T=b[0]===`command`&&[`reads`,`authorize`,`produces`].includes(C)||b[0]===`event`&&C===`tag`||[`trigger`,`when`,`every`,`at`].includes(b[0])&&[`description`,`file`,`reads`,`produces`,`invokes`].includes(C),optionalPrefix=e=>e!==null&&`optional`.startsWith(e[1]),E=S&&!T&&optionalPrefix(c.match(/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?\s+(\w*)$/)),D=b[0]===`query`&&optionalPrefix(c.match(/^\s*(?:by|filter)\s+[a-z_]\w*\s+[\w.]+(?:\[\])?\s+(\w*)$/))||optionalPrefix(c.match(/^\s*query\s+[A-Za-z_]\w*\s*=>\s*(?:observable\s+)?[\w.]+(?:\[\])?\s+(\w*)$/)),k=(b[0]===`event`||b[0]===`produces`&&/^produces\s+event\b/.test(i(o,u,s,y)??``))&&!T?c.match(/^\s*@?[a-z_]\w*\s+([\w.]+)\s+(\w*)$/):null,A=l.concepts.find(e=>e.name===k?.[1]),j=A?.primitive??k?.[1],P=(j===`String`||j===`Uuid`||j===`Int`&&A!==void 0)&&!A?.attributes.some(e=>[`pii`,`personal`,`secret`,`sensitive`].includes(e.replace(/^@/,``))),F=k!==null&&P&&`subject`.startsWith(k[2]),L=b[0]===`readmodel`?c.match(/^\s*@?[a-z_]\w*\s+[\w.]+\s+(\w*)$/):null,z=[...L&&`key`.startsWith(L[1])?[{label:`key`,insertText:`key`,documentation:`Declares a required read-model key part. Explicit keys replace inference. Composite keys are authoring-only (#599).`}]:[],...(E||D)&&!/=>\s*observable\s+$/.test(c)?R:[],...F?[{label:`subject`,insertText:`subject`,documentation:`One required scalar event data-subject identity; not pii or secret. Report-only lineage metadata (PLAY0270), no ESM or provider output yet.`}]:[]];if(z.length>0)return{kind:`entries`,entries:z};if(/\bauthorize\s+[\w\s]*$/.test(c)||b[0]===`authorize`)return{kind:`policies`};if(/\bwhen\s+\w*$/.test(c)&&b.includes(`reaction`))return{kind:`triggers`};if(/\bon\s+\w*$/.test(c)&&b.includes(`constraint`))return{kind:`events`};if(/\binvokes\s+\w*$/.test(c)&&b.includes(`reaction`))return{kind:`commands`};if(/\b(?:on|unique\s+event)\s+\w*$/.test(c)&&b[0]===`constraint`)return{kind:`events`};if(/\bproduces\s+\w*$/.test(c))return{kind:`producesTargets`};if(/\bnavigate\s+to\s+\w*$/.test(c))return{kind:`screens`};if(b[0]===`specification`){if(/^\s*when\s+query\s+[\w.]*$/.test(c))return{kind:`queries`};let e=c.match(/^\s*(given|when|then)\s+\w*$/);if(e)return{kind:`entries`,entries:X[e[1]]}}if(/\b(?:via|then)\s+query\s+[\w.]*$/.test(c))return{kind:`queries`};if((b[0]===`event`||b[0]===`command`||b[0]===`type`)&&/^\s+[a-z_]\w*\s+[\w[\]?]*$/.test(c)||b[0]===`query`&&/^\s+(?:by|filter)\s+[a-z_]\w*\s+[\w[\]?]*$/.test(c))return{kind:`types`};let B=i(o,u,s,y);if(B&&/^produces\s+operation\b/.test(B))return{kind:`entries`,entries:I};if(B&&/^produces\s+event\b/.test(B))return/^\s+@?[a-z_]\w*\s+[\w[\]?]*$/.test(c)?{kind:`types`}:{kind:`entries`,entries:b.includes(`command`)?[...M,$]:M};if(B&&he.test(B))return{kind:`entries`,entries:K};let V=t(o,u,s,y);if(b[0]===`for`&&b.includes(`seed`))return{kind:`events`};let H=completionEntriesFor(b,{headers:V,document:o}),U=b[0]===`command`?fe(o,s,` `.repeat(y),``,l):null;return{kind:`entries`,entries:U?[expansionEntry(U.text,y),...H]:H}}export{completionEntriesFor,planCompletions};
4
+ `)[0].trim(),insertText:n.replace(/[$}\\]/g,`\\$&`),documentation:`Expands the whole block from what the command and its events declare.`}}function completionEntriesFor(e,t={headers:[],document:[]}){let n=e[0];if(n===void 0||n===`domain`)return topLevelEntries(t.document);let r=me(n);if(r)return r.completions??[];let i=t.headers[0];switch(n){case`purpose`:return o;case`module`:return p;case`feature`:return u;case`slice`:return J(i?.split(/\s+/)[1]);case`concept`:return/:\s*Enum\b/.test(i??``)?[...T,{label:`enum member (numbered)`,insertText:"${1:value} = ${2:0}",documentation:`Every member must declare a unique int32 number. Keep published numbers unchanged; specifications name members, not numbers.`}]:T;case`type`:return oe;case`command`:return C;case`public`:case`event`:return D;case`readmodel`:return g;case`reducer`:return _;case`form`:return d;case`contribute`:return l;case`behavior`:return c;case`persona`:return h;case`identity`:return A;case`authentication`:return s;case`seed`:return v;case`theme`:return b;case`ui`:return x;case`on`:case`success`:case`failure`:case`confirm`:return m;case`layout`:return f;case`system`:return L.filter(e=>e.label===`description`);case`operation`:return L;case`execute`:case`compensate`:return R;case`produces`:return e.includes(`command`)?[...V,$]:V;case`handler`:return k;case`implementation`:return e[1]===`handler`?j:[`execute`,`compensate`].includes(e[1])?I:[];case`reads`:return[{label:`by parts`,insertText:"by\n ${1:part} = ${2:source}\n ${3:part} = ${4:source}",documentation:`Supply every composite read-model key part by name.`}];case`query`:return H;case`performer`:return z;case`constraint`:return E;case`reaction`:return U;case`invokes`:return e.includes(`reaction`)?P:[];case`trigger`:return ae;case`when`:case`every`:case`at`:return e.includes(`reaction`)?W:[];case`specification`:return Y;case`policy`:return B;case`validate`:return se;case`action`:return S;case`table`:case`summary`:return re;case`screen`:return isTemplate(i)?y:q;case`dialog`:return y;default:return isTemplate(t.headers.find(e=>isTemplate(e)))?y:e.includes(`screen`)||n===`section`?q:e.includes(`produces`)?e.includes(`command`)?[...V,$]:V:[]}}function planCompletions(o,s,c,l=Z(o)){let u=n(o);if(u[s]||a(c).length<c.length)return{kind:`none`};if(/^\s*concept\s+[\p{L}\p{Mn}\p{Nd}\p{Pc}]+\s*:\s*\w+\s+(?:(?:pii|personal|secret)\s+)*\w*$/u.test(c))return{kind:`entries`,entries:[`pii`,`secret`].filter(e=>!RegExp(`\\b${e}\\b`).test(c)).map(e=>({label:e,insertText:e,documentation:e===`pii`?`personal data (GDPR Art. 4(1)); renders Chronicle [PII]`:`Operational secret; renders [Encrypted] + [NotAudited].`}))};let d=e(o,u,s,r(c))[0]===`concept`,f=d?de(o,s,c):null;if(f!==null)return{kind:`entries`,entries:f};if(d&&/^\s*(?:secret|sensitive|@sensitive)\s+scope\s+\w*$/.test(c))return{kind:`entries`,entries:[`subject`,`namespace`,`global`].map(e=>({label:e,insertText:e,documentation:`Explicit secret encryption scope.`}))};if(d&&/^\s*(?:pii|personal|@pii)\s+special\s+\w*$/.test(c))return{kind:`entries`,entries:[`racialOrEthnicOrigin`,`politicalOpinions`,`religiousOrPhilosophicalBeliefs`,`tradeUnionMembership`,`genetic`,`biometric`,`health`,`sexLifeOrSexualOrientation`].map(e=>({label:e,insertText:e,documentation:`GDPR Art. 9(1) special category.`}))};let p=le(o,s,c)??ce(o,s,c,Z(o));if(p!==null)return{kind:`entries`,entries:p};let m=he(o,s,c,l);if(m!==null)return{kind:`entries`,entries:m};let h=fe(o,s,c,l);if(h!==null)return{kind:`entries`,entries:h};let g=c.match(/^\s*import\s+"([^"]*)$/);if(g)return{kind:`playFiles`,replaceLength:g[1].length};if(/["/]$/.test(c))return{kind:`none`};let _=ue(o,s,r(o[s]??c));if(/\$refusal\.\w*$/.test(c))return{kind:`entries`,entries:_===void 0?[]:[`reason`,`message`,.../^on\s+refused\s+by\s+constraint(?:\s|$)/.test(_)?[`constraint`]:[]].map(e=>({label:e,insertText:e,documentation:`String refusal value; syntax-only, not yet executable (PLAY0268).`}))};let v=c.match(/\$[\w.]*$/);if(v)return{kind:`contextVariables`,replaceLength:v[0].length};let y=o[s]??``,b=c.trim().length===0?c.length:r(y),x=e(o,u,s,b);if(x.includes(`screen`)){let e=b,t=!1;for(let n=s-1;n>=0;n--){if(u[n])continue;let i=a(o[n]);if(!(i.trim().length===0||r(i)>=e)){if(e=r(i),/^\s*action\s+(?:"|\$strings\.)/.test(i)){t=!0;break}if(/^\s*screen\b/.test(i))break}}if(t){if(/^\s*(?:when\b.*|otherwise)\s+execute\s+[\w.]*$/.test(c))return{kind:`commands`};if(x[0]===`action`)return{kind:`entries`,entries:O};if([`when`,`otherwise`].includes(x[0])){let e=i(o,u,s,b)??``;return{kind:`entries`,entries:/\bexecute\s+[\w.]+$/.test(e)?ee:[]}}}}if([`on`,`when`,`otherwise`].includes(x[0])){let e=b;for(let t=s-1;t>=0;t--){if(u[t])continue;let n=a(o[t]);if(!(n.trim().length===0||r(n)>=e)){if(e=r(n),/^\s*on\s+(?:click|double click|select)\s*$/.test(n))return{kind:`entries`,entries:x[0]===`on`?te:N};if(/^\s*(?:screen|behavior|specification|reaction)\b/.test(n))break}}}if(x[0]===`on`&&_!==void 0)return{kind:`entries`,entries:G};let S=Q(o,s,b);if(S===`implementation`)return{kind:`entries`,entries:F};if(S===`rule`)return{kind:`entries`,entries:w};let C=[`public`,`event`,`command`,`type`,`readmodel`,`trigger`,`when`,`every`,`at`].includes(x[0])||x[0]===`produces`&&/^produces\s+event\b/.test(i(o,u,s,b)??``),T=c.trimStart().split(/\s+/)[0],E=x[0]===`command`&&[`reads`,`authorize`,`produces`].includes(T)||x[0]===`event`&&T===`tag`||[`trigger`,`when`,`every`,`at`].includes(x[0])&&[`description`,`file`,`reads`,`produces`,`invokes`].includes(T),optionalPrefix=e=>e!==null&&`optional`.startsWith(e[1]),D=C&&!E&&optionalPrefix(c.match(/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?\s+(\w*)$/)),k=x[0]===`query`&&optionalPrefix(c.match(/^\s*(?:by|filter)\s+[a-z_]\w*\s+[\w.]+(?:\[\])?\s+(\w*)$/))||optionalPrefix(c.match(/^\s*query\s+[A-Za-z_]\w*\s*=>\s*(?:observable\s+)?[\w.]+(?:\[\])?\s+(\w*)$/)),A=(x[0]===`event`||x[0]===`produces`&&/^produces\s+event\b/.test(i(o,u,s,b)??``))&&!E?c.match(/^\s*@?[a-z_]\w*\s+([\w.]+)\s+(\w*)$/):null,j=l.concepts.find(e=>e.name===A?.[1]),P=j?.primitive??A?.[1],I=(P===`String`||P===`Uuid`||P===`Int`&&j!==void 0)&&!j?.attributes.some(e=>[`pii`,`personal`,`secret`,`sensitive`].includes(e.replace(/^@/,``))),R=A!==null&&I&&`subject`.startsWith(A[2]),z=x[0]===`readmodel`?c.match(/^\s*@?[a-z_]\w*\s+[\w.]+\s+(\w*)$/):null,B=[...z&&`key`.startsWith(z[1])?[{label:`key`,insertText:`key`,documentation:`Declares a required read-model key part. Explicit keys replace inference. Composite keys are authoring-only (#599).`}]:[],...(D||k)&&!/=>\s*observable\s+$/.test(c)?ne:[],...R?[{label:`subject`,insertText:`subject`,documentation:`One required scalar event data-subject identity; not pii or secret. Report-only lineage metadata (PLAY0270), no ESM or provider output yet.`}]:[]];if(B.length>0)return{kind:`entries`,entries:B};if(/\bauthorize\s+[\w\s]*$/.test(c)||x[0]===`authorize`)return{kind:`policies`};if(/\bwhen\s+\w*$/.test(c)&&x.includes(`reaction`))return{kind:`triggers`};if(/\bon\s+\w*$/.test(c)&&x.includes(`constraint`))return{kind:`events`};if(/\binvokes\s+\w*$/.test(c)&&x.includes(`reaction`))return{kind:`commands`};if(/\b(?:on|unique\s+event)\s+\w*$/.test(c)&&x[0]===`constraint`)return{kind:`events`};if(/\bproduces\s+\w*$/.test(c))return{kind:`producesTargets`};if(/\bnavigate\s+to\s+\w*$/.test(c))return{kind:`screens`};if(x[0]===`specification`){if(/^\s*when\s+query\s+[\w.]*$/.test(c))return{kind:`queries`};let e=c.match(/^\s*(given|when|then)\s+\w*$/);if(e)return{kind:`entries`,entries:X[e[1]]}}if(/\b(?:via|then)\s+query\s+[\w.]*$/.test(c))return{kind:`queries`};if((x[0]===`event`||x[0]===`command`||x[0]===`type`)&&/^\s+[a-z_]\w*\s+[\w[\]?]*$/.test(c)||x[0]===`query`&&/^\s+(?:by|filter)\s+[a-z_]\w*\s+[\w[\]?]*$/.test(c))return{kind:`types`};let V=i(o,u,s,b);if(V&&/^produces\s+operation\b/.test(V))return{kind:`entries`,entries:L};if(V&&/^produces\s+event\b/.test(V))return/^\s+@?[a-z_]\w*\s+[\w[\]?]*$/.test(c)?{kind:`types`}:{kind:`entries`,entries:x.includes(`command`)?[...M,$]:M};if(V&&ge.test(V))return{kind:`entries`,entries:K};let H=t(o,u,s,b);if(x[0]===`for`&&x.includes(`seed`))return{kind:`events`};let U=completionEntriesFor(x,{headers:H,document:o}),W=x[0]===`command`?pe(o,s,` `.repeat(b),``,l):null;return{kind:`entries`,entries:W?[expansionEntry(W.text,b),...U]:U}}export{completionEntriesFor,planCompletions};
5
5
  //# sourceMappingURL=completion-planner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"completion-planner.js","names":["items.moduleItems","items.featureItems","items.sliceItemsFor","items.conceptItems","items.typeItems","items.commandItems","items.eventItems","scope.readModelItems","scope.reducerItems","scope.formItems","scope.contributeItems","scope.behaviorItems","scope.personaItems","items.identityItems","scope.authenticationItems","scope.seedItems","scope.themeItems","scope.uiProfileItems","scope.outcomeItems","scope.layoutItems","items.operationItems","items.operationPhaseItems","items.producesItems","items.handlerItems","items.implementationItems","items.operationImplementationItems","items.queryItems","items.performerItems","items.constraintItems","items.reactionItems","items.invocationItems","items.triggerItems","items.reactionTriggerItems","items.specificationItems","items.policyItems","items.validateItems","items.actionItems","items.tableItems","scope.templateItems","items.screenItems","items.guardedActionItems","items.actionArgumentItems","items.interactionChoiceItems","items.interactionActionItems","items.refusalItems","items.namedRuleImplementationItems","items.commandRuleItems","items.optionalTypeItems","items.specificationStepItems","items.inlineEventItems","items.ruleItems","productionRouteItem","RULE_LINE_PATTERN","document","keyword","line","topLevelItems","item","header","relative","text","index","indent","indentOf","construct","chain","where","subLanguage","getSubLanguage","purposeItems","moduleScopeItems","featureScopeItems","sliceItemsFor","conceptItems","typeItems","commandItems","eventItems","readModelItems","reducerItems","formItems","contributeItems","behaviorItems","personaItems","identityItems","authenticationItems","seedItems","themeItems","uiProfileItems","outcomeItems","layoutItems","operationItems","operationPhaseItems","producesItems","handlerItems","implementationItems","operationImplementationItems","queryItems","performerItems","constraintItems","reactionItems","invocationItems","triggerItems","reactionTriggerItems","specificationItems","policyItems","validateItems","actionItems","tableItems","templateItems","screenItems","candidate","scanDocument","lines","fences","fenceMap","lineIndex","withoutComment","textBefore","marker","inConcept","enclosingChain","scope","category","responseEntries","exampleCompletions","responseCompletions","keyEntries","readModelKeyCompletions","symbols","dependencyEntries","dependencyTargetCompletions","importPath","refusal","refusalContext","member","contextVariableMatch","currentLine","effectiveIndent","parentIndent","guarded","parent","guardedActionItems","nearestEnclosingLine","actionArgumentItems","interactionChoiceItems","interactionActionItems","refusalItems","ruleContext","namedRuleContext","namedRuleImplementationItems","commandRuleItems","propertyOwner","propertyName","reservedProperty","match","afterPropertyType","afterQueryType","subjectModifier","subjectConcept","concept","subjectType","subjectTarget","attribute","afterSubjectType","keyModifier","modifierEntries","optionalTypeItems","step","specificationStepItems","enclosingLine","inlineEventItems","ruleItems","headers","enclosingHeaders","entries","expansion","structureCompletion"],"sources":["../../completion-planner.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { enclosingChain, enclosingHeaders, fenceMap, indentOf, nearestEnclosingLine, withoutComment } from './document-context';\nimport { refusalContext } from './refusal-context';\nimport { namedRuleContext } from './named-rule-context';\nimport { responseCompletions } from './response-completions';\nimport { dependencyTargetCompletions } from './dependency-completions';\nimport { exampleCompletions } from './example-authoring';\nimport { DocumentSymbols, scanDocument } from './symbols';\nimport { structureCompletion } from './structure-completions';\nimport { getSubLanguage } from './sub-language-registry';\nimport * as items from './completion-items';\nimport * as scope from './scope-items';\nimport { CompletionEntry } from './completion-items';\nimport { purposeItems } from './purpose-items';\nimport { readModelKeyCompletions } from './read-model-key-completions';\n\n// Matches a validation rule line ending in \"rule <Name>\" (optionally followed by a\n// message clause) - both the command form (\"<property> rule <Name>\") and the\n// concept implied-subject form (\"rule <Name>\"). Its first word is the property\n// name, not \"rule\", so it can't be recognized through the chain[0] keyword switch\n// the way \"on <EventType>\" or \"handler\" are - hence the dedicated regex check.\nconst productionRouteItem = { label: 'stream', insertText: 'stream ${1:Source.Stream}', documentation: 'Replace the whole command route for this event production. ESM v10.' };\n\nconst RULE_LINE_PATTERN = /(?:^|\\s)rule\\s+[A-Za-z_]\\w*(?:\\s+severity\\s+(?:information|warning|error))?(?:\\s+message\\s+.*)?$/;\n\nexport type CompletionPlan =\n | { kind: 'none' }\n | { kind: 'entries'; entries: CompletionEntry[] }\n | { kind: 'contextVariables'; replaceLength: number }\n | { kind: 'playFiles'; replaceLength: number }\n | { kind: 'policies' }\n | { kind: 'events' }\n | { kind: 'triggers' }\n | { kind: 'commands' }\n | { kind: 'producesTargets' }\n | { kind: 'screens' }\n | { kind: 'queries' }\n | { kind: 'types' };\n\n// What the position sits inside, beyond the keyword chain: the whole header of each enclosing block, so a\n// slice's type and a template's kind are known, and the document's own lines, so a declaration that may\n// appear once is not offered again.\nexport interface CompletionScope {\n headers: readonly string[];\n document: readonly string[];\n}\n\nconst declaredIn = (document: readonly string[], keyword: string) => document.some(line => new RegExp(`^${keyword}\\\\b`).test(line));\n\nfunction topLevelEntries(document: readonly string[]): CompletionEntry[] {\n return items.topLevelItems.filter(item => !(item.label === 'domain' && declaredIn(document, 'domain')) && !(item.label === 'authentication' && declaredIn(document, 'authentication')) && !(item.label === 'identity' && declaredIn(document, 'identity')));\n}\n\nconst isTemplate = (header: string | undefined) => /^(?:screen|dialog)\\s+template\\b/.test(header ?? '');\n\n// A whole block as one completion entry. Continuation lines are indented relative to the line it is inserted on,\n// which is how the editors indent a multi-line snippet.\nfunction expansionEntry(text: string, indent: number): CompletionEntry {\n const relative = text.split('\\n').map((line, index) => (index === 0 ? line : line.slice(Math.min(indent, indentOf(line))))).join('\\n');\n const label = text.split('\\n')[0].trim();\n return { label, insertText: relative.replace(/[$}\\\\]/g, '\\\\$&'), documentation: 'Expands the whole block from what the command and its events declare.' };\n}\n\nexport function completionEntriesFor(chain: string[], where: CompletionScope = { headers: [], document: [] }): CompletionEntry[] {\n const construct = chain[0];\n if (construct === undefined || construct === 'domain') return topLevelEntries(where.document);\n const subLanguage = getSubLanguage(construct);\n if (subLanguage) return subLanguage.completions ?? [];\n const header = where.headers[0];\n switch (construct) {\n case 'purpose':\n return purposeItems;\n case 'module':\n return items.moduleItems;\n case 'feature':\n return items.featureItems;\n case 'slice':\n return items.sliceItemsFor(header?.split(/\\s+/)[1]);\n case 'concept':\n return /:\\s*Enum\\b/.test(header ?? '') ? [...items.conceptItems, { label: 'enum member (numbered)', insertText: '${1:value} = ${2:0}', documentation: 'Every member must declare a unique int32 number. Keep published numbers unchanged; specifications name members, not numbers.' }] : items.conceptItems;\n case 'type':\n return items.typeItems;\n case 'command':\n return items.commandItems;\n case 'public':\n case 'event':\n return items.eventItems;\n case 'readmodel':\n return scope.readModelItems;\n case 'reducer':\n return scope.reducerItems;\n case 'form':\n return scope.formItems;\n case 'contribute':\n return scope.contributeItems;\n case 'behavior':\n return scope.behaviorItems;\n case 'persona':\n return scope.personaItems;\n case 'identity':\n return items.identityItems;\n case 'authentication':\n return scope.authenticationItems;\n case 'seed':\n return scope.seedItems;\n case 'theme':\n return scope.themeItems;\n case 'ui':\n return scope.uiProfileItems;\n case 'on':\n case 'success':\n case 'failure':\n case 'confirm':\n return scope.outcomeItems;\n case 'layout':\n return scope.layoutItems;\n case 'system':\n return items.operationItems.filter(item => item.label === 'description');\n case 'operation':\n return items.operationItems;\n case 'execute':\n case 'compensate':\n return items.operationPhaseItems;\n case 'produces':\n return chain.includes('command') ? [...items.producesItems, productionRouteItem] : items.producesItems;\n case 'handler':\n return items.handlerItems;\n case 'implementation':\n return chain[1] === 'handler' ? items.implementationItems : ['execute', 'compensate'].includes(chain[1]) ? items.operationImplementationItems : [];\n case 'reads':\n return [{ label: 'by parts', insertText: 'by\\n ${1:part} = ${2:source}\\n ${3:part} = ${4:source}', documentation: 'Supply every composite read-model key part by name.' }];\n case 'query':\n return items.queryItems;\n case 'performer':\n return items.performerItems;\n case 'constraint':\n return items.constraintItems;\n case 'reaction':\n return items.reactionItems;\n case 'invokes':\n return chain.includes('reaction') ? items.invocationItems : [];\n case 'trigger':\n return items.triggerItems;\n case 'when':\n case 'every':\n case 'at':\n return chain.includes('reaction') ? items.reactionTriggerItems : [];\n case 'specification':\n return items.specificationItems;\n case 'policy':\n return items.policyItems;\n case 'validate':\n return items.validateItems;\n case 'action':\n return items.actionItems;\n case 'table':\n case 'summary':\n return items.tableItems;\n case 'screen':\n return isTemplate(header) ? scope.templateItems : items.screenItems;\n case 'dialog':\n return scope.templateItems;\n default:\n if (isTemplate(where.headers.find(candidate => isTemplate(candidate)))) return scope.templateItems;\n // Sections inside a screen expose the screen vocabulary.\n if (chain.includes('screen') || construct === 'section') return items.screenItems;\n if (chain.includes('produces')) return chain.includes('command') ? [...items.producesItems, productionRouteItem] : items.producesItems;\n return [];\n }\n}\n\n// Decides what to complete at a position, without any editor dependency — the\n// Monaco service and the VSCode extension both materialize the plan into items.\nexport function planCompletions(\n lines: string[],\n lineIndex: number,\n textBefore: string,\n symbols: DocumentSymbols = scanDocument(lines),\n): CompletionPlan {\n const fences = fenceMap(lines);\n if (fences[lineIndex] || withoutComment(textBefore).length < textBefore.length) return { kind: 'none' };\n if (/^\\s*concept\\s+[\\p{L}\\p{Mn}\\p{Nd}\\p{Pc}]+\\s*:\\s*\\w+\\s+(?:(?:pii|personal|secret)\\s+)*\\w*$/u.test(textBefore)) {\n return { kind: 'entries', entries: ['pii', 'secret'].filter(marker => !new RegExp(`\\\\b${marker}\\\\b`).test(textBefore)).map(marker => ({ label: marker, insertText: marker, documentation: marker === 'pii' ? 'personal data (GDPR Art. 4(1)); renders Chronicle [PII]' : 'Operational secret; renders [Encrypted] + [NotAudited].' })) };\n }\n const inConcept = enclosingChain(lines, fences, lineIndex, indentOf(textBefore))[0] === 'concept';\n if (inConcept && /^\\s*(?:secret|sensitive|@sensitive)\\s+scope\\s+\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: ['subject', 'namespace', 'global'].map(scope => ({ label: scope, insertText: scope, documentation: 'Explicit secret encryption scope.' })) };\n }\n if (inConcept && /^\\s*(?:pii|personal|@pii)\\s+special\\s+\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: ['racialOrEthnicOrigin', 'politicalOpinions', 'religiousOrPhilosophicalBeliefs', 'tradeUnionMembership', 'genetic', 'biometric', 'health', 'sexLifeOrSexualOrientation'].map(category => ({ label: category, insertText: category, documentation: 'GDPR Art. 9(1) special category.' })) };\n }\n const responseEntries = exampleCompletions(lines, lineIndex, textBefore) ?? responseCompletions(lines, lineIndex, textBefore, scanDocument(lines));\n if (responseEntries !== null) return { kind: 'entries', entries: responseEntries };\n const keyEntries = readModelKeyCompletions(lines, lineIndex, textBefore, symbols);\n if (keyEntries !== null) return { kind: 'entries', entries: keyEntries };\n const dependencyEntries = dependencyTargetCompletions(lines, lineIndex, textBefore, symbols);\n if (dependencyEntries !== null) return { kind: 'entries', entries: dependencyEntries };\n\n // Inside the quotes of a file import, what is wanted is a path - replacing what has been typed so far.\n const importPath = textBefore.match(/^\\s*import\\s+\"([^\"]*)$/);\n if (importPath) {\n return { kind: 'playFiles', replaceLength: importPath[1].length };\n }\n\n // A quote or a slash only asks for a completion inside an import path.\n if (/[\"/]$/.test(textBefore)) return { kind: 'none' };\n\n const refusal = refusalContext(lines, lineIndex, indentOf(lines[lineIndex] ?? textBefore));\n if (/\\$refusal\\.\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: refusal === undefined ? [] : ['reason', 'message', ...(/^on\\s+refused\\s+by\\s+constraint(?:\\s|$)/.test(refusal) ? ['constraint'] : [])].map(member => ({ label: member, insertText: member, documentation: 'String refusal value; syntax-only, not yet executable (PLAY0268).' })) };\n }\n const contextVariableMatch = textBefore.match(/\\$[\\w.]*$/);\n if (contextVariableMatch) {\n return { kind: 'contextVariables', replaceLength: contextVariableMatch[0].length };\n }\n\n const currentLine = lines[lineIndex] ?? '';\n const effectiveIndent =\n textBefore.trim().length === 0 ? textBefore.length : indentOf(currentLine);\n const chain = enclosingChain(lines, fences, lineIndex, effectiveIndent);\n if (chain.includes('screen')) {\n let parentIndent = effectiveIndent;\n let guarded = false;\n for (let index = lineIndex - 1; index >= 0; index--) {\n if (fences[index]) continue;\n const parent = withoutComment(lines[index]);\n if (parent.trim().length === 0 || indentOf(parent) >= parentIndent) continue;\n parentIndent = indentOf(parent);\n if (/^\\s*action\\s+(?:\"|\\$strings\\.)/.test(parent)) { guarded = true; break; }\n if (/^\\s*screen\\b/.test(parent)) break;\n }\n if (guarded) {\n if (/^\\s*(?:when\\b.*|otherwise)\\s+execute\\s+[\\w.]*$/.test(textBefore)) return { kind: 'commands' };\n if (chain[0] === 'action') return { kind: 'entries', entries: items.guardedActionItems };\n if (['when', 'otherwise'].includes(chain[0])) {\n const parent = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? '';\n return { kind: 'entries', entries: /\\bexecute\\s+[\\w.]+$/.test(parent) ? items.actionArgumentItems : [] };\n }\n }\n }\n if (['on', 'when', 'otherwise'].includes(chain[0])) {\n let parentIndent = effectiveIndent;\n for (let index = lineIndex - 1; index >= 0; index--) {\n if (fences[index]) continue;\n const parent = withoutComment(lines[index]);\n if (parent.trim().length === 0 || indentOf(parent) >= parentIndent) continue;\n parentIndent = indentOf(parent);\n if (/^\\s*on\\s+(?:click|double click|select)\\s*$/.test(parent)) {\n return { kind: 'entries', entries: chain[0] === 'on' ? items.interactionChoiceItems : items.interactionActionItems };\n }\n if (/^\\s*(?:screen|behavior|specification|reaction)\\b/.test(parent)) break;\n }\n }\n if (chain[0] === 'on' && refusal !== undefined) return { kind: 'entries', entries: items.refusalItems };\n const ruleContext = namedRuleContext(lines, lineIndex, effectiveIndent);\n if (ruleContext === 'implementation') return { kind: 'entries', entries: items.namedRuleImplementationItems };\n if (ruleContext === 'rule') return { kind: 'entries', entries: items.commandRuleItems };\n\n const propertyOwner = ['public', 'event', 'command', 'type', 'readmodel', 'trigger', 'when', 'every', 'at'].includes(chain[0]) ||\n (chain[0] === 'produces' && /^produces\\s+event\\b/.test(nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? ''));\n const propertyName = textBefore.trimStart().split(/\\s+/)[0];\n const reservedProperty = (chain[0] === 'command' && ['reads', 'authorize', 'produces'].includes(propertyName)) ||\n (chain[0] === 'event' && propertyName === 'tag') ||\n (['trigger', 'when', 'every', 'at'].includes(chain[0]) && ['description', 'file', 'reads', 'produces', 'invokes'].includes(propertyName));\n const optionalPrefix = (match: RegExpMatchArray | null) => match !== null && 'optional'.startsWith(match[1]);\n const afterPropertyType = propertyOwner && !reservedProperty && optionalPrefix(textBefore.match(/^\\s*@?[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+(\\w*)$/));\n const afterQueryType = (chain[0] === 'query' && optionalPrefix(textBefore.match(/^\\s*(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+(\\w*)$/))) ||\n optionalPrefix(textBefore.match(/^\\s*query\\s+[A-Za-z_]\\w*\\s*=>\\s*(?:observable\\s+)?[\\w.]+(?:\\[\\])?\\s+(\\w*)$/));\n const eventPropertyOwner = chain[0] === 'event' || (chain[0] === 'produces' && /^produces\\s+event\\b/.test(nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? ''));\n const subjectModifier = eventPropertyOwner && !reservedProperty ? textBefore.match(/^\\s*@?[a-z_]\\w*\\s+([\\w.]+)\\s+(\\w*)$/) : null;\n const subjectConcept = symbols.concepts.find(concept => concept.name === subjectModifier?.[1]);\n const subjectType = subjectConcept?.primitive ?? subjectModifier?.[1];\n const subjectTarget = (subjectType === 'String' || subjectType === 'Uuid' || (subjectType === 'Int' && subjectConcept !== undefined)) &&\n !subjectConcept?.attributes.some(attribute => ['pii', 'personal', 'secret', 'sensitive'].includes(attribute.replace(/^@/, '')));\n const afterSubjectType = subjectModifier !== null && subjectTarget && 'subject'.startsWith(subjectModifier[2]);\n const keyModifier = chain[0] === 'readmodel' ? textBefore.match(/^\\s*@?[a-z_]\\w*\\s+[\\w.]+\\s+(\\w*)$/) : null;\n const modifierEntries = [\n ...(keyModifier && 'key'.startsWith(keyModifier[1]) ? [{ label: 'key', insertText: 'key', documentation: 'Declares a required read-model key part. Explicit keys replace inference. Composite keys are authoring-only (#599).' }] : []),\n ...((afterPropertyType || afterQueryType) && !/=>\\s*observable\\s+$/.test(textBefore) ? items.optionalTypeItems : []),\n ...(afterSubjectType ? [{ label: 'subject', insertText: 'subject', documentation: 'One required scalar event data-subject identity; not pii or secret. Report-only lineage metadata (PLAY0270), no ESM or provider output yet.' }] : []),\n ];\n if (modifierEntries.length > 0) return { kind: 'entries', entries: modifierEntries };\n\n if (/\\bauthorize\\s+[\\w\\s]*$/.test(textBefore) || chain[0] === 'authorize') {\n return { kind: 'policies' };\n }\n if (/\\bwhen\\s+\\w*$/.test(textBefore) && chain.includes('reaction')) {\n return { kind: 'triggers' };\n }\n if (/\\bon\\s+\\w*$/.test(textBefore) && chain.includes('constraint')) {\n return { kind: 'events' };\n }\n if (/\\binvokes\\s+\\w*$/.test(textBefore) && chain.includes('reaction')) {\n return { kind: 'commands' };\n }\n if (/\\b(?:on|unique\\s+event)\\s+\\w*$/.test(textBefore) && chain[0] === 'constraint') {\n return { kind: 'events' };\n }\n if (/\\bproduces\\s+\\w*$/.test(textBefore)) {\n return { kind: 'producesTargets' };\n }\n if (/\\bnavigate\\s+to\\s+\\w*$/.test(textBefore)) {\n return { kind: 'screens' };\n }\n if (chain[0] === 'specification') {\n if (/^\\s*when\\s+query\\s+[\\w.]*$/.test(textBefore)) return { kind: 'queries' };\n const step = textBefore.match(/^\\s*(given|when|then)\\s+\\w*$/);\n if (step) return { kind: 'entries', entries: items.specificationStepItems[step[1] as 'given' | 'when' | 'then'] };\n }\n if (/\\b(?:via|then)\\s+query\\s+[\\w.]*$/.test(textBefore)) {\n return { kind: 'queries' };\n }\n if (\n (chain[0] === 'event' || chain[0] === 'command' || chain[0] === 'type') &&\n /^\\s+[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)\n ) {\n return { kind: 'types' };\n }\n if (chain[0] === 'query' && /^\\s+(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)) {\n return { kind: 'types' };\n }\n\n const enclosingLine = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent);\n if (enclosingLine && /^produces\\s+operation\\b/.test(enclosingLine)) return { kind: 'entries', entries: items.operationItems };\n if (enclosingLine && /^produces\\s+event\\b/.test(enclosingLine)) {\n if (/^\\s+@?[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)) return { kind: 'types' };\n return { kind: 'entries', entries: chain.includes('command') ? [...items.inlineEventItems, productionRouteItem] : items.inlineEventItems };\n }\n if (enclosingLine && RULE_LINE_PATTERN.test(enclosingLine)) {\n return { kind: 'entries', entries: items.ruleItems };\n }\n\n const headers = enclosingHeaders(lines, fences, lineIndex, effectiveIndent);\n if (chain[0] === 'for' && chain.includes('seed')) return { kind: 'events' };\n const entries = completionEntriesFor(chain, { headers, document: lines });\n const expansion = chain[0] === 'command' ? structureCompletion(lines, lineIndex, ' '.repeat(effectiveIndent), '', symbols) : null;\n return { kind: 'entries', entries: expansion ? [expansionEntry(expansion.text, effectiveIndent), ...entries] : entries };\n}\n"],"mappings":"i6DAuBA,MAAMmD,EAAsB,CAAE,MAAO,SAAU,WAAY,4BAA6B,cAAe,qEAAsE,EAE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AS,SAAS,EAAI,CAAC,GAAGhB,EAAwBE,CAAmB,EAAIF,CAAuB,EAE7I,GAAIwH,GAAiBrH,GAAkB,KAAKqH,CAAa,EACrD,MAAO,CAAE,KAAM,UAAW,QAASvH,CAAgB,EAGvD,IAAM0H,EAAUC,EAAiB7D,EAAOC,EAAQE,EAAWsB,CAAe,EAC1E,GAAIxE,EAAM,KAAO,OAASA,EAAM,SAAS,MAAM,EAAG,MAAO,CAAE,KAAM,QAAS,EAC1E,IAAM6G,EAAU,qBAAqB7G,EAAO,CAAE,UAAS,SAAU+C,CAAM,CAAC,EAClE+D,EAAY9G,EAAM,KAAO,UAAY+G,GAAoBhE,EAAOG,EAAW,IAAI,OAAOsB,CAAe,EAAG,GAAIT,CAAO,EAAI,KAC7H,MAAO,CAAE,KAAM,UAAW,QAAS+C,EAAY,CAAC,eAAeA,EAAU,KAAMtC,CAAe,EAAG,GAAGqC,CAAO,EAAIA,CAAQ,CAC3H"}
1
+ {"version":3,"file":"completion-planner.js","names":["items.moduleItems","items.featureItems","items.sliceItemsFor","items.conceptItems","items.typeItems","items.commandItems","items.eventItems","scope.readModelItems","scope.reducerItems","scope.formItems","scope.contributeItems","scope.behaviorItems","scope.personaItems","items.identityItems","scope.authenticationItems","scope.seedItems","scope.themeItems","scope.uiProfileItems","scope.outcomeItems","scope.layoutItems","items.operationItems","items.operationPhaseItems","items.producesItems","items.handlerItems","items.implementationItems","items.operationImplementationItems","items.queryItems","items.performerItems","items.constraintItems","items.reactionItems","items.invocationItems","items.triggerItems","items.reactionTriggerItems","items.specificationItems","items.policyItems","items.validateItems","items.actionItems","items.tableItems","scope.templateItems","items.screenItems","items.guardedActionItems","items.actionArgumentItems","items.interactionChoiceItems","items.interactionActionItems","items.refusalItems","items.namedRuleImplementationItems","items.commandRuleItems","items.optionalTypeItems","items.specificationStepItems","items.inlineEventItems","items.ruleItems","productionRouteItem","RULE_LINE_PATTERN","document","keyword","line","topLevelItems","item","header","relative","text","index","indent","indentOf","construct","chain","where","subLanguage","getSubLanguage","purposeItems","moduleScopeItems","featureScopeItems","sliceItemsFor","conceptItems","typeItems","commandItems","eventItems","readModelItems","reducerItems","formItems","contributeItems","behaviorItems","personaItems","identityItems","authenticationItems","seedItems","themeItems","uiProfileItems","outcomeItems","layoutItems","operationItems","operationPhaseItems","producesItems","handlerItems","implementationItems","operationImplementationItems","queryItems","performerItems","constraintItems","reactionItems","invocationItems","triggerItems","reactionTriggerItems","specificationItems","policyItems","validateItems","actionItems","tableItems","templateItems","screenItems","candidate","scanDocument","lines","fences","fenceMap","lineIndex","withoutComment","textBefore","marker","inConcept","enclosingChain","generationEntries","generationCompletions","scope","category","responseEntries","exampleCompletions","responseCompletions","keyEntries","readModelKeyCompletions","symbols","dependencyEntries","dependencyTargetCompletions","importPath","refusal","refusalContext","member","contextVariableMatch","currentLine","effectiveIndent","parentIndent","guarded","parent","guardedActionItems","nearestEnclosingLine","actionArgumentItems","interactionChoiceItems","interactionActionItems","refusalItems","ruleContext","namedRuleContext","namedRuleImplementationItems","commandRuleItems","propertyOwner","propertyName","reservedProperty","match","afterPropertyType","afterQueryType","subjectModifier","subjectConcept","concept","subjectType","subjectTarget","attribute","afterSubjectType","keyModifier","modifierEntries","optionalTypeItems","step","specificationStepItems","enclosingLine","inlineEventItems","ruleItems","headers","enclosingHeaders","entries","expansion","structureCompletion"],"sources":["../../completion-planner.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { enclosingChain, enclosingHeaders, fenceMap, indentOf, nearestEnclosingLine, withoutComment } from './document-context';\nimport { refusalContext } from './refusal-context';\nimport { generationCompletions } from './generation-completions';\nimport { namedRuleContext } from './named-rule-context';\nimport { responseCompletions } from './response-completions';\nimport { dependencyTargetCompletions } from './dependency-completions';\nimport { exampleCompletions } from './example-authoring';\nimport { DocumentSymbols, scanDocument } from './symbols';\nimport { structureCompletion } from './structure-completions';\nimport { getSubLanguage } from './sub-language-registry';\nimport * as items from './completion-items';\nimport * as scope from './scope-items';\nimport { CompletionEntry } from './completion-items';\nimport { purposeItems } from './purpose-items';\nimport { readModelKeyCompletions } from './read-model-key-completions';\n\n// Matches a validation rule line ending in \"rule <Name>\" (optionally followed by a\n// message clause) - both the command form (\"<property> rule <Name>\") and the\n// concept implied-subject form (\"rule <Name>\"). Its first word is the property\n// name, not \"rule\", so it can't be recognized through the chain[0] keyword switch\n// the way \"on <EventType>\" or \"handler\" are - hence the dedicated regex check.\nconst productionRouteItem = { label: 'stream', insertText: 'stream ${1:Source.Stream}', documentation: 'Replace the whole command route for this event production. ESM v10.' };\n\nconst RULE_LINE_PATTERN = /(?:^|\\s)rule\\s+[A-Za-z_]\\w*(?:\\s+severity\\s+(?:information|warning|error))?(?:\\s+message\\s+.*)?$/;\n\nexport type CompletionPlan =\n | { kind: 'none' }\n | { kind: 'entries'; entries: CompletionEntry[] }\n | { kind: 'contextVariables'; replaceLength: number }\n | { kind: 'playFiles'; replaceLength: number }\n | { kind: 'policies' }\n | { kind: 'events' }\n | { kind: 'triggers' }\n | { kind: 'commands' }\n | { kind: 'producesTargets' }\n | { kind: 'screens' }\n | { kind: 'queries' }\n | { kind: 'types' };\n\n// What the position sits inside, beyond the keyword chain: the whole header of each enclosing block, so a\n// slice's type and a template's kind are known, and the document's own lines, so a declaration that may\n// appear once is not offered again.\nexport interface CompletionScope {\n headers: readonly string[];\n document: readonly string[];\n}\n\nconst declaredIn = (document: readonly string[], keyword: string) => document.some(line => new RegExp(`^${keyword}\\\\b`).test(line));\n\nfunction topLevelEntries(document: readonly string[]): CompletionEntry[] {\n return items.topLevelItems.filter(item => !(item.label === 'domain' && declaredIn(document, 'domain')) && !(item.label === 'authentication' && declaredIn(document, 'authentication')) && !(item.label === 'identity' && declaredIn(document, 'identity')));\n}\n\nconst isTemplate = (header: string | undefined) => /^(?:screen|dialog)\\s+template\\b/.test(header ?? '');\n\n// A whole block as one completion entry. Continuation lines are indented relative to the line it is inserted on,\n// which is how the editors indent a multi-line snippet.\nfunction expansionEntry(text: string, indent: number): CompletionEntry {\n const relative = text.split('\\n').map((line, index) => (index === 0 ? line : line.slice(Math.min(indent, indentOf(line))))).join('\\n');\n const label = text.split('\\n')[0].trim();\n return { label, insertText: relative.replace(/[$}\\\\]/g, '\\\\$&'), documentation: 'Expands the whole block from what the command and its events declare.' };\n}\n\nexport function completionEntriesFor(chain: string[], where: CompletionScope = { headers: [], document: [] }): CompletionEntry[] {\n const construct = chain[0];\n if (construct === undefined || construct === 'domain') return topLevelEntries(where.document);\n const subLanguage = getSubLanguage(construct);\n if (subLanguage) return subLanguage.completions ?? [];\n const header = where.headers[0];\n switch (construct) {\n case 'purpose':\n return purposeItems;\n case 'module':\n return items.moduleItems;\n case 'feature':\n return items.featureItems;\n case 'slice':\n return items.sliceItemsFor(header?.split(/\\s+/)[1]);\n case 'concept':\n return /:\\s*Enum\\b/.test(header ?? '') ? [...items.conceptItems, { label: 'enum member (numbered)', insertText: '${1:value} = ${2:0}', documentation: 'Every member must declare a unique int32 number. Keep published numbers unchanged; specifications name members, not numbers.' }] : items.conceptItems;\n case 'type':\n return items.typeItems;\n case 'command':\n return items.commandItems;\n case 'public':\n case 'event':\n return items.eventItems;\n case 'readmodel':\n return scope.readModelItems;\n case 'reducer':\n return scope.reducerItems;\n case 'form':\n return scope.formItems;\n case 'contribute':\n return scope.contributeItems;\n case 'behavior':\n return scope.behaviorItems;\n case 'persona':\n return scope.personaItems;\n case 'identity':\n return items.identityItems;\n case 'authentication':\n return scope.authenticationItems;\n case 'seed':\n return scope.seedItems;\n case 'theme':\n return scope.themeItems;\n case 'ui':\n return scope.uiProfileItems;\n case 'on':\n case 'success':\n case 'failure':\n case 'confirm':\n return scope.outcomeItems;\n case 'layout':\n return scope.layoutItems;\n case 'system':\n return items.operationItems.filter(item => item.label === 'description');\n case 'operation':\n return items.operationItems;\n case 'execute':\n case 'compensate':\n return items.operationPhaseItems;\n case 'produces':\n return chain.includes('command') ? [...items.producesItems, productionRouteItem] : items.producesItems;\n case 'handler':\n return items.handlerItems;\n case 'implementation':\n return chain[1] === 'handler' ? items.implementationItems : ['execute', 'compensate'].includes(chain[1]) ? items.operationImplementationItems : [];\n case 'reads':\n return [{ label: 'by parts', insertText: 'by\\n ${1:part} = ${2:source}\\n ${3:part} = ${4:source}', documentation: 'Supply every composite read-model key part by name.' }];\n case 'query':\n return items.queryItems;\n case 'performer':\n return items.performerItems;\n case 'constraint':\n return items.constraintItems;\n case 'reaction':\n return items.reactionItems;\n case 'invokes':\n return chain.includes('reaction') ? items.invocationItems : [];\n case 'trigger':\n return items.triggerItems;\n case 'when':\n case 'every':\n case 'at':\n return chain.includes('reaction') ? items.reactionTriggerItems : [];\n case 'specification':\n return items.specificationItems;\n case 'policy':\n return items.policyItems;\n case 'validate':\n return items.validateItems;\n case 'action':\n return items.actionItems;\n case 'table':\n case 'summary':\n return items.tableItems;\n case 'screen':\n return isTemplate(header) ? scope.templateItems : items.screenItems;\n case 'dialog':\n return scope.templateItems;\n default:\n if (isTemplate(where.headers.find(candidate => isTemplate(candidate)))) return scope.templateItems;\n // Sections inside a screen expose the screen vocabulary.\n if (chain.includes('screen') || construct === 'section') return items.screenItems;\n if (chain.includes('produces')) return chain.includes('command') ? [...items.producesItems, productionRouteItem] : items.producesItems;\n return [];\n }\n}\n\n// Decides what to complete at a position, without any editor dependency — the\n// Monaco service and the VSCode extension both materialize the plan into items.\nexport function planCompletions(\n lines: string[],\n lineIndex: number,\n textBefore: string,\n symbols: DocumentSymbols = scanDocument(lines),\n): CompletionPlan {\n const fences = fenceMap(lines);\n if (fences[lineIndex] || withoutComment(textBefore).length < textBefore.length) return { kind: 'none' };\n if (/^\\s*concept\\s+[\\p{L}\\p{Mn}\\p{Nd}\\p{Pc}]+\\s*:\\s*\\w+\\s+(?:(?:pii|personal|secret)\\s+)*\\w*$/u.test(textBefore)) {\n return { kind: 'entries', entries: ['pii', 'secret'].filter(marker => !new RegExp(`\\\\b${marker}\\\\b`).test(textBefore)).map(marker => ({ label: marker, insertText: marker, documentation: marker === 'pii' ? 'personal data (GDPR Art. 4(1)); renders Chronicle [PII]' : 'Operational secret; renders [Encrypted] + [NotAudited].' })) };\n }\n const inConcept = enclosingChain(lines, fences, lineIndex, indentOf(textBefore))[0] === 'concept';\n const generationEntries = inConcept ? generationCompletions(lines, lineIndex, textBefore) : null;\n if (generationEntries !== null) return { kind: 'entries', entries: generationEntries };\n if (inConcept && /^\\s*(?:secret|sensitive|@sensitive)\\s+scope\\s+\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: ['subject', 'namespace', 'global'].map(scope => ({ label: scope, insertText: scope, documentation: 'Explicit secret encryption scope.' })) };\n }\n if (inConcept && /^\\s*(?:pii|personal|@pii)\\s+special\\s+\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: ['racialOrEthnicOrigin', 'politicalOpinions', 'religiousOrPhilosophicalBeliefs', 'tradeUnionMembership', 'genetic', 'biometric', 'health', 'sexLifeOrSexualOrientation'].map(category => ({ label: category, insertText: category, documentation: 'GDPR Art. 9(1) special category.' })) };\n }\n const responseEntries = exampleCompletions(lines, lineIndex, textBefore) ?? responseCompletions(lines, lineIndex, textBefore, scanDocument(lines));\n if (responseEntries !== null) return { kind: 'entries', entries: responseEntries };\n const keyEntries = readModelKeyCompletions(lines, lineIndex, textBefore, symbols);\n if (keyEntries !== null) return { kind: 'entries', entries: keyEntries };\n const dependencyEntries = dependencyTargetCompletions(lines, lineIndex, textBefore, symbols);\n if (dependencyEntries !== null) return { kind: 'entries', entries: dependencyEntries };\n\n // Inside the quotes of a file import, what is wanted is a path - replacing what has been typed so far.\n const importPath = textBefore.match(/^\\s*import\\s+\"([^\"]*)$/);\n if (importPath) {\n return { kind: 'playFiles', replaceLength: importPath[1].length };\n }\n\n // A quote or a slash only asks for a completion inside an import path.\n if (/[\"/]$/.test(textBefore)) return { kind: 'none' };\n\n const refusal = refusalContext(lines, lineIndex, indentOf(lines[lineIndex] ?? textBefore));\n if (/\\$refusal\\.\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: refusal === undefined ? [] : ['reason', 'message', ...(/^on\\s+refused\\s+by\\s+constraint(?:\\s|$)/.test(refusal) ? ['constraint'] : [])].map(member => ({ label: member, insertText: member, documentation: 'String refusal value; syntax-only, not yet executable (PLAY0268).' })) };\n }\n const contextVariableMatch = textBefore.match(/\\$[\\w.]*$/);\n if (contextVariableMatch) {\n return { kind: 'contextVariables', replaceLength: contextVariableMatch[0].length };\n }\n\n const currentLine = lines[lineIndex] ?? '';\n const effectiveIndent =\n textBefore.trim().length === 0 ? textBefore.length : indentOf(currentLine);\n const chain = enclosingChain(lines, fences, lineIndex, effectiveIndent);\n if (chain.includes('screen')) {\n let parentIndent = effectiveIndent;\n let guarded = false;\n for (let index = lineIndex - 1; index >= 0; index--) {\n if (fences[index]) continue;\n const parent = withoutComment(lines[index]);\n if (parent.trim().length === 0 || indentOf(parent) >= parentIndent) continue;\n parentIndent = indentOf(parent);\n if (/^\\s*action\\s+(?:\"|\\$strings\\.)/.test(parent)) { guarded = true; break; }\n if (/^\\s*screen\\b/.test(parent)) break;\n }\n if (guarded) {\n if (/^\\s*(?:when\\b.*|otherwise)\\s+execute\\s+[\\w.]*$/.test(textBefore)) return { kind: 'commands' };\n if (chain[0] === 'action') return { kind: 'entries', entries: items.guardedActionItems };\n if (['when', 'otherwise'].includes(chain[0])) {\n const parent = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? '';\n return { kind: 'entries', entries: /\\bexecute\\s+[\\w.]+$/.test(parent) ? items.actionArgumentItems : [] };\n }\n }\n }\n if (['on', 'when', 'otherwise'].includes(chain[0])) {\n let parentIndent = effectiveIndent;\n for (let index = lineIndex - 1; index >= 0; index--) {\n if (fences[index]) continue;\n const parent = withoutComment(lines[index]);\n if (parent.trim().length === 0 || indentOf(parent) >= parentIndent) continue;\n parentIndent = indentOf(parent);\n if (/^\\s*on\\s+(?:click|double click|select)\\s*$/.test(parent)) {\n return { kind: 'entries', entries: chain[0] === 'on' ? items.interactionChoiceItems : items.interactionActionItems };\n }\n if (/^\\s*(?:screen|behavior|specification|reaction)\\b/.test(parent)) break;\n }\n }\n if (chain[0] === 'on' && refusal !== undefined) return { kind: 'entries', entries: items.refusalItems };\n const ruleContext = namedRuleContext(lines, lineIndex, effectiveIndent);\n if (ruleContext === 'implementation') return { kind: 'entries', entries: items.namedRuleImplementationItems };\n if (ruleContext === 'rule') return { kind: 'entries', entries: items.commandRuleItems };\n\n const propertyOwner = ['public', 'event', 'command', 'type', 'readmodel', 'trigger', 'when', 'every', 'at'].includes(chain[0]) ||\n (chain[0] === 'produces' && /^produces\\s+event\\b/.test(nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? ''));\n const propertyName = textBefore.trimStart().split(/\\s+/)[0];\n const reservedProperty = (chain[0] === 'command' && ['reads', 'authorize', 'produces'].includes(propertyName)) ||\n (chain[0] === 'event' && propertyName === 'tag') ||\n (['trigger', 'when', 'every', 'at'].includes(chain[0]) && ['description', 'file', 'reads', 'produces', 'invokes'].includes(propertyName));\n const optionalPrefix = (match: RegExpMatchArray | null) => match !== null && 'optional'.startsWith(match[1]);\n const afterPropertyType = propertyOwner && !reservedProperty && optionalPrefix(textBefore.match(/^\\s*@?[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+(\\w*)$/));\n const afterQueryType = (chain[0] === 'query' && optionalPrefix(textBefore.match(/^\\s*(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+(\\w*)$/))) ||\n optionalPrefix(textBefore.match(/^\\s*query\\s+[A-Za-z_]\\w*\\s*=>\\s*(?:observable\\s+)?[\\w.]+(?:\\[\\])?\\s+(\\w*)$/));\n const eventPropertyOwner = chain[0] === 'event' || (chain[0] === 'produces' && /^produces\\s+event\\b/.test(nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? ''));\n const subjectModifier = eventPropertyOwner && !reservedProperty ? textBefore.match(/^\\s*@?[a-z_]\\w*\\s+([\\w.]+)\\s+(\\w*)$/) : null;\n const subjectConcept = symbols.concepts.find(concept => concept.name === subjectModifier?.[1]);\n const subjectType = subjectConcept?.primitive ?? subjectModifier?.[1];\n const subjectTarget = (subjectType === 'String' || subjectType === 'Uuid' || (subjectType === 'Int' && subjectConcept !== undefined)) &&\n !subjectConcept?.attributes.some(attribute => ['pii', 'personal', 'secret', 'sensitive'].includes(attribute.replace(/^@/, '')));\n const afterSubjectType = subjectModifier !== null && subjectTarget && 'subject'.startsWith(subjectModifier[2]);\n const keyModifier = chain[0] === 'readmodel' ? textBefore.match(/^\\s*@?[a-z_]\\w*\\s+[\\w.]+\\s+(\\w*)$/) : null;\n const modifierEntries = [\n ...(keyModifier && 'key'.startsWith(keyModifier[1]) ? [{ label: 'key', insertText: 'key', documentation: 'Declares a required read-model key part. Explicit keys replace inference. Composite keys are authoring-only (#599).' }] : []),\n ...((afterPropertyType || afterQueryType) && !/=>\\s*observable\\s+$/.test(textBefore) ? items.optionalTypeItems : []),\n ...(afterSubjectType ? [{ label: 'subject', insertText: 'subject', documentation: 'One required scalar event data-subject identity; not pii or secret. Report-only lineage metadata (PLAY0270), no ESM or provider output yet.' }] : []),\n ];\n if (modifierEntries.length > 0) return { kind: 'entries', entries: modifierEntries };\n\n if (/\\bauthorize\\s+[\\w\\s]*$/.test(textBefore) || chain[0] === 'authorize') {\n return { kind: 'policies' };\n }\n if (/\\bwhen\\s+\\w*$/.test(textBefore) && chain.includes('reaction')) {\n return { kind: 'triggers' };\n }\n if (/\\bon\\s+\\w*$/.test(textBefore) && chain.includes('constraint')) {\n return { kind: 'events' };\n }\n if (/\\binvokes\\s+\\w*$/.test(textBefore) && chain.includes('reaction')) {\n return { kind: 'commands' };\n }\n if (/\\b(?:on|unique\\s+event)\\s+\\w*$/.test(textBefore) && chain[0] === 'constraint') {\n return { kind: 'events' };\n }\n if (/\\bproduces\\s+\\w*$/.test(textBefore)) {\n return { kind: 'producesTargets' };\n }\n if (/\\bnavigate\\s+to\\s+\\w*$/.test(textBefore)) {\n return { kind: 'screens' };\n }\n if (chain[0] === 'specification') {\n if (/^\\s*when\\s+query\\s+[\\w.]*$/.test(textBefore)) return { kind: 'queries' };\n const step = textBefore.match(/^\\s*(given|when|then)\\s+\\w*$/);\n if (step) return { kind: 'entries', entries: items.specificationStepItems[step[1] as 'given' | 'when' | 'then'] };\n }\n if (/\\b(?:via|then)\\s+query\\s+[\\w.]*$/.test(textBefore)) {\n return { kind: 'queries' };\n }\n if (\n (chain[0] === 'event' || chain[0] === 'command' || chain[0] === 'type') &&\n /^\\s+[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)\n ) {\n return { kind: 'types' };\n }\n if (chain[0] === 'query' && /^\\s+(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)) {\n return { kind: 'types' };\n }\n\n const enclosingLine = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent);\n if (enclosingLine && /^produces\\s+operation\\b/.test(enclosingLine)) return { kind: 'entries', entries: items.operationItems };\n if (enclosingLine && /^produces\\s+event\\b/.test(enclosingLine)) {\n if (/^\\s+@?[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)) return { kind: 'types' };\n return { kind: 'entries', entries: chain.includes('command') ? [...items.inlineEventItems, productionRouteItem] : items.inlineEventItems };\n }\n if (enclosingLine && RULE_LINE_PATTERN.test(enclosingLine)) {\n return { kind: 'entries', entries: items.ruleItems };\n }\n\n const headers = enclosingHeaders(lines, fences, lineIndex, effectiveIndent);\n if (chain[0] === 'for' && chain.includes('seed')) return { kind: 'events' };\n const entries = completionEntriesFor(chain, { headers, document: lines });\n const expansion = chain[0] === 'command' ? structureCompletion(lines, lineIndex, ' '.repeat(effectiveIndent), '', symbols) : null;\n return { kind: 'entries', entries: expansion ? [expansionEntry(expansion.text, effectiveIndent), ...entries] : entries };\n}\n"],"mappings":"s+DAwBA,MAAMmD,EAAsB,CAAE,MAAO,SAAU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UAAW,QAASvJ,CAAqB,EAC5H,GAAIuJ,GAAiB,sBAAsB,KAAKA,CAAa,EAEzD,MADI,+BAA+B,KAAKtD,CAAU,EAAU,CAAE,KAAM,OAAQ,EACrE,CAAE,KAAM,UAAW,QAASpD,EAAM,SAAS,SAAS,EAAI,CAAC,GAAGhB,EAAwBE,CAAmB,EAAIF,CAAuB,EAE7I,GAAI0H,GAAiBvH,GAAkB,KAAKuH,CAAa,EACrD,MAAO,CAAE,KAAM,UAAW,QAASzH,CAAgB,EAGvD,IAAM4H,EAAUC,EAAiB/D,EAAOC,EAAQE,EAAWwB,CAAe,EAC1E,GAAI1E,EAAM,KAAO,OAASA,EAAM,SAAS,MAAM,EAAG,MAAO,CAAE,KAAM,QAAS,EAC1E,IAAM+G,EAAU,qBAAqB/G,EAAO,CAAE,UAAS,SAAU+C,CAAM,CAAC,EAClEiE,EAAYhH,EAAM,KAAO,UAAYiH,GAAoBlE,EAAOG,EAAW,IAAI,OAAOwB,CAAe,EAAG,GAAIT,CAAO,EAAI,KAC7H,MAAO,CAAE,KAAM,UAAW,QAAS+C,EAAY,CAAC,eAAeA,EAAU,KAAMtC,CAAe,EAAG,GAAGqC,CAAO,EAAIA,CAAQ,CAC3H"}
@@ -1,2 +1,2 @@
1
- const e={repeatedSingularDeclarationAcrossFiles:`PLAY0172`,invalidExposureDeclaration:`PLAY0621`,unknownExposureOwner:`PLAY0622`,reExposureCycle:`PLAY0623`,reExposureBroken:`PLAY0624`,invalidInstanceContribution:`PLAY0625`,unknownContributionInstance:`PLAY0626`,contributionNotExposed:`PLAY0627`,contributionTypeMismatch:`PLAY0628`,unknownTemplateContentSlot:`PLAY0629`,unknownNavigationOutlet:`PLAY0630`,templateScopeMismatch:`PLAY0631`,incompatibleComponentPackage:`PLAY0632`,unknownNavigationDestination:`PLAY0654`,unknownScreenContributionPoint:`PLAY0655`,templateNestingCycle:`PLAY0656`,mixedEnumerationNumbering:`PLAY0667`,duplicateEnumerationNumber:`PLAY0668`,enumerationNumberOutsideInt32:`PLAY0669`,malformedEnumerationNumber:`PLAY0670`,unpinnedStoredEnumeration:`PLAY0671`,invalidIdentityDeclaration:`PLAY0633`,duplicateIdentity:`PLAY0634`,invalidIdentityDetail:`PLAY0635`,unknownIdentitySource:`PLAY0636`,identityDetailWithoutSource:`PLAY0637`,identitySourceWithBody:`PLAY0638`,duplicateIdentityDetail:`PLAY0639`,builtInIdentityDetail:`PLAY0640`,unknownIdentityQuery:`PLAY0641`,invalidIdentityQuery:`PLAY0642`,identityQueryWithoutKey:`PLAY0643`,invalidIdentityQueryKey:`PLAY0644`,identityQueryAuthorizationDependency:`PLAY0645`,identityQueryTypeMismatch:`PLAY0646`,invalidReactionIdentity:`PLAY0647`,gatedInvocationWithoutIdentity:`PLAY0648`,unusedReactionIdentity:`PLAY0649`,unusedReactionRole:`PLAY0650`,unsatisfiedReactionIdentity:`PLAY0651`,reactionPrivilegeEscalation:`PLAY0652`,commandProducesPublicEvent:`PLAY0607`,publicEventRequiresOutboundTranslation:`PLAY0608`,outboundPublicEventCount:`PLAY0609`,foreignPublicEventConsumer:`PLAY0610`,outboundTranslationInput:`PLAY0611`,inboundTranslationOutput:`PLAY0612`,foreignPublicEventProduced:`PLAY0613`,publicTranslationRequiresDirection:`PLAY0614`,translationConstructDirection:`PLAY0615`,inboundTranslationInput:`PLAY0616`,outboundTranslationOutput:`PLAY0617`,eventTargetOutsideOutboundTranslation:`PLAY0618`,eventsSourceOutsideInboundTranslation:`PLAY0619`,invalidCaptureEventsSource:`PLAY0620`,invalidReadModelKey:`PLAY0660`,incompleteReadModelKey:`PLAY0661`,invalidReadModelKeyLookup:`PLAY0662`,productionRouteOutsideCommand:`PLAY0663`,redundantProductionRoute:`PLAY0664`,invalidObserverFilter:`PLAY0665`,observerFilterExcludesEveryProducer:`PLAY0666`,invalidDescription:`PLAY0145`,emptyDescription:`PLAY0146`,duplicateDescription:`PLAY0147`,unknownConceptDirective:`PLAY0010`,attributeReasonWithoutAttribute:`PLAY0012`,duplicateAttributeReason:`PLAY0013`,duplicateComplianceMarker:`PLAY0653`,legacyComplianceMarker:`PLAY0565`,unknownComplianceMarker:`PLAY0566`,invalidSecretScope:`PLAY0567`,duplicateSecretScope:`PLAY0568`,secretScopeIgnoredForPii:`PLAY0569`,invalidPersonalDataQualifier:`PLAY0570`,duplicateSpecialCategory:`PLAY0571`,invalidPurposeDeclaration:`PLAY0596`,invalidPurposeVocabulary:`PLAY0597`,duplicatePurposeField:`PLAY0598`,duplicatePurposeDeclaration:`PLAY0599`,unknownPurpose:`PLAY0600`,purposeInterestMismatch:`PLAY0601`,personalDataWithoutPurpose:`PLAY0602`,specialDataWithoutCondition:`PLAY0603`,criminalDataWithoutAuthorization:`PLAY0604`,purposeWithoutBasis:`PLAY0605`,unusedPurpose:`PLAY0606`,duplicateEventSubject:`PLAY0590`,invalidSubjectType:`PLAY0591`,protectedSubjectType:`PLAY0592`,invalidSubjectOwner:`PLAY0593`,readModelSubjectNotSupported:`PLAY0594`,invalidSubjectModifierOrder:`PLAY0595`,conflictingScreenDataBinding:`PLAY0530`,screenDataQueryMismatch:`PLAY0531`,actionWithoutInputSurface:`PLAY0532`,commandWithoutInputSurface:`PLAY0533`,readModelFieldWithoutOrigin:`PLAY0534`,queryParameterNotHeldByView:`PLAY0535`,unconsumedEvent:`PLAY0536`,unreachableScreen:`PLAY0537`,invalidSpecificationCallerPersona:`PLAY0572`,unsynthesizablePersonaCaller:`PLAY0573`,personaWithoutGate:`PLAY0574`,gateWithoutPersona:`PLAY0575`,ambiguousPersonaCaller:`PLAY0576`,invalidSpecificationParameter:`PLAY0577`,invalidSpecificationCase:`PLAY0578`,duplicateSpecificationParameter:`PLAY0579`,duplicateSpecificationCase:`PLAY0580`,incompleteSpecificationTable:`PLAY0581`,invalidSpecificationCaseAssignment:`PLAY0582`,invalidSpecificationCaseValue:`PLAY0583`,invalidSpecificationCaseReference:`PLAY0584`,optionalSpecificationParameterTarget:`PLAY0585`,specificationCaseNameCollision:`PLAY0586`,incompatibleSpecificationParameterType:`PLAY0587`,unusedSpecificationParameter:`PLAY0588`,singularSpecificationTableExpansion:`PLAY0589`,invalidActionAlternative:`PLAY0341`,guardedActionWithoutAlternatives:`PLAY0342`,misplacedActionOtherwise:`PLAY0343`,unsupportedActionConditionOperand:`PLAY0344`,unknownActionSubjectField:`PLAY0345`,unresolvedActionSubject:`PLAY0346`,unreachableActionAlternative:`PLAY0347`,unknownActionArgumentProperty:`PLAY0348`,invalidRefusalBranch:`PLAY0538`,invalidRefusalBranchBody:`PLAY0539`,unreachableRefusalBranch:`PLAY0540`,invalidRefusalValue:`PLAY0541`,unknownRefusalConstraint:`PLAY0542`,unmatchedRedeliveredOccurrence:`PLAY0543`,unknownRedeliveryReaction:`PLAY0544`,invalidNoEventsExpectation:`PLAY0545`,indeterminateNegatedClaimTarget:`PLAY0546`,invalidAbsentReadModelStep:`PLAY0453`,unknownConstraintProperty:`PLAY0391`,invalidSpecificationExample:`PLAY0518`,duplicateSpecificationAssignment:`PLAY0519`,unknownReadModelProperty:`PLAY0514`,piiNotSupportedOnIdentifier:`PLAY0515`,invalidEventSourceDeclaration:`PLAY0503`,invalidCommandStream:`PLAY0504`,invalidSpecificationStream:`PLAY0547`,specificationStreamOnCommand:`PLAY0548`,invalidSpecificationStreamRoute:`PLAY0549`,invalidSpecificationStreamEventSource:`PLAY0550`,specificationStreamContradictsCommand:`PLAY0551`,ambiguousCommandStream:`PLAY0505`,unsupportedStreamIdType:`PLAY0506`,redundantSourceStreamId:`PLAY0507`,eventFromLaterSlice:`PLAY0516`,timelineCycleGroup:`PLAY0517`,invalidSpecificationExampleBody:`PLAY0526`,undeclaredDependency:`PLAY0552`,unusedDependencyDeclaration:`PLAY0553`,invalidDependencyTarget:`PLAY0554`,repeatedDependencyDeclaration:`PLAY0555`,mutualDependencyDeclarations:`PLAY0556`,authorizationRefusalWithoutIdentity:`PLAY0557`,invalidDocumentation:`PLAY0558`,conflictingDocumentationAcrossFiles:`PLAY0559`,unsupportedInteractionAlternatives:`PLAY0560`,mixedInteractionAlternatives:`PLAY0561`,interactionAlternativeWithoutActions:`PLAY0562`,inlineInteractionAlternative:`PLAY0563`,legacyInteractionWhere:`PLAY0564`,ambiguousReference:`PLAY0198`,invalidImplementationBlock:`PLAY0492`,invalidImplementationHint:`PLAY0493`,conflictingImplementationSources:`PLAY0494`,eventSourceIdInPayload:`PLAY0469`,explicitProducesTargetsRequired:`PLAY0470`,redundantEventId:`PLAY0471`,invalidEventId:`PLAY0472`,inlineEventCollision:`PLAY0473`,inlineEventOutsideCommand:`PLAY0474`,inlineEventGeneration:`PLAY0475`,reservedProductionMetadata:`PLAY0476`,invalidEventDocumentation:`PLAY0477`,tabIndentation:`PLAY0006`,unknownPrimitiveType:`PLAY0008`,unknownSliceType:`PLAY0028`,duplicateCommandIdentifier:`PLAY0036`,unknownContextPath:`PLAY0153`,unknownContextCausedByProperty:`PLAY0154`,unknownContextIdentityProperty:`PLAY0155`,unclosedCodeBlock:`PLAY0164`,unknownType:`PLAY0165`,unknownEvent:`PLAY0166`,unknownPolicy:`PLAY0167`,duplicateDeclaration:`PLAY0168`,unknownEventContextMember:`PLAY0295`,unknownEventContextPath:`PLAY0296`,eventContextPathBelowCollection:`PLAY0297`,missingEventContextPath:`PLAY0298`,unresolvedDynamicKeySource:`PLAY0299`,invalidFileImport:`PLAY0454`,omittedProductionDestination:`PLAY0478`,legacyOptionalSuffix:`PLAY0479`,invalidOptionalModifierOrder:`PLAY0480`,optionalReadsNotSupported:`PLAY0481`,unavailableResponseExecution:`PLAY0268`,generatedPropertyOutsideCommand:`PLAY0482`,invalidGeneratedType:`PLAY0483`,invalidGeneratedModifierOrder:`PLAY0484`,generatedPropertyInput:`PLAY0485`,invalidCommandResponse:`PLAY0486`,invalidResponseSource:`PLAY0487`,duplicateResponseField:`PLAY0488`,invalidResponseShape:`PLAY0489`,invalidGeneratedFixture:`PLAY0490`,invalidReturnExpectation:`PLAY0491`};export{e as diagnosticCodes};
1
+ const e={repeatedSingularDeclarationAcrossFiles:`PLAY0172`,invalidExposureDeclaration:`PLAY0621`,unknownExposureOwner:`PLAY0622`,reExposureCycle:`PLAY0623`,reExposureBroken:`PLAY0624`,invalidInstanceContribution:`PLAY0625`,unknownContributionInstance:`PLAY0626`,contributionNotExposed:`PLAY0627`,contributionTypeMismatch:`PLAY0628`,unknownTemplateContentSlot:`PLAY0629`,unknownNavigationOutlet:`PLAY0630`,templateScopeMismatch:`PLAY0631`,incompatibleComponentPackage:`PLAY0632`,unknownNavigationDestination:`PLAY0654`,unknownScreenContributionPoint:`PLAY0655`,templateNestingCycle:`PLAY0656`,mixedEnumerationNumbering:`PLAY0667`,duplicateEnumerationNumber:`PLAY0668`,enumerationNumberOutsideInt32:`PLAY0669`,malformedEnumerationNumber:`PLAY0670`,unpinnedStoredEnumeration:`PLAY0671`,invalidIdentityDeclaration:`PLAY0633`,duplicateIdentity:`PLAY0634`,invalidIdentityDetail:`PLAY0635`,unknownIdentitySource:`PLAY0636`,identityDetailWithoutSource:`PLAY0637`,identitySourceWithBody:`PLAY0638`,duplicateIdentityDetail:`PLAY0639`,builtInIdentityDetail:`PLAY0640`,unknownIdentityQuery:`PLAY0641`,invalidIdentityQuery:`PLAY0642`,identityQueryWithoutKey:`PLAY0643`,invalidIdentityQueryKey:`PLAY0644`,identityQueryAuthorizationDependency:`PLAY0645`,identityQueryTypeMismatch:`PLAY0646`,invalidReactionIdentity:`PLAY0647`,gatedInvocationWithoutIdentity:`PLAY0648`,unusedReactionIdentity:`PLAY0649`,unusedReactionRole:`PLAY0650`,unsatisfiedReactionIdentity:`PLAY0651`,reactionPrivilegeEscalation:`PLAY0652`,commandProducesPublicEvent:`PLAY0607`,publicEventRequiresOutboundTranslation:`PLAY0608`,outboundPublicEventCount:`PLAY0609`,foreignPublicEventConsumer:`PLAY0610`,outboundTranslationInput:`PLAY0611`,inboundTranslationOutput:`PLAY0612`,foreignPublicEventProduced:`PLAY0613`,publicTranslationRequiresDirection:`PLAY0614`,translationConstructDirection:`PLAY0615`,inboundTranslationInput:`PLAY0616`,outboundTranslationOutput:`PLAY0617`,eventTargetOutsideOutboundTranslation:`PLAY0618`,eventsSourceOutsideInboundTranslation:`PLAY0619`,invalidCaptureEventsSource:`PLAY0620`,invalidReadModelKey:`PLAY0660`,incompleteReadModelKey:`PLAY0661`,invalidReadModelKeyLookup:`PLAY0662`,productionRouteOutsideCommand:`PLAY0663`,redundantProductionRoute:`PLAY0664`,invalidObserverFilter:`PLAY0665`,observerFilterExcludesEveryProducer:`PLAY0666`,invalidDescription:`PLAY0145`,emptyDescription:`PLAY0146`,duplicateDescription:`PLAY0147`,unknownConceptDirective:`PLAY0010`,attributeReasonWithoutAttribute:`PLAY0012`,duplicateAttributeReason:`PLAY0013`,duplicateComplianceMarker:`PLAY0653`,legacyComplianceMarker:`PLAY0565`,unknownComplianceMarker:`PLAY0566`,invalidSecretScope:`PLAY0567`,duplicateSecretScope:`PLAY0568`,secretScopeIgnoredForPii:`PLAY0569`,invalidPersonalDataQualifier:`PLAY0570`,duplicateSpecialCategory:`PLAY0571`,invalidPurposeDeclaration:`PLAY0596`,invalidPurposeVocabulary:`PLAY0597`,duplicatePurposeField:`PLAY0598`,duplicatePurposeDeclaration:`PLAY0599`,unknownPurpose:`PLAY0600`,purposeInterestMismatch:`PLAY0601`,personalDataWithoutPurpose:`PLAY0602`,specialDataWithoutCondition:`PLAY0603`,criminalDataWithoutAuthorization:`PLAY0604`,purposeWithoutBasis:`PLAY0605`,unusedPurpose:`PLAY0606`,duplicateEventSubject:`PLAY0590`,invalidSubjectType:`PLAY0591`,protectedSubjectType:`PLAY0592`,invalidSubjectOwner:`PLAY0593`,readModelSubjectNotSupported:`PLAY0594`,invalidSubjectModifierOrder:`PLAY0595`,conflictingScreenDataBinding:`PLAY0530`,screenDataQueryMismatch:`PLAY0531`,actionWithoutInputSurface:`PLAY0532`,commandWithoutInputSurface:`PLAY0533`,readModelFieldWithoutOrigin:`PLAY0534`,queryParameterNotHeldByView:`PLAY0535`,unconsumedEvent:`PLAY0536`,unreachableScreen:`PLAY0537`,invalidSpecificationCallerPersona:`PLAY0572`,unsynthesizablePersonaCaller:`PLAY0573`,personaWithoutGate:`PLAY0574`,gateWithoutPersona:`PLAY0575`,ambiguousPersonaCaller:`PLAY0576`,invalidSpecificationParameter:`PLAY0577`,invalidSpecificationCase:`PLAY0578`,duplicateSpecificationParameter:`PLAY0579`,duplicateSpecificationCase:`PLAY0580`,incompleteSpecificationTable:`PLAY0581`,invalidSpecificationCaseAssignment:`PLAY0582`,invalidSpecificationCaseValue:`PLAY0583`,invalidSpecificationCaseReference:`PLAY0584`,optionalSpecificationParameterTarget:`PLAY0585`,specificationCaseNameCollision:`PLAY0586`,incompatibleSpecificationParameterType:`PLAY0587`,unusedSpecificationParameter:`PLAY0588`,singularSpecificationTableExpansion:`PLAY0589`,invalidActionAlternative:`PLAY0341`,guardedActionWithoutAlternatives:`PLAY0342`,misplacedActionOtherwise:`PLAY0343`,unsupportedActionConditionOperand:`PLAY0344`,unknownActionSubjectField:`PLAY0345`,unresolvedActionSubject:`PLAY0346`,unreachableActionAlternative:`PLAY0347`,unknownActionArgumentProperty:`PLAY0348`,invalidRefusalBranch:`PLAY0538`,invalidRefusalBranchBody:`PLAY0539`,unreachableRefusalBranch:`PLAY0540`,invalidRefusalValue:`PLAY0541`,unknownRefusalConstraint:`PLAY0542`,unmatchedRedeliveredOccurrence:`PLAY0543`,unknownRedeliveryReaction:`PLAY0544`,invalidNoEventsExpectation:`PLAY0545`,indeterminateNegatedClaimTarget:`PLAY0546`,invalidAbsentReadModelStep:`PLAY0453`,unknownConstraintProperty:`PLAY0391`,invalidSpecificationExample:`PLAY0518`,duplicateSpecificationAssignment:`PLAY0519`,unknownReadModelProperty:`PLAY0514`,piiNotSupportedOnIdentifier:`PLAY0515`,invalidEventSourceDeclaration:`PLAY0503`,invalidCommandStream:`PLAY0504`,invalidSpecificationStream:`PLAY0547`,specificationStreamOnCommand:`PLAY0548`,invalidSpecificationStreamRoute:`PLAY0549`,invalidSpecificationStreamEventSource:`PLAY0550`,specificationStreamContradictsCommand:`PLAY0551`,ambiguousCommandStream:`PLAY0505`,unsupportedStreamIdType:`PLAY0506`,redundantSourceStreamId:`PLAY0507`,eventFromLaterSlice:`PLAY0516`,timelineCycleGroup:`PLAY0517`,invalidSpecificationExampleBody:`PLAY0526`,undeclaredDependency:`PLAY0552`,unusedDependencyDeclaration:`PLAY0553`,invalidDependencyTarget:`PLAY0554`,repeatedDependencyDeclaration:`PLAY0555`,mutualDependencyDeclarations:`PLAY0556`,authorizationRefusalWithoutIdentity:`PLAY0557`,invalidDocumentation:`PLAY0558`,conflictingDocumentationAcrossFiles:`PLAY0559`,unsupportedInteractionAlternatives:`PLAY0560`,mixedInteractionAlternatives:`PLAY0561`,interactionAlternativeWithoutActions:`PLAY0562`,inlineInteractionAlternative:`PLAY0563`,legacyInteractionWhere:`PLAY0564`,ambiguousReference:`PLAY0198`,invalidImplementationBlock:`PLAY0492`,invalidImplementationHint:`PLAY0493`,conflictingImplementationSources:`PLAY0494`,eventSourceIdInPayload:`PLAY0469`,explicitProducesTargetsRequired:`PLAY0470`,redundantEventId:`PLAY0471`,invalidEventId:`PLAY0472`,inlineEventCollision:`PLAY0473`,inlineEventOutsideCommand:`PLAY0474`,inlineEventGeneration:`PLAY0475`,reservedProductionMetadata:`PLAY0476`,invalidEventDocumentation:`PLAY0477`,tabIndentation:`PLAY0006`,unknownPrimitiveType:`PLAY0008`,unknownSliceType:`PLAY0028`,duplicateCommandIdentifier:`PLAY0036`,unknownContextPath:`PLAY0153`,unknownContextCausedByProperty:`PLAY0154`,unknownContextIdentityProperty:`PLAY0155`,unclosedCodeBlock:`PLAY0164`,unknownType:`PLAY0165`,unknownEvent:`PLAY0166`,unknownPolicy:`PLAY0167`,duplicateDeclaration:`PLAY0168`,unknownEventContextMember:`PLAY0295`,unknownEventContextPath:`PLAY0296`,eventContextPathBelowCollection:`PLAY0297`,missingEventContextPath:`PLAY0298`,unresolvedDynamicKeySource:`PLAY0299`,invalidFileImport:`PLAY0454`,omittedProductionDestination:`PLAY0478`,legacyOptionalSuffix:`PLAY0479`,invalidOptionalModifierOrder:`PLAY0480`,optionalReadsNotSupported:`PLAY0481`,unavailableResponseExecution:`PLAY0268`,generatedPropertyOutsideCommand:`PLAY0482`,invalidGeneratedType:`PLAY0483`,invalidGeneratedModifierOrder:`PLAY0484`,generatedPropertyInput:`PLAY0485`,invalidCommandResponse:`PLAY0486`,invalidResponseSource:`PLAY0487`,duplicateResponseField:`PLAY0488`,invalidResponseShape:`PLAY0489`,invalidGeneratedFixture:`PLAY0490`,invalidReturnExpectation:`PLAY0491`,unknownGenerationStrategy:`PLAY0672`,invalidGenerationArgument:`PLAY0673`,invalidGenerationModifier:`PLAY0674`,duplicateGenerationModifier:`PLAY0675`,duplicateGeneration:`PLAY0676`,invalidGenerationPrimitive:`PLAY0677`,invalidGenerationPrefix:`PLAY0678`,invalidGenerationAlphabet:`PLAY0679`,invalidTypeIdPrefix:`PLAY0680`,generationSizeOutsideRange:`PLAY0681`,reservedSequenceGeneration:`PLAY0682`,lowGenerationEntropy:`PLAY0683`,lowGeneratedIdentifierEntropy:`PLAY0684`};export{e as diagnosticCodes};
2
2
  //# sourceMappingURL=diagnostic-codes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostic-codes.js","names":["diagnosticCodes"],"sources":["../../diagnostic-codes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// The PLAY codes the editor reports. Every one of them mirrors a condition the compiler checks and\n// carries the compiler's own code for it, so the same problem is called the same thing whether it was\n// found by the CLI or by a squiggle - see Documentation/screenplay/diagnostics.md for the catalogue.\n//\n// A code is only ever added here for a condition the compiler can also report. The editor makes a few\n// structural checks the compiler does not - the capture and projection validators are where they live -\n// and those stay codeless deliberately: minting a PLAY number for something no compiler run can emit\n// would make the catalogue describe two different tools.\nexport const diagnosticCodes = {\n repeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n invalidExposureDeclaration: 'PLAY0621',\n unknownExposureOwner: 'PLAY0622',\n reExposureCycle: 'PLAY0623',\n reExposureBroken: 'PLAY0624',\n invalidInstanceContribution: 'PLAY0625',\n unknownContributionInstance: 'PLAY0626',\n contributionNotExposed: 'PLAY0627',\n contributionTypeMismatch: 'PLAY0628',\n unknownTemplateContentSlot: 'PLAY0629',\n unknownNavigationOutlet: 'PLAY0630',\n templateScopeMismatch: 'PLAY0631',\n incompatibleComponentPackage: 'PLAY0632',\n unknownNavigationDestination: 'PLAY0654',\n unknownScreenContributionPoint: 'PLAY0655',\n templateNestingCycle: 'PLAY0656',\n mixedEnumerationNumbering: 'PLAY0667',\n duplicateEnumerationNumber: 'PLAY0668',\n enumerationNumberOutsideInt32: 'PLAY0669',\n malformedEnumerationNumber: 'PLAY0670',\n unpinnedStoredEnumeration: 'PLAY0671',\n invalidIdentityDeclaration: 'PLAY0633',\n duplicateIdentity: 'PLAY0634',\n invalidIdentityDetail: 'PLAY0635',\n unknownIdentitySource: 'PLAY0636',\n identityDetailWithoutSource: 'PLAY0637',\n identitySourceWithBody: 'PLAY0638',\n duplicateIdentityDetail: 'PLAY0639',\n builtInIdentityDetail: 'PLAY0640',\n unknownIdentityQuery: 'PLAY0641',\n invalidIdentityQuery: 'PLAY0642',\n identityQueryWithoutKey: 'PLAY0643',\n invalidIdentityQueryKey: 'PLAY0644',\n identityQueryAuthorizationDependency: 'PLAY0645',\n identityQueryTypeMismatch: 'PLAY0646',\n invalidReactionIdentity: 'PLAY0647',\n gatedInvocationWithoutIdentity: 'PLAY0648',\n unusedReactionIdentity: 'PLAY0649',\n unusedReactionRole: 'PLAY0650',\n unsatisfiedReactionIdentity: 'PLAY0651',\n reactionPrivilegeEscalation: 'PLAY0652',\n // Preserve supplied C# whole-model diagnostics; these checks are not yet run by the editor.\n commandProducesPublicEvent: 'PLAY0607',\n publicEventRequiresOutboundTranslation: 'PLAY0608',\n outboundPublicEventCount: 'PLAY0609',\n foreignPublicEventConsumer: 'PLAY0610',\n outboundTranslationInput: 'PLAY0611',\n inboundTranslationOutput: 'PLAY0612',\n foreignPublicEventProduced: 'PLAY0613',\n publicTranslationRequiresDirection: 'PLAY0614',\n translationConstructDirection: 'PLAY0615',\n inboundTranslationInput: 'PLAY0616',\n outboundTranslationOutput: 'PLAY0617',\n eventTargetOutsideOutboundTranslation: 'PLAY0618',\n eventsSourceOutsideInboundTranslation: 'PLAY0619',\n invalidCaptureEventsSource: 'PLAY0620',\n invalidReadModelKey: 'PLAY0660',\n incompleteReadModelKey: 'PLAY0661',\n invalidReadModelKeyLookup: 'PLAY0662',\n productionRouteOutsideCommand: 'PLAY0663',\n redundantProductionRoute: 'PLAY0664',\n invalidObserverFilter: 'PLAY0665',\n observerFilterExcludesEveryProducer: 'PLAY0666',\n invalidDescription: 'PLAY0145',\n emptyDescription: 'PLAY0146',\n duplicateDescription: 'PLAY0147',\n unknownConceptDirective: 'PLAY0010',\n attributeReasonWithoutAttribute: 'PLAY0012',\n duplicateAttributeReason: 'PLAY0013',\n duplicateComplianceMarker: 'PLAY0653',\n legacyComplianceMarker: 'PLAY0565',\n unknownComplianceMarker: 'PLAY0566',\n invalidSecretScope: 'PLAY0567',\n duplicateSecretScope: 'PLAY0568',\n secretScopeIgnoredForPii: 'PLAY0569',\n invalidPersonalDataQualifier: 'PLAY0570',\n duplicateSpecialCategory: 'PLAY0571',\n invalidPurposeDeclaration: 'PLAY0596',\n invalidPurposeVocabulary: 'PLAY0597',\n duplicatePurposeField: 'PLAY0598',\n duplicatePurposeDeclaration: 'PLAY0599',\n unknownPurpose: 'PLAY0600',\n purposeInterestMismatch: 'PLAY0601',\n personalDataWithoutPurpose: 'PLAY0602',\n specialDataWithoutCondition: 'PLAY0603',\n criminalDataWithoutAuthorization: 'PLAY0604',\n purposeWithoutBasis: 'PLAY0605',\n unusedPurpose: 'PLAY0606',\n duplicateEventSubject: 'PLAY0590',\n invalidSubjectType: 'PLAY0591',\n protectedSubjectType: 'PLAY0592',\n invalidSubjectOwner: 'PLAY0593',\n readModelSubjectNotSupported: 'PLAY0594',\n invalidSubjectModifierOrder: 'PLAY0595',\n // Supplied compiler diagnostics are preserved, even for checks only the C# tool can run.\n // See Documentation/screenplay/editor-diagnostics.md for the validation boundary.\n conflictingScreenDataBinding: 'PLAY0530',\n screenDataQueryMismatch: 'PLAY0531',\n actionWithoutInputSurface: 'PLAY0532',\n commandWithoutInputSurface: 'PLAY0533',\n readModelFieldWithoutOrigin: 'PLAY0534',\n queryParameterNotHeldByView: 'PLAY0535',\n unconsumedEvent: 'PLAY0536',\n unreachableScreen: 'PLAY0537',\n invalidSpecificationCallerPersona: 'PLAY0572',\n unsynthesizablePersonaCaller: 'PLAY0573',\n personaWithoutGate: 'PLAY0574',\n gateWithoutPersona: 'PLAY0575',\n ambiguousPersonaCaller: 'PLAY0576',\n invalidSpecificationParameter: 'PLAY0577',\n invalidSpecificationCase: 'PLAY0578',\n duplicateSpecificationParameter: 'PLAY0579',\n duplicateSpecificationCase: 'PLAY0580',\n incompleteSpecificationTable: 'PLAY0581',\n invalidSpecificationCaseAssignment: 'PLAY0582',\n invalidSpecificationCaseValue: 'PLAY0583',\n invalidSpecificationCaseReference: 'PLAY0584',\n optionalSpecificationParameterTarget: 'PLAY0585',\n specificationCaseNameCollision: 'PLAY0586',\n incompatibleSpecificationParameterType: 'PLAY0587',\n unusedSpecificationParameter: 'PLAY0588',\n singularSpecificationTableExpansion: 'PLAY0589',\n invalidActionAlternative: 'PLAY0341',\n guardedActionWithoutAlternatives: 'PLAY0342',\n misplacedActionOtherwise: 'PLAY0343',\n unsupportedActionConditionOperand: 'PLAY0344',\n unknownActionSubjectField: 'PLAY0345',\n unresolvedActionSubject: 'PLAY0346',\n unreachableActionAlternative: 'PLAY0347',\n unknownActionArgumentProperty: 'PLAY0348',\n invalidRefusalBranch: 'PLAY0538',\n invalidRefusalBranchBody: 'PLAY0539',\n unreachableRefusalBranch: 'PLAY0540',\n invalidRefusalValue: 'PLAY0541',\n unknownRefusalConstraint: 'PLAY0542',\n unmatchedRedeliveredOccurrence: 'PLAY0543',\n unknownRedeliveryReaction: 'PLAY0544',\n invalidNoEventsExpectation: 'PLAY0545',\n indeterminateNegatedClaimTarget: 'PLAY0546',\n invalidAbsentReadModelStep: 'PLAY0453',\n unknownConstraintProperty: 'PLAY0391',\n invalidSpecificationExample: 'PLAY0518',\n duplicateSpecificationAssignment: 'PLAY0519',\n unknownReadModelProperty: 'PLAY0514',\n piiNotSupportedOnIdentifier: 'PLAY0515',\n invalidEventSourceDeclaration: 'PLAY0503',\n invalidCommandStream: 'PLAY0504',\n invalidSpecificationStream: 'PLAY0547',\n specificationStreamOnCommand: 'PLAY0548',\n invalidSpecificationStreamRoute: 'PLAY0549',\n invalidSpecificationStreamEventSource: 'PLAY0550',\n specificationStreamContradictsCommand: 'PLAY0551',\n ambiguousCommandStream: 'PLAY0505',\n unsupportedStreamIdType: 'PLAY0506',\n redundantSourceStreamId: 'PLAY0507',\n eventFromLaterSlice: 'PLAY0516',\n timelineCycleGroup: 'PLAY0517',\n invalidSpecificationExampleBody: 'PLAY0526',\n undeclaredDependency: 'PLAY0552',\n unusedDependencyDeclaration: 'PLAY0553',\n invalidDependencyTarget: 'PLAY0554',\n repeatedDependencyDeclaration: 'PLAY0555',\n mutualDependencyDeclarations: 'PLAY0556',\n authorizationRefusalWithoutIdentity: 'PLAY0557',\n invalidDocumentation: 'PLAY0558',\n conflictingDocumentationAcrossFiles: 'PLAY0559',\n unsupportedInteractionAlternatives: 'PLAY0560',\n mixedInteractionAlternatives: 'PLAY0561',\n interactionAlternativeWithoutActions: 'PLAY0562',\n inlineInteractionAlternative: 'PLAY0563',\n legacyInteractionWhere: 'PLAY0564',\n ambiguousReference: 'PLAY0198',\n invalidImplementationBlock: 'PLAY0492',\n invalidImplementationHint: 'PLAY0493',\n conflictingImplementationSources: 'PLAY0494',\n eventSourceIdInPayload: 'PLAY0469',\n explicitProducesTargetsRequired: 'PLAY0470',\n redundantEventId: 'PLAY0471',\n invalidEventId: 'PLAY0472',\n inlineEventCollision: 'PLAY0473',\n inlineEventOutsideCommand: 'PLAY0474',\n inlineEventGeneration: 'PLAY0475',\n reservedProductionMetadata: 'PLAY0476',\n invalidEventDocumentation: 'PLAY0477',\n tabIndentation: 'PLAY0006',\n unknownPrimitiveType: 'PLAY0008',\n unknownSliceType: 'PLAY0028',\n duplicateCommandIdentifier: 'PLAY0036',\n unknownContextPath: 'PLAY0153',\n unknownContextCausedByProperty: 'PLAY0154',\n unknownContextIdentityProperty: 'PLAY0155',\n unclosedCodeBlock: 'PLAY0164',\n unknownType: 'PLAY0165',\n unknownEvent: 'PLAY0166',\n unknownPolicy: 'PLAY0167',\n duplicateDeclaration: 'PLAY0168',\n unknownEventContextMember: 'PLAY0295',\n unknownEventContextPath: 'PLAY0296',\n eventContextPathBelowCollection: 'PLAY0297',\n missingEventContextPath: 'PLAY0298',\n unresolvedDynamicKeySource: 'PLAY0299',\n invalidFileImport: 'PLAY0454',\n omittedProductionDestination: 'PLAY0478',\n legacyOptionalSuffix: 'PLAY0479',\n invalidOptionalModifierOrder: 'PLAY0480',\n optionalReadsNotSupported: 'PLAY0481',\n unavailableResponseExecution: 'PLAY0268',\n generatedPropertyOutsideCommand: 'PLAY0482',\n invalidGeneratedType: 'PLAY0483',\n invalidGeneratedModifierOrder: 'PLAY0484',\n generatedPropertyInput: 'PLAY0485',\n invalidCommandResponse: 'PLAY0486',\n invalidResponseSource: 'PLAY0487',\n duplicateResponseField: 'PLAY0488',\n invalidResponseShape: 'PLAY0489',\n invalidGeneratedFixture: 'PLAY0490',\n invalidReturnExpectation: 'PLAY0491',\n} as const;\n\nexport type DiagnosticCode = (typeof diagnosticCodes)[keyof typeof diagnosticCodes];\n"],"mappings":"AAWA,MAAaA,EAAkB,CAC3B,uCAAwC,WACxC,2BAA4B,WAC5B,qBAAsB,WACtB,gBAAiB,WACj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WACpB,2BAA4B,WAC5B,0BAA2B,WAC3B,iCAAkC,WAClC,uBAAwB,WACxB,gCAAiC,WACjC,iBAAkB,WAClB,eAAgB,WAChB,qBAAsB,WACtB,0BAA2B,WAC3B,sBAAuB,WACvB,2BAA4B,WAC5B,0BAA2B,WAC3B,eAAgB,WAChB,qBAAsB,WACtB,iBAAkB,WAClB,2BAA4B,WAC5B,mBAAoB,WACpB,+BAAgC,WAChC,+BAAgC,WAChC,kBAAmB,WACnB,YAAa,WACb,aAAc,WACd,cAAe,WACf,qBAAsB,WACtB,0BAA2B,WAC3B,wBAAyB,WACzB,gCAAiC,WACjC,wBAAyB,WACzB,2BAA4B,WAC5B,kBAAmB,WACnB,6BAA8B,WAC9B,qBAAsB,WACtB,6BAA8B,WAC9B,0BAA2B,WAC3B,6BAA8B,WAC9B,gCAAiC,WACjC,qBAAsB,WACtB,8BAA+B,WAC/B,uBAAwB,WACxB,uBAAwB,WACxB,sBAAuB,WACvB,uBAAwB,WACxB,qBAAsB,WACtB,wBAAyB,WACzB,yBAA0B,UAC9B"}
1
+ {"version":3,"file":"diagnostic-codes.js","names":["diagnosticCodes"],"sources":["../../diagnostic-codes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// The PLAY codes the editor reports. Every one of them mirrors a condition the compiler checks and\n// carries the compiler's own code for it, so the same problem is called the same thing whether it was\n// found by the CLI or by a squiggle - see Documentation/screenplay/diagnostics.md for the catalogue.\n//\n// A code is only ever added here for a condition the compiler can also report. The editor makes a few\n// structural checks the compiler does not - the capture and projection validators are where they live -\n// and those stay codeless deliberately: minting a PLAY number for something no compiler run can emit\n// would make the catalogue describe two different tools.\nexport const diagnosticCodes = {\n repeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n invalidExposureDeclaration: 'PLAY0621',\n unknownExposureOwner: 'PLAY0622',\n reExposureCycle: 'PLAY0623',\n reExposureBroken: 'PLAY0624',\n invalidInstanceContribution: 'PLAY0625',\n unknownContributionInstance: 'PLAY0626',\n contributionNotExposed: 'PLAY0627',\n contributionTypeMismatch: 'PLAY0628',\n unknownTemplateContentSlot: 'PLAY0629',\n unknownNavigationOutlet: 'PLAY0630',\n templateScopeMismatch: 'PLAY0631',\n incompatibleComponentPackage: 'PLAY0632',\n unknownNavigationDestination: 'PLAY0654',\n unknownScreenContributionPoint: 'PLAY0655',\n templateNestingCycle: 'PLAY0656',\n mixedEnumerationNumbering: 'PLAY0667',\n duplicateEnumerationNumber: 'PLAY0668',\n enumerationNumberOutsideInt32: 'PLAY0669',\n malformedEnumerationNumber: 'PLAY0670',\n unpinnedStoredEnumeration: 'PLAY0671',\n invalidIdentityDeclaration: 'PLAY0633',\n duplicateIdentity: 'PLAY0634',\n invalidIdentityDetail: 'PLAY0635',\n unknownIdentitySource: 'PLAY0636',\n identityDetailWithoutSource: 'PLAY0637',\n identitySourceWithBody: 'PLAY0638',\n duplicateIdentityDetail: 'PLAY0639',\n builtInIdentityDetail: 'PLAY0640',\n unknownIdentityQuery: 'PLAY0641',\n invalidIdentityQuery: 'PLAY0642',\n identityQueryWithoutKey: 'PLAY0643',\n invalidIdentityQueryKey: 'PLAY0644',\n identityQueryAuthorizationDependency: 'PLAY0645',\n identityQueryTypeMismatch: 'PLAY0646',\n invalidReactionIdentity: 'PLAY0647',\n gatedInvocationWithoutIdentity: 'PLAY0648',\n unusedReactionIdentity: 'PLAY0649',\n unusedReactionRole: 'PLAY0650',\n unsatisfiedReactionIdentity: 'PLAY0651',\n reactionPrivilegeEscalation: 'PLAY0652',\n // Preserve supplied C# whole-model diagnostics; these checks are not yet run by the editor.\n commandProducesPublicEvent: 'PLAY0607',\n publicEventRequiresOutboundTranslation: 'PLAY0608',\n outboundPublicEventCount: 'PLAY0609',\n foreignPublicEventConsumer: 'PLAY0610',\n outboundTranslationInput: 'PLAY0611',\n inboundTranslationOutput: 'PLAY0612',\n foreignPublicEventProduced: 'PLAY0613',\n publicTranslationRequiresDirection: 'PLAY0614',\n translationConstructDirection: 'PLAY0615',\n inboundTranslationInput: 'PLAY0616',\n outboundTranslationOutput: 'PLAY0617',\n eventTargetOutsideOutboundTranslation: 'PLAY0618',\n eventsSourceOutsideInboundTranslation: 'PLAY0619',\n invalidCaptureEventsSource: 'PLAY0620',\n invalidReadModelKey: 'PLAY0660',\n incompleteReadModelKey: 'PLAY0661',\n invalidReadModelKeyLookup: 'PLAY0662',\n productionRouteOutsideCommand: 'PLAY0663',\n redundantProductionRoute: 'PLAY0664',\n invalidObserverFilter: 'PLAY0665',\n observerFilterExcludesEveryProducer: 'PLAY0666',\n invalidDescription: 'PLAY0145',\n emptyDescription: 'PLAY0146',\n duplicateDescription: 'PLAY0147',\n unknownConceptDirective: 'PLAY0010',\n attributeReasonWithoutAttribute: 'PLAY0012',\n duplicateAttributeReason: 'PLAY0013',\n duplicateComplianceMarker: 'PLAY0653',\n legacyComplianceMarker: 'PLAY0565',\n unknownComplianceMarker: 'PLAY0566',\n invalidSecretScope: 'PLAY0567',\n duplicateSecretScope: 'PLAY0568',\n secretScopeIgnoredForPii: 'PLAY0569',\n invalidPersonalDataQualifier: 'PLAY0570',\n duplicateSpecialCategory: 'PLAY0571',\n invalidPurposeDeclaration: 'PLAY0596',\n invalidPurposeVocabulary: 'PLAY0597',\n duplicatePurposeField: 'PLAY0598',\n duplicatePurposeDeclaration: 'PLAY0599',\n unknownPurpose: 'PLAY0600',\n purposeInterestMismatch: 'PLAY0601',\n personalDataWithoutPurpose: 'PLAY0602',\n specialDataWithoutCondition: 'PLAY0603',\n criminalDataWithoutAuthorization: 'PLAY0604',\n purposeWithoutBasis: 'PLAY0605',\n unusedPurpose: 'PLAY0606',\n duplicateEventSubject: 'PLAY0590',\n invalidSubjectType: 'PLAY0591',\n protectedSubjectType: 'PLAY0592',\n invalidSubjectOwner: 'PLAY0593',\n readModelSubjectNotSupported: 'PLAY0594',\n invalidSubjectModifierOrder: 'PLAY0595',\n // Supplied compiler diagnostics are preserved, even for checks only the C# tool can run.\n // See Documentation/screenplay/editor-diagnostics.md for the validation boundary.\n conflictingScreenDataBinding: 'PLAY0530',\n screenDataQueryMismatch: 'PLAY0531',\n actionWithoutInputSurface: 'PLAY0532',\n commandWithoutInputSurface: 'PLAY0533',\n readModelFieldWithoutOrigin: 'PLAY0534',\n queryParameterNotHeldByView: 'PLAY0535',\n unconsumedEvent: 'PLAY0536',\n unreachableScreen: 'PLAY0537',\n invalidSpecificationCallerPersona: 'PLAY0572',\n unsynthesizablePersonaCaller: 'PLAY0573',\n personaWithoutGate: 'PLAY0574',\n gateWithoutPersona: 'PLAY0575',\n ambiguousPersonaCaller: 'PLAY0576',\n invalidSpecificationParameter: 'PLAY0577',\n invalidSpecificationCase: 'PLAY0578',\n duplicateSpecificationParameter: 'PLAY0579',\n duplicateSpecificationCase: 'PLAY0580',\n incompleteSpecificationTable: 'PLAY0581',\n invalidSpecificationCaseAssignment: 'PLAY0582',\n invalidSpecificationCaseValue: 'PLAY0583',\n invalidSpecificationCaseReference: 'PLAY0584',\n optionalSpecificationParameterTarget: 'PLAY0585',\n specificationCaseNameCollision: 'PLAY0586',\n incompatibleSpecificationParameterType: 'PLAY0587',\n unusedSpecificationParameter: 'PLAY0588',\n singularSpecificationTableExpansion: 'PLAY0589',\n invalidActionAlternative: 'PLAY0341',\n guardedActionWithoutAlternatives: 'PLAY0342',\n misplacedActionOtherwise: 'PLAY0343',\n unsupportedActionConditionOperand: 'PLAY0344',\n unknownActionSubjectField: 'PLAY0345',\n unresolvedActionSubject: 'PLAY0346',\n unreachableActionAlternative: 'PLAY0347',\n unknownActionArgumentProperty: 'PLAY0348',\n invalidRefusalBranch: 'PLAY0538',\n invalidRefusalBranchBody: 'PLAY0539',\n unreachableRefusalBranch: 'PLAY0540',\n invalidRefusalValue: 'PLAY0541',\n unknownRefusalConstraint: 'PLAY0542',\n unmatchedRedeliveredOccurrence: 'PLAY0543',\n unknownRedeliveryReaction: 'PLAY0544',\n invalidNoEventsExpectation: 'PLAY0545',\n indeterminateNegatedClaimTarget: 'PLAY0546',\n invalidAbsentReadModelStep: 'PLAY0453',\n unknownConstraintProperty: 'PLAY0391',\n invalidSpecificationExample: 'PLAY0518',\n duplicateSpecificationAssignment: 'PLAY0519',\n unknownReadModelProperty: 'PLAY0514',\n piiNotSupportedOnIdentifier: 'PLAY0515',\n invalidEventSourceDeclaration: 'PLAY0503',\n invalidCommandStream: 'PLAY0504',\n invalidSpecificationStream: 'PLAY0547',\n specificationStreamOnCommand: 'PLAY0548',\n invalidSpecificationStreamRoute: 'PLAY0549',\n invalidSpecificationStreamEventSource: 'PLAY0550',\n specificationStreamContradictsCommand: 'PLAY0551',\n ambiguousCommandStream: 'PLAY0505',\n unsupportedStreamIdType: 'PLAY0506',\n redundantSourceStreamId: 'PLAY0507',\n eventFromLaterSlice: 'PLAY0516',\n timelineCycleGroup: 'PLAY0517',\n invalidSpecificationExampleBody: 'PLAY0526',\n undeclaredDependency: 'PLAY0552',\n unusedDependencyDeclaration: 'PLAY0553',\n invalidDependencyTarget: 'PLAY0554',\n repeatedDependencyDeclaration: 'PLAY0555',\n mutualDependencyDeclarations: 'PLAY0556',\n authorizationRefusalWithoutIdentity: 'PLAY0557',\n invalidDocumentation: 'PLAY0558',\n conflictingDocumentationAcrossFiles: 'PLAY0559',\n unsupportedInteractionAlternatives: 'PLAY0560',\n mixedInteractionAlternatives: 'PLAY0561',\n interactionAlternativeWithoutActions: 'PLAY0562',\n inlineInteractionAlternative: 'PLAY0563',\n legacyInteractionWhere: 'PLAY0564',\n ambiguousReference: 'PLAY0198',\n invalidImplementationBlock: 'PLAY0492',\n invalidImplementationHint: 'PLAY0493',\n conflictingImplementationSources: 'PLAY0494',\n eventSourceIdInPayload: 'PLAY0469',\n explicitProducesTargetsRequired: 'PLAY0470',\n redundantEventId: 'PLAY0471',\n invalidEventId: 'PLAY0472',\n inlineEventCollision: 'PLAY0473',\n inlineEventOutsideCommand: 'PLAY0474',\n inlineEventGeneration: 'PLAY0475',\n reservedProductionMetadata: 'PLAY0476',\n invalidEventDocumentation: 'PLAY0477',\n tabIndentation: 'PLAY0006',\n unknownPrimitiveType: 'PLAY0008',\n unknownSliceType: 'PLAY0028',\n duplicateCommandIdentifier: 'PLAY0036',\n unknownContextPath: 'PLAY0153',\n unknownContextCausedByProperty: 'PLAY0154',\n unknownContextIdentityProperty: 'PLAY0155',\n unclosedCodeBlock: 'PLAY0164',\n unknownType: 'PLAY0165',\n unknownEvent: 'PLAY0166',\n unknownPolicy: 'PLAY0167',\n duplicateDeclaration: 'PLAY0168',\n unknownEventContextMember: 'PLAY0295',\n unknownEventContextPath: 'PLAY0296',\n eventContextPathBelowCollection: 'PLAY0297',\n missingEventContextPath: 'PLAY0298',\n unresolvedDynamicKeySource: 'PLAY0299',\n invalidFileImport: 'PLAY0454',\n omittedProductionDestination: 'PLAY0478',\n legacyOptionalSuffix: 'PLAY0479',\n invalidOptionalModifierOrder: 'PLAY0480',\n optionalReadsNotSupported: 'PLAY0481',\n unavailableResponseExecution: 'PLAY0268',\n generatedPropertyOutsideCommand: 'PLAY0482',\n invalidGeneratedType: 'PLAY0483',\n invalidGeneratedModifierOrder: 'PLAY0484',\n generatedPropertyInput: 'PLAY0485',\n invalidCommandResponse: 'PLAY0486',\n invalidResponseSource: 'PLAY0487',\n duplicateResponseField: 'PLAY0488',\n invalidResponseShape: 'PLAY0489',\n invalidGeneratedFixture: 'PLAY0490',\n invalidReturnExpectation: 'PLAY0491',\n unknownGenerationStrategy: 'PLAY0672',\n invalidGenerationArgument: 'PLAY0673',\n invalidGenerationModifier: 'PLAY0674',\n duplicateGenerationModifier: 'PLAY0675',\n duplicateGeneration: 'PLAY0676',\n invalidGenerationPrimitive: 'PLAY0677',\n invalidGenerationPrefix: 'PLAY0678',\n invalidGenerationAlphabet: 'PLAY0679',\n invalidTypeIdPrefix: 'PLAY0680',\n generationSizeOutsideRange: 'PLAY0681',\n reservedSequenceGeneration: 'PLAY0682',\n lowGenerationEntropy: 'PLAY0683',\n lowGeneratedIdentifierEntropy: 'PLAY0684',\n} as const;\n\nexport type DiagnosticCode = (typeof diagnosticCodes)[keyof typeof diagnosticCodes];\n"],"mappings":"AAWA,MAAaA,EAAkB,CAC3B,uCAAwC,WACxC,2BAA4B,WAC5B,qBAAsB,WACtB,gBAAiB,WACjB,iBAAkB,WAClB,4BAA6B,WAC7B,4BAA6B,WAC7B,uBAAwB,WACxB,yBAA0B,WAC1B,2BAA4B,WAC5B,wBAAyB,WACzB,sBAAuB,WACvB,6BAA8B,WAC9B,6BAA8B,WAC9B,+BAAgC,WAChC,qBAAsB,WACtB,0BAA2B,WAC3B,2BAA4B,WAC5B,8BAA+B,WAC/B,2BAA4B,WAC5B,0BAA2B,WAC3B,2BAA4B,WAC5B,kBAAmB,WACnB,sBAAuB,WACvB,sBAAuB,WACvB,4BAA6B,WAC7B,uBAAwB,WACxB,wBAAyB,WACzB,sBAAuB,WACvB,qBAAsB,WACtB,qBAAsB,WACtB,wBAAyB,WACzB,wBAAyB,WACzB,qCAAsC,WACtC,0BAA2B,WAC3B,wBAAyB,WACzB,+BAAgC,WAChC,uBAAwB,WACxB,mBAAoB,WACpB,4BAA6B,WAC7B,4BAA6B,WAE7B,2BAA4B,WAC5B,uCAAwC,WACxC,yBAA0B,WAC1B,2BAA4B,WAC5B,yBAA0B,WAC1B,yBAA0B,WAC1B,2BAA4B,WAC5B,mCAAoC,WACpC,8BAA+B,WAC/B,wBAAyB,WACzB,0BAA2B,WAC3B,sCAAuC,WACvC,sCAAuC,WACvC,2BAA4B,WAC5B,oBAAqB,WACrB,uBAAwB,WACxB,0BAA2B,WAC3B,8BAA+B,WAC/B,yBAA0B,WAC1B,sBAAuB,WACvB,oCAAqC,WACrC,mBAAoB,WACpB,iBAAkB,WAClB,qBAAsB,WACtB,wBAAyB,WACzB,gCAAiC,WACjC,yBAA0B,WAC1B,0BAA2B,WAC3B,uBAAwB,WACxB,wBAAyB,WACzB,mBAAoB,WACpB,qBAAsB,WACtB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AsB,WACtB,4BAA6B,WAC7B,wBAAyB,WACzB,8BAA+B,WAC/B,6BAA8B,WAC9B,oCAAqC,WACrC,qBAAsB,WACtB,oCAAqC,WACrC,mCAAoC,WACpC,6BAA8B,WAC9B,qCAAsC,WACtC,6BAA8B,WAC9B,uBAAwB,WACxB,mBAAoB,WACpB,2BAA4B,WAC5B,0BAA2B,WAC3B,iCAAkC,WAClC,uBAAwB,WACxB,gCAAiC,WACjC,iBAAkB,WAClB,eAAgB,WAChB,qBAAsB,WACtB,0BAA2B,WAC3B,sBAAuB,WACvB,2BAA4B,WAC5B,0BAA2B,WAC3B,eAAgB,WAChB,qBAAsB,WACtB,iBAAkB,WAClB,2BAA4B,WAC5B,mBAAoB,WACpB,+BAAgC,WAChC,+BAAgC,WAChC,kBAAmB,WACnB,YAAa,WACb,aAAc,WACd,cAAe,WACf,qBAAsB,WACtB,0BAA2B,WAC3B,wBAAyB,WACzB,gCAAiC,WACjC,wBAAyB,WACzB,2BAA4B,WAC5B,kBAAmB,WACnB,6BAA8B,WAC9B,qBAAsB,WACtB,6BAA8B,WAC9B,0BAA2B,WAC3B,6BAA8B,WAC9B,gCAAiC,WACjC,qBAAsB,WACtB,8BAA+B,WAC/B,uBAAwB,WACxB,uBAAwB,WACxB,sBAAuB,WACvB,uBAAwB,WACxB,qBAAsB,WACtB,wBAAyB,WACzB,yBAA0B,WAC1B,0BAA2B,WAC3B,0BAA2B,WAC3B,0BAA2B,WAC3B,4BAA6B,WAC7B,oBAAqB,WACrB,2BAA4B,WAC5B,wBAAyB,WACzB,0BAA2B,WAC3B,oBAAqB,WACrB,2BAA4B,WAC5B,2BAA4B,WAC5B,qBAAsB,WACtB,8BAA+B,UACnC"}
@@ -0,0 +1,2 @@
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{conceptItems as e}from"./completion-items.js";function generationCompletions(t,n,r){let i=t.slice(0,n).reverse().find(e=>/^\s*concept\s+[^\s:]+\s*:\s*\w+/.test(e))?.match(/:\s*(\w+)/)?.[1];if(/^\s*generate\s+\w*$/.test(r)){let t=i===`Uuid`?[`uuid`,`uuidv7`]:i===`Int`?[`random`]:i===`String`?[`uuid`,`uuidv7`,`ulid`,`typeid`,`nanoid`,`bytes`,`pattern`,`rule`]:[];return e.filter(e=>t.includes(e.label.slice(9))).map(e=>({...e,label:e.label.slice(9),insertText:e.insertText.slice(9)}))}let a=r.match(/^\s*generate\s+(\w+)\s+/)?.[1];if(!a)return null;let o=r.replace(/"(?:[^"\\]|\\.)*"/g,``);if(o.includes(`"`))return[];if(a===`bytes`&&!/\b(base64url|hex|base32)\b/.test(o))return[`base64url`,`hex`,`base32`].map(e=>({label:e,insertText:e,documentation:`RFC 4648 without padding; exact byte count and zero unused trailing bits.`}));let s=[];return i===`String`&&[`uuid`,`uuidv7`,`ulid`,`nanoid`,`bytes`].includes(a)&&s.push({label:`prefix`,insertText:'prefix "${1:ref_}"',documentation:`At most 32 printable ASCII characters; adds no random bits.`}),(a===`ulid`||i===`String`&&[`uuid`,`uuidv7`].includes(a)||a===`bytes`&&/\b(hex|base32)\b/.test(o))&&s.push({label:`case`,insertText:"case ${1|lower,upper|}",documentation:`Changes the encoded portion only; never the prefix.`}),a===`nanoid`&&s.push({label:`alphabet`,insertText:'alphabet "${1:abcdef0123456789}"',documentation:`2..256 distinct printable ASCII characters; bits = size × log2(alphabet size).`}),a===`pattern`&&s.push({label:`checksum`,insertText:"checksum ${1|luhn,mod11,mod97|}",documentation:`Parsed, not yet executable (#616 phase 3).`}),s.filter(e=>!RegExp(`\\b${e.label}\\b`).test(o))}export{generationCompletions};
2
+ //# sourceMappingURL=generation-completions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generation-completions.js","names":["primitive","lines","lineIndex","line","textBefore","allowed","conceptItems","item","strategy","outsideStrings","encoding","entries","entry"],"sources":["../../generation-completions.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { conceptItems, CompletionEntry } from './completion-items';\n\nexport function generationCompletions(lines: string[], lineIndex: number, textBefore: string): CompletionEntry[] | null {\n const header = lines.slice(0, lineIndex).reverse().find(line => /^\\s*concept\\s+[^\\s:]+\\s*:\\s*\\w+/.test(line));\n const primitive = header?.match(/:\\s*(\\w+)/)?.[1];\n if (/^\\s*generate\\s+\\w*$/.test(textBefore)) {\n const allowed = primitive === 'Uuid' ? ['uuid', 'uuidv7'] : primitive === 'Int' ? ['random'] : primitive === 'String' ? ['uuid', 'uuidv7', 'ulid', 'typeid', 'nanoid', 'bytes', 'pattern', 'rule'] : [];\n return conceptItems.filter(item => allowed.includes(item.label.slice('generate '.length))).map(item => ({ ...item, label: item.label.slice('generate '.length), insertText: item.insertText.slice('generate '.length) }));\n }\n const strategy = textBefore.match(/^\\s*generate\\s+(\\w+)\\s+/)?.[1];\n if (!strategy) return null;\n const outsideStrings = textBefore.replace(/\"(?:[^\"\\\\]|\\\\.)*\"/g, '');\n if (outsideStrings.includes('\"')) return [];\n if (strategy === 'bytes' && !/\\b(base64url|hex|base32)\\b/.test(outsideStrings)) {\n return ['base64url', 'hex', 'base32'].map(encoding => ({ label: encoding, insertText: encoding, documentation: 'RFC 4648 without padding; exact byte count and zero unused trailing bits.' }));\n }\n const entries: CompletionEntry[] = [];\n if (primitive === 'String' && ['uuid', 'uuidv7', 'ulid', 'nanoid', 'bytes'].includes(strategy)) entries.push({ label: 'prefix', insertText: 'prefix \"${1:ref_}\"', documentation: 'At most 32 printable ASCII characters; adds no random bits.' });\n if (strategy === 'ulid' || (primitive === 'String' && ['uuid', 'uuidv7'].includes(strategy)) || (strategy === 'bytes' && /\\b(hex|base32)\\b/.test(outsideStrings))) entries.push({ label: 'case', insertText: 'case ${1|lower,upper|}', documentation: 'Changes the encoded portion only; never the prefix.' });\n if (strategy === 'nanoid') entries.push({ label: 'alphabet', insertText: 'alphabet \"${1:abcdef0123456789}\"', documentation: '2..256 distinct printable ASCII characters; bits = size × log2(alphabet size).' });\n if (strategy === 'pattern') entries.push({ label: 'checksum', insertText: 'checksum ${1|luhn,mod11,mod97|}', documentation: 'Parsed, not yet executable (#616 phase 3).' });\n return entries.filter(entry => !new RegExp(`\\\\b${entry.label}\\\\b`).test(outsideStrings));\n}\n"],"mappings":"sGAKA,SAAgB,sBAAsB,EAAiB,EAAmB,EAA8C,CAEpH,IAAMA,EADSC,EAAM,MAAM,EAAGC,CAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAQ,kCAAkC,KAAKC,CAAI,CACpF,CAAC,EAAE,MAAM,WAAW,CAAC,GAAG,GAC/C,GAAI,sBAAsB,KAAKC,CAAU,EAAG,CACxC,IAAMC,EAAUL,IAAc,OAAS,CAAC,OAAQ,QAAQ,EAAIA,IAAc,MAAQ,CAAC,QAAQ,EAAIA,IAAc,SAAW,CAAC,OAAQ,SAAU,OAAQ,SAAU,SAAU,QAAS,UAAW,MAAM,EAAI,CAAC,EACtM,OAAOM,EAAa,OAAO,GAAQD,EAAQ,SAASE,EAAK,MAAM,MAAM,CAAkB,CAAC,CAAC,CAAC,CAAC,IAAI,IAAS,CAAE,GAAGA,EAAM,MAAOA,EAAK,MAAM,MAAM,CAAkB,EAAG,WAAYA,EAAK,WAAW,MAAM,CAAkB,CAAE,EAAE,CAC5N,CACA,IAAMC,EAAWJ,EAAW,MAAM,yBAAyB,CAAC,GAAG,GAC/D,GAAI,CAACI,EAAU,OAAO,KACtB,IAAMC,EAAiBL,EAAW,QAAQ,qBAAsB,EAAE,EAClE,GAAIK,EAAe,SAAS,GAAG,EAAG,MAAO,CAAC,EAC1C,GAAID,IAAa,SAAW,CAAC,6BAA6B,KAAKC,CAAc,EACzE,MAAO,CAAC,YAAa,MAAO,QAAQ,CAAC,CAAC,IAAI,IAAa,CAAE,MAAOC,EAAU,WAAYA,EAAU,cAAe,2EAA4E,EAAE,EAEjM,IAAMC,EAA6B,CAAC,EAKpC,OAJIX,IAAc,UAAY,CAAC,OAAQ,SAAU,OAAQ,SAAU,OAAO,CAAC,CAAC,SAASQ,CAAQ,GAAGG,EAAQ,KAAK,CAAE,MAAO,SAAU,WAAY,qBAAsB,cAAe,6DAA8D,CAAC,GAC5OH,IAAa,QAAWR,IAAc,UAAY,CAAC,OAAQ,QAAQ,CAAC,CAAC,SAASQ,CAAQ,GAAOA,IAAa,SAAW,mBAAmB,KAAKC,CAAc,IAAIE,EAAQ,KAAK,CAAE,MAAO,OAAQ,WAAY,yBAA0B,cAAe,qDAAsD,CAAC,EACzSH,IAAa,UAAUG,EAAQ,KAAK,CAAE,MAAO,WAAY,WAAY,mCAAoC,cAAe,gFAAiF,CAAC,EAC1MH,IAAa,WAAWG,EAAQ,KAAK,CAAE,MAAO,WAAY,WAAY,kCAAmC,cAAe,4CAA6C,CAAC,EACnKA,EAAQ,OAAO,GAAS,CAAK,OAAO,MAAMC,EAAM,MAAM,IAAI,CAAC,CAAC,KAAKH,CAAc,CAAC,CAC3F"}
@@ -1,6 +1,6 @@
1
- import"./_virtual/_virtual/_rolldown/runtime.js";import{typeReferenceText as e}from"./TypeReferenceSymbol.js";import{enclosingChain as t,enclosingHeaders as n,fenceMap as r,indentOf as i,withoutComment as a}from"./document-context.js";import{eventAnalysisSource as o}from"./event-analysis-source.js";import{responseAnalysis as s,responseAvailability as c}from"./response-analysis.js";import{directBody as ee,propertyTypeReference as l,scanDocument as u,symbolsForBuffer as d}from"./symbols.js";import{exampleHover as f}from"./example-authoring.js";import{operationHover as p}from"./operation-authoring.js";import{eventSourceHover as m}from"./event-source-authoring.js";import{refusalContext as h}from"./refusal-context.js";import{namedRuleContext as g}from"./named-rule-context.js";import{getSubLanguage as te}from"./sub-language-registry.js";import{reactionReferenceAt as ne}from"./reaction-authoring.js";import{attributeDocs as re,contextVariableDocs as _,handlerIntentDocs as v,keywordDocs as y,specialCategoryDocs as b,specificationKeywordDocs as x}from"./keyword-docs.js";function hoverContent(S,C,w,T,E,D){let O=r(S);if(O[C])return null;let k=S[C]??``;if(E-1>a(k).length)return null;let A=!1,j=!1;for(let e=0;e<T-1;e++)k[e]===`\\`&&A?e++:k[e]===`"`&&!j?A=!A:k[e]==="`"&&!A&&(j=!j);if(A||j)return null;let M=ne(S,C,T,E,D);if(M)return M.content;let N=f(S,C,T,E,D);if(N)return N;let P=m(S,C,T,E,D);if(P)return P;let F=p(S,C,T,E,D);if(F)return F;let tokenAt=(e,t)=>{let n=e+ +(k[e-1]===`@`);return w===t&&T===n&&E===n+t.length&&k.slice(n-1,E-1)===t},I=k.charAt(T-2);if(w===`authorization`&&t(S,O,C,i(k))[0]===`purpose`)return`A quoted authorization in law for criminal-offence data (Art. 10).`;let L=/^\s*concept\s+[^\s:]+\s*:\s*\w+\s+/.exec(k),R=t(S,O,C,i(k))[0]===`concept`&&/^\s*(?:@?pii|personal|@?sensitive|secret)\s+(?:reason|scope|special|criminal)\b/.test(k);if(L!==null&&T-1>=L[0].length-1||R){let e=re[w];if(e)return e;if(Object.hasOwn(b,w)&&/^\s*(?:@?pii|personal)\s+special\s+/.test(k))return`**${w}** — ${b[w]}`;if(w===`special`)return`GDPR Art. 9(1) special category; requires pii. At most one category per concept.`;if(w===`criminal`)return`Personal data relating to criminal convictions and offenses (GDPR Art. 10); requires pii.`;if(/^\s*(?:secret|sensitive|@sensitive)\s+scope\s+/.test(k)&&[`subject`,`namespace`,`global`].includes(w))return`**${w}** — Secret encryption scope${w===`subject`?` per data subject`:w===`namespace`?` per tenant namespace`:` shared globally`}. Not an event-property subject role.`;if(w===`scope`)return`Secret encryption scope: subject, namespace or global. Omitted scope keeps Chronicle’s Subject default; pii secret renders only [PII].`}if(I===`$`||I===`.`){let e=k.substring(0,E-1).match(/\$[\w.]*$/)?.[0];if(e){if(e.startsWith(`$refusal`)){let t=h(S,C,i(k)),n=e.substring(9),r={reason:`Refusal kind as a String: validation, constraint or authorization.`,message:`Rejection details verbatim, including unresolved $strings keys.`,constraint:`Violated constraint name as a String, only in a by constraint branch.`};return t!==void 0&&r[n]!==void 0?`**${e}** — ${r[n]} Syntax-only, not yet executable (PLAY0268).`:null}if(e.startsWith(`$identity.`)){let t=e.substring(10).split(`.`)[0],n=d(S,D).identityDetails?.find(e=>e.name===t);if(n)return`**$identity.${n.name}** — ${n.type}. Declared caller detail; authoring metadata only, not executable until admitted (#600).`}let t=_[e]??(e.startsWith(`$env`)?_.$env:void 0);if(t)return t}}let z=k.slice(0,T-1),B=/^\s*(?:by|filter)\s+/.test(z)?/^\s*(?:by|filter)\s+[a-z_]\w*\s+[\w.]+(?:\[\])?\s+$/.test(z):/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?\s+$/.test(z),V=/^\s*query\s+\w+\s*=>\s*(?:observable\s+)?[\w.]+(?:\[\])?\s+$/.test(z)&&!/^\s*query\s+\w+\s*=>\s*observable\s+$/.test(z);if(w===`subject`){let e=o(S),r=/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?(?:\?|\s+optional)?(?:\s+generated)?(?:\s+identifier)?\s+$/.test(z),a=t(e,O,C,i(k));return r&&(a[0]===`event`||/^produces\s+event\s+/.test(n(e,O,C,i(k))[0]??``))?`**subject** — This event property identifies its one data subject instead of the event source (decision 0008). Required scalar String, Uuid or their concepts, or an Int-backed concept; never pii or secret. Report-only lineage metadata (PLAY0270); no ESM bytes or provider output yet.`:/\bclaim\s+"(?:[^"\\]|\\.)*"\s+matches\s+$/.test(z)&&a.includes(`policy`)?`**subject** — ${y.subject}`:null}if(w===`optional`&&(B||V))return`**optional** — ${y.optional}`;if(w===`implementation`||w===`hint`){let e=t(S,O,C,i(k)),n=g(S,C,i(k));if(w===`implementation`&&n===`rule`&&/^\s*implementation\s*$/.test(a(k))||w===`hint`&&n===`implementation`&&/^\s*hint\s+"/.test(k))return`**${w}** — Command named-rule guidance with at most one file or tagged fence. No payload means pending and fails binding (PLAY0268). Attached predicates keep their existing pure RuleContext contract; reference execution is unsupported, never confirmation.`;if(w===`implementation`&&e[0]===`handler`&&/^\s*implementation\s*$/.test(a(k)))return`**implementation** — ${v.implementation}`;if(w===`hint`&&e[0]===`implementation`&&e[1]===`handler`&&/^\s*hint\s+"/.test(k))return`**hint** — ${v.hint}`}let H=u(S),U=H.commands.filter(e=>e.line<C).at(-1),W=U?.properties.find(e=>e.name===w&&e.line===C);if(W?.isGenerated||w===`generated`&&U?.properties.some(e=>e.isGenerated&&e.line===C)&&B)return`**${W?.name??`generated`}** — ${W?e(l(W))+`. `:``}Generated value, not a request or form input. ${c}`;let G=U?.response;if(G?.location.line===C+1&&(tokenAt(G.location.column,`returns`)||G.kind===`ScalarCommandResponseSyntax`&&tokenAt(G.source.location.column,G.source.property))){let t=G.kind===`ScalarCommandResponseSyntax`?U?.properties.find(e=>e.name===G.source.property):void 0;return`**returns**${t?` — ${e(l(t))}`:` — unnamed record response`}. ${c}`}if(G?.kind===`RecordCommandResponseSyntax`){let t=G.fields.find(e=>e.location.line===C+1&&(tokenAt(e.location.column,e.name)||tokenAt(e.source.location.column,e.source.property)));if(t){let n=U?.properties.find(e=>e.name===t.source.property),r=t.type?e(t.type):n?e(l(n)):`Unresolved type`;return`**${t.name}** — ${r}${t.type?` (explicit)`:` (inferred)`} = ${t.source.property}. ${n?.isGenerated?`Generated source, not request input. `:``}${c}`}}for(let e of s(S).specifications.values())if(w===`returns`&&e.thenReturns?.location.line===C+1||w===`generated`&&e.when?.generatedValues?.some(e=>e.location.line===C+1))return c;let K=H.concepts.find(e=>e.name===w);if(K){let e=K.attributes.length?` ${K.attributes.join(` `)}`:``,t=K.enumValues.length?`\n\nValues: ${K.enumValues.map((e,t)=>K.enumNumbers===void 0?e:`${e} = ${K.enumNumbers[t]}`).join(`, `)}`:``,n=Object.entries(K.attributeReasons).map(([e,t])=>`\n\n**@${e}** — ${t}`).join(``);return`\`\`\`screenplay\nconcept ${K.name} : ${K.primitive}${e}\n\`\`\`${n}${t}`}let q=H.types.find(e=>e.name===w);if(q){let t=q.properties.map(t=>`${t.name} ${e(l(t))}`).join(`
2
- `);return`\`\`\`screenplay\ntype ${q.name}\n${t}\n\`\`\``}let J=H.policies.find(e=>e.name===w);if(J){let e=J.requires.length?J.requires.join(`
3
- `):`(custom C#)`;return`\`\`\`screenplay\npolicy ${J.name}\n${e}\n\`\`\``}let Y=H.events.find(e=>e.name===w&&e.line===C)??H.events.filter(e=>e.name===w).sort((e,t)=>(t.generation??1)-(e.generation??1))[0];if(Y){let t=Y.properties.map(t=>`${t.name} ${e(l(t))}${t.isSubject?` subject`:``}`).join(`
4
- `);return`\`\`\`screenplay\n${Y.visibility===`Public`?`public `:``}event ${Y.name}${Y.generation===void 0?``:` generation ${Y.generation}`}${Y.origin===void 0?``:` from ${JSON.stringify(Y.origin)}`}\n${t}\n\`\`\``}let X=H.commands.find(e=>e.name===w);if(X&&X.properties.length>0){let t=X.properties.map(t=>`${t.name} ${e(l(t))}${t.isGenerated?` generated`:``}${t.isIdentifier?` identifier`:``}`).join(`
5
- `);return`\`\`\`screenplay\ncommand ${X.name}\n${t}\n\`\`\`${X.response||X.properties.some(e=>e.isGenerated)?`\n\n${c}`:``}`}let Z=t(S,O,C,i(k));for(let e of[k.trim().split(/\s+/)[0],...Z]){let t=te(e??``)?.hovers?.[w];if(t)return t}if(w===`reads`&&(Z[0]===`every`||Z[0]===`at`)&&Z.includes(`reaction`))return"**reads** — Declares a whole view this clock trigger consults: `reads <View>`. Clock triggers take no values, so `by` is unavailable.";let Q=k.trim().match(/^(given|when|then)\s+(?:no\s+)?(\w+)/);if(Q&&Q[2]===w&&Z[0]===`specification`&&x[w])return`**${w}** — ${x[w]}`;if(w===`id`||w===`documentation`){let e=o(S),t=H.events.some(t=>ee(e,O,t.line,i(e[t.line])).includes(C)),n=w===`id`?/^\s*id\s+"/.test(e[C]):/^\s*documentation\s*$/.test(e[C]);if(!(t||w===`documentation`&&[`module`,`feature`,`slice`,`command`,`readmodel`,`reaction`].includes(Z[0]))||!n||T!==i(k)+1)return null}if(w===`optional`||w===`generated`||w===`returns`)return null;let $=y[w];return $?`**${w}** — ${$}`:null}export{hoverContent};
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{typeReferenceText as e}from"./TypeReferenceSymbol.js";import{enclosingChain as t,enclosingHeaders as n,fenceMap as r,indentOf as i,withoutComment as a}from"./document-context.js";import{eventAnalysisSource as o}from"./event-analysis-source.js";import{responseAnalysis as s,responseAvailability as c}from"./response-analysis.js";import{directBody as l,propertyTypeReference as u,scanDocument as d,symbolsForBuffer as ee}from"./symbols.js";import{exampleHover as te}from"./example-authoring.js";import{operationHover as f}from"./operation-authoring.js";import{eventSourceHover as ne}from"./event-source-authoring.js";import{refusalContext as p}from"./refusal-context.js";import{namedRuleContext as m}from"./named-rule-context.js";import{getSubLanguage as h}from"./sub-language-registry.js";import{reactionReferenceAt as g}from"./reaction-authoring.js";import{attributeDocs as _,contextVariableDocs as v,handlerIntentDocs as y,keywordDocs as b,specialCategoryDocs as x,specificationKeywordDocs as S}from"./keyword-docs.js";function hoverContent(C,w,T,E,D,O){let k=r(C);if(k[w])return null;let A=C[w]??``;if(D-1>a(A).length)return null;let j=!1,M=!1;for(let e=0;e<E-1;e++)A[e]===`\\`&&j?e++:A[e]===`"`&&!M?j=!j:A[e]==="`"&&!j&&(M=!M);if(j||M)return null;let N=g(C,w,E,D,O);if(N)return N.content;let P=te(C,w,E,D,O);if(P)return P;let F=ne(C,w,E,D,O);if(F)return F;let I=f(C,w,E,D,O);if(I)return I;let tokenAt=(e,t)=>{let n=e+ +(A[e-1]===`@`);return T===t&&E===n&&D===n+t.length&&A.slice(n-1,D-1)===t},L=A.charAt(E-2);if(T===`authorization`&&t(C,k,w,i(A))[0]===`purpose`)return`A quoted authorization in law for criminal-offence data (Art. 10).`;if(t(C,k,w,i(A))[0]===`concept`&&/^\s*generate\b/.test(A)){let e={generate:`The concept declares how; a command property declares generated. ESM v15 checks fixture shape and guards generated event sources against existing facts.`,uuid:`Random UUID v4, 122 random bits; about 3.27 × 10^17 values at 1% collision probability.`,uuidv7:`Time-ordered UUID v7, 74 random bits; about 1.95 × 10^10 values at 1% collision probability. Exposes time; not monotonic within a millisecond.`,ulid:`26 Crockford base32 characters (uppercase by default), 80 random bits; about 1.56 × 10^11 values at 1% collision probability.`,typeid:`TypeID 0.3: lowercase UUIDv7 base32 with a 0..63-character prefix. 74 random bits; empty prefix has no separator.`,nanoid:`Default 21 characters over 64 symbols: 126 random bits. Custom entropy = size × log2(alphabet size).`,bytes:`8 × count random bits; base64url, hex or base32 without padding. RFC 4648 unused trailing bits must be zero.`,prefix:`Printable ASCII prefix, at most 32 characters. UUID prefixes require a String concept; TypeID uses its own argument.`,alphabet:`NanoID only: 2..256 distinct printable ASCII characters.`,case:`lower or upper for String UUIDs, ULID, hex/base32 bytes. Never base64url, NanoID or TypeID.`,pattern:`Parsed, not yet executable (#616 phase 3).`,random:`Parsed, not yet executable (#616 phase 3).`,rule:`Parsed, not yet executable (#616 phase 3).`,sequence:`Reserved; binding refuses it until #619 is admitted.`};if(e[T])return e[T]}let R=/^\s*concept\s+[^\s:]+\s*:\s*\w+\s+/.exec(A),z=t(C,k,w,i(A))[0]===`concept`&&/^\s*(?:@?pii|personal|@?sensitive|secret)\s+(?:reason|scope|special|criminal)\b/.test(A);if(R!==null&&E-1>=R[0].length-1||z){let e=_[T];if(e)return e;if(Object.hasOwn(x,T)&&/^\s*(?:@?pii|personal)\s+special\s+/.test(A))return`**${T}** — ${x[T]}`;if(T===`special`)return`GDPR Art. 9(1) special category; requires pii. At most one category per concept.`;if(T===`criminal`)return`Personal data relating to criminal convictions and offenses (GDPR Art. 10); requires pii.`;if(/^\s*(?:secret|sensitive|@sensitive)\s+scope\s+/.test(A)&&[`subject`,`namespace`,`global`].includes(T))return`**${T}** — Secret encryption scope${T===`subject`?` per data subject`:T===`namespace`?` per tenant namespace`:` shared globally`}. Not an event-property subject role.`;if(T===`scope`)return`Secret encryption scope: subject, namespace or global. Omitted scope keeps Chronicle’s Subject default; pii secret renders only [PII].`}if(L===`$`||L===`.`){let e=A.substring(0,D-1).match(/\$[\w.]*$/)?.[0];if(e){if(e.startsWith(`$refusal`)){let t=p(C,w,i(A)),n=e.substring(9),r={reason:`Refusal kind as a String: validation, constraint or authorization.`,message:`Rejection details verbatim, including unresolved $strings keys.`,constraint:`Violated constraint name as a String, only in a by constraint branch.`};return t!==void 0&&r[n]!==void 0?`**${e}** — ${r[n]} Syntax-only, not yet executable (PLAY0268).`:null}if(e.startsWith(`$identity.`)){let t=e.substring(10).split(`.`)[0],n=ee(C,O).identityDetails?.find(e=>e.name===t);if(n)return`**$identity.${n.name}** — ${n.type}. Declared caller detail; authoring metadata only, not executable until admitted (#600).`}let t=v[e]??(e.startsWith(`$env`)?v.$env:void 0);if(t)return t}}let B=A.slice(0,E-1),V=/^\s*(?:by|filter)\s+/.test(B)?/^\s*(?:by|filter)\s+[a-z_]\w*\s+[\w.]+(?:\[\])?\s+$/.test(B):/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?\s+$/.test(B),re=/^\s*query\s+\w+\s*=>\s*(?:observable\s+)?[\w.]+(?:\[\])?\s+$/.test(B)&&!/^\s*query\s+\w+\s*=>\s*observable\s+$/.test(B);if(T===`subject`){let e=o(C),r=/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?(?:\?|\s+optional)?(?:\s+generated)?(?:\s+identifier)?\s+$/.test(B),a=t(e,k,w,i(A));return r&&(a[0]===`event`||/^produces\s+event\s+/.test(n(e,k,w,i(A))[0]??``))?`**subject** — This event property identifies its one data subject instead of the event source (decision 0008). Required scalar String, Uuid or their concepts, or an Int-backed concept; never pii or secret. Report-only lineage metadata (PLAY0270); no ESM bytes or provider output yet.`:/\bclaim\s+"(?:[^"\\]|\\.)*"\s+matches\s+$/.test(B)&&a.includes(`policy`)?`**subject** — ${b.subject}`:null}if(T===`optional`&&(V||re))return`**optional** — ${b.optional}`;if(T===`implementation`||T===`hint`){let e=t(C,k,w,i(A)),n=m(C,w,i(A));if(T===`implementation`&&n===`rule`&&/^\s*implementation\s*$/.test(a(A))||T===`hint`&&n===`implementation`&&/^\s*hint\s+"/.test(A))return`**${T}** — Command named-rule guidance with at most one file or tagged fence. No payload means pending and fails binding (PLAY0268). Attached predicates keep their existing pure RuleContext contract; reference execution is unsupported, never confirmation.`;if(T===`implementation`&&e[0]===`handler`&&/^\s*implementation\s*$/.test(a(A)))return`**implementation** — ${y.implementation}`;if(T===`hint`&&e[0]===`implementation`&&e[1]===`handler`&&/^\s*hint\s+"/.test(A))return`**hint** — ${y.hint}`}let H=d(C),U=H.commands.filter(e=>e.line<w).at(-1),W=U?.properties.find(e=>e.name===T&&e.line===w);if(W?.isGenerated||T===`generated`&&U?.properties.some(e=>e.isGenerated&&e.line===w)&&V)return`**${W?.name??`generated`}** — ${W?e(u(W))+`. `:``}Generated value, not a request or form input. ${c}`;let G=U?.response;if(G?.location.line===w+1&&(tokenAt(G.location.column,`returns`)||G.kind===`ScalarCommandResponseSyntax`&&tokenAt(G.source.location.column,G.source.property))){let t=G.kind===`ScalarCommandResponseSyntax`?U?.properties.find(e=>e.name===G.source.property):void 0;return`**returns**${t?` — ${e(u(t))}`:` — unnamed record response`}. ${c}`}if(G?.kind===`RecordCommandResponseSyntax`){let t=G.fields.find(e=>e.location.line===w+1&&(tokenAt(e.location.column,e.name)||tokenAt(e.source.location.column,e.source.property)));if(t){let n=U?.properties.find(e=>e.name===t.source.property),r=t.type?e(t.type):n?e(u(n)):`Unresolved type`;return`**${t.name}** — ${r}${t.type?` (explicit)`:` (inferred)`} = ${t.source.property}. ${n?.isGenerated?`Generated source, not request input. `:``}${c}`}}for(let e of s(C).specifications.values())if(T===`returns`&&e.thenReturns?.location.line===w+1||T===`generated`&&e.when?.generatedValues?.some(e=>e.location.line===w+1))return c;let K=H.concepts.find(e=>e.name===T);if(K){let e=K.attributes.length?` ${K.attributes.join(` `)}`:``,t=K.enumValues.length?`\n\nValues: ${K.enumValues.map((e,t)=>K.enumNumbers===void 0?e:`${e} = ${K.enumNumbers[t]}`).join(`, `)}`:``,n=Object.entries(K.attributeReasons).map(([e,t])=>`\n\n**@${e}** — ${t}`).join(``);return`\`\`\`screenplay\nconcept ${K.name} : ${K.primitive}${e}\n\`\`\`${n}${t}`}let q=H.types.find(e=>e.name===T);if(q){let t=q.properties.map(t=>`${t.name} ${e(u(t))}`).join(`
2
+ `);return`\`\`\`screenplay\ntype ${q.name}\n${t}\n\`\`\``}let J=H.policies.find(e=>e.name===T);if(J){let e=J.requires.length?J.requires.join(`
3
+ `):`(custom C#)`;return`\`\`\`screenplay\npolicy ${J.name}\n${e}\n\`\`\``}let Y=H.events.find(e=>e.name===T&&e.line===w)??H.events.filter(e=>e.name===T).sort((e,t)=>(t.generation??1)-(e.generation??1))[0];if(Y){let t=Y.properties.map(t=>`${t.name} ${e(u(t))}${t.isSubject?` subject`:``}`).join(`
4
+ `);return`\`\`\`screenplay\n${Y.visibility===`Public`?`public `:``}event ${Y.name}${Y.generation===void 0?``:` generation ${Y.generation}`}${Y.origin===void 0?``:` from ${JSON.stringify(Y.origin)}`}\n${t}\n\`\`\``}let X=H.commands.find(e=>e.name===T);if(X&&X.properties.length>0){let t=X.properties.map(t=>`${t.name} ${e(u(t))}${t.isGenerated?` generated`:``}${t.isIdentifier?` identifier`:``}`).join(`
5
+ `);return`\`\`\`screenplay\ncommand ${X.name}\n${t}\n\`\`\`${X.response||X.properties.some(e=>e.isGenerated)?`\n\n${c}`:``}`}let Z=t(C,k,w,i(A));for(let e of[A.trim().split(/\s+/)[0],...Z]){let t=h(e??``)?.hovers?.[T];if(t)return t}if(T===`reads`&&(Z[0]===`every`||Z[0]===`at`)&&Z.includes(`reaction`))return"**reads** — Declares a whole view this clock trigger consults: `reads <View>`. Clock triggers take no values, so `by` is unavailable.";let Q=A.trim().match(/^(given|when|then)\s+(?:no\s+)?(\w+)/);if(Q&&Q[2]===T&&Z[0]===`specification`&&S[T])return`**${T}** — ${S[T]}`;if(T===`id`||T===`documentation`){let e=o(C),t=H.events.some(t=>l(e,k,t.line,i(e[t.line])).includes(w)),n=T===`id`?/^\s*id\s+"/.test(e[w]):/^\s*documentation\s*$/.test(e[w]);if(!(t||T===`documentation`&&[`module`,`feature`,`slice`,`command`,`readmodel`,`reaction`].includes(Z[0]))||!n||E!==i(A)+1)return null}if(T===`optional`||T===`generated`||T===`returns`)return null;let $=b[T];return $?`**${T}** — ${$}`:null}export{hoverContent};
6
6
  //# sourceMappingURL=hover-content.js.map