@aventurevc/aventure-cli 0.8.159 → 0.8.161
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 +1 -1
- package/dist/chunks/{aventure-cli-Dmg6n8se.js → aventure-cli-CyU7hh0W.js} +2 -2
- package/dist/chunks/{cli-help-policy-eA1rRqwV.js → cli-help-policy-BI46WMpS.js} +1 -1
- package/dist/chunks/contract-DsJpmXt1.js +22 -0
- package/dist/chunks/{dist-BITld09_.js → dist-BvNaeC7y.js} +2 -2
- package/dist/chunks/{mcp-generation-contract-DBF4S7_k.js → mcp-generation-contract-Cbt-sm0o.js} +1 -1
- package/dist/chunks/mcp-generation-contract-CzCMl43z.js +1 -0
- package/dist/chunks/{oauth-bearer-credential-DGr2j4lk.js → oauth-bearer-credential-C-o0yx1U.js} +2 -2
- package/dist/chunks/oauth-bearer-credential-DVK1Kifi.js +1 -0
- package/dist/chunks/{oauth-login-DwgRqY77.js → oauth-login-03TonSg_.js} +1 -1
- package/dist/chunks/oauth-login-x7EVXa0C.js +1 -0
- package/dist/chunks/openapi-commands-9O-TmFxP.js +1 -0
- package/dist/chunks/openapi-commands-DrCmBKMz.js +1 -0
- package/dist/chunks/provider-catalog-CWV2zHhk.js +1 -0
- package/dist/chunks/startup-auth-CdgAbERQ.js +1 -0
- package/dist/chunks/{startup-auth-DKMsipha.js → startup-auth-WRD9Td-E.js} +1 -1
- package/dist/chunks/{tool-policy-DIjXzIow.js → tool-policy-Cv9t1JU0.js} +1 -1
- package/package.json +3 -3
- package/dist/chunks/contract-Csl322Se.js +0 -22
- package/dist/chunks/mcp-generation-contract-MAa4RzsK.js +0 -1
- package/dist/chunks/oauth-bearer-credential-CwSUblGG.js +0 -1
- package/dist/chunks/oauth-login-ZohILTSZ.js +0 -1
- package/dist/chunks/openapi-commands-PDTkkh8f.js +0 -1
- package/dist/chunks/openapi-commands-q_eVvFfS.js +0 -1
- package/dist/chunks/provider-catalog-GBt-7leL.js +0 -1
- package/dist/chunks/startup-auth-PO1_QZJo.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./openapi-commands-9O-TmFxP.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{zr as n}from"./dist-BvNaeC7y.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-WRD9Td-E.js";export{e as commandAuthMaterializationMode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./commander-BB7CDPLs.js";import{c as r,i}from"./result-envelope-DVa9d3ew.js";import{l as a,o}from"./env-D4vniJEe.js";import{C as s}from"./tool-policy-DIjXzIow.js";import{r as c}from"./cli-help-policy-eA1rRqwV.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 a=t.join(` `).trim();return a.length===0?r(`No positional text`,n):n[e.optionKey]===void 0?r(`Positional text parsed`,{...n,[e.optionKey]:a}):i(`Unexpected argument "${a}": ${p(e.flag)} already sets this value, and this command has no subcommand by that name. Drop "${a}".`)}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`},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`},harness:{summary:`Enrichment agent runs, their session transcripts, and eligible models`,section:`administration`},"harness runs":{summary:`Get One Run`},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`},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`},status:{summary:`Get System Uptime`,section:`cli`},"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!!a().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(r,i){let a=r.indexOf(`--`),l=r.slice(0,a===-1?r.length:a);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([...o()])).addOption(new e(`--content-type <media-type>`)).addOption(new e(`--ask <question>`)),f=d.parseOptions([...r]).operands,p=d.opts().environment;p!==void 0&&(process.env.API_ENV=p);let m=i.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?i.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{c as r,i}from"./result-envelope-DVa9d3ew.js";import{l as a,o}from"./env-D4vniJEe.js";import{C as s}from"./tool-policy-Cv9t1JU0.js";import{r as c}from"./cli-help-policy-BI46WMpS.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 a=t.join(` `).trim();return a.length===0?r(`No positional text`,n):n[e.optionKey]===void 0?r(`Positional text parsed`,{...n,[e.optionKey]:a}):i(`Unexpected argument "${a}": ${p(e.flag)} already sets this value, and this command has no subcommand by that name. Drop "${a}".`)}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`},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`},harness:{summary:`Enrichment agent runs, their session transcripts, and eligible models`,section:`administration`},"harness runs":{summary:`Get One Run`},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`},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`},status:{summary:`Get System Uptime`,section:`cli`},"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!!a().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(r,i){let a=r.indexOf(`--`),l=r.slice(0,a===-1?r.length:a);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([...o()])).addOption(new e(`--content-type <media-type>`)).addOption(new e(`--ask <question>`)),f=d.parseOptions([...r]).operands,p=d.opts().environment;p!==void 0&&(process.env.API_ENV=p);let m=i.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?i.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-DVa9d3ew.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 x(e,t){return y.run({...y.getStore(),requestId:e},t)}function S(e,t){return y.run({...y.getStore(),userBearerToken:e},t)}var C=3e4;async function w(e,t,n,r){let i=E(T(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 se(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 ae(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 oe(e,t){let n=e?.schema;if(n===void 0)return!1;let r=n.$ref?.startsWith(`#/components/schemas/`)===!0?n.$ref.slice(21):void 0,i=n.type??(r===void 0?void 0:t[r]?.type);return Array.isArray(i)?i.includes(`array`):i===`array`}function T(e){let t=Object.entries(e??{});return[...t.flatMap(e=>I(e[0])?[D(e,`json`)]:[]),...t.flatMap(e=>L(e[0])?[D(e,`multipart`)]:[])]}function E(e,t){if(t===void 0)return f(`Default request content selected`,e[0]);let n=R(t),r=e.find(e=>R(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 D(e,t){let n=e[1].schema;return{contentType:e[0],kind:t,...n===void 0?{}:{schema:n}}}async function se(e,t,n){if(!e&&n==null)return f(`Optional multipart body omitted`,{});let r=ce(n);if(!r.ok||r.data===null)return m(r.summary,r.warnings);let i=new FormData;for(let e of le(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(O(e.schema)||k(e.schema)){let n=k(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 j(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(ue(e.schema,t)){let n=JSON.stringify(t);i.append(e.name,new Blob([n],{type:`application/json`}),`${e.name}.json`)}else{let n=A(i,e.name,t);if(!n.ok)return n}}return f(`Multipart body prepared`,{body:i})}function ce(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 le(e){let t=new Set(e?.required??[]);return Object.entries(e?.properties??{}).map(([e,n])=>({name:e,schema:n,required:t.has(e)}))}function O(e){return e.type===`string`&&e.format===`binary`}function k(e){return e.type===`array`&&e.items!==void 0&&O(e.items)}function ue(e,t){return typeof t!=`object`||!t||Array.isArray(t)?!1:e.type===`object`||typeof e.$ref==`string`&&e.$ref.length>0}function A(e,t,n){if(Array.isArray(n)){for(let r of n){let n=A(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 j(e){return P(e)?await M(e):b()===void 0?await N(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 M(e){let t=new AbortController,n=setTimeout(()=>t.abort(),C);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()??F(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 ${C}ms.`):m(`Failed to fetch media URL: ${e instanceof Error?e.message:String(e)}`)}finally{clearTimeout(n)}}async function N(e){try{let t=F(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 P(e){return e.startsWith(`http://`)||e.startsWith(`https://`)}function F(e){return z[ee(e).toLowerCase()]}function I(e){let t=R(e);return t===`*/*`||t===`application/json`||t.endsWith(`+json`)}function L(e){return R(e)===`multipart/form-data`}var R=e=>e.split(`;`)[0]?.trim().toLowerCase()??``,z={".gif":`image/gif`,".heic":`image/heic`,".heif":`image/heif`,".jpeg":`image/jpeg`,".jpg":`image/jpeg`,".png":`image/png`,".webp":`image/webp`},B=[`get`,`post`,`put`,`patch`,`delete`],V={get:`GET`,post:`POST`,put:`PUT`,patch:`PATCH`,delete:`DELETE`},H=e=>V[e];function U(e){let t=e.toLowerCase(),n=B.find(e=>e===t);if(n===void 0)throw Error(`Unsupported OpenAPI method: ${e}`);return n}var de=[`oauth`,`start`,`poll`,`acknowledge`,`revoke`],W=t({name:u().regex(/^[A-Z][A-Z0-9_]*$/u)}),G=r([i(`private`),d({scope:u().optional(),value:u().optional()})]),K=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(),readOnly:c().optional(),items:K.optional(),minItems:l().int().nonnegative().optional(),maxItems:l().int().nonnegative().optional(),properties:n(u(),K).optional(),required:o(u()).optional(),oneOf:o(K).optional(),anyOf:o(K).optional(),allOf:o(K).optional(),"x-aventure-visibility":G.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()})),fe=d({in:u(),name:u(),required:c().optional(),description:u().optional(),schema:K.optional(),"x-aventure-visibility":G.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`}))}),q=n(u(),d({schema:K.optional()})),pe=d({description:u().optional(),content:q.optional(),"x-aventure-standard-response":c().optional()}),J=d({description:u().optional(),required:c().optional(),content:q.optional()}),me=t({auth:s([`none`,`read`]).optional()}).optional(),Y=r([i(``),u().regex(/^(?:\/(?:[^~/]|~[01])*)+$/)]),he=t({readOperationId:u().min(1),writePointer:Y,readPointer:Y}),ge=u().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)* [a-z0-9]+(?:-[a-z0-9]+)*$/u),X=u().regex(/^[a-z][A-Za-z0-9]*$/u),_e=u().regex(/^--(?:no-)?[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u),ve=t({command:ge,role:s(de),summary:u().trim().min(1).optional(),description:u().trim().min(1).optional(),bodyOption:o(X).min(1).optional(),localOption:o(t({optionKey:X,flag:_e,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(),ye=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(fe).optional(),requestBody:J.optional(),responses:n(u(),pe),"x-aventure-visibility":G.optional(),"x-aventure-tool":me,"x-aventure-mutation-readback":he.optional(),"x-aventure-cli-composite":ve}).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`})}}),be=d(Object.fromEntries(B.map(e=>[e,ye.optional()]))),xe=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(),readOnly:c().optional(),items:K.optional(),minItems:l().int().nonnegative().optional(),maxItems:l().int().nonnegative().optional(),oneOf:o(K).optional(),anyOf:o(K).optional(),allOf:o(K).optional(),properties:n(u(),K).optional(),required:o(u()).optional(),"x-aventure-visibility":G.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(),be),webhooks:n(u(),d({post:d({description:u(),requestBody:J})})).optional(),components:d({schemas:n(u(),xe)})}).superRefine((e,t)=>{for(let[n,r]of Object.entries(e.paths))for(let i of B){let a=r[i]?.[`x-aventure-mutation-readback`];a!==void 0&&Z(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 Se=new Set([`page`,`size`,`sort`]);function Z(e,t){for(let[n,r]of Object.entries(e))for(let e of B){let i=r[e];if(i?.operationId===t)return{method:e,template:n,operation:i}}return null}function Ce(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 we(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 Te(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 Ee(e,t){let n={};for(let r of e.parameters??[]){if(r.in!==`query`||Se.has(r.name))continue;let e=t?.[r.name]??De(r.schema?.default);e!==void 0&&(n[r.name]=e)}return Object.keys(n).length===0?void 0:n}function De(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}function Oe(e){return e?.$ref?.startsWith(`#/components/schemas/`)===!0?e.$ref.slice(21):void 0}function Q(e){return e===`write`||e===`delete`}function ke(e,t){return e===`DELETE`||t===`delete`}var Ae=`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 je(e,t){let n=e===`array`?t:e;return n===void 0||n===`string`}function Me(e){return e!==`/v1/auth/api-key`&&!/^\/v1\/sitemap(?:\/|$)/u.test(e)}function Ne(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=>Pe(e.schema)))}function Pe(e){return e?.format===`byte`||e?.format===`binary`}function Fe(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 Ie=e=>`--${$(e)}`;export{E as C,S as D,x as E,g as O,oe as S,ie as T,Ee as _,ke as a,w as b,Me as c,B as d,H as f,U as g,Z as h,Ie as i,$ as l,Te as m,Ne as n,Q as o,we as p,je as r,Fe as s,Ae as t,Oe as u,Ce as v,b as w,T as x,ae 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-DVa9d3ew.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 x(e,t){return y.run({...y.getStore(),requestId:e},t)}function S(e,t){return y.run({...y.getStore(),userBearerToken:e},t)}var C=3e4;async function w(e,t,n,r){let i=E(T(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 se(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 ae(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 oe(e,t){let n=e?.schema;if(n===void 0)return!1;let r=n.$ref?.startsWith(`#/components/schemas/`)===!0?n.$ref.slice(21):void 0,i=n.type??(r===void 0?void 0:t[r]?.type);return Array.isArray(i)?i.includes(`array`):i===`array`}function T(e){let t=Object.entries(e??{});return[...t.flatMap(e=>I(e[0])?[D(e,`json`)]:[]),...t.flatMap(e=>L(e[0])?[D(e,`multipart`)]:[])]}function E(e,t){if(t===void 0)return f(`Default request content selected`,e[0]);let n=R(t),r=e.find(e=>R(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 D(e,t){let n=e[1].schema;return{contentType:e[0],kind:t,...n===void 0?{}:{schema:n}}}async function se(e,t,n){if(!e&&n==null)return f(`Optional multipart body omitted`,{});let r=ce(n);if(!r.ok||r.data===null)return m(r.summary,r.warnings);let i=new FormData;for(let e of le(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(O(e.schema)||k(e.schema)){let n=k(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 j(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(ue(e.schema,t)){let n=JSON.stringify(t);i.append(e.name,new Blob([n],{type:`application/json`}),`${e.name}.json`)}else{let n=A(i,e.name,t);if(!n.ok)return n}}return f(`Multipart body prepared`,{body:i})}function ce(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 le(e){let t=new Set(e?.required??[]);return Object.entries(e?.properties??{}).map(([e,n])=>({name:e,schema:n,required:t.has(e)}))}function O(e){return e.type===`string`&&e.format===`binary`}function k(e){return e.type===`array`&&e.items!==void 0&&O(e.items)}function ue(e,t){return typeof t!=`object`||!t||Array.isArray(t)?!1:e.type===`object`||typeof e.$ref==`string`&&e.$ref.length>0}function A(e,t,n){if(Array.isArray(n)){for(let r of n){let n=A(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 j(e){return P(e)?await M(e):b()===void 0?await N(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 M(e){let t=new AbortController,n=setTimeout(()=>t.abort(),C);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()??F(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 ${C}ms.`):m(`Failed to fetch media URL: ${e instanceof Error?e.message:String(e)}`)}finally{clearTimeout(n)}}async function N(e){try{let t=F(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 P(e){return e.startsWith(`http://`)||e.startsWith(`https://`)}function F(e){return z[ee(e).toLowerCase()]}function I(e){let t=R(e);return t===`*/*`||t===`application/json`||t.endsWith(`+json`)}function L(e){return R(e)===`multipart/form-data`}var R=e=>e.split(`;`)[0]?.trim().toLowerCase()??``,z={".gif":`image/gif`,".heic":`image/heic`,".heif":`image/heif`,".jpeg":`image/jpeg`,".jpg":`image/jpeg`,".png":`image/png`,".webp":`image/webp`},B=[`get`,`post`,`put`,`patch`,`delete`],V={get:`GET`,post:`POST`,put:`PUT`,patch:`PATCH`,delete:`DELETE`},H=e=>V[e];function U(e){let t=e.toLowerCase(),n=B.find(e=>e===t);if(n===void 0)throw Error(`Unsupported OpenAPI method: ${e}`);return n}var de=[`oauth`,`start`,`poll`,`acknowledge`,`revoke`],W=t({name:u().regex(/^[A-Z][A-Z0-9_]*$/u)}),G=r([i(`private`),d({scope:u().optional(),value:u().optional()})]),K=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(),readOnly:c().optional(),items:K.optional(),minItems:l().int().nonnegative().optional(),maxItems:l().int().nonnegative().optional(),properties:n(u(),K).optional(),required:o(u()).optional(),oneOf:o(K).optional(),anyOf:o(K).optional(),allOf:o(K).optional(),propertyNames:K.optional(),additionalProperties:r([K,c()]).optional(),"x-aventure-visibility":G.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()})),fe=d({in:u(),name:u(),required:c().optional(),description:u().optional(),schema:K.optional(),"x-aventure-visibility":G.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`}))}),q=n(u(),d({schema:K.optional()})),pe=d({description:u().optional(),content:q.optional(),"x-aventure-standard-response":c().optional()}),J=d({description:u().optional(),required:c().optional(),content:q.optional()}),me=t({auth:s([`none`,`read`]).optional()}).optional(),Y=r([i(``),u().regex(/^(?:\/(?:[^~/]|~[01])*)+$/)]),he=t({readOperationId:u().min(1),writePointer:Y,readPointer:Y}),ge=u().trim().regex(/^[a-z0-9]+(?:-[a-z0-9]+)* [a-z0-9]+(?:-[a-z0-9]+)*$/u),X=u().regex(/^[a-z][A-Za-z0-9]*$/u),_e=u().regex(/^--(?:no-)?[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u),ve=t({command:ge,role:s(de),summary:u().trim().min(1).optional(),description:u().trim().min(1).optional(),bodyOption:o(X).min(1).optional(),localOption:o(t({optionKey:X,flag:_e,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(),ye=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(fe).optional(),requestBody:J.optional(),responses:n(u(),pe),"x-aventure-visibility":G.optional(),"x-aventure-tool":me,"x-aventure-mutation-readback":he.optional(),"x-aventure-cli-composite":ve}).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`})}}),be=d(Object.fromEntries(B.map(e=>[e,ye.optional()]))),xe=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(),readOnly:c().optional(),items:K.optional(),minItems:l().int().nonnegative().optional(),maxItems:l().int().nonnegative().optional(),oneOf:o(K).optional(),anyOf:o(K).optional(),allOf:o(K).optional(),propertyNames:K.optional(),additionalProperties:r([K,c()]).optional(),properties:n(u(),K).optional(),required:o(u()).optional(),"x-aventure-visibility":G.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(),be),webhooks:n(u(),d({post:d({description:u(),requestBody:J})})).optional(),components:d({schemas:n(u(),xe)})}).superRefine((e,t)=>{for(let[n,r]of Object.entries(e.paths))for(let i of B){let a=r[i]?.[`x-aventure-mutation-readback`];a!==void 0&&Z(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 Se=new Set([`page`,`size`,`sort`]);function Z(e,t){for(let[n,r]of Object.entries(e))for(let e of B){let i=r[e];if(i?.operationId===t)return{method:e,template:n,operation:i}}return null}function Ce(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 we(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 Te(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 Ee(e,t){let n={};for(let r of e.parameters??[]){if(r.in!==`query`||Se.has(r.name))continue;let e=t?.[r.name]??De(r.schema?.default);e!==void 0&&(n[r.name]=e)}return Object.keys(n).length===0?void 0:n}function De(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}function Oe(e){return e?.$ref?.startsWith(`#/components/schemas/`)===!0?e.$ref.slice(21):void 0}function Q(e){return e===`write`||e===`delete`}function ke(e,t){return e===`DELETE`||t===`delete`}var Ae=`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 je(e,t){let n=e===`array`?t:e;return n===void 0||n===`string`}function Me(e){return e!==`/v1/auth/api-key`&&!/^\/v1\/sitemap(?:\/|$)/u.test(e)}function Ne(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=>Pe(e.schema)))}function Pe(e){return e?.format===`byte`||e?.format===`binary`}function Fe(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 Ie=e=>`--${$(e)}`;export{E as C,S as D,x as E,g as O,oe as S,ie as T,Ee as _,ke as a,w as b,Me as c,B as d,H as f,U as g,Z as h,Ie as i,$ as l,Te as m,Ne as n,Q as o,we as p,je as r,Fe as s,Ae as t,Oe as u,Ce as v,b as w,T as x,ae 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.161",
|
|
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": "fb6a8c157ad0c7293aaf51e3cb70dedcec4b4e88",
|
|
37
37
|
"openapiPath": "openapi/openapi.json",
|
|
38
|
-
"openapiSha256": "
|
|
38
|
+
"openapiSha256": "b2eb6eb008ae7d96f12f4992aff0f457ef7986b8ddac3a696dd98148d9453c45"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {}
|
|
41
41
|
}
|
|
@@ -1,22 +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{c as p,d as m,i as h,t as g}from"./result-envelope-DVa9d3ew.js";import{a as _}from"./package-DPDX5zmx.js";import{a as v,c as ee,i as te,o as ne,s as re}from"./tool-policy-DIjXzIow.js";import{C as ie,S as ae,T as oe,_ as se,a as ce,b as y,c as le,d as ue,f as de,g as fe,h as pe,i as me,l as he,m as ge,n as _e,o as ve,p as ye,r as be,s as xe,t as Se,u as Ce,v as we,w as Te,x as Ee,y as De}from"./detail-D09DdW-w.js";import{a as Oe,n as b,r as x,t as ke}from"./text-field-BoNdbrtA.js";import{a as Ae,o as je}from"./cli-help-policy-eA1rRqwV.js";import{Buffer as Me}from"node:buffer";var S=o([`HIGH`,`MEDIUM`,`LOW`]),Ne=n([o([`OPERATION`,`SKILL`,`PROMPT`,`COMPLETION_GATE`,`RESEARCH_DETAIL_TYPE`,`RESEARCH_SNIPPET_TYPE`,`TEXT_TYPE`]),d()]),Pe=f({excerpt:d(),sourceId:d(),sourceType:Ne,sourceVersion:d().nullish()}),Fe=f({instruction:d(),operationId:d(),stepKey:d()}),Ie=f({body:d(),expectation:d(),method:i(d()),override:d(),reject:i(d()),typeCatalog:d()}),Le=f({cliCommand:d(),mcpTool:d().nullish(),step:Fe,writeGuidance:Ie.nullish()}),Re=n([o([`ENTITY`,`TEXT`]),d()]),ze=f({description:d(),key:d(),type:Re}),Be=f({catalogRevision:s(),gateId:i(d()),input:i(ze),step:i(Le),taskKey:d()}),C=o([`TASK_PLAN`,`OPERATION_ADVICE`,`CLARIFY`,`ABSTAIN`]),Ve=f({candidate:i(Pe),operationId:d().nullish(),outcome:C,probability:u().nullish(),taskKey:d().nullish(),taskPlan:Be.nullish()}),He=f({answer:d(),citation:i(Pe),confidence:S,resolution:Ve.nullish()});function w(e,t,n=t.inputName){if(t.in===`body`)return n;let r=et.find(t=>n===t.name&&e.path.includes(t.path));return r===void 0?$e(Xe(n!==`id`&&n!==`slug`?n:`${Ke(e.path)}${Ye(n)}`),t):r.inputName}function Ue(e,t,n=Je(e)){return We(qe(e,t),new Set(n))}function We(e,t){if(!t.has(e))return e;let n=`body${Ye(e)}`,r=n;for(let e=2;t.has(r);e+=1)r=`${n}${e}`;return r}function Ge(e,t,n){return`${e}[${t}].${n}`}function Ke(e){return tt.find(([,t])=>t.test(e))?.[0]??`record`}function qe(e,t){if(t.name===`id`&&e.path===`/v1/app/url-slug-redirects`)return`recordId`;let n=Ze(t);return $e(e.intent===`search`&&(t.name.startsWith(`filter.`)||t.name.startsWith(`search.`))?Xe(n.replace(/^(?:filter|search)/u,``).replace(/^./u,e=>e.toLowerCase())):n,t)}function Je(e){return new Set(e.parameter.filter(e=>e.in===`path`||e.in===`query`||e.in===`header`).map(t=>w(e,t)))}function Ye(e){return e.replace(/^./u,e=>e.toUpperCase())}function Xe(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 Ze(e){let t=Xe(e.inputName);return/(?:^|\.)nameAlias\[\]\./u.test(e.name)?t.replace(/^entityNameAlias/u,`alias`):/(?:^|\.)urlLink\[\]\./u.test(e.name)?Qe(t):/(?:^|\.)manualLogo\./u.test(e.name)?t.replace(/^manualLogo/u,`logo`):t}function Qe(e){return e===`urlLinkUrl`?`url`:e===`urlLinkUrlType`?`urlType`:e.replace(/^urlLink/u,`url`)}function $e(e,t){return e===`text`?/(?:^|\.)text(?:\[\])?\.text$/u.test(t.name)?`textBody`:`inputText`:e}var et=[{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`}],tt=[[`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 nt(e){let t=e.requestBody?.[0],n=e.parameter.map(t=>rt(t,w(e,t))),r=(t?.parameter??[]).map(t=>rt(t,Ue(e,t)));return{selector:n.filter(e=>e.location===`path`||it(e)),pagination:n.filter(at),filter:[...n.filter(ot),...r.filter(ot)],body:r.filter(e=>!ot(e))}}function rt(e,t){let{in:n,inputName:r,...i}=e;return{...i,name:e.in===`body`?t:e.name,flag:te(t),location:n,description:e.description||`${e.name} ${e.in} parameter`}}function it(e){return/(^|[A-Z])(id|slug)$/u.test(e.name)}function at(e){return[`page`,`size`,`sort`,`cursor`,`mode`,`projection`].includes(e.name)}function ot(e){return e.location!==`path`&&!it(e)&&!at(e)}function st(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:ct(e)};return t?{...r,resource:e.resource,bodySchemaName:n?.schemaName??null,bodyKind:n?.kind??null,bodyRequired:n?.required??!1,requiredBodyPath:n?.requiredPath??[],argument:nt(e)}:{...r,optionalInput:lt(e)}}function ct(e){return[...e.parameter.filter(({required:e})=>e).map(({name:e})=>e),...e.requestBody?.[0]?.requiredPath??[]]}function lt(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)}}var ut=160;function dt(e){return!Array.isArray(e)||e.length===0||!e.every(ft)?null:`Operation catalog matches\n${e.flatMap(e=>[`${e.operationId} ${e.method} ${e.path} (aventure_${e.intent})`,` ${e.summary}`,` required: ${e.requiredInput.length===0?`none`:e.requiredInput.join(`, `)}`,...`optionalInput`in e?Object.entries(e.optionalInput).filter(([,e])=>e.length>0).map(([e,t])=>` optional ${e}: ${t.join(`, `)}`):[],...`argument`in e?Object.values(e.argument).flat().map(e=>` ${e.name} (${[e.location,e.required?`required`:void 0,e.schemaType,e.schemaFormat,e.itemSchemaType===void 0?void 0:`items: ${e.itemSchemaType}${e.itemSchemaFormat===void 0?``:` (${e.itemSchemaFormat})`}`].filter(e=>e!==void 0).join(`, `)}): ${e.description.length<=ut?e.description:`${e.description.slice(0,157)}...`}`):[]]).join(`
|
|
2
|
-
`)}\n`}function ft(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 pt(e){let t=t=>{let n=e.parameter.filter(e=>e.in===t&&e.required&&e.schemaDefault===void 0).map(mt);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 mt(e){return[e.name,`<${e.name}>`]}function ht(e){let t=T(e.description);return{useFor:t.useFor||e.summary||e.description||`${e.method} ${e.path}`,notFor:t.notFor}}function T(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 E=2,gt=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 D(e,t){let n=A(t);n.length!==0&&(e.add(n),(n===`individual`||n===`individuals`)&&D(e,`person`),yt(e,_t(n),n),yt(e,vt(n),n))}function _t(e){if(e===`people`)return`person`;let t=e.endsWith(`ies`)?e.slice(0,-3):``;if(t.length>=E&&!t.endsWith(`v`)&&/[^aeiou]$/u.test(t))return`${e.slice(0,-3)}y`;if(e.length>E&&e.endsWith(`s`)&&!e.endsWith(`ss`)&&!e.endsWith(`us`)&&e!==`news`)return e.slice(0,-1)}function vt(e){return e===`person`?`people`:e.length>=E&&e.endsWith(`y`)&&/[^aeiou]y$/u.test(e)?`${e.slice(0,-1)}ies`:e.endsWith(`s`)?void 0:`${e}s`}function yt(e,t,n){t!==void 0&&t!==n&&t.length>=E&&/^[a-z]+$/u.test(t)&&e.add(t)}function O(e){let t=new Set(k(e)),n=Array.from(t);for(let e of n)D(t,e);return t}function bt(e){return k(e).map(O)}function xt(e,t){if(e.length===0)return!1;let n=O(t.join(` `));return e.every(e=>[...e].some(e=>n.has(e)))}function k(e){return A(e).split(/[^a-z0-9]+/u).filter(e=>e.length>0&&!gt.has(e))}function A(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 St=/\b(?:https?:\/\/)?(?:[a-z0-9-]+\.)+[a-z]{2,}(?::\d+)?(?:\/\S*)?/giu,Ct=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/giu,wt=/^[a-z0-9]+(?:-[a-z0-9]+)+$/u,Tt=250,Et=40,Dt=100;function Ot(e,t){let n=new Set,r=[],i=/\bslugs?\b/iu.test(e);return{text:e.replace(Ct,()=>(n.add(`uuid`),` `)).replace(St,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&&wt.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=wt.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 kt(e,t,n){return e===`uuid`?/(?:^id|Id)$/u.test(t)&&n.includes(`{${t}}`):t===e}function At(e,t){let n=new Set;for(let r of e){let e=new Set;D(e,r);let i=t.filter(({cliPath:t})=>e.has(t[0]??``)),a=i.length>0?i:t.filter(({cliPath:t})=>t.some(t=>e.has(t)));for(let{resource:e}of a)n.add(e)}return n}function jt(e,t,n){if(n.intent!==`read`&&n.intent!==`lookup`)return 0;let r=new Set(k(n.summary)),i=0;for(let t of e.kind)n.directParameterName.some(e=>kt(t,e,n.path))&&(i+=Tt,r.has(t)&&(i+=Et));if(i===0)return 0;let a=new Set(k(`${n.summary} ${n.description}`));return(t.size>0?t.has(n.resource):e.urlPathWord.some(e=>{let t=new Set;return D(t,e),[...t].some(e=>a.has(e))}))&&(i+=Dt),i}var Mt=5,Nt=.5,Pt=15,Ft=30,It=2;function Lt(e,t,n){let r=t.map(e=>({item:e,fields:n(e)})),i=Ot(e,new Set(r.flatMap(({fields:e})=>e.cliPath))),a=At(i.urlPathWord,r.map(({fields:e})=>e)),o=A(i.text);if(o.length===0&&i.kind.size===0)return t.map(e=>({item:e,score:1}));let s=O(o),c=bt(o);return r.map(({item:e,fields:t})=>({item:e,fields:t,score:(o.length===0?0:Vt(o,s,c,t))+jt(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 Rt(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)}}function zt(e,t){let n=Lt(e.q?.trim()??``,t.filter(t=>Bt(e,t)),Rt),r=(n[0]?.score??0)*Nt,i=n.filter(({score:e})=>e>=r),a=e.limit===void 0||!Number.isFinite(e.limit)?Mt:e.limit,o=Math.min(i.length,Math.max(0,Math.trunc(a))),s=i.slice(0,o).map(({item:e})=>e),c=s.map(e=>st(e,s.length===1));return{summary:`Operation catalog matches`,data:c,counts:{totalOperations:t.length,matched:i.length,returned:c.length}}}function Bt(e,t){let n=e.root?.trim().toLowerCase();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 Vt(e,t,n,r){let i=Wt(r),a=Ht(r),o=0;i.some(t=>t===e)&&(o+=100),i.some(t=>t.includes(e))&&(o+=40),o+=Ut(e,i);let s=new Set(i.flatMap(k));for(let e of t)i.some(t=>t===e)?o+=20:s.has(e)&&(o+=8);for(let e of r.cliPath){let n=new Set;D(n,e),[...n].some(e=>t.has(e))&&(o+=Pt)}xt(n,a)&&(o+=200),r.parameterName.some(t=>A(t)===e)&&(o+=Ft);let c=new Set(r.parameterDescription.flatMap(k));for(let e of t)c.has(e)&&(o+=It);return o+=Kt(t,r.enumParameter),[`list`,`search`,`find`,`browse`].some(e=>t.has(e))&&/^(?:list|search)[A-Z]/u.test(r.operationId)&&(o+=30),o-=Gt(e,t,r.description),o}function Ht(e){return[e.operationId,e.cliPath.join(` `),e.summary].map(A).filter(e=>e.length>0)}function Ut(e,t){let n=k(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 Wt(e){return[...new Set([e.operationId,e.method,e.path,e.resource,e.intent,e.cliPath.join(` `),e.summary,T(e.description).useFor||e.description].map(A).filter(e=>e.length>0))]}function Gt(e,t,n){let r=A(T(n).notFor);if(r.length===0)return 0;let i=r.includes(e)?40:0,a=new Set(k(r));for(let e of t)r===e?i+=20:a.has(e)&&(i+=8);return i}function Kt(e,t){let n=0;for(let{values:r,direct:i}of t)r.some(t=>qt(e,t))&&(n+=i?40:10);return n}function qt(e,t){let n=k(t);return n.length>0&&n.every(t=>e.has(t))}function Jt(e){return typeof e.data==`object`&&e.data!==null&&`response`in e.data?e.data.response:void 0}async function Yt(e,t,n,r){let i=e.q?.trim()??``;if(i.length===0)return h(`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 h(`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`},includePrivate:!1}});if(!o.ok)return{...o,data:null};let s=He.safeParse(Jt(o));if(!s.success||s.data.resolution==null)return h(`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,m=(f?.step??[]).map(({step:e})=>({step:e,contract:u(e.operationId)})),g=[...new Set([...l.operationId!=null&&d===void 0?[l.operationId]:[],...m.filter(({contract:e})=>e===void 0).map(({step:e})=>e.operationId)])];return p(g.length===0?`Help resolution`:`Help resolution this connection cannot finish: it cannot run ${g.join(`, `)}.`,{outcome:l.outcome,probability:l.probability,answer:c,candidate:l.candidate.map(({sourceId:e})=>e),...d===void 0?{}:{operation:{operationId:d.operationId,apiRoute:`${d.method} ${d.path}`,...ht(d),bodySchemaName:d.requestBody?.[0]?.schemaName??null,mcpCall:pt(d)}},...l.taskKey==null?{}:{taskKey:l.taskKey},...f===void 0?{}:{taskPlan:{catalogRevision:f.catalogRevision,input:f.input,...f.gateId.length===0?{}:{gateId:f.gateId},step:m.map(({contract:e,step:{stepKey:t,instruction:n,operationId:r}})=>e===void 0?{stepKey:t,instruction:n,operationId:r}:{stepKey:t,instruction:n,mcpCall:pt(e)})}}},{warnings:g.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 Xt=f({detail:d(),field:d().nullish(),scope:o([`entity`,`person`,`news`])}),Zt=n([o([`auto`,`exact`,`keyword`,`semantic`,`natural`,`hybrid`]),d()]),j=f({modeRequested:Zt,modeUsed:Zt}),Qt=f({answerUnavailable:l(),entity:j,news:j,person:j,rejection:i(Xt),unavailable:i(o([`entity`,`person`,`news`]))}),$t=f({acceleratorParticipation:i(ye),detail:i(ue)}),M=f({core:y,enrichment:Ee,fundraiseRound:i(fe),research:$t,semanticMatch:ce.nullish()}),en=o([`curated`,`semantic`,`precomputed`,`derived`,`computed`]),tn=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:en,rank:s(),sharedSectionCount:s().nullish()}),nn=f({entity:M,similarity:tn}),rn=o([`aventureBlog`,`personalBlog`,`employerBlog`,`linkedin`,`xTwitter`,`medium`,`substack`,`other`]),an=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:rn,updatedAt:r({offset:!0}),url:d()}),on=o([`low`,`medium`,`high`]),sn=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:on.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:de}),cn=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:sn,id:d()}),ln=f({fundraiseInvestorJoin:l(),fundraiseTransaction:l(),operatingStatus:l(),relationship:l()}),un=o([`Acquisition`,`Acquired`,`Acquired Subsidiary`]),dn=o([`Announced`,`Announced; subject to approvals and closing conditions`,`Active`,`Closed`,`Completed`,`In Progress`,`Open`]),fn=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:De.nullish(),evidence:ln,fundraiseTransactionId:t().nullish(),investorJoinId:t().nullish(),isCurrent:l().nullish(),publicSource:pe.nullish(),relationshipId:s(),status:un,transactionStatus:dn.nullish(),updatedAt:r({offset:!0}).nullish()}),pn=o([`SAFE`,`Convertible Note`,`Preferred Stock`,`Common Stock`,`Other Equity`,`Bond`,`Loan`,`Other Debt`,`Grant`,`Token`]),mn=f({amountInvested:u().nullish(),createdAt:r({offset:!0}),financialInstrumentType:pn.nullish(),id:t(),investor:c,leadInvestor:l(),transactionId:t(),updatedAt:r({offset:!0})}),hn=f({entity:Se,investorAttribution:i(se),round:i(we),roundCount:s()}),gn=f({core:y,similarity:tn,urlLink:i(ae)}),_n=f({compliance:Ce.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()}),vn=o([`stored`,`derivedFromPreAndRaised`,`derivedFromPostMinusRaised`,`reportedAssumedPost`]),yn=o([`fundraiseRound`,`researchDetail`]),bn=o([`preMoney`,`postMoney`,`reported`]),xn=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:on,currency:d(),declaredBasis:bn,derivation:vn,detailId:s().nullish(),label:d().nullish(),source:yn,sourceRef:d(),valuationPostMoney:u().int().nullish(),valuationPreMoney:u().int().nullish()}),Sn=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()}),N=f({empty:l().optional(),sorted:l().optional(),unsorted:l().optional()}),P=f({offset:u().int().optional(),paged:l().optional(),pageNumber:s().optional(),pageSize:s().optional(),sort:N.optional(),unpaged:l().optional()}),Cn=f({investorAttribution:i(se),person:be,round:i(we),roundCount:s()}),wn=o([`precomputed`,`live`]),Tn=f({compositeScore:u().nullish(),cosineScore:u().nullish(),matchedSectionWeight:u().nullish(),origin:wn,rank:s(),sharedSectionCount:s().nullish()}),En=f({currentRole:xe.nullish(),person:me,similarity:Tn}),Dn=o([`by`,`about`]),On=o([`newsArticle`,`blogPost`,`externalSocialPost`,`repositoryOwner`,`repository`,`webSite`,`webPage`,`researchPaper`]),kn=f({canonicalUrl:d().nullish(),contentId:d(),contentType:On,createdAt:r({offset:!0}).nullish(),publishedAt:r({offset:!0}).nullish(),relation:Dn.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(an).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(n([oe,Te])).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(cn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.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:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(fn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.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:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(mn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(fe).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(hn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(M).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(xe).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(ge).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(ue).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(he).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(nn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(gn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.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:P.optional(),size:s().optional(),sort:N.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:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(xn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(Sn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(le).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.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:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(be).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.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:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(Cn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(En).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()}),f({content:i(kn).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()});var An=f({content:i(M),number:s(),size:s(),totalElements:u().int(),totalPages:s()}),jn=f({content:i(le),number:s(),size:s(),totalElements:u().int(),totalPages:s()}),Mn=f({content:i(me),number:s(),size:s(),totalElements:u().int(),totalPages:s()});f({content:i(_e).optional(),empty:l().optional(),first:l().optional(),last:l().optional(),number:s().optional(),numberOfElements:s().optional(),pageable:P.optional(),size:s().optional(),sort:N.optional(),totalElements:u().int().optional(),totalPages:s().optional()});var Nn=n([o([`entityRecord`,`researchSnippet`,`newsArticle`,`personRecord`,`fundraiseTransaction`]),d()]),Pn=f({entityId:t(),source:Nn,sourceId:d()}),Fn=f({citation:i(Pn),text:d(),topic:d().nullish()}),In=f({citation:i(Pn),confidence:S,description:d().nullish(),heading:d().nullish(),paragraph:i(Fn),relatedQuery:i(d()),shareable:l(),text:d(),title:d().nullish()}),Ln=f({sortPriority:o([`NONE`,`ANY_LOGO_FIRST`,`REAL_LOGO_FIRST`]).optional()}),Rn=f({max:r({offset:!0}).nullish(),min:r({offset:!0}).nullish()}),F=f({max:u().nullish(),min:u().nullish()}),I=f({max:s().nullish(),min:s().nullish()}),zn=f({averageAmountInvestedUsdRange:i(F).optional(),largestAmountInvestedUsdRange:i(F).optional(),smallestAmountInvestedUsdRange:i(F).optional(),totalAmountInvestedUsdRange:i(F).optional(),totalInvestmentRange:i(I).optional()}),Bn=f({amountInvestedRange:i(F).optional(),amountRaisedRange:i(F).optional(),dateAnnouncedRange:Rn.nullish(),investedCompanyName:i(d()).optional(),investedCountry:i(d()).optional(),investedIndustry:i(d()).optional(),investedRound:i(d()).optional(),investorActivity:zn.optional(),investorName:i(d()).optional(),lastRoundYearRange:i(I).optional(),rankByInvestmentActivity:l().nullish(),round:i(d()).optional(),totalRaisedRange:i(F).optional(),valuationRange:i(F).optional()}),Vn=o([`NONE`,`COMPANY_LISTING_READY`]),Hn=o([`Operating`,`Acquired`,`Acquired Subsidiary`,`Closed`,`Closed (Acquihire)`,`Inactive`]),Un=o([`hostPath`,`domain`]),Wn=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(I).optional(),entityId:i(t()).optional(),entityName:i(d()).optional(),featured:l().nullish(),fundraiseActivity:Bn.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:Ln.optional(),mainProduct:i(d()).optional(),operatingStatus:i(Hn).optional(),originCountry:i(d()).optional(),person:i(d()).optional(),portfolioHeadquartersCity:i(d()).optional(),portfolioHeadquartersCountry:i(d()).optional(),portfolioHeadquartersState:i(d()).optional(),qualityGate:Vn.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:Un.nullish(),urlType:ie.nullish(),yearFoundedRange:i(I).optional()}),Gn=o([`discovery`,`profile`,`peer`,`comparison`]),Kn=o([`keyword`,`semantic`]),qn=n([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`]),d()]),Jn=f({descending:l(),field:qn,sortKey:d().nullish()}),Yn=f({order:i(Jn),relevance:Kn.nullish()}),Xn=f({confidence:S,execution:j,fallbackUsed:l(),filter:Wn,intent:Gn,interpretation:d(),sort:Yn,subjectEntityName:i(d()),unsupported:d().nullish()}),L=f({changedAt:r({offset:!0}).nullish(),dataSourceUpdatedAt:r({offset:!0}).nullish(),pendingApproval:s().nullish(),sourceId:d().nullish(),status:d().nullish()}),Zn=f({fundManagerRelationshipSource:L.nullish(),fundraiseTransaction:fe,fundraiseTransactionSource:L.nullish(),investorJoinSource:L.nullish()}),Qn=f({evidence:Zn,investor:c,semanticMatch:ce.nullish()}),$n=f({entityId:t(),matchedOffering:y.nullish(),probability:u(),webUrl:i(d())}),er=f({entityId:t(),label:d(),publishedAt:r({offset:!0}).nullish(),score:u(),source:Nn,sourceId:d(),text:d(),url:d().nullish()}),tr=f({answer:In.nullish(),interpretation:Xn,investment:i(Qn),judgment:i($n),passage:i(er),peer:i(nn),pendingWebQuery:i(d()),result:An,searchRequestId:t().nullish(),subject:i(M)}),nr=o([`auto-match`,`needs-review`,`approved`,`rejected`]),rr=f({createdAt:r({offset:!0}),entityId:t(),href:d().nullish(),internal:l(),matchStatus:nr.nullish(),mention:d().nullish(),slug:d().regex(/^[a-z0-9_-]+$/).max(255).nullish(),typeRecord:a.nullish(),updatedAt:r({offset:!0})}),ir=f({entity:i(rr),newsId:s()}),ar=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(I).optional(),entityId:i(t()).optional(),entityName:i(d()).optional(),featured:l().nullish(),fundraiseActivity:Bn.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:Ln.optional(),mainProduct:i(d()).optional(),operatingStatus:i(Hn).optional(),originCountry:i(d()).optional(),person:i(d()).optional(),portfolioHeadquartersCity:i(d()).optional(),portfolioHeadquartersCountry:i(d()).optional(),portfolioHeadquartersState:i(d()).optional(),qualityGate:Vn.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:Un.nullish(),urlType:ie.nullish(),yearFoundedRange:i(I).optional()}),or=f({amountInvestedRange:i(F).nullish(),amountRaisedRange:i(F).nullish(),entityName:i(d()).nullish(),investedCompany:i(d()).nullish(),personTitle:i(d()).nullish(),round:i(d()).nullish(),totalInvestmentCount:i(I).nullish(),typeRecord:i(a).nullish()}),sr=f({arrayFilter:or.optional(),entityFilter:ar.optional(),entityId:t().nullish(),entitySlug:d().nullish(),firstName:d().nullish(),includeAddress:l().nullish(),includeUrl:l().nullish(),investorActivity:zn.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()}),cr=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()}),lr=f({order:i(cr),relevance:Kn.nullish()}),ur=f({confidence:S,execution:j,fallbackUsed:l(),filter:sr,interpretation:d(),sort:lr,unsupported:d().nullish()}),dr=f({interpretation:ur,investment:i(Qn),result:Mn,searchRequestId:t().nullish()}),fr=f({label:d(),query:d()}),pr=f({key:d(),option:i(fr),prompt:d()}),mr=f({entity:tr,entityDetail:i(Se),news:jn,newsEntityMention:i(ir),person:dr,personDetail:i(be),provenance:Qt,qualifier:pr.nullish()});function R(e,t){return e.map(e=>{let n=e.requestBody??[],r=[...e.parameters.map(e=>hr(e)),...n.flatMap(e=>e.parameter.map(t=>hr(t,n.length>1?e.contentType:void 0))),...gr(n)],i=[t,...e.cliPath].join(` `),a=ne(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:v(e.method,e.intent),auth:e.auth,cli:{command:i,path:e.cliPath},mcpTool:e.binaryResponse||!ee(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 hr(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 gr(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 z(e){return e.flags.filter(({contentType:t})=>t===void 0||t===e.body.contentType)}var _r=[`-id`,`-slug`,`-url`],vr=[`--id`,`--slug`,`--url`],yr=`/v1/lookup`,br=`--from-file "<path>"`;function xr(e,t,n=_().bin[0]){let r=R(t,n),i=r.find(t=>t.operationId===e);return i===void 0?[]:Tr(i,r)}function Sr(e,t,n=_().bin[0]){let r=t.find(t=>t.operationId===e),[i]=r===void 0?[]:R([r],n);return i&&wr(i,Or(i,!1))}function Cr(e,t,n,r=_().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 Sr(o.operationId,t,r)}function wr(e,t){return[e.cli.command,...t,`--data`].join(` `)}function Tr(e,t){return[`example: ${wr(e,Or(e))}`,...Er(e,t)]}function Er(e,t){return z(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} ${B(i)} --data`,o=t.find(e=>e.method===`POST`&&e.path===yr),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} ${B(s)} --data, then match.owner.${e.optionKey} when status is MATCHED`]})}var Dr=/(?:^|\.)text$/u;function Or(e,t=!0){let n=z(e).filter(e=>e.required),r=e.body.kind===`json`&&n.some(e=>e.location===`body`&&Dr.test(e.wireName))?n.filter(e=>e.location!==`body`):n,i=(n.length>0||!t?r:kr(e)).map(B);return(e.body.required||e.body.requiredPath.length>0)&&!r.some(e=>e.location===`body`)?[...i,br]:i}function kr(e){let t=new Set;D(t,e.resource);for(let n of _r)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 vr){let n=e.flags.find(e=>e.name===t);if(n!==void 0)return[n]}return[]}function B(e){return e.placeholder===null?e.name:`${e.name} "${e.placeholder}"`}var Ar=`aventure`;function jr(e,t){let n=t.find(t=>t.operationId===e)?.cliPath;return n===void 0?void 0:`${Ar} ${n.join(` `)}`}function Mr(e,t,n=e){return Sr(e,t,`aventure`)??n}function Nr(e,t){let n=He.safeParse(e);if(!n.success)return null;let{answer:r,citation:i,confidence:a,resolution:o}=n.data;if(o!=null)return Pr(r,o,t);let s=r.trimEnd().split(`
|
|
3
|
-
`),c=new Set(i.flatMap(({sourceType:e,sourceId:n})=>{if(e!==Ne.options[0].enum.OPERATION)return[];let r=jr(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 Pr(e,t,n){let{outcome:r,operationId:i,probability:a,candidate:o,taskKey:s,taskPlan:c}=t,l=[c==null?e.trimEnd():Ir(c)],u=[``,`Outcome: ${r}${a==null?``:` (probability ${a.toFixed(2)})`}`];switch(r){case C.enum.TASK_PLAN:return[...l,...c==null?[]:Lr(c,n),...u];case C.enum.OPERATION_ADVICE:{let e=o.filter(({sourceId:e})=>e!==i);return[...l,...i==null?[]:[``,`Command:`,` ${Mr(i,n)}`],...u,...e.length===0?[]:[`Alternatives: ${e.map(({sourceId:e})=>e).join(`, `)}`]]}case C.enum.CLARIFY:return[...l,...s==null?[]:[``,`Leading catalog task: ${s}`],...zr(`Candidates:`,o,n),...u];case C.enum.ABSTAIN:return[...l,...zr(`Nearest operations:`,o,n),...u];default:throw Error(`Unhandled help resolution outcome ${String(r)}`)}}function Fr(e,t){let n=Be.safeParse(e);return n.success?[Ir(n.data),...Lr(n.data,t)]:null}var Ir=({taskKey:e,catalogRevision:t})=>`Run catalog task ${e} (catalog revision ${t}).`;function Lr(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}: ${Mr(n.operationId,t,r)}`,` ${n.instruction}`,...Rr(e,a,i)]),...e.gateId.length===0?[]:[``,`Completion gates: ${e.gateId.join(`, `)}`]]}function Rr(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 zr(e,t,n){if(t.length===0)return[];let r=t.map(({sourceId:e,excerpt:t})=>({command:jr(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 V=120,H=30,Br=8,U=10,Vr=2,Hr=[`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`],Ur=new Set([`page`,`size`,`sort`,`cursor`,`mode`,`projection`]),Wr=[`interpretation`,`confidence`,`unsupported`,`execution`,`fallbackUsed`];function Gr(e,t,n){if(typeof t==`string`)return Q(t);let r=dt(t);if(r!==null)return Q(r);let i=ni(t);if(i===null)return null;let a=e.find(({operationId:e})=>e===i.operationId),{response:o,hiddenNote:s}=Oe(a?.detailField,i.response),c={...i,response:o},l=Nr(c.response,e)??Fr(c.response,e);if(l!==null)return Q(l.join(`
|
|
4
|
-
`),!0);let u=Kr(c.endpoint,c.response);if(u!==null)return Q([...u,...s].join(`
|
|
5
|
-
`),!0,s.length>0);let d=c.summary??n??c.operationId??`OpenAPI call succeeded`,f=Xr(c);return Q([...[d,`${c.method} ${c.endpoint}`,...f].filter(Boolean),...s].join(`
|
|
6
|
-
`),!0,s.length>0)}function Kr(e,t){if(t===void 0||!Y(t)||!(`entity`in t&&`person`in t&&`news`in t))return null;let n=mr.safeParse(t);if(!n.success)return null;let{entity:r,person:i,news:a,provenance:o}=n.data;return[...r.answer?qr(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})=>x(`${e} rejected: ${t}`)),[`entities:`,...W(r.result,e)].join(`
|
|
7
|
-
`),[`people:`,...W(i.result,e)].join(`
|
|
8
|
-
`),[`news:`,...W(a,e)].join(`
|
|
9
|
-
`)]}function qr(e){let t=`relatedQuery:\n${e.relatedQuery.map(e=>` - ${x(e)}`).join(`
|
|
10
|
-
`)}`,n=`citations:\n${e.citation.map(({source:e,sourceId:t,entityId:n})=>x(` - ${e}:${t} entity=${n}`)).join(`
|
|
11
|
-
`)}`;return[`answer:\n ${b(e.text).replaceAll(`
|
|
12
|
-
`,`
|
|
13
|
-
`)}`,...e.relatedQuery.length===0?[]:[t],...e.citation.length===0?[]:[n]]}function Jr(e){let t=ni(e)?.response,n=Y(t)?t.interpretation:void 0;if(!Y(n))return null;let r=j.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 Q([`strategy: requested=${i} used=${a}`,...Y(o)?[`constraints:`,...Object.entries(o).flatMap(([e,t])=>t===void 0?[]:[` ${e}: ${Yr(t)}`])]:[],typeof s==`string`&&s.trim().length>0?`unsupported: ${s}`:``,c===!0?`fallback: semantic search over the original query`:``].filter(Boolean).join(`
|
|
14
|
-
`),!0)}var Yr=e=>X(e)?x(e):Array.isArray(e)&&e.every(X)?e.map(e=>x(e)).join(`, `):JSON.stringify(e);function Xr(e){let{response:t,method:n,endpoint:r,nextCursor:i,httpStatus:a,location:o}=e;if(t===void 0)return o!==void 0&&a!==void 0?[`status=${a} redirect=${o}`]:a===void 0?[]:[`status=${a} no response body`];let s=a===void 0||n===`GET`?``:`status=${a}`,c=Y(t)&&!J(t)?ii(t):null,l=c===null?void 0:Y(c.context.interpretation)?K(c.context):c.context,u=l!==void 0&&Y(l)?Object.entries(l):[],d=u.filter(e=>Array.isArray(e[1])&&e[1].length>0&&e[1].every(Y)),f=new Set(d.map(([e])=>e)),p=Object.fromEntries(u.filter(([e])=>!f.has(e)));return[s,...J(t)?W(t,r,i):c===null?oi(t)?$r(t.filter,t.meta):si(t)?$r([...t.arrayFilterEntry,...t.rangeFilterEntry],t.filtersMeta):li(t)?ei(t):G(t,``):[...W(c.page,r,i),...Object.keys(p).length===0?[]:G(p,``),...d.flatMap(([e,t])=>[`${e}:`].concat(Zr(t)))]].filter(Boolean)}function W(e,t,n){let r=ti(t);return[`rows=${e.numberOfElements??e.content.length}${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 ${Z(n)}`,...Zr(e.content)].filter(Boolean)}function Zr(e){let t=e.filter(Y);if(t.length===0)return e.length===0?[`(empty)`]:ri(e,``);let n=Qr(t);if(n.length===0)return ri(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)=>di(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 Qr(e){let t=new Set(e.flatMap(e=>Object.keys(q(e)))),n=Hr.filter(e=>t.has(e)),r=[...t].filter(e=>!n.includes(e)).filter(e=>!e.toLowerCase().includes(`logo`)).slice(0,Br-n.length);return[...n,...r].slice(0,Br)}function $r(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(` ${ui(t.filterKey)} ${Z(e.value)}`)}),e>U&&i.push(` ... ${e-U} more shown`)}return i}function ei(e){let t=ui(e.filterKey);return[`${e.filterKey}: ${e.result.length} matches`,...e.result.slice(0,U).map(e=>`${t} ${Z(e)}`),e.result.length>U?`... ${e.result.length-U} more matches`:``].filter(Boolean)}function ti(e){let t=e.indexOf(`?`);return t<0?[]:[...new URLSearchParams(e.slice(t+1)).entries()].filter(([e,t])=>!Ur.has(e)&&t.length>0).map(([e,t])=>`${ui(e)} ${Z(t)}`)}function ni(e){if(typeof e!=`object`||!e||Array.isArray(e))return null;let t=Reflect.get(e,`method`),n=Reflect.get(e,`endpoint`);if(typeof t!=`string`||typeof n!=`string`)return null;let r=Reflect.get(e,`operationId`),i=Reflect.get(e,`summary`),a=Reflect.get(e,`httpStatus`),o=Reflect.get(e,`location`),s=Reflect.get(e,`nextCursor`),c=Reflect.get(e,`response`),l=c===void 0?void 0:m.safeParse(c);return l!==void 0&&!l.success?null:{method:t,endpoint:n,httpStatus:typeof a==`number`?a:void 0,location:typeof o==`string`?o:void 0,operationId:typeof r==`string`?r:void 0,summary:typeof i==`string`?i:void 0,nextCursor:typeof s==`string`&&s.length>0?s:void 0,response:l?.data}}function G(e,t,n){if(e===void 0)return[];if(X(e))return[`${t}${ke(e,n)}`];if(Array.isArray(e))return ri(e,t,n);let r=[];for(let[n,i]of Object.entries(e))if(i!==void 0){if(X(i)){r.push(`${t}${n}: ${ke(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 ri(e,t,n){if(e.length===0)return[`${t}(empty)`];let r=[];for(let i of e){if(X(i)){r.push(`${t}- ${ke(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([...Wr.flatMap(e=>t.filter(([t])=>t===e)),...t.filter(([e])=>!Wr.includes(e))])}function q(e,t=``,n=0){return X(e)?t.length===0?{}:{[t]:x(e,t)}:n>Vr?{}: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,x(r,i)]]:Object.entries(q(r,i,n+1))}))}var J=e=>Y(e)&&Array.isArray(e.content);function ii(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 ai(e){return Y(e)&&typeof e.label==`string`&&typeof e.filterKey==`string`&&Array.isArray(e.choiceOption)}var oi=e=>Y(e)&&ci(e.filter),si=e=>Y(e)&&ci(e.arrayFilterEntry)&&ci(e.rangeFilterEntry),ci=e=>Array.isArray(e)&&e.every(ai),li=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,ui=e=>`--${e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}`,Z=e=>/^[A-Za-z0-9._:/@-]+$/.test(e)?e:`'${e.replaceAll(`'`,`'\\''`)}'`,di=(e,t)=>e.length<=t?e:`${e.slice(0,Math.max(0,t-3))}...`,Q=(e,t=!1,n=!1,r=1)=>{let i=b(e),a=t||i.endsWith(`
|
|
15
|
-
`),o=i.endsWith(`
|
|
16
|
-
`)?i.slice(0,-1):i,s=o.length===0?[]:o.split(`
|
|
17
|
-
`),c=Me.byteLength(`${s.join(`
|
|
18
|
-
`)}\n`,`utf8`);if(s.length<=V&&c<=5e4)return`${s.join(`
|
|
19
|
-
`)}${a?`
|
|
20
|
-
`:``}`;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>V?`${V} physical lines`:``,c>5e4?`${g} UTF-8 bytes`:``].filter(Boolean).join(` and `),p=e=>b(`... 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(`
|
|
21
|
-
`),h=V-u.length-1,_=d.slice(0,h),v=p(s.length-_.length-u.length);for(;Me.byteLength(`${m(_,v)}\n`,`utf8`)>g;){if(_.length>0)_=_.slice(0,-1);else if(u.length>0)u=u.slice(1);else break;v=p(s.length-_.length-u.length)}return`${m(_,v)}${a?`
|
|
22
|
-
`:``}`},fi=/\{([^}]+)\}/gu;function pi(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&&ne(i.intent),o=[...a&&e.endpoint!==void 0?hi(e.endpoint.split(`?`)[0]??``,n,!1).map(e=>`${e} --data --to-file <path>`):[],...e.references.filter(e=>!r(e)).flatMap(mi).flatMap(e=>hi(e.pathname,n,!0)),...e.references.filter(r).flatMap(mi).flatMap(e=>gi(e,n))];return o.length===0?{write:a}:{exactRecovery:`Read the full result ${o.join(`; `)}.`,write:a}}function mi(e){return URL.canParse(e)?[new URL(e)]:[]}function hi(e,t,n){return t.flatMap(t=>{let r=[...t.path.matchAll(fi)].map(([,e])=>e),i=RegExp(`^${t.path.replace(fi,`([^/]+)`)}$`,`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[`${_i(t)}, ${vi(t,o)}`]})}function gi(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),yi(n)]}),o=[$(r),`<n>`,$(i),`<n>`];return[`${_i(t)}, in windows: ${vi(t,[...a,...o])}, advancing ${$(r)} until a window returns fewer than ${$(i)} units`]})}function _i(e){return e.auth===`write`?`with admin sign-in`:`with any sign-in`}function vi(e,t){return[Ar,...e.cliPath,...t].join(` `)}function $(e){return e.flag.split(/\s+/u)[0]??e.flag}function yi(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function bi(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=Ti(t,w(e,t),n);if(t.legacyName===void 0)return r;let i=Ti(t,w(e,t,t.legacyName),n).flag;return i===r.flag?r:Object.assign(r,{legacyFlag:i})})}),n=e.requestBody?.map(n=>{let r=Ci(e,t,n),i=Si(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`))?.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:r,detailField:e.response.find(e=>e.detailField!==void 0)?.detailField,parameters:t}})}function xi(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 Si(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 Ci(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)=>wi(e.name)-wi(t.name)).flatMap(t=>{if(!t.required&&(r.has(t.inputName)||i.has(t.name)))return[];let n=Ue(e,t,r);return r.add(n),[Ti(t,n,`body`)]})}function wi(e){let t=e.split(`.`).at(-1);return t===`min`?0:t===`max`?1:2}function Ti(e,t,n){let r=e.itemSchemaEnum??e.schemaEnum,i=je(e.schemaType,e.itemSchemaType,e.schemaFormat,t);return{name:e.name,optionKey:t,flag:`${te(t)} ${e.schemaType===`boolean`?`[${i}]`:`<${i}>`}`,required:e.required&&e.schemaDefault===void 0,description:Ae(e.description,r),schemaType:e.schemaType,schemaFormat:e.schemaFormat,itemSchemaType:e.itemSchemaType,defaultValue:Ei(e.schemaDefault),choices:r,...e.envName===void 0?{}:{envName:e.envName},...e.visibility&&{visibility:e.visibility},location:n}}var Ei=e=>Array.isArray(e)?e.map(String):typeof e==`number`?String(e):e;export{O as _,Q as a,st as b,z as c,Tr as d,R as f,Yt as g,zt as h,Gr as i,xr as l,Lt as m,xi as n,Jr as o,Rt as p,pi as r,Dr as s,bi as t,Cr as u,k as v,Ge as x,A as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./mcp-generation-contract-DBF4S7_k.js";export{e as MCP_GENERATION_CONTRACT};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./oauth-bearer-credential-DGr2j4lk.js";export{t as materializeCliOAuthBearerCredential,e as materializeSavedCliOAuthBearerCredential};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./oauth-login-DwgRqY77.js";export{e as renewOAuthTokens};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./openapi-commands-q_eVvFfS.js";export{e as GENERATED_OPENAPI_COMMAND_SPECS};
|