@cratis/screenplay-language 4.123.0 → 4.124.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.
- package/dist/bundles/chunk-7GSRLVHB.js +42 -0
- package/dist/bundles/chunk-7GSRLVHB.js.map +7 -0
- package/dist/bundles/index.js +2 -2
- package/dist/bundles/index.js.map +2 -2
- package/dist/bundles/sub-languages/projection/index.js +1 -1
- package/dist/completion-items.d.ts.map +1 -1
- package/dist/diagnostic-codes.d.ts +6 -0
- package/dist/diagnostic-codes.d.ts.map +1 -1
- package/dist/keyword-docs.d.ts.map +1 -1
- package/dist/language.d.ts.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/bundles/chunk-4CLLEMBX.js +0 -42
- package/dist/bundles/chunk-4CLLEMBX.js.map +0 -7
package/dist/bundles/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as Mt,$a as Be,A as V,Aa as on,B as re,Ba as rn,C as Oe,Ca as ze,D as $t,Da as an,E as Me,Ea as sn,F as Kn,Fa as cn,G as Qn,Ga as ln,H as Jn,Ha as un,I as Xn,Ia as mn,Ja as eo,Ka as pn,L as xt,La as z,M as kt,Ma as R,N as St,Na as to,O as Ct,Oa as no,P as Tt,Pa as oo,Q as At,Qa as ro,R as Dt,Ra as H,S as Pt,Sa as $e,T as It,Ta as Z,U as Lt,Ua as io,V as Rt,Va as N,W as Et,Wa as _e,X as qt,Xa as ao,Y as Ot,Ya as Fe,Z as ye,Za as so,_ as be,_a as co,a as B,aa as Ne,ab as lo,b as gt,ba as Nt,bb as uo,c as he,ca as ie,cb as mo,d as Re,da as ve,db as po,e as le,ea as we,eb as fo,f as Wn,fa as jt,fb as He,g as Gn,ga as zt,h as Ee,ha as _t,i as ee,ia as Ft,j as Vn,ja as Bt,k as Zn,ka as ae,l as yt,la as Ht,m as G,ma as Ut,n as qe,na as Wt,o as D,oa as Gt,p as ge,pa as Vt,q as te,qa as Zt,r as ne,ra as Yt,s as bt,sa as Kt,t as vt,ta as Qt,u as wt,ua as Jt,v as T,va as Xt,w as $,wa as je,x as Yn,xa as en,y as I,ya as tn,z as M,za as nn}from"./chunk-4CLLEMBX.js";import{a as d}from"./chunk-AYDF3IFZ.js";var fn=new Set(["operation","system","eventsource","purpose"]),Ue={csharp:"csharp",typescript:"typescript",react:"typescript",html:"html",sql:"sql"};function dn(t){return`subLanguage_${t}`}d(dn,"subLanguageState");function ho(t){let n=[...he.filter(e=>!fn.has(e)),...t.map(e=>e.keyword)];return[new RegExp(`^\\s*(?:${n.join("|")})\\b`),{token:"@rematch",next:"@pop"}]}d(ho,"subLanguageExitRule");var go=[[/\/\/.*$/,"comment"],[/\$(?:context|identity|eventContext|eventSourceId|causedBy|refusal)(?:\.\w+)*/,"variable.predefined"],[/\$(?:env|secrets|strings)\.[\w.]+/,"variable.predefined"],[/\$\.[\w.]*/,"variable.predefined"],[/"(?:[^"\\]|\\.)*"/,"string"],[/"(?:[^"\\]|\\.)*$/,"string.invalid"],[/\d+(?:ms|s|m|h|d)\b/,"number"],[/-?\d+\.\d+/,"number.float"],[/-?\d+/,"number"],[/=>|==|!=|>=|<=|[><=:?]/,"operator"],[/[[\](),.]/,"delimiter"],[/\s+/,"white"]];function hn(t){let n={root:[[new RegExp(`^(\\s*)(example)(\\s+)([A-Z][${G}]*)(\\s*)(:)(\\s*)([A-Z][${G}.]*)(?=\\s*(?://.*)?$)`),["white","keyword","white","type.identifier","white","operator","white","type.identifier"]],[/^(\s*)(direction)(\s+)(inbound|outbound)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword"]],[new RegExp(`^()(purpose)(\\s+)([A-Za-z_][${G}]*)(?=\\s*(?://.*)?$)`),["white","keyword","white",{token:"type.identifier",next:"@purposeBody.$1"}]],[/^(\s*)(parameter)(\s+)([a-z_]\w*)(\s+)([\w.]+(?:\[\])?(?:\s+optional)?)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","identifier","white","type.identifier"]],[/^(\s*)(case)(\s+)([A-Za-z_]\w*)(?=\s*(?:[a-z_]\w*\s*=|\/\/|$))/,["white","keyword","white","type.identifier"]],[/\b(case)(\.)([a-z_]\w*)\b/,["keyword","delimiter","identifier"]],[/^(\s*)(concept)(\s+)([^\s:]+)(\s*:\s*)(\w+)((?:\s+(?:@?pii|personal|@?sensitive|secret))*)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","type.identifier","operator",{token:"type.identifier",next:"@conceptBody.$1"},"keyword"]],[/^(numbers)([ \t]+)(exact)(?=[ \t]*(?:(?:\/\/|#).*)?$)/,["keyword","white","keyword"]],[/^(eventsource)(\s+)([A-Za-z_]\w*)(?=\s*(?:\/\/.*)?$)/,["keyword","white","type.identifier"]],[/^(system)(\s+)([A-Z]\w*)(?=\s*(?:\/\/.*)?$)/,["keyword","white","type.identifier"]],[/^(\s*)(produces\s+operation)(\s+)([A-Z]\w*)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white",{token:"type.identifier",next:"@operationBody.$1"}]],[/^(\s*)(given\s+operation)(\s+)([\w.]+)(\s+)(fails)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","type.identifier","white","keyword"]],[/^(\s*)(then\s+(?:operation|compensated))(\s+)([\w.]+)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","type.identifier"]],[new RegExp(`^(\\s*)(command)(\\s+)([A-Za-z_][${G}]*)(?=\\s*(?://.*)?$)`),["white","keyword","white",{token:"type.identifier",next:"@commandBody.$1"}]],[/^(\s*)(handler)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@handlerBody.$1"}]],[/^(\s*@?[a-z_]\w*\s+)([\w.]+(?:\[\])?(?:\?|\s+optional)?)(\s+)(generated)(\s+identifier|)(?=\s*(?:\/\/.*)?$)/,["identifier","type.identifier","white","keyword","keyword"]],[/^(\s*)(generated)(\s+)([a-z_]\w*)(\s*=(?!=|>))/,["white","keyword","white","identifier","operator"]],[/^(\s*)(then)(\s+)(returns)\b/,["white","keyword","white","keyword"]],[/^(\s*)(returns)(?=\s*(?:\/\/.*)?$|\s+@\w+\s*(?:\/\/.*)?$)/,["white","keyword"]],[/^(\s*(?:by|filter)\s+[a-z_]\w*\s+)([\w.]+(?:\[\])?)(\s+)(optional)\b(?=\s*(?:from\b|\/\/|$))/,["identifier","type.identifier","white","keyword"]],[/^(?!\s*(?:by|filter)\s+)(\s*@?[a-z_]\w*\s+)([\w.]+(?:\[\])?)(\s+)(optional)\b(?=\s*(?:identifier\b|from\b|=(?!=|>)|\/\/|$))/,["identifier","type.identifier","white","keyword"]],[/^(\s*query\s+[A-Za-z_]\w*\s*=>\s*(?!observable\s+optional\s*(?:\/\/.*)?$)(?:observable\s+)?)([\w.]+(?:\[\])?)(\s+)(optional)\b(?=\s*(?:\/\/.*)?$)/,["keyword","type.identifier","white","keyword"]],[new RegExp(`^(\\s*)(given)(\\s+)(caller)(\\s+)(as)(\\s+)([A-Za-z_][${G}]*)(?=\\s*(?://.*)?$)`),["white","keyword","white","keyword","white","keyword","white","type.identifier"]],[/^(\s*)(given|when)(\s+)(clock|capture|trigger|query)\b/,["white","keyword","white","keyword"]],[/^(\s*)(then)(\s+)(result|no\s+(?:result|events))\b/,["white","keyword","white","keyword"]],[/^(\s*)(then)(\s+)(events)(\s+)(in any order)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword","white","keyword"]],[/^(\s*)(when)(\s+)(redelivered)(\s+)([\w.]+)(\s+)(to)(\s+)([\w.]+)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword","white","type.identifier","white","keyword","white","type.identifier"]],[/^(\s*)(otherwise)(\s+)(hidden)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword"]],[/^(\s*)(otherwise)(\s+)(execute)(\s+)([\w.]+)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword","white","type.identifier"]],[/^(\s*)(when)(\s+)(?=.+\s+execute\s+[\w.]+\s*(?:\/\/.*)?$)/,["white","keyword",{token:"white",next:"@guardedActionCondition"}]],[/^(\s*)(behavior)(\s+)([A-Za-z_]\w*)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white",{token:"type.identifier",next:"@behaviorBody.$1"}]],[/^(\s*)(on)(\s+)(refused)(\s+)(by)(\s+)(validation|constraint|authorization)\b/,["white","keyword","white","keyword","white","keyword","white","keyword"]],[/^(\s*)(on)(\s+)(refused)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword"]],[/^(\s*)(on)(\s+)([\w-]+)\b/,["white","keyword","white",{token:"keyword",next:"@interactionBody.$1"}]],[/^(\s*)(acknowledge)(?=\s*(?:\/\/.*)?$)/,["white","keyword"]],[/^(\s*)(import)(\s+)("[^"\\]*")/,["white","keyword","white","string.link"]],[/^(\s*)((?:(?:produces|public)\s+)?event)(\s+)([A-Za-z_]\w*)(\s+)(generation)(\s+)(\d+)(?=\s*(?:from\s+"(?:[^"\\]|\\.)*"\s*)?(?:\/\/.*)?$)/,["white","keyword","white","type.identifier","white","keyword","white",{token:"number",next:"@eventBody.$1"}]],[/^(\s*)((?:(?:produces|public)\s+)?event)(\s+)([A-Za-z_]\w*)(?=\s*(?:from\s+"(?:[^"\\]|\\.)*"\s*)?(?:\/\/.*)?$)/,["white","keyword","white",{token:"type.identifier",next:"@eventBody.$1"}]],...le.map(e=>[new RegExp(`^\\s*\\x60\\x60\\x60${e}\\s*$`),{token:"string.quote",next:`@codeBlock.${Ue[e]}`,nextEmbedded:Ue[e]}]),...le.map(e=>[new RegExp(`\\b${e}\\b(?=\\s*$)`),{token:"keyword.tag",next:`@codeBlockPending.${Ue[e]}`}]),...t.map(e=>[new RegExp(`\\b${e.keyword}\\b`),{token:"keyword",next:`@${dn(e.keyword)}`}]),[/^(\s*)(documentation)(?=\s+[\w.]+(?:\[\])?(?:\?|\s+optional)?\s*(?:identifier\b|generated\b|=(?!=|>)|\/\/|$))/,["white","identifier"]],[/\b(?:description|documentation)\b(?=\s*(?:\/\/.*)?$)/,{token:"keyword",next:"@descriptionBlockPending"}],[/\brow-click\b/,"keyword"],[/^\s*@[a-z_]\w*/,"identifier"],[/@\w+/,"annotation"],[/[A-Z]\w*/,{cases:{"@sliceTypes":"keyword.type","@primitiveTypes":"type","@default":"type.identifier"}}],[/[a-z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],{include:"@common"}],guardedActionCondition:[[/(execute)(\s+)([\w.]+)(?=\s*(?:\/\/.*)?$)/,["keyword","white",{token:"type.identifier",next:"@pop"}]],{include:"@root"}],behaviorBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],{include:"@root"}],interactionBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(otherwise)(?=\s*(?:\/\/.*)?$)/,["white","keyword"]],[/^(\s*)(when)(\s+)(?=item\.|\()/,["white","keyword","white"]],[/^(\s*)(execute)(\s+)([\w.]+)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","type.identifier"]],{include:"@root"}],purposeBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(basis|interest|condition|authorization|subjects|retention|recipient|transfer|erasure)(\s+)/,["white","keyword","white"]],[/\b(safeguard|exception)\b/,"keyword"],{include:"@root"}],conceptBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(@?pii|personal|@?sensitive|secret)(\s+)(reason|scope|special|criminal)\b/,["white","keyword","white","keyword"]],{include:"@root"}],commandBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(validate)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@commandValidation.$1"}]],{include:"@root"}],commandValidation:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[new RegExp(`^(\\s*)([${G}.]+)(\\s+)(rule)(\\s+)([A-Za-z_][${G}]*)(?=\\s*(?:severity\\s+\\w+|message\\s+.*|//.*|$))`),["white","identifier","white","keyword","white",{token:"type.identifier",next:"@namedRuleBody.$1"}]],{include:"@root"}],namedRuleBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(implementation)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@implementationBody.$1"}]],{include:"@root"}],operationBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(execute|compensate)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@operationPhase.$1"}]],[/^(\s*)(uses)(\s+)([A-Z]\w*)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","type.identifier"]],[/^(\s*)(@?[a-z_]\w*)(\s+)([\w.]+(?:\[\])?(?:\?|\s+optional)?)(?=\s*(?:=(?!=|>)|\/\/|$))/,["white","identifier","white","type.identifier"]],{include:"@root"}],operationPhase:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(implementation)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@implementationBody.$1"}]],{include:"@root"}],handlerBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(implementation)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@implementationBody.$1"}]],{include:"@root"}],implementationBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(hint)(?=\s+")/,["white","keyword"]],{include:"@root"}],eventBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(id)(?=\s+")/,["white","keyword"]],[/^(\s*)(documentation)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@descriptionBlockPending"}]],{include:"@root"}],common:go,codeBlockPending:[[/^\s*```\s*$/,{token:"string.quote",switchTo:"@codeBlock.$S2",nextEmbedded:"$S2"}],[/^\s*[^\s`].*$/,{token:"@rematch",next:"@pop"}],[/\s+/,"white"]],codeBlock:[[/^\s*```\s*$/,{token:"string.quote",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,""],[/`/,""]],descriptionBlockPending:[[/\/\/.*$/,"comment"],[/^\s*```(?:text|markdown)?\s*$/,{token:"string.quote",switchTo:"@descriptionBlock"}],[/^\s*[^\s`].*$/,{token:"@rematch",next:"@pop"}],[/\s+/,"white"]],descriptionBlock:[[/^\s*```\s*$/,{token:"string.quote",next:"@pop"}],[/.+/,"string"]]};for(let e of t)n[dn(e.keyword)]=[ho(t),...e.tokens,{include:"@common"},[/[A-Z]\w*/,"type.identifier"],[/[a-z_]\w*/,"identifier"]];return{defaultToken:"",tokenPostfix:".play",ignoreCase:!1,keywords:[...he.filter(e=>!fn.has(e)),...Re,...le],sliceTypes:Ee,primitiveTypes:ee,tokenizer:n}}d(hn,"createTokensProvider");function ue(t,n,e,o){let i=I(t);if(i[n]||T(e).length<e.length)return null;let a=e.trim()===""?e.length:$(t[n]),p=M(t,i,n,a),r=V(t,i,n,a),s=d(u=>{let m=o.commands.filter(l=>l.name===u);return m.length===1?m[0]:void 0},"namedCommand"),c=d((u,m=u.name)=>({label:u.name,insertText:m,documentation:`${D(H(u))}${u.isGenerated?" \u2014 generated, not request/form input":""}. ${z}`}),"entry");if(p.includes("command")){let u=Z(t).commands.filter(m=>m.line<n).at(-1);if(!u)return null;if(p[0]==="command"){if(/^\s*returns\s+@?\w*$/.test(e))return!/returns\s+@/.test(e)&&u.properties.some(l=>l.name==="returns"&&l.line===n)?null:u.properties.map(l=>c(l,`${/returns\s+@/.test(e)?"":"@"}${l.name}`));let m=e.match(/^\s*@?[a-z_]\w*\s+([\w.]+)\s+(\w*)$/);if(m&&["generated","identifier"].some(l=>l.startsWith(m[2]))&&o.concepts.find(f=>f.name===m[1])?.primitive==="Uuid")return[..."optional".startsWith(m[2])?be:[],{label:"generated",insertText:"generated",documentation:`Required scalar Uuid concept with no validation rules; not a request/form input. ${z}`},{label:"generated identifier",insertText:"generated identifier",documentation:`Specification fixture uses an indented for value. ${z}`},{label:"identifier",insertText:"identifier",documentation:"Names the event source identifier."}];if(/^\s*@?[a-z_]\w*\s+[\w.]+\s+generated\s+\w*$/.test(e))return[{label:"identifier",insertText:"identifier",documentation:z}]}if(p[0]==="returns")return/=\s*@?\w*$/.test(e)?u.properties.map(m=>c(m)):/^\s*@?[a-z_]\w*\s+[\w.]*$/.test(e)?[...o.concepts.map(m=>m.name),...o.types.map(m=>m.name),...ee].map(m=>({label:m,insertText:m,documentation:`Explicit response type must exactly match the source. ${z}`})):u.properties.map(m=>c(m,`${m.name} = ${m.name}`))}if(p[0]==="form"&&r&&(/^\s*field\s+\w*$/.test(e)||e.trim()==="")){let u=s(r.match(/\bfor\s+([\w.]+)$/)?.[1]);if(u)return u.properties.filter(m=>!m.isGenerated).map(m=>c(m,e.trim()===""?`field ${m.name}`:m.name))}if(p.includes("specification")){if(p[0]==="when"&&r){let u=r.match(/^when\s+([\w.]+)$/)?.[1],m=s(u);if(!m)return null;if(/^\s*generated\s+\w*$/.test(e))return m.properties.filter(l=>l.isGenerated&&!l.isIdentifier).map(l=>c(l,`${l.name} = "\${1:uuid}"`));if(e.trim()==="")return[...m.properties.filter(l=>!l.isGenerated).map(l=>c(l,`${l.name} = \${1:value}`)),...m.properties.filter(l=>l.isGenerated&&!l.isIdentifier).map(l=>({...c(l,`generated ${l.name} = "\${1:uuid}"`),label:`generated ${l.name}`})),...m.properties.some(l=>l.isGenerated&&l.isIdentifier)?[{label:"for",insertText:'for "${1:uuid}"',documentation:`Generated identifier fixture, not request input. ${z}`}]:[]]}if(p[0]==="then"&&/^then\s+returns$/.test(r??"")){let u=[...R(t).specifications.values()].filter(l=>l.location.line-1<n).at(-1),m=s(u?.when?.commandType);if(m?.response?.kind==="RecordCommandResponseSyntax"){let l=new Map(m.properties.map(f=>[f.name,f]));return m.response.fields.map(f=>{let g=l.get(f.source.property),b=f.type??(g?H(g):void 0);return{label:f.name,insertText:`${f.name} = \${1:value}`,documentation:`${b?D(b):"Unresolved type"}. ${z}`}})}}}return null}d(ue,"responseCompletions");function gn(t,n){let e=re(t,I(t),n,$(t[n]));if(!(!e.some(o=>o.startsWith("specification "))||e.some(o=>/^(?:case|given caller|when redelivered)\b/.test(o))))return[...R(t).specifications].filter(([o])=>o<=n).sort(([o],[i])=>i-o)[0]?.[1]}d(gn,"enclosing");function yn(t,n,e){if(!/(?:=\s*|for\s+|then\s+error\s+)case\.[\w]*$/.test(e)||/when\s+redelivered|given\s+caller/.test(e)||/^\s*case\b/.test(e))return null;let o=gn(t,n);return(o?.cases?.length??0)===0?null:o.parameters?.map(i=>({label:`case.${i.name}`,insertText:`case.${i.name}`,documentation:`Case value of ${i.type.name}${i.type.isCollection?"[]":""}${i.type.isOptional?" optional":""}.`}))??[]}d(yn,"caseCompletions");function bn(t,n,e,o){let a=[...t[n].matchAll(/\bcase\.([a-z_]\w*)\b/g)].find(c=>c.index<o&&c.index+c[0].length>=e);if(a===void 0)return null;let p=gn(t,n),r=p?.parameters?.find(c=>c.name===a[1]);if(r===void 0)return null;let s=p.cases?.map(c=>{let u=c.values.find(l=>l.property===r.name)?.source,m=u!==null&&typeof u=="object"&&"value"in u?u.value:u;return`- ${c.name}: \`${JSON.stringify(m)}\``}).join(`
|
|
1
|
+
import{$ as Mt,$a as Be,A as V,Aa as on,B as re,Ba as rn,C as Oe,Ca as ze,D as $t,Da as an,E as Me,Ea as sn,F as Kn,Fa as cn,G as Qn,Ga as ln,H as Jn,Ha as un,I as Xn,Ia as mn,Ja as eo,Ka as pn,L as xt,La as z,M as kt,Ma as R,N as St,Na as to,O as Ct,Oa as no,P as Tt,Pa as oo,Q as At,Qa as ro,R as Dt,Ra as H,S as Pt,Sa as $e,T as It,Ta as Z,U as Lt,Ua as io,V as Rt,Va as N,W as Et,Wa as _e,X as qt,Xa as ao,Y as Ot,Ya as Fe,Z as ye,Za as so,_ as be,_a as co,a as B,aa as Ne,ab as lo,b as gt,ba as Nt,bb as uo,c as he,ca as ie,cb as mo,d as Re,da as ve,db as po,e as le,ea as we,eb as fo,f as Wn,fa as jt,fb as He,g as Gn,ga as zt,h as Ee,ha as _t,i as ee,ia as Ft,j as Vn,ja as Bt,k as Zn,ka as ae,l as yt,la as Ht,m as G,ma as Ut,n as qe,na as Wt,o as D,oa as Gt,p as ge,pa as Vt,q as te,qa as Zt,r as ne,ra as Yt,s as bt,sa as Kt,t as vt,ta as Qt,u as wt,ua as Jt,v as T,va as Xt,w as $,wa as je,x as Yn,xa as en,y as I,ya as tn,z as M,za as nn}from"./chunk-7GSRLVHB.js";import{a as d}from"./chunk-AYDF3IFZ.js";var fn=new Set(["operation","system","eventsource","purpose","runs"]),Ue={csharp:"csharp",typescript:"typescript",react:"typescript",html:"html",sql:"sql"};function dn(t){return`subLanguage_${t}`}d(dn,"subLanguageState");function ho(t){let n=[...he.filter(e=>!fn.has(e)),...t.map(e=>e.keyword)];return[new RegExp(`^\\s*(?:${n.join("|")})\\b`),{token:"@rematch",next:"@pop"}]}d(ho,"subLanguageExitRule");var go=[[/\/\/.*$/,"comment"],[/\$(?:context|identity|eventContext|eventSourceId|causedBy|refusal)(?:\.\w+)*/,"variable.predefined"],[/\$(?:env|secrets|strings)\.[\w.]+/,"variable.predefined"],[/\$\.[\w.]*/,"variable.predefined"],[/"(?:[^"\\]|\\.)*"/,"string"],[/"(?:[^"\\]|\\.)*$/,"string.invalid"],[/\d+(?:ms|s|m|h|d)\b/,"number"],[/-?\d+\.\d+/,"number.float"],[/-?\d+/,"number"],[/=>|==|!=|>=|<=|[><=:?]/,"operator"],[/[[\](),.]/,"delimiter"],[/\s+/,"white"]];function hn(t){let n={root:[[new RegExp(`^(\\s*)(example)(\\s+)([A-Z][${G}]*)(\\s*)(:)(\\s*)([A-Z][${G}.]*)(?=\\s*(?://.*)?$)`),["white","keyword","white","type.identifier","white","operator","white","type.identifier"]],[/^(\s*)(direction)(\s+)(inbound|outbound)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword"]],[new RegExp(`^()(purpose)(\\s+)([A-Za-z_][${G}]*)(?=\\s*(?://.*)?$)`),["white","keyword","white",{token:"type.identifier",next:"@purposeBody.$1"}]],[/^(\s*)(parameter)(\s+)([a-z_]\w*)(\s+)([\w.]+(?:\[\])?(?:\s+optional)?)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","identifier","white","type.identifier"]],[/^(\s*)(case)(\s+)([A-Za-z_]\w*)(?=\s*(?:[a-z_]\w*\s*=|\/\/|$))/,["white","keyword","white","type.identifier"]],[/\b(case)(\.)([a-z_]\w*)\b/,["keyword","delimiter","identifier"]],[/^(\s*)(concept)(\s+)([^\s:]+)(\s*:\s*)(\w+)((?:\s+(?:@?pii|personal|@?sensitive|secret))*)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","type.identifier","operator",{token:"type.identifier",next:"@conceptBody.$1"},"keyword"]],[/^(numbers)([ \t]+)(exact)(?=[ \t]*(?:(?:\/\/|#).*)?$)/,["keyword","white","keyword"]],[/^(eventsource)(\s+)([A-Za-z_]\w*)(?=\s*(?:\/\/.*)?$)/,["keyword","white","type.identifier"]],[/^(system)(\s+)([A-Z]\w*)(?=\s*(?:\/\/.*)?$)/,["keyword","white","type.identifier"]],[/^(\s*)(runs)(\s+)(as)(\s+)(system)\b/,["white","keyword","white","keyword","white","keyword"]],[/^(\s*)(produces\s+operation)(\s+)([A-Z]\w*)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white",{token:"type.identifier",next:"@operationBody.$1"}]],[/^(\s*)(given\s+operation)(\s+)([\w.]+)(\s+)(fails)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","type.identifier","white","keyword"]],[/^(\s*)(then\s+(?:operation|compensated))(\s+)([\w.]+)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","type.identifier"]],[new RegExp(`^(\\s*)(command)(\\s+)([A-Za-z_][${G}]*)(?=\\s*(?://.*)?$)`),["white","keyword","white",{token:"type.identifier",next:"@commandBody.$1"}]],[/^(\s*)(handler)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@handlerBody.$1"}]],[/^(\s*@?[a-z_]\w*\s+)([\w.]+(?:\[\])?(?:\?|\s+optional)?)(\s+)(generated)(\s+identifier|)(?=\s*(?:\/\/.*)?$)/,["identifier","type.identifier","white","keyword","keyword"]],[/^(\s*)(generated)(\s+)([a-z_]\w*)(\s*=(?!=|>))/,["white","keyword","white","identifier","operator"]],[/^(\s*)(then)(\s+)(returns)\b/,["white","keyword","white","keyword"]],[/^(\s*)(returns)(?=\s*(?:\/\/.*)?$|\s+@\w+\s*(?:\/\/.*)?$)/,["white","keyword"]],[/^(\s*(?:by|filter)\s+[a-z_]\w*\s+)([\w.]+(?:\[\])?)(\s+)(optional)\b(?=\s*(?:from\b|\/\/|$))/,["identifier","type.identifier","white","keyword"]],[/^(?!\s*(?:by|filter)\s+)(\s*@?[a-z_]\w*\s+)([\w.]+(?:\[\])?)(\s+)(optional)\b(?=\s*(?:identifier\b|from\b|=(?!=|>)|\/\/|$))/,["identifier","type.identifier","white","keyword"]],[/^(\s*query\s+[A-Za-z_]\w*\s*=>\s*(?!observable\s+optional\s*(?:\/\/.*)?$)(?:observable\s+)?)([\w.]+(?:\[\])?)(\s+)(optional)\b(?=\s*(?:\/\/.*)?$)/,["keyword","type.identifier","white","keyword"]],[new RegExp(`^(\\s*)(given)(\\s+)(caller)(\\s+)(as)(\\s+)([A-Za-z_][${G}]*)(?=\\s*(?://.*)?$)`),["white","keyword","white","keyword","white","keyword","white","type.identifier"]],[/^(\s*)(given|when)(\s+)(clock|capture|trigger|query)\b/,["white","keyword","white","keyword"]],[/^(\s*)(then)(\s+)(result|no\s+(?:result|events))\b/,["white","keyword","white","keyword"]],[/^(\s*)(then)(\s+)(events)(\s+)(in any order)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword","white","keyword"]],[/^(\s*)(when)(\s+)(redelivered)(\s+)([\w.]+)(\s+)(to)(\s+)([\w.]+)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword","white","type.identifier","white","keyword","white","type.identifier"]],[/^(\s*)(otherwise)(\s+)(hidden)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword"]],[/^(\s*)(otherwise)(\s+)(execute)(\s+)([\w.]+)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword","white","type.identifier"]],[/^(\s*)(when)(\s+)(?=.+\s+execute\s+[\w.]+\s*(?:\/\/.*)?$)/,["white","keyword",{token:"white",next:"@guardedActionCondition"}]],[/^(\s*)(behavior)(\s+)([A-Za-z_]\w*)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white",{token:"type.identifier",next:"@behaviorBody.$1"}]],[/^(\s*)(on)(\s+)(refused)(\s+)(by)(\s+)(validation|constraint|authorization)\b/,["white","keyword","white","keyword","white","keyword","white","keyword"]],[/^(\s*)(on)(\s+)(refused)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","keyword"]],[/^(\s*)(on)(\s+)([\w-]+)\b/,["white","keyword","white",{token:"keyword",next:"@interactionBody.$1"}]],[/^(\s*)(acknowledge)(?=\s*(?:\/\/.*)?$)/,["white","keyword"]],[/^(\s*)(import)(\s+)("[^"\\]*")/,["white","keyword","white","string.link"]],[/^(\s*)((?:(?:produces|public)\s+)?event)(\s+)([A-Za-z_]\w*)(\s+)(generation)(\s+)(\d+)(?=\s*(?:from\s+"(?:[^"\\]|\\.)*"\s*)?(?:\/\/.*)?$)/,["white","keyword","white","type.identifier","white","keyword","white",{token:"number",next:"@eventBody.$1"}]],[/^(\s*)((?:(?:produces|public)\s+)?event)(\s+)([A-Za-z_]\w*)(?=\s*(?:from\s+"(?:[^"\\]|\\.)*"\s*)?(?:\/\/.*)?$)/,["white","keyword","white",{token:"type.identifier",next:"@eventBody.$1"}]],...le.map(e=>[new RegExp(`^\\s*\\x60\\x60\\x60${e}\\s*$`),{token:"string.quote",next:`@codeBlock.${Ue[e]}`,nextEmbedded:Ue[e]}]),...le.map(e=>[new RegExp(`\\b${e}\\b(?=\\s*$)`),{token:"keyword.tag",next:`@codeBlockPending.${Ue[e]}`}]),...t.map(e=>[new RegExp(`\\b${e.keyword}\\b`),{token:"keyword",next:`@${dn(e.keyword)}`}]),[/^(\s*)(documentation)(?=\s+[\w.]+(?:\[\])?(?:\?|\s+optional)?\s*(?:identifier\b|generated\b|=(?!=|>)|\/\/|$))/,["white","identifier"]],[/\b(?:description|documentation)\b(?=\s*(?:\/\/.*)?$)/,{token:"keyword",next:"@descriptionBlockPending"}],[/\brow-click\b/,"keyword"],[/^\s*@[a-z_]\w*/,"identifier"],[/@\w+/,"annotation"],[/[A-Z]\w*/,{cases:{"@sliceTypes":"keyword.type","@primitiveTypes":"type","@default":"type.identifier"}}],[/[a-z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],{include:"@common"}],guardedActionCondition:[[/(execute)(\s+)([\w.]+)(?=\s*(?:\/\/.*)?$)/,["keyword","white",{token:"type.identifier",next:"@pop"}]],{include:"@root"}],behaviorBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],{include:"@root"}],interactionBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(otherwise)(?=\s*(?:\/\/.*)?$)/,["white","keyword"]],[/^(\s*)(when)(\s+)(?=item\.|\()/,["white","keyword","white"]],[/^(\s*)(execute)(\s+)([\w.]+)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","type.identifier"]],{include:"@root"}],purposeBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(basis|interest|condition|authorization|subjects|retention|recipient|transfer|erasure)(\s+)/,["white","keyword","white"]],[/\b(safeguard|exception)\b/,"keyword"],{include:"@root"}],conceptBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(@?pii|personal|@?sensitive|secret)(\s+)(reason|scope|special|criminal)\b/,["white","keyword","white","keyword"]],{include:"@root"}],commandBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(validate)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@commandValidation.$1"}]],{include:"@root"}],commandValidation:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[new RegExp(`^(\\s*)([${G}.]+)(\\s+)(rule)(\\s+)([A-Za-z_][${G}]*)(?=\\s*(?:severity\\s+\\w+|message\\s+.*|//.*|$))`),["white","identifier","white","keyword","white",{token:"type.identifier",next:"@namedRuleBody.$1"}]],{include:"@root"}],namedRuleBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(implementation)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@implementationBody.$1"}]],{include:"@root"}],operationBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(execute|compensate)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@operationPhase.$1"}]],[/^(\s*)(uses)(\s+)([A-Z]\w*)(?=\s*(?:\/\/.*)?$)/,["white","keyword","white","type.identifier"]],[/^(\s*)(@?[a-z_]\w*)(\s+)([\w.]+(?:\[\])?(?:\?|\s+optional)?)(?=\s*(?:=(?!=|>)|\/\/|$))/,["white","identifier","white","type.identifier"]],{include:"@root"}],operationPhase:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(implementation)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@implementationBody.$1"}]],{include:"@root"}],handlerBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(implementation)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@implementationBody.$1"}]],{include:"@root"}],implementationBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(hint)(?=\s+")/,["white","keyword"]],{include:"@root"}],eventBody:[[/^(?!$S2[ \t]+|\s*$)/,{token:"@rematch",next:"@pop"}],[/^(\s*)(id)(?=\s+")/,["white","keyword"]],[/^(\s*)(documentation)(?=\s*(?:\/\/.*)?$)/,["white",{token:"keyword",next:"@descriptionBlockPending"}]],{include:"@root"}],common:go,codeBlockPending:[[/^\s*```\s*$/,{token:"string.quote",switchTo:"@codeBlock.$S2",nextEmbedded:"$S2"}],[/^\s*[^\s`].*$/,{token:"@rematch",next:"@pop"}],[/\s+/,"white"]],codeBlock:[[/^\s*```\s*$/,{token:"string.quote",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,""],[/`/,""]],descriptionBlockPending:[[/\/\/.*$/,"comment"],[/^\s*```(?:text|markdown)?\s*$/,{token:"string.quote",switchTo:"@descriptionBlock"}],[/^\s*[^\s`].*$/,{token:"@rematch",next:"@pop"}],[/\s+/,"white"]],descriptionBlock:[[/^\s*```\s*$/,{token:"string.quote",next:"@pop"}],[/.+/,"string"]]};for(let e of t)n[dn(e.keyword)]=[ho(t),...e.tokens,{include:"@common"},[/[A-Z]\w*/,"type.identifier"],[/[a-z_]\w*/,"identifier"]];return{defaultToken:"",tokenPostfix:".play",ignoreCase:!1,keywords:[...he.filter(e=>!fn.has(e)),...Re,...le],sliceTypes:Ee,primitiveTypes:ee,tokenizer:n}}d(hn,"createTokensProvider");function ue(t,n,e,o){let i=I(t);if(i[n]||T(e).length<e.length)return null;let a=e.trim()===""?e.length:$(t[n]),p=M(t,i,n,a),r=V(t,i,n,a),s=d(u=>{let m=o.commands.filter(l=>l.name===u);return m.length===1?m[0]:void 0},"namedCommand"),c=d((u,m=u.name)=>({label:u.name,insertText:m,documentation:`${D(H(u))}${u.isGenerated?" \u2014 generated, not request/form input":""}. ${z}`}),"entry");if(p.includes("command")){let u=Z(t).commands.filter(m=>m.line<n).at(-1);if(!u)return null;if(p[0]==="command"){if(/^\s*returns\s+@?\w*$/.test(e))return!/returns\s+@/.test(e)&&u.properties.some(l=>l.name==="returns"&&l.line===n)?null:u.properties.map(l=>c(l,`${/returns\s+@/.test(e)?"":"@"}${l.name}`));let m=e.match(/^\s*@?[a-z_]\w*\s+([\w.]+)\s+(\w*)$/);if(m&&["generated","identifier"].some(l=>l.startsWith(m[2]))&&o.concepts.find(f=>f.name===m[1])?.primitive==="Uuid")return[..."optional".startsWith(m[2])?be:[],{label:"generated",insertText:"generated",documentation:`Required scalar Uuid concept with no validation rules; not a request/form input. ${z}`},{label:"generated identifier",insertText:"generated identifier",documentation:`Specification fixture uses an indented for value. ${z}`},{label:"identifier",insertText:"identifier",documentation:"Names the event source identifier."}];if(/^\s*@?[a-z_]\w*\s+[\w.]+\s+generated\s+\w*$/.test(e))return[{label:"identifier",insertText:"identifier",documentation:z}]}if(p[0]==="returns")return/=\s*@?\w*$/.test(e)?u.properties.map(m=>c(m)):/^\s*@?[a-z_]\w*\s+[\w.]*$/.test(e)?[...o.concepts.map(m=>m.name),...o.types.map(m=>m.name),...ee].map(m=>({label:m,insertText:m,documentation:`Explicit response type must exactly match the source. ${z}`})):u.properties.map(m=>c(m,`${m.name} = ${m.name}`))}if(p[0]==="form"&&r&&(/^\s*field\s+\w*$/.test(e)||e.trim()==="")){let u=s(r.match(/\bfor\s+([\w.]+)$/)?.[1]);if(u)return u.properties.filter(m=>!m.isGenerated).map(m=>c(m,e.trim()===""?`field ${m.name}`:m.name))}if(p.includes("specification")){if(p[0]==="when"&&r){let u=r.match(/^when\s+([\w.]+)$/)?.[1],m=s(u);if(!m)return null;if(/^\s*generated\s+\w*$/.test(e))return m.properties.filter(l=>l.isGenerated&&!l.isIdentifier).map(l=>c(l,`${l.name} = "\${1:uuid}"`));if(e.trim()==="")return[...m.properties.filter(l=>!l.isGenerated).map(l=>c(l,`${l.name} = \${1:value}`)),...m.properties.filter(l=>l.isGenerated&&!l.isIdentifier).map(l=>({...c(l,`generated ${l.name} = "\${1:uuid}"`),label:`generated ${l.name}`})),...m.properties.some(l=>l.isGenerated&&l.isIdentifier)?[{label:"for",insertText:'for "${1:uuid}"',documentation:`Generated identifier fixture, not request input. ${z}`}]:[]]}if(p[0]==="then"&&/^then\s+returns$/.test(r??"")){let u=[...R(t).specifications.values()].filter(l=>l.location.line-1<n).at(-1),m=s(u?.when?.commandType);if(m?.response?.kind==="RecordCommandResponseSyntax"){let l=new Map(m.properties.map(f=>[f.name,f]));return m.response.fields.map(f=>{let g=l.get(f.source.property),b=f.type??(g?H(g):void 0);return{label:f.name,insertText:`${f.name} = \${1:value}`,documentation:`${b?D(b):"Unresolved type"}. ${z}`}})}}}return null}d(ue,"responseCompletions");function gn(t,n){let e=re(t,I(t),n,$(t[n]));if(!(!e.some(o=>o.startsWith("specification "))||e.some(o=>/^(?:case|given caller|when redelivered)\b/.test(o))))return[...R(t).specifications].filter(([o])=>o<=n).sort(([o],[i])=>i-o)[0]?.[1]}d(gn,"enclosing");function yn(t,n,e){if(!/(?:=\s*|for\s+|then\s+error\s+)case\.[\w]*$/.test(e)||/when\s+redelivered|given\s+caller/.test(e)||/^\s*case\b/.test(e))return null;let o=gn(t,n);return(o?.cases?.length??0)===0?null:o.parameters?.map(i=>({label:`case.${i.name}`,insertText:`case.${i.name}`,documentation:`Case value of ${i.type.name}${i.type.isCollection?"[]":""}${i.type.isOptional?" optional":""}.`}))??[]}d(yn,"caseCompletions");function bn(t,n,e,o){let a=[...t[n].matchAll(/\bcase\.([a-z_]\w*)\b/g)].find(c=>c.index<o&&c.index+c[0].length>=e);if(a===void 0)return null;let p=gn(t,n),r=p?.parameters?.find(c=>c.name===a[1]);if(r===void 0)return null;let s=p.cases?.map(c=>{let u=c.values.find(l=>l.property===r.name)?.source,m=u!==null&&typeof u=="object"&&"value"in u?u.value:u;return`- ${c.name}: \`${JSON.stringify(m)}\``}).join(`
|
|
2
2
|
`);return`**case.${r.name}** \u2014 ${r.type.name}
|
|
3
3
|
|
|
4
4
|
Case origin in **${p.name}**; substitutes after example overrides.
|
|
@@ -76,7 +76,7 @@ ${h[0].properties.map(C=>`${C.name} ${D(H(C))}`).join(`
|
|
|
76
76
|
`)}
|
|
77
77
|
\`\`\``:null;return{name:s,content:x,target:null}}}let b=[...l.flatMap(w=>w.symbols.imports),...i?.authoringDocuments===void 0?i?.imports??[]:[]].filter(w=>w.shortName===s);if(b.length>0)return{name:s,content:b.length===1?`\`\`\`screenplay
|
|
78
78
|
import ${b[0].qualifiedName}
|
|
79
|
-
\`\`\``:null,target:null};let S=l.flatMap(w=>w.symbols.triggers.filter(v=>v.name===s).map(v=>({document:w,declaration:v})));return g(S)}d(fe,"reactionReferenceAt");var at={implementation:"Handler-only intent with ordered hints and at most one file or tagged fence. No payload means pending. Handler execution is unsupported; this is not confirmation.",hint:"One nonblank quoted implementation hint. Order and decoded text are retained; hints do not execute or confirm code."},oe={parameter:"A typed value declared by a specification table, or an argument of a named behavior. Table types are required; every case supplies each parameter exactly once.",case:"One named concrete row of a specification table, expanded as <Specification>_<Case>. Use case.<parameter> for a whole step value.",example:"One typed, possibly partial fixture: `example <Name> : <EventOrCommandOrReadModel>`. Use its name in a matching specification step; assignments override example values without changing matching or supplying defaults. Event examples may carry stream or no stream; a step replaces that route as a whole.",domain:"The domain the file belongs to \u2014 optional, at most one per file, before everything else.",import:'Imports a type from another module by its qualified name \u2014 `import Module.Type` \u2014 making it available by its short name; or, quoted, other `.play` files by path or glob \u2014 `import "Orders/**/*.play"`, relative to this file\'s folder. Written inside a module or feature, a file import places the imported files there: their top level is that module\'s or feature\'s body. `import Module.Event from "origin"` is instead public contract metadata with an opaque origin; executable binding refuses it with PLAY0268.',concept:"A formalized value type wrapping a primitive. Bare pii and secret markers travel with every usage, with optional concept notes and qualifiers.",type:"A composite value type \u2014 a named shape built from several properties, referenced by events, commands and other types the same way a concept is.",reason:'A free-text concept note, not a lawful basis. Written as pii reason "..." or secret reason "..."; migration preserves it verbatim.',optional:"Allows a value to be absent. Write it after the type: `note String optional` or `lines InvoiceLine[] optional`. The collection itself may be absent; its items keep their declared type.",identifier:"Marks the command property a runtime resolves the event source id from. At most one per command; without it a new Uuid is generated.",policy:"A named authorization rule referenced by commands and queries. Multiple policies AND together.",purpose:"A report-only processing declaration (GDPR Art. 30), referenced on modules, features and slices. Coverage is their union, not an authorization gate. Generated declarations are not legal advice.",basis:"One declared Art. 6(1) basis: consent, contract, legalObligation, vitalInterests, publicTask or legitimateInterests; an optional quoted reference may follow.",interest:"The legitimate-interest statement for basis legitimateInterests (Art. 13(1)(d)).",condition:"One Art. 9(2) processing condition, optionally followed by a quoted reference.",subjects:"Comma-separated categories of data subjects, as open identifiers.",retention:"Declared retention period or criteria, not enforced by the model or Chronicle.",recipient:"A quoted recipient category; repeatable on a purpose.",transfer:"A declared destination followed by safeguard and quoted safeguards; repeatable.",safeguard:"The declared safeguard accompanying a third-country transfer.",erasure:"An erasure exception under Art. 17(3); Chronicle crypto-shredding remains per subject, not per purpose.",exception:"One declared Art. 17(3) exception: expression, legalObligation, publicTask, publicHealth, archiving or legalClaims.",persona:"A named role interacting with the application, with an optional description and its associated policies.",identity:"Declares typed additional caller details from a claim, a keyed single-result query, inline code or a file. Authoring metadata only; executable use of `$identity.<detail>` reports PLAY0268 until admitted (#600).",authentication:"Declares the identity providers of the application \u2014 at most one block per file.",provider:"A named identity provider within `authentication`, with free-form `name value` settings.",description:"A human-readable description, including the rule or case a specification witnesses, as a quoted single line or a fenced ```text block for multiple lines.",depends:"Declares `depends on <Name>` on a module or feature. This opts only that container into checking counted explicit references against its own declarations; it does not change executable bytes.",module:"The top-level namespace \u2014 maps to a bounded context.",layout:"A reusable screen template with named slots.",template:"Declares the named slots of a layout.",feature:"A vertical slice grouping. Features nest arbitrarily deep.",slice:"The atomic unit of behavior, aligned with Event Modeling. Has a type and a name.",public:'Marks an event as a public contract. An event with from "origin" is also public. Origin is opaque, not a path or declaration reference. Public events and origins are admitted by executable semantic model (ESM) v9.',direction:"Declare direction inbound or direction outbound once inside a Translate slice. Admitted by executable semantic model (ESM) v9; a Translate slice that uses public events must declare it (PLAY0614).",inbound:"Inbound Translate direction metadata. No transport or delivery guarantee is implied.",outbound:"Outbound Translate direction metadata. No transport or delivery guarantee is implied.",event:"An immutable, past-tense fact. Declare it in a slice or inline with `produces event <Name>` in a command. Inline properties are typed mappings; inline tags belong to the event type.",documentation:"Authoring-only reasoning on a module, feature, slice, command, event, read model or reaction in one nonempty fenced ```markdown block. It does not change executable model bytes.",id:"Preserves the previous persisted event name after a rename. Leave absent on new events; repeating the current name is redundant.",command:"An imperative intent. Declares authorization, validation, and what events it produces \u2014 declaratively, or via a full handler.",query:"A read-side entry point mapping to a return type, with an optional description, parameters and performer.",observable:"Qualifies a query return type as a live read \u2014 `query <Name> => observable <ReadModel>` keeps pushing as the read model changes, instead of answering once.",performer:"The code that performs a query \u2014 a `file <Path>` reference or an inline `csharp`/`sql` block. The query's counterpart to a command handler.",from:"Fills a query parameter from the query context instead of the caller, as in `filter tenantId TenantId from $context.tenant`.",projection:"Declares how events project into a read model, using the embedded Projection Declaration Language (PDL).",capture:"Converts external data into events, using the embedded Change Data Capture Language (CDL).",reaction:"Behavior that runs when something happens. Lives inside Automation slices. A trigger with no body states intent on its own \u2014 `file`/code is optional realization metadata.",trigger:"Declares a kind of occurrence a reaction can respond to, and the values it hands the reaction. What makes one occur belongs to whoever provides it, never to the compiler.",where:"Narrows which occurrences actually run the reaction.",contains:"Text comparison \u2014 true when the left string holds the right one anywhere.",every:"Runs a reaction on an interval \u2014 `every 15 minutes`, `every 1 day`.",refused:"Ordered invocation refusal branch: first match wins. Bare `on refused` covers validation and constraints, not authorization. Syntax-only, not yet executable (PLAY0268).",acknowledge:"A refusal branch acknowledges alone, or produces events instead. Syntax-only, not yet executable (PLAY0268).",validation:"In `on refused by validation`, selects property, concept and require refusals. Syntax-only, not yet executable (PLAY0268).",authorization:"In `on refused by authorization`, explicitly selects unauthorized results, never Unsupported. Syntax-only, not yet executable (PLAY0268).",redelivered:"`when redelivered <Event> to <Reaction>` selects exactly one effective given occurrence by optional for, stated values and stream or no stream, without appending it again. Syntax-only, not yet executable (PLAY0268).",invokes:"A command a reaction hands on. A command is asked for, not produced \u2014 it may still be rejected.",screen:"A UI declaration. Supports intent, structure, and layout-with-code levels, or a full file reference.",constraint:"A server-side rule enforced in the Chronicle kernel before events are committed.",authorize:"References the policies that must all pass for the construct to execute.",validate:"Declarative validation rules, or `validate` followed by ```csharp for imperative rules \u2014 on commands and concepts.",produces:"References a declared event with `produces <Name>`, or declares one inline with `produces event <Name>`. An inline omitted `for` uses the command identifier only when all destinations are the same source; legacy plain omission allocates an identity.",reads:"Declares a view consulted by a command or reaction trigger: `reads <View> [as <alias>] [by <value>]`. A reaction `by` names a value taken by its trigger; clock triggers cannot use `by`. Repeated views require unique aliases. Runtime binding is not yet supported for command or reaction reads.",as:"Names an instance of a view in a command or reaction trigger reads declaration, for example `reads Account as source by sourceId`.",handler:"A fully imperative command implementation \u2014 a `file <Path>` reference or an inline `csharp` block, instead of `produces`.",when:"Guards a produced event or a capture append with a condition. In a labeled screen action, `when item.<field> == <literal> execute <Command>` selects the first matching command. Inside on click, double click or select, block-form `when <condition>` selects one whole action list at gesture time.",rule:"Names a predicate. Bare, it states that a constraint exists without expressing what it computes \u2014 nothing resolves the name. Optionally followed by an indented `file <Path>` reference or inline `csharp` block giving it a body.",require:'A policy condition: `authenticated`, `role "..."`, or `claim "..." matches ...`. Unary `not` negates a condition or group; precedence is not, and, or.',authenticated:"Requires an authenticated caller.",role:"Requires the caller to have the given role.",claim:"Requires a claim on the caller to match a subject or value.",subject:"In policy `matches subject`, the identifier of the thing acted on, not the caller. The caller is `$context.causedBy.subject`.",data:"Binds a read model to a screen through a query.",action:'Makes a command available on a screen. `action "Label"` declares one button with ordered `when \u2026 execute` alternatives over the nearest data item or selected row. No subject hides it; commands still enforce authorization and validation.',otherwise:"The final fallback of a guarded action: `otherwise hidden` or `otherwise execute <Command>`. In an item interaction, bare `otherwise` opens a fallback action list. No subject runs nothing, including fallback; authorization never falls through.",hidden:"Hides a guarded action when no condition matches. Without a subject the action is always hidden, even with an execute fallback.",execute:"Executes a command. A guarded screen action selects it by the first matching condition; explicit `with \u2026 from` bindings precede same-name item fields, its declared form and renderer input.",navigate:"Navigates to a screen, optionally passing a parameter with `by`.",section:"A named structural section of a screen.",table:"A table widget over a read model or child collection.",summary:"A summary widget showing labeled fields.",column:"A table column bound to a property.",field:"A summary field bound to a property.",title:"The display title of a screen or section.",label:"The display label of an action, column, or field.",unique:"A uniqueness constraint \u2014 `unique <property> on <EventType>` or `unique event <EventType>`.",concurrency:"The concurrency scope enforced when the command appends events \u2014 dimensions: `eventSource`, `sourceType`, `streamType`, `streamId`, `events`.",eventSource:"Concurrency dimension \u2014 scope the check to the event source id of the command.",sourceType:"Concurrency dimension \u2014 scope the check to an event source type.",streamType:"Concurrency dimension \u2014 scope the check to an event stream type.",streamId:"Concurrency dimension \u2014 scope the check to an event stream id.",tag:"Attaches a tag to appended events \u2014 a static identifier or string, or a `$context.` expression resolved at append time.",seed:"Declares events to seed into the event store per event source id \u2014 multiple blocks accumulate.",for:"Names the event source of a production or seed group. Inside `produces event`, omission uses the command identifier unless another production targets a different source.",readmodel:"Declares a read model \u2014 its name and properties \u2014 in a slice, or, in a specification, read model state: `given readmodel` establishes it, `then readmodel` asserts it, `then no readmodel <View> for <key>` asserts keyed absence.",reducer:"Builds a read model from events with imperative code \u2014 `reducer <Name> => <ReadModel>` with an `on <EventType>` rule per event. Use it when a projection cannot express the transition.",specification:"Given/when/then acceptance criteria for a slice: prior events and state, the command, query or appended event under test, and the events, state, results, errors or denials that follow.",dialog:"A dialog opened over the shell, or with `dialog template` a reusable dialog shape.",form:"A form bound to a command \u2014 `form <Name> for <Command>` with a `field` per input.",contribute:"Contributes entries to a slot of the shell \u2014 `contribute to Navigation` with `navigate to`, `label` and `order`.",theme:"A named theme and the component packages it is compatible with.",ui:"A UI profile \u2014 `ui profile <Name>` binds a target platform and size to a layout, theme and packages.",behavior:"A named interaction wiring of `on <interaction>` handlers, attached to a screen, form or dialog with `uses`.",system:"An application-scoped external system that operations use.",eventsource:"An application-owned event source with nested streams.",operation:"A reusable operation intent that uses one external system.",no:"A keyed absence assertion: `then no readmodel <View> for <key>`.",arguments:"The values supplied to a query asserted by `then query`.",result:"One expected result - `then result [exactly]` after `when query`, or a `result` block inside `then query`. Repeat it to assert several results in authored order.",clock:'The instant a specification happens at - `given clock "2026-10-05T08:00:00Z"` fixes when everything occurs; `when clock "<instant>"` is the clock reaching it, as the action.',exactly:"Requires every property to match, rather than only the ones asserted - on `then readmodel`, `then query` and `then result`.",file:"Delegates the implementation to an external file; the Screenplay contract stays visible.",by:"Introduces the identifying parameter.",via:"Connects screen data to the query that supplies it.",filter:"An optional query filter parameter.",on:"The event a constraint applies to, the day a schedule narrows to, or a widget interaction such as `on row-click`.",message:"The validation message reported when the rule fails.",matches:"Matches a value against a regular expression or a named pattern such as `email`.",all:"Applies a comparison to every element of a collection.",max:"Maximum length or value.",min:"Minimum length or value.",length:"Constrains the exact length of a value.",today:"The current date.",empty:"Used with `not empty` \u2014 the value must be present.",not:"Negates a validation condition, as in `not empty`.",and:"Both conditions must hold.",or:"Either condition may hold.",csharp:"An inline C# block whose opening fence is ```csharp.",sql:"An inline SQL block between triple backticks \u2014 a query performer written against a relational store.",typescript:"An inline TypeScript block between triple backticks.",react:"An inline React/TSX block; receives the surrounding data contract as `Props`.",html:"An inline static HTML block.",StateChange:"Slice type \u2014 a command \u2192 events flow; something that changes the system.",StateView:"Slice type \u2014 a query + projection + screen; something that reads the system.",Automation:"Slice type \u2014 a reaction or reducer; something that runs when something happens.",Translate:"Slice type \u2014 a capture; converts external data into events.",Uuid:"Primitive type \u2014 a universally unique identifier.",String:"Primitive type \u2014 a string of characters.",Int:"Primitive type \u2014 an integer number.",Decimal:"Primitive type \u2014 a decimal number.",Bool:"Primitive type \u2014 true or false.",Date:"Primitive type \u2014 a date without time.",DateTime:"Primitive type \u2014 a date and time.",Enum:"An enumeration concept with a fixed set of values."},Pe={parameter:"Declares a required typed case value: `parameter <name> <Type>`. Every case assigns it once. `optional` permits literal null but supplies no default.",case:"One named complete row of a specification table. `case.<parameter>` substitutes a whole value after example overrides; each row runs as `<Specification>_<Case>`.",caller:"`given caller` states an explicit identity; `given caller as <Persona>` synthesizes an authenticated deterministic witness of the persona, with no body. Leftmost buildable policy alternatives are significant.",clock:oe.clock,redelivered:oe.redelivered,trigger:"`when trigger <Trigger>` - an application trigger fires, as the action, with the values on the lines beneath it.",capture:"`given capture <Capture>` - a record the capture's source held before; `when capture <Capture>` - the record it sees now, as the action. The fields go on the lines beneath.",query:"`when query <Query>` - the query is performed, as the action, with its arguments on the lines beneath; assert what it returns with `then result` or `then no result`. `then query` instead asserts a query after another action.",events:"`then no events` - asserts no new events after a non-append action. Syntax-only, not yet executable (PLAY0268). Cannot accompany event, event-order, error or denial expectations.",result:"`then result [exactly]` - one result the query performed by `when query` returns, in order; `then no result` - it returns nothing."},st={pii:"personal data (GDPR Art. 4(1)); renders Chronicle [PII]. Bare suffix marker; @pii is deprecated (PLAY0565). Not admitted by the executable model (PLAY0268).",personal:"Alias of pii: personal data (GDPR Art. 4(1)); renders Chronicle [PII]. No diagnostic; canonical printing writes pii.",secret:"Operational secret, not personal data: encrypted at rest without erasure and withheld from causation. Provider mapping: [Encrypted] + [NotAudited], or [PII] only with pii. Cannot be identity (PLAY0515). Not admitted by the executable model (PLAY0268).",sensitive:"Deprecated spelling of secret (PLAY0565); repair to bare secret. Operational secret, not GDPR Art. 9 special-category data."},Ie={"$context.occurred":"When the command or query was received.","$context.tenant":"The tenant the command or query is executing for.","$context.command":"The command being handled, shaped by its `command` declaration.","$context.arguments":"The arguments of the query being performed.","$context.causedBy":"The identity that caused the command or query \u2014 `subject`, `name`, `userName`.","$context.causedBy.subject":"The subject of the identity that caused the command or query.","$context.causedBy.name":"The display name of the identity that caused the command or query.","$context.causedBy.userName":"The user name of the identity that caused the command or query.","$context.causation":"What caused the command or query \u2014 `type`, `occurred`, `properties`.","$context.causation.type":"What caused the command or query \u2014 a command, a reactor, a schedule.",$identity:"The caller \u2014 token built-ins `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`, plus declared identity details. Built-ins are equivalent to `$context.identity`; details are authoring-only until admitted (#600).","$identity.id":"The identifier of the caller from the auth token; equivalent to `$context.identity.id`.","$identity.name":"The display name of the caller; equivalent to `$context.identity.name`.","$identity.userName":"The user name of the caller; equivalent to `$context.identity.userName`.","$identity.isAuthenticated":"Whether the caller is authenticated.","$identity.roles":"The roles the caller holds.","$identity.claims":"The claims the caller carries \u2014 `$identity.claims.<name>` reads one.","$context.identity":"The caller a decision is made about \u2014 `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`.","$context.identity.id":"The identifier of the caller from the auth token.","$context.identity.name":"The display name of the caller.","$context.identity.userName":"The user name of the caller.","$context.identity.isAuthenticated":"Whether the caller is authenticated.","$context.identity.roles":"The roles the caller holds.","$context.identity.claims":"The claims the caller carries \u2014 `$context.identity.claims.<name>` reads one.",$env:"An environment variable, e.g. `$env.SERVICE_NAME`.",$secrets:"An encrypted secret resolved at runtime, e.g. `$secrets.azureAdClientId` \u2014 stays symbolic in the compiled tree.",$strings:"A localized string resolved from the `.strings` file of the active locale, e.g. `$strings.invoices.title`.",...Object.fromEntries(Me.map(t=>[`$eventContext.${t.path}`,t.description]))},ct={racialOrEthnicOrigin:"Data revealing a person's racial or ethnic origin (GDPR Art. 9(1)).",politicalOpinions:"Data revealing a person's political opinions (GDPR Art. 9(1)).",religiousOrPhilosophicalBeliefs:"Data revealing a person's religious or philosophical beliefs (GDPR Art. 9(1)).",tradeUnionMembership:"Data revealing whether a person belongs to a trade union (GDPR Art. 9(1)).",genetic:"Data about inherited or acquired genetic characteristics that gives unique information about a person's physiology or health (GDPR Art. 9(1), Art. 4(13)).",biometric:"Data from technical processing of physical, physiological or behavioral characteristics, special only when processed to uniquely identify a person (GDPR Art. 9(1), Art. 4(14)).",health:"Data about a person's physical or mental health, including health care services, that reveals their health status (GDPR Art. 9(1), Art. 4(15)).",sexLifeOrSexualOrientation:"Data concerning a person's sex life or sexual orientation (GDPR Art. 9(1))."};function lt(t,n,e,o,i,a){let p=I(t);if(p[n])return null;let r=t[n]??"";if(i-1>T(r).length)return null;let s=!1,c=!1;for(let y=0;y<o-1;y++)r[y]==="\\"&&s?y++:r[y]==='"'&&!c?s=!s:r[y]==="`"&&!s&&(c=!c);if(s||c)return null;let u=fe(t,n,o,i,a);if(u)return u.content;let m=We(t,n,o,i,a);if(m)return m;let l=Ye(t,n,o,i,a);if(l)return l;let f=Ze(t,n,o,i,a);if(f)return f;let g=d((y,k)=>{let L=y+(r[y-1]==="@"?1:0);return e===k&&o===L&&i===L+k.length&&r.slice(L-1,i-1)===k},"tokenAt"),b=r.charAt(o-2);if(e==="authorization"&&M(t,p,n,$(r))[0]==="purpose")return"A quoted authorization in law for criminal-offence data (Art. 10).";let S=/^\s*concept\s+[^\s:]+\s*:\s*\w+\s+/.exec(r),w=M(t,p,n,$(r))[0]==="concept"&&/^\s*(?:@?pii|personal|@?sensitive|secret)\s+(?:reason|scope|special|criminal)\b/.test(r);if(S!==null&&o-1>=S[0].length-1||w){let y=st[e];if(y)return y;if(Object.hasOwn(ct,e)&&/^\s*(?:@?pii|personal)\s+special\s+/.test(r))return`**${e}** \u2014 ${ct[e]}`;if(e==="special")return"GDPR Art. 9(1) special category; requires pii. At most one category per concept.";if(e==="criminal")return"Personal data relating to criminal convictions and offenses (GDPR Art. 10); requires pii.";if(/^\s*(?:secret|sensitive|@sensitive)\s+scope\s+/.test(r)&&["subject","namespace","global"].includes(e))return`**${e}** \u2014 Secret encryption scope${e==="subject"?" per data subject":e==="namespace"?" per tenant namespace":" shared globally"}. Not an event-property subject role.`;if(e==="scope")return"Secret encryption scope: subject, namespace or global. Omitted scope keeps Chronicle\u2019s Subject default; pii secret renders only [PII]."}if(b==="$"||b==="."){let y=r.substring(0,i-1).match(/\$[\w.]*$/)?.[0];if(y){if(y.startsWith("$refusal")){let L=Te(t,n,$(r)),W=y.substring(9),K={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 L!==void 0&&K[W]!==void 0?`**${y}** \u2014 ${K[W]} Syntax-only, not yet executable (PLAY0268).`:null}if(y.startsWith("$identity.")){let L=y.substring(10).split(".")[0],W=N(t,a).identityDetails?.find(K=>K.name===L);if(W)return`**$identity.${W.name}** \u2014 ${W.type}. Declared caller detail; authoring metadata only, not executable until admitted (#600).`}let k=Ie[y]??(y.startsWith("$env")?Ie.$env:void 0);if(k)return k}}let v=r.slice(0,o-1),h=/^\s*(?:by|filter)\s+/.test(v)?/^\s*(?:by|filter)\s+[a-z_]\w*\s+[\w.]+(?:\[\])?\s+$/.test(v):/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?\s+$/.test(v),x=/^\s*query\s+\w+\s*=>\s*(?:observable\s+)?[\w.]+(?:\[\])?\s+$/.test(v)&&!/^\s*query\s+\w+\s*=>\s*observable\s+$/.test(v);if(e==="subject"){let y=Oe(t),k=/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?(?:\?|\s+optional)?(?:\s+generated)?(?:\s+identifier)?\s+$/.test(v),L=M(y,p,n,$(r));return k&&(L[0]==="event"||/^produces\s+event\s+/.test(re(y,p,n,$(r))[0]??""))?"**subject** \u2014 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(v)&&L.includes("policy")?`**subject** \u2014 ${oe.subject}`:null}if(e==="optional"&&(h||x))return`**optional** \u2014 ${oe.optional}`;if(e==="implementation"||e==="hint"){let y=M(t,p,n,$(r)),k=Ae(t,n,$(r));if(e==="implementation"&&k==="rule"&&/^\s*implementation\s*$/.test(T(r))||e==="hint"&&k==="implementation"&&/^\s*hint\s+"/.test(r))return`**${e}** \u2014 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(e==="implementation"&&y[0]==="handler"&&/^\s*implementation\s*$/.test(T(r)))return`**implementation** \u2014 ${at.implementation}`;if(e==="hint"&&y[0]==="implementation"&&y[1]==="handler"&&/^\s*hint\s+"/.test(r))return`**hint** \u2014 ${at.hint}`}let C=Z(t),A=C.commands.filter(y=>y.line<n).at(-1),E=A?.properties.find(y=>y.name===e&&y.line===n);if(E?.isGenerated||e==="generated"&&A?.properties.some(y=>y.isGenerated&&y.line===n)&&h)return`**${E?.name??"generated"}** \u2014 ${E?D(H(E))+". ":""}Generated value, not a request or form input. ${z}`;let q=A?.response;if(q?.location.line===n+1&&(g(q.location.column,"returns")||q.kind==="ScalarCommandResponseSyntax"&&g(q.source.location.column,q.source.property))){let y=q.kind==="ScalarCommandResponseSyntax"?A?.properties.find(k=>k.name===q.source.property):void 0;return`**returns**${y?` \u2014 ${D(H(y))}`:" \u2014 unnamed record response"}. ${z}`}if(q?.kind==="RecordCommandResponseSyntax"){let y=q.fields.find(k=>k.location.line===n+1&&(g(k.location.column,k.name)||g(k.source.location.column,k.source.property)));if(y){let k=A?.properties.find(W=>W.name===y.source.property),L=y.type?D(y.type):k?D(H(k)):"Unresolved type";return`**${y.name}** \u2014 ${L}${y.type?" (explicit)":" (inferred)"} = ${y.source.property}. ${k?.isGenerated?"Generated source, not request input. ":""}${z}`}}for(let y of R(t).specifications.values())if(e==="returns"&&y.thenReturns?.location.line===n+1||e==="generated"&&y.when?.generatedValues?.some(k=>k.location.line===n+1))return z;let _=C.concepts.find(y=>y.name===e);if(_){let y=_.attributes.length?` ${_.attributes.join(" ")}`:"",k=_.enumValues.length?`
|
|
79
|
+
\`\`\``:null,target:null};let S=l.flatMap(w=>w.symbols.triggers.filter(v=>v.name===s).map(v=>({document:w,declaration:v})));return g(S)}d(fe,"reactionReferenceAt");var at={implementation:"Handler-only intent with ordered hints and at most one file or tagged fence. No payload means pending. Handler execution is unsupported; this is not confirmation.",hint:"One nonblank quoted implementation hint. Order and decoded text are retained; hints do not execute or confirm code."},oe={parameter:"A typed value declared by a specification table, or an argument of a named behavior. Table types are required; every case supplies each parameter exactly once.",case:"One named concrete row of a specification table, expanded as <Specification>_<Case>. Use case.<parameter> for a whole step value.",example:"One typed, possibly partial fixture: `example <Name> : <EventOrCommandOrReadModel>`. Use its name in a matching specification step; assignments override example values without changing matching or supplying defaults. Event examples may carry stream or no stream; a step replaces that route as a whole.",domain:"The domain the file belongs to \u2014 optional, at most one per file, before everything else.",import:'Imports a type from another module by its qualified name \u2014 `import Module.Type` \u2014 making it available by its short name; or, quoted, other `.play` files by path or glob \u2014 `import "Orders/**/*.play"`, relative to this file\'s folder. Written inside a module or feature, a file import places the imported files there: their top level is that module\'s or feature\'s body. `import Module.Event from "origin"` is instead public contract metadata with an opaque origin; executable binding refuses it with PLAY0268.',concept:"A formalized value type wrapping a primitive. Bare pii and secret markers travel with every usage, with optional concept notes and qualifiers.",type:"A composite value type \u2014 a named shape built from several properties, referenced by events, commands and other types the same way a concept is.",reason:'A free-text concept note, not a lawful basis. Written as pii reason "..." or secret reason "..."; migration preserves it verbatim.',optional:"Allows a value to be absent. Write it after the type: `note String optional` or `lines InvoiceLine[] optional`. The collection itself may be absent; its items keep their declared type.",identifier:"Marks the command property a runtime resolves the event source id from. At most one per command; without it a new Uuid is generated.",policy:"A named authorization rule referenced by commands and queries. Multiple policies AND together.",purpose:"A report-only processing declaration (GDPR Art. 30), referenced on modules, features and slices. Coverage is their union, not an authorization gate. Generated declarations are not legal advice.",basis:"One declared Art. 6(1) basis: consent, contract, legalObligation, vitalInterests, publicTask or legitimateInterests; an optional quoted reference may follow.",interest:"The legitimate-interest statement for basis legitimateInterests (Art. 13(1)(d)).",condition:"One Art. 9(2) processing condition, optionally followed by a quoted reference.",subjects:"Comma-separated categories of data subjects, as open identifiers.",retention:"Declared retention period or criteria, not enforced by the model or Chronicle.",recipient:"A quoted recipient category; repeatable on a purpose.",transfer:"A declared destination followed by safeguard and quoted safeguards; repeatable.",safeguard:"The declared safeguard accompanying a third-country transfer.",erasure:"An erasure exception under Art. 17(3); Chronicle crypto-shredding remains per subject, not per purpose.",exception:"One declared Art. 17(3) exception: expression, legalObligation, publicTask, publicHealth, archiving or legalClaims.",persona:"A named role interacting with the application, with an optional description and its associated policies.",identity:"Declares typed additional caller details from a claim, a keyed single-result query, inline code or a file. Authoring metadata only; executable use of `$identity.<detail>` reports PLAY0268 until admitted (#600).",authentication:"Declares the identity providers of the application \u2014 at most one block per file.",provider:"A named identity provider within `authentication`, with free-form `name value` settings.",description:"A human-readable description, including the rule or case a specification witnesses, as a quoted single line or a fenced ```text block for multiple lines.",depends:"Declares `depends on <Name>` on a module or feature. This opts only that container into checking counted explicit references against its own declarations; it does not change executable bytes.",module:"The top-level namespace \u2014 maps to a bounded context.",layout:"A reusable screen template with named slots.",template:"Declares the named slots of a layout.",feature:"A vertical slice grouping. Features nest arbitrarily deep.",slice:"The atomic unit of behavior, aligned with Event Modeling. Has a type and a name.",public:'Marks an event as a public contract. An event with from "origin" is also public. Origin is opaque, not a path or declaration reference. Public events and origins are admitted by executable semantic model (ESM) v9.',direction:"Declare direction inbound or direction outbound once inside a Translate slice. Admitted by executable semantic model (ESM) v9; a Translate slice that uses public events must declare it (PLAY0614).",inbound:"Inbound Translate direction metadata. No transport or delivery guarantee is implied.",outbound:"Outbound Translate direction metadata. No transport or delivery guarantee is implied.",event:"An immutable, past-tense fact. Declare it in a slice or inline with `produces event <Name>` in a command. Inline properties are typed mappings; inline tags belong to the event type.",documentation:"Authoring-only reasoning on a module, feature, slice, command, event, read model or reaction in one nonempty fenced ```markdown block. It does not change executable model bytes.",id:"Preserves the previous persisted event name after a rename. Leave absent on new events; repeating the current name is redundant.",command:"An imperative intent. Declares authorization, validation, and what events it produces \u2014 declaratively, or via a full handler.",query:"A read-side entry point mapping to a return type, with an optional description, parameters and performer.",observable:"Qualifies a query return type as a live read \u2014 `query <Name> => observable <ReadModel>` keeps pushing as the read model changes, instead of answering once.",performer:"The code that performs a query \u2014 a `file <Path>` reference or an inline `csharp`/`sql` block. The query's counterpart to a command handler.",from:"Fills a query parameter from the query context instead of the caller, as in `filter tenantId TenantId from $context.tenant`.",projection:"Declares how events project into a read model, using the embedded Projection Declaration Language (PDL).",capture:"Converts external data into events, using the embedded Change Data Capture Language (CDL).",reaction:"Behavior that runs when something happens. Lives inside Automation slices. A trigger with no body states intent on its own \u2014 `file`/code is optional realization metadata.",runs:'`runs as system [role "Role" and role "Role"]` declares the identity for every returned or invoked command of a reaction, not imperative pipeline calls. Syntax-only (PLAY0268, #383); clock and application triggers have no Stage realization yet.',trigger:"Declares a kind of occurrence a reaction can respond to, and the values it hands the reaction. What makes one occur belongs to whoever provides it, never to the compiler.",where:"Narrows which occurrences actually run the reaction.",contains:"Text comparison \u2014 true when the left string holds the right one anywhere.",every:"Runs a reaction on an interval \u2014 `every 15 minutes`, `every 1 day`.",refused:"Ordered invocation refusal branch: first match wins. Bare `on refused` covers validation and constraints, not authorization. Syntax-only, not yet executable (PLAY0268).",acknowledge:"A refusal branch acknowledges alone, or produces events instead. Syntax-only, not yet executable (PLAY0268).",validation:"In `on refused by validation`, selects property, concept and require refusals. Syntax-only, not yet executable (PLAY0268).",authorization:"In `on refused by authorization`, explicitly selects unauthorized results, never Unsupported. Syntax-only, not yet executable (PLAY0268).",redelivered:"`when redelivered <Event> to <Reaction>` selects exactly one effective given occurrence by optional for, stated values and stream or no stream, without appending it again. Syntax-only, not yet executable (PLAY0268).",invokes:"A command a reaction hands on. A command is asked for, not produced \u2014 it may still be rejected.",screen:"A UI declaration. Supports intent, structure, and layout-with-code levels, or a full file reference.",constraint:"A server-side rule enforced in the Chronicle kernel before events are committed.",authorize:"References the policies that must all pass for the construct to execute.",validate:"Declarative validation rules, or `validate` followed by ```csharp for imperative rules \u2014 on commands and concepts.",produces:"References a declared event with `produces <Name>`, or declares one inline with `produces event <Name>`. An inline omitted `for` uses the command identifier only when all destinations are the same source; legacy plain omission allocates an identity.",reads:"Declares a view consulted by a command or reaction trigger: `reads <View> [as <alias>] [by <value>]`. A reaction `by` names a value taken by its trigger; clock triggers cannot use `by`. Repeated views require unique aliases. Runtime binding is not yet supported for command or reaction reads.",as:"Names an instance of a view in a command or reaction trigger reads declaration, for example `reads Account as source by sourceId`.",handler:"A fully imperative command implementation \u2014 a `file <Path>` reference or an inline `csharp` block, instead of `produces`.",when:"Guards a produced event or a capture append with a condition. In a labeled screen action, `when item.<field> == <literal> execute <Command>` selects the first matching command. Inside on click, double click or select, block-form `when <condition>` selects one whole action list at gesture time.",rule:"Names a predicate. Bare, it states that a constraint exists without expressing what it computes \u2014 nothing resolves the name. Optionally followed by an indented `file <Path>` reference or inline `csharp` block giving it a body.",require:'A policy condition: `authenticated`, `role "..."`, or `claim "..." matches ...`. Unary `not` negates a condition or group; precedence is not, and, or.',authenticated:"Requires an authenticated caller.",role:"Requires the caller to have the given role.",claim:"Requires a claim on the caller to match a subject or value.",subject:"In policy `matches subject`, the identifier of the thing acted on, not the caller. The caller is `$context.causedBy.subject`.",data:"Binds a read model to a screen through a query.",action:'Makes a command available on a screen. `action "Label"` declares one button with ordered `when \u2026 execute` alternatives over the nearest data item or selected row. No subject hides it; commands still enforce authorization and validation.',otherwise:"The final fallback of a guarded action: `otherwise hidden` or `otherwise execute <Command>`. In an item interaction, bare `otherwise` opens a fallback action list. No subject runs nothing, including fallback; authorization never falls through.",hidden:"Hides a guarded action when no condition matches. Without a subject the action is always hidden, even with an execute fallback.",execute:"Executes a command. A guarded screen action selects it by the first matching condition; explicit `with \u2026 from` bindings precede same-name item fields, its declared form and renderer input.",navigate:"Navigates to a screen, optionally passing a parameter with `by`.",section:"A named structural section of a screen.",table:"A table widget over a read model or child collection.",summary:"A summary widget showing labeled fields.",column:"A table column bound to a property.",field:"A summary field bound to a property.",title:"The display title of a screen or section.",label:"The display label of an action, column, or field.",unique:"A uniqueness constraint \u2014 `unique <property> on <EventType>` or `unique event <EventType>`.",concurrency:"The concurrency scope enforced when the command appends events \u2014 dimensions: `eventSource`, `sourceType`, `streamType`, `streamId`, `events`.",eventSource:"Concurrency dimension \u2014 scope the check to the event source id of the command.",sourceType:"Concurrency dimension \u2014 scope the check to an event source type.",streamType:"Concurrency dimension \u2014 scope the check to an event stream type.",streamId:"Concurrency dimension \u2014 scope the check to an event stream id.",tag:"Attaches a tag to appended events \u2014 a static identifier or string, or a `$context.` expression resolved at append time.",seed:"Declares events to seed into the event store per event source id \u2014 multiple blocks accumulate.",for:"Names the event source of a production or seed group. Inside `produces event`, omission uses the command identifier unless another production targets a different source.",readmodel:"Declares a read model \u2014 its name and properties \u2014 in a slice, or, in a specification, read model state: `given readmodel` establishes it, `then readmodel` asserts it, `then no readmodel <View> for <key>` asserts keyed absence.",reducer:"Builds a read model from events with imperative code \u2014 `reducer <Name> => <ReadModel>` with an `on <EventType>` rule per event. Use it when a projection cannot express the transition.",specification:"Given/when/then acceptance criteria for a slice: prior events and state, the command, query or appended event under test, and the events, state, results, errors or denials that follow.",dialog:"A dialog opened over the shell, or with `dialog template` a reusable dialog shape.",form:"A form bound to a command \u2014 `form <Name> for <Command>` with a `field` per input.",contribute:"Contributes entries to a slot of the shell \u2014 `contribute to Navigation` with `navigate to`, `label` and `order`.",theme:"A named theme and the component packages it is compatible with.",ui:"A UI profile \u2014 `ui profile <Name>` binds a target platform and size to a layout, theme and packages.",behavior:"A named interaction wiring of `on <interaction>` handlers, attached to a screen, form or dialog with `uses`.",system:"An application-scoped external system that operations use.",eventsource:"An application-owned event source with nested streams.",operation:"A reusable operation intent that uses one external system.",no:"A keyed absence assertion: `then no readmodel <View> for <key>`.",arguments:"The values supplied to a query asserted by `then query`.",result:"One expected result - `then result [exactly]` after `when query`, or a `result` block inside `then query`. Repeat it to assert several results in authored order.",clock:'The instant a specification happens at - `given clock "2026-10-05T08:00:00Z"` fixes when everything occurs; `when clock "<instant>"` is the clock reaching it, as the action.',exactly:"Requires every property to match, rather than only the ones asserted - on `then readmodel`, `then query` and `then result`.",file:"Delegates the implementation to an external file; the Screenplay contract stays visible.",by:"Introduces the identifying parameter.",via:"Connects screen data to the query that supplies it.",filter:"An optional query filter parameter.",on:"The event a constraint applies to, the day a schedule narrows to, or a widget interaction such as `on row-click`.",message:"The validation message reported when the rule fails.",matches:"Matches a value against a regular expression or a named pattern such as `email`.",all:"Applies a comparison to every element of a collection.",max:"Maximum length or value.",min:"Minimum length or value.",length:"Constrains the exact length of a value.",today:"The current date.",empty:"Used with `not empty` \u2014 the value must be present.",not:"Negates a validation condition, as in `not empty`.",and:"Both conditions must hold.",or:"Either condition may hold.",csharp:"An inline C# block whose opening fence is ```csharp.",sql:"An inline SQL block between triple backticks \u2014 a query performer written against a relational store.",typescript:"An inline TypeScript block between triple backticks.",react:"An inline React/TSX block; receives the surrounding data contract as `Props`.",html:"An inline static HTML block.",StateChange:"Slice type \u2014 a command \u2192 events flow; something that changes the system.",StateView:"Slice type \u2014 a query + projection + screen; something that reads the system.",Automation:"Slice type \u2014 a reaction or reducer; something that runs when something happens.",Translate:"Slice type \u2014 a capture; converts external data into events.",Uuid:"Primitive type \u2014 a universally unique identifier.",String:"Primitive type \u2014 a string of characters.",Int:"Primitive type \u2014 an integer number.",Decimal:"Primitive type \u2014 a decimal number.",Bool:"Primitive type \u2014 true or false.",Date:"Primitive type \u2014 a date without time.",DateTime:"Primitive type \u2014 a date and time.",Enum:"An enumeration concept with a fixed set of values."},Pe={parameter:"Declares a required typed case value: `parameter <name> <Type>`. Every case assigns it once. `optional` permits literal null but supplies no default.",case:"One named complete row of a specification table. `case.<parameter>` substitutes a whole value after example overrides; each row runs as `<Specification>_<Case>`.",caller:"`given caller` states an explicit identity; `given caller as <Persona>` synthesizes an authenticated deterministic witness of the persona, with no body. Leftmost buildable policy alternatives are significant.",clock:oe.clock,redelivered:oe.redelivered,trigger:"`when trigger <Trigger>` - an application trigger fires, as the action, with the values on the lines beneath it.",capture:"`given capture <Capture>` - a record the capture's source held before; `when capture <Capture>` - the record it sees now, as the action. The fields go on the lines beneath.",query:"`when query <Query>` - the query is performed, as the action, with its arguments on the lines beneath; assert what it returns with `then result` or `then no result`. `then query` instead asserts a query after another action.",events:"`then no events` - asserts no new events after a non-append action. Syntax-only, not yet executable (PLAY0268). Cannot accompany event, event-order, error or denial expectations.",result:"`then result [exactly]` - one result the query performed by `when query` returns, in order; `then no result` - it returns nothing."},st={pii:"personal data (GDPR Art. 4(1)); renders Chronicle [PII]. Bare suffix marker; @pii is deprecated (PLAY0565). Not admitted by the executable model (PLAY0268).",personal:"Alias of pii: personal data (GDPR Art. 4(1)); renders Chronicle [PII]. No diagnostic; canonical printing writes pii.",secret:"Operational secret, not personal data: encrypted at rest without erasure and withheld from causation. Provider mapping: [Encrypted] + [NotAudited], or [PII] only with pii. Cannot be identity (PLAY0515). Not admitted by the executable model (PLAY0268).",sensitive:"Deprecated spelling of secret (PLAY0565); repair to bare secret. Operational secret, not GDPR Art. 9 special-category data."},Ie={"$context.occurred":"When the command or query was received.","$context.tenant":"The tenant the command or query is executing for.","$context.command":"The command being handled, shaped by its `command` declaration.","$context.arguments":"The arguments of the query being performed.","$context.causedBy":"The identity that caused the command or query \u2014 `subject`, `name`, `userName`.","$context.causedBy.subject":"The subject of the identity that caused the command or query.","$context.causedBy.name":"The display name of the identity that caused the command or query.","$context.causedBy.userName":"The user name of the identity that caused the command or query.","$context.causation":"What caused the command or query \u2014 `type`, `occurred`, `properties`.","$context.causation.type":"What caused the command or query \u2014 a command, a reactor, a schedule.",$identity:"The caller \u2014 token built-ins `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`, plus declared identity details. Built-ins are equivalent to `$context.identity`; details are authoring-only until admitted (#600).","$identity.id":"The identifier of the caller from the auth token; equivalent to `$context.identity.id`.","$identity.name":"The display name of the caller; equivalent to `$context.identity.name`.","$identity.userName":"The user name of the caller; equivalent to `$context.identity.userName`.","$identity.isAuthenticated":"Whether the caller is authenticated.","$identity.roles":"The roles the caller holds.","$identity.claims":"The claims the caller carries \u2014 `$identity.claims.<name>` reads one.","$context.identity":"The caller a decision is made about \u2014 `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`.","$context.identity.id":"The identifier of the caller from the auth token.","$context.identity.name":"The display name of the caller.","$context.identity.userName":"The user name of the caller.","$context.identity.isAuthenticated":"Whether the caller is authenticated.","$context.identity.roles":"The roles the caller holds.","$context.identity.claims":"The claims the caller carries \u2014 `$context.identity.claims.<name>` reads one.",$env:"An environment variable, e.g. `$env.SERVICE_NAME`.",$secrets:"An encrypted secret resolved at runtime, e.g. `$secrets.azureAdClientId` \u2014 stays symbolic in the compiled tree.",$strings:"A localized string resolved from the `.strings` file of the active locale, e.g. `$strings.invoices.title`.",...Object.fromEntries(Me.map(t=>[`$eventContext.${t.path}`,t.description]))},ct={racialOrEthnicOrigin:"Data revealing a person's racial or ethnic origin (GDPR Art. 9(1)).",politicalOpinions:"Data revealing a person's political opinions (GDPR Art. 9(1)).",religiousOrPhilosophicalBeliefs:"Data revealing a person's religious or philosophical beliefs (GDPR Art. 9(1)).",tradeUnionMembership:"Data revealing whether a person belongs to a trade union (GDPR Art. 9(1)).",genetic:"Data about inherited or acquired genetic characteristics that gives unique information about a person's physiology or health (GDPR Art. 9(1), Art. 4(13)).",biometric:"Data from technical processing of physical, physiological or behavioral characteristics, special only when processed to uniquely identify a person (GDPR Art. 9(1), Art. 4(14)).",health:"Data about a person's physical or mental health, including health care services, that reveals their health status (GDPR Art. 9(1), Art. 4(15)).",sexLifeOrSexualOrientation:"Data concerning a person's sex life or sexual orientation (GDPR Art. 9(1))."};function lt(t,n,e,o,i,a){let p=I(t);if(p[n])return null;let r=t[n]??"";if(i-1>T(r).length)return null;let s=!1,c=!1;for(let y=0;y<o-1;y++)r[y]==="\\"&&s?y++:r[y]==='"'&&!c?s=!s:r[y]==="`"&&!s&&(c=!c);if(s||c)return null;let u=fe(t,n,o,i,a);if(u)return u.content;let m=We(t,n,o,i,a);if(m)return m;let l=Ye(t,n,o,i,a);if(l)return l;let f=Ze(t,n,o,i,a);if(f)return f;let g=d((y,k)=>{let L=y+(r[y-1]==="@"?1:0);return e===k&&o===L&&i===L+k.length&&r.slice(L-1,i-1)===k},"tokenAt"),b=r.charAt(o-2);if(e==="authorization"&&M(t,p,n,$(r))[0]==="purpose")return"A quoted authorization in law for criminal-offence data (Art. 10).";let S=/^\s*concept\s+[^\s:]+\s*:\s*\w+\s+/.exec(r),w=M(t,p,n,$(r))[0]==="concept"&&/^\s*(?:@?pii|personal|@?sensitive|secret)\s+(?:reason|scope|special|criminal)\b/.test(r);if(S!==null&&o-1>=S[0].length-1||w){let y=st[e];if(y)return y;if(Object.hasOwn(ct,e)&&/^\s*(?:@?pii|personal)\s+special\s+/.test(r))return`**${e}** \u2014 ${ct[e]}`;if(e==="special")return"GDPR Art. 9(1) special category; requires pii. At most one category per concept.";if(e==="criminal")return"Personal data relating to criminal convictions and offenses (GDPR Art. 10); requires pii.";if(/^\s*(?:secret|sensitive|@sensitive)\s+scope\s+/.test(r)&&["subject","namespace","global"].includes(e))return`**${e}** \u2014 Secret encryption scope${e==="subject"?" per data subject":e==="namespace"?" per tenant namespace":" shared globally"}. Not an event-property subject role.`;if(e==="scope")return"Secret encryption scope: subject, namespace or global. Omitted scope keeps Chronicle\u2019s Subject default; pii secret renders only [PII]."}if(b==="$"||b==="."){let y=r.substring(0,i-1).match(/\$[\w.]*$/)?.[0];if(y){if(y.startsWith("$refusal")){let L=Te(t,n,$(r)),W=y.substring(9),K={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 L!==void 0&&K[W]!==void 0?`**${y}** \u2014 ${K[W]} Syntax-only, not yet executable (PLAY0268).`:null}if(y.startsWith("$identity.")){let L=y.substring(10).split(".")[0],W=N(t,a).identityDetails?.find(K=>K.name===L);if(W)return`**$identity.${W.name}** \u2014 ${W.type}. Declared caller detail; authoring metadata only, not executable until admitted (#600).`}let k=Ie[y]??(y.startsWith("$env")?Ie.$env:void 0);if(k)return k}}let v=r.slice(0,o-1),h=/^\s*(?:by|filter)\s+/.test(v)?/^\s*(?:by|filter)\s+[a-z_]\w*\s+[\w.]+(?:\[\])?\s+$/.test(v):/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?\s+$/.test(v),x=/^\s*query\s+\w+\s*=>\s*(?:observable\s+)?[\w.]+(?:\[\])?\s+$/.test(v)&&!/^\s*query\s+\w+\s*=>\s*observable\s+$/.test(v);if(e==="subject"){let y=Oe(t),k=/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?(?:\?|\s+optional)?(?:\s+generated)?(?:\s+identifier)?\s+$/.test(v),L=M(y,p,n,$(r));return k&&(L[0]==="event"||/^produces\s+event\s+/.test(re(y,p,n,$(r))[0]??""))?"**subject** \u2014 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(v)&&L.includes("policy")?`**subject** \u2014 ${oe.subject}`:null}if(e==="optional"&&(h||x))return`**optional** \u2014 ${oe.optional}`;if(e==="implementation"||e==="hint"){let y=M(t,p,n,$(r)),k=Ae(t,n,$(r));if(e==="implementation"&&k==="rule"&&/^\s*implementation\s*$/.test(T(r))||e==="hint"&&k==="implementation"&&/^\s*hint\s+"/.test(r))return`**${e}** \u2014 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(e==="implementation"&&y[0]==="handler"&&/^\s*implementation\s*$/.test(T(r)))return`**implementation** \u2014 ${at.implementation}`;if(e==="hint"&&y[0]==="implementation"&&y[1]==="handler"&&/^\s*hint\s+"/.test(r))return`**hint** \u2014 ${at.hint}`}let C=Z(t),A=C.commands.filter(y=>y.line<n).at(-1),E=A?.properties.find(y=>y.name===e&&y.line===n);if(E?.isGenerated||e==="generated"&&A?.properties.some(y=>y.isGenerated&&y.line===n)&&h)return`**${E?.name??"generated"}** \u2014 ${E?D(H(E))+". ":""}Generated value, not a request or form input. ${z}`;let q=A?.response;if(q?.location.line===n+1&&(g(q.location.column,"returns")||q.kind==="ScalarCommandResponseSyntax"&&g(q.source.location.column,q.source.property))){let y=q.kind==="ScalarCommandResponseSyntax"?A?.properties.find(k=>k.name===q.source.property):void 0;return`**returns**${y?` \u2014 ${D(H(y))}`:" \u2014 unnamed record response"}. ${z}`}if(q?.kind==="RecordCommandResponseSyntax"){let y=q.fields.find(k=>k.location.line===n+1&&(g(k.location.column,k.name)||g(k.source.location.column,k.source.property)));if(y){let k=A?.properties.find(W=>W.name===y.source.property),L=y.type?D(y.type):k?D(H(k)):"Unresolved type";return`**${y.name}** \u2014 ${L}${y.type?" (explicit)":" (inferred)"} = ${y.source.property}. ${k?.isGenerated?"Generated source, not request input. ":""}${z}`}}for(let y of R(t).specifications.values())if(e==="returns"&&y.thenReturns?.location.line===n+1||e==="generated"&&y.when?.generatedValues?.some(k=>k.location.line===n+1))return z;let _=C.concepts.find(y=>y.name===e);if(_){let y=_.attributes.length?` ${_.attributes.join(" ")}`:"",k=_.enumValues.length?`
|
|
80
80
|
|
|
81
81
|
Values: ${_.enumValues.join(", ")}`:"",L=Object.entries(_.attributeReasons).map(([W,K])=>`
|
|
82
82
|
|