evalkit-py 0.3.0.dev22__py3-none-any.whl → 0.3.0.dev23__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/install.md +1 -1
- evalkit/bundled/docs/quickstart.md +2 -0
- evalkit/bundled/docs/try-locally.md +1 -1
- evalkit/bundled/skills/evalkit-deployment/SKILL.md +1 -1
- evalkit/bundled/skills/evalkit-deployment/references/config-and-deploy.md +1 -1
- evalkit/bundled/skills/evalkit-deployment/try/run.py +1 -1
- evalkit/bundled/skills/evalkit-usage/SKILL.md +3 -1
- evalkit/bundled/ui/assets/{cssMode-BQE60lcZ.js → cssMode-CoTBbpI5.js} +1 -1
- evalkit/bundled/ui/assets/{editor.api-DJ8xpAA0.js → editor.api-Cr-PXNp2.js} +1 -1
- evalkit/bundled/ui/assets/{freemarker2-Bc5B4d2b.js → freemarker2-CL1NM5FA.js} +1 -1
- evalkit/bundled/ui/assets/{handlebars-CaoVjSXJ.js → handlebars-7ek7INAL.js} +1 -1
- evalkit/bundled/ui/assets/{html-m-_a_cj5.js → html-Drc6cP1t.js} +1 -1
- evalkit/bundled/ui/assets/{htmlMode-BbwX4sOT.js → htmlMode-CFiXH_GR.js} +1 -1
- evalkit/bundled/ui/assets/{index-D5BENseO.js → index-CYeR_hOQ.js} +5 -3
- evalkit/bundled/ui/assets/{javascript-B9SILWdi.js → javascript-Cy-7a8Z0.js} +1 -1
- evalkit/bundled/ui/assets/{jsonMode-3FRirQ-K.js → jsonMode-Dg_V7luY.js} +1 -1
- evalkit/bundled/ui/assets/{liquid-7gAUBXYU.js → liquid-CjXLAMO3.js} +1 -1
- evalkit/bundled/ui/assets/{lspLanguageFeatures-DizM9dOp.js → lspLanguageFeatures-CWLysTm-.js} +1 -1
- evalkit/bundled/ui/assets/{mdx-geF_nGZ2.js → mdx-BguYBb7k.js} +1 -1
- evalkit/bundled/ui/assets/{monacoEditor-BBg93Ajn.js → monacoEditor-Bi6bViFv.js} +4 -4
- evalkit/bundled/ui/assets/{python-KFwaHKP6.js → python-Dg2cFHfj.js} +1 -1
- evalkit/bundled/ui/assets/{razor-BeAsTEZA.js → razor-DX7s6-im.js} +1 -1
- evalkit/bundled/ui/assets/{tsMode-DwM5baPU.js → tsMode-Cfe-6z3n.js} +1 -1
- evalkit/bundled/ui/assets/{typescript-TeoPr118.js → typescript-D7EhI-iL.js} +1 -1
- evalkit/bundled/ui/assets/{workers-Ca7Lh9se.js → workers-C2j8gv1t.js} +1 -1
- evalkit/bundled/ui/assets/{xml-_KhiBKu5.js → xml-BYlznEmP.js} +1 -1
- evalkit/bundled/ui/assets/{yaml-BvMSFoaS.js → yaml-D_2QnF1I.js} +1 -1
- evalkit/bundled/ui/index.html +1 -1
- {evalkit_py-0.3.0.dev22.dist-info → evalkit_py-0.3.0.dev23.dist-info}/METADATA +3 -3
- {evalkit_py-0.3.0.dev22.dist-info → evalkit_py-0.3.0.dev23.dist-info}/RECORD +33 -33
- {evalkit_py-0.3.0.dev22.dist-info → evalkit_py-0.3.0.dev23.dist-info}/WHEEL +0 -0
- {evalkit_py-0.3.0.dev22.dist-info → evalkit_py-0.3.0.dev23.dist-info}/entry_points.txt +0 -0
- {evalkit_py-0.3.0.dev22.dist-info → evalkit_py-0.3.0.dev23.dist-info}/licenses/LICENSE +0 -0
evalkit/bundled/docs/install.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Install
|
|
2
2
|
|
|
3
|
-
evalkit is one Python package on PyPI, `evalkit-py`. It holds the `evalkit` command (the CLI), the `evalkit.sdk` module for SDK runs and, with the `server` extra, the server itself.
|
|
3
|
+
evalkit is one Python package on PyPI, `evalkit-py`. It holds the `evalkit` command (the CLI), the `evalkit.sdk` module for SDK runs and, with the `server` extra, the server itself. It needs **Python 3.12 or newer**, for the CLI, the SDK and the server alike.
|
|
4
4
|
|
|
5
5
|
Your CLI and SDK must run the **same version as the evalkit server** you use: local runs and SDK runs refuse to start otherwise. The commands on this page pin version **{{version}}**. On your server's own `/docs/install` page, that is the server's version; `curl <server url>/api/cli` prints it anywhere.
|
|
6
6
|
|
|
@@ -26,7 +26,7 @@ kit in a folder, and the steps after this section are the same.
|
|
|
26
26
|
|
|
27
27
|
### Without Docker
|
|
28
28
|
|
|
29
|
-
evalkit is on PyPI as `evalkit-py
|
|
29
|
+
evalkit is on PyPI as `evalkit-py` and needs Python 3.12 or newer. Install it with the server extra, then
|
|
30
30
|
let `evalkit init-server` set up the rest:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
@@ -17,7 +17,7 @@ Every developer on the client's team needs that one; only the deployer needs
|
|
|
17
17
|
this one. You need no CLI before the server is up: the image contains one
|
|
18
18
|
(`docker compose run --rm server evalkit …`). Once the server runs, install
|
|
19
19
|
it on your machine from PyPI at the server's version, like everyone after you:
|
|
20
|
-
`uv tool install --reinstall "evalkit-py==<version>"
|
|
20
|
+
`uv tool install --reinstall "evalkit-py==<version>"` (Python 3.12 or newer), where
|
|
21
21
|
`curl <server url>/api/cli` prints the version (see evalkit-usage).
|
|
22
22
|
|
|
23
23
|
`evalkit skills install` puts the evalkit user docs in `evalkit-docs/`
|
|
@@ -22,7 +22,7 @@ The **UI is part of the same server image** and served at the server root —
|
|
|
22
22
|
there is no separate UI deployment. At runtime the FastAPI app serves
|
|
23
23
|
`/assets` and returns `index.html` for every non-`/api` path (so client-side
|
|
24
24
|
routes survive a refresh); deploying the image deploys the UI. The PyPI
|
|
25
|
-
wheel (`evalkit-py
|
|
25
|
+
wheel (`evalkit-py`, Python 3.12 or newer) bundles the UI too, so `pip install "evalkit-py[server]"`
|
|
26
26
|
and `evalkit serve` also serve it.
|
|
27
27
|
|
|
28
28
|
## Setup sequence (exact commands)
|
|
@@ -28,7 +28,9 @@ and how case review works.
|
|
|
28
28
|
## Install and log in
|
|
29
29
|
|
|
30
30
|
1. Install the CLI from PyPI at the server's version. evalkit is on PyPI as
|
|
31
|
-
`evalkit-py
|
|
31
|
+
`evalkit-py` and needs Python 3.12 or newer, in the tool and in any
|
|
32
|
+
project that adds the SDK. `curl <server url>/api/cli` prints the server's
|
|
33
|
+
version:
|
|
32
34
|
|
|
33
35
|
```bash
|
|
34
36
|
uv tool install --reinstall "evalkit-py==<version>"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-Cr-PXNp2.js";import{t}from"./workers-C2j8gv1t.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-CWLysTm-.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-CYeR_hOQ.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-Cr-PXNp2.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-Cr-PXNp2.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-Cr-PXNp2.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-Cr-PXNp2.js";import{t}from"./workers-C2j8gv1t.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-CWLysTm-.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-Bi6bViFv.js","assets/editor.api-Cr-PXNp2.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 A(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function j(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 ne(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,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),ne(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+A(a,u),c+=ne(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+A(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(j(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 re(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(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 ae=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 oe(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,ae)}catch(e){ae(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function se(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 oe(se.bind(null,e))}var ce={map:re,forEach:function(e,t,n){re(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return re(e,function(){t++}),t},toArray:function(e){return re(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=ce,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=se,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:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=oe,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`),A=Symbol.for(`react.strict_mode`),j=Symbol.for(`react.profiler`),ne=Symbol.for(`react.consumer`),re=Symbol.for(`react.context`),ie=Symbol.for(`react.forward_ref`),ae=Symbol.for(`react.suspense`),oe=Symbol.for(`react.suspense_list`),se=Symbol.for(`react.memo`),ce=Symbol.for(`react.lazy`),le=Symbol.for(`react.activity`),ue=Symbol.for(`react.legacy_hidden`),de=Symbol.for(`react.memo_cache_sentinel`),fe=Symbol.for(`react.view_transition`),pe=Symbol.for(`react.recoverable`),me=Symbol.iterator;function he(e){return typeof e!=`object`||!e?null:(e=me&&e[me]||e[`@@iterator`],typeof e==`function`?e:null)}var ge=Symbol.for(`react.client.reference`);function _e(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case te:return`Fragment`;case j:return`Profiler`;case A:return`StrictMode`;case ae:return`Suspense`;case oe:return`SuspenseList`;case le:return`Activity`;case fe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ee:return`Portal`;case re:return e.displayName||`Context`;case ne:return(e._context.displayName||`Context`)+`.Consumer`;case ie:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case se:return t=e.displayName||null,t===null?_e(e.type)||`Memo`:t;case ce:t=e._payload,e=e._init;try{return _e(e(t))}catch{}}return null}var ve=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},xe=[],Se=-1;function Ce(e){return{current:e}}function we(e){0>Se||(e.current=xe[Se],xe[Se]=null,Se--)}function Te(e,t){Se++,xe[Se]=e.current,e.current=t}var Ee=Ce(null),De=Ce(null),Oe=Ce(null),ke=Ce(null);function Ae(e,t){switch(Te(Oe,t),Te(De,e),Te(Ee,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}}we(Ee),Te(Ee,e)}function je(){we(Ee),we(De),we(Oe)}function Me(e){var t=e.memoizedState;t!==null&&(Ch._currentValue=t.memoizedState,Te(ke,e)),t=Ee.current;var n=Op(t,e.type);t!==n&&(Te(De,e),Te(Ee,n))}function Ne(e){De.current===e&&(we(Ee),we(De)),ke.current===e&&(we(ke),Ch._currentValue=be)}var Pe,Fe;function Ie(e){if(Pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Pe=t&&t[1]||``,Fe=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+Pe+e+Fe}var Le=!1;function Re(e,t){if(!e||Le)return``;Le=!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(`
|
|
@@ -57,6 +57,8 @@ The Workspace tab on a run lists the files the agent wrote. evalkit reads them t
|
|
|
57
57
|
|
|
58
58
|
## 2. Install and log in
|
|
59
59
|
|
|
60
|
+
evalkit needs Python 3.12 or newer.
|
|
61
|
+
|
|
60
62
|
\`\`\`bash
|
|
61
63
|
uv tool install --reinstall "evalkit-py=={{version}}"
|
|
62
64
|
evalkit login --url {{origin}}
|
|
@@ -207,7 +209,7 @@ The words you need before your first scorecard. Everything else is explained on
|
|
|
207
209
|
| \`evalkit.yaml\` | The file in your repo that says where your cases are and which environment variables hold API keys. |
|
|
208
210
|
|
|
209
211
|
Next: [Try locally](try-locally.md) to see these on a running server, or the [Quickstart](quickstart.md) to connect your own agent.
|
|
210
|
-
`},{id:`try-locally`,label:`Try locally`,group:`Get started`,body:'# Try evalkit locally\n\nThe try-it stack runs evalkit on your machine and walks you through the\ndefault way to connect an agent: an **SDK run with OpenTelemetry traces**.\nYour Python code calls the agent once per case. The agent\'s spans go to\nevalkit, evalkit turns them into a trajectory, and your LLM judges the\nanswers. The kit includes a small sample agent that calls your LLM, so you\nget a real scorecard before you touch your own agent.\n\nIt is not a deployment: it uses a demo admin password and keeps everything\non one machine. For a real deployment, follow the evalkit-deployment skill.\n\n## What you need\n\n- `uv` and port 8020 free.\n- An OpenAI-compatible LLM endpoint (OpenAI, a LiteLLM proxy, vLLM, Ollama,\n ...) that supports tool calls and structured output, with its base URL, API\n key and model name. The sample agent and the judge both use it.\n- Either Postgres 15 or newer running on this machine (without Docker), or\n Docker with Compose v2 (with Docker).\n\n## Start the server\n\nPick one way. Both end with the server on http://localhost:8020 and the try\nkit in a folder, and the steps after this section are the same.\n\n### Without Docker\n\nevalkit is on PyPI as `evalkit-py`. Install it with the server extra, then\nlet `evalkit init-server` set up the rest:\n\n```bash\nuv tool install "evalkit-py[server]" # or: pip install "evalkit-py[server]"\nevalkit init-server\ncd evalkit-try\nevalkit serve\n```\n\n`init-server` asks for the Postgres URL (default\n`postgresql+psycopg://localhost/evalkit`), your LLM\'s base URL, model and API\nkey, and the admin password (default `evalkit-admin`). A question is skipped\nwhen its flag or environment variable is set (`evalkit init-server --help`\nlists both); `--yes` never asks. It then:\n\n- creates the database when it does not exist, and migrates it\n- registers your LLM as the LLM provider `try` and makes it the default judge,\n with its API key stored encrypted in the database\n- copies the try kit into `./evalkit-try`\n- writes `config.yaml` there, with blobs stored under `evalkit-try/data`\n- writes `.env` beside it, with your LLM settings, the admin password and the\n key that encrypts stored API keys; `evalkit serve` reads it. Keep `.env`:\n without that key the server cannot read the stored LLM key\n\nLeave `evalkit serve` running and use another terminal for the steps below,\nfrom the `evalkit-try` folder. The CLI is already installed, so skip the\ninstall command in step 1.\n\n### With Docker\n\nThe kit is `skills/evalkit-deployment/try/` in the evalkit repository, and the\nserver image holds a copy. The first `--build` takes a few minutes (it builds\nthe web UI and installs the server); later starts take seconds.\n\nFrom an evalkit checkout, compose builds the image:\n\n```bash\ncd skills/evalkit-deployment/try\ncp -n .env.example .env # fill in LLM_BASE_URL, LLM_API_KEY, LLM_MODEL\ndocker compose up -d --wait --build\n```\n\nWith the server image instead, copy the kit out of it first:\n\n```bash\nexport EVALKIT_IMAGE=<registry>/evalkit:<tag>\ndocker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/out" "$EVALKIT_IMAGE" \\\n evalkit init-server --kit-only --dir /out/evalkit-try\ncd evalkit-try\ncp -n .env.example .env # fill in LLM_BASE_URL, LLM_API_KEY, LLM_MODEL\ndocker compose up -d --wait\n```\n\nCompose starts Postgres and the evalkit server, with your LLM as the judge.\n`--wait` returns once the server is healthy. The server runs migrations on\nevery start.\n\n### What\'s in the kit\n\n| File | What it is |\n| -- | -- |\n| `agent.py` | The sample agent. It answers questions about Acme Widgets, a made-up company, by calling your LLM with one tool, `lookup_financials`. It records each model call and tool call as an OpenTelemetry span, using the GenAI semantic conventions. |\n| `run.py` | The SDK run: `tracing.register` sends the spans to evalkit, and `run_experiment` calls the agent once per case and scores the answers. |\n| `mapping.json` | The span mapping: which span attribute holds the model, the messages, the tokens and each tool call. It starts as the connect-traces skill\'s `gen_ai.json`. |\n| `cases/acme/` | Five cases in two folders (tags), with answer rubrics and a tool check. |\n| `evalkit.yaml`, `.env` | Where the cases are, and the judge\'s key. |\n| `config.yaml` | The server\'s config. |\n| `docker-compose.yml`, `.env.example` | With Docker only: the stack, and the template for its `.env`. `init-server` leaves them out. |\n\n## 1. Install the CLI and log in\n\n```bash\nuv tool install --reinstall "evalkit-py=={{version}}" # with Docker only\nevalkit login --url http://localhost:8020 --username admin --password evalkit-admin\n```\n\n`{{version}}` is the server\'s version; `curl http://localhost:8020/api/cli`\nprints it.\n\n`evalkit login` replaces any login you already saved. To keep it, skip\n`evalkit login` and point this shell at the try-it server instead (this needs\n`jq`):\n\n```bash\nexport EVALKIT_SERVER_URL=http://localhost:8020\nexport EVALKIT_TOKEN=$(curl -fsSL -X POST http://localhost:8020/api/auth/login \\\n -H \'content-type: application/json\' -d \'{"username": "admin", "password": "evalkit-admin"}\' | jq -r .token)\n```\n\n`run.py` declares its own dependencies at the top of the file, so\n`uv run run.py` installs what it needs on the first run. The kit pins evalkit\nto the server\'s version when `evalkit init-server` copies it. In an evalkit\ncheckout, run the kit\'s scripts with the checkout instead:\n`uv run --project ../../.. --extra otel python run.py`.\n\n## 2. Connect the agent\'s traces\n\nCreate the agent. Its trajectories come from its spans, read with\n`mapping.json`:\n\n```bash\nevalkit agents create analyst --trajectory-source otel --mapping mapping.json\n```\n\nRun one case without creating an experiment:\n\n```bash\nuv run run.py --dry-run\n```\n\nIt prints the answer, the session id with a count of its spans by kind and\nthe mapping version, and whether evalkit built a valid trajectory from them. If no spans arrived,\ncheck that `run.py` calls `tracing.register` before the agent runs.\n\nThen see how the mapping read that session:\n\n```bash\nevalkit traces check analyst <session id>\n```\n\nIt prints one line per check: the session settled, the root span, the\nmapping version, the model calls and their token totals, the tool calls\nmatched to the model\'s calls, any span attribute the mapping does not read,\nand a summary of the trajectory. Every line should have a ✓.\n\n## 3. First scorecard\n\n```bash\nuv run run.py\n```\n\n`run_experiment` syncs `cases/acme` into your own workspace (`acme@admin`),\nruns the five cases, has your LLM judge each answer against its rubrics,\nchecks that the agent called `lookup_financials`, and prints the scorecard\nand the experiment URL. The scores depend on your model. `acme-operating-margin`\nasks for a figure the agent has no data for, so it passes only if the agent\nsays so instead of making one up.\n\nThe `answer_rubric_*` rows by rubric type (`factual_retrieval`,\n`derived_computation`, `analysis_interpretation`) count only the cases that\nhave a rubric of that type, so their case counts differ.\n\nOpen http://localhost:8020, log in as `admin` with the admin password, and open the\nexperiment under the `acme` dataset. Each run shows its trajectory, the\njudge\'s verdict on every rubric and the tool check. The Runs page lists the\nraw sessions.\n\n## 4. Iterate\n\nThis is the loop you will run on your own agent:\n\n- Change the agent, for example the instructions in `agent.py`, and run\n `run.py` again. Compare the two experiments in the UI.\n- Edit or add a case under `cases/acme/` and run again. The run syncs the\n folder first.\n- Run one folder: `run_experiment(..., tags=["balance-sheet"])`. A folder\'s name is a tag on its cases.\n\n## 5. Connect your own agent\n\nDo the same in your own repository:\n\n1. **Traces.** If your agent already emits OpenTelemetry spans (OpenInference\n or GenAI conventions), keep them. If not, add an instrumentor for your LLM\n library, for example `openinference-instrumentation-openai` for the OpenAI\n client (OpenInference publishes one per popular library), or record GenAI\n spans yourself as this kit\'s `agent.py` does ([Tracing](tracing.md)). The\n connect-traces skill writes or checks the span mapping\n ([Mappings](mappings.md)).\n2. **Setup.** Put an `evalkit.yaml` at the root of your repository, with\n `cases:` pointing at your cases directory and the judge\'s key under\n `credentials.llm_providers`. That map is keyed by the judge\'s base URL, which must\n match the judge the run uses: the server\'s default judge\n (`{{origin}}/api/judge-default` shows its `base_url`), or the one you pass to\n `run_experiment(judge=...)`. This kit keys it with `env:LLM_BASE_URL` so the\n URL comes from `.env`. Keep the keys in a `.env` beside `evalkit.yaml`.\n3. **Script.** Copy `run.py`. Pin evalkit in its header to your evalkit\n server\'s version (`evalkit-py[otel]==<version>`), call\n `tracing.register(agent="myagent")`, and write a `task` that calls your\n agent with the case input. `uv run run.py` builds an environment from the\n header alone, so add your agent\'s packages to its `dependencies`. If your\n agent lives in a uv project, you can instead add evalkit to the project\n (see the [Install](install.md) page) and run the script with\n `uv run python run.py`.\n4. **Cases.** Add a folder under your cases directory, for example\n `mine/`, and run with `dataset="mine"`. The authoring-eval-cases skill\n covers the format. See [Concepts](concepts.md) for the terms.\n5. **Agent and mapping.** Copy this kit\'s `mapping.json` into your\n repository, or `openinference.json` from the connect-traces skill if your\n spans follow OpenInference, and create the agent with it:\n `evalkit agents create myagent --trajectory-source otel --mapping\n my-mapping.json`. Do a dry run with your script and `evalkit traces check`\n on its session, as in step 2. For each `!` line, edit your copy, upload it\n as a draft and preview the same session:\n\n ```bash\n evalkit traces mapping push myagent my-mapping.json\n evalkit traces check myagent <session id> --mapping draft\n ```\n\n When it reads right, activate it: `evalkit traces mapping push myagent\n my-mapping.json --activate`, or use the agent\'s Mappings tab in the web\n UI. Runs always use the active mapping. The connect-traces skill walks a\n coding agent through the same loop.\n\n[SDK runs](sdk-runs.md) covers the rest: agents in another process, Python\nevaluators, and re-scoring. If the evalkit server\nshould drive your agent instead of your script (runs started from the UI,\nshared agents), implement the [Harness API](harness-api.md).\n\n## Next: run evalkit for your team\n\nThe try-it stack is for one machine. For a server your team shares, follow\nthe [evalkit-deployment skill](https://github.com/inferedge-ai/evalkit/tree/main/skills/evalkit-deployment):\nit covers the server image, Postgres, blob storage, the judge, migrations\nand the first users and workspaces. A coding agent can walk it with you.\nOnce the server runs, your teammates start from its own `/docs` page.\n\n## Stop and clean up\n\nWithout Docker: stop `evalkit serve` with Ctrl-C. To delete everything, drop\nthe database you gave `init-server` (`dropdb evalkit` with the default URL)\nand remove the `evalkit-try` folder.\n\nWith Docker:\n\n```bash\ndocker compose down # stop; data stays in the volumes\ndocker compose down -v # stop and delete all data\n```\n\n## When something fails\n\n- `uv run run.py` cannot find `evalkit-py==<version>`: that version is not\n on PyPI yet (a source build, or a build whose publish job has not finished).\n Run it with the wheel you installed instead:\n `uv run --no-project --with "<path to the wheel>[otel]" python run.py`, or\n from an evalkit checkout: `uv run --project <checkout> --extra otel python run.py`.\n Or wait for the publish.\n- `init-server` cannot connect: start Postgres (`brew services start\n postgresql@17`, `sudo systemctl start postgresql`, or Postgres.app), or\n pass `--database-url` with the user and password your Postgres needs, e.g.\n `postgresql+psycopg://me:secret@localhost:5432/evalkit`.\n- `init-server` says `config.yaml` exists: you already set up that folder.\n Run `evalkit serve` there, or pass `--force` to write it again.\n- `evalkit serve` says a variable is not set: check `.env` beside\n `config.yaml`.\n- Compose says a variable is not set: fill in `.env` (copied from\n `.env.example`).\n- Compose cannot find `evalkit:try`: outside a checkout, set `EVALKIT_IMAGE`;\n in a checkout, add `--build`.\n- The server will not start: `docker compose logs server` (and\n check that `.env` is filled in: the server reads the LLM settings at start).\n- The server exits with code 132 and no logs (Apple Silicon): the image is\n older than 0.22.0. Add `OPENSSL_armcap: "0"` to the server\'s\n `environment:` in `docker-compose.yml`, or use a newer image.\n- The judge fails on every case: your endpoint must support structured\n output (`response_format` with a JSON schema). Try another model.\n- `evalkit` or `run.py` talks to another server: run the `evalkit login` above\n again, or check `EVALKIT_SERVER_URL`.\n'},{id:`install`,label:`Install`,group:`Get started`,body:'# Install\n\nevalkit is one Python package on PyPI, `evalkit-py`. It holds the `evalkit` command (the CLI), the `evalkit.sdk` module for SDK runs and, with the `server` extra, the server itself.\n\nYour CLI and SDK must run the **same version as the evalkit server** you use: local runs and SDK runs refuse to start otherwise. The commands on this page pin version **{{version}}**. On your server\'s own `/docs/install` page, that is the server\'s version; `curl <server url>/api/cli` prints it anywhere.\n\n## The CLI, as a global tool\n\n```bash\nuv tool install --reinstall "evalkit-py=={{version}}"\n```\n\nWith pipx instead: `pipx install --force "evalkit-py=={{version}}"`.\n\n`curl {{origin}}/api/cli` prints the server\'s version, for scripts and CI:\n\n```bash\nuv tool install --reinstall "evalkit-py==$(curl -fsSL {{origin}}/api/cli | jq -r .version)"\n```\n\n## The SDK, into a project\n\n`run_experiment` and `tracing.register` live in the same package as the CLI. The `otel` extra brings the OpenTelemetry SDK and the OTLP exporter. Pin the server\'s version; `uv.lock` records it:\n\n```bash\nuv add "evalkit-py[otel]=={{version}}"\n```\n\nWith pip instead: `pip install "evalkit-py[otel]=={{version}}"`.\n\nTo keep evalkit out of the app\'s dependencies, run the eval script with it instead:\n\n```bash\nuv run --with "evalkit-py[otel]=={{version}}" python eval/run.py\n```\n\n## The server\n\n`pip install "evalkit-py[server]"` installs the server too: the API, the web UI and migrations. To run one on your machine against a Postgres you already have:\n\n```bash\nevalkit init-server # creates the database, writes config.yaml and .env in ./evalkit-try\ncd evalkit-try && evalkit serve\n```\n\n[Try locally](try-locally.md) walks through it with a sample agent; the evalkit-deployment skill covers running a server for a team.\n\n## Updating\n\nEvery API response carries `X-Evalkit-Version`. The CLI warns when it differs from the server and refuses when the major versions differ. Local runs and SDK runs refuse any difference, so after a server deploy, from the project\'s root:\n\n```bash\nevalkit update\n```\n\nIt reinstalls the CLI at the server\'s version and, when `pyproject.toml` pins `evalkit-py==…`, moves the pin and runs `uv sync`. It then refreshes the skills in every directory `evalkit skills install` wrote to on this machine (listed in `~/.evalkit/skills-targets`), and in `./.claude/skills` or `./.agents/skills` if they hold an earlier install; commit the changes in repos that track the skills. Pass `--no-skills` to skip that.\n\nA CLI older than 0.3.0 cannot update itself: `evalkit update` fails with `KeyError: \'filename\'`. Run the [global tool install](#the-cli-as-a-global-tool) command once instead; `evalkit update` works from then on.\n\nA project that vendored an evalkit wheel before evalkit was on PyPI moves to PyPI once: `uv remove evalkit && uv add "evalkit-py[otel]=={{version}}"`.\n\nNext: [Login](login.md).\n'},{id:`login`,label:`Login`,group:`Get started`,body:`# Login
|
|
212
|
+
`},{id:`try-locally`,label:`Try locally`,group:`Get started`,body:'# Try evalkit locally\n\nThe try-it stack runs evalkit on your machine and walks you through the\ndefault way to connect an agent: an **SDK run with OpenTelemetry traces**.\nYour Python code calls the agent once per case. The agent\'s spans go to\nevalkit, evalkit turns them into a trajectory, and your LLM judges the\nanswers. The kit includes a small sample agent that calls your LLM, so you\nget a real scorecard before you touch your own agent.\n\nIt is not a deployment: it uses a demo admin password and keeps everything\non one machine. For a real deployment, follow the evalkit-deployment skill.\n\n## What you need\n\n- `uv` and port 8020 free.\n- An OpenAI-compatible LLM endpoint (OpenAI, a LiteLLM proxy, vLLM, Ollama,\n ...) that supports tool calls and structured output, with its base URL, API\n key and model name. The sample agent and the judge both use it.\n- Either Postgres 15 or newer running on this machine (without Docker), or\n Docker with Compose v2 (with Docker).\n\n## Start the server\n\nPick one way. Both end with the server on http://localhost:8020 and the try\nkit in a folder, and the steps after this section are the same.\n\n### Without Docker\n\nevalkit is on PyPI as `evalkit-py` and needs Python 3.12 or newer. Install it with the server extra, then\nlet `evalkit init-server` set up the rest:\n\n```bash\nuv tool install "evalkit-py[server]" # or: pip install "evalkit-py[server]"\nevalkit init-server\ncd evalkit-try\nevalkit serve\n```\n\n`init-server` asks for the Postgres URL (default\n`postgresql+psycopg://localhost/evalkit`), your LLM\'s base URL, model and API\nkey, and the admin password (default `evalkit-admin`). A question is skipped\nwhen its flag or environment variable is set (`evalkit init-server --help`\nlists both); `--yes` never asks. It then:\n\n- creates the database when it does not exist, and migrates it\n- registers your LLM as the LLM provider `try` and makes it the default judge,\n with its API key stored encrypted in the database\n- copies the try kit into `./evalkit-try`\n- writes `config.yaml` there, with blobs stored under `evalkit-try/data`\n- writes `.env` beside it, with your LLM settings, the admin password and the\n key that encrypts stored API keys; `evalkit serve` reads it. Keep `.env`:\n without that key the server cannot read the stored LLM key\n\nLeave `evalkit serve` running and use another terminal for the steps below,\nfrom the `evalkit-try` folder. The CLI is already installed, so skip the\ninstall command in step 1.\n\n### With Docker\n\nThe kit is `skills/evalkit-deployment/try/` in the evalkit repository, and the\nserver image holds a copy. The first `--build` takes a few minutes (it builds\nthe web UI and installs the server); later starts take seconds.\n\nFrom an evalkit checkout, compose builds the image:\n\n```bash\ncd skills/evalkit-deployment/try\ncp -n .env.example .env # fill in LLM_BASE_URL, LLM_API_KEY, LLM_MODEL\ndocker compose up -d --wait --build\n```\n\nWith the server image instead, copy the kit out of it first:\n\n```bash\nexport EVALKIT_IMAGE=<registry>/evalkit:<tag>\ndocker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/out" "$EVALKIT_IMAGE" \\\n evalkit init-server --kit-only --dir /out/evalkit-try\ncd evalkit-try\ncp -n .env.example .env # fill in LLM_BASE_URL, LLM_API_KEY, LLM_MODEL\ndocker compose up -d --wait\n```\n\nCompose starts Postgres and the evalkit server, with your LLM as the judge.\n`--wait` returns once the server is healthy. The server runs migrations on\nevery start.\n\n### What\'s in the kit\n\n| File | What it is |\n| -- | -- |\n| `agent.py` | The sample agent. It answers questions about Acme Widgets, a made-up company, by calling your LLM with one tool, `lookup_financials`. It records each model call and tool call as an OpenTelemetry span, using the GenAI semantic conventions. |\n| `run.py` | The SDK run: `tracing.register` sends the spans to evalkit, and `run_experiment` calls the agent once per case and scores the answers. |\n| `mapping.json` | The span mapping: which span attribute holds the model, the messages, the tokens and each tool call. It starts as the connect-traces skill\'s `gen_ai.json`. |\n| `cases/acme/` | Five cases in two folders (tags), with answer rubrics and a tool check. |\n| `evalkit.yaml`, `.env` | Where the cases are, and the judge\'s key. |\n| `config.yaml` | The server\'s config. |\n| `docker-compose.yml`, `.env.example` | With Docker only: the stack, and the template for its `.env`. `init-server` leaves them out. |\n\n## 1. Install the CLI and log in\n\n```bash\nuv tool install --reinstall "evalkit-py=={{version}}" # with Docker only\nevalkit login --url http://localhost:8020 --username admin --password evalkit-admin\n```\n\n`{{version}}` is the server\'s version; `curl http://localhost:8020/api/cli`\nprints it.\n\n`evalkit login` replaces any login you already saved. To keep it, skip\n`evalkit login` and point this shell at the try-it server instead (this needs\n`jq`):\n\n```bash\nexport EVALKIT_SERVER_URL=http://localhost:8020\nexport EVALKIT_TOKEN=$(curl -fsSL -X POST http://localhost:8020/api/auth/login \\\n -H \'content-type: application/json\' -d \'{"username": "admin", "password": "evalkit-admin"}\' | jq -r .token)\n```\n\n`run.py` declares its own dependencies at the top of the file, so\n`uv run run.py` installs what it needs on the first run. The kit pins evalkit\nto the server\'s version when `evalkit init-server` copies it. In an evalkit\ncheckout, run the kit\'s scripts with the checkout instead:\n`uv run --project ../../.. --extra otel python run.py`.\n\n## 2. Connect the agent\'s traces\n\nCreate the agent. Its trajectories come from its spans, read with\n`mapping.json`:\n\n```bash\nevalkit agents create analyst --trajectory-source otel --mapping mapping.json\n```\n\nRun one case without creating an experiment:\n\n```bash\nuv run run.py --dry-run\n```\n\nIt prints the answer, the session id with a count of its spans by kind and\nthe mapping version, and whether evalkit built a valid trajectory from them. If no spans arrived,\ncheck that `run.py` calls `tracing.register` before the agent runs.\n\nThen see how the mapping read that session:\n\n```bash\nevalkit traces check analyst <session id>\n```\n\nIt prints one line per check: the session settled, the root span, the\nmapping version, the model calls and their token totals, the tool calls\nmatched to the model\'s calls, any span attribute the mapping does not read,\nand a summary of the trajectory. Every line should have a ✓.\n\n## 3. First scorecard\n\n```bash\nuv run run.py\n```\n\n`run_experiment` syncs `cases/acme` into your own workspace (`acme@admin`),\nruns the five cases, has your LLM judge each answer against its rubrics,\nchecks that the agent called `lookup_financials`, and prints the scorecard\nand the experiment URL. The scores depend on your model. `acme-operating-margin`\nasks for a figure the agent has no data for, so it passes only if the agent\nsays so instead of making one up.\n\nThe `answer_rubric_*` rows by rubric type (`factual_retrieval`,\n`derived_computation`, `analysis_interpretation`) count only the cases that\nhave a rubric of that type, so their case counts differ.\n\nOpen http://localhost:8020, log in as `admin` with the admin password, and open the\nexperiment under the `acme` dataset. Each run shows its trajectory, the\njudge\'s verdict on every rubric and the tool check. The Runs page lists the\nraw sessions.\n\n## 4. Iterate\n\nThis is the loop you will run on your own agent:\n\n- Change the agent, for example the instructions in `agent.py`, and run\n `run.py` again. Compare the two experiments in the UI.\n- Edit or add a case under `cases/acme/` and run again. The run syncs the\n folder first.\n- Run one folder: `run_experiment(..., tags=["balance-sheet"])`. A folder\'s name is a tag on its cases.\n\n## 5. Connect your own agent\n\nDo the same in your own repository:\n\n1. **Traces.** If your agent already emits OpenTelemetry spans (OpenInference\n or GenAI conventions), keep them. If not, add an instrumentor for your LLM\n library, for example `openinference-instrumentation-openai` for the OpenAI\n client (OpenInference publishes one per popular library), or record GenAI\n spans yourself as this kit\'s `agent.py` does ([Tracing](tracing.md)). The\n connect-traces skill writes or checks the span mapping\n ([Mappings](mappings.md)).\n2. **Setup.** Put an `evalkit.yaml` at the root of your repository, with\n `cases:` pointing at your cases directory and the judge\'s key under\n `credentials.llm_providers`. That map is keyed by the judge\'s base URL, which must\n match the judge the run uses: the server\'s default judge\n (`{{origin}}/api/judge-default` shows its `base_url`), or the one you pass to\n `run_experiment(judge=...)`. This kit keys it with `env:LLM_BASE_URL` so the\n URL comes from `.env`. Keep the keys in a `.env` beside `evalkit.yaml`.\n3. **Script.** Copy `run.py`. Pin evalkit in its header to your evalkit\n server\'s version (`evalkit-py[otel]==<version>`), call\n `tracing.register(agent="myagent")`, and write a `task` that calls your\n agent with the case input. `uv run run.py` builds an environment from the\n header alone, so add your agent\'s packages to its `dependencies`. If your\n agent lives in a uv project, you can instead add evalkit to the project\n (see the [Install](install.md) page) and run the script with\n `uv run python run.py`.\n4. **Cases.** Add a folder under your cases directory, for example\n `mine/`, and run with `dataset="mine"`. The authoring-eval-cases skill\n covers the format. See [Concepts](concepts.md) for the terms.\n5. **Agent and mapping.** Copy this kit\'s `mapping.json` into your\n repository, or `openinference.json` from the connect-traces skill if your\n spans follow OpenInference, and create the agent with it:\n `evalkit agents create myagent --trajectory-source otel --mapping\n my-mapping.json`. Do a dry run with your script and `evalkit traces check`\n on its session, as in step 2. For each `!` line, edit your copy, upload it\n as a draft and preview the same session:\n\n ```bash\n evalkit traces mapping push myagent my-mapping.json\n evalkit traces check myagent <session id> --mapping draft\n ```\n\n When it reads right, activate it: `evalkit traces mapping push myagent\n my-mapping.json --activate`, or use the agent\'s Mappings tab in the web\n UI. Runs always use the active mapping. The connect-traces skill walks a\n coding agent through the same loop.\n\n[SDK runs](sdk-runs.md) covers the rest: agents in another process, Python\nevaluators, and re-scoring. If the evalkit server\nshould drive your agent instead of your script (runs started from the UI,\nshared agents), implement the [Harness API](harness-api.md).\n\n## Next: run evalkit for your team\n\nThe try-it stack is for one machine. For a server your team shares, follow\nthe [evalkit-deployment skill](https://github.com/inferedge-ai/evalkit/tree/main/skills/evalkit-deployment):\nit covers the server image, Postgres, blob storage, the judge, migrations\nand the first users and workspaces. A coding agent can walk it with you.\nOnce the server runs, your teammates start from its own `/docs` page.\n\n## Stop and clean up\n\nWithout Docker: stop `evalkit serve` with Ctrl-C. To delete everything, drop\nthe database you gave `init-server` (`dropdb evalkit` with the default URL)\nand remove the `evalkit-try` folder.\n\nWith Docker:\n\n```bash\ndocker compose down # stop; data stays in the volumes\ndocker compose down -v # stop and delete all data\n```\n\n## When something fails\n\n- `uv run run.py` cannot find `evalkit-py==<version>`: that version is not\n on PyPI yet (a source build, or a build whose publish job has not finished).\n Run it with the wheel you installed instead:\n `uv run --no-project --with "<path to the wheel>[otel]" python run.py`, or\n from an evalkit checkout: `uv run --project <checkout> --extra otel python run.py`.\n Or wait for the publish.\n- `init-server` cannot connect: start Postgres (`brew services start\n postgresql@17`, `sudo systemctl start postgresql`, or Postgres.app), or\n pass `--database-url` with the user and password your Postgres needs, e.g.\n `postgresql+psycopg://me:secret@localhost:5432/evalkit`.\n- `init-server` says `config.yaml` exists: you already set up that folder.\n Run `evalkit serve` there, or pass `--force` to write it again.\n- `evalkit serve` says a variable is not set: check `.env` beside\n `config.yaml`.\n- Compose says a variable is not set: fill in `.env` (copied from\n `.env.example`).\n- Compose cannot find `evalkit:try`: outside a checkout, set `EVALKIT_IMAGE`;\n in a checkout, add `--build`.\n- The server will not start: `docker compose logs server` (and\n check that `.env` is filled in: the server reads the LLM settings at start).\n- The server exits with code 132 and no logs (Apple Silicon): the image is\n older than 0.22.0. Add `OPENSSL_armcap: "0"` to the server\'s\n `environment:` in `docker-compose.yml`, or use a newer image.\n- The judge fails on every case: your endpoint must support structured\n output (`response_format` with a JSON schema). Try another model.\n- `evalkit` or `run.py` talks to another server: run the `evalkit login` above\n again, or check `EVALKIT_SERVER_URL`.\n'},{id:`install`,label:`Install`,group:`Get started`,body:'# Install\n\nevalkit is one Python package on PyPI, `evalkit-py`. It holds the `evalkit` command (the CLI), the `evalkit.sdk` module for SDK runs and, with the `server` extra, the server itself. It needs **Python 3.12 or newer**, for the CLI, the SDK and the server alike.\n\nYour CLI and SDK must run the **same version as the evalkit server** you use: local runs and SDK runs refuse to start otherwise. The commands on this page pin version **{{version}}**. On your server\'s own `/docs/install` page, that is the server\'s version; `curl <server url>/api/cli` prints it anywhere.\n\n## The CLI, as a global tool\n\n```bash\nuv tool install --reinstall "evalkit-py=={{version}}"\n```\n\nWith pipx instead: `pipx install --force "evalkit-py=={{version}}"`.\n\n`curl {{origin}}/api/cli` prints the server\'s version, for scripts and CI:\n\n```bash\nuv tool install --reinstall "evalkit-py==$(curl -fsSL {{origin}}/api/cli | jq -r .version)"\n```\n\n## The SDK, into a project\n\n`run_experiment` and `tracing.register` live in the same package as the CLI. The `otel` extra brings the OpenTelemetry SDK and the OTLP exporter. Pin the server\'s version; `uv.lock` records it:\n\n```bash\nuv add "evalkit-py[otel]=={{version}}"\n```\n\nWith pip instead: `pip install "evalkit-py[otel]=={{version}}"`.\n\nTo keep evalkit out of the app\'s dependencies, run the eval script with it instead:\n\n```bash\nuv run --with "evalkit-py[otel]=={{version}}" python eval/run.py\n```\n\n## The server\n\n`pip install "evalkit-py[server]"` installs the server too: the API, the web UI and migrations. To run one on your machine against a Postgres you already have:\n\n```bash\nevalkit init-server # creates the database, writes config.yaml and .env in ./evalkit-try\ncd evalkit-try && evalkit serve\n```\n\n[Try locally](try-locally.md) walks through it with a sample agent; the evalkit-deployment skill covers running a server for a team.\n\n## Updating\n\nEvery API response carries `X-Evalkit-Version`. The CLI warns when it differs from the server and refuses when the major versions differ. Local runs and SDK runs refuse any difference, so after a server deploy, from the project\'s root:\n\n```bash\nevalkit update\n```\n\nIt reinstalls the CLI at the server\'s version and, when `pyproject.toml` pins `evalkit-py==…`, moves the pin and runs `uv sync`. It then refreshes the skills in every directory `evalkit skills install` wrote to on this machine (listed in `~/.evalkit/skills-targets`), and in `./.claude/skills` or `./.agents/skills` if they hold an earlier install; commit the changes in repos that track the skills. Pass `--no-skills` to skip that.\n\nA CLI older than 0.3.0 cannot update itself: `evalkit update` fails with `KeyError: \'filename\'`. Run the [global tool install](#the-cli-as-a-global-tool) command once instead; `evalkit update` works from then on.\n\nA project that vendored an evalkit wheel before evalkit was on PyPI moves to PyPI once: `uv remove evalkit && uv add "evalkit-py[otel]=={{version}}"`.\n\nNext: [Login](login.md).\n'},{id:`login`,label:`Login`,group:`Get started`,body:`# Login
|
|
211
213
|
|
|
212
214
|
\`\`\`bash
|
|
213
215
|
evalkit login --url {{origin}}
|
|
@@ -588,7 +590,7 @@ evalkit traces mapping list myagent
|
|
|
588
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.
|
|
589
591
|
|
|
590
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.
|
|
591
|
-
`},{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-BBg93Ajn.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3])));function Lm(e){return(0,P.jsx)(v.Suspense,{fallback:(0,P.jsx)(`div`,{style:{height:e.height}}),children:(0,P.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,P.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,P.jsxs)(`span`,{className:`infotip`,tabIndex:0,"aria-label":t,children:[(0,P.jsxs)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6.6`,stroke:`currentColor`,strokeWidth:`1.3`}),(0,P.jsx)(`path`,{d:`M8 7.4v3.4`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`}),(0,P.jsx)(`circle`,{cx:`8`,cy:`4.9`,r:`0.9`,fill:`currentColor`})]}),(0,P.jsx)(`span`,{className:`infotip-bubble`,role:`tooltip`,children:t})]}):null}function Jm({copied:e}){return(0,P.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,P.jsx)(`path`,{d:`m3 8.5 3.5 3.5L13 5`}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`rect`,{x:`5.5`,y:`5.5`,width:`8`,height:`8`,rx:`1.5`}),(0,P.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,P.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,P.jsx)(`span`,{className:`truncate`,children:t??e}),(0,P.jsx)(Jm,{copied:r})]})}function Xm({text:e}){let[t,n]=(0,v.useState)(!1);return(0,P.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,P.jsxs)(`div`,{className:`collapsible ${u?`is-open`:``}`,children:[(0,P.jsxs)(`div`,{className:`collapsible-header group/row`,onClick:()=>{l(!u),o?.(!u)},children:[(0,P.jsx)(`span`,{className:`w-3 text-ink-4`,children:u?`▾`:`▸`}),(0,P.jsx)(`span`,{className:`badge badge-${t}`,children:t}),(0,P.jsx)(`span`,{className:`collapsible-title`,children:e}),r,n!==void 0&&(0,P.jsx)(`span`,{className:`opacity-0 transition-opacity group-hover/row:opacity-100 focus-within:opacity-100`,children:(0,P.jsx)(Xm,{text:n})})]}),u&&(0,P.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-Bi6bViFv.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3])));function Lm(e){return(0,P.jsx)(v.Suspense,{fallback:(0,P.jsx)(`div`,{style:{height:e.height}}),children:(0,P.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,P.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,P.jsxs)(`span`,{className:`infotip`,tabIndex:0,"aria-label":t,children:[(0,P.jsxs)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:[(0,P.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6.6`,stroke:`currentColor`,strokeWidth:`1.3`}),(0,P.jsx)(`path`,{d:`M8 7.4v3.4`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`}),(0,P.jsx)(`circle`,{cx:`8`,cy:`4.9`,r:`0.9`,fill:`currentColor`})]}),(0,P.jsx)(`span`,{className:`infotip-bubble`,role:`tooltip`,children:t})]}):null}function Jm({copied:e}){return(0,P.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,P.jsx)(`path`,{d:`m3 8.5 3.5 3.5L13 5`}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`rect`,{x:`5.5`,y:`5.5`,width:`8`,height:`8`,rx:`1.5`}),(0,P.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,P.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,P.jsx)(`span`,{className:`truncate`,children:t??e}),(0,P.jsx)(Jm,{copied:r})]})}function Xm({text:e}){let[t,n]=(0,v.useState)(!1);return(0,P.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,P.jsxs)(`div`,{className:`collapsible ${u?`is-open`:``}`,children:[(0,P.jsxs)(`div`,{className:`collapsible-header group/row`,onClick:()=>{l(!u),o?.(!u)},children:[(0,P.jsx)(`span`,{className:`w-3 text-ink-4`,children:u?`▾`:`▸`}),(0,P.jsx)(`span`,{className:`badge badge-${t}`,children:t}),(0,P.jsx)(`span`,{className:`collapsible-title`,children:e}),r,n!==void 0&&(0,P.jsx)(`span`,{className:`opacity-0 transition-opacity group-hover/row:opacity-100 focus-within:opacity-100`,children:(0,P.jsx)(Xm,{text:n})})]}),u&&(0,P.jsx)(`div`,{className:`collapsible-body`,children:s})]})}function Qm({value:e,language:t}){let{theme:n}=Bm(),r=Math.min(Math.max(e.split(`
|
|
592
594
|
`).length,2)*18+10,480);return(0,P.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,P.jsx)(`div`,{className:`flex gap-1 border-b border-n-100`,children:e.map(e=>(0,P.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,P.jsxs)(`div`,{className:`relative my-2`,children:[(0,P.jsx)(`div`,{className:`absolute top-1 right-1`,children:(0,P.jsx)(Xm,{text:e})}),(0,P.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,P.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,P.jsx)(`div`,{...r({line:e}),children:e.map((e,t)=>(0,P.jsx)(`span`,{...i({token:e})},t))},t))})})]})}function th({href:e,children:t}){let n=km(e);return n?(0,P.jsx)(On,{to:n,children:t}):(0,P.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,P.jsx)(eh,{code:n,language:r})}function rh(){let{tab:e}=mt(),[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null);if((0,v.useEffect)(()=>{N(`/cli`).then(n).catch(e=>i(e instanceof Kn?e.message:String(e)))},[]),!Dm(e))return(0,P.jsx)(It,{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,P.jsx)(`div`,{className:`page`,children:(0,P.jsxs)(`div`,{className:`mx-auto flex max-w-6xl gap-10`,children:[(0,P.jsxs)(`nav`,{className:`sticky top-4 w-44 shrink-0 self-start`,"aria-label":`Docs`,children:[(0,P.jsx)(`h1`,{className:`page-title mb-3`,children:`Docs`}),Em.map(t=>(0,P.jsxs)(`div`,{className:`mb-4`,children:[(0,P.jsx)(`div`,{className:`mb-1 text-micro font-semibold tracking-wide text-ink-3 uppercase`,children:t}),(0,P.jsx)(`ul`,{className:`flex flex-col`,children:Tm.filter(e=>e.group===t).map(t=>(0,P.jsx)(`li`,{children:(0,P.jsx)(On,{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,P.jsxs)(`article`,{className:`min-w-0 flex-1`,children:[r&&(0,P.jsx)(`p`,{className:`text-ink-2`,children:r}),(0,P.jsx)(`div`,{className:`md-body docs-body mx-auto max-w-3xl text-lede`,children:(0,P.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,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsx)(`span`,{className:`chip muted`,children:`Key set`}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-sm`,onClick:()=>n({key:``,clear:!0}),children:`Replace or clear`})]}):(0,P.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(`{
|
|
593
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.",
|
|
594
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-D7EhI-iL.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-Cr-PXNp2.js";import{t as n}from"./workers-C2j8gv1t.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-CWLysTm-.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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-Cr-PXNp2.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,brackets:[[`<!--`,`-->`],[`<`,`>`],[`{{`,`}}`],[`{%`,`%}`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{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:``,builtinTags:`if.else.elseif.endif.render.assign.capture.endcapture.case.endcase.comment.endcomment.cycle.decrement.for.endfor.include.increment.layout.raw.endraw.render.tablerow.endtablerow.unless.endunless`.split(`.`),builtinFilters:`abs.append.at_least.at_most.capitalize.ceil.compact.date.default.divided_by.downcase.escape.escape_once.first.floor.join.json.last.lstrip.map.minus.modulo.newline_to_br.plus.prepend.remove.remove_first.replace.replace_first.reverse.round.rstrip.size.slice.sort.sort_natural.split.strip.strip_html.strip_newlines.times.truncate.truncatewords.uniq.upcase.url_decode.url_encode.where`.split(`.`),constants:[`true`,`false`],operators:[`==`,`!=`,`>`,`<`,`>=`,`<=`],symbol:/[=><!]+/,identifier:/[a-zA-Z_][\w]*/,tokenizer:{root:[[/\{\%\s*comment\s*\%\}/,`comment.start.liquid`,`@comment`],[/\{\{/,{token:`@rematch`,switchTo:`@liquidState.root`}],[/\{\%/,{token:`@rematch`,switchTo:`@liquidState.root`}],[/(<)([\w\-]+)(\/>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)([:\w]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)([\w\-]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/</,`delimiter.html`],[/\{/,`delimiter.html`],[/[^<{]+/]],comment:[[/\{\%\s*endcomment\s*\%\}/,`comment.end.liquid`,`@pop`],[/./,`comment.content.liquid`]],otherTag:[[/\{\{/,{token:`@rematch`,switchTo:`@liquidState.otherTag`}],[/\{\%/,{token:`@rematch`,switchTo:`@liquidState.otherTag`}],[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,`delimiter.output.liquid`],[/\}\}/,{token:`delimiter.output.liquid`,switchTo:`@$S2.$S3`}],[/\{\%/,`delimiter.tag.liquid`],[/raw\s*\%\}/,`delimiter.tag.liquid`,`@liquidRaw`],[/\%\}/,{token:`delimiter.tag.liquid`,switchTo:`@$S2.$S3`}],{include:`liquidRoot`}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,`delimiter.tag.liquid`],[/@identifier/],[/\%\}/,{token:`delimiter.tag.liquid`,next:`@root`}]],liquidRoot:[[/\d+(\.\d+)?/,`number.liquid`],[/"[^"]*"/,`string.liquid`],[/'[^']*'/,`string.liquid`],[/\s+/],[/@symbol/,{cases:{"@operators":`operator.liquid`,"@default":``}}],[/\./],[/@identifier/,{cases:{"@constants":`keyword.liquid`,"@builtinFilters":`predefined.liquid`,"@builtinTags":`predefined.liquid`,"@default":`variable.liquid`}}],[/[^}|%]/,`variable.liquid`]]}};export{n as conf,r as language};
|