evalkit-py 0.3.0.dev27__py3-none-any.whl → 0.3.0.dev28__py3-none-any.whl
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.
- evalkit/bundled/docs/tracing.md +13 -0
- evalkit/bundled/skills/connect-traces/references/span-mapping-schema.md +5 -0
- evalkit/bundled/ui/assets/{cssMode-C6_VjZqd.js → cssMode-C3N68ICz.js} +1 -1
- evalkit/bundled/ui/assets/{editor.api-DnMOybRh.js → editor.api-D1rxHWTF.js} +1 -1
- evalkit/bundled/ui/assets/{freemarker2-CeDvoLdi.js → freemarker2-CtAJgev6.js} +1 -1
- evalkit/bundled/ui/assets/{handlebars-Dn_CNro-.js → handlebars-BwD-dTI2.js} +1 -1
- evalkit/bundled/ui/assets/{html-Dv3JrLYM.js → html-qsGdzg3l.js} +1 -1
- evalkit/bundled/ui/assets/{htmlMode-B5ORw1cs.js → htmlMode-Cai1v-Ix.js} +1 -1
- evalkit/bundled/ui/assets/{index-3ELhlCyg.js → index-uL5Ox6Wl.js} +3 -3
- evalkit/bundled/ui/assets/{javascript--wzyeLzQ.js → javascript-CjSrkLpv.js} +1 -1
- evalkit/bundled/ui/assets/{jsonMode-yFcMEfYG.js → jsonMode-BnVnDvgV.js} +1 -1
- evalkit/bundled/ui/assets/{liquid-BaKEGgGs.js → liquid-rQuWUkse.js} +1 -1
- evalkit/bundled/ui/assets/{lspLanguageFeatures-4Cm3DkaS.js → lspLanguageFeatures-BieGLabF.js} +1 -1
- evalkit/bundled/ui/assets/{mdx-qT8r4bCu.js → mdx-BgHduSm2.js} +1 -1
- evalkit/bundled/ui/assets/{monacoEditor-CqvaahBS.js → monacoEditor-DS_lvlYa.js} +4 -4
- evalkit/bundled/ui/assets/{python-ClylxRz4.js → python-DoC0juMr.js} +1 -1
- evalkit/bundled/ui/assets/{razor-DqIIoZCQ.js → razor-Ddn-d7Oz.js} +1 -1
- evalkit/bundled/ui/assets/{tsMode-BfwInMqQ.js → tsMode-Sno7luy5.js} +1 -1
- evalkit/bundled/ui/assets/{typescript-BajjTMnX.js → typescript-UXz5THvW.js} +1 -1
- evalkit/bundled/ui/assets/{workers-B2Sg_9GI.js → workers-GTw2k376.js} +1 -1
- evalkit/bundled/ui/assets/{xml-CszYn1a1.js → xml-Bfn1M0Fx.js} +1 -1
- evalkit/bundled/ui/assets/{yaml-CAhxcoaG.js → yaml-DjeJzq3Z.js} +1 -1
- evalkit/bundled/ui/index.html +1 -1
- evalkit/cli/traces_commands.py +6 -1
- evalkit/core/data/cost_map.json +85 -30
- evalkit/core/traces/mapping.py +17 -3
- {evalkit_py-0.3.0.dev27.dist-info → evalkit_py-0.3.0.dev28.dist-info}/METADATA +1 -1
- {evalkit_py-0.3.0.dev27.dist-info → evalkit_py-0.3.0.dev28.dist-info}/RECORD +31 -31
- {evalkit_py-0.3.0.dev27.dist-info → evalkit_py-0.3.0.dev28.dist-info}/WHEEL +0 -0
- {evalkit_py-0.3.0.dev27.dist-info → evalkit_py-0.3.0.dev28.dist-info}/entry_points.txt +0 -0
- {evalkit_py-0.3.0.dev27.dist-info → evalkit_py-0.3.0.dev28.dist-info}/licenses/LICENSE +0 -0
evalkit/bundled/docs/tracing.md
CHANGED
|
@@ -162,6 +162,19 @@ user can import traces from it into an OTel agent they can write, with
|
|
|
162
162
|
workspace, so traces imported into your personal workspace are visible to
|
|
163
163
|
everyone on the server. See [Where runs happen](workspaces.md).
|
|
164
164
|
|
|
165
|
+
## Message roles
|
|
166
|
+
|
|
167
|
+
evalkit reads message roles in any letter case and maps the names some frameworks use to four roles:
|
|
168
|
+
|
|
169
|
+
| Role on the span | Read as |
|
|
170
|
+
| -- | -- |
|
|
171
|
+
| `assistant`, `model` (Gemini, Google ADK), `ai` (LangChain), `bot` | `assistant` |
|
|
172
|
+
| `user`, `human` | `user` |
|
|
173
|
+
| `system`, `developer` (OpenAI) | `system` |
|
|
174
|
+
| `tool`, `function` | `tool` |
|
|
175
|
+
|
|
176
|
+
The trajectory drops messages with any other role, along with their tool calls. `evalkit traces check` warns on its `llm` line and names the unknown roles it found.
|
|
177
|
+
|
|
165
178
|
## Checking a session
|
|
166
179
|
|
|
167
180
|
```bash
|
|
@@ -86,3 +86,8 @@ tokens written to the prompt cache; it lands in the step's
|
|
|
86
86
|
with `role`, `content` (a string or a list of `{"type": "text", "text"}`
|
|
87
87
|
parts), `tool_calls` (`id`, `function.name`, `function.arguments` as a JSON
|
|
88
88
|
string) and `tool_call_id`.
|
|
89
|
+
|
|
90
|
+
Roles are read case-insensitively in every format. `model`, `ai` and `bot`
|
|
91
|
+
count as `assistant`, `human` as `user`, `developer` as `system` and
|
|
92
|
+
`function` as `tool`. The trajectory ignores messages with any other role,
|
|
93
|
+
and `evalkit traces check` warns about them.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D1rxHWTF.js";import{t}from"./workers-GTw2k376.js";import{_ as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,v as y}from"./lspLanguageFeatures-BieGLabF.js";var b=12e4,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=t({moduleId:`vs/language/css/cssWorker`,createWorker:()=>new Worker(new URL(`/assets/css.worker-DwfUZ3fB.js`,``+import.meta.url),{type:`module`}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}};function S(t){let n=[],s=[],c=new x(t);n.push(c);let g=(...e)=>c.getLanguageServiceWorker(...e);function y(){let{languageId:n,modeConfiguration:c}=t;w(s),c.completionItems&&s.push(e.registerCompletionItemProvider(n,new _(g,[`/`,`-`,`:`]))),c.hovers&&s.push(e.registerHoverProvider(n,new a(g))),c.documentHighlights&&s.push(e.registerDocumentHighlightProvider(n,new p(g))),c.definitions&&s.push(e.registerDefinitionProvider(n,new f(g))),c.references&&s.push(e.registerReferenceProvider(n,new o(g))),c.documentSymbols&&s.push(e.registerDocumentSymbolProvider(n,new u(g))),c.rename&&s.push(e.registerRenameProvider(n,new m(g))),c.colors&&s.push(e.registerColorProvider(n,new l(g))),c.foldingRanges&&s.push(e.registerFoldingRangeProvider(n,new v(g))),c.diagnostics&&s.push(new h(n,g,t.onDidChange)),c.selectionRanges&&s.push(e.registerSelectionRangeProvider(n,new d(g))),c.documentFormattingEdits&&s.push(e.registerDocumentFormattingEditProvider(n,new r(g))),c.documentRangeFormattingEdits&&s.push(e.registerDocumentRangeFormattingEditProvider(n,new i(g)))}return y(),n.push(C(s)),C(n)}function C(e){return{dispose:()=>w(e)}}function w(e){for(;e.length;)e.pop().dispose()}export{_ as CompletionAdapter,f as DefinitionAdapter,h as DiagnosticsAdapter,l as DocumentColorAdapter,r as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,g as DocumentLinkAdapter,i as DocumentRangeFormattingEditProvider,u as DocumentSymbolAdapter,v as FoldingRangeAdapter,a as HoverAdapter,o as ReferenceAdapter,m as RenameAdapter,d as SelectionRangeAdapter,x as WorkerManager,c as fromPosition,s as fromRange,S as setupMode,n as toRange,y as toTextEdit};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./index-
|
|
1
|
+
import{t as e}from"./index-uL5Ox6Wl.js";function t(e){if(e.length===0)throw Error(`Invalid tail call`);return[e.slice(0,e.length-1),e[e.length-1]]}function n(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0}function r(e,t){let n=e.length-1;t<n&&(e[t]=e[n]),e.pop()}function i(e,t,n){return a(e.length,r=>n(e[r],t))}function a(e,t){let n=0,r=e-1;for(;n<=r;){let e=(n+r)/2|0,i=t(e);if(i<0)n=e+1;else if(i>0)r=e-1;else return e}return-(n+1)}function o(e,t,n){if(e|=0,e>=t.length)throw TypeError(`invalid index`);let r=t[Math.floor(t.length*Math.random())],i=[],a=[],s=[];for(let e of t){let t=n(e,r);t<0?i.push(e):t>0?a.push(e):s.push(e)}return e<i.length?o(e,i,n):e<i.length+s.length?s[0]:o(e-(i.length+s.length),a,n)}function s(e,t){let n=[],r;for(let i of e.slice(0).sort(t))!r||t(r[0],i)!==0?(r=[i],n.push(r)):r.push(i);return n}function*c(e,t){let n,r;for(let i of e)r!==void 0&&t(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}function l(e,t){for(let n=0;n<=e.length;n++)t(n===0?void 0:e[n-1],n===e.length?void 0:e[n])}function u(e,t){for(let n=0;n<e.length;n++)t(n===0?void 0:e[n-1],e[n],n+1===e.length?void 0:e[n+1])}function d(e){return e.filter(e=>!!e)}function f(e){let t=0;for(let n=0;n<e.length;n++)e[n]&&(e[t]=e[n],t+=1);e.length=t}function p(e){return!Array.isArray(e)||e.length===0}function m(e){return Array.isArray(e)&&e.length>0}function h(e,t=e=>e){let n=new Set;return e.filter(e=>{let r=t(e);return!n.has(r)&&(n.add(r),!0)})}function g(e,t){let n=typeof t==`number`?e:0;typeof t==`number`?n=e:(n=0,t=e);let r=[];if(n<=t)for(let e=n;e<t;e++)r.push(e);else for(let e=n;e>t;e--)r.push(e);return r}function _(e,t,n){let r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)}function v(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function y(e,t){let n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function b(e,t){for(let n of t)e.push(n)}function x(e,t){let n=[];for(let r of e){let e=t(r);e!==void 0&&n.push(e)}return n}function S(e){return Array.isArray(e)?e:[e]}function C(e,t,n){let r=ee(e,t),i=e.length,a=n.length;e.length=i+a;for(let t=i-1;t>=r;t--)e[t+a]=e[t];for(let t=0;t<a;t++)e[t+r]=n[t]}function w(e,t,n,r){let i=ee(e,t),a=e.splice(i,n);return a===void 0&&(a=[]),C(e,i,r),a}function ee(e,t){return t<0?Math.max(t+e.length,0):Math.min(t,e.length)}var te;(function(e){function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(te||={});function ne(e,t){return(n,r)=>t(e(n),e(r))}function re(...e){return(t,n)=>{for(let r of e){let e=r(t,n);if(!te.isNeitherLessOrGreaterThan(e))return e}return te.neitherLessOrGreaterThan}}var ie=(e,t)=>e-t,ae=(e,t)=>ie(+!!e,+!!t);function oe(e){return(t,n)=>-e(t,n)}function se(e){return(t,n)=>t===void 0?n===void 0?te.neitherLessOrGreaterThan:te.lessThan:n===void 0?te.greaterThan:e(t,n)}var ce=class{constructor(e){this.firstIdx=0,this.items=e,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<=this.lastIdx&&e(this.items[t]);)t++;let n=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},le=class e{static{this.empty=new e(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||te.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}},ue=class e{constructor(e){this._indexMap=e}static createSortPermutation(t,n){let r=Array.from(t.keys()).sort((e,r)=>n(t[e],t[r]));return new e(r)}apply(e){return e.map((t,n)=>e[this._indexMap[n]])}inverse(){let t=this._indexMap.slice();for(let e=0;e<this._indexMap.length;e++)t[this._indexMap[e]]=e;return new e(t)}};function de(e){return e.reduce((e,t)=>e+t,0)}var fe=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?we.isErrorNoTelemetry(e)?new we(e.message+`
|
|
2
2
|
|
|
3
3
|
`+e.stack):Error(e.message+`
|
|
4
4
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D1rxHWTF.js";var t=[`assign`,`flush`,`ftl`,`return`,`global`,`import`,`include`,`break`,`continue`,`local`,`nested`,`nt`,`setting`,`stop`,`t`,`lt`,`rt`,`fallback`],n=[`attempt`,`autoesc`,`autoEsc`,`compress`,`comment`,`escape`,`noescape`,`function`,`if`,`list`,`items`,`sep`,`macro`,`noparse`,`noParse`,`noautoesc`,`noAutoEsc`,`outputformat`,`switch`,`visit`,`recurse`],r={close:`>`,id:`angle`,open:`<`},i={close:`\\]`,id:`bracket`,open:`\\[`},a={close:`[>\\]]`,id:`auto`,open:`[<\\[]`},o={close:`\\}`,id:`dollar`,open1:`\\$`,open2:`\\{`},s={close:`\\]`,id:`bracket`,open1:`\\[`,open2:`=`};function c(r){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],comments:{blockComment:[`${r.open}--`,`--${r.close}`]},autoCloseBefore:`
|
|
2
2
|
\r }]),.:;=`,autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`]}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],folding:{markers:{start:RegExp(`${r.open}#(?:${n.join(`|`)})([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),end:RegExp(`${r.open}/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),afterText:RegExp(`^${r.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${r.close}$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function l(){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],autoCloseBefore:`
|
|
3
3
|
\r }]),.:;=`,autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`]}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],folding:{markers:{start:RegExp(`[<\\[]#(?:${n.join(`|`)})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:RegExp(`[<\\[]/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:RegExp(`^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function u(e,t){let n=`_${e.id}_${t.id}`,r=e=>e.replace(/__id__/g,n),i=e=>{let t=e.source.replace(/__id__/g,n);return new RegExp(t,e.flags)};return{unicode:!0,includeLF:!1,start:r(`default__id__`),ignoreCase:!1,defaultToken:`invalid`,tokenPostfix:`.freemarker2`,brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`<`,close:`>`,token:`delimiter.angle`}],[r(`open__id__`)]:new RegExp(e.open),[r(`close__id__`)]:new RegExp(e.close),[r(`iOpen1__id__`)]:new RegExp(t.open1),[r(`iOpen2__id__`)]:new RegExp(t.open2),[r(`iClose__id__`)]:new RegExp(t.close),[r(`startTag__id__`)]:i(/(@open__id__)(#)/),[r(`endTag__id__`)]:i(/(@open__id__)(\/#)/),[r(`startOrEndTag__id__`)]:i(/(@open__id__)(\/?#)/),[r(`closeTag1__id__`)]:i(/((?:@blank)*)(@close__id__)/),[r(`closeTag2__id__`)]:i(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:[`false`,`true`,`in`,`as`,`using`],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:[`->`,`->`],delimiters:[`;`,`:`,`,`,`.`],stringOperators:[`lte`,`lt`,`gte`,`gt`],noParseTags:[`noparse`,`noParse`,`comment`],tokenizer:{[r(`default__id__`)]:[{include:r(`@directive_token__id__`)},{include:r(`@interpolation_and_text_token__id__`)}],[r(`fmExpression__id__.directive`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`fmExpression__id__.interpolation`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`inParen__id__.plain`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`inParen__id__.gt`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`noSpaceExpression__id__`)]:[{include:r(`@no_space_expression_end_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`unifiedCall__id__`)]:[{include:r(`@unified_call_token__id__`)}],[r(`singleString__id__`)]:[{include:r(`@string_single_token__id__`)}],[r(`doubleString__id__`)]:[{include:r(`@string_double_token__id__`)}],[r(`rawSingleString__id__`)]:[{include:r(`@string_single_raw_token__id__`)}],[r(`rawDoubleString__id__`)]:[{include:r(`@string_double_raw_token__id__`)}],[r(`expressionComment__id__`)]:[{include:r(`@expression_comment_token__id__`)}],[r(`noParse__id__`)]:[{include:r(`@no_parse_token__id__`)}],[r(`terseComment__id__`)]:[{include:r(`@terse_comment_token__id__`)}],[r(`directive_token__id__`)]:[[i(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{cases:{"@noParseTags":{token:`tag`,next:r(`@noParse__id__.$3`)},"@default":{token:`tag`}}},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)(@)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`,next:r(`@unifiedCall__id__`)}]],[i(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)#--/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:{token:`comment`,next:r(`@terseComment__id__`)}],[i(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag.invalid`,next:r(`@fmExpression__id__.directive`)}]]],[r(`interpolation_and_text_token__id__`)]:[[i(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:t.id===`bracket`?`@brackets.interpolation`:`delimiter.interpolation`},{token:t.id===`bracket`?`delimiter.interpolation`:`@brackets.interpolation`,next:r(`@fmExpression__id__.interpolation`)}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:`source`}]],[r(`string_single_token__id__`)]:[[/[^'\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/'/,{token:`string`,next:`@pop`}]],[r(`string_double_token__id__`)]:[[/[^"\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/"/,{token:`string`,next:`@pop`}]],[r(`string_single_raw_token__id__`)]:[[/[^']+/,{token:`string.raw`}],[/'/,{token:`string.raw`,next:`@pop`}]],[r(`string_double_raw_token__id__`)]:[[/[^"]+/,{token:`string.raw`}],[/"/,{token:`string.raw`,next:`@pop`}]],[r(`expression_token__id__`)]:[[/(r?)(['"])/,{cases:{"r'":[{token:`keyword`},{token:`string.raw`,next:r(`@rawSingleString__id__`)}],'r"':[{token:`keyword`},{token:`string.raw`,next:r(`@rawDoubleString__id__`)}],"'":[{token:`source`},{token:`string`,next:r(`@singleString__id__`)}],'"':[{token:`source`},{token:`string`,next:r(`@doubleString__id__`)}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:`number`},"@default":{token:`number.float`}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:`delimiter`},{token:``},{token:`identifier`}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:`meta.arrow`},"@delimiters":{token:`delimiter`},"@default":{token:`operators`}}}],[/@id/,{cases:{"@keywords":{token:`keyword.$0`},"@stringOperators":{token:`operators`},"@default":{token:`identifier`}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\]":{cases:{...t.id===`bracket`?{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}}:{},...e.id===`bracket`?{"$S2==directive":{token:`@brackets.directive`,next:`@popall`}}:{},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\(":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"\\)":{cases:{[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\{":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\}":{cases:{...t.id===`bracket`?{}:{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}}}}],[/\$\{/,{token:`delimiter.invalid`}]],[r(`blank_and_expression_comment_token__id__`)]:[[/(?:@blank)+/,{token:``}],[/[<\[][#!]--/,{token:`comment`,next:r(`@expressionComment__id__`)}]],[r(`directive_end_token__id__`)]:[[/>/,e.id===`bracket`?{token:`operators`}:{token:`@brackets.directive`,next:`@popall`}],[i(/(\/)(@close__id__)/),[{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]]],[r(`greater_operators_token__id__`)]:[[/>/,{token:`operators`}],[/>=/,{token:`operators`}]],[r(`no_space_expression_end_token__id__`)]:[[/(?:@blank)+/,{token:``,switchTo:r(`@fmExpression__id__.directive`)}]],[r(`unified_call_token__id__`)]:[[/(@id)((?:@blank)+)/,[{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(@id)(\/?)(@close__id__)/),[{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]],[/./,{token:`@rematch`,next:r(`@noSpaceExpression__id__`)}]],[r(`no_parse_token__id__`)]:[[i(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``},{token:`@brackets.directive`,next:`@popall`}],"$S2==comment":[{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`}],"@default":[{token:`source`},{token:`source`},{token:`source`},{token:`source`},{token:`source`}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:`comment`},"@default":{token:`source`}}}]],[r(`expression_comment_token__id__`)]:[[/--[>\]]/,{token:`comment`,next:`@pop`}],[/[^\->\]]+|[>\]\-]/,{token:`comment`}]],[r(`terse_comment_token__id__`)]:[[i(/--(?:@close__id__)/),{token:`comment`,next:`@popall`}],[/[^<\[\-]+|[<\[\-]/,{token:`comment`}]]}}}function d(e){let t=u(r,e),n=u(i,e),o=u(a,e);return{...t,...n,...o,unicode:!0,includeLF:!1,start:`default_auto_${e.id}`,ignoreCase:!1,defaultToken:`invalid`,tokenPostfix:`.freemarker2`,brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`<`,close:`>`,token:`delimiter.angle`}],tokenizer:{...t.tokenizer,...n.tokenizer,...o.tokenizer}}}var f={conf:c(r),language:u(r,o)},p={conf:c(i),language:u(i,o)},m={conf:c(r),language:u(r,s)},h={conf:c(i),language:u(i,s)},g={conf:l(),language:d(o)},_={conf:l(),language:d(s)};export{m as TagAngleInterpolationBracket,f as TagAngleInterpolationDollar,_ as TagAutoInterpolationBracket,g as TagAutoInterpolationDollar,h as TagBracketInterpolationBracket,p as TagBracketInterpolationDollar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D1rxHWTF.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`{{!--`,`--}}`]},brackets:[[`<!--`,`-->`],[`<`,`>`],[`{{`,`}}`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`<`,close:`>`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,tokenizer:{root:[[/\{\{!--/,`comment.block.start.handlebars`,`@commentBlock`],[/\{\{!/,`comment.start.handlebars`,`@comment`],[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.root`}],[/<!DOCTYPE/,`metatag.html`,`@doctype`],[/<!--/,`comment.html`,`@commentHtml`],[/(<)(\w+)(\/>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)(script)/,[`delimiter.html`,{token:`tag.html`,next:`@script`}]],[/(<)(style)/,[`delimiter.html`,{token:`tag.html`,next:`@style`}]],[/(<)([:\w]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)(\w+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/</,`delimiter.html`],[/\{/,`delimiter.html`],[/[^<{]+/]],doctype:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/[^>]+/,`metatag.content.html`],[/>/,`metatag.html`,`@pop`]],comment:[[/\}\}/,`comment.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentBlock:[[/--\}\}/,`comment.block.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentHtml:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/-->/,`comment.html`,`@pop`],[/[^-]+/,`comment.content.html`],[/./,`comment.content.html`]],otherTag:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.otherTag`}],[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.script`}],[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],scriptAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterType`}],[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.scriptEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],style:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.style`}],[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],styleAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterType`}],[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.styleEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],handlebarsInSimpleState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`}],{include:`handlebarsRoot`}],handlebarsInEmbeddedState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}],{include:`handlebarsRoot`}],handlebarsRoot:[[/"[^"]*"/,`string.handlebars`],[/[#/][^\s}]+/,`keyword.helper.handlebars`],[/else\b/,`keyword.helper.handlebars`],[/[\s]+/],[/[^}]/,`variable.parameter.handlebars`]]}};export{n as conf,r as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D1rxHWTF.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<!--`,`-->`],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:RegExp(`^\\s*<!--\\s*#region\\b.*-->`),end:RegExp(`^\\s*<!--\\s*#endregion\\b.*-->`)}}},r={defaultToken:``,tokenPostfix:`.html`,ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,`metatag`,`@doctype`],[/<!--/,`comment`,`@comment`],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,[`delimiter`,`tag`,``,`delimiter`]],[/(<)(script)/,[`delimiter`,{token:`tag`,next:`@script`}]],[/(<)(style)/,[`delimiter`,{token:`tag`,next:`@style`}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/</,`delimiter`],[/[^<]+/]],doctype:[[/[^>]+/,`metatag.content`],[/>/,`metatag`,`@pop`]],comment:[[/-->/,`comment`,`@pop`],[/[^-]+/,`comment.content`],[/./,`comment.content`]],otherTag:[[/\/?>/,`delimiter`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],scriptAfterType:[[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/"module"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/'module'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/>/,{token:`delimiter`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]],style:[[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],styleAfterType:[[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/>/,{token:`delimiter`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]]}};export{n as conf,r as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D1rxHWTF.js";import{t}from"./workers-GTw2k376.js";import{_ as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,v as y}from"./lspLanguageFeatures-BieGLabF.js";var b=12e4,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=t({moduleId:`vs/language/html/htmlWorker`,createWorker:()=>new Worker(new URL(`/assets/html.worker-D9ugpX4y.js`,``+import.meta.url),{type:`module`}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}},S=class extends _{constructor(e){super(e,[`.`,`:`,`<`,`"`,`=`,`/`])}};function C(t){let n=new x(t),o=(...e)=>n.getLanguageServiceWorker(...e),s=t.languageId;e.registerCompletionItemProvider(s,new S(o)),e.registerHoverProvider(s,new a(o)),e.registerDocumentHighlightProvider(s,new p(o)),e.registerLinkProvider(s,new g(o)),e.registerFoldingRangeProvider(s,new v(o)),e.registerDocumentSymbolProvider(s,new u(o)),e.registerSelectionRangeProvider(s,new d(o)),e.registerRenameProvider(s,new m(o)),s===`html`&&(e.registerDocumentFormattingEditProvider(s,new r(o)),e.registerDocumentRangeFormattingEditProvider(s,new i(o)))}function w(t){let n=[],o=[],s=new x(t);n.push(s);let c=(...e)=>s.getLanguageServiceWorker(...e);function l(){let{languageId:n,modeConfiguration:s}=t;E(o),s.completionItems&&o.push(e.registerCompletionItemProvider(n,new S(c))),s.hovers&&o.push(e.registerHoverProvider(n,new a(c))),s.documentHighlights&&o.push(e.registerDocumentHighlightProvider(n,new p(c))),s.links&&o.push(e.registerLinkProvider(n,new g(c))),s.documentSymbols&&o.push(e.registerDocumentSymbolProvider(n,new u(c))),s.rename&&o.push(e.registerRenameProvider(n,new m(c))),s.foldingRanges&&o.push(e.registerFoldingRangeProvider(n,new v(c))),s.selectionRanges&&o.push(e.registerSelectionRangeProvider(n,new d(c))),s.documentFormattingEdits&&o.push(e.registerDocumentFormattingEditProvider(n,new r(c))),s.documentRangeFormattingEdits&&o.push(e.registerDocumentRangeFormattingEditProvider(n,new i(c)))}return l(),n.push(T(o)),T(n)}function T(e){return{dispose:()=>E(e)}}function E(e){for(;e.length;)e.pop().dispose()}export{_ as CompletionAdapter,f as DefinitionAdapter,h as DiagnosticsAdapter,l as DocumentColorAdapter,r as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,g as DocumentLinkAdapter,i as DocumentRangeFormattingEditProvider,u as DocumentSymbolAdapter,v as FoldingRangeAdapter,a as HoverAdapter,o as ReferenceAdapter,m as RenameAdapter,d as SelectionRangeAdapter,x as WorkerManager,c as fromPosition,s as fromRange,w as setupMode,C as setupMode1,n as toRange,y as toTextEdit};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monacoEditor-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monacoEditor-DS_lvlYa.js","assets/editor.api-D1rxHWTF.js","assets/editor-DjpsE8to.css","assets/monacoEditor-n7clI0si.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function A(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function re(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,re(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),re(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=re(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=re(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return re(A(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ie(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ae(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var oe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function se(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ce(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else se(ce.bind(null,e))}var le={map:ie,forEach:function(e,t,n){ie(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ie(e,function(){t++}),t},toArray:function(e){return ie(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=le,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ce,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ae}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=se,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&te(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function te(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),ee=Symbol.for(`react.portal`),te=Symbol.for(`react.fragment`),ne=Symbol.for(`react.strict_mode`),A=Symbol.for(`react.profiler`),re=Symbol.for(`react.consumer`),ie=Symbol.for(`react.context`),ae=Symbol.for(`react.forward_ref`),oe=Symbol.for(`react.suspense`),se=Symbol.for(`react.suspense_list`),ce=Symbol.for(`react.memo`),le=Symbol.for(`react.lazy`),ue=Symbol.for(`react.activity`),de=Symbol.for(`react.legacy_hidden`),fe=Symbol.for(`react.memo_cache_sentinel`),pe=Symbol.for(`react.view_transition`),me=Symbol.for(`react.recoverable`),he=Symbol.iterator;function ge(e){return typeof e!=`object`||!e?null:(e=he&&e[he]||e[`@@iterator`],typeof e==`function`?e:null)}var _e=Symbol.for(`react.client.reference`);function ve(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===_e?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case te:return`Fragment`;case A:return`Profiler`;case ne:return`StrictMode`;case oe:return`Suspense`;case se:return`SuspenseList`;case ue:return`Activity`;case pe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ee:return`Portal`;case ie:return e.displayName||`Context`;case re:return(e._context.displayName||`Context`)+`.Consumer`;case ae:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ce:return t=e.displayName||null,t===null?ve(e.type)||`Memo`:t;case le:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var ye=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xe={pending:!1,data:null,method:null,action:null},Se=[],Ce=-1;function we(e){return{current:e}}function Te(e){0>Ce||(e.current=Se[Ce],Se[Ce]=null,Ce--)}function Ee(e,t){Ce++,Se[Ce]=e.current,e.current=t}var De=we(null),Oe=we(null),ke=we(null),Ae=we(null);function je(e,t){switch(Ee(ke,t),Ee(Oe,e),Ee(De,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Dp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Dp(t),e=Op(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Te(De),Ee(De,e)}function Me(){Te(De),Te(Oe),Te(ke)}function Ne(e){var t=e.memoizedState;t!==null&&(Ch._currentValue=t.memoizedState,Ee(Ae,e)),t=De.current;var n=Op(t,e.type);t!==n&&(Ee(Oe,e),Ee(De,n))}function Pe(e){Oe.current===e&&(Te(De),Te(Oe)),Ae.current===e&&(Te(Ae),Ch._currentValue=xe)}var Fe,Ie;function Le(e){if(Fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Fe=t&&t[1]||``,Ie=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+Fe+e+Ie}var Re=!1;function ze(e,t){if(!e||Re)return``;Re=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -454,7 +454,7 @@ The same steps work in any CI: install, log in, lint or sync.
|
|
|
454
454
|
refuses sync; approved cases reach it through promotion.
|
|
455
455
|
- Synced cases start Unreviewed. Reviewers of the workspace approve them; see
|
|
456
456
|
the [Quickstart](quickstart.md).
|
|
457
|
-
`},{id:`case-schema`,label:`Case schema`,group:`Get started`,body:'# Case schema\n\nThis page lists every key a case YAML file may hold, with one example for each evaluator. `evalkit lint` checks a file against this schema. The machine-readable form is `cases-v1.json`, written by `evalkit contracts export`.\n\n## File shapes\n\nA case file is one of:\n\n- a single case (a mapping with `id`)\n- a list of cases and overlays (an overlay is an entry with `extends`)\n- a mapping with any of `defaults`, `cases` and `overlays`\n\n```yaml\ndefaults:\n tags: [balance-sheet]\n input: {company: acme}\n max_response_time: 90\ncases:\n - id: acme-total-assets-fy2024\n input:\n question: What were Acme\'s total assets as of 31 March 2024?\n evaluators:\n output:\n answer_rubrics:\n rubrics:\n - rubric: Total assets as of 31 March 2024 are $4.2 billion.\n type: factual_retrieval\n```\n\n`defaults` takes only `input`, `tags`, `max_response_time` and `agents` (for overlays). A case\'s own `input` keys and `max_response_time` win over the defaults; tags are merged.\n\n## Case keys\n\n| Key | Type | Meaning |\n| -- | -- | -- |\n| `id` | string, required | The case\'s identity, shared by every workspace. |\n| `tags` | list of strings | Labels for `evalkit run --tag`. The case\'s folder in the suite is added as a tag too. |\n| `input` | mapping | Sent to the agent as is. Most agents read `input.question`. |\n| `fixtures` | list of strings | Keys from `fixtures.yaml` to attach as files. |\n| `expected` | mapping | Free-form ground truth, passed to custom evaluators. |\n| `evaluators` | mapping | Which evaluators score this case. See below. |\n\n## Evaluators\n\nEvaluators sit under `evaluators.output`, `evaluators.trajectory` or `evaluators.custom`. The scorecard groups their scores into buckets, but the bucket names are not YAML keys:\n\n| Scorecard bucket | YAML key |\n| -- | -- |\n| content | `evaluators.output.answer_rubrics` |\n| presentation | `evaluators.output.presentation_judge` |\n| efficiency | `evaluators.output.max_response_time` |\n| trajectory | `evaluators.trajectory.trajectory_rubrics`, `evaluators.trajectory.tool_trajectory_match`, `evaluators.trajectory.required_tools_called` |\n| custom | `evaluators.custom.<name>` |\n\n### answer_rubrics\n\nWhat a correct answer contains. The judge marks each rubric `satisfied`, `incorrect` or `absent`.\n\n```yaml\nevaluators:\n output:\n answer_rubrics:\n rubrics:\n - rubric: Revenue for FY2024 is $3.52 billion.\n type: factual_retrieval # or derived_computation, analysis_interpretation\n source: the FY2024 annual report # optional, factual_retrieval only\n - rubric: Revenue grew 12% from FY2023 to FY2024.\n type: derived_computation\n```\n\nWrite one assertion per rubric. A rubric that bundles two ("states $300/month and explains why") fails as a whole when the answer gets only one part right, so a correct answer can be marked wrong. Split it into two rubrics.\n\n### presentation_judge\n\nHow the answer shows its content: units, columns, an artifact relayed rather than restated. Each entry has exactly one of `rubric` (a property the answer must have) or `forbid` (a property it must not have). At least one entry must be a `rubric`.\n\n```yaml\nevaluators:\n output:\n presentation_judge:\n rubrics:\n - rubric: A store count for each fiscal year FY2021–FY2025, as a table or a labelled list.\n points: 2 # optional weight, 1–10, default 1\n - forbid: Figures given without a currency unit.\n note: Rupee or dollar both fine. # optional, shown to the judge\n```\n\n### max_response_time\n\nA cap on the run\'s wall-clock time, in seconds. The value is a mapping, not a bare number. Only `defaults.max_response_time` also takes a bare number.\n\n```yaml\nevaluators:\n output:\n max_response_time:\n max_seconds: 90\n```\n\n### trajectory_rubrics\n\nCheckpoints the trajectory must show, one sentence each. Order is not graded.\n\n```yaml\nevaluators:\n trajectory:\n trajectory_rubrics:\n rubrics:\n - Retrieves FY2024 Platform revenue as $3,522,776,000.\n - Rounds the final figure to the nearest basis point.\n```\n\n### tool_trajectory_match\n\nExpected tool calls, matched by name and args. Tool names must match the trajectory exactly. The score is the share of expected calls found; `ordered: true` also requires them in this order.\n\n```yaml\nevaluators:\n trajectory:\n tool_trajectory_match:\n ordered: false\n expected:\n - name: get_financials\n args: {ticker: ACME, period: FY2024}\n args_mode: subset # subset, exact, ignore or substring\n match_overrides: # optional, per arg: equals or substring\n period: substring\n```\n\n### required_tools_called\n\nTools the agent must call at least once. The score is the share called.\n\n```yaml\nevaluators:\n trajectory:\n required_tools_called:\n tools: [get_financials, search_filings]\n```\n\n### custom\n\nRemote evaluators and Python evaluators, keyed by their name. The block is passed to the evaluator as `config`, untouched.\n\n```yaml\nevaluators:\n custom:\n sql_matches:\n table: revenue\n```\n\n## Python evaluators\n\nA Python evaluator receives an `EvalCase` and an `EvalRun` and returns a float, a `ScoreItem` or a list of them. All three import from `evalkit.sdk`.\n\n```python\nfrom evalkit.sdk import EvalCase, EvalRun, ScoreItem, evaluator\n\n\n@evaluator(name="sql_matches")\ndef sql_matches(case: EvalCase, run: EvalRun) -> ScoreItem:\n table = case.config["table"]\n return ScoreItem(name="sql_matches", score=float(table in run.answer))\n```\n\n| `EvalCase` field | Meaning |\n| -- | -- |\n| `id` | Case id. |\n| `input` | Case input, verbatim. |\n| `expected` | The case\'s `expected` block, or `None`. |\n| `config` | This evaluator\'s block from `evaluators.custom`. |\n\n| `EvalRun` field | Meaning |\n| -- | -- |\n| `answer` | The final answer. A structured output as JSON text when the agent returned only that. |\n| `output` | The structured output, or `None`. |\n| `trajectory` | The ATIF trajectory as a dict. |\n\n`ScoreItem` has `name`, `score` (`None` means no reading), `label` and `explanation`.\n\n## Overlays\n\nAn overlay adds evaluators to a case in another suite, for the agents it names. It may add `tags`, `evaluators.custom` and the `tool_trajectory_match` and `required_tools_called` trajectory evaluators.\n\n```yaml\noverlays:\n - extends: acme-total-assets-fy2024\n agents: [support-bot]\n evaluators:\n trajectory:\n required_tools_called:\n tools: [get_financials]\n```\n'},{id:`sdk-runs`,label:`SDK runs`,group:`Traces`,body:'# SDK runs\n\n`run_experiment` runs an experiment from your own code: it calls your task once per case and repetition, stores the runs on this server, and scores them with the judge, the remote evaluators of the agent\'s workspace and any Python evaluators you pass. The agent is a code-driven agent on the server (no harness URL), created once with `evalkit agents create`. Invoking the agent, timeouts and stopping are your code.\n\n```python\n# eval/run.py — uv run python eval/run.py\nfrom evalkit.sdk import run_experiment, RunResult, evaluator, tracing\nfrom myagent import MyAgent, setup_tracing\n\nsetup_tracing() # your own OpenTelemetry provider and instrumentors\ntracing.register(agent="myagent-sdk") # add this server as an export destination\nagent = MyAgent()\n\ndef task(input: dict, files: list) -> str:\n return agent.ask(input["question"], attachments=[f.path for f in files])\n\n@evaluator(name="citation_check")\ndef citation_check(case, run) -> float:\n cited = {c["url"] for c in (run.output or {}).get("citations", [])}\n return 1.0 if cited >= set(case.config["required"]) else 0.0\n\nif __name__ == "__main__":\n result = run_experiment(dataset="finance", agent="myagent-sdk", task=task,\n evaluators=[citation_check], concurrency=4)\n print(result.url)\n```\n\n## The task\n\nA sync or async callable. Parameters bind **by name** from this set, so their order does not matter; any other required parameter is an error before the first call, and an optional one keeps its default.\n\n| Parameter | Value |\n| ---------- | --------------------------------------------------------------------- |\n| `input` | the case input, verbatim, minus `files` |\n| `files` | `list[Fixture]`, the case\'s fixture files, downloaded before the call |\n| `model` | the `model` argument of `run_experiment`, or `None` |\n| `metadata` | a dict with the keys below |\n\nA `Fixture` has:\n\n- `name`: the fixture key the case names.\n- `path`: where the file sits on this machine.\n- `context`: the file\'s description from the fixture registry, or `None`. A Harness API agent gets the same text with each file; show it to your agent the same way (for example an "Attached files" block ahead of the question).\n\n`metadata` holds:\n\n- `session_id`: the SDK\'s session id for this run, the `session.id` of its `evalkit.run` span.\n- `experiment_id`: the experiment, or `None` on a dry run.\n- `case_id`: the case.\n- `repetition`: 1 for the first repetition, 2 for the second, and so on.\n- `tags`: the case\'s tags.\n\n`model` is the only way `run_experiment(model=...)` reaches your agent. The experiment records the requested model either way, so a task without a `model` parameter would silently run the agent\'s default; `run_experiment` prints a warning before the first call when that happens.\n\nA task with exactly one parameter whose name is not in the table (`def task(q)`) receives the input. Return a `str` (the answer), a `dict` (the structured output) or a `RunResult`:\n\n```python\nfrom evalkit.sdk import RunResult\n\nRunResult(answer="…", output={"citations": []}, model="gpt-5",\n session_id="…", # override the session the SDK polls\n trajectory={...}) # push an ATIF document instead of tracing\n```\n\nA task that raises records the run as `failed` with the exception and the experiment continues.\n\n## An agent in another process\n\nThe SDK stamps `session.id` and the `evalkit.*` attributes only on spans made in this Python process. An agent behind HTTP or a job queue, or written in another language, joins the run in one of two ways. Pick one, not both.\n\n- **Continue the trace.** Inject the W3C trace context into the request and have the agent start its spans from it. Every span in a trace belongs to the session of the trace\'s root, the SDK\'s `evalkit.run` span, even if the agent stamps its own `session.id` or `gen_ai.conversation.id`.\n\n ```python\n from opentelemetry import propagate\n\n def task(input: dict) -> str:\n headers: dict[str, str] = {}\n propagate.inject(headers) # adds traceparent\n return httpx.post(AGENT_URL, json=input, headers=headers).json()["answer"]\n ```\n\n- **Return the agent\'s session.** The agent puts its own session id on its root span as `session.id`, and the task returns it. Use this when the trace context cannot reach the agent, for example through a queue. The SDK moves its `evalkit.run` span into that session, so no empty session is left behind, and the trajectory is built from the agent\'s trace.\n\n ```python\n def task(input: dict) -> RunResult:\n job = agent_api.start(input["question"]) # your API returns the session it opened\n return RunResult(answer=job.wait(), session_id=job.session_id)\n ```\n\n If your API cannot tell you the session id, send it one instead: pass `metadata["session_id"]` along with the job and have the agent use it as its session id (or wrap the job in `tracing.eval_run(metadata)`, see [Tracing](tracing.md)). Its spans then join the SDK\'s session and the task returns only the answer.\n\n ```python\n def task(input: dict, metadata: dict) -> str:\n return queue.submit(input["question"], session_id=metadata["session_id"]).wait()\n ```\n\nEither way the Runs page links the session to its experiment and case.\n\nThe agent\'s exporter needs its own token. Mint one with `evalkit tokens create --agent <name>`; it never expires. Your login token expires, and an exporter that holds it then drops every span with nothing but a line in its own log.\n\n## Datasets and workspaces\n\n- `dataset="finance"` runs your own workspace\'s copy; if `finance` is a directory under `cases` it is synced first.\n- `dataset="finance@dev"` or `dataset="finance", workspace="dev"` runs the shared cases, every review state included.\n- `case_ids=[...]`, `tags=[...]`, `repetitions`, `model` and `resume=<experiment id>` mean what the same options mean on `evalkit run`.\n- `dry_run=True` runs one case (`dry_run=N` runs N) without creating an experiment and prints the answer and what the server made of the session. If the server cannot read a session, that case prints a `trajectory read failed` line and the dry run goes on. Use it while wiring up tracing; the session shows on the Runs page with its case question and case id.\n\n## Notebooks\n\n`run_experiment` refuses to run inside a running event loop. In a notebook use the async form:\n\n```python\nfrom evalkit.sdk import arun_experiment\n\nresult = await arun_experiment(dataset="finance", agent="myagent-sdk", task=task)\n```\n\n## The agent and the judge\n\n`agent="myagent-sdk"` names an agent on the server; a bare name means your own workspace. Create it once:\n\n```bash\nevalkit agents create myagent-sdk --trajectory-source otel --mapping openinference.json \\\n --max-concurrent-runs 4 --provides thinking=true\n```\n\nIts `answer` rule and `exclude_spans` live in its span mapping. `evalkit.yaml` is still required; it holds the cases, fixtures and credentials.\n\nThe judge is the server\'s default unless you pass one:\n\n```python\nfrom evalkit.sdk import Judge, run_experiment\n\nrun_experiment(dataset="finance", agent="myagent-sdk", task=task,\n judge=Judge(base_url="https://litellm.example.com", model="gpt-5"))\n```\n\nAn admin sets the default judge with `evalkit judge-default set`. Either way, the SDK reads the judge\'s key from `credentials.llm_providers` in `evalkit.yaml`, keyed by the judge\'s base URL.\n\n## Capabilities\n\nA code-driven agent has no `GET /capabilities`, so evalkit writes its capabilities onto each experiment itself: `trajectory`, `tool_calls`, `token_usage` and `run_listing` are true; `thinking`, `artifacts` and `workspace` are false. Evaluators gated on a capability skip when it is false. evalkit does not read capabilities from the spans. Set `provides` on the agent (`evalkit agents create --provides`, or `evalkit agents edit`) to declare what it really does, for example `thinking: true` when its spans carry the model\'s reasoning. Declare only what works: a false `true` produces failing scores blamed on the agent.\n\n## Python evaluators\n\n`@evaluator(name=..., kind="evaluator" | "gauge", requires_trajectory=False)` turns a function into an evaluator. It receives the same `EvalCase` and `EvalRun` the HTTP Custom Evaluator API sends: the case id, input, expected block and this evaluator\'s config from the case YAML; the answer, structured output and the ATIF trajectory as a dict. Return a float, a `ScoreItem` (`from evalkit.sdk import ScoreItem`), or a list of them. [Case schema](case-schema.md#python-evaluators) lists the fields of `EvalCase` and `EvalRun`. A case selects it by name under `evaluators.custom`, exactly like an HTTP evaluator.\n\n## Bring your own benchmark\n\nA published benchmark is a suite plus a Python evaluator:\n\n1. Write a script that turns the benchmark\'s file into case YAML. Each case gets the question as `input`. Its grading data (rubrics, reference answer) goes under `evaluators.custom.<grader name>`.\n2. `evalkit sync <dir>` puts it in a dataset like any suite.\n3. Write the grader as an `@evaluator` with that name. It reads the grading data from `case.config`, and calls its own judge models if it needs any. Pass it to `run_experiment`.\n\n`evalkit lint` and `evalkit sync` warn with `W-CUSTOM-UNKNOWN` for the grader name, because the server can\'t see a Python evaluator. That warning is expected.\n\n## Re-scoring\n\nPython evaluators live in your script, so a re-score that needs them starts from the script:\n\n```python\nfrom evalkit.sdk import evaluate_experiment\n\nevaluate_experiment(experiment_id="…", evaluators=[citation_check],\n refetch_trajectories=True)\n```\n\n`refetch_trajectories` polls the collector again for runs whose trajectory was `partial` or `unavailable` and re-scores them. `evalkit evaluate` refuses experiments that used Python evaluators and points here.\n\nNext: [Tracing](tracing.md).\n'},{id:`tracing`,label:`Tracing`,group:`Traces`,body:"# Tracing\n\nThe collector is an OTLP/HTTP endpoint on this server:\n\n```\nPOST {{origin}}/api/otel/v1/traces\n```\n\nIt accepts `application/x-protobuf` and `application/json`, gzip or not, from any OpenTelemetry SDK. Spans are stored as received and converted to ATIF with the agent's mapping when a run or the Runs page asks for them.\n\n## From Python with the SDK\n\n```python\nfrom evalkit.sdk import tracing\n\ntracing.register(agent=\"myagent-sdk\")\n```\n\n`register` adds an exporter for this server to your global tracer provider, creating one if none is set. Your existing exporters keep running. The exporter carries an `X-Evalkit-Agent` header, which names the agent on the server; the `evalkit.agent` resource attribute is only set when `register` creates the provider itself. It reads the server URL from `EVALKIT_SERVER_URL` or your `evalkit login`, and the token from `EVALKIT_OTEL_TOKEN` (an agent token), then `EVALKIT_TOKEN`, then your `evalkit login`. It needs the `otel` extra.\n\n### An existing span pipeline\n\n`register` changes the global provider. When you build your own pipeline, take evalkit's parts and put them where you need them:\n\n```python\nfrom evalkit.sdk import tracing\n\nexporter = tracing.exporter(agent=\"myagent-sdk\") # OTLPSpanExporter: URL, token and X-Evalkit-Agent set\nprocessor = tracing.processor(agent=\"myagent-sdk\") # batch processor around that exporter\nprovider.add_span_processor(processor) # what register does for you\nheaders = tracing.headers(agent=\"myagent-sdk\") # the same headers, for an exporter you build yourself\n```\n\nAll three resolve the server and token the same way `register` does. `processor` also stamps the run's `session.id` and `evalkit.*` attributes on spans that start under a task call (or under `tracing.eval_run`, below).\n\nSpans handed straight to a processor or exporter, for example by a bridge that converts another tool's spans, never pass through the provider, so `register` cannot see them. Hand them to `tracing.processor(...)` too: give the bridge that processor, or one processor that fans out to all of yours and evalkit's (OpenTelemetry's `SynchronousMultiSpanProcessor`). Those spans are already finished, so `processor` cannot stamp them: the bridge copies `session.id` onto each span it converts. How eval-only export treats them is below.\n\n### Choosing what a shared worker exports\n\nA worker that serves both app runs (production, staging or manual use) and eval runs exports every span it makes, so every app turn also becomes a session on this server, which you can browse on the Runs page and pull with `evalkit runs pull <agent> --source app`. Whether to send app traffic is your choice. `eval_run` marks eval runs either way, and to send only those, filter on the mark:\n\n```python\nfrom evalkit.sdk import tracing\n\nprovider.add_span_processor(tracing.processor(agent=\"myagent\", only=tracing.is_eval_span))\n\ndef handle_job(job):\n if job.evalkit: # the task's metadata, sent along with the job\n with tracing.eval_run(job.evalkit):\n return run_agent(job)\n return run_agent(job)\n```\n\nThe task passes its `metadata` argument along with the job (see [SDK runs](sdk-runs.md)). `eval_run` stamps `session.id` (the SDK's session id), `evalkit.case_id`, `evalkit.experiment_id` and `evalkit.repetition` on every span started inside it, so the worker's spans join the run's session and the task returns only the answer. `is_eval_span` is true for a span that carries `evalkit.case_id`. The stamp lives in a context variable: spans started in another thread need that thread to run inside `eval_run` too.\n\nA harness agent learns that a run is an eval run from the `metadata` of `POST /runs`: `experiment_id`, `case_id` and `repetition`. That is what it passes to `eval_run`, with the `run_id` it returns as the session id: `tracing.eval_run({**metadata, \"session_id\": run_id})`.\n\n`only` decides by trace, not by span. It is any function that takes a span and returns a bool, and it runs on each span as the span starts and again as it ends. Once it is true for one span, the processor keeps every span of that span's trace that reaches it: spans started inside `eval_run`, the job's own spans started before `eval_run` in the same trace, and finished spans a bridge hands straight to the processor. Spans of other traces are dropped. A custom `only` picks whole traces the same way.\n\nThe rule for order: a span is kept when its trace is already marked by the time the span ends. The first span started inside `eval_run` marks its trace as it starts, before anything under it ends, so spans that end before it and spans a bridge hands over later are both kept. A span that ends before any span of its trace was marked is dropped. A bridge that may hand spans over that early can copy the `evalkit.*` attributes onto them, so each one marks its own trace. A bridge should copy `session.id` either way: the server takes a trace's session from its root span when the root reaches it, and from each span's own `session.id` otherwise.\n\nThe processor remembers the 10,000 most recently used eval traces and forgets the oldest. Each kept span refreshes its trace, so a trace is only forgotten once 10,000 other eval traces have been used since its last span.\n\nSpans from another process in the same trace, such as an MCP gateway pod the agent calls, never reach this processor. They go through that process's own exporter, so that process makes its own choice: either it continues the trace, wraps its work in `eval_run` with the run's metadata sent along with the request, and filters with `only=tracing.is_eval_span` too, or it exports everything.\n\nDo not use a sampler for this: a sampler drops spans for every exporter, your own backend included.\n\nAround every task call the SDK opens a root span named `evalkit.run` with `session.id` set to the run id, and stamps `session.id`, `evalkit.experiment_id`, `evalkit.case_id` and `evalkit.repetition` onto every span your code starts underneath it. That is what groups a trace into one session. When the task returns `RunResult(session_id=...)`, the root span takes that session id instead, so it joins the agent's session rather than sitting alone; see [SDK runs](sdk-runs.md) for agents in another process.\n\n## From any OpenTelemetry SDK\n\nPoint the exporter at the collector and name the agent, either with a header or an attribute:\n\n```bash\nexport OTEL_EXPORTER_OTLP_TRACES_ENDPOINT={{origin}}/api/otel/v1/traces\nexport OTEL_EXPORTER_OTLP_HEADERS=\"Authorization=Bearer <token>,X-Evalkit-Agent=myagent\"\nexport OTEL_RESOURCE_ATTRIBUTES=\"evalkit.agent=myagent\" # alternative to the header\n```\n\nThe collector picks the agent per span: the span's `evalkit.agent` attribute first, then the resource's, then the `X-Evalkit-Agent` header. One process that serves several agents can therefore share one exporter and set `evalkit.agent` on each agent's spans. The value is an agent reference (`myagent` or `myagent@workspace`). Every agent a batch names is checked as if it came in the header: an agent token writes only its own agent, a login token only agents in workspaces you can write to (your own, or a shared one where you are a writer). If any span names an agent the token may not write, the whole batch is refused.\n\nPut the session id on the root span of each trace, in the attribute your mapping's `session_id` rule names (`session.id` in `openinference.json`, `gen_ai.conversation.id` in `gen_ai.json`). Every span in a trace belongs to the session of the trace's root, even one that carries a session attribute of its own. Only when the root has no session do child spans keep theirs.\n\n## Deployed agents\n\nA service cannot carry a person's token. Mint an agent token, bound to one agent and valid only for the collector:\n\n```bash\nevalkit tokens create --agent ouragent@dev # needs writer on dev\nevalkit tokens list\nevalkit tokens revoke <id>\n```\n\nSet it on the deployment as `EVALKIT_OTEL_TOKEN` next to `EVALKIT_SERVER_URL`; `tracing.register`, `tracing.exporter` and `tracing.processor` pick both up. For a non-Python exporter put it in `OTEL_EXPORTER_OTLP_HEADERS`. Use an agent token for any exporter outside the process that calls `run_experiment` too, even on your laptop: the login token expires under a long-running worker.\n\nThe collector logs every refused export as `otel export rejected` with the status, the reason (`expired token`, `invalid token`, `unknown agent`, `forbidden`, `too large`, `malformed`) and the agent. OpenTelemetry exporters only log a failed export on their side, so a silent agent is worth checking in both logs.\n\n## Size limits and large spans\n\nLLM spans from OpenInference and GenAI instrumentations carry the full input of each call: the messages so far, the system prompt and the tool schemas. Every turn repeats the whole context, so a long agent session grows with roughly the square of its turns. A 14-minute chat with subagents can store hundreds of MB of span attributes.\n\nThe server has two limits, both set in its config:\n\n| Limit | Default | What happens past it |\n| ------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `otel.max_batch_bytes` | 16 MiB | One export request (after gzip is undone) gets `413` and its spans are dropped. Exporters do not split a refused batch, so keep batches small. |\n| `otel.max_session_bytes` | 384 MiB | Reading the session (a run's trajectory, `evalkit traces check`, the Mappings tab) gets `413` with the session's size and the limit. A run records the trajectory as `unavailable` and logs the message. `--dump spans.json` still works. |\n\n`otel.max_session_bytes` counts the span attributes a trajectory build loads, not everything stored. evalkit reads the input messages (and system prompt) of an LLM span only for the first LLM call of each agent and subagent; later calls add only their output, tool calls and tokens to the trajectory. So the build leaves the input of every later LLM call in the database and does not count it. The limit keeps one session from using up the server's memory, so raise it only together with the server's memory limit.\n\nFor agents with large spans, send fewer spans per export and give each export more time. For the Python SDK, `tracing.register` included:\n\n```bash\nexport OTEL_BSP_MAX_EXPORT_BATCH_SIZE=16 # spans per export; default 512\nexport OTEL_BSP_MAX_QUEUE_SIZE=2048 # spans waiting for export; raise it if the exporter logs \"Queue full\"\nexport OTEL_EXPORTER_OTLP_TIMEOUT=60 # seconds per export in Python; default 10\n```\n\nOther SDKs follow the OpenTelemetry spec and read `OTEL_EXPORTER_OTLP_TIMEOUT` in milliseconds (`60000`). A 10 MB span can take more than 10 s to upload, longer than the default timeout. In an OpenTelemetry Collector, set `send_batch_max_size` on the `batch` processor and `timeout` on the `otlphttp` exporter instead.\n\n## Exporting to evalkit and another backend\n\nThe standard OTLP variables name one endpoint. To keep exporting to your tracing backend and send the same spans here, either:\n\n- add a second `otlphttp` exporter to the OpenTelemetry Collector the agent already exports to (recommended for deployed agents), or\n- add a second span processor and exporter in code. `tracing.register` does this for Python.\n\n```yaml\nexporters:\n otlphttp/evalkit:\n traces_endpoint: {{origin}}/api/otel/v1/traces\n headers:\n Authorization: Bearer ${env:EVALKIT_OTEL_TOKEN}\n X-Evalkit-Agent: ouragent@dev\nservice:\n pipelines:\n traces:\n exporters: [otlp/existing, otlphttp/evalkit]\n```\n\nThe collector speaks OTLP over HTTP only, not gRPC. Bodies may be chunked with no `Content-Length` (the JavaScript exporter sends them that way); a proxy in front of the collector must allow that.\n\n## The main agent and subagents\n\nMark the agent's top-level span as an AGENT span (`openinference.span.kind=AGENT`, or `gen_ai.operation.name=invoke_agent`). evalkit builds the main trajectory from it, and every AGENT span inside it becomes a subagent trajectory named by the span's `agent.name` (`gen_ai.agent.name`), or by the span name when that is missing. When the root span is not an AGENT span, as with the SDK's `evalkit.run` span, evalkit takes the earliest AGENT span that is not inside another one as the main agent. If that span is a tool call that starts a subagent partway through the run, the subagent's steps land in the main trajectory and the call has no result, so mark the top-level span as an AGENT span rather than relying on this.\n\n## Harness agents with traces\n\nA harness agent created with `--trajectory-source otel` keeps the whole Harness API flow and skips `GET /runs/{id}/trajectory`: it puts the run id it returned on its spans, in the attribute its mapping's `session_id` rule names, and evalkit polls the session until it settles. The harness declares `provides.trajectory: false`; evalkit still runs the trajectory evaluators because the trajectory comes from the collector.\n\nThe session evalkit polls is the `run_id` that `POST /runs` returns, so there is no separate session field. A queue-backed agent whose worker picks its own session id returns that id as `run_id`, or puts the `run_id` it returned on its spans in that session attribute. To export only eval runs from a harness that also serves production, see Choosing what a shared worker exports above.\n\n## Importing history from a trace source\n\nAn admin registers a trace source (a Phoenix server) once. After that, any\nuser can import traces from it into an OTel agent they can write, with\n`evalkit traces import` or the agent page's Import tab.\n\n- The trace source's API key is shared with every user in effect: anyone can\n import any project that key can read.\n- Imported traces land in the agent's workspace. Every user can read every\n workspace, so traces imported into your personal workspace are visible to\n everyone on the server. See [Where runs happen](workspaces.md).\n\n## Checking a session\n\n```bash\nevalkit traces check myagent-sdk <session id>\n```\n\nprints the settle state, span kinds, tokens, the attributes the mapping did not read and the ATIF summary. `--dump spans.json` writes the raw spans. `--dump esf.json` leaves out the input messages of every LLM call after each agent's first, as the trajectory does not use them; `spans.json` has the raw values. A session over `otel.max_session_bytes` fails the check with its size and the limit (see Size limits and large spans above). If the kinds or messages look wrong, the agent needs a mapping: see [Mappings](mappings.md).\n"},{id:`mappings`,label:`Mappings`,group:`Traces`,body:`# Mappings
|
|
457
|
+
`},{id:`case-schema`,label:`Case schema`,group:`Get started`,body:'# Case schema\n\nThis page lists every key a case YAML file may hold, with one example for each evaluator. `evalkit lint` checks a file against this schema. The machine-readable form is `cases-v1.json`, written by `evalkit contracts export`.\n\n## File shapes\n\nA case file is one of:\n\n- a single case (a mapping with `id`)\n- a list of cases and overlays (an overlay is an entry with `extends`)\n- a mapping with any of `defaults`, `cases` and `overlays`\n\n```yaml\ndefaults:\n tags: [balance-sheet]\n input: {company: acme}\n max_response_time: 90\ncases:\n - id: acme-total-assets-fy2024\n input:\n question: What were Acme\'s total assets as of 31 March 2024?\n evaluators:\n output:\n answer_rubrics:\n rubrics:\n - rubric: Total assets as of 31 March 2024 are $4.2 billion.\n type: factual_retrieval\n```\n\n`defaults` takes only `input`, `tags`, `max_response_time` and `agents` (for overlays). A case\'s own `input` keys and `max_response_time` win over the defaults; tags are merged.\n\n## Case keys\n\n| Key | Type | Meaning |\n| -- | -- | -- |\n| `id` | string, required | The case\'s identity, shared by every workspace. |\n| `tags` | list of strings | Labels for `evalkit run --tag`. The case\'s folder in the suite is added as a tag too. |\n| `input` | mapping | Sent to the agent as is. Most agents read `input.question`. |\n| `fixtures` | list of strings | Keys from `fixtures.yaml` to attach as files. |\n| `expected` | mapping | Free-form ground truth, passed to custom evaluators. |\n| `evaluators` | mapping | Which evaluators score this case. See below. |\n\n## Evaluators\n\nEvaluators sit under `evaluators.output`, `evaluators.trajectory` or `evaluators.custom`. The scorecard groups their scores into buckets, but the bucket names are not YAML keys:\n\n| Scorecard bucket | YAML key |\n| -- | -- |\n| content | `evaluators.output.answer_rubrics` |\n| presentation | `evaluators.output.presentation_judge` |\n| efficiency | `evaluators.output.max_response_time` |\n| trajectory | `evaluators.trajectory.trajectory_rubrics`, `evaluators.trajectory.tool_trajectory_match`, `evaluators.trajectory.required_tools_called` |\n| custom | `evaluators.custom.<name>` |\n\n### answer_rubrics\n\nWhat a correct answer contains. The judge marks each rubric `satisfied`, `incorrect` or `absent`.\n\n```yaml\nevaluators:\n output:\n answer_rubrics:\n rubrics:\n - rubric: Revenue for FY2024 is $3.52 billion.\n type: factual_retrieval # or derived_computation, analysis_interpretation\n source: the FY2024 annual report # optional, factual_retrieval only\n - rubric: Revenue grew 12% from FY2023 to FY2024.\n type: derived_computation\n```\n\nWrite one assertion per rubric. A rubric that bundles two ("states $300/month and explains why") fails as a whole when the answer gets only one part right, so a correct answer can be marked wrong. Split it into two rubrics.\n\n### presentation_judge\n\nHow the answer shows its content: units, columns, an artifact relayed rather than restated. Each entry has exactly one of `rubric` (a property the answer must have) or `forbid` (a property it must not have). At least one entry must be a `rubric`.\n\n```yaml\nevaluators:\n output:\n presentation_judge:\n rubrics:\n - rubric: A store count for each fiscal year FY2021–FY2025, as a table or a labelled list.\n points: 2 # optional weight, 1–10, default 1\n - forbid: Figures given without a currency unit.\n note: Rupee or dollar both fine. # optional, shown to the judge\n```\n\n### max_response_time\n\nA cap on the run\'s wall-clock time, in seconds. The value is a mapping, not a bare number. Only `defaults.max_response_time` also takes a bare number.\n\n```yaml\nevaluators:\n output:\n max_response_time:\n max_seconds: 90\n```\n\n### trajectory_rubrics\n\nCheckpoints the trajectory must show, one sentence each. Order is not graded.\n\n```yaml\nevaluators:\n trajectory:\n trajectory_rubrics:\n rubrics:\n - Retrieves FY2024 Platform revenue as $3,522,776,000.\n - Rounds the final figure to the nearest basis point.\n```\n\n### tool_trajectory_match\n\nExpected tool calls, matched by name and args. Tool names must match the trajectory exactly. The score is the share of expected calls found; `ordered: true` also requires them in this order.\n\n```yaml\nevaluators:\n trajectory:\n tool_trajectory_match:\n ordered: false\n expected:\n - name: get_financials\n args: {ticker: ACME, period: FY2024}\n args_mode: subset # subset, exact, ignore or substring\n match_overrides: # optional, per arg: equals or substring\n period: substring\n```\n\n### required_tools_called\n\nTools the agent must call at least once. The score is the share called.\n\n```yaml\nevaluators:\n trajectory:\n required_tools_called:\n tools: [get_financials, search_filings]\n```\n\n### custom\n\nRemote evaluators and Python evaluators, keyed by their name. The block is passed to the evaluator as `config`, untouched.\n\n```yaml\nevaluators:\n custom:\n sql_matches:\n table: revenue\n```\n\n## Python evaluators\n\nA Python evaluator receives an `EvalCase` and an `EvalRun` and returns a float, a `ScoreItem` or a list of them. All three import from `evalkit.sdk`.\n\n```python\nfrom evalkit.sdk import EvalCase, EvalRun, ScoreItem, evaluator\n\n\n@evaluator(name="sql_matches")\ndef sql_matches(case: EvalCase, run: EvalRun) -> ScoreItem:\n table = case.config["table"]\n return ScoreItem(name="sql_matches", score=float(table in run.answer))\n```\n\n| `EvalCase` field | Meaning |\n| -- | -- |\n| `id` | Case id. |\n| `input` | Case input, verbatim. |\n| `expected` | The case\'s `expected` block, or `None`. |\n| `config` | This evaluator\'s block from `evaluators.custom`. |\n\n| `EvalRun` field | Meaning |\n| -- | -- |\n| `answer` | The final answer. A structured output as JSON text when the agent returned only that. |\n| `output` | The structured output, or `None`. |\n| `trajectory` | The ATIF trajectory as a dict. |\n\n`ScoreItem` has `name`, `score` (`None` means no reading), `label` and `explanation`.\n\n## Overlays\n\nAn overlay adds evaluators to a case in another suite, for the agents it names. It may add `tags`, `evaluators.custom` and the `tool_trajectory_match` and `required_tools_called` trajectory evaluators.\n\n```yaml\noverlays:\n - extends: acme-total-assets-fy2024\n agents: [support-bot]\n evaluators:\n trajectory:\n required_tools_called:\n tools: [get_financials]\n```\n'},{id:`sdk-runs`,label:`SDK runs`,group:`Traces`,body:'# SDK runs\n\n`run_experiment` runs an experiment from your own code: it calls your task once per case and repetition, stores the runs on this server, and scores them with the judge, the remote evaluators of the agent\'s workspace and any Python evaluators you pass. The agent is a code-driven agent on the server (no harness URL), created once with `evalkit agents create`. Invoking the agent, timeouts and stopping are your code.\n\n```python\n# eval/run.py — uv run python eval/run.py\nfrom evalkit.sdk import run_experiment, RunResult, evaluator, tracing\nfrom myagent import MyAgent, setup_tracing\n\nsetup_tracing() # your own OpenTelemetry provider and instrumentors\ntracing.register(agent="myagent-sdk") # add this server as an export destination\nagent = MyAgent()\n\ndef task(input: dict, files: list) -> str:\n return agent.ask(input["question"], attachments=[f.path for f in files])\n\n@evaluator(name="citation_check")\ndef citation_check(case, run) -> float:\n cited = {c["url"] for c in (run.output or {}).get("citations", [])}\n return 1.0 if cited >= set(case.config["required"]) else 0.0\n\nif __name__ == "__main__":\n result = run_experiment(dataset="finance", agent="myagent-sdk", task=task,\n evaluators=[citation_check], concurrency=4)\n print(result.url)\n```\n\n## The task\n\nA sync or async callable. Parameters bind **by name** from this set, so their order does not matter; any other required parameter is an error before the first call, and an optional one keeps its default.\n\n| Parameter | Value |\n| ---------- | --------------------------------------------------------------------- |\n| `input` | the case input, verbatim, minus `files` |\n| `files` | `list[Fixture]`, the case\'s fixture files, downloaded before the call |\n| `model` | the `model` argument of `run_experiment`, or `None` |\n| `metadata` | a dict with the keys below |\n\nA `Fixture` has:\n\n- `name`: the fixture key the case names.\n- `path`: where the file sits on this machine.\n- `context`: the file\'s description from the fixture registry, or `None`. A Harness API agent gets the same text with each file; show it to your agent the same way (for example an "Attached files" block ahead of the question).\n\n`metadata` holds:\n\n- `session_id`: the SDK\'s session id for this run, the `session.id` of its `evalkit.run` span.\n- `experiment_id`: the experiment, or `None` on a dry run.\n- `case_id`: the case.\n- `repetition`: 1 for the first repetition, 2 for the second, and so on.\n- `tags`: the case\'s tags.\n\n`model` is the only way `run_experiment(model=...)` reaches your agent. The experiment records the requested model either way, so a task without a `model` parameter would silently run the agent\'s default; `run_experiment` prints a warning before the first call when that happens.\n\nA task with exactly one parameter whose name is not in the table (`def task(q)`) receives the input. Return a `str` (the answer), a `dict` (the structured output) or a `RunResult`:\n\n```python\nfrom evalkit.sdk import RunResult\n\nRunResult(answer="…", output={"citations": []}, model="gpt-5",\n session_id="…", # override the session the SDK polls\n trajectory={...}) # push an ATIF document instead of tracing\n```\n\nA task that raises records the run as `failed` with the exception and the experiment continues.\n\n## An agent in another process\n\nThe SDK stamps `session.id` and the `evalkit.*` attributes only on spans made in this Python process. An agent behind HTTP or a job queue, or written in another language, joins the run in one of two ways. Pick one, not both.\n\n- **Continue the trace.** Inject the W3C trace context into the request and have the agent start its spans from it. Every span in a trace belongs to the session of the trace\'s root, the SDK\'s `evalkit.run` span, even if the agent stamps its own `session.id` or `gen_ai.conversation.id`.\n\n ```python\n from opentelemetry import propagate\n\n def task(input: dict) -> str:\n headers: dict[str, str] = {}\n propagate.inject(headers) # adds traceparent\n return httpx.post(AGENT_URL, json=input, headers=headers).json()["answer"]\n ```\n\n- **Return the agent\'s session.** The agent puts its own session id on its root span as `session.id`, and the task returns it. Use this when the trace context cannot reach the agent, for example through a queue. The SDK moves its `evalkit.run` span into that session, so no empty session is left behind, and the trajectory is built from the agent\'s trace.\n\n ```python\n def task(input: dict) -> RunResult:\n job = agent_api.start(input["question"]) # your API returns the session it opened\n return RunResult(answer=job.wait(), session_id=job.session_id)\n ```\n\n If your API cannot tell you the session id, send it one instead: pass `metadata["session_id"]` along with the job and have the agent use it as its session id (or wrap the job in `tracing.eval_run(metadata)`, see [Tracing](tracing.md)). Its spans then join the SDK\'s session and the task returns only the answer.\n\n ```python\n def task(input: dict, metadata: dict) -> str:\n return queue.submit(input["question"], session_id=metadata["session_id"]).wait()\n ```\n\nEither way the Runs page links the session to its experiment and case.\n\nThe agent\'s exporter needs its own token. Mint one with `evalkit tokens create --agent <name>`; it never expires. Your login token expires, and an exporter that holds it then drops every span with nothing but a line in its own log.\n\n## Datasets and workspaces\n\n- `dataset="finance"` runs your own workspace\'s copy; if `finance` is a directory under `cases` it is synced first.\n- `dataset="finance@dev"` or `dataset="finance", workspace="dev"` runs the shared cases, every review state included.\n- `case_ids=[...]`, `tags=[...]`, `repetitions`, `model` and `resume=<experiment id>` mean what the same options mean on `evalkit run`.\n- `dry_run=True` runs one case (`dry_run=N` runs N) without creating an experiment and prints the answer and what the server made of the session. If the server cannot read a session, that case prints a `trajectory read failed` line and the dry run goes on. Use it while wiring up tracing; the session shows on the Runs page with its case question and case id.\n\n## Notebooks\n\n`run_experiment` refuses to run inside a running event loop. In a notebook use the async form:\n\n```python\nfrom evalkit.sdk import arun_experiment\n\nresult = await arun_experiment(dataset="finance", agent="myagent-sdk", task=task)\n```\n\n## The agent and the judge\n\n`agent="myagent-sdk"` names an agent on the server; a bare name means your own workspace. Create it once:\n\n```bash\nevalkit agents create myagent-sdk --trajectory-source otel --mapping openinference.json \\\n --max-concurrent-runs 4 --provides thinking=true\n```\n\nIts `answer` rule and `exclude_spans` live in its span mapping. `evalkit.yaml` is still required; it holds the cases, fixtures and credentials.\n\nThe judge is the server\'s default unless you pass one:\n\n```python\nfrom evalkit.sdk import Judge, run_experiment\n\nrun_experiment(dataset="finance", agent="myagent-sdk", task=task,\n judge=Judge(base_url="https://litellm.example.com", model="gpt-5"))\n```\n\nAn admin sets the default judge with `evalkit judge-default set`. Either way, the SDK reads the judge\'s key from `credentials.llm_providers` in `evalkit.yaml`, keyed by the judge\'s base URL.\n\n## Capabilities\n\nA code-driven agent has no `GET /capabilities`, so evalkit writes its capabilities onto each experiment itself: `trajectory`, `tool_calls`, `token_usage` and `run_listing` are true; `thinking`, `artifacts` and `workspace` are false. Evaluators gated on a capability skip when it is false. evalkit does not read capabilities from the spans. Set `provides` on the agent (`evalkit agents create --provides`, or `evalkit agents edit`) to declare what it really does, for example `thinking: true` when its spans carry the model\'s reasoning. Declare only what works: a false `true` produces failing scores blamed on the agent.\n\n## Python evaluators\n\n`@evaluator(name=..., kind="evaluator" | "gauge", requires_trajectory=False)` turns a function into an evaluator. It receives the same `EvalCase` and `EvalRun` the HTTP Custom Evaluator API sends: the case id, input, expected block and this evaluator\'s config from the case YAML; the answer, structured output and the ATIF trajectory as a dict. Return a float, a `ScoreItem` (`from evalkit.sdk import ScoreItem`), or a list of them. [Case schema](case-schema.md#python-evaluators) lists the fields of `EvalCase` and `EvalRun`. A case selects it by name under `evaluators.custom`, exactly like an HTTP evaluator.\n\n## Bring your own benchmark\n\nA published benchmark is a suite plus a Python evaluator:\n\n1. Write a script that turns the benchmark\'s file into case YAML. Each case gets the question as `input`. Its grading data (rubrics, reference answer) goes under `evaluators.custom.<grader name>`.\n2. `evalkit sync <dir>` puts it in a dataset like any suite.\n3. Write the grader as an `@evaluator` with that name. It reads the grading data from `case.config`, and calls its own judge models if it needs any. Pass it to `run_experiment`.\n\n`evalkit lint` and `evalkit sync` warn with `W-CUSTOM-UNKNOWN` for the grader name, because the server can\'t see a Python evaluator. That warning is expected.\n\n## Re-scoring\n\nPython evaluators live in your script, so a re-score that needs them starts from the script:\n\n```python\nfrom evalkit.sdk import evaluate_experiment\n\nevaluate_experiment(experiment_id="…", evaluators=[citation_check],\n refetch_trajectories=True)\n```\n\n`refetch_trajectories` polls the collector again for runs whose trajectory was `partial` or `unavailable` and re-scores them. `evalkit evaluate` refuses experiments that used Python evaluators and points here.\n\nNext: [Tracing](tracing.md).\n'},{id:`tracing`,label:`Tracing`,group:`Traces`,body:"# Tracing\n\nThe collector is an OTLP/HTTP endpoint on this server:\n\n```\nPOST {{origin}}/api/otel/v1/traces\n```\n\nIt accepts `application/x-protobuf` and `application/json`, gzip or not, from any OpenTelemetry SDK. Spans are stored as received and converted to ATIF with the agent's mapping when a run or the Runs page asks for them.\n\n## From Python with the SDK\n\n```python\nfrom evalkit.sdk import tracing\n\ntracing.register(agent=\"myagent-sdk\")\n```\n\n`register` adds an exporter for this server to your global tracer provider, creating one if none is set. Your existing exporters keep running. The exporter carries an `X-Evalkit-Agent` header, which names the agent on the server; the `evalkit.agent` resource attribute is only set when `register` creates the provider itself. It reads the server URL from `EVALKIT_SERVER_URL` or your `evalkit login`, and the token from `EVALKIT_OTEL_TOKEN` (an agent token), then `EVALKIT_TOKEN`, then your `evalkit login`. It needs the `otel` extra.\n\n### An existing span pipeline\n\n`register` changes the global provider. When you build your own pipeline, take evalkit's parts and put them where you need them:\n\n```python\nfrom evalkit.sdk import tracing\n\nexporter = tracing.exporter(agent=\"myagent-sdk\") # OTLPSpanExporter: URL, token and X-Evalkit-Agent set\nprocessor = tracing.processor(agent=\"myagent-sdk\") # batch processor around that exporter\nprovider.add_span_processor(processor) # what register does for you\nheaders = tracing.headers(agent=\"myagent-sdk\") # the same headers, for an exporter you build yourself\n```\n\nAll three resolve the server and token the same way `register` does. `processor` also stamps the run's `session.id` and `evalkit.*` attributes on spans that start under a task call (or under `tracing.eval_run`, below).\n\nSpans handed straight to a processor or exporter, for example by a bridge that converts another tool's spans, never pass through the provider, so `register` cannot see them. Hand them to `tracing.processor(...)` too: give the bridge that processor, or one processor that fans out to all of yours and evalkit's (OpenTelemetry's `SynchronousMultiSpanProcessor`). Those spans are already finished, so `processor` cannot stamp them: the bridge copies `session.id` onto each span it converts. How eval-only export treats them is below.\n\n### Choosing what a shared worker exports\n\nA worker that serves both app runs (production, staging or manual use) and eval runs exports every span it makes, so every app turn also becomes a session on this server, which you can browse on the Runs page and pull with `evalkit runs pull <agent> --source app`. Whether to send app traffic is your choice. `eval_run` marks eval runs either way, and to send only those, filter on the mark:\n\n```python\nfrom evalkit.sdk import tracing\n\nprovider.add_span_processor(tracing.processor(agent=\"myagent\", only=tracing.is_eval_span))\n\ndef handle_job(job):\n if job.evalkit: # the task's metadata, sent along with the job\n with tracing.eval_run(job.evalkit):\n return run_agent(job)\n return run_agent(job)\n```\n\nThe task passes its `metadata` argument along with the job (see [SDK runs](sdk-runs.md)). `eval_run` stamps `session.id` (the SDK's session id), `evalkit.case_id`, `evalkit.experiment_id` and `evalkit.repetition` on every span started inside it, so the worker's spans join the run's session and the task returns only the answer. `is_eval_span` is true for a span that carries `evalkit.case_id`. The stamp lives in a context variable: spans started in another thread need that thread to run inside `eval_run` too.\n\nA harness agent learns that a run is an eval run from the `metadata` of `POST /runs`: `experiment_id`, `case_id` and `repetition`. That is what it passes to `eval_run`, with the `run_id` it returns as the session id: `tracing.eval_run({**metadata, \"session_id\": run_id})`.\n\n`only` decides by trace, not by span. It is any function that takes a span and returns a bool, and it runs on each span as the span starts and again as it ends. Once it is true for one span, the processor keeps every span of that span's trace that reaches it: spans started inside `eval_run`, the job's own spans started before `eval_run` in the same trace, and finished spans a bridge hands straight to the processor. Spans of other traces are dropped. A custom `only` picks whole traces the same way.\n\nThe rule for order: a span is kept when its trace is already marked by the time the span ends. The first span started inside `eval_run` marks its trace as it starts, before anything under it ends, so spans that end before it and spans a bridge hands over later are both kept. A span that ends before any span of its trace was marked is dropped. A bridge that may hand spans over that early can copy the `evalkit.*` attributes onto them, so each one marks its own trace. A bridge should copy `session.id` either way: the server takes a trace's session from its root span when the root reaches it, and from each span's own `session.id` otherwise.\n\nThe processor remembers the 10,000 most recently used eval traces and forgets the oldest. Each kept span refreshes its trace, so a trace is only forgotten once 10,000 other eval traces have been used since its last span.\n\nSpans from another process in the same trace, such as an MCP gateway pod the agent calls, never reach this processor. They go through that process's own exporter, so that process makes its own choice: either it continues the trace, wraps its work in `eval_run` with the run's metadata sent along with the request, and filters with `only=tracing.is_eval_span` too, or it exports everything.\n\nDo not use a sampler for this: a sampler drops spans for every exporter, your own backend included.\n\nAround every task call the SDK opens a root span named `evalkit.run` with `session.id` set to the run id, and stamps `session.id`, `evalkit.experiment_id`, `evalkit.case_id` and `evalkit.repetition` onto every span your code starts underneath it. That is what groups a trace into one session. When the task returns `RunResult(session_id=...)`, the root span takes that session id instead, so it joins the agent's session rather than sitting alone; see [SDK runs](sdk-runs.md) for agents in another process.\n\n## From any OpenTelemetry SDK\n\nPoint the exporter at the collector and name the agent, either with a header or an attribute:\n\n```bash\nexport OTEL_EXPORTER_OTLP_TRACES_ENDPOINT={{origin}}/api/otel/v1/traces\nexport OTEL_EXPORTER_OTLP_HEADERS=\"Authorization=Bearer <token>,X-Evalkit-Agent=myagent\"\nexport OTEL_RESOURCE_ATTRIBUTES=\"evalkit.agent=myagent\" # alternative to the header\n```\n\nThe collector picks the agent per span: the span's `evalkit.agent` attribute first, then the resource's, then the `X-Evalkit-Agent` header. One process that serves several agents can therefore share one exporter and set `evalkit.agent` on each agent's spans. The value is an agent reference (`myagent` or `myagent@workspace`). Every agent a batch names is checked as if it came in the header: an agent token writes only its own agent, a login token only agents in workspaces you can write to (your own, or a shared one where you are a writer). If any span names an agent the token may not write, the whole batch is refused.\n\nPut the session id on the root span of each trace, in the attribute your mapping's `session_id` rule names (`session.id` in `openinference.json`, `gen_ai.conversation.id` in `gen_ai.json`). Every span in a trace belongs to the session of the trace's root, even one that carries a session attribute of its own. Only when the root has no session do child spans keep theirs.\n\n## Deployed agents\n\nA service cannot carry a person's token. Mint an agent token, bound to one agent and valid only for the collector:\n\n```bash\nevalkit tokens create --agent ouragent@dev # needs writer on dev\nevalkit tokens list\nevalkit tokens revoke <id>\n```\n\nSet it on the deployment as `EVALKIT_OTEL_TOKEN` next to `EVALKIT_SERVER_URL`; `tracing.register`, `tracing.exporter` and `tracing.processor` pick both up. For a non-Python exporter put it in `OTEL_EXPORTER_OTLP_HEADERS`. Use an agent token for any exporter outside the process that calls `run_experiment` too, even on your laptop: the login token expires under a long-running worker.\n\nThe collector logs every refused export as `otel export rejected` with the status, the reason (`expired token`, `invalid token`, `unknown agent`, `forbidden`, `too large`, `malformed`) and the agent. OpenTelemetry exporters only log a failed export on their side, so a silent agent is worth checking in both logs.\n\n## Size limits and large spans\n\nLLM spans from OpenInference and GenAI instrumentations carry the full input of each call: the messages so far, the system prompt and the tool schemas. Every turn repeats the whole context, so a long agent session grows with roughly the square of its turns. A 14-minute chat with subagents can store hundreds of MB of span attributes.\n\nThe server has two limits, both set in its config:\n\n| Limit | Default | What happens past it |\n| ------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `otel.max_batch_bytes` | 16 MiB | One export request (after gzip is undone) gets `413` and its spans are dropped. Exporters do not split a refused batch, so keep batches small. |\n| `otel.max_session_bytes` | 384 MiB | Reading the session (a run's trajectory, `evalkit traces check`, the Mappings tab) gets `413` with the session's size and the limit. A run records the trajectory as `unavailable` and logs the message. `--dump spans.json` still works. |\n\n`otel.max_session_bytes` counts the span attributes a trajectory build loads, not everything stored. evalkit reads the input messages (and system prompt) of an LLM span only for the first LLM call of each agent and subagent; later calls add only their output, tool calls and tokens to the trajectory. So the build leaves the input of every later LLM call in the database and does not count it. The limit keeps one session from using up the server's memory, so raise it only together with the server's memory limit.\n\nFor agents with large spans, send fewer spans per export and give each export more time. For the Python SDK, `tracing.register` included:\n\n```bash\nexport OTEL_BSP_MAX_EXPORT_BATCH_SIZE=16 # spans per export; default 512\nexport OTEL_BSP_MAX_QUEUE_SIZE=2048 # spans waiting for export; raise it if the exporter logs \"Queue full\"\nexport OTEL_EXPORTER_OTLP_TIMEOUT=60 # seconds per export in Python; default 10\n```\n\nOther SDKs follow the OpenTelemetry spec and read `OTEL_EXPORTER_OTLP_TIMEOUT` in milliseconds (`60000`). A 10 MB span can take more than 10 s to upload, longer than the default timeout. In an OpenTelemetry Collector, set `send_batch_max_size` on the `batch` processor and `timeout` on the `otlphttp` exporter instead.\n\n## Exporting to evalkit and another backend\n\nThe standard OTLP variables name one endpoint. To keep exporting to your tracing backend and send the same spans here, either:\n\n- add a second `otlphttp` exporter to the OpenTelemetry Collector the agent already exports to (recommended for deployed agents), or\n- add a second span processor and exporter in code. `tracing.register` does this for Python.\n\n```yaml\nexporters:\n otlphttp/evalkit:\n traces_endpoint: {{origin}}/api/otel/v1/traces\n headers:\n Authorization: Bearer ${env:EVALKIT_OTEL_TOKEN}\n X-Evalkit-Agent: ouragent@dev\nservice:\n pipelines:\n traces:\n exporters: [otlp/existing, otlphttp/evalkit]\n```\n\nThe collector speaks OTLP over HTTP only, not gRPC. Bodies may be chunked with no `Content-Length` (the JavaScript exporter sends them that way); a proxy in front of the collector must allow that.\n\n## The main agent and subagents\n\nMark the agent's top-level span as an AGENT span (`openinference.span.kind=AGENT`, or `gen_ai.operation.name=invoke_agent`). evalkit builds the main trajectory from it, and every AGENT span inside it becomes a subagent trajectory named by the span's `agent.name` (`gen_ai.agent.name`), or by the span name when that is missing. When the root span is not an AGENT span, as with the SDK's `evalkit.run` span, evalkit takes the earliest AGENT span that is not inside another one as the main agent. If that span is a tool call that starts a subagent partway through the run, the subagent's steps land in the main trajectory and the call has no result, so mark the top-level span as an AGENT span rather than relying on this.\n\n## Harness agents with traces\n\nA harness agent created with `--trajectory-source otel` keeps the whole Harness API flow and skips `GET /runs/{id}/trajectory`: it puts the run id it returned on its spans, in the attribute its mapping's `session_id` rule names, and evalkit polls the session until it settles. The harness declares `provides.trajectory: false`; evalkit still runs the trajectory evaluators because the trajectory comes from the collector.\n\nThe session evalkit polls is the `run_id` that `POST /runs` returns, so there is no separate session field. A queue-backed agent whose worker picks its own session id returns that id as `run_id`, or puts the `run_id` it returned on its spans in that session attribute. To export only eval runs from a harness that also serves production, see Choosing what a shared worker exports above.\n\n## Importing history from a trace source\n\nAn admin registers a trace source (a Phoenix server) once. After that, any\nuser can import traces from it into an OTel agent they can write, with\n`evalkit traces import` or the agent page's Import tab.\n\n- The trace source's API key is shared with every user in effect: anyone can\n import any project that key can read.\n- Imported traces land in the agent's workspace. Every user can read every\n workspace, so traces imported into your personal workspace are visible to\n everyone on the server. See [Where runs happen](workspaces.md).\n\n## Message roles\n\nevalkit reads message roles in any letter case and maps the names some frameworks use to four roles:\n\n| Role on the span | Read as |\n| -- | -- |\n| `assistant`, `model` (Gemini, Google ADK), `ai` (LangChain), `bot` | `assistant` |\n| `user`, `human` | `user` |\n| `system`, `developer` (OpenAI) | `system` |\n| `tool`, `function` | `tool` |\n\nThe trajectory drops messages with any other role, along with their tool calls. `evalkit traces check` warns on its `llm` line and names the unknown roles it found.\n\n## Checking a session\n\n```bash\nevalkit traces check myagent-sdk <session id>\n```\n\nprints the settle state, span kinds, tokens, the attributes the mapping did not read and the ATIF summary. `--dump spans.json` writes the raw spans. `--dump esf.json` leaves out the input messages of every LLM call after each agent's first, as the trajectory does not use them; `spans.json` has the raw values. A session over `otel.max_session_bytes` fails the check with its size and the limit (see Size limits and large spans above). If the kinds or messages look wrong, the agent needs a mapping: see [Mappings](mappings.md).\n"},{id:`mappings`,label:`Mappings`,group:`Traces`,body:`# Mappings
|
|
458
458
|
|
|
459
459
|
A mapping tells evalkit which span attribute holds each field of the evalkit span format (ESF): the span kind, the session id, the model, the messages, the token counts, the tool name and call id. It also says where the run's answer comes from (\`answer\`) and which spans to leave out (\`exclude_spans\`).
|
|
460
460
|
|
|
@@ -590,7 +590,7 @@ evalkit traces mapping list myagent
|
|
|
590
590
|
Repeat until the unmapped list holds nothing that matters and the counts look right, then activate the draft on the agent's Mappings tab. \`--activate\` on push activates in the same step; a coding agent passes it only when the developer has approved the document.
|
|
591
591
|
|
|
592
592
|
Runs record the mapping version they were converted with; a later mapping change never alters a scored run. The Runs page converts sessions on demand with the active mapping.
|
|
593
|
-
`},{id:`harness-api`,label:`Harness API`,group:`Harness API`,body:"# Harness API\n\nThe Harness API is the HTTP contract a client's agent harness implements so evalkit can drive it: start a run, poll its status, serve its trajectory. Agents in a shared workspace are driven by this server; agents in a personal workspace by `evalkit run` from their owner's machine. The OpenAPI schema ships inside the CLI:\n\n```bash\nevalkit contracts export --target ./contracts # harness-api-v1.json, atif-accepted.json, …\n```\n\nEach endpoint lets evalkit do one thing. Every Harness API has the first three; declare the rest in the capabilities response when you implement them. An agent on the SDK + traces path has no Harness API and none of these endpoints; evalkit sees what its task returns and the spans it exports.\n\n| Endpoint | Lets evalkit | Capability flag | Without it |\n| ----------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| `GET /capabilities` | see what the harness supports and gate evaluators on it (snapshotted per experiment) | part of every Harness API | — |\n| `POST /runs` | invoke the agent: start one run in a fresh session with the case input and files | part of every Harness API | — |\n| `GET /runs/{id}` | wait for the run and read its answer, structured output, model and artifact list | part of every Harness API | — |\n| `GET /runs/{id}/trajectory` | read the trajectory (ATIF): the run view, trajectory evaluators and token/cost gauges | `provides.trajectory` | trajectory evaluators skip, unless the agent's trajectory source is `otel` and the trajectory comes from spans |\n| `GET /runs/{id}/files`, `GET /runs/{id}/files/{path}` | read the workspace: the run's Workspace tab, downloads and artifact copies | `provides.workspace` | no Workspace tab; artifacts the run reports are not copied |\n| `GET /runs` | list the agent's sessions on the Runs page and for `evalkit runs list`/`runs pull`, including ones evalkit did not start; optional `since`/`until` filter by creation time | `provides.run_listing` | the Runs page is empty for this agent |\n| `POST /runs/{id}/stop` | cancel a run that hit its time limit | `accepts.stop` | timed-out runs keep running on the harness |\n\n`POST /runs` takes JSON, or multipart when the case has fixture files and the harness accepts `files` but not `file_urls`. Run status moves through `queued`, `running`, then one of `completed`, `failed`, `cancelled`.\n\nA code-driven agent (no `harness_url`) has none of these endpoints, so its runs have no Workspace tab. To see an agent's files in evalkit, give it a Harness API with at least the files endpoints; its trajectory can still come from traces.\n\nEvery request carries `x-api-key`. Two rules matter more than the rest:\n\n- **Capabilities honesty.** Declare only what works. evalkit neutral-skips evaluators whose inputs the harness does not provide; a false `true` produces failing scores blamed on the agent.\n- **Implement stop.** evalkit calls stop on timeout when `accepts.stop` is true; a harness without it leaks resources on every timed-out run.\n\n## Already have a harness? Keep it\n\nA harness that already emits OpenTelemetry traces can skip the trajectory endpoint: create the agent with `--trajectory-source otel --mapping FILE` and export spans to the collector with the run id it returned from `POST /runs` in the attribute the mapping's `session_id` rule names (`session.id` for OpenInference, `gen_ai.conversation.id` for GenAI). Everything else stays: server runs, `evalkit run`, the Workspace tab. The harness declares `provides.trajectory: false`. See [Tracing](tracing.md).\n\nThe session evalkit polls is the `run_id` that `POST /runs` returns; there is no separate session field. A queue-backed agent whose worker opens its own session can return that session id as `run_id`, or stamp the `run_id` it returned on the job's spans in the mapping's session id attribute. Either way the ids must also work with the other `/runs/{id}` endpoints.\n\nMoving to [SDK runs](sdk-runs.md) instead only makes sense to stop hosting the harness. A code-driven agent loses server-started runs and the Workspace tab, and `run_experiment` refuses an agent with a `harness_url`: keep one agent name and run it with `evalkit run`, rather than adding a second entry for `run_experiment`.\n\n## Checking\n\n```bash\nevalkit harness check ouragent@dev\n```\n\nruns a trivial call, exercises every declared capability and prints a pass/fail table. For a harness agent whose trajectory source is `otel` the trajectory row reads \"from traces\" and a session row reports the collected spans.\n"},{id:`mcp`,label:`MCP`,group:`MCP`,body:'# MCP\n\nThe server is also an MCP server at `{{origin}}/mcp` (streamable HTTP). An agent connected to it can read every agent\'s runs and trajectories, and every experiment\'s scores. It cannot change anything.\n\n## Connect\n\nWith an evalkit login token (`evalkit login` stores it in `~/.evalkit/config.toml`):\n\n```bash\nclaude mcp add --transport http evalkit {{origin}}/mcp --header "Authorization: Bearer $EVALKIT_TOKEN"\n```\n\nOnly login tokens work here: agent tokens (`evalkit tokens create`) and download tickets are refused.\n\nWhen the server\'s config has an `mcp.oauth` block, MCP clients that speak OAuth (Claude, Cursor, Codex) can connect with the URL alone: the server points them to the identity provider, and a token issued for `{{origin}}/mcp` with the configured scope (`mcp.oauth.scope`, default `evalkit:read`) is accepted. Evalkit login tokens keep working next to it.\n\n```yaml\nmcp:\n oauth:\n issuer: https://id.example.com\n jwks_uri: https://id.example.com/.well-known/jwks.json\n # audience: defaults to <server.base_url>/mcp\n # scope: your identity provider\'s name for read access; defaults to evalkit:read\n```\n\nAn OAuth token is not an evalkit user. Whoever the identity provider gives that scope reads everything an evalkit login reads, which today is every workspace, and archiving someone in evalkit does not cut off their OAuth access: revoke it at the identity provider.\n\n## Tools\n\n| Tool | What it returns |\n|---|---|\n| `find_agents` | Agents and the id (`name@workspace`) the run tools take |\n| `find_runs` | An agent\'s runs in a time window, newest first: id, title, time, `user_id`, `org_id`, app or eval. `include` adds each run\'s `metrics`, `turns` or `tool_calls` (what it called, with which arguments). `failed_only` keeps runs with a failure; `tool_error` keeps runs where that tool errored. `timezone` reads date-only bounds as `get_run_stats` does. Up to 5,000 rows when listing alone, 200 with `include` or a filter |\n| `get_runs` | Up to 200 runs by id: turns, failed turns, failures, duration, cost and where it came from, tokens, cost by model, tool errors by tool, opening question, final answer; `include` adds `turns` and `tool_calls` |\n| `get_run_stats` | Totals over a time window, or one row per day, user, source, or tool that errored; `group_by` takes several at once and reads the window once |\n| `get_trajectory` | One run\'s ATIF trajectory, paged by step, long text clipped |\n| `get_run_files`, `download_run_file` | Files the run produced |\n| `find_experiments`, `get_experiments`, `get_experiment_runs` | Experiments, their scorecard, and per-case scores with evaluator explanations |\n\nEvery tool answers `{data, meta}`, with `data` a list of rows. Search tools page with `limit` and `offset` (`meta.next_offset` is the next page); tools that take ids answer one row per id in input order, with `note: {"code": "not_found"}` for an unknown one. Dates are `start_date` / `end_date` (`YYYY-MM-DD`, inclusive, or an ISO 8601 timestamp). Money is `{"value", "unit": "currency", "currency": "USD"}`. Errors read `<code>: <detail>`. Tools that read trajectories have a time budget for the whole call, listing included: a run not read in time comes back as a row with `error` and `detail` instead of metrics, counted in `meta.failed` by `get_runs`; ask for it again with `get_runs`. Optional fields with no value are left out of rows. When listing alone uses the budget, the call fails with `harness_timeout`; narrow the window. With `failed_only` or `tool_error`, `find_runs` reads the window again on every call, so take one page and fetch the runs not read with `get_runs` rather than paging on.\n\nA turn is one user message and everything the agent did until the next one. `cost_source` is `reported` when the harness priced the run, `estimated` when evalkit priced it from token counts, `mixed` for both. A turn counts as failed when the harness marks a step in it with `extra.is_error` (see [Harness API](harness-api.md)).\n\n`user_id` and `org_id` are what the harness recorded. Resolve them to people and firms with your identity service.\n'}],Em=[...new Set(Tm.map(e=>e.group))];function Dm(e){return Tm.some(t=>t.id===e)}function Om(e,t){return e.replace(/\{\{(origin|version)\}\}/g,(e,n)=>t[n])}function km(e){let t=/^([\w-]+)\.md(#.*)?$/.exec(e??``);return!t||!Dm(t[1])?null:`/docs/${t[1]}${t[2]??``}`}var Am=`modulepreload`,jm=function(e){return`/`+e},Mm={},Nm=function(e){return e.pathname.endsWith(`.css`)},Pm=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Fm=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=jm(t,n);let r=s(t),i=Nm(r);return Pm(Mm,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Am,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Im=(0,v.lazy)(()=>Fm(()=>import(`./monacoEditor-CqvaahBS.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3])));function Lm(e){return(0,N.jsx)(v.Suspense,{fallback:(0,N.jsx)(`div`,{style:{height:e.height}}),children:(0,N.jsx)(Im,{...e})})}var Rm=`devtools.theme`,zm=(0,v.createContext)({theme:`light`,toggle:()=>{}});function Bm(){return(0,v.useContext)(zm)}function Vm(e){return e===`dark`?`vs-dark`:`light`}function Hm({children:e}){let[t,n]=(0,v.useState)(()=>{let e=localStorage.getItem(Rm);return e===`light`||e===`dark`?e:matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`});return(0,v.useEffect)(()=>{document.documentElement.dataset.theme=t,localStorage.setItem(Rm,t)},[t]),(0,N.jsx)(zm.Provider,{value:{theme:t,toggle:()=>n(e=>e===`dark`?`light`:`dark`)},children:e})}var Um=`Judge-graded checklist over the final answer: each rubric is marked satisfied, incorrect or absent, and these rates summarise the verdicts.`,Wm=`Satisfied ÷ total over the case's trajectory rubrics — checkpoints the recorded steps or final answer must show. Each is judged satisfied or unsatisfied; a long trajectory is judged in parts and a rubric counts when any part shows it.`,Gm={answer_rubric:Um,answer_rubrics:Um,answer_rubric_score:`Final content score: satisfied rubrics ÷ all rubrics. Equals coverage × accuracy.`,answer_rubric_coverage:`Attempted ÷ total: how many rubrics the answer addressed at all, right or wrong.`,answer_rubric_accuracy:`Satisfied ÷ attempted: of what the answer addressed, how much was right. Extra content the rubrics never asked about is not penalised.`,answer_rubric_citation:`Correct source citations ÷ eligible. A rubric's source counts only where the answer actually stated the fact — an unstated fact had no chance to be cited.`,answer_rubric_factual_retrieval:`Satisfied ÷ total on factual_retrieval rubrics: facts read straight from the source data.`,answer_rubric_derived_computation:`Satisfied ÷ total on derived_computation rubrics: figures that need calculation from the source data.`,answer_rubric_analysis_interpretation:`Satisfied ÷ total on analysis_interpretation rubrics: reasoning or judgement over the data.`,trajectory_rubrics:Wm,trajectory_rubric_score:Wm,tool_trajectory_match:`Found ÷ expected over the case's expected tool calls, matched by tool name and arguments, each to at most one actual call. With ordered, they must also appear in that order.`,required_tools_called:`Called ÷ required: how many of the case's required tools the agent called at least once. Extra calls are not penalised.`,presentation_judge:`Judge score on how the reply presents itself — structure and formatting — against the case's presentation config.`,max_response_time:`Pass/fail: did the run finish within the case's time limit.`,"bucket:content":`Mean answer_rubric_score across cases. The other answer_rubric rates are diagnostics on this score, not bucket members.`,"bucket:trajectory":`Mean of the trajectory evaluators' scores across cases: trajectory_rubric_score, tool_trajectory_match and required_tools_called, where configured.`,"bucket:presentation":`Mean presentation_judge score across cases.`,"bucket:efficiency":`Mean max_response_time score across cases.`,"bucket:custom":`Mean of all custom-evaluator scores across cases.`,gauge_duration_seconds:`Wall-clock time of the run.`,gauge_input_tokens:`Input tokens the agent consumed, from the trajectory's token usage.`,gauge_output_tokens:`Output tokens the agent produced.`,gauge_cached_tokens:`Input tokens served from the provider's prompt cache.`,gauge_agent_cost_usd:`Estimated cost of the agent's own LLM usage, priced from its token usage.`,gauge_judge_cost_usd:`evalkit's own judge spend scoring this run.`,gauge_total_tool_calls:`Tool calls the agent made during the run.`,gauge_errored_tool_calls:`Tool calls whose result came back as an error.`,gauge_subagents:`Subagent trajectories the run spawned.`,gauge_turns:`Assistant turns in the trajectory.`};function Km(e){return Gm[e]}function qm({term:e}){let t=Km(e);return t?(0,N.jsxs)(`span`,{className:`infotip`,tabIndex:0,"aria-label":t,children:[(0,N.jsxs)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:[(0,N.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6.6`,stroke:`currentColor`,strokeWidth:`1.3`}),(0,N.jsx)(`path`,{d:`M8 7.4v3.4`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`}),(0,N.jsx)(`circle`,{cx:`8`,cy:`4.9`,r:`0.9`,fill:`currentColor`})]}),(0,N.jsx)(`span`,{className:`infotip-bubble`,role:`tooltip`,children:t})]}):null}function Jm({copied:e}){return(0,N.jsx)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,className:`shrink-0`,children:e?(0,N.jsx)(`path`,{d:`m3 8.5 3.5 3.5L13 5`}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`rect`,{x:`5.5`,y:`5.5`,width:`8`,height:`8`,rx:`1.5`}),(0,N.jsx)(`path`,{d:`M10.5 3.5h-7a1 1 0 0 0-1 1v7`})]})})}function Ym({value:e,label:t,title:n}){let[r,i]=(0,v.useState)(!1);return(0,N.jsxs)(`button`,{className:`-mx-1 inline-flex min-w-0 items-center gap-1 rounded px-1 font-mono text-inherit transition-colors hover:bg-fill hover:text-brand`,title:n??`copy ${e}`,onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e).then(()=>{i(!0),setTimeout(()=>i(!1),1200)})},children:[(0,N.jsx)(`span`,{className:`truncate`,children:t??e}),(0,N.jsx)(Jm,{copied:r})]})}function Xm({text:e}){let[t,n]=(0,v.useState)(!1);return(0,N.jsx)(`button`,{className:`btn btn-sm shrink-0`,onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),1500)})},children:t?`✓`:`copy`})}function Zm({header:e,badge:t,copyText:n,actions:r,defaultOpen:i=!1,open:a,onOpenChange:o,children:s}){let[c,l]=(0,v.useState)(i),u=a??c;return(0,N.jsxs)(`div`,{className:`collapsible ${u?`is-open`:``}`,children:[(0,N.jsxs)(`div`,{className:`collapsible-header group/row`,onClick:()=>{l(!u),o?.(!u)},children:[(0,N.jsx)(`span`,{className:`w-3 text-ink-4`,children:u?`▾`:`▸`}),(0,N.jsx)(`span`,{className:`badge badge-${t}`,children:t}),(0,N.jsx)(`span`,{className:`collapsible-title`,children:e}),r,n!==void 0&&(0,N.jsx)(`span`,{className:`opacity-0 transition-opacity group-hover/row:opacity-100 focus-within:opacity-100`,children:(0,N.jsx)(Xm,{text:n})})]}),u&&(0,N.jsx)(`div`,{className:`collapsible-body`,children:s})]})}function Qm({value:e,language:t}){let{theme:n}=Bm(),r=Math.min(Math.max(e.split(`
|
|
593
|
+
`},{id:`harness-api`,label:`Harness API`,group:`Harness API`,body:"# Harness API\n\nThe Harness API is the HTTP contract a client's agent harness implements so evalkit can drive it: start a run, poll its status, serve its trajectory. Agents in a shared workspace are driven by this server; agents in a personal workspace by `evalkit run` from their owner's machine. The OpenAPI schema ships inside the CLI:\n\n```bash\nevalkit contracts export --target ./contracts # harness-api-v1.json, atif-accepted.json, …\n```\n\nEach endpoint lets evalkit do one thing. Every Harness API has the first three; declare the rest in the capabilities response when you implement them. An agent on the SDK + traces path has no Harness API and none of these endpoints; evalkit sees what its task returns and the spans it exports.\n\n| Endpoint | Lets evalkit | Capability flag | Without it |\n| ----------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| `GET /capabilities` | see what the harness supports and gate evaluators on it (snapshotted per experiment) | part of every Harness API | — |\n| `POST /runs` | invoke the agent: start one run in a fresh session with the case input and files | part of every Harness API | — |\n| `GET /runs/{id}` | wait for the run and read its answer, structured output, model and artifact list | part of every Harness API | — |\n| `GET /runs/{id}/trajectory` | read the trajectory (ATIF): the run view, trajectory evaluators and token/cost gauges | `provides.trajectory` | trajectory evaluators skip, unless the agent's trajectory source is `otel` and the trajectory comes from spans |\n| `GET /runs/{id}/files`, `GET /runs/{id}/files/{path}` | read the workspace: the run's Workspace tab, downloads and artifact copies | `provides.workspace` | no Workspace tab; artifacts the run reports are not copied |\n| `GET /runs` | list the agent's sessions on the Runs page and for `evalkit runs list`/`runs pull`, including ones evalkit did not start; optional `since`/`until` filter by creation time | `provides.run_listing` | the Runs page is empty for this agent |\n| `POST /runs/{id}/stop` | cancel a run that hit its time limit | `accepts.stop` | timed-out runs keep running on the harness |\n\n`POST /runs` takes JSON, or multipart when the case has fixture files and the harness accepts `files` but not `file_urls`. Run status moves through `queued`, `running`, then one of `completed`, `failed`, `cancelled`.\n\nA code-driven agent (no `harness_url`) has none of these endpoints, so its runs have no Workspace tab. To see an agent's files in evalkit, give it a Harness API with at least the files endpoints; its trajectory can still come from traces.\n\nEvery request carries `x-api-key`. Two rules matter more than the rest:\n\n- **Capabilities honesty.** Declare only what works. evalkit neutral-skips evaluators whose inputs the harness does not provide; a false `true` produces failing scores blamed on the agent.\n- **Implement stop.** evalkit calls stop on timeout when `accepts.stop` is true; a harness without it leaks resources on every timed-out run.\n\n## Already have a harness? Keep it\n\nA harness that already emits OpenTelemetry traces can skip the trajectory endpoint: create the agent with `--trajectory-source otel --mapping FILE` and export spans to the collector with the run id it returned from `POST /runs` in the attribute the mapping's `session_id` rule names (`session.id` for OpenInference, `gen_ai.conversation.id` for GenAI). Everything else stays: server runs, `evalkit run`, the Workspace tab. The harness declares `provides.trajectory: false`. See [Tracing](tracing.md).\n\nThe session evalkit polls is the `run_id` that `POST /runs` returns; there is no separate session field. A queue-backed agent whose worker opens its own session can return that session id as `run_id`, or stamp the `run_id` it returned on the job's spans in the mapping's session id attribute. Either way the ids must also work with the other `/runs/{id}` endpoints.\n\nMoving to [SDK runs](sdk-runs.md) instead only makes sense to stop hosting the harness. A code-driven agent loses server-started runs and the Workspace tab, and `run_experiment` refuses an agent with a `harness_url`: keep one agent name and run it with `evalkit run`, rather than adding a second entry for `run_experiment`.\n\n## Checking\n\n```bash\nevalkit harness check ouragent@dev\n```\n\nruns a trivial call, exercises every declared capability and prints a pass/fail table. For a harness agent whose trajectory source is `otel` the trajectory row reads \"from traces\" and a session row reports the collected spans.\n"},{id:`mcp`,label:`MCP`,group:`MCP`,body:'# MCP\n\nThe server is also an MCP server at `{{origin}}/mcp` (streamable HTTP). An agent connected to it can read every agent\'s runs and trajectories, and every experiment\'s scores. It cannot change anything.\n\n## Connect\n\nWith an evalkit login token (`evalkit login` stores it in `~/.evalkit/config.toml`):\n\n```bash\nclaude mcp add --transport http evalkit {{origin}}/mcp --header "Authorization: Bearer $EVALKIT_TOKEN"\n```\n\nOnly login tokens work here: agent tokens (`evalkit tokens create`) and download tickets are refused.\n\nWhen the server\'s config has an `mcp.oauth` block, MCP clients that speak OAuth (Claude, Cursor, Codex) can connect with the URL alone: the server points them to the identity provider, and a token issued for `{{origin}}/mcp` with the configured scope (`mcp.oauth.scope`, default `evalkit:read`) is accepted. Evalkit login tokens keep working next to it.\n\n```yaml\nmcp:\n oauth:\n issuer: https://id.example.com\n jwks_uri: https://id.example.com/.well-known/jwks.json\n # audience: defaults to <server.base_url>/mcp\n # scope: your identity provider\'s name for read access; defaults to evalkit:read\n```\n\nAn OAuth token is not an evalkit user. Whoever the identity provider gives that scope reads everything an evalkit login reads, which today is every workspace, and archiving someone in evalkit does not cut off their OAuth access: revoke it at the identity provider.\n\n## Tools\n\n| Tool | What it returns |\n|---|---|\n| `find_agents` | Agents and the id (`name@workspace`) the run tools take |\n| `find_runs` | An agent\'s runs in a time window, newest first: id, title, time, `user_id`, `org_id`, app or eval. `include` adds each run\'s `metrics`, `turns` or `tool_calls` (what it called, with which arguments). `failed_only` keeps runs with a failure; `tool_error` keeps runs where that tool errored. `timezone` reads date-only bounds as `get_run_stats` does. Up to 5,000 rows when listing alone, 200 with `include` or a filter |\n| `get_runs` | Up to 200 runs by id: turns, failed turns, failures, duration, cost and where it came from, tokens, cost by model, tool errors by tool, opening question, final answer; `include` adds `turns` and `tool_calls` |\n| `get_run_stats` | Totals over a time window, or one row per day, user, source, or tool that errored; `group_by` takes several at once and reads the window once |\n| `get_trajectory` | One run\'s ATIF trajectory, paged by step, long text clipped |\n| `get_run_files`, `download_run_file` | Files the run produced |\n| `find_experiments`, `get_experiments`, `get_experiment_runs` | Experiments, their scorecard, and per-case scores with evaluator explanations |\n\nEvery tool answers `{data, meta}`, with `data` a list of rows. Search tools page with `limit` and `offset` (`meta.next_offset` is the next page); tools that take ids answer one row per id in input order, with `note: {"code": "not_found"}` for an unknown one. Dates are `start_date` / `end_date` (`YYYY-MM-DD`, inclusive, or an ISO 8601 timestamp). Money is `{"value", "unit": "currency", "currency": "USD"}`. Errors read `<code>: <detail>`. Tools that read trajectories have a time budget for the whole call, listing included: a run not read in time comes back as a row with `error` and `detail` instead of metrics, counted in `meta.failed` by `get_runs`; ask for it again with `get_runs`. Optional fields with no value are left out of rows. When listing alone uses the budget, the call fails with `harness_timeout`; narrow the window. With `failed_only` or `tool_error`, `find_runs` reads the window again on every call, so take one page and fetch the runs not read with `get_runs` rather than paging on.\n\nA turn is one user message and everything the agent did until the next one. `cost_source` is `reported` when the harness priced the run, `estimated` when evalkit priced it from token counts, `mixed` for both. A turn counts as failed when the harness marks a step in it with `extra.is_error` (see [Harness API](harness-api.md)).\n\n`user_id` and `org_id` are what the harness recorded. Resolve them to people and firms with your identity service.\n'}],Em=[...new Set(Tm.map(e=>e.group))];function Dm(e){return Tm.some(t=>t.id===e)}function Om(e,t){return e.replace(/\{\{(origin|version)\}\}/g,(e,n)=>t[n])}function km(e){let t=/^([\w-]+)\.md(#.*)?$/.exec(e??``);return!t||!Dm(t[1])?null:`/docs/${t[1]}${t[2]??``}`}var Am=`modulepreload`,jm=function(e){return`/`+e},Mm={},Nm=function(e){return e.pathname.endsWith(`.css`)},Pm=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Fm=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=jm(t,n);let r=s(t),i=Nm(r);return Pm(Mm,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Am,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Im=(0,v.lazy)(()=>Fm(()=>import(`./monacoEditor-DS_lvlYa.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3])));function Lm(e){return(0,N.jsx)(v.Suspense,{fallback:(0,N.jsx)(`div`,{style:{height:e.height}}),children:(0,N.jsx)(Im,{...e})})}var Rm=`devtools.theme`,zm=(0,v.createContext)({theme:`light`,toggle:()=>{}});function Bm(){return(0,v.useContext)(zm)}function Vm(e){return e===`dark`?`vs-dark`:`light`}function Hm({children:e}){let[t,n]=(0,v.useState)(()=>{let e=localStorage.getItem(Rm);return e===`light`||e===`dark`?e:matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`});return(0,v.useEffect)(()=>{document.documentElement.dataset.theme=t,localStorage.setItem(Rm,t)},[t]),(0,N.jsx)(zm.Provider,{value:{theme:t,toggle:()=>n(e=>e===`dark`?`light`:`dark`)},children:e})}var Um=`Judge-graded checklist over the final answer: each rubric is marked satisfied, incorrect or absent, and these rates summarise the verdicts.`,Wm=`Satisfied ÷ total over the case's trajectory rubrics — checkpoints the recorded steps or final answer must show. Each is judged satisfied or unsatisfied; a long trajectory is judged in parts and a rubric counts when any part shows it.`,Gm={answer_rubric:Um,answer_rubrics:Um,answer_rubric_score:`Final content score: satisfied rubrics ÷ all rubrics. Equals coverage × accuracy.`,answer_rubric_coverage:`Attempted ÷ total: how many rubrics the answer addressed at all, right or wrong.`,answer_rubric_accuracy:`Satisfied ÷ attempted: of what the answer addressed, how much was right. Extra content the rubrics never asked about is not penalised.`,answer_rubric_citation:`Correct source citations ÷ eligible. A rubric's source counts only where the answer actually stated the fact — an unstated fact had no chance to be cited.`,answer_rubric_factual_retrieval:`Satisfied ÷ total on factual_retrieval rubrics: facts read straight from the source data.`,answer_rubric_derived_computation:`Satisfied ÷ total on derived_computation rubrics: figures that need calculation from the source data.`,answer_rubric_analysis_interpretation:`Satisfied ÷ total on analysis_interpretation rubrics: reasoning or judgement over the data.`,trajectory_rubrics:Wm,trajectory_rubric_score:Wm,tool_trajectory_match:`Found ÷ expected over the case's expected tool calls, matched by tool name and arguments, each to at most one actual call. With ordered, they must also appear in that order.`,required_tools_called:`Called ÷ required: how many of the case's required tools the agent called at least once. Extra calls are not penalised.`,presentation_judge:`Judge score on how the reply presents itself — structure and formatting — against the case's presentation config.`,max_response_time:`Pass/fail: did the run finish within the case's time limit.`,"bucket:content":`Mean answer_rubric_score across cases. The other answer_rubric rates are diagnostics on this score, not bucket members.`,"bucket:trajectory":`Mean of the trajectory evaluators' scores across cases: trajectory_rubric_score, tool_trajectory_match and required_tools_called, where configured.`,"bucket:presentation":`Mean presentation_judge score across cases.`,"bucket:efficiency":`Mean max_response_time score across cases.`,"bucket:custom":`Mean of all custom-evaluator scores across cases.`,gauge_duration_seconds:`Wall-clock time of the run.`,gauge_input_tokens:`Input tokens the agent consumed, from the trajectory's token usage.`,gauge_output_tokens:`Output tokens the agent produced.`,gauge_cached_tokens:`Input tokens served from the provider's prompt cache.`,gauge_agent_cost_usd:`Estimated cost of the agent's own LLM usage, priced from its token usage.`,gauge_judge_cost_usd:`evalkit's own judge spend scoring this run.`,gauge_total_tool_calls:`Tool calls the agent made during the run.`,gauge_errored_tool_calls:`Tool calls whose result came back as an error.`,gauge_subagents:`Subagent trajectories the run spawned.`,gauge_turns:`Assistant turns in the trajectory.`};function Km(e){return Gm[e]}function qm({term:e}){let t=Km(e);return t?(0,N.jsxs)(`span`,{className:`infotip`,tabIndex:0,"aria-label":t,children:[(0,N.jsxs)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:[(0,N.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6.6`,stroke:`currentColor`,strokeWidth:`1.3`}),(0,N.jsx)(`path`,{d:`M8 7.4v3.4`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`}),(0,N.jsx)(`circle`,{cx:`8`,cy:`4.9`,r:`0.9`,fill:`currentColor`})]}),(0,N.jsx)(`span`,{className:`infotip-bubble`,role:`tooltip`,children:t})]}):null}function Jm({copied:e}){return(0,N.jsx)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,className:`shrink-0`,children:e?(0,N.jsx)(`path`,{d:`m3 8.5 3.5 3.5L13 5`}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`rect`,{x:`5.5`,y:`5.5`,width:`8`,height:`8`,rx:`1.5`}),(0,N.jsx)(`path`,{d:`M10.5 3.5h-7a1 1 0 0 0-1 1v7`})]})})}function Ym({value:e,label:t,title:n}){let[r,i]=(0,v.useState)(!1);return(0,N.jsxs)(`button`,{className:`-mx-1 inline-flex min-w-0 items-center gap-1 rounded px-1 font-mono text-inherit transition-colors hover:bg-fill hover:text-brand`,title:n??`copy ${e}`,onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e).then(()=>{i(!0),setTimeout(()=>i(!1),1200)})},children:[(0,N.jsx)(`span`,{className:`truncate`,children:t??e}),(0,N.jsx)(Jm,{copied:r})]})}function Xm({text:e}){let[t,n]=(0,v.useState)(!1);return(0,N.jsx)(`button`,{className:`btn btn-sm shrink-0`,onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),1500)})},children:t?`✓`:`copy`})}function Zm({header:e,badge:t,copyText:n,actions:r,defaultOpen:i=!1,open:a,onOpenChange:o,children:s}){let[c,l]=(0,v.useState)(i),u=a??c;return(0,N.jsxs)(`div`,{className:`collapsible ${u?`is-open`:``}`,children:[(0,N.jsxs)(`div`,{className:`collapsible-header group/row`,onClick:()=>{l(!u),o?.(!u)},children:[(0,N.jsx)(`span`,{className:`w-3 text-ink-4`,children:u?`▾`:`▸`}),(0,N.jsx)(`span`,{className:`badge badge-${t}`,children:t}),(0,N.jsx)(`span`,{className:`collapsible-title`,children:e}),r,n!==void 0&&(0,N.jsx)(`span`,{className:`opacity-0 transition-opacity group-hover/row:opacity-100 focus-within:opacity-100`,children:(0,N.jsx)(Xm,{text:n})})]}),u&&(0,N.jsx)(`div`,{className:`collapsible-body`,children:s})]})}function Qm({value:e,language:t}){let{theme:n}=Bm(),r=Math.min(Math.max(e.split(`
|
|
594
594
|
`).length,2)*18+10,480);return(0,N.jsx)(Lm,{height:r,theme:Vm(n),language:t,value:e,options:{readOnly:!0,minimap:{enabled:!1},fontSize:12,fontFamily:`JetBrains Mono Variable, ui-monospace, monospace`,padding:{top:4,bottom:4},lineNumbers:`off`,wordWrap:`on`,scrollBeyondLastLine:!1,renderLineHighlight:`none`,overviewRulerLanes:0,scrollbar:{alwaysConsumeMouseWheel:!1}}})}function $m({tabs:e,active:t,onSelect:n}){return(0,N.jsx)(`div`,{className:`flex gap-1 border-b border-n-100`,children:e.map(e=>(0,N.jsx)(`button`,{className:`tab-button ${t===e.id?`active`:``}`,disabled:e.disabled,title:e.title,onClick:()=>!e.disabled&&n(e.id),children:e.label},e.id))})}function eh({code:e,language:t}){let{theme:n}=Bm();return(0,N.jsxs)(`div`,{className:`relative my-2`,children:[(0,N.jsx)(`div`,{className:`absolute top-1 right-1`,children:(0,N.jsx)(Xm,{text:e})}),(0,N.jsx)(wm,{code:e,language:t,theme:n===`dark`?qp.nightOwl:qp.github,children:({className:e,style:t,tokens:n,getLineProps:r,getTokenProps:i})=>(0,N.jsx)(`pre`,{className:`${e} overflow-x-auto rounded-md p-3 pr-16 font-mono text-meta`,style:t,children:n.map((e,t)=>(0,N.jsx)(`div`,{...r({line:e}),children:e.map((e,t)=>(0,N.jsx)(`span`,{...i({token:e})},t))},t))})})]})}function th({href:e,children:t}){let n=km(e);return n?(0,N.jsx)(kn,{to:n,children:t}):(0,N.jsx)(`a`,{href:e,children:t})}function nh({children:e}){let t=e?.props??{},n=String(t.children??``).replace(/\n$/,``),r=/language-(\w+)/.exec(t.className??``)?.[1]??`text`;return(0,N.jsx)(eh,{code:n,language:r})}function rh(){let{tab:e}=ht(),[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null);if((0,v.useEffect)(()=>{M(`/cli`).then(n).catch(e=>i(e instanceof qn?e.message:String(e)))},[]),!Dm(e))return(0,N.jsx)(Lt,{to:`/docs/quickstart`,replace:!0});let a={origin:window.location.origin,version:t?.version??`<version>`},o=Tm.find(t=>t.id===e)?.body??``;return(0,N.jsx)(`div`,{className:`page`,children:(0,N.jsxs)(`div`,{className:`mx-auto flex max-w-6xl gap-10`,children:[(0,N.jsxs)(`nav`,{className:`sticky top-4 w-44 shrink-0 self-start`,"aria-label":`Docs`,children:[(0,N.jsx)(`h1`,{className:`page-title mb-3`,children:`Docs`}),Em.map(t=>(0,N.jsxs)(`div`,{className:`mb-4`,children:[(0,N.jsx)(`div`,{className:`mb-1 text-micro font-semibold tracking-wide text-ink-3 uppercase`,children:t}),(0,N.jsx)(`ul`,{className:`flex flex-col`,children:Tm.filter(e=>e.group===t).map(t=>(0,N.jsx)(`li`,{children:(0,N.jsx)(kn,{to:`/docs/${t.id}`,"aria-current":t.id===e?`page`:void 0,className:`block rounded px-2 py-1 text-lede ${t.id===e?`bg-n-50 font-medium text-ink`:`text-ink-2 hover:bg-hover`}`,children:t.label})},t.id))})]},t))]}),(0,N.jsxs)(`article`,{className:`min-w-0 flex-1`,children:[r&&(0,N.jsx)(`p`,{className:`text-ink-2`,children:r}),(0,N.jsx)(`div`,{className:`md-body docs-body mx-auto max-w-3xl text-lede`,children:(0,N.jsx)(Su,{remarkPlugins:[Dp],components:{pre:nh,a:th},children:Om(o,a)})})]})]})})}var ih=[{key:`max_concurrent_runs`,label:`Max concurrent runs`,min:1},{key:`run_timeout_seconds`,label:`Run timeout (s)`,min:0},{key:`poll_interval_seconds`,label:`Poll interval (s)`,min:0},{key:`stop_grace_seconds`,label:`Stop grace (s)`,min:0},{key:`trajectory_wait_seconds`,label:`Trajectory wait (s)`,min:0}],ah={max_concurrent_runs:`4`,run_timeout_seconds:`840`,poll_interval_seconds:`5`,stop_grace_seconds:`120`,trajectory_wait_seconds:`60`};function oh(e){return{workspace:e,name:``,harness_url:``,trajectory_source:`atif`,repo_url:``,mapping:``,api_key:{key:``,clear:!1},settings:{...ah}}}function sh(e){let t={...ah};for(let{key:n}of ih)t[n]=String(e.settings[n]);return{workspace:e.workspace,name:e.name,harness_url:e.harness_url??``,trajectory_source:e.trajectory_source,repo_url:e.repo_url??``,mapping:``,api_key:{key:``,clear:!1},settings:t}}function ch(e){try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:null}catch{return null}}function lh(e,t){let n=[];t===`create`?(e.name.trim()?e.name.includes(`@`)&&n.push(`Name cannot contain @.`):n.push(`Name is required.`),e.trajectory_source===`otel`&&(e.mapping.trim()?ch(e.mapping)||n.push(`The span mapping is not a JSON object.`):n.push(`An agent whose trajectories come from traces needs a span mapping.`))):e.trajectory_source===`otel`&&e.mapping.trim()&&!ch(e.mapping)&&n.push(`The span mapping is not a JSON object.`);for(let{key:t,label:r,min:i}of ih){let a=e.settings[t].trim(),o=Number(a);(!a||!Number.isInteger(o)||o<i)&&n.push(`${r} must be a whole number of at least ${i}.`)}return n}function uh(e){let t={};for(let{key:n}of ih)t[n]=Number(e.settings[n]);return t}function dh(e,t){return t.has_api_key&&(e.harness_url.trim()||null)!==t.harness_url&&!e.api_key.key}function fh(e){return{...e.api_key.key?{api_key:e.api_key.key}:{},workspace:e.workspace,name:e.name.trim(),harness_url:e.harness_url.trim()||null,trajectory_source:e.trajectory_source,repo_url:e.repo_url.trim()||null,settings:uh(e),mapping:e.trajectory_source===`otel`?ch(e.mapping):null}}function ph(e,t){let n={harness_url:e.harness_url.trim()||null,repo_url:e.repo_url.trim()||null,settings:{...t.settings,...uh(e)}};return e.trajectory_source!==t.trajectory_source&&(n.trajectory_source=e.trajectory_source),e.trajectory_source===`otel`&&e.mapping.trim()&&(n.mapping=ch(e.mapping)),e.api_key.key?n.api_key=e.api_key.key:e.api_key.clear&&(n.api_key=null),n}function mh({hasKey:e,value:t,onChange:n}){return e&&!t.clear&&!t.key?(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:`chip muted`,children:`Key set`}),(0,N.jsx)(`button`,{type:`button`,className:`btn btn-sm`,onClick:()=>n({key:``,clear:!0}),children:`Replace or clear`})]}):(0,N.jsx)(`input`,{className:`input min-w-0 flex-1`,type:`password`,"aria-label":`API key`,placeholder:e?`new key, or leave empty to remove it`:`API key (optional)`,autoComplete:`off`,value:t.key,onChange:e=>n({key:e.target.value,clear:t.clear})})}var hh=JSON.parse(`{
|
|
595
595
|
"endpoint_note": "Check this URL before saving. The server at this address receives the API key you enter here and the data evalkit sends it: cases, answers and trajectories.",
|
|
596
596
|
"personal_key_note": "Personal agents and evaluators read their API key from your evalkit.yaml (credentials:), never from the server."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{conf as e,language as t}from"./typescript-
|
|
1
|
+
import{conf as e,language as t}from"./typescript-UXz5THvW.js";var n=e,r={defaultToken:`invalid`,tokenPostfix:`.js`,keywords:`break.case.catch.class.continue.const.constructor.debugger.default.delete.do.else.export.extends.false.finally.for.from.function.get.if.import.in.instanceof.let.new.null.return.set.static.super.switch.symbol.this.throw.true.try.typeof.undefined.var.void.while.with.yield.async.await.of`.split(`.`),typeKeywords:[],operators:t.operators,symbols:t.symbols,escapes:t.escapes,digits:t.digits,octaldigits:t.octaldigits,binarydigits:t.binarydigits,hexdigits:t.hexdigits,regexpctl:t.regexpctl,regexpesc:t.regexpesc,tokenizer:t.tokenizer};export{n as conf,r as language};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as e,p as t}from"./editor.api-
|
|
1
|
+
import{m as e,p as t}from"./editor.api-D1rxHWTF.js";import{t as n}from"./workers-GTw2k376.js";import{_ as r,a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b}from"./lspLanguageFeatures-BieGLabF.js";var x=12e4,S=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=n({moduleId:`vs/language/json/jsonWorker`,createWorker:()=>new Worker(new URL(`/assets/json.worker-CV9fqkUp.js`,``+import.meta.url),{type:`module`}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}};function C(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}function p(e){r=e,i=``,a=0,o=16,d=0}function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&E(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46){if(r++,r<e.length&&E(e.charCodeAt(r)))for(r++;r<e.length&&E(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r)}let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101)){if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&E(e.charCodeAt(r))){for(r++;r<e.length&&E(e.charCodeAt(r));)r++;n=r}else d=3}return e.substring(t,n)}function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
|
|
2
2
|
`;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r}else{if(a>=0&&a<=31){if(T(a)){t+=e.substring(i,r),d=2;break}d=6}r++}}return t}function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(w(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(w(t));return o=15}if(T(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
|
|
3
3
|
`),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!T(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,T(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!E(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}function _(e){if(w(e)||T(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let e;do e=g();while(e>=12&&e<=15);return e}return{setPosition:p,getPosition:()=>r,scan:t?v:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>c,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}function w(e){return e===32||e===9}function T(e){return e===10||e===13}function E(e){return e>=48&&e<=57}var D;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(D||={}),Array(20).fill(0).map((e,t)=>` `.repeat(t));var O=200;Array(O).fill(0).map((e,t)=>`
|
|
4
4
|
`+` `.repeat(t)),Array(O).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(O).fill(0).map((e,t)=>`\r
|