@aventurevc/aventure-cli 0.8.256 → 0.8.258
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/README.md +14 -12
- package/dist/aventure-cli/command-catalog.compact.txt +1 -0
- package/dist/aventure-cli/index.js +1 -1
- package/dist/aventure-cli/unified-operations.json +21 -2
- package/dist/chunks/{allowance-type-COW05L2h.js → allowance-type-zGUV-h7b.js} +1 -1
- package/dist/chunks/{api-key-bearer-credential-CEh_E1nd.js → api-key-bearer-credential-9yUCRumS.js} +1 -1
- package/dist/chunks/{api-key-bearer-credential-CJmyiaHt.js → api-key-bearer-credential-CVTBn5O8.js} +1 -1
- package/dist/chunks/{api-key-credential-BO9dkByl.js → api-key-credential-BE1Gfeaj.js} +1 -1
- package/dist/chunks/{api-key-credential-Bibw0FgL.js → api-key-credential-CT0VWdLO.js} +1 -1
- package/dist/chunks/{api-key-credential-verification-BkGX5Jjp.js → api-key-credential-verification-DLc_BbX7.js} +1 -1
- package/dist/chunks/{api-key-credential-verification-CkE2rKOc.js → api-key-credential-verification-XaoA7jQ4.js} +1 -1
- package/dist/chunks/{api-key-login-BSmz-_dG.js → api-key-login-B5CrBgF7.js} +1 -1
- package/dist/chunks/auth-resolver-ChtJBsZX.js +1 -0
- package/dist/chunks/{auth-resolver-BnXWEXba.js → auth-resolver-DwIGdlfd.js} +1 -1
- package/dist/chunks/{auth-status-render-B_xEWBIl.js → auth-status-render-DPEnEs-C.js} +1 -1
- package/dist/chunks/aventure-cli-DOdbZoFo.js +11 -0
- package/dist/chunks/{batch-io-BngLGgxu.js → batch-io-CXO355X8.js} +1 -1
- package/dist/chunks/{builtin-auth-BBOyaHnT.js → builtin-auth-8al5fuv8.js} +5 -5
- package/dist/chunks/{builtin-research-run-wait-BR3WtYbn.js → builtin-research-run-wait-B2ehFbxk.js} +1 -1
- package/dist/chunks/{builtin-update-T4DoalDg.js → builtin-update-CfmRS3PN.js} +3 -3
- package/dist/chunks/{cli-help-policy-5JpDnVeu.js → cli-help-policy-BSp1_9pV.js} +1 -1
- package/dist/chunks/{completion-6iyiblxk.js → completion-Cl9YW4K_.js} +1 -1
- package/dist/chunks/{contract-C_N5Jdqu.js → contract-CrhKa2-C.js} +1 -1
- package/dist/chunks/{contract-parameter-CmFxMtMV.js → contract-parameter-BkhnusCV.js} +1 -1
- package/dist/chunks/{credential-redaction-DUzahXj1.js → credential-redaction-unOGS2e0.js} +1 -1
- package/dist/chunks/{credential-store-BbNDHBhH.js → credential-store-DcQ0A8xQ.js} +1 -1
- package/dist/chunks/{detail-DPx3_Ch3.js → detail-DFVJrldR.js} +1 -1
- package/dist/chunks/detail-DP6lF4pb.js +1 -0
- package/dist/chunks/{env-BB4L3Shh.js → env-Hb2MJpnD.js} +1 -1
- package/dist/chunks/{generated-option-order-C7NwXQ-p.js → generated-option-order-DSRbIIDu.js} +1 -1
- package/dist/chunks/{help-catalog-RatwILqY.js → help-catalog-CXDJUIFG.js} +1 -1
- package/dist/chunks/{help-intent-Q4GaudUc.js → help-intent-DJ52YNKB.js} +1 -1
- package/dist/chunks/{logging-BiPXJvsP.js → logging-CYw56CLn.js} +1 -1
- package/dist/chunks/{logging-BOqaJL1m.js → logging-DJjGVMpb.js} +1 -1
- package/dist/chunks/{logout-CJtE80DQ.js → logout-B5ilIw5v.js} +1 -1
- package/dist/chunks/logout-CO0R7QqH.js +1 -0
- package/dist/chunks/mcp-generation-contract-B-g0_uP9.js +1 -0
- package/dist/chunks/{mcp-generation-contract-BxZLfdj2.js → mcp-generation-contract-C18Cjtzs.js} +1 -1
- package/dist/chunks/oauth-bearer-credential-Ar6ca8Te.js +1 -0
- package/dist/chunks/{oauth-bearer-credential-CB2wbIvL.js → oauth-bearer-credential-jXe9zahw.js} +1 -1
- package/dist/chunks/{oauth-credential-CERmkQv2.js → oauth-credential-CtS9qEtK.js} +1 -1
- package/dist/chunks/{oauth-credential-CFPkiVWx.js → oauth-credential-DHuA0bye.js} +1 -1
- package/dist/chunks/{oauth-login-BLi_f9tl.js → oauth-login-UIUBboLN.js} +3 -3
- package/dist/chunks/{oauth-login-DOc6zQtT.js → oauth-login-_hTYxHMi.js} +1 -1
- package/dist/chunks/openapi-call-Cgsy_20D.js +1 -0
- package/dist/chunks/openapi-call-Rurp3hhw.js +96 -0
- package/dist/chunks/{openapi-commands-Co1w1cAZ.js → openapi-commands-D8G1FR52.js} +1 -1
- package/dist/chunks/openapi-commands-DJxO7m6Z.js +1 -0
- package/dist/chunks/openapi-snapshot-BJwcRiVJ.js +1 -0
- package/dist/chunks/{operations-catalog-9iJz92FM.js → operations-catalog-BklQRvzx.js} +1 -1
- package/dist/chunks/operations-catalog-CMe4DH_2.js +1 -0
- package/dist/chunks/{operations-metadata-DUk1kGnN.js → operations-metadata-LSQ_vGDN.js} +1 -1
- package/dist/chunks/{operations-Cel0PbDE.js → operations-xWEDKOOx.js} +2 -2
- package/dist/chunks/{output-CQCzL4FF.js → output-BqAhsTw3.js} +1 -1
- package/dist/chunks/output-CsrPb3BJ.js +5 -0
- package/dist/chunks/output-mode-CJsZnq9Z.js +1 -0
- package/dist/chunks/output-mode-DDZ46TDI.js +1 -0
- package/dist/chunks/output-spill-Td5OeEiY.js +1 -0
- package/dist/chunks/package-DEeHDoOT.js +1 -0
- package/dist/chunks/package-DcUsOdSE.js +1 -0
- package/dist/chunks/{parse-error-hint-BOKNKdpG.js → parse-error-hint-n1ZxE8-Y.js} +1 -1
- package/dist/chunks/{payload-operand-guard-Dn5TSn7l.js → payload-operand-guard-DNi-gpKJ.js} +1 -1
- package/dist/chunks/{request-replay-C4_aojsW.js → request-replay-BD5eVITJ.js} +1 -1
- package/dist/chunks/{request-replay-B1PskHaI.js → request-replay-BTBMUex4.js} +1 -1
- package/dist/chunks/{response-problem-CMbGlIMh.js → response-problem-B6f_4367.js} +1 -1
- package/dist/chunks/response-problem-C0hmbxPU.js +1 -0
- package/dist/chunks/{result-envelope-CRPWP35j.js → result-envelope-CB5fGScF.js} +1 -1
- package/dist/chunks/{run-Db_Ap1DI.js → run-0l-YeqBs.js} +1 -1
- package/dist/chunks/{run-detail-CIBpS8hz.js → run-detail-DO0WpNC3.js} +1 -1
- package/dist/chunks/runtime-identity-BXcpCMqz.js +1 -0
- package/dist/chunks/runtime-identity-Bbg6Ewkk.js +1 -0
- package/dist/chunks/{startup-auth-BxhUYb3e.js → startup-auth-BKpUIs2c.js} +1 -1
- package/dist/chunks/startup-auth-CHyBzqAp.js +1 -0
- package/dist/chunks/text-response--GtzWkzl.js +16 -0
- package/dist/chunks/{tool-policy-CuPvw2bH.js → tool-policy-ClEqQ6OA.js} +1 -1
- package/package.json +3 -3
- package/dist/chunks/auth-resolver-BksmUofP.js +0 -1
- package/dist/chunks/aventure-cli-BLROXN5Y.js +0 -11
- package/dist/chunks/detail-C8RvrFjE.js +0 -1
- package/dist/chunks/logout-B2uAyTFi.js +0 -1
- package/dist/chunks/mcp-generation-contract-B1EVdbnS.js +0 -1
- package/dist/chunks/oauth-bearer-credential-DnE-RjEI.js +0 -1
- package/dist/chunks/openapi-call-BitfFswE.js +0 -1
- package/dist/chunks/openapi-call-DhUG0hA6.js +0 -96
- package/dist/chunks/openapi-commands-DrKzEPt7.js +0 -1
- package/dist/chunks/openapi-snapshot-BBaDok2u.js +0 -1
- package/dist/chunks/operations-catalog-BxA031fv.js +0 -1
- package/dist/chunks/output-DLRELp8c.js +0 -5
- package/dist/chunks/output-mode-C81KFNSN.js +0 -1
- package/dist/chunks/output-mode-eCEdqZ5e.js +0 -1
- package/dist/chunks/output-spill-CEsT1Aq_.js +0 -1
- package/dist/chunks/package-CZBWjlYb.js +0 -1
- package/dist/chunks/package-DxrXjUBK.js +0 -1
- package/dist/chunks/response-problem-D8bPgWGf.js +0 -1
- package/dist/chunks/runtime-identity-COBUpkxY.js +0 -1
- package/dist/chunks/runtime-identity-Cme_U1eh.js +0 -1
- package/dist/chunks/startup-auth-BTDK7zsC.js +0 -1
- package/dist/chunks/text-response-ChS157Jl.js +0 -15
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./package-
|
|
1
|
+
import{a as e}from"./package-DEeHDoOT.js";import{n as t,t as n}from"./auth-resolver-DwIGdlfd.js";import{o as r}from"./logging-CYw56CLn.js";import{o as i,t as a}from"./credential-redaction-unOGS2e0.js";import{execFile as o}from"node:child_process";import{dirname as s,join as c}from"node:path";import{platform as l}from"node:os";import{chmod as u,mkdir as d,readFile as f,rename as p,rm as m,stat as h,writeFile as g}from"node:fs/promises";import{AsyncLocalStorage as _}from"node:async_hooks";import{setTimeout as v}from"node:timers/promises";import{randomUUID as y}from"node:crypto";var b=2;function x(e,t){return w(e,t).redactedUrl}async function S(e,t,n){let r=w(e,t);return await C(new URL(r.openerUrl),n)}async function C(e,t){let n=t.environment??process.env,r=t.operatingSystem??l(),i=T(t.noBrowser,n,r);if(i!==null)return{state:`skipped`,reason:i};let a=E(r,e.toString());if(a===null)return{state:`failed`,reason:`unsupported browser-opening platform: ${r}`};try{return await D(a.command,a.arguments),{state:`opened`,reason:null}}catch{return{state:`failed`,reason:`browser opener failed`}}}function w(e,t){let{id:n,verificationUrl:r,pollSecret:a}=e,o,s;try{o=new URL(r),s=new URL(t)}catch{throw Error(`broker returned an invalid browser verification URL`)}if(s.username.length>0||s.password.length>0||s.pathname!==`/`||s.search.length>0||s.hash.length>0)throw Error(`configured browser origin must contain only an origin`);let c=i(s.hostname);if(s.protocol!==`https:`&&!(s.protocol===`http:`&&c))throw Error(`configured browser origin must use HTTPS except for loopback development`);let l=new URLSearchParams(o.hash.slice(1)),u=[...l.keys()],d=l.getAll(`cliAuthorizationId`),f=l.getAll(`browserSecret`),p=f[0]??``;if(o.origin!==s.origin||o.protocol!==s.protocol||o.username.length>0||o.password.length>0||o.pathname!==`/settings/developer`||o.search.length>0||u.length!==b||d.length!==1||d[0]!==n||f.length!==1||p.length===0||a.length===0||p===a)throw Error(`broker returned a browser verification URL outside the configured first-party approval flow`);let m;try{m=decodeURIComponent(r)}catch{throw Error(`broker returned a browser verification URL outside the configured first-party approval flow`)}if(r.includes(a)||m.includes(a))throw Error(`broker returned a browser verification URL outside the configured first-party approval flow`);let h=new URL(o);return h.hash=new URLSearchParams({cliAuthorizationId:n,browserSecret:`<redacted>`}).toString(),{openerUrl:r,redactedUrl:h.toString()}}function T(e,t,n){return e?`--no-browser was set`:n===`darwin`&&t.CODEX_SESSION_ID?`macOS Codex browser process boundary`:t.SSH_CONNECTION||t.SSH_CLIENT||t.SSH_TTY?`SSH/headless session detected`:(n===`linux`||n===`freebsd`)&&!t.DISPLAY&&!t.WAYLAND_DISPLAY?`no graphical display detected`:null}function E(e,t){return e===`darwin`?{command:`open`,arguments:[t]}:e===`win32`?{command:`rundll32.exe`,arguments:[`url.dll,FileProtocolHandler`,t]}:e===`linux`||e===`freebsd`?{command:`xdg-open`,arguments:[t]}:null}function D(e,t){return new Promise((n,r)=>{o(e,[...t],{timeout:5e3,windowsHide:!0},e=>e?r(e):n())})}var O=100,k=3e4,A=6e4,j=new _;function M(){return c(s(n()),`credentials.json`)}function N(e){return`OS keyring is unusable (${e}); the credential will be stored in ${M()} (mode 0600).\n`}async function P(e,t){let n=(await V())[e]?.[t];if(n!==void 0)return{record:{provider:`file`,value:n}};try{let n=await(await B(e,t)).getPassword()??void 0;return n===void 0?{}:{record:{provider:`keyring`,value:n}}}catch(e){return{keyringFailure:z(e)}}}async function F(e,t,n){if((await V())[e]?.[t]!==void 0)return await I(e,t,n,`file store holds this account`);let r;try{let i=await B(e,t);if(await i.setPassword(n),await i.getPassword()===n)return await W(e,t,void 0),`keyring`;r=`Error: keyring readback did not match`}catch(e){r=z(e,[n])}return await I(e,t,n,r)}async function I(e,t,n,r){if(await W(e,t,n),(await V())[e]?.[t]!==n)throw Error(`credential storage did not confirm a durable write (keyring: ${r}; file: readback did not match)`);return`file`}async function L(e,t){try{let n=await B(e,t),r;try{await n.deleteCredential()}catch(e){r=e}let i;try{i=await n.getPassword()??void 0}catch(e){throw Error(`OS keyring removal outcome is unknown (${z(r??e)})`,{cause:e})}if(i!==void 0)throw Error(`OS keyring did not confirm removal (${z(r)})`,r===void 0?void 0:{cause:r})}finally{await W(e,t,void 0)}}async function R(e,t){let n=`${t}:probe:${y()}`,r=`aventure-cli-credential-probe:${y()}`,i;try{let t=await B(e,n);await t.setPassword(r);let a=await(await B(e,n)).getPassword(),o=await t.deleteCredential(),s=await(await B(e,n)).getPassword()??void 0;if(a!==r)i=`Error: probe readback did not match`;else if(!o||s!==void 0)i=`Error: probe cleanup was not confirmed`;else return{provider:`keyring`}}catch(e){i=z(e,[r])}try{await U(async()=>{await W(e,n,r);let t=(await V())[e]?.[n];if(await W(e,n,void 0),t!==r)throw Error(`probe readback did not match`)})}catch(e){throw Error(`credential storage is unavailable (keyring: ${i}; file ${M()}: ${z(e,[r])})`,{cause:e})}return{provider:`file`,keyringFailure:i}}function z(e,t=[]){if(!(e instanceof Error))return`Error`;let n=e.name||`Error`,[r=``]=a(e,t).trim().split(`
|
|
2
2
|
`,1);return r&&r!==n?`${n}: ${r}`:n}async function B(e,t){let n=l(),r=n===`linux`||n===`freebsd`?T(!1,process.env,n):null;if(r!==null)throw Error(`OS keyring unlock prompt is unreachable (${r})`);let{AsyncEntry:i}=await import(`@napi-rs/keyring`);return new i(e,t)}async function V(){let e=M(),n;try{n=await f(e,`utf8`)}catch(e){if(t(e,`ENOENT`))return{};throw e}let r;try{r=JSON.parse(n)}catch(t){return await H(e,t)}return K(r)?r:await H(e,void 0)}async function H(n,i){let a=`${n}.corrupt-${new Date().toISOString().replace(/[:.]/gu,`-`)}`;try{await p(n,a)}catch(e){if(t(e,`ENOENT`))return{};throw Error(`${n} is not a valid credential file and could not be moved aside`,{cause:e})}return r({component:e().bin[0],event:`credential_file_quarantined`,message:`${n} is not a valid credential file; moved it to ${a} and continuing with an empty file store`,...i===void 0?{}:{error:i}}),{}}async function U(e){if(j.getStore()===!0)return await e();let n=`${M()}.lock`;await d(s(n),{recursive:!0,mode:448});let r=Date.now()+k,i=y();for(;;){try{await g(n,i,{flag:`wx`,mode:384});break}catch(e){if(!t(e,`EEXIST`))throw e}if(await h(n).then(e=>Date.now()-e.mtimeMs,()=>0)>A)await m(n,{force:!0});else if(Date.now()>r)throw Error(`credential store is locked by another CLI process (${n})`);else await v(O)}try{return await j.run(!0,e)}finally{await f(n,`utf8`).catch(()=>``)===i&&await m(n,{force:!0})}}async function W(e,t,n){await U(async()=>await G(e,t,n))}async function G(e,t,n){let r=M(),i=await V(),a={...i[e]};if(n===void 0?delete a[t]:a[t]=n,Object.keys(a).length===0?delete i[e]:i[e]=a,Object.keys(i).length===0){await m(r,{force:!0});return}await d(s(r),{recursive:!0,mode:448});let o=`${r}.${y()}.tmp`;await g(o,`${JSON.stringify(i,null,2)}\n`,{mode:384}),await u(o,384),await p(o,r)}function K(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.values(e).every(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.values(e).every(e=>typeof e==`string`))}export{U as a,S as c,P as i,x as l,N as n,F as o,R as r,C as s,L as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,E as t,S as n,_ as r,c as i,d as a,f as ee,g as o,i as s,n as c,s as l,t as u}from"./iso-l1vOidnb.js";import{t as d}from"./person-owner-BRGa5Dee.js";import{n as te,r as ne,t as f}from"./entity-Cg2n2mP0.js";import{t as re}from"./type-C0VR7LD-.js";var ie=s([`domicile`,`dominant`,`origin`]),ae=r({endDate:u().nullish(),id:a(),isCurrent:i(),role:ie.nullish(),startDate:u().nullish()}),oe=r({id:a().nullish(),name:n()}),se=r({countryCodeChar2:n().nullish(),countryCodeChar3:n().nullish(),id:a().nullish(),name:n(),unRegion:n().nullish(),unSubregion:n().nullish()}),ce=r({id:a().nullish(),name:n(),stateAbbrev:n().nullish()}),p=r({address:a().nullish(),addressLine1:n().nullish(),addressLine2:n().nullish(),association:l(ae).optional(),city:oe.nullish(),country:se.nullish(),countryAbbrev:n().nullish(),createdAt:c({offset:!0}).nullish(),fullAddress:n().nullish(),id:a().nullish(),isCurrent:i().nullish(),isHq:i().nullish(),isPrimary:i().nullish(),latitude:o().nullish(),longitude:o().nullish(),postalCode:n().nullish(),state:ce.nullish(),stateAbbrev:n().nullish(),street:n().nullish(),updatedAt:c({offset:!0}).nullish()}),m=s([`editorial`,`standardized`]),h=Object.assign(e([m,n()]),{enum:m.enum}),le=r({isCurrent:i().nullish(),isPrimary:i().nullish(),name:n().max(255),registry:h}),g=ee(le,r({bucket:n().nullish(),classificationId:a().nullish(),createdAt:c({offset:!0}).nullish(),id:a(),isCurrent:i().nullish(),isPrimary:i().nullish(),name:n().max(255),slug:n().regex(/^[a-z0-9_-]+$/).max(255).nullish(),type:n(),updatedAt:c({offset:!0}).nullish()})),_=r({category:n(),classificationId:a().nullish(),code:a().nullish(),createdAt:c({offset:!0}).nullish(),id:a(),isCurrent:i().nullish(),isPrimary:i().nullish(),level:a().nullish(),name:n().max(255),registry:h,updatedAt:c({offset:!0}).nullish()}),ue=r({geoLocationExposure:l(g).default([]).optional(),industry:l(g).default([]).optional(),mainProduct:l(g).default([]).optional(),standardizedClassification:l(_).default([]).optional(),tag:l(g).default([]).optional(),typeCustomer:l(g).default([]).optional(),typeModel:l(g).default([]).optional(),typeOwnership:l(g).default([]).optional(),typeRevenue:l(g).default([]).optional(),typeTechnologyUsed:l(g).default([]).optional()}),v=s(`Angel.Pre-Seed.Seed.Series A.Series B.Series C.Series D.Series E.Series F.Series G.Series H.Series I.Series J.Series K.Series L.Series M.Series N.Series O.Series P.Series Q.Series R.Series S.Series T.Series U.Series V.Series W.Series X.Series Y.Series Z.Late Stage Private.Investment Firm.Fund.Nonprofit.Government.Public.Acquired.Acquired Subsidiary.Bankrupt`.split(`.`)),y=Object.assign(e([v,n()]),{enum:v.enum}),b=r({currency:n().nullish(),fundingRoundCount:a(),investorCount:a(),latestValuation:o().nullish(),mostRecentAmount:o().nullish(),mostRecentDate:u().nullish(),stage:y.nullish(),totalRaised:o(),totalRaisedUsd:o().nullish(),unconvertedRoundCount:a()}),x=r({expanded:n().nullish(),generatedDescription:n().nullish(),short:n().nullish()}),de=s([`cloudflare`,`akamai`,`fastly`,`awsCloudfront`,`vercel`,`netlify`,`sucuri`,`incapsula`,`bunny`,`keycdn`,`cdn77`,`gcore`,`cdnetworks`,`azureCdn`,`leaseweb`,`digitalocean`,`stackpath`,`googlecloudCdn`,`none`,`unknown`]),fe=s([`static`,`jsRequired`,`jsEnhanced`]),S=n(),C=r({crawlCdnProvider:de.nullish(),crawlRenderMode:fe.nullish(),createdAt:c({offset:!0}).nullish(),id:a().nullish(),isCurrent:i().nullish(),isPrimary:i().nullish(),owner:d.nullish(),sourceId:n().nullish(),status:n().nullish(),statusChecked:c({offset:!0}).nullish(),updatedAt:c({offset:!0}).nullish(),url:n(),urlType:S}),w=r({address:l(p),classification:ue,fundingDetail:b.nullish(),headquartersAddressId:a().nullish(),headquartersRemoteAsOf:c({offset:!0}).nullish(),text:x,urlLink:l(C)}),T=s([`SAFE`,`Convertible Note`,`Preferred Stock`,`Common Stock`,`Other Equity`,`Bond`,`Loan`,`Other Debt`,`Grant`,`Token`]),E=r({amountInvested:o().nullish(),createdAt:c({offset:!0}),financialInstrumentType:T.nullish(),id:t(),investor:d,investorName:n().nullish(),investorSlug:n().regex(/^[a-z0-9_-]+$/).max(255).nullish(),leadInvestor:i(),transactionId:t(),updatedAt:c({offset:!0})}),D=r({core:f,fundingDetail:b.nullish()}),O=r({lastFetchedAt:c({offset:!0}).nullish(),publishedAt:c({offset:!0}).nullish(),recordedAt:c({offset:!0}),sourceDetail:n()}),k=s([`High`,`Medium`,`Low`,`Verified`]),pe=s([`direct`,`managedFund`]),A=r({round:n()}),j=r({amountInvested:o().nullish(),attributionType:pe,beneficialEntityId:t().nullish(),fundManagerRelationshipId:a().nullish(),joinId:t(),leadInvestor:i(),recordedEntityId:t().nullish(),round:A.nullish(),transactionId:t()}),M=r({amountRaised:o().int().nullish(),createdAt:c({offset:!0}).nullish(),currency:n().nullish(),dataConfidence:k.nullish(),dateAnnounced: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(),dateFundingComplete: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(),dateInvestorExit:c({offset:!0}).nullish(),entity:D.nullish(),financialInstrumentType:T.nullish(),id:t(),investor:l(E).nullish(),investorAttribution:j.nullish(),investorCount:a().nullish(),publicSource:O.nullish(),round:n().nullish(),roundType:n().nullish(),sourceAttribution:l(j),updatedAt:c({offset:!0}).nullish(),valuationPostMoney:o().int().nullish(),valuationPreMoney:o().int().nullish()}),N=r({entity:f,headquarters:p.nullish(),relationshipType:s([`fundManagerFirm`,`productService`])}),me=r({fundingStage:y.nullish(),ownership:l(n()),pricingModel:l(n()),sellsTo:l(n()),totalRaised:o().nullish(),website:n().nullish()}),P=r({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(),comparisonSignals:me.nullish(),createdAt:c({offset:!0}).nullish(),detail:n().nullish(),entity:f,id:a().nullish(),isCurrent:i().nullish(),isPrimary:i().nullish(),publicSource:O.nullish(),get relationship(){return l(P)},relationshipType:n(),sourceEntityId:t().nullish(),targetEntityId:t().nullish(),updatedAt:c({offset:!0}).nullish()}),F=P,I=r({accelerator:f,acceleratorName:n(),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)))?)?)?$/),batch:n().nullish(),id:n(),program:n().nullish(),status:n().nullish()}),L=s([`text`,`numeric`,`monetary`,`percentage`,`date`]),he=s([`pastDue`,`withinThreeMonths`,`threeToSixMonths`,`sixToTwelveMonths`,`twelveToTwentyFourMonths`,`beyondTwoYears`]),ge=r({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)))?)?)?$/),bucket:he,monthsFromNow:a(),targetDate:c({offset:!0})}),R=r({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)))?)?)?$/).nullish(),currentEligible:i().nullish(),derivedRange:ge.nullish(),discreteValue:o().nullish(),entityId:t(),id:a(),publicSource:O.nullish(),textValue:n().nullish(),typeResearchDetail:n(),updatedAt:c({offset:!0}).nullish(),valueResearchDetail:n().nullish(),valueType:L}),z=r({characterCount:a(),meetsRequirements:i(),violation:l(n()),wordCount:a()}),B=r({compliance:z.nullish(),entityId:t(),id:a(),publicSource:O.nullish(),text:n(),textType:n(),updatedAt:c({offset:!0}).nullish()}),_e=r({acceleratorParticipation:l(I),detail:l(R),snippet:l(B)}),V=r({author:n().nullish(),category:n().nullish(),createdAt:c({offset:!0}).nullish(),excerpt:n().nullish(),externalNewsArticle:i().nullish(),id:a(),newsImageThumbnail:n().nullish(),newsUrlOriginal:n().nullish(),publication:n().nullish(),publishedAt:c({offset:!0}).nullish(),slug:n().regex(/^[a-z0-9_-]+$/).max(255).nullish(),title:n(),updatedAt:c({offset:!0}).nullish()}),ve=s([`aventureBlog`,`personalBlog`,`employerBlog`,`linkedin`,`xTwitter`,`medium`,`substack`,`other`]),H=r({author:n().nullish(),createdAt:c({offset:!0}),externalId:n().nullish(),id:t(),isCurrent:i(),lastFetchedAt:c({offset:!0}).nullish(),mentionedEntityId:l(t()),mentionedPersonId:l(t()),owner:d,publishedAt:c({offset:!0}).nullish(),summary:n().nullish(),summaryGeneratedAt:c({offset:!0}).nullish(),title:n().nullish(),topic:n().nullish(),type:ve,updatedAt:c({offset:!0}),url:n()}),ye=r({count:a(),stage:n()}),be=r({attributedInvestmentCount:a(),averageAmountInvestedUsd:o().nullish(),currentPortfolioCount:a(),largestAmountInvestedUsd:o().nullish(),portfolioCompanyCount:a(),smallestAmountInvestedUsd:o().nullish(),topInvestmentStage:l(ye),totalAmountInvestedUsd:o().nullish(),totalInvestment:a(),totalPortfolioExit:a(),totalWriteOff:a()}),xe=s([`nickname`,`maidenName`,`formerName`,`stageName`]),U=r({displayable:i().nullish(),name:n(),type:xe.nullish()}),W=r({isMonogram:i(),picture:n().nullish()}),G=r({associationId:a(),endDate: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(),entityAddress:l(p),entityId:t(),entityLogo:ne,entityName:n().nullish(),entityOperatingStatus:n().nullish(),entitySlug:n().regex(/^[a-z0-9_-]+$/).max(255),entityType:re.nullish(),entityUrlLink:l(C),isCurrent:i().nullish(),personAddress:l(p),personId:t(),personImage:W,personName:n(),personSlug:n().regex(/^[a-z0-9_-]+$/).max(255),personUrlLink:l(C),score:a().nullish(),startDate: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(),titleFunction:n().nullish(),titleId:a().nullish(),titleLevel:n().nullish(),titleName:n().nullish()}),Se=r({address:l(p),urlLink:l(C)}),K=s([`low`,`medium`,`high`]),Ce=r({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)))?)?)?$/).nullish(),currentEligible:i().nullish(),dataConfidence:K.nullish(),dateValue: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(),numericValue:o().nullish(),referenceValue:n().nullish(),source:n().nullish(),textValue:n().nullish(),updatedAt:c({offset:!0}).nullish(),valueType:L}),q=r({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)))?)?)?$/).nullish(),fact:Ce,id:n()}),J=r({isCurrent:i().nullish(),personId:t(),personImage:W,personName:n(),personSlug:n().regex(/^[a-z0-9_-]+$/).max(255),titleName:n().nullish()}),we=r({entity:D,keyPerson:l(J)}),Te=r({colleague:l(J),employeeCount:q.nullish(),entity:D,primaryAddress:p.nullish(),recentNews:l(V),similarEntity:l(we)}),Ee=r({overlapCount:a(),person:J,round:n().nullish(),sharedEntity:f.nullish(),transactionId:t().nullish()}),De=r({careerContext:l(Te),coInvestor:l(Ee),computedAt:c({offset:!0}).nullish()}),Oe=r({amountRaised:o().nullish(),dateAnnounced: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(),id:t(),image:ne,investorCount:a().nullish(),nameBrand:n(),round:n().nullish(),status:n().nullish(),valuationPostMoney:o().nullish()}),ke=r({entity:f,headquartersCity:n().nullish(),headquartersCountry:n().nullish(),headquartersRegion:n().nullish(),industry:n().nullish()}),Y=r({amount:o().nullish(),company:ke,date: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(),fundraiseTransaction:Oe.nullish(),fundraiseTransactionId:t(),id:n(),investmentDate:c({offset:!0}),investorAttribution:j.nullish(),round:n().nullish()}),X=s([`entity`,`person`,`newsArticle`,`blogPost`,`text`,`classificationTag`,`classificationCode`,`product`,`service`,`agentHelpDoc`,`researchSnippet`,`sourceDocument`]),Ae=Object.assign(e([X,n()]),{enum:X.enum}),Z=r({computedAt:c({offset:!0}),cosineDistance:o(),cosineScore:o(),modelVersion:n(),rank:a(),sourceHash:n(),sourceId:n(),sourceType:Ae}),Q=r({bioUpdatedAt:c({offset:!0}).nullish(),createdAt:c({offset:!0}).nullish(),gender:n().nullish(),id:t(),image:W,lastModifiedAt:c({offset:!0}).nullish(),nameAlias:l(U),nameFirst:n().nullish(),nameFull:n(),nameLast:n().nullish(),nameMiddle:n().nullish(),nickname:n().nullish(),publicId:n().regex(/^p[0-9A-Za-z]{12}$/).nullish(),semanticMatch:Z.nullish(),slug:n().regex(/^[a-z0-9_-]+$/).max(255),suffix:n().nullish(),text:x,updatedAt:c({offset:!0}).nullish()}),je=s([`precomputed`,`live`]),Me=r({compositeScore:o().nullish(),cosineScore:o().nullish(),matchedSectionWeight:o().nullish(),origin:je,rank:a(),sharedSectionCount:a().nullish()}),$=r({currentRole:G.nullish(),person:Q,similarity:Me}),Ne=r({articleCount:a().nullish(),association:l(G),blogPost:l(H).nullish(),core:Q,enrichment:Se,graph:De.nullish(),investment:l(Y),investorActivity:be.nullish(),nameAlias:l(U),similar:l($).nullish()}),Pe=s([`ein`,`secCik`,`ticker`,`lei`,`duns`,`isin`,`cusip`,`crd`,`orcid`,`fdicCert`,`ncuaCharter`,`rssd`,`holdingCompanyRssd`,`signalNfxFirm`,`signalNfxPerson`,`signalNfxCompany`,`folk`]),Fe=Object.assign(e([Pe,n()]),{enum:Pe.enum}),Ie=r({createdAt:c({offset:!0}),id:a(),identifier:n(),idType:Fe,owner:d,source:n().nullish(),updatedAt:c({offset:!0})}),Le=r({core:f,enrichment:w,fundraiseRound:l(M),newsArticle:l(V),person:l(Ne),provider:N.nullish(),publicUrl:n().nullish(),relationship:l(F),research:_e,sitemap:te,uniqueId:l(Ie)});export{g as A,O as C,S as D,C as E,b as O,k as S,w as T,F as _,Q as a,j as b,q as c,H as d,V as f,I as g,R as h,$ as i,_ as k,K as l,z as m,Ie as n,Z as o,B as p,Ne as r,Y as s,Le as t,G as u,N as v,E as w,A as x,M as y};
|
|
1
|
+
import{C as e,E as t,S as n,_ as r,c as i,d as a,f as ee,g as o,i as s,n as c,s as l,t as u}from"./iso-l1vOidnb.js";import{t as d}from"./person-owner-BRGa5Dee.js";import{n as te,r as ne,t as f}from"./entity-Cg2n2mP0.js";import{t as re}from"./type-C0VR7LD-.js";var ie=s([`domicile`,`dominant`,`origin`]),ae=r({endDate:u().nullish(),id:a(),isCurrent:i(),role:ie.nullish(),startDate:u().nullish()}),oe=r({id:a().nullish(),name:n()}),se=r({countryCodeChar2:n().nullish(),countryCodeChar3:n().nullish(),id:a().nullish(),name:n(),unRegion:n().nullish(),unSubregion:n().nullish()}),ce=r({id:a().nullish(),name:n(),stateAbbrev:n().nullish()}),p=r({address:a().nullish(),addressLine1:n().nullish(),addressLine2:n().nullish(),association:l(ae).optional(),city:oe.nullish(),country:se.nullish(),countryAbbrev:n().nullish(),createdAt:c({offset:!0}).nullish(),fullAddress:n().nullish(),id:a().nullish(),isCurrent:i().nullish(),isHq:i().nullish(),isPrimary:i().nullish(),latitude:o().nullish(),longitude:o().nullish(),postalCode:n().nullish(),state:ce.nullish(),stateAbbrev:n().nullish(),street:n().nullish(),updatedAt:c({offset:!0}).nullish()}),m=s([`editorial`,`standardized`]),h=Object.assign(e([m,n()]),{enum:m.enum}),le=r({isCurrent:i().nullish(),isPrimary:i().nullish(),name:n().max(255),registry:h}),g=ee(le,r({bucket:n().nullish(),classificationId:a().nullish(),createdAt:c({offset:!0}).nullish(),id:a(),isCurrent:i().nullish(),isPrimary:i().nullish(),name:n().max(255),slug:n().regex(/^[a-z0-9_-]+$/).max(255).nullish(),type:n(),updatedAt:c({offset:!0}).nullish()})),_=r({category:n(),classificationId:a().nullish(),code:a().nullish(),createdAt:c({offset:!0}).nullish(),id:a(),isCurrent:i().nullish(),isPrimary:i().nullish(),level:a().nullish(),name:n().max(255),registry:h,updatedAt:c({offset:!0}).nullish()}),ue=r({geoLocationExposure:l(g).default([]).optional(),industry:l(g).default([]).optional(),mainProduct:l(g).default([]).optional(),standardizedClassification:l(_).default([]).optional(),tag:l(g).default([]).optional(),typeCustomer:l(g).default([]).optional(),typeModel:l(g).default([]).optional(),typeOwnership:l(g).default([]).optional(),typeRevenue:l(g).default([]).optional(),typeTechnologyUsed:l(g).default([]).optional()}),v=s(`Angel.Pre-Seed.Seed.Series A.Series B.Series C.Series D.Series E.Series F.Series G.Series H.Series I.Series J.Series K.Series L.Series M.Series N.Series O.Series P.Series Q.Series R.Series S.Series T.Series U.Series V.Series W.Series X.Series Y.Series Z.Late Stage Private.Investment Firm.Fund.Nonprofit.Government.Public.Acquired.Acquired Subsidiary.Bankrupt`.split(`.`)),y=Object.assign(e([v,n()]),{enum:v.enum}),b=r({currency:n().nullish(),fundingRoundCount:a(),investorCount:a(),latestValuation:o().nullish(),mostRecentAmount:o().nullish(),mostRecentDate:u().nullish(),stage:y.nullish(),totalRaised:o(),totalRaisedUsd:o().nullish(),unconvertedRoundCount:a()}),x=r({expanded:n().nullish(),generatedDescription:n().nullish(),short:n().nullish()}),de=s([`cloudflare`,`akamai`,`fastly`,`awsCloudfront`,`vercel`,`netlify`,`sucuri`,`incapsula`,`bunny`,`keycdn`,`cdn77`,`gcore`,`cdnetworks`,`azureCdn`,`leaseweb`,`digitalocean`,`stackpath`,`googlecloudCdn`,`none`,`unknown`]),fe=s([`static`,`jsRequired`,`jsEnhanced`]),S=n(),C=r({crawlCdnProvider:de.nullish(),crawlRenderMode:fe.nullish(),createdAt:c({offset:!0}).nullish(),id:a().nullish(),isCurrent:i().nullish(),isPrimary:i().nullish(),owner:d.nullish(),sourceId:n().nullish(),status:n().nullish(),statusChecked:c({offset:!0}).nullish(),updatedAt:c({offset:!0}).nullish(),url:n(),urlType:S}),w=r({address:l(p),classification:ue,fundingDetail:b.nullish(),headquartersAddressId:a().nullish(),headquartersRemoteAsOf:c({offset:!0}).nullish(),text:x,urlLink:l(C)}),T=s([`SAFE`,`Convertible Note`,`Preferred Stock`,`Common Stock`,`Other Equity`,`Bond`,`Loan`,`Other Debt`,`Grant`,`Token`]),E=r({amountInvested:o().nullish(),createdAt:c({offset:!0}),financialInstrumentType:T.nullish(),id:t(),investor:d,investorName:n().nullish(),investorSlug:n().regex(/^[a-z0-9_-]+$/).max(255).nullish(),leadInvestor:i(),transactionId:t(),updatedAt:c({offset:!0})}),D=r({core:f,fundingDetail:b.nullish()}),O=r({lastFetchedAt:c({offset:!0}).nullish(),publishedAt:c({offset:!0}).nullish(),recordedAt:c({offset:!0}),sourceDetail:n()}),k=s([`High`,`Medium`,`Low`,`Verified`]),pe=s([`direct`,`managedFund`]),A=r({round:n()}),j=r({amountInvested:o().nullish(),attributionType:pe,beneficialEntityId:t().nullish(),fundManagerRelationshipId:a().nullish(),joinId:t(),leadInvestor:i(),recordedEntityId:t().nullish(),round:A.nullish(),transactionId:t()}),M=r({amountRaised:o().int().nullish(),createdAt:c({offset:!0}).nullish(),currency:n().nullish(),dataConfidence:k.nullish(),dateAnnounced: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(),dateFundingComplete: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(),dateInvestorExit:c({offset:!0}).nullish(),entity:D.nullish(),financialInstrumentType:T.nullish(),id:t(),investor:l(E).nullish(),investorAttribution:j.nullish(),investorCount:a().nullish(),publicSource:O.nullish(),round:n().nullish(),roundType:n().nullish(),sourceAttribution:l(j),updatedAt:c({offset:!0}).nullish(),valuationPostMoney:o().int().nullish(),valuationPreMoney:o().int().nullish()}),N=r({entity:f,headquarters:p.nullish(),relationshipType:s([`fundManagerFirm`,`productService`])}),me=r({fundingStage:y.nullish(),ownership:l(n()),pricingModel:l(n()),sellsTo:l(n()),totalRaised:o().nullish(),website:n().nullish()}),P=r({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(),comparisonSignals:me.nullish(),createdAt:c({offset:!0}).nullish(),detail:n().nullish(),entity:f,id:a().nullish(),isCurrent:i().nullish(),isPrimary:i().nullish(),publicSource:O.nullish(),get relationship(){return l(P)},relationshipType:n(),sourceEntityId:t().nullish(),targetEntityId:t().nullish(),updatedAt:c({offset:!0}).nullish()}),F=P,I=r({accelerator:f,acceleratorName:n(),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)))?)?)?$/),batch:n().nullish(),id:n(),program:n().nullish(),status:n().nullish()}),L=s([`text`,`numeric`,`monetary`,`percentage`,`date`]),he=s([`pastDue`,`withinThreeMonths`,`threeToSixMonths`,`sixToTwelveMonths`,`twelveToTwentyFourMonths`,`beyondTwoYears`]),ge=r({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)))?)?)?$/),bucket:he,monthsFromNow:a(),targetDate:c({offset:!0})}),R=r({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)))?)?)?$/).nullish(),currentEligible:i().nullish(),derivedRange:ge.nullish(),discreteValue:o().nullish(),entityId:t(),id:a(),publicSource:O.nullish(),textValue:n().nullish(),typeResearchDetail:n(),updatedAt:c({offset:!0}).nullish(),valueResearchDetail:n().nullish(),valueType:L}),z=r({characterCount:a(),meetsRequirements:i(),violation:l(n()),wordCount:a()}),B=r({compliance:z.nullish(),entityId:t(),id:a(),publicSource:O.nullish(),text:n(),textType:n(),updatedAt:c({offset:!0}).nullish()}),_e=r({acceleratorParticipation:l(I),detail:l(R),snippet:l(B)}),V=r({author:n().nullish(),category:n().nullish(),createdAt:c({offset:!0}).nullish(),excerpt:n().nullish(),externalNewsArticle:i().nullish(),id:a(),newsImageThumbnail:n().nullish(),newsUrlOriginal:n().nullish(),publication:n().nullish(),publishedAt:c({offset:!0}).nullish(),slug:n().regex(/^[a-z0-9_-]+$/).max(255).nullish(),title:n(),updatedAt:c({offset:!0}).nullish()}),ve=s([`aventureBlog`,`personalBlog`,`employerBlog`,`linkedin`,`xTwitter`,`medium`,`substack`,`other`]),H=r({author:n().nullish(),createdAt:c({offset:!0}),externalId:n().nullish(),id:t(),isCurrent:i(),lastFetchedAt:c({offset:!0}).nullish(),mentionedEntityId:l(t()),mentionedPersonId:l(t()),owner:d,publishedAt:c({offset:!0}).nullish(),summary:n().nullish(),summaryGeneratedAt:c({offset:!0}).nullish(),title:n().nullish(),topic:n().nullish(),type:ve,updatedAt:c({offset:!0}),url:n()}),ye=r({count:a(),stage:n()}),be=r({attributedInvestmentCount:a(),averageAmountInvestedUsd:o().nullish(),currentPortfolioCount:a(),largestAmountInvestedUsd:o().nullish(),portfolioCompanyCount:a(),smallestAmountInvestedUsd:o().nullish(),topInvestmentStage:l(ye),totalAmountInvestedUsd:o().nullish(),totalInvestment:a(),totalPortfolioExit:a(),totalWriteOff:a()}),xe=s([`nickname`,`maidenName`,`formerName`,`stageName`]),U=r({displayable:i().nullish(),name:n(),type:xe.nullish()}),W=r({isMonogram:i(),picture:n().nullish()}),G=r({associationId:a(),endDate: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(),entityAddress:l(p),entityId:t(),entityLogo:ne,entityName:n().nullish(),entityOperatingStatus:n().nullish(),entitySlug:n().regex(/^[a-z0-9_-]+$/).max(255),entityType:re.nullish(),entityUrlLink:l(C),isCurrent:i().nullish(),personAddress:l(p),personId:t(),personImage:W,personName:n(),personSlug:n().regex(/^[a-z0-9_-]+$/).max(255),personUrlLink:l(C),score:a().nullish(),startDate: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(),titleFunction:n().nullish(),titleId:a().nullish(),titleLevel:n().nullish(),titleName:n().nullish()}),Se=r({address:l(p),urlLink:l(C)}),K=s([`low`,`medium`,`high`]),Ce=r({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)))?)?)?$/).nullish(),currentEligible:i().nullish(),dataConfidence:K.nullish(),dateValue: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(),numericValue:o().nullish(),referenceValue:n().nullish(),source:n().nullish(),textValue:n().nullish(),updatedAt:c({offset:!0}).nullish(),valueType:L}),q=r({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)))?)?)?$/).nullish(),fact:Ce,id:n()}),J=r({isCurrent:i().nullish(),personId:t(),personImage:W,personName:n(),personSlug:n().regex(/^[a-z0-9_-]+$/).max(255),titleName:n().nullish()}),we=r({entity:D,keyPerson:l(J)}),Te=r({colleague:l(J),employeeCount:q.nullish(),entity:D,primaryAddress:p.nullish(),recentNews:l(V),similarEntity:l(we)}),Ee=r({overlapCount:a(),person:J,round:n().nullish(),sharedEntity:f.nullish(),transactionId:t().nullish()}),De=r({careerContext:l(Te),coInvestor:l(Ee),computedAt:c({offset:!0}).nullish()}),Oe=r({amountRaised:o().nullish(),dateAnnounced: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(),id:t(),image:ne,investorCount:a().nullish(),nameBrand:n(),round:n().nullish(),status:n().nullish(),valuationPostMoney:o().nullish()}),ke=r({entity:f,headquartersCity:n().nullish(),headquartersCountry:n().nullish(),headquartersRegion:n().nullish(),industry:n().nullish()}),Y=r({amount:o().nullish(),company:ke,date: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(),fundraiseTransaction:Oe.nullish(),fundraiseTransactionId:t(),id:n(),investmentDate:c({offset:!0}),investorAttribution:j.nullish(),round:n().nullish()}),X=s([`entity`,`person`,`newsArticle`,`blogPost`,`text`,`classificationTag`,`classificationCode`,`product`,`service`,`agentHelpDoc`,`researchSnippet`,`sourceDocument`]),Ae=Object.assign(e([X,n()]),{enum:X.enum}),Z=r({computedAt:c({offset:!0}),cosineDistance:o(),cosineScore:o(),modelVersion:n(),rank:a(),sourceHash:n(),sourceId:n(),sourceType:Ae}),Q=r({bioUpdatedAt:c({offset:!0}).nullish(),createdAt:c({offset:!0}).nullish(),gender:n().nullish(),id:t(),image:W,lastModifiedAt:c({offset:!0}).nullish(),nameAlias:l(U),nameFirst:n().nullish(),nameFull:n(),nameLast:n().nullish(),nameMiddle:n().nullish(),nickname:n().nullish(),publicId:n().regex(/^p[0-9A-Za-z]{12}$/).nullish(),semanticMatch:Z.nullish(),slug:n().regex(/^[a-z0-9_-]+$/).max(255),suffix:n().nullish(),text:x,updatedAt:c({offset:!0}).nullish()}),je=s([`precomputed`,`live`]),Me=r({compositeScore:o().nullish(),cosineScore:o().nullish(),matchedSectionWeight:o().nullish(),origin:je,rank:a(),sharedSectionCount:a().nullish()}),$=r({currentRole:G.nullish(),person:Q,similarity:Me}),Ne=r({articleCount:a().nullish(),association:l(G),blogPost:l(H).nullish(),core:Q,enrichment:Se,graph:De.nullish(),investment:l(Y),investorActivity:be.nullish(),nameAlias:l(U),similar:l($).nullish()}),Pe=s([`ein`,`secCik`,`ticker`,`lei`,`duns`,`isin`,`cusip`,`crd`,`firmCrd`,`secPrivateFundId`,`npi`,`ipedsUnitId`,`ncesSchoolId`,`ncesLeaId`,`ncesPssId`,`orcid`,`fdicCert`,`ncuaCharter`,`rssd`,`holdingCompanyRssd`,`signalNfxFirm`,`signalNfxPerson`,`signalNfxCompany`,`folk`]),Fe=Object.assign(e([Pe,n()]),{enum:Pe.enum}),Ie=r({createdAt:c({offset:!0}),id:a(),identifier:n(),idType:Fe,owner:d,source:n().nullish(),updatedAt:c({offset:!0})}),Le=r({core:f,enrichment:w,fundraiseRound:l(M),newsArticle:l(V),person:l(Ne),provider:N.nullish(),publicUrl:n().nullish(),relationship:l(F),research:_e,sitemap:te,uniqueId:l(Ie)});export{g as A,O as C,S as D,C as E,b as O,k as S,w as T,F as _,Q as a,j as b,q as c,H as d,V as f,I as g,R as h,$ as i,_ as k,K as l,z as m,Ie as n,Z as o,B as p,Ne as r,Y as s,Le as t,G as u,N as v,E as w,A as x,M as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{t as EntityDetailSchema}from"./detail-DFVJrldR.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,r as t}from"./result-envelope-
|
|
1
|
+
import{c as e,r as t}from"./result-envelope-CB5fGScF.js";var n=[`localhost`,`127.0.0.1`,`0.0.0.0`,`[::1]`];function r(e){let t=e.trim().toLowerCase().replace(/^https?:\/\//,``).split(`/`)[0]??``;return n.some(e=>t===e||t.startsWith(`${e}:`))}var i={authToken:`AUTH_TOKEN`},a=[i.authToken],o=`production`,s={production:{host:`api.aventure.vc`},local:{host:`localhost:8080`}},c=`https://${s.production.host}`,l=`https://aventure.vc`;function u(){return{host:v(process.env.API_URL)??g(process.env.API_ENV)?.host??f(),userBearerToken:process.env[i.authToken]}}function d(){let e=u().host,t=r(e)?null:h(process.env.API_ENV);return(t===null?void 0:s[t]?.host)??e}function f(){let e=s[o]?.host;if(e===void 0)throw Error(`Default API environment is unavailable`);return e}function p(e){if(!e.userBearerToken)throw Error(`Sign in with \`auth login\`, or set ${i.authToken} to an aVenture API key from ${l}/settings/api-keys`);return{Authorization:`Bearer ${e.userBearerToken}`}}function m(){return Object.keys(s)}function h(e){let t=e?.trim().toLowerCase();if(!t)return null;switch(t){case`stage`:case`staging`:return`staging`;case`prod`:case`production`:return`production`;case`dev`:case`development`:case`localhost`:case`local`:return`local`;default:return null}}function g(e){let t=h(e);if(t===null){if(!e?.trim())return null;throw Error(`Unknown aVenture environment '${e}'. Use one of: ${m().join(`, `)}`)}let n=s[t];if(n===void 0)throw Error(`Environment '${t}' is unavailable in this distribution`);return n}function _(n){try{let t=u();return e(`env ready`,n===`none`?{env:t,headers:{},credential:null}:{env:t,headers:p(t),credential:i.authToken})}catch(e){return t(e.message)}}function v(...e){return e.find(e=>e!==void 0&&e.trim().length>0)}export{l as a,m as c,d,u as f,c as i,h as l,a as n,p as o,r as p,o as r,f as s,i as t,_ as u};
|
package/dist/chunks/{generated-option-order-C7NwXQ-p.js → generated-option-order-DSRbIIDu.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,r as t}from"./result-envelope-
|
|
1
|
+
import{c as e,r as t}from"./result-envelope-CB5fGScF.js";import{t as n}from"./private-readback-DX42Bf2b.js";import{a as r,c as i,l as a,s as o}from"./cli-help-policy-BSp1_9pV.js";function s(n,r,i){let a={...i};for(let e of r.parameter){let r=e.envName;if(r===void 0)continue;let i=process.env[r]?.trim();if(i===void 0||i.length===0)continue;let o=a[e.optionKey];if(o!==void 0&&(typeof o!=`string`||o!==i))return{...t(`${n} ${e.flag.split(` `)[0]??e.name} conflicts with ${r}; omit the flag or use ${i}.`),data:a};o===void 0&&(a[e.optionKey]=i)}return e(`Environment-bound options applied`,a)}function c(e,t,n){if(!D(n))return null;for(let r of t.parameter){let t=r.envName,i=t===void 0?void 0:process.env[t]?.trim();if(t===void 0||i===void 0||i.length===0||!S(n,r.name))continue;let a=x(n,r.name);if(typeof a!=`string`||a!==i)return`${e} ${r.name} in --from-file conflicts with ${t}; omit the field or use ${i}.`}return null}function l(e){let t=new Set(e.parameter.map(({name:e})=>e));return e.kind===`multipart`?e.requiredPath:e.requiredPath.filter(e=>!t.has(e))}function u(t,n,r,i=!1){if(i||!T(n)||!Array.isArray(r))return O(t,n,r);for(let[e,i]of r.entries()){let r=O(t,n,i,e);if(!r.ok)return r}return e(`Body value assigned`,null)}function d(e,t,n,r){return O(e,t,r,n)}function f(e){let t=[];for(let n of e.split(`.`)){let e=A(n);if(t.push(e.key),e.isArray)return t.join(`.`)}return null}function p(e,t){let n=f(t);if(n===null)return null;let r=b(e,n.split(`.`));return Array.isArray(r)?{path:n,rowCount:r.length,firstHole:y(r)}:null}function m(n,r){if(T(n.name)||n.schemaType===`array`)return e(`Repeated body option selected`,typeof r==`string`?[r]:r);if(!Array.isArray(r))return e(`Scalar body option selected`,r);let i=n.flag.split(` `)[0]??n.name;return r.length===1?e(`Scalar body option selected`,r[0]):t(`${i} was already given; pass it once.`)}var h=/^(?<row>\d+):(?<item>.*)$/su;function g(e,t){let n=f(e.name);if(e.schemaType!==`array`||n===null||t===void 0||typeof t==`boolean`)return null;let r=new Map,i=[];for(let e of typeof t==`string`?[t]:t){let t=h.exec(e)?.groups,n=t?.row,a=t?.item;if(n===void 0||a===void 0){i.push(e);continue}let o=r.get(Number(n));o===void 0?r.set(Number(n),[a]):o.push(a)}return r.size===0?null:{container:n,rows:r,plain:i}}function _(e,t,n){let r=0;for(let i of e.parameter){let e=t[i.optionKey];e!==void 0&&typeof e!=`boolean`&&f(i.name)===n&&(r=Math.max(r,typeof e==`string`?1:e.length))}return r}function v(e,n,r,i){for(let a of n.parameter){let n=r[a.optionKey];if(n===void 0)continue;let o=p(i,a.name);if(o===null)continue;if(o.firstHole!==null)return t(`${e} has no ${o.path}[] row ${o.firstHole} — number ${o.path}[] rows from 0 with no gaps.`);if(a.schemaType!==`array`||o.rowCount<=1||g(a,n)!==null)continue;let s=a.flag.split(` `)[0]??a.name;return t(`${s} fills one ${o.path}[] row's list, so ${e} cannot also build ${o.rowCount} ${o.path}[] rows from direct options — prefix each value with its 0-based ${o.path}[] row index, as 0:value, or pass the rows with --from-file.`)}return null}function y(e){for(let t=0;t<e.length;t+=1)if(e[t]===void 0)return t;return null}function b(e,t){let n=e;for(let e of t){if(!D(n))return;n=n[e]??null}return n}function x(e,t){if(!T(t))return b(e,t.split(`.`))}function S(e,t){return w(e,t.split(`.`))}function C(e,t,n){if(!D(n))return null;let r=new Set(t.parameter.map(({name:e})=>e));for(let i of e)if(i!==t){for(let e of i.parameter)if(!r.has(e.name)&&S(n,e.name))return`${e.name} in --from-file requires --content-type ${i.contentType}.`}return null}function w(e,t){let[n,...r]=t;if(n===void 0)return!0;let i=A(n);if(!D(e)||!Object.hasOwn(e,i.key))return!1;let a=e[i.key]??null;return i.isArray?Array.isArray(a)&&a.every(e=>w(e,r)):w(a,r)}function T(e){return e.split(`.`).some(e=>A(e).isArray)}function E(e,t){return e.parameter.length===0||!D(t)?null:M(t,[],j(e.parameter))}function D(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function O(n,r,i,a=0){let o=r.split(`.`),s=n;for(let[n,c]of o.entries()){let l=A(c),u=n===o.length-1,d=k(s,l,r,u,i,a);if(!d.ok||d.data===null)return t(d.summary,d.warnings);if(u)return e(`Body value assigned`,null);s=d.data}return t(`${r} is not a valid body option path.`)}function k(n,r,i,a,o,s){let c=()=>t(`${i} cannot be combined with another body option at ${r.key}.`),l=n[r.key];if(r.isArray){if(l!==void 0&&!Array.isArray(l))return c();let t=l??[];if(l===void 0&&(n[r.key]=t),a)return t[s]===void 0?(t[s]=o,e(`Body value assigned`,n)):c();let i=t[s];if(i===void 0){let n={};return t[s]=n,e(`Body path created`,n)}return D(i)?e(`Body path stepped`,i):c()}if(a)return l===void 0?(n[r.key]=o,e(`Body value assigned`,n)):c();if(l===void 0){let t={};return n[r.key]=t,e(`Body path created`,t)}return D(l)?e(`Body path stepped`,l):c()}function A(e){let t=e.endsWith(`[]`);return{key:t?e.slice(0,-2):e,isArray:t}}function j(e){let t=new Set,n=new Set;for(let r of e){let e=`${r.name}${r.schemaType===`array`?`[]`:``}`;t.add(e);let i=e.split(`.`);for(let e=1;e<i.length;e+=1)n.add(i.slice(0,e).join(`.`))}return{leaf:t,prefix:n}}function M(e,t,n){if(Array.isArray(e)){if(e.length===0)return null;for(let r of e){let e=M(r,t,n);if(e!==null)return e}return null}if(!D(e))return null;for(let[r,i]of Object.entries(e)){let e=[...t,Array.isArray(i)?`${r}[]`:r],a=e.join(`.`);if(i===null&&N(`${a}[]`,n))continue;if(!N(a,n)){if(!P(e))continue;let r=[...new Set([...n.leaf,...n.prefix])].filter(e=>e.split(`.`).slice(0,-1).join(`.`)===t.join(`.`)),i=r.map(e=>e.split(`.`).at(-1)??``),o=I(e,r);return{path:a,message:`unknown JSON path ${a}. ${o===void 0?`Admitted keys: ${i.join(`, `)||`(none)`}.`:`Use ${o}.`}`}}let o=M(i,e,n);if(o!==null)return o}return null}function N(e,t){return t.prefix.has(e)||t.leaf.has(e)}function P(e){return e.slice(0,-1).some(e=>e.endsWith(`[]`))}var F=4;function I(e,t){let n=e.at(-1)?.replace(/\[\]$/u,``).toLowerCase()??``,r=t.map(e=>({path:e,score:L(n,e.split(`.`).at(-1)??``)})).filter(({score:e})=>e<1/0).toSorted((e,t)=>e.score-t.score||e.path.localeCompare(t.path));return r[0]?.score===r[1]?.score?void 0:r[0]?.path}function L(e,t){let n=t.replace(/\[\]$/u,``).toLowerCase();if(n===e)return 0;if(Math.min(e.length,n.length)<F)return 1/0;let r=e.length<=n.length?e:n,i=e.length<=n.length?n:e;if(i.length-r.length>1)return 1/0;let a=0;for(;a<r.length&&r[a]===i[a];)a+=1;return r.slice(a+ +(r.length===i.length))===i.slice(a+1)?1:1/0}var R=e=>Array.isArray(e)&&!Object.isFrozen(e);function z(e,t){let r=new Map;for(let e of t){let t=e.flag?.split(` `)[0];t!==void 0&&r.set(t,t===`--from-file`?{...e,inputType:`file`}:e)}for(let t of e){let e=t.long===void 0?void 0:r.get(t.long);e!==void 0&&(t.helpGroup(i(e)),t.description=n(t.description,{...e,hasParseDefault:t.defaultValue!==void 0}))}if(!R(e))throw Error(`Commander option list is frozen; generated option help cannot be ordered.`);e.sort((e,t)=>{let n=e.long===void 0?void 0:r.get(e.long),i=t.long===void 0?void 0:r.get(t.long);return n!==void 0&&i!==void 0?q(n,i):n===void 0?i===void 0?0:1:-1})}function B(e){let t=new Map;for(let n of e)for(let e of n.parameter){let r=e.flag.split(` `)[0]??e.flag,i=t.get(r);i===void 0?t.set(r,{variant:[{descriptor:n,parameter:e}]}):t.set(r,{variant:[...i.variant,{descriptor:n,parameter:e}]})}return[...t.values()]}function V(e){let{flag:t}=e.variant[0].parameter;return e.variant.every(({parameter:e})=>e.flag===t)?t:`${t.split(` `)[0]??t} <value>`}function H(e){let t=e.variant.map(({descriptor:e,parameter:t})=>({contentType:e.contentType,text:G(e,t)})),n=t[0];return n===void 0?``:t.every(({text:e})=>e===n.text)?`${n.text===``?``:`${n.text} `}Request content: ${t.map(({contentType:e})=>e).join(`, `)}.`:t.map(({contentType:e,text:t})=>`${e}: ${t}`).join(` `)}function U(e,t){return[...new Set((e.cliConflicts??[]).filter(e=>e.includes(t)).flatMap(e=>e.filter(e=>e!==t)))]}function W(e,t){let n=e.kind===`multipart`?`Read a JSON object keyed by multipart part name from a file, or use - for stdin`:`Read the JSON request body from a file, or use - for stdin`,r=t.filter(e=>!t.some(t=>t.startsWith(`${e}.`)||t.startsWith(`${e}[].`)));return r.length===0?a(n):`${a(n)} Required JSON paths: ${r.join(`, `)}.`}function G(e,t){let n=r(t.description,void 0),i=e.kind!==`multipart`&&T(t.name),a=e.kind!==`multipart`&&t.optionKey!==t.name&&/^\w+$/u.test(t.name);return`${n}${i?` Repeat to add another value.`:``}${a?` --from-file JSON key: ${t.name}.`:``}${K(e,t)}`}function K(e,t){if(e.kind===`multipart`||t.schemaType!==`array`)return``;let n=f(t.name);return n===null?``:` Prefix each value with its 0-based ${n}[] row index, as 0:value, to fill more than one ${n}[] row. A leading digits-and-colon is always read as that index, so name the row of a value that starts the same way, as 0:0:00 for the value 0:00.`}function q(e,t){return o(e)-o(t)||Number(e.required!==!0)-Number(t.required!==!0)}export{E as S,T as _,W as a,l as b,G as c,d,s as f,S as g,c as h,V as i,v as l,C as m,q as n,B as o,_ as p,H as r,U as s,z as t,u,D as v,m as x,g as y};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./package-
|
|
1
|
+
import{a as e}from"./package-DEeHDoOT.js";import{C as t,S as n,_ as r,c as i,d as a,g as o,i as s,s as c}from"./iso-l1vOidnb.js";import{c as l,d as u,l as ee,p as te,s as ne,u as d}from"./tool-policy-ClEqQ6OA.js";import{i as re,t as f}from"./human-text-cap-BcNmIPQA.js";import{n as ie,t as ae}from"./contract-parameter-BkhnusCV.js";var p=2,oe=new Set(`a.an.the.and.or.for.to.of.in.on.at.by.with.from.into.is.are.be.do.does.how.what.which.that.this.these.those.i.me.my.we.our.you.your.it.its.please.want.need.can.could.should.would`.split(`.`));function m(e,t){let n=v(t);n.length!==0&&(e.add(n),(n===`individual`||n===`individuals`)&&m(e,`person`),h(e,se(n),n),h(e,ce(n),n))}function se(e){if(e===`people`)return`person`;let t=e.endsWith(`ies`)?e.slice(0,-3):``;if(t.length>=p&&!t.endsWith(`v`)&&/[^aeiou]$/u.test(t))return`${e.slice(0,-3)}y`;let n=e.endsWith(`es`)?e.slice(0,-2):``;if(n.length>=p&&n!==`us`&&/(?:s|ss|sh|ch|x|z)$/u.test(n))return n;if(e.length>p&&e.endsWith(`s`)&&!e.endsWith(`ss`)&&!e.endsWith(`us`)&&e!==`news`)return e.slice(0,-1)}function ce(e){if(e===`person`)return`people`;if(e!==`new`&&e!==`news`&&e!==`status`&&e!==`us`){if(e.length>=p&&e.endsWith(`y`)&&/[^aeiou]y$/u.test(e))return`${e.slice(0,-1)}ies`;if(!(e.length>=p&&e.endsWith(`es`)))return e.length>=p&&/(?:s|ss|sh|ch|x|z)$/u.test(e)?`${e}es`:e.endsWith(`s`)?void 0:`${e}s`}}function h(e,t,n){t!==void 0&&t!==n&&t.length>=p&&/^[a-z]+$/u.test(t)&&e.add(t)}function g(e){let t=new Set(_(e)),n=Array.from(t);for(let e of n)m(t,e);return t}function le(e){return _(e).map(g)}function ue(e,t){if(e.length===0)return!1;let n=g(t.join(` `));return e.every(e=>[...e].some(e=>n.has(e)))}function _(e){return v(e).split(/[^a-z0-9]+/u).filter(e=>e.length>0&&!oe.has(e))}function v(e){return e.trim().replace(/([a-z0-9])([A-Z])/gu,`$1 $2`).replace(/[_-]/gu,` `).replace(/\s+/gu,` `).toLowerCase().replace(/\blook up\b/gu,`lookup`)}function y(e,t){return e.map(e=>{let n=e.requestBody??[],r=[...e.parameters.map(e=>b(e)),...n.flatMap(e=>e.parameter.map(t=>b(t,n.length>1?e.contentType:void 0))),...de(n)],i=[t,...e.cliPath].join(` `),a=e.mutates===!0||ee(e.intent),o=te(e),s=n[0];return{operationId:e.operationId,method:e.method,path:e.path,resource:e.resource,intent:e.intent,scope:e.scope,mutates:a,destructive:l(e.method,e.intent),auth:e.auth,cli:{command:i,path:e.cliPath},mcpTool:e.binaryResponse||!u(e.path)||o===null?null:d(o),body:{hasBody:s!==void 0,kind:s?.kind??null,...s!==void 0&&n.length>1?{contentType:s.contentType}:{},required:s?.required??!1,description:s?.description??``,requiredPath:s?.requiredPath??[]},flags:r,errorResponse:e.errorResponse,...e.successResponse===void 0?{}:{successResponse:e.successResponse},...e.header===void 0||e.header.length===0?{}:{header:e.header},summary:e.summary,description:e.description,...e.deprecated===void 0?{}:{deprecated:e.deprecated}}})}function b(e,t){let n=e.flag.split(/\s+/u);return{name:n[0]??e.flag,optionKey:e.optionKey,wireName:e.name,location:e.location,required:e.required,placeholder:n.length<=1?null:n.slice(1).join(` `),description:e.description,choices:e.choices??[],...t===void 0?{}:{contentType:t}}}function de(e){if((e?.length??0)<=1)return[];let t=e?.map(({contentType:e})=>e)??[];return[{name:`--content-type`,optionKey:`contentType`,wireName:`Content-Type`,location:`body`,required:!1,placeholder:`<media-type>`,description:`Select the request body encoding, never an uploaded file's media type; omit for ${t[0]}.`,choices:t}]}function x(e){return e.flags.filter(({contentType:t})=>t===void 0||t===e.body.contentType)}var fe=[`-id`,`-slug`,`-url`],pe=[`--id`,`--slug`,`--url`],me=`/v1/lookup`,he=`--from-file "<path>"`;function ge(t,n,r=e().bin[0]){let i=y(n,r),a=i.find(e=>e.operationId===t);return a===void 0?[]:w(a,i)}function S(t,n,r=e().bin[0]){let i=n.find(e=>e.operationId===t),[a]=i===void 0?[]:y([i],r);return a&&C(a,E(a,!1))}function _e(t,n,r,i=e().bin[0]){let a=e=>{let t=e.findIndex((e,t)=>r[t]!==e);return t===-1?e.length:t},o=`${r[0]} get`,[s,c]=n.filter(({method:e,path:n,parameters:r,cliPath:i})=>{let s=r.filter(({location:e})=>e===`path`),[c]=s;return e===`GET`&&s.length===1&&c?.flag.split(/\s+/u)[0]===t&&n.endsWith(`/{${c.name}}`)&&(a(i)>1||i.join(` `)===o)}).toSorted((e,t)=>a(t.cliPath)-a(e.cliPath));if(s!==void 0&&(c===void 0||a(c.cliPath)!==a(s.cliPath)))return S(s.operationId,n,i)}function C(e,t){return[e.cli.command,...t,`--data`].join(` `)}function w(e,t){return[`example: ${C(e,E(e))}`,...ve(e,t)]}function ve(e,t){return x(e).flatMap(e=>{if(!e.required||!e.optionKey.endsWith(`Id`))return[];let n=`${e.optionKey.slice(0,-2)}Slug`,r=t.find(e=>e.method===`GET`&&/\/lookup(?:-exact)?$/u.test(e.path)&&e.flags.some(e=>e.optionKey===n)),i=r?.flags.find(e=>e.optionKey===n);if(r===void 0||i===void 0)return[];let a=`${r.cli.command} ${D(i)} --data`,o=t.find(e=>e.method===`POST`&&e.path===me),s=o?.flags.find(e=>e.optionKey===`name`),c=o?.flags.find(e=>e.optionKey===`kind`),l=c?.choices.find(t=>e.optionKey.toUpperCase().startsWith(t)),u=`lookup: ${e.name} from a slug: ${a}`;return o===void 0||s===void 0||c===void 0||l===void 0?[u]:[u,`lookup: ${e.name} from a name or URL: ${o.cli.command} ${c.name} ${l} ${D(s)} --data, then match.owner.${e.optionKey} when status is MATCHED`]})}var T=/(?:^|\.)text$/u;function E(e,t=!0){let n=x(e),r=n.filter(e=>e.required),i=e.body.kind===`json`&&n.some(e=>e.location===`body`&&T.test(e.wireName)&&(e.required||!e.wireName.includes(`.`))),a=i?r.filter(e=>e.location!==`body`):r,o=(r.length>0||!t?a:ye(e)).map(D);return i||(e.body.required||e.body.requiredPath.length>0)&&!a.some(e=>e.location===`body`)?[...o,he]:o}function ye(e){let t=new Set;m(t,e.resource);for(let n of fe)for(let r of t){let t=e.flags.find(e=>e.name===`--${r}${n}`);if(t!==void 0)return[t]}for(let t of pe){let n=e.flags.find(e=>e.name===t);if(n!==void 0)return[n]}return[]}function D(e){return e.placeholder===null?e.name:`${e.name} "${e.placeholder}"`}var O=s([`HIGH`,`MEDIUM`,`LOW`]),be=s([`PAID_PLAN`,`DAILY_ALLOWANCE`]),k=s([`OPERATION`,`SKILL`,`PROMPT`,`COMPLETION_GATE`,`RESEARCH_DETAIL_TYPE`,`RESEARCH_SNIPPET_TYPE`,`TEXT_TYPE`]),A=Object.assign(t([k,n()]),{enum:k.enum}),j=r({billingAccess:be.nullish(),excerpt:n(),sourceId:n(),sourceType:A,sourceVersion:n().nullish()}),xe=r({instruction:n(),operationId:n(),planTaskKey:c(n()).optional(),stepKey:n().optional()}),M=r({body:n(),expectation:n(),method:c(n()),override:n(),reject:c(n()),typeCatalog:n()}),Se=r({cliCommand:n(),mcpTool:n().nullish(),step:xe,writeGuidance:M.nullish()}),N=s([`ENTITY`,`TEXT`,`WRITER_BRIEF`]),Ce=Object.assign(t([N,n()]),{enum:N.enum}),we=r({allowedValue:n().nullish(),description:n(),key:n(),required:i().default(!0).optional(),type:Ce}),P=r({catalogRevision:a().optional(),gateId:c(n()).optional(),input:c(we),step:c(Se),taskKey:n().optional()}),F=s([`TASK_PLAN`,`OPERATION_ADVICE`,`CLARIFY`,`ABSTAIN`]),Te=r({candidate:c(j),operationId:n().nullish(),outcome:F,probability:o().nullish(),taskKey:n().nullish(),taskPlan:P.nullish()}),Ee=r({answer:n(),citation:c(j),confidence:O,resolution:Te.nullish()});function I(e){let t=e.requestBody?.[0],n=e.parameter.map(t=>L(t,ie(e,t))),r=(t?.parameter??[]).map(t=>L(t,ae(e,t)));return{selector:n.filter(e=>e.location===`path`||R(e)),pagination:n.filter(z),filter:[...n.filter(B),...r.filter(B)],body:r.filter(e=>!B(e))}}function L(e,t){let{in:n,inputName:r,...i}=e;return{...i,flag:ne(t),location:n,description:e.description||`${e.name} ${e.in} parameter`}}function R(e){return/(^|[A-Z])(id|slug)$/u.test(e.name)}function z(e){return[`page`,`size`,`sort`,`cursor`,`mode`,`projection`].includes(e.name)}function B(e){return e.location!==`path`&&!R(e)&&!z(e)}function V(e){return{operationId:e.operationId,method:e.method,path:e.path,summary:e.summary,cli:e.projection.cliPath.join(` `),intent:e.intent,scope:e.projection.scope,requiredInput:U(e),responseContentType:[...new Set(e.response.filter(({status:e})=>e.startsWith(`2`)).flatMap(({contentType:e})=>e??[]))]}}function H(e,t){let n=e.requestBody?.[0],r=V(e),i=W(e);return t?{...r,...i===void 0?{}:{paidPlan:i},resource:e.resource,bodyKind:n?.kind??null,bodyRequired:n?.required??!1,requiredBodyPath:n?.requiredPath??[],argument:I(e)}:{...r,optionalInput:ke(e),arrayInput:Ae(e),...i===void 0?{}:{paidPlan:i}}}function De(e){let t=I(e),n=e=>e.filter(e=>e.required);return{...H(e,!1),optionalDetailOmitted:!0,argument:{selector:n(t.selector),pagination:n(t.pagination),filter:n(t.filter),body:n(t.body)}}}function Oe(e){let{cli:t,scope:n,...r}=V(e),i=W(e);return{...r,...i===void 0?{}:{paidPlan:i},optionalDetailOmitted:!0}}function U(e){return[...e.parameter.filter(({required:e})=>e).map(({name:e})=>e),...e.requestBody?.[0]?.requiredPath??[]]}function ke(e){let t=e.requestBody?.[0],n=new Set(t?.requiredPath??[]);return{query:e.parameter.filter(e=>e.in===`query`&&!e.required).map(({name:e})=>e),body:(t?.parameter??[]).filter(({name:e})=>!n.has(e)).map(({name:e})=>e)}}function W(e){return e.response.find(({status:e})=>e===`402`)?.description}function Ae(e){return[...e.parameter,...e.requestBody?.[0]?.parameter??[]].filter(({schemaType:e})=>e===`array`).map(({name:e})=>e)}var G=160,K=`Operation catalog matches`,je=[`whole`,`described`,`requiredDescribed`,`optionalNamed`,`optionalGrouped`],q=e=>`${[K,...e].join(`
|
|
2
2
|
`)}\n`;function Me(e,t=[]){if(!Array.isArray(e)||e.length===0||!e.every(Fe))return null;let n=e,r=e=>re([K,...e,...t]);for(let e of je){let t=[...n.flatMap(t=>X(t,e)),...Y(n,e)];if(r(t))return q(t)}let i=e=>[...n.slice(0,e).flatMap(e=>X(e,`optionalGrouped`)),...Y(n.slice(0,e),`optionalGrouped`),...e>=n.length?[]:[`... ${n.length-e} more operations omitted to fit ${f} UTF-8 bytes: ${n.slice(e).map(({operationId:e})=>e).join(`, `)}; call aventure_help with q=<operationId> and limit=1 to read one.`]];return q(i([...n.keys()].findLast(e=>e>0&&r(i(e)))??1))}var J=`call aventure_help with q=<operationId> and limit=1; inspect structuredContent.data argument and optionalInput for the retained inputs`;function Y(e,t){let n=t===`optionalGrouped`&&e.some(e=>X(e,t).some(e=>e.includes(`.{`)))?[`... optional input names sharing a prefix are grouped: a.{b, c} names a.b and a.c.`]:[];return[...Ne(e,t),...n]}function Ne(e,t){let n=e.flatMap(e=>`argument`in e?Object.values(e.argument).flat():[]),r=t===`whole`?0:n.filter(e=>e.description.length>G&&(t===`described`||e.required)).length,i=r===0?[]:[`... ${r} argument descriptions shortened; inspect structuredContent.data[].argument for full descriptions.`];if(e.some(e=>`optionalDetailOmitted`in e))return[...i,e.some(e=>`argument`in e)?`... optional argument details omitted: the full list exceeds the result cap; ${J}.`:`... optional inputs omitted: the full list exceeds the result cap; call aventure_help with q=<operationId> and limit=1 to read one operation's inputs.`];if(t===`whole`||!e.some(e=>`argument`in e))return[];if(t===`described`)return i;let a=t===`requiredDescribed`?`optional argument descriptions`:`optional argument details`,o=n.filter(({required:e})=>!e).length;return[...i,`... ${o} ${a} omitted to fit ${f} UTF-8 bytes; structuredContent carries them, and ${J}.`]}function X(e,t){let n=`argument`in e?Object.values(e.argument).flat():[],r=n.filter(({required:e})=>!e).map(({name:e})=>e);return[`${e.operationId} ${e.method} ${e.path} (aventure_${e.intent})`,` ${e.summary}`,` required: ${e.requiredInput.length===0?`none`:e.requiredInput.join(`, `)}`,` responseContentType: ${e.responseContentType.length===0?`none`:e.responseContentType.join(`, `)}`,...`optionalInput`in e?Object.entries(e.optionalInput).filter(([,e])=>e.length>0).map(([e,n])=>` optional ${e}: ${Z(n,t)}`):[],...`arrayInput`in e&&e.arrayInput.length>0?[` JSON array inputs: ${e.arrayInput.join(`, `)}`]:[],...`paidPlan`in e&&e.paidPlan!==void 0?[` paid plan: ${e.paidPlan}`]:[],...n.filter(({required:e})=>e||t!==`optionalNamed`&&t!==`optionalGrouped`).map(e=>Pe(e,e.required||t!==`requiredDescribed`,t)),...(t===`optionalNamed`||t===`optionalGrouped`)&&r.length>0?[` optional inputs: ${Z(r,t)}`]:[]]}function Z(e,t){if(t!==`optionalGrouped`)return e.join(`, `);let n=new Map;for(let t of e){let e=n,r=t.split(`.`);r.forEach((t,n)=>{let i=e.get(t)??{end:!1,child:new Map};e.set(t,i),n===r.length-1&&(i.end=!0),e=i.child})}let r=(e,t)=>{let n=[...t.child].flatMap(([n,i])=>t.child.size===1?r(`${e}.${n}`,i):r(n,i));return[...t.end?[e]:[],...t.child.size>1?[`${e}.{${n.join(`, `)}}`]:n]};return[...n].flatMap(([e,t])=>r(e,t)).join(`, `)}function Pe(e,t,n){let r=[e.location,e.required?`required`:void 0,e.schemaType,e.schemaFormat,e.schemaEnum===void 0?void 0:`choices: ${e.schemaEnum.join(`, `)}`,e.itemSchemaEnum===void 0?void 0:`item choices: ${e.itemSchemaEnum.join(`, `)}`,e.schemaDefault===void 0?void 0:`default: ${JSON.stringify(e.schemaDefault)}`,e.itemSchemaType===void 0?void 0:`items: ${e.itemSchemaType}${e.itemSchemaFormat===void 0?``:` (${e.itemSchemaFormat})`}`].filter(e=>e!==void 0).join(`, `),i=` ${e.name} (${r})`;return t?`${i}: ${n===`whole`||e.description.length<=G?e.description:`${e.description.slice(0,157)}...`}`:i}function Fe(e){return typeof e==`object`&&!!e&&`operationId`in e&&typeof e.operationId==`string`&&`requiredInput`in e&&Array.isArray(e.requiredInput)&&`intent`in e&&`summary`in e}function Q(e){let t=t=>{let n=(`parameter`in e?e.parameter:e.parameters.map(e=>({...e,in:e.location,schemaDefault:e.defaultValue}))).filter(e=>e.in===t&&e.required&&e.schemaDefault===void 0).map(({name:e})=>[e,`<${e}>`]);return n.length===0?void 0:Object.fromEntries(n)},n=t(`path`),r=t(`query`);return{tool:d(e.intent),arguments:{operationId:e.operationId,...n===void 0?{}:{pathParams:n},...r===void 0?{}:{query:r},...e.requestBody===void 0?{}:{body:Le(e)}}}}var Ie=4;function Le(e){let t=e.requestBody?.[0];if(t===void 0)return{};if(t.requiredPath.length>0||e.intent!==`lookup`||t.schemaType===`array`)return Re(t.requiredPath);let n=t.parameter;return Object.fromEntries(n.flatMap(e=>{let{name:t,schemaType:n,schemaFormat:r}=e,i=`optionKey`in e?e.choices:e.schemaEnum;return t.includes(`.`)||n!==`string`||r!==void 0?[]:i===void 0?[[t,`<${t}>`]]:i.length>Ie?[]:[[t,`<${i.join(`|`)}>`]]}))}function Re(e){let t={},n=e.filter(t=>!e.some(e=>e.startsWith(`${t}.`)||e.startsWith(`${t}[]`)));for(let e of n){let n=e.split(`.`),r=n.slice(0,-1).reduce(ze,t);r[n.at(-1)??e]=`<${e}>`}return t}function ze(e,t){let n=t.replace(/\[\]$/u,``),r=e[n],i=Array.isArray(r)?r[0]:r;if(typeof i==`object`&&i&&!Array.isArray(i))return i;let a={};return e[n]=t.endsWith(`[]`)?[a]:a,a}function Be(e){let t=W(e);return{mcpCall:Q(e),...t===void 0?{}:{paidPlan:t}}}function Ve(e){let t=$(e.description);return{useFor:t.useFor||e.summary||e.description||`${e.method} ${e.path}`,notFor:t.notFor}}function $(e){let t=e.match(/USE FOR:\s*([\s\S]*?)(?:NOT FOR:|$)/iu),n=e.match(/NOT FOR:\s*([\s\S]*?)$/iu);return{useFor:t?.[1]?.trim()??``,notFor:n?.[1]?.trim()??``}}export{ue as C,le as D,v as E,m as S,_ as T,ge as _,Me as a,y as b,Oe as c,F as d,P as f,x as g,T as h,Be as i,De as l,O as m,$ as n,Q as o,A as p,Ve as r,H as s,K as t,Ee as u,_e as v,g as w,S as x,w as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,i as t,r as n}from"./result-envelope-
|
|
1
|
+
import{c as e,i as t,r as n}from"./result-envelope-CB5fGScF.js";import{H as r,h as i,l as a,n as o}from"./tool-policy-ClEqQ6OA.js";import{t as s}from"./openapi-snapshot-BJwcRiVJ.js";import{C as c,D as l,E as u,S as d,T as f,c as p,i as m,l as h,n as g,o as _,r as v,s as y,t as b,u as x,w as S}from"./help-catalog-CXDJUIFG.js";var C=/\b(?:https?:\/\/)?(?:[a-z0-9-]+\.)+[a-z]{2,}(?::\d+)?(?:\/\S*)?/giu,w=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/giu,T=/^[a-z0-9]+(?:-[a-z0-9]+)+$/u,E=250,D=40,O=100;function k(e,t){let n=new Set,r=[],i=/\bslugs?\b/iu.test(e);return{text:e.replace(w,()=>(n.add(`uuid`),` `)).replace(C,e=>{n.add(`url`);let t=e.replace(/^(?:https?:\/\/)?[^/]+/iu,``).replace(/[?#].*$/su,``).split(`/`).filter(e=>e.length>0).map(e=>e.toLowerCase()),i=t.at(-1);return i!==void 0&&T.test(i)&&(n.add(`slug`),t.pop()),r.push(...t.flatMap(e=>e.split(/[^a-z0-9]+/u))),` `}).split(/\s+/u).filter(e=>{let r=e.replace(/^[^a-z0-9]+|[^a-z0-9]+$/giu,``).toLowerCase(),a=T.test(r)&&!t.has(r)&&(i||/\d/u.test(r));return a&&n.add(`slug`),!a}).join(` `).trim(),kind:n,urlPathWord:r.filter(e=>e.length>0)}}function A(e,t,n){return e===`uuid`?/(?:^id|Id)$/u.test(t)&&n.includes(`{${t}}`):t===e}function j(e,t){let n=new Set;for(let r of e){let e=new Set;d(e,r);let i=t.filter(({cliPath:t})=>e.has(t[0]??``)),a=i.length>0?i:t.filter(({cliPath:t})=>t.some(t=>e.has(t)));for(let{resource:e}of a)n.add(e)}return n}function M(e,t,n){if(n.intent!==`read`&&n.intent!==`lookup`)return 0;let r=new Set(f(n.summary)),i=0;for(let t of e.kind)n.directParameterName.some(e=>A(t,e,n.path))&&(i+=E,r.has(t)&&(i+=D));if(i===0)return 0;let a=new Set(f(`${n.summary} ${n.description}`));return(t.size>0?t.has(n.resource):e.urlPathWord.some(e=>{let t=new Set;return d(t,e),[...t].some(e=>a.has(e))}))&&(i+=O),i}var N=40,P=4,F=3,I=1,L=new Map,R=new WeakMap;function z(e){let t=L.get(e);if(t!==void 0)return t;let n=s(),a=r(n.paths,e),o=a===null?new Map:i(n,a.operation.responses,F);return L.set(e,o),o}function B(e,t,n){let r=0,i=V(n);for(let[e,i]of n)t.has(e.toLowerCase())&&(r+=N*(4-i)/4);for(let t of e){let e=Math.min(...[...t].map(e=>i.get(e)??1/0));e<=I&&(r+=P*(2-e))}return r}function V(e){let t=R.get(e);if(t!==void 0)return t;let n=new Map;for(let[t,r]of e){if(r>I)continue;let e=new Set;for(let n of f(t))d(e,n);for(let t of e)n.set(t,Math.min(n.get(t)??r,r))}return R.set(e,n),n}var H=5,U=.5,W=15,G=30,K=2,ee=100,q=.5;function J(e,t,n){if(e.trim().length===0)return t.map(e=>({item:e,score:1}));let r=t.map(e=>({item:e,fields:n(e)})),i=k(e,new Set(r.flatMap(({fields:e})=>e.cliPath))),a=j(i.urlPathWord,r.map(({fields:e})=>e)),o=u(i.text);if(o.length===0&&i.kind.size===0)return t.map(e=>({item:e,score:1}));let s=S(o),c=l(o),d=new Set(i.text.toLowerCase().split(/[^a-z0-9]+/u));return r.map(({item:e,fields:t})=>({item:e,fields:t,score:(o.length===0?0:$({normalizedQuery:o,tokens:s,termForm:c,queryWord:d},t))+M(i,a,t)})).filter(({score:e})=>e>0).toSorted((e,t)=>Number(e.fields.deprecated===!0)-Number(t.fields.deprecated===!0)||t.score-e.score||e.fields.cliPath.length-t.fields.cliPath.length||e.fields.cliPath.join(` `).localeCompare(t.fields.cliPath.join(` `))||e.fields.operationId.localeCompare(t.fields.operationId)).map(({item:e,score:t})=>({item:e,score:t}))}var Y=new WeakMap;function X(e){let t=Y.get(e);if(t!==void 0)return t;let n=e.requestBody??[],r=[...e.parameter,...n.flatMap(e=>e.parameter)],i={...e,cliPath:e.projection.cliPath,enumParameter:r.map(e=>({values:e.itemSchemaEnum??e.schemaEnum??[],direct:e.name===e.inputName})),parameterName:r.flatMap(e=>[e.name,e.inputName]),directParameterName:e.parameter.map(e=>e.name),parameterDescription:[...r,...n].map(({description:e})=>e),responseFieldLevel:z(e.operationId)};return Y.set(e,i),i}function Z(n,r){let i=n.q?.trim()??``,a=J(i,r.filter(e=>Q(n,e)&&(i.length>0||e.deprecated!==!0)),X),o=(a[0]?.score??0)*U,s=a.filter(({score:e})=>e>=o),c=n.limit===void 0||!Number.isFinite(n.limit)?H:n.limit,l=Math.min(s.length,Math.max(0,Math.trunc(c))),u=s.slice(0,l).map(({item:e})=>e),d={totalOperations:r.length,matched:s.length,returned:u.length},f=u.length===1,m=u.map(e=>y(e,f)),g=e(b,m,{counts:d}),_=t(g),v=f?u.map(h):u.map(p);return{summary:b,data:_?m:v,counts:d}}function Q(e,t){let{root:n}=e;return!(e.method!==void 0&&t.method!==e.method||e.scope!==void 0&&t.projection.scope!==e.scope||n&&t.resource!==n&&t.projection.cliPath[0]!==n)}function $({normalizedQuery:e,tokens:t,termForm:n,queryWord:r},i){let o=oe(i),s=ie(i),l=0;o.some(t=>t===e)&&(l+=100),o.some(t=>t.includes(e))&&(l+=40),l+=ae(e,o);let p=new Set(o.flatMap(f)),m=new Set(s.flatMap(f));for(let e of t)o.some(t=>t===e)?l+=20:m.has(e)?l+=8:p.has(e)&&(l+=K);for(let e of i.cliPath){let n=new Set;d(n,e),[...n].some(e=>t.has(e))&&(l+=W)}c(n,s)&&(l+=200),n.length>1&&s.some(t=>t.includes(e))&&(l+=ee),i.parameterName.some(t=>u(t)===e)&&(l+=G);let h=new Set(i.parameterDescription.flatMap(f));for(let e of t)h.has(e)&&(l+=K);return l+=ce(t,i.enumParameter),[`list`,`search`,`find`,`browse`].some(e=>t.has(e))&&/^(?:list|search)[A-Z]/u.test(i.operationId)&&(l+=30),l+=B(n,r,i.responseFieldLevel),l-=se(e,t,i.description),a(i.intent)&&!re(r)?l*q:l}var te=`edit change set fix rename link unlink mark publish correct`.split(` `),ne=new Set([...Object.entries(o).filter(([,e])=>a(e)).map(([e])=>e),...te]);function re(e){return[...e].some(e=>ne.has(e))}function ie(e){return[e.operationId,e.cliPath.join(` `),e.summary].map(u).filter(e=>e.length>0)}function ae(e,t){let n=f(e),r=0;for(let e=0;e<n.length-1;e+=1){let i=n.slice(e,e+2).join(` `);t.some(e=>e.includes(i))&&(r+=24)}return r}function oe(e){return[...new Set([e.operationId,e.method,e.path,e.resource,e.intent,e.cliPath.join(` `),e.summary,(g(e.description).useFor||e.description).slice(0,240)].map(u).filter(e=>e.length>0))]}function se(e,t,n){let r=u(g(n).notFor);if(r.length===0)return 0;let i=r.includes(e)?40:0,a=new Set(f(r));for(let e of t)r===e?i+=20:a.has(e)&&(i+=8);return i}function ce(e,t){let n=0;for(let{values:r,direct:i}of t)r.some(t=>le(e,t))&&(n+=i?40:10);return n}function le(e,t){let n=f(t);return n.length>0&&n.every(t=>e.has(t))}function ue(e){return typeof e.data==`object`&&e.data!==null&&`response`in e.data?e.data.response:void 0}async function de(t,r,i,a){let o=t.q?.trim()??``;if(o.length===0)return n(`Provide q to resolve a request to one operation.`);let s=i.find(({resource:e,intent:t,deprecated:n})=>e===`help`&&t===`search`&&n!==!0);if(s===void 0)return n(`This build ships no help resolve operation.`);let c=await a(s,{body:{question:o,resolve:!0,...t.scope===void 0?{}:{scope:t.scope===`read`?`READ`:`WRITE`}}});if(!c.ok)return{...c,data:null};let l=x.safeParse(ue(c));if(!l.success||l.data.resolution==null)return n(`The help resolve operation returned no resolution.`,c.warnings,{httpStatus:c.httpStatus});let{answer:u,resolution:d}=l.data,f=e=>r.find(t=>t.operationId===e),p=f(d.operationId),h=d.taskPlan??void 0,g=(h?.step??[]).map(({step:e})=>({step:e,contract:f(e.operationId)})),y=[...new Set([...d.operationId!=null&&p===void 0?[d.operationId]:[],...g.filter(({contract:e})=>e===void 0).map(({step:e})=>e.operationId)])];return y.some(e=>!i.some(t=>t.operationId===e))?n(`No operation on this connection answers that request.`):e(y.length===0?`Help resolution`:`Help resolution this connection cannot finish: it cannot run ${y.join(`, `)}.`,{outcome:d.outcome,probability:d.probability,answer:u,candidate:d.candidate.filter(({sourceId:e})=>i.some(({operationId:t})=>t===e)).map(({sourceId:e})=>{let t=f(e);return t===void 0?{sourceId:e}:Object.assign({sourceId:e},m(t))}),...p===void 0?{}:{operation:{operationId:p.operationId,apiRoute:`${p.method} ${p.path}`,...v(p),...m(p)}},...(d.taskKey,{}),...h===void 0?{}:{taskPlan:{input:h.input,step:g.map(({contract:e,step:{stepKey:t,instruction:n,operationId:r}})=>e===void 0?{instruction:n,operationId:r}:{instruction:n,mcpCall:_(e)})}}},{warnings:y.map(e=>i.some(t=>t.operationId===e)?`Operation ${e} is in this server's catalog, but your grant does not allow it.`:`Operation ${e} is outside this server's catalog, so no credential runs it here.`)})}export{z as a,de as i,J as n,Z as r,X as t};
|