@aventurevc/aventure-cli 0.8.170 → 0.8.172

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.
Files changed (36) hide show
  1. package/dist/aventure-cli/index.js +1 -1
  2. package/dist/aventure-cli/unified-operations.json +1 -1
  3. package/dist/chunks/{api-key-bearer-credential-wwFYd_zb.js → api-key-bearer-credential-B_SbuDYs.js} +1 -1
  4. package/dist/chunks/api-key-bearer-credential-bTucZ3Ae.js +1 -0
  5. package/dist/chunks/{aventure-cli-C26rpE7U.js → aventure-cli-DcocbesX.js} +2 -2
  6. package/dist/chunks/{cli-help-policy-y1IkbgFJ.js → cli-help-policy-BhGojY3n.js} +1 -1
  7. package/dist/chunks/{contract-ZEC12pfD.js → contract-DDnRMA5x.js} +1 -1
  8. package/dist/chunks/{dist-M0uo-DFP.js → dist-qDRV1SWL.js} +2 -2
  9. package/dist/chunks/{env-B6CxaFe-.js → env-CINNa4yR.js} +1 -1
  10. package/dist/chunks/{logging-B0Gr5-1z.js → logging-C_h_KHM4.js} +1 -1
  11. package/dist/chunks/logging-DOK09bmK.js +1 -0
  12. package/dist/chunks/{oauth-bearer-credential-Cl-uxBct.js → oauth-bearer-credential-BFUl3_Ug.js} +2 -2
  13. package/dist/chunks/oauth-bearer-credential-BpL4kmNW.js +1 -0
  14. package/dist/chunks/{oauth-login-K5lDgqm3.js → oauth-login-70eTU7wt.js} +1 -1
  15. package/dist/chunks/oauth-login-BgymTtqY.js +1 -0
  16. package/dist/chunks/openapi-commands-1MuBOSgO.js +1 -0
  17. package/dist/chunks/{openapi-commands-BMGU9vje.js → openapi-commands-DTwHrPHN.js} +1 -1
  18. package/dist/chunks/output-mode-CdChcmDS.js +1 -0
  19. package/dist/chunks/{output-mode-C42LS-nQ.js → output-mode-DrUdZHvA.js} +1 -1
  20. package/dist/chunks/{output-spill-CQok7v4g.js → output-spill-Clkz9LHc.js} +1 -1
  21. package/dist/chunks/provider-catalog-Cc_es2z2.js +1 -0
  22. package/dist/chunks/{response-problem-DfhjTDsa.js → response-problem-BTrKbKkA.js} +1 -1
  23. package/dist/chunks/result-envelope-DdrACXij.js +1 -0
  24. package/dist/chunks/{startup-auth-CdgLvpph.js → startup-auth-D0KOGMoL.js} +1 -1
  25. package/dist/chunks/startup-auth-rmaf1e8H.js +1 -0
  26. package/dist/chunks/{tool-policy-YkjzNjYx.js → tool-policy-BGaRVdFA.js} +1 -1
  27. package/package.json +3 -3
  28. package/dist/chunks/api-key-bearer-credential-B1Gm6S3P.js +0 -1
  29. package/dist/chunks/logging-nxqqSOKb.js +0 -1
  30. package/dist/chunks/oauth-bearer-credential-Cs8GUM-h.js +0 -1
  31. package/dist/chunks/oauth-login-CjJia0a-.js +0 -1
  32. package/dist/chunks/openapi-commands-b9333FzR.js +0 -1
  33. package/dist/chunks/output-mode-C6-FVyfz.js +0 -1
  34. package/dist/chunks/provider-catalog-DjYhSrTa.js +0 -1
  35. package/dist/chunks/result-envelope-CkpirK9Q.js +0 -1
  36. package/dist/chunks/startup-auth-CxgWeB38.js +0 -1
@@ -0,0 +1 @@
1
+ import{n as e}from"./output-mode-DrUdZHvA.js";export{e as cliMachineOutputSelected};
@@ -1 +1 @@
1
- import{n as e}from"./commander-BB7CDPLs.js";import{t}from"./result-envelope-CkpirK9Q.js";import{t as n}from"./output-spill-CQok7v4g.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 response to <path>; over ${r} the printed envelope carries a receipt instead.`,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`});function o(t){let n=i.map(t=>({spec:t,option:new e(t.flags)}));for(let{spec:e,option:r}of n){let i=n.filter(({option:t})=>e.conflicts.some(e=>e===t.attributeName())).flatMap(({option:e})=>e.long??[]);r.description=i.length===0?e.description:`${e.description} Cannot combine with ${a.format(i)}.`,t.addOption(r.conflicts([...e.conflicts]))}return t}function s(e,t=`auto`){return d(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`:u(e)||t===`auto`&&!process.stdout.isTTY?`data`:`text`}function c(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 l(e){return e===`data`||e===`data-full`||e===`json`}function u(e){return d(e.agentChassis)&&d(e.agentModel)}function d(e){return typeof e==`string`&&e.trim().length>0}export{s as i,c as n,l as r,o as t};
1
+ import{n as e}from"./commander-BB7CDPLs.js";import{t}from"./result-envelope-DdrACXij.js";import{t as n}from"./output-spill-Clkz9LHc.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 response to <path>; over ${r} the printed envelope carries a receipt instead.`,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`});function o(t){let n=i.map(t=>({spec:t,option:new e(t.flags)}));for(let{spec:e,option:r}of n){let i=n.filter(({option:t})=>e.conflicts.some(e=>e===t.attributeName())).flatMap(({option:e})=>e.long??[]);r.description=i.length===0?e.description:`${e.description} Cannot combine with ${a.format(i)}.`,t.addOption(r.conflicts([...e.conflicts]))}return t}function s(e,t=`auto`){return d(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`:u(e)||t===`auto`&&!process.stdout.isTTY?`data`:`text`}function c(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 l(e){return e===`data`||e===`data-full`||e===`json`}function u(e){return d(e.agentChassis)&&d(e.agentModel)}function d(e){return typeof e==`string`&&e.trim().length>0}export{s as i,c as n,l as r,o as t};
@@ -1 +1 @@
1
- import{i as e}from"./result-envelope-CkpirK9Q.js";import{writeFileSync as t}from"node:fs";import{Buffer as n}from"node:buffer";var r;function i(e){r=e}function a(i){let a=r;if(a===void 0)return i;r=void 0;let s=i.data,c=i.ok?s instanceof Uint8Array?s:typeof s==`string`?n.from(s,`utf8`):o(s):o(i);try{t(a,c)}catch(t){return e(`could not spill output to '${a}'`,[String(t)])}return!i.ok||c.byteLength<=5e4?i:typeof s!=`object`||!s||s instanceof Uint8Array?{...i,data:`spilled ${c.byteLength} bytes to '${a}'`}:{...i,data:{...s,response:{spilledTo:a,byteLength:c.byteLength}}}}function o(e){return n.from(JSON.stringify(e,null,2),`utf8`)}export{a as n,i as t};
1
+ import{i as e}from"./result-envelope-DdrACXij.js";import{writeFileSync as t}from"node:fs";import{Buffer as n}from"node:buffer";var r;function i(e){r=e}function a(i){let a=r;if(a===void 0)return i;r=void 0;let s=i.data,c=i.ok?s instanceof Uint8Array?s:typeof s==`string`?n.from(s,`utf8`):o(s):o(i);try{t(a,c)}catch(t){return e(`could not spill output to '${a}'`,[String(t)])}return!i.ok||c.byteLength<=5e4?i:typeof s!=`object`||!s||s instanceof Uint8Array?{...i,data:`spilled ${c.byteLength} bytes to '${a}'`}:{...i,data:{...s,response:{spilledTo:a,byteLength:c.byteLength}}}}function o(e){return n.from(JSON.stringify(e,null,2),`utf8`)}export{a as n,i as t};
@@ -0,0 +1 @@
1
+ import{w as e,y as t}from"./person-owner-BJgNYLKX.js";import{zr as n}from"./dist-qDRV1SWL.js";var r=t({clerkPublishableKey:e().nullish(),oauthClient:n.nullish()});export{r as t};
@@ -1 +1 @@
1
- import{S as e,w as t}from"./person-owner-BJgNYLKX.js";import{d as n,u as r}from"./result-envelope-CkpirK9Q.js";var i=/(?:authorization|api-key|secret|token)/iu,a=/^x-cli-[a-z0-9-]*secret$/iu;function o(r,i,a={}){let o=d(a);o.length>0&&(i=s(i,o));let l=e(t(),n).safeParse(i);if(!l.success)return{status:r,title:`HTTP ${r}`,type:`about:blank`,code:void 0,detail:typeof i==`string`?i:void 0};let u=c(l.data),f=typeof u.status==`number`?u.status:r;return{...u,status:f,title:typeof u.title==`string`?u.title:`HTTP ${f}`,type:typeof u.type==`string`?u.type:`about:blank`,detail:typeof u.detail==`string`?u.detail:void 0}}function s(e,t){return typeof e==`string`?f(e,t):typeof e!=`object`||!e?e:Array.isArray(e)?e.map(e=>s(e,t)):Object.fromEntries(Object.entries(e).map(([e,n])=>[f(e,t),s(n,t)]))}function c(e){let t=r.safeParse(e);if(t.success)return e;let n=new Set(t.error.issues.map(e=>String(e.path[0])));return Object.fromEntries(Object.entries(e).filter(([e])=>!n.has(e)))}function l(e,t){if(u(t))return{status:e.status,title:`CLI authorization broker request failed`};let n=d(t),r={};for(let[t,i]of Object.entries(e))i!=null&&(r[t]=typeof i==`object`?JSON.stringify(s(i,n)):typeof i==`string`?f(i,n):i);return r}function u(e){return Object.keys(e).some(e=>a.test(e))}function d(e){let t=[];for(let[n,r]of Object.entries(e)){if(!i.test(n))continue;let e=r.trim();if(e.length===0)continue;t.push(e);let a=e.indexOf(` `);if(a>0){let n=e.slice(a+1).trim();n.length>0&&t.push(n)}}return t}function f(e,t){let n=e;for(let e of t)e!=null&&e.length>0&&(n=n.replaceAll(e,`<redacted>`));return n}function p(e,t){if(u(t))return{status:e.status,title:`CLI authorization broker request failed`,type:`about:blank`,detail:`Broker diagnostic text was suppressed at the CLI credential boundary.`,...h(e)};let n=d(t);if(n.length===0)return e;let r=t=>{let r=e[t];return typeof r==`string`?{[t]:f(r,n)}:{}},i=t=>{let r=e[t];return r==null?{}:{[t]:Object.fromEntries(Object.entries(r).map(([e,t])=>[f(e,n),f(t,n)]))}},a=t=>{let r=e[t];return Array.isArray(r)?{[t]:r.map(e=>f(e,n))}:{}};return{status:e.status,title:f(e.title,n),type:f(e.type,n),...r(`detail`),...r(`hint`),...r(`field`),...r(`suggestion`),...r(`requiredRole`),...r(`existingRecordId`),...i(`suggestions`),...i(`error`),...a(`unknownParameters`),...a(`validParameters`),...e.details===void 0?{}:{details:e.details},...e.resolution===void 0?{}:{resolution:e.resolution},...e.code===void 0?{}:{code:e.code},...Array.isArray(e.proseViolation)?{proseViolation:e.proseViolation.map(e=>({...e,passage:f(e.passage,n),reason:f(e.reason,n)}))}:{},...r(`traceId`),...r(`spanId`),...e.limitType===void 0?{}:{limitType:e.limitType},...e.allowanceType===void 0?{}:{allowanceType:e.allowanceType},...e.limit===void 0?{}:{limit:e.limit},...e.used===void 0?{}:{used:e.used},...e.remaining===void 0?{}:{remaining:e.remaining},...e.resetAt===void 0?{}:{resetAt:e.resetAt},...e.windowSeconds===void 0?{}:{windowSeconds:e.windowSeconds},...e.filedRunId?{filedRunId:e.filedRunId}:{},...h(e)}}function m(e,t){if(_(e.retryAfterSeconds)!==void 0)return e;let n=g(t.get(`retry-after`));return n===void 0?e:{...e,retryAfterSeconds:n}}function h(e){let t=_(e.retryAfterSeconds);return t===void 0?{}:{retryAfterSeconds:t}}function g(e){let t=e?.trim()??``;if(/^\d+$/u.test(t))return _(Number(t));let n=/[a-z]/iu.test(t)?new Date(t).getTime():NaN;return Number.isNaN(n)?void 0:_(Math.ceil((n-Date.now())/1e3))}function _(e){return typeof e==`number`&&Number.isInteger(e)&&e>0?e:void 0}export{p as a,m as c,d as i,o as n,g as o,f as r,_ as s,l as t};
1
+ import{S as e,w as t}from"./person-owner-BJgNYLKX.js";import{d as n,u as r}from"./result-envelope-DdrACXij.js";var i=/(?:authorization|api-key|secret|token)/iu,a=/^x-cli-[a-z0-9-]*secret$/iu;function o(r,i,a={}){let o=d(a);o.length>0&&(i=s(i,o));let l=e(t(),n).safeParse(i);if(!l.success)return{status:r,title:`HTTP ${r}`,type:`about:blank`,code:void 0,detail:typeof i==`string`?i:void 0};let u=c(l.data),f=typeof u.status==`number`?u.status:r;return{...u,status:f,title:typeof u.title==`string`?u.title:`HTTP ${f}`,type:typeof u.type==`string`?u.type:`about:blank`,detail:typeof u.detail==`string`?u.detail:void 0}}function s(e,t){return typeof e==`string`?f(e,t):typeof e!=`object`||!e?e:Array.isArray(e)?e.map(e=>s(e,t)):Object.fromEntries(Object.entries(e).map(([e,n])=>[f(e,t),s(n,t)]))}function c(e){let t=r.safeParse(e);if(t.success)return e;let n=new Set(t.error.issues.map(e=>String(e.path[0])));return Object.fromEntries(Object.entries(e).filter(([e])=>!n.has(e)))}function l(e,t){if(u(t))return{status:e.status,title:`CLI authorization broker request failed`};let n=d(t),r={};for(let[t,i]of Object.entries(e))i!=null&&(r[t]=typeof i==`object`?JSON.stringify(s(i,n)):typeof i==`string`?f(i,n):i);return r}function u(e){return Object.keys(e).some(e=>a.test(e))}function d(e){let t=[];for(let[n,r]of Object.entries(e)){if(!i.test(n))continue;let e=r.trim();if(e.length===0)continue;t.push(e);let a=e.indexOf(` `);if(a>0){let n=e.slice(a+1).trim();n.length>0&&t.push(n)}}return t}function f(e,t){let n=e;for(let e of t)e!=null&&e.length>0&&(n=n.replaceAll(e,`<redacted>`));return n}function p(e,t){if(u(t))return{status:e.status,title:`CLI authorization broker request failed`,type:`about:blank`,detail:`Broker diagnostic text was suppressed at the CLI credential boundary.`,...h(e)};let n=d(t);if(n.length===0)return e;let r=t=>{let r=e[t];return typeof r==`string`?{[t]:f(r,n)}:{}},i=t=>{let r=e[t];return r==null?{}:{[t]:Object.fromEntries(Object.entries(r).map(([e,t])=>[f(e,n),f(t,n)]))}},a=t=>{let r=e[t];return Array.isArray(r)?{[t]:r.map(e=>f(e,n))}:{}};return{status:e.status,title:f(e.title,n),type:f(e.type,n),...r(`detail`),...r(`hint`),...r(`field`),...r(`suggestion`),...r(`requiredRole`),...r(`existingRecordId`),...i(`suggestions`),...i(`error`),...a(`unknownParameters`),...a(`validParameters`),...e.details===void 0?{}:{details:e.details},...e.resolution===void 0?{}:{resolution:e.resolution},...e.code===void 0?{}:{code:e.code},...Array.isArray(e.proseViolation)?{proseViolation:e.proseViolation.map(e=>({...e,passage:f(e.passage,n),reason:f(e.reason,n)}))}:{},...r(`traceId`),...r(`spanId`),...e.limitType===void 0?{}:{limitType:e.limitType},...e.allowanceType===void 0?{}:{allowanceType:e.allowanceType},...e.limit===void 0?{}:{limit:e.limit},...e.used===void 0?{}:{used:e.used},...e.remaining===void 0?{}:{remaining:e.remaining},...e.resetAt===void 0?{}:{resetAt:e.resetAt},...e.windowSeconds===void 0?{}:{windowSeconds:e.windowSeconds},...e.filedRunId?{filedRunId:e.filedRunId}:{},...h(e)}}function m(e,t){if(_(e.retryAfterSeconds)!==void 0)return e;let n=g(t.get(`retry-after`));return n===void 0?e:{...e,retryAfterSeconds:n}}function h(e){let t=_(e.retryAfterSeconds);return t===void 0?{}:{retryAfterSeconds:t}}function g(e){let t=e?.trim()??``;if(/^\d+$/u.test(t))return _(Number(t));let n=/[a-z]/iu.test(t)?new Date(t).getTime():NaN;return Number.isNaN(n)?void 0:_(Math.ceil((n-Date.now())/1e3))}function _(e){return typeof e==`number`&&Number.isInteger(e)&&e>0?e:void 0}export{p as a,m as c,d as i,o as n,g as o,f as r,_ as s,l as t};
@@ -0,0 +1 @@
1
+ import{E as e,O as t,S as n,T as r,h as i,i as a,l as o,n as s,o as c,p as l,s as u,t as d,u as f,v as p,w as m,y as h}from"./person-owner-BJgNYLKX.js";import{Buffer as g}from"node:buffer";var _=i(()=>r([m(),p(),f(),u(),o(_),n(m(),_)])),v=c([`REACTIVATE`,`ATTACH_INACTIVE`]),ee=h({availableOverrides:o(v),slug:m(),tagId:l()}),te=h({externalId:m().nullish(),id:l(),reason:o(m()),score:l(),slug:m().regex(/^[a-z0-9_-]+$/).max(255).nullish()}),ne=h({externalId:m().nullish(),id:t(),name:m().nullish(),operatingStatus:m().nullish(),publicPath:m().nullish(),reason:o(m()),score:l(),slug:m().regex(/^[a-z0-9_-]+$/).max(255).nullish(),typeRecord:s.nullish()}),re=h({candidate:o(ne).nullish(),newsCandidate:o(te).nullish(),overridePath:m().nullish(),threshold:l()}),ie=h({conflictingArticleId:l(),conflictingArticleSlug:m(),conflictingArticleTitle:m()}),ae=h({candidateEntityId:o(t()),candidatePersonId:o(t()),hint:m(),normalizedUrl:m().nullish(),url:m(),urlType:m().nullish()}),y=h({owner:d,urlId:l()}),b=h({existingJoin:o(y),fragmentIgnored:f(),guidance:m(),normalizedUrl:m().nullish(),requestedOwner:d,url:m(),urlType:m()}),oe=r([b,ae,re,ee,ie]),se=h({acceptedValue:o(m()).nullish(),action:c([`setField`,`setParameter`,`removeParameter`,`useEndpoint`,`reviewCandidates`,`authenticate`]),endpoint:m().nullish(),fieldPath:m().nullish(),parameter:m().nullish(),retryable:f().nullish()}),x=r([c([`source`,`record`,`disclaimer`,`voice`,`structured`,`temporal`,`factList`,`mojibake`,`unsupported`,`legalSource`,`textContract`]),m()]),S=h({overridable:f(),passage:m(),problem:x,reason:m()}),C=c([`entity`,`person`,`news`,`blog`,`content`]),w=h({deletedAt:a({offset:!0}).nullish(),id:m(),isHidden:f(),nameBrand:m().nullish(),resourceType:C,showOnSitemap:f(),slug:m()}),T=h({newUrl:m().nullish(),oldUrl:m(),targetCurrentSlug:m().nullish(),targetId:m().nullish(),targetResourceType:C.nullish()}),E=h({allowanceType:c([`COMPANY`,`PERSON`,`ENTITY_VIEW`,`ENTITY_BRAND`,`PERSON_VIEW`,`WEB_SEARCH`]).nullish(),circuitBreaker:m().nullish(),code:r([c(`not_authorized.rateLimited.rate_limited.subscription_required.subscription_canceled.subscription_past_due.subscription_paused.billing_allowance_exhausted.billing_additional_usage_cap_reached.billing_credit_checkout_closed.account_exists.origin_detail_capacity.origin_detail_shutdown.suspectedShellStrip.suspected_shell_strip.prose_rejected.url_surface_misclassification.JOBRUNR_DISABLED.jobrunr_disabled.task_plan_operation_unserved.JOBRUNR_STORAGE_UNAVAILABLE.jobrunr_storage_unavailable.rbac_lookup_unavailable.GEOCODE_PROVIDER_ERROR.geocode_provider_error.sentry_api_error.frontend_cache_epoch_mode_not_targeted.image_blocklist_match.image_monochrome.image_too_small.image_wrong_aspect.image_monogram.image_unreadable.image_processing_error.image_brand_mismatch.image_photographic.web_crawl_fetch_failed.source_document_fetch_busy.primary_website_missing.news_rss_feed_fetch_failed.news_rss_article_fetch_failed.callback_connection_refused.callback_timeout.callback_tls_error.callback_http_4xx.callback_http_5xx.callback_challenge_failed.news_subscription_limit.r2_fetch_failed.r2_delete_failed.r2_upload_failed.source_document_body_unavailable.source_document_capture_limit_exceeded.news_similarity_embedding_unavailable.search_provider_not_configured.search_provider_error.search_still_running.lookup_still_running.sec_edgar_fetch_failed.github_fetch_failed.INFERENCE_PROVIDER_ERROR.inference_provider_error.INFERENCE_PROVIDER_RESPONSE_EMPTY.inference_provider_response_empty.INFERENCE_PROVIDER_INVALID_JSON.inference_provider_invalid_json.INFERENCE_PROFILES_MISSING.inference_profiles_missing.INFERENCE_PROFILE_API_KEY_MISSING.inference_profile_api_key_missing`.split(`.`)),m().max(128)]).nullish(),conflictingRecord:w.nullish(),detail:m().optional(),details:oe.nullish(),error:n(m(),m()).nullish(),existingRecordId:m().nullish(),existingRedirect:T.nullish(),feId:m().nullish(),field:m().nullish(),filedRunId:o(t()).nullish(),hammingDistance:p().int().nullish(),hint:m().nullish(),instance:m().optional(),limit:p().int().nullish(),limitType:c([`FORM`,`GLOBAL`,`SUBNET`,`IP`,`UNKNOWN`,`RESILIENCE4J`,`WEB_SEARCH`,`AGENT_HELP`,`NATURAL_SEARCH`,`BILLING_ALLOWANCE`,`BILLING_ADDITIONAL_USAGE`,`CLERK_PUBLIC_ADMISSION`,`CLERK_SCRIPT_LOAD`,`ORIGIN_DETAIL`,`INFERENCE_PROVIDER`]).nullish(),matchedBlocklistKey:m().nullish(),mediaType:m().nullish(),moderationReason:m().nullish(),parseError:m().nullish(),path:m().nullish(),properties:n(m(),_).optional(),proseViolation:o(S).nullish(),remaining:p().int().nullish(),requiredRole:m().nullish(),resetAt:a({offset:!0}).nullish(),resolution:se.nullish(),retryAfterSeconds:p().int().nullish(),spanId:m().nullish(),status:l().optional(),suggestion:m().nullish(),suggestions:n(m(),m()).nullish(),suspectedFragment:m().nullish(),title:m().optional(),traceId:m().nullish(),type:m().optional(),unknownParameters:o(m()).nullish(),used:p().int().nullish(),validParameters:o(m()).nullish(),value:m().nullish(),windowSeconds:p().int().nullish()}),ce=e=>e>=500&&e<600,D=r([m(),p(),f()]),le=h({number:p().optional(),size:p().optional(),numberOfElements:p().optional(),totalElements:p().optional(),totalPages:p().optional(),first:f().optional(),last:f().optional(),empty:f().optional()}),ue=h({byteLength:p(),maxBytes:p(),omitted:o(m()),recovery:m()}),O=h({status:p(),title:m(),type:m()}).catchall(_.optional()).and(E);h({ok:f(),summary:m(),httpStatus:p().optional(),operationId:m().optional(),method:m().optional(),endpoint:m().optional(),format:c([`json`,`text`]).optional(),count:p().optional(),page:le.optional(),filters:n(m(),r([D,o(D)])).optional(),truncated:f().optional(),truncation:ue.optional(),omitted:o(m()).default([]),ids:o(m()).default([]),counts:n(m(),p()).default({}),references:o(m()).default([]),warnings:o(m()).default([]),problem:O.optional(),data:e()});var k=5e4,A=[50,25,10,5,1],j=[...A.map(e=>({arrayLimit:e,rowLimit:1/0})),...A.map(e=>({arrayLimit:1,rowLimit:e}))],M=320,N=1e3,P=/^(?:bio|biography|body|content|description|evidence|fulltext|notes|snippet|summary|text)$/u,F=/(?:description|snippet|summary|text)$/u;function I(e){let t=Z(e)?e:null;if(t===null)return;let n={number:Q(t,`number`),size:Q(t,`size`),numberOfElements:Q(t,`numberOfElements`),totalElements:Q(t,`totalElements`),totalPages:Q(t,`totalPages`),first:$(t,`first`),last:$(t,`last`),empty:$(t,`empty`)};return Object.values(n).some(e=>e!==void 0)?n:void 0}function L(e,t){if(t?.numberOfElements!==void 0)return t.numberOfElements;if(Array.isArray(e))return e.length;let n=Z(e)?e.content:void 0;return Array.isArray(n)?n.length:void 0}function R(e,t,n={}){return{ok:!0,summary:e,...n,omitted:n.omitted??[],ids:n.ids??[],counts:n.counts??{},references:n.references??[],warnings:n.warnings??[],data:t}}function z(e,t=[],n={}){return{...R(e,null,{...n,warnings:t}),ok:!1}}function B(e,t={}){let n=g.byteLength(JSON.stringify(e),`utf8`);if(n<=5e4)return e;let r=e.httpStatus??0;if(t.write===!0&&e.ok&&r>=200&&r<300)return V(e,n,t.exactRecovery);let i=t.exactRecovery??`Refetch a narrower result: use ids/references, a more specific list read (e.g. entities relationships list, entities people list, or news list --owner-entity-id), filters, or smaller pages with page and size.`,a=e;for(let t of j){let r=de(e.data,n,t);if(a={...e,truncated:!0,truncation:J(n,r.omitted,i),warnings:[...e.warnings,`response truncated (>50KB); read the section through its sub-resource operation, or request a smaller page or narrower server-side filter`],data:r.value},W(a))return a}return H({...a,truncation:J(n,[`data`],i),data:Y(n)},n,i,`response truncated (>50KB); metadata named in truncation.omitted was removed; read the section through its sub-resource operation, or request a smaller page or narrower server-side filter`)}function V(e,t,n=`Read the full result through the GET operation on ${e.endpoint??`this route`}.`){let r={...e.counts},i=(e,n)=>{let a={};for(let[o,s]of Object.entries(Z(e)?e:{}))Array.isArray(s)?r[`${n}${o}`]=s.length:typeof s==`string`?a[o]=G(s,t,M):typeof s!=`object`||!s?a[o]=s:n===``&&o===`response`&&(a[o]=i(s,`response.`));return a},a={...e,summary:`${e.method} succeeded (HTTP ${e.httpStatus}); response body omitted (${t} bytes, over the 50KB cap); do not retry the write`,truncated:!0,truncation:J(t,[`data`],n),counts:r,data:i(e.data,``)},o=a,s=[`data`],c={};for(let r of[`references`,`ids`,`warnings`]){if(W(o))return o;s.push(r),c[r]=[],o={...a,...c,omitted:[...e.omitted,...s.slice(1)],truncation:J(t,s,n)}}return W(o)?o:H({...o,data:Y(t),warnings:[`response truncated (>50KB); do not retry the write`]},t,n,`response truncated (>50KB); metadata named in truncation.omitted was removed; do not retry the write`)}function H(e,t,n,r){if(W(e))return e;let i=e.warnings.slice(0,-1),a=[`data`],o=e;if(o.problem!==void 0){let e=U(o.problem);if(JSON.stringify(e).length<JSON.stringify(o.problem).length&&(a.push(`problem`),o={...o,problem:e,truncation:J(t,a,n)},W(o)))return o}let s=[];if(e.filters!==void 0&&s.push(`filters`),e.omitted.length>0&&s.push(`omitted`),e.ids.length>0&&s.push(`ids`),Object.keys(e.counts).length>0&&s.push(`counts`),e.references.length>0&&s.push(`references`),a.push(...s),o={...o,filters:void 0,truncation:J(t,a,n),omitted:[],ids:[],counts:{},references:[],warnings:s.length===0?e.warnings:[...i,r]},W(o))return o;let c=e=>e===void 0?void 0:G(e,t),l=G(o.summary,t),u=c(o.operationId),d=c(o.method),f=c(o.endpoint),p=o.warnings.map(e=>G(e,t)),m=o.problem===void 0?void 0:U(o.problem,t);if(l!==o.summary&&a.push(`summary`),u!==o.operationId&&a.push(`operationId`),d!==o.method&&a.push(`method`),f!==o.endpoint&&a.push(`endpoint`),p.some((e,t)=>e!==o.warnings[t])&&a.push(`warnings`),o.problem!==void 0&&m!==void 0&&JSON.stringify(m)!==JSON.stringify(o.problem)&&a.push(`problem`),o={...o,summary:l,operationId:u,method:d,endpoint:f,truncation:J(t,a,n),warnings:p,problem:m},W(o))return o;a.push(`warnings`),o.page!==void 0&&a.push(`page`);let h=G(o.summary,t,M);return h!==o.summary&&a.push(`summary`),{...o,summary:h,page:void 0,truncation:J(t,a,n),warnings:[r]}}function U(e,t){let n=e=>t===void 0?e:G(e,t);return{status:e.status,title:n(e.title),type:n(e.type),...e.detail===void 0?{}:{detail:n(e.detail)},...e.instance===void 0?{}:{instance:n(e.instance)},...e.code===void 0?{}:{code:typeof e.code==`string`?n(e.code):e.code},...e.retryAfterSeconds===void 0?{}:{retryAfterSeconds:e.retryAfterSeconds}}}function W(e){return g.byteLength(JSON.stringify(e),`utf8`)<=k}function G(e,t,n=N){if(g.byteLength(JSON.stringify(e),`utf8`)<=n)return e;let r=X(t),i=``,a=g.byteLength(JSON.stringify(r),`utf8`);for(let t of e){let e=g.byteLength(JSON.stringify(t),`utf8`)-2;if(a+e>n)break;i+=t,a+=e}return`${i.trimEnd()}${r}`}function de(e,t,n){let r=_.safeParse(JSON.parse(JSON.stringify(e)));return r.success?K(r.data,`data`,t,n):{value:Y(t),omitted:[`data`]}}function K(e,t,n,r){if(typeof e==`string`)return!(fe(me(t))||e.length>N)||e.length<=M?{value:e,omitted:[]}:{value:`${e.slice(0,M).trimEnd()}${X(n)}`,omitted:[t]};if(typeof e!=`object`||!e)return{value:e,omitted:[]};if(Array.isArray(e))return q(e,t,n,r);if(t===`data.response.entity.answer`||t===`data.response.answer`)return{value:e,omitted:[]};let i={},a=[];for(let[o,s]of Object.entries(e)){if(s===void 0)continue;let e=K(s,`${t}.${o}`,n,r);i[o]=e.value,a.push(...e.omitted)}return{value:i,omitted:a}}function q(e,t,n,r){let i=e.slice(0,r.rowLimit),a={...r,rowLimit:r.arrayLimit},o=i.map((e,r)=>K(e,`${t}[${r}]`,n,a)),s=o.flatMap(e=>e.omitted),c=`${t}[${i.length}..] (kept ${i.length} of ${e.length})`;return{value:o.map(e=>e.value),omitted:e.length>i.length?[...s,c]:s}}function fe(e){let t=e.toLowerCase();return P.test(t)||F.test(t)}var pe=`Refetch a narrower result: use ids/references, a more specific list read (e.g. entities relationships list, entities people list, or news list --owner-entity-id), filters, or smaller pages with page and size.`;function J(e,t,n){return{byteLength:e,maxBytes:k,omitted:t.length===0?[`data`]:[...new Set(t)],recovery:G(n,e)}}function Y(e){return{truncated:!0,byteLength:e,maxBytes:k}}function X(e){return`\n[truncated byteLength=${e} maxBytes=${k}]`}function me(e){return(e.split(`.`).at(-1)??e).replace(/\[\d+\]$/,``)}var Z=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function Q(e,t){return typeof e[t]==`number`?e[t]:void 0}function $(e,t){return typeof e[t]==`boolean`?e[t]:void 0}export{W as a,R as c,_ as d,z as i,ce as l,pe as n,I as o,B as r,L as s,k as t,E as u};
@@ -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-CkpirK9Q.js";import{l as a,o}from"./env-B6CxaFe-.js";import{C as s}from"./tool-policy-YkjzNjYx.js";import{r as c}from"./cli-help-policy-y1IkbgFJ.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`},"billing subscription payment-profile":{summary:`Read Your Card on File and Introductory Offer`},enrichments:{summary:`Enrich Many Companies and People`,section:`researchData`},entities:{summary:`Companies and funds: people, funding, and news`,section:`researchData`},"entities acquisitions":{summary:`Acquisitions a company made or was part of`},"entities addresses":{summary:`A company's recorded office and headquarters addresses`},"entities blog-posts":{summary:`External blog and article links for entities and people`},"entities brand":{summary:`Get a Company's Names, Logos, Links, and Tags`},"entities classifications":{summary:`Classification tags on a company, and suggested tags`},"entities classifications catalog":{summary:`Get the Company Classification Taxonomy`},"entities classifications suggestions":{summary:`Suggest Classifications for a Company`},"entities classifications tags":{summary:`List Classification Tags`},"entities content":{summary:`Publications about one company or person, and platform-wide publication search`},"entities content facets":{summary:`Count a Company's Publications`},"entities employee-counts":{summary:`List a Company's Headcount Over Time`},"entities enrichments":{summary:`Enrich One Company, Product, or Service`},"entities filters":{summary:`Filter options for company listings: available values, refinement, and option search`},"entities fundraise-investor-joins":{summary:`List the Investors in a Funding Round`},"entities fundraise-rounds":{summary:`List a Company's Funding Rounds`},"entities investments":{summary:`List the Investments a Company Made`},"entities investor-activity":{summary:`Get Investor Activity`},"entities investors":{summary:`List a Company's Investors`},"entities logo":{summary:`Get a Company Logo`},"entities lookup-exact":{summary:`Read Full Entity Detail by aVenture Profile URL, Slug, Website, or Domain`},"entities people":{summary:`People linked to companies, and the role each one holds`},"entities person-investors":{summary:`List Person Investors`},"entities relationships":{summary:`Relationships between companies, investors, and other organizations`},"entities relationships types":{summary:`List Entity Relationship Types`},"entities repositories":{summary:`List a Company's GitHub Repositories`},"entities research":{summary:`Get the Research Gathered About a Company`},"entities research-details":{summary:`List Research Details`},"entities research-details types":{summary:`List the Accepted Research Detail Types`},"entities research-snippets":{summary:`List Research Snippets`},"entities research-snippets types":{summary:`List the Accepted Research Snippet Types`},"entities sec":{summary:`Get SEC EDGAR Facts for a Public Company`},"entities similar":{summary:`Similar companies and lean similar-company summaries by id`},"entities similar summary":{summary:`Get Similar Company Summaries by ID`},"entities slug":{summary:`Get a Company's Slug`},"entities texts":{summary:`Descriptions and other written text for companies and people`},"entities texts types":{summary:`List the Accepted Company Text Types`},"entities trending-news":{summary:`List Trending News About a Company`},"entities types":{summary:`List the Accepted typeRecord Values`},"entities unique-ids":{summary:`External identifiers and the records they name`},"entities urls":{summary:`Websites, social profiles, and other URLs for companies and people`},"entities valuations":{summary:`List a Company's Valuation Over Time`},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-DdrACXij.js";import{l as a,o}from"./env-CINNa4yR.js";import{C as s}from"./tool-policy-BGaRVdFA.js";import{r as c}from"./cli-help-policy-BhGojY3n.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`},"billing subscription payment-profile":{summary:`Read Your Card on File and Introductory Offer`},enrichments:{summary:`Enrich Many Companies and People`,section:`researchData`},entities:{summary:`Companies and funds: people, funding, and news`,section:`researchData`},"entities acquisitions":{summary:`Acquisitions a company made or was part of`},"entities addresses":{summary:`A company's recorded office and headquarters addresses`},"entities blog-posts":{summary:`External blog and article links for entities and people`},"entities brand":{summary:`Get a Company's Names, Logos, Links, and Tags`},"entities classifications":{summary:`Classification tags on a company, and suggested tags`},"entities classifications catalog":{summary:`Get the Company Classification Taxonomy`},"entities classifications suggestions":{summary:`Suggest Classifications for a Company`},"entities classifications tags":{summary:`List Classification Tags`},"entities content":{summary:`Publications about one company or person, and platform-wide publication search`},"entities content facets":{summary:`Count a Company's Publications`},"entities employee-counts":{summary:`List a Company's Headcount Over Time`},"entities enrichments":{summary:`Enrich One Company, Product, or Service`},"entities filters":{summary:`Filter options for company listings: available values, refinement, and option search`},"entities fundraise-investor-joins":{summary:`List the Investors in a Funding Round`},"entities fundraise-rounds":{summary:`List a Company's Funding Rounds`},"entities investments":{summary:`List the Investments a Company Made`},"entities investor-activity":{summary:`Get Investor Activity`},"entities investors":{summary:`List a Company's Investors`},"entities logo":{summary:`Get a Company Logo`},"entities lookup-exact":{summary:`Read Full Entity Detail by aVenture Profile URL, Slug, Website, or Domain`},"entities people":{summary:`People linked to companies, and the role each one holds`},"entities person-investors":{summary:`List Person Investors`},"entities relationships":{summary:`Relationships between companies, investors, and other organizations`},"entities relationships types":{summary:`List Entity Relationship Types`},"entities repositories":{summary:`List a Company's GitHub Repositories`},"entities research":{summary:`Get the Research Gathered About a Company`},"entities research-details":{summary:`List Research Details`},"entities research-details types":{summary:`List the Accepted Research Detail Types`},"entities research-snippets":{summary:`List Research Snippets`},"entities research-snippets types":{summary:`List the Accepted Research Snippet Types`},"entities sec":{summary:`Get SEC EDGAR Facts for a Public Company`},"entities similar":{summary:`Similar companies and lean similar-company summaries by id`},"entities similar summary":{summary:`Get Similar Company Summaries by ID`},"entities slug":{summary:`Get a Company's Slug`},"entities texts":{summary:`Descriptions and other written text for companies and people`},"entities texts types":{summary:`List the Accepted Company Text Types`},"entities trending-news":{summary:`List Trending News About a Company`},"entities types":{summary:`List the Accepted typeRecord Values`},"entities unique-ids":{summary:`External identifiers and the records they name`},"entities urls":{summary:`Websites, social profiles, and other URLs for companies and people`},"entities valuations":{summary:`List a Company's Valuation Over Time`},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};
@@ -0,0 +1 @@
1
+ import{n as e}from"./startup-auth-D0KOGMoL.js";export{e as commandAuthMaterializationMode};
@@ -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-CkpirK9Q.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};
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-DdrACXij.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.170",
3
+ "version": "0.8.172",
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": "ee3ea6aa000da139afd311582c3150e1dd23fb1f",
36
+ "commit": "abaacf2c3ee223717d74d3a3b562289a11b2238e",
37
37
  "openapiPath": "openapi/openapi.json",
38
- "openapiSha256": "fd0e29b89387e42dbedd2a12bb49887b1385a1d29fa5c315270981f41f9bea0b"
38
+ "openapiSha256": "d7ac7a821f0f6f915466267a26d652cde8b269d82dc9751627fccc6c08955e50"
39
39
  },
40
40
  "scripts": {}
41
41
  }
@@ -1 +0,0 @@
1
- import{t as e}from"./api-key-bearer-credential-wwFYd_zb.js";export{e as materializeCliApiKeyBearerCredential};
@@ -1 +0,0 @@
1
- import{c as e,o as t}from"./logging-B0Gr5-1z.js";export{t as logWarn,e as setStderrLogging};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./oauth-bearer-credential-Cl-uxBct.js";export{t as materializeCliOAuthBearerCredential,e as materializeSavedCliOAuthBearerCredential};
@@ -1 +0,0 @@
1
- import{i as e}from"./oauth-login-K5lDgqm3.js";export{e as renewOAuthTokens};
@@ -1 +0,0 @@
1
- import{t as e}from"./openapi-commands-BMGU9vje.js";export{e as GENERATED_OPENAPI_COMMAND_SPECS};
@@ -1 +0,0 @@
1
- import{n as e}from"./output-mode-C42LS-nQ.js";export{e as cliMachineOutputSelected};
@@ -1 +0,0 @@
1
- import{w as e,y as t}from"./person-owner-BJgNYLKX.js";import{zr as n}from"./dist-M0uo-DFP.js";var r=t({clerkPublishableKey:e().nullish(),oauthClient:n.nullish()});export{r as t};
@@ -1 +0,0 @@
1
- import{E as e,O as t,S as n,T as r,h as i,i as a,l as o,n as s,o as c,p as l,s as u,t as d,u as f,v as p,w as m,y as h}from"./person-owner-BJgNYLKX.js";import{Buffer as g}from"node:buffer";var _=i(()=>r([m(),p(),f(),u(),o(_),n(m(),_)])),v=c([`REACTIVATE`,`ATTACH_INACTIVE`]),ee=h({availableOverrides:o(v),slug:m(),tagId:l()}),te=h({externalId:m().nullish(),id:l(),reason:o(m()),score:l(),slug:m().regex(/^[a-z0-9_-]+$/).max(255).nullish()}),ne=h({externalId:m().nullish(),id:t(),name:m().nullish(),operatingStatus:m().nullish(),publicPath:m().nullish(),reason:o(m()),score:l(),slug:m().regex(/^[a-z0-9_-]+$/).max(255).nullish(),typeRecord:s.nullish()}),re=h({candidate:o(ne).nullish(),newsCandidate:o(te).nullish(),overridePath:m().nullish(),threshold:l()}),ie=h({conflictingArticleId:l(),conflictingArticleSlug:m(),conflictingArticleTitle:m()}),ae=h({candidateEntityId:o(t()),candidatePersonId:o(t()),hint:m(),normalizedUrl:m().nullish(),url:m(),urlType:m().nullish()}),y=h({owner:d,urlId:l()}),b=h({existingJoin:o(y),fragmentIgnored:f(),guidance:m(),normalizedUrl:m().nullish(),requestedOwner:d,url:m(),urlType:m()}),oe=r([b,ae,re,ee,ie]),se=h({acceptedValue:o(m()).nullish(),action:c([`setField`,`setParameter`,`removeParameter`,`useEndpoint`,`reviewCandidates`,`authenticate`]),endpoint:m().nullish(),fieldPath:m().nullish(),parameter:m().nullish(),retryable:f().nullish()}),x=r([c([`source`,`record`,`disclaimer`,`voice`,`structured`,`temporal`,`factList`,`mojibake`,`legalSource`,`textContract`]),m()]),S=h({overridable:f(),passage:m(),problem:x,reason:m()}),C=c([`entity`,`person`,`news`,`blog`,`content`]),w=h({deletedAt:a({offset:!0}).nullish(),id:m(),isHidden:f(),nameBrand:m().nullish(),resourceType:C,showOnSitemap:f(),slug:m()}),T=h({newUrl:m().nullish(),oldUrl:m(),targetCurrentSlug:m().nullish(),targetId:m().nullish(),targetResourceType:C.nullish()}),E=h({allowanceType:c([`COMPANY`,`PERSON`,`ENTITY_VIEW`,`ENTITY_BRAND`,`PERSON_VIEW`,`WEB_SEARCH`]).nullish(),circuitBreaker:m().nullish(),code:r([c(`not_authorized.rateLimited.rate_limited.subscription_required.subscription_canceled.subscription_past_due.subscription_paused.billing_allowance_exhausted.billing_additional_usage_cap_reached.billing_credit_checkout_closed.account_exists.origin_detail_capacity.origin_detail_shutdown.suspectedShellStrip.suspected_shell_strip.prose_rejected.url_surface_misclassification.JOBRUNR_DISABLED.jobrunr_disabled.task_plan_operation_unserved.JOBRUNR_STORAGE_UNAVAILABLE.jobrunr_storage_unavailable.rbac_lookup_unavailable.GEOCODE_PROVIDER_ERROR.geocode_provider_error.sentry_api_error.frontend_cache_epoch_mode_not_targeted.image_blocklist_match.image_monochrome.image_too_small.image_wrong_aspect.image_monogram.image_unreadable.image_processing_error.image_brand_mismatch.image_photographic.web_crawl_fetch_failed.source_document_fetch_busy.primary_website_missing.news_rss_feed_fetch_failed.news_rss_article_fetch_failed.callback_connection_refused.callback_timeout.callback_tls_error.callback_http_4xx.callback_http_5xx.callback_challenge_failed.news_subscription_limit.r2_fetch_failed.r2_delete_failed.r2_upload_failed.source_document_body_unavailable.source_document_capture_limit_exceeded.news_similarity_embedding_unavailable.search_provider_not_configured.search_provider_error.search_still_running.lookup_still_running.sec_edgar_fetch_failed.github_fetch_failed.INFERENCE_PROVIDER_ERROR.inference_provider_error.INFERENCE_PROVIDER_RESPONSE_EMPTY.inference_provider_response_empty.INFERENCE_PROVIDER_INVALID_JSON.inference_provider_invalid_json.INFERENCE_PROFILES_MISSING.inference_profiles_missing.INFERENCE_PROFILE_API_KEY_MISSING.inference_profile_api_key_missing`.split(`.`)),m().max(128)]).nullish(),conflictingRecord:w.nullish(),detail:m().optional(),details:oe.nullish(),error:n(m(),m()).nullish(),existingRecordId:m().nullish(),existingRedirect:T.nullish(),feId:m().nullish(),field:m().nullish(),filedRunId:o(t()).nullish(),hammingDistance:p().int().nullish(),hint:m().nullish(),instance:m().optional(),limit:p().int().nullish(),limitType:c([`FORM`,`GLOBAL`,`SUBNET`,`IP`,`UNKNOWN`,`RESILIENCE4J`,`WEB_SEARCH`,`AGENT_HELP`,`NATURAL_SEARCH`,`BILLING_ALLOWANCE`,`BILLING_ADDITIONAL_USAGE`,`CLERK_PUBLIC_ADMISSION`,`CLERK_SCRIPT_LOAD`,`ORIGIN_DETAIL`,`INFERENCE_PROVIDER`]).nullish(),matchedBlocklistKey:m().nullish(),mediaType:m().nullish(),moderationReason:m().nullish(),parseError:m().nullish(),path:m().nullish(),properties:n(m(),_).optional(),proseViolation:o(S).nullish(),remaining:p().int().nullish(),requiredRole:m().nullish(),resetAt:a({offset:!0}).nullish(),resolution:se.nullish(),retryAfterSeconds:p().int().nullish(),spanId:m().nullish(),status:l().optional(),suggestion:m().nullish(),suggestions:n(m(),m()).nullish(),suspectedFragment:m().nullish(),title:m().optional(),traceId:m().nullish(),type:m().optional(),unknownParameters:o(m()).nullish(),used:p().int().nullish(),validParameters:o(m()).nullish(),value:m().nullish(),windowSeconds:p().int().nullish()}),ce=e=>e>=500&&e<600,D=r([m(),p(),f()]),le=h({number:p().optional(),size:p().optional(),numberOfElements:p().optional(),totalElements:p().optional(),totalPages:p().optional(),first:f().optional(),last:f().optional(),empty:f().optional()}),ue=h({byteLength:p(),maxBytes:p(),omitted:o(m()),recovery:m()}),O=h({status:p(),title:m(),type:m()}).catchall(_.optional()).and(E);h({ok:f(),summary:m(),httpStatus:p().optional(),operationId:m().optional(),method:m().optional(),endpoint:m().optional(),format:c([`json`,`text`]).optional(),count:p().optional(),page:le.optional(),filters:n(m(),r([D,o(D)])).optional(),truncated:f().optional(),truncation:ue.optional(),omitted:o(m()).default([]),ids:o(m()).default([]),counts:n(m(),p()).default({}),references:o(m()).default([]),warnings:o(m()).default([]),problem:O.optional(),data:e()});var k=5e4,A=[50,25,10,5,1],j=[...A.map(e=>({arrayLimit:e,rowLimit:1/0})),...A.map(e=>({arrayLimit:1,rowLimit:e}))],M=320,N=1e3,P=/^(?:bio|biography|body|content|description|evidence|fulltext|notes|snippet|summary|text)$/u,F=/(?:description|snippet|summary|text)$/u;function I(e){let t=Z(e)?e:null;if(t===null)return;let n={number:Q(t,`number`),size:Q(t,`size`),numberOfElements:Q(t,`numberOfElements`),totalElements:Q(t,`totalElements`),totalPages:Q(t,`totalPages`),first:$(t,`first`),last:$(t,`last`),empty:$(t,`empty`)};return Object.values(n).some(e=>e!==void 0)?n:void 0}function L(e,t){if(t?.numberOfElements!==void 0)return t.numberOfElements;if(Array.isArray(e))return e.length;let n=Z(e)?e.content:void 0;return Array.isArray(n)?n.length:void 0}function R(e,t,n={}){return{ok:!0,summary:e,...n,omitted:n.omitted??[],ids:n.ids??[],counts:n.counts??{},references:n.references??[],warnings:n.warnings??[],data:t}}function z(e,t=[],n={}){return{...R(e,null,{...n,warnings:t}),ok:!1}}function B(e,t={}){let n=g.byteLength(JSON.stringify(e),`utf8`);if(n<=5e4)return e;let r=e.httpStatus??0;if(t.write===!0&&e.ok&&r>=200&&r<300)return V(e,n,t.exactRecovery);let i=t.exactRecovery??`Refetch a narrower result: use ids/references, a more specific list read (e.g. entities relationships list, entities people list, or news list --owner-entity-id), filters, or smaller pages with page and size.`,a=e;for(let t of j){let r=de(e.data,n,t);if(a={...e,truncated:!0,truncation:J(n,r.omitted,i),warnings:[...e.warnings,`response truncated (>50KB); read the section through its sub-resource operation, or request a smaller page or narrower server-side filter`],data:r.value},W(a))return a}return H({...a,truncation:J(n,[`data`],i),data:Y(n)},n,i,`response truncated (>50KB); metadata named in truncation.omitted was removed; read the section through its sub-resource operation, or request a smaller page or narrower server-side filter`)}function V(e,t,n=`Read the full result through the GET operation on ${e.endpoint??`this route`}.`){let r={...e.counts},i=(e,n)=>{let a={};for(let[o,s]of Object.entries(Z(e)?e:{}))Array.isArray(s)?r[`${n}${o}`]=s.length:typeof s==`string`?a[o]=G(s,t,M):typeof s!=`object`||!s?a[o]=s:n===``&&o===`response`&&(a[o]=i(s,`response.`));return a},a={...e,summary:`${e.method} succeeded (HTTP ${e.httpStatus}); response body omitted (${t} bytes, over the 50KB cap); do not retry the write`,truncated:!0,truncation:J(t,[`data`],n),counts:r,data:i(e.data,``)},o=a,s=[`data`],c={};for(let r of[`references`,`ids`,`warnings`]){if(W(o))return o;s.push(r),c[r]=[],o={...a,...c,omitted:[...e.omitted,...s.slice(1)],truncation:J(t,s,n)}}return W(o)?o:H({...o,data:Y(t),warnings:[`response truncated (>50KB); do not retry the write`]},t,n,`response truncated (>50KB); metadata named in truncation.omitted was removed; do not retry the write`)}function H(e,t,n,r){if(W(e))return e;let i=e.warnings.slice(0,-1),a=[`data`],o=e;if(o.problem!==void 0){let e=U(o.problem);if(JSON.stringify(e).length<JSON.stringify(o.problem).length&&(a.push(`problem`),o={...o,problem:e,truncation:J(t,a,n)},W(o)))return o}let s=[];if(e.filters!==void 0&&s.push(`filters`),e.omitted.length>0&&s.push(`omitted`),e.ids.length>0&&s.push(`ids`),Object.keys(e.counts).length>0&&s.push(`counts`),e.references.length>0&&s.push(`references`),a.push(...s),o={...o,filters:void 0,truncation:J(t,a,n),omitted:[],ids:[],counts:{},references:[],warnings:s.length===0?e.warnings:[...i,r]},W(o))return o;let c=e=>e===void 0?void 0:G(e,t),l=G(o.summary,t),u=c(o.operationId),d=c(o.method),f=c(o.endpoint),p=o.warnings.map(e=>G(e,t)),m=o.problem===void 0?void 0:U(o.problem,t);if(l!==o.summary&&a.push(`summary`),u!==o.operationId&&a.push(`operationId`),d!==o.method&&a.push(`method`),f!==o.endpoint&&a.push(`endpoint`),p.some((e,t)=>e!==o.warnings[t])&&a.push(`warnings`),o.problem!==void 0&&m!==void 0&&JSON.stringify(m)!==JSON.stringify(o.problem)&&a.push(`problem`),o={...o,summary:l,operationId:u,method:d,endpoint:f,truncation:J(t,a,n),warnings:p,problem:m},W(o))return o;a.push(`warnings`),o.page!==void 0&&a.push(`page`);let h=G(o.summary,t,M);return h!==o.summary&&a.push(`summary`),{...o,summary:h,page:void 0,truncation:J(t,a,n),warnings:[r]}}function U(e,t){let n=e=>t===void 0?e:G(e,t);return{status:e.status,title:n(e.title),type:n(e.type),...e.detail===void 0?{}:{detail:n(e.detail)},...e.instance===void 0?{}:{instance:n(e.instance)},...e.code===void 0?{}:{code:typeof e.code==`string`?n(e.code):e.code},...e.retryAfterSeconds===void 0?{}:{retryAfterSeconds:e.retryAfterSeconds}}}function W(e){return g.byteLength(JSON.stringify(e),`utf8`)<=k}function G(e,t,n=N){if(g.byteLength(JSON.stringify(e),`utf8`)<=n)return e;let r=X(t),i=``,a=g.byteLength(JSON.stringify(r),`utf8`);for(let t of e){let e=g.byteLength(JSON.stringify(t),`utf8`)-2;if(a+e>n)break;i+=t,a+=e}return`${i.trimEnd()}${r}`}function de(e,t,n){let r=_.safeParse(JSON.parse(JSON.stringify(e)));return r.success?K(r.data,`data`,t,n):{value:Y(t),omitted:[`data`]}}function K(e,t,n,r){if(typeof e==`string`)return!(fe(me(t))||e.length>N)||e.length<=M?{value:e,omitted:[]}:{value:`${e.slice(0,M).trimEnd()}${X(n)}`,omitted:[t]};if(typeof e!=`object`||!e)return{value:e,omitted:[]};if(Array.isArray(e))return q(e,t,n,r);if(t===`data.response.entity.answer`||t===`data.response.answer`)return{value:e,omitted:[]};let i={},a=[];for(let[o,s]of Object.entries(e)){if(s===void 0)continue;let e=K(s,`${t}.${o}`,n,r);i[o]=e.value,a.push(...e.omitted)}return{value:i,omitted:a}}function q(e,t,n,r){let i=e.slice(0,r.rowLimit),a={...r,rowLimit:r.arrayLimit},o=i.map((e,r)=>K(e,`${t}[${r}]`,n,a)),s=o.flatMap(e=>e.omitted),c=`${t}[${i.length}..] (kept ${i.length} of ${e.length})`;return{value:o.map(e=>e.value),omitted:e.length>i.length?[...s,c]:s}}function fe(e){let t=e.toLowerCase();return P.test(t)||F.test(t)}var pe=`Refetch a narrower result: use ids/references, a more specific list read (e.g. entities relationships list, entities people list, or news list --owner-entity-id), filters, or smaller pages with page and size.`;function J(e,t,n){return{byteLength:e,maxBytes:k,omitted:t.length===0?[`data`]:[...new Set(t)],recovery:G(n,e)}}function Y(e){return{truncated:!0,byteLength:e,maxBytes:k}}function X(e){return`\n[truncated byteLength=${e} maxBytes=${k}]`}function me(e){return(e.split(`.`).at(-1)??e).replace(/\[\d+\]$/,``)}var Z=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function Q(e,t){return typeof e[t]==`number`?e[t]:void 0}function $(e,t){return typeof e[t]==`boolean`?e[t]:void 0}export{W as a,R as c,_ as d,z as i,ce as l,pe as n,I as o,B as r,L as s,k as t,E as u};
@@ -1 +0,0 @@
1
- import{n as e}from"./startup-auth-CdgLvpph.js";export{e as commandAuthMaterializationMode};