experimental-ash 0.24.1 → 0.24.2
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/CHANGELOG.md +7 -0
- package/dist/src/chunks/authored-module-loader-DcCfCiBm.js +4 -0
- package/dist/src/chunks/client-DLHAGI2g.js +4 -0
- package/dist/src/chunks/dev-authored-source-watcher-CBID_Dwh.js +1 -0
- package/dist/src/chunks/{errors-DsO9xmQL.js → errors-HYWjHxV6.js} +1 -1
- package/dist/src/chunks/{gray-matter-BxS7ZG-J.js → gray-matter-D-9jHwOT.js} +4 -4
- package/dist/src/chunks/host-zBy9FyyX.js +70 -0
- package/dist/src/chunks/{jsdist-M7JFZoA4.js → jsdist-BkeWZ7EZ.js} +61 -61
- package/dist/src/chunks/package-HUaeub_D.js +1 -0
- package/dist/src/chunks/{paths-jcVjBqc3.js → paths-CebY5GCi.js} +2 -2
- package/dist/src/chunks/{picocolors-Bq-tZK9u.js → picocolors-aAkqW4On.js} +1 -1
- package/dist/src/chunks/token-D98SQdvs.js +1 -0
- package/dist/src/chunks/{url-BVRhVE2O.js → url-JdCGA634.js} +1 -1
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/dev/environment.d.ts +16 -2
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/input-requests.js +1 -1
- package/dist/src/cli/dev/repl.js +3 -3
- package/dist/src/cli/dev/url.js +1 -1
- package/dist/src/cli/run.js +1 -1
- package/dist/src/cli/ui/output.js +1 -1
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/client/index.js +1 -0
- package/dist/src/compiled/.vendor-stamp.json +7 -6
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/google/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/otel/index.js +1 -1
- package/dist/src/compiled/@chat-adapter/slack/_slack-web-api.d.ts +7 -0
- package/dist/src/compiled/@chat-adapter/slack/index.d.ts +418 -109
- package/dist/src/compiled/@chat-adapter/slack/index.js +31 -27
- package/dist/src/compiled/@chat-adapter/slack/package.json +1 -1
- package/dist/src/compiled/@chat-adapter/state-memory/index.d.ts +8 -2
- package/dist/src/compiled/@chat-adapter/state-memory/index.js +1 -1
- package/dist/src/compiled/@chat-adapter/state-memory/package.json +1 -1
- package/dist/src/compiled/@opentelemetry/api/index.js +1 -1
- package/dist/src/compiled/@vercel/sandbox/index.js +19 -17
- package/dist/src/compiled/@vercel/sandbox/package.json +1 -1
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/runtime.js +22 -22
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/_chunks/node/auth-ZhCJAHxl.js +2 -0
- package/dist/src/compiled/_chunks/node/{dist-BdWHjlRQ.js → dist-BQYUcBqu.js} +31 -31
- package/dist/src/compiled/_chunks/node/{chunk-Dd2tEFlW.js → dist-BdTs18CF.js} +1 -1
- package/dist/src/compiled/_chunks/node/retry-DkR2H1Y0.js +1 -0
- package/dist/src/compiled/_chunks/node/token-CoIbMZkq.js +1 -0
- package/dist/src/compiled/_chunks/node/{version-BMyZn3Y2.js → version-D4IYmfaS.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/coerce-BhzIW-Hm.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{compat-CIROS3w4.js → compat-DcEvieoj.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{core-DOVmxHH8.js → core-XWIi7wKc.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/{dist-C7wPwOI9.js → dist-DO14ZaQj.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{dist-CpUQh3NH.js → dist-DZZY3Zyp.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-DOMbNs-S.js +51 -0
- package/dist/src/compiled/_chunks/workflow/{schemas-DFZoEyCn.js → schemas-DmgDnhW3.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/sleep-CRjce49s.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{src-ClRYdO4-.js → src-B54rYDvB.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/symbols-D8paKc8P.js +9 -0
- package/dist/src/compiled/_chunks/workflow/{token-CsNmv7KW.js → token-D9z1dMB6.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{token-j5Cl4rrs.js → token-DV7rQw_t.js} +1 -1
- package/dist/src/compiled/chat/index.d.ts +6 -3143
- package/dist/src/compiled/chat/index.js +1 -1
- package/dist/src/compiled/chat/{jsx-runtime-DxGwoLu2.d.ts → jsx-runtime-CFq1K_Ve.d.ts} +1 -1
- package/dist/src/compiled/chat/package.json +1 -1
- package/dist/src/compiled/jose/index.js +2 -2
- package/dist/src/compiled/jsonc-parser/LICENSE.md +21 -0
- package/dist/src/compiled/jsonc-parser/index.d.ts +13 -0
- package/dist/src/compiled/jsonc-parser/index.js +15 -0
- package/dist/src/compiled/jsonc-parser/package.json +7 -0
- package/dist/src/compiled/just-bash/index.js +773 -773
- package/dist/src/compiled/just-bash/package.json +1 -1
- package/dist/src/compiled/turndown/index.js +1 -1
- package/dist/src/compiled/zod/index.js +1 -1
- package/dist/src/compiled/zod-validation-error/index.js +1 -1
- package/dist/src/evals/cli/eval.js +1 -1
- package/dist/src/evals/loaders/yaml.js +1 -1
- package/dist/src/evals/runner/discover.js +1 -1
- package/dist/src/evals/runner/execute-suite.js +1 -1
- package/dist/src/evals/runner/reporters/console.js +1 -1
- package/dist/src/evals/scorers/autoevals-client.js +1 -1
- package/dist/src/evals/scorers/autoevals.js +1 -1
- package/dist/src/evals/scorers/json.js +1 -1
- package/dist/src/evals/scorers/run.js +1 -1
- package/dist/src/evals/scorers/sql.js +1 -1
- package/dist/src/evals/scorers/text.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-asset-import-plugin.d.ts +5 -0
- package/dist/src/internal/authored-asset-import-plugin.js +141 -0
- package/dist/src/internal/authored-module-bundle.d.ts +4 -0
- package/dist/src/internal/authored-module-bundle.js +19 -0
- package/dist/src/internal/authored-module-loader.d.ts +6 -0
- package/dist/src/internal/authored-module-loader.js +114 -125
- package/dist/src/internal/authored-package-tsconfig-paths.d.ts +9 -0
- package/dist/src/internal/authored-package-tsconfig-paths.js +209 -0
- package/dist/src/internal/nitro/host/channel-routes.d.ts +9 -2
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +12 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +19 -3
- package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +7 -3
- package/dist/src/internal/nitro/host/start-development-server.js +2 -0
- package/package.json +17 -17
- package/dist/src/chunks/authored-module-loader-XcFLnl49.js +0 -2
- package/dist/src/chunks/client-nshDsWNF.js +0 -4
- package/dist/src/chunks/dev-authored-source-watcher-CApkYfee.js +0 -7
- package/dist/src/chunks/host-3sfHdmXL.js +0 -65
- package/dist/src/chunks/package-DmsQgn4v.js +0 -1
- package/dist/src/chunks/prewarm-DslujbK5.js +0 -6
- package/dist/src/chunks/token-DtoyQZy2.js +0 -1
- package/dist/src/chunks/token-util-CHjOk3A7.js +0 -1
- package/dist/src/compiled/_chunks/node/auth-vbe4XEEK.js +0 -2
- package/dist/src/compiled/_chunks/node/dist-DMSq2ehP.js +0 -1
- package/dist/src/compiled/_chunks/node/retry-BOcy5BbJ.js +0 -1
- package/dist/src/compiled/_chunks/node/token-D-BTJHoU.js +0 -1
- package/dist/src/compiled/_chunks/workflow/coerce-Dh0wa7P9.js +0 -1
- package/dist/src/compiled/_chunks/workflow/context-errors-Bbvvp-li.js +0 -6
- package/dist/src/compiled/_chunks/workflow/dist-C_oiE-l7.js +0 -40
- package/dist/src/compiled/_chunks/workflow/resume-hook-C3VWUPii.js +0 -12
- package/dist/src/compiled/_chunks/workflow/sleep-QTkC1VFe.js +0 -1
- package/dist/src/compiled/_chunks/workflow/symbols-QezhMuLg.js +0 -4
- package/dist/src/compiled/chat/_workflow-serde.d.ts +0 -5
- /package/dist/src/chunks/{chunk-8L7ocgPr.js → chunk-DSjMdhoD.js} +0 -0
- /package/dist/src/chunks/{guards-CjJ3lmju.js → guards-26p6sOw3.js} +0 -0
- /package/dist/src/chunks/{input-requests-BsBi7_5K.js → input-requests-DJiy6dG9.js} +0 -0
- /package/dist/src/chunks/{runtime-model-BWu6M_hq.js → runtime-model-Dh0Nz64z.js} +0 -0
- /package/dist/src/chunks/{types-MZUhN0Zy.js → types-DDA2QUED.js} +0 -0
- /package/dist/src/compiled/_chunks/workflow/{chunk-DHhdAPOb.js → chunk-DSjMdhoD.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../_chunks/workflow/chunk-DHhdAPOb.js";import{An as t,At as n,Bi as r,Bt as i,Dn as a,F as o,Ft as s,Gt as c,Ii as l,It as ee,Kt as te,Lt as ne,Mn as re,Mt as ie,Nt as ae,On as u,Qt as d,Ri as f,Rt as p,Si as m,Ut as h,Vi as g,W as _,Xt as v,Zt as y,_n as b,bi as x,dn as S,dt as C,en as w,gt as T,ht as E,jn as D,jt as O,kn as k,ln as A,nn as j,qt as M,ri as N,rn as P,t as F,tn as I,un as L,vi as R,vt as z,xi as B,yi as V,zt as H}from"../_chunks/workflow/core-DOVmxHH8.js";import{$ as U,$n as W,$t as G,A as K,An as q,At as J,B as oe,Bn as se,Bt as ce,C as le,Cn as ue,Cr as Y,Ct as de,D as fe,Dn as pe,Dt as me,E as he,En as ge,Et as _e,F as ve,Fn as ye,Ft as be,G as xe,Gn as Se,Gt as Ce,H as we,Hn as Te,Ht as Ee,I as De,In as Oe,It as ke,J as Ae,Jn as je,Jt as Me,K as Ne,Kn as Pe,Kt as Fe,L as Ie,Ln as Le,Lt as Re,M as ze,Mn as Be,Mt as Ve,N as He,Nn as Ue,Nt as We,O as Ge,On as Ke,Ot as qe,P as Je,Pn as Ye,Pt as Xe,Q as Ze,Qn as Qe,Qt as $e,R as et,Rn as tt,Rt as nt,S as rt,Sn as it,Sr as at,St as ot,T as st,Tn as ct,Tt as lt,U as ut,Un as dt,Ut as ft,V as pt,Vn as mt,Vt as ht,W as gt,Wn as _t,Wt as vt,X as yt,Xn as bt,Xt as xt,Y as St,Yn as Ct,Yt as wt,Z as Tt,Zn as Et,Zt as Dt,_ as Ot,_n as kt,_r as At,_t as jt,a as X,an as Mt,ar as Nt,at as Pt,b as Ft,bn as It,br as Lt,bt as Z,c as Rt,cn as zt,cr as Bt,ct as Vt,d as Ht,dn as Ut,dr as Wt,dt as Gt,en as Kt,er as qt,et as Jt,f as Yt,fn as Xt,fr as Zt,ft as Qt,g as $t,gn as en,gr as tn,gt as nn,h as rn,hn as an,hr as on,ht as sn,i as cn,in as ln,ir as un,it as dn,j as fn,jn as pn,jt as mn,k as hn,kn as gn,kt as _n,l as vn,ln as yn,lr as bn,lt as xn,m as Sn,mn as Cn,mr as wn,mt as Tn,n as En,nn as Dn,nr as On,nt as kn,o as An,on as jn,or as Mn,ot as Nn,p as Pn,pn as Fn,pr as In,pt as Ln,q as Rn,qn as zn,qt as Bn,r as Vn,rn as Hn,rr as Un,rt as Wn,s as Gn,sn as Kn,sr as qn,st as Jn,t as Yn,tn as Xn,tr as Zn,tt as Qn,u as $n,un as er,ur as tr,ut as nr,v as rr,vn as ir,vr as ar,vt as or,w as sr,wn as cr,wr as lr,wt as ur,x as dr,xn as fr,xr as pr,xt as mr,y as hr,yn as gr,yr as _r,yt as vr,z as yr,zn as br,zt as xr}from"../_chunks/workflow/schemas-DFZoEyCn.js";import{i as Sr,n as Cr,r as wr,t as Tr}from"../_chunks/workflow/compat-CIROS3w4.js";import{t as Er}from"../_chunks/workflow/coerce-Dh0wa7P9.js";const Q={...ye,...lr,iso:Y},Dr=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`));function Or(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function kr(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function Ar(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return Q.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return Q.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=$(kr(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return Q.null();if(n.length===0)return Q.never();if(n.length===1)return Q.literal(n[0]);if(n.every(e=>typeof e==`string`))return Q.enum(n);let r=n.map(e=>Q.literal(e));return r.length<2?r[0]:Q.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return Q.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>Ar({...e,type:n},t));return r.length===0?Q.never():r.length===1?r[0]:Q.union(r)}if(!n)return Q.any();let r;switch(n){case`string`:{let t=Q.string();if(e.format){let n=e.format;n===`email`?t=t.check(Q.email()):n===`uri`||n===`uri-reference`?t=t.check(Q.url()):n===`uuid`||n===`guid`?t=t.check(Q.uuid()):n===`date-time`?t=t.check(Q.iso.datetime()):n===`date`?t=t.check(Q.iso.date()):n===`time`?t=t.check(Q.iso.time()):n===`duration`?t=t.check(Q.iso.duration()):n===`ipv4`?t=t.check(Q.ipv4()):n===`ipv6`?t=t.check(Q.ipv6()):n===`mac`?t=t.check(Q.mac()):n===`cidr`?t=t.check(Q.cidrv4()):n===`cidr-v6`?t=t.check(Q.cidrv6()):n===`base64`?t=t.check(Q.base64()):n===`base64url`?t=t.check(Q.base64url()):n===`e164`?t=t.check(Q.e164()):n===`jwt`?t=t.check(Q.jwt()):n===`emoji`?t=t.check(Q.emoji()):n===`nanoid`?t=t.check(Q.nanoid()):n===`cuid`?t=t.check(Q.cuid()):n===`cuid2`?t=t.check(Q.cuid2()):n===`ulid`?t=t.check(Q.ulid()):n===`xid`?t=t.check(Q.xid()):n===`ksuid`&&(t=t.check(Q.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?Q.number().int():Q.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=Q.boolean();break;case`null`:r=Q.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=$(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=$(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?$(e.additionalProperties,t):Q.any();if(Object.keys(n).length===0){r=Q.record(i,a);break}let o=Q.object(n).passthrough(),s=Q.looseRecord(i,a);r=Q.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=$(i[e],t),r=Q.string().regex(new RegExp(e));o.push(Q.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(Q.object(n).passthrough()),s.push(...o),s.length===0)r=Q.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=Q.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=Q.intersection(e,s[t]);r=e}break}let o=Q.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall($(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>$(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?$(i,t):void 0;r=o?Q.tuple(a).rest(o):Q.tuple(a),typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>$(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?$(e.additionalItems,t):void 0;r=a?Q.tuple(n).rest(a):Q.tuple(n),typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(i!==void 0){let n=$(i,t),a=Q.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=Q.array(Q.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function $(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n=Ar(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>$(e,t)),a=Q.union(i);n=r?Q.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>$(e,t)),a=Q.xor(i);n=r?Q.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Q.any();else{let i=r?n:$(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=Q.intersection(i,$(e.allOf[n],t));n=i}e.nullable===!0&&t.version===`openapi-3.0`&&(n=Q.nullable(n)),e.readOnly===!0&&(n=Q.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))Dr.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function jr(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Or(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??k};return $(n,r)}var Mr=e({$brand:()=>f,$input:()=>a,$output:()=>u,NEVER:()=>r,TimePrecision:()=>_,ZodAny:()=>Yn,ZodArray:()=>En,ZodBase64:()=>Vn,ZodBase64URL:()=>cn,ZodBigInt:()=>X,ZodBigIntFormat:()=>An,ZodBoolean:()=>Gn,ZodCIDRv4:()=>Rt,ZodCIDRv6:()=>vn,ZodCUID:()=>$n,ZodCUID2:()=>Ht,ZodCatch:()=>Yt,ZodCodec:()=>Pn,ZodCustom:()=>Sn,ZodCustomStringFormat:()=>rn,ZodDate:()=>$t,ZodDefault:()=>Ot,ZodDiscriminatedUnion:()=>rr,ZodE164:()=>hr,ZodEmail:()=>Ft,ZodEmoji:()=>dr,ZodEnum:()=>rt,ZodError:()=>At,ZodExactOptional:()=>le,ZodFile:()=>sr,ZodFirstPartyTypeKind:()=>Tr,ZodFunction:()=>st,ZodGUID:()=>he,ZodIPv4:()=>fe,ZodIPv6:()=>Ge,ZodISODate:()=>_r,ZodISODateTime:()=>Lt,ZodISODuration:()=>pr,ZodISOTime:()=>at,ZodIntersection:()=>hn,ZodIssueCode:()=>Cr,ZodJWT:()=>K,ZodKSUID:()=>fn,ZodLazy:()=>ze,ZodLiteral:()=>He,ZodMAC:()=>Je,ZodMap:()=>ve,ZodNaN:()=>De,ZodNanoID:()=>Ie,ZodNever:()=>et,ZodNonOptional:()=>yr,ZodNull:()=>oe,ZodNullable:()=>pt,ZodNumber:()=>we,ZodNumberFormat:()=>ut,ZodObject:()=>gt,ZodOptional:()=>xe,ZodPipe:()=>Ne,ZodPrefault:()=>Rn,ZodPreprocess:()=>Ae,ZodPromise:()=>St,ZodReadonly:()=>yt,ZodRealError:()=>ar,ZodRecord:()=>Tt,ZodSet:()=>Ze,ZodString:()=>U,ZodStringFormat:()=>Jt,ZodSuccess:()=>Qn,ZodSymbol:()=>kn,ZodTemplateLiteral:()=>Wn,ZodTransform:()=>dn,ZodTuple:()=>Pt,ZodType:()=>Nn,ZodULID:()=>Jn,ZodURL:()=>Vt,ZodUUID:()=>xn,ZodUndefined:()=>nr,ZodUnion:()=>Gt,ZodUnknown:()=>Qt,ZodVoid:()=>Ln,ZodXID:()=>Tn,ZodXor:()=>sn,_ZodString:()=>nn,_default:()=>or,_function:()=>Z,any:()=>lt,array:()=>_e,base64:()=>me,base64url:()=>qe,bigint:()=>_n,boolean:()=>J,catch:()=>jt,check:()=>mn,cidrv4:()=>Ve,cidrv6:()=>We,clone:()=>m,codec:()=>Xe,coerce:()=>Er,config:()=>g,core:()=>F,cuid:()=>be,cuid2:()=>ke,custom:()=>Re,date:()=>nt,decode:()=>Nt,decodeAsync:()=>Mn,describe:()=>xr,discriminatedUnion:()=>ce,e164:()=>ht,email:()=>Ee,emoji:()=>ft,encode:()=>qn,encodeAsync:()=>Bt,endsWith:()=>C,enum:()=>vr,exactOptional:()=>vt,file:()=>Ce,flattenError:()=>R,float32:()=>Fe,float64:()=>Bn,formatError:()=>V,fromJSONSchema:()=>jr,function:()=>Z,getErrorMap:()=>wr,globalRegistry:()=>k,gt:()=>E,gte:()=>T,guid:()=>Me,hash:()=>wt,hex:()=>xt,hostname:()=>Dt,httpUrl:()=>$e,includes:()=>z,instanceof:()=>mr,int:()=>G,int32:()=>Kt,int64:()=>Xn,intersection:()=>Dn,invertCodec:()=>Hn,ipv4:()=>ln,ipv6:()=>Mt,iso:()=>Y,json:()=>jn,jwt:()=>Kn,keyof:()=>zt,ksuid:()=>yn,lazy:()=>er,length:()=>n,literal:()=>Ut,locales:()=>D,looseObject:()=>Xt,looseRecord:()=>Fn,lowercase:()=>O,lt:()=>ie,lte:()=>ae,mac:()=>Cn,map:()=>an,maxLength:()=>s,maxSize:()=>ee,meta:()=>en,mime:()=>ne,minLength:()=>p,minSize:()=>H,multipleOf:()=>i,nan:()=>kt,nanoid:()=>ir,nativeEnum:()=>gr,negative:()=>h,never:()=>It,nonnegative:()=>c,nonoptional:()=>fr,nonpositive:()=>te,normalize:()=>M,null:()=>ot,nullable:()=>it,nullish:()=>ue,number:()=>cr,object:()=>ct,optional:()=>ge,overwrite:()=>v,parse:()=>bn,parseAsync:()=>tr,partialRecord:()=>pe,pipe:()=>Ke,positive:()=>y,prefault:()=>gn,preprocess:()=>q,prettifyError:()=>x,promise:()=>pn,property:()=>d,readonly:()=>Be,record:()=>Ue,refine:()=>Ye,regex:()=>w,regexes:()=>N,registry:()=>t,safeDecode:()=>Wt,safeDecodeAsync:()=>Zt,safeEncode:()=>In,safeEncodeAsync:()=>wn,safeParse:()=>on,safeParseAsync:()=>tn,set:()=>Oe,setErrorMap:()=>Sr,size:()=>I,slugify:()=>j,startsWith:()=>P,strictObject:()=>Le,string:()=>tt,stringFormat:()=>br,stringbool:()=>se,success:()=>mt,superRefine:()=>Te,symbol:()=>dt,templateLiteral:()=>_t,toJSONSchema:()=>o,toLowerCase:()=>A,toUpperCase:()=>L,transform:()=>Se,treeifyError:()=>B,trim:()=>S,tuple:()=>Pe,uint32:()=>zn,uint64:()=>je,ulid:()=>Ct,undefined:()=>de,union:()=>bt,unknown:()=>Et,uppercase:()=>b,url:()=>Qe,util:()=>l,uuid:()=>W,uuidv4:()=>qt,uuidv6:()=>Zn,uuidv7:()=>On,void:()=>ur,xid:()=>Un,xor:()=>un});g(re());var Nr=Mr;export{f as $brand,a as $input,u as $output,r as NEVER,_ as TimePrecision,Yn as ZodAny,En as ZodArray,Vn as ZodBase64,cn as ZodBase64URL,X as ZodBigInt,An as ZodBigIntFormat,Gn as ZodBoolean,Rt as ZodCIDRv4,vn as ZodCIDRv6,$n as ZodCUID,Ht as ZodCUID2,Yt as ZodCatch,Pn as ZodCodec,Sn as ZodCustom,rn as ZodCustomStringFormat,$t as ZodDate,Ot as ZodDefault,rr as ZodDiscriminatedUnion,hr as ZodE164,Ft as ZodEmail,dr as ZodEmoji,rt as ZodEnum,At as ZodError,le as ZodExactOptional,sr as ZodFile,Tr as ZodFirstPartyTypeKind,st as ZodFunction,he as ZodGUID,fe as ZodIPv4,Ge as ZodIPv6,_r as ZodISODate,Lt as ZodISODateTime,pr as ZodISODuration,at as ZodISOTime,hn as ZodIntersection,Cr as ZodIssueCode,K as ZodJWT,fn as ZodKSUID,ze as ZodLazy,He as ZodLiteral,Je as ZodMAC,ve as ZodMap,De as ZodNaN,Ie as ZodNanoID,et as ZodNever,yr as ZodNonOptional,oe as ZodNull,pt as ZodNullable,we as ZodNumber,ut as ZodNumberFormat,gt as ZodObject,xe as ZodOptional,Ne as ZodPipe,Rn as ZodPrefault,Ae as ZodPreprocess,St as ZodPromise,yt as ZodReadonly,ar as ZodRealError,Tt as ZodRecord,Ze as ZodSet,U as ZodString,Jt as ZodStringFormat,Qn as ZodSuccess,kn as ZodSymbol,Wn as ZodTemplateLiteral,dn as ZodTransform,Pt as ZodTuple,Nn as ZodType,Jn as ZodULID,Vt as ZodURL,xn as ZodUUID,nr as ZodUndefined,Gt as ZodUnion,Qt as ZodUnknown,Ln as ZodVoid,Tn as ZodXID,sn as ZodXor,nn as _ZodString,or as _default,Z as _function,Z as function,lt as any,_e as array,me as base64,qe as base64url,_n as bigint,J as boolean,jt as catch,mn as check,Ve as cidrv4,We as cidrv6,m as clone,Xe as codec,Er as coerce,g as config,F as core,be as cuid,ke as cuid2,Re as custom,nt as date,Nt as decode,Mn as decodeAsync,Nr as default,xr as describe,ce as discriminatedUnion,ht as e164,Ee as email,ft as emoji,qn as encode,Bt as encodeAsync,C as endsWith,vr as enum,vt as exactOptional,Ce as file,R as flattenError,Fe as float32,Bn as float64,V as formatError,jr as fromJSONSchema,wr as getErrorMap,k as globalRegistry,E as gt,T as gte,Me as guid,wt as hash,xt as hex,Dt as hostname,$e as httpUrl,z as includes,mr as instanceof,G as int,Kt as int32,Xn as int64,Dn as intersection,Hn as invertCodec,ln as ipv4,Mt as ipv6,Y as iso,jn as json,Kn as jwt,zt as keyof,yn as ksuid,er as lazy,n as length,Ut as literal,D as locales,Xt as looseObject,Fn as looseRecord,O as lowercase,ie as lt,ae as lte,Cn as mac,an as map,s as maxLength,ee as maxSize,en as meta,ne as mime,p as minLength,H as minSize,i as multipleOf,kt as nan,ir as nanoid,gr as nativeEnum,h as negative,It as never,c as nonnegative,fr as nonoptional,te as nonpositive,M as normalize,ot as null,it as nullable,ue as nullish,cr as number,ct as object,ge as optional,v as overwrite,bn as parse,tr as parseAsync,pe as partialRecord,Ke as pipe,y as positive,gn as prefault,q as preprocess,x as prettifyError,pn as promise,d as property,Be as readonly,Ue as record,Ye as refine,w as regex,N as regexes,t as registry,Wt as safeDecode,Zt as safeDecodeAsync,In as safeEncode,wn as safeEncodeAsync,on as safeParse,tn as safeParseAsync,Oe as set,Sr as setErrorMap,I as size,j as slugify,P as startsWith,Le as strictObject,tt as string,br as stringFormat,se as stringbool,mt as success,Te as superRefine,dt as symbol,_t as templateLiteral,o as toJSONSchema,A as toLowerCase,L as toUpperCase,Se as transform,B as treeifyError,S as trim,Pe as tuple,zn as uint32,je as uint64,Ct as ulid,de as undefined,bt as union,Et as unknown,b as uppercase,Qe as url,l as util,W as uuid,qt as uuidv4,Zn as uuidv6,On as uuidv7,ur as void,Un as xid,un as xor,Mr as z};
|
|
1
|
+
import{n as e}from"../_chunks/workflow/chunk-DSjMdhoD.js";import{An as t,At as n,Bi as r,Bt as i,Dn as a,F as o,Ft as s,Gt as c,Ii as l,It as ee,Kt as te,Lt as ne,Mn as re,Mt as ie,Nt as ae,On as u,Qt as d,Ri as f,Rt as p,Si as m,Ut as h,Vi as g,W as _,Xt as v,Zt as y,_n as b,bi as x,dn as S,dt as C,en as w,gt as T,ht as E,jn as D,jt as O,kn as k,ln as A,nn as j,qt as M,ri as N,rn as P,t as F,tn as I,un as L,vi as R,vt as z,xi as B,yi as V,zt as H}from"../_chunks/workflow/core-XWIi7wKc.js";import{$ as U,$n as W,$t as G,A as K,An as q,At as J,B as oe,Bn as se,Bt as ce,C as le,Cn as ue,Cr as Y,Ct as de,D as fe,Dn as pe,Dt as me,E as he,En as ge,Et as _e,F as ve,Fn as ye,Ft as be,G as xe,Gn as Se,Gt as Ce,H as we,Hn as Te,Ht as Ee,I as De,In as Oe,It as ke,J as Ae,Jn as je,Jt as Me,K as Ne,Kn as Pe,Kt as Fe,L as Ie,Ln as Le,Lt as Re,M as ze,Mn as Be,Mt as Ve,N as He,Nn as Ue,Nt as We,O as Ge,On as Ke,Ot as qe,P as Je,Pn as Ye,Pt as Xe,Q as Ze,Qn as Qe,Qt as $e,R as et,Rn as tt,Rt as nt,S as rt,Sn as it,Sr as at,St as ot,T as st,Tn as ct,Tt as lt,U as ut,Un as dt,Ut as ft,V as pt,Vn as mt,Vt as ht,W as gt,Wn as _t,Wt as vt,X as yt,Xn as bt,Xt as xt,Y as St,Yn as Ct,Yt as wt,Z as Tt,Zn as Et,Zt as Dt,_ as Ot,_n as kt,_r as At,_t as jt,a as X,an as Mt,ar as Nt,at as Pt,b as Ft,bn as It,br as Lt,bt as Z,c as Rt,cn as zt,cr as Bt,ct as Vt,d as Ht,dn as Ut,dr as Wt,dt as Gt,en as Kt,er as qt,et as Jt,f as Yt,fn as Xt,fr as Zt,ft as Qt,g as $t,gn as en,gr as tn,gt as nn,h as rn,hn as an,hr as on,ht as sn,i as cn,in as ln,ir as un,it as dn,j as fn,jn as pn,jt as mn,k as hn,kn as gn,kt as _n,l as vn,ln as yn,lr as bn,lt as xn,m as Sn,mn as Cn,mr as wn,mt as Tn,n as En,nn as Dn,nr as On,nt as kn,o as An,on as jn,or as Mn,ot as Nn,p as Pn,pn as Fn,pr as In,pt as Ln,q as Rn,qn as zn,qt as Bn,r as Vn,rn as Hn,rr as Un,rt as Wn,s as Gn,sn as Kn,sr as qn,st as Jn,t as Yn,tn as Xn,tr as Zn,tt as Qn,u as $n,un as er,ur as tr,ut as nr,v as rr,vn as ir,vr as ar,vt as or,w as sr,wn as cr,wr as lr,wt as ur,x as dr,xn as fr,xr as pr,xt as mr,y as hr,yn as gr,yr as _r,yt as vr,z as yr,zn as br,zt as xr}from"../_chunks/workflow/schemas-DmgDnhW3.js";import{i as Sr,n as Cr,r as wr,t as Tr}from"../_chunks/workflow/compat-DcEvieoj.js";import{t as Er}from"../_chunks/workflow/coerce-BhzIW-Hm.js";const Q={...ye,...lr,iso:Y},Dr=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`));function Or(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function kr(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function Ar(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return Q.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return Q.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=$(kr(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return Q.null();if(n.length===0)return Q.never();if(n.length===1)return Q.literal(n[0]);if(n.every(e=>typeof e==`string`))return Q.enum(n);let r=n.map(e=>Q.literal(e));return r.length<2?r[0]:Q.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return Q.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>Ar({...e,type:n},t));return r.length===0?Q.never():r.length===1?r[0]:Q.union(r)}if(!n)return Q.any();let r;switch(n){case`string`:{let t=Q.string();if(e.format){let n=e.format;n===`email`?t=t.check(Q.email()):n===`uri`||n===`uri-reference`?t=t.check(Q.url()):n===`uuid`||n===`guid`?t=t.check(Q.uuid()):n===`date-time`?t=t.check(Q.iso.datetime()):n===`date`?t=t.check(Q.iso.date()):n===`time`?t=t.check(Q.iso.time()):n===`duration`?t=t.check(Q.iso.duration()):n===`ipv4`?t=t.check(Q.ipv4()):n===`ipv6`?t=t.check(Q.ipv6()):n===`mac`?t=t.check(Q.mac()):n===`cidr`?t=t.check(Q.cidrv4()):n===`cidr-v6`?t=t.check(Q.cidrv6()):n===`base64`?t=t.check(Q.base64()):n===`base64url`?t=t.check(Q.base64url()):n===`e164`?t=t.check(Q.e164()):n===`jwt`?t=t.check(Q.jwt()):n===`emoji`?t=t.check(Q.emoji()):n===`nanoid`?t=t.check(Q.nanoid()):n===`cuid`?t=t.check(Q.cuid()):n===`cuid2`?t=t.check(Q.cuid2()):n===`ulid`?t=t.check(Q.ulid()):n===`xid`?t=t.check(Q.xid()):n===`ksuid`&&(t=t.check(Q.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?Q.number().int():Q.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=Q.boolean();break;case`null`:r=Q.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=$(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=$(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?$(e.additionalProperties,t):Q.any();if(Object.keys(n).length===0){r=Q.record(i,a);break}let o=Q.object(n).passthrough(),s=Q.looseRecord(i,a);r=Q.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=$(i[e],t),r=Q.string().regex(new RegExp(e));o.push(Q.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(Q.object(n).passthrough()),s.push(...o),s.length===0)r=Q.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=Q.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=Q.intersection(e,s[t]);r=e}break}let o=Q.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall($(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>$(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?$(i,t):void 0;r=o?Q.tuple(a).rest(o):Q.tuple(a),typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>$(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?$(e.additionalItems,t):void 0;r=a?Q.tuple(n).rest(a):Q.tuple(n),typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(i!==void 0){let n=$(i,t),a=Q.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=Q.array(Q.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function $(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n=Ar(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>$(e,t)),a=Q.union(i);n=r?Q.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>$(e,t)),a=Q.xor(i);n=r?Q.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Q.any();else{let i=r?n:$(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=Q.intersection(i,$(e.allOf[n],t));n=i}e.nullable===!0&&t.version===`openapi-3.0`&&(n=Q.nullable(n)),e.readOnly===!0&&(n=Q.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))Dr.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function jr(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Or(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??k};return $(n,r)}var Mr=e({$brand:()=>f,$input:()=>a,$output:()=>u,NEVER:()=>r,TimePrecision:()=>_,ZodAny:()=>Yn,ZodArray:()=>En,ZodBase64:()=>Vn,ZodBase64URL:()=>cn,ZodBigInt:()=>X,ZodBigIntFormat:()=>An,ZodBoolean:()=>Gn,ZodCIDRv4:()=>Rt,ZodCIDRv6:()=>vn,ZodCUID:()=>$n,ZodCUID2:()=>Ht,ZodCatch:()=>Yt,ZodCodec:()=>Pn,ZodCustom:()=>Sn,ZodCustomStringFormat:()=>rn,ZodDate:()=>$t,ZodDefault:()=>Ot,ZodDiscriminatedUnion:()=>rr,ZodE164:()=>hr,ZodEmail:()=>Ft,ZodEmoji:()=>dr,ZodEnum:()=>rt,ZodError:()=>At,ZodExactOptional:()=>le,ZodFile:()=>sr,ZodFirstPartyTypeKind:()=>Tr,ZodFunction:()=>st,ZodGUID:()=>he,ZodIPv4:()=>fe,ZodIPv6:()=>Ge,ZodISODate:()=>_r,ZodISODateTime:()=>Lt,ZodISODuration:()=>pr,ZodISOTime:()=>at,ZodIntersection:()=>hn,ZodIssueCode:()=>Cr,ZodJWT:()=>K,ZodKSUID:()=>fn,ZodLazy:()=>ze,ZodLiteral:()=>He,ZodMAC:()=>Je,ZodMap:()=>ve,ZodNaN:()=>De,ZodNanoID:()=>Ie,ZodNever:()=>et,ZodNonOptional:()=>yr,ZodNull:()=>oe,ZodNullable:()=>pt,ZodNumber:()=>we,ZodNumberFormat:()=>ut,ZodObject:()=>gt,ZodOptional:()=>xe,ZodPipe:()=>Ne,ZodPrefault:()=>Rn,ZodPreprocess:()=>Ae,ZodPromise:()=>St,ZodReadonly:()=>yt,ZodRealError:()=>ar,ZodRecord:()=>Tt,ZodSet:()=>Ze,ZodString:()=>U,ZodStringFormat:()=>Jt,ZodSuccess:()=>Qn,ZodSymbol:()=>kn,ZodTemplateLiteral:()=>Wn,ZodTransform:()=>dn,ZodTuple:()=>Pt,ZodType:()=>Nn,ZodULID:()=>Jn,ZodURL:()=>Vt,ZodUUID:()=>xn,ZodUndefined:()=>nr,ZodUnion:()=>Gt,ZodUnknown:()=>Qt,ZodVoid:()=>Ln,ZodXID:()=>Tn,ZodXor:()=>sn,_ZodString:()=>nn,_default:()=>or,_function:()=>Z,any:()=>lt,array:()=>_e,base64:()=>me,base64url:()=>qe,bigint:()=>_n,boolean:()=>J,catch:()=>jt,check:()=>mn,cidrv4:()=>Ve,cidrv6:()=>We,clone:()=>m,codec:()=>Xe,coerce:()=>Er,config:()=>g,core:()=>F,cuid:()=>be,cuid2:()=>ke,custom:()=>Re,date:()=>nt,decode:()=>Nt,decodeAsync:()=>Mn,describe:()=>xr,discriminatedUnion:()=>ce,e164:()=>ht,email:()=>Ee,emoji:()=>ft,encode:()=>qn,encodeAsync:()=>Bt,endsWith:()=>C,enum:()=>vr,exactOptional:()=>vt,file:()=>Ce,flattenError:()=>R,float32:()=>Fe,float64:()=>Bn,formatError:()=>V,fromJSONSchema:()=>jr,function:()=>Z,getErrorMap:()=>wr,globalRegistry:()=>k,gt:()=>E,gte:()=>T,guid:()=>Me,hash:()=>wt,hex:()=>xt,hostname:()=>Dt,httpUrl:()=>$e,includes:()=>z,instanceof:()=>mr,int:()=>G,int32:()=>Kt,int64:()=>Xn,intersection:()=>Dn,invertCodec:()=>Hn,ipv4:()=>ln,ipv6:()=>Mt,iso:()=>Y,json:()=>jn,jwt:()=>Kn,keyof:()=>zt,ksuid:()=>yn,lazy:()=>er,length:()=>n,literal:()=>Ut,locales:()=>D,looseObject:()=>Xt,looseRecord:()=>Fn,lowercase:()=>O,lt:()=>ie,lte:()=>ae,mac:()=>Cn,map:()=>an,maxLength:()=>s,maxSize:()=>ee,meta:()=>en,mime:()=>ne,minLength:()=>p,minSize:()=>H,multipleOf:()=>i,nan:()=>kt,nanoid:()=>ir,nativeEnum:()=>gr,negative:()=>h,never:()=>It,nonnegative:()=>c,nonoptional:()=>fr,nonpositive:()=>te,normalize:()=>M,null:()=>ot,nullable:()=>it,nullish:()=>ue,number:()=>cr,object:()=>ct,optional:()=>ge,overwrite:()=>v,parse:()=>bn,parseAsync:()=>tr,partialRecord:()=>pe,pipe:()=>Ke,positive:()=>y,prefault:()=>gn,preprocess:()=>q,prettifyError:()=>x,promise:()=>pn,property:()=>d,readonly:()=>Be,record:()=>Ue,refine:()=>Ye,regex:()=>w,regexes:()=>N,registry:()=>t,safeDecode:()=>Wt,safeDecodeAsync:()=>Zt,safeEncode:()=>In,safeEncodeAsync:()=>wn,safeParse:()=>on,safeParseAsync:()=>tn,set:()=>Oe,setErrorMap:()=>Sr,size:()=>I,slugify:()=>j,startsWith:()=>P,strictObject:()=>Le,string:()=>tt,stringFormat:()=>br,stringbool:()=>se,success:()=>mt,superRefine:()=>Te,symbol:()=>dt,templateLiteral:()=>_t,toJSONSchema:()=>o,toLowerCase:()=>A,toUpperCase:()=>L,transform:()=>Se,treeifyError:()=>B,trim:()=>S,tuple:()=>Pe,uint32:()=>zn,uint64:()=>je,ulid:()=>Ct,undefined:()=>de,union:()=>bt,unknown:()=>Et,uppercase:()=>b,url:()=>Qe,util:()=>l,uuid:()=>W,uuidv4:()=>qt,uuidv6:()=>Zn,uuidv7:()=>On,void:()=>ur,xid:()=>Un,xor:()=>un});g(re());var Nr=Mr;export{f as $brand,a as $input,u as $output,r as NEVER,_ as TimePrecision,Yn as ZodAny,En as ZodArray,Vn as ZodBase64,cn as ZodBase64URL,X as ZodBigInt,An as ZodBigIntFormat,Gn as ZodBoolean,Rt as ZodCIDRv4,vn as ZodCIDRv6,$n as ZodCUID,Ht as ZodCUID2,Yt as ZodCatch,Pn as ZodCodec,Sn as ZodCustom,rn as ZodCustomStringFormat,$t as ZodDate,Ot as ZodDefault,rr as ZodDiscriminatedUnion,hr as ZodE164,Ft as ZodEmail,dr as ZodEmoji,rt as ZodEnum,At as ZodError,le as ZodExactOptional,sr as ZodFile,Tr as ZodFirstPartyTypeKind,st as ZodFunction,he as ZodGUID,fe as ZodIPv4,Ge as ZodIPv6,_r as ZodISODate,Lt as ZodISODateTime,pr as ZodISODuration,at as ZodISOTime,hn as ZodIntersection,Cr as ZodIssueCode,K as ZodJWT,fn as ZodKSUID,ze as ZodLazy,He as ZodLiteral,Je as ZodMAC,ve as ZodMap,De as ZodNaN,Ie as ZodNanoID,et as ZodNever,yr as ZodNonOptional,oe as ZodNull,pt as ZodNullable,we as ZodNumber,ut as ZodNumberFormat,gt as ZodObject,xe as ZodOptional,Ne as ZodPipe,Rn as ZodPrefault,Ae as ZodPreprocess,St as ZodPromise,yt as ZodReadonly,ar as ZodRealError,Tt as ZodRecord,Ze as ZodSet,U as ZodString,Jt as ZodStringFormat,Qn as ZodSuccess,kn as ZodSymbol,Wn as ZodTemplateLiteral,dn as ZodTransform,Pt as ZodTuple,Nn as ZodType,Jn as ZodULID,Vt as ZodURL,xn as ZodUUID,nr as ZodUndefined,Gt as ZodUnion,Qt as ZodUnknown,Ln as ZodVoid,Tn as ZodXID,sn as ZodXor,nn as _ZodString,or as _default,Z as _function,Z as function,lt as any,_e as array,me as base64,qe as base64url,_n as bigint,J as boolean,jt as catch,mn as check,Ve as cidrv4,We as cidrv6,m as clone,Xe as codec,Er as coerce,g as config,F as core,be as cuid,ke as cuid2,Re as custom,nt as date,Nt as decode,Mn as decodeAsync,Nr as default,xr as describe,ce as discriminatedUnion,ht as e164,Ee as email,ft as emoji,qn as encode,Bt as encodeAsync,C as endsWith,vr as enum,vt as exactOptional,Ce as file,R as flattenError,Fe as float32,Bn as float64,V as formatError,jr as fromJSONSchema,wr as getErrorMap,k as globalRegistry,E as gt,T as gte,Me as guid,wt as hash,xt as hex,Dt as hostname,$e as httpUrl,z as includes,mr as instanceof,G as int,Kt as int32,Xn as int64,Dn as intersection,Hn as invertCodec,ln as ipv4,Mt as ipv6,Y as iso,jn as json,Kn as jwt,zt as keyof,yn as ksuid,er as lazy,n as length,Ut as literal,D as locales,Xt as looseObject,Fn as looseRecord,O as lowercase,ie as lt,ae as lte,Cn as mac,an as map,s as maxLength,ee as maxSize,en as meta,ne as mime,p as minLength,H as minSize,i as multipleOf,kt as nan,ir as nanoid,gr as nativeEnum,h as negative,It as never,c as nonnegative,fr as nonoptional,te as nonpositive,M as normalize,ot as null,it as nullable,ue as nullish,cr as number,ct as object,ge as optional,v as overwrite,bn as parse,tr as parseAsync,pe as partialRecord,Ke as pipe,y as positive,gn as prefault,q as preprocess,x as prettifyError,pn as promise,d as property,Be as readonly,Ue as record,Ye as refine,w as regex,N as regexes,t as registry,Wt as safeDecode,Zt as safeDecodeAsync,In as safeEncode,wn as safeEncodeAsync,on as safeParse,tn as safeParseAsync,Oe as set,Sr as setErrorMap,I as size,j as slugify,P as startsWith,Le as strictObject,tt as string,br as stringFormat,se as stringbool,mt as success,Te as superRefine,dt as symbol,_t as templateLiteral,o as toJSONSchema,A as toLowerCase,L as toUpperCase,Se as transform,B as treeifyError,S as trim,Pe as tuple,zn as uint32,je as uint64,Ct as ulid,de as undefined,bt as union,Et as unknown,b as uppercase,Qe as url,l as util,W as uuid,qt as uuidv4,Zn as uuidv6,On as uuidv7,ur as void,Un as xid,un as xor,Mr as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_i as e}from"../_chunks/workflow/core-DOVmxHH8.js";function t(e){return e instanceof Object&&`name`in e&&(e.name===`ZodError`||e.name===`$ZodError`)&&`issues`in e&&Array.isArray(e.issues)}var n=`ZodValidationError`,r=class extends Error{name;details;constructor(e,t){super(e,t),this.name=n,this.details=i(t)}toString(){return this.message}};function i(e){if(e){let n=e.cause;if(t(n))return n.issues}return[]}function a(e){return e instanceof r}function o(e){return e instanceof Error&&e.name===n}function s(e){return{type:e.code,path:e.path,message:e.message??`Invalid input`}}function c(e){return{type:e.code,path:e.path,message:`unexpected element in ${e.origin}`}}function l(e){return{type:e.code,path:e.path,message:`unexpected key in ${e.origin}`}}var u=new Set([`a`,`e`,`i`,`o`,`u`,`h`]);function d(e){let t=e.charAt(0).toLowerCase();return[u.has(t)?`an`:`a`,e].join(` `)}function f(e){return e.description??``}function p(e,t={}){switch(typeof e){case`symbol`:return f(e);case`bigint`:case`number`:switch(t.localization){case!0:return e.toLocaleString();case!1:return e.toString();default:return e.toLocaleString(t.localization)}case`string`:return t.wrapStringValueInQuote?`"${e}"`:e;default:if(e instanceof Date)switch(t.localization){case!0:return e.toLocaleString();case!1:return e.toISOString();default:return e.toLocaleString(t.localization)}return String(e)}}function m(e,t){let n=``;switch(e.format){case`lowercase`:case`uppercase`:n+=`expected ${e.format} string`;break;case`starts_with`:n+=`expected string to start with "${e.prefix}"`;break;case`ends_with`:n+=`expected string to end with "${e.suffix}"`;break;case`includes`:n+=`expected string to include "${e.includes}"`;break;case`regex`:n+=`expected string to match pattern`,t.displayInvalidFormatDetails&&(n+=` "${e.pattern}"`);break;case`jwt`:n+=`expected a jwt`,t.displayInvalidFormatDetails&&e.inst&&`alg`in e.inst._zod.def&&(n+=`/${e.inst._zod.def.alg}`),n+=` token`;break;case`email`:n+=`expected an email address`;break;case`url`:case`uuid`:case`guid`:case`cuid`:case`cuid2`:case`ulid`:case`xid`:case`ksuid`:n+=`expected a ${e.format.toUpperCase()}`,e.inst&&`version`in e.inst._zod.def&&(n+=` ${e.inst._zod.def.version}`);break;case`date`:case`datetime`:case`time`:case`duration`:n+=`expected an ISO ${e.format}`;break;case`ipv4`:case`ipv6`:n+=`expected an ${e.format.slice(0,2).toUpperCase()}${e.format.slice(2)} address`;break;case`cidrv4`:case`cidrv6`:n+=`expected a ${e.format.slice(0,4).toUpperCase()}${e.format.slice(4)} address range`;break;case`base64`:case`base64url`:n+=`expected a ${e.format} encoded string`;break;case`e164`:n+=`expected an E.164 formatted phone number`;break;default:if(e.format.startsWith(`sha`)||e.format.startsWith(`md5`)){let[t,r]=e.format.split(`_`);n+=`expected a ${t.toUpperCase()}`,r&&(n+=` ${r}-encoded`),n+=` hash`;break}n+=`expected ${d(e.format)}`}if(`input`in e&&t.reportInput===`typeAndValue`){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}return{type:e.code,path:e.path,message:n}}function h(e){if(e===null)return!0;switch(typeof e){case`string`:case`number`:case`bigint`:case`boolean`:case`symbol`:case`undefined`:return!0;default:return!1}}function g(e,t){let n=`expected ${e.expected}`;if(`input`in e&&t.reportInput!==!1){let r=e.input;if(n+=`, received ${_(r)}`,t.reportInput===`typeAndValue`){if(h(r)){let e=p(r,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=` (${e})`}else if(r instanceof Date){let e=p(r,{localization:t.dateLocalization});n+=` (${e})`}}}return{type:e.code,path:e.path,message:n}}function _(e){return typeof e==`object`?e===null?`null`:e===void 0?`undefined`:Array.isArray(e)?`array`:e instanceof Date?`date`:e instanceof RegExp?`regexp`:e instanceof Map?`map`:e instanceof Set?`set`:e instanceof Error?`error`:e instanceof Function?`function`:`object`:typeof e}function v(e){return{type:e.code,path:e.path,message:e.message??`Invalid input`}}function y(e,t){let n=(t.maxValuesToDisplay?e.slice(0,t.maxValuesToDisplay):e).map(e=>p(e,{wrapStringValueInQuote:t.wrapStringValuesInQuote}));return n.length<e.length&&n.push(`${e.length-n.length} more value(s)`),n.reduce((e,r,i)=>(i>0&&(i===n.length-1&&t.lastSeparator?e+=t.lastSeparator:e+=t.separator),e+=r,e),``)}function b(e,t){let n;if(n=e.expected===`stringbool`?`expected boolean as string`:e.values.length===0?`invalid value`:e.values.length===1?`expected value to be ${p(e.values[0],{wrapStringValueInQuote:!0})}`:`expected value to be one of ${y(e.values,{separator:t.allowedValuesSeparator,lastSeparator:t.allowedValuesLastSeparator,wrapStringValuesInQuote:t.wrapAllowedValuesInQuote,maxValuesToDisplay:t.maxAllowedValuesToDisplay})}`,`input`in e&&t.reportInput===`typeAndValue`){if(h(e.input)){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}else if(e.input instanceof Date){let r=p(e.input,{localization:t.dateLocalization});n+=`, received ${r}`}}return{type:e.code,path:e.path,message:n}}function x(e,t){let n=`expected multiple of ${e.divisor}`;if(`input`in e&&t.reportInput===`typeAndValue`){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}return{type:e.code,path:e.path,message:n}}function S(e,t){let n=e.origin===`date`?p(new Date(e.maximum),{localization:t.dateLocalization}):p(e.maximum,{localization:t.numberLocalization}),r=``;switch(e.origin){case`number`:case`int`:case`bigint`:r+=`expected number to be less than${e.inclusive?` or equal to`:``} ${n}`;break;case`string`:r+=`expected string to contain at most ${n} character(s)`;break;case`date`:r+=`expected date to be prior ${e.inclusive?`or equal to`:`to`} "${n}"`;break;case`array`:r+=`expected array to contain at most ${n} item(s)`;break;case`set`:r+=`expected set to contain at most ${n} item(s)`;break;case`file`:r+=`expected file to not exceed ${n} byte(s) in size`;break;default:r+=`expected value to be less than${e.inclusive?` or equal to`:``} ${n}`}if(`input`in e&&t.reportInput===`typeAndValue`){let n=e.input;if(h(n)){let e=p(n,{wrapStringValueInQuote:!0,localization:t.numberLocalization});r+=`, received ${e}`}else if(n instanceof Date){let e=p(n,{localization:t.dateLocalization});r+=`, received ${e}`}}return{type:e.code,path:e.path,message:r}}function C(e,t){let n=e.origin===`date`?p(new Date(e.minimum),{localization:t.dateLocalization}):p(e.minimum,{localization:t.numberLocalization}),r=``;switch(e.origin){case`number`:case`int`:case`bigint`:r+=`expected number to be greater than${e.inclusive?` or equal to`:``} ${n}`;break;case`date`:r+=`expected date to be ${e.inclusive?`later or equal to`:`later to`} "${n}"`;break;case`string`:r+=`expected string to contain at least ${n} character(s)`;break;case`array`:r+=`expected array to contain at least ${n} item(s)`;break;case`set`:r+=`expected set to contain at least ${n} item(s)`;break;case`file`:r+=`expected file to be at least ${n} byte(s) in size`;break;default:r+=`expected value to be greater than${e.inclusive?` or equal to`:``} ${n}`}if(`input`in e&&t.reportInput===`typeAndValue`){let n=e.input;if(h(n)){let e=p(n,{wrapStringValueInQuote:!0,localization:t.numberLocalization});r+=`, received ${e}`}else if(n instanceof Date){let e=p(n,{localization:t.dateLocalization});r+=`, received ${e}`}}return{type:e.code,path:e.path,message:r}}function w(e,t){let n=y(e.keys,{separator:t.unrecognizedKeysSeparator,lastSeparator:t.unrecognizedKeysLastSeparator,wrapStringValuesInQuote:t.wrapUnrecognizedKeysInQuote,maxValuesToDisplay:t.maxUnrecognizedKeysToDisplay});return{type:e.code,path:e.path,message:`unrecognized key(s) ${n} in object`}}var T={invalid_type:g,too_big:S,too_small:C,invalid_format:m,invalid_value:b,invalid_element:c,not_multiple_of:x,unrecognized_keys:w,invalid_key:l,custom:s,invalid_union:v},E={reportInput:`type`,displayInvalidFormatDetails:!1,allowedValuesSeparator:`, `,allowedValuesLastSeparator:` or `,wrapAllowedValuesInQuote:!0,maxAllowedValuesToDisplay:10,unrecognizedKeysSeparator:`, `,unrecognizedKeysLastSeparator:` and `,wrapUnrecognizedKeysInQuote:!0,maxUnrecognizedKeysToDisplay:5,dateLocalization:!0,numberLocalization:!0};function D(e={}){let t={...E,...e};return e=>{if(e.code===void 0)return`Not supported issue type`;let n=T[e.code];return n(e,t).message}}function O(e){return e.length!==0}var k=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function A(e){if(e.length===1){let t=e[0];return typeof t==`symbol`&&(t=f(t)),t.toString()||`""`}return e.reduce((e,t)=>typeof t==`number`?e+`[`+t.toString()+`]`:(typeof t==`symbol`&&(t=f(t)),t.includes(`"`)?e+`["`+j(t)+`"]`:k.test(t)?e+(e.length===0?``:`.`)+t:e+`["`+t+`"]`),``)}function j(e){return e.replace(/"/g,`\\"`)}function M(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}var N={prefix:`Validation error`,prefixSeparator:`: `,maxIssuesInMessage:99,unionSeparator:` or `,issueSeparator:`; `,includePath:!0,forceTitleCase:!0};function P(e={}){let t={...N,...e};return function(e){return I(e.slice(0,t.maxIssuesInMessage).map(e=>F(e,t)).join(t.issueSeparator),t)}}function F(e,t){if(e.code===`invalid_union`&&O(e.errors)){let n=e.errors.map(n=>n.map(n=>F({...n,path:e.path.concat(n.path)},t)).join(t.issueSeparator));return Array.from(new Set(n)).join(t.unionSeparator)}let n=[];t.forceTitleCase?n.push(M(e.message)):n.push(e.message);pathCondition:if(t.includePath&&e.path!==void 0&&O(e.path)){if(e.path.length===1){let t=e.path[0];if(typeof t==`number`){n.push(` at index ${t}`);break pathCondition}}n.push(` at "${A(e.path)}"`)}return n.join(``)}function I(e,t){return t.prefix==null?e.length>0?e:N.prefix:e.length>0?[t.prefix,e].join(t.prefixSeparator):t.prefix}function L(e,n={}){if(!t(e))throw TypeError(`Invalid zodError param; expected instance of ZodError. Did you mean to use the "${V.name}" method instead?`);return R(e,n)}function R(e,t={}){let n=e.issues,i;return i=O(n)?z(t)(n):e.message,new r(i,{cause:e})}function z(e){return`messageBuilder`in e?e.messageBuilder:P(e)}var B=(e={})=>n=>t(n)?R(n,e):n instanceof Error?new r(n.message,{cause:n}):new r(`Unknown error`);function V(e,t={}){return B(t)(e)}function H(t,n={}){return new r(U(n)([t]),{cause:new e([t])})}function U(e){return`messageBuilder`in e?e.messageBuilder:P(e)}export{r as ValidationError,D as createErrorMap,P as createMessageBuilder,V as fromError,L as fromZodError,H as fromZodIssue,a as isValidationError,o as isValidationErrorLike,t as isZodErrorLike,B as toValidationError};
|
|
1
|
+
import{_i as e}from"../_chunks/workflow/core-XWIi7wKc.js";function t(e){return e instanceof Object&&`name`in e&&(e.name===`ZodError`||e.name===`$ZodError`)&&`issues`in e&&Array.isArray(e.issues)}var n=`ZodValidationError`,r=class extends Error{name;details;constructor(e,t){super(e,t),this.name=n,this.details=i(t)}toString(){return this.message}};function i(e){if(e){let n=e.cause;if(t(n))return n.issues}return[]}function a(e){return e instanceof r}function o(e){return e instanceof Error&&e.name===n}function s(e){return{type:e.code,path:e.path,message:e.message??`Invalid input`}}function c(e){return{type:e.code,path:e.path,message:`unexpected element in ${e.origin}`}}function l(e){return{type:e.code,path:e.path,message:`unexpected key in ${e.origin}`}}var u=new Set([`a`,`e`,`i`,`o`,`u`,`h`]);function d(e){let t=e.charAt(0).toLowerCase();return[u.has(t)?`an`:`a`,e].join(` `)}function f(e){return e.description??``}function p(e,t={}){switch(typeof e){case`symbol`:return f(e);case`bigint`:case`number`:switch(t.localization){case!0:return e.toLocaleString();case!1:return e.toString();default:return e.toLocaleString(t.localization)}case`string`:return t.wrapStringValueInQuote?`"${e}"`:e;default:if(e instanceof Date)switch(t.localization){case!0:return e.toLocaleString();case!1:return e.toISOString();default:return e.toLocaleString(t.localization)}return String(e)}}function m(e,t){let n=``;switch(e.format){case`lowercase`:case`uppercase`:n+=`expected ${e.format} string`;break;case`starts_with`:n+=`expected string to start with "${e.prefix}"`;break;case`ends_with`:n+=`expected string to end with "${e.suffix}"`;break;case`includes`:n+=`expected string to include "${e.includes}"`;break;case`regex`:n+=`expected string to match pattern`,t.displayInvalidFormatDetails&&(n+=` "${e.pattern}"`);break;case`jwt`:n+=`expected a jwt`,t.displayInvalidFormatDetails&&e.inst&&`alg`in e.inst._zod.def&&(n+=`/${e.inst._zod.def.alg}`),n+=` token`;break;case`email`:n+=`expected an email address`;break;case`url`:case`uuid`:case`guid`:case`cuid`:case`cuid2`:case`ulid`:case`xid`:case`ksuid`:n+=`expected a ${e.format.toUpperCase()}`,e.inst&&`version`in e.inst._zod.def&&(n+=` ${e.inst._zod.def.version}`);break;case`date`:case`datetime`:case`time`:case`duration`:n+=`expected an ISO ${e.format}`;break;case`ipv4`:case`ipv6`:n+=`expected an ${e.format.slice(0,2).toUpperCase()}${e.format.slice(2)} address`;break;case`cidrv4`:case`cidrv6`:n+=`expected a ${e.format.slice(0,4).toUpperCase()}${e.format.slice(4)} address range`;break;case`base64`:case`base64url`:n+=`expected a ${e.format} encoded string`;break;case`e164`:n+=`expected an E.164 formatted phone number`;break;default:if(e.format.startsWith(`sha`)||e.format.startsWith(`md5`)){let[t,r]=e.format.split(`_`);n+=`expected a ${t.toUpperCase()}`,r&&(n+=` ${r}-encoded`),n+=` hash`;break}n+=`expected ${d(e.format)}`}if(`input`in e&&t.reportInput===`typeAndValue`){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}return{type:e.code,path:e.path,message:n}}function h(e){if(e===null)return!0;switch(typeof e){case`string`:case`number`:case`bigint`:case`boolean`:case`symbol`:case`undefined`:return!0;default:return!1}}function g(e,t){let n=`expected ${e.expected}`;if(`input`in e&&t.reportInput!==!1){let r=e.input;if(n+=`, received ${_(r)}`,t.reportInput===`typeAndValue`){if(h(r)){let e=p(r,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=` (${e})`}else if(r instanceof Date){let e=p(r,{localization:t.dateLocalization});n+=` (${e})`}}}return{type:e.code,path:e.path,message:n}}function _(e){return typeof e==`object`?e===null?`null`:e===void 0?`undefined`:Array.isArray(e)?`array`:e instanceof Date?`date`:e instanceof RegExp?`regexp`:e instanceof Map?`map`:e instanceof Set?`set`:e instanceof Error?`error`:e instanceof Function?`function`:`object`:typeof e}function v(e){return{type:e.code,path:e.path,message:e.message??`Invalid input`}}function y(e,t){let n=(t.maxValuesToDisplay?e.slice(0,t.maxValuesToDisplay):e).map(e=>p(e,{wrapStringValueInQuote:t.wrapStringValuesInQuote}));return n.length<e.length&&n.push(`${e.length-n.length} more value(s)`),n.reduce((e,r,i)=>(i>0&&(i===n.length-1&&t.lastSeparator?e+=t.lastSeparator:e+=t.separator),e+=r,e),``)}function b(e,t){let n;if(n=e.expected===`stringbool`?`expected boolean as string`:e.values.length===0?`invalid value`:e.values.length===1?`expected value to be ${p(e.values[0],{wrapStringValueInQuote:!0})}`:`expected value to be one of ${y(e.values,{separator:t.allowedValuesSeparator,lastSeparator:t.allowedValuesLastSeparator,wrapStringValuesInQuote:t.wrapAllowedValuesInQuote,maxValuesToDisplay:t.maxAllowedValuesToDisplay})}`,`input`in e&&t.reportInput===`typeAndValue`){if(h(e.input)){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}else if(e.input instanceof Date){let r=p(e.input,{localization:t.dateLocalization});n+=`, received ${r}`}}return{type:e.code,path:e.path,message:n}}function x(e,t){let n=`expected multiple of ${e.divisor}`;if(`input`in e&&t.reportInput===`typeAndValue`){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}return{type:e.code,path:e.path,message:n}}function S(e,t){let n=e.origin===`date`?p(new Date(e.maximum),{localization:t.dateLocalization}):p(e.maximum,{localization:t.numberLocalization}),r=``;switch(e.origin){case`number`:case`int`:case`bigint`:r+=`expected number to be less than${e.inclusive?` or equal to`:``} ${n}`;break;case`string`:r+=`expected string to contain at most ${n} character(s)`;break;case`date`:r+=`expected date to be prior ${e.inclusive?`or equal to`:`to`} "${n}"`;break;case`array`:r+=`expected array to contain at most ${n} item(s)`;break;case`set`:r+=`expected set to contain at most ${n} item(s)`;break;case`file`:r+=`expected file to not exceed ${n} byte(s) in size`;break;default:r+=`expected value to be less than${e.inclusive?` or equal to`:``} ${n}`}if(`input`in e&&t.reportInput===`typeAndValue`){let n=e.input;if(h(n)){let e=p(n,{wrapStringValueInQuote:!0,localization:t.numberLocalization});r+=`, received ${e}`}else if(n instanceof Date){let e=p(n,{localization:t.dateLocalization});r+=`, received ${e}`}}return{type:e.code,path:e.path,message:r}}function C(e,t){let n=e.origin===`date`?p(new Date(e.minimum),{localization:t.dateLocalization}):p(e.minimum,{localization:t.numberLocalization}),r=``;switch(e.origin){case`number`:case`int`:case`bigint`:r+=`expected number to be greater than${e.inclusive?` or equal to`:``} ${n}`;break;case`date`:r+=`expected date to be ${e.inclusive?`later or equal to`:`later to`} "${n}"`;break;case`string`:r+=`expected string to contain at least ${n} character(s)`;break;case`array`:r+=`expected array to contain at least ${n} item(s)`;break;case`set`:r+=`expected set to contain at least ${n} item(s)`;break;case`file`:r+=`expected file to be at least ${n} byte(s) in size`;break;default:r+=`expected value to be greater than${e.inclusive?` or equal to`:``} ${n}`}if(`input`in e&&t.reportInput===`typeAndValue`){let n=e.input;if(h(n)){let e=p(n,{wrapStringValueInQuote:!0,localization:t.numberLocalization});r+=`, received ${e}`}else if(n instanceof Date){let e=p(n,{localization:t.dateLocalization});r+=`, received ${e}`}}return{type:e.code,path:e.path,message:r}}function w(e,t){let n=y(e.keys,{separator:t.unrecognizedKeysSeparator,lastSeparator:t.unrecognizedKeysLastSeparator,wrapStringValuesInQuote:t.wrapUnrecognizedKeysInQuote,maxValuesToDisplay:t.maxUnrecognizedKeysToDisplay});return{type:e.code,path:e.path,message:`unrecognized key(s) ${n} in object`}}var T={invalid_type:g,too_big:S,too_small:C,invalid_format:m,invalid_value:b,invalid_element:c,not_multiple_of:x,unrecognized_keys:w,invalid_key:l,custom:s,invalid_union:v},E={reportInput:`type`,displayInvalidFormatDetails:!1,allowedValuesSeparator:`, `,allowedValuesLastSeparator:` or `,wrapAllowedValuesInQuote:!0,maxAllowedValuesToDisplay:10,unrecognizedKeysSeparator:`, `,unrecognizedKeysLastSeparator:` and `,wrapUnrecognizedKeysInQuote:!0,maxUnrecognizedKeysToDisplay:5,dateLocalization:!0,numberLocalization:!0};function D(e={}){let t={...E,...e};return e=>{if(e.code===void 0)return`Not supported issue type`;let n=T[e.code];return n(e,t).message}}function O(e){return e.length!==0}var k=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function A(e){if(e.length===1){let t=e[0];return typeof t==`symbol`&&(t=f(t)),t.toString()||`""`}return e.reduce((e,t)=>typeof t==`number`?e+`[`+t.toString()+`]`:(typeof t==`symbol`&&(t=f(t)),t.includes(`"`)?e+`["`+j(t)+`"]`:k.test(t)?e+(e.length===0?``:`.`)+t:e+`["`+t+`"]`),``)}function j(e){return e.replace(/"/g,`\\"`)}function M(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}var N={prefix:`Validation error`,prefixSeparator:`: `,maxIssuesInMessage:99,unionSeparator:` or `,issueSeparator:`; `,includePath:!0,forceTitleCase:!0};function P(e={}){let t={...N,...e};return function(e){return I(e.slice(0,t.maxIssuesInMessage).map(e=>F(e,t)).join(t.issueSeparator),t)}}function F(e,t){if(e.code===`invalid_union`&&O(e.errors)){let n=e.errors.map(n=>n.map(n=>F({...n,path:e.path.concat(n.path)},t)).join(t.issueSeparator));return Array.from(new Set(n)).join(t.unionSeparator)}let n=[];t.forceTitleCase?n.push(M(e.message)):n.push(e.message);pathCondition:if(t.includePath&&e.path!==void 0&&O(e.path)){if(e.path.length===1){let t=e.path[0];if(typeof t==`number`){n.push(` at index ${t}`);break pathCondition}}n.push(` at "${A(e.path)}"`)}return n.join(``)}function I(e,t){return t.prefix==null?e.length>0?e:N.prefix:e.length>0?[t.prefix,e].join(t.prefixSeparator):t.prefix}function L(e,n={}){if(!t(e))throw TypeError(`Invalid zodError param; expected instance of ZodError. Did you mean to use the "${V.name}" method instead?`);return R(e,n)}function R(e,t={}){let n=e.issues,i;return i=O(n)?z(t)(n):e.message,new r(i,{cause:e})}function z(e){return`messageBuilder`in e?e.messageBuilder:P(e)}var B=(e={})=>n=>t(n)?R(n,e):n instanceof Error?new r(n.message,{cause:n}):new r(`Unknown error`);function V(e,t={}){return B(t)(e)}function H(t,n={}){return new r(U(n)([t]),{cause:new e([t])})}function U(e){return`messageBuilder`in e?e.messageBuilder:P(e)}export{r as ValidationError,D as createErrorMap,P as createMessageBuilder,V as fromError,L as fromZodError,H as fromZodIssue,a as isValidationError,o as isValidationErrorLike,t as isZodErrorLike,B as toValidationError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../../chunks/paths-
|
|
1
|
+
import{n as e}from"../../chunks/paths-CebY5GCi.js";import{loadDevelopmentEnvironmentFiles as t}from"../../cli/dev/environment.js";import{a as n,n as r,t as i}from"../../chunks/client-DLHAGI2g.js";import{n as a}from"../../chunks/host-zBy9FyyX.js";import{discoverAndImportSuites as o,discoverSuiteFiles as s,importSuiteFile as c}from"../runner/discover.js";import{executeSuite as l}from"../runner/execute-suite.js";import{ConsoleReporter as u}from"../runner/reporters/console.js";var d=n();function f(e,t){e.command(`eval`).description(`Run eval suites against an Ash agent.`).option(`--suite <id...>`,`Suite IDs to run (repeatable)`).option(`--all`,`Run all discovered suites`).option(`--url <url>`,`Remote agent URL (skip local host startup)`).option(`--timeout <ms>`,`Per-case timeout in milliseconds`).option(`--max-concurrency <n>`,`Max concurrent case executions per suite`).option(`--json`,`Output results as JSON`).option(`--list-suites`,`List discovered suites and exit`).option(`--skip-report`,`Skip suite-defined reporters (e.g. Braintrust)`).action(async e=>{await p(e,t)})}async function p(n,r){let i=e();if(t(i),n.listSuites){await y(i,r);return}let s=n.suite,c=await o(i,s);if(c.length===0){s&&s.length>0?r.error(`No suites found matching: ${s.join(`, `)}`):r.error(`No eval suites found. Create suite files under evals/ with the *.eval.ts extension.`),process.exitCode=1;return}let u,d;n.url?d={kind:`remote`,url:n.url}:(u=await a(i,{host:`127.0.0.1`,port:0}),d={kind:`local`,url:u.url});let f=m(d);try{let e=[];for(let t of c){let r=_(t,n),a=v(r,{json:n.json===!0,skipReport:n.skipReport===!0}),o=await l({suite:r,target:d,reporters:a,appRoot:i,client:f});e.push(o)}n.json&&r.log(JSON.stringify(e,null,2)),e.some(e=>e.errored>0)&&(process.exitCode=1)}finally{u&&await u.close()}process.exit(process.exitCode??0)}function m(e){if(e.kind===`local`)return new i({host:e.url});let t={},n=process.env.VERCEL_AUTOMATION_BYPASS_SECRET?.trim();return n&&(t[r]=n),new i({auth:h(),headers:Object.keys(t).length>0?t:void 0,host:e.url})}function h(){let e=process.env.ASH_EVAL_AUTH_TOKEN?.trim();return e?{bearer:e}:{bearer:g}}async function g(){try{let e=(await(0,d.getVercelOidcToken)()).trim();if(e.length>0)return e}catch{}return process.env.VERCEL_OIDC_TOKEN?.trim()??``}function _(e,t){let n=t.maxConcurrency?Number.parseInt(t.maxConcurrency,10):void 0,r=t.timeout?Number.parseInt(t.timeout,10):void 0;if(n===void 0&&r===void 0)return e;let i={...e};return n!==void 0&&(i.maxConcurrency=n),r!==void 0&&(i.timeoutMs=r),i}function v(e,t){let n=t.json?[]:[new u];return!t.skipReport&&e.reporters&&n.push(...e.reporters),n}async function y(e,t){let n=await s(e);if(n.length===0){t.log(`No eval suites found.`);return}t.log(`Found ${n.length} eval suite file(s):\n`);for(let r of n){let n=await c(e,r);t.log(` ${n.id}${n.description?` - ${n.description}`:``}`)}}export{f as registerEvalCommand,p as runEvalCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"../../chunks/chunk-
|
|
1
|
+
import{i as e}from"../../chunks/chunk-DSjMdhoD.js";import{t}from"../../chunks/gray-matter-D-9jHwOT.js";import{isAbsolute as n,resolve as r}from"node:path";import{readFile as i}from"node:fs/promises";var a=e(t(),1);async function o(e){let t=await i(n(e)?e:r(process.cwd(),e),`utf-8`);return(0,a.default)(t.trimStart().startsWith(`---`)?t:`---\n${t}\n---`).data??{}}export{o as loadYaml};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../../chunks/authored-module-loader-
|
|
1
|
+
import{t as e}from"../../chunks/authored-module-loader-DcCfCiBm.js";import{join as t,relative as n}from"node:path";import{readdir as r}from"node:fs/promises";const i=`.eval.ts`;async function a(e){let r=t(e,`evals`),i=[];try{await u(r,i)}catch(e){if(d(e))return[];throw e}return i.sort((e,t)=>n(r,e).localeCompare(n(r,t))),i}function o(e,r){let a=n(t(e,`evals`),r).split(/[\\/]/u).join(`/`);return a.endsWith(i)?a.slice(0,-8):a}async function s(t,n){let r=(await e(n)).default;if(!l(r))throw Error(`Suite file "${n}" does not export a valid AshEvalSuite as its default export. Use defineEvalSuite() to create the suite.`);return{...r,id:o(t,n)}}async function c(e,t){let n=await a(e);if(n.length===0)return[];let r=[];for(let i of n){let n=await s(e,i);(t===void 0||t.length===0||t.includes(n.id))&&r.push(n)}return r}function l(e){return typeof e==`object`&&!!e&&`_tag`in e&&e._tag===`AshEvalSuite`}async function u(e,n){let a=await r(e,{withFileTypes:!0});for(let r of a){let a=t(e,r.name);r.isDirectory()?await u(a,n):r.isFile()&&r.name.endsWith(i)&&n.push(a)}}function d(e){return typeof e==`object`&&!!e&&`code`in e&&e.code===`ENOENT`}export{o as deriveSuiteId,c as discoverAndImportSuites,a as discoverSuiteFiles,s as importSuiteFile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../../chunks/errors-
|
|
1
|
+
import{t as e}from"../../chunks/errors-HYWjHxV6.js";import{resolveArtifactDirectory as t,writeArtifacts as n}from"./artifacts.js";import{executeCase as r}from"./execute-case.js";async function i(e){let{suite:r,target:i,reporters:o,appRoot:c,client:l}=e,u=new Date().toISOString();for(let e of o)await e.onSuiteStart(r,i);let d=await r.load(),f=r.maxConcurrency??8,p=[],m=[...d],h=new Set;for(;m.length>0||h.size>0;){for(;m.length>0&&h.size<f;){let e=m.shift();if(e===void 0)break;let t=(async()=>{let t=await a(r,e,l);p.push(t);for(let e of o)await e.onCaseComplete(t)})().finally(()=>{h.delete(t)});h.add(t)}h.size>0&&await Promise.race(h)}let g=new Date().toISOString(),_={suite:r.id,target:i,cases:p,startedAt:u,completedAt:g,passed:p.filter(e=>!e.error&&e.scores.every(e=>s(e,r.thresholds))).length,errored:p.filter(e=>e.error!==void 0).length};await n(t(c,r.id),_);for(let e of o)await e.onSuiteComplete(_);return _}async function a(t,n,i){let a,s;try{a=await r({client:i,testCase:n,task:t.task,timeoutMs:t.timeoutMs})}catch(t){s=e(t),a={output:null,finalMessage:null,status:`failed`,events:[],derived:{toolCalls:[],toolCallCount:0,subagentCalls:[],subagentCallCount:0,messageCount:0,reasoningBlockCount:0}}}let c=await o(t,n,a);return{case:n,result:a,scores:c,error:s}}async function o(e,t,n){let r={input:typeof t.input==`string`?t.input:JSON.stringify(t.input),output:String(n.output??``),expected:t.expected===void 0?void 0:String(t.expected),model:e.model,modelOptions:e.modelOptions,case:t,result:n},i=[];for(let t of e.scores){let e=await t(r);e!==null&&i.push(e)}return i}function s(e,t){if(e.score===null)return!0;let n=t?.[e.name]??1;return e.score>=n}export{i as executeSuite};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"../../../chunks/chunk-
|
|
1
|
+
import{i as e}from"../../../chunks/chunk-DSjMdhoD.js";import{t}from"../../../chunks/picocolors-aAkqW4On.js";var n=e(t(),1),r=class{#e;#t;#n;constructor(e){this.#e=e?.log??console.log,this.#t=n.default.createColors(e?.color??!!process.stdout.isTTY)}onSuiteStart(e,t){this.#n=e.thresholds,this.#e(``),this.#e(`${this.#t.bold(this.#t.cyan(`EVAL`))} ${this.#t.bold(e.id)}`),this.#e(`${this.#t.dim(`target`)} ${t.kind===`local`?this.#t.green(t.url):this.#t.blue(t.url)}`),this.#e(``)}onCaseComplete(e){let{case:t,scores:n,error:r}=e,i=n.every(e=>{if(e.score===null)return!0;let t=this.#n?.[e.name]??1;return e.score>=t}),a=r?this.#t.red(`✗`):i?this.#t.green(`✓`):this.#t.yellow(`○`),o=n.map(e=>this.#r(e.name,e.score)).join(` `),s=[a,this.#t.dim(t.id),o].filter(Boolean).join(` `);this.#e(s),r&&this.#e(` ${this.#t.red(r)}`)}onSuiteComplete(e){this.#e(``);let{passed:t,errored:n,cases:r}=e,o=r.length,s=[];t>0&&s.push(this.#t.green(`${t} passed`)),n>0&&s.push(this.#t.red(`${n} errored`));let c=o-t-n;c>0&&s.push(this.#t.yellow(`${c} scored`)),this.#e(`${this.#t.bold(`Results:`)} ${s.join(`, `)} ${this.#t.dim(`(${o} total)`)}`);let l=this.#i(r);if(l.length>0){this.#e(``);for(let{name:e,avg:t,count:n}of l){let r=this.#r(e,t);this.#e(` ${r} ${this.#t.dim(`(${n} cases)`)}`)}}let u=i(e.startedAt,e.completedAt);this.#e(``),this.#e(this.#t.dim(`Completed in ${a(u)}`)),this.#e(``)}#r(e,t){if(t===null)return this.#t.dim(`${e}: n/a`);let n=`${e}: ${Math.round(t*100)}%`;return t===1?this.#t.green(n):t===0?this.#t.red(n):this.#t.yellow(n)}#i(e){let t=new Map;for(let n of e)for(let e of n.scores){if(e.score===null)continue;let n=t.get(e.name);n?(n.sum+=e.score,n.count+=1):t.set(e.name,{sum:e.score,count:1})}return[...t.entries()].map(([e,{sum:t,count:n}])=>({name:e,avg:t/n,count:n}))}};function i(e,t){return new Date(t).getTime()-new Date(e).getTime()}function a(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.floor(e/6e4)}m ${(e%6e4/1e3).toFixed(0)}s`}export{r as ConsoleReporter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunks/jsdist-
|
|
1
|
+
import"../../chunks/jsdist-BkeWZ7EZ.js";import{generateText as e,jsonSchema as t}from"ai";function n(e){return{chat:{completions:{create:t=>r(t,e)}}}}async function r(t,n){let r=o(t.tools),a=await e({model:n.languageModel,messages:i(t.messages??[]),tools:Object.keys(r).length>0?r:void 0,toolChoice:s(t.tool_choice),providerOptions:n.providerOptions}),c=a.toolCalls.map(e=>({id:e.toolCallId,type:`function`,function:{name:e.toolName,arguments:JSON.stringify(e.input??{})}}));return{choices:[{index:0,finish_reason:c.length>0?`tool_calls`:`stop`,message:{role:`assistant`,content:a.text||null,tool_calls:c.length>0?c:void 0}}]}}function i(e){return e.map(e=>{let t=a(e.content);switch(e.role){case`assistant`:return{role:`assistant`,content:t};case`developer`:case`system`:return{role:`system`,content:t};default:return{role:`user`,content:t}}})}function a(e){return e==null?``:typeof e==`string`?e:e.map(e=>e.text??``).filter(Boolean).join(`
|
|
2
2
|
`)}function o(e){let n={};for(let r of e??[])r.type!==`function`||r.function?.name===void 0||(n[r.function.name]={description:r.function.description,inputSchema:t(r.function.parameters??{})});return n}function s(e){if(e!==void 0)return typeof e==`string`?e:{type:`tool`,toolName:e.function.name}}export{n as createAutoevalsClient};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../../chunks/chunk-
|
|
1
|
+
import{n as e}from"../../chunks/chunk-DSjMdhoD.js";import{t}from"../../chunks/runtime-model-Dh0Nz64z.js";import{a as n,i as r,n as i,t as a}from"../../chunks/jsdist-BkeWZ7EZ.js";import{createAutoevalsClient as o}from"./autoevals-client.js";import"ai";var s=e({closedQA:()=>d,factuality:()=>c,sql:()=>u,summary:()=>l});function c(e={}){return f(i,e)}function l(e={}){return f(n,e)}function u(e={}){return f(r,e)}function d(e){return async n=>{let r=e.model??n.model;return m(await a({input:n.input,output:n.output,criteria:e.criteria,model:t(r),client:o({languageModel:r,providerOptions:p(n,e.modelOptions)})}))}}function f(e,n){return async r=>{let i=n.model??r.model;return m(await e({input:r.input,output:r.output,expected:r.expected,model:t(i),client:o({languageModel:i,providerOptions:p(r,n.modelOptions)})}))}}function p(e,t){let n=e.modelOptions?.providerOptions,r=t?.providerOptions;if(!(n===void 0&&r===void 0))return{...n,...r}}function m(e){return{name:e.name,score:e.score,metadata:e.metadata}}export{d as closedQA,c as factuality,u as sql,l as summary,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../../chunks/chunk-
|
|
1
|
+
import{n as e}from"../../chunks/chunk-DSjMdhoD.js";var t=e({deepEqual:()=>n});function n(){return({case:e,result:t})=>e.expected===void 0?null:{name:`json.deepEqual`,score:+(r(t.output)===r(e.expected))}}function r(e){return JSON.stringify(e,(e,t)=>{if(typeof t==`object`&&t&&!Array.isArray(t)){let e={};for(let n of Object.keys(t).sort())e[n]=t[n];return e}return t})}export{n as deepEqual,t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../../chunks/chunk-
|
|
1
|
+
import{n as e}from"../../chunks/chunk-DSjMdhoD.js";var t=e({didNotFail:()=>n,maxToolCalls:()=>a,usedNoTools:()=>i,usedTool:()=>r});function n(){return({result:e})=>({name:`run.didNotFail`,score:e.status===`failed`?0:1})}function r(e){return({result:t})=>{let n=+!!t.derived.toolCalls.includes(e);return{name:`run.usedTool(${e})`,score:n,metadata:{expectedTool:e,actualToolCalls:t.derived.toolCalls}}}}function i(){return({result:e})=>({name:`run.usedNoTools`,score:+(e.derived.toolCallCount===0),metadata:{toolCallCount:e.derived.toolCallCount}})}function a(e){return({result:t})=>{let n=+(t.derived.toolCallCount<=e);return{name:`run.maxToolCalls(${e})`,score:n,metadata:{maxAllowed:e,actualToolCallCount:t.derived.toolCallCount}}}}export{n as didNotFail,a as maxToolCalls,t,i as usedNoTools,r as usedTool};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../../chunks/chunk-
|
|
1
|
+
import{n as e}from"../../chunks/chunk-DSjMdhoD.js";var t=e({exactNormalized:()=>n});function n(){return({output:e,expected:t})=>{if(t===void 0)return null;let n=r(e),i=r(t);return{name:`sql.exactNormalized`,score:+(n===i),metadata:{normalizedOutput:n,normalizedExpected:i}}}}function r(e){return e.toLowerCase().replace(/\s+/g,` `).trim().replace(/;+$/,``)}export{n as exactNormalized,t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../../chunks/chunk-
|
|
1
|
+
import{n as e}from"../../chunks/chunk-DSjMdhoD.js";import{r as t}from"../../chunks/jsdist-BkeWZ7EZ.js";var n=e({exact:()=>r,includes:()=>i,levenshtein:()=>a});function r(){return({output:e,expected:t})=>t===void 0?null:{name:`text.exact`,score:+(e===t)}}function i(){return({output:e,expected:t})=>t===void 0?null:{name:`text.includes`,score:+!!e.includes(t)}}function a(){return async({output:e,expected:n})=>n===void 0?null:{name:`text.levenshtein`,score:(await t({output:e,expected:n})).score}}export{r as exact,i as includes,a as levenshtein,n as t};
|
|
@@ -6,7 +6,7 @@ import { ASH_PACKAGE_NAME } from "#package-name.js";
|
|
|
6
6
|
let cachedPackageInfo;
|
|
7
7
|
// The package build stamps the published version into `dist` so bundled
|
|
8
8
|
// deployments can still report package metadata without resolving package.json.
|
|
9
|
-
const BUNDLED_FALLBACK_PACKAGE_VERSION = "0.24.
|
|
9
|
+
const BUNDLED_FALLBACK_PACKAGE_VERSION = "0.24.2";
|
|
10
10
|
const BUNDLED_FALLBACK_PACKAGE_VERSION_PLACEHOLDER = "__ASH_PACKAGE_VERSION_PLACEHOLDER__";
|
|
11
11
|
const WORKFLOW_MODULE_ALIASES = {
|
|
12
12
|
"workflow/api": "src/compiled/@workflow/core/runtime.js",
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { dirname, extname, isAbsolute, resolve } from "node:path";
|
|
3
|
+
const AUTHORED_ASSET_CODE_EXTENSIONS = [
|
|
4
|
+
".ts",
|
|
5
|
+
".tsx",
|
|
6
|
+
".mts",
|
|
7
|
+
".cts",
|
|
8
|
+
".js",
|
|
9
|
+
".jsx",
|
|
10
|
+
".mjs",
|
|
11
|
+
".cjs",
|
|
12
|
+
".json",
|
|
13
|
+
];
|
|
14
|
+
/**
|
|
15
|
+
* Creates the Rollup-compatible plugin that gives authored modules a small
|
|
16
|
+
* asset-module surface for non-code relative imports.
|
|
17
|
+
*/
|
|
18
|
+
export function createAuthoredAssetImportPlugin() {
|
|
19
|
+
return {
|
|
20
|
+
name: "ash-authored-asset-import",
|
|
21
|
+
resolveId(source, importer) {
|
|
22
|
+
if (!isPotentialAuthoredAssetImport(source) || importer === undefined) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
const { path, suffix } = splitImportSuffix(source);
|
|
26
|
+
const resolvedPath = isAbsolute(path) ? path : resolve(dirname(importer), path);
|
|
27
|
+
return `${resolvedPath}${suffix}`;
|
|
28
|
+
},
|
|
29
|
+
async load(id) {
|
|
30
|
+
const { path, suffix } = splitImportSuffix(id);
|
|
31
|
+
if (!isPotentialAuthoredAssetImport(path)) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
if (suffix === "?raw") {
|
|
35
|
+
const source = await readAssetText(path);
|
|
36
|
+
if (source === undefined) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
code: `export default ${JSON.stringify(source)};`,
|
|
41
|
+
moduleType: "js",
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const dataUrl = await readAssetDataUrl(path);
|
|
45
|
+
if (dataUrl === undefined) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
code: `export default ${JSON.stringify(dataUrl)};`,
|
|
50
|
+
moduleType: "js",
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
async function readAssetText(path) {
|
|
56
|
+
try {
|
|
57
|
+
return await readFile(path, "utf8");
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
if (isPathNotFoundError(error)) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function isPotentialAuthoredAssetImport(source) {
|
|
67
|
+
if (source.startsWith("\0") ||
|
|
68
|
+
source.startsWith("node:") ||
|
|
69
|
+
source.startsWith("data:") ||
|
|
70
|
+
source.startsWith("file:")) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
const { path } = splitImportSuffix(source);
|
|
74
|
+
if (!path.startsWith(".") && !path.startsWith("/") && !/^[A-Za-z]:[\\/]/.test(path)) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
const extension = extname(path);
|
|
78
|
+
return (extension.length > 0 &&
|
|
79
|
+
extension !== ".node" &&
|
|
80
|
+
!AUTHORED_ASSET_CODE_EXTENSIONS.includes(extension));
|
|
81
|
+
}
|
|
82
|
+
function splitImportSuffix(specifier) {
|
|
83
|
+
const queryIndex = specifier.indexOf("?");
|
|
84
|
+
const hashIndex = specifier.indexOf("#");
|
|
85
|
+
const suffixIndex = queryIndex === -1 ? hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex);
|
|
86
|
+
if (suffixIndex === -1) {
|
|
87
|
+
return {
|
|
88
|
+
path: specifier,
|
|
89
|
+
suffix: "",
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
path: specifier.slice(0, suffixIndex),
|
|
94
|
+
suffix: specifier.slice(suffixIndex),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
async function readAssetDataUrl(path) {
|
|
98
|
+
try {
|
|
99
|
+
const bytes = await readFile(path);
|
|
100
|
+
return `data:${getAssetMimeType(path)};base64,${bytes.toString("base64")}`;
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
if (isPathNotFoundError(error)) {
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function isPathNotFoundError(error) {
|
|
110
|
+
return (typeof error === "object" &&
|
|
111
|
+
error !== null &&
|
|
112
|
+
"code" in error &&
|
|
113
|
+
(error.code === "ENOENT" || error.code === "ENOTDIR"));
|
|
114
|
+
}
|
|
115
|
+
function getAssetMimeType(path) {
|
|
116
|
+
switch (extname(path).toLowerCase()) {
|
|
117
|
+
case ".css":
|
|
118
|
+
return "text/css";
|
|
119
|
+
case ".csv":
|
|
120
|
+
return "text/csv";
|
|
121
|
+
case ".gif":
|
|
122
|
+
return "image/gif";
|
|
123
|
+
case ".html":
|
|
124
|
+
return "text/html";
|
|
125
|
+
case ".jpg":
|
|
126
|
+
case ".jpeg":
|
|
127
|
+
return "image/jpeg";
|
|
128
|
+
case ".png":
|
|
129
|
+
return "image/png";
|
|
130
|
+
case ".svg":
|
|
131
|
+
return "image/svg+xml";
|
|
132
|
+
case ".txt":
|
|
133
|
+
return "text/plain";
|
|
134
|
+
case ".wasm":
|
|
135
|
+
return "application/wasm";
|
|
136
|
+
case ".webp":
|
|
137
|
+
return "image/webp";
|
|
138
|
+
default:
|
|
139
|
+
return "application/octet-stream";
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds actionable context to lower-level authored module bundling failures.
|
|
3
|
+
*/
|
|
4
|
+
export function createAuthoredModuleBundleError(modulePath, error) {
|
|
5
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
6
|
+
const hints = [];
|
|
7
|
+
if (/\.node(?:\b|["'?])/i.test(message) ||
|
|
8
|
+
/native addon|native module|invalid utf-?8|Could not load .*\.node/i.test(message)) {
|
|
9
|
+
hints.push("If this comes from a native Node package, keep that package external with agent build.externalDependencies so Vercel/Nitro traces it instead of bundling it.");
|
|
10
|
+
}
|
|
11
|
+
if (/Unexpected character|No loader is configured|Could not load|Unknown file extension/i.test(message)) {
|
|
12
|
+
hints.push("If this comes from an asset import, Ash only supports assets that Rolldown can emit for a Node ESM bundle; otherwise load the file through fs/import.meta.url or externalize the package.");
|
|
13
|
+
}
|
|
14
|
+
return new Error([
|
|
15
|
+
`Failed to bundle authored module "${modulePath}".`,
|
|
16
|
+
message,
|
|
17
|
+
...hints.map((hint) => `Hint: ${hint}`),
|
|
18
|
+
].join("\n"));
|
|
19
|
+
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers a loaded channel module in the global cache so Rolldown-
|
|
3
|
+
* bundled schedule modules that import the same channel get the exact
|
|
4
|
+
* same route object instance.
|
|
5
|
+
*/
|
|
6
|
+
export declare function registerChannelModuleInCache(absolutePath: string, moduleDefault: unknown): void;
|
|
1
7
|
/**
|
|
2
8
|
* Loads one authored module namespace from disk during compile-time
|
|
3
9
|
* discovery. Concurrent loads of the same `modulePath` share a single
|