evalution 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSING.md +1 -0
- package/dist/{check-BTg6THHB.d.ts → check-CR4fU1S5.d.ts} +43 -15
- package/dist/checks/index.d.ts +1 -1
- package/dist/cli/index.js +116 -69
- package/dist/client/assets/DatasetView-BqSWI_pm.js +15 -0
- package/dist/client/assets/EvalRunView-CR6ZksSu.js +2 -0
- package/dist/client/assets/EvalView-JPEM5IY8.js +1 -0
- package/dist/client/assets/{data-grid-overlay-editor-CBtkQufd.js → data-grid-overlay-editor-B_nPhXKR.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-DyudWmoO.js → highlighted-body-KPVGNVTW-dPpneB8R.js} +1 -1
- package/dist/client/assets/{index-B7OFMd2c.css → index-BGcZZetP.css} +1 -1
- package/dist/client/assets/{index-aypgoZcG.js → index-CwjMcK6S.js} +150 -150
- package/dist/client/assets/{number-overlay-editor-CXHiTLsp.js → number-overlay-editor-CRWFlaQs.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/{dataset-types-CSjbM_Vz.d.ts → dataset-types-Dqi5vVg-.d.ts} +20 -5
- package/dist/index.d.ts +169 -9
- package/dist/index.js +24 -13
- package/dist/{trace-Dn6Pfcc5.d.ts → trace-DGj5oW7z.d.ts} +1 -1
- package/dist/{otlp-trace-ingestor-V8_bbpUG.js → trace-event-ingestor-BghQcCHe.js} +566 -75
- package/dist/views/datasets/index.d.ts +1 -1
- package/dist/views/index.d.ts +2 -2
- package/dist/views/react/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/client/assets/DatasetView-CyX0mCj8.js +0 -15
- package/dist/client/assets/EvalRunView-5IZp_6Ob.js +0 -2
- package/dist/client/assets/EvalView-DBTK6rCe.js +0 -1
package/dist/client/assets/{number-overlay-editor-CXHiTLsp.js → number-overlay-editor-CRWFlaQs.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ad as Y,r as O}from"./index-aypgoZcG.js";import{s as Be}from"./DatasetView-CyX0mCj8.js";const Fe=Be("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function pe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var ee;(function(e){e.event="event",e.props="prop"})(ee||(ee={}));function q(){}function _e(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,f){return i===t[f]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function z(e){return e==null}function je(e){return typeof e=="number"&&isNaN(e)}function xe(e){return z(e)||je(e)||typeof e=="number"&&!isFinite(e)}function ye(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Me(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=Me(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function de(e){var t=O.useRef(e);t.current=e;var r=O.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],f=a[1]||"";return{beforeDecimal:i,afterDecimal:f,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function be(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function ge(e,t){return Array(t+1).join(e)}function Ve(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var f=1+i,p=a.length;return f<0?a="0."+ge("0",Math.abs(f))+a:f>=p?a=a+ge("0",f-p):a=(a.substring(0,f)||"0")+"."+a.substring(f),r+a}function me(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,f=a.afterDecimal,p=a.hasNegation,m=parseFloat("0."+(f||"0")),x=f.length<=t?"0."+f:m.toFixed(t),h=x.split("."),s=i;i&&Number(h[0])&&(s=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},h[0]));var S=be(h[1]||"",t,r),y=p?"-":"",l=n?".":"";return""+y+s+l+S}function J(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ne=_e(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,f){f===void 0&&(f=$e);var p=a.findIndex(function(k){return k}),m=e.slice(0,p);!t&&!r.startsWith(m)&&(t=m,r=m+r,n=n+m.length);for(var x=r.length,h=e.length,s={},S=new Array(x),y=0;y<x;y++){S[y]=-1;for(var l=0,I=h;l<I;l++){var C=f({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:l});if(C&&s[l]!==!0){S[y]=l,s[l]=!0;break}}}for(var g=n;g<x&&(S[g]===-1||!i(r[g]));)g++;var B=g===x||S[g]===-1?h:S[g];for(g=n-1;g>0&&S[g]===-1;)g--;var F=g===-1||S[g]===-1?0:S[g]+1;return F>B?B:n-F<B-n?F:B}function he(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function we(e,t,r,n,a,i){i===void 0&&(i=q);var f=de(function(l,I){var C,g;return xe(l)?(g="",C=""):typeof l=="number"||I?(g=typeof l=="number"?Ve(l):l,C=n(g)):(g=a(l,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),p=O.useState(function(){return f(z(e)?t:e,r)}),m=p[0],x=p[1],h=de(function(l,I){l.formattedValue!==m.formattedValue&&x({formattedValue:l.formattedValue,numAsString:l.value}),i(l,I)}),s=e,S=r;z(e)&&(s=m.numAsString,S=!0);var y=f(s,S);return O.useMemo(function(){x(y)},[y.formattedValue]),O.useEffect(function(){if(!z(t)&&z(e)&&m.formattedValue!==""){var l=parseFloat(m.numAsString);h({formattedValue:m.formattedValue,value:m.numAsString,floatValue:isNaN(l)?void 0:l},{event:void 0,source:ee.props})}},[]),[m,h]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,f=e.format;f===void 0&&(f=ze);var p=e.removeFormatting;p===void 0&&(p=qe);var m=e.defaultValue,x=e.valueIsNumericString,h=e.onValueChange,s=e.isAllowed,S=e.onChange;S===void 0&&(S=q);var y=e.onKeyDown;y===void 0&&(y=q);var l=e.onMouseUp;l===void 0&&(l=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=pe(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),H=we(g,m,!!x,f,p,h),P=H[0],V=P.formattedValue,M=P.numAsString,W=H[1],L=O.useRef(),U=O.useRef({formattedValue:V,numAsString:M}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},Q=O.useState(!1),te=Q[0],d=Q[1],c=O.useRef(null),N=O.useRef({setCaretTimeout:null,focusTimeout:null});O.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=f,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(J(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&J(o,u)},0))},T=function(o,u,v){return he(o,u,B(o),v)},X=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=he(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=X(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};O.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||M!==v)&&$(A(V,M),{event:void 0,source:ee.props})},[V,M]);var re=c.current?ce(c.current):void 0,ne=typeof window<"u"?O.useLayoutEffect:O.useEffect;ne(function(){var o=c.current;if(V!==U.current.formattedValue&&o){var u=X(U.current.formattedValue,V,re);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=L.current?Pe(L.current,w.selectionEnd):Ne(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=p(o,D),K=R(b);if(b=p(K,void 0),s&&!s(A(K,b))){var G=u.target,Z=ce(G),le=X(o,V,Z);return G.value=V,E(G,le,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},fe=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;L.current={selectionStart:v,selectionEnd:w+u}},Ie=function(o){var u=o.target,v=u.value,w=ue(v,o,ee.event);w&&S(o),L.current=void 0},Ce=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),fe(u,K);return}var Z=b;if(G){var le=v==="ArrowLeft"?"left":"right";Z=T(D,b,le),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=T(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=T(D,b,"left"));Z!==b&&E(u,Z,D),y(o),fe(u,K)},Ee=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=T(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),l(o),fe(u)},Re=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;c.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=T(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Ae=function(o){c.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Oe=te&&We()?"numeric":void 0,ve=Object.assign({inputMode:Oe},j,{type:t,value:V,onChange:Ie,onKeyDown:Ce,onMouseUp:Ee,onFocus:Re,onBlur:Ae});if(r==="text")return a?Y.createElement(Y.Fragment,null,a(V,j)||null):Y.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Te=n;return Y.createElement(Te,Object.assign({},ve,{ref:i}))}return Y.createElement("input",Object.assign({},ve,{ref:i}))}function Se(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var f=t.allowNegative,p=t.thousandsGroupStyle;if(p===void 0&&(p="thousand"),e===""||e==="-")return e;var m=ie(t),x=m.thousandSeparator,h=m.decimalSeparator,s=r!==0&&e.indexOf(".")!==-1||r&&n,S=se(e,f),y=S.beforeDecimal,l=S.afterDecimal,I=S.addNegation;return r!==void 0&&(l=be(l,r,!!n)),x&&(y=Le(y,x,p)),a&&(y=a+y),i&&(l=l+i),I&&(y="-"+y),e=y+(s&&h||"")+l,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+ye(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var f=r.suffix;f===void 0&&(f="");var p=r.decimalScale,m=t.from,x=t.to,h=x.start,s=x.end,S=ie(r),y=S.allowedDecimalSeparators,l=S.decimalSeparator,I=e[s]===l;if(ae(e)&&(e===i||e===f)&&t.lastValue==="")return e;if(s-h===1&&y.indexOf(e[h])!==-1){var C=p===0?"":l;e=e.substring(0,h)+C+e.substring(h+1,e.length)}var g=function(c,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:c.startsWith("--")?(A=!1,E=!0):f.startsWith("-")&&c.length===f.length?A=!1:c[0]==="-"&&(A=!0);var T=A?1:0;return E&&(T=2),T&&(c=c.substring(T),N-=T,R-=T),{value:c,start:N,end:R,hasNegation:A}},B=g(e,h,s),F=B.hasNegation;n=B,e=n.value,h=n.start,s=n.end;var k=g(t.lastValue,m.start,m.end),j=k.start,H=k.end,P=k.value,V=e.substring(h,s);e.length&&P.length&&(j>P.length-f.length||H<i.length)&&!(V&&f.startsWith(V))&&(e=P);var M=0;e.startsWith(i)?M+=i.length:h<i.length&&(M=h),e=e.substring(M),s-=M;var W=e.length,L=e.length-f.length;e.endsWith(f)?W=L:(s>L||s>e.length-f.length)&&(W=s),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(l))||[]).join("");var U=e.indexOf(l);e=e.replace(new RegExp(ye(l),"g"),function(c,N){return N===U?".":""});var $=se(e,a),Q=$.beforeDecimal,te=$.afterDecimal,d=$.addNegation;return x.end-x.start<m.end-m.start&&Q===""&&I&&!parseFloat(te)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,Math.min(r.length+(i?1:0),e.length));var f=e.length;return a.fill(!1,f-n.length+1,f+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
|
|
1
|
+
import{ad as Y,r as O}from"./index-CwjMcK6S.js";import{s as Be}from"./DatasetView-BqSWI_pm.js";const Fe=Be("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function pe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var ee;(function(e){e.event="event",e.props="prop"})(ee||(ee={}));function q(){}function _e(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,f){return i===t[f]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function z(e){return e==null}function je(e){return typeof e=="number"&&isNaN(e)}function xe(e){return z(e)||je(e)||typeof e=="number"&&!isFinite(e)}function ye(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Me(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=Me(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function de(e){var t=O.useRef(e);t.current=e;var r=O.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],f=a[1]||"";return{beforeDecimal:i,afterDecimal:f,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function be(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function ge(e,t){return Array(t+1).join(e)}function Ve(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var f=1+i,p=a.length;return f<0?a="0."+ge("0",Math.abs(f))+a:f>=p?a=a+ge("0",f-p):a=(a.substring(0,f)||"0")+"."+a.substring(f),r+a}function me(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,f=a.afterDecimal,p=a.hasNegation,m=parseFloat("0."+(f||"0")),x=f.length<=t?"0."+f:m.toFixed(t),h=x.split("."),s=i;i&&Number(h[0])&&(s=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},h[0]));var S=be(h[1]||"",t,r),y=p?"-":"",l=n?".":"";return""+y+s+l+S}function J(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ne=_e(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,f){f===void 0&&(f=$e);var p=a.findIndex(function(k){return k}),m=e.slice(0,p);!t&&!r.startsWith(m)&&(t=m,r=m+r,n=n+m.length);for(var x=r.length,h=e.length,s={},S=new Array(x),y=0;y<x;y++){S[y]=-1;for(var l=0,I=h;l<I;l++){var C=f({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:l});if(C&&s[l]!==!0){S[y]=l,s[l]=!0;break}}}for(var g=n;g<x&&(S[g]===-1||!i(r[g]));)g++;var B=g===x||S[g]===-1?h:S[g];for(g=n-1;g>0&&S[g]===-1;)g--;var F=g===-1||S[g]===-1?0:S[g]+1;return F>B?B:n-F<B-n?F:B}function he(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function we(e,t,r,n,a,i){i===void 0&&(i=q);var f=de(function(l,I){var C,g;return xe(l)?(g="",C=""):typeof l=="number"||I?(g=typeof l=="number"?Ve(l):l,C=n(g)):(g=a(l,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),p=O.useState(function(){return f(z(e)?t:e,r)}),m=p[0],x=p[1],h=de(function(l,I){l.formattedValue!==m.formattedValue&&x({formattedValue:l.formattedValue,numAsString:l.value}),i(l,I)}),s=e,S=r;z(e)&&(s=m.numAsString,S=!0);var y=f(s,S);return O.useMemo(function(){x(y)},[y.formattedValue]),O.useEffect(function(){if(!z(t)&&z(e)&&m.formattedValue!==""){var l=parseFloat(m.numAsString);h({formattedValue:m.formattedValue,value:m.numAsString,floatValue:isNaN(l)?void 0:l},{event:void 0,source:ee.props})}},[]),[m,h]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,f=e.format;f===void 0&&(f=ze);var p=e.removeFormatting;p===void 0&&(p=qe);var m=e.defaultValue,x=e.valueIsNumericString,h=e.onValueChange,s=e.isAllowed,S=e.onChange;S===void 0&&(S=q);var y=e.onKeyDown;y===void 0&&(y=q);var l=e.onMouseUp;l===void 0&&(l=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=pe(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),H=we(g,m,!!x,f,p,h),P=H[0],V=P.formattedValue,M=P.numAsString,W=H[1],L=O.useRef(),U=O.useRef({formattedValue:V,numAsString:M}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},Q=O.useState(!1),te=Q[0],d=Q[1],c=O.useRef(null),N=O.useRef({setCaretTimeout:null,focusTimeout:null});O.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=f,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(J(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&J(o,u)},0))},T=function(o,u,v){return he(o,u,B(o),v)},X=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=he(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=X(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};O.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||M!==v)&&$(A(V,M),{event:void 0,source:ee.props})},[V,M]);var re=c.current?ce(c.current):void 0,ne=typeof window<"u"?O.useLayoutEffect:O.useEffect;ne(function(){var o=c.current;if(V!==U.current.formattedValue&&o){var u=X(U.current.formattedValue,V,re);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=L.current?Pe(L.current,w.selectionEnd):Ne(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=p(o,D),K=R(b);if(b=p(K,void 0),s&&!s(A(K,b))){var G=u.target,Z=ce(G),le=X(o,V,Z);return G.value=V,E(G,le,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},fe=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;L.current={selectionStart:v,selectionEnd:w+u}},Ie=function(o){var u=o.target,v=u.value,w=ue(v,o,ee.event);w&&S(o),L.current=void 0},Ce=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),fe(u,K);return}var Z=b;if(G){var le=v==="ArrowLeft"?"left":"right";Z=T(D,b,le),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=T(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=T(D,b,"left"));Z!==b&&E(u,Z,D),y(o),fe(u,K)},Ee=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=T(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),l(o),fe(u)},Re=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;c.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=T(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Ae=function(o){c.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Oe=te&&We()?"numeric":void 0,ve=Object.assign({inputMode:Oe},j,{type:t,value:V,onChange:Ie,onKeyDown:Ce,onMouseUp:Ee,onFocus:Re,onBlur:Ae});if(r==="text")return a?Y.createElement(Y.Fragment,null,a(V,j)||null):Y.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Te=n;return Y.createElement(Te,Object.assign({},ve,{ref:i}))}return Y.createElement("input",Object.assign({},ve,{ref:i}))}function Se(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var f=t.allowNegative,p=t.thousandsGroupStyle;if(p===void 0&&(p="thousand"),e===""||e==="-")return e;var m=ie(t),x=m.thousandSeparator,h=m.decimalSeparator,s=r!==0&&e.indexOf(".")!==-1||r&&n,S=se(e,f),y=S.beforeDecimal,l=S.afterDecimal,I=S.addNegation;return r!==void 0&&(l=be(l,r,!!n)),x&&(y=Le(y,x,p)),a&&(y=a+y),i&&(l=l+i),I&&(y="-"+y),e=y+(s&&h||"")+l,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+ye(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var f=r.suffix;f===void 0&&(f="");var p=r.decimalScale,m=t.from,x=t.to,h=x.start,s=x.end,S=ie(r),y=S.allowedDecimalSeparators,l=S.decimalSeparator,I=e[s]===l;if(ae(e)&&(e===i||e===f)&&t.lastValue==="")return e;if(s-h===1&&y.indexOf(e[h])!==-1){var C=p===0?"":l;e=e.substring(0,h)+C+e.substring(h+1,e.length)}var g=function(c,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:c.startsWith("--")?(A=!1,E=!0):f.startsWith("-")&&c.length===f.length?A=!1:c[0]==="-"&&(A=!0);var T=A?1:0;return E&&(T=2),T&&(c=c.substring(T),N-=T,R-=T),{value:c,start:N,end:R,hasNegation:A}},B=g(e,h,s),F=B.hasNegation;n=B,e=n.value,h=n.start,s=n.end;var k=g(t.lastValue,m.start,m.end),j=k.start,H=k.end,P=k.value,V=e.substring(h,s);e.length&&P.length&&(j>P.length-f.length||H<i.length)&&!(V&&f.startsWith(V))&&(e=P);var M=0;e.startsWith(i)?M+=i.length:h<i.length&&(M=h),e=e.substring(M),s-=M;var W=e.length,L=e.length-f.length;e.endsWith(f)?W=L:(s>L||s>e.length-f.length)&&(W=s),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(l))||[]).join("");var U=e.indexOf(l);e=e.replace(new RegExp(ye(l),"g"),function(c,N){return N===U?".":""});var $=se(e,a),Q=$.beforeDecimal,te=$.afterDecimal,d=$.addNegation;return x.end-x.start<m.end-m.start&&Q===""&&I&&!parseFloat(te)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,Math.min(r.length+(i?1:0),e.length));var f=e.length;return a.fill(!1,f-n.length+1,f+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
|
|
2
2
|
Decimal separator can't be same as thousand separator.
|
|
3
3
|
thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
4
4
|
decimalSeparator: `+n+` (default value for decimalSeparator is .)
|
package/dist/client/index.html
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
9
9
|
<title>Evalution</title>
|
|
10
10
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-CwjMcK6S.js"></script>
|
|
12
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BGcZZetP.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|
|
@@ -97,9 +97,19 @@ interface SpanToolResultPart {
|
|
|
97
97
|
/** Whether the result reports a failure (an error, or a denied call). */
|
|
98
98
|
isError?: boolean;
|
|
99
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* The reasoning (thinking) a model produced ahead of its answer, within a
|
|
102
|
+
* multi-part {@link SpanMessage} content — how a conversation's earlier
|
|
103
|
+
* assistant turns carry theirs. The turn a span records keeps its own in
|
|
104
|
+
* {@link LLMSpanDetails.reasoning}.
|
|
105
|
+
*/
|
|
106
|
+
interface SpanReasoningPart {
|
|
107
|
+
type: "reasoning";
|
|
108
|
+
text: string;
|
|
109
|
+
}
|
|
100
110
|
type SpanMessageRole = "user" | "assistant" | "system" | "tool" | (string & {});
|
|
101
111
|
/** One segment of a multi-part {@link SpanMessage} content. */
|
|
102
|
-
type SpanContentPart = SpanTextPart | SpanImagePart | SpanToolCallPart | SpanToolResultPart;
|
|
112
|
+
type SpanContentPart = SpanTextPart | SpanImagePart | SpanToolCallPart | SpanToolResultPart | SpanReasoningPart;
|
|
103
113
|
/**
|
|
104
114
|
* A single message within an LLM span's input/output.
|
|
105
115
|
*
|
|
@@ -138,6 +148,11 @@ interface LLMSpanDetails {
|
|
|
138
148
|
* output and for any model whose answer is data rather than prose.
|
|
139
149
|
*/
|
|
140
150
|
output?: unknown;
|
|
151
|
+
/**
|
|
152
|
+
* The reasoning the model produced on the way to {@link output}, kept apart
|
|
153
|
+
* from it so an output stays the answer that checks and agents read.
|
|
154
|
+
*/
|
|
155
|
+
reasoning?: string;
|
|
141
156
|
/** Input tokens, counting any read from or written to a prompt cache. */
|
|
142
157
|
promptTokens?: number;
|
|
143
158
|
completionTokens?: number;
|
|
@@ -440,10 +455,10 @@ interface DatasetField {
|
|
|
440
455
|
/** Name, type, description — the checker's view of the slot this field came from. */
|
|
441
456
|
def: PropDefinition;
|
|
442
457
|
/**
|
|
443
|
-
* Set on a field added by hand
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
* parameters.
|
|
458
|
+
* Set on a field added by hand — through `DatasetProvider.addField`, or
|
|
459
|
+
* given as `{ name, type }` or `{ from }` when the dataset was created —
|
|
460
|
+
* rather than derived from the linked prompt. Such a field never came from
|
|
461
|
+
* that prompt, so it isn't flagged when it matches none of its parameters.
|
|
447
462
|
*/
|
|
448
463
|
added?: true;
|
|
449
464
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as NormalizedPromptBase, $t as
|
|
1
|
+
import { $ as NormalizedPromptBase, $t as Annotation, A as DatasetRowsOverview, An as TraceSummary, At as EvalArm, B as ChatPromptUpdates, Bt as EvalProviderInfo, C as DatasetFieldShape, Cn as Trace, Ct as ValueCatalogPreset, D as DatasetRow, Dn as TraceLiveEvent, Dt as VariationInfo, E as DatasetProviderInfo, En as TraceEvalRun, Et as VariationId, F as KnownColumnSpec, Ft as EvalCheckOutcome, G as ExecutionInput, Gt as EvalRunProgress, H as ConflictChoices, Ht as EvalRowResult, I as AddPromptContext, It as EvalCheckResult, J as InputLayout, Jt as EvalSummary, K as ExtractedProps, Kt as EvalRunStatus, L as AddPromptField, Lt as EvalDefinition, M as ColumnPath, Mn as isCheckSpan, Mt as EvalChangeEvent, N as DatasetColumnSpec, Nn as spanMessages, Nt as EvalChangeType, O as DatasetRowSource, On as TraceProviderInfo, Ot as VersionId, P as ForeignColumnSpec, Pt as EvalCheck, Q as NormalizedPrompt, Qt as TraceCheckResult, R as CalleeBinding, Rt as EvalDefinitionPatch, S as DatasetField, Sn as ToolSpanDetails, St as ValueCatalogGroup, T as DatasetPathChild, Tn as TraceChangeType, Tt as VariationConflict, U as ExecuteRequest, Ut as EvalRowStatus, V as CheckInfo, Vt as EvalResults, W as ExecuteResponse, Wt as EvalRun, X as NormalizedMessage, Xt as NewEvalDefinition, Y as NormalizedChatPrompt, Yt as EvalTraceRun, Z as NormalizedParameter, Zt as NewEvalRun, _ as isStandardSchema, _n as SpanMessageRole, _t as ResourceScope, a as check, an as CHECK_ATTRIBUTE, at as PromptChangeEvent, b as DatasetChangeEvent, bn as SpanToolCallPart, bt as UpdatePromptResponse, c as ResolvedResourceInputs, cn as LLMSpanDetails, ct as PromptRef, d as ResourceInput, dn as SERVICE_NAME_ATTRIBUTE, dt as PropType, en as AnnotationChanges, et as NormalizedPromptUpdates, f as ResourceInputs, fn as Span, ft as PropValue, g as isResource, gn as SpanMessage, gt as ResourceInstanceInput, h as StaticResourceDefinition, hn as SpanKind, ht as ResourceInfo, i as CheckRun, in as AnnotationSource, it as PendingConflicts, j as DatasetSummary, jn as TraceWithSpans, jt as EvalArmSpec, k as DatasetRowUpdate, kn as TraceStreamEvent, kt as VersionInfo, l as Resource, ln as PLAYGROUND_ENVIRONMENT, lt as PromptStyle, m as ResourceOutputDefinition, mn as SpanImagePart, mt as RebaseResult, n as CheckDefinition, nn as AnnotationEventOp, nt as NormalizedToolCall, o as isCheck, on as DEPLOYMENT_ENVIRONMENT_ATTRIBUTE, ot as PromptInputSources, p as ResourceInstance, pn as SpanContentPart, pt as QuestionsPromptUpdates, q as FieldValues, qt as EvalRunSummary, r as CheckOutcome, rn as AnnotationKind, rt as ParsedPrompt, s as DynamicResourceDefinition, sn as EvalCounts, st as PromptProviderInfo, t as Check, tn as AnnotationEvent, tt as NormalizedQuestionsPrompt, u as ResourceDefinition, un as PromptID, ut as PropDefinition, v as resource, vn as SpanReasoningPart, vt as RunResources, w as DatasetInstanceShape, wn as TraceChangeEvent, wt as ValueFactory, x as DatasetChangeType, xn as SpanToolResultPart, xt as ValueCatalog, y as Dataset, yn as SpanTextPart, yt as SourceSpan, z as ChangeEventType, zt as EvalInputs } from "./check-CR4fU1S5.js";
|
|
2
2
|
import { AttributeValue, Attributes, Tracer } from "@opentelemetry/api";
|
|
3
3
|
import { PropDefinition as PropDefinition$1, PropValue as PropValue$1, ValueFactory as ValueFactory$1 } from "ts-proppy";
|
|
4
4
|
import { Database } from "@tursodatabase/sync";
|
|
@@ -9,6 +9,30 @@ import { Questions, SystemOneRequest, SystemOneResult } from "@typesafe-ai/sdk";
|
|
|
9
9
|
import { Telemetry } from "ai";
|
|
10
10
|
import { SpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
11
11
|
|
|
12
|
+
//#region src/cli/fresh-import-hook.d.ts
|
|
13
|
+
/** Whether {@link registerFreshImportHook} has run in this process. */
|
|
14
|
+
declare function isFreshImportHookRegistered(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Registers in-thread hooks that make a fresh import fresh all the way down.
|
|
17
|
+
*
|
|
18
|
+
* Node caches an ES module by URL for the life of the process. A fresh import
|
|
19
|
+
* of `db.ts` is made as `db.ts?evalution-gen=N`, and the resolve hook gives
|
|
20
|
+
* every file it imports by path the same `?evalution-gen=N` — so an edited
|
|
21
|
+
* dependency is reloaded along with the module, and two modules that import
|
|
22
|
+
* each other within a generation share one instance of it. The load hook
|
|
23
|
+
* records each file loaded in the current generation, with its mtime, which
|
|
24
|
+
* is how `importGeneration` knows when to start a new one.
|
|
25
|
+
*
|
|
26
|
+
* Only imports by path are followed: packages, imported by name — including
|
|
27
|
+
* `evalution` itself, which the CLI resolves to its own files — keep a single
|
|
28
|
+
* instance, as does anything under `node_modules`.
|
|
29
|
+
*
|
|
30
|
+
* Uses `module.registerHooks` (synchronous, same-thread), like the other CLI
|
|
31
|
+
* hooks. Registering twice is harmless, even from different copies of this
|
|
32
|
+
* module.
|
|
33
|
+
*/
|
|
34
|
+
declare function registerFreshImportHook(): void;
|
|
35
|
+
//#endregion
|
|
12
36
|
//#region src/cli/variation-loader-hook.d.ts
|
|
13
37
|
/** Whether {@link registerVariationLoaderHook} has run in this process. */
|
|
14
38
|
declare function isVariationLoaderHookRegistered(): boolean;
|
|
@@ -529,10 +553,11 @@ interface TraceProvider {
|
|
|
529
553
|
subscribeAnnotations?(traceId: string, callback: (event: AnnotationEvent) => void): () => void;
|
|
530
554
|
/**
|
|
531
555
|
* Notifies this trace's {@link subscribeAnnotations} subscribers of an
|
|
532
|
-
* annotation change
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
556
|
+
* annotation change, and {@link watch}ers with an `update` event, since a
|
|
557
|
+
* trace's summary carries its annotation counts. Called by the annotation
|
|
558
|
+
* REST handlers immediately after
|
|
559
|
+
* {@link createAnnotation}/{@link updateAnnotation}/{@link deleteAnnotation}
|
|
560
|
+
* succeeds — the provider itself never calls this on its own.
|
|
536
561
|
*/
|
|
537
562
|
emitAnnotation?(traceId: string, op: AnnotationEventOp, annotation: Annotation): void;
|
|
538
563
|
}
|
|
@@ -560,6 +585,11 @@ interface TraceSink {
|
|
|
560
585
|
* produced (e.g. a bad model id throws before `onStart`).
|
|
561
586
|
*/
|
|
562
587
|
failTrace(traceId: string, errorMessage: string): Promise<void>;
|
|
588
|
+
/**
|
|
589
|
+
* Optional: resolves once everything recorded so far has been delivered,
|
|
590
|
+
* for a sink that records in the background (e.g. `HttpTraceSink`).
|
|
591
|
+
*/
|
|
592
|
+
flush?(): Promise<void>;
|
|
563
593
|
}
|
|
564
594
|
/**
|
|
565
595
|
* Source-agnostic base class for a {@link TraceProvider}. Owns storage
|
|
@@ -614,6 +644,12 @@ declare abstract class BaseTraceProvider implements TraceProvider, TraceSink {
|
|
|
614
644
|
emitAnnotation(traceId: string, op: AnnotationEventOp, annotation: Annotation): void;
|
|
615
645
|
recordSpanStart(span: Span): Promise<Span>;
|
|
616
646
|
recordSpanEnd(span: Span): Promise<Span>;
|
|
647
|
+
/**
|
|
648
|
+
* Marks a trace that already ended as running again: its root span has just
|
|
649
|
+
* been started anew (a failed run being retried), so the failure it recorded
|
|
650
|
+
* is no longer its state.
|
|
651
|
+
*/
|
|
652
|
+
private reopenTrace;
|
|
617
653
|
failTrace(traceId: string, errorMessage: string): Promise<void>;
|
|
618
654
|
protected emitStream(traceId: string, event: TraceStreamEvent): void;
|
|
619
655
|
protected emitChange(event: TraceChangeEvent): void;
|
|
@@ -666,11 +702,22 @@ declare const PLAYGROUND_RESOURCE: Readonly<Record<string, string>>;
|
|
|
666
702
|
declare abstract class BaseTraceIngestor implements TraceIngestor {
|
|
667
703
|
protected sinks: TraceSink[];
|
|
668
704
|
private resource?;
|
|
705
|
+
/** Recordings still under way, which {@link flush} waits out. */
|
|
706
|
+
private pending;
|
|
669
707
|
setResource(resource: Record<string, unknown>): void;
|
|
670
708
|
/** `span` with this ingestor's resource, if it has one, merged into its own. */
|
|
671
709
|
private withResource;
|
|
672
710
|
addSink(sink: TraceSink): void;
|
|
673
711
|
removeSink(sink: TraceSink): boolean;
|
|
712
|
+
/**
|
|
713
|
+
* Resolves once everything recorded so far has reached every sink and been
|
|
714
|
+
* delivered by those that deliver in the background. Await it before a
|
|
715
|
+
* short-lived process (a script, a serverless function) exits, so no trace
|
|
716
|
+
* data is lost.
|
|
717
|
+
*/
|
|
718
|
+
flush(): Promise<void>;
|
|
719
|
+
/** Registers `recording` for {@link flush} to wait out, and returns it. */
|
|
720
|
+
private track;
|
|
674
721
|
protected recordSpanStart(span: Span): Promise<void>;
|
|
675
722
|
protected recordSpanEnd(span: Span): Promise<void>;
|
|
676
723
|
protected failTrace(traceId: string, msg: string): Promise<void>;
|
|
@@ -906,7 +953,11 @@ interface RegisteredCheck {
|
|
|
906
953
|
/** The `check()` object itself. */
|
|
907
954
|
check: Check;
|
|
908
955
|
}
|
|
909
|
-
/**
|
|
956
|
+
/**
|
|
957
|
+
* A playground module that could not be loaded — or could not be reloaded, in
|
|
958
|
+
* which case its previous version's resources are still in use, and `message`
|
|
959
|
+
* says so.
|
|
960
|
+
*/
|
|
910
961
|
interface PlaygroundModuleError {
|
|
911
962
|
/** Absolute path of the module that failed. */
|
|
912
963
|
modulePath: string;
|
|
@@ -1056,6 +1107,12 @@ declare class ResourceRegistry {
|
|
|
1056
1107
|
private identities;
|
|
1057
1108
|
/** Modules that threw at import time, by absolute path. */
|
|
1058
1109
|
private moduleErrors;
|
|
1110
|
+
/**
|
|
1111
|
+
* Each module's exports as of the last scan that loaded it, by absolute
|
|
1112
|
+
* path. Kept across {@link invalidate}: a module that fails to reload keeps
|
|
1113
|
+
* running its previous version.
|
|
1114
|
+
*/
|
|
1115
|
+
private loadedModules;
|
|
1059
1116
|
/** Memoized `scope: 'server'` instances, by resource object then argument key. */
|
|
1060
1117
|
private serverInstances;
|
|
1061
1118
|
/** The scan in flight, so concurrent callers don't each re-import. */
|
|
@@ -2211,6 +2268,14 @@ declare class LocalFileProvider implements FileProvider {
|
|
|
2211
2268
|
readFile(filePath: string): Promise<string>;
|
|
2212
2269
|
writeFile(filePath: string, content: string): Promise<void>;
|
|
2213
2270
|
deleteFile(filePath: string): Promise<void>;
|
|
2271
|
+
/**
|
|
2272
|
+
* With the fresh-import hook registered (see `registerFreshImportHook`),
|
|
2273
|
+
* every import is made in the current generation, and a fresh one first
|
|
2274
|
+
* starts a new generation if anything loaded in it has changed — so what the
|
|
2275
|
+
* module imports by path is fresh too, and a plain import of a module hands
|
|
2276
|
+
* back the same instance its importers got. Without the hook, a fresh import
|
|
2277
|
+
* busts only the module itself.
|
|
2278
|
+
*/
|
|
2214
2279
|
import(filePath: string, {
|
|
2215
2280
|
fresh
|
|
2216
2281
|
}?: ImportOptions): Promise<any>;
|
|
@@ -3872,7 +3937,7 @@ declare class VercelAISDK implements SDKAdapter {
|
|
|
3872
3937
|
* not sprout a mystery parameter.
|
|
3873
3938
|
*/
|
|
3874
3939
|
private executeParametersFor;
|
|
3875
|
-
denormalizeUpdates(updates: NormalizedPromptUpdates,
|
|
3940
|
+
denormalizeUpdates(updates: NormalizedPromptUpdates, currentValues?: Record<string, PropValue$1>): Record<string, PropValue$1 | null>;
|
|
3876
3941
|
}
|
|
3877
3942
|
//#endregion
|
|
3878
3943
|
//#region src/sdk/vercel-ai-sdk/telemetry.d.ts
|
|
@@ -3911,6 +3976,12 @@ interface VercelAISDKTelemetryOptions {
|
|
|
3911
3976
|
* alongside OTel; `"never"` always defers.
|
|
3912
3977
|
*/
|
|
3913
3978
|
nativeTelemetry?: "auto" | "always" | "never";
|
|
3979
|
+
/**
|
|
3980
|
+
* The base URL of an evalution server to send traces to, through an
|
|
3981
|
+
* {@link HttpTraceSink}. Defaults to the `EVALUTION_ENDPOINT` environment
|
|
3982
|
+
* variable, if set; `false` sends nowhere, whatever the environment says.
|
|
3983
|
+
*/
|
|
3984
|
+
endpoint?: string | false;
|
|
3914
3985
|
}
|
|
3915
3986
|
type Callbacks = Required<Telemetry>;
|
|
3916
3987
|
/**
|
|
@@ -3924,6 +3995,11 @@ type Callbacks = Required<Telemetry>;
|
|
|
3924
3995
|
* per-call integration from {@link createTelemetryForPrompt} so
|
|
3925
3996
|
* helper-defined prompts are recorded with full identity.
|
|
3926
3997
|
*
|
|
3998
|
+
* When it sends traces to an evalution server (see
|
|
3999
|
+
* {@link VercelAISDKTelemetryOptions.endpoint}), they go in the background:
|
|
4000
|
+
* `await` {@link flush} before a short-lived process — a script, a
|
|
4001
|
+
* serverless function — exits, so none are lost.
|
|
4002
|
+
*
|
|
3927
4003
|
* When an OpenTelemetry integration is also active, this class
|
|
3928
4004
|
* defers to it by default (see {@link VercelAISDKTelemetryOptions.nativeTelemetry}) rather
|
|
3929
4005
|
* than emitting a duplicate, parallel trace.
|
|
@@ -4047,7 +4123,70 @@ declare function createLocalTursoClient({
|
|
|
4047
4123
|
* server. A test checks every column of `./schema.ts` is described here.
|
|
4048
4124
|
*/
|
|
4049
4125
|
/** The trace database's tables, described for someone writing SQL against them. */
|
|
4050
|
-
declare const TRACE_QUERY_SCHEMA = "-- Trace database (SQLite). Timestamps are milliseconds since the Unix epoch.\n-- Columns marked JSON hold JSON text; read into them with json_extract(),\n-- e.g. json_extract(llm_parameters, '$.temperature').\n\n-- One row per trace: a single run, e.g. one prompt execution.\nCREATE TABLE traces (\n id TEXT PRIMARY KEY,\n provider_id TEXT, -- the trace provider that recorded it\n name TEXT NOT NULL, -- usually the prompt's name\n start_time REAL NOT NULL, -- ms since epoch\n end_time REAL, -- ms since epoch; NULL while running\n status TEXT NOT NULL, -- 'running' | 'ok' | 'error'\n attributes TEXT -- JSON object of free-form attributes\n);\n\n-- One row per span. Spans form a tree per trace via parent_id.\nCREATE TABLE spans (\n id TEXT PRIMARY KEY,\n trace_id TEXT NOT NULL, -- traces.id\n parent_id TEXT, -- spans.id; NULL for the root span\n name TEXT NOT NULL,\n kind TEXT NOT NULL, -- 'LLM' | 'TOOL' | 'AGENT' | 'EMBEDDING' | 'CHECK' | 'DEFAULT'\n start_time REAL NOT NULL, -- ms since epoch\n end_time REAL, -- ms since epoch; NULL while running\n status TEXT, -- 'ok' | 'error'; NULL while running\n error_message TEXT,\n llm_provider TEXT, -- e.g. 'openai', 'anthropic'\n llm_model TEXT, -- e.g. 'gpt-4o'\n llm_finish_reason TEXT, -- e.g. 'stop', 'length', 'tool-calls'\n llm_prompt_tokens INTEGER, -- includes cache reads and writes\n llm_completion_tokens INTEGER,\n llm_total_tokens INTEGER,\n llm_cache_read_tokens INTEGER, -- of llm_prompt_tokens, read from a prompt cache\n llm_cache_write_tokens INTEGER, -- of llm_prompt_tokens, written to a prompt cache\n llm_cost_prompt REAL, -- USD, cache reads and writes included\n llm_cost_completion REAL, -- USD\n llm_cost_cache_read REAL, -- USD, the part of llm_cost_prompt spent on cache reads\n llm_cost_cache_write REAL, -- USD, the part of llm_cost_prompt spent on cache writes\n llm_input TEXT, -- JSON: an array of messages {role, content}, or any JSON object\n llm_output TEXT, -- JSON: always encoded, so a text output is a JSON string\n llm_parameters TEXT, -- JSON object of model parameters (temperature, ...)\n attributes TEXT, -- JSON object of free-form attributes; \"evalution.check\" is set on spans an eval check recorded while judging the trace (its CHECK span and everything under it), which aren't part of the run\n resource TEXT, -- JSON object: the OTel resource that produced the span (\"service.name\", \"deployment.environment.name\" = 'playground' for runs evalution made, ...)\n prompt TEXT, -- JSON {id, providerId?, version?, variation?, functionInputs?, executeInputs?, ...}: the prompt this span ran\n tool TEXT -- JSON {toolName, input, output?} for TOOL spans\n);\n\n-- Notes left on a trace, or on one span of it.\nCREATE TABLE annotations (\n id TEXT PRIMARY KEY,\n trace_id TEXT NOT NULL, -- traces.id\n span_id TEXT, -- spans.id; NULL for a note on the whole trace\n kind TEXT NOT NULL, -- 'issue' | 'good' | 'note'\n note TEXT NOT NULL,\n source TEXT NOT NULL, -- 'user' | 'claude-code' | 'codex' | 'agent'\n created_at REAL NOT NULL -- ms since epoch\n);\n";
|
|
4126
|
+
declare const TRACE_QUERY_SCHEMA = "-- Trace database (SQLite). Timestamps are milliseconds since the Unix epoch.\n-- Columns marked JSON hold JSON text; read into them with json_extract(),\n-- e.g. json_extract(llm_parameters, '$.temperature').\n\n-- One row per trace: a single run, e.g. one prompt execution.\nCREATE TABLE traces (\n id TEXT PRIMARY KEY,\n provider_id TEXT, -- the trace provider that recorded it\n name TEXT NOT NULL, -- usually the prompt's name\n start_time REAL NOT NULL, -- ms since epoch\n end_time REAL, -- ms since epoch; NULL while running\n status TEXT NOT NULL, -- 'running' | 'ok' | 'error'\n attributes TEXT -- JSON object of free-form attributes\n);\n\n-- One row per span. Spans form a tree per trace via parent_id.\nCREATE TABLE spans (\n id TEXT PRIMARY KEY,\n trace_id TEXT NOT NULL, -- traces.id\n parent_id TEXT, -- spans.id; NULL for the root span\n name TEXT NOT NULL,\n kind TEXT NOT NULL, -- 'LLM' | 'TOOL' | 'AGENT' | 'EMBEDDING' | 'CHECK' | 'DEFAULT'\n start_time REAL NOT NULL, -- ms since epoch\n end_time REAL, -- ms since epoch; NULL while running\n status TEXT, -- 'ok' | 'error'; NULL while running\n error_message TEXT,\n llm_provider TEXT, -- e.g. 'openai', 'anthropic'\n llm_model TEXT, -- e.g. 'gpt-4o'\n llm_finish_reason TEXT, -- e.g. 'stop', 'length', 'tool-calls'\n llm_prompt_tokens INTEGER, -- includes cache reads and writes\n llm_completion_tokens INTEGER,\n llm_total_tokens INTEGER,\n llm_cache_read_tokens INTEGER, -- of llm_prompt_tokens, read from a prompt cache\n llm_cache_write_tokens INTEGER, -- of llm_prompt_tokens, written to a prompt cache\n llm_cost_prompt REAL, -- USD, cache reads and writes included\n llm_cost_completion REAL, -- USD\n llm_cost_cache_read REAL, -- USD, the part of llm_cost_prompt spent on cache reads\n llm_cost_cache_write REAL, -- USD, the part of llm_cost_prompt spent on cache writes\n llm_input TEXT, -- JSON: an array of messages {role, content}, or any JSON object\n llm_output TEXT, -- JSON: always encoded, so a text output is a JSON string\n llm_reasoning TEXT, -- the model's reasoning for this turn, as plain text\n llm_parameters TEXT, -- JSON object of model parameters (temperature, ...)\n attributes TEXT, -- JSON object of free-form attributes; \"evalution.check\" is set on spans an eval check recorded while judging the trace (its CHECK span and everything under it), which aren't part of the run\n resource TEXT, -- JSON object: the OTel resource that produced the span (\"service.name\", \"deployment.environment.name\" = 'playground' for runs evalution made, ...)\n prompt TEXT, -- JSON {id, providerId?, version?, variation?, functionInputs?, executeInputs?, ...}: the prompt this span ran\n tool TEXT -- JSON {toolName, input, output?} for TOOL spans\n);\n\n-- Notes left on a trace, or on one span of it.\nCREATE TABLE annotations (\n id TEXT PRIMARY KEY,\n trace_id TEXT NOT NULL, -- traces.id\n span_id TEXT, -- spans.id; NULL for a note on the whole trace\n kind TEXT NOT NULL, -- 'issue' | 'good' | 'note'\n note TEXT NOT NULL,\n source TEXT NOT NULL, -- 'user' | 'claude-code' | 'codex' | 'agent'\n created_at REAL NOT NULL -- ms since epoch\n);\n";
|
|
4127
|
+
//#endregion
|
|
4128
|
+
//#region src/trace/http-trace-sink.d.ts
|
|
4129
|
+
/**
|
|
4130
|
+
* Where an evalution server accepts {@link TraceSinkEvent}s, relative to its
|
|
4131
|
+
* base URL.
|
|
4132
|
+
*/
|
|
4133
|
+
declare const TRACE_EVENTS_PATH = "/api/traces";
|
|
4134
|
+
/** One {@link TraceSink} call, as {@link HttpTraceSink} sends it. */
|
|
4135
|
+
type TraceSinkEvent = {
|
|
4136
|
+
type: "span-start";
|
|
4137
|
+
span: Span;
|
|
4138
|
+
} | {
|
|
4139
|
+
type: "span-end";
|
|
4140
|
+
span: Span;
|
|
4141
|
+
} | {
|
|
4142
|
+
type: "trace-fail";
|
|
4143
|
+
traceId: string;
|
|
4144
|
+
errorMessage: string;
|
|
4145
|
+
};
|
|
4146
|
+
/** The body of a `POST` to {@link TRACE_EVENTS_PATH}. */
|
|
4147
|
+
interface TraceEventsRequest {
|
|
4148
|
+
/** The events to record, in the order they happened. */
|
|
4149
|
+
events: TraceSinkEvent[];
|
|
4150
|
+
}
|
|
4151
|
+
/** Options for {@link HttpTraceSink}. */
|
|
4152
|
+
interface HttpTraceSinkOptions {
|
|
4153
|
+
/**
|
|
4154
|
+
* The evalution server's base URL, e.g. `http://localhost:3000`. Events are
|
|
4155
|
+
* posted to {@link TRACE_EVENTS_PATH} under it.
|
|
4156
|
+
*/
|
|
4157
|
+
endpoint: string;
|
|
4158
|
+
/** The `fetch` to send with. Defaults to the global one. */
|
|
4159
|
+
fetch?: typeof fetch;
|
|
4160
|
+
}
|
|
4161
|
+
/**
|
|
4162
|
+
* A {@link TraceSink} that sends what it's given to an evalution server,
|
|
4163
|
+
* which records it through its own trace providers — so an app's traces show
|
|
4164
|
+
* up in the playground without the app writing to a trace store itself.
|
|
4165
|
+
*
|
|
4166
|
+
* Calls return as soon as the event is queued, never waiting on the network,
|
|
4167
|
+
* so tracing doesn't slow the app down. Queued events go out in order, batched
|
|
4168
|
+
* into one request at a time, so a span's end never overtakes its start. A
|
|
4169
|
+
* request that fails is logged and its events dropped: tracing never breaks
|
|
4170
|
+
* the app. Await {@link flush} before a short-lived process exits to be sure
|
|
4171
|
+
* everything was sent.
|
|
4172
|
+
*/
|
|
4173
|
+
declare class HttpTraceSink implements TraceSink {
|
|
4174
|
+
private readonly url;
|
|
4175
|
+
private readonly fetch;
|
|
4176
|
+
private queue;
|
|
4177
|
+
private sending?;
|
|
4178
|
+
/** Whether the last request failed, so a down server is reported once. */
|
|
4179
|
+
private failing;
|
|
4180
|
+
constructor(options: HttpTraceSinkOptions);
|
|
4181
|
+
recordSpanStart(span: Span): Promise<Span>;
|
|
4182
|
+
recordSpanEnd(span: Span): Promise<Span>;
|
|
4183
|
+
failTrace(traceId: string, errorMessage: string): Promise<void>;
|
|
4184
|
+
/** Resolves once every event recorded so far has been sent (or dropped). */
|
|
4185
|
+
flush(): Promise<void>;
|
|
4186
|
+
private enqueue;
|
|
4187
|
+
private drain;
|
|
4188
|
+
private send;
|
|
4189
|
+
}
|
|
4051
4190
|
//#endregion
|
|
4052
4191
|
//#region src/trace/local-database-trace-provider.d.ts
|
|
4053
4192
|
interface LocalDatabaseTraceProviderOptions {
|
|
@@ -4290,9 +4429,30 @@ declare class OtlpTraceIngestor extends BaseTraceIngestor {
|
|
|
4290
4429
|
* and lets any *defined* field on `incoming` update `existing`, so nothing
|
|
4291
4430
|
* recorded at start is lost when the span ends, and end-only fields (status,
|
|
4292
4431
|
* timings, token usage, …) are filled in.
|
|
4432
|
+
*
|
|
4433
|
+
* An ended span is final: a snapshot of it after its end is a re-report of
|
|
4434
|
+
* what already happened (a durable workflow replaying a finished step from
|
|
4435
|
+
* its record, say), whose timings are the replay's, not the work's.
|
|
4436
|
+
*
|
|
4437
|
+
* The exception is a span that ended in error. A later report of it is the
|
|
4438
|
+
* work being retried, so it replaces the failed attempt outright: carrying
|
|
4439
|
+
* over the old `errorMessage`, status or attributes would describe a failure
|
|
4440
|
+
* the retry may not have had.
|
|
4293
4441
|
*/
|
|
4294
4442
|
declare function mergeSpans(existing: Span, incoming: Span): Span;
|
|
4295
4443
|
//#endregion
|
|
4444
|
+
//#region src/trace/trace-event-ingestor.d.ts
|
|
4445
|
+
/**
|
|
4446
|
+
* {@link TraceIngestor} populated by the {@link TraceSinkEvent}s an app's
|
|
4447
|
+
* `HttpTraceSink` sends to this server. The events are already normalized
|
|
4448
|
+
* {@link TraceSink} calls, so this just replays them, in order, on its own
|
|
4449
|
+
* sinks.
|
|
4450
|
+
*/
|
|
4451
|
+
declare class TraceEventIngestor extends BaseTraceIngestor {
|
|
4452
|
+
/** Records one batch of events, in order. */
|
|
4453
|
+
ingest(events: TraceSinkEvent[]): Promise<void>;
|
|
4454
|
+
}
|
|
4455
|
+
//#endregion
|
|
4296
4456
|
//#region src/trace/turso-trace-provider.d.ts
|
|
4297
4457
|
/**
|
|
4298
4458
|
* `TraceProvider` backed by a Turso/libSQL database via
|
|
@@ -4379,4 +4539,4 @@ declare class TursoTraceProvider extends BaseTraceProvider {
|
|
|
4379
4539
|
deleteAnnotation(id: string): Promise<void>;
|
|
4380
4540
|
}
|
|
4381
4541
|
//#endregion
|
|
4382
|
-
export { type AddPromptContext, type AddPromptField, type Annotation, type AnnotationChanges, type AnnotationEvent, type AnnotationEventOp, type AnnotationKind, type AnnotationSource, BaseTraceIngestor, BaseTraceProvider, CHECK_ATTRIBUTE, type CalleeBinding, type ChangeEventType, type ChatPromptUpdates, type Check, type CheckDefinition, type CheckInfo, type CheckOutcome, type CheckRun, type ColumnPath, type ConflictChoices, type CreateDatasetInput, DEFAULT_EVAL_CONCURRENCY, DEFAULT_MAX_QUERY_ROWS, DEFAULT_PLAYGROUND_IGNORE_PATTERNS, DEFAULT_PLAYGROUND_INCLUDE_PATTERNS, DEFAULT_QUERY_TIMEOUT_MS, DEPLOYMENT_ENVIRONMENT_ATTRIBUTE, type Dataset, type DatasetChangeEvent, type DatasetChangeType, type DatasetColumnSpec, type DatasetField, type DatasetFieldShape, type DatasetInstanceShape, DatasetNotFoundError, type DatasetPathChild, type DatasetProvider, type DatasetProviderInfo, type DatasetRow, type DatasetRowSource, type DatasetRowUpdate, type DatasetRowsOverview, type DatasetSummary, DatasetValidationError, type DeclaredInstance, type DynamicResourceDefinition, type EvalArm, type EvalArmSpec, type EvalChangeEvent, type EvalChangeType, type EvalCheck, type EvalCheckOutcome, type EvalCheckResult, type EvalCounts, type EvalDefinition, type EvalDefinitionPatch, type EvalInputs, EvalNotFoundError, type EvalProvider, type EvalProviderInfo, type EvalResults, type EvalRowResult, type EvalRowStatus, type EvalRun, type EvalRunProgress, EvalRunRefusedError, type EvalRunStatus, type EvalRunSummary, EvalRunner, type EvalRunnerOptions, type EvalSummary, type EvalTraceRun, type EvalutionConfig, type ExecuteConfigOptions, type ExecuteOptions, type ExecuteRequest, type ExecuteResponse, type ExecuteResult, type ExecutionHandle, type ExecutionInput, type ExtractedProps, type FactoriesProbe, type FieldValues, type FilePromptMetadata, FilePromptProvider, type FilePromptProviderOptions, type FileProvider, type FileWatchCallback, type FileWatchOptions, type ForeignColumnSpec, GeminiInteractionsSDK, GitVersioning, type GitVersioningOptions, type GlobOptions, type HeadState, type ImportOptions, type InputBindings, type InputLayout, type InputSignature, type InputSlot, type InputSource, type InstanceResolver, type KnownColumnSpec, type LLMSpanDetails, type ListRowsOptions, LocalDatabaseTraceProvider, type LocalDatabaseTraceProviderOptions, LocalDirectoryDatasetProvider, type LocalDirectoryDatasetProviderOptions, LocalEvalProvider, type LocalEvalProviderOptions, LocalFileProvider, type LocalTursoClientOptions, LocalVariationStore, MIGRATIONS_TABLE, MemoryFileProvider, MemoryTraceProvider, type MergeOutcome, type NewDatasetRow, type NewEvalDefinition, type NewEvalRun, type NewWip, type NormalizedChatPrompt, type NormalizedFilePrompt, type NormalizedMessage, type NormalizedOtlpEvent, type NormalizedOtlpSpan, type NormalizedParameter, type NormalizedPrompt, type NormalizedPromptBase, type NormalizedPromptUpdates, type NormalizedQuestionsPrompt, type NormalizedToolCall, OTelTraceIngestor, type OpenOnHeadOptions, OtlpTraceIngestor, OverlayFileProvider, PLAYGROUND_ENVIRONMENT, PLAYGROUND_RESOURCE, PROMPT_FIELD, PROMPT_IDENTITY, PROMPT_ID_ATTRIBUTE, PROMPT_INPUTS_ATTRIBUTE, PROMPT_NAME_ATTRIBUTE, PROMPT_PROVIDER_ID_ATTRIBUTE, PROMPT_VARIATION_ATTRIBUTE, PROMPT_VERSION_ATTRIBUTE, type ParsePromptsOptions, type ParsedFilePrompt, type ParsedPrompt, type PendingConflicts, type PerPromptTelemetry, type PerTraceTelemetry, type PlaygroundModuleError, type PreparedCheck, type ProbeResult, type ProbeResults, type ProjectProbeRequest, type PromptChangeEvent, type PromptFileType, type PromptID, type PromptInputSources, type PromptProvider, type PromptProviderInfo, type PromptRef, type PromptRefLike, type PromptSpanInfo, type PromptStyle, type PromptVariations, type PromptVersions, type PromptsFactory, type PromptsHelper, type PromptsHelperOptions, type PropDefinition, type PropType, type PropValue, type QuestionsPromptUpdates, type ReadOnlyQueryRunner, type RebaseResult, type RegisteredCheck, type RegisteredResource, type RegisteredSource, type ResolutionContext, type ResolvedPromptInputs, type ResolvedResourceInputs, type Resource, type ResourceBinding, type ResourceDefinition, type ResourceInfo, type ResourceInput, type ResourceInputs, type ResourceInstance, type ResourceInstanceInput, type ResourceLease, type ResourceOutputDefinition, ResourceRegistry, type ResourceScope, type RunResources, type SDKAdapter, SERVICE_NAME_ATTRIBUTE, SPAN_KIND_ATTRIBUTE, type SlotMatchRequest, type SlotMatchSource, type SourceSpan, type Span, type SpanContentPart, type SpanImagePart, type SpanKind, type SpanMessage, type SpanMessageRole, type SpanTextPart, type SpanToolCallPart, type SpanToolResultPart, SqlQueryError, type SqlQueryOptions, type SqlQueryResult, type StartEvalRunOptions, type StaticResourceDefinition, type StoredVariation, type SystemOneCallOptions, type SystemOneCallRecord, TRACE_QUERY_SCHEMA, TSPromptFileType, type ToolSpanDetails, type Trace, type TraceChangeEvent, type TraceChangeType, type TraceCheckResult, type TraceEvalRun, type TraceIngestor, type TraceLiveEvent, type TraceProvider, type TraceProviderInfo, type TraceSink, type TraceStreamEvent, type TraceSummary, type TraceWithSpans, type TursoCreateDatasetOptions, TursoDatasetProvider, TursoEvalProvider, TursoTraceProvider, TursoVariationStore, type TypeExpressionProbe, type TypeProbe, type TypeProbeRequest, type TypeResolutionRequest, type TypeResolutionResult, TypeSafeSDK, type TypeSafeSDKOptions, TypeSafeTelemetry, type UpdatePromptResponse, type UpdatePromptResult, type ValueCatalog, type ValueCatalogGroup, type ValueCatalogPreset, type ValueFactory, type VariationConflict, VariationConflictError, type VariationContent, type VariationId, type VariationInfo, type VariationStore, VercelAISDK, VercelAISDKTelemetry, type VercelAISDKTelemetryOptions, type VersionHistoryOptions, type VersionId, type VersionInfo, type VersioningAdapter, type WipChanges, assertUpdateStyle, canonicalizeUpdates, check, collectInputSlots, createLocalTursoClient, createTracerForPrompt, decodeOtlpProtobuf, fieldValuesOf, findInputCycle, getPromptSpanAttributes, inputReferenceProblems, isCheck, isCheckSpan, isResource, isStandardSchema, isValidInstanceName, isVariationLoaderHookRegistered, matchSourcesToSlots, mergeIntoWip, mergePromptIdentity, mergeSpans, mergeUpdates, namedBindings, normalizeOtlpRequest, openLocalEvalProvider, openLocalVariationStore, promptIdOf, rebaseUpdates, registerVariationLoaderHook, resolveConflicts, resolveExecutionInput, resolveExecutionInputs, resource, resourceParameterNames, runDatasetMigrations, runEvalMigrations, runMigrations, runVariationMigrations, serializeUpdates, setupGlobalOTelPipeline, spanMessages, stampReceipts, toPromptRef };
|
|
4542
|
+
export { type AddPromptContext, type AddPromptField, type Annotation, type AnnotationChanges, type AnnotationEvent, type AnnotationEventOp, type AnnotationKind, type AnnotationSource, BaseTraceIngestor, BaseTraceProvider, CHECK_ATTRIBUTE, type CalleeBinding, type ChangeEventType, type ChatPromptUpdates, type Check, type CheckDefinition, type CheckInfo, type CheckOutcome, type CheckRun, type ColumnPath, type ConflictChoices, type CreateDatasetInput, DEFAULT_EVAL_CONCURRENCY, DEFAULT_MAX_QUERY_ROWS, DEFAULT_PLAYGROUND_IGNORE_PATTERNS, DEFAULT_PLAYGROUND_INCLUDE_PATTERNS, DEFAULT_QUERY_TIMEOUT_MS, DEPLOYMENT_ENVIRONMENT_ATTRIBUTE, type Dataset, type DatasetChangeEvent, type DatasetChangeType, type DatasetColumnSpec, type DatasetField, type DatasetFieldShape, type DatasetInstanceShape, DatasetNotFoundError, type DatasetPathChild, type DatasetProvider, type DatasetProviderInfo, type DatasetRow, type DatasetRowSource, type DatasetRowUpdate, type DatasetRowsOverview, type DatasetSummary, DatasetValidationError, type DeclaredInstance, type DynamicResourceDefinition, type EvalArm, type EvalArmSpec, type EvalChangeEvent, type EvalChangeType, type EvalCheck, type EvalCheckOutcome, type EvalCheckResult, type EvalCounts, type EvalDefinition, type EvalDefinitionPatch, type EvalInputs, EvalNotFoundError, type EvalProvider, type EvalProviderInfo, type EvalResults, type EvalRowResult, type EvalRowStatus, type EvalRun, type EvalRunProgress, EvalRunRefusedError, type EvalRunStatus, type EvalRunSummary, EvalRunner, type EvalRunnerOptions, type EvalSummary, type EvalTraceRun, type EvalutionConfig, type ExecuteConfigOptions, type ExecuteOptions, type ExecuteRequest, type ExecuteResponse, type ExecuteResult, type ExecutionHandle, type ExecutionInput, type ExtractedProps, type FactoriesProbe, type FieldValues, type FilePromptMetadata, FilePromptProvider, type FilePromptProviderOptions, type FileProvider, type FileWatchCallback, type FileWatchOptions, type ForeignColumnSpec, GeminiInteractionsSDK, GitVersioning, type GitVersioningOptions, type GlobOptions, type HeadState, HttpTraceSink, type HttpTraceSinkOptions, type ImportOptions, type InputBindings, type InputLayout, type InputSignature, type InputSlot, type InputSource, type InstanceResolver, type KnownColumnSpec, type LLMSpanDetails, type ListRowsOptions, LocalDatabaseTraceProvider, type LocalDatabaseTraceProviderOptions, LocalDirectoryDatasetProvider, type LocalDirectoryDatasetProviderOptions, LocalEvalProvider, type LocalEvalProviderOptions, LocalFileProvider, type LocalTursoClientOptions, LocalVariationStore, MIGRATIONS_TABLE, MemoryFileProvider, MemoryTraceProvider, type MergeOutcome, type NewDatasetRow, type NewEvalDefinition, type NewEvalRun, type NewWip, type NormalizedChatPrompt, type NormalizedFilePrompt, type NormalizedMessage, type NormalizedOtlpEvent, type NormalizedOtlpSpan, type NormalizedParameter, type NormalizedPrompt, type NormalizedPromptBase, type NormalizedPromptUpdates, type NormalizedQuestionsPrompt, type NormalizedToolCall, OTelTraceIngestor, type OpenOnHeadOptions, OtlpTraceIngestor, OverlayFileProvider, PLAYGROUND_ENVIRONMENT, PLAYGROUND_RESOURCE, PROMPT_FIELD, PROMPT_IDENTITY, PROMPT_ID_ATTRIBUTE, PROMPT_INPUTS_ATTRIBUTE, PROMPT_NAME_ATTRIBUTE, PROMPT_PROVIDER_ID_ATTRIBUTE, PROMPT_VARIATION_ATTRIBUTE, PROMPT_VERSION_ATTRIBUTE, type ParsePromptsOptions, type ParsedFilePrompt, type ParsedPrompt, type PendingConflicts, type PerPromptTelemetry, type PerTraceTelemetry, type PlaygroundModuleError, type PreparedCheck, type ProbeResult, type ProbeResults, type ProjectProbeRequest, type PromptChangeEvent, type PromptFileType, type PromptID, type PromptInputSources, type PromptProvider, type PromptProviderInfo, type PromptRef, type PromptRefLike, type PromptSpanInfo, type PromptStyle, type PromptVariations, type PromptVersions, type PromptsFactory, type PromptsHelper, type PromptsHelperOptions, type PropDefinition, type PropType, type PropValue, type QuestionsPromptUpdates, type ReadOnlyQueryRunner, type RebaseResult, type RegisteredCheck, type RegisteredResource, type RegisteredSource, type ResolutionContext, type ResolvedPromptInputs, type ResolvedResourceInputs, type Resource, type ResourceBinding, type ResourceDefinition, type ResourceInfo, type ResourceInput, type ResourceInputs, type ResourceInstance, type ResourceInstanceInput, type ResourceLease, type ResourceOutputDefinition, ResourceRegistry, type ResourceScope, type RunResources, type SDKAdapter, SERVICE_NAME_ATTRIBUTE, SPAN_KIND_ATTRIBUTE, type SlotMatchRequest, type SlotMatchSource, type SourceSpan, type Span, type SpanContentPart, type SpanImagePart, type SpanKind, type SpanMessage, type SpanMessageRole, type SpanReasoningPart, type SpanTextPart, type SpanToolCallPart, type SpanToolResultPart, SqlQueryError, type SqlQueryOptions, type SqlQueryResult, type StartEvalRunOptions, type StaticResourceDefinition, type StoredVariation, type SystemOneCallOptions, type SystemOneCallRecord, TRACE_EVENTS_PATH, TRACE_QUERY_SCHEMA, TSPromptFileType, type ToolSpanDetails, type Trace, type TraceChangeEvent, type TraceChangeType, type TraceCheckResult, type TraceEvalRun, TraceEventIngestor, type TraceEventsRequest, type TraceIngestor, type TraceLiveEvent, type TraceProvider, type TraceProviderInfo, type TraceSink, type TraceSinkEvent, type TraceStreamEvent, type TraceSummary, type TraceWithSpans, type TursoCreateDatasetOptions, TursoDatasetProvider, TursoEvalProvider, TursoTraceProvider, TursoVariationStore, type TypeExpressionProbe, type TypeProbe, type TypeProbeRequest, type TypeResolutionRequest, type TypeResolutionResult, TypeSafeSDK, type TypeSafeSDKOptions, TypeSafeTelemetry, type UpdatePromptResponse, type UpdatePromptResult, type ValueCatalog, type ValueCatalogGroup, type ValueCatalogPreset, type ValueFactory, type VariationConflict, VariationConflictError, type VariationContent, type VariationId, type VariationInfo, type VariationStore, VercelAISDK, VercelAISDKTelemetry, type VercelAISDKTelemetryOptions, type VersionHistoryOptions, type VersionId, type VersionInfo, type VersioningAdapter, type WipChanges, assertUpdateStyle, canonicalizeUpdates, check, collectInputSlots, createLocalTursoClient, createTracerForPrompt, decodeOtlpProtobuf, fieldValuesOf, findInputCycle, getPromptSpanAttributes, inputReferenceProblems, isCheck, isCheckSpan, isFreshImportHookRegistered, isResource, isStandardSchema, isValidInstanceName, isVariationLoaderHookRegistered, matchSourcesToSlots, mergeIntoWip, mergePromptIdentity, mergeSpans, mergeUpdates, namedBindings, normalizeOtlpRequest, openLocalEvalProvider, openLocalVariationStore, promptIdOf, rebaseUpdates, registerFreshImportHook, registerVariationLoaderHook, resolveConflicts, resolveExecutionInput, resolveExecutionInputs, resource, resourceParameterNames, runDatasetMigrations, runEvalMigrations, runMigrations, runVariationMigrations, serializeUpdates, setupGlobalOTelPipeline, spanMessages, stampReceipts, toPromptRef };
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as SPAN_KIND_ATTRIBUTE, A as DEFAULT_QUERY_TIMEOUT_MS, B as DEFAULT_EVAL_CONCURRENCY, Bt as SERVICE_NAME_ATTRIBUTE, C as VariationConflictError, Ct as VercelAISDKTelemetry, D as normalizeOtlpRequest, Dt as OTelTraceIngestor, E as decodeOtlpProtobuf, Et as setupGlobalOTelPipeline, Ft as BaseTraceIngestor, Gt as isMissingPackage, H as EvalRunner, Ht as spanMessages, It as PLAYGROUND_RESOURCE, Jt as PROMPT_INPUTS_ATTRIBUTE, Kt as missingPackageMessage, Lt as CHECK_ATTRIBUTE, Mt as TypeSafeSDK, Nt as PROMPT_IDENTITY, O as EvalNotFoundError, Ot as isEditable, Pt as TypeSafeTelemetry, Qt as PROMPT_VERSION_ATTRIBUTE, R as DatasetNotFoundError, Rt as DEPLOYMENT_ENVIRONMENT_ATTRIBUTE, St as resource, T as toPromptRef, Tt as TRACE_EVENTS_PATH, Ut as assertUpdateStyle, V as EvalRunRefusedError, Vt as isCheckSpan, Wt as findPackageDts, Xt as PROMPT_PROVIDER_ID_ATTRIBUTE, Yt as PROMPT_NAME_ATTRIBUTE, Zt as PROMPT_VARIATION_ATTRIBUTE, _ as runMigrations, _t as resourceParameterNames, a as mergeSpans, an as LocalFileProvider, at as resolveExecutionInput, b as mkdirSelfIgnoring, bt as isResource, c as TRACE_QUERY_SCHEMA, cn as isFreshImportHookRegistered, ct as collectInputSlots, d as TursoEvalProvider, en as createTracerForPrompt, f as runEvalMigrations, ft as namedBindings, g as MIGRATIONS_TABLE, gt as parameterDetails, h as runDatasetMigrations, ht as ResourceRegistry, i as TursoTraceProvider, it as matchSourcesToSlots, j as SqlQueryError, jt as shortId, k as DEFAULT_MAX_QUERY_ROWS, l as LocalEvalProvider, ln as registerFreshImportHook, lt as findInputCycle, m as TursoDatasetProvider, mt as DEFAULT_PLAYGROUND_INCLUDE_PATTERNS, n as OtlpTraceIngestor, nn as mergePromptIdentity, o as BaseTraceProvider, on as isVariationLoaderHookRegistered, ot as resolveExecutionInputs, p as LocalDirectoryDatasetProvider, pt as DEFAULT_PLAYGROUND_IGNORE_PATTERNS, qt as PROMPT_ID_ATTRIBUTE, r as LocalDatabaseTraceProvider, sn as registerVariationLoaderHook, st as stampReceipts, t as TraceEventIngestor, tn as getPromptSpanAttributes, u as openLocalEvalProvider, ut as inputReferenceProblems, v as assertSqliteFile, vt as isValidInstanceName, w as promptIdOf, wt as HttpTraceSink, x as rollupSpans, xt as isStandardSchema, y as createLocalTursoClient, yt as VercelAISDK, z as DatasetValidationError, zt as PLAYGROUND_ENVIRONMENT } from "./trace-event-ingestor-BghQcCHe.js";
|
|
2
2
|
import { _ as isCheck, g as check, n as builtinCheck, r as builtinCheckInfos } from "./checks-Cq97JU-h.js";
|
|
3
3
|
import "node:module";
|
|
4
4
|
import path, { dirname } from "node:path";
|
|
5
5
|
import { access, realpath } from "node:fs/promises";
|
|
6
6
|
import { minimatch } from "minimatch";
|
|
7
|
-
import { createHash } from "node:crypto";
|
|
8
7
|
import fs$1 from "node:fs";
|
|
8
|
+
import { createHash } from "node:crypto";
|
|
9
9
|
import { addProperty, buildPropTypeFromType, extractPropertiesFromDeclaration, extractPropertiesFromObjectLiteral, extractPropertiesFromParameters, findTypeDeclaration, isOpaqueType, removeProperty, resolveBindings, updateProperty, valueToSourceText } from "ts-proppy";
|
|
10
10
|
import ts from "typescript";
|
|
11
11
|
import { spawn } from "node:child_process";
|
|
@@ -2383,6 +2383,20 @@ function isDefinition(result) {
|
|
|
2383
2383
|
return !!result && !Array.isArray(result);
|
|
2384
2384
|
}
|
|
2385
2385
|
/**
|
|
2386
|
+
* A declared argument's definition: its probe's answer, or the unresolved
|
|
2387
|
+
* fallback, with what its schema says added — the probe sees an output type
|
|
2388
|
+
* alone, which can't say whether it can be left out, or what it's for.
|
|
2389
|
+
*/
|
|
2390
|
+
function parameterDefinition(name, result, details) {
|
|
2391
|
+
const definition = isDefinition(result) ? result : unresolvedParameter(name);
|
|
2392
|
+
const { optional = false, description } = details.get(name) ?? {};
|
|
2393
|
+
return {
|
|
2394
|
+
...definition,
|
|
2395
|
+
optional,
|
|
2396
|
+
...description && { description }
|
|
2397
|
+
};
|
|
2398
|
+
}
|
|
2399
|
+
/**
|
|
2386
2400
|
* A file type's slot-match answer (slot path → source uris) turned around into
|
|
2387
2401
|
* source uri → the slot paths it fits, or `undefined` when there is none.
|
|
2388
2402
|
*/
|
|
@@ -2749,9 +2763,11 @@ var FilePromptProvider = class {
|
|
|
2749
2763
|
const names = resourceParameterNames(resource.resource);
|
|
2750
2764
|
if (names.length === 0) continue;
|
|
2751
2765
|
const candidates = (await this.resources.inScopeFor(resource.modulePath)).filter((s) => !dependsOn(s.resource, resource, byResource));
|
|
2766
|
+
const details = await parameterDetails(resource.resource);
|
|
2752
2767
|
withParams.push({
|
|
2753
2768
|
resource,
|
|
2754
2769
|
names,
|
|
2770
|
+
details,
|
|
2755
2771
|
candidates
|
|
2756
2772
|
});
|
|
2757
2773
|
}
|
|
@@ -2833,13 +2849,10 @@ var FilePromptProvider = class {
|
|
|
2833
2849
|
*/
|
|
2834
2850
|
assembleResourceParameters(withParams, resolved) {
|
|
2835
2851
|
let cursor = 0;
|
|
2836
|
-
return new Map(withParams.map(({ resource, names }) => {
|
|
2852
|
+
return new Map(withParams.map(({ resource, names, details }) => {
|
|
2837
2853
|
const start = cursor;
|
|
2838
2854
|
cursor += names.length;
|
|
2839
|
-
return [resource.uri, names.map((name, j) =>
|
|
2840
|
-
const result = resolved?.[start + j];
|
|
2841
|
-
return isDefinition(result) ? result : unresolvedParameter(name);
|
|
2842
|
-
})];
|
|
2855
|
+
return [resource.uri, names.map((name, j) => parameterDefinition(name, resolved?.[start + j], details))];
|
|
2843
2856
|
}));
|
|
2844
2857
|
}
|
|
2845
2858
|
/**
|
|
@@ -3040,8 +3053,9 @@ var FilePromptProvider = class {
|
|
|
3040
3053
|
promptName: c.key
|
|
3041
3054
|
})));
|
|
3042
3055
|
const resolved = requests.length > 0 ? await this.resolveTypes(requests, []) : {};
|
|
3056
|
+
const details = await Promise.all(withNames.map(({ registered: c }) => parameterDetails(c.check)));
|
|
3043
3057
|
let cursor = 0;
|
|
3044
|
-
const user = withNames.map(({ registered: c, names }) => {
|
|
3058
|
+
const user = withNames.map(({ registered: c, names }, i) => {
|
|
3045
3059
|
const start = cursor;
|
|
3046
3060
|
cursor += names.length;
|
|
3047
3061
|
return {
|
|
@@ -3050,10 +3064,7 @@ var FilePromptProvider = class {
|
|
|
3050
3064
|
...c.check.group && { group: c.check.group },
|
|
3051
3065
|
...c.check.description && { description: c.check.description },
|
|
3052
3066
|
...c.check.runsOnError && { runsOnError: true },
|
|
3053
|
-
parameters: names.map((name, j) =>
|
|
3054
|
-
const result = resolved.probes?.[start + j];
|
|
3055
|
-
return isDefinition(result) ? result : unresolvedParameter(name);
|
|
3056
|
-
})
|
|
3067
|
+
parameters: names.map((name, j) => parameterDefinition(name, resolved.probes?.[start + j], details[i]))
|
|
3057
3068
|
};
|
|
3058
3069
|
});
|
|
3059
3070
|
return [
|
|
@@ -4363,4 +4374,4 @@ var MemoryTraceProvider = class extends BaseTraceProvider {
|
|
|
4363
4374
|
}
|
|
4364
4375
|
};
|
|
4365
4376
|
//#endregion
|
|
4366
|
-
export { BaseTraceIngestor, BaseTraceProvider, CHECK_ATTRIBUTE, DEFAULT_EVAL_CONCURRENCY, DEFAULT_MAX_QUERY_ROWS, DEFAULT_PLAYGROUND_IGNORE_PATTERNS, DEFAULT_PLAYGROUND_INCLUDE_PATTERNS, DEFAULT_QUERY_TIMEOUT_MS, DEPLOYMENT_ENVIRONMENT_ATTRIBUTE, DatasetNotFoundError, DatasetValidationError, EvalNotFoundError, EvalRunRefusedError, EvalRunner, FilePromptProvider, GeminiInteractionsSDK, GitVersioning, LocalDatabaseTraceProvider, LocalDirectoryDatasetProvider, LocalEvalProvider, LocalFileProvider, LocalVariationStore, MIGRATIONS_TABLE, MemoryFileProvider, MemoryTraceProvider, OTelTraceIngestor, OtlpTraceIngestor, OverlayFileProvider, PLAYGROUND_ENVIRONMENT, PLAYGROUND_RESOURCE, PROMPT_FIELD, PROMPT_IDENTITY, PROMPT_ID_ATTRIBUTE, PROMPT_INPUTS_ATTRIBUTE, PROMPT_NAME_ATTRIBUTE, PROMPT_PROVIDER_ID_ATTRIBUTE, PROMPT_VARIATION_ATTRIBUTE, PROMPT_VERSION_ATTRIBUTE, ResourceRegistry, SERVICE_NAME_ATTRIBUTE, SPAN_KIND_ATTRIBUTE, SqlQueryError, TRACE_QUERY_SCHEMA, TSPromptFileType, TursoDatasetProvider, TursoEvalProvider, TursoTraceProvider, TursoVariationStore, TypeSafeSDK, TypeSafeTelemetry, VariationConflictError, VercelAISDK, VercelAISDKTelemetry, assertUpdateStyle, canonicalizeUpdates, check, collectInputSlots, createLocalTursoClient, createTracerForPrompt, decodeOtlpProtobuf, fieldValuesOf, findInputCycle, getPromptSpanAttributes, inputReferenceProblems, isCheck, isCheckSpan, isResource, isStandardSchema, isValidInstanceName, isVariationLoaderHookRegistered, matchSourcesToSlots, mergeIntoWip, mergePromptIdentity, mergeSpans, mergeUpdates, namedBindings, normalizeOtlpRequest, openLocalEvalProvider, openLocalVariationStore, promptIdOf, rebaseUpdates, registerVariationLoaderHook, resolveConflicts, resolveExecutionInput, resolveExecutionInputs, resource, resourceParameterNames, runDatasetMigrations, runEvalMigrations, runMigrations, runVariationMigrations, serializeUpdates, setupGlobalOTelPipeline, spanMessages, stampReceipts, toPromptRef };
|
|
4377
|
+
export { BaseTraceIngestor, BaseTraceProvider, CHECK_ATTRIBUTE, DEFAULT_EVAL_CONCURRENCY, DEFAULT_MAX_QUERY_ROWS, DEFAULT_PLAYGROUND_IGNORE_PATTERNS, DEFAULT_PLAYGROUND_INCLUDE_PATTERNS, DEFAULT_QUERY_TIMEOUT_MS, DEPLOYMENT_ENVIRONMENT_ATTRIBUTE, DatasetNotFoundError, DatasetValidationError, EvalNotFoundError, EvalRunRefusedError, EvalRunner, FilePromptProvider, GeminiInteractionsSDK, GitVersioning, HttpTraceSink, LocalDatabaseTraceProvider, LocalDirectoryDatasetProvider, LocalEvalProvider, LocalFileProvider, LocalVariationStore, MIGRATIONS_TABLE, MemoryFileProvider, MemoryTraceProvider, OTelTraceIngestor, OtlpTraceIngestor, OverlayFileProvider, PLAYGROUND_ENVIRONMENT, PLAYGROUND_RESOURCE, PROMPT_FIELD, PROMPT_IDENTITY, PROMPT_ID_ATTRIBUTE, PROMPT_INPUTS_ATTRIBUTE, PROMPT_NAME_ATTRIBUTE, PROMPT_PROVIDER_ID_ATTRIBUTE, PROMPT_VARIATION_ATTRIBUTE, PROMPT_VERSION_ATTRIBUTE, ResourceRegistry, SERVICE_NAME_ATTRIBUTE, SPAN_KIND_ATTRIBUTE, SqlQueryError, TRACE_EVENTS_PATH, TRACE_QUERY_SCHEMA, TSPromptFileType, TraceEventIngestor, TursoDatasetProvider, TursoEvalProvider, TursoTraceProvider, TursoVariationStore, TypeSafeSDK, TypeSafeTelemetry, VariationConflictError, VercelAISDK, VercelAISDKTelemetry, assertUpdateStyle, canonicalizeUpdates, check, collectInputSlots, createLocalTursoClient, createTracerForPrompt, decodeOtlpProtobuf, fieldValuesOf, findInputCycle, getPromptSpanAttributes, inputReferenceProblems, isCheck, isCheckSpan, isFreshImportHookRegistered, isResource, isStandardSchema, isValidInstanceName, isVariationLoaderHookRegistered, matchSourcesToSlots, mergeIntoWip, mergePromptIdentity, mergeSpans, mergeUpdates, namedBindings, normalizeOtlpRequest, openLocalEvalProvider, openLocalVariationStore, promptIdOf, rebaseUpdates, registerFreshImportHook, registerVariationLoaderHook, resolveConflicts, resolveExecutionInput, resolveExecutionInputs, resource, resourceParameterNames, runDatasetMigrations, runEvalMigrations, runMigrations, runVariationMigrations, serializeUpdates, setupGlobalOTelPipeline, spanMessages, stampReceipts, toPromptRef };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as DatasetRowsOverview, n as DatasetRow, r as DatasetRowUpdate, t as Dataset, x as TraceWithSpans } from "./dataset-types-
|
|
1
|
+
import { i as DatasetRowsOverview, n as DatasetRow, r as DatasetRowUpdate, t as Dataset, x as TraceWithSpans } from "./dataset-types-Dqi5vVg-.js";
|
|
2
2
|
|
|
3
3
|
//#region src/views/view.d.ts
|
|
4
4
|
/** What every view is given, whatever its surface. */
|