@aventurevc/aventure-cli 0.8.179 → 0.8.181
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/dist/aventure-cli/index.js +1 -1
- package/dist/aventure-cli/unified-operations.json +19 -268
- package/dist/chunks/{aventure-cli-BpOCuUTm.js → aventure-cli-TzWe0JCu.js} +30 -30
- package/dist/chunks/{cli-help-policy-ClfxVVMO.js → cli-help-policy-DUARQ4wz.js} +1 -1
- package/dist/chunks/contract-EVv6oDkS.js +27 -0
- package/dist/chunks/detail-CSoU73eT.js +1 -0
- package/dist/chunks/{detail-DDrpot7C.js → detail-MEh1aLs6.js} +1 -1
- package/dist/chunks/{dist-CpUXocgg.js → dist-F6oHzTAJ.js} +2 -2
- package/dist/chunks/mcp-generation-contract-B7DhTI6F.js +1 -0
- package/dist/chunks/mcp-generation-contract-Cz19o23D.js +1 -0
- package/dist/chunks/oauth-bearer-credential-DKnuQe5D.js +8 -0
- package/dist/chunks/oauth-bearer-credential-Dm5z74F2.js +1 -0
- package/dist/chunks/{oauth-login-Ck8nViXz.js → oauth-login-CbUY11wb.js} +3 -3
- package/dist/chunks/oauth-login-CnWRvM6E.js +1 -0
- package/dist/chunks/openapi-commands-Bm7sTOA4.js +1 -0
- package/dist/chunks/openapi-commands-BxF0Cw1A.js +1 -0
- package/dist/chunks/provider-catalog-DcrjzHvb.js +1 -0
- package/dist/chunks/startup-auth-6aYRzFwo.js +1 -0
- package/dist/chunks/{startup-auth-DaJp5qea.js → startup-auth-CL764pKQ.js} +1 -1
- package/dist/chunks/{tool-policy-DDfbFJCQ.js → tool-policy-Dw6KBl9G.js} +1 -1
- package/package.json +3 -3
- package/dist/chunks/contract-SKhcBwRL.js +0 -24
- package/dist/chunks/detail-B93equBj.js +0 -1
- package/dist/chunks/mcp-generation-contract-57Ma8uaG.js +0 -1
- package/dist/chunks/mcp-generation-contract-qkSbgO9-.js +0 -1
- package/dist/chunks/oauth-bearer-credential-BfoneETZ.js +0 -8
- package/dist/chunks/oauth-bearer-credential-C7xYWvqP.js +0 -1
- package/dist/chunks/oauth-login-kgxbX0Hj.js +0 -1
- package/dist/chunks/openapi-commands-BQWRBrXR.js +0 -1
- package/dist/chunks/openapi-commands-EyRhLowQ.js +0 -1
- package/dist/chunks/provider-catalog-BRKet0cd.js +0 -1
- package/dist/chunks/startup-auth-G6Utbedw.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./openapi-commands-Bm7sTOA4.js";export{e as GENERATED_OPENAPI_COMMAND_SPECS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as e,y as t}from"./person-owner-BJgNYLKX.js";import{Vr as n}from"./dist-F6oHzTAJ.js";var r=t({clerkPublishableKey:e().nullish(),oauthClient:n.nullish()});export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./startup-auth-CL764pKQ.js";export{e as commandAuthMaterializationMode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./commander-BB7CDPLs.js";import{o as r,u as i}from"./env-Casn05NX.js";import{c as a,i as o}from"./result-envelope-CFE7wPAr.js";import{g as s}from"./tool-policy-DDfbFJCQ.js";import{r as c}from"./cli-help-policy-ClfxVVMO.js";function l(e,t){return e.parameters.filter(e=>e.required&&t[e.optionKey]===void 0).map(e=>e.flag)}function u(e,t){return(e.requestBody?.length??0)>1&&typeof t.contentType==`string`?t.contentType:void 0}var d=e=>typeof e==`string`&&e.trim()===``;function f(e,t){let n=new Set([...t.parameters,...(t.requestBody??[]).flatMap(({parameter:e})=>e)].filter(e=>e.required).map(e=>e.optionKey));for(let t of e.options){let r=t.attributeName(),i=e.getOptionValue(r);if(!(Array.isArray(i)?i.some(d):d(i)))continue;let a=Array.isArray(i)?i.filter(e=>!d(e)):[];if(a.length>0){e.setOptionValue(r,a);continue}n.has(r)&&e.error(`error: option '${t.flags}' requires a value`),e.setOptionValue(r,void 0)}}function p(e){return e.split(` `)[0]??e}function m(e){if(e.requestBody===void 0||e.requestBody.length===0){let[t,n]=e.parameters.filter(e=>e.required);return n===void 0&&t?.schemaType===`string`?t:void 0}if(e.requestBody.length!==1||e.parameters.some(e=>e.required))return;let t=e.requestBody[0]?.parameter??[],n=t.filter(e=>e.required);if(n.length===1&&n[0]?.schemaType===`string`)return n[0];if(n.length!==0||e.intent!==`search`)return;let r=t.filter(e=>{let t=e.name.split(`.`).at(-1);return e.schemaType===`string`&&(t===`query`||t===`search`)});return r.length===1?r[0]:void 0}function h(e,t,n){let r=t.join(` `).trim();return r.length===0?a(`No positional text`,n):n[e.optionKey]===void 0?a(`Positional text parsed`,{...n,[e.optionKey]:r}):o(`Unexpected argument "${r}": ${p(e.flag)} already sets this value, and this command has no subcommand by that name. Drop "${r}".`)}var g={agents:{summary:`Deprecated: Answer a Natural-Language Platform Help Question`,section:`cli`},"agents help":{summary:`Deprecated: use help ask (POST /v1/help) with the same body`},auth:{summary:`Sign-in, session, API key, and CLI authorization endpoints`,section:`account`},"auth api-key":{summary:`Get Current API Key`},"auth me":{summary:`Current User Permissions`},"auth me permissions":{summary:`Returns the current caller's resolved roles and permissions`},"auth providers":{summary:`Get the Sign-In Options`},billing:{summary:`Plans, prices, subscription, usage, and upgrades`,section:`account`},"billing additional-usage":{summary:`Update Additional Usage Settings`},"billing ai-credits":{summary:`Read the Current AI Credit Allowance`},"billing checkout-sessions":{summary:`Create or Recover a Checkout Session`},"billing credit-purchases":{summary:`Read a Prepaid Credit Purchase Confirmation`},"billing plan-change-previews":{summary:`Preview a Subscription Plan Change`},"billing plan-changes":{summary:`Change the Subscription Plan`},"billing plans":{summary:`List Subscription Tiers and Plans`},"billing portal-sessions":{summary:`Create a Hosted Billing Portal Session`},"billing subscription":{summary:`Read the Current Billing Subscription`},"billing subscription next-charge":{summary:`Preview the Next Subscription Charge`},"billing subscription payment-profile":{summary:`Read Your Card on File and Introductory Offer`},enrichments:{summary:`Enrich Many Companies and People`,section:`researchData`},entities:{summary:`Companies and funds: people, funding, and news`,section:`researchData`},"entities acquisitions":{summary:`Acquisitions a company made or was part of`},"entities addresses":{summary:`A company's recorded office and headquarters addresses`},"entities blog-posts":{summary:`External blog and article links for entities and people`},"entities brand":{summary:`Get a Company's Names, Logos, Links, and Tags`},"entities classifications":{summary:`Classification tags on a company, and suggested tags`},"entities classifications catalog":{summary:`Get the Company Classification Taxonomy`},"entities classifications suggestions":{summary:`Suggest Classifications for a Company`},"entities classifications tags":{summary:`List Classification Tags`},"entities content":{summary:`Publications about one company or person, and platform-wide publication search`},"entities content facets":{summary:`Count a Company's Publications`},"entities employee-counts":{summary:`List a Company's Headcount Over Time`},"entities enrichments":{summary:`Enrich One Company, Product, or Service`},"entities filters":{summary:`Filter options for company listings: available values, refinement, and option search`},"entities fundraise-investor-joins":{summary:`List the Investors in a Funding Round`},"entities fundraise-rounds":{summary:`List a Company's Funding Rounds`},"entities investments":{summary:`List the Investments a Company Made`},"entities investor-activity":{summary:`Get Investor Activity`},"entities investors":{summary:`List a Company's Investors`},"entities logo":{summary:`Get a Company Logo`},"entities lookup-exact":{summary:`Read Full Entity Detail by aVenture Profile URL, Slug, Website, or Domain`},"entities people":{summary:`People linked to companies, and the role each one holds`},"entities person-investors":{summary:`List Person Investors`},"entities relationships":{summary:`Relationships between companies, investors, and other organizations`},"entities relationships types":{summary:`List Entity Relationship Types`},"entities repositories":{summary:`List a Company's GitHub Repositories`},"entities research":{summary:`Get the Research Gathered About a Company`},"entities research-details":{summary:`List Research Details`},"entities research-details types":{summary:`List the Accepted Research Detail Types`},"entities research-snippets":{summary:`List Research Snippets`},"entities research-snippets types":{summary:`List the Accepted Research Snippet Types`},"entities sec":{summary:`Get SEC EDGAR Facts for a Public Company`},"entities similar":{summary:`Similar companies and lean similar-company summaries by id`},"entities similar summary":{summary:`Get Similar Company Summaries by ID`},"entities slug":{summary:`Get a Company's Slug`},"entities texts":{summary:`Descriptions and other written text for companies and people`},"entities texts types":{summary:`List the Accepted Company Text Types`},"entities trending-news":{summary:`List Trending News About a Company`},"entities types":{summary:`List the Accepted typeRecord Values`},"entities unique-ids":{summary:`External identifiers and the records they name`},"entities urls":{summary:`Websites, social profiles, and other URLs for companies and people`},"entities valuations":{summary:`List a Company's Valuation Over Time`},help:{summary:`Answer a Natural-Language Platform Help Question`,section:`cli`},lookup:{summary:`Read a Company, Product, Service, or Person Identity Without Enrichment`,section:`researchData`},"lookup-from-file":{summary:`Identify a Company, Product, Service, or Person by Name, URL, or ID`,section:`researchData`},"lookup-jobs":{summary:`Async article and bulk name identification`,section:`researchData`},"lookup-mentions":{summary:`Identify Every Company and Person a Page or Screenshot Names`,section:`researchData`},metrics:{summary:`Get Platform Totals for Companies, Funding, and People`,section:`cli`},news:{summary:`News linked to the companies and people in it`,section:`researchData`},"news feedback":{summary:`Submit News Feedback`},"news related-entities":{summary:`List the Entities a News Article Is About`},"news subscriptions":{summary:`List Entity News Subscriptions`},"news subscriptions test-events":{summary:`Send a Test News Event`},"news thumbnail":{summary:`Get News Thumbnail`},people:{summary:`Founders and investors, and what they back`,section:`researchData`},"people addresses":{summary:`A person's recorded addresses`},"people blog-posts":{summary:`External blog and article links for entities and people`},"people content":{summary:`Publications about one company or person, and platform-wide publication search`},"people content facets":{summary:`Count a Person's Publications`},"people enrichments":{summary:`Enrich One Person`},"people entities":{summary:`People linked to companies, and the role each one holds`},"people filters":{summary:`Filter options for people listings and option search`},"people graph":{summary:`Get Person Graph`},"people investments":{summary:`List a Person's Investments`},"people investor-activity":{summary:`Get Person Investor Activity`},"people lookup-exact":{summary:`Read One Person's Full Detail by aVenture Profile URL, Slug, or URL`},"people photo":{summary:`Get Person Photo`},"people repositories":{summary:`List a Person's GitHub Repositories`},"people similar":{summary:`List People Similar to One Person`},"people texts":{summary:`Descriptions and other written text for companies and people`},"people texts types":{summary:`List the Accepted Person Text Types`},"people unique-ids":{summary:`External identifiers and the records they name`},"people urls":{summary:`Websites, social profiles, and other URLs for companies and people`},"research-runs":{summary:`Research requests you file for a company, Product, Service, or person, and their progress`,section:`researchData`},"research-runs presets":{summary:`List Research Presets`},resolve:{summary:`Deprecated: Resolve an Entity or Person by Identifier Token`,section:`researchData`},search:{summary:`Search Companies, People, and News Together`,section:`researchData`},"search link":{summary:`Search From a Page URL`},"search link jobs":{summary:`Get a Link Search Job`},"search natural":{summary:`Find companies and people in natural language`},"search shared":{summary:`Search companies, people, and news, or by URL`},"search shared slug":{summary:`Read a Shared Search by Slug`},"unique-ids":{summary:`External identifiers and the records they name`,section:`researchData`},"unique-ids types":{summary:`List the Accepted Unique Identifier Types`},"url-types":{summary:`List URL Types`,section:`researchData`},web:{summary:`Search companies, people, and news, or by URL`,section:`researchData`},"web searches":{summary:`Get an Async Web Search Job`},"web searches jobs":{summary:"Reads the web-search job a `Prefer: respond-async` search accepted"}};function _(e){return b(e,v())}function v(){return!!i().userBearerToken?.trim()}function y(e){return v()||!c(e,g)}function b(e,t){return t?e:e.filter(e=>!c(e.cliPath[0],g)||e.visibility!==`private`).map(x)}function x(e){let t=e.parameters.filter(S),n=e.requestBody?.map(e=>{let t=e.parameter.filter(S);return t.length===e.parameter.length?e:{...e,parameter:t}}),r=n?.every((t,n)=>t===e.requestBody?.[n]);return t.length===e.parameters.length&&r!==!1?e:{...e,parameters:t,requestBody:n}}var S=e=>e.visibility!==`private`;function C(i,a){let o=i.indexOf(`--`),l=i.slice(0,o===-1?i.length:o);if(l.some(e=>e===`--version`||e===`-V`))return`none`;let d=new n().exitOverride().configureOutput({writeErr:()=>void 0}).addOption(new e(`--environment <environment>`,`route all API calls to a mapped API environment`).choices([...r()])).addOption(new e(`--content-type <media-type>`)).addOption(new e(`--ask <question>`)),f=d.parseOptions([...i]).operands,p=d.opts().environment;p!==void 0&&(process.env.API_ENV=p);let m=a.find(e=>w(f,e.cliPath)),h=m===void 0?void 0:u(m,d.opts());if(m!==void 0&&h!==void 0){let e=s(m.requestBody??[],h);if(!e.ok)throw new t(e.summary)}let _=f.at(0);if(_===void 0)return`stored`;if(_===`update`||_===`auth`&&m===void 0)return`none`;let v=d.opts().ask;return l.some(e=>e===`--help`||e===`-h`)?(m??(_===`help`&&v===void 0?a.find(e=>w(f.slice(1),e.cliPath)):void 0))!==void 0||c(_,g)?`stored`:`none`:c(_,g)?`required`:_===`help`?m===void 0?v===void 0?`stored`:f.length===1?`required`:`none`:`required`:_===`agents`&&f[1]===`setup`?`required`:[`command-catalog`,`completion`].includes(_)?`optional`:_===`batch`?`required`:m===void 0?`optional`:`required`}function w(e,t){return t.every((t,n)=>e[n]===t)}export{g as a,l as c,h as d,_ as i,f as l,C as n,u as o,b as r,p as s,y as t,m as u};
|
|
1
|
+
import{n as e,o as t,t as n}from"./commander-BB7CDPLs.js";import{o as r,u as i}from"./env-Casn05NX.js";import{c as a,i as o}from"./result-envelope-CFE7wPAr.js";import{_ as s}from"./tool-policy-Dw6KBl9G.js";import{r as c}from"./cli-help-policy-DUARQ4wz.js";function l(e,t){return e.parameters.filter(e=>e.required&&t[e.optionKey]===void 0).map(e=>e.flag)}function u(e,t){return(e.requestBody?.length??0)>1&&typeof t.contentType==`string`?t.contentType:void 0}var d=e=>typeof e==`string`&&e.trim()===``;function f(e,t){let n=new Set([...t.parameters,...(t.requestBody??[]).flatMap(({parameter:e})=>e)].filter(e=>e.required).map(e=>e.optionKey));for(let t of e.options){let r=t.attributeName(),i=e.getOptionValue(r);if(!(Array.isArray(i)?i.some(d):d(i)))continue;let a=Array.isArray(i)?i.filter(e=>!d(e)):[];if(a.length>0){e.setOptionValue(r,a);continue}n.has(r)&&e.error(`error: option '${t.flags}' requires a value`),e.setOptionValue(r,void 0)}}function p(e){return e.split(` `)[0]??e}function m(e){if(e.requestBody===void 0||e.requestBody.length===0){let[t,n]=e.parameters.filter(e=>e.required);return n===void 0&&t?.schemaType===`string`?t:void 0}if(e.requestBody.length!==1||e.parameters.some(e=>e.required))return;let t=e.requestBody[0]?.parameter??[],n=t.filter(e=>e.required);if(n.length===1&&n[0]?.schemaType===`string`)return n[0];if(n.length!==0||e.intent!==`search`)return;let r=t.filter(e=>{let t=e.name.split(`.`).at(-1);return e.schemaType===`string`&&(t===`query`||t===`search`)});return r.length===1?r[0]:void 0}function h(e,t,n){let r=t.join(` `).trim();return r.length===0?a(`No positional text`,n):n[e.optionKey]===void 0?a(`Positional text parsed`,{...n,[e.optionKey]:r}):o(`Unexpected argument "${r}": ${p(e.flag)} already sets this value, and this command has no subcommand by that name. Drop "${r}".`)}var g={agents:{summary:`Deprecated: Answer a Natural-Language Platform Help Question`,section:`cli`},"agents help":{summary:`Deprecated: use help ask (POST /v1/help) with the same body`},auth:{summary:`Sign-in, session, API key, and CLI authorization endpoints`,section:`account`},"auth api-key":{summary:`Get Current API Key`},"auth me":{summary:`Current User Permissions`},"auth me permissions":{summary:`Returns the current caller's resolved roles and permissions`},"auth providers":{summary:`Get the Sign-In Options`},billing:{summary:`Plans, prices, subscription, usage, and upgrades`,section:`account`},"billing additional-usage":{summary:`Update Additional Usage Settings`},"billing ai-credits":{summary:`Read the Current AI Credit Allowance`},"billing checkout-sessions":{summary:`Create or Recover a Checkout Session`},"billing credit-purchases":{summary:`Read a Prepaid Credit Purchase Confirmation`},"billing plan-change-previews":{summary:`Preview a Subscription Plan Change`},"billing plan-changes":{summary:`Change the Subscription Plan`},"billing plans":{summary:`List Subscription Tiers and Plans`},"billing portal-sessions":{summary:`Create a Hosted Billing Portal Session`},"billing subscription":{summary:`Read the Current Billing Subscription`},"billing subscription next-charge":{summary:`Preview the Next Subscription Charge`},"billing subscription payment-profile":{summary:`Read Your Card on File and Introductory Offer`},enrichments:{summary:`Enrich Many Companies and People`,section:`researchData`},entities:{summary:`Companies and funds: people, funding, and news`,section:`researchData`},"entities acquisitions":{summary:`Acquisitions a company made or was part of`},"entities addresses":{summary:`A company's recorded office and headquarters addresses`},"entities blog-posts":{summary:`External blog and article links for entities and people`},"entities brand":{summary:`Get a Company's Names, Logos, Links, and Tags`},"entities classifications":{summary:`Classification tags on a company, and suggested tags`},"entities classifications catalog":{summary:`Get the Company Classification Taxonomy`},"entities classifications suggestions":{summary:`Suggest Classifications for a Company`},"entities classifications tags":{summary:`List Classification Tags`},"entities content":{summary:`Publications about one company or person, and platform-wide publication search`},"entities content facets":{summary:`Count a Company's Publications`},"entities employee-counts":{summary:`List a Company's Headcount Over Time`},"entities enrichments":{summary:`Enrich One Company, Product, or Service`},"entities filters":{summary:`Filter options for company listings: available values, refinement, and option search`},"entities fundraise-investor-joins":{summary:`List the Investors in a Funding Round`},"entities fundraise-rounds":{summary:`List a Company's Funding Rounds`},"entities investments":{summary:`List the Investments a Company Made`},"entities investor-activity":{summary:`Get Investor Activity`},"entities investors":{summary:`List a Company's Investors`},"entities logo":{summary:`Get a Company Logo`},"entities lookup-exact":{summary:`Read Full Entity Detail by aVenture Profile URL, Slug, Website, or Domain`},"entities people":{summary:`People linked to companies, and the role each one holds`},"entities person-investors":{summary:`List Person Investors`},"entities relationships":{summary:`Relationships between companies, investors, and other organizations`},"entities relationships types":{summary:`List Entity Relationship Types`},"entities repositories":{summary:`List a Company's GitHub Repositories`},"entities research":{summary:`Get the Research Gathered About a Company`},"entities research-details":{summary:`List Research Details`},"entities research-details types":{summary:`List the Accepted Research Detail Types`},"entities research-snippets":{summary:`List Research Snippets`},"entities research-snippets types":{summary:`List the Accepted Research Snippet Types`},"entities sec":{summary:`Get SEC EDGAR Facts for a Public Company`},"entities similar":{summary:`Similar companies and lean similar-company summaries by id`},"entities similar summary":{summary:`Get Similar Company Summaries by ID`},"entities slug":{summary:`Get a Company's Slug`},"entities texts":{summary:`Descriptions and other written text for companies and people`},"entities texts types":{summary:`List the Accepted Company Text Types`},"entities trending-news":{summary:`List Trending News About a Company`},"entities types":{summary:`List the Accepted typeRecord Values`},"entities unique-ids":{summary:`External identifiers and the records they name`},"entities urls":{summary:`Websites, social profiles, and other URLs for companies and people`},"entities valuations":{summary:`List a Company's Valuation Over Time`},help:{summary:`Answer a Natural-Language Platform Help Question`,section:`cli`},lookup:{summary:`Read a Company, Product, Service, or Person Identity Without Enrichment`,section:`researchData`},"lookup-from-file":{summary:`Identify a Company, Product, Service, or Person by Name, URL, or ID`,section:`researchData`},"lookup-jobs":{summary:`Async article and bulk name identification`,section:`researchData`},"lookup-mentions":{summary:`Identify Every Company and Person a Page or Screenshot Names`,section:`researchData`},metrics:{summary:`Get Platform Totals for Companies, Funding, and People`,section:`cli`},news:{summary:`News linked to the companies and people in it`,section:`researchData`},"news feedback":{summary:`Submit News Feedback`},"news related-entities":{summary:`List the Entities a News Article Is About`},"news subscriptions":{summary:`List Entity News Subscriptions`},"news subscriptions test-events":{summary:`Send a Test News Event`},"news thumbnail":{summary:`Get News Thumbnail`},people:{summary:`Founders and investors, and what they back`,section:`researchData`},"people addresses":{summary:`A person's recorded addresses`},"people blog-posts":{summary:`External blog and article links for entities and people`},"people content":{summary:`Publications about one company or person, and platform-wide publication search`},"people content facets":{summary:`Count a Person's Publications`},"people enrichments":{summary:`Enrich One Person`},"people entities":{summary:`People linked to companies, and the role each one holds`},"people filters":{summary:`Filter options for people listings and option search`},"people graph":{summary:`Get Person Graph`},"people investments":{summary:`List a Person's Investments`},"people investor-activity":{summary:`Get Person Investor Activity`},"people lookup-exact":{summary:`Read One Person's Full Detail by aVenture Profile URL, Slug, or URL`},"people photo":{summary:`Get Person Photo`},"people repositories":{summary:`List a Person's GitHub Repositories`},"people similar":{summary:`List People Similar to One Person`},"people texts":{summary:`Descriptions and other written text for companies and people`},"people texts types":{summary:`List the Accepted Person Text Types`},"people unique-ids":{summary:`External identifiers and the records they name`},"people urls":{summary:`Websites, social profiles, and other URLs for companies and people`},"research-runs":{summary:`Research requests you file for a company, Product, Service, or person, and their progress`,section:`researchData`},"research-runs presets":{summary:`List Research Presets`},resolve:{summary:`Deprecated: Resolve an Entity or Person by Identifier Token`,section:`researchData`},search:{summary:`Search Companies, People, and News Together`,section:`researchData`},"search link":{summary:`Search From a Page URL`},"search link jobs":{summary:`Get a Link Search Job`},"search natural":{summary:`Find companies and people in natural language`},"search shared":{summary:`Search companies, people, and news, or by URL`},"search shared slug":{summary:`Read a Shared Search by Slug`},"unique-ids":{summary:`External identifiers and the records they name`,section:`researchData`},"unique-ids types":{summary:`List the Accepted Unique Identifier Types`},"url-types":{summary:`List URL Types`,section:`researchData`},web:{summary:`Search companies, people, and news, or by URL`,section:`researchData`},"web searches":{summary:`Get an Async Web Search Job`},"web searches jobs":{summary:"Reads the web-search job a `Prefer: respond-async` search accepted"}};function _(e){return b(e,v())}function v(){return!!i().userBearerToken?.trim()}function y(e){return v()||!c(e,g)}function b(e,t){return t?e:e.filter(e=>!c(e.cliPath[0],g)||e.visibility!==`private`).map(x)}function x(e){let t=e.parameters.filter(S),n=e.requestBody?.map(e=>{let t=e.parameter.filter(S);return t.length===e.parameter.length?e:{...e,parameter:t}}),r=n?.every((t,n)=>t===e.requestBody?.[n]);return t.length===e.parameters.length&&r!==!1?e:{...e,parameters:t,requestBody:n}}var S=e=>e.visibility!==`private`;function C(i,a){let o=i.indexOf(`--`),l=i.slice(0,o===-1?i.length:o);if(l.some(e=>e===`--version`||e===`-V`))return`none`;let d=new n().exitOverride().configureOutput({writeErr:()=>void 0}).addOption(new e(`--environment <environment>`,`route all API calls to a mapped API environment`).choices([...r()])).addOption(new e(`--content-type <media-type>`)).addOption(new e(`--ask <question>`)),f=d.parseOptions([...i]).operands,p=d.opts().environment;p!==void 0&&(process.env.API_ENV=p);let m=a.find(e=>w(f,e.cliPath)),h=m===void 0?void 0:u(m,d.opts());if(m!==void 0&&h!==void 0){let e=s(m.requestBody??[],h);if(!e.ok)throw new t(e.summary)}let _=f.at(0);if(_===void 0)return`stored`;if(_===`update`||_===`auth`&&m===void 0)return`none`;let v=d.opts().ask;return l.some(e=>e===`--help`||e===`-h`)?(m??(_===`help`&&v===void 0?a.find(e=>w(f.slice(1),e.cliPath)):void 0))!==void 0||c(_,g)?`stored`:`none`:c(_,g)?`required`:_===`help`?m===void 0?v===void 0?`stored`:f.length===1?`required`:`none`:`required`:_===`agents`&&f[1]===`setup`?`required`:[`command-catalog`,`completion`].includes(_)?`optional`:_===`batch`?`required`:m===void 0?`optional`:`required`}function w(e,t){return t.every((t,n)=>e[n]===t)}export{g as a,l as c,h as d,_ as i,f as l,C as n,u as o,b as r,p as s,y as t,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./commander-BB7CDPLs.js";import{C as t,S as n,T as r,g as i,h as a,l as o,o as s,u as c,v as l,w as u,y as d}from"./person-owner-BJgNYLKX.js";import{c as f,d as p,i as m}from"./result-envelope-CFE7wPAr.js";import{basename as h,extname as ee}from"node:path";import{AsyncLocalStorage as te}from"node:async_hooks";import{readFile as ne}from"node:fs/promises";function g(e){return new URL(e,`https://placeholder.invalid`).pathname}function _(e,t){let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean);return n.length!==r.length||r.some(re)?!1:n.every((e,t)=>v(e)||e===r[t])}function v(e){let t=e.slice(1,-1);return e.startsWith(`{`)&&e.endsWith(`}`)&&t.length>0&&!t.includes(`/`)&&!t.includes(`{`)&&!t.includes(`}`)}function re(e){if(v(e))return!0;let t=e.toLowerCase(),n=e.slice(3,-3);return t.startsWith(`%7b`)&&t.endsWith(`%7d`)&&n.length>0&&!n.includes(`/`)&&!n.includes(`%`)&&!n.includes(`{`)&&!n.includes(`}`)}var y=new te,b=()=>y.getStore()?.requestId,ie=()=>y.getStore()?.userBearerToken;function ae(e,t){return y.run({...y.getStore(),requestId:e},t)}function oe(e,t){return y.run({...y.getStore(),userBearerToken:e},t)}var x=[`get`,`post`,`put`,`patch`,`delete`],S={get:`GET`,post:`POST`,put:`PUT`,patch:`PATCH`,delete:`DELETE`},C=e=>S[e];function se(e){let t=e.toLowerCase(),n=x.find(e=>e===t);if(n===void 0)throw Error(`Unsupported OpenAPI method: ${e}`);return n}var ce=[`oauth`,`start`,`poll`,`acknowledge`,`revoke`],w=t({name:u().regex(/^[A-Z][A-Z0-9_]*$/u)}),T=r([i(`private`),d({scope:u().optional(),value:u().optional()})]),E=a(()=>d({$ref:u().optional(),description:u().optional(),type:r([u(),o(u())]).optional(),format:u().optional(),default:p.optional(),enum:o(p).optional(),"x-extensible-enum":o(p).optional(),"x-aventure-parsed-enum":c().optional(),readOnly:c().optional(),items:E.optional(),minItems:l().int().nonnegative().optional(),maxItems:l().int().nonnegative().optional(),properties:n(u(),E).optional(),required:o(u()).optional(),oneOf:o(E).optional(),anyOf:o(E).optional(),allOf:o(E).optional(),propertyNames:E.optional(),additionalProperties:r([E,c()]).optional(),"x-aventure-visibility":T.optional(),"x-aventure-cli-conflicts":o(o(u().min(1)).min(2)).min(1).optional(),"x-aventure-env":w.optional(),"x-aventure-detail":i(!0).optional(),"x-aventure-operation-only":o(u().min(1)).min(1).optional()})),le=d({in:u(),name:u(),required:c().optional(),description:u().optional(),schema:E.optional(),"x-aventure-visibility":T.optional(),"x-aventure-legacy-name":t({name:u().trim().min(1)}).optional()}).superRefine((e,t)=>{let n=e[`x-aventure-legacy-name`]?.name;n!==void 0&&(e.in!==`path`&&t.addIssue({code:`custom`,path:[`x-aventure-legacy-name`],message:`x-aventure-legacy-name is valid only for path parameters`}),n===e.name&&t.addIssue({code:`custom`,path:[`x-aventure-legacy-name`,`name`],message:`Legacy path parameter name must differ from its canonical name`}))}),D=n(u(),d({schema:E.optional()})),ue=d({description:u().optional(),content:D.optional(),"x-aventure-standard-response":c().optional()}),O=d({description:u().optional(),required:c().optional(),content:D.optional()}),de=t({auth:s([`none`,`read`]).optional()}).optional(),k=r([i(``),u().regex(/^(?:\/(?:[^~/]|~[01])*)+$/)]),A=t({readOperationId:u().min(1),writePointer:k,readPointer:k}),j=u().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)* [a-z0-9]+(?:-[a-z0-9]+)*$/u),M=u().regex(/^[a-z][A-Za-z0-9]*$/u),N=u().regex(/^--(?:no-)?[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u),P=t({command:j,role:s(ce),summary:u().trim().min(1).optional(),description:u().trim().min(1).optional(),bodyOption:o(M).min(1).optional(),localOption:o(t({optionKey:M,flag:N,description:u().trim().min(1)})).min(1).optional()}).superRefine((t,n)=>{let r=[t.bodyOption??[],(t.localOption??[]).map(e=>e.optionKey),(t.localOption??[]).map(e=>e.flag)].some(e=>new Set(e).size!==e.length),i=(t.localOption??[]).some(t=>new e(t.flag).attributeName()!==t.optionKey);(r||i)&&n.addIssue({code:`custom`,message:`Composite CLI options must be unique and match their local flags`})}).optional(),F=d({operationId:u(),summary:u().optional(),description:u().optional(),tags:o(u()).optional(),deprecated:c().optional(),hidden:c().optional(),security:o(n(u(),o(u()))).optional(),parameters:o(le).optional(),requestBody:O.optional(),responses:n(u(),ue),"x-aventure-visibility":T.optional(),"x-aventure-tool":de,"x-aventure-mutation-readback":A.optional(),"x-aventure-cli-composite":P}).superRefine((e,t)=>{let n=e.parameters??[];for(let[e,r]of n.entries()){let i=r[`x-aventure-legacy-name`]?.name;r.in===`path`&&i!==void 0&&n.some((t,n)=>n!==e&&t.in===`path`&&(t.name===i||t[`x-aventure-legacy-name`]?.name===i))&&t.addIssue({code:`custom`,path:[`parameters`,e,`x-aventure-legacy-name`,`name`],message:`Legacy path parameter name '${i}' collides with another declared path parameter`})}}),I=d(Object.fromEntries(x.map(e=>[e,F.optional()]))),L=d({$ref:u().optional(),description:u().optional(),type:r([u(),o(u())]).optional(),format:u().optional(),default:p.optional(),enum:o(p).optional(),"x-extensible-enum":o(p).optional(),"x-aventure-parsed-enum":c().optional(),readOnly:c().optional(),items:E.optional(),minItems:l().int().nonnegative().optional(),maxItems:l().int().nonnegative().optional(),oneOf:o(E).optional(),anyOf:o(E).optional(),allOf:o(E).optional(),propertyNames:E.optional(),additionalProperties:r([E,c()]).optional(),properties:n(u(),E).optional(),required:o(u()).optional(),"x-aventure-visibility":T.optional(),"x-aventure-cli-conflicts":o(o(u().min(1)).min(2)).min(1).optional(),"x-aventure-env":w.optional(),"x-aventure-detail":i(!0).optional(),"x-aventure-noun":t({one:u().trim().min(1),other:u().trim().min(1)}).optional()});d({info:d({description:u().optional()}).optional(),tags:o(d({name:u(),description:u().optional()})).optional(),paths:n(u(),I),webhooks:n(u(),d({post:d({description:u(),requestBody:O})})).optional(),components:d({schemas:n(u(),L)})}).superRefine((e,t)=>{for(let[n,r]of Object.entries(e.paths))for(let i of x){let a=r[i]?.[`x-aventure-mutation-readback`];a!==void 0&&B(e.paths,a.readOperationId)===null&&t.addIssue({code:`custom`,path:[`paths`,n,i,`x-aventure-mutation-readback`,`readOperationId`],message:`mutation readback names '${a.readOperationId}', which no operation in this document emits`})}});var R=new Set([`page`,`size`,`sort`]);function z(e){return e?.$ref?.startsWith(`#/components/schemas/`)===!0?e.$ref.slice(21):void 0}function B(e,t){for(let[n,r]of Object.entries(e))for(let e of x){let i=r[e];if(i?.operationId===t)return{method:e,template:n,operation:i}}return null}function V(e,t,n){let r=g(n),i=e[r]?.[t];if(i)return{method:t,template:r,operation:i};for(let[n,i]of Object.entries(e)){let e=i[t];if(e&&_(n,r))return{method:t,template:n,operation:e}}return null}function H(e,t,n=e){return e.replace(/\{([^}]+)}/g,(...e)=>{let r=e[1],i=t[r];if(i==null)throw Error(`Missing path parameter '${r}' for ${n}`);return encodeURIComponent(String(i))})}function fe(e,t,n){let r=t;for(let i of e.parameters??[]){let e=i[`x-aventure-legacy-name`]?.name;if(i.in!==`path`||e===void 0)continue;let a=t[e];if(Object.hasOwn(t,e)&&a!==void 0){if(Object.hasOwn(t,i.name))throw Error(`Path parameters '${i.name}' and legacy alias '${e}' were both supplied for ${n}`);r===t&&(r={...t}),r[i.name]=a,delete r[e]}}return r}function pe(e,t){let n={};for(let r of e.parameters??[]){if(r.in!==`query`||R.has(r.name))continue;let e=t?.[r.name]??me(r.schema?.default);e!==void 0&&(n[r.name]=e)}return Object.keys(n).length===0?void 0:n}function me(e){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`||Array.isArray(e)&&e.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`))return e}var U=3e4;async function he(e,t,n,r){let i=G(W(e.requestBody?.content),n);if(!i.ok||i.data===null)return m(i.summary,i.warnings);let a=i.data;if(e.requestBody?.required===!0&&t===void 0&&a?.kind!==`multipart`)return m(`Request body is required.`);if(a?.kind===`multipart`)return await ve(e.requestBody?.required===!0,a.schema,t);let o=a?.contentType??r;return f(`Request body prepared`,{...t===void 0?{}:{body:t},...o===void 0?{}:{contentType:o}})}function ge(e){if(typeof e!=`string`)return f(`Request body unchanged`,e);let t=e.trimStart().slice(0,1);if(t!==`{`&&t!==`[`)return f(`Request body unchanged`,e);try{let t=p.safeParse(JSON.parse(e));if(!t.success)throw t.error;return f(`Request body parsed`,t.data)}catch(e){return m(`Request body string must be valid JSON: ${e instanceof Error?e.message:String(e)}`)}}function _e(e,t){let n=e?.schema;if(n===void 0)return!1;let r=z(n),i=n.type??(r===void 0?void 0:t[r]?.type);return Array.isArray(i)?i.includes(`array`):i===`array`}function W(e){let t=Object.entries(e??{});return[...t.flatMap(e=>Ee(e[0])?[K(e,`json`)]:[]),...t.flatMap(e=>De(e[0])?[K(e,`multipart`)]:[])]}function G(e,t){if(t===void 0)return f(`Default request content selected`,e[0]);let n=Z(t),r=e.find(e=>Z(e.contentType)===n);return r===void 0?m(`Request Content-Type '${t}' is not supported. Supported choices: ${e.map(({contentType:e})=>e).join(`, `)||`none`}.`):f(`Explicit request content selected`,r)}function K(e,t){let n=e[1].schema;return{contentType:e[0],kind:t,...n===void 0?{}:{schema:n}}}async function ve(e,t,n){if(!e&&n==null)return f(`Optional multipart body omitted`,{});let r=ye(n);if(!r.ok||r.data===null)return m(r.summary,r.warnings);let i=new FormData;for(let e of be(t)){let t=r.data[e.name];if(t==null){if(e.required)return m(`Multipart body requires '${e.name}'.`);continue}if(Array.isArray(t)&&t.length<(e.schema.minItems??0))return m(`Multipart part '${e.name}' requires more entries.`);if(Array.isArray(t)&&t.length>(e.schema.maxItems??2**53-1))return m(`Multipart part '${e.name}' has too many entries.`);if(q(e.schema)||J(e.schema)){let n=J(e.schema)?t:[t];if(!Array.isArray(n)||n.some(e=>typeof e!=`string`))return m(`Multipart part '${e.name}' must contain file paths or URLs.`);for(let t of n){if(typeof t!=`string`)continue;let n=await Se(t);if(!n.ok||n.data===null)return m(n.summary,n.warnings);i.append(e.name,n.data.blob,n.data.filename)}}else if(xe(e.schema,t)){let n=JSON.stringify(t);i.append(e.name,new Blob([n],{type:`application/json`}),`${e.name}.json`)}else{let n=Y(i,e.name,t);if(!n.ok)return n}}return f(`Multipart body prepared`,{body:i})}function ye(e){if(typeof e==`object`&&e&&!Array.isArray(e)){let t=Object.fromEntries(Object.entries(e));return f(`Multipart input parsed`,t)}return m(`Multipart request body must be a JSON object keyed by form part name.`)}function be(e){let t=new Set(e?.required??[]);return Object.entries(e?.properties??{}).map(([e,n])=>({name:e,schema:n,required:t.has(e)}))}function q(e){return e.type===`string`&&e.format===`binary`}function J(e){return e.type===`array`&&e.items!==void 0&&q(e.items)}function xe(e,t){return typeof t!=`object`||!t||Array.isArray(t)?!1:e.type===`object`||typeof e.$ref==`string`&&e.$ref.length>0}function Y(e,t,n){if(Array.isArray(n)){for(let r of n){let n=Y(e,t,r);if(!n.ok)return n}return f(`Multipart scalar array appended`,null)}return typeof n==`object`?m(`Multipart part '${t}' must be scalar.`):(e.append(t,String(n)),f(`Multipart scalar appended`,null))}async function Se(e){return Te(e)?await Ce(e):b()===void 0?await we(e):m(`MCP callers cannot upload local files: pass an http(s) URL as the multipart part, or send media by sourceUrl in a JSON body. Local file paths are CLI-only.`)}async function Ce(e){let t=new AbortController,n=setTimeout(()=>t.abort(),U);try{let n=new URL(e),r=await fetch(e,{signal:t.signal});if(!r.ok)return m(`Failed to fetch media URL: ${r.status} ${r.statusText}`);let i=r.headers.get(`content-type`)?.split(`;`)[0]?.trim()??X(n.pathname)??``,a=new Blob([await r.arrayBuffer()],{type:i});return f(`URL media fetched`,{blob:a,filename:h(n.pathname)||`upload`})}catch(e){return t.signal.aborted?m(`Failed to fetch media URL: timed out after ${U}ms.`):m(`Failed to fetch media URL: ${e instanceof Error?e.message:String(e)}`)}finally{clearTimeout(n)}}async function we(e){try{let t=X(e)??``,n=await ne(e);return f(`File media read`,{blob:new Blob([n],{type:t}),filename:h(e)})}catch(t){return m(`Failed to read media file '${e}': ${t instanceof Error?t.message:String(t)}`)}}function Te(e){return e.startsWith(`http://`)||e.startsWith(`https://`)}function X(e){return Oe[ee(e).toLowerCase()]}function Ee(e){let t=Z(e);return t===`*/*`||t===`application/json`||t.endsWith(`+json`)}function De(e){return Z(e)===`multipart/form-data`}var Z=e=>e.split(`;`)[0]?.trim().toLowerCase()??``,Oe={".gif":`image/gif`,".heic":`image/heic`,".heif":`image/heif`,".jpeg":`image/jpeg`,".jpg":`image/jpeg`,".png":`image/png`,".webp":`image/webp`};function ke(e,t,n){let r=new Map,i=(t,a,o)=>{let s=z(t);if(a>n||s!==void 0&&o.includes(s))return;let c=s===void 0?o:[...o,s],l=je(e,t);for(let e of[...l.items===void 0?[]:[l.items],...l.oneOf??[],...l.anyOf??[],...l.allOf??[]])i(e,a,c);for(let[e,t]of Object.entries(l.properties??{}))r.set(e,Math.min(r.get(e)??a,a)),i(t,a+1,c)};for(let[e,n]of Object.entries(t))e.startsWith(`2`)&&i(Ae(n.content),0,[]);return r}function Ae(e){return e?.[`application/json`]?.schema??Object.values(e??{}).find(e=>e.schema!==void 0)?.schema}function je(e,t){let n=z(t);return{...n===void 0?void 0:e.components.schemas[n],...t}}function Me(e){return e===`write`||e===`delete`}function Ne(e,t){return e===`DELETE`||t===`delete`}var Pe=`Shell-safe input: single-quote string flag values that contain $; use --from-file or stdin for JSON bodies, multiline text, and free text with currency amounts.`;function Fe(e,t){let n=e===`array`?t:e;return n===void 0||n===`string`}var Ie={add:`write`,answer:`search`,ask:`search`,attach:`write`,audit:`read`,batch:`lookup`,convert:`write`,create:`write`,delete:`delete`,enrich:`write`,filter:`search`,get:`read`,import:`write`,join:`write`,list:`read`,lookup:`lookup`,merge:`write`,preview:`lookup`,reconcile:`write`,remove:`delete`,replace:`write`,resolve:`lookup`,search:`search`,status:`read`,suggest:`read`,update:`write`,upload:`write`};function Q(e){return e!==`/v1/auth/api-key`&&!/^\/v1\/sitemap(?:\/|$)/u.test(e)}function Le(e){let t=Object.entries(e.responses).filter(([e])=>e.startsWith(`2`));return t.length>0&&t.every(([,e])=>Object.values(e.content??{}).some(e=>Re(e.schema)))}function Re(e){return e?.format===`byte`||e?.format===`binary`}function ze(e){return`aventure_${e}`}function $(e){return e.replace(/([a-z0-9])([A-Z])/gu,`$1-$2`).replace(/[^A-Za-z0-9]+/gu,`-`).replace(/^-+|-+$/gu,``).toLowerCase()}var Be=e=>`--${$(e)}`;export{g as A,pe as C,ie as D,b as E,ae as O,se as S,z as T,x as _,Be as a,fe as b,ze as c,ke as d,ge as f,G as g,_e as h,Fe as i,oe as k,Q as l,W as m,Ie as n,Ne as o,he as p,Le as r,Me as s,Pe as t,$ as u,C as v,V as w,B as x,H as y};
|
|
1
|
+
import{n as e}from"./commander-BB7CDPLs.js";import{C as t,S as n,T as r,g as i,h as a,l as o,o as s,u as c,v as l,w as u,y as d}from"./person-owner-BJgNYLKX.js";import{c as f,d as p,i as m}from"./result-envelope-CFE7wPAr.js";import{basename as h,extname as ee}from"node:path";import{AsyncLocalStorage as te}from"node:async_hooks";import{readFile as ne}from"node:fs/promises";function g(e){return new URL(e,`https://placeholder.invalid`).pathname}function _(e,t){let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean);return n.length!==r.length||r.some(re)?!1:n.every((e,t)=>v(e)||e===r[t])}function v(e){let t=e.slice(1,-1);return e.startsWith(`{`)&&e.endsWith(`}`)&&t.length>0&&!t.includes(`/`)&&!t.includes(`{`)&&!t.includes(`}`)}function re(e){if(v(e))return!0;let t=e.toLowerCase(),n=e.slice(3,-3);return t.startsWith(`%7b`)&&t.endsWith(`%7d`)&&n.length>0&&!n.includes(`/`)&&!n.includes(`%`)&&!n.includes(`{`)&&!n.includes(`}`)}var y=new te,b=()=>y.getStore()?.requestId,ie=()=>y.getStore()?.userBearerToken;function ae(e,t){return y.run({...y.getStore(),requestId:e},t)}function x(e,t){return y.run({...y.getStore(),userBearerToken:e},t)}var S=[`get`,`post`,`put`,`patch`,`delete`],C={get:`GET`,post:`POST`,put:`PUT`,patch:`PATCH`,delete:`DELETE`},oe=e=>C[e];function se(e){let t=e.toLowerCase(),n=S.find(e=>e===t);if(n===void 0)throw Error(`Unsupported OpenAPI method: ${e}`);return n}var ce=[`oauth`,`start`,`poll`,`acknowledge`,`revoke`],w=t({name:u().regex(/^[A-Z][A-Z0-9_]*$/u)}),T=r([i(`private`),d({scope:u().optional(),value:u().optional()})]),E=a(()=>d({$ref:u().optional(),description:u().optional(),type:r([u(),o(u())]).optional(),format:u().optional(),default:p.optional(),enum:o(p).optional(),"x-extensible-enum":o(p).optional(),"x-aventure-parsed-enum":c().optional(),readOnly:c().optional(),items:E.optional(),minItems:l().int().nonnegative().optional(),maxItems:l().int().nonnegative().optional(),properties:n(u(),E).optional(),required:o(u()).optional(),oneOf:o(E).optional(),anyOf:o(E).optional(),allOf:o(E).optional(),propertyNames:E.optional(),additionalProperties:r([E,c()]).optional(),"x-aventure-visibility":T.optional(),"x-aventure-cli-conflicts":o(o(u().min(1)).min(2)).min(1).optional(),"x-aventure-env":w.optional(),"x-aventure-detail":i(!0).optional(),"x-aventure-operation-only":o(u().min(1)).min(1).optional()})),le=d({in:u(),name:u(),required:c().optional(),description:u().optional(),schema:E.optional(),"x-aventure-visibility":T.optional(),"x-aventure-legacy-name":t({name:u().trim().min(1)}).optional()}).superRefine((e,t)=>{let n=e[`x-aventure-legacy-name`]?.name;n!==void 0&&(e.in!==`path`&&t.addIssue({code:`custom`,path:[`x-aventure-legacy-name`],message:`x-aventure-legacy-name is valid only for path parameters`}),n===e.name&&t.addIssue({code:`custom`,path:[`x-aventure-legacy-name`,`name`],message:`Legacy path parameter name must differ from its canonical name`}))}),D=n(u(),d({schema:E.optional()})),ue=d({description:u().optional(),content:D.optional(),"x-aventure-standard-response":c().optional()}),O=d({description:u().optional(),required:c().optional(),content:D.optional()}),de=t({auth:s([`none`,`read`]).optional()}).optional(),k=r([i(``),u().regex(/^(?:\/(?:[^~/]|~[01])*)+$/)]),A=t({readOperationId:u().min(1),writePointer:k,readPointer:k}),j=u().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)* [a-z0-9]+(?:-[a-z0-9]+)*$/u),M=u().regex(/^[a-z][A-Za-z0-9]*$/u),N=u().regex(/^--(?:no-)?[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u),P=t({command:j,role:s(ce),summary:u().trim().min(1).optional(),description:u().trim().min(1).optional(),bodyOption:o(M).min(1).optional(),localOption:o(t({optionKey:M,flag:N,description:u().trim().min(1)})).min(1).optional()}).superRefine((t,n)=>{let r=[t.bodyOption??[],(t.localOption??[]).map(e=>e.optionKey),(t.localOption??[]).map(e=>e.flag)].some(e=>new Set(e).size!==e.length),i=(t.localOption??[]).some(t=>new e(t.flag).attributeName()!==t.optionKey);(r||i)&&n.addIssue({code:`custom`,message:`Composite CLI options must be unique and match their local flags`})}).optional(),F=d({operationId:u(),summary:u().optional(),description:u().optional(),tags:o(u()).optional(),deprecated:c().optional(),hidden:c().optional(),security:o(n(u(),o(u()))).optional(),parameters:o(le).optional(),requestBody:O.optional(),responses:n(u(),ue),"x-aventure-visibility":T.optional(),"x-aventure-tool":de,"x-aventure-mutation-readback":A.optional(),"x-aventure-cli-composite":P}).superRefine((e,t)=>{let n=e.parameters??[];for(let[e,r]of n.entries()){let i=r[`x-aventure-legacy-name`]?.name;r.in===`path`&&i!==void 0&&n.some((t,n)=>n!==e&&t.in===`path`&&(t.name===i||t[`x-aventure-legacy-name`]?.name===i))&&t.addIssue({code:`custom`,path:[`parameters`,e,`x-aventure-legacy-name`,`name`],message:`Legacy path parameter name '${i}' collides with another declared path parameter`})}}),I=d(Object.fromEntries(S.map(e=>[e,F.optional()]))),L=d({$ref:u().optional(),description:u().optional(),type:r([u(),o(u())]).optional(),format:u().optional(),default:p.optional(),enum:o(p).optional(),"x-extensible-enum":o(p).optional(),"x-aventure-parsed-enum":c().optional(),readOnly:c().optional(),items:E.optional(),minItems:l().int().nonnegative().optional(),maxItems:l().int().nonnegative().optional(),oneOf:o(E).optional(),anyOf:o(E).optional(),allOf:o(E).optional(),propertyNames:E.optional(),additionalProperties:r([E,c()]).optional(),properties:n(u(),E).optional(),required:o(u()).optional(),"x-aventure-visibility":T.optional(),"x-aventure-cli-conflicts":o(o(u().min(1)).min(2)).min(1).optional(),"x-aventure-env":w.optional(),"x-aventure-detail":i(!0).optional(),"x-aventure-noun":t({one:u().trim().min(1),other:u().trim().min(1)}).optional()});d({info:d({description:u().optional()}).optional(),tags:o(d({name:u(),description:u().optional()})).optional(),paths:n(u(),I),webhooks:n(u(),d({post:d({description:u(),requestBody:O})})).optional(),components:d({schemas:n(u(),L)})}).superRefine((e,t)=>{for(let[n,r]of Object.entries(e.paths))for(let i of S){let a=r[i]?.[`x-aventure-mutation-readback`];a!==void 0&&B(e.paths,a.readOperationId)===null&&t.addIssue({code:`custom`,path:[`paths`,n,i,`x-aventure-mutation-readback`,`readOperationId`],message:`mutation readback names '${a.readOperationId}', which no operation in this document emits`})}});var R=new Set([`page`,`size`,`sort`]);function z(e){return e?.$ref?.startsWith(`#/components/schemas/`)===!0?e.$ref.slice(21):void 0}function B(e,t){for(let[n,r]of Object.entries(e))for(let e of S){let i=r[e];if(i?.operationId===t)return{method:e,template:n,operation:i}}return null}function V(e,t,n){let r=g(n),i=e[r]?.[t];if(i)return{method:t,template:r,operation:i};for(let[n,i]of Object.entries(e)){let e=i[t];if(e&&_(n,r))return{method:t,template:n,operation:e}}return null}function H(e,t,n=e){return e.replace(/\{([^}]+)}/g,(...e)=>{let r=e[1],i=t[r];if(i==null)throw Error(`Missing path parameter '${r}' for ${n}`);return encodeURIComponent(String(i))})}function fe(e,t,n){let r=t;for(let i of e.parameters??[]){let e=i[`x-aventure-legacy-name`]?.name;if(i.in!==`path`||e===void 0)continue;let a=t[e];if(Object.hasOwn(t,e)&&a!==void 0){if(Object.hasOwn(t,i.name))throw Error(`Path parameters '${i.name}' and legacy alias '${e}' were both supplied for ${n}`);r===t&&(r={...t}),r[i.name]=a,delete r[e]}}return r}function pe(e,t){let n={};for(let r of e.parameters??[]){if(r.in!==`query`||R.has(r.name))continue;let e=t?.[r.name]??me(r.schema?.default);e!==void 0&&(n[r.name]=e)}return Object.keys(n).length===0?void 0:n}function me(e){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`||Array.isArray(e)&&e.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`))return e}var U=3e4;async function he(e,t,n,r){let i=G(W(e.requestBody?.content),n);if(!i.ok||i.data===null)return m(i.summary,i.warnings);let a=i.data;if(e.requestBody?.required===!0&&t===void 0&&a?.kind!==`multipart`)return m(`Request body is required.`);if(a?.kind===`multipart`)return await ve(e.requestBody?.required===!0,a.schema,t);let o=a?.contentType??r;return f(`Request body prepared`,{...t===void 0?{}:{body:t},...o===void 0?{}:{contentType:o}})}function ge(e){if(typeof e!=`string`)return f(`Request body unchanged`,e);let t=e.trimStart().slice(0,1);if(t!==`{`&&t!==`[`)return f(`Request body unchanged`,e);try{let t=p.safeParse(JSON.parse(e));if(!t.success)throw t.error;return f(`Request body parsed`,t.data)}catch(e){return m(`Request body string must be valid JSON: ${e instanceof Error?e.message:String(e)}`)}}function _e(e,t){let n=e?.schema;if(n===void 0)return!1;let r=z(n),i=n.type??(r===void 0?void 0:t[r]?.type);return Array.isArray(i)?i.includes(`array`):i===`array`}function W(e){let t=Object.entries(e??{});return[...t.flatMap(e=>Ee(e[0])?[K(e,`json`)]:[]),...t.flatMap(e=>De(e[0])?[K(e,`multipart`)]:[])]}function G(e,t){if(t===void 0)return f(`Default request content selected`,e[0]);let n=Z(t),r=e.find(e=>Z(e.contentType)===n);return r===void 0?m(`Request Content-Type '${t}' is not supported. Supported choices: ${e.map(({contentType:e})=>e).join(`, `)||`none`}.`):f(`Explicit request content selected`,r)}function K(e,t){let n=e[1].schema;return{contentType:e[0],kind:t,...n===void 0?{}:{schema:n}}}async function ve(e,t,n){if(!e&&n==null)return f(`Optional multipart body omitted`,{});let r=ye(n);if(!r.ok||r.data===null)return m(r.summary,r.warnings);let i=new FormData;for(let e of be(t)){let t=r.data[e.name];if(t==null){if(e.required)return m(`Multipart body requires '${e.name}'.`);continue}if(Array.isArray(t)&&t.length<(e.schema.minItems??0))return m(`Multipart part '${e.name}' requires more entries.`);if(Array.isArray(t)&&t.length>(e.schema.maxItems??2**53-1))return m(`Multipart part '${e.name}' has too many entries.`);if(q(e.schema)||J(e.schema)){let n=J(e.schema)?t:[t];if(!Array.isArray(n)||n.some(e=>typeof e!=`string`))return m(`Multipart part '${e.name}' must contain file paths or URLs.`);for(let t of n){if(typeof t!=`string`)continue;let n=await Se(t);if(!n.ok||n.data===null)return m(n.summary,n.warnings);i.append(e.name,n.data.blob,n.data.filename)}}else if(xe(e.schema,t)){let n=JSON.stringify(t);i.append(e.name,new Blob([n],{type:`application/json`}),`${e.name}.json`)}else{let n=Y(i,e.name,t);if(!n.ok)return n}}return f(`Multipart body prepared`,{body:i})}function ye(e){if(typeof e==`object`&&e&&!Array.isArray(e)){let t=Object.fromEntries(Object.entries(e));return f(`Multipart input parsed`,t)}return m(`Multipart request body must be a JSON object keyed by form part name.`)}function be(e){let t=new Set(e?.required??[]);return Object.entries(e?.properties??{}).map(([e,n])=>({name:e,schema:n,required:t.has(e)}))}function q(e){return e.type===`string`&&e.format===`binary`}function J(e){return e.type===`array`&&e.items!==void 0&&q(e.items)}function xe(e,t){return typeof t!=`object`||!t||Array.isArray(t)?!1:e.type===`object`||typeof e.$ref==`string`&&e.$ref.length>0}function Y(e,t,n){if(Array.isArray(n)){for(let r of n){let n=Y(e,t,r);if(!n.ok)return n}return f(`Multipart scalar array appended`,null)}return typeof n==`object`?m(`Multipart part '${t}' must be scalar.`):(e.append(t,String(n)),f(`Multipart scalar appended`,null))}async function Se(e){return Te(e)?await Ce(e):b()===void 0?await we(e):m(`MCP callers cannot upload local files: pass an http(s) URL as the multipart part, or send media by sourceUrl in a JSON body. Local file paths are CLI-only.`)}async function Ce(e){let t=new AbortController,n=setTimeout(()=>t.abort(),U);try{let n=new URL(e),r=await fetch(e,{signal:t.signal});if(!r.ok)return m(`Failed to fetch media URL: ${r.status} ${r.statusText}`);let i=r.headers.get(`content-type`)?.split(`;`)[0]?.trim()??X(n.pathname)??``,a=new Blob([await r.arrayBuffer()],{type:i});return f(`URL media fetched`,{blob:a,filename:h(n.pathname)||`upload`})}catch(e){return t.signal.aborted?m(`Failed to fetch media URL: timed out after ${U}ms.`):m(`Failed to fetch media URL: ${e instanceof Error?e.message:String(e)}`)}finally{clearTimeout(n)}}async function we(e){try{let t=X(e)??``,n=await ne(e);return f(`File media read`,{blob:new Blob([n],{type:t}),filename:h(e)})}catch(t){return m(`Failed to read media file '${e}': ${t instanceof Error?t.message:String(t)}`)}}function Te(e){return e.startsWith(`http://`)||e.startsWith(`https://`)}function X(e){return Oe[ee(e).toLowerCase()]}function Ee(e){let t=Z(e);return t===`*/*`||t===`application/json`||t.endsWith(`+json`)}function De(e){return Z(e)===`multipart/form-data`}var Z=e=>e.split(`;`)[0]?.trim().toLowerCase()??``,Oe={".gif":`image/gif`,".heic":`image/heic`,".heif":`image/heif`,".jpeg":`image/jpeg`,".jpg":`image/jpeg`,".png":`image/png`,".webp":`image/webp`};function ke(e,t,n){let r=new Map,i=(t,a,o)=>{let s=z(t);if(a>n||s!==void 0&&o.includes(s))return;let c=s===void 0?o:[...o,s],l=je(e,t);for(let e of[...l.items===void 0?[]:[l.items],...l.oneOf??[],...l.anyOf??[],...l.allOf??[]])i(e,a,c);for(let[e,t]of Object.entries(l.properties??{}))r.set(e,Math.min(r.get(e)??a,a)),i(t,a+1,c)};for(let[e,n]of Object.entries(t))e.startsWith(`2`)&&i(Ae(n.content),0,[]);return r}function Ae(e){return e?.[`application/json`]?.schema??Object.values(e??{}).find(e=>e.schema!==void 0)?.schema}function je(e,t){let n=z(t);return{...n===void 0?void 0:e.components.schemas[n],...t}}function Me(e){return e===`write`||e===`delete`}function Ne(e,t){return e===`DELETE`||t===`delete`}var Pe=`Shell-safe input: single-quote string flag values that contain $; use --from-file or stdin for JSON bodies, multiline text, and free text with currency amounts.`;function Fe(e,t){let n=e===`array`?t:e;return n===void 0||n===`string`}var Q={add:`write`,answer:`search`,ask:`search`,attach:`write`,audit:`read`,batch:`lookup`,convert:`write`,create:`write`,delete:`delete`,enrich:`write`,filter:`search`,get:`read`,import:`write`,join:`write`,list:`read`,lookup:`lookup`,merge:`write`,preview:`lookup`,reconcile:`write`,remove:`delete`,replace:`write`,resolve:`lookup`,search:`search`,status:`read`,suggest:`read`,update:`write`,upload:`write`};function Ie(e){let t=/^[a-z]+/u.exec(e)?.[0];if(t===void 0)throw Error(`operationId '${e}' has no verb`);return t}function Le(e){return e!==`/v1/auth/api-key`&&!/^\/v1\/sitemap(?:\/|$)/u.test(e)}var Re=/(?:^|-)(?:runs|jobs)$/u;function ze(e){switch(e.intent){case`read`:case`lookup`:case`search`:case`status`:case`job`:return e.intent;case`write`:{let t=Ie(e.operationId);return t===`enrich`||t===`create`&&Re.test(e.cliPath.at(-2)??``)?`job`:null}case`delete`:return null;default:{let t=e.intent;throw Error(`No public MCP intent for ${String(t)}`)}}}function Be(e){let t=Object.entries(e.responses).filter(([e])=>e.startsWith(`2`));return t.length>0&&t.every(([,e])=>Object.values(e.content??{}).some(e=>Ve(e.schema)))}function Ve(e){return e?.format===`byte`||e?.format===`binary`}function He(e){return`aventure_${e}`}function $(e){return e.replace(/([a-z0-9])([A-Z])/gu,`$1-$2`).replace(/[^A-Za-z0-9]+/gu,`-`).replace(/^-+|-+$/gu,``).toLowerCase()}var Ue=e=>`--${$(e)}`;export{x as A,se as C,b as D,z as E,ie as O,B as S,V as T,G as _,Ue as a,H as b,He as c,ze as d,ke as f,_e as g,W as h,Fe as i,g as j,ae as k,Le as l,he as m,Q as n,Ne as o,ge as p,Be as r,Me as s,Pe as t,$ as u,S as v,pe as w,fe as x,oe as y};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aventurevc/aventure-cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.181",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Command-line access to aVenture research data on companies, people, funding, and news.",
|
|
6
6
|
"homepage": "https://docs.aventure.vc/cli",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"aventurePublicApi": {
|
|
35
35
|
"repository": "aventurevc/aventure-docs",
|
|
36
|
-
"commit": "
|
|
36
|
+
"commit": "2ad9d975497a5cad3da0361f72b7682e22805533",
|
|
37
37
|
"openapiPath": "openapi/openapi.json",
|
|
38
|
-
"openapiSha256": "
|
|
38
|
+
"openapiSha256": "5bdb6bdbe0115a230e366ae0d5be7bc11658c3b7cb1923174f54481aae502b67"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {}
|
|
41
41
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{C as e,O as t,T as n,i as r,l as i,n as a,o,p as s,t as c,u as l,v as u,w as d,y as f}from"./person-owner-BJgNYLKX.js";import{Nr as p}from"./dist-CpUXocgg.js";import{a as m,c as ee,d as h,i as g}from"./result-envelope-CFE7wPAr.js";import{a as te}from"./package-DPDX5zmx.js";import{a as ne,c as re,d as ie,l as ae,n as oe,o as se,s as _,x as ce}from"./tool-policy-DDfbFJCQ.js";import{a as le,n as ue,r as v,t as de}from"./text-field-BoNdbrtA.js";import{C as fe,E as pe,S as me,T as he,_ as ge,a as _e,b as y,c as ve,d as ye,f as be,g as xe,h as Se,i as Ce,l as we,m as Te,n as Ee,o as De,p as Oe,r as ke,s as Ae,t as je,u as Me,v as Ne,w as Pe,x as Fe,y as Ie}from"./detail-DDrpot7C.js";import{a as Le,o as Re}from"./cli-help-policy-ClfxVVMO.js";import{Buffer as b}from"node:buffer";var x=o([`HIGH`,`MEDIUM`,`LOW`]),ze=o([`OPERATION`,`SKILL`,`PROMPT`,`COMPLETION_GATE`,`RESEARCH_DETAIL_TYPE`,`RESEARCH_SNIPPET_TYPE`,`TEXT_TYPE`]),Be=Object.assign(n([ze,d()]),{enum:ze.enum}),Ve=f({excerpt:d(),sourceId:d(),sourceType:Be,sourceVersion:d().nullish()}),He=f({instruction:d(),operationId:d(),stepKey:d().optional()}),Ue=f({body:d(),expectation:d(),method:i(d()),override:d(),reject:i(d()),typeCatalog:d()}),We=f({cliCommand:d(),mcpTool:d().nullish(),step:He,writeGuidance:Ue.nullish()}),Ge=o([`ENTITY`,`TEXT`]),Ke=Object.assign(n([Ge,d()]),{enum:Ge.enum}),qe=f({description:d(),key:d(),type:Ke}),Je=f({catalogRevision:s().optional(),gateId:i(d()).optional(),input:i(qe),step:i(We),taskKey:d().optional()}),S=o([`TASK_PLAN`,`OPERATION_ADVICE`,`CLARIFY`,`ABSTAIN`]),Ye=f({candidate:i(Ve),operationId:d().nullish(),outcome:S,probability:u().nullish(),taskKey:d().nullish(),taskPlan:Je.nullish()}),Xe=f({answer:d(),citation:i(Ve),confidence:x,resolution:Ye.nullish()});function C(e,t,n=t.inputName){if(t.in===`body`)return n;let r=ct.find(t=>n===t.name&&e.path.includes(t.path));return r===void 0?st(it(n!==`id`&&n!==`slug`?n:`${et(e.path)}${rt(n)}`),t):r.inputName}function Ze(e,t,n=nt(e)){return Qe(tt(e,t),new Set(n))}function Qe(e,t){if(!t.has(e))return e;let n=`body${rt(e)}`,r=n;for(let e=2;t.has(r);e+=1)r=`${n}${e}`;return r}function $e(e,t,n){return`${e}[${t}].${n}`}function et(e){return lt.find(([,t])=>t.test(e))?.[0]??`record`}function tt(e,t){if(t.name===`id`&&e.path===`/v1/app/url-slug-redirects`)return`recordId`;let n=at(t);return st(e.intent===`search`&&(t.name.startsWith(`filter.`)||t.name.startsWith(`search.`))?it(n.replace(/^(?:filter|search)/u,``).replace(/^./u,e=>e.toLowerCase())):n,t)}function nt(e){return new Set(e.parameter.filter(e=>e.in===`path`||e.in===`query`||e.in===`header`).map(t=>C(e,t)))}function rt(e){return e.replace(/^./u,e=>e.toUpperCase())}function it(e){return e.replace(/^addressAddress/u,`address`).replace(/^arrayFilterAmountInvestedRange/u,`fundraiseAmountInvestedRange`).replace(/^arrayFilterAmountRaisedRange/u,`fundraiseAmountRaisedRange`).replace(/^arrayFilterEntityName$/u,`entityName`).replace(/^arrayFilterInvestedCompany$/u,`fundraiseInvestedCompanyName`).replace(/^arrayFilterPersonTitle$/u,`personTitle`).replace(/^arrayFilterRound$/u,`fundraiseRound`).replace(/^arrayFilterTotalInvestmentCount/u,`totalInvestmentCount`).replace(/^arrayFilterTypeRecord$/u,`typeRecord`).replace(/^createEntity/u,`entity`).replace(/^createUrlLink/u,`urlLink`).replace(/^fundraiseActivity/u,`fundraise`).replace(/FundraiseActivity/gu,`Fundraise`).replace(/^logoOption/u,`logo`).replace(/LogoOption/gu,`Logo`).replace(/^researchDetailTypeResearchDetail$/u,`researchDetailType`).replace(/^researchDetailValueResearchDetail$/u,`researchDetailValue`).replace(/^textText$/u,`text`).replace(/^textTextName$/u,`textName`).replace(/^textTextType$/u,`textType`)}function at(e){let t=it(e.inputName);return/(?:^|\.)nameAlias\[\]\./u.test(e.name)?t.replace(/^entityNameAlias/u,`alias`):/(?:^|\.)urlLink\[\]\./u.test(e.name)?ot(t):/(?:^|\.)manualLogo\./u.test(e.name)?t.replace(/^manualLogo/u,`logo`):t}function ot(e){return e===`urlLinkUrl`?`url`:e===`urlLinkUrlType`?`urlType`:e.replace(/^urlLink/u,`url`)}function st(e,t){return e===`text`?/(?:^|\.)text(?:\[\])?\.text$/u.test(t.name)?`textBody`:`inputText`:e}var ct=[{name:`detailId`,path:`/research-details/{detailId}`,inputName:`researchDetailId`},{name:`version`,path:`/instructions/`,inputName:`instructionVersion`},{name:`detailId`,path:`/financial/valuation/{detailId}`,inputName:`valuationDetailId`},{name:`joinId`,path:`/fundraise-investor-joins`,inputName:`fundraiseInvestorJoinId`}],lt=[[`entity`,/^\/v1\/entities(?:$|\/detail|\/lookup|\/summary|\/duplicate-check)/u],[`person`,/^\/v1\/people(?:\/detail|\/lookup|\/duplicate-check|\/\{slug\})/u],[`news`,/^\/v1\/(?:news\/|jobs\/news\/)/u],[`screenshot`,/^\/v1\/media\/screenshots\//u],[`media`,/^\/v1\/media/u],[`article`,/^\/v1\/app\/blog\/articles/u],[`page`,/^\/v1\/app\/pages/u],[`contact`,/^\/v1\/contacts\//u],[`provenance`,/^\/v1\/provenance\//u],[`location`,/^\/v1\/addresses\/locations\//u]];function ut(e){let t=e.requestBody?.[0],n=e.parameter.map(t=>dt(t,C(e,t))),r=(t?.parameter??[]).map(t=>dt(t,Ze(e,t)));return{selector:n.filter(e=>e.location===`path`||ft(e)),pagination:n.filter(pt),filter:[...n.filter(w),...r.filter(w)],body:r.filter(e=>!w(e))}}function dt(e,t){let{in:n,inputName:r,...i}=e;return{...i,name:e.in===`body`?t:e.name,flag:ne(t),location:n,description:e.description||`${e.name} ${e.in} parameter`}}function ft(e){return/(^|[A-Z])(id|slug)$/u.test(e.name)}function pt(e){return[`page`,`size`,`sort`,`cursor`,`mode`,`projection`].includes(e.name)}function w(e){return e.location!==`path`&&!ft(e)&&!pt(e)}var T=16e3,mt=(e,t=T)=>e.length<=120&&b.byteLength(`${e.join(`
|
|
2
|
-
`)}\n`,`utf8`)<=t,E=(e,t=!1,n=!1,r=1)=>{let i=ue(e),a=t||i.endsWith(`
|
|
3
|
-
`),o=i.endsWith(`
|
|
4
|
-
`)?i.slice(0,-1):i,s=o.length===0?[]:o.split(`
|
|
5
|
-
`),c=b.byteLength(`${s.join(`
|
|
6
|
-
`)}\n`,`utf8`);if(s.length<=120&&c<=16e3)return`${s.join(`
|
|
7
|
-
`)}${a?`
|
|
8
|
-
`:``}`;let l=n?Math.min(Math.max(1,r),118):0,u=l>0?s.slice(-l):[],d=u.length===0?s:s.slice(0,-u.length),f=[s.length>120?`120 physical lines`:``,c>16e3?`${T} UTF-8 bytes`:``].filter(Boolean).join(` and `),p=e=>ue(`... output truncated: ${e} more lines omitted to stay within ${f}; recover omitted response content with narrower server-side filters, the relevant sub-resource operation (aventure_help names it), or responseFormat json.`),m=(e,t)=>[...e,...u,t].join(`
|
|
9
|
-
`),ee=120-u.length-1,h=d.slice(0,ee),g=p(s.length-h.length-u.length);for(;b.byteLength(`${m(h,g)}\n`,`utf8`)>T;){if(h.length>0)h=h.slice(0,-1);else if(u.length>0)u=u.slice(1);else break;g=p(s.length-h.length-u.length)}return`${m(h,g)}${a?`
|
|
10
|
-
`:``}`},ht=new Set([`core`,`nameFull`,`nameBrand`,`name`,`title`,`fundingDetail`,`round`,`dateAnnounced`,`amountRaised`,`person`,`fundraiseRound`]),gt=5;function _t(e,t,n=T){let r=e=>e.length<=t&&mt(e,n);if(r(e))return e;let i=vt(e),a=e=>[...Tt(i,e-1),`... output folded to fit 120 lines and ${T} UTF-8 bytes; "(+N lines)" and "N more" mark hidden content; read it whole with responseFormat json, --data --to-file <path>, or the section's sub-resource operation.`],o=2,s=t,c=a(o);for(;o<=s;){let e=Math.floor((o+s)/2),t=a(e);r(t)?(c=t,o=e+1):s=e-1}return c}function vt(e){let t={line:``,child:[]},n=[{node:t,indent:-1}];for(let t of e){let e=bt(t);for(;n.length>1&&(n.at(-1)?.indent??-1)>=e;)n.pop();let r={line:t,child:[]};n.at(-1)?.node.child.push(r),n.push({node:r,indent:e})}return t.child}var yt=new WeakMap,D=e=>{let t=yt.get(e);if(t!==void 0)return t;let n=e.child.reduce((e,t)=>e+D(t),1);return yt.set(e,n),n},bt=e=>e.length-e.trimStart().length,xt=e=>e.line.trimStart().replace(/^- /u,``).split(`:`)[0]??``,St=e=>ht.has(xt(e)),O=e=>St(e)||!Ct(e)&&e.child.some(O),k=e=>St(e)?D(e):O(e)?e.child.reduce((e,t)=>e+k(t),1):1,Ct=e=>e.line.trimStart().startsWith(`-`),wt=e=>[e.line,...e.child.flatMap(wt)];function Tt(e,t){return e.reduce((e,t)=>e+D(t),0)<=t?e.flatMap(wt):e.every(Ct)?Dt(e,t):Ot(e,t)}function Et(e,t){return t>=D(e)?wt(e):t<=1?[`${e.line} (+${D(e)-1} lines)`]:[e.line,...Tt(e.child,t-1)]}function Dt(e,t){let n=Math.max(1,Math.floor((t-1)/Math.min(e.length,gt))),r=[],i=0;for(let a of e){let e=Math.min(n,D(a));if(r.length+e>t-1)break;r.push(...Et(a,e)),i+=1}let a=` `.repeat(bt(e[0]?.line??``));return i===e.length?r:[...r,`${a}... ${e.length-i} more`]}function Ot(e,t){let n=e=>e.reduce((e,t)=>e+k(t),0);if(e.length>t||n(e)>t&&e.some(e=>k(e)===1)){let r=e.toSorted((e,t)=>Number(O(t))-Number(O(e))||D(e)-D(t)).slice(0,Math.max(0,t-1));for(;r.length>1&&k(r.at(-1)??e[0]??{line:``,child:[]})===1&&n(r)>t-1;)r.pop();let i=` `.repeat(bt(e[0]?.line??``)),a=Ot(e.filter(e=>r.includes(e)),t-1),o=e.filter(e=>!r.includes(e)).map(xt),s=o.slice(0,10).join(`, `),c=o.length>10?`, ...`:``;return[...a,`${i}... ${o.length} more fields: ${s}${c}`]}let r=e.map(e=>({node:e,allotted:1})),i=t-e.length,a=(e,t)=>e.forEach((n,r)=>{let a=Math.min(t(n.node)-n.allotted,Math.floor(i/(e.length-r)));n.allotted+=a,i-=a});return a(r.filter(({node:e})=>k(e)>1).toSorted((e,t)=>k(e.node)-k(t.node)),k),a(r.toSorted((e,t)=>D(e.node)-e.allotted-(D(t.node)-t.allotted)),D),r.flatMap(({node:e,allotted:t})=>Et(e,t))}function kt(e,t){let n=e.requestBody?.[0],r={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:jt(e),responseContentType:[...new Set(e.response.filter(({status:e})=>e.startsWith(`2`)).flatMap(({contentType:e})=>e??[]))]},i=Nt(e);return t?{...r,...i===void 0?{}:{paidPlan:i},resource:e.resource,bodyKind:n?.kind??null,bodyRequired:n?.required??!1,requiredBodyPath:n?.requiredPath??[],argument:ut(e)}:{...r,optionalInput:Mt(e),arrayInput:Pt(e),...i===void 0?{}:{paidPlan:i}}}function At(e){let t=ut(e),n=e=>e.filter(e=>e.required);return{...kt(e,!1),optionalDetailOmitted:!0,argument:{selector:n(t.selector),pagination:n(t.pagination),filter:n(t.filter),body:n(t.body)}}}function jt(e){return[...e.parameter.filter(({required:e})=>e).map(({name:e})=>e),...e.requestBody?.[0]?.requiredPath??[]]}function Mt(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 Nt(e){return e.response.find(({status:e})=>e===`402`)?.description}function Pt(e){return[...e.parameter,...e.requestBody?.[0]?.parameter??[]].filter(({schemaType:e})=>e===`array`).map(({name:e})=>e)}var Ft=160,A=`Operation catalog matches`,It=[`described`,`requiredDescribed`,`optionalNamed`],Lt=e=>`${[A,...e].join(`
|
|
11
|
-
`)}\n`,Rt=e=>mt([A,...e]);function zt(e){if(!Array.isArray(e)||e.length===0||!e.every(Wt))return null;let t=e;for(let e of It){let n=[...t.flatMap(t=>Ht(t,e)),...Vt(t,e)];if(Rt(n))return Lt(n)}let n=e=>[...t.slice(0,e).flatMap(e=>Ht(e,`optionalNamed`)),...Vt(t.slice(0,e),`optionalNamed`),`... ${t.length-e} more operations omitted to fit ${T} UTF-8 bytes: ${t.slice(e).map(({operationId:e})=>e).join(`, `)}; call aventure_help with q=<operationId> and limit=1 to read one.`];return Lt(n([...t.keys()].findLast(e=>e>0&&Rt(n(e)))??1))}var Bt="the CLI's `aventure help <operationId> --data` prints every input";function Vt(e,t){return e.some(e=>`optionalDetailOmitted`in e)?[`... optional argument details omitted: the full list exceeds the result cap; ${Bt}.`]:t===`described`||!e.some(e=>`argument`in e)?[]:[`... ${t===`requiredDescribed`?`optional argument descriptions`:`optional argument details`} omitted to fit ${T} UTF-8 bytes; structuredContent carries them, and ${Bt}.`]}function Ht(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,t])=>` optional ${e}: ${t.join(`, `)}`):[],...`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`).map(e=>Ut(e,e.required||t===`described`)),...t===`optionalNamed`&&r.length>0?[` optional inputs: ${r.join(`, `)}`]:[]]}function Ut(e,t){let n=[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(`, `),r=` ${e.name} (${n})`;return t?`${r}: ${e.description.length<=Ft?e.description:`${e.description.slice(0,157)}...`}`:r}function Wt(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 Gt(e){let t=t=>{let n=e.parameter.filter(e=>e.in===t&&e.required&&e.schemaDefault===void 0).map(Kt);return n.length===0?void 0:Object.fromEntries(n)},n=t(`path`),r=t(`query`),i=[...new Set((e.requestBody?.[0]?.requiredPath??[]).map(e=>e.replace(/[.[].*$/su,``)))];return{tool:re(e.intent),operationId:e.operationId,...n===void 0?{}:{pathParams:n},...r===void 0?{}:{query:r},...e.requestBody===void 0?{}:{body:Object.fromEntries(i.map(e=>[e,`<${e}>`]))}}}function Kt(e){return[e.name,`<${e.name}>`]}function qt(e){let t=Jt(e.description);return{useFor:t.useFor||e.summary||e.description||`${e.method} ${e.path}`,notFor:t.notFor}}function Jt(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()??``}}var j=2,Yt=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=F(t);n.length!==0&&(e.add(n),(n===`individual`||n===`individuals`)&&M(e,`person`),Qt(e,Xt(n),n),Qt(e,Zt(n),n))}function Xt(e){if(e===`people`)return`person`;let t=e.endsWith(`ies`)?e.slice(0,-3):``;if(t.length>=j&&!t.endsWith(`v`)&&/[^aeiou]$/u.test(t))return`${e.slice(0,-3)}y`;if(e.length>j&&e.endsWith(`s`)&&!e.endsWith(`ss`)&&!e.endsWith(`us`)&&e!==`news`)return e.slice(0,-1)}function Zt(e){if(e===`person`)return`people`;if(e!==`new`)return e.length>=j&&e.endsWith(`y`)&&/[^aeiou]y$/u.test(e)?`${e.slice(0,-1)}ies`:e.endsWith(`s`)?void 0:`${e}s`}function Qt(e,t,n){t!==void 0&&t!==n&&t.length>=j&&/^[a-z]+$/u.test(t)&&e.add(t)}function N(e){let t=new Set(P(e)),n=Array.from(t);for(let e of n)M(t,e);return t}function $t(e){return P(e).map(N)}function en(e,t){if(e.length===0)return!1;let n=N(t.join(` `));return e.every(e=>[...e].some(e=>n.has(e)))}function P(e){return F(e).split(/[^a-z0-9]+/u).filter(e=>e.length>0&&!Yt.has(e))}function F(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`)}var tn=/\b(?:https?:\/\/)?(?:[a-z0-9-]+\.)+[a-z]{2,}(?::\d+)?(?:\/\S*)?/giu,nn=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/giu,rn=/^[a-z0-9]+(?:-[a-z0-9]+)+$/u,an=250,on=40,sn=100;function cn(e,t){let n=new Set,r=[],i=/\bslugs?\b/iu.test(e);return{text:e.replace(nn,()=>(n.add(`uuid`),` `)).replace(tn,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&&rn.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=rn.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 ln(e,t,n){return e===`uuid`?/(?:^id|Id)$/u.test(t)&&n.includes(`{${t}}`):t===e}function un(e,t){let n=new Set;for(let r of e){let e=new Set;M(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 dn(e,t,n){if(n.intent!==`read`&&n.intent!==`lookup`)return 0;let r=new Set(P(n.summary)),i=0;for(let t of e.kind)n.directParameterName.some(e=>ln(t,e,n.path))&&(i+=an,r.has(t)&&(i+=on));if(i===0)return 0;let a=new Set(P(`${n.summary} ${n.description}`));return(t.size>0?t.has(n.resource):e.urlPathWord.some(e=>{let t=new Set;return M(t,e),[...t].some(e=>a.has(e))}))&&(i+=sn),i}var fn=40,pn=4,mn=3,hn=1,gn=new Map;function _n(e){let t=gn.get(e);if(t!==void 0)return t;let n=p(),r=ce(n.paths,e),i=r===null?new Map:ie(n,r.operation.responses,mn);return gn.set(e,i),i}function vn(e,t,n){let r=0,i=new Map;for(let[e,a]of n){if(t.has(e.toLowerCase())&&(r+=fn*(4-a)/4),a>hn)continue;let n=new Set;for(let t of P(e))M(n,t);for(let e of n)i.set(e,Math.min(i.get(e)??a,a))}for(let t of e){let e=Math.min(...[...t].map(e=>i.get(e)??1/0));e<=hn&&(r+=pn*(2-e))}return r}var yn=5,bn=.5,xn=15,Sn=30,Cn=2,wn=.5;function Tn(e,t,n){let r=t.map(e=>({item:e,fields:n(e)})),i=cn(e,new Set(r.flatMap(({fields:e})=>e.cliPath))),a=un(i.urlPathWord,r.map(({fields:e})=>e)),o=F(i.text);if(o.length===0&&i.kind.size===0)return t.map(e=>({item:e,score:1}));let s=N(o),c=$t(o),l=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:kn({normalizedQuery:o,tokens:s,termForm:c,queryWord:l},t))+dn(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}))}function En(e){let t=[...e.parameter,...(e.requestBody??[]).flatMap(e=>e.parameter)];return{...e,cliPath:e.projection.cliPath,enumParameter:t.map(e=>({values:e.itemSchemaEnum??e.schemaEnum??[],direct:e.name===e.inputName})),parameterName:t.flatMap(e=>[e.name,e.inputName]),directParameterName:e.parameter.map(e=>e.name),parameterDescription:[...e.parameter,...e.requestBody??[],...(e.requestBody??[]).flatMap(e=>e.parameter)].map(({description:e})=>e),responseFieldLevel:_n(e.operationId)}}function Dn(e,t){let n=e.q?.trim()??``,r=Tn(n,t.filter(t=>On(e,t)&&(n.length>0||t.deprecated!==!0)),En),i=(r[0]?.score??0)*bn,a=r.filter(({score:e})=>e>=i),o=e.limit===void 0||!Number.isFinite(e.limit)?yn:e.limit,s=Math.min(a.length,Math.max(0,Math.trunc(o))),c=a.slice(0,s).map(({item:e})=>e),l={totalOperations:t.length,matched:a.length,returned:c.length},u=c.map(e=>kt(e,c.length===1));return{summary:A,data:m(ee(A,u,{counts:l}))?u:c.map(At),counts:l}}function On(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 kn({normalizedQuery:e,tokens:t,termForm:n,queryWord:r},i){let a=Fn(i),o=Nn(i),s=0;a.some(t=>t===e)&&(s+=100),a.some(t=>t.includes(e))&&(s+=40),s+=Pn(e,a);let c=new Set(a.flatMap(P));for(let e of t)a.some(t=>t===e)?s+=20:c.has(e)&&(s+=8);for(let e of i.cliPath){let n=new Set;M(n,e),[...n].some(e=>t.has(e))&&(s+=xn)}en(n,o)&&(s+=200),i.parameterName.some(t=>F(t)===e)&&(s+=Sn);let l=new Set(i.parameterDescription.flatMap(P));for(let e of t)l.has(e)&&(s+=Cn);return s+=Ln(t,i.enumParameter),[`list`,`search`,`find`,`browse`].some(e=>t.has(e))&&/^(?:list|search)[A-Z]/u.test(i.operationId)&&(s+=30),s+=vn(n,r,i.responseFieldLevel),s-=In(e,t,i.description),_(i.intent)&&!Mn(r)?s*wn:s}var An=`edit change set fix rename link unlink mark publish correct`.split(` `),jn=new Set([...Object.entries(oe).filter(([,e])=>_(e)).map(([e])=>e),...An]);function Mn(e){return[...e].some(e=>jn.has(e))}function Nn(e){return[e.operationId,e.cliPath.join(` `),e.summary].map(F).filter(e=>e.length>0)}function Pn(e,t){let n=P(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 Fn(e){return[...new Set([e.operationId,e.method,e.path,e.resource,e.intent,e.cliPath.join(` `),e.summary,Jt(e.description).useFor||e.description].map(F).filter(e=>e.length>0))]}function In(e,t,n){let r=F(Jt(n).notFor);if(r.length===0)return 0;let i=r.includes(e)?40:0,a=new Set(P(r));for(let e of t)r===e?i+=20:a.has(e)&&(i+=8);return i}function Ln(e,t){let n=0;for(let{values:r,direct:i}of t)r.some(t=>Rn(e,t))&&(n+=i?40:10);return n}function Rn(e,t){let n=P(t);return n.length>0&&n.every(t=>e.has(t))}function zn(e){return typeof e.data==`object`&&e.data!==null&&`response`in e.data?e.data.response:void 0}async function Bn(e,t,n,r){let i=e.q?.trim()??``;if(i.length===0)return g(`Provide q to resolve a request to one operation.`);let a=n.find(({resource:e,intent:t,deprecated:n})=>e===`help`&&t===`search`&&n!==!0);if(a===void 0)return g(`This build ships no help resolve operation.`);let o=await r(a,{body:{question:i,resolve:!0,...e.scope===void 0?{}:{scope:e.scope===`read`?`READ`:`WRITE`}}});if(!o.ok)return{...o,data:null};let s=Xe.safeParse(zn(o));if(!s.success||s.data.resolution==null)return g(`The help resolve operation returned no resolution.`);let{answer:c,resolution:l}=s.data,u=e=>t.find(t=>t.operationId===e),d=u(l.operationId),f=l.taskPlan??void 0,p=(f?.step??[]).map(({step:e})=>({step:e,contract:u(e.operationId)})),m=[...new Set([...l.operationId!=null&&d===void 0?[l.operationId]:[],...p.filter(({contract:e})=>e===void 0).map(({step:e})=>e.operationId)])];return m.some(e=>!n.some(t=>t.operationId===e))?g(`No operation on this connection answers that request.`):ee(m.length===0?`Help resolution`:`Help resolution this connection cannot finish: it cannot run ${m.join(`, `)}.`,{outcome:l.outcome,probability:l.probability,answer:c,candidate:l.candidate.map(({sourceId:e})=>e).filter(e=>n.some(({operationId:t})=>t===e)),...d===void 0?{}:{operation:{operationId:d.operationId,apiRoute:`${d.method} ${d.path}`,...qt(d),mcpCall:Gt(d)}},...(l.taskKey,{}),...f===void 0?{}:{taskPlan:{input:f.input,step:p.map(({contract:e,step:{stepKey:t,instruction:n,operationId:r}})=>e===void 0?{instruction:n,operationId:r}:{instruction:n,mcpCall:Gt(e)})}}},{warnings:m.map(e=>n.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.`)})}var Vn=f({detail:d(),field:d().nullish(),scope:o([`entity`,`person`,`news`])}),Hn=o([`auto`,`exact`,`keyword`,`semantic`,`natural`,`hybrid`]),Un=Object.assign(n([Hn,d()]),{enum:Hn.enum}),I=f({modeRequested:Un,modeUsed:Un}),Wn=f({answerUnavailable:l(),entity:I,news:I,person:I,rejection:i(Vn),unavailable:i(o([`entity`,`person`,`news`]))}),Gn=f({acceleratorParticipation:i(Oe),detail:i(ye)}),L=f({core:y,enrichment:Fe,fundraiseRound:i(Se),research:Gn,semanticMatch:_e.nullish()}),Kn=o([`curated`,`semantic`,`precomputed`,`derived`,`computed`]),qn=f({compositeScore:u().nullish(),cosineScore:u().nullish(),curatedAsOf:d().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:d().nullish(),curatedSource:d().nullish(),derivedFromEntityId:t().nullish(),matchedSectionWeight:u().nullish(),origin:Kn,rank:s(),sharedSectionCount:s().nullish()}),Jn=f({entity:L,similarity:qn}),Yn=o([`aventureBlog`,`personalBlog`,`employerBlog`,`linkedin`,`xTwitter`,`medium`,`substack`,`other`]),Xn=f({author:d().nullish(),createdAt:r({offset:!0}),externalId:d().nullish(),id:t(),isCurrent:l(),lastFetchedAt:r({offset:!0}).nullish(),mentionedEntityId:i(t()),mentionedPersonId:i(t()),owner:c,publishedAt:r({offset:!0}).nullish(),summary:d().nullish(),summaryGeneratedAt:r({offset:!0}).nullish(),title:d().nullish(),topic:d().nullish(),type:Yn,updatedAt:r({offset:!0}),url:d()}),Zn=o([`low`,`medium`,`high`]),Qn=f({asOfDate:d().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:l().nullish(),dataConfidence:Zn.nullish(),dateValue:d().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:u().nullish(),referenceValue:d().nullish(),source:d().nullish(),textValue:d().nullish(),updatedAt:r({offset:!0}).nullish(),valueType:be}),$n=f({asOfDate:d().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:Qn,id:d()}),er=f({fundraiseInvestorJoin:l(),fundraiseTransaction:l(),operatingStatus:l(),relationship:l()}),tr=o([`Acquisition`,`Acquired`,`Acquired Subsidiary`]),nr=o([`Announced`,`Announced; subject to approvals and closing conditions`,`Active`,`Closed`,`Completed`,`In Progress`,`Open`]),rr=f({acquiredEntity:y,acquirerEntity:y,amount:u().int().nullish(),announcedAt:d().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:d().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:d().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:r({offset:!0}).nullish(),currency:d().nullish(),dataConfidence:Ne.nullish(),evidence:er,fundraiseTransactionId:t().nullish(),investorJoinId:t().nullish(),isCurrent:l().nullish(),publicSource:Ie.nullish(),relationshipId:s(),status:tr,transactionStatus:nr.nullish(),updatedAt:r({offset:!0}).nullish()}),ir=o([`SAFE`,`Convertible Note`,`Preferred Stock`,`Common Stock`,`Other Equity`,`Bond`,`Loan`,`Other Debt`,`Grant`,`Token`]),ar=f({amountInvested:u().nullish(),createdAt:r({offset:!0}),financialInstrumentType:ir.nullish(),id:t(),investor:c,leadInvestor:l(),transactionId:t(),updatedAt:r({offset:!0})}),or=f({entity:je,investorAttribution:i(xe),round:i(ge),roundCount:s()}),sr=f({core:y,fundingDetail:Pe.nullish(),similarity:qn,urlLink:i(me)}),cr=f({compliance:Me.nullish(),createdAt:r({offset:!0}).nullish(),id:s(),isCurrent:l().nullish(),isPrimary:l().nullish(),language:d().nullish(),owner:c,text:d(),textName:d().nullish(),textType:d(),updatedAt:r({offset:!0}).nullish()}),lr=o([`stored`,`derivedFromPreAndRaised`,`derivedFromPostMinusRaised`,`reportedAssumedPost`]),ur=o([`fundraiseRound`,`researchDetail`]),dr=o([`preMoney`,`postMoney`,`reported`]),fr=f({amountRaised:u().int().nullish(),asOfDate:d().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:Zn,currency:d(),declaredBasis:dr,derivation:lr,detailId:s().nullish(),label:d().nullish(),source:ur,sourceRef:d(),valuationPostMoney:u().int().nullish(),valuationPreMoney:u().int().nullish()}),pr=f({createdAt:r({offset:!0}).nullish(),description:d().nullish(),forkCount:s(),githubId:u().int(),homepageUrl:d().nullish(),id:u().int(),isArchived:l(),isFork:l(),language:d().nullish(),license:d().nullish(),name:d(),ownerLogin:d(),repoCreatedAt:r({offset:!0}).nullish(),repoPushedAt:r({offset:!0}).nullish(),stargazerCount:s(),topic:i(d()),updatedAt:r({offset:!0}).nullish(),url:d()}),R=f({empty:l().optional(),sorted:l().optional(),unsorted:l().optional()}),z=f({offset:u().int().optional(),paged:l().optional(),pageNumber:s().optional(),pageSize:s().optional(),sort:R.optional(),unpaged:l().optional()}),mr=f({investorAttribution:i(xe),person:ke,round:i(ge),roundCount:s()}),hr=o([`precomputed`,`live`]),gr=f({compositeScore:u().nullish(),cosineScore:u().nullish(),matchedSectionWeight:u().nullish(),origin:hr,rank:s(),sharedSectionCount:s().nullish()}),_r=f({currentRole:Ae.nullish(),person:Ce,similarity:gr}),vr=o([`by`,`about`]),yr=o([`newsArticle`,`blogPost`,`externalSocialPost`,`repositoryOwner`,`repository`,`webSite`,`webPage`,`researchPaper`]),br=f({canonicalUrl:d().nullish(),contentId:d(),contentType:yr,createdAt:r({offset:!0}).nullish(),publishedAt:r({offset:!0}).nullish(),relation:vr.nullish(),sourceDomain:d().nullish(),sourceName:d().nullish(),summary:d().nullish(),title:d(),topic:d().nullish(),updatedAt:r({offset:!0}).nullish(),url:d().nullish(),year:s().nullish()});f({content:i(Xn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(n([pe,he])).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i($n).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(y).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(rr).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(je).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(ar).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(Se).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(or).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(L).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(Ae).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(Te).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(ye).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(we).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(Jn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(sr).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(cr).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(me).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(fr).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(pr).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(ve).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(Ce).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(ke).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(De).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(mr).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(_r).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(br).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()});var xr=f({content:i(L),number:s(),size:s(),totalElements:u().int(),totalPages:s()}),Sr=f({content:i(ve),number:s(),size:s(),totalElements:u().int(),totalPages:s()}),Cr=f({content:i(Ce),number:s(),size:s(),totalElements:u().int(),totalPages:s()});f({content:i(Ee).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:z.optional(),size:s().optional(),sort:R.optional(),totalElements:u().int().optional(),totalPages:s().optional()});var wr=o([`entityRecord`,`researchSnippet`,`newsArticle`,`personRecord`,`fundraiseTransaction`]),Tr=Object.assign(n([wr,d()]),{enum:wr.enum}),Er=f({entityId:t(),source:Tr,sourceId:d()}),Dr=f({citation:i(Er),text:d(),topic:d().nullish()}),Or=f({citation:i(Er),confidence:x,description:d().nullish(),heading:d().nullish(),paragraph:i(Dr),relatedQuery:i(d()),shareable:l(),text:d(),title:d().nullish()}),kr=f({sortPriority:o([`NONE`,`ANY_LOGO_FIRST`,`REAL_LOGO_FIRST`]).optional()}),Ar=f({max:r({offset:!0}).nullish(),min:r({offset:!0}).nullish()}),B=f({max:u().nullish(),min:u().nullish()}),V=f({max:s().nullish(),min:s().nullish()}),jr=f({averageAmountInvestedUsdRange:i(B).optional(),largestAmountInvestedUsdRange:i(B).optional(),smallestAmountInvestedUsdRange:i(B).optional(),totalAmountInvestedUsdRange:i(B).optional(),totalInvestmentRange:i(V).optional()}),Mr=f({amountInvestedRange:i(B).optional(),amountRaisedRange:i(B).optional(),dateAnnouncedRange:Ar.nullish(),investedCompanyName:i(d()).optional(),investedCountry:i(d()).optional(),investedIndustry:i(d()).optional(),investedRound:i(d()).optional(),investorActivity:jr.optional(),investorName:i(d()).optional(),lastRoundYearRange:i(V).optional(),rankByInvestmentActivity:l().nullish(),round:i(d()).optional(),totalRaisedRange:i(B).optional(),valuationRange:i(B).optional()}),Nr=o([`NONE`,`COMPANY_LISTING_READY`]),Pr=o([`Operating`,`Acquired`,`Acquired Subsidiary`,`Closed`,`Closed (Acquihire)`,`Inactive`]),Fr=o([`hostPath`,`domain`]),Ir=e({acceleratorBrand:i(d()).optional(),acceleratorCohort:i(d()).optional(),acceleratorName:i(d()).optional(),acceleratorStatus:i(d()).optional(),affinity:i(d()).optional(),closedLast:l().optional(),employeeCountRange:i(V).optional(),entityId:i(t()).optional(),entityName:i(d()).optional(),featured:l().nullish(),fundraiseActivity:Mr.optional(),hasFundraising:l().nullish(),headquartersCity:i(d()).optional(),headquartersCountry:i(d()).optional(),headquartersState:i(d()).optional(),industry:i(d()).optional(),letter:d().nullish(),location:i(d()).optional(),logoOption:kr.optional(),mainProduct:i(d()).optional(),operatingStatus:i(Pr).optional(),originCountry:i(d()).optional(),person:i(d()).optional(),portfolioHeadquartersCity:i(d()).optional(),portfolioHeadquartersCountry:i(d()).optional(),portfolioHeadquartersState:i(d()).optional(),qualityGate:Nr.optional(),rankByProminence:l().nullish(),semanticQuery:d().nullish(),slug:i(d().regex(/^[a-z0-9_-]+$/).max(255)).optional(),stage:i(d()).optional(),suppressLateStage:l().nullish(),suppressNonOperating:l().nullish(),suppressZeroTotalRaised:l().nullish(),tag:i(d()).optional(),textSearch:d().nullish(),typeCustomer:i(d()).optional(),typeModel:i(d()).optional(),typeOwnership:i(d()).optional(),typeRecord:i(a).optional(),typeRevenue:i(d()).optional(),typeTechnologyUsed:i(d()).optional(),url:d().nullish(),urlDomain:d().nullish(),urlMatchMode:Fr.nullish(),urlType:fe.nullish(),yearFoundedRange:i(V).optional()}),Lr=o([`discovery`,`profile`,`peer`,`comparison`]),Rr=o([`keyword`,`semantic`]),zr=o([`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`]),Br=Object.assign(n([zr,d()]),{enum:zr.enum}),Vr=f({descending:l(),field:Br,sortKey:d().nullish()}),Hr=f({order:i(Vr),relevance:Rr.nullish()}),Ur=f({confidence:x,execution:I,fallbackUsed:l(),filter:Ir,intent:Lr,interpretation:d(),sort:Hr,subjectEntityName:i(d()),unsupported:d().nullish()}),Wr=f({changedAt:r({offset:!0}).nullish(),dataSourceUpdatedAt:r({offset:!0}).nullish(),pendingApproval:s().nullish(),sourceId:d().nullish(),status:d().nullish()}),Gr=f({fundManagerRelationshipSource:Wr.nullish(),fundraiseTransaction:Se,fundraiseTransactionSource:Wr.nullish(),investorJoinSource:Wr.nullish()}),Kr=f({evidence:Gr,investor:c,semanticMatch:_e.nullish()}),qr=f({entityId:t(),matchedOffering:y.nullish(),probability:u(),webUrl:i(d())}),Jr=f({entityId:t(),label:d(),publishedAt:r({offset:!0}).nullish(),score:u(),source:Tr,sourceId:d(),text:d(),url:d().nullish()}),Yr=f({answer:Or.nullish(),interpretation:Ur,investment:i(Kr),judgment:i(qr),passage:i(Jr),peer:i(Jn),pendingWebQuery:i(d()),result:xr,searchRequestId:t().nullish(),subject:i(L)}),Xr=o([`auto-match`,`needs-review`,`approved`,`rejected`]),Zr=f({createdAt:r({offset:!0}),entityId:t(),href:d().nullish(),internal:l(),matchStatus:Xr.nullish(),mention:d().nullish(),slug:d().regex(/^[a-z0-9_-]+$/).max(255).nullish(),typeRecord:a.nullish(),updatedAt:r({offset:!0})}),Qr=f({entity:i(Zr),newsId:s()}),$r=e({acceleratorBrand:i(d()).optional(),acceleratorCohort:i(d()).optional(),acceleratorName:i(d()).optional(),acceleratorStatus:i(d()).optional(),affinity:i(d()).optional(),closedLast:l().optional(),employeeCountRange:i(V).optional(),entityId:i(t()).optional(),entityName:i(d()).optional(),featured:l().nullish(),fundraiseActivity:Mr.optional(),hasFundraising:l().nullish(),headquartersCity:i(d()).optional(),headquartersCountry:i(d()).optional(),headquartersState:i(d()).optional(),industry:i(d()).optional(),letter:d().nullish(),location:i(d()).optional(),logoOption:kr.optional(),mainProduct:i(d()).optional(),operatingStatus:i(Pr).optional(),originCountry:i(d()).optional(),person:i(d()).optional(),portfolioHeadquartersCity:i(d()).optional(),portfolioHeadquartersCountry:i(d()).optional(),portfolioHeadquartersState:i(d()).optional(),qualityGate:Nr.optional(),rankByProminence:l().nullish(),slug:i(d().regex(/^[a-z0-9_-]+$/).max(255)).optional(),stage:i(d()).optional(),suppressLateStage:l().nullish(),suppressNonOperating:l().nullish(),suppressZeroTotalRaised:l().nullish(),tag:i(d()).optional(),textSearch:d().nullish(),typeCustomer:i(d()).optional(),typeModel:i(d()).optional(),typeOwnership:i(d()).optional(),typeRecord:i(a).optional(),typeRevenue:i(d()).optional(),typeTechnologyUsed:i(d()).optional(),url:d().nullish(),urlDomain:d().nullish(),urlMatchMode:Fr.nullish(),urlType:fe.nullish(),yearFoundedRange:i(V).optional()}),ei=f({amountInvestedRange:i(B).nullish(),amountRaisedRange:i(B).nullish(),entityName:i(d()).nullish(),investedCompany:i(d()).nullish(),personTitle:i(d()).nullish(),round:i(d()).nullish(),totalInvestmentCount:i(V).nullish(),typeRecord:i(a).nullish()}),ti=f({arrayFilter:ei.optional(),entityFilter:$r.optional(),entityId:t().nullish(),entitySlug:d().nullish(),firstName:d().nullish(),includeAddress:l().nullish(),includeUrl:l().nullish(),investorActivity:jr.optional(),isCurrent:l().nullish(),lastName:d().nullish(),letter:d().nullish(),personId:i(t()).max(200).optional(),personName:i(d()).optional(),role:d().nullish(),search:d().nullish(),semanticQuery:d().nullish(),status:d().nullish()}),ni=f({descending:l(),field:o([`ID`,`FIRST_NAME`,`LAST_NAME`,`FULL_NAME`,`SLUG`,`CREATED_AT`,`UPDATED_AT`,`STATUS`,`GENDER`,`AMOUNT_INVESTED`,`TOTAL_INVESTMENTS`]),sortKey:d().nullish()}),ri=f({order:i(ni),relevance:Rr.nullish()}),ii=f({confidence:x,execution:I,fallbackUsed:l(),filter:ti,interpretation:d(),sort:ri,unsupported:d().nullish()}),ai=f({interpretation:ii,investment:i(Kr),result:Cr,searchRequestId:t().nullish()}),oi=f({label:d(),query:d()}),si=f({key:d(),option:i(oi),prompt:d()}),ci=f({entity:Yr,entityDetail:i(je),news:Sr,newsEntityMention:i(Qr),person:ai,personDetail:i(ke),provenance:Wn,qualifier:si.nullish()});function li(e,t){return e.map(e=>{let n=e.requestBody??[],r=[...e.parameters.map(e=>ui(e)),...n.flatMap(e=>e.parameter.map(t=>ui(t,n.length>1?e.contentType:void 0))),...di(n)],i=[t,...e.cliPath].join(` `),a=_(e.intent),o=n[0];return{operationId:e.operationId,method:e.method,path:e.path,resource:e.resource,intent:e.intent,scope:e.scope,mutates:a,destructive:se(e.method,e.intent),auth:e.auth,cli:{command:i,path:e.cliPath},mcpTool:e.binaryResponse||!ae(e.path)?null:re(e.intent),body:{hasBody:o!==void 0,kind:o?.kind??null,...o!==void 0&&n.length>1?{contentType:o.contentType}:{},required:o?.required??!1,description:o?.description??``,requiredPath:o?.requiredPath??[]},flags:r,errorResponse:e.errorResponse,...e.successResponse===void 0?{}:{successResponse:e.successResponse},summary:e.summary,description:e.description,...e.deprecated===void 0?{}:{deprecated:e.deprecated}}})}function ui(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 di(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 fi(e){return e.flags.filter(({contentType:t})=>t===void 0||t===e.body.contentType)}var pi=[`-id`,`-slug`,`-url`],mi=[`--id`,`--slug`,`--url`],hi=`/v1/lookup`,gi=`--from-file "<path>"`;function _i(e,t,n=te().bin[0]){let r=li(t,n),i=r.find(t=>t.operationId===e);return i===void 0?[]:xi(i,r)}function vi(e,t,n=te().bin[0]){let r=t.find(t=>t.operationId===e),[i]=r===void 0?[]:li([r],n);return i&&bi(i,wi(i,!1))}function yi(e,t,n,r=te().bin[0]){let i=e=>{let t=e.findIndex((e,t)=>n[t]!==e);return t===-1?e.length:t},a=`${n[0]} get`,[o,s]=t.filter(({method:t,path:n,parameters:r,cliPath:o})=>{let s=r.filter(({location:e})=>e===`path`),[c]=s;return t===`GET`&&s.length===1&&c?.flag.split(/\s+/u)[0]===e&&n.endsWith(`/{${c.name}}`)&&(i(o)>1||o.join(` `)===a)}).toSorted((e,t)=>i(t.cliPath)-i(e.cliPath));if(o!==void 0&&(s===void 0||i(s.cliPath)!==i(o.cliPath)))return vi(o.operationId,t,r)}function bi(e,t){return[e.cli.command,...t,`--data`].join(` `)}function xi(e,t){return[`example: ${bi(e,wi(e))}`,...Si(e,t)]}function Si(e,t){return fi(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} ${Ei(i)} --data`,o=t.find(e=>e.method===`POST`&&e.path===hi),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} ${Ei(s)} --data, then match.owner.${e.optionKey} when status is MATCHED`]})}var Ci=/(?:^|\.)text$/u;function wi(e,t=!0){let n=fi(e).filter(e=>e.required),r=e.body.kind===`json`&&n.some(e=>e.location===`body`&&Ci.test(e.wireName))?n.filter(e=>e.location!==`body`):n,i=(n.length>0||!t?r:Ti(e)).map(Ei);return(e.body.required||e.body.requiredPath.length>0)&&!r.some(e=>e.location===`body`)?[...i,gi]:i}function Ti(e){let t=new Set;M(t,e.resource);for(let n of pi)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 mi){let n=e.flags.find(e=>e.name===t);if(n!==void 0)return[n]}return[]}function Ei(e){return e.placeholder===null?e.name:`${e.name} "${e.placeholder}"`}var Di=`aventure`;function Oi(e,t){let n=t.find(t=>t.operationId===e)?.cliPath;return n===void 0?void 0:`${Di} ${n.join(` `)}`}function ki(e,t,n=e){return vi(e,t,`aventure`)??n}function Ai(e,t){let n=Xe.safeParse(e);if(!n.success)return null;let{answer:r,citation:i,confidence:a,resolution:o}=n.data;if(o!=null)return ji(r,o,t);let s=r.trimEnd().split(`
|
|
12
|
-
`),c=new Set(i.flatMap(({sourceType:e,sourceId:n})=>{if(e!==Be.options[0].enum.OPERATION)return[];let r=Oi(n,t);return r===void 0?[]:[r]}));return c.size>0&&s.push(``,`Commands:`,...[...c].map(e=>` ${e}`)),s.push(``,`Confidence: ${a}`),i.length===0?s:(s.push(`Sources (${i.length}):`),s.push(...i.map(({excerpt:e,sourceId:t})=>{let n=e.trim();return n.length>0?` - ${t}: ${n}`:` - ${t}`})),s)}function ji(e,t,n){let{outcome:r,operationId:i,probability:a,candidate:o,taskKey:s,taskPlan:c}=t,l=[c==null?e.trimEnd():Ni(c)],u=[``,`Outcome: ${r}${a==null?``:` (probability ${a.toFixed(2)})`}`];switch(r){case S.enum.TASK_PLAN:return[...l,...c==null?[]:Pi(c,n),...u];case S.enum.OPERATION_ADVICE:{let e=o.filter(({sourceId:e})=>e!==i);return[...l,...i==null?[]:[``,`Command:`,` ${ki(i,n)}`],...u,...e.length===0?[]:[`Alternatives: ${e.map(({sourceId:e})=>e).join(`, `)}`]]}case S.enum.CLARIFY:return[...l,...s==null?[]:[``,`Leading catalog task: ${s}`],...Ii(`Candidates:`,o,n),...u];case S.enum.ABSTAIN:return[...l,...Ii(`Nearest operations:`,o,n),...u];default:throw Error(`Unhandled help resolution outcome ${String(r)}`)}}function Mi(e,t){let n=Je.safeParse(e);return n.success?[Ni(n.data),...Pi(n.data,t)]:null}var Ni=({taskKey:e,catalogRevision:t})=>e===void 0?`Run these steps in order.`:`Run catalog task ${e}${t===void 0?``:` (catalog revision ${t})`}.`;function Pi(e,t){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})=>` ${e} (${t}): ${n}`)],``,`Steps:`,...e.step.flatMap(({step:n,cliCommand:r,writeGuidance:i},a)=>[` ${a+1}. ${n.stepKey===void 0?``:`${n.stepKey}: `}${ki(n.operationId,t,r)}`,` ${n.instruction}`,...Fi(e,a,i)]),...e.gateId?.length?[``,`Completion gates: ${e.gateId.join(`, `)}`]:[]]}function Fi(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 Ii(e,t,n){if(t.length===0)return[];let r=t.map(({sourceId:e,excerpt:t})=>({command:Oi(e,n)??e,excerpt:t})),i=Math.max(...r.map(({command:e})=>e.length));return[``,e,...r.map(({command:e,excerpt:t})=>` ${e.padEnd(i)} # ${t}`)]}var H=30,Li=8,U=10,Ri=2,zi=[`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`],Bi=new Set([`page`,`size`,`sort`,`cursor`,`mode`,`projection`]),Vi=[`interpretation`,`confidence`,`unsupported`,`execution`,`fallbackUsed`];function Hi(e,t,n){if(typeof t==`string`)return E(t);let r=zt(t);if(r!==null)return E(r);let i=$i(t);if(i===null)return null;let a=e.find(({operationId:e})=>e===i.operationId),{response:o,hiddenNote:s}=le(a?.detailField,i.response),c={...i,response:o,parameters:a?.parameters??[]},l=Ai(c.response,e)??Mi(c.response,e);if(l!==null)return E(l.join(`
|
|
13
|
-
`),!0);let u=Ui(c);if(u!==null)return E([...u,...s].join(`
|
|
14
|
-
`),!0,s.length>0);let d=[c.summary??n??c.operationId??`OpenAPI call succeeded`,`${c.method} ${c.endpoint}`],f=_t(qi(c),117-s.length,T-b.byteLength(`${[...d,...s].join(`
|
|
15
|
-
`)}\n`,`utf8`));return E([...[...d,...f].filter(Boolean),...s].join(`
|
|
16
|
-
`),!0,s.length>0)}function Ui({response:e,...t}){if(e===void 0||!Y(e)||!(`entity`in e&&`person`in e&&`news`in e))return null;let n=ci.safeParse(e);if(!n.success)return null;let{entity:r,person:i,news:a,provenance:o}=n.data;return[...r.answer?Wi(r.answer):[],...o.unavailable.map(e=>`${e} unavailable: retry this scope later`),...o.answerUnavailable?[`answer unavailable: retry this search later`]:[],...o.rejection.map(({scope:e,detail:t})=>v(`${e} rejected: ${t}`)),[`entities:`,...W(r.result,t)].join(`
|
|
17
|
-
`),[`people:`,...W(i.result,t)].join(`
|
|
18
|
-
`),[`news:`,...W(a,t)].join(`
|
|
19
|
-
`)]}function Wi(e){let t=`relatedQuery:\n${e.relatedQuery.map(e=>` - ${v(e)}`).join(`
|
|
20
|
-
`)}`,n=`citations:\n${e.citation.map(({source:e,sourceId:t,entityId:n})=>v(` - ${e}:${t} entity=${n}`)).join(`
|
|
21
|
-
`)}`;return[`answer:\n ${ue(e.text).replaceAll(`
|
|
22
|
-
`,`
|
|
23
|
-
`)}`,...e.relatedQuery.length===0?[]:[t],...e.citation.length===0?[]:[n]]}function Gi(e){let t=$i(e)?.response,n=Y(t)?t.interpretation:void 0;if(!Y(n))return null;let r=I.safeParse(n.execution);if(!r.success)return null;let{modeRequested:i,modeUsed:a}=r.data,o=K(n.filter),{unsupported:s,fallbackUsed:c}=n;return E([`strategy: requested=${i} used=${a}`,...Y(o)?[`constraints:`,...Object.entries(o).flatMap(([e,t])=>t===void 0?[]:[` ${e}: ${Ki(t)}`])]:[],typeof s==`string`&&s.trim().length>0?`unsupported: ${s}`:``,c===!0?`fallback: semantic search over the original query`:``].filter(Boolean).join(`
|
|
24
|
-
`),!0)}var Ki=e=>X(e)?v(e):Array.isArray(e)&&e.every(X)?e.map(e=>v(e)).join(`, `):JSON.stringify(e);function qi(e){let{response:t,method:n,nextCursor:r,httpStatus:i,location:a}=e;if(t===void 0)return a!==void 0&&i!==void 0?[`status=${i} redirect=${a}`]:i===void 0?[]:[`status=${i} no response body`];let o=i===void 0||n===`GET`?``:`status=${i}`,s=Y(t)&&!J(t)?ta(t):null,c=s===null?void 0:Y(s.context.interpretation)?K(s.context):s.context,l=c!==void 0&&Y(c)?Object.entries(c):[],u=l.filter(e=>Array.isArray(e[1])&&e[1].length>0&&e[1].every(Y)),d=new Set(u.map(([e])=>e)),f=Object.fromEntries(l.filter(([e])=>!d.has(e)));return[o,...J(t)?W(t,e,r):s===null?ra(t)?Xi(t.filter,t.meta):ia(t)?Xi([...t.arrayFilterEntry,...t.rangeFilterEntry],t.filtersMeta):oa(t)?Zi(t):G(t,``):[...W(s.page,e,r),...Object.keys(f).length===0?[]:G(f,``),...u.flatMap(([e,t])=>[`${e}:`].concat(Ji(t)))]].filter(Boolean)}function W(e,t,n){let r=Qi(t),i=e.numberOfElements??e.content.length,a=(e.totalElements??0)-(e.number??0)*(e.size??0)-i;return[`rows=${i}${e.number===void 0?``:` page=${e.number}`}${e.size===void 0?``:` size=${e.size}`}${e.totalElements===void 0?``:` total=${e.totalElements}`}${e.totalPages===void 0?``:` totalPages=${e.totalPages}`}`,r.length>0?`filters: ${r.join(` `)}`:``,n===void 0?``:`next: --cursor ${Q(n)}`,a>0&&n===void 0?`more: ${a} rows not shown; use ${Z(`page`,t.parameters)} or ${Z(`size`,t.parameters)} to see them`:``,...Ji(e.content)].filter(Boolean)}function Ji(e){let t=e.filter(Y);if(t.length===0)return e.length===0?[`(empty)`]:ea(e,``);let n=Yi(t);if(n.length===0)return ea(e.slice(0,H),``);let r=t.slice(0,H).map(e=>{let t=q(e);return n.map(e=>t[e]??``)}),i=n.map(e=>e.split(`.`).at(-1)??e),a=i.map((e,t)=>{let n=r.map(e=>e[t]??``),i=Math.max(e.length,...n.map(e=>e.length));return e===`id`||e.endsWith(`Id`)?i:Math.min(32,i)}),o=e=>e.map((e,t)=>sa(e,a[t]??12).padEnd(a[t]??12)).join(` `),s=[o(i),o(a.map(e=>`-`.repeat(e)))];return r.forEach(e=>s.push(o(e))),t.length>H&&s.push(`... ${t.length-H} more rows`),s}function Yi(e){let t=new Set(e.flatMap(e=>Object.keys(q(e)))),n=zi.filter(e=>t.has(e)),r=[...t].filter(e=>!n.includes(e)).filter(e=>!e.toLowerCase().includes(`logo`)).slice(0,Li-n.length);return[...n,...r].slice(0,Li)}function Xi(e,t){let n=t!==void 0&&Y(t)?t:{},r=[`total`,`limit`].flatMap(e=>typeof n[e]==`number`?[` ${e}=${n[e]}`]:[]).join(``),i=[`filters=${e.length}${r}`];for(let t of e){let e=t.choiceOption.length,n=t.choiceOptionTotal===null?`unknown (degraded)`:t.choiceOptionTotal??e,r=t.choiceOptionTruncated===!0?` truncated`:``;i.push(`- ${t.filterKey} (${t.label}): choices ${e}/${n}${r}`),t.choiceOption.slice(0,U).forEach(e=>{i.push(` ${Z(t.filterKey)} ${Q(e.value)}`)}),e>U&&i.push(` ... ${e-U} more shown`)}return i}function Zi(e){let t=Z(e.filterKey);return[`${e.filterKey}: ${e.result.length} matches`,...e.result.slice(0,U).map(e=>`${t} ${Q(e)}`),e.result.length>U?`... ${e.result.length-U} more matches`:``].filter(Boolean)}function Qi({endpoint:e,parameters:t}){let n=e.indexOf(`?`);return n<0?[]:[...new URLSearchParams(e.slice(n+1)).entries()].filter(([e,t])=>!Bi.has(e)&&t.length>0).map(([e,n])=>`${Z(e,t)} ${Q(n)}`)}function $i(e){if(typeof e!=`object`||!e||Array.isArray(e))return null;let t=t=>{let n=Reflect.get(e,t);return typeof n==`string`?n:void 0},[n,r,i]=[t(`method`),t(`endpoint`),t(`nextCursor`)];if(n===void 0||r===void 0)return null;let a=Reflect.get(e,`httpStatus`),o=Reflect.get(e,`response`),s=o===void 0?void 0:h.safeParse(o);return s!==void 0&&!s.success?null:{method:n,endpoint:r,httpStatus:typeof a==`number`?a:void 0,location:t(`location`),operationId:t(`operationId`),summary:t(`summary`),nextCursor:i===``?void 0:i,response:s?.data}}function G(e,t,n){if(e===void 0)return[];if(X(e))return[`${t}${de(e,n)}`];if(Array.isArray(e))return ea(e,t,n);let r=[];for(let[n,i]of Object.entries(e))if(i!==void 0){if(X(i)){r.push(`${t}${n}: ${de(i,n)}`);continue}r.push(`${t}${n}:`);for(let e of G(i,`${t} `,n))r.push(e)}return r.length===0?[`${t}(empty)`]:r}function ea(e,t,n){if(e.length===0)return[`${t}(empty)`];let r=[];for(let i of e){if(X(i)){r.push(`${t}- ${de(i,n)}`);continue}r.push(`${t}-`);for(let e of G(i,`${t} `))r.push(e)}return r}function K(e){if(e===void 0||X(e))return e===null||typeof e==`string`&&e.trim().length===0?void 0:e;if(Array.isArray(e)){let t=e.flatMap(e=>{let t=K(e);return t===void 0?[]:[t]});return t.length===0?void 0:t}let t=Object.entries(e).flatMap(([e,t])=>{let n=K(t);return n===void 0?[]:[[e,n]]});if(t.length!==0)return Object.fromEntries([...Vi.flatMap(e=>t.filter(([t])=>t===e)),...t.filter(([e])=>!Vi.includes(e))])}function q(e,t=``,n=0){return X(e)?t.length===0?{}:{[t]:v(e,t)}:n>Ri?{}:Array.isArray(e)?e[0]===void 0?{}:q(e[0],t,n+1):Object.fromEntries(Object.entries(e).flatMap(([e,r])=>{if(r===void 0)return[];let i=t.length===0?e:`${t}.${e}`;return X(r)?[[i,v(r,i)]]:Object.entries(q(r,i,n+1))}))}var J=e=>Y(e)&&Array.isArray(e.content);function ta(e){let[t,...n]=Object.entries(e).filter(e=>J(e[1])&&typeof e[1].totalElements==`number`);if(t===void 0||n.length>0)return null;let[r,i]=t;return{page:i,context:Object.fromEntries(Object.entries(e).filter(([e])=>e!==r))}}function na(e){return Y(e)&&typeof e.label==`string`&&typeof e.filterKey==`string`&&Array.isArray(e.choiceOption)}var ra=e=>Y(e)&&aa(e.filter),ia=e=>Y(e)&&aa(e.arrayFilterEntry)&&aa(e.rangeFilterEntry),aa=e=>Array.isArray(e)&&e.every(na),oa=e=>Y(e)&&typeof e.filterKey==`string`&&Array.isArray(e.result)&&e.result.every(e=>typeof e==`string`),Y=e=>typeof e==`object`&&!!e&&!Array.isArray(e),X=e=>typeof e!=`object`||!e,Z=(e,t=[])=>t.find(({name:t})=>t===e)?.flag.split(` `)[0]??`--${e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}`,Q=e=>/^[A-Za-z0-9._:/@-]+$/.test(e)?e:`'${e.replaceAll(`'`,`'\\''`)}'`,sa=(e,t)=>e.length<=t?e:`${e.slice(0,Math.max(0,t-3))}...`,ca=/\{([^}]+)\}/gu;function la(e,t){let n=t.filter(e=>e.method===`GET`),r=t=>e.endpoint!==void 0&&t.endsWith(e.endpoint),i=t.find(t=>t.operationId===e.operationId),a=e.ok&&i!==void 0&&_(i.intent),o=[...a&&e.endpoint!==void 0?da(e.endpoint.split(`?`)[0]??``,n,!1).map(e=>`${e} --data --to-file <path>`):[],...e.references.filter(e=>!r(e)).flatMap(ua).flatMap(e=>da(e.pathname,n,!0)),...e.references.filter(r).flatMap(ua).flatMap(e=>fa(e,n))];return o.length===0?{write:a}:{exactRecovery:`Read the full result ${o.join(`; `)}.`,write:a}}function ua(e){return URL.canParse(e)?[new URL(e)]:[]}function da(e,t,n){return t.flatMap(t=>{let r=[...t.path.matchAll(ca)].map(([,e])=>e),i=RegExp(`^${t.path.replace(ca,`([^/]+)`)}$`,`u`),a=n&&r.length===0?null:i.exec(e);if(a===null)return[];let o=r.flatMap((e,n)=>{let r=t.parameters.find(t=>t.name===e);return r===void 0?[]:[$(r),a[n+1]??``]});return[`${pa(t)}, ${ma(t,o)}`]})}function fa(e,t){let n=t.find(t=>t.path===e.pathname);return n===void 0?[]:t.flatMap(t=>{if(!t.path.startsWith(`${n.path}/`))return[];let r=t.parameters.find(({name:e})=>e.endsWith(`Offset`)),i=t.parameters.find(({name:e})=>e.endsWith(`Limit`));if(r===void 0||i===void 0)return[];let a=t.parameters.flatMap(t=>{let n=e.searchParams.get(t.name);return t.location!==`query`||n===null?[]:[$(t),ha(n)]}),o=[$(r),`<n>`,$(i),`<n>`];return[`${pa(t)}, in windows: ${ma(t,[...a,...o])}, advancing ${$(r)} until a window returns fewer than ${$(i)} units`]})}function pa(e){return e.auth===`write`?`with admin sign-in`:`with any sign-in`}function ma(e,t){return[Di,...e.cliPath,...t].join(` `)}function $(e){return e.flag.split(/\s+/u)[0]??e.flag}function ha(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ga(e){return e.toSorted((e,t)=>e.projection.cliPath.length-t.projection.cliPath.length||e.projection.cliPath.join(` `).localeCompare(t.projection.cliPath.join(` `))||e.operationId.localeCompare(t.operationId)).map(e=>{let t=e.parameter.flatMap(t=>{if(t.in!==`path`&&t.in!==`query`&&t.in!==`header`)return[];let n=t.in;return(t.in===`query`&&t.itemProperty!==void 0?t.itemProperty:[t]).map(t=>{let r=xa(t,C(e,t),n);if(t.legacyName===void 0)return r;let i=xa(t,C(e,t,t.legacyName),n).flag;return i===r.flag?r:Object.assign(r,{legacyFlag:i})})}),n=e.requestBody?.map(n=>{let r=ya(e,t,n),i=va(n.cliConflicts,r),a=i.length===0?{}:{cliConflicts:i};return Object.assign({},n,{parameter:r},a)}),r=e.response.find(({status:e})=>e.startsWith(`2`)),i=r?.schemaName?.replace(/Schema$/,``);return{operationId:e.operationId,method:e.method,path:e.path,resource:e.resource,intent:e.intent,cliPath:e.projection.cliPath,summary:e.summary,description:e.description,binaryResponse:e.binaryResponse?!0:void 0,explain:e.explain?!0:void 0,deprecated:e.deprecated?!0:void 0,requestBody:n,mutationReadback:e.mutationReadback,scope:e.projection.scope,auth:e.projection.auth,visibility:e.projection.visibility,errorResponse:e.errorResponse,successResponse:i,detailField:r?.detailField,parameters:t}})}function _a(e,t){let[n,r]=e.filter(e=>e.role===t);if(n===void 0||r!==void 0)throw Error(`Generated composite CLI role '${t}' is incomplete`);return n}function va(e,t){let n=new Map(t.map(({name:e,optionKey:t})=>[e,t]));return(e??[]).map(e=>e.map(e=>{let t=n.get(e);if(t===void 0)throw Error(`x-aventure-cli-conflicts field '${e}' was removed from the generated CLI projection`);return t}))}function ya(e,t,n){let r=new Set(t.map(e=>e.optionKey));(e.requestBody?.length??0)>1&&r.add(`contentType`);let i=new Set(t.filter(e=>e.location===`path`).map(e=>e.name));return n.parameter.toSorted((e,t)=>ba(e.name)-ba(t.name)).flatMap(t=>{if(!t.required&&(r.has(t.inputName)||i.has(t.name)))return[];let n=Ze(e,t,r);return r.add(n),[xa(t,n,`body`)]})}function ba(e){let t=e.split(`.`).at(-1);return t===`min`?0:t===`max`?1:2}function xa(e,t,n){let r=e.itemSchemaEnum??e.schemaEnum,i=Re(e.schemaType,e.itemSchemaType,e.schemaFormat,t);return{name:e.name,optionKey:t,flag:`${ne(t)} ${e.schemaType===`boolean`?`[${i}]`:`<${i}>`}`,required:e.required&&e.schemaDefault===void 0,description:Le(e.description,r),schemaType:e.schemaType,schemaFormat:e.schemaFormat,itemSchemaType:e.itemSchemaType,defaultValue:Sa(e.schemaDefault),choices:r,...e.envName===void 0?{}:{envName:e.envName},...e.visibility&&{visibility:e.visibility},location:n}}var Sa=e=>Array.isArray(e)?e.map(String):typeof e==`number`?String(e):e;export{$e as S,N as _,Gi as a,kt as b,_i as c,li as d,En as f,_n as g,Bn as h,Hi as i,yi as l,Dn as m,_a as n,Ci as o,Tn as p,la as r,fi as s,ga as t,xi as u,P as v,E as x,F as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./detail-DDrpot7C.js";export{e as EntityDetailSchema};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./mcp-generation-contract-qkSbgO9-.js";export{e as MCP_GENERATION_CONTRACT};
|