@aventurevc/aventure-cli 0.8.257 → 0.8.259
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/command-catalog.compact.txt +1 -0
- package/dist/aventure-cli/index.js +1 -1
- package/dist/aventure-cli/unified-operations.json +21 -2
- package/dist/chunks/{allowance-type-COW05L2h.js → allowance-type-zGUV-h7b.js} +1 -1
- package/dist/chunks/{api-key-bearer-credential-BTq9cAKP.js → api-key-bearer-credential-9yUCRumS.js} +1 -1
- package/dist/chunks/{api-key-bearer-credential-CVcJxkw2.js → api-key-bearer-credential-CVTBn5O8.js} +1 -1
- package/dist/chunks/{api-key-credential-DzDcIKGs.js → api-key-credential-BE1Gfeaj.js} +1 -1
- package/dist/chunks/{api-key-credential-BFOFznef.js → api-key-credential-CT0VWdLO.js} +1 -1
- package/dist/chunks/{api-key-credential-verification-CNruZN7Q.js → api-key-credential-verification-CvyBwTMr.js} +1 -1
- package/dist/chunks/{api-key-credential-verification-rh3geoXw.js → api-key-credential-verification-WfPbKSE5.js} +1 -1
- package/dist/chunks/{api-key-login-D-2aJvCV.js → api-key-login-CDKlB72j.js} +1 -1
- package/dist/chunks/auth-resolver-ChtJBsZX.js +1 -0
- package/dist/chunks/{auth-resolver-DNIqLoKm.js → auth-resolver-DwIGdlfd.js} +1 -1
- package/dist/chunks/{auth-status-render-Dg6wk2Ge.js → auth-status-render-DMv97sLb.js} +1 -1
- package/dist/chunks/{aventure-cli-C8MWBa1x.js → aventure-cli-B0M-xJc4.js} +5 -5
- package/dist/chunks/{batch-io-D9zmqkmk.js → batch-io-CNT5e0vi.js} +1 -1
- package/dist/chunks/{builtin-auth-CnCYtnbV.js → builtin-auth-DayuV7ho.js} +5 -5
- package/dist/chunks/{builtin-research-run-wait-CnK0Z6pf.js → builtin-research-run-wait-Bis3piCO.js} +1 -1
- package/dist/chunks/{builtin-update-Cg25E4QH.js → builtin-update-CUlLpbz6.js} +1 -1
- package/dist/chunks/{cli-help-policy-IY8OyRny.js → cli-help-policy-BSp1_9pV.js} +1 -1
- package/dist/chunks/{completion-C5HqY_xw.js → completion-Cl9YW4K_.js} +1 -1
- package/dist/chunks/{contract-8m1wnMPD.js → contract-CrhKa2-C.js} +1 -1
- package/dist/chunks/{contract-parameter-YwzdPW2X.js → contract-parameter-BkhnusCV.js} +1 -1
- package/dist/chunks/{credential-redaction-BbeDpMUf.js → credential-redaction-unOGS2e0.js} +1 -1
- package/dist/chunks/{credential-store-yivldnnZ.js → credential-store-DcQ0A8xQ.js} +1 -1
- package/dist/chunks/{env-DSqe8wia.js → env-Hb2MJpnD.js} +1 -1
- package/dist/chunks/{generated-option-order-BNQVOEe_.js → generated-option-order-DSRbIIDu.js} +1 -1
- package/dist/chunks/{help-catalog-B_QWY5by.js → help-catalog-CXDJUIFG.js} +1 -1
- package/dist/chunks/{help-intent-BCTC0nPh.js → help-intent-CuTCCpzX.js} +1 -1
- package/dist/chunks/{logging-81KzSgWu.js → logging-CYw56CLn.js} +1 -1
- package/dist/chunks/{logging-D2-azwG6.js → logging-DJjGVMpb.js} +1 -1
- package/dist/chunks/logout-B9y3bILX.js +1 -0
- package/dist/chunks/{logout-BjePS1Y2.js → logout-CIh6zmYf.js} +1 -1
- package/dist/chunks/mcp-generation-contract-B-g0_uP9.js +1 -0
- package/dist/chunks/{mcp-generation-contract-CYIsS3Vb.js → mcp-generation-contract-C18Cjtzs.js} +1 -1
- package/dist/chunks/{oauth-bearer-credential-REtKPx7U.js → oauth-bearer-credential-Ca5rqZh6.js} +1 -1
- package/dist/chunks/oauth-bearer-credential-UH3ZAERN.js +1 -0
- package/dist/chunks/{oauth-credential-Dl2t7SrT.js → oauth-credential-CtS9qEtK.js} +1 -1
- package/dist/chunks/{oauth-credential-C2uLXL3z.js → oauth-credential-DHuA0bye.js} +1 -1
- package/dist/chunks/{oauth-login-PPTlg7HN.js → oauth-login-BnC614xR.js} +3 -3
- package/dist/chunks/{oauth-login-DnhiKbDF.js → oauth-login-BuYaZTaO.js} +1 -1
- package/dist/chunks/openapi-call-1Qa8ocHx.js +1 -0
- package/dist/chunks/openapi-call-VAeOuhRn.js +96 -0
- package/dist/chunks/{openapi-commands-C4uMEIWD.js → openapi-commands-D8G1FR52.js} +1 -1
- package/dist/chunks/openapi-commands-DJxO7m6Z.js +1 -0
- package/dist/chunks/openapi-snapshot-CCGoSxXm.js +1 -0
- package/dist/chunks/{operations-CBsfFzwa.js → operations-C3lQpqbn.js} +2 -2
- package/dist/chunks/operations-catalog-_HA3hb5-.js +1 -0
- package/dist/chunks/{operations-catalog-CZ3NcpEW.js → operations-catalog-qaDSbcpM.js} +1 -1
- package/dist/chunks/{operations-metadata-BIbGsH0A.js → operations-metadata-BCikzD0o.js} +1 -1
- package/dist/chunks/output-COy3YoEX.js +5 -0
- package/dist/chunks/{output-CSEwVExw.js → output-DXMr4OZP.js} +1 -1
- package/dist/chunks/output-mode-CJsZnq9Z.js +1 -0
- package/dist/chunks/output-mode-DDZ46TDI.js +1 -0
- package/dist/chunks/output-spill-Td5OeEiY.js +1 -0
- package/dist/chunks/{parse-error-hint-5mAc-wDG.js → parse-error-hint-9jgYfPb-.js} +1 -1
- package/dist/chunks/{payload-operand-guard-CaQWY0J1.js → payload-operand-guard-DNi-gpKJ.js} +1 -1
- package/dist/chunks/{request-replay-DfZzZsDS.js → request-replay-BD5eVITJ.js} +1 -1
- package/dist/chunks/{request-replay-Y7pdemkJ.js → request-replay-BTBMUex4.js} +1 -1
- package/dist/chunks/{response-problem-BAThXgJO.js → response-problem-B6f_4367.js} +1 -1
- package/dist/chunks/response-problem-C0hmbxPU.js +1 -0
- package/dist/chunks/{result-envelope-BJO8Am4v.js → result-envelope-CB5fGScF.js} +1 -1
- package/dist/chunks/{run-Db_Ap1DI.js → run-0l-YeqBs.js} +1 -1
- package/dist/chunks/{run-detail-CIBpS8hz.js → run-detail-DO0WpNC3.js} +1 -1
- package/dist/chunks/{startup-auth-CVLIC4JO.js → startup-auth-Bqy-KvD5.js} +1 -1
- package/dist/chunks/startup-auth-CNLHbI2J.js +1 -0
- package/dist/chunks/text-response-BOgi2okw.js +16 -0
- package/dist/chunks/{tool-policy-niA3ZXkC.js → tool-policy-ClEqQ6OA.js} +1 -1
- package/package.json +3 -3
- package/dist/chunks/auth-resolver-C57QMMUe.js +0 -1
- package/dist/chunks/logout-qzl0r8ED.js +0 -1
- package/dist/chunks/mcp-generation-contract-DSzMu-33.js +0 -1
- package/dist/chunks/oauth-bearer-credential-CTiR5Iph.js +0 -1
- package/dist/chunks/openapi-call-DHOQt4OJ.js +0 -96
- package/dist/chunks/openapi-call-vETt_hwn.js +0 -1
- package/dist/chunks/openapi-commands-BTNsxzXF.js +0 -1
- package/dist/chunks/openapi-snapshot-CdP_759F.js +0 -1
- package/dist/chunks/operations-catalog-wdGfLmeo.js +0 -1
- package/dist/chunks/output-PpFL_u1F.js +0 -5
- package/dist/chunks/output-mode-7IxGiKwO.js +0 -1
- package/dist/chunks/output-mode-D5nGNc3I.js +0 -1
- package/dist/chunks/output-spill-6X8d6akm.js +0 -1
- package/dist/chunks/response-problem-DYbgVdhl.js +0 -1
- package/dist/chunks/startup-auth-yMe1eTPb.js +0 -1
- package/dist/chunks/text-response-BpAZ5CH5.js +0 -15
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{o as writeShowResult}from"./operations-catalog-CZ3NcpEW.js";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./package-DEeHDoOT.js";import{n as t}from"./result-envelope-BJO8Am4v.js";import{o as n}from"./logging-81KzSgWu.js";import{n as r,r as i}from"./output-spill-6X8d6akm.js";import{n as a}from"./human-text-cap-BcNmIPQA.js";import{i as o,n as s,r as c,t as l}from"./text-response-BpAZ5CH5.js";import{t as u}from"./openapi-commands-BTNsxzXF.js";function d(e,t){let n=t.data,r=`jobId`,i=`statusUrl`,a=t.rolloverJob?.jobId??(typeof n==`object`&&n&&r in n&&typeof n[r]==`string`?n[r]:void 0),o=t.rolloverJob?.statusUrl??t.headers.location??(typeof n==`object`&&n&&i in n&&typeof n[i]==`string`?n[i]:void 0),s=t.headers[`retry-after`],c=`Pending: ${e.operationId??`request`}${a===void 0?``:` job ${a}`} is still running.`+(s===void 0?``:` Retry-After: ${s}.`)+(o===void 0?``:` Poll GET ${o} for the result.`);return{...e,summary:c,warnings:[...e.warnings,c],ids:a===void 0?e.ids:[...new Set([...e.ids,a])],references:o===void 0?e.references:[...new Set([...e.references,o])]}}function f(e){let n=t(e,g(e));return S(n),process.stdout.write(`${JSON.stringify(n)}\n`),n}function p(e){let n=t(e,{...g(e),foldRows:!1});S(n);let r=l(u,n.data,n.summary),i=[];if(n.ok&&r!==null){let e=m(n);i.push(r.endsWith(`
|
|
2
|
-
`)?r.slice(0,-1):r),i.push(...e),process.stdout.write(a(i.join(`
|
|
3
|
-
`),{appendNewline:!0,preservedTrailerLines:e.length}));return}let o=n.ok?`OK`:`FAIL`;i.push(`[${o}] ${n.summary}`),!n.ok&&n.problem!==void 0&&i.push(...v(n.problem)),i.push(...m(n)),process.stdout.write(a(i.join(`
|
|
4
|
-
`),{appendNewline:!0}))}function m(e){let t=[];e.ids.length>0&&t.push(` ids: ${e.ids.join(`, `)}`);for(let[n,r]of Object.entries(e.counts))t.push(` ${n}: ${r}`);for(let n of e.references)t.push(` ref: ${n}`);if(e.truncation!==void 0){let n=e.truncation.omitted.join(`, `);t.push(` truncated: byteLength=${e.truncation.byteLength} maxBytes=${e.truncation.maxBytes} omitted=${n}`,` recovery: ${e.truncation.recovery}`)}for(let n of e.warnings)t.push(` warn: ${n}`);return t}function h(e,n){let a=i(n);if(e.mode===`data`||e.mode===`data-full`){let n=e.mode===`data`?t(a,g(a)):a;S(n),process.stdout.write(`${JSON.stringify(n.ok&&n.truncated!==!0?r(n.data):n)}\n`),n.ok||(process.exitCode=1);return}let o=e.mode===`json`?f(a):a;e.mode===`text`&&p(o),o.ok||(process.exitCode=1)}function g(e){let t=o(e,u);if(t.write===!0||!e.ok)return t;let n=c(e,u);return n===void 0?t:{...t,exactRecovery:`Inline output is truncated. ${n}`}}function _(e,t){if(typeof t==`object`&&t&&`httpStatus`in t&&t.httpStatus===202)return;let n=s(t);n===null?(process.stderr.write(`explain: the response carried no search interpretation
|
|
5
|
-
`),process.exitCode=1):(e===`text`?process.stdout:process.stderr).write(n)}function v(e){let t=[];typeof e.code==`string`&&t.push(` code: ${e.code}`),typeof e.detail==`string`&&t.push(` detail: ${e.detail}`),typeof e.hint==`string`&&t.push(` hint: ${e.hint}`),typeof e.suggestion==`string`&&t.push(` suggestion: ${e.suggestion}`);let n=Object.entries(e.suggestions??{});if(n.length>0){let e=n.map(([e,t])=>`${e}=${t}`).join(`; `);t.push(` suggestions: ${e}`)}return typeof e.requiredRole==`string`&&t.push(` requiredRole: ${e.requiredRole}`),t.push(...y(e),...b(`unknownParameters`,e.unknownParameters),...b(`validParameters`,e.validParameters),...x(e.resolution)),t}function y(e){let t=[];return typeof e.limitType==`string`&&t.push(`limitType=${e.limitType}`),typeof e.used==`number`&&t.push(`used=${e.used}`),typeof e.limit==`number`&&t.push(`limit=${e.limit}`),typeof e.remaining==`number`&&t.push(`remaining=${e.remaining}`),typeof e.resetAt==`string`&&t.push(`resetAt=${e.resetAt}`),typeof e.windowSeconds==`number`&&t.push(`windowSeconds=${e.windowSeconds}`),typeof e.retryAfterSeconds==`number`&&t.push(`retryAfterSeconds=${e.retryAfterSeconds}`),t.length>0?[` meter: ${t.join(` `)}`]:[]}function b(e,t){return t!=null&&t.length>0?[` ${e}: ${t.join(`, `)}`]:[]}function x(e){if(e==null)return[];let t=[`action=${e.action}`];return typeof e.parameter==`string`&&t.push(`parameter=${e.parameter}`),typeof e.fieldPath==`string`&&t.push(`fieldPath=${e.fieldPath}`),typeof e.endpoint==`string`&&t.push(`endpoint=${e.endpoint}`),e.acceptedValue!==null&&e.acceptedValue!==void 0&&e.acceptedValue.length>0&&t.push(`acceptedValue=${e.acceptedValue.join(`, `)}`),typeof e.retryable==`boolean`&&t.push(`retryable=${e.retryable}`),[` resolution: ${t.join(` `)}`]}function S(t){if(t.ok&&t.warnings.length===0)return;let r=t.truncation===void 0?t.warnings:[...t.warnings,`omitted: ${t.truncation.omitted.join(`, `)}`,`recovery: ${t.truncation.recovery}`];n({component:e().bin[0],event:t.ok?`command_warning`:`command_failed`,message:r.length>0?r.join(` | `):t.summary,fields:{warningCount:t.warnings.length,summary:t.summary}})}export{d as a,_ as i,p as n,f as r,h as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{n as cliMachineOutputSelected}from"./output-mode-D5nGNc3I.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./commander-DEj7N1b9.js";import{t}from"./result-envelope-BJO8Am4v.js";import{t as n}from"./output-spill-6X8d6akm.js";var r=`${t/1e3}KB`,i=[{flags:`--text`,description:`Print text (terminal default).`,conflicts:[`data`,`dataFull`,`json`]},{flags:`--data`,description:`Print data JSON (piped default); over ${r} prints a truncated envelope, not the payload; use --to-file.`,conflicts:[`text`,`dataFull`,`json`]},{flags:`--data-full`,description:`Print uncapped JSON for bounded programs; never LLM agents.`,conflicts:[`text`,`data`,`json`,`toFile`]},{flags:`--to-file <path>`,description:`Write the uncapped bare payload to <path> (top-level keys as returned, not a data.response wrapper) and print only a receipt: {spilledTo, byteLength} for an API read, else a 'spilled <bytes> bytes to <path>' line; a failure writes its envelope and still prints inline.`,conflicts:[`dataFull`]},{flags:`--json`,description:`Print the stable JSON envelope (capped at ${r}).`,conflicts:[`text`,`data`,`dataFull`]},{flags:`--all-fields`,description:`Print text including the detail fields --text hides; --data and --json already carry every field.`,conflicts:[]}],a=new Intl.ListFormat(`en`,{type:`disjunction`}),o=(()=>{let t=i.map(t=>new e(t.flags));return i.map(e=>{let n=t.filter(t=>e.conflicts.some(e=>e===t.attributeName())).flatMap(e=>e.long??[]);return n.length===0?e.description:`${e.description} Cannot combine with ${a.format(n)}.`})})();function s(t){return i.forEach((n,r)=>{t.addOption(new e(n.flags,o[r]).conflicts([...n.conflicts]))}),t}function c(e,t=`auto`){return f(e.toFile)&&n(e.toFile),e.json===!0?`json`:e.dataFull===!0?`data-full`:e.data===!0?`data`:e.text===!0||e.allFields===!0?`text`:d(e)||t===`auto`&&!process.stdout.isTTY?`data`:`text`}function l(e){if(e.includes(`--text`))return!1;let t=e.includes(`--json`)||e.includes(`--data`)||e.includes(`--data-full`);return e.includes(`--all-fields`)&&!t?!1:t||e.includes(`--agent-chassis`)&&e.includes(`--agent-model`)||!process.stdout.isTTY}function u(e){return e===`data`||e===`data-full`||e===`json`}function d(e){return f(e.agentChassis)&&f(e.agentModel)}function f(e){return typeof e==`string`&&e.trim().length>0}export{c as i,l as n,u as r,s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./result-envelope-BJO8Am4v.js";import{dirname as t}from"node:path";import{mkdirSync as n,writeFileSync as r}from"node:fs";import{Buffer as i}from"node:buffer";var a;function o(e){a=e}function s(e){return typeof e!=`object`||!e||Array.isArray(e)||!Reflect.has(e,`method`)||!Reflect.has(e,`endpoint`)||!(`response`in e)||e.response===void 0?e:e.response}function c(o){let c=a;if(c===void 0)return o;a=void 0;let u=o.data,d=o.ok?u instanceof Uint8Array?u:typeof u==`string`?i.from(u,`utf8`):l(s(u)):l(o);try{n(t(c),{recursive:!0}),r(c,d)}catch(t){return e(`could not spill output to '${c}'`,[String(t)])}if(!o.ok)return o;if(typeof u!=`object`||!u||u instanceof Uint8Array||s(u)===u)return{...o,data:`spilled ${d.byteLength} bytes to '${c}'`};let f=s(u),p,m=!1;if(typeof f==`object`&&f&&!Array.isArray(f)&&!(`content`in f&&Array.isArray(f.content))&&!(`score`in f)&&!(`id`in f&&`core`in f)){m=`core`in f;let e=`core`in f?Object.hasOwn(f,`core`)?f.core:void 0:f;typeof e==`object`&&e&&!Array.isArray(e)&&`id`in e&&Object.hasOwn(e,`id`)&&(typeof e.id==`string`||typeof e.id==`number`&&Number.isSafeInteger(e.id))&&(p=e.id)}return{...o,data:{...u,response:{spilledTo:c,byteLength:d.byteLength,...o.httpStatus===void 0?{}:{httpStatus:o.httpStatus},...p===void 0?{}:m?{core:{id:p}}:{id:p}}}}}function l(e){return i.from(JSON.stringify(e,null,2),`utf8`)}export{s as n,c as r,o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{l as retrySeconds}from"./response-problem-BAThXgJO.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./commander-DEj7N1b9.js";import{c as r,f as i,t as a}from"./env-DSqe8wia.js";import{c as o,r as s}from"./result-envelope-BJO8Am4v.js";import{y as c}from"./tool-policy-niA3ZXkC.js";import{r as l}from"./cli-help-policy-IY8OyRny.js";function u(e,t){return e.parameters.filter(e=>e.required&&t[e.optionKey]===void 0).map(e=>e.flag)}function d(e,t){return(e.requestBody?.length??0)>1&&typeof t.contentType==`string`?t.contentType:void 0}var f=e=>typeof e==`string`&&e.trim()===``;function p(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(f):f(i)))continue;let a=Array.isArray(i)?i.filter(e=>!f(e)):[];a.length>0?e.setOptionValue(r,a):(n.has(r)&&e.error(`error: option '${t.flags}' requires a value`),e.setOptionValue(r,void 0))}}function m(e){return e.split(` `)[0]??e}function h(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 g(e,t,n){let r=t.join(` `).trim();return r.length===0?o(`No positional text`,n):n[e.optionKey]===void 0?o(`Positional text parsed`,{...n,[e.optionKey]:r}):s(`Unexpected argument "${r}": ${m(e.flag)} already sets this value, and this command has no subcommand by that name. Drop "${r}".`)}var _={addresses:{summary:`List Address Links`,section:`administration`},"addresses links":{summary:`Returns entity and person association ids, owner ids, and nullable roles for a physical address, including historical associations`},agents:{summary:`Deprecated: Use Help Ask to Answer a Platform Help Question`,section:`cli`},"agents help":{summary:`Deprecated: use help ask (POST /v1/help) with the same body`},auth:{summary:`Sign-in, session, API key, and CLI authorization endpoints`,section:`account`},"auth api-key":{summary:`Get Current API Key`},"auth me":{summary:`Current User Permissions`},"auth me permissions":{summary:`Returns the current caller's resolved roles and permissions`},"auth providers":{summary:`Get the Sign-In Options`},billing:{summary:`Plans, prices, subscription, usage, and upgrades`,section:`account`},"billing additional-usage":{summary:`Update Additional Usage Settings`},"billing ai-credits":{summary:`Read the Current AI Credit Allowance`},"billing checkout-sessions":{summary:`Create or Recover a Checkout Session`},"billing credit-purchases":{summary:`Read a Prepaid Credit Purchase Confirmation`},"billing plan-change-previews":{summary:`Preview a Subscription Plan Change`},"billing plan-changes":{summary:`Change the Subscription Plan`},"billing plans":{summary:`List Subscription Tiers and Plans`},"billing portal-sessions":{summary:`Create a Hosted Billing Portal Session`},"billing subscription":{summary:`Read the Current Billing Subscription`},"billing subscription next-charge":{summary:`Preview the Next Subscription Charge`},"billing subscription payment-profile":{summary:`Read Your Card on File and Introductory Offer`},directory:{summary:`Shared views of the public directories: publish, list, and read by slug`,section:`researchData`},"directory shared":{summary:`List Shared Directory Views`},"directory shared slug":{summary:`Read a Shared Directory View by Slug`},enrichments:{summary:`Enrich Companies, People, or a News Article's Mentions`,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 analysis-replay":{summary:`Get Entity Analysis Replay`},"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 Portfolio Counts and Stage Mix`},"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 search":{summary:`Search Companies, Products, and Services`},"entities search jobs":{summary:`Get an Async Semantic Entity Search`},"entities sec":{summary:`Get SEC EDGAR Facts for a Public Company`},"entities similar":{summary:`Similar companies and lean similar-company summaries by id`},"entities similar summary":{summary:`Get Similar Company Summaries by ID`},"entities slug":{summary:`Get a Company's Slug`},"entities texts":{summary:`Descriptions and other written text for companies and people`},"entities texts types":{summary:`List the Accepted Company Text Types`},"entities trending-news":{summary:`List Trending News About a Company`},"entities types":{summary:`List the Accepted typeRecord Values`},"entities unique-ids":{summary:`External identifiers and the records they name`},"entities urls":{summary:`Websites, social profiles, and other URLs for companies and people`},"entities valuations":{summary:`List a Company's Valuation Over Time`},help:{summary:`Answer a Natural-Language Platform Help Question`,section:`cli`},lookup:{summary:`Read a Company, Product, Service, or Person Identity`,section:`researchData`},"lookup-from-file":{summary:`Identify a Company, Product, Service, or Person by Name, URL, or ID`,section:`researchData`},"lookup-jobs":{summary:`Async article and bulk name identification`,section:`researchData`},"lookup-mentions":{summary:`Identify Every Company and Person a Page or Screenshot Names`,section:`researchData`},metrics:{summary:`Get Platform Totals for Companies, Funding, and People`,section:`cli`},news:{summary:`News linked to the companies and people in it`,section:`researchData`},"news feedback":{summary:`Submit News Feedback`},"news related-entities":{summary:`List the Entities a News Article Is About`},"news subscriptions":{summary:`List Entity News Subscriptions`},"news subscriptions test-events":{summary:`Send a Test News Event`},"news thumbnail":{summary:`Get News Thumbnail`},people:{summary:`Founders and investors, and what they back`,section:`researchData`},"people addresses":{summary:`A person's recorded addresses`},"people blog-posts":{summary:`External blog and article links for entities and people`},"people content":{summary:`Publications about one company or person, and platform-wide publication search`},"people content facets":{summary:`Count a Person's Publications`},"people enrichments":{summary:`Enrich One Person`},"people entities":{summary:`People linked to companies, and the role each one holds`},"people filters":{summary:`Filter options for people listings and option search`},"people graph":{summary:`Get Person Graph`},"people investments":{summary:`List a Person's Investments`},"people investor-activity":{summary:`Get Person Investor Activity`},"people lookup-exact":{summary:`Read One Person's Full Detail by aVenture Profile URL, Slug, or URL`},"people photo":{summary:`Get Person Photo`},"people repositories":{summary:`List a Person's GitHub Repositories`},"people similar":{summary:`List People Similar to One Person`},"people texts":{summary:`Descriptions and other written text for companies and people`},"people texts types":{summary:`List the Accepted Person Text Types`},"people unique-ids":{summary:`External identifiers and the records they name`},"people urls":{summary:`Websites, social profiles, and other URLs for companies and people`},"research-runs":{summary:`Research requests you file for a company, Product, Service, or person, and their progress`,section:`researchData`},"research-runs draft":{summary:`Get a Research Run Draft`},"research-runs draft sections":{summary:`Edit a Research Draft Section`},"research-runs draft sources":{summary:`Get a Research Draft's Sources`},"research-runs events":{summary:`Read a Research Run's Events`},"research-runs presets":{summary:`List Research Presets`},"research-runs turns":{summary:`Continue a Research Session`},resolve:{summary:`Deprecated: Resolve an Entity or Person by Identifier Token`,section:`researchData`},search:{summary:`Search Companies, People, and News Together`,section:`researchData`},"search link":{summary:`Search From a Page URL`},"search link jobs":{summary:`Get a Link Search Job`},"search natural":{summary:`Find companies and people in natural language`},"search shared":{summary:`Search companies, people, and news, or by URL`},"search shared slug":{summary:`Read a Shared Search by Slug`},"unique-ids":{summary:`External identifiers and the records they name`,section:`researchData`},"unique-ids types":{summary:`List the Accepted Unique Identifier Types`},"url-types":{summary:`List URL Types`,section:`researchData`},web:{summary:`Search companies, people, and news, or by URL`,section:`researchData`},"web searches":{summary:`Get an Async Web Search Job`},"web searches jobs":{summary:"Reads the web-search job a `Prefer: respond-async` search accepted"}};function v(e){return x(e,y())}function y(){return!!i().userBearerToken?.trim()}function b(e){return y()||!l(e,_)}function x(e,t){return t?e:e.filter(e=>!l(e.cliPath[0],_)||e.visibility!==`private`).map(S)}function S(e){let t=e.parameters.filter(C),n=e.requestBody?.map(e=>{let t=e.parameter.filter(C);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 C=e=>e.visibility!==`private`;async function w(e){if(e===`none`||process.env[a.authToken]?.trim())return;let{materializeCliOAuthBearerCredential:t,materializeSavedCliOAuthBearerCredential:n}=await import(`./oauth-bearer-credential-CTiR5Iph.js`),{materializeCliApiKeyBearerCredential:r}=await import(`./api-key-bearer-credential-BTq9cAKP.js`);await(e===`stored`?n():t()),await r()}function T(i,a){let o=i.indexOf(`--`),s=i.slice(0,o===-1?i.length:o);if(s.some(e=>e===`--version`||e===`-V`))return`none`;let u=new n().exitOverride().configureOutput({writeErr:()=>void 0}).addOption(new e(`--environment <environment>`,`route all API calls to a mapped API environment`).choices([...r()])).addOption(new e(`--content-type <media-type>`)).addOption(new e(`--ask <question>`)),f=u.parseOptions([...i]).operands,p=u.opts().environment;p!==void 0&&(process.env.API_ENV=p);let m=a.find(e=>E(f,e.cliPath)),h=m===void 0?void 0:d(m,u.opts());if(m!==void 0&&h!==void 0){let e=c(m.requestBody??[],h);if(!e.ok)throw new t(e.summary)}let g=f.at(0);if(g===void 0)return`stored`;if(g===`update`||g===`auth`&&m===void 0)return`none`;let v=u.opts().ask;return s.some(e=>e===`--help`||e===`-h`)?(m??(g===`help`&&v===void 0?a.find(e=>E(f.slice(1),e.cliPath)):void 0))!==void 0||l(g,_)?`stored`:`none`:l(g,_)?`required`:g===`help`?m===void 0?v===void 0?`stored`:f.length===1?`required`:`none`:`required`:g===`agents`&&f[1]===`setup`?`required`:[`command-catalog`,`completion`].includes(g)?`optional`:g===`batch`?`required`:m===void 0?`optional`:`required`}function E(e,t){return t.every((t,n)=>e[n]===t)}export{v as a,m as c,h as d,g as f,x as i,u as l,T as n,_ as o,w as r,d as s,b as t,p as u};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{C as e,E as t,S as n,_ as r,c as i,d as a,g as o,i as s,n as c,s as l,x as u}from"./iso-l1vOidnb.js";import{A as d,C as f,D as p,E as m,O as h,S as ee,T as te,_ as ne,a as g,b as re,c as ie,d as ae,f as oe,g as se,h as ce,i as le,k as ue,l as de,m as fe,n as pe,o as me,p as he,r as _,s as ge,t as v,u as _e,v as ve,w as ye,x as be,y}from"./detail-DFVJrldR.js";import{t as xe}from"./person-owner-BRGa5Dee.js";import{t as b}from"./entity-Cg2n2mP0.js";import{t as x}from"./type-C0VR7LD-.js";import{t as Se}from"./run-Db_Ap1DI.js";import{p as Ce}from"./result-envelope-BJO8Am4v.js";import{i as we,l as Te}from"./tool-policy-niA3ZXkC.js";import{a as S,c as Ee,i as De,l as Oe,n as C,r as w,s as T,t as ke}from"./text-field-jFKOGMzr.js";import{a as Ae,n as je,o as Me,r as Ne,s as E,t as Pe}from"./human-text-cap-BcNmIPQA.js";import{a as Fe,d as D,f as Ie,m as O,o as Le,p as Re,u as ze,x as Be}from"./help-catalog-B_QWY5by.js";import{Buffer as Ve}from"node:buffer";var He=`aventure`;function k(e,t,n=`cli`){let r=t.find(t=>t.operationId===e);if(n===`mcp`&&r!==void 0){let e=Le(r);return`${e.tool} ${JSON.stringify(e.arguments)}`}let i=r?.cliPath;return i===void 0?void 0:`${He} ${i.join(` `)}`}function Ue(e,t,n=e,r=`cli`){return r===`mcp`?k(e,t,r)??e:Be(e,t,`aventure`)??n}function We(e,t,n=`cli`){let r=ze.safeParse(e);if(!r.success)return null;let{answer:i,citation:a,confidence:o,resolution:s}=r.data;if(s!=null)return Ge(i,s,t,n);let c=i.trimEnd().split(`
|
|
2
|
-
`),l=new Set(a.flatMap(({sourceType:e,sourceId:r})=>{if(e!==Re.options[0].enum.OPERATION)return[];let i=k(r,t,n);return i===void 0?[]:[i]}));return l.size>0&&c.push(``,n===`mcp`?`MCP calls:`:`Commands:`,...[...l].map(e=>` ${e}`)),c.push(``,`Confidence: ${o}`),a.length===0||(c.push(`Sources (${a.length}):`),c.push(...a.map(({excerpt:e,sourceId:t})=>{let n=e.trim();return n.length>0?` - ${t}: ${n}`:` - ${t}`}))),c}function Ge(e,t,n,r){let{outcome:i,operationId:a,probability:o,candidate:s,taskKey:c,taskPlan:l}=t,u=[l==null?e.trimEnd():qe(l)],d=[``,`Outcome: ${i}${o==null?``:` (probability ${o.toFixed(2)})`}`];switch(i){case D.enum.TASK_PLAN:return[...u,...l==null?[]:Je(l,n,r),...d];case D.enum.OPERATION_ADVICE:{let e=s.filter(({sourceId:e})=>e!==a);return[...u,...a==null?[]:[``,r===`mcp`?`MCP call:`:`Command:`,` ${Ue(a,n,a,r)}`],...d,...e.length===0?[]:[`Alternatives: ${e.map(({sourceId:e})=>e).join(`, `)}`]]}case D.enum.CLARIFY:return[...u,...c==null?[]:[``,`Leading catalog task: ${c}`],...Xe(`Candidates:`,s,n,r),...d];case D.enum.ABSTAIN:return[...u,...Xe(`Nearest operations:`,s,n,r),...d];default:throw Error(`Unhandled help resolution outcome ${String(i)}`)}}function Ke(e,t,n=`cli`){let r=Ie.safeParse(e);return r.success?[qe(r.data),...Je(r.data,t,n)]:null}var qe=({taskKey:e,catalogRevision:t})=>e===void 0?`Run these steps in order.`:`Run catalog task ${e}${t===void 0?``:` (catalog revision ${t})`}.`;function Je(e,t,n){return e.step.length===0?[``,`This catalog task has no planned steps yet.`]:[...e.input.length===0?[]:[``,`Inputs:`,...e.input.map(({key:e,type:t,description:n,required:r})=>` ${e} (${t}, ${r===!1?`optional`:`required`}): ${n}`)],``,`Steps:`,...e.step.flatMap(({step:r,cliCommand:i,writeGuidance:a},o)=>[` ${o+1}. ${r.stepKey===void 0?``:`${r.stepKey}: `}${Ue(r.operationId,t,i,n)}`,` ${r.instruction}`,...Ye(e,o,a)]),...e.gateId?.length?[``,`Completion gates: ${e.gateId.join(`, `)}`]:[]]}function Ye(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 Xe(e,t,n,r){if(t.length===0)return[];let i=t.map(({sourceId:e,excerpt:t})=>({command:k(e,n,r)??e,excerpt:t})),a=Math.max(...i.map(({command:e})=>e.length));return[``,e,...i.map(({command:e,excerpt:t})=>` ${e.padEnd(a)} # ${t}`)]}var A=/\{([^}]+)\}/gu,Ze=/(?:^r|R)evision$/u;function Qe(e,t,n=`cli`){let r=t.filter(e=>e.method===`GET`&&(n===`cli`||e.binaryResponse!==!0)),i=t=>e.endpoint!==void 0&&t.endsWith(e.endpoint),a=t.find(t=>t.operationId===e.operationId),o=e.ok&&a!==void 0&&we(a.intent),s=[...o&&e.endpoint!==void 0?rt(e.endpoint.split(`?`)[0]??``,r,!1,n,tt(e.data)).map(e=>n===`mcp`?e:`${e} --data --to-file <path>`):[],...e.references.filter(e=>!i(e)).flatMap(nt).flatMap(e=>rt(e.pathname,r,!0,n)),...e.references.filter(i).flatMap(nt).flatMap(e=>it(e,r,n))],c=n===`mcp`?$e:void 0;return s.length===0?{write:o,narrowerRead:c}:{exactRecovery:`Read the full result ${s.join(`; `)}.`,write:o,narrowerRead:c}}var $e=`Refetch a narrower result: call aventure_help with q set to the read intent, then call aventure_read with its operationId and declared query or pathParams, using ids/references, filters, or smaller query.page/query.size windows.`;function et(e,t){let n=t.find(t=>t.operationId===e.operationId);if(!e.ok||n?.method!==`GET`||n.mutates===!0||we(n.intent)||e.endpoint===void 0)return;let r=new URL(e.endpoint,`https://localhost`),i=[...n.path.matchAll(A)].map(([,e])=>e),a=RegExp(`^${n.path.replace(A,`([^/]+)`)}$`,`u`).exec(r.pathname);if(a===null)return;let o=n.parameters.find(e=>e.location===`query`&&e.name===`compact`&&e.schemaType===`boolean`);o!==void 0&&r.searchParams.set(o.name,`true`);let s=[];for(let e of n.parameters){let t=e.location===`path`?[decodeURIComponent(a[i.indexOf(e.name)+1]??``)]:e.location===`query`?r.searchParams.getAll(e.name):[];if(e.required&&t.length===0)return;t.length>0&&s.push(M(e),...t.map(st))}return`Run: \`${j(n,[...s,`--data`,`--to-file`,`./aventure-output.json`])}\`. On success, the spill file contains the bare payload (top-level keys as returned), not the result envelope or a data.response wrapper.`}function tt(e){let t=typeof e==`object`&&e&&`response`in e?e.response:null;return typeof t==`object`&&t?new Map(Object.entries(t).flatMap(([e,t])=>Number.isInteger(t)&&Ze.test(e)?[[e,String(t)]]:[])):new Map}function nt(e){return URL.canParse(e)?[new URL(e)]:[]}function rt(e,t,n,r,i=new Map){let a=t.filter(t=>t.path===e);return(a.length>0?a:t).flatMap(t=>{let a=[...t.path.matchAll(A)].map(([,e])=>e),o=RegExp(`^${t.path.replace(A,`([^/]+)`)}$`,`u`),s=n&&a.length===0?null:o.exec(e);if(s===null)return[];let c=t.parameters.flatMap(e=>{let t=e.location===`query`?i.get(e.name):void 0;return t===void 0?[]:[{parameter:e,pin:t}]});if(r===`mcp`)return[at(t,{pathParams:Object.fromEntries(a.map((e,t)=>[e??``,decodeURIComponent(s[t+1]??``)])),...c.length===0?{}:{query:Object.fromEntries(c.map(({parameter:e,pin:t})=>[e.name,t]))}})];let l=a.flatMap((e,n)=>{let r=t.parameters.find(t=>t.name===e);return r===void 0?[]:[M(r),s[n+1]??``]}),u=c.flatMap(({parameter:e,pin:t})=>[M(e),t]);return[`${ot(t)}, ${j(t,[...l,...u])}`]})}function it(e,t,n){let r=t.find(t=>t.path===e.pathname);return r===void 0?[]:t.flatMap(t=>{if(!t.path.startsWith(`${r.path}/`))return[];let i=t.parameters.find(({name:e})=>e.endsWith(`Offset`)),a=t.parameters.find(({name:e})=>e.endsWith(`Limit`));if(i===void 0||a===void 0)return[];if(n===`mcp`)return[`in windows: ${at(t,{query:{...Object.fromEntries([...e.searchParams].filter(([e])=>t.parameters.some(t=>t.location===`query`&&t.name===e))),[i.name]:`<offset>`,[a.name]:`<limit>`}})}, advancing query.${i.name} until a window returns fewer than query.${a.name} units`];let o=t.parameters.flatMap(t=>{let n=e.searchParams.get(t.name);return t.location!==`query`||n===null?[]:[M(t),st(n)]}),s=[M(i),`<n>`,M(a),`<n>`];return[`${ot(t)}, in windows: ${j(t,[...o,...s])}, advancing ${M(i)} until a window returns fewer than ${M(a)} units`]})}function at(e,t){return`${Te(e.intent)} ${JSON.stringify({operationId:e.operationId,...t})}`}function ot(e){return e.auth===`write`?`with admin sign-in`:`with any sign-in`}function j(e,t){return[He,...e.cliPath,...t].join(` `)}function M(e){return e.flag.split(/\s+/u)[0]??e.flag}function st(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}var ct=r({detail:n(),field:n().nullish(),scope:s([`entity`,`person`,`news`])}),N=s([`auto`,`exact`,`keyword`,`semantic`,`natural`,`hybrid`]),P=Object.assign(e([N,n()]),{enum:N.enum}),F=r({modeRequested:P,modeUsed:P}),lt=r({answerUnavailable:i(),entity:F,news:F,person:F,rejection:l(ct),unavailable:l(s([`entity`,`person`,`news`]))}),ut=r({acceleratorParticipation:l(se),detail:l(ce)}),I=r({core:b,enrichment:te,fundraiseRound:l(y),provider:ve.nullish(),research:ut,semanticMatch:me.nullish()}),dt=s([`curated`,`semantic`,`precomputed`,`derived`,`computed`]),ft=r({compositeScore:o().nullish(),cosineScore:o().nullish(),curatedAsOf:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),curatedRelationshipType:n().nullish(),curatedSource:n().nullish(),derivedFromEntityId:t().nullish(),matchedSectionWeight:o().nullish(),origin:dt,rank:a(),sharedSectionCount:a().nullish()}),pt=r({entity:I,similarity:ft}),mt=r({fundraiseInvestorJoin:i(),fundraiseTransaction:i(),operatingStatus:i(),relationship:i()}),ht=s([`Acquisition`,`Acquired`,`Acquired Subsidiary`]),gt=s([`Announced`,`Announced; subject to approvals and closing conditions`,`Active`,`Closed`,`Completed`,`In Progress`,`Open`]),_t=r({acquiredEntity:b,acquirerEntity:b,amount:o().int().nullish(),announcedAt:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),asOf:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),completedAt:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/).nullish(),createdAt:c({offset:!0}).nullish(),currency:n().nullish(),dataConfidence:ee.nullish(),evidence:mt,fundraiseTransactionId:t().nullish(),investorJoinId:t().nullish(),isCurrent:i().nullish(),publicSource:f.nullish(),relationshipId:a(),status:ht,transactionStatus:gt.nullish(),updatedAt:c({offset:!0}).nullish()}),vt=r({entity:v,investorAttribution:l(re),round:l(be),roundCount:a()}),yt=r({core:b,fundingDetail:h.nullish(),similarity:ft,urlLink:l(m)}),bt=r({compliance:fe.nullish(),createdAt:c({offset:!0}).nullish(),id:a(),isCurrent:i().nullish(),isPrimary:i().nullish(),language:n().nullish(),owner:xe,text:n(),textName:n().nullish(),textType:n(),updatedAt:c({offset:!0}).nullish()}),xt=s([`stored`,`derivedFromPreAndRaised`,`derivedFromPostMinusRaised`,`reportedAssumedPost`]),St=s([`fundraiseRound`,`researchDetail`]),Ct=s([`preMoney`,`postMoney`,`reported`]),wt=r({amountRaised:o().int().nullish(),asOfDate:n().regex(/^(?!0000)[0-9]{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?(?:Z|[+-](?:(?:0[0-9]|1[0-7]):[0-5][0-9]|18:00)))?)?)?$/),confidence:de,currency:n(),declaredBasis:Ct,derivation:xt,detailId:a().nullish(),label:n().nullish(),source:St,sourceRef:n(),valuationPostMoney:o().int().nullish(),valuationPreMoney:o().int().nullish()}),Tt=r({createdAt:c({offset:!0}).nullish(),description:n().nullish(),forkCount:a(),githubId:o().int(),homepageUrl:n().nullish(),id:o().int(),isArchived:i(),isFork:i(),language:n().nullish(),license:n().nullish(),name:n(),ownerLogin:n(),repoCreatedAt:c({offset:!0}).nullish(),repoPushedAt:c({offset:!0}).nullish(),stargazerCount:a(),topic:l(n()),updatedAt:c({offset:!0}).nullish(),url:n()}),L=r({empty:i().optional(),sorted:i().optional(),unsorted:i().optional()}),R=r({offset:o().int().optional(),paged:i().optional(),pageNumber:a().optional(),pageSize:a().optional(),sort:L.optional(),unpaged:i().optional()}),Et=r({investorAttribution:l(re),person:_,round:l(be),roundCount:a()}),Dt=s([`by`,`about`]),Ot=s([`newsArticle`,`blogPost`,`externalSocialPost`,`repositoryOwner`,`repository`,`webSite`,`webPage`,`researchPaper`]),kt=r({canonicalUrl:n().nullish(),contentId:n(),contentType:Ot,createdAt:c({offset:!0}).nullish(),publishedAt:c({offset:!0}).nullish(),relation:Dt.nullish(),sourceDomain:n().nullish(),sourceName:n().nullish(),summary:n().nullish(),title:n(),topic:n().nullish(),updatedAt:c({offset:!0}).nullish(),url:n().nullish(),year:a().nullish()});r({content:l(ae).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(e([d,ue])).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ie).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(b).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(_t).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(v).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ye).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(y).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(vt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(I).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(_e).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ne).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ce).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(he).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(pt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(yt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(bt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(m).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(wt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(Tt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(Se).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(oe).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(g).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(_).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(ge).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(Et).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(le).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()}),r({content:l(kt).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()});var At=r({content:l(I),number:a(),size:a(),totalElements:o().int(),totalPages:a()}),jt=r({content:l(oe),number:a(),size:a(),totalElements:o().int(),totalPages:a()}),Mt=r({content:l(g),number:a(),size:a(),totalElements:o().int(),totalPages:a()});r({content:l(pe).optional(),empty:i().optional(),first:i().optional(),last:i().optional(),number:a().optional(),numberOfElements:a().optional(),pageable:R.optional(),size:a().optional(),sort:L.optional(),totalElements:o().int().optional(),totalPages:a().optional()});var Nt=s([`entityRecord`,`researchSnippet`,`newsArticle`,`personRecord`,`fundraiseTransaction`,`webProfile`]),Pt=Object.assign(e([Nt,n()]),{enum:Nt.enum}),Ft=r({entityId:t(),source:Pt,sourceId:n()}),It=r({citation:l(Ft),text:n(),topic:n().nullish()}),Lt=r({citation:l(Ft),confidence:O,description:n().nullish(),heading:n().nullish(),paragraph:l(It),relatedQuery:l(n()),shareable:i(),text:n(),title:n().nullish()}),Rt=r({enrichmentRunId:t().nullish(),entityId:t()}),zt=r({sortPriority:s([`NONE`,`ANY_LOGO_FIRST`,`REAL_LOGO_FIRST`]).optional()}),Bt=r({max:c({offset:!0}).nullish(),min:c({offset:!0}).nullish()}),z=r({max:o().nullish(),min:o().nullish()}),B=r({max:a().nullish(),min:a().nullish()}),Vt=r({averageAmountInvestedUsdRange:l(z).optional(),largestAmountInvestedUsdRange:l(z).optional(),smallestAmountInvestedUsdRange:l(z).optional(),totalAmountInvestedUsdRange:l(z).optional(),totalInvestmentRange:l(B).optional()}),Ht=s([`any`,`every`]),Ut=r({amountInvestedRange:l(z).optional(),amountRaisedRange:l(z).optional(),dateAnnouncedRange:Bt.nullish(),investedAmountRaisedRange:l(z).optional(),investedCompanyName:l(n()).optional(),investedCountry:l(n()).optional(),investedIndustry:l(n()).optional(),investedRound:l(n()).optional(),investorActivity:Vt.optional(),investorName:l(n()).optional(),investorNameMatch:Ht.nullish(),lastRoundYearRange:l(B).optional(),rankByInvestmentActivity:i().nullish(),round:l(n()).optional(),totalRaisedRange:l(z).optional(),valuationRange:l(z).optional()}),Wt=s([`NONE`,`COMPANY_LISTING_READY`]),Gt=s([`Operating`,`Acquired`,`Acquired Subsidiary`,`Closed`,`Closed (Acquihire)`,`Inactive`]),Kt=s([`hostPath`,`domain`]),qt=u({acceleratorBrand:l(n()).optional(),acceleratorCohort:l(n()).optional(),acceleratorName:l(n()).optional(),acceleratorStatus:l(n()).optional(),affinity:l(n()).optional(),closedLast:i().optional(),employeeCountRange:l(B).optional(),entityId:l(t()).optional(),entityName:l(n()).optional(),featured:i().nullish(),fundraiseActivity:Ut.optional(),hasFundraising:i().nullish(),headquartersCity:l(n()).optional(),headquartersCountry:l(n()).optional(),headquartersState:l(n()).optional(),industry:l(n()).optional(),letter:n().nullish(),location:l(n()).optional(),logoOption:zt.optional(),mainProduct:l(n()).optional(),noteworthyOnly:i().optional(),operatingStatus:l(Gt).optional(),originCountry:l(n()).optional(),person:l(n()).optional(),portfolioHeadquartersCity:l(n()).optional(),portfolioHeadquartersCountry:l(n()).optional(),portfolioHeadquartersState:l(n()).optional(),qualityGate:Wt.optional(),rankByProminence:i().nullish(),semanticQuery:n().nullish(),slug:l(n().regex(/^[a-z0-9_-]+$/).max(255)).optional(),stage:l(n()).optional(),suppressLateStage:i().nullish(),suppressNonOperating:i().nullish(),suppressZeroTotalRaised:i().nullish(),tag:l(n()).optional(),textSearch:n().nullish(),typeCustomer:l(n()).optional(),typeModel:l(n()).optional(),typeOwnership:l(n()).optional(),typeRecord:l(x).optional(),typeRevenue:l(n()).optional(),typeTechnologyUsed:l(n()).optional(),url:n().nullish(),urlDomain:n().nullish(),urlMatchMode:Kt.nullish(),urlType:p.nullish(),yearFoundedRange:l(B).optional()}),Jt=u({acceleratorBrand:l(n()).optional(),acceleratorCohort:l(n()).optional(),acceleratorName:l(n()).optional(),acceleratorStatus:l(n()).optional(),affinity:l(n()).optional(),closedLast:i().optional(),employeeCountRange:l(B).optional(),entityId:l(t()).optional(),entityName:l(n()).optional(),featured:i().nullish(),fundraiseActivity:Ut.optional(),hasFundraising:i().nullish(),headquartersCity:l(n()).optional(),headquartersCountry:l(n()).optional(),headquartersState:l(n()).optional(),industry:l(n()).optional(),letter:n().nullish(),location:l(n()).optional(),logoOption:zt.optional(),mainProduct:l(n()).optional(),noteworthyOnly:i().optional(),operatingStatus:l(Gt).optional(),originCountry:l(n()).optional(),person:l(n()).optional(),portfolioHeadquartersCity:l(n()).optional(),portfolioHeadquartersCountry:l(n()).optional(),portfolioHeadquartersState:l(n()).optional(),qualityGate:Wt.optional(),rankByProminence:i().nullish(),slug:l(n().regex(/^[a-z0-9_-]+$/).max(255)).optional(),stage:l(n()).optional(),suppressLateStage:i().nullish(),suppressNonOperating:i().nullish(),suppressZeroTotalRaised:i().nullish(),tag:l(n()).optional(),textSearch:n().nullish(),typeCustomer:l(n()).optional(),typeModel:l(n()).optional(),typeOwnership:l(n()).optional(),typeRecord:l(x).optional(),typeRevenue:l(n()).optional(),typeTechnologyUsed:l(n()).optional(),url:n().nullish(),urlDomain:n().nullish(),urlMatchMode:Kt.nullish(),urlType:p.nullish(),yearFoundedRange:l(B).optional()}),Yt=r({entityFilter:Jt.nullish(),isCurrent:i().nullish(),personTitle:l(n()).optional()}),Xt=r({amountInvestedRange:l(z).nullish(),amountRaisedRange:l(z).nullish(),entityName:l(n()).nullish(),investedCompany:l(n()).nullish(),personTitle:l(n()).nullish(),round:l(n()).nullish(),totalInvestmentCount:l(B).nullish(),typeRecord:l(x).nullish()}),Zt=r({additionalAssociation:Yt.nullish(),arrayFilter:Xt.optional(),entityFilter:Jt.optional(),entityId:t().nullish(),entitySlug:n().nullish(),firstName:n().nullish(),includeAddress:i().nullish(),includeUrl:i().nullish(),investorActivity:Vt.optional(),isCurrent:i().nullish(),lastName:n().nullish(),letter:n().nullish(),personId:l(t()).max(200).optional(),personName:l(n()).optional(),rankByEmployer:i().nullish(),role:n().nullish(),search:n().nullish(),semanticQuery:n().nullish(),status:n().nullish()}),Qt=s([`discovery`,`profile`,`peer`,`comparison`]),$t=s([`keyword`,`semantic`]),en=s([`ID`,`NAME_BRAND`,`YEAR_FOUNDED`,`STATUS_OPERATING`,`UPDATED_AT`,`CREATED_AT`,`NEXT_DUE_AT`,`DATA_COMPLETION_COVERAGE`,`TOTAL_RAISED`,`AMOUNT_INVESTED`,`RECENT_INVESTMENT_AT`,`STAGE`,`MOST_RECENT_AMOUNT`,`LATEST_VALUATION`,`MOST_RECENT_DATE`,`NOTABLE_ACTIVITY_AT`,`ACCELERATOR_BRAND`,`ACCELERATOR_COHORT`,`HEADQUARTERS_COUNTRY`,`EMPLOYEE_COUNT`]),tn=Object.assign(e([en,n()]),{enum:en.enum}),nn=r({descending:i(),field:tn,sortKey:n().nullish()}),rn=r({order:l(nn),relevance:$t.nullish()}),an=r({confidence:O,execution:F,fallbackUsed:i(),filter:qt,intent:Qt,interpretation:n(),personAssociation:Zt.nullish(),sort:rn,subjectEntityName:l(n()),unsupported:n().nullish()}),V=r({changedAt:c({offset:!0}).nullish(),dataSourceUpdatedAt:c({offset:!0}).nullish(),pendingApproval:a().nullish(),sourceId:n().nullish(),status:n().nullish()}),on=r({fundManagerRelationshipSource:V.nullish(),fundraiseTransaction:y,fundraiseTransactionSource:V.nullish(),investorJoinSource:V.nullish()}),sn=r({evidence:on,investor:xe,semanticMatch:me.nullish()}),cn=r({entityId:t(),matchedOffering:b.nullish(),probability:o(),webUrl:l(n())}),ln=r({entityId:t(),label:n(),publishedAt:c({offset:!0}).nullish(),score:o(),source:Pt,sourceId:n(),text:n(),url:n().nullish()}),un=r({answer:Lt.nullish(),filing:l(Rt).nullish(),interpretation:an,investment:l(sn),judgment:l(cn),passage:l(ln),peer:l(pt),pendingWebQuery:l(n()),personLead:i(),result:At,searchRequestId:t().nullish(),subject:l(I)}),dn=s([`auto-match`,`needs-review`,`approved`,`rejected`]),fn=r({createdAt:c({offset:!0}),entityId:t(),href:n().nullish(),internal:i(),matchStatus:dn.nullish(),mention:n().nullish(),slug:n().regex(/^[a-z0-9_-]+$/).max(255).nullish(),typeRecord:x.nullish(),updatedAt:c({offset:!0})}),pn=r({entity:l(fn),newsId:a()}),mn=r({descending:i(),field:s([`ID`,`FIRST_NAME`,`LAST_NAME`,`FULL_NAME`,`SLUG`,`CREATED_AT`,`UPDATED_AT`,`STATUS`,`GENDER`,`AMOUNT_INVESTED`,`TOTAL_INVESTMENTS`]),sortKey:n().nullish()}),hn=r({order:l(mn),relevance:$t.nullish()}),gn=r({confidence:O,employerSemanticQuery:n().nullish(),execution:F,fallbackUsed:i(),filter:Zt,interpretation:n(),sort:hn,unsupported:n().nullish()}),_n=r({currentCompany:n().nullish(),headline:n().nullish(),id:t(),location:n().nullish(),name:n(),named:n(),organizationEvidence:s([`headline`,`profile`,`none`]).nullish(),photoUrl:n().nullish(),profileUrl:n(),slug:n().regex(/^[a-z0-9_-]+$/).max(255)}),vn=r({interpretation:gn,investment:l(sn),personLead:i(),profile:l(_n),result:Mt,searchRequestId:t().nullish()}),yn=r({label:n(),query:n()}),bn=r({key:n(),option:l(yn),prompt:n()}),xn=r({entity:un,entityDetail:l(v),news:jt,newsEntityMention:l(pn),person:vn,personDetail:l(_),personLead:i(),provenance:lt,qualifier:bn.nullish(),section:l(s([`person`,`company`,`productService`,`investor`])).optional()}),H=30,Sn=8,U=10,Cn=2,wn=[`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`],Tn=new Set([`page`,`size`,`sort`,`cursor`,`mode`,`projection`]);function En(e,t,n,{transport:r=`cli`,trailer:i=[]}={}){if(typeof t==`string`)return Me(t,r,i);let a=Fe(t,i);if(a!==null)return Ne(a,i,r);let o=G(t);if(o===null)return null;let s=e.find(({operationId:e})=>e===o.operationId),c=Oe(s?.detailField,o.response),l=[...c.hiddenNote,...i],u=(e,t)=>je([e.trimEnd(),...t].join(`
|
|
3
|
-
`),{appendNewline:!0,preservedTrailerLines:t.length>0?t.length:void 0,transport:r}),d=s?.parameters??[],f={...o,response:c.response,parameters:d,transport:r},p=We(f.response,e,r)??Ke(f.response,e,r);if(p!==null)return u(p.join(`
|
|
4
|
-
`),i);let m=Dn(f);if(m!==null)return u(m.join(`
|
|
5
|
-
`),l);let h=[f.summary??n??f.operationId??`OpenAPI call succeeded`,`${f.method} ${f.endpoint}`],ee=Ae(jn(f),117-l.length,Pe-Ve.byteLength(`${[...h,...l].join(`
|
|
6
|
-
`)}\n`,`utf8`),r);return u([...h,...ee].filter(Boolean).join(`
|
|
7
|
-
`),l)}function Dn({response:e,...t}){if(e===void 0||!Q(e)||!(`entity`in e&&`person`in e&&`news`in e))return null;let n=xn.safeParse(e);if(!n.success)return null;let{entity:r,person:i,news:a,provenance:o}=n.data;return[...r.answer?On(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})=>S(`${e} rejected: ${t}`)),[`entities:`,...W(r.result,t)].join(`
|
|
8
|
-
`),[`people:`,...W(i.result,t)].join(`
|
|
9
|
-
`),[`news:`,...W(a,t)].join(`
|
|
10
|
-
`)]}function On(e){let t=`relatedQuery:\n${e.relatedQuery.map(e=>` - ${S(e)}`).join(`
|
|
11
|
-
`)}`,n=`citations:\n${e.citation.map(({source:e,sourceId:t,entityId:n})=>S(` - ${e}:${t} entity=${n}`)).join(`
|
|
12
|
-
`)}`;return[`answer:\n ${De(e.text).replaceAll(`
|
|
13
|
-
`,`
|
|
14
|
-
`)}`,...e.relatedQuery.length===0?[]:[t],...e.citation.length===0?[]:[n]]}function kn(e){let t=G(e)?.response,n=Q(t)?t.interpretation:void 0;if(!Q(n))return null;let r=F.safeParse(n.execution);if(!r.success)return null;let{modeRequested:i,modeUsed:a}=r.data,o=ke(n.filter),{unsupported:s,fallbackUsed:c}=n,l=[`strategy: requested=${i} used=${a}`,...Q(o)?[`constraints:`,...Object.entries(o).flatMap(([e,t])=>t===void 0?[]:[` ${e}: ${An(t)}`])]:[],typeof s==`string`&&s.trim().length>0?`unsupported: ${s}`:``,c===!0?`fallback: semantic search over the original query`:``];return je(l.filter(Boolean).join(`
|
|
15
|
-
`),{appendNewline:!0})}var An=e=>$(e)?S(e):Array.isArray(e)&&e.every($)?e.map(e=>S(e)).join(`, `):JSON.stringify(e);function jn(e){let{response:t,method:n,nextCursor:r,httpStatus:i,location:a,transport:o}=e;if(t===void 0)return a!==void 0&&i!==void 0?[`status=${i} redirect=${a}`]:i===void 0?[]:[`status=${i} no response body`];let s=i===void 0||n===`GET`?``:`status=${i}`,c=Q(t)&&!X(t)?Ln(t):null,l=c===null?void 0:Q(c.context.interpretation)?ke(c.context):c.context,u=l!==void 0&&Q(l)?Object.entries(l):[],d=u.filter(e=>Array.isArray(e[1])&&e[1].length>0&&e[1].every(Q)),f=new Set(d.map(([e])=>e)),p=Object.fromEntries(u.filter(([e])=>!f.has(e)));return[s,...X(t)?W(t,e,r):c===null?zn(t)?Pn(t,[`filter`],t.meta,o):Bn(t)?Pn(t,[`arrayFilterEntry`,`rangeFilterEntry`],t.filtersMeta,o):Vn(t)?Fn(t,o):K(t,``):[...W(c.page,e,r),...Object.keys(p).length===0?[]:K(p,``),...d.flatMap(([e,t])=>[`${e}:`].concat(Mn(t,o)))]].filter(Boolean)}function W(e,t,n){let r=In(t),i=e.numberOfElements??e.content.length,a=Math.min(e.content.length,H),o=Math.max(1,a),s=(e.number??0)*(e.size??i),c=(e.totalElements??0)-s-i,l=e.number===void 0?``:` page=${e.number}`,u=e.size===void 0?``:` size=${e.size}`,d=e.totalElements===void 0?``:` total=${e.totalElements}`,f=e.totalPages===void 0?``:` totalPages=${e.totalPages}`,p=(e.number??0)+1,m=e.totalPages===void 0||p<e.totalPages,h=C(`page`,t.parameters);return[`rows=${i}${l}${u}${d}${f}`,a>=i?``:`page rows omitted: ${i-a} (${a}/${i} shown); ${e.content.length>a?E(t.transport,`.content`):`reread with ${C(`size`,t.parameters)} ${o} and ${h} ${Math.floor((s+a)/o)} through ${Math.floor((s+i-1)/o)} (MCP: size, page); pages start at 0`}`,r.length>0?`filters: ${r.join(` `)}`:``,n===void 0?``:`next: --cursor ${T(n)}`,c<=0||n!==void 0?``:m&&i===e.size?`more: ${c} rows not shown; use ${h} or ${C(`size`,t.parameters)} to see them`:`more: ${c} more matched but this response returns only these ${i}; narrow the query to reach them${m?` (${h} ${p} starts after this page)`:``}`,...Mn(e.content.slice(0,a),t.transport)].filter(Boolean)}function Mn(e,t){if(!e.every(Q))return q(e,``);let n=e.filter(Q);if(n.length===0)return e.length===0?[`(empty)`]:q(e,``);let r=Nn(n);if(r.length===0)return q(e,``);let i=n.slice(0,H).map(e=>{let t=J(e);return r.map(e=>t[e]??``)}),a=r.map(e=>e.split(`.`).at(-1)??e),o=a.map((e,t)=>{let n=i.map(e=>e[t]??``),r=Math.max(e.length,...n.map(e=>e.length));return e===`id`||e.endsWith(`Id`)?r:Math.min(32,r)}),s=e=>e.map((e,t)=>Ee(e,o[t]??12).padEnd(o[t]??12)).join(` `),c=[s(a),s(o.map(e=>`-`.repeat(e)))];return i.forEach(e=>c.push(s(e))),n.length>H&&c.push(`... ${n.length-H} more rows omitted; ${E(t)}`),c}function Nn(e){let t=e.map(e=>J(e)),n=new Set(t.flatMap(e=>Object.keys(e))),r=wn.filter(e=>n.has(e)),i=new Set(r.map(Y)),a=[...n].filter(e=>{let n=t.every(t=>/^-?\d+(?:\.\d+)?$/u.test(t[e]??`0`));return!e.includes(`.`)||/id$/iu.test(e)||i.has(Y(e))?!1:(n&&i.add(Y(e)),n)}),o=[...n].filter(e=>/(?:^|\.)id$/u.test(e)).slice(0,1),s=[...new Set([...r,...o,...a])],c=[...n].filter(e=>!s.includes(e)).filter(e=>!e.toLowerCase().includes(`logo`)).slice(0,Sn-s.length);return[...s,...c].slice(0,Sn)}function Pn(e,t,n,r){let i=t.flatMap(t=>e[t].map((e,n)=>({...e,path:`.${t}[${n}].choiceOption`}))),a=n!==void 0&&Q(n)?n:{},o=[`total`,`limit`].flatMap(e=>typeof a[e]==`number`?[` ${e}=${a[e]}`]:[]).join(``),s=[`filters=${i.length}${o}`];for(let e of i){let t=e.choiceOption.length,n=e.choiceOptionTotal===null?`unknown (degraded)`:e.choiceOptionTotal??t,i=e.choiceOptionTruncated===!0?` truncated`:``;s.push(`- ${e.filterKey} (${e.label}): choices ${t}/${n}${i}`),e.choiceOption.slice(0,U).forEach(t=>{s.push(` ${C(e.filterKey)} ${T(t.value)}`)}),t>U&&s.push(` ... ${t-U} choices omitted for ${e.filterKey}; ${E(r,e.path)}`)}return s}function Fn(e,t){let n=C(e.filterKey);return[`${e.filterKey}: ${e.result.length} matches`,...e.result.slice(0,U).map(e=>`${n} ${T(e)}`),e.result.length>U?`... ${e.result.length-U} matches omitted; ${E(t,`.result`)}`:``].filter(Boolean)}function In({endpoint:e,parameters:t}){let n=e.indexOf(`?`);return n<0?[]:[...new URLSearchParams(e.slice(n+1)).entries()].filter(([e,t])=>!Tn.has(e)&&t.length>0).map(([e,n])=>`${C(e,t)} ${T(n)}`)}function G(e){if(typeof e!=`object`||!e||Array.isArray(e))return null;let t=t=>{let n=Reflect.get(e,t);return typeof n==`string`?n:void 0},[n,r,i]=[t(`method`),t(`endpoint`),t(`nextCursor`)];if(n===void 0||r===void 0)return null;let a=Reflect.get(e,`httpStatus`),o=Reflect.get(e,`response`),s=o===void 0?void 0:Ce.safeParse(o);return s!==void 0&&!s.success?null:{method:n,endpoint:r,httpStatus:typeof a==`number`?a:void 0,location:t(`location`),operationId:t(`operationId`),summary:t(`summary`),nextCursor:i===``?void 0:i,response:s?.data}}function K(e,t,n){if(e===void 0)return[];if($(e))return[`${t}${w(e,n)}`];if(Array.isArray(e))return q(e,t,n);let r=[];for(let[n,i]of Object.entries(e))if(i!==void 0){if($(i))r.push(`${t}${n}: ${w(i,n)}`);else{r.push(`${t}${n}:`);for(let e of K(i,`${t} `,n))r.push(e)}}return r.length===0?[`${t}(empty)`]:r}function q(e,t,n){if(e.length===0)return[`${t}(empty)`];let r=[];for(let i of e)if($(i))r.push(`${t}- ${w(i,n)}`);else{r.push(`${t}-`);for(let e of K(i,`${t} `))r.push(e)}return r}function J(e,t=``,n=0){return $(e)?t.length===0?{}:{[t]:S(e,t)}:n>Cn?{}:Array.isArray(e)?e[0]===void 0?{}:J(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 $(r)?[[i,S(r,i)]]:Object.entries(J(r,i,n+1))}))}var Y=e=>e.split(`.`,1)[0],X=e=>Q(e)&&Array.isArray(e.content);function Ln(e){let[t,...n]=Object.entries(e).filter(e=>X(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 Rn(e){return Q(e)&&typeof e.label==`string`&&typeof e.filterKey==`string`&&Array.isArray(e.choiceOption)}var zn=e=>Q(e)&&Z(e.filter),Bn=e=>Q(e)&&Z(e.arrayFilterEntry)&&Z(e.rangeFilterEntry),Z=e=>Array.isArray(e)&&e.every(Rn),Vn=e=>Q(e)&&typeof e.filterKey==`string`&&Array.isArray(e.result)&&e.result.every(e=>typeof e==`string`),Q=e=>typeof e==`object`&&!!e&&!Array.isArray(e),$=e=>typeof e!=`object`||!e;export{Qe as i,kn as n,et as r,En as t};
|