@aventurevc/mcp-server 0.8.237 → 0.8.239

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.
@@ -1,5 +1,5 @@
1
- import{C as e,E as t,S as n,_ as r,c as i,d as a,g as o,i as s,n as c,s as l,x as u}from"./iso-l1vOidnb.js";import{A as d,C as f,D as p,E as m,O as h,S as ee,T as te,_ as ne,a as re,b as g,c as ie,d as ae,f as oe,g as se,h as ce,i as le,k as ue,l as de,m as fe,n as pe,o as me,p as he,r as _,s as ge,t as v,u as _e,v as ve,w as ye,x as be,y}from"./detail-Nzc6IsFj.js";import{t as xe}from"./person-owner-BRGa5Dee.js";import{t as b}from"./entity-Cg2n2mP0.js";import{t as x}from"./type-C0VR7LD-.js";import{f as Se}from"./result-envelope-DXFbrrkt.js";import{i as Ce,l as we}from"./tool-policy-C37kGt8n.js";import{a as S,c as Te,i as Ee,l as De,n as C,r as w,s as T,t as E}from"./text-field-jFKOGMzr.js";import{a as Oe,n as D,o as ke,r as Ae,s as O,t as je}from"./human-text-cap-BcNmIPQA.js";import{a as Me,d as k,f as Ne,m as A,o as Pe,p as Fe,u as Ie,x as Le}from"./help-catalog-TLFLfBit.js";import{Buffer as Re}from"node:buffer";var j=`aventure`;function M(e,t,n=`cli`){let r=t.find(t=>t.operationId===e);if(n===`mcp`&&r!==void 0){let e=Pe(r);return`${e.tool} ${JSON.stringify(e.arguments)}`}let i=r?.cliPath;return i===void 0?void 0:`${j} ${i.join(` `)}`}function ze(e,t,n=e,r=`cli`){return r===`mcp`?M(e,t,r)??e:Le(e,t,`aventure`)??n}function Be(e,t,n=`cli`){let r=Ie.safeParse(e);if(!r.success)return null;let{answer:i,citation:a,confidence:o,resolution:s}=r.data;if(s!=null)return Ve(i,s,t,n);let c=i.trimEnd().split(`
2
- `),l=new Set(a.flatMap(({sourceType:e,sourceId:r})=>{if(e!==Fe.options[0].enum.OPERATION)return[];let i=M(r,t,n);return i===void 0?[]:[i]}));return l.size>0&&c.push(``,n===`mcp`?`MCP calls:`:`Commands:`,...[...l].map(e=>` ${e}`)),c.push(``,`Confidence: ${o}`),a.length===0||(c.push(`Sources (${a.length}):`),c.push(...a.map(({excerpt:e,sourceId:t})=>{let n=e.trim();return n.length>0?` - ${t}: ${n}`:` - ${t}`}))),c}function Ve(e,t,n,r){let{outcome:i,operationId:a,probability:o,candidate:s,taskKey:c,taskPlan:l}=t,u=[l==null?e.trimEnd():Ue(l)],d=[``,`Outcome: ${i}${o==null?``:` (probability ${o.toFixed(2)})`}`];switch(i){case k.enum.TASK_PLAN:return[...u,...l==null?[]:We(l,n,r),...d];case k.enum.OPERATION_ADVICE:{let e=s.filter(({sourceId:e})=>e!==a);return[...u,...a==null?[]:[``,r===`mcp`?`MCP call:`:`Command:`,` ${ze(a,n,a,r)}`],...d,...e.length===0?[]:[`Alternatives: ${e.map(({sourceId:e})=>e).join(`, `)}`]]}case k.enum.CLARIFY:return[...u,...c==null?[]:[``,`Leading catalog task: ${c}`],...Ke(`Candidates:`,s,n,r),...d];case k.enum.ABSTAIN:return[...u,...Ke(`Nearest operations:`,s,n,r),...d];default:throw Error(`Unhandled help resolution outcome ${String(i)}`)}}function He(e,t,n=`cli`){let r=Ne.safeParse(e);return r.success?[Ue(r.data),...We(r.data,t,n)]:null}var Ue=({taskKey:e,catalogRevision:t})=>e===void 0?`Run these steps in order.`:`Run catalog task ${e}${t===void 0?``:` (catalog revision ${t})`}.`;function We(e,t,n){return e.step.length===0?[``,`This catalog task has no planned steps yet.`]:[...e.input.length===0?[]:[``,`Inputs:`,...e.input.map(({key:e,type:t,description:n,required:r})=>` ${e} (${t}, ${r===!1?`optional`:`required`}): ${n}`)],``,`Steps:`,...e.step.flatMap(({step:r,cliCommand:i,writeGuidance:a},o)=>[` ${o+1}. ${r.stepKey===void 0?``:`${r.stepKey}: `}${ze(r.operationId,t,i,n)}`,` ${r.instruction}`,...Ge(e,o,a)]),...e.gateId?.length?[``,`Completion gates: ${e.gateId.join(`, `)}`]:[]]}function Ge(e,t,n){if(n==null)return[];let r=JSON.stringify(n),i=e.step.findIndex(({writeGuidance:e})=>JSON.stringify(e)===r);return i===t?[` Write guidance:`,` - Expectation: ${n.expectation}`,` - Body: ${n.body}`,` - Read first: ${n.typeCatalog}`,` - Rejected when:`,...n.reject.map(e=>` - ${e}`),` - Override: ${n.override}`,` - Method: ${n.method.join(`; `)}`]:[` Write guidance: as step ${i+1}.`]}function Ke(e,t,n,r){if(t.length===0)return[];let i=t.map(({sourceId:e,excerpt:t})=>({command:M(e,n,r)??e,excerpt:t})),a=Math.max(...i.map(({command:e})=>e.length));return[``,e,...i.map(({command:e,excerpt:t})=>` ${e.padEnd(a)} # ${t}`)]}var N=/\{([^}]+)\}/gu;function qe(e,t,n=`cli`){let r=t.filter(e=>e.method===`GET`&&(n===`cli`||e.binaryResponse!==!0)),i=t=>e.endpoint!==void 0&&t.endsWith(e.endpoint),a=t.find(t=>t.operationId===e.operationId),o=e.ok&&a!==void 0&&Ce(a.intent),s=[...o&&e.endpoint!==void 0?Ze(e.endpoint.split(`?`)[0]??``,r,!1,n).map(e=>n===`mcp`?e:`${e} --data --to-file <path>`):[],...e.references.filter(e=>!i(e)).flatMap(Xe).flatMap(e=>Ze(e.pathname,r,!0,n)),...e.references.filter(i).flatMap(Xe).flatMap(e=>Qe(e,r,n))],c=n===`mcp`?Je:void 0;return s.length===0?{write:o,narrowerRead:c}:{exactRecovery:`Read the full result ${s.join(`; `)}.`,write:o,narrowerRead:c}}var Je=`Refetch a narrower result: call aventure_help with q set to the read intent, then call aventure_read with its operationId and declared query or pathParams, using ids/references, filters, or smaller query.page/query.size windows.`;function Ye(e,t){let n=t.find(t=>t.operationId===e.operationId);if(!e.ok||n?.method!==`GET`||n.mutates===!0||Ce(n.intent)||e.endpoint===void 0)return;let r=new URL(e.endpoint,`https://localhost`),i=[...n.path.matchAll(N)].map(([,e])=>e),a=RegExp(`^${n.path.replace(N,`([^/]+)`)}$`,`u`).exec(r.pathname);if(a===null)return;let o=n.parameters.find(e=>e.location===`query`&&e.name===`compact`&&e.schemaType===`boolean`);o!==void 0&&r.searchParams.set(o.name,`true`);let s=[];for(let e of n.parameters){let t=e.location===`path`?[decodeURIComponent(a[i.indexOf(e.name)+1]??``)]:e.location===`query`?r.searchParams.getAll(e.name):[];if(e.required&&t.length===0)return;t.length>0&&s.push(F(e),...t.map(tt))}return`Run: \`${P(n,[...s,`--data`,`--to-file`,`./aventure-output.json`])}\`. On success, the spill file contains the bare payload (top-level keys as returned), not the result envelope or a data.response wrapper.`}function Xe(e){return URL.canParse(e)?[new URL(e)]:[]}function Ze(e,t,n,r){return t.flatMap(t=>{let i=[...t.path.matchAll(N)].map(([,e])=>e),a=RegExp(`^${t.path.replace(N,`([^/]+)`)}$`,`u`),o=n&&i.length===0?null:a.exec(e);if(o===null)return[];if(r===`mcp`)return[$e(t,{pathParams:Object.fromEntries(i.map((e,t)=>[e??``,decodeURIComponent(o[t+1]??``)]))})];let s=i.flatMap((e,n)=>{let r=t.parameters.find(t=>t.name===e);return r===void 0?[]:[F(r),o[n+1]??``]});return[`${et(t)}, ${P(t,s)}`]})}function Qe(e,t,n){let r=t.find(t=>t.path===e.pathname);return r===void 0?[]:t.flatMap(t=>{if(!t.path.startsWith(`${r.path}/`))return[];let i=t.parameters.find(({name:e})=>e.endsWith(`Offset`)),a=t.parameters.find(({name:e})=>e.endsWith(`Limit`));if(i===void 0||a===void 0)return[];if(n===`mcp`)return[`in windows: ${$e(t,{query:{...Object.fromEntries([...e.searchParams].filter(([e])=>t.parameters.some(t=>t.location===`query`&&t.name===e))),[i.name]:`<offset>`,[a.name]:`<limit>`}})}, advancing query.${i.name} until a window returns fewer than query.${a.name} units`];let o=t.parameters.flatMap(t=>{let n=e.searchParams.get(t.name);return t.location!==`query`||n===null?[]:[F(t),tt(n)]}),s=[F(i),`<n>`,F(a),`<n>`];return[`${et(t)}, in windows: ${P(t,[...o,...s])}, advancing ${F(i)} until a window returns fewer than ${F(a)} units`]})}function $e(e,t){return`${we(e.intent)} ${JSON.stringify({operationId:e.operationId,...t})}`}function et(e){return e.auth===`write`?`with admin sign-in`:`with any sign-in`}function P(e,t){return[j,...e.cliPath,...t].join(` `)}function F(e){return e.flag.split(/\s+/u)[0]??e.flag}function tt(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}var nt=r({detail:n(),field:n().nullish(),scope:s([`entity`,`person`,`news`])}),rt=s([`auto`,`exact`,`keyword`,`semantic`,`natural`,`hybrid`]),it=Object.assign(e([rt,n()]),{enum:rt.enum}),I=r({modeRequested:it,modeUsed:it}),at=r({answerUnavailable:i(),entity:I,news:I,person:I,rejection:l(nt),unavailable:l(s([`entity`,`person`,`news`]))}),ot=r({acceleratorParticipation:l(se),detail:l(ce)}),L=r({core:b,enrichment:te,fundraiseRound:l(y),provider:ve.nullish(),research:ot,semanticMatch:me.nullish()}),st=s([`curated`,`semantic`,`precomputed`,`derived`,`computed`]),ct=r({compositeScore:o().nullish(),cosineScore:o().nullish(),curatedAsOf:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),curatedRelationshipType:n().nullish(),curatedSource:n().nullish(),derivedFromEntityId:t().nullish(),matchedSectionWeight:o().nullish(),origin:st,rank:a(),sharedSectionCount:a().nullish()}),lt=r({entity:L,similarity:ct}),ut=r({fundraiseInvestorJoin:i(),fundraiseTransaction:i(),operatingStatus:i(),relationship:i()}),dt=s([`Acquisition`,`Acquired`,`Acquired Subsidiary`]),ft=s([`Announced`,`Announced; subject to approvals and closing conditions`,`Active`,`Closed`,`Completed`,`In Progress`,`Open`]),pt=r({acquiredEntity:b,acquirerEntity:b,amount:o().int().nullish(),announcedAt:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),asOf:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),completedAt:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),createdAt:c({offset:!0}).nullish(),currency:n().nullish(),dataConfidence:ee.nullish(),evidence:ut,fundraiseTransactionId:t().nullish(),investorJoinId:t().nullish(),isCurrent:i().nullish(),publicSource:f.nullish(),relationshipId:a(),status:dt,transactionStatus:ft.nullish(),updatedAt:c({offset:!0}).nullish()}),mt=r({entity:v,investorAttribution:l(g),round:l(be),roundCount:a()}),ht=r({core:b,fundingDetail:h.nullish(),similarity:ct,urlLink:l(m)}),gt=r({compliance:fe.nullish(),createdAt:c({offset:!0}).nullish(),id:a(),isCurrent:i().nullish(),isPrimary:i().nullish(),language:n().nullish(),owner:xe,text:n(),textName:n().nullish(),textType:n(),updatedAt:c({offset:!0}).nullish()}),_t=s([`stored`,`derivedFromPreAndRaised`,`derivedFromPostMinusRaised`,`reportedAssumedPost`]),vt=s([`fundraiseRound`,`researchDetail`]),yt=s([`preMoney`,`postMoney`,`reported`]),bt=r({amountRaised:o().int().nullish(),asOfDate:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/),confidence:de,currency:n(),declaredBasis:yt,derivation:_t,detailId:a().nullish(),label:n().nullish(),source:vt,sourceRef:n(),valuationPostMoney:o().int().nullish(),valuationPreMoney:o().int().nullish()}),xt=r({createdAt:c({offset:!0}).nullish(),description:n().nullish(),forkCount:a(),githubId:o().int(),homepageUrl:n().nullish(),id:o().int(),isArchived:i(),isFork:i(),language:n().nullish(),license:n().nullish(),name:n(),ownerLogin:n(),repoCreatedAt:c({offset:!0}).nullish(),repoPushedAt:c({offset:!0}).nullish(),stargazerCount:a(),topic:l(n()),updatedAt:c({offset:!0}).nullish(),url:n()}),R=r({empty:i().optional(),sorted:i().optional(),unsorted:i().optional()}),z=r({offset:o().int().optional(),paged:i().optional(),pageNumber:a().optional(),pageSize:a().optional(),sort:R.optional(),unpaged:i().optional()}),St=r({investorAttribution:l(g),person:_,round:l(be),roundCount:a()}),Ct=s([`by`,`about`]),wt=s([`newsArticle`,`blogPost`,`externalSocialPost`,`repositoryOwner`,`repository`,`webSite`,`webPage`,`researchPaper`]),Tt=r({canonicalUrl:n().nullish(),contentId:n(),contentType:wt,createdAt:c({offset:!0}).nullish(),publishedAt:c({offset:!0}).nullish(),relation:Ct.nullish(),sourceDomain:n().nullish(),sourceName:n().nullish(),summary:n().nullish(),title:n(),topic:n().nullish(),updatedAt:c({offset:!0}).nullish(),url:n().nullish(),year:a().nullish()});r({content:l(ae).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(e([d,ue])).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ie).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(b).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(pt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(v).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ye).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(y).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(mt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(L).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(_e).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ne).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ce).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(he).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(lt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ht).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(gt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(m).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(bt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(xt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(oe).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(re).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(_).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ge).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(St).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(le).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(Tt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()});var Et=r({content:l(L),number:a(),size:a(),totalElements:o().int(),totalPages:a()}),Dt=r({content:l(oe),number:a(),size:a(),totalElements:o().int(),totalPages:a()}),Ot=r({content:l(re),number:a(),size:a(),totalElements:o().int(),totalPages:a()});r({content:l(pe).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()});var kt=s([`entityRecord`,`researchSnippet`,`newsArticle`,`personRecord`,`fundraiseTransaction`,`webProfile`]),At=Object.assign(e([kt,n()]),{enum:kt.enum}),jt=r({entityId:t(),source:At,sourceId:n()}),Mt=r({citation:l(jt),text:n(),topic:n().nullish()}),Nt=r({citation:l(jt),confidence:A,description:n().nullish(),heading:n().nullish(),paragraph:l(Mt),relatedQuery:l(n()),shareable:i(),text:n(),title:n().nullish()}),Pt=r({enrichmentRunId:t().nullish(),entityId:t()}),Ft=r({sortPriority:s([`NONE`,`ANY_LOGO_FIRST`,`REAL_LOGO_FIRST`]).optional()}),It=r({max:c({offset:!0}).nullish(),min:c({offset:!0}).nullish()}),B=r({max:o().nullish(),min:o().nullish()}),V=r({max:a().nullish(),min:a().nullish()}),Lt=r({averageAmountInvestedUsdRange:l(B).optional(),largestAmountInvestedUsdRange:l(B).optional(),smallestAmountInvestedUsdRange:l(B).optional(),totalAmountInvestedUsdRange:l(B).optional(),totalInvestmentRange:l(V).optional()}),Rt=s([`any`,`every`]),zt=r({amountInvestedRange:l(B).optional(),amountRaisedRange:l(B).optional(),dateAnnouncedRange:It.nullish(),investedCompanyName:l(n()).optional(),investedCountry:l(n()).optional(),investedIndustry:l(n()).optional(),investedRound:l(n()).optional(),investorActivity:Lt.optional(),investorName:l(n()).optional(),investorNameMatch:Rt.nullish(),lastRoundYearRange:l(V).optional(),rankByInvestmentActivity:i().nullish(),round:l(n()).optional(),totalRaisedRange:l(B).optional(),valuationRange:l(B).optional()}),Bt=s([`NONE`,`COMPANY_LISTING_READY`]),Vt=s([`Operating`,`Acquired`,`Acquired Subsidiary`,`Closed`,`Closed (Acquihire)`,`Inactive`]),Ht=s([`hostPath`,`domain`]),Ut=u({acceleratorBrand:l(n()).optional(),acceleratorCohort:l(n()).optional(),acceleratorName:l(n()).optional(),acceleratorStatus:l(n()).optional(),affinity:l(n()).optional(),closedLast:i().optional(),employeeCountRange:l(V).optional(),entityId:l(t()).optional(),entityName:l(n()).optional(),featured:i().nullish(),fundraiseActivity:zt.optional(),hasFundraising:i().nullish(),headquartersCity:l(n()).optional(),headquartersCountry:l(n()).optional(),headquartersState:l(n()).optional(),industry:l(n()).optional(),letter:n().nullish(),location:l(n()).optional(),logoOption:Ft.optional(),mainProduct:l(n()).optional(),operatingStatus:l(Vt).optional(),originCountry:l(n()).optional(),person:l(n()).optional(),portfolioHeadquartersCity:l(n()).optional(),portfolioHeadquartersCountry:l(n()).optional(),portfolioHeadquartersState:l(n()).optional(),qualityGate:Bt.optional(),rankByProminence:i().nullish(),semanticQuery:n().nullish(),slug:l(n().regex(/^[a-z0-9_-]+$/).max(255)).optional(),stage:l(n()).optional(),suppressLateStage:i().nullish(),suppressNonOperating:i().nullish(),suppressZeroTotalRaised:i().nullish(),tag:l(n()).optional(),textSearch:n().nullish(),typeCustomer:l(n()).optional(),typeModel:l(n()).optional(),typeOwnership:l(n()).optional(),typeRecord:l(x).optional(),typeRevenue:l(n()).optional(),typeTechnologyUsed:l(n()).optional(),url:n().nullish(),urlDomain:n().nullish(),urlMatchMode:Ht.nullish(),urlType:p.nullish(),yearFoundedRange:l(V).optional()}),Wt=s([`discovery`,`profile`,`peer`,`comparison`]),Gt=s([`keyword`,`semantic`]),Kt=s([`ID`,`NAME_BRAND`,`YEAR_FOUNDED`,`STATUS_OPERATING`,`UPDATED_AT`,`CREATED_AT`,`NEXT_DUE_AT`,`DATA_COMPLETION_COVERAGE`,`TOTAL_RAISED`,`AMOUNT_INVESTED`,`RECENT_INVESTMENT_AT`,`STAGE`,`MOST_RECENT_AMOUNT`,`LATEST_VALUATION`,`MOST_RECENT_DATE`,`ACCELERATOR_BRAND`,`ACCELERATOR_COHORT`,`HEADQUARTERS_COUNTRY`,`EMPLOYEE_COUNT`]),qt=Object.assign(e([Kt,n()]),{enum:Kt.enum}),Jt=r({descending:i(),field:qt,sortKey:n().nullish()}),Yt=r({order:l(Jt),relevance:Gt.nullish()}),Xt=r({confidence:A,execution:I,fallbackUsed:i(),filter:Ut,intent:Wt,interpretation:n(),sort:Yt,subjectEntityName:l(n()),unsupported:n().nullish()}),H=r({changedAt:c({offset:!0}).nullish(),dataSourceUpdatedAt:c({offset:!0}).nullish(),pendingApproval:a().nullish(),sourceId:n().nullish(),status:n().nullish()}),Zt=r({fundManagerRelationshipSource:H.nullish(),fundraiseTransaction:y,fundraiseTransactionSource:H.nullish(),investorJoinSource:H.nullish()}),Qt=r({evidence:Zt,investor:xe,semanticMatch:me.nullish()}),$t=r({entityId:t(),matchedOffering:b.nullish(),probability:o(),webUrl:l(n())}),en=r({entityId:t(),label:n(),publishedAt:c({offset:!0}).nullish(),score:o(),source:At,sourceId:n(),text:n(),url:n().nullish()}),tn=r({answer:Nt.nullish(),filing:l(Pt).nullish(),interpretation:Xt,investment:l(Qt),judgment:l($t),passage:l(en),peer:l(lt),pendingWebQuery:l(n()),personLead:i(),result:Et,searchRequestId:t().nullish(),subject:l(L)}),nn=s([`auto-match`,`needs-review`,`approved`,`rejected`]),rn=r({createdAt:c({offset:!0}),entityId:t(),href:n().nullish(),internal:i(),matchStatus:nn.nullish(),mention:n().nullish(),slug:n().regex(/^[a-z0-9_-]+$/).max(255).nullish(),typeRecord:x.nullish(),updatedAt:c({offset:!0})}),an=r({entity:l(rn),newsId:a()}),on=u({acceleratorBrand:l(n()).optional(),acceleratorCohort:l(n()).optional(),acceleratorName:l(n()).optional(),acceleratorStatus:l(n()).optional(),affinity:l(n()).optional(),closedLast:i().optional(),employeeCountRange:l(V).optional(),entityId:l(t()).optional(),entityName:l(n()).optional(),featured:i().nullish(),fundraiseActivity:zt.optional(),hasFundraising:i().nullish(),headquartersCity:l(n()).optional(),headquartersCountry:l(n()).optional(),headquartersState:l(n()).optional(),industry:l(n()).optional(),letter:n().nullish(),location:l(n()).optional(),logoOption:Ft.optional(),mainProduct:l(n()).optional(),operatingStatus:l(Vt).optional(),originCountry:l(n()).optional(),person:l(n()).optional(),portfolioHeadquartersCity:l(n()).optional(),portfolioHeadquartersCountry:l(n()).optional(),portfolioHeadquartersState:l(n()).optional(),qualityGate:Bt.optional(),rankByProminence:i().nullish(),slug:l(n().regex(/^[a-z0-9_-]+$/).max(255)).optional(),stage:l(n()).optional(),suppressLateStage:i().nullish(),suppressNonOperating:i().nullish(),suppressZeroTotalRaised:i().nullish(),tag:l(n()).optional(),textSearch:n().nullish(),typeCustomer:l(n()).optional(),typeModel:l(n()).optional(),typeOwnership:l(n()).optional(),typeRecord:l(x).optional(),typeRevenue:l(n()).optional(),typeTechnologyUsed:l(n()).optional(),url:n().nullish(),urlDomain:n().nullish(),urlMatchMode:Ht.nullish(),urlType:p.nullish(),yearFoundedRange:l(V).optional()}),sn=r({entityFilter:on.nullish(),isCurrent:i().nullish(),personTitle:l(n()).optional()}),cn=r({amountInvestedRange:l(B).nullish(),amountRaisedRange:l(B).nullish(),entityName:l(n()).nullish(),investedCompany:l(n()).nullish(),personTitle:l(n()).nullish(),round:l(n()).nullish(),totalInvestmentCount:l(V).nullish(),typeRecord:l(x).nullish()}),ln=r({additionalAssociation:sn.nullish(),arrayFilter:cn.optional(),entityFilter:on.optional(),entityId:t().nullish(),entitySlug:n().nullish(),firstName:n().nullish(),includeAddress:i().nullish(),includeUrl:i().nullish(),investorActivity:Lt.optional(),isCurrent:i().nullish(),lastName:n().nullish(),letter:n().nullish(),personId:l(t()).max(200).optional(),personName:l(n()).optional(),rankByEmployer:i().nullish(),role:n().nullish(),search:n().nullish(),semanticQuery:n().nullish(),status:n().nullish()}),un=r({descending:i(),field:s([`ID`,`FIRST_NAME`,`LAST_NAME`,`FULL_NAME`,`SLUG`,`CREATED_AT`,`UPDATED_AT`,`STATUS`,`GENDER`,`AMOUNT_INVESTED`,`TOTAL_INVESTMENTS`]),sortKey:n().nullish()}),dn=r({order:l(un),relevance:Gt.nullish()}),fn=r({confidence:A,employerSemanticQuery:n().nullish(),execution:I,fallbackUsed:i(),filter:ln,interpretation:n(),sort:dn,unsupported:n().nullish()}),pn=r({currentCompany:n().nullish(),headline:n().nullish(),id:t(),location:n().nullish(),name:n(),named:n(),organizationEvidence:s([`headline`,`profile`,`none`]).nullish(),photoUrl:n().nullish(),profileUrl:n(),slug:n().regex(/^[a-z0-9_-]+$/).max(255)}),mn=r({interpretation:fn,investment:l(Qt),personLead:i(),profile:l(pn),result:Ot,searchRequestId:t().nullish()}),hn=r({label:n(),query:n()}),gn=r({key:n(),option:l(hn),prompt:n()}),_n=r({entity:tn,entityDetail:l(v),news:Dt,newsEntityMention:l(an),person:mn,personDetail:l(_),personLead:i(),provenance:at,qualifier:gn.nullish(),section:l(s([`person`,`company`,`productService`,`investor`])).optional()}),U=30,vn=8,W=10,yn=2,bn=[`id`,`association.associationId`,`slug`,`name`,`nameBrand`,`nameFull`,`core.nameBrand`,`core.nameFull`,`core.slug`,`core.typeRecord`,`entity.core.nameBrand`,`entity.core.slug`,`title`,`sourceName`,`publishedAt`,`round`,`dateAnnounced`,`amountRaised`,`investorAttribution.amountInvested`,`stage`,`updatedAt`,`createdAt`],xn=new Set([`page`,`size`,`sort`,`cursor`,`mode`,`projection`]);function Sn(e,t,n,{transport:r=`cli`,trailer:i=[]}={}){if(typeof t==`string`)return ke(t,r,i);let a=Me(t,i);if(a!==null)return Ae(a,i,r);let o=Nn(t);if(o===null)return null;let s=e.find(({operationId:e})=>e===o.operationId),c=De(s?.detailField,o.response),l=[...c.hiddenNote,...i],u=(e,t)=>D([e.trimEnd(),...t].join(`
1
+ import{C as e,E as t,S as n,_ as r,c as i,d as a,g as o,i as s,n as c,s as l,x as u}from"./iso-l1vOidnb.js";import{A as d,C as f,D as p,E as m,O as h,S as ee,T as te,_ as ne,a as re,b as g,c as ie,d as ae,f as oe,g as se,h as ce,i as le,k as ue,l as de,m as fe,n as pe,o as me,p as he,r as _,s as ge,t as v,u as _e,v as ve,w as ye,x as be,y}from"./detail-Dfv79P6S.js";import{t as xe}from"./person-owner-BRGa5Dee.js";import{t as b}from"./entity-Cg2n2mP0.js";import{t as x}from"./type-C0VR7LD-.js";import{f as Se}from"./result-envelope-DXFbrrkt.js";import{i as Ce,l as we}from"./tool-policy-C37kGt8n.js";import{a as S,c as Te,i as Ee,l as De,n as C,r as w,s as T,t as E}from"./text-field-jFKOGMzr.js";import{a as Oe,n as D,o as ke,r as Ae,s as O,t as je}from"./human-text-cap-BcNmIPQA.js";import{a as Me,d as k,f as Ne,m as A,o as Pe,p as Fe,u as Ie,x as Le}from"./help-catalog-TLFLfBit.js";import{Buffer as Re}from"node:buffer";var j=`aventure`;function M(e,t,n=`cli`){let r=t.find(t=>t.operationId===e);if(n===`mcp`&&r!==void 0){let e=Pe(r);return`${e.tool} ${JSON.stringify(e.arguments)}`}let i=r?.cliPath;return i===void 0?void 0:`${j} ${i.join(` `)}`}function ze(e,t,n=e,r=`cli`){return r===`mcp`?M(e,t,r)??e:Le(e,t,`aventure`)??n}function Be(e,t,n=`cli`){let r=Ie.safeParse(e);if(!r.success)return null;let{answer:i,citation:a,confidence:o,resolution:s}=r.data;if(s!=null)return Ve(i,s,t,n);let c=i.trimEnd().split(`
2
+ `),l=new Set(a.flatMap(({sourceType:e,sourceId:r})=>{if(e!==Fe.options[0].enum.OPERATION)return[];let i=M(r,t,n);return i===void 0?[]:[i]}));return l.size>0&&c.push(``,n===`mcp`?`MCP calls:`:`Commands:`,...[...l].map(e=>` ${e}`)),c.push(``,`Confidence: ${o}`),a.length===0||(c.push(`Sources (${a.length}):`),c.push(...a.map(({excerpt:e,sourceId:t})=>{let n=e.trim();return n.length>0?` - ${t}: ${n}`:` - ${t}`}))),c}function Ve(e,t,n,r){let{outcome:i,operationId:a,probability:o,candidate:s,taskKey:c,taskPlan:l}=t,u=[l==null?e.trimEnd():Ue(l)],d=[``,`Outcome: ${i}${o==null?``:` (probability ${o.toFixed(2)})`}`];switch(i){case k.enum.TASK_PLAN:return[...u,...l==null?[]:We(l,n,r),...d];case k.enum.OPERATION_ADVICE:{let e=s.filter(({sourceId:e})=>e!==a);return[...u,...a==null?[]:[``,r===`mcp`?`MCP call:`:`Command:`,` ${ze(a,n,a,r)}`],...d,...e.length===0?[]:[`Alternatives: ${e.map(({sourceId:e})=>e).join(`, `)}`]]}case k.enum.CLARIFY:return[...u,...c==null?[]:[``,`Leading catalog task: ${c}`],...Ke(`Candidates:`,s,n,r),...d];case k.enum.ABSTAIN:return[...u,...Ke(`Nearest operations:`,s,n,r),...d];default:throw Error(`Unhandled help resolution outcome ${String(i)}`)}}function He(e,t,n=`cli`){let r=Ne.safeParse(e);return r.success?[Ue(r.data),...We(r.data,t,n)]:null}var Ue=({taskKey:e,catalogRevision:t})=>e===void 0?`Run these steps in order.`:`Run catalog task ${e}${t===void 0?``:` (catalog revision ${t})`}.`;function We(e,t,n){return e.step.length===0?[``,`This catalog task has no planned steps yet.`]:[...e.input.length===0?[]:[``,`Inputs:`,...e.input.map(({key:e,type:t,description:n,required:r})=>` ${e} (${t}, ${r===!1?`optional`:`required`}): ${n}`)],``,`Steps:`,...e.step.flatMap(({step:r,cliCommand:i,writeGuidance:a},o)=>[` ${o+1}. ${r.stepKey===void 0?``:`${r.stepKey}: `}${ze(r.operationId,t,i,n)}`,` ${r.instruction}`,...Ge(e,o,a)]),...e.gateId?.length?[``,`Completion gates: ${e.gateId.join(`, `)}`]:[]]}function Ge(e,t,n){if(n==null)return[];let r=JSON.stringify(n),i=e.step.findIndex(({writeGuidance:e})=>JSON.stringify(e)===r);return i===t?[` Write guidance:`,` - Expectation: ${n.expectation}`,` - Body: ${n.body}`,` - Read first: ${n.typeCatalog}`,` - Rejected when:`,...n.reject.map(e=>` - ${e}`),` - Override: ${n.override}`,` - Method: ${n.method.join(`; `)}`]:[` Write guidance: as step ${i+1}.`]}function Ke(e,t,n,r){if(t.length===0)return[];let i=t.map(({sourceId:e,excerpt:t})=>({command:M(e,n,r)??e,excerpt:t})),a=Math.max(...i.map(({command:e})=>e.length));return[``,e,...i.map(({command:e,excerpt:t})=>` ${e.padEnd(a)} # ${t}`)]}var N=/\{([^}]+)\}/gu;function qe(e,t,n=`cli`){let r=t.filter(e=>e.method===`GET`&&(n===`cli`||e.binaryResponse!==!0)),i=t=>e.endpoint!==void 0&&t.endsWith(e.endpoint),a=t.find(t=>t.operationId===e.operationId),o=e.ok&&a!==void 0&&Ce(a.intent),s=[...o&&e.endpoint!==void 0?Ze(e.endpoint.split(`?`)[0]??``,r,!1,n).map(e=>n===`mcp`?e:`${e} --data --to-file <path>`):[],...e.references.filter(e=>!i(e)).flatMap(Xe).flatMap(e=>Ze(e.pathname,r,!0,n)),...e.references.filter(i).flatMap(Xe).flatMap(e=>Qe(e,r,n))],c=n===`mcp`?Je:void 0;return s.length===0?{write:o,narrowerRead:c}:{exactRecovery:`Read the full result ${s.join(`; `)}.`,write:o,narrowerRead:c}}var Je=`Refetch a narrower result: call aventure_help with q set to the read intent, then call aventure_read with its operationId and declared query or pathParams, using ids/references, filters, or smaller query.page/query.size windows.`;function Ye(e,t){let n=t.find(t=>t.operationId===e.operationId);if(!e.ok||n?.method!==`GET`||n.mutates===!0||Ce(n.intent)||e.endpoint===void 0)return;let r=new URL(e.endpoint,`https://localhost`),i=[...n.path.matchAll(N)].map(([,e])=>e),a=RegExp(`^${n.path.replace(N,`([^/]+)`)}$`,`u`).exec(r.pathname);if(a===null)return;let o=n.parameters.find(e=>e.location===`query`&&e.name===`compact`&&e.schemaType===`boolean`);o!==void 0&&r.searchParams.set(o.name,`true`);let s=[];for(let e of n.parameters){let t=e.location===`path`?[decodeURIComponent(a[i.indexOf(e.name)+1]??``)]:e.location===`query`?r.searchParams.getAll(e.name):[];if(e.required&&t.length===0)return;t.length>0&&s.push(F(e),...t.map(tt))}return`Run: \`${P(n,[...s,`--data`,`--to-file`,`./aventure-output.json`])}\`. On success, the spill file contains the bare payload (top-level keys as returned), not the result envelope or a data.response wrapper.`}function Xe(e){return URL.canParse(e)?[new URL(e)]:[]}function Ze(e,t,n,r){return t.flatMap(t=>{let i=[...t.path.matchAll(N)].map(([,e])=>e),a=RegExp(`^${t.path.replace(N,`([^/]+)`)}$`,`u`),o=n&&i.length===0?null:a.exec(e);if(o===null)return[];if(r===`mcp`)return[$e(t,{pathParams:Object.fromEntries(i.map((e,t)=>[e??``,decodeURIComponent(o[t+1]??``)]))})];let s=i.flatMap((e,n)=>{let r=t.parameters.find(t=>t.name===e);return r===void 0?[]:[F(r),o[n+1]??``]});return[`${et(t)}, ${P(t,s)}`]})}function Qe(e,t,n){let r=t.find(t=>t.path===e.pathname);return r===void 0?[]:t.flatMap(t=>{if(!t.path.startsWith(`${r.path}/`))return[];let i=t.parameters.find(({name:e})=>e.endsWith(`Offset`)),a=t.parameters.find(({name:e})=>e.endsWith(`Limit`));if(i===void 0||a===void 0)return[];if(n===`mcp`)return[`in windows: ${$e(t,{query:{...Object.fromEntries([...e.searchParams].filter(([e])=>t.parameters.some(t=>t.location===`query`&&t.name===e))),[i.name]:`<offset>`,[a.name]:`<limit>`}})}, advancing query.${i.name} until a window returns fewer than query.${a.name} units`];let o=t.parameters.flatMap(t=>{let n=e.searchParams.get(t.name);return t.location!==`query`||n===null?[]:[F(t),tt(n)]}),s=[F(i),`<n>`,F(a),`<n>`];return[`${et(t)}, in windows: ${P(t,[...o,...s])}, advancing ${F(i)} until a window returns fewer than ${F(a)} units`]})}function $e(e,t){return`${we(e.intent)} ${JSON.stringify({operationId:e.operationId,...t})}`}function et(e){return e.auth===`write`?`with admin sign-in`:`with any sign-in`}function P(e,t){return[j,...e.cliPath,...t].join(` `)}function F(e){return e.flag.split(/\s+/u)[0]??e.flag}function tt(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}var nt=r({detail:n(),field:n().nullish(),scope:s([`entity`,`person`,`news`])}),rt=s([`auto`,`exact`,`keyword`,`semantic`,`natural`,`hybrid`]),it=Object.assign(e([rt,n()]),{enum:rt.enum}),I=r({modeRequested:it,modeUsed:it}),at=r({answerUnavailable:i(),entity:I,news:I,person:I,rejection:l(nt),unavailable:l(s([`entity`,`person`,`news`]))}),ot=r({acceleratorParticipation:l(se),detail:l(ce)}),L=r({core:b,enrichment:te,fundraiseRound:l(y),provider:ve.nullish(),research:ot,semanticMatch:me.nullish()}),st=s([`curated`,`semantic`,`precomputed`,`derived`,`computed`]),ct=r({compositeScore:o().nullish(),cosineScore:o().nullish(),curatedAsOf:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),curatedRelationshipType:n().nullish(),curatedSource:n().nullish(),derivedFromEntityId:t().nullish(),matchedSectionWeight:o().nullish(),origin:st,rank:a(),sharedSectionCount:a().nullish()}),lt=r({entity:L,similarity:ct}),ut=r({fundraiseInvestorJoin:i(),fundraiseTransaction:i(),operatingStatus:i(),relationship:i()}),dt=s([`Acquisition`,`Acquired`,`Acquired Subsidiary`]),ft=s([`Announced`,`Announced; subject to approvals and closing conditions`,`Active`,`Closed`,`Completed`,`In Progress`,`Open`]),pt=r({acquiredEntity:b,acquirerEntity:b,amount:o().int().nullish(),announcedAt:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),asOf:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),completedAt:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),createdAt:c({offset:!0}).nullish(),currency:n().nullish(),dataConfidence:ee.nullish(),evidence:ut,fundraiseTransactionId:t().nullish(),investorJoinId:t().nullish(),isCurrent:i().nullish(),publicSource:f.nullish(),relationshipId:a(),status:dt,transactionStatus:ft.nullish(),updatedAt:c({offset:!0}).nullish()}),mt=r({entity:v,investorAttribution:l(g),round:l(be),roundCount:a()}),ht=r({core:b,fundingDetail:h.nullish(),similarity:ct,urlLink:l(m)}),gt=r({compliance:fe.nullish(),createdAt:c({offset:!0}).nullish(),id:a(),isCurrent:i().nullish(),isPrimary:i().nullish(),language:n().nullish(),owner:xe,text:n(),textName:n().nullish(),textType:n(),updatedAt:c({offset:!0}).nullish()}),_t=s([`stored`,`derivedFromPreAndRaised`,`derivedFromPostMinusRaised`,`reportedAssumedPost`]),vt=s([`fundraiseRound`,`researchDetail`]),yt=s([`preMoney`,`postMoney`,`reported`]),bt=r({amountRaised:o().int().nullish(),asOfDate:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/),confidence:de,currency:n(),declaredBasis:yt,derivation:_t,detailId:a().nullish(),label:n().nullish(),source:vt,sourceRef:n(),valuationPostMoney:o().int().nullish(),valuationPreMoney:o().int().nullish()}),xt=r({createdAt:c({offset:!0}).nullish(),description:n().nullish(),forkCount:a(),githubId:o().int(),homepageUrl:n().nullish(),id:o().int(),isArchived:i(),isFork:i(),language:n().nullish(),license:n().nullish(),name:n(),ownerLogin:n(),repoCreatedAt:c({offset:!0}).nullish(),repoPushedAt:c({offset:!0}).nullish(),stargazerCount:a(),topic:l(n()),updatedAt:c({offset:!0}).nullish(),url:n()}),R=r({empty:i().optional(),sorted:i().optional(),unsorted:i().optional()}),z=r({offset:o().int().optional(),paged:i().optional(),pageNumber:a().optional(),pageSize:a().optional(),sort:R.optional(),unpaged:i().optional()}),St=r({investorAttribution:l(g),person:_,round:l(be),roundCount:a()}),Ct=s([`by`,`about`]),wt=s([`newsArticle`,`blogPost`,`externalSocialPost`,`repositoryOwner`,`repository`,`webSite`,`webPage`,`researchPaper`]),Tt=r({canonicalUrl:n().nullish(),contentId:n(),contentType:wt,createdAt:c({offset:!0}).nullish(),publishedAt:c({offset:!0}).nullish(),relation:Ct.nullish(),sourceDomain:n().nullish(),sourceName:n().nullish(),summary:n().nullish(),title:n(),topic:n().nullish(),updatedAt:c({offset:!0}).nullish(),url:n().nullish(),year:a().nullish()});r({content:l(ae).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(e([d,ue])).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ie).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(b).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(pt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(v).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ye).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(y).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(mt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(L).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(_e).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ne).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ce).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(he).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(lt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ht).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(gt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(m).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(bt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(xt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(oe).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(re).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(_).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ge).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(St).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(le).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(Tt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()});var Et=r({content:l(L),number:a(),size:a(),totalElements:o().int(),totalPages:a()}),Dt=r({content:l(oe),number:a(),size:a(),totalElements:o().int(),totalPages:a()}),Ot=r({content:l(re),number:a(),size:a(),totalElements:o().int(),totalPages:a()});r({content:l(pe).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:z.optional(),size:a().optional(),sort:R.optional(),totalElements:o().int().optional(),totalPages:a().optional()});var kt=s([`entityRecord`,`researchSnippet`,`newsArticle`,`personRecord`,`fundraiseTransaction`,`webProfile`]),At=Object.assign(e([kt,n()]),{enum:kt.enum}),jt=r({entityId:t(),source:At,sourceId:n()}),Mt=r({citation:l(jt),text:n(),topic:n().nullish()}),Nt=r({citation:l(jt),confidence:A,description:n().nullish(),heading:n().nullish(),paragraph:l(Mt),relatedQuery:l(n()),shareable:i(),text:n(),title:n().nullish()}),Pt=r({enrichmentRunId:t().nullish(),entityId:t()}),Ft=r({sortPriority:s([`NONE`,`ANY_LOGO_FIRST`,`REAL_LOGO_FIRST`]).optional()}),It=r({max:c({offset:!0}).nullish(),min:c({offset:!0}).nullish()}),B=r({max:o().nullish(),min:o().nullish()}),V=r({max:a().nullish(),min:a().nullish()}),Lt=r({averageAmountInvestedUsdRange:l(B).optional(),largestAmountInvestedUsdRange:l(B).optional(),smallestAmountInvestedUsdRange:l(B).optional(),totalAmountInvestedUsdRange:l(B).optional(),totalInvestmentRange:l(V).optional()}),Rt=s([`any`,`every`]),zt=r({amountInvestedRange:l(B).optional(),amountRaisedRange:l(B).optional(),dateAnnouncedRange:It.nullish(),investedCompanyName:l(n()).optional(),investedCountry:l(n()).optional(),investedIndustry:l(n()).optional(),investedRound:l(n()).optional(),investorActivity:Lt.optional(),investorName:l(n()).optional(),investorNameMatch:Rt.nullish(),lastRoundYearRange:l(V).optional(),rankByInvestmentActivity:i().nullish(),round:l(n()).optional(),totalRaisedRange:l(B).optional(),valuationRange:l(B).optional()}),Bt=s([`NONE`,`COMPANY_LISTING_READY`]),Vt=s([`Operating`,`Acquired`,`Acquired Subsidiary`,`Closed`,`Closed (Acquihire)`,`Inactive`]),Ht=s([`hostPath`,`domain`]),Ut=u({acceleratorBrand:l(n()).optional(),acceleratorCohort:l(n()).optional(),acceleratorName:l(n()).optional(),acceleratorStatus:l(n()).optional(),affinity:l(n()).optional(),closedLast:i().optional(),employeeCountRange:l(V).optional(),entityId:l(t()).optional(),entityName:l(n()).optional(),featured:i().nullish(),fundraiseActivity:zt.optional(),hasFundraising:i().nullish(),headquartersCity:l(n()).optional(),headquartersCountry:l(n()).optional(),headquartersState:l(n()).optional(),industry:l(n()).optional(),letter:n().nullish(),location:l(n()).optional(),logoOption:Ft.optional(),mainProduct:l(n()).optional(),operatingStatus:l(Vt).optional(),originCountry:l(n()).optional(),person:l(n()).optional(),portfolioHeadquartersCity:l(n()).optional(),portfolioHeadquartersCountry:l(n()).optional(),portfolioHeadquartersState:l(n()).optional(),qualityGate:Bt.optional(),rankByProminence:i().nullish(),semanticQuery:n().nullish(),slug:l(n().regex(/^[a-z0-9_-]+$/).max(255)).optional(),stage:l(n()).optional(),suppressLateStage:i().nullish(),suppressNonOperating:i().nullish(),suppressZeroTotalRaised:i().nullish(),tag:l(n()).optional(),textSearch:n().nullish(),typeCustomer:l(n()).optional(),typeModel:l(n()).optional(),typeOwnership:l(n()).optional(),typeRecord:l(x).optional(),typeRevenue:l(n()).optional(),typeTechnologyUsed:l(n()).optional(),url:n().nullish(),urlDomain:n().nullish(),urlMatchMode:Ht.nullish(),urlType:p.nullish(),yearFoundedRange:l(V).optional()}),Wt=u({acceleratorBrand:l(n()).optional(),acceleratorCohort:l(n()).optional(),acceleratorName:l(n()).optional(),acceleratorStatus:l(n()).optional(),affinity:l(n()).optional(),closedLast:i().optional(),employeeCountRange:l(V).optional(),entityId:l(t()).optional(),entityName:l(n()).optional(),featured:i().nullish(),fundraiseActivity:zt.optional(),hasFundraising:i().nullish(),headquartersCity:l(n()).optional(),headquartersCountry:l(n()).optional(),headquartersState:l(n()).optional(),industry:l(n()).optional(),letter:n().nullish(),location:l(n()).optional(),logoOption:Ft.optional(),mainProduct:l(n()).optional(),operatingStatus:l(Vt).optional(),originCountry:l(n()).optional(),person:l(n()).optional(),portfolioHeadquartersCity:l(n()).optional(),portfolioHeadquartersCountry:l(n()).optional(),portfolioHeadquartersState:l(n()).optional(),qualityGate:Bt.optional(),rankByProminence:i().nullish(),slug:l(n().regex(/^[a-z0-9_-]+$/).max(255)).optional(),stage:l(n()).optional(),suppressLateStage:i().nullish(),suppressNonOperating:i().nullish(),suppressZeroTotalRaised:i().nullish(),tag:l(n()).optional(),textSearch:n().nullish(),typeCustomer:l(n()).optional(),typeModel:l(n()).optional(),typeOwnership:l(n()).optional(),typeRecord:l(x).optional(),typeRevenue:l(n()).optional(),typeTechnologyUsed:l(n()).optional(),url:n().nullish(),urlDomain:n().nullish(),urlMatchMode:Ht.nullish(),urlType:p.nullish(),yearFoundedRange:l(V).optional()}),Gt=r({entityFilter:Wt.nullish(),isCurrent:i().nullish(),personTitle:l(n()).optional()}),Kt=r({amountInvestedRange:l(B).nullish(),amountRaisedRange:l(B).nullish(),entityName:l(n()).nullish(),investedCompany:l(n()).nullish(),personTitle:l(n()).nullish(),round:l(n()).nullish(),totalInvestmentCount:l(V).nullish(),typeRecord:l(x).nullish()}),qt=r({additionalAssociation:Gt.nullish(),arrayFilter:Kt.optional(),entityFilter:Wt.optional(),entityId:t().nullish(),entitySlug:n().nullish(),firstName:n().nullish(),includeAddress:i().nullish(),includeUrl:i().nullish(),investorActivity:Lt.optional(),isCurrent:i().nullish(),lastName:n().nullish(),letter:n().nullish(),personId:l(t()).max(200).optional(),personName:l(n()).optional(),rankByEmployer:i().nullish(),role:n().nullish(),search:n().nullish(),semanticQuery:n().nullish(),status:n().nullish()}),Jt=s([`discovery`,`profile`,`peer`,`comparison`]),Yt=s([`keyword`,`semantic`]),Xt=s([`ID`,`NAME_BRAND`,`YEAR_FOUNDED`,`STATUS_OPERATING`,`UPDATED_AT`,`CREATED_AT`,`NEXT_DUE_AT`,`DATA_COMPLETION_COVERAGE`,`TOTAL_RAISED`,`AMOUNT_INVESTED`,`RECENT_INVESTMENT_AT`,`STAGE`,`MOST_RECENT_AMOUNT`,`LATEST_VALUATION`,`MOST_RECENT_DATE`,`ACCELERATOR_BRAND`,`ACCELERATOR_COHORT`,`HEADQUARTERS_COUNTRY`,`EMPLOYEE_COUNT`]),Zt=Object.assign(e([Xt,n()]),{enum:Xt.enum}),Qt=r({descending:i(),field:Zt,sortKey:n().nullish()}),$t=r({order:l(Qt),relevance:Yt.nullish()}),en=r({confidence:A,execution:I,fallbackUsed:i(),filter:Ut,intent:Jt,interpretation:n(),personAssociation:qt.nullish(),sort:$t,subjectEntityName:l(n()),unsupported:n().nullish()}),H=r({changedAt:c({offset:!0}).nullish(),dataSourceUpdatedAt:c({offset:!0}).nullish(),pendingApproval:a().nullish(),sourceId:n().nullish(),status:n().nullish()}),tn=r({fundManagerRelationshipSource:H.nullish(),fundraiseTransaction:y,fundraiseTransactionSource:H.nullish(),investorJoinSource:H.nullish()}),nn=r({evidence:tn,investor:xe,semanticMatch:me.nullish()}),rn=r({entityId:t(),matchedOffering:b.nullish(),probability:o(),webUrl:l(n())}),an=r({entityId:t(),label:n(),publishedAt:c({offset:!0}).nullish(),score:o(),source:At,sourceId:n(),text:n(),url:n().nullish()}),on=r({answer:Nt.nullish(),filing:l(Pt).nullish(),interpretation:en,investment:l(nn),judgment:l(rn),passage:l(an),peer:l(lt),pendingWebQuery:l(n()),personLead:i(),result:Et,searchRequestId:t().nullish(),subject:l(L)}),sn=s([`auto-match`,`needs-review`,`approved`,`rejected`]),cn=r({createdAt:c({offset:!0}),entityId:t(),href:n().nullish(),internal:i(),matchStatus:sn.nullish(),mention:n().nullish(),slug:n().regex(/^[a-z0-9_-]+$/).max(255).nullish(),typeRecord:x.nullish(),updatedAt:c({offset:!0})}),ln=r({entity:l(cn),newsId:a()}),un=r({descending:i(),field:s([`ID`,`FIRST_NAME`,`LAST_NAME`,`FULL_NAME`,`SLUG`,`CREATED_AT`,`UPDATED_AT`,`STATUS`,`GENDER`,`AMOUNT_INVESTED`,`TOTAL_INVESTMENTS`]),sortKey:n().nullish()}),dn=r({order:l(un),relevance:Yt.nullish()}),fn=r({confidence:A,employerSemanticQuery:n().nullish(),execution:I,fallbackUsed:i(),filter:qt,interpretation:n(),sort:dn,unsupported:n().nullish()}),pn=r({currentCompany:n().nullish(),headline:n().nullish(),id:t(),location:n().nullish(),name:n(),named:n(),organizationEvidence:s([`headline`,`profile`,`none`]).nullish(),photoUrl:n().nullish(),profileUrl:n(),slug:n().regex(/^[a-z0-9_-]+$/).max(255)}),mn=r({interpretation:fn,investment:l(nn),personLead:i(),profile:l(pn),result:Ot,searchRequestId:t().nullish()}),hn=r({label:n(),query:n()}),gn=r({key:n(),option:l(hn),prompt:n()}),_n=r({entity:on,entityDetail:l(v),news:Dt,newsEntityMention:l(ln),person:mn,personDetail:l(_),personLead:i(),provenance:at,qualifier:gn.nullish(),section:l(s([`person`,`company`,`productService`,`investor`])).optional()}),U=30,vn=8,W=10,yn=2,bn=[`id`,`association.associationId`,`slug`,`name`,`nameBrand`,`nameFull`,`core.nameBrand`,`core.nameFull`,`core.slug`,`core.typeRecord`,`entity.core.nameBrand`,`entity.core.slug`,`title`,`sourceName`,`publishedAt`,`round`,`dateAnnounced`,`amountRaised`,`investorAttribution.amountInvested`,`stage`,`updatedAt`,`createdAt`],xn=new Set([`page`,`size`,`sort`,`cursor`,`mode`,`projection`]);function Sn(e,t,n,{transport:r=`cli`,trailer:i=[]}={}){if(typeof t==`string`)return ke(t,r,i);let a=Me(t,i);if(a!==null)return Ae(a,i,r);let o=Nn(t);if(o===null)return null;let s=e.find(({operationId:e})=>e===o.operationId),c=De(s?.detailField,o.response),l=[...c.hiddenNote,...i],u=(e,t)=>D([e.trimEnd(),...t].join(`
3
3
  `),{appendNewline:!0,preservedTrailerLines:t.length>0?t.length:void 0,transport:r}),d=s?.parameters??[],f={...o,response:c.response,parameters:d,transport:r},p=Be(f.response,e,r)??He(f.response,e,r);if(p!==null)return u(p.join(`
4
4
  `),i);let m=Cn(f);if(m!==null)return u(m.join(`
5
5
  `),l);let h=[f.summary??n??f.operationId??`OpenAPI call succeeded`,`${f.method} ${f.endpoint}`],ee=Oe(Dn(f),117-l.length,je-Re.byteLength(`${[...h,...l].join(`
@@ -11,4 +11,4 @@ Environment:
11
11
  AVENTURE_MCP_PORT Select the HTTP listening port.
12
12
  AVENTURE_MCP_PATH Select the MCP route.
13
13
  AVENTURE_MCP_JSON_LIMIT Limit request body size.
14
- `).parseAsync()).opts(),[{describeError:o,logError:s,logInfo:c,shutdownLogging:l,useServerProcessLogging:u},{AUTH_SECRET_NAME:d},{metricsScrapeSecretFromEnvironment:f},{catalogOAuthDiscovery:p},{captureSentryException:m,initializeSentry:h,shutdownSentry:g},{HOSTED_REQUEST_DEADLINE_MS:_,startStreamableHttpServer:v}]=await Promise.all([import(`../chunks/logging-CgYAFXRk.js`),import(`../chunks/env-INx_D4Zq.js`),import(`../chunks/private-telemetry-credential-DbamSREI.js`),import(`../chunks/oauth-discovery-C4Lo6dIK.js`),import(`../chunks/sentry-BbZQYSQu.js`),import(`../chunks/streamable-http-Mc_ecgj4.js`)]),y=_+5e3;u(),await h(),delete process.env[d.authToken];var b=E(),x=process.env.AVENTURE_MCP_PATH??`/mcp`,S=process.env.AVENTURE_MCP_JSON_LIMIT??`10mb`,C=f()||void 0,w=!1;function T(e){Promise.allSettled([l(),g()]).then(e=>{for(let t of e){if(t.status!==`rejected`)continue;let e=o(t.reason);process.stderr.write(`${i.bin[0]} telemetry shutdown failed: ${e}\n`)}}).catch(e=>{let t=o(e);process.stderr.write(`${i.bin[0]} telemetry shutdown failed: ${t}\n`)}).finally(()=>process.exit(e))}v({port:b,host:a,path:x,resolveOAuthDiscovery:p(),jsonBodyLimit:S,metricsScrapeSecret:C}).then(e=>{c({component:`aventure-mcp-server`,event:`server_listening`,fields:{port:b,path:x}}),process.stdout.write(`${i.bin[0]} listening at http://localhost:${b}${x}\n`);let t=t=>{if(w)return;w=!0,c({component:`aventure-mcp-server`,event:`server_shutdown_started`,fields:{signal:t}});let n=setTimeout(()=>{s({component:`aventure-mcp-server`,event:`server_shutdown_timeout`,message:`MCP server did not drain before the platform forced-shutdown window`,fields:{signal:t,forceExitMs:y}}),T(1)},y);n.unref(),e.close().then(()=>{clearTimeout(n),c({component:`aventure-mcp-server`,event:`server_shutdown_completed`,fields:{signal:t}}),T(0)}).catch(e=>{let r=o(e);clearTimeout(n),s({component:`aventure-mcp-server`,event:`server_shutdown_failed`,message:r,fields:{signal:t},error:e}),T(1)})};for(let e of[`SIGTERM`,`SIGINT`])process.on(e,t)},async e=>{let t=o(e);m(e,`server_start_failed`),s({component:`aventure-mcp-server`,event:`server_start_failed`,message:t,error:e}),process.stderr.write(`${i.bin[0]} failed to start: ${t}\n`),T(1)});function E(){let e=process.env.AVENTURE_MCP_PORT??process.env.PORT??`3333`,t=Number(e);if(!Number.isInteger(t)||t<1||t>r)throw Error(`Invalid MCP server port: ${e}`);return t}export{};
14
+ `).parseAsync()).opts(),[{describeError:o,logError:s,logInfo:c,shutdownLogging:l,useServerProcessLogging:u},{AUTH_SECRET_NAME:d},{metricsScrapeSecretFromEnvironment:f},{catalogOAuthDiscovery:p},{captureSentryException:m,initializeSentry:h,shutdownSentry:g},{HOSTED_REQUEST_DEADLINE_MS:_,startStreamableHttpServer:v}]=await Promise.all([import(`../chunks/logging-CgYAFXRk.js`),import(`../chunks/env-INx_D4Zq.js`),import(`../chunks/private-telemetry-credential-DbamSREI.js`),import(`../chunks/oauth-discovery-Dvc-vBUX.js`),import(`../chunks/sentry-BbZQYSQu.js`),import(`../chunks/streamable-http-iQ4NxPSA.js`)]),y=_+5e3;u(),await h(),delete process.env[d.authToken];var b=E(),x=process.env.AVENTURE_MCP_PATH??`/mcp`,S=process.env.AVENTURE_MCP_JSON_LIMIT??`10mb`,C=f()||void 0,w=!1;function T(e){Promise.allSettled([l(),g()]).then(e=>{for(let t of e){if(t.status!==`rejected`)continue;let e=o(t.reason);process.stderr.write(`${i.bin[0]} telemetry shutdown failed: ${e}\n`)}}).catch(e=>{let t=o(e);process.stderr.write(`${i.bin[0]} telemetry shutdown failed: ${t}\n`)}).finally(()=>process.exit(e))}v({port:b,host:a,path:x,resolveOAuthDiscovery:p(),jsonBodyLimit:S,metricsScrapeSecret:C}).then(e=>{c({component:`aventure-mcp-server`,event:`server_listening`,fields:{port:b,path:x}}),process.stdout.write(`${i.bin[0]} listening at http://localhost:${b}${x}\n`);let t=t=>{if(w)return;w=!0,c({component:`aventure-mcp-server`,event:`server_shutdown_started`,fields:{signal:t}});let n=setTimeout(()=>{s({component:`aventure-mcp-server`,event:`server_shutdown_timeout`,message:`MCP server did not drain before the platform forced-shutdown window`,fields:{signal:t,forceExitMs:y}}),T(1)},y);n.unref(),e.close().then(()=>{clearTimeout(n),c({component:`aventure-mcp-server`,event:`server_shutdown_completed`,fields:{signal:t}}),T(0)}).catch(e=>{let r=o(e);clearTimeout(n),s({component:`aventure-mcp-server`,event:`server_shutdown_failed`,message:r,fields:{signal:t},error:e}),T(1)})};for(let e of[`SIGTERM`,`SIGINT`])process.on(e,t)},async e=>{let t=o(e);m(e,`server_start_failed`),s({component:`aventure-mcp-server`,event:`server_start_failed`,message:t,error:e}),process.stderr.write(`${i.bin[0]} failed to start: ${t}\n`),T(1)});function E(){let e=process.env.AVENTURE_MCP_PORT??process.env.PORT??`3333`,t=Number(e);if(!Number.isInteger(t)||t<1||t>r)throw Error(`Invalid MCP server port: ${e}`);return t}export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aventurevc/mcp-server",
3
- "version": "0.8.237",
3
+ "version": "0.8.239",
4
4
  "mcpName": "io.github.aventurevc/aventure-mcp",
5
5
  "private": false,
6
6
  "description": "MCP server that gives AI assistants access to aVenture research data on companies, people, funding, and news.",
@@ -29,9 +29,9 @@
29
29
  },
30
30
  "aventurePublicApi": {
31
31
  "repository": "aventurevc/aventure-docs",
32
- "commit": "26c800876cf9a9d76315042f61811441eb67b3ec",
32
+ "commit": "a6b3e4377e00f949ecc4278fc79f91010bdfe821",
33
33
  "openapiPath": "openapi/openapi.json",
34
- "openapiSha256": "888943d126d15b66f57c146fb7db027889a490d8bfdac53ffbcf3c4dee477d28"
34
+ "openapiSha256": "0fe5a90b049c86a398f84c43917382efc69ae7abd1d5802320e7623c70febab3"
35
35
  },
36
36
  "scripts": {}
37
37
  }