@aventurevc/aventure-cli 0.7.283

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.
@@ -0,0 +1,68 @@
1
+ import{C as e,D as t,_ as n,a as r,k as i,v as a,x as o}from"./person-owner-ChqQWHII.js";import{$ as s,A as c,C as l,E as u,H as d,I as f,J as p,K as m,M as h,N as g,O as _,Q as ee,R as te,S as ne,St as v,T as re,X as ie,Y as ae,Z as oe,_ as se,b as ce,c as le,f as ue,g as de,h as fe,i as pe,j as me,k as y,l as b,m as he,n as ge,nt as x,o as _e,p as ve,q as ye,r as be,rt as S,s as xe,t as Se,tt as Ce,u as we,v as Te,w as Ee}from"./auth-BhNILkx2.js";import{A as De,C as Oe,D as ke,E as Ae,F as C,I as je,M as Me,N as Ne,O as Pe,P as Fe,S as Ie,T as Le,_ as Re,a as ze,b as Be,c as Ve,d as He,f as Ue,g as We,h as Ge,j as Ke,k as qe,l as Je,m as Ye,n as Xe,o as w,p as Ze,r as T,s as Qe,t as E,u as $e,v as et,w as tt,x as nt,y as rt}from"./openapi-commands-iANpsNY6.js";import{F as it,a as at,f as ot,i as st,l as ct,m as lt,n as ut,ot as dt,p as ft,r as pt,s as mt,st as ht,t as gt}from"./mcp-generation-contract-D7g5rQv0.js";import{execFile as _t,spawnSync as vt}from"node:child_process";import{createHash as yt,randomBytes as bt,timingSafeEqual as xt,webcrypto as St}from"node:crypto";import{readFile as Ct}from"node:fs/promises";import{homedir as wt,hostname as Tt,platform as Et}from"node:os";import{basename as Dt,dirname as D,join as O,resolve as k,sep as Ot}from"node:path";import A,{stderr as j,stdin as kt}from"node:process";import{appendFileSync as At,copyFileSync as jt,existsSync as M,lstatSync as Mt,mkdirSync as Nt,mkdtempSync as Pt,readFileSync as N,readlinkSync as Ft,realpathSync as It,renameSync as Lt,rmSync as Rt,rmdirSync as zt,unlinkSync as Bt,writeFileSync as P}from"node:fs";import{fileURLToPath as Vt}from"node:url";import{once as Ht}from"node:events";import{TextDecoder as Ut,inspect as Wt}from"node:util";import{createServer as Gt}from"node:http";import{setTimeout as Kt}from"node:timers/promises";import{createInterface as qt}from"node:readline/promises";function Jt(e,t,n){let r={...n};for(let n of t.parameter){let t=n.envName;if(t===void 0)continue;let i=process.env[t]?.trim();if(i===void 0||i.length===0)continue;let a=r[n.optionKey];if(a!==void 0&&(typeof a!=`string`||a!==i))return{...x(`${e} ${n.flag.split(` `)[0]??n.name} conflicts with ${t}; omit the flag or use ${i}.`),data:r};a===void 0&&(r[n.optionKey]=i)}return S(`Environment-bound options applied`,r)}function Yt(e,t,n){if(!I(n))return null;for(let r of t.parameter){let t=r.envName,i=t===void 0?void 0:process.env[t]?.trim();if(t===void 0||i===void 0||i.length===0||!un(n,r.name))continue;let a=ln(n,r.name);if(typeof a!=`string`||a!==i)return`${e} ${r.name} in --from-file conflicts with ${t}; omit the field or use ${i}.`}return null}function Xt(e){let t=new Set(e.parameter.map(({name:e})=>e));return e.kind===`multipart`?e.requiredPath:e.requiredPath.filter(e=>!t.has(e))}function Zt(e,t,n,r=!1){if(r||!F(t)||!Array.isArray(n))return hn(e,t,n);for(let[r,i]of n.entries()){let n=hn(e,t,i,r);if(!n.ok)return n}return S(`Body value assigned`,null)}function Qt(e,t,n,r){return hn(e,t,r,n)}function $t(e){let t=[];for(let n of e.split(`.`)){let e=_n(n);if(t.push(e.key),e.isArray)return t.join(`.`)}return null}function en(e,t){let n=$t(t);if(n===null)return null;let r=cn(e,n.split(`.`));return Array.isArray(r)?{path:n,rowCount:r.length,firstHole:sn(r)}:null}function tn(e,t){if(F(e.name)||e.schemaType===`array`)return S(`Repeated body option selected`,typeof t==`string`?[t]:t);if(!Array.isArray(t))return S(`Scalar body option selected`,t);let n=e.flag.split(` `)[0]??e.name;return t.length===1?S(`Scalar body option selected`,t[0]):x(`${n} was already given; pass it once.`)}var nn=/^(?<row>\d+):(?<item>.*)$/su;function rn(e,t){let n=$t(e.name);if(e.schemaType!==`array`||n===null||t===void 0||typeof t==`boolean`)return null;let r=new Map,i=[];for(let e of typeof t==`string`?[t]:t){let t=nn.exec(e)?.groups,n=t?.row,a=t?.item;if(n===void 0||a===void 0){i.push(e);continue}let o=r.get(Number(n));o===void 0?r.set(Number(n),[a]):o.push(a)}return r.size===0?null:{container:n,rows:r,plain:i}}function an(e,t,n){let r=0;for(let i of e.parameter){let e=t[i.optionKey];e!==void 0&&typeof e!=`boolean`&&$t(i.name)===n&&(r=Math.max(r,typeof e==`string`?1:e.length))}return r}function on(e,t,n,r){for(let i of t.parameter){let t=n[i.optionKey];if(t===void 0)continue;let a=en(r,i.name);if(a===null)continue;if(a.firstHole!==null)return x(`${e} has no ${a.path}[] row ${a.firstHole} — number ${a.path}[] rows from 0 with no gaps.`);if(i.schemaType!==`array`||a.rowCount<=1||rn(i,t)!==null)continue;let o=i.flag.split(` `)[0]??i.name;return x(`${o} fills one ${a.path}[] row's list, so ${e} cannot also build ${a.rowCount} ${a.path}[] rows from direct options — prefix each value with its 0-based ${a.path}[] row index, as 0:value, or pass the rows with --from-file.`)}return null}function sn(e){for(let t=0;t<e.length;t+=1)if(e[t]===void 0)return t;return null}function cn(e,t){let n=e;for(let e of t){if(!I(n))return;n=n[e]??null}return n}function ln(e,t){if(!F(t))return cn(e,t.split(`.`))}function un(e,t){return fn(e,t.split(`.`))}function dn(e,t,n){if(!I(n))return null;let r=new Set(t.parameter.map(({name:e})=>e));for(let i of e)if(i!==t){for(let e of i.parameter)if(!r.has(e.name)&&un(n,e.name))return`${e.name} in --from-file requires --content-type ${i.contentType}.`}return null}function fn(e,t){let[n,...r]=t;if(n===void 0)return!0;let i=_n(n);if(!I(e)||!Object.hasOwn(e,i.key))return!1;let a=e[i.key]??null;return i.isArray?Array.isArray(a)&&a.every(e=>fn(e,r)):fn(a,r)}function F(e){return e.split(`.`).some(e=>_n(e).isArray)}function pn(e){return e.find(e=>F(e.name))?.name}function mn(e,t){return e.parameter.length===0||!I(t)?null:yn(t,[],vn(e.parameter))}function I(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function hn(e,t,n,r=0){let i=t.split(`.`),a=e;for(let[e,o]of i.entries()){let s=_n(o),c=e===i.length-1,l=gn(a,s,t,c,n,r);if(!l.ok||l.data===null)return x(l.summary,l.warnings);if(c)return S(`Body value assigned`,null);a=l.data}return x(`${t} is not a valid body option path.`)}function gn(e,t,n,r,i,a){let o=()=>x(`${n} cannot be combined with another body option at ${t.key}.`),s=e[t.key];if(t.isArray){if(s!==void 0&&!Array.isArray(s))return o();let n=s??[];if(s===void 0&&(e[t.key]=n),r)return n[a]===void 0?(n[a]=i,S(`Body value assigned`,e)):o();let c=n[a];if(c===void 0){let e={};return n[a]=e,S(`Body path created`,e)}return I(c)?S(`Body path stepped`,c):o()}if(r)return s===void 0?(e[t.key]=i,S(`Body value assigned`,e)):o();if(s===void 0){let n={};return e[t.key]=n,S(`Body path created`,n)}return I(s)?S(`Body path stepped`,s):o()}function _n(e){let t=e.endsWith(`[]`);return{key:t?e.slice(0,-2):e,isArray:t}}function vn(e){let t=new Set,n=new Set,r=new Map;for(let i of e){let e=`${i.name}${i.schemaType===`array`?`[]`:``}`;t.add(e),r.set(e,i.flag.split(` `)[0]??i.name);let a=e.split(`.`);for(let e=1;e<a.length;e+=1)n.add(a.slice(0,e).join(`.`))}return{leaf:t,prefix:n,flagByLeaf:r}}function yn(e,t,n){if(Array.isArray(e)){if(e.length===0)return null;for(let r of e){let e=yn(r,t,n);if(e!==null)return e}return null}if(!I(e))return null;for(let[r,i]of Object.entries(e)){let e=[...t,Array.isArray(i)?`${r}[]`:r],a=e.join(`.`);if(!bn(a,n)){if(!xn(e))continue;return{path:a,suggestion:Sn(e,n)}}let o=yn(i,e,n);if(o!==null)return o}return null}function bn(e,t){return t.prefix.has(e)||t.leaf.has(e)}function xn(e){return e.slice(0,-1).some(e=>e.endsWith(`[]`))}function Sn(e,t){let n=e.slice(0,-1).join(`.`),r=e.at(-1)?.replace(/\[\]$/u,``).toLowerCase()??``,[i]=[...t.leaf].filter(e=>e.split(`.`).slice(0,-1).join(`.`)===n).map(e=>({path:e,score:Cn(r,e.split(`.`).at(-1)??``)})).filter(({score:e})=>e<1/0).toSorted((e,t)=>e.score-t.score||e.path.localeCompare(t.path));if(i!==void 0)return{path:i.path,flag:t.flagByLeaf.get(i.path)??i.path}}function Cn(e,t){let n=t.replace(/\[\]$/u,``).toLowerCase();return n===e?0:n.endsWith(e)||e.endsWith(n)?1:n.includes(e)||e.includes(n)?2:1/0}function wn(e,t){let n=new Map;for(let e of t){let t=e.flag?.split(` `)[0];t!==void 0&&n.set(t,t===`--from-file`?{...e,inputType:`file`}:e)}for(let t of e){let e=t.long===void 0?void 0:n.get(t.long);e!==void 0&&t.helpGroup(Ze(e))}e.sort((e,t)=>{let r=e.long===void 0?void 0:n.get(e.long),i=t.long===void 0?void 0:n.get(t.long);return r!==void 0&&i!==void 0?Mn(r,i):r===void 0?i===void 0?0:1:-1})}function Tn(e){let t=new Map;for(let n of e)for(let e of n.parameter){let r=e.flag.split(` `)[0]??e.flag,i=t.get(r);i===void 0?t.set(r,{variant:[{descriptor:n,parameter:e}]}):t.set(r,{variant:[...i.variant,{descriptor:n,parameter:e}]})}return[...t.values()]}function En(e){let{flag:t}=e.variant[0].parameter;return e.variant.every(({parameter:e})=>e.flag===t)?t:`${t.split(` `)[0]??t} <value>`}function Dn(e){let t=e.variant.map(({descriptor:e,parameter:t})=>({contentType:e.contentType,text:An(e,t,e.parameter)})),n=t[0];return n===void 0?``:t.every(({text:e})=>e===n.text)?`${n.text===``?``:`${n.text} `}Request content: ${t.map(({contentType:e})=>e).join(`, `)}.`:t.map(({contentType:e,text:t})=>`${e}: ${t}`).join(` `)}function On(e,t){return[...new Set((e.cliConflicts??[]).filter(e=>e.includes(t)).flatMap(e=>e.filter(e=>e!==t)))]}function kn(e,t){let n=e.kind===`multipart`?`Read a JSON object keyed by multipart part name from a file, or use - for stdin`:`Read the JSON request body from a file, or use - for stdin`,r=t.filter(e=>!t.some(t=>t.startsWith(`${e}.`)||t.startsWith(`${e}[].`)));return r.length===0?Ye(n):`${Ye(n)} Required JSON paths: ${r.join(`, `)}.`}function An(e,t,n){return`${He(t.description,void 0)}${e.kind!==`multipart`&&t.name===pn(n)?` Repeat to add another value.`:``}${jn(e,t)}`}function jn(e,t){if(e.kind===`multipart`||t.schemaType!==`array`)return``;let n=$t(t.name);return n===null?``:` Prefix each value with its 0-based ${n}[] row index, as 0:value, to fill more than one ${n}[] row. A leading digits-and-colon is always read as that index, so name the row of a value that starts the same way, as 0:0:00 for the value 0:00.`}function Mn(e,t){return Ue(e)-Ue(t)||Number(e.required!==!0)-Number(t.required!==!0)}async function Nn(e){let t;try{t=e===`-`?await Pn():await Ct(e,`utf8`)}catch(t){return x(`Could not read input: ${t.message}`,[`path=${e}`])}try{if(t.trim().length===0)return S(`No input provided`,null);let e=JSON.parse(t);return S(`Input parsed`,e)}catch(e){return x(`Input is not valid JSON: ${e.message}`)}}async function Pn(){if(process.stdin.isTTY)throw Error(`--from-file - requires JSON on stdin, but stdin is a TTY`);process.stdin.setEncoding(`utf8`);let e=``;for await(let t of process.stdin)e+=t;return e}var Fn=`--content-type`;function In(e,t){let n=t.requestBody??[];if(n.length>1){let t=n.map(({contentType:e})=>e);e.addOption(new u(`${Fn} <media-type>`,`Select the request content type; omit for ${t[0]}.`).choices(t).argParser(Rn(n)))}if(ir(t)){let r=n[0];if(r===void 0)throw Error(`${t.operationId} has no request body`);e.addOption(new u(`--from-file <path>`,kn(r,r.requiredPath)).argParser(Bn(`--from-file`)))}let r=Tn(n);for(let t of r.toSorted((e,t)=>Mn(e.variant[0].parameter,t.variant[0].parameter))){let{descriptor:r,parameter:i}=t.variant[0],a=new u(En(t),n.length>1?Dn(t):An(r,i,r.parameter));n.length===1&&i.envName!==void 0&&a.env(i.envName);let o=n.length===1?On(r,i.optionKey):[];o.length>0&&a.conflicts(o),n.length>1?a.argParser(Ln):F(i.name)||i.schemaType===`array`?a.argParser(zn):a.argParser(Bn(i.flag)),e.addOption(a)}rr(e,t,r)}function Ln(e,t){return t===void 0?e:typeof t==`string`?[t,e]:[...t,e]}function Rn(e){return(t,n)=>{if(n!==void 0)throw new _(`${Fn} was already given; pass it once.`);let r=Ee(e,t);if(!r.ok)throw new _(r.summary);return t}}function zn(e,t){return[...t??[],e]}function Bn(e){let t=e.split(/\s+/u)[0]??e;return(e,n)=>{if(n!==void 0)throw new _(`${t} was already given; pass it once.`);return e}}async function Vn(e,t){let n=typeof t.contentType==`string`?t.contentType:void 0,r=Ee(e.requestBody??[],n);if(!r.ok||r.data===null)return x(r.summary,r.warnings);let i=r.data;if(i===void 0)return S(`No body`,void 0);let a=Hn(e,i,t);if(a!==null)return x(a);let o=Jt(e.operationId,i,t);if(!o.ok)return x(o.summary,o.warnings);t=o.data;let s=Un(i,t);if(s!==null)return x(s);let c=await qn(t);if(!c.ok)return x(c.summary,c.warnings);let l=dn(e.requestBody??[],i,c.data);if(l!==null)return x(l);let u=Kn(e.operationId,i,c.data);if(!u.ok)return u;let d=Yt(e.operationId,i,c.data);if(d!==null)return x(d);let f=Jn(e.operationId,i,t);if(!f.ok)return f;if(c.data===void 0&&f.data===void 0)return i.required?x(nr(e.operationId,i)):S(`No body`,void 0);let p=Zn(e.operationId,c.data,f.data);if(!p.ok||p.data===void 0)return p;if(i.schemaType===`array`&&!Array.isArray(p.data))return x(`${e.operationId} requires a JSON array body.`);if(i.parameter.length>0&&!I(p.data)){let t=i.kind===`multipart`?` keyed by multipart part name`:` body`;return x(`${e.operationId} requires a JSON object${t}.`)}let m=Gn(i,p.data);if(m.length>0)return x(`${e.operationId} requires body option(s): ${m.join(`, `)}`);let h=p.data,g=I(h)?Xt(i).filter(e=>!un(h,e)):[];return g.length>0?x(Wn(e.operationId,i,g)):p}function Hn(e,t,n){let r=new Set(t.parameter.map(({optionKey:e})=>e));for(let i of e.requestBody??[])if(i!==t)for(let t of i.parameter){if(r.has(t.optionKey)||n[t.optionKey]===void 0)continue;let i=(e.requestBody??[]).filter(e=>e.parameter.some(({optionKey:e})=>e===t.optionKey)).map(({contentType:e})=>e);return`${Xn(t)} requires ${Fn} ${i.join(` or `)}.`}return null}function Un(e,t){for(let n of e.cliConflicts??[]){let e=n.filter(e=>t[e]!==void 0);if(e.length>1)return`Options ${e.join(`, `)} cannot be used together.`}return null}function Wn(e,t,n){let r=`${e} requires JSON body path(s): ${n.join(`, `)}`;return t.kind===`multipart`?`${r}. ${n.includes(`body`)?`For multipart --from-file, wrap the endpoint JSON under top-level "body".`:`For multipart --from-file, put the missing nested path(s) inside top-level "body".`}`:r}function Gn(e,t){return I(t)?e.parameter.filter(e=>e.required&&!un(t,e.name)).map(Xn):[]}function Kn(e,t,n){let r=mn(t,n);if(r===null)return S(`Body file paths validated`,null);let i=r.suggestion===void 0?``:` Use ${r.suggestion.path} (${r.suggestion.flag}).`;return x(`${e} --from-file contains unknown JSON path ${r.path}.${i}`)}async function qn(e){let t=typeof e.fromFile==`string`?e.fromFile:void 0;if(t===void 0)return S(`No body file`,void 0);let n=await Nn(t);if(!n.ok)return x(n.summary,n.warnings);let r=v.safeParse(n.data);return r.success?S(`Input parsed`,r.data):x(`Input is not valid JSON value: ${r.error.message}`)}function Jn(e,t,n){let r={},i=!1;for(let e of t.parameter){let a=tn(e,n[e.optionKey]);if(!a.ok||a.data===null)return x(a.summary,a.warnings);let o=a.data;if(o===void 0)continue;let s=Yn(t,n,r,e,o);if(!s.ok)return x(s.summary,s.warnings);i=!0}if(!i)return S(`No direct body options`,void 0);let a=on(e,t,n,r);return a===null?S(`Direct body options parsed`,r):a}function Yn(e,t,n,r,i){let a=rn(r,i);if(a===null){let e=er(r,i);return e.ok?Zt(n,r.name,e.data,r.schemaType===`array`):x(e.summary,e.warnings)}if(a.plain.length>0)return x(`${Xn(r)} mixes row-form values with plain value(s): ${a.plain.join(`, `)} — prefix every value with its 0-based ${a.container}[] row index, as 0:value.`);let o=an(e,t,a.container);for(let e of a.rows.keys())if(!(e<o))return x(`${Xn(r)} names ${a.container}[] row ${e}, but these options build at most ${o} ${a.container}[] row(s) — number rows from 0, and name the row of a value that itself starts with digits and a colon, as 0:0:00 for the value 0:00.`);for(let[e,t]of a.rows){let i=[];for(let e of t){let t=tr(r.name,r.itemSchemaType,e);if(!t.ok)return x(t.summary,t.warnings);i.push(t.data)}let a=Qt(n,r.name,e,i);if(!a.ok)return a}return S(`Body value assigned`,null)}function Xn(e){return e.flag.split(` `)[0]??e.name}function Zn(e,t,n){if(t===void 0)return S(`Direct body parsed`,n);if(n===void 0)return S(`Input parsed`,t);if(I(t)&&I(n))try{return S(`Input parsed`,Qn(t,n))}catch(t){return x(`${e} ${t.message}`)}return x(`${e} cannot combine --from-file with direct body options unless the file body is an object.`)}function Qn(e,t){let n={...e};for(let[e,r]of Object.entries(t)){let t=n[e];if(Array.isArray(t)&&Array.isArray(r))throw Error(`cannot combine --from-file array '${e}' with array body options at the same key — move the per-item fields inside the matching '${e}[]' object(s) in the file body.`);if(t!==void 0&&$n(t)!==$n(r))throw Error(`cannot combine --from-file ${$n(t)} '${e}' with ${$n(r)} body option(s) at the same key — align the file body shape with the schema.`);n[e]=I(t)&&I(r)?Qn(t,r):r}return n}function $n(e){return Array.isArray(e)?`array`:I(e)?`object`:`scalar`}function er(e,t){if(typeof t==`boolean`)return S(`Body value parsed`,t);if(t===void 0||typeof t==`string`)return tr(e.name,e.schemaType,t??``);let n=[],r=F(e.name)&&e.schemaType!==`array`?e.schemaType:e.itemSchemaType;for(let i of t){let t=tr(e.name,r,i);if(!t.ok)return t;n.push(t.data)}return S(`Body value parsed`,n)}function tr(e,t,n){if(t===`boolean`)return n===`true`?S(`Body value parsed`,!0):n===`false`?S(`Body value parsed`,!1):x(`${e} must be true or false.`);if(t===`number`||t===`integer`){let r=n.trim(),i=Number(r);return r===``||!Number.isFinite(i)?x(`${e} must be a finite ${t}.`):t===`integer`&&!Number.isInteger(i)?x(`${e} must be an integer.`):S(`Body value parsed`,i)}return S(`Body value parsed`,n)}function nr(e,t){let n=Xt(t);if(n.length>0)return`${e} requires --from-file with JSON body path(s): ${n.join(`, `)}`;let r=t.parameter.map(Xn).join(`, `);return r.length===0?`${e} requires --from-file`:`${e} requires --from-file or body option(s): ${r}`}function rr(e,t,n){let r=[...t.parameters,...n.map(({variant:e})=>e[0].parameter)];(t.requestBody?.length??0)>1&&r.push({optionKey:`contentType`,flag:Fn,location:`body`}),ir(t)&&r.push({optionKey:`fromFile`,flag:`--from-file`,location:`body`}),wn(e.options,r)}function ir(e){return(e.requestBody??[]).some(e=>e.kind!==`multipart`||e.parameter.some(e=>e.schemaFormat!==`binary`))}function ar(e){let t=Ce(e);return fr(t),process.stdout.write(`${JSON.stringify(t)}\n`),t}function or(e){fr(e);let t=ut(e.data,e.summary);if(e.ok&&t!==null){process.stdout.write(t.endsWith(`
2
+ `)?t:`${t}\n`),sr(e);return}let n=e.ok?`OK`:`FAIL`;process.stdout.write(`[${n}] ${e.summary}\n`),!e.ok&&e.problem!==void 0&&lr(e.problem),sr(e)}function sr(e){e.ids.length>0&&process.stdout.write(` ids: ${e.ids.join(`, `)}\n`);for(let[t,n]of Object.entries(e.counts))process.stdout.write(` ${t}: ${n}\n`);for(let t of e.references)process.stdout.write(` ref: ${t}\n`);if(e.truncation!==void 0){let t=e.truncation.omitted.join(`, `);process.stdout.write(` truncated: byteLength=${e.truncation.byteLength} maxBytes=${e.truncation.maxBytes} omitted=${t}\n`),process.stdout.write(` recovery: ${e.truncation.recovery}\n`)}for(let t of e.warnings)process.stdout.write(` warn: ${t}\n`)}function L(e,t){if(e.mode===`data`||e.mode===`data-full`){let n=e.mode===`data`?Ce(t):t;fr(n),process.stdout.write(`${JSON.stringify(n.ok&&n.truncated!==!0?cr(n.data):n)}\n`),n.ok||(process.exitCode=1);return}let n=e.mode===`json`?ar(t):t;e.mode===`text`&&or(n),n.ok||(process.exitCode=1)}function cr(e){return typeof e!=`object`||!e||Array.isArray(e)||!Reflect.has(e,`method`)||!Reflect.has(e,`endpoint`)||!(`response`in e)||e.response===void 0?e:e.response}function lr(e){typeof e.code==`string`&&process.stdout.write(` code: ${e.code}\n`),typeof e.detail==`string`&&process.stdout.write(` detail: ${e.detail}\n`),typeof e.hint==`string`&&process.stdout.write(` hint: ${e.hint}\n`),typeof e.suggestion==`string`&&process.stdout.write(` suggestion: ${e.suggestion}\n`);let t=Object.entries(e.suggestions??{});if(t.length>0){let e=t.map(([e,t])=>`${e}=${t}`).join(`; `);process.stdout.write(` suggestions: ${e}\n`)}ur(`unknownParameters`,e.unknownParameters),ur(`validParameters`,e.validParameters),dr(e.resolution)}function ur(e,t){t!=null&&t.length>0&&process.stdout.write(` ${e}: ${t.join(`, `)}\n`)}function dr(e){if(e==null)return;let t=[`action=${e.action}`];typeof e.parameter==`string`&&t.push(`parameter=${e.parameter}`),typeof e.fieldPath==`string`&&t.push(`fieldPath=${e.fieldPath}`),typeof e.endpoint==`string`&&t.push(`endpoint=${e.endpoint}`),e.acceptedValue!==null&&e.acceptedValue!==void 0&&e.acceptedValue.length>0&&t.push(`acceptedValue=${e.acceptedValue.join(`, `)}`),typeof e.retryable==`boolean`&&t.push(`retryable=${e.retryable}`),process.stdout.write(` resolution: ${t.join(` `)}\n`)}function fr(e){e.ok&&e.warnings.length===0||te({component:`aventure-cli`,event:e.ok?`command_warning`:`command_failed`,message:e.warnings.length>0?e.warnings.join(` | `):e.summary,fields:{warningCount:e.warnings.length,summary:e.summary}})}function pr(e,t,n=m().bin[0]){let r=t.length,i=mt(e.q?.trim()??``),a=at(i),o=ct(i),s=gr(t,n).filter(t=>br(t,e)).map(e=>({operation:e,score:Sr(i,a,o,e)})).filter(({score:e})=>i===``||e>0).toSorted((e,t)=>t.score-e.score||e.operation.cli.command.localeCompare(t.operation.cli.command)||e.operation.operationId.localeCompare(t.operation.operationId)).map(({operation:e})=>e),c=Dr(e.limit,s.length),l=s.slice(0,c);return S(`Operation catalog matches`,{operation:l,count:{totalOperations:r,matched:s.length,returned:l.length}})}function mr(e,t,n=m().bin[0]){let r=gr(t,n),i=e.operationId===void 0?hr(r,e.command):r.find(t=>t.operationId===e.operationId);return i===void 0?x(`Generated operation not found`,[`List candidates with \`${n} command-catalog search "<text>"\`.`]):S(`Generated operation detail`,{operation:i,usage:Or(i)})}function hr(e,t){if(t===void 0)return;let n=Lr(t);return e.find(e=>Lr(e.cli.command)===n||e.cli.alias!==null&&Lr(e.cli.alias)===n)}function gr(e,t){return e.map(e=>{let n=e.requestBody??[],r=[...e.parameters.map(e=>_r(e)),...n.flatMap(e=>e.parameter.map(t=>_r(t,n.length>1?e.contentType:void 0))),...vr(n)],i=`${t} ${e.cliPath.join(` `)}`,a=e.cliAliasPath===void 0?null:`${t} ${e.cliAliasPath.join(` `)}`,o=ne(e.intent),s=e.method===`DELETE`||e.intent===`delete`,c=n[0];return{operationId:e.operationId,method:e.method,path:e.path,resource:e.resource,intent:e.intent,scope:e.scope,mutates:o,destructive:s,auth:e.auth,cli:{command:i,path:e.cliPath,alias:a,aliasPath:e.cliAliasPath??null},mcpTool:e.binaryResponse?null:l(e.intent),body:{hasBody:c!==void 0,kind:c?.kind??null,...c!==void 0&&n.length>1?{contentType:c.contentType}:{},required:c?.required??!1,description:c?.description??``,requiredPath:c?.requiredPath??[]},flags:r,errorResponse:e.errorResponse,summary:e.summary,description:e.description}})}function _r(e,t){let n=e.flag.split(/\s+/u);return{name:n[0]??e.flag,optionKey:e.optionKey,wireName:e.name,location:e.location,required:e.required,placeholder:n.length<=1?null:n.slice(1).join(` `),description:e.description,choices:e.choices??[],...t===void 0?{}:{contentType:t}}}function vr(e){if((e?.length??0)<=1)return[];let t=e?.map(({contentType:e})=>e)??[];return[{name:`--content-type`,optionKey:`contentType`,wireName:`Content-Type`,location:`body`,required:!1,placeholder:`<media-type>`,description:`Select the request content type; omit for ${t[0]}.`,choices:t}]}function yr(e){return e.flags.filter(({contentType:t})=>t===void 0||t===e.body.contentType)}function br(e,t){return!(t.root!==void 0&&!xr(e,t.root)||t.scope!==void 0&&t.scope!==`all`&&t.scope!==e.scope||t.mutates!==void 0&&t.mutates!==`any`&&t.mutates===`true`!==e.mutates||t.destructive!==void 0&&t.destructive!==`any`&&t.destructive===`true`!==e.destructive||t.intent!==void 0&&t.intent!==`all`&&t.intent!==e.intent||t.method!==void 0&&t.method!==`all`&&t.method!==e.method)}function xr(e,t){let n=mt(t);return n.length===0||mt(e.cli.path.at(0)??``)===n||mt(e.cli.aliasPath?.at(0)??``)===n}function Sr(e,t,n,r){if(e.length===0)return 1;let i=wr(r),a=Cr(e,t,i,{exactQuery:120,partialQuery:60,exactToken:18,partialToken:6})+Cr(e,t,Tr(r),{exactQuery:12,partialQuery:6,exactToken:2,partialToken:1});st(n,i)&&(a+=200);for(let e of r.cli.path){let n=new Set;pt(n,e),[...n].some(e=>t.has(e))&&(a+=15)}return mt(r.cli.command).endsWith(e)&&(a+=40),a}function Cr(e,t,n,r){let i=0;n.includes(e)&&(i+=r.exactQuery),n.some(t=>t.includes(e))&&(i+=r.partialQuery);for(let e of t)n.includes(e)?i+=r.exactToken:n.some(t=>t.includes(e))&&(i+=r.partialToken);return i}function wr(e){return Er([e.operationId,e.cli.command,e.cli.alias??``,e.summary])}function Tr(e){return Er([e.method,e.path,e.resource,e.intent,e.scope,e.mutates?`mutates mutation write`:`read only no mutation`,e.destructive?`destructive delete`:`non destructive`,e.mcpTool??``,e.body.kind??``,e.body.description,e.body.requiredPath.join(` `),e.description,...e.flags.flatMap(e=>[e.name,e.optionKey,e.wireName,e.description,e.choices.join(` `)])])}function Er(e){return e.map(mt).filter(e=>e.length>0)}function Dr(e,t){if(e===void 0)return t;let n=Number(e);return Number.isFinite(n)?Math.max(0,Math.trunc(n)):t}function Or(e){let t=yr(e),n=t.filter(e=>e.required),r=t.filter(e=>!e.required);return[`cli: ${e.cli.command}`,e.cli.alias===null?``:`alias: ${e.cli.alias}`,`${e.method} ${e.path}`,`operationId: ${e.operationId}`,`resource: ${e.resource}`,`intent: ${e.intent}`,`scope: ${e.scope}`,`mutates: ${e.mutates}`,`destructive: ${e.destructive}`,`mcpTool: ${e.mcpTool??`unavailable (binary CLI operation)`}`,e.body.hasBody?`body: kind=${e.body.kind??`unknown`} required=${e.body.required} requiredPath=${e.body.requiredPath.join(`,`)}`:`body: none`,R(`required path flags`,n,`path`),R(`required query flags`,n,`query`),R(`required header flags`,n,`header`),R(`required body flags`,n,`body`),R(`optional path flags`,r,`path`),R(`optional query flags`,r,`query`),R(`optional header flags`,r,`header`),R(`optional body flags`,r,`body`),...Nr(e),...kr(e.errorResponse),``,e.summary,e.description].filter(e=>e.length>0).join(`
3
+ `)}function kr(e){return e.length===0?[]:[`Errors:`,...e.map(({status:e,description:t})=>` ${e} ${t}`)]}var Ar=[`-id`,`-slug`,`-url`],jr=[`--id`,`--slug`,`--url`],Mr=`--from-file "<path>"`;function Nr(e){return[`example: ${[e.cli.command,...Pr(e),`--data`].join(` `)}`]}function Pr(e){let t=yr(e).filter(e=>e.required),n=(t.length>0?t:Fr(e)).map(Ir);return(e.body.required||e.body.requiredPath.length>0)&&!t.some(e=>e.location===`body`)?[...n,Mr]:n}function Fr(e){let t=new Set;pt(t,e.resource);for(let n of Ar)for(let r of t){let t=e.flags.find(e=>e.name===`--${r}${n}`);if(t!==void 0)return[t]}for(let t of jr){let n=e.flags.find(e=>e.name===t);if(n!==void 0)return[n]}return[]}function Ir(e){return e.placeholder===null?e.name:`${e.name} "${e.placeholder}"`}function R(e,t,n){let r=t.filter(e=>e.location===n);return`${e}: ${r.length===0?`none`:r.map(e=>e.name).join(` `)}`}function Lr(e){return e.trim().replace(/^aventure(?:-cli)?\s+/u,``).replaceAll(/\s+/gu,` `)}function Rr(e,t,n=m().bin[0]){e.helpCommand(!1);let r=e.commands.find(e=>e.name()===`help`)??e.command(`help`);r.summary(`Show command help, or ask the platform a grounded question`).description([`Show local --help output for a command path (deterministic, offline),`,`or answer a natural-language platform question with --ask via the grounded`,"help operation (the same generated operation as `help ask`)."].join(`
4
+ `)).argument(`[command...]`,"command path to show help for, e.g. `help search entities`");let i=Br(t);i!==void 0&&r.option(`--ask <question>`,i.summary),T(r),r.action(async function(t){let r=this.optsWithGlobals();if(i!==void 0&&r.ask!==void 0){let e=w(r);if(t.length>0){L({mode:e},x(`Use either a command path or --ask, not both.`));return}L({mode:e},await Hr(i,r.ask,r.environment,e));return}let a=Vr(e,t);a===void 0&&this.error(`unknown command '${t.join(` `)}' (run \`${n} --help\` for the command tree)`),a.outputHelp()}),zr(e,t)}function zr(e,t){let n=new Set;for(let r of t){let t=kr(r.errorResponse);if(t.length!==0)for(let i of[r.cliPath,r.cliAliasPath]){let r=i===void 0?void 0:Vr(e,i);r===void 0||n.has(r)||(n.add(r),r.addHelpText(`after`,`\n${t.join(`
5
+ `)}\n`))}}}function Br(e){let[t,...n]=e.filter(e=>{let[t,n,r]=e.cliPath;return t===`help`&&n!==void 0&&r===void 0&&Ur(e)!==void 0});return n.length===0?t:void 0}function Vr(e,t){let n=e;for(let e of t){let t=n.commands.find(t=>t.name()===e||t.aliases().includes(e));if(t===void 0)return;n=t}return n}async function Hr(e,t,n,r){let i=Ur(e);if(i===void 0)return x(`The \`${e.cliPath.join(` `)}\` operation no longer takes a single required text body; run it directly instead of \`help --ask\`.`);n!==void 0&&(process.env.API_ENV=n);let a=await Vn(e,{[i.optionKey]:t});return a.ok?await b({method:e.method,path:_e(e.operationId,{}),searchParams:{},body:a.data,auth:e.auth,responseFormat:ze(r)?`json`:`auto`}):a}function Ur(e){if(e.requestBody?.length!==1||e.parameters.some(e=>e.required))return;let t=(e.requestBody[0]?.parameter??[]).filter(e=>e.required);return t.length===1&&t[0]?.schemaType===`string`?t[0]:void 0}var Wr=`search`,Gr=`mode`,Kr=`--mode`;function qr(e,t){let n=e.commands.find(e=>e.name()===Wr);if(n===void 0)return;let r=new Map;for(let e of t){let[t,n,i]=e.cliPath;if(t!==Wr||n===void 0||i!==void 0)continue;let a=[...e.parameters,...e.requestBody?.flatMap(({parameter:e})=>e)??[]].find(e=>e.optionKey===Gr);a?.choices!==void 0&&r.set(n,a.choices)}if(r.size===0)return;let i=[...new Set([...r.values()].flat())];n.addOption(new u(`${Kr} <mode>`,`search strategy, forwarded to the scope command's generated --mode option`).choices(i).argParser((e,t)=>{if(t!==void 0)throw new _(`${Kr} was already given; pass it once.`);if(!i.includes(e))throw new _(`${Kr} must be one of: ${i.join(`, `)}.`);return e})),n.hook(`preSubcommand`,(e,t)=>{let n=e.opts()[Gr];typeof n==`string`&&(r.has(t.name())||e.error(`${Kr} is not supported by 'search ${t.name()}'`),t.setOptionValueWithSource(Gr,n,`cli`))})}var Jr=a({artifact:e().nullish(),group:e().nullish(),name:e().nullish(),revision:e().nullish(),time:i({offset:!0}).nullish(),version:e().nullish()}),Yr=a({build:Jr});function z(e,t){let[n,r]=e.filter(e=>e.role===t);if(n===void 0||r!==void 0)throw Error(`Generated composite CLI role '${t}' is incomplete`);return n}var Xr=r([`MACOS`,`LINUX`,`WINDOWS`,`OTHER`]),Zr=r([`RSA_OAEP_256_A256_GCM_V1`]),Qr=a({clientLabel:e().regex(/.*\S.*/).min(1).max(120).nullish(),clientPlatform:Xr.nullish(),encryptionAlgorithm:Zr.nullish(),encryptionPublicKey:e().min(344).max(12e3).nullish()}),$r=32;async function ei(){let e=await St.subtle.generateKey({name:`RSA-OAEP`,modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:`SHA-256`},!0,[`encrypt`,`decrypt`]),t=await St.subtle.exportKey(`spki`,e.publicKey);return{publicKey:Buffer.from(t).toString(`base64`),privateKey:e.privateKey}}async function ti(e,t){let{wrappedKey:n,nonce:r,ciphertext:i,authenticationTag:a}=t,o=ni(n,`wrapped key`,128,1024),s=ni(r,`nonce`,12,12),c=ni(i,`ciphertext`,1,65536),l=ni(a,`authentication tag`,16,16),u;try{u=await St.subtle.decrypt({name:`RSA-OAEP`},e,o)}catch{throw Error(`broker credential key could not be decrypted`)}let d=new Uint8Array(u);try{if(d.byteLength!==$r)throw Error(`broker credential used an invalid AES-256 key`);let e=await St.subtle.importKey(`raw`,d,{name:`AES-GCM`},!1,[`decrypt`]),t=new Uint8Array(c.byteLength+l.byteLength);t.set(c),t.set(l,c.byteLength);let n;try{n=await St.subtle.decrypt({name:`AES-GCM`,iv:s,tagLength:128},e,t)}catch{throw Error(`broker credential payload failed authentication`)}let r=new Ut(`utf-8`,{fatal:!0}).decode(n);if(r.trim().length===0)throw Error(`broker returned a blank credential`);return r}finally{d.fill(0)}}function ni(e,t,n,r){let i=e.replace(/=+$/u,``),a=Uint8Array.from(Buffer.from(e,`base64`)),o=Buffer.from(a).toString(`base64`).replace(/=+$/u,``);if(i.length===0||o!==i||a.byteLength<n||a.byteLength>r)throw Error(`broker returned an invalid ${t}`);return a}var ri=2;function ii(e,t){return si(e,t).redactedUrl}async function ai(e,t,n){let r=si(e,t);return await oi(new URL(r.openerUrl),n)}async function oi(e,t){let n=t.environment??process.env,r=t.operatingSystem??Et(),i=ci(t.noBrowser,n,r);if(i!==null)return{state:`skipped`,reason:i};let a=li(r,e.toString());if(a===null)return{state:`failed`,reason:`unsupported browser-opening platform: ${r}`};try{return await ui(a.command,a.arguments),{state:`opened`,reason:null}}catch{return{state:`failed`,reason:`browser opener failed`}}}function si(e,t){let{id:n,verificationUrl:r,pollSecret:i}=e,a,o;try{a=new URL(r),o=new URL(t)}catch{throw Error(`broker returned an invalid browser verification URL`)}if(o.username.length>0||o.password.length>0||o.pathname!==`/`||o.search.length>0||o.hash.length>0)throw Error(`configured browser origin must contain only an origin`);let s=Ne(o.hostname);if(o.protocol!==`https:`&&!(o.protocol===`http:`&&s))throw Error(`configured browser origin must use HTTPS except for loopback development`);let c=new URLSearchParams(a.hash.slice(1)),l=[...c.keys()],u=c.getAll(`cliAuthorizationId`),d=c.getAll(`browserSecret`),f=d[0]??``;if(a.origin!==o.origin||a.protocol!==o.protocol||a.username.length>0||a.password.length>0||a.pathname!==`/settings/developer`||a.search.length>0||l.length!==ri||u.length!==1||u[0]!==n||d.length!==1||f.length===0||i.length===0||f===i)throw Error(`broker returned a browser verification URL outside the configured first-party approval flow`);let p;try{p=decodeURIComponent(r)}catch{throw Error(`broker returned a browser verification URL outside the configured first-party approval flow`)}if(r.includes(i)||p.includes(i))throw Error(`broker returned a browser verification URL outside the configured first-party approval flow`);let m=new URL(a);return m.hash=new URLSearchParams({cliAuthorizationId:n,browserSecret:`<redacted>`}).toString(),{openerUrl:r,redactedUrl:m.toString()}}function ci(e,t,n){return e?`--no-browser was set`:n===`darwin`&&t.CODEX_SESSION_ID?`macOS Codex browser process boundary`:t.SSH_CONNECTION||t.SSH_CLIENT||t.SSH_TTY?`SSH/headless session detected`:(n===`linux`||n===`freebsd`)&&!t.DISPLAY&&!t.WAYLAND_DISPLAY?`no graphical display detected`:null}function li(e,t){return e===`darwin`?{command:`open`,arguments:[t]}:e===`win32`?{command:`rundll32.exe`,arguments:[`url.dll,FileProtocolHandler`,t]}:e===`linux`||e===`freebsd`?{command:`xdg-open`,arguments:[t]}:null}function ui(e,t){return new Promise((n,r)=>{_t(e,[...t],{timeout:5e3,windowsHide:!0},e=>e?r(e):n())})}var di=r([`PENDING`,`ISSUING`,`KEY_READY`,`REVOKING`,`CONSUMED`,`REVOKED`,`DENIED`,`EXPIRED`,`FAILED`]),fi=r([`Denied by user`,`Authorization request expired`,`CLI authorization expired before acknowledgement`,`Credential issuance recovery revoked an unrecoverable key`,`Revoked by user`,`Clerk create response validation failed`,`Credential issuance failed`,`Credential issuance could not be recovered`,`Personal API-key quota reached`,`Credential issuance lost its database claim`,`Credential delivery encryption failed`,`Credential issuance finalization was lost`]),pi=a({approvedAt:i({offset:!0}).nullish(),clientLabel:e(),clientPlatform:Xr,comparisonCode:e(),consumedAt:i({offset:!0}).nullish(),createdAt:i({offset:!0}),expiresAt:i({offset:!0}),id:t(),intervalSeconds:n().int().min(1),keyReadyAt:i({offset:!0}).nullish(),status:di,terminalAt:i({offset:!0}).nullish(),terminalReason:fi.nullish(),updatedAt:i({offset:!0})}),mi=a({algorithm:Zr,authenticationTag:e(),ciphertext:e(),nonce:e(),wrappedKey:e()}),hi=a({delivery:mi.nullish(),expiresAt:i({offset:!0}),status:di,terminalReason:fi.nullish()}),gi=a({comparisonCode:e(),expiresAt:i({offset:!0}),id:t(),intervalSeconds:n().int().min(1),pollSecret:e(),verificationUrl:e()}),B=[{command:`auth login`,role:`oauth`,summary:`Get the public authentication provider catalog`,description:`Sign-in provider availability and CLI OAuth configuration. Public — callers read it before any session exists. A non-null Clerk publishable key offers browser sign-in; a non-null OAuth client offers the PKCE CLI sign-in lane.`,operationId:`getAuthProviderCatalog`,method:`GET`,path:`/v1/auth/providers`,bodyOption:[],localOption:[{optionKey:`browser`,flag:`--no-browser`,description:`Print the authorization URL without opening a browser.`}]},{command:`auth personal-login`,role:`start`,summary:`Start CLI authorization`,description:`Creates a short-lived browser approval request and returns its poll credential once.`,operationId:`createCliAuthorization`,method:`POST`,path:`/v1/auth/cli-authorizations`,bodyOption:[{name:`clientLabel`,optionKey:`clientLabel`,flag:`--client-label <client-label>`,required:!1,description:`Label for this CLI installation.`}],localOption:[{optionKey:`browser`,flag:`--no-browser`,description:`Print the approval URL without launching a browser.`}]},{command:`auth personal-login`,role:`poll`,summary:`Poll CLI authorization`,description:`Returns pending state, a terminal state, or an encrypted one-time credential delivery.`,operationId:`pollCliAuthorization`,method:`POST`,path:`/v1/auth/cli-authorizations/{cliAuthorizationId}/poll`,bodyOption:[],localOption:[]},{command:`auth personal-login`,role:`acknowledge`,summary:`Acknowledge CLI credential delivery`,description:`Confirms the CLI stored the delivered personal key in its OS credential store and clears transient delivery material.`,operationId:`acknowledgeCliAuthorization`,method:`POST`,path:`/v1/auth/cli-authorizations/{cliAuthorizationId}/acknowledge`,bodyOption:[],localOption:[]},{command:`auth personal-logout`,role:`revoke`,summary:`Revoke current personal API key`,description:`Revokes the stored personal key and returns provider metadata so the CLI can confirm remote revocation before removing local bytes.`,operationId:`revokeCurrentPersonalApiKey`,method:`DELETE`,path:`/v1/auth/personal-api-key`,bodyOption:[],localOption:[{optionKey:`forgetLocal`,flag:`--forget-local`,description:`Remove local bytes even when remote revocation cannot be confirmed.`}]}],_i=z(B,`start`),vi=z(B,`poll`),yi=z(B,`acknowledge`),bi=class extends Error{httpStatus;retryAfterSeconds;retryable;constructor(e,t,n=[]){super(`CLI authorization ${e} failed: ${je(t,n)}`),this.name=`CliAuthorizationRequestError`,this.httpStatus=t.status,this.retryAfterSeconds=Ei(t.retryAfterSeconds),this.retryable=t.status>=500||t.status===429}},xi=class extends Error{constructor(e,t,n=[]){super(`CLI authorization ${e} transport failed: ${C(t,n)}`,{cause:t}),this.name=`CliAuthorizationTransportError`}};async function Si(e){let t=await fe(Fe(s()),{method:_i.method,path:ve(_i.path,{},_i.operationId),headers:{},contentType:`application/json`,body:e},gi);if(!t.ok)throw new bi(`start`,t.problem);return Di(t.data)}async function Ci(e,t){let n=xe(vi.operationId),r=await fe(Fe(s()),{method:vi.method,path:ve(vi.path,{cliAuthorizationId:e},vi.operationId),headers:{[n]:t}},hi);if(!r.ok)throw new bi(`poll`,r.problem,[t]);return{authorization:r.data,retryAfterSeconds:Ti(r.headers[`retry-after`])}}async function wi(e,t){let n=xe(yi.operationId),r;try{r=await fe(Fe(s()),{method:yi.method,path:ve(yi.path,{cliAuthorizationId:e},yi.operationId),headers:{[n]:t}},pi)}catch(e){throw new xi(`acknowledge`,e,[t])}if(!r.ok)throw new bi(`acknowledge`,r.problem,[t]);return r.data}function Ti(e){if(e===void 0)return null;let t=Number(e);return Number.isInteger(t)&&t>0?t:null}function Ei(e){return typeof e==`number`&&Number.isInteger(e)&&e>0?e:null}function Di(e){let{verificationUrl:t,pollSecret:n,...r}=e,i={...e},a=()=>({...r,verificationUrl:`<redacted>`,pollSecret:`<redacted>`});return Object.defineProperties(i,{verificationUrl:{enumerable:!1,get:()=>t},pollSecret:{enumerable:!1,get:()=>n},toJSON:{enumerable:!1,value:a},toString:{enumerable:!1,value:()=>`CliAuthorizationStart(${JSON.stringify(a())})`},[Wt.custom]:{enumerable:!1,value:a}})}async function Oi(e){let t=Fe(s()),n;try{n=await fe(t,{method:`GET`,path:_e(`getCurrentPersonalApiKey`,{}),headers:{Authorization:`Bearer ${e}`}},Ie)}catch(t){return{state:`unavailable`,summary:`identity verification failed before an HTTP response — ${C(t,[e])}`}}return n.ok?n.data.status===`ACTIVE`?{state:`verified`,summary:`personal API-key metadata verified`,apiKey:n.data}:{state:`invalid`,summary:`personal API-key self metadata is not active`}:{state:n.problem.status===401||n.problem.status===403?`invalid`:`unavailable`,summary:`identity verification: ${je(n.problem,[e])}`}}var ki=z(B,`revoke`);async function Ai(e){let t;try{t=Re(s().host)}catch(e){return x(`auth personal-logout: invalid API host — ${C(e)}`)}let n;try{n=await Be(t)}catch(e){return x(`auth personal-logout: stored credential could not be read — ${C(e)}`)}if(n.state===`unavailable`)return x(`auth personal-logout: ${n.summary}`);if(n.state===`missing`)return S(`No personal CLI credential is stored for this API host.`,{host:t,revoked:!1,forgotten:!1});let r=n.stored,i=await ji(r),a=i.outcome===`revoked`,o=r.activation===`pending`&&i.outcome===`rejected`;if(!a&&!o&&!e.forgetLocal)return{...x(`auth personal-logout: remote revocation was not confirmed; local credential preserved — ${i.summary}`,[`Retry when the API is available. If an earlier response was lost after revocation, the retry can be unauthorized because revoked keys cannot authenticate.`,"Use `--forget-local` only to remove local bytes while accepting that the remote key may remain active."]),data:Mi(r,!1,!1)};try{await et(r.host)}catch(e){return{...x(`auth personal-logout: local credential removal failed — ${C(e,[r.credential.secret])}`,[a?"The remote key is revoked. Re-run with `--forget-local` to retry local cleanup.":`Remote revocation was not confirmed; inspect auth status before retrying.`]),data:Mi(r,a,!1)}}return S(a?`Personal CLI credential revoked remotely and removed locally.`:o?`Stale pending CLI credential removed; its remote key can no longer authenticate and unacknowledged keys expire at the authorization deadline.`:`Personal CLI credential removed locally without confirmed remote revocation.`,Mi(r,a,!0),{ids:[r.credential.apiKey.id],warnings:a||o?[]:[`Remote revocation was not confirmed; the personal key may remain active.`]})}async function ji(e){let t=Fe(s());try{let n=await fe(t,{method:ki.method,path:ve(ki.path,{},ki.operationId),headers:{Authorization:`Bearer ${e.credential.secret}`}},Ie);return n.ok?n.data.id!==e.credential.apiKey.id||n.data.subject!==e.credential.apiKey.subject?{outcome:`unconfirmed`,summary:`remote response did not match the stored personal key identity`}:n.data.status===`REVOKED`?{outcome:`revoked`,summary:`remote key revocation confirmed`}:{outcome:`unconfirmed`,summary:`remote response did not confirm REVOKED status`}:{outcome:n.problem.status===401&&n.problem.type!==`about:blank`?`rejected`:`unconfirmed`,summary:je(n.problem,[e.credential.secret])}}catch(t){return{outcome:`unconfirmed`,summary:C(t,[e.credential.secret])}}}function Mi(e,t,n){return{host:e.host,personalApiKeyId:e.credential.apiKey.id,activation:e.activation,revoked:t,forgotten:n}}var Ni=`RSA_OAEP_256_A256_GCM_V1`,Pi=1,Fi=30,Ii=m().bin[0],Li=864e5,Ri=`The local record remains pending and unavailable to ordinary commands. Re-run \`${Ii} auth personal-login\`; it recovers the credential when the broker acknowledged it, and otherwise clears the stale record.`;async function zi(e){if(!kt.isTTY)return x(`${Ii} auth personal-login requires an interactive TTY on stdin`,[`For non-interactive automation, inject CLIENT_SECRET, ADMIN_API_KEY, or AUTH_TOKEN through the environment or configured Doppler source.`]);let t,n;try{let e=s().host;t=Re(e),n=Me(e)}catch(e){return x(`auth personal-login: invalid environment configuration — ${C(e)}`)}for(;;){let e;try{e=await rt(t)}catch(e){return x(`auth personal-login: credential storage could not be inspected — ${C(e)}`)}if(e.state===`unavailable`)return x(`auth personal-login: ${e.summary}`,[`Unlock OS credential storage, or use CLIENT_SECRET, ADMIN_API_KEY, or AUTH_TOKEN from the environment in a headless session.`]);if(e.state===`missing`)break;let n=await Bi(e.stored);if(n!==null)return n}let r;try{r=await ei()}catch(e){return x(`auth personal-login: ephemeral encryption key could not be created — ${C(e)}`)}let i=Qr.safeParse({clientLabel:e.clientLabel?.trim()||(Tt().trim()||`aventure-cli`).slice(0,120),clientPlatform:Wi(),encryptionAlgorithm:Ni,encryptionPublicKey:r.publicKey});if(!i.success)return x(`auth personal-login: local authorization input is invalid`);let a;try{a=await Si(i.data)}catch(e){return x(`auth personal-login: could not start browser authorization — ${C(e)}`)}let o;try{o=ii(a,n)}catch(e){return x(`auth personal-login: unsafe browser authorization URL rejected — ${C(e)}`)}if(!Ui(await ai(a,n,{noBrowser:e.noBrowser}),a,o))return x(`auth personal-login: browser authorization requires an interactive terminal for manual handoff`,[`Automatic browser opening did not complete, and the approval URL was withheld because stderr is not an interactive terminal. Retry from an interactive terminal.`],{references:[o]});let c;try{c=await Hi(a)}catch(e){return x(`auth personal-login: authorization did not complete — ${C(e)}`,[],{references:[o]})}if(c.algorithm!==Ni)return x(`auth personal-login: broker selected an unsupported encryption algorithm`);let l;try{l=await ti(r.privateKey,c)}catch(e){return x(`auth personal-login: encrypted credential could not be opened — ${C(e)}`)}let u=await Oi(l);if(u.state!==`verified`)return x(`auth personal-login: decrypted credential was neither stored nor acknowledged — ${u.summary}`);let d;try{d=await nt(t,{apiKey:u.apiKey,secret:l},`pending`)}catch(e){return x(`auth personal-login: credential could not be durably stored — ${C(e)}`)}let f;try{f=await Vi(a)}catch(e){return V(d,!0,`auth personal-login: credential was stored and verified, but broker acknowledgment was not confirmed — ${C(e,[a.pollSecret])}`,Ri)}if(f.status!==`CONSUMED`)return V(d,!0,`auth personal-login: broker returned ${f.status} after acknowledgment`,Ri);let p;try{p=await nt(t,d.credential,`active`)}catch(e){return V(d,!0,`auth personal-login: remote acknowledgment succeeded, but local activation could not be confirmed — ${C(e)}`,Ri)}return S(`Personal CLI credential stored; authenticated identity and broker acknowledgment verified.`,qi(p,!0),{ids:[p.credential.apiKey.id]})}async function Bi(e){let t=await Oi(e.credential.secret);if(e.activation!==`pending`)return t.state===`verified`?S(`Personal CLI credential is already stored and its authenticated identity was verified.`,qi(e,!0),{ids:[e.credential.apiKey.id]}):V(e,!1,`auth personal-login: stored credential ${t.state} — ${t.summary}`,`Run \`${Ii} auth personal-logout\` to revoke/remove it before authorizing a replacement.`);if(t.state===`verified`&&Ji(t.apiKey))try{let n=await nt(e.host,{apiKey:t.apiKey,secret:e.credential.secret},`active`);return S(`Recovered pending CLI credential: broker acknowledgment had succeeded.`,qi(n,!0),{ids:[n.credential.apiKey.id]})}catch(t){return V(e,!0,`auth personal-login: credential is valid but could not be promoted locally — ${C(t,[e.credential.secret])}`,`The remote key remains valid. Re-run \`${Ii} auth personal-login\` to retry local activation; it will recover the pending credential automatically.`)}if(t.state===`unavailable`)return V(e,!1,`auth personal-login: the stored pending credential could not be verified — ${t.summary}`,`The stored record and the remote key were both preserved. Re-run \`${Ii} auth personal-login\` when the API is reachable; it recovers an acknowledged credential and clears an unacknowledged one.`);let n=await ji(e);if(n.outcome===`unconfirmed`)return V(e,!1,`auth personal-login: a prior credential is durably stored but broker acknowledgment was not confirmed`,`Remote revocation of the stale pending key was not confirmed — ${n.summary}. Retry when the API is reachable.`);try{await et(e.host)}catch(t){return V(e,!1,`auth personal-login: stale pending credential could not be removed — ${C(t,[e.credential.secret])}`)}return j.write(n.outcome===`revoked`?`Revoked and cleared a stale pending CLI credential; starting a fresh browser authorization.
6
+ `:`Cleared a stale pending CLI credential whose remote key can no longer authenticate; starting a fresh browser authorization.
7
+ `),null}async function Vi(e){let t=new Date(e.expiresAt).getTime(),n=Gi(e.intervalSeconds);for(;;)try{return await wi(e.id,e.pollSecret)}catch(e){if(e instanceof bi){if(!e.retryable)throw e;n=Gi(e.retryAfterSeconds??n)}else if(!(e instanceof xi))throw e;if(Date.now()>=t)throw e;j.write(`Broker acknowledgment was interrupted; retrying.
8
+ `),await Ki(n,t)}}async function Hi(e){let t=new Date(e.expiresAt).getTime(),n=Gi(e.intervalSeconds),r;for(j.write(`Waiting for browser approval...
9
+ `);Date.now()<t;){let i;try{i=await Ci(e.id,e.pollSecret)}catch(e){if(e instanceof bi){if(!e.retryable)throw e;n=Gi(e.retryAfterSeconds??n)}r=e,j.write(`Authorization poll was interrupted; retrying.
10
+ `),await Ki(n,t);continue}r=void 0;let a=i.authorization;switch(a.status){case`PENDING`:case`ISSUING`:case`REVOKING`:n=Gi(i.retryAfterSeconds??n),await Ki(n,t);break;case`KEY_READY`:if(a.delivery===null||a.delivery===void 0)throw Error(`broker returned KEY_READY without an encrypted delivery`);return a.delivery;case`DENIED`:case`EXPIRED`:case`FAILED`:throw Error(de(a.terminalReason?.trim()??``,[e.pollSecret])||`broker entered terminal state ${a.status}`);case`CONSUMED`:throw Error(`broker credential was already consumed; restart login`)}}throw Error(r===void 0?`browser authorization expired before approval completed`:`browser authorization expired after a retryable broker failure: ${C(r,[e.pollSecret])}`)}function Ui(e,t,n){let r=e.state===`opened`;return!r&&!j.isTTY?!1:(j.write([...r?[`Browser approval opened for this request.`,`Approval reference: ${n}`]:[`Browser not opened automatically (${e.reason}).`,`Open this one-time approval URL in your browser:`,t.verificationUrl],`Comparison code: ${t.comparisonCode}`,`Confirm that the browser shows the same code before approving.`,``].join(`
11
+ `)),!0)}function Wi(){switch(Et()){case`darwin`:return`MACOS`;case`linux`:return`LINUX`;case`win32`:return`WINDOWS`;default:return`OTHER`}}function Gi(e){return Math.min(Fi,Math.max(Pi,e))}async function Ki(e,t){let n=t-Date.now();n>0&&await Kt(Math.min(e*1e3,n))}function qi(e,t){return{host:e.host,provider:`keyring`,personalApiKeyId:e.credential.apiKey.id,name:de(e.credential.apiKey.name,[e.credential.secret]),activation:e.activation,verified:t}}function V(e,t,n,r){return{...x(n,r===void 0?[]:[r]),data:qi(e,t)}}function Ji(e){return e.expiresAt===null||e.expiresAt===void 0?!1:new Date(e.expiresAt).getTime()-new Date(e.createdAt).getTime()>Li}function Yi(e){return[`client_secret_basic`,`client_secret_post`,`none`].includes(e)}var Xi=`code`,Zi=`S256`;function Qi(e,t){let n=e.client_secret!==void 0;return`token_endpoint_auth_method`in e&&e.token_endpoint_auth_method&&Yi(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?`client_secret_basic`:`none`:n&&t.includes(`client_secret_basic`)?`client_secret_basic`:n&&t.includes(`client_secret_post`)?`client_secret_post`:t.includes(`none`)?`none`:n?`client_secret_post`:`none`}function $i(e,t,n,r){let{client_id:i,client_secret:a}=t;switch(e){case`client_secret_basic`:ea(i,a,n);return;case`client_secret_post`:ta(i,a,r);return;case`none`:na(i,r);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function ea(e,t,n){if(!t)throw Error(`client_secret_basic authentication requires a client_secret`);let r=btoa(`${e}:${t}`);n.set(`Authorization`,`Basic ${r}`)}function ta(e,t,n){n.set(`client_id`,e),t&&n.set(`client_secret`,t)}function na(e,t){t.set(`client_id`,e)}async function ra(e){let t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{let{error:e,error_description:t,error_uri:r}=Se.parse(JSON.parse(n));return new(ft[e]||lt)(t||``,r)}catch(e){let r=`${t?`HTTP ${t}: `:``}Invalid OAuth error response: ${e}. Raw body: ${n}`;return new lt(r)}}async function ia(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?ia(e,void 0,n):void 0;throw r}}function aa(e){let t=typeof e==`string`?new URL(e):e,n=t.pathname!==`/`,r=[];if(!n)return r.push({url:new URL(`/.well-known/oauth-authorization-server`,t.origin),type:`oauth`}),r.push({url:new URL(`/.well-known/openid-configuration`,t.origin),type:`oidc`}),r;let i=t.pathname;return i.endsWith(`/`)&&(i=i.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${i}`,t.origin),type:`oauth`}),r.push({url:new URL(`/.well-known/openid-configuration${i}`,t.origin),type:`oidc`}),r.push({url:new URL(`${i}/.well-known/openid-configuration`,t.origin),type:`oidc`}),r}async function oa(e,{fetchFn:t=fetch,protocolVersion:n=it}={}){let r={"MCP-Protocol-Version":n,Accept:`application/json`},i=aa(e);for(let{url:e,type:n}of i){let i=await ia(e,r,t);if(i){if(!i.ok){if(await i.body?.cancel(),i.status>=400&&i.status<500)continue;throw Error(`HTTP ${i.status} trying to load ${n===`oauth`?`OAuth`:`OpenID provider`} metadata from ${e}`)}return n===`oauth`?ge.parse(await i.json()):pe.parse(await i.json())}}}async function sa(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:i,state:a,resource:o}){let s;if(t){if(s=new URL(t.authorization_endpoint),!t.response_types_supported.includes(Xi))throw Error(`Incompatible auth server: does not support response type ${Xi}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(Zi))throw Error(`Incompatible auth server: does not support code challenge method ${Zi}`)}else s=new URL(`/authorize`,e);let c=await ot(),l=c.code_verifier,u=c.code_challenge;return s.searchParams.set(`response_type`,Xi),s.searchParams.set(`client_id`,n.client_id),s.searchParams.set(`code_challenge`,u),s.searchParams.set(`code_challenge_method`,Zi),s.searchParams.set(`redirect_uri`,String(r)),a&&s.searchParams.set(`state`,a),i&&s.searchParams.set(`scope`,i),i?.includes(`offline_access`)&&s.searchParams.append(`prompt`,`consent`),o&&s.searchParams.set(`resource`,o.href),{authorizationUrl:s,codeVerifier:l}}function ca(e,t,n){return new URLSearchParams({grant_type:`authorization_code`,code:e,code_verifier:t,redirect_uri:String(n)})}async function la(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:a,fetchFn:o}){let s=t?.token_endpoint?new URL(t.token_endpoint):new URL(`/token`,e),c=new Headers({"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`});a&&n.set(`resource`,a.href),i?await i(c,n,s,t):r&&$i(Qi(r,t?.token_endpoint_auth_methods_supported??[]),r,c,n);let l=await(o??fetch)(s,{method:`POST`,headers:c,body:n});if(!l.ok)throw await ra(l);return be.parse(await l.json())}async function ua(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:i,redirectUri:a,resource:o,addClientAuthentication:s,fetchFn:c}){return la(e,{metadata:t,tokenRequestParams:ca(r,i,a),clientInformation:n,addClientAuthentication:s,resource:o,fetchFn:c})}async function da(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:a,fetchFn:o}){return{refresh_token:r,...await la(e,{metadata:t,tokenRequestParams:new URLSearchParams({grant_type:`refresh_token`,refresh_token:r}),clientInformation:n,addClientAuthentication:a,resource:i,fetchFn:o})}}var fa=3e5;async function pa(e,t){if(!kt.isTTY){let e=t??m().bin[0];return x(`${e} auth login requires an interactive TTY on stdin`,[`Use AUTH_TOKEN for non-interactive automation.`])}let n;try{n=tt(s().host)}catch(e){return x(`auth login: invalid API host — ${C(e)}`)}let r=await Ae(n);if(r.state===`missing`)return H(n,e);if(r.state===`unavailable`)return x(`auth login: ${r.summary}`);if(r.state===`invalid`)return H(n,e,`Saved OAuth credential cannot be read — ${r.summary}`);let{stored:i}=r;if(Pe(i.credential))return await ma(i,e);let a;try{a=await we(i.credential.tokens.access_token,ya(i.credential.client))!==null}catch(t){return t instanceof se?H(n,e,`Saved OAuth credential was rejected`):x(`auth login: saved OAuth credential could not be verified — ${C(t,qe(i.credential.tokens))}`)}return a?S(`OAuth CLI access token is already stored and verified.`,Ta(i)):H(n,e,`Saved OAuth credential was rejected`)}async function ma(e,t){let n=await De(e.host);if(n.state===`unavailable`)return x(`auth login: ${n.summary}`);let{client:r,tokens:i}=e.credential;if(i.refresh_token===void 0)return H(e.host,t,`Saved OAuth access token expired`,n);let a;try{let e=await ha(r);a=await da(va(r),{metadata:e,clientInformation:{client_id:Sa(r)},refreshToken:i.refresh_token,resource:ya(r)})}catch(r){return H(e.host,t,`Saved OAuth credential could not be renewed — ${C(r,qe(i))}`,n)}let o=await ga(r,a);return o.state===`failed`?x(`auth login: ${o.summary}`):o.state===`rejected`?H(e.host,t,`Renewed OAuth access token was rejected`,n):await _a(e.host,o.credential,`OAuth CLI access token renewed and verified.`)}async function H(e,t,n,r){let i=r??await De(e);if(i.state===`unavailable`)return x(`auth login: ${i.summary}`);n!==void 0&&j.write(`${n}; continuing to browser sign-in.\n`);let a;try{let e=await fe(Fe(s()),{method:`GET`,path:_e(`getAuthProviderCatalog`,{}),headers:{}},ht);if(!e.ok)throw Error(`provider catalog request failed: ${je(e.problem)}`);let t=e.data.oauthClient;if(t==null)throw Error(`the API does not advertise an OAuth CLI client`);a=t}catch(e){return x(`auth login: OAuth configuration is unavailable — ${C(e)}`)}let o;try{o=await ha(a)}catch(e){return x(`auth login: OAuth authorization-server discovery failed — ${C(e)}`)}let c=bt(32).toString(`base64url`),l;try{l=await wa(xa(a),c);let n=await sa(va(a),{metadata:o,clientInformation:{client_id:Sa(a)},redirectUrl:l.redirectUri,resource:ya(a),scope:Ca(a).join(` `),state:c}),r=await oi(n.authorizationUrl,{noBrowser:t.noBrowser});if(r.state!==`opened`&&!j.isTTY)return x(`auth login: browser authorization requires an interactive terminal for manual handoff`);j.write(r.state===`opened`?`Browser sign-in opened. Waiting for the loopback callback...
12
+ `:`Browser not opened automatically (${r.reason}).\nOpen this OAuth sign-in URL in your browser:\n${n.authorizationUrl.toString()}\n\n`);let i=await l.waitForAuthorizationCode();if(i.state===`timed-out`)return x(`auth login: browser authorization timed out before the loopback callback arrived`);if(i.state===`failed`)return x(`auth login: ${i.message}`);let s;try{s=await ua(va(a),{metadata:o,clientInformation:{client_id:Sa(a)},authorizationCode:i.authorizationCode,codeVerifier:n.codeVerifier,redirectUri:l.redirectUri,resource:ya(a)})}catch(e){return x(`auth login: OAuth token exchange failed — ${C(e,[i.authorizationCode,n.codeVerifier])}`)}let u=await ga(a,s);return u.state===`failed`?x(`auth login: ${u.summary}`):u.state===`rejected`?x(`auth login: OAuth access token was rejected and was not stored`):await _a(e,u.credential,`OAuth CLI access token stored and verified.`)}catch(e){return x(`auth login: OAuth browser authorization failed — ${C(e)}`)}finally{await l?.close()}}async function ha(e){let t=await oa(va(e));if(t===void 0||t.issuer!==e.authorizationServer)throw Error(`OAuth authorization-server metadata issuer must match its configured server`);if(!t.response_types_supported.includes(`code`)||t.code_challenge_methods_supported?.includes(`S256`)!==!0)throw Error(`OAuth authorization-server metadata must advertise authorization-code and PKCE S256 support`);return ba(t.authorization_endpoint,`authorization endpoint`,!0),ba(t.token_endpoint,`token endpoint`,!0),t}async function ga(e,t){let n;try{n=Le(e,t)}catch(e){return{state:`failed`,summary:`OAuth token response is invalid — ${C(e,qe(t))}`}}let r;try{r=await we(n.tokens.access_token,ya(n.client))!==null}catch(e){return e instanceof se?{state:`rejected`}:{state:`failed`,summary:`OAuth access token could not be verified — ${C(e,qe(n.tokens))}`}}return r?{state:`accepted`,credential:n}:{state:`rejected`}}async function _a(e,t,n){try{let r=await Ke(e,t);return S(n,Ta(r))}catch(e){return x(`auth login: OAuth credential could not be durably stored — ${C(e,qe(t.tokens))}`)}}function va(e){return ba(e.authorizationServer,`authorization server`)}function ya(e){return ba(e.resource,`resource`)}function ba(e,t,n=!1){let r;try{r=new URL(e)}catch(e){throw Error(`OAuth ${t} is not a valid URL`,{cause:e})}if(r.protocol!==`https:`||r.username.length>0||r.password.length>0||!n&&r.search.length>0||r.hash.length>0)throw Error(`OAuth ${t} must be an HTTPS URL without credentials${n?``:`, query`} or fragment`);return r}function xa(e){let t;try{t=new URL(e.redirectUri)}catch(e){throw Error(`OAuth callback configuration is not a valid URL`,{cause:e})}if(t.protocol!==`http:`||t.hostname!==`127.0.0.1`||t.port.length>0||t.pathname!==`/callback`||t.username.length>0||t.password.length>0||t.search.length>0||t.hash.length>0)throw Error(`OAuth callback configuration must be http://127.0.0.1/callback without a port, query, or fragment`);return t}function Sa(e){if(e.clientId.trim()!==e.clientId||e.clientId.length===0)throw Error(`OAuth client ID must not be blank`);return e.clientId}function Ca(e){if(e.scope.length===0||e.scope.some(e=>e.trim()!==e||e.length===0)||new Set(e.scope).size!==e.scope.length)throw Error(`OAuth scope must contain unique non-blank values`);return e.scope}async function wa(e,t){let n,r=new Promise(e=>{n=e}),i=Gt((r,i)=>{i.setHeader(`Cache-Control`,`no-store`),i.setHeader(`Content-Type`,`text/plain; charset=utf-8`);let a=new URL(r.url??`/`,e);if(r.method!==`GET`||a.pathname!==e.pathname){i.statusCode=404,i.end(`OAuth callback not found.`);return}let o=a.searchParams.getAll(`state`),s=Buffer.from(o[0]??``),c=Buffer.from(t);if(o.length!==1||s.length!==c.length||!xt(s,c)){i.statusCode=400,i.end(`OAuth callback state did not match. Return to the CLI and retry.`);return}if(a.searchParams.has(`error`)){i.statusCode=400,i.end(`OAuth authorization was not completed. Return to the CLI.`),n({state:`failed`,message:`OAuth authorization server returned an error`});return}let l=a.searchParams.getAll(`code`),u=l[0]?.trim();if(l.length!==1||u===void 0||u.length===0){i.statusCode=400,i.end(`OAuth callback did not include an authorization code.`);return}i.statusCode=200,i.end(`OAuth authorization completed. Return to the CLI.`),n({state:`code`,authorizationCode:u})});i.on(`error`,e=>n({state:`failed`,message:`OAuth callback listener failed: ${C(e)}`}));try{let t=Ht(i,`listening`);i.listen({host:`127.0.0.1`,port:0}),await t;let n=i.address();if(n===null||typeof n==`string`||n.port<=0)throw Error(`OAuth callback listener did not receive an ephemeral loopback port`);let a=new URL(e);return a.port=String(n.port),{redirectUri:a,waitForAuthorizationCode:async()=>{let e;return await Promise.race([r,new Promise(t=>{e=setTimeout(()=>t({state:`timed-out`}),fa)})]).finally(()=>{e!==void 0&&clearTimeout(e)})},close:async()=>await Ea(i)}}catch(e){throw i.listening&&await Ea(i),e}}function Ta(e){return{host:e.host,provider:`keyring`,expiresAt:e.credential.expiresAt,client:e.credential.client}}function Ea(e){return new Promise((t,n)=>{e.close(e=>e===void 0?t():n(e))})}function Da(e,t){let n=t.state===`found`?t.stored:void 0,r=n?.credential.apiKey.expiresAt??null;return{host:e,present:n!==void 0,provider:n===void 0?null:`keyring`,activation:n?.activation??null,apiKeyId:n?.credential.apiKey.id??null,subject:n?.credential.apiKey.subject??null,scope:n?.credential.apiKey.scopes??[],name:n===void 0?null:de(n.credential.apiKey.name,[n.credential.secret]),status:n?.credential.apiKey.status??null,expiresAt:r,metadataSource:n===void 0?null:`keyring-cache`,expiresInDay:ka(r),keyringFailure:t.state===`unavailable`?t.summary:null,error:t.state===`invalid`?t.summary:null}}var Oa=864e5;function ka(e){if(e===null)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:Math.round((t-Date.now())/Oa)}var Aa=7;function ja(e){return e===null?`none`:e.length<=11?e:`${e.slice(0,Aa)}\u2026${e.slice(-4)}`}var Ma=13,Na=14;function Pa(e){return[``,`${e.cliName} ${e.cliVersion} \u2192 ${e.personal.host}`+(e.apiVersion===null?` (api unreachable)`:` (api ${e.apiVersion})`),``,...Fa(e.oauth,e.cliName),...Ia(e.personal,e.oauth,e.cliName),``,...za(e.resolved,e.config),...e.systemOk?[]:[U(`System`,`uptime read failed`)]].join(`
13
+ `)}function U(e,t){return` ${e.padEnd(Ma)}${t}`}function W(e){return` ${``.padEnd(Ma)}${e}`}function Fa(e,t){switch(e.state){case`found`:return[U(`OAuth`,`stored via keyring; identity is not cached`),W(Pe(e.stored.credential)?`access token expired — run \`${t} auth login\``:`cached expiry ${e.stored.credential.expiresAt}`)];case`missing`:return[U(`OAuth`,`none stored`)];case`unavailable`:return[U(`OAuth`,`keyring unavailable: ${e.summary}`)];case`invalid`:return[U(`OAuth`,`stored credential invalid: ${e.summary}`)];default:throw Error(`Unsupported OAuth credential state`)}}function Ia(e,t,n){if(!e.present){if(t.state===`found`)return[];let r=e.keyringFailure??(t.state===`unavailable`?t.summary:null);return r===null?[U(`Signed in`,`no \u2014 run \`${n} auth login\``),...e.error===null?[]:[W(`stored credential invalid: ${e.error}`)]]:[U(`Signed in`,`credential storage unavailable`),W(r)]}return[U(t.state===`found`?`Personal key`:`Signed in`,e.subject??`unknown subject`),W(`via ${e.provider??`unknown store`}`),U(`Key`,`${e.name??`unnamed`} ${ja(e.apiKeyId)}`),...La(e,n),U(`Scopes`,e.scope.length===0?`none`:e.scope.join(`, `))]}function La(e,t){let n=`${e.status??`unknown`} when stored`,r=e.expiresInDay,i=e.expiresAt===null?null:e.expiresAt.slice(0,10);return[U(`Key state`,n),...i===null||r===null?[W(`no expiry recorded`)]:[W(Ra(i,r))],W(`Clerk owns the live verdict \u2014 \`${t} auth personal-login\` refreshes this cache`)]}function Ra(e,t){return t<0?`cached expiry ${e} passed ${Math.abs(t)}d ago`:t<=Na?`cached expiry ${e}, ${t}d away`:`cached expiry ${e}`}function za(e,t){return[U(`Secrets`,p.map(t=>Va(t,e)).join(` `)),U(`Config`,t===null?`none`:`doppler ${t.project}/${t.config}`)]}function Ba(e){return p.map(t=>Va(t,e)).join(` `)}function Va(e,t){let n=t[e];return n.present?`${e}=${n.source??`resolved`}`:`${e}=${n.source===`config`?`config (unresolved)`:`unset`}`}var Ha=r([`PROMPT`,`SKILL`,`AGENT`]),Ua=a({kind:Ha,name:e(),version:e()}),Wa=a({content:e(),core:Ua}),Ga=a({key:e(),version:e()}),Ka=a({agent:o(e(),Ga),prompt:o(e(),Ga),skill:o(e(),Ga)}),G=`aventure`,qa=`SKILL.md`,Ja=`.aventure-skills.json`,Ya=`claude`,Xa=2e4,Za=2,Qa=[{name:`claude-code`,base:`home`,detect:[`.claude`],skill:[`.claude`,`skills`],mcp:{shape:`claude-cli`,file:[`.claude.json`],key:`mcpServers`}},{name:`codex`,base:`home`,detect:[`.codex`],skill:[`.agents`,`skills`],mcp:{shape:`toml`,file:[`.codex`,`config.toml`]}},{name:`cursor`,base:`home`,detect:[`.cursor`],skill:null,mcp:{shape:`json`,file:[`.cursor`,`mcp.json`],key:`mcpServers`,entry:e=>({type:`http`,url:e})}},{name:`opencode`,base:`config`,detect:[`opencode`],skill:[`opencode`,`skills`],mcp:{shape:`json`,file:[`opencode`,`opencode.json`],key:`mcp`,entry:e=>({type:`remote`,url:e,enabled:!0})}}];function $a(e){return M(eo(e))}function eo(e){return O(ro(e),...e.detect)}function to(e){return e.skill===null?null:O(ro(e),...e.skill)}function no(e){return O(ro(e),...e.mcp.file)}function ro(e){return e.base===`home`?ao(`HOME`)??wt():io()}function io(){return ao(`XDG_CONFIG_HOME`)??O(ao(`HOME`)??wt(),`.config`)}function ao(e){let t=process.env[e]?.trim();return t===void 0||t.length===0?void 0:t}function oo(e){return O(D(e),Ja)}function so(e){if(!M(e))return{};try{let t=Ka.safeParse(JSON.parse(N(e,`utf8`)));return t.success?t.data.skill:{}}catch{return{}}}function co(e,t,n){let r=oo(e),i={...so(r)};for(let e of n){let n=t.skill[e];n!==void 0&&(i[e]=n)}return uo(r,`${JSON.stringify({prompt:{},skill:i,agent:{}},null,Za)}\n`)}function lo(e,t,n){let r=O(e,t,qa);return D(D(r))===e?uo(r,n):`refusing to install ${t}: it does not name one directory inside ${e}`}function uo(e,t){try{fo(e,t)}catch(t){return`cannot write ${e}: ${C(t)}`}return null}function fo(e,t){Nt(D(e),{recursive:!0});let n=`${e}.aventure-tmp`;try{P(n,t,`utf8`),Lt(n,e)}finally{Rt(n,{force:!0})}}var po=RegExp(`^[ \\t]*\\[[ \\t]*mcp_servers[ \\t]*\\.[ \\t]*"?${G}"?[ \\t]*\\]`),mo=/^[ \t]*mcp_servers[ \t]*=/m;function ho(e){let t=no(e);if(!M(t))return null;try{let n=N(t,`utf8`);if(e.mcp.shape===`toml`)return _o(n);let r=So(n)?.[e.mcp.key],i=(r!==void 0&&Co(r)?r:void 0)?.[G];return i===void 0||!Co(i)?null:typeof i.url==`string`?i.url:go}catch{return null}}var go=`unknown`;function _o(e){let t=e.split(`
14
+ `),n=t.findIndex(e=>po.test(e));if(n<0)return null;for(let e of t.slice(n+1)){if(e.trimStart().startsWith(`[`))break;let t=/^[ \t]*url[ \t]*=[ \t]*"([^"]*)"/.exec(e);if(t?.[1]!==void 0)return t[1]}return go}function vo(e,t){let n=e.mcp,r=no(e);if(n.shape===`claude-cli`)return xo(t);try{if(n.shape===`toml`)return yo(r,t);bo(r,n.key,n.entry(t))}catch(e){return`cannot write ${r}: ${C(e)}`}return null}function yo(e,t){let n=M(e)?N(e,`utf8`):``,r=`[mcp_servers.${G}]\nurl = "${t}"\n`;return mo.test(n)?`${e} declares mcp_servers as an inline table, which this command cannot extend; add by hand:\n${r}`:uo(e,`${n}${n.length===0||n.endsWith(`
15
+ `)?``:`
16
+ `}\n${r}`)}function bo(e,t,n){let r=So(M(e)?N(e,`utf8`):`{}`);if(r===null)throw Error(`${e} is not a JSON object`);let i={...r},a=i[t];i[t]={...a!==void 0&&Co(a)?a:{},[G]:n},fo(e,`${JSON.stringify(i,null,Za)}\n`)}function xo(e){let t=[`mcp`,`add`,`--transport`,`http`,`-s`,`user`,G,e],n=vt(Ya,t,{encoding:`utf8`,timeout:Xa}),r=`${Ya} ${t.join(` `)}`;if(n.error!==void 0)return`run \`${r}\`: ${n.error.message}`;if(n.status!==0){let e=(n.stderr??``).trim().split(`
17
+ `).slice(-2).join(` | `);return`\`${r}\` exited ${n.status}: ${e||`no stderr`}`}return null}function So(e){let t=v.safeParse(JSON.parse(e));return t.success&&Co(t.data)?t.data:null}function Co(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var wo=`aventure`;function To(e,t=m().bin[0]){T(Eo(e).command(`setup`).summary(`Install the aventure skill bundle and MCP server into your agent runtimes`).description([`Detect the agent runtimes installed for this user (${Qa.map(e=>e.name).join(`, `)}),`,`install or refresh the published ${wo}* skill bundle into each runtime's own`,`skill directory, and register the ${G} MCP server in each runtime's own config.`,``,` ${t} agents setup # write the skills and the MCP registration`,` ${t} agents setup --status # compare what is installed; exit 1 on drift`,`--execute is deprecated, accepted, and ignored; setup executes by its verb.`].join(`
18
+ `)).addOption(new u(`--execute`,`Deprecated; accepted and ignored. This command executes by its verb.`).default(!1)).addOption(new u(`--status`,`report installed skill versions against the manifest and exit 1 on drift; compares recorded versions, not file content, and writes nothing`).default(!1))).action(async function(e){let t=this.optsWithGlobals();t.environment!==void 0&&(process.env.API_ENV=t.environment),L({mode:w(e)},await Do(e))})}function Eo(e){let t=`agents`,n=e.commands.find(e=>e.name()===t);if(n!==void 0)return n;let r=Ge[t]?.summary??t;return e.command(t).summary(r).description(r)}async function Do(e){let t=zo();if(!t.ok||t.data===null)return{...t,data:null};let n=await Lo(`getAgentInstructionManifest`,Ka);if(!n.ok||n.data===null)return{...n,data:null};let r=n.data,i=t.data,a=Object.keys(r.skill).filter(e=>e.startsWith(wo)).toSorted();if(a.length===0)return x(`The agent instruction manifest carries no ${wo}* skill; nothing to install.`);let o=Qa.map(e=>jo(e,r,a,i));return Oo({runtime:e.status===!0?o:await No(o,r,i)},e,i)}function Oo(e,t,n){let r=e.runtime.filter(e=>e.detected),i=r.flatMap(e=>e.action.filter(e=>e.state!==`current`)),a=i.filter(e=>e.state===`failed`),o={runtimeDetected:r.length,actionPending:i.length,actionFailed:a.length},s=[`agents setup: ${r.length} runtime detected, ${i.length} action pending, mcp ${n}`,...e.runtime.map(ko)].join(`
19
+ `);if(r.length===0){let t=Qa.map(e=>`${e.name}: no ${eo(e)}`);return{...x(s,t,{counts:o}),data:e}}let c=a.length>0?a:t.status===!0?i:[];return c.length===0?S(s,e,{counts:o}):{...x(s,c.map(Ao),{counts:o}),data:e}}function ko(e){if(!e.detected)return` ${e.name} not installed`;let t=e.action.filter(e=>e.state!==`current`);return t.length===0?` ${e.name} current (${e.action.length} item)`:` ${e.name} ${t.length} pending — ${t.map(Ao).join(`; `)}`}function Ao(e){return`${e.kind} ${e.name} ${e.state}: ${e.detail}`}function K(e,t,n,r){return{kind:e,name:t,state:n,detail:r}}function jo(e,t,n,r){let i=to(e),a=no(e),o={name:e.name,skillDir:i,mcpConfig:a};if(!$a(e))return{...o,detected:!1,action:[]};let s=ho(e),c=s===null?K(`mcp`,G,`install`,`register ${r} in ${a}`):K(`mcp`,G,`current`,`${s} in ${a}`);return{...o,detected:!0,action:[...i===null?[]:Mo(i,t,n),c]}}function Mo(e,t,n){let r=so(oo(e));return n.map(n=>{let i=t.skill[n]?.version??``,a=r[n]?.version,o=O(e,n,qa);return a===void 0||!M(o)?K(`skill`,n,`install`,`write ${o} at version ${i}`):a===i?K(`skill`,n,`current`,`${o} at version ${i}`):K(`skill`,n,`update`,`${o} ${a} -> ${i}`)})}async function No(e,t,n){let r=e.flatMap(e=>e.action.filter(e=>e.kind===`skill`&&e.state!==`current`).map(e=>e.name)),i=new Map;for(let e of[...new Set(r)].toSorted())i.set(e,await Io(e));return e.map(e=>{let r=Qa.find(t=>t.name===e.name);if(!e.detected||r===void 0)return e;let a=[],o=e.action.map(t=>{if(t.state===`current`)return t;if(t.kind===`mcp`)return Po(r,e.mcpConfig,n);let o=Fo(e.skillDir,t.name,i.get(t.name));return o.state===`current`&&a.push(t.name),o}),s=e.skillDir===null||a.length===0?null:co(e.skillDir,t,a),c=s===null?[]:[K(`skill`,Ja,`failed`,s)];return{...e,action:[...o,...c]}})}function Po(e,t,n){let r=vo(e,n);return r===null?K(`mcp`,G,`current`,`registered ${n} in ${t}`):K(`mcp`,G,`failed`,r)}function Fo(e,t,n){if(e===null||n===void 0||!n.ok||n.data===null)return K(`skill`,t,`failed`,n?.summary??`no document fetched for ${t}`);let r=lo(e,t,n.data.content);return r===null?K(`skill`,t,`current`,`${O(e,t,qa)} at version ${n.data.core.version}`):K(`skill`,t,`failed`,r)}async function Io(e){return await Lo(`getAgentInstruction`,Wa,{kind:Ha.enum.SKILL,name:e})}async function Lo(e,t,n={}){let r=Ro(e);if(r===void 0)return x(`The generated command catalog carries no ${e} operation; regenerate it with \`make mcp-generate-contracts\` and reinstall.`);let i;try{i=_e(r.operationId,n)}catch(t){return x(`Cannot address ${e}: ${C(t)}`)}let a=await b({method:r.method,path:i,auth:r.auth,responseFormat:`json`}).catch(e=>x(C(e)));if(!a.ok)return{...a,summary:`${r.method} ${i} failed: ${a.summary}`,data:null};let o=a.data,s=t.safeParse(typeof o==`object`&&o&&`response`in o?o.response:void 0);return s.success?S(`${r.method} ${i} answered`,s.data):x(`${i} returned an unexpected body: ${s.error.message}`)}function Ro(e){return E.find(t=>t.operationId===e)}function zo(){try{return S(`MCP host derived`,dt(s().host,`/mcp`).href)}catch(e){return x(`Correct API_ENV or pass \`--environment <name>\` — ${C(e)}.`)}}var Bo=`# >>> aventure-cli completion setup (managed by aventure-cli) >>>`,Vo=`# <<< aventure-cli completion setup (managed by aventure-cli) <<<`,Ho=`.aventure-cli-completion.bak`;function Uo(e,t){e.command(`install`).summary(`install shell completion loaders`).description(`Install managed shell completion loaders for supported shells.`).action(()=>Xo([])),e.command(`uninstall`).summary(`remove shell completion loaders`).description(`Remove managed shell completion loaders installed by ${t}.`).action(()=>Xo([`--uninstall`]))}function Wo(e,t){e.command(`setup`).summary(`configure zsh completion startup`).description(`Configure ~/.zshrc so zsh loads ${t} completion loaders.`).option(`--dry-run`,`print the managed zshrc block without writing`).option(`--yes`,`apply without prompting`).option(`--uninstall`,`remove the managed zshrc block`).action(async e=>{let t=Jo(),n=await qo({rcFile:k(wt(),`.zshrc`),installerPath:t,mode:e.uninstall?`uninstall`:`install`,dryRun:e.dryRun,prompter:e.yes||e.dryRun?void 0:ss});A.stdout.write(`${n.message}\n`),!n.cancelled&&!e.dryRun&&Xo(e.uninstall?[`--uninstall`]:[])})}function Go(e,t=`fpath-only`){return[Bo,`# installer: ${e}`,'fpath=("${XDG_DATA_HOME:-$HOME/.local/share}/zsh/site-functions" $fpath)',...t===`fpath-and-compinit`?[`autoload -Uz compinit`,`compinit`]:[],Vo].join(`
20
+ `)}function Ko(){let e=Xo([`--status`],`pipe`);if(e.status!==0)return{refreshed:!1,message:`completion status exited ${e.status??1}`};if(!Zo(e.stdout??``))return{refreshed:!1,message:`no managed shell completions found`};let t=Xo([],`pipe`);return t.status===0?{refreshed:!0,message:(t.stdout??``).trim()||`shell completions refreshed`}:{refreshed:!1,message:`completion refresh exited ${t.status??1}`}}async function qo({rcFile:e,installerPath:t,mode:n,dryRun:r=!1,prompter:i}){let a=Qo(e),o=a.length===0?[]:a.split(`
21
+ `),s=$o(o,e);if(n===`uninstall`&&s===null)return{changed:!1,cancelled:!1,message:`${e}: already up-to-date`,content:a};let c=n===`install`?es(o,s,t,e):ts(o,s);return c===a?{changed:!1,cancelled:!1,message:`${e}: already up-to-date`,content:c}:r?{changed:!0,cancelled:!1,message:c,content:c}:i!==void 0&&!await i(`Update ${e}?`)?{changed:!0,cancelled:!0,message:`${e}: cancelled`,content:a}:(is(e,c),{changed:!0,cancelled:!1,message:`${e}: updated`,content:c})}function Jo(e=A.argv[1]){let t=e===void 0?``:Yo(e),n=k(D(t),`..`,`..`,`scripts`,`install-zsh-completion-loader.mjs`);return M(n)?n:k(D(t),`..`,`scripts`,`install-zsh-completion-loader.mjs`)}function Yo(e){try{return It(e)}catch{return k(e)}}function Xo(e,t=`inherit`){let n=vt(A.execPath,[Jo(),...e],{encoding:t===`pipe`?`utf8`:void 0,stdio:t});if(n.error!==void 0)throw n.error;if(t===`inherit`){n.status!==0&&(A.exitCode=n.status??1);return}return{stdout:n.stdout?.toString(),stderr:n.stderr?.toString(),status:n.status}}function Zo(e){return e.split(/\r?\n/u).some(e=>e.trim().endsWith(`: managed`))}function Qo(e){return M(e)?(as(e),N(e,`utf8`)):``}function $o(e,t){let n=ns(e,Bo),r=ns(e,Vo);if(n.length===0&&r.length===0)return null;if(n.length!==1||r.length!==1||n[0]>=r[0])throw Error(`${t} has malformed managed completion setup markers; fix manually before retrying.`);return[n[0],r[0]]}function es(e,t,n,r){let i=t===null?[...e]:[...e.slice(0,t[0]),...e.slice(t[1]+1)],a=rs(i),o=Go(n,a===-1?`fpath-and-compinit`:`fpath-only`).split(`
22
+ `),s=t===null?a:t[0],c=s===-1?i.length:s;if(t!==null&&a!==-1&&a<c)throw Error(`${r} runs compinit before the managed block; move the block above compinit manually.`);return os([...i.slice(0,c),...o,...i.slice(c)])}function ts(e,t){return os(t===null?e:[...e.slice(0,t[0]),...e.slice(t[1]+1)])}function ns(e,t){return e.flatMap((e,n)=>e===t?[n]:[])}function rs(e){return e.findIndex(e=>/^\s*(autoload\s+.*\bcompinit\b|compinit(?:\s|$))/.test(e))}function is(e,t){Nt(D(e),{recursive:!0}),M(e)&&(as(e),as(`${e}${Ho}`),jt(e,`${e}${Ho}`));let n=k(D(e),`.${Dt(e)}.${A.pid}.tmp`);as(n),P(n,t,{mode:420}),Lt(n,e)}function as(e){if(M(e)&&Mt(e).isSymbolicLink())throw Error(`refusing to write symlink: ${e}`)}function os(e){let t=e.join(`
23
+ `);return t.length===0||t.endsWith(`
24
+ `)?t:`${t}\n`}async function ss(e){let t=qt({input:A.stdin,output:A.stdout});try{let n=await t.question(`${e} [y/N] `);return/^(y|yes)$/i.test(n.trim())}finally{t.close()}}var cs=new Intl.Collator(void 0,{numeric:!0}),ls=2e4;function us(e,t=m()){let n=t.bin[0],r=t.registry===`https://npm.pkg.github.com/`?`Requires npm authentication for @aventurevc packages.`:`Installs from the public npm registry; no credential required.`;T(e.command(`update`).summary(`Check for or install the latest ${n} release`).description([`Compare the running CLI version against the latest published`,`release and install it into the active published bin prefix.`,``,`Refuses to install when the running binary is the working-tree build`,`(use \`make\` to rebuild that). ${r}`,`--execute is deprecated, accepted, and ignored; update executes by its verb.`].join(`
25
+ `)).option(`--execute`,`Deprecated; accepted and ignored. This command executes by its verb.`,!1)).action(e=>L({mode:w(e)},ds()))}function ds(e,t=`apply`){let n=e;try{n??=m(process.argv[1])}catch(e){return x(e instanceof Error?e.message:String(e),[`invalid_package_metadata`])}let r=n.name,i=n.version,a=fs([`view`,d,`version`,`--silent`,`--global`],n,{timeout:ls});if(!a.ok)return{...a,data:null};let o=(a.data??``).trim();if(o===``)return x(`npm view ${d} returned empty version`,[`empty_stdout`]);let s=cs.compare(i,o)<0,c={targetPackage:d,runningPackage:r,currentVersion:i,latestVersion:o,upgradeAvailable:s,upgradeInstalled:!1};if(t===`check`)return S(`${r}@${i} → ${d}@${o} (${s?`available`:`up to date`})`,c);if(!s)return S(`${r}@${i} already matches ${d}@${o}`,c);if(n.workingTreeRoot!==null)return x(`Refusing to install over the working-tree build at ${n.workingTreeRoot}; rebuild via make instead`,["running CLI is npm-linked from the back-end checkout — `update` is for published bins"]);let l=ms(n),u;try{u=hs(n,l)}catch(e){return x(`Cannot prepare MCP-owned CLI bins: ${vs(e)}`,[`npm install was not run`])}let f=[`install`,`-g`];l!==null&&f.push(`--prefix`,l.installPrefix),f.push(`${d}@${o}`);let p=fs(f,n,{stdio:[`ignore`,`inherit`,`inherit`]});if(!p.ok){let e=gs(u,l?.installPrefix??null);return e===null?{...p,data:null}:x(`${p.summary}; MCP-owned CLI bin restoration failed`,[...p.warnings,e])}let h=l===null?void 0:ps(l.entryPath,o);if(h?.ok===!1){let e=gs(u,l?.installPrefix??null);return e===null?{...h,data:null}:x(`${h.summary}; MCP-owned CLI bin restoration failed`,[...h.warnings,e])}let g=_s(u);if(g!==null)return x(`${d} upgraded but MCP CLI bin backup cleanup failed`,[g]);let _=ys();return S(`${d} upgraded to ${o}`,{...c,upgradeInstalled:!0,installPrefix:l?.installPrefix,verifiedVersion:h?.data??void 0,completionRefreshed:_.refreshed,completionRefreshMessage:_.message})}function fs(e,t,n={}){let r={...process.env};t.registry===`https://npm.pkg.github.com/`?r.NODE_AUTH_TOKEN??=r.GH_PACKAGES_TOKEN:delete r.GH_PACKAGES_TOKEN;let i=[...e,`--@aventurevc:registry=${t.registry}`],a=vt(`npm`,i,{env:r,encoding:`utf8`,...n});if(a.error)return a.signal===`SIGTERM`&&n.timeout!==void 0?x(`npm ${e[0]??``} did not answer within ${n.timeout}ms`,[`timeout`]):x(`npm ${e[0]??``} failed to start: ${a.error.message}`,[`spawn_error`]);if(a.status!==0){let t=(a.stderr??``).trim().split(`
26
+ `).slice(-3).join(` | `);return x(`npm ${e.join(` `)} exited ${a.status}`,[t||`no stderr`])}return S(`npm ok`,a.stdout??``)}function ps(e,t){let n=vt(process.execPath,[e,`--version`],{encoding:`utf8`});if(n.error)return x(`updated ${d} verification failed: ${n.error.message}`,[`spawn_error`]);let r=(n.stdout??``).trim();if(n.status!==0||r!==t){let i=(n.stderr??``).trim().split(`
27
+ `).slice(-3).join(` | `);return x(`updated ${d} verification expected ${t} but active bin reported ${r||`empty output`}`,[i||`active bin: ${e}`])}return S(`active CLI version verified`,r)}function ms(e){let t=`${Ot}lib${Ot}node_modules${Ot}${e.name.replace(`/`,Ot)}`,n=e.packageRoot.lastIndexOf(t),r=e.bin.includes(`aventure-cli`)?`aventure-cli`:e.bin[0];return n<0?null:{entryPath:k(e.packageRoot.slice(0,n),`bin`,r),installPrefix:e.packageRoot.slice(0,n)}}function hs(e,t){if(e.name!==`@aventurevc/mcp-server`)return{backup:[],backupDirectory:null};if(t===null)throw Error(`the running MCP package is not in a verifiable global npm prefix`);if(!e.entryPath.startsWith(`${e.packageRoot}${Ot}`))throw Error(`the running CLI entry is outside the MCP package root`);let n=e.bin.filter(e=>e===`aventure`||e===`aventure-cli`).flatMap(n=>{let r=k(t.installPrefix,`bin`,n),i=Mt(r,{throwIfNoEntry:!1});if(i===void 0)return[];if(!i.isSymbolicLink())throw Error(`${r} is not a symlink`);let a;try{a=It(r)}catch(e){throw Error(`${r} has a missing target`,{cause:e})}if(a!==e.entryPath)throw Error(`${r} is not owned by the running MCP CLI`);return{binPath:r,linkTarget:Ft(r)}});if(n.length===0)return{backup:[],backupDirectory:null};let r=Pt(k(t.installPrefix,`bin`,`.aventure-cli-update-`)),i=n.map(({binPath:e,linkTarget:t})=>({backupPath:k(r,Dt(e)),binPath:e,linkTarget:t})),a=[];try{for(let e of i)if(Lt(e.binPath,e.backupPath),a.push(e),Ft(e.backupPath)!==e.linkTarget)throw Error(`${e.binPath} changed ownership while preparing the update`)}catch(e){let t=gs({backup:a,backupDirectory:r},null);throw Error(`could not displace verified MCP CLI bins${t===null?``:`; restoration failed: ${t}`}`,{cause:e})}return{backup:a,backupDirectory:r}}function gs(e,t){let n=t===null?null:k(t,`lib`,`node_modules`,...d.split(`/`)),r=[];for(let t of e.backup.toReversed())try{let e=Mt(t.binPath,{throwIfNoEntry:!1});if(e!==void 0){if(!e.isSymbolicLink())throw Error(`${t.binPath} is not a symlink`);let r=k(D(t.binPath),Ft(t.binPath));if(n===null||r!==n&&!r.startsWith(`${n}${Ot}`))throw Error(`${t.binPath} is not owned by the standalone CLI package`);Bt(t.binPath)}Lt(t.backupPath,t.binPath)}catch(e){r.push(vs(e))}if(e.backupDirectory!==null)try{zt(e.backupDirectory)}catch(e){r.push(vs(e))}return r.length===0?null:r.join(`; `)}function _s(e){let t=[];for(let n of e.backup)try{Bt(n.backupPath)}catch(e){t.push(vs(e))}if(e.backupDirectory!==null)try{zt(e.backupDirectory)}catch(e){t.push(vs(e))}return t.length===0?null:t.join(`; `)}function vs(e){return e instanceof Error?e.message:String(e)}function ys(){try{return Ko()}catch(e){return{refreshed:!1,message:e instanceof Error?e.message:String(e)}}}var bs=[{name:`cli-version`,purpose:`running CLI against the latest published release`},{name:`api-schemas`,purpose:`the installed @aventurevc/api-schemas contracts resolve`},{name:`api-host`,purpose:`the selected API host answers its generated status operation`},{name:`auth`,purpose:`which credential scope materialized locally, never the secret`},{name:`catalog`,purpose:`this catalog was generated from the operation set the API serves`}],xs=`operationFingerprint`;function Ss(e,t=m().bin[0]){T(e.command(`doctor`).summary(`One-call selftest: CLI version, schemas, API host, auth scope, command catalog`).description(["Run every environment check in one call and report `{ ok, check: [...] }`:",...bs.map(e=>` - ${e.name}: ${e.purpose}`),``,`Exit code is 0 only when no check failed; a skipped check (no registry reachable)`,`does not fail the run. Each failing message names the command that fixes it.`,"--json always carries the report at `.data`; --data prints the report directly when",`every check passes and the result envelope when one fails, like every other command.`].join(`
28
+ `))).action(async function(e){let n=this.optsWithGlobals();n.environment!==void 0&&(process.env.API_ENV=n.environment),L({mode:w(e)},await Cs(t))})}async function Cs(e){let t=Ts(),n=Es(e),[r,i]=await Promise.all([Ds(e),Os(t,e)]),a=[n.check,r,i.check,await As(e),Ls(t,i.servedFingerprint,n.upgradeAvailable,e)],o={pass:ws(a,`pass`),fail:ws(a,`fail`),skip:ws(a,`skip`)},s=a.filter(e=>e.status===`fail`).map(e=>e.message),c={ok:s.length===0,check:a},l=[`doctor: ${o.pass} pass, ${o.fail} fail, ${o.skip} skip`,...a.map(e=>` ${e.name} ${e.status} — ${e.message}`)].join(`
29
+ `);return c.ok?S(l,c,{counts:o}):{...x(l,s,{counts:o}),data:c}}function ws(e,t){return e.filter(e=>e.status===t).length}function q(e,t,n){return{name:e,status:t,message:n}}function Ts(){return E.find(e=>e.intent===`status`&&e.resource===`status`)}function Es(e){let t=m(),n=ds(t,`check`);if(!n.ok||n.data===null)return{check:q(`cli-version`,`skip`,`Could not compare ${t.version} against the registry (${n.summary}); rerun \`${e} update\` with registry access.`),upgradeAvailable:null};let{targetPackage:r,currentVersion:i,latestVersion:a,upgradeAvailable:o}=n.data;return{check:o?q(`cli-version`,`fail`,`Upgrade ${r} from ${i} to ${a}: run \`${e} update\`.`):q(`cli-version`,`pass`,`${r} ${i} matches the latest published release.`),upgradeAvailable:o}}async function Ds(e){try{let{EntityDetailSchema:e}=await import(`./detail-DeMsv_6C.js`);if(typeof e.safeParse!=`function`)throw Error(`EntityDetailSchema does not expose a Zod parser`);return q(`api-schemas`,`pass`,`Installed @aventurevc/api-schemas contracts resolve beyond the CLI startup path.`)}catch(t){return q(`api-schemas`,`fail`,`Reinstall the CLI: run \`${e} update\` — ${C(t)}.`)}}async function Os(e,t){if(e===void 0)return{check:q(`api-host`,`skip`,`No status operation resolved from the generated catalog; fix the catalog check first.`),servedFingerprint:null};let n;try{n=s().host}catch(e){return{check:q(`api-host`,`fail`,`Correct API_ENV or pass \`--environment <name>\` — ${C(e)}.`),servedFingerprint:null}}let r=await b({method:e.method,path:e.path,auth:e.auth,responseFormat:`json`}).catch(e=>x(C(e)));return r.ok?{check:q(`api-host`,`pass`,`${e.method} ${e.path} answered at ${n}.`),servedFingerprint:ks(r.data)}:{check:q(`api-host`,`fail`,`Point the CLI at a reachable API host with \`--environment <name>\` or API_URL, then rerun \`${t} auth doctor\` — ${e.method} ${e.path} at ${n} returned ${r.summary}.`),servedFingerprint:null}}function ks(e){if(typeof e!=`object`||!e||e instanceof Uint8Array)return null;let{response:t}=e;if(typeof t!=`object`||!t||Array.isArray(t))return null;let n=t[xs];return typeof n==`string`&&n.length>0?n:null}async function As(e){await c();let t;try{t=h(await me())}catch(t){return q(`auth`,`fail`,`Repair or remove ${y()} and run \`${e} auth init\` — ${C(t)}.`)}let[n,r]=await Promise.all([js(),Ms()]);if(r.state===`unavailable`&&r.cause===`environment`)return q(`auth`,`fail`,`Fix the environment configuration first — ${r.summary}.`);let i=t[ye.authToken].present,a=p.some(e=>t[e].present);return!i&&n.state===`invalid`?q(`auth`,`fail`,`Saved OAuth credential is invalid; run \`${e} auth login\` to sign in again after verification — ${n.summary}.`):!i&&n.state===`found`&&Pe(n.stored.credential)?q(`auth`,`fail`,`Saved OAuth access token is expired; run \`${e} auth login\` to renew it or sign in again.`):!a&&r.state!==`found`&&n.state===`unavailable`?q(`auth`,`fail`,`Unlock OS OAuth credential storage before \`${e} auth login\`, or inject ${ye.authToken} through the environment — ${n.summary}.`):a||n.state===`found`||r.state===`found`?q(`auth`,`pass`,`Credential source available: ${Ns(t,n,r)}.`):r.state===`unavailable`?q(`auth`,`fail`,`Unlock OS credential storage before \`${e} auth personal-login\`, or inject ${p.join(`/`)} through the environment — ${r.summary}.`):p.some(e=>t[e].source===`config`)?q(`auth`,`fail`,`The Doppler source in ${y()} resolved no credential: confirm your access to that project and config, or inject ${p.join(`/`)} through the environment.`):q(`auth`,`fail`,`Run \`${e} auth login\` for OAuth, \`${e} auth personal-login\` for a personal credential, or \`${e} auth init\` to select a Doppler source.`)}async function js(){let e;try{e=tt(s().host)}catch(e){return{state:`unavailable`,summary:C(e)}}return await ke(e)}async function Ms(){let e;try{e=Re(s().host)}catch(e){return{state:`unavailable`,summary:C(e),cause:`environment`}}try{return await rt(e)}catch(e){return{state:`unavailable`,summary:C(e),cause:`keyring`}}}function Ns(e,t,n){return[...p.map(t=>`${t}=${Ps(e,t)}`),`oauth=${Is(t)}`,`personal=${Fs(n)}`].join(` `)}function Ps(e,t){let n=e[t];return n.present?n.source??`resolved`:n.source===`config`?`config (unresolved)`:`unset`}function Fs(e){return e.state===`found`?e.stored.activation:e.state===`missing`?`unset`:`unavailable`}function Is(e){switch(e.state){case`found`:return Pe(e.stored.credential)?`expired`:`stored`;case`missing`:return`unset`;case`invalid`:return`invalid`;case`unavailable`:return`unavailable`;default:throw Error(`Unsupported OAuth credential state`)}}function Ls(e,t,n,r){let i=E.length;if(e===void 0)return q(`catalog`,`fail`,`Regenerate the command catalog with \`make mcp-generate-contracts\` and reinstall: none of its ${i} operations is the status operation.`);if(t===null)return q(`catalog`,`skip`,`Could not read the served operation fingerprint, so drift is unproven; this catalog holds ${i} operations at ${Xe}.`);if(t===`cd82b96a230a21a8`)return q(`catalog`,`pass`,`${i} generated operations match the set the API serves (${Xe}).`);let a=`This catalog describes a different operation set than the API serves (${Xe} vs ${t})`;return n===!0?q(`catalog`,`fail`,`${a}: run \`${r} update\`.`):q(`catalog`,`skip`,n===!1?`${a}, and this CLI is already the latest published release: either the deployed API is older than this CLI, or a newer CLI has not been published yet.`:`${a}, and the registry did not answer, so it is unknown whether a newer release describes it: rerun \`${r} update\` with registry access.`)}var Rs=z(B,`oauth`),zs=z(B,`start`),Bs=z(B,`poll`),Vs=z(B,`acknowledge`),Hs=z(B,`revoke`);function Us(e,t=m().bin[0]){let n=Gs(e);Ss(n,t),To(e,t),T(Ws(n,Rs,Rs.description)).action(async function(e){Ks(this),L({mode:w(e)},await pa({noBrowser:!e.browser},t))}),T(Ws(n,zs,[zs,Bs,Vs].map(({description:e})=>e).join(`
30
+ `))).action(async function(e){Ks(this),L({mode:w(e)},await zi({noBrowser:!e.browser,clientLabel:e.clientLabel}))}),T(Ws(n,Hs,Hs.description)).action(async function(e){Ks(this),L({mode:w(e)},await Ai({forgetLocal:e.forgetLocal===!0}))}),T(n.command(`init`).summary(`Interactive credential setup`).description([`Interactively record the Doppler project/config used by ${t} + the MCP server.`,`Credentials resolve from the injected environment first, then Doppler; auth init never writes credentials to disk.`,``,`Prompts go to stderr so stdout stays reserved for the result envelope.`].join(`
31
+ `))).action(async function(e){Ks(this),L({mode:w(e)},await $s(t))}),T(n.command(`status`).summary(`Local credential provenance, API build, and server uptime`).description([`Reports local credentials plus two independent remote health signals:`,` - auth: per-credential local provenance (env vs ~/.config/aventure/config.json vs unset)`,` - oauth: OS-keyring OAuth access-token metadata for the selected API host, without the token`,` - personal: OS-keyring metadata for the selected API host, without the secret`,` - api: running CLI package version plus GET /info build metadata`,` - system: GET /v1/status response (Better Stack uptime SLA)`,``,`No headers are sent to the server. Credential provenance is computed locally; this`,`answers whether service credentials, OAuth, or a personal CLI credential are wired without exposing them.`,`To prove a credential survives transit, call any real endpoint that requires it.`].join(`
32
+ `))).action(async function(e){Ks(this),L({mode:w(e)},await qs(t))})}function Ws(e,t,n){let r=e.command(t.command.slice(t.command.indexOf(` `)+1)).summary(t.summary).description(n);for(let e of t.bodyOption)e.required?r.requiredOption(e.flag,e.description):r.option(e.flag,e.description);for(let e of t.localOption)r.option(e.flag,e.description);return r}function Gs(e){return(e.commands.find(e=>e.name()===`auth`)??e.command(`auth`)).summary(`Authentication, credential setup, API build, and uptime`).description([`\`${Rs.command}\`: ${Rs.summary}.`,`\`${zs.command}\`: ${zs.summary}.`,`\`${Hs.command}\`: ${Hs.summary}.`,"`auth status` reports local credential provenance plus CLI/API build and uptime.","`auth doctor` runs the one-call selftest and prints `{ ok, check: [...] }`.","`auth init` configures the local Doppler source used by generated API commands."].join(`
33
+ `))}function Ks(e){let t=e.optsWithGlobals();t.environment!==void 0&&(process.env.API_ENV=t.environment)}async function qs(e){let t;try{t=await me()}catch(t){return x(`auth status: cannot read ${y()} — ${t instanceof Error?t.message:String(t)}`,[`configPath=${y()}`,`errorName=${t instanceof Error?t.name:`Error`}`,...cc(e)])}let n;try{n=tt(s().host)}catch(e){return x(`auth status: invalid API host — ${C(e)}`)}let[r,i,a,o]=await Promise.all([Qs(`/v1/status`,`GET /v1/status`),Qs(`/info`,`GET /info`),ke(n),Ys(n)]),c=h(t),l=m().version,u=Da(n,o),d=Pa({cliName:e,cliVersion:l,apiVersion:i.ok?Xs(i.data):null,oauth:a,personal:u,resolved:c,config:t,systemOk:r.ok}),f={cli:{version:l},api:i.ok?i.data??null:null,auth:rc(t,c),oauth:Js(n,a),personal:u,system:r.ok?r.data??null:null,...i.ok?{}:{apiError:i.summary},...r.ok?{}:{systemError:r.summary}};return ic(c)||a.state===`found`||o.state===`found`?S(d,f):ac(`auth status: no credentials resolved | ${d}`,f,e,{oauth:a.state===`missing`,personal:o.state===`missing`})}function Js(e,t){let n=t.state===`found`?t.stored:void 0;return{host:e,present:n!==void 0,provider:n===void 0?null:`keyring`,expiresAt:n?.credential.expiresAt??null,expired:n===void 0?null:Pe(n.credential),client:n?.credential.client??null,keyringFailure:t.state===`unavailable`?t.summary:null,error:t.state===`invalid`?t.summary:null}}async function Ys(e){try{return await rt(e)}catch(e){return{state:`invalid`,summary:C(e)}}}function Xs(e){if(!Zs(e))return null;let t=Yr.safeParse(Reflect.get(e,`response`));if(!t.success)return null;let n=t.data.build.version?.trim();return n&&n.length>0?n:null}function Zs(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function Qs(e,t){return await b({method:`GET`,path:e,auth:`none`,responseFormat:`json`}).catch(e=>x(`${t} failed: ${e instanceof Error?e.message:String(e)}`))}async function $s(e){if(!kt.isTTY)return x(`${e} auth init requires an interactive TTY on stdin`,["non-interactive caller: hand-write `~/.config/aventure/config.json` directly",...cc(e)]);let t=qt({input:kt,output:j});try{j.write(`${e} auth init\n\n`);let n=await ec(t);try{await g(n)}catch(t){return x(`auth init: cannot write ${y()} — ${t instanceof Error?t.message:String(t)}`,[`configPath=${y()}`,`errorName=${t instanceof Error?t.name:`Error`}`,...cc(e)])}return await c(),nc(`saved`,n,e)}finally{t.close()}}async function ec(e){return{source:`doppler`,project:await tc(e,`Doppler project: `),config:await tc(e,`Doppler config (e.g. staging): `)}}async function tc(e,t){for(;;){let n=(await e.question(t)).trim();if(n.length>0)return n;j.write(` required
34
+ `)}}function nc(e,t,n){let r=h(t),i=`${sc(e,t,r)} | ${oc()}`,a=rc(t,r);return ic(r)?S(i,a):ac(`no credentials resolved | ${i}`,a,n)}function rc(e,t){return{configPath:y(),configSource:e?.source??null,...e?.source===`doppler`?{configProject:e.project,configConfig:e.config}:{},resolved:t}}function ic(e){return p.some(t=>e[t].present)}function ac(e,t,n,r={oauth:!0,personal:!0}){return{...x(e,[...r.personal?[`For a personal key, run \`${n} auth personal-login\`.`]:[],...r.oauth?[`For OAuth, run \`${n} auth login\` in an interactive terminal.`]:[],m().registry===`https://registry.npmjs.org/`?`For non-interactive use, set AUTH_TOKEN to a personal API key in the environment.`:`Run \`${n} auth init\` to select Doppler, or inject credentials through the environment.`]),data:t}}function oc(){return`read=${ee(`read`).ok?`available`:`unavailable`} write=${ee(`write`).ok?`available`:`unavailable`}`}function sc(e,t,n){return`${e}: ${Ba(n)} | ${t===null?`no config`:`doppler ${t.project}/${t.config}`}`}function cc(e){return[`no config at the path above — run \`${e} auth init\` in an interactive terminal, or write a non-secret Doppler source config:`,` {"auth":{"source":"doppler","project":"<project>","config":"<config>"}}`,`legacy inline configs are rejected; move credentials to Doppler or the environment before replacing the config.`]}function lc(e,t,n=m().bin[0]){let r=Lr(t),i=e.find(e=>e.cliPath.join(` `)===r||e.cliAliasPath?.join(` `)===r||e.operationId===r);return i===void 0?x(`No generated operation matches "${t}"`,[`Resolve the exact command with \`${n} command-catalog search "<query>"\`.`]):S(`Resolved ${i.operationId}`,i)}function uc(e){return e.parameters.some(e=>e.location===`path`)?x(`${e.operationId} has path parameters and cannot be batch-driven`,[e.path]):S(`no path parameters`,null)}function dc(e){let t={};for(let n of e){let e=n.indexOf(`=`);if(e<=0)return x(`--query expects key=value, got "${n}"`);t[n.slice(0,e)]=n.slice(e+1)}return S(`query parsed`,t)}function fc(e,t,n,r){let i=Number(t);return!Number.isInteger(i)||i<n||i>r?x(`${e} must be an integer between ${n} and ${r}, got "${t}"`):S(`${e} parsed`,i)}function pc(e){let t=v.safeParse(e);return t.success?t.data:void 0}function mc(e,t){let n=pc(e);for(let e of t.split(`.`)){if(typeof n!=`object`||!n||Array.isArray(n))return;n=n[e]}return n}function hc(e){let t=pc(e);return typeof t!=`object`||!t||Array.isArray(t)?null:t}function gc(e){return typeof e==`object`&&e&&`response`in e?pc(e.response):pc(e)}function _c(e,t){let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function vc(e){if(!M(e))return x(`--input file not found: ${e}`);let t=N(e,`utf8`),n=[],r=t.split(`
35
+ `);for(let[e,t]of r.entries()){if(t.trim()===``)continue;let r=v.safeParse(Sc(t));if(!r.success)return x(`--input line ${e+1} is not valid JSON`,[t.slice(0,120)]);n.push(r.data)}return n.length===0?x(`--input has no NDJSON rows: ${e}`):S(`input parsed`,{row:n,digest:Cc(t)})}function yc(e,t,n){let r={inputDigest:t,chunkSize:n,completedChunk:[]};if(e===void 0||!M(e))return S(`no checkpoint`,r);let i=Sc(N(e,`utf8`));if(i===void 0)return x(`--checkpoint file is not valid JSON: ${e}`);let a=mc(i,`inputDigest`),o=mc(i,`chunkSize`),s=mc(i,`completedChunk`);if(a!==t||o!==n)return x(`--checkpoint ${e} was written for different input or chunk size`,[`Delete the checkpoint to start over, or restore the original input file.`]);if(!Array.isArray(s))return x(`--checkpoint ${e} has an invalid completedChunk list`);let c=s.filter(e=>Number.isInteger(e));return c.length===s.length?S(`checkpoint loaded`,{inputDigest:t,chunkSize:n,completedChunk:c}):x(`--checkpoint ${e} has an invalid completedChunk list`)}function bc(e,t,n,r){if(e===void 0)return;let i={inputDigest:t,chunkSize:n,completedChunk:[...r].toSorted((e,t)=>e-t)};P(e,`${JSON.stringify(i)}\n`)}function xc(e,t){return[...t,e]}function Sc(e){try{return JSON.parse(e)}catch{return}}function Cc(e){return yt(`sha256`).update(e).digest(`hex`)}function wc(e,t,n=m().bin[0]){let r=e.command(`batch`).summary(`Export reads to NDJSON files and run bulk NDJSON writes`).description(`batch export pages a cursor read into an NDJSON file; batch preview reports a chunk plan; batch run sends chunked NDJSON writes with bounded concurrency and checkpoint/resume. Resolve targets with command-catalog search|show first.`);Tc(r,t,n),Ec(r,t,`preview`,n),Ec(r,t,`run`,n)}function Tc(e,t,n){let r=e.command(`export`).summary(`Page a cursor read operation into an NDJSON row file`).description([`Repeatedly call one generated cursor-paginated read operation and append`,`every returned row to --out as NDJSON while stdout stays a compact summary.`,` ${n} batch export --command "<resource> <area> <operation>" \\`,` --from-file filter.json --query size=200 --out rows.ndjson`].join(`
36
+ `)).requiredOption(`--command <command>`,`Generated CLI command path or operationId`).option(`--from-file <path>`,`JSON request body sent on every page`).option(`--query <key=value>`,`Query parameter, repeatable`,xc,[]).requiredOption(`--out <path>`,`NDJSON output file; overwritten at start`).option(`--cursor <cursor>`,`Starting cursor value`).option(`--cursor-param <name>`,`Cursor query parameter name`,`cursor`).option(`--rows-path <path>`,`Dot path to the row array in the response`,`row`).option(`--next-cursor-path <path>`,`Dot path to the next cursor in the response`,`nextCursor`).option(`--max-pages <count>`,`Safety cap on pages fetched`,`1000`);T(r),r.action(async function(){let e=this.optsWithGlobals();L({mode:w(e)},await Dc(t,e,n))})}function Ec(e,t,n,r){let i=e.command(n).summary(n===`run`?`Send NDJSON rows through a batched write operation`:`Preview one batched write operation without sending rows`).description(n===`run`?[`Chunk NDJSON rows into batched request bodies for one generated write`,`operation and send them with bounded concurrency. Every chunk response is`,`appended to --out as NDJSON; --checkpoint records completed chunks so an`,`interrupted run resumes without resending them.`,`Use batch preview to inspect the chunk plan before sending rows.`,`--execute is deprecated, accepted, and ignored; run executes by its verb.`].join(`
37
+ `):`Build the same chunk plan as batch run without sending rows or writing --out.`).requiredOption(`--command <command>`,`Generated CLI command path or operationId`).requiredOption(`--input <path>`,`NDJSON file; each line is one batch row`).requiredOption(`--array-field <name>`,`Body field receiving each chunk of rows`).option(`--base <path>`,`JSON file with fixed body fields merged into every chunk`).option(`--query <key=value>`,`Query parameter, repeatable`,xc,[]).requiredOption(`--out <path>`,`NDJSON file receiving one response line per chunk`).option(`--chunk-size <count>`,`Rows per request body`,`25`).option(`--concurrency <count>`,`Concurrent requests, 1-8`,`2`).option(`--checkpoint <path>`,`JSON checkpoint file for resume`).addOption(new u(`--no-halt-on-failure`,`keep sending remaining chunks after a failed chunk`));n===`run`&&i.option(`--execute`,`Deprecated; accepted and ignored. This command executes by its verb.`,!1),T(i),i.action(async function(){let e=this.optsWithGlobals();L({mode:w(e)},await Oc(t,e,n,r))})}async function Dc(e,t,n){let r=lc(e,t.command,n);if(!r.ok||r.data===null)return r;if(ne(r.data.intent))return x(`${t.command} is a write operation; use \`batch run\``,[r.data.path]);let i=uc(r.data);if(!i.ok)return i;let a=dc(t.query??[]);if(!a.ok||a.data===null)return a;let o=fc(`--max-pages`,t.maxPages,1,1e6);if(!o.ok||o.data===null)return o;let s=t.fromFile===void 0?void 0:await Nn(t.fromFile);if(s!==void 0&&!s.ok)return s;let c=s===void 0?void 0:hc(s.data);if(s!==void 0&&c===null)return x(`--from-file must contain a JSON object`,[t.fromFile??``]);P(t.out,``);let l=t.cursor,u=0,d=0,f=!1;for(;u<o.data;){let e={...a.data,...l===void 0?{}:{[t.cursorParam]:l}},n=await b({method:r.data.method,path:r.data.path,searchParams:e,body:c??void 0,auth:r.data.auth,responseFormat:`json`});if(!n.ok)return x(`page ${u+1} failed: ${n.summary}`,[`rows already written to ${t.out}: ${d}`,...l===void 0?[]:[`resume with --cursor "${l}"`]]);let i=gc(n.data),o=mc(i,t.rowsPath);if(!Array.isArray(o))return x(`response has no array at --rows-path "${t.rowsPath}"`,[`page ${u+1}`]);At(t.out,o.map(e=>`${JSON.stringify(e)}\n`).join(``)),u+=1,d+=o.length;let s=mc(i,t.nextCursorPath);if(typeof s!=`string`||s===``||s===l){f=!0;break}l=s}return S(`${d} rows across ${u} pages written to ${t.out}${f?``:`; PARTIAL export — hit --max-pages ${o.data}, resume with --cursor "${l}"`}`,{outPath:t.out,exhausted:f,lastCursor:l},{counts:{pageCount:u,rowCount:d}})}async function Oc(e,t,n,r){let i=lc(e,t.command,r);if(!i.ok||i.data===null)return i;if(!ne(i.data.intent))return x(`${t.command} is not a write operation; use \`batch export\``,[i.data.path]);let a=uc(i.data);if(!a.ok)return a;let o=dc(t.query??[]);if(!o.ok||o.data===null)return o;let s=fc(`--chunk-size`,t.chunkSize,1,1e4);if(!s.ok||s.data===null)return s;let c=fc(`--concurrency`,t.concurrency,1,8);if(!c.ok||c.data===null)return c;let l=t.base===void 0?void 0:await Nn(t.base);if(l!==void 0&&!l.ok)return l;let u=hc(l?.data??{});if(u===null)return x(`--base must contain a JSON object`,[t.base??``]);let d=vc(t.input);if(!d.ok||d.data===null)return d;let f=_c(d.data.row,s.data),p=yc(t.checkpoint,d.data.digest,s.data);if(!p.ok||p.data===null)return p;let m=new Set(p.data.completedChunk),h=[...f.keys()].filter(e=>!m.has(e));if(n===`preview`)return S(`PREVIEW — nothing sent. ${h.length} of ${f.length} chunks (${d.data.row.length} rows) would ${i.data.method} ${i.data.path}. Run ${r} batch run to send.`,{mode:`preview`,method:i.data.method,endpoint:i.data.path,arrayField:t.arrayField,outPath:t.out},{counts:{rowCount:d.data.row.length,chunkCount:f.length,pendingChunkCount:h.length,skippedChunkCount:m.size}});P(t.out,``,{flag:m.size>0?`a`:`w`});let g=i.data,_=o.data,ee=d.data.digest,te=s.data,v=[],re=!1,ie=0,ae=async e=>{let n=f[e]??[],r={...u,[t.arrayField]:n},i=await b({method:g.method,path:g.path,searchParams:_,body:r,auth:g.auth,responseFormat:`json`}),a=i.ok?gc(i.data):null;return At(t.out,`${JSON.stringify({chunk:e,rowCount:n.length,ok:i.ok,summary:i.summary,response:a??i.data??null})}\n`),i.ok?(m.add(e),bc(t.checkpoint,ee,te,m),!0):(v.push(e),!1)};await Promise.all(Array.from({length:c.data},async()=>{for(;!re;){let e=h[ie];if(ie+=1,e===void 0)return;!await ae(e)&&t.haltOnFailure&&(re=!0)}}));let oe={rowCount:d.data.row.length,chunkCount:f.length,completedChunkCount:m.size,failedChunkCount:v.length,remainingChunkCount:f.length-m.size-v.length},se={outPath:t.out,checkpointPath:t.checkpoint,failedChunk:v,halted:re};return v.length>0?x(`${v.length} chunk(s) failed; responses in ${t.out}${t.checkpoint===void 0?``:`, resume via --checkpoint ${t.checkpoint}`}`,[JSON.stringify({...se,...oe})]):S(`${m.size}/${f.length} chunks sent; responses in ${t.out}`,se,{counts:oe})}function kc(e,t=E,n=m().bin[0]){let r=e.command(`completion`).summary(`Generate shell completion scripts`).description(`Generate shell completion scripts for the aVenture CLI.`);for(let i of[`bash`,`fish`,`zsh`])r.command(i).summary(`Print ${i} shell completions`).description(`Print ${i} completion definitions for ${n}.`).action(()=>{A.stdout.write(jc(e,i,t))});Uo(r,n),Wo(r,n)}function Ac(){return m().bin}function jc(e,t,n=E,r=Ac()){let i=Bc(n);return t===`fish`?[`# fish completions for ${r.join(`, `)}`,...Nc(e),...r.map(e=>`complete -c ${J(e)} -e`),`${Qc(r)} -f`,...Pc(e,r),...Fc(e,i,r),``].join(`
38
+ `):Mc(e,t,i,r)}function Mc(e,t,n,r){let i=t===`zsh`?`typeset -ga `:``,a=`complete -F _aventure_cli ${r.map(e=>e.replaceAll(`'`,`'\\''`)).join(` `)}`,[o,s,c]=Uc(e,n);return[...t===`zsh`?[`#compdef ${r.join(` `)}`]:[],`# ${t} completions for ${r.join(`, `)}`,`${i}_aventure_cli_commands=(`,...o.map(e=>` ${e}`),`)`,`${i}_aventure_cli_options=(`,...s.map(e=>` ${e}`),`)`,`${i}_aventure_cli_values=(`,...c.map(e=>` ${e}`),`)`,``,...Kc(t),...t===`bash`?[a,``]:[``]].join(`
39
+ `)}function Nc(e){return[`function __aventure_cli_command_path\n set -l global_value_options ${Ic(e).filter(e=>e.required||e.optional).flatMap(e=>Yc(e)??[]).map(J).join(` `)}\n set -l tokens (commandline -xpc)\n if test (count $tokens) -gt 0\n set -e tokens[1]\n end\n set -l path\n set -l skip_next 0\n for token in $tokens\n if test $skip_next -eq 1\n set skip_next 0\n continue\n end\n if string match -q -- '--*=*' $token\n set -l name (string replace -r '^--([^=]+)=.*$' '$1' -- $token)\n contains -- $name $global_value_options; and continue\n end\n if string match -q -- '--*' $token\n set -l name (string replace -r '^--' '' -- $token)\n if contains -- $name $global_value_options\n set skip_next 1\n continue\n end\n break\n end\n if string match -q -- '-*' $token\n break\n end\n set -a path $token\n end\n printf '%s\\n' $path\nend\n`,`function __aventure_cli_path_is
40
+ set -l expected $argv
41
+ set -l actual (__aventure_cli_command_path)
42
+ if test (count $actual) -ne (count $expected)
43
+ return 1
44
+ end
45
+ if test (count $expected) -eq 0
46
+ return 0
47
+ end
48
+ for index in (seq (count $expected))
49
+ if test $actual[$index] != $expected[$index]
50
+ return 1
51
+ end
52
+ end
53
+ return 0
54
+ end
55
+ `].flatMap(e=>e.split(`
56
+ `))}function Pc(e,t){return Hc(e).map(e=>`${Qc(t)} -f -n ${J($c(e.parentPath))} -a ${J(e.name)} -d ${J(e.description)}`).toSorted((e,t)=>e.localeCompare(t))}function Fc(e,t,n){return Xc(e).flatMap(e=>{let r=Zc(e),i=r.length===0?void 0:$c(r);return Ic(e).flatMap(e=>{let a=t.get(Vc(r,e));return Gc(a)?Lc(e,i,a,n):[]})}).toSorted((e,t)=>e.localeCompare(t))}function Ic(e){return e.parent===null?e.createHelp().visibleOptions(e):e.options}function Lc(e,t,n,r){let i=Yc(e);if(i===void 0)return[];let a=e.argChoices??Wc(n),o=[`-l ${J(i)}`,e.short===void 0?``:`${e.short.startsWith(`--`)?`-l`:`-s`} ${J(e.short.replace(/^-+/,``))}`].filter(Boolean),s=t===void 0?``:` -n ${J(t)}`,c=e.required||e.optional?Rc(a,zc(i,n)):`-f`,l=`${Qc(r)}${s} ${o.join(` `)} ${c}`;return a===void 0||a.length===0?[`${l} -d ${J(el(e.description))}`]:a.map(t=>`${l} -a ${J(t)} -d ${J(el(e.description))}`)}function Rc(e,t){return e!==void 0&&e.length>0?`-x`:t?`-r -F`:`-r -f`}function zc(e,t){return e===`from-file`?!0:t===void 0||t.some(({location:e})=>e!==`body`)?!1:t.every(({schemaFormat:e})=>e===`binary`)?!0:t.length===1&&[`file`,`path`].includes(e.split(`-`).at(-1)??``)}function Bc(e){return new Map(e.flatMap(e=>[...e.parameters.map(e=>[e]),...Tn(e.requestBody??[]).map(({variant:e})=>e.map(({parameter:e})=>e))].map(t=>{let n=t[0];if(n===void 0)throw Error(`Generated CLI option has no parameter`);return[Vc(e.cliPath,n),t]})))}function Vc(e,t){let n=`flag`in t?t.flag.split(/\s+/)[0]?.replace(/^--/,``):Yc(t);if(`flag`in t&&(n===void 0||n.length===0||n===t.flag))throw Error(`Cannot render completion for option flag: ${t.flag}`);return`${e.join(`\0`)}\u0000${n??``}`}function Hc(e){return Xc(e).flatMap(e=>e.commands.map(t=>({parentPath:Zc(e),name:t.name(),description:el(t.summary()||t.description()||t.name())})))}function Uc(e,t){let n=[],r=[];for(let i of Xc(e)){let e=Zc(i);for(let a of Ic(i)){let i=Yc(a);if(i===void 0)continue;let o=t.get(Vc(e,a));if(!Gc(o))continue;let s=a.argChoices??Wc(o),c=`none`;(a.required||a.optional)&&(c=s!==void 0&&s.length>0?`choice`:`scalar`,c===`scalar`&&zc(i,o)&&(c=`file`)),n.push(qc([e.join(` `),`--${i}`,a.short??``,a.description,c]));for(let t of s??[])r.push(qc([e.join(` `),`--${i}`,t,a.description]))}}return[Hc(e).map(e=>qc([e.parentPath.join(` `),e.name,e.description])).toSorted((e,t)=>e.localeCompare(t)),n.toSorted((e,t)=>e.localeCompare(t)),r.toSorted((e,t)=>e.localeCompare(t))]}function Wc(e){let t=e?.[0]?.choices;if(e!==void 0&&t!==void 0)return e.every(e=>e.choices?.length===t.length&&e.choices.every((e,n)=>e===t[n]))?t:void 0}function Gc(e){return e?.some(({visibility:e})=>e!==`private`)??!0}function Kc(e){let t=e===`bash`,n=t?`COMP_WORDS`:`words`,r=t?`COMP_CWORD`:`CURRENT`,i=t?"${path[*]}":"${(j: :)path}",a=t?'"${_aventure_cli_options[@]}"':`$_aventure_cli_options`,o=t?'"${_aventure_cli_values[@]}"':`$_aventure_cli_values`,s=t?'"${_aventure_cli_commands[@]}"':`$_aventure_cli_commands`;return[`function _aventure_cli {`,` local current="\${${n}[${r}]}" previous="\${${n}[${r}-1]}" row row_path long short description mode name value option token key prefix candidate file_current`,...t?[` COMPREPLY=()`]:[],` local index=${t?1:2} skip_next=0; local -a path names descriptions`,` while (( index < ${r} )); do`,` token="\${${n}[index]}"; (( skip_next )) && { skip_next=0; (( index++ )); continue; }`,` if [[ "$token" == -* && "$token" != "-" && "$token" != "--" ]]; then`,` option="\${token%%=*}"; key="${i}"; mode=''`,` for row in ${a}; do IFS='|' read -r row_path long short description mode <<< "$row"; [[ "$row_path" == "$key" && ( "$long" == "$option" || "$short" == "$option" ) ]] && break; mode=''; done`,` [[ -n "$mode" && "$mode" != none && "$token" != *=* ]] && skip_next=1`,` elif [[ "$token" != -* ]]; then path+=("$token"); fi`,` (( index++ ))`,` done`,` key="${i}"`,` if [[ "$current" == --*=* || ( "$previous" == -* && "$current" != -* ) ]]; then`,` option="$previous"; prefix=''; file_current="$current"; [[ "$current" == --*=* ]] && { option="\${current%%=*}"; prefix="$option="; file_current="\${current#*=}"; }`,` for row in ${a}; do IFS='|' read -r row_path long short description mode <<< "$row"; [[ "$row_path" == "$key" && ( "$long" == "$option" || "$short" == "$option" ) ]] && { option="$long"; break; }; mode=''; done`,t?` [[ "$mode" == file ]] && { while IFS= read -r candidate; do COMPREPLY+=("$prefix$candidate"); done < <(compgen -f -- "$file_current"); return 0; }`:` [[ "$mode" == file ]] && { _files; return 0; }`,t?` [[ "$mode" == choice ]] && for row in ${o}; do IFS='|' read -r row_path long value description <<< "$row"; [[ "$row_path" == "$key" && "$long" == "$option" ]] && { candidate="$prefix$value"; [[ "$candidate" == "$current"* ]] && COMPREPLY+=("$candidate"); }; done`:` [[ "$mode" == choice ]] && for row in ${o}; do IFS='|' read -r row_path long value description <<< "$row"; [[ "$row_path" == "$key" && "$long" == "$option" ]] && { names+=("$prefix$value"); descriptions+=("$description"); }; done`,` elif [[ "$current" == -* ]]; then`,` for row in ${a}; do`,` IFS='|' read -r row_path long short description mode <<< "$row"`,t?` [[ "$row_path" == "$key" ]] && { [[ "$long" == "$current"* ]] && COMPREPLY+=("$long"); [[ -n "$short" && "$short" == "$current"* ]] && COMPREPLY+=("$short"); }`:` [[ "$row_path" == "$key" ]] && { names+=("$long"); descriptions+=("$description"); [[ -n "$short" ]] && { names+=("$short"); descriptions+=("$description"); }; }`,` done`,` elif [[ "$previous" != -* ]]; then`,` for row in ${s}; do`,` IFS='|' read -r row_path name description <<< "$row"`,t?` [[ "$row_path" == "$key" ]] && { [[ "$name" == "$current"* ]] && COMPREPLY+=("$name"); }`:` [[ "$row_path" == "$key" ]] && { names+=("$name"); descriptions+=("$description"); }`,` done`,` fi`,...t?[]:[" (( ${#names} )) && compadd -d descriptions -a names"],` return 0`,`}`,...t?[]:[`_aventure_cli "$@"`]]}function qc(e){return`$'${e.map(Jc).join(`|`)}'`}function Jc(e){return el(e).replaceAll(`\\`,`\\\\`).replaceAll(`'`,`\\'`).replaceAll(`|`,` `)}function Yc(e){return e.long?.replace(/^--/,``)}function Xc(e){return[e,...e.commands.flatMap(e=>Xc(e))]}function Zc(e){let t=[];for(let n=e;n?.parent!==null;n=n.parent)t.unshift(n.name());return t}function Qc(e){return`complete ${e.map(e=>`-c ${J(e)}`).join(` `)}`}function $c(e){return[`__aventure_cli_path_is`,...e.map(J)].join(` `)}function el(e){return e.replace(/\s+/g,` `).trim()}function J(e){return`'${e.replace(/[\r\n\t]/g,` `).replaceAll(`\\`,`\\\\`).replaceAll(`'`,`\\'`)}'`}function tl(e,t){if(e!==t)return;let n=nl(t);n!==void 0&&t.error(`error: ${il(t)} takes text input, not a JSON object.\n${n}`,{code:`aventure.payloadOperand`})}function nl(e){if(!process.argv.includes(`--`)&&e.args.some(rl))return`hint: use the command's named options instead of a JSON payload; run --help to list them.`}function rl(e){if(!e.startsWith(`{`))return!1;try{return typeof JSON.parse(e)==`object`}catch{return!1}}function il(e){let t=[];for(let n=e;n?.parent;n=n.parent)t.unshift(n.name());return t.join(` `)}function al(e){return e.message.match(/required option '([^']+)' not specified/iu)?.[1]?.split(/\s+/u)[0]}function ol(e){return e.message.match(/unknown option '([^']+)'/iu)?.[1]}function sl(e){return e.message.match(/unknown command '([^']+)'/iu)?.[1]}function cl(e){return e.flags.split(` `)[0]??e.flags}function ll(e,t){let n=al(t);if(n===void 0)return;let r=e.options.findIndex(e=>cl(e)===n);if(r<0)return;let i=e.options.slice(r+1).filter(e=>e.mandatory).map(t=>[cl(t),e.getOptionValue(t.attributeName())]).find(([,e])=>typeof e==`string`&&e.length>0)?.[0];if(i!==void 0)return`hint: ${n} is still required for this nested command; supplied child selector ${i} does not replace the parent selector.`}function Y(e){let t=[];for(let n=e;n!==null&&n.parent!==null;n=n.parent)t.unshift(n.name());return t}function ul(e){return e.commands.length===0?[e]:e.commands.flatMap(ul)}function dl(e,t){return Y(t).slice(Y(e).length)}function X(e){let t=e;for(;t.parent!==null;)t=t.parent;return t}function fl(e,t){return t.toSorted((t,n)=>{let r=dl(e,t),i=dl(e,n),a=r.at(-1)===`get`?0:1,o=i.at(-1)===`get`?0:1;return r.length-i.length||a-o})[0]}function pl(e){return/^[A-Za-z0-9_./:=@+-]+$/u.test(e)?e:`'${e.replaceAll(`'`,`'"'"'`)}'`}function ml(e,t){let n=Y(e),r=process.argv.slice(2+n.length);return[X(e).name(),...n,...dl(e,t),...r].map(pl).join(` `)}function hl(e,t){let n=ol(t);if(n===void 0||e.commands.length===0)return;let r=fl(e,ul(e).filter(e=>e.options.some(e=>cl(e)===n)));if(r!==void 0)return`hint: run: ${ml(e,r)}`}function gl(e){return e!==void 0&&Object.hasOwn(Ge,e)}function _l(e,t){let n=e;for(let e of t){let t=n.commands.find(t=>t.name()===e);if(t===void 0)return;n=t}return n}function vl(e,t){let n=Y(e),r=[...n.slice(1),t];if(!gl(n.at(0))||!gl(r.at(0)))return;let i=_l(X(e),r);if(i===void 0)return;let a=i;for(let e of process.argv.slice(2+n.length+1)){if(e.startsWith(`-`))break;let t=a.commands.find(t=>t.name()===e);if(t===void 0)break;r.push(e),a=t}return r}function yl(e,t){let[n]=Y(e);if(!gl(n))return;let r=[n,t];return _l(X(e),r)?.commands.length===0?r:void 0}function bl(e){let[t,...n]=e.args;if(t===void 0)return[];let r=ul(X(e)).map(Y),i=n.findIndex((e,t)=>{let i=[...n.slice(0,t),e];return!r.some(e=>e.some((t,n)=>t===i[0]&&i.every((t,r)=>e[n+r]===t)))});return[t,...i<0?n:n.slice(0,i)]}function xl(e,t){let n=Y(e),r=process.argv.slice(2+n.length);if(t.length===0||t.some((e,t)=>r[t]!==e))return;let i=Ve(E).map(e=>e.cliPath).filter(e=>e[0]!==n[0]&&e.length>=t.length&&t.every((n,r)=>e[e.length-t.length+r]===n)),a=i.find(e=>e.length===t.length&&e.every((e,n)=>e===t[n]))??(i.length===1?i[0]:void 0);if(a!==void 0)return`hint: run: ${[X(e).name(),...a].map(pl).join(` `)}`}function Sl(e,t,n){if(!wl(t))return;let r=e.args.slice(n.length),i=r.findIndex(e=>e.startsWith(`-`));return`hint: Did you mean: ${[X(e).name(),...t,...i<0?[]:r.slice(i)].map(pl).join(` `)}`}function Cl(e){let t=Y(e);if(t.at(1)!==void 0&&gl(t.at(0)))return`hint: inspect generated command group: ${[X(e).name(),...t,`--help`].map(pl).join(` `)}`}function wl(e,t){let n=e.join(` `);return E.some(e=>{let r=`cliAliasPath`in e?e.cliAliasPath:void 0;return e.cliPath.join(` `)!==n&&r?.join(` `)!==n?!1:t===void 0||ne(e.intent)===t})}function Tl(e){let t=Y(e);if(gl(t.at(0))&&wl(t))return`hint: inspect generated command: ${[X(e).name(),...t,`--help`].map(pl).join(` `)}`}function El(e){let t=new Set,n=[];for(let r of E){let i=_l(e,r.cliPath);if(i===void 0)continue;let a=i.options.map(cl);if(ne(r.intent))n.push(a);else for(let e of a)t.add(e)}let[r=[],...i]=n;return new Set(r.filter(e=>!t.has(e)&&i.every(t=>t.includes(e))))}function Dl(e,t){let n=Y(e);if(wl(n,!1)&&El(X(e)).has(t))return`hint: ${n.join(` `)} is a read operation; ${t} is a deprecated compatibility option only on mutation commands`}function Ol(e,t,n=!0){let r=X(e),i=r.commands.find(e=>e.name()===`command-catalog`),a=i?.commands.find(e=>e.name()===`search`);if(i===void 0||a===void 0)return;let o=[r.name(),i.name(),a.name(),t],s=Y(e).at(0),c=a.options.find(e=>cl(e)===`--root`);return n&&s!==void 0&&c!==void 0&&gl(s)&&o.push(cl(c),s),`hint: search generated commands: ${o.map(pl).join(` `)}`}function kl(e,t){let n=sl(t);if(n===void 0||t.message.includes(`
57
+ (Did you mean `))return;let r=bl(e),i=xl(e,r);if(i!==void 0)return i;let a=vl(e,n);if(a!==void 0)return Ol(e,a.join(` `),!1);let o=yl(e,n);if(o!==void 0)return Sl(e,o,r)??Ol(e,o.join(` `),!1);let s=r.join(` `)||n;return Cl(e)??Ol(e,s)}function Al(e){return t=>{if(t.code===`commander.missingMandatoryOptionValue`){let n=e.options.filter(t=>t.mandatory&&e.getOptionValue(t.attributeName())===void 0);if(n.length>1){let e=n.map(e=>e.flags.split(`, `).at(-1)??e.flags);process.stderr.write(`error: missing required options: ${e.join(`, `)}\n`)}for(let n of[nl(e),ll(e,t)])n!==void 0&&process.stderr.write(`${n}\n`)}else if(t.code===`commander.excessArguments`){let t=nl(e)??Tl(e);t!==void 0&&process.stderr.write(`${t}\n`)}else if(t.code===`commander.unknownOption`){let n=ol(t),r=hl(e,t)??(n!==void 0&&!t.message.includes(`
58
+ (Did you mean `)?Dl(e,n)??Ol(e,n.replace(/^--/u,``)):void 0);r!==void 0&&process.stderr.write(`${r}\n`)}else if(t.code===`commander.unknownCommand`){let n=kl(e,t);n!==void 0&&process.stderr.write(`${n}\n`)}process.exit(t.exitCode)}}var jl=class extends u{group;constructor(e){super(`-h, --help`,`display help for command`),this.group=e}is(e){if(e!==this.short&&e!==this.long)return!1;let t=this.group.args.at(0);return t===void 0||t.startsWith(`-`)?!0:this.group.commands.some(e=>e.name()===t||e.aliases().includes(t))}};function Ml(e){e.showHelpAfterError(!1).exitOverride(Al(e)),e.commands.length===0?e.hook(`preAction`,tl):e.addHelpOption(new jl(e));for(let t of e.commands)Ml(t)}var Nl=`dist/aventure-cli/command-catalog.compact.txt`,Pl=` · `,Fl=`-`;function Il(e=m().bin[0]){return k(Ll(D(Vt(import.meta.url)),e),Nl)}function Ll(e,t){let n=e;for(;;){if(M(k(n,`package.json`)))return n;let r=D(n);if(r===n)throw Error(`No package.json above ${e}; ${t} is not in a package layout.`);n=r}}function Rl(e,t){let n=t.join(` `).trim();return n.length===0?e:{...e,q:e.q===void 0?n:`${e.q} ${n}`}}function zl(e,t,n,r=m().bin[0]){let i=pr(e,t,r);if(!i.ok){L({mode:n},i);return}Vl({opts:e,mode:n,data:i.data,defaultFormat:`lines`,rendered:Ul(i.data,Hl(e.format,`lines`)),summary:`Generated operation matches`})}function Bl(e,t,n,r=m().bin[0]){let i=mr(e,t,r);if(!i.ok||i.data===null){L({mode:n},i);return}Vl({opts:e,mode:n,data:i.data,defaultFormat:`usage`,rendered:Wl(i.data,Hl(e.format,`usage`)),summary:`Generated operation detail`})}function Vl(e){let t=e.mode,n=e.rendered.endsWith(`
59
+ `)?e.rendered:`${e.rendered}\n`;if(e.opts.output!==void 0){P(e.opts.output,n),L({mode:t},S(e.summary,{outputPath:e.opts.output,byteLength:Buffer.byteLength(n,`utf8`),format:Hl(e.opts.format,e.defaultFormat)},{counts:Yl(e.data)}));return}if(t===`text`){process.stdout.write(n);return}L({mode:t},S(e.summary,e.data,{counts:Yl(e.data)}))}function Hl(e,t){return e??t}function Ul(e,t){return t===`json`?JSON.stringify(e,null,2):t===`ndjson`?e.operation.map(e=>JSON.stringify(e)).join(`
60
+ `):t===`text`?ql(e.operation):t===`compact`?e.operation.map(Gl).join(`
61
+ `):e.operation.map(Jl).join(`
62
+ `)}function Wl(e,t){return t===`json`?JSON.stringify(e,null,2):t===`ndjson`?JSON.stringify(e.operation):t===`lines`?Jl(e.operation):t===`compact`?Gl(e.operation):e.usage}function Gl(e){let t=Kl(e);return[e.cli.command,e.summary,t.length===0?Fl:t.join(` `)].join(Pl)}function Kl(e){return e.flags.filter(t=>t.required&&(t.contentType===void 0||t.contentType===e.body.contentType)).map(e=>e.name)}function ql(e){return e.map(e=>`${e.cli.command}\n ${Jl(e)}`).join(`
63
+ `)}function Jl(e){let t=Kl(e);return[Z(`operationId`,e.operationId),Z(`scope`,e.scope),Z(`mutates`,String(e.mutates)),Z(`destructive`,String(e.destructive)),Z(`intent`,e.intent),Z(`resource`,e.resource),Z(`cli`,e.cli.command),e.cli.alias===null?``:Z(`alias`,e.cli.alias),e.mcpTool===null?``:Z(`mcpTool`,e.mcpTool),Z(`method`,e.method),Z(`path`,e.path),Z(`auth`,e.auth),Z(`flags`,[...new Set(e.flags.map(e=>e.name))].join(` `)),Z(`requiredFlags`,t.join(` `)),Z(`bodyKind`,e.body.kind??``),Z(`bodyRequired`,String(e.body.required)),Z(`summary`,e.summary)].filter(e=>e.length>0).join(` `)}function Z(e,t){return t.length===0?``:`${e}=${JSON.stringify(t)}`}function Yl(e){return`count`in e?e.count:{returned:1}}function Xl(e,t=new Date){let n=$l(e);return{schemaVersion:1,generatedFrom:`MCP_GENERATION_CONTRACT`,generatedAt:t.toISOString(),totalOperations:n.length,note:`Projection of MCP_GENERATION_CONTRACT - see mcp/scripts/build-unified-operations.ts header for SSOT rules.`,operations:n}}function Zl(e){return`${JSON.stringify(e,null,2)}\n`}function Ql(e,t){let n=k(e),r=Zl(t);return Nt(D(n),{recursive:!0}),P(n,r),{target:n,byteLength:Buffer.byteLength(r,`utf8`),totalOperations:t.totalOperations}}function $l(e){return e.map(e=>({operationId:e.operationId,method:e.method,path:e.path,resource:e.resource,intent:e.intent,cliCommand:e.projection.cliPath.join(` `),cliPath:e.projection.cliPath,cliAliasCommand:e.projection.cliAliasPath?.join(` `)??null,cliAliasPath:e.projection.cliAliasPath??null,mcpTool:l(e.intent),bodySchemaName:e.requestBody?.[0]?.schemaName??null,bodySchemaImport:e.requestBody?.[0]?.schemaImport??null,auth:e.projection.auth,scope:e.projection.scope,destructive:e.projection.destructive})).toSorted((e,t)=>e.path.localeCompare(t.path)||e.method.localeCompare(t.method)||e.operationId.localeCompare(t.operationId))}var eu=`Match only the first canonical or CLI-alias command segment`;function tu(e,t,n=m().bin[0]){ru(e,t,n);let r=e.command(`command-catalog`).summary(`LLM agent only: search generated CLI metadata`).description([`LLM agent only: search and dump generated ${n} command metadata.`,`This is read-only command metadata derived from the generated OpenAPI command specs.`,`Use --format lines for rg/grep/ag/ack and --format ndjson|json for ast-grep/sg/parsers.`,"Use --format compact for one `cli · summary · requiredFlags` row per operation."].join(`
64
+ `));r.addHelpText(`after`,()=>`\nShipped compact catalog, greppable without running this CLI:\n ${Il(n)}\n`),nu(r,t,n),ou(r,t,n),su(r,t,n),cu(r)}function nu(e,t,n){let r=e.command(`search`).summary(`Search generated operations`).description(`Search generated operation metadata without calling the API.`).argument(`[query...]`,`Search query; same as --q.`).option(`--q <query>`,`Search generated command metadata`).option(`--root <root>`,eu).addOption(new u(`--scope <scope>`,`Filter by required auth scope`).choices([`read`,`write`,`all`]).default(`all`)).addOption(new u(`--mutates <mutates>`,`Filter mutating operations`).choices([`true`,`false`,`any`]).default(`any`)).addOption(new u(`--destructive <destructive>`,`Filter destructive operations`).choices([`true`,`false`,`any`]).default(`any`)).addOption(new u(`--intent <intent>`,`Filter by operation intent`).choices([`read`,`lookup`,`search`,`write`,`delete`,`status`,`all`]).default(`all`)).addOption(new u(`--method <method>`,`Filter by HTTP method`).choices([`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`all`]).default(`all`)).option(`--limit <count>`,`Maximum rows to return`,`20`).addOption(new u(`--format <format>`,`Text/file render format`).choices([`text`,`lines`,`compact`,`json`,`ndjson`]).default(`lines`)).option(`--output <path>`,`Write rendered output to a file`);T(r),r.action(function(e){let r=this.optsWithGlobals(),i=w(r,`text`),a=r.limit?.trim()??``,o=a===``?NaN:Number(a);if(!Number.isInteger(o)||o<0){L({mode:i},x(`Invalid --limit value: ${JSON.stringify(r.limit)} (expected a non-negative integer)`,["Pass a non-negative integer, e.g. `--limit 20`; omit the flag for the default of 20."]));return}zl(Rl(r,e),t,i,n)})}function ru(e,t,n){let r=e.command(`docs`).summary(`Look up generated API documentation offline`).description(`Print generated operation documentation without calling the API.`).command(`api`).summary(`Show documentation for one operation`).description([`Print one operation's summary, description, flags, example, and error contract.`,"Select it by `<METHOD> <path>` (route template or concrete path), by operationId,",`or by CLI command path, e.g. "entities get".`].join(`
65
+ `)).argument(`<selector...>`,`METHOD and path, an operationId, or a CLI command path`);T(r),r.action(function(e){let r=this.optsWithGlobals(),i=w(r),a=au(e,t);if(!a.ok||a.data===null){L({mode:i},a);return}Bl({...r,...a.data},t,i,n)})}var iu='Accepted selectors: `<METHOD> <route template or concrete path>`, an operationId, or a CLI command path such as "entities get".';function au(e,t){let[n,...r]=e,i=ue.find(e=>e===n?.toLowerCase());if(i===void 0||r.length===0){let n=e.join(` `).trim();return S(`Resolved by name`,t.some(e=>e.operationId===n)?{operationId:n}:{command:n})}let a=he(i),o=r.join(``),s=t.find(e=>e.method===a&&e.path===o);if(s!==void 0)return S(`Resolved by route template`,{operationId:s.operationId});let c=le({method:a,path:o});return!c.ok||c.data===null?x(c.summary,[...c.warnings,iu]):S(`Resolved by method and path`,{operationId:c.data.operation.operationId})}function ou(e,t,n){let r=e.command(`show`).summary(`Show one generated operation`).description(`Show one generated operation by command path or operationId.`).option(`--command <command>`,`CLI command path, with or without ${n} prefix`).option(`--operation-id <operationId>`,`Generated OpenAPI operationId`).addOption(new u(`--format <format>`,`Text/file render format`).choices([`usage`,`lines`,`compact`,`json`,`ndjson`]).default(`usage`)).option(`--output <path>`,`Write rendered output to a file`);T(r),r.action(function(){let e=this.optsWithGlobals();Bl(e,t,w(e,`text`),n)})}function su(e,t,n){let r=e.command(`dump`).summary(`Dump generated operations`).description(`Dump generated operations for rg/grep/ag/ack or JSON/NDJSON tooling.`).option(`--root <root>`,eu).addOption(new u(`--scope <scope>`,`Filter by required auth scope`).choices([`read`,`write`,`all`]).default(`all`)).addOption(new u(`--mutates <mutates>`,`Filter mutating operations`).choices([`true`,`false`,`any`]).default(`any`)).addOption(new u(`--destructive <destructive>`,`Filter destructive operations`).choices([`true`,`false`,`any`]).default(`any`)).addOption(new u(`--intent <intent>`,`Filter by operation intent`).choices([`read`,`lookup`,`search`,`write`,`delete`,`status`,`all`]).default(`all`)).addOption(new u(`--method <method>`,`Filter by HTTP method`).choices([`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`all`]).default(`all`)).option(`--limit <count>`,`Maximum rows to return`).addOption(new u(`--format <format>`,`Text/file render format`).choices([`text`,`lines`,`compact`,`json`,`ndjson`]).default(`lines`)).option(`--output <path>`,`Write rendered output to a file`);T(r),r.action(function(){let e=this.optsWithGlobals();zl(e,t,w(e,`text`),n)})}function cu(e){let t=e.command(`unified`).summary(`Dump unified CLI/API/MCP operation JSON`).description(`Dump the flat unified operations JSON projected from MCP_GENERATION_CONTRACT.`).option(`--output <path>`,`Write unified operations JSON to a file`);T(t),t.action(function(){let e=this.optsWithGlobals(),t=w(e,`text`),n=Xl(gt);if(e.output!==void 0){let r=Ql(e.output,n);L({mode:t},S(`Unified operations JSON written`,{outputPath:r.target,byteLength:r.byteLength,schemaVersion:n.schemaVersion},{counts:{totalOperations:r.totalOperations}}));return}if(t===`text`){process.stdout.write(Zl(n));return}L({mode:t},S(`Unified operations JSON`,n,{counts:{totalOperations:n.totalOperations}}))})}var lu=m(Vt(import.meta.url)),Q=lu.bin[0];function uu(e,t){f({component:`aventure-cli`,event:`fatal`,message:e.message,error:e}),process.stderr.write(`${Q} fatal (${t}): ${e.stack??e.message}\n`),ar({...x(`${Q} ${t}: ${e.message}`,[e.name||`Error`]),counts:{exitCode:1}}),process.exit(1)}function du(e){return Je[$e(e)??`cli`]}function fu(e,t){let n=t.map(e=>{let t=e.cliPath[0]??``;return{spec:e,top:t,rank:du(t).rank}}).toSorted((e,t)=>e.rank-t.rank||e.top.localeCompare(t.top)).map(e=>e.spec);for(let t of n)pu(e,t,t.cliPath),t.cliAliasPath!==void 0&&t.cliAliasPath.join(` `)!==t.cliPath.join(` `)&&pu(e,t,t.cliAliasPath)}function pu(e,t,n){let r=e,i=``;for(let e of n.slice(0,-1))i=i===``?e:`${i} ${e}`,r=_u(r,e,i);let a=n.at(-1)??t.operationId,o=r.commands.find(e=>e.name()===a)??r.command(a),s=t.requestBody?.flatMap(({parameter:e})=>e)??[];o.summary(t.summary||t.operationId).description([`${t.method} ${t.path}.`,t.description,t.requestBody?.[0]?.kind===`json`||[...t.parameters,...s].some(e=>ce(e.schemaType,e.itemSchemaType))?Te:``].filter(Boolean).join(`
66
+ `));for(let e of t.parameters)vu(o,e);In(o,t),ne(t.intent)&&o.option(`--execute`,`Deprecated; accepted and ignored. This command executes by its verb.`,!1),T(o);let c=mu(t);if(c!==void 0){o.argument(`[text...]`,c.description||`Same as ${gu(c.flag)}.`),o.action(async function(e){let n=this.optsWithGlobals(),r=w(n),i=hu(c,e,n);return L({mode:r},i.ok&&i.data!==null?await yu(t,i.data,r):i)});return}o.action(async function(){let e=this.optsWithGlobals(),n=w(e),r=await yu(t,e,n);r.ok&&r.data instanceof Uint8Array?process.stdout.write(r.data):L({mode:n},r)})}function mu(e){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.cliPath[0]!==`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 hu(e,t,n){let r=t.join(` `).trim();return r.length===0?S(`No positional text`,n):n[e.optionKey]===void 0?S(`Positional text parsed`,{...n,[e.optionKey]:r}):x(`Use either the positional argument or ${gu(e.flag)}, not both.`)}function gu(e){return e.split(` `)[0]??e}function _u(e,t,n){let r=e.commands.find(e=>e.name()===t);if(r!==void 0)return r;let i=Ge[n],a=e.command(t);return i!==void 0&&a.summary(i.summary).description(i.summary),a}function vu(e,t){let n=t.description||`${t.name} ${t.location} parameter`,r=t.defaultValue===void 0?void 0:typeof t.defaultValue==`string`||typeof t.defaultValue==`boolean`?t.defaultValue:[...t.defaultValue];if(t.legacyFlag!==void 0){let i=new u(t.flag,n);r!==void 0&&i.default(r);let a=new u(t.legacyFlag,n).conflicts(t.optionKey);e.addOption(i).addOption(a),e.hook(`preAction`,e=>{let n=e.opts(),r=n[t.optionKey],o=n[a.attributeName()];if(o!==void 0){(r===void 0||e.getOptionValueSource(t.optionKey)==="default")&&e.setOptionValueWithSource(t.optionKey,o,`cli`);return}t.required&&r===void 0&&e.error(`error: required option '${i.flags}' not specified`,{code:`commander.missingMandatoryOptionValue`})});return}if(r!==void 0){e.option(t.flag,n,r);return}if(t.required){e.requiredOption(t.flag,n);return}e.option(t.flag,n)}async function yu(e,t,n){if(t.environment!==void 0){let e=oe(t.environment);if(e===null)return x(`Unknown aVenture environment '${t.environment}'`,[`Use one of: ${ie().join(`, `)}`]);process.env.API_ENV=e}let r=await Vn(e,t);if(!r.ok)return r;let i=Object.fromEntries(e.parameters.filter(e=>e.location===`path`).map(e=>{let n=t[e.optionKey];if(Array.isArray(n))return[e.name,n.at(0)??``];if(n===void 0)throw Error(`Missing required option ${e.optionKey}`);return[e.name,String(n)]})),a=Object.fromEntries(e.parameters.filter(e=>e.location===`query`).flatMap(e=>{let n=t[e.optionKey];if(n===void 0||Array.isArray(n)&&n.length===0)return[];let r=Array.isArray(n)||typeof n==`boolean`?n:String(n);return[[e.name,r]]})),o=Object.fromEntries(e.parameters.filter(e=>e.location===`header`).flatMap(e=>{let n=t[e.optionKey];return n===void 0||Array.isArray(n)&&n.length===0?[]:[[e.name,Array.isArray(n)?n.join(`,`):String(n)]]}));return await b({method:e.method,path:_e(e.operationId,i),searchParams:a,headers:o,body:r.data,contentType:typeof t.contentType==`string`?t.contentType:void 0,auth:e.auth,responseFormat:ze(n)?`json`:`auto`,responseBytes:e.binaryResponse===!0})}process.on(`uncaughtException`,e=>uu(e,`uncaughtException`)),process.on(`unhandledRejection`,e=>uu(e instanceof Error?e:Error(String(e)),`unhandledRejection`));var bu=Qe(process.argv.slice(2),E),xu=bu===`required`?E:Ve(E),$=new re;$.name(Q).version(lu.version).summary(`CLI for the aVenture API: read and maintain venture-research data — entities, people, funding, news, media, and search`).description([`CLI for the aVenture API: read and maintain venture-research data —`,`entities, people, funding, news, media, and search.`,``,`Runs generated aVenture API commands and prints clean text by default,`,`or machine-readable --data / --json output when requested.`,`Mutation commands execute by their verb; --execute is a deprecated compatibility no-op.`,`The aventure-mcp-server tools execute through this same CLI.`].join(`
67
+ `)).addOption(new u(`--environment <environment>`,`route all API calls to a mapped API environment (default: API_URL host, else API_ENV, else ${ae})`).choices([...ie()])).showHelpAfterError(`(run \`${Q} --help\` for usage)`),fu($,xu),Us($,Q),us($,lu),wc($,xu,Q),kc($,xu,Q),tu($,xu,Q),Rr($,xu,Q),qr($,xu);for(let e of $.commands)e.helpGroup()||e.helpGroup(du(e.name()).heading);if(Ml($),bu===`required`){let e=[$];for(;e.length>0;){let t=e.pop();t!==void 0&&(e.push(...t.commands),t.hook(`preAction`,async(e,t)=>{e===t&&(await c(),await Oe(),await We())}))}}$.addHelpText(`after`,[``,`Environment (credentials by command group):`,` CLIENT_SECRET client access to authenticated reads, search, and lookups`,` ADMIN_API_KEY admin and write commands (mutations, media, jobs, harness)`,` AUTH_TOKEN signed-in session or personal API key; reads and permitted writes`,` Public reads also work without credentials. Saved sign-in is used when available.`,` Check what this shell holds with: ${Q} auth status`,``,`Output modes (per command):`,` --text (compact; default on a terminal), --data (response data JSON; default when piped/non-TTY), --json (full envelope);`,` --data-full is uncapped, for bounded programmatic consumers only — never LLM agents.`,``,`Exit codes:`,` 0 envelope.ok === true`,` 1 envelope.ok === false`,``,`Examples:`,` $ ${Q} auth status`,` $ ${Q} entities get --entity-slug acme`].join(`
68
+ `));try{await $.parseAsync()}catch(e){uu(e instanceof Error?e:Error(String(e)),`parseAsync`)}export{};
@@ -0,0 +1 @@
1
+ import{C as e,D as t,O as n,_ as r,a as i,c as a,f as o,k as s,l as c,n as l,p as u,t as d,v as f}from"./person-owner-ChqQWHII.js";var ee=i([`domicile`,`dominant`,`origin`]),p=f({endDate:n().nullish(),id:o(),isCurrent:c(),role:ee.nullish(),startDate:n().nullish()}),m=f({id:o().nullish(),name:e()}),h=f({countryCodeChar2:e().nullish(),countryCodeChar3:e().nullish(),id:o().nullish(),name:e(),unRegion:e().nullish(),unSubregion:e().nullish()}),g=f({id:o().nullish(),name:e(),stateAbbrev:e().nullish()}),_=f({address:o().nullish(),addressLine1:e().nullish(),addressLine2:e().nullish(),association:a(p).optional(),city:m.nullish(),country:h.nullish(),countryAbbrev:e().nullish(),createdAt:s({offset:!0}).nullish(),fullAddress:e().nullish(),id:o().nullish(),isCurrent:c().nullish(),isHq:c().nullish(),isPrimary:c().nullish(),latitude:r().nullish(),longitude:r().nullish(),postalCode:e().nullish(),state:g.nullish(),stateAbbrev:e().nullish(),street:e().nullish(),updatedAt:s({offset:!0}).nullish()}),v=f({creatable:c(),isCurrent:c().nullish(),isPrimary:c().nullish(),name:e().max(255),writable:c()}),y=u(v,f({bucket:e().nullish(),classificationId:o().nullish(),creatable:c(),createdAt:s({offset:!0}).nullish(),id:o(),isCurrent:c().nullish(),isPrimary:c().nullish(),name:e().max(255),slug:e().regex(/^[a-z0-9_-]+$/).max(255).nullish(),type:e(),updatedAt:s({offset:!0}).nullish(),writable:c()})),b=u(v,f({category:e(),code:o().nullish(),creatable:c(),createdAt:s({offset:!0}).nullish(),entityClassificationId:o().nullish(),id:o(),isCurrent:c().nullish(),isPrimary:c().nullish(),level:o().nullish(),name:e().max(255),updatedAt:s({offset:!0}).nullish(),writable:c()})),x=f({geoLocationExposure:a(y).default([]).optional(),industry:a(y).default([]).optional(),mainProduct:a(y).default([]).optional(),standardizedClassification:a(b).default([]).optional(),tag:a(y).default([]).optional(),typeCustomer:a(y).default([]).optional(),typeModel:a(y).default([]).optional(),typeOwnership:a(y).default([]).optional(),typeRevenue:a(y).default([]).optional(),typeTechnologyUsed:a(y).default([]).optional()}),S=i(`Angel.Pre-Seed.Seed.Series A.Series B.Series C.Series D.Series E.Series F.Series G.Series H.Series I.Series J.Series K.Series L.Series M.Series N.Series O.Series P.Series Q.Series R.Series S.Series T.Series U.Series V.Series W.Series X.Series Y.Series Z.Investment Firm.Fund.Nonprofit.Government.Public.Acquired.Acquired Subsidiary`.split(`.`)),C=f({fundingRoundCount:o(),investorCount:o(),latestValuation:r().nullish(),mostRecentAmount:r().nullish(),mostRecentDate:n().nullish(),stage:S.nullish(),totalRaised:r()}),w=f({expanded:e().nullish(),generatedDescription:e().nullish(),short:e().nullish()}),te=i([`cloudflare`,`akamai`,`fastly`,`awsCloudfront`,`vercel`,`netlify`,`sucuri`,`incapsula`,`bunny`,`keycdn`,`cdn77`,`gcore`,`cdnetworks`,`azureCdn`,`leaseweb`,`digitalocean`,`stackpath`,`googlecloudCdn`,`none`,`unknown`]),ne=i([`static`,`jsRequired`,`jsEnhanced`]),T=i(`website.linkedin.twitter.github.facebook.instagram.tiktok.youtube.subreddit.forum.documentation.support.statuspage.changelog.roadmap.discord.crunchbase.wellfound.angellist.glassdoor.theorg.ycombinator.wikipedia.pitchbook.morningstar.bloomberg.nyse.nasdaq.g2.producthunt.trustpilot.alternativeto.gartnerpeerinsights.getapp.sourceforge.appstore.googleplay.capterra.trustradius.hubspotmarketplace.slackappdirectory.awsmarketplace.salesforceappexchange.chromewebstore.vscodemarketplace.npm.pypi.maven.dockerhub.homebrew.crates.huggingface`.split(`.`)),E=f({crawlCdnProvider:te.nullish(),crawlRenderMode:ne.nullish(),createdAt:s({offset:!0}).nullish(),id:o().nullish(),isCurrent:c().nullish(),isPrimary:c().nullish(),owner:d.nullish(),sourceId:e().nullish(),status:e().nullish(),statusChecked:s({offset:!0}).nullish(),updatedAt:s({offset:!0}).nullish(),url:e(),urlType:T}),D=f({address:a(_),classification:x,fundingDetail:C.nullish(),text:w,urlLink:a(E)}),O=f({isMonogram:c(),logo:e().nullish(),logoSquare:e().nullish()}),k=i([`alternativeDba`,`relatedLegal`]),A=f({displayable:c().nullish(),name:e(),type:k.nullish()}),j=f({hasAcquisitions:c().default(!1).optional(),hasAnalysis:c(),hasEmployees:c(),hasFundraising:c(),hasNews:c(),productServiceSlug:a(e())}),M=f({createdAt:s({offset:!0}).nullish(),defaultCurrency:e().nullish(),foundedYear:o().nullish(),id:t(),image:O,lastModifiedAt:s({offset:!0}).nullish(),nameAlias:a(A),nameBrand:e(),nameLegal:e().nullish(),operatingStatus:e().nullish(),publicId:e().regex(/^e[0-9A-Za-z]{11}$/).nullish(),publicUrl:e().nullish(),sitemap:j.nullish(),slug:e().regex(/^[a-z0-9_-]+$/).max(255),typeRecord:l.nullish(),updatedAt:s({offset:!0}).nullish()}),N=f({core:M,fundingDetail:C.nullish()}),P=i([`High`,`Medium`,`Low`,`Verified`]),F=i([`direct`,`managedFund`]),I=f({round:e()}),L=f({amountInvested:r().nullish(),attributionType:F,beneficialEntityId:t().nullish(),fundManagerRelationshipId:o().nullish(),joinId:t(),leadInvestor:c(),recordedEntityId:t().nullish(),round:I.nullish(),transactionId:t()}),R=f({amountRaised:r().int().nullish(),createdAt:s({offset:!0}).nullish(),currency:e().nullish(),dataConfidence:P.nullish(),dateAnnounced:s({offset:!0}).nullish(),dateFundingComplete:s({offset:!0}).nullish(),dateInvestorExit:s({offset:!0}).nullish(),entity:N.nullish(),id:t(),investorAttribution:L.nullish(),investorCount:o().nullish(),round:e().nullish(),sourceAttribution:a(L),updatedAt:s({offset:!0}).nullish(),valuationPostMoney:r().int().nullish(),valuationPreMoney:r().int().nullish()}),z=f({fundingStage:S.nullish(),ownership:a(e()),pricingModel:a(e()),sellsTo:a(e()),totalRaised:r().nullish(),website:e().nullish()}),B=f({asOf:n().nullish(),comparisonSignals:z.nullish(),createdAt:s({offset:!0}).nullish(),detail:e().nullish(),entity:M,id:o().nullish(),isCurrent:c().nullish(),isPrimary:c().nullish(),get relationship(){return a(B)},relationshipType:e(),source:e().nullish(),sourceEntityId:t().nullish(),targetEntityId:t().nullish(),updatedAt:s({offset:!0}).nullish()}),V=B,H=f({accelerator:M,acceleratorName:e(),asOfDate:s({offset:!0}),batch:e().nullish(),id:e(),program:e().nullish(),status:e().nullish()}),U=i([`text`,`numeric`,`monetary`,`percentage`,`date`]),W=i([`low`,`medium`,`high`]),re=i([`pastDue`,`withinThreeMonths`,`threeToSixMonths`,`sixToTwelveMonths`,`twelveToTwentyFourMonths`,`beyondTwoYears`]),G=f({asOfDate:s({offset:!0}),bucket:re,monthsFromNow:o(),targetDate:s({offset:!0})}),K=f({asOfDate:s({offset:!0}).nullish(),createdAt:s({offset:!0}).nullish(),creator:e().nullish(),dataConfidence:W.nullish(),derivedRange:G.nullish(),discreteValue:r().nullish(),entityId:t(),id:o(),textValue:e().nullish(),typeResearchDetail:e(),updatedAt:s({offset:!0}).nullish(),valueResearchDetail:e().nullish(),valueType:U}),q=f({characterCount:o(),meetsRequirements:c(),violation:a(e()),wordCount:o()}),J=f({compliance:q.nullish(),createdAt:s({offset:!0}).nullish(),entityId:t(),id:o(),isCurrent:c(),isPrimary:c(),text:e(),textType:e(),updatedAt:s({offset:!0}).nullish(),visible:c()}),Y=f({acceleratorParticipation:a(H),detail:a(K),snippet:a(J)}),X=f({author:e().nullish(),category:e().nullish(),createdAt:s({offset:!0}).nullish(),excerpt:e().nullish(),externalNewsArticle:c().nullish(),id:o(),newsImageThumbnail:e().nullish(),newsUrlOriginal:e().nullish(),pendingApproval:o().nullish(),publication:e().nullish(),publishedAt:s({offset:!0}).nullish(),slug:e().regex(/^[a-z0-9_-]+$/).max(255).nullish(),title:e(),updatedAt:s({offset:!0}).nullish()}),ie=i([`nickname`,`maidenName`,`formerName`,`stageName`]),Z=f({displayable:c().nullish(),name:e(),type:ie.nullish()}),Q=f({isMonogram:c(),picture:e().nullish()}),ae=f({associationId:o(),createdAt:s({offset:!0}).nullish(),creator:e().nullish(),endDate:s({offset:!0}).nullish(),entityAddress:a(_),entityId:t(),entityLogo:O,entityName:e().nullish(),entityOperatingStatus:e().nullish(),entitySlug:e().regex(/^[a-z0-9_-]+$/).max(255),entityType:l.nullish(),entityUrlLink:a(E),isCurrent:c().nullish(),personAddress:a(_),personId:t(),personImage:Q,personName:e(),personSlug:e().regex(/^[a-z0-9_-]+$/).max(255),personUrlLink:a(E),score:o().nullish(),startDate:s({offset:!0}).nullish(),titleFunction:e().nullish(),titleId:o().nullish(),titleLevel:e().nullish(),titleName:e().nullish(),updatedAt:s({offset:!0}).nullish()}),oe=f({address:a(_),urlLink:a(E)}),se=f({amountRaised:r().nullish(),dateAnnounced:s({offset:!0}).nullish(),id:t(),image:O,investorCount:o().nullish(),nameBrand:e(),round:e().nullish(),status:e().nullish(),valuationPostMoney:r().nullish()}),ce=f({entity:M}),le=f({amount:r().nullish(),company:ce,date:s({offset:!0}).nullish(),fundraiseTransaction:se.nullish(),fundraiseTransactionId:t(),id:e(),investmentDate:s({offset:!0}),investorAttribution:L.nullish(),round:e().nullish()}),$=i([`entity`,`person`,`newsArticle`,`blogPost`,`text`,`classificationTag`,`classificationCode`,`product`,`service`,`agentHelpDoc`]),ue=f({computedAt:s({offset:!0}),cosineDistance:r(),cosineScore:r(),modelVersion:e(),rank:o(),sourceHash:e(),sourceId:e(),sourceJson:e(),sourceText:e(),sourceType:$}),de=f({changedAt:s({offset:!0}).nullish(),dataSourceUpdatedAt:s({offset:!0}).nullish(),detail:e().nullish(),kind:e().nullish(),pendingApproval:o().nullish(),sourceId:e().nullish(),status:e().nullish()}),fe=f({createdAt:s({offset:!0}).nullish(),gender:e().nullish(),id:t(),image:Q,lastModifiedAt:s({offset:!0}).nullish(),nameAlias:a(Z),nameFirst:e().nullish(),nameFull:e(),nameLast:e().nullish(),nameMiddle:e().nullish(),nickname:e().nullish(),publicId:e().regex(/^p[0-9A-Za-z]{12}$/).nullish(),semanticMatch:ue.nullish(),slug:e().regex(/^[a-z0-9_-]+$/).max(255),source:de,suffix:e().nullish(),text:w,updatedAt:s({offset:!0}).nullish()}),pe=f({articleCount:o().nullish(),association:a(ae),core:fe,enrichment:oe,investment:a(le),nameAlias:a(Z),pendingApproval:o().nullish()}),me=i([`ein`,`secCik`,`ticker`,`lei`,`duns`,`isin`,`cusip`,`crd`,`orcid`]),he=f({createdAt:s({offset:!0}),id:o(),identifier:e(),idType:me,owner:d,source:e().nullish(),updatedAt:s({offset:!0})}),ge=f({core:M,enrichment:D,fundraiseRound:a(R),newsArticle:a(X),person:a(pe),publicUrl:e().nullish(),relationship:a(V),research:Y,sitemap:j,uniqueId:a(he)});export{ge as EntityDetailSchema};
@@ -0,0 +1 @@
1
+ import{createRequire as e}from"node:module";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},c=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),l=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},ee=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,ee=c.length,u;l<ee;l++)u=c[l],!o.call(e,u)&&u!==a&&n(e,u,{get:(e=>t[e]).bind(null,u),enumerable:!(s=r(t,u))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),ee(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),te=e=>o.call(e,`module.exports`)?e[`module.exports`]:ee(n({},`__esModule`,{value:!0}),e),ne=e(import.meta.url),d,re=s((()=>{d=`1.9.1`}));function ie(e){let t=new Set([e]),n=new Set,r=e.match(ae);if(!r)return()=>!1;let i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(t){return t===e};function a(e){return n.add(e),!1}function o(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;let r=e.match(ae);if(!r)return a(e);let s={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};return s.prerelease!=null||i.major!==s.major?a(e):i.major===0?i.minor===s.minor&&i.patch<=s.patch?o(e):a(e):i.minor<=s.minor?o(e):a(e)}}var ae,oe,se=s((()=>{re(),ae=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,oe=ie(d)}));function f(e,t,n,r=!1){let i=g[h]=g[h]??{version:d};if(!r&&i[e]){let t=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(t.stack||t.message),!1}if(i.version!==`1.9.1`){let t=Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${d}`);return n.error(t.stack||t.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${d}.`),!0}function p(e){let t=g[h]?.version;if(t&&oe(t))return g[h]?.[e]}function m(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${d}.`);let n=g[h];n&&delete n[e]}var ce,h,g,_=s((()=>{re(),se(),ce=d.split(`.`)[0],h=Symbol.for(`opentelemetry.js.api.${ce}`),g=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{}}));function v(e,t,n){let r=p(`diag`);if(r)return r[e](t,...n)}var le,ue=s((()=>{_(),le=class{constructor(e){this._namespace=e.namespace||`DiagComponentLogger`}debug(...e){return v(`debug`,this._namespace,e)}error(...e){return v(`error`,this._namespace,e)}info(...e){return v(`info`,this._namespace,e)}warn(...e){return v(`warn`,this._namespace,e)}verbose(...e){return v(`verbose`,this._namespace,e)}}})),y,b=s((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.ERROR=30]=`ERROR`,e[e.WARN=50]=`WARN`,e[e.INFO=60]=`INFO`,e[e.DEBUG=70]=`DEBUG`,e[e.VERBOSE=80]=`VERBOSE`,e[e.ALL=9999]=`ALL`})(y||={})}));function de(e,t){e<y.NONE?e=y.NONE:e>y.ALL&&(e=y.ALL),t||={};function n(n,r){let i=t[n];return typeof i==`function`&&e>=r?i.bind(t):function(){}}return{error:n(`error`,y.ERROR),warn:n(`warn`,y.WARN),info:n(`info`,y.INFO),debug:n(`debug`,y.DEBUG),verbose:n(`verbose`,y.VERBOSE)}}var fe=s((()=>{b()})),pe,x,S=s((()=>{ue(),fe(),b(),_(),pe=`diag`,x=class e{static instance(){return this._instance||=new e,this._instance}constructor(){function e(e){return function(...t){let n=p(`diag`);if(n)return n[e](...t)}}let t=this;t.setLogger=(e,n={logLevel:y.INFO})=>{if(e===t){let e=Error(`Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation`);return t.error(e.stack??e.message),!1}typeof n==`number`&&(n={logLevel:n});let r=p(`diag`),i=de(n.logLevel??y.INFO,e);if(r&&!n.suppressOverrideMessage){let e=Error().stack??`<failed to generate stacktrace>`;r.warn(`Current logger will be overwritten from ${e}`),i.warn(`Current logger will overwrite one already registered from ${e}`)}return f(`diag`,i,t,!0)},t.disable=()=>{m(pe,t)},t.createComponentLogger=e=>new le(e),t.verbose=e(`verbose`),t.debug=e(`debug`),t.info=e(`info`),t.warn=e(`warn`),t.error=e(`error`)}}})),me,he=s((()=>{me=class e{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){let t=this._entries.get(e);if(t)return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(t,n){let r=new e(this._entries);return r._entries.set(t,n),r}removeEntry(t){let n=new e(this._entries);return n._entries.delete(t),n}removeEntries(...t){let n=new e(this._entries);for(let e of t)n._entries.delete(e);return n}clear(){return new e}}})),ge,_e=s((()=>{ge=Symbol(`BaggageEntryMetadata`)}));function ve(e={}){return new me(new Map(Object.entries(e)))}function ye(e){return typeof e!=`string`&&(be.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=``),{__TYPE__:ge,toString(){return e}}}var be,xe=s((()=>{S(),he(),_e(),be=x.instance()}));function C(e){return Symbol.for(e)}var Se,w,T=s((()=>{Se=class e{constructor(t){let n=this;n._currentContext=t?new Map(t):new Map,n.getValue=e=>n._currentContext.get(e),n.setValue=(t,r)=>{let i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=t=>{let r=new e(n._currentContext);return r._currentContext.delete(t),r}}},w=new Se})),E,D,Ce,we=s((()=>{if(E=[{n:`error`,c:`error`},{n:`warn`,c:`warn`},{n:`info`,c:`info`},{n:`debug`,c:`debug`},{n:`verbose`,c:`trace`}],D={},typeof console<`u`)for(let e of[`error`,`warn`,`info`,`debug`,`trace`,`log`])typeof console[e]==`function`&&(D[e]=console[e]);Ce=class{constructor(){function e(e){return function(...t){let n=D[e];if(typeof n!=`function`&&(n=D.log),typeof n!=`function`&&console&&(n=console[e],typeof n!=`function`&&(n=console.log)),typeof n==`function`)return n.apply(console,t)}}for(let t=0;t<E.length;t++)this[E[t].n]=e(E[t].c)}}}));function Te(){return Pe}var Ee,O,De,Oe,ke,Ae,k,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He=s((()=>{Ee=class{constructor(){}createGauge(e,t){return Ie}createHistogram(e,t){return Le}createCounter(e,t){return Fe}createUpDownCounter(e,t){return Re}createObservableGauge(e,t){return Be}createObservableCounter(e,t){return ze}createObservableUpDownCounter(e,t){return Ve}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}},O=class{},De=class extends O{add(e,t){}},Oe=class extends O{add(e,t){}},ke=class extends O{record(e,t){}},Ae=class extends O{record(e,t){}},k=class{addCallback(e){}removeCallback(e){}},je=class extends k{},Me=class extends k{},Ne=class extends k{},Pe=new Ee,Fe=new De,Ie=new ke,Le=new Ae,Re=new Oe,ze=new je,Be=new Me,Ve=new Ne})),Ue,We=s((()=>{(function(e){e[e.INT=0]=`INT`,e[e.DOUBLE=1]=`DOUBLE`})(Ue||={})})),Ge,Ke,qe=s((()=>{Ge={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},Ke={set(e,t,n){e!=null&&(e[t]=n)}}})),Je,Ye=s((()=>{T(),Je=class{active(){return w}with(e,t,n,...r){return t.call(n,...r)}bind(e,t){return t}enable(){return this}disable(){return this}}})),Xe,Ze,A,j=s((()=>{Ye(),_(),S(),Xe=`context`,Ze=new Je,A=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalContextManager(e){return f(Xe,e,x.instance())}active(){return this._getContextManager().active()}with(e,t,n,...r){return this._getContextManager().with(e,t,n,...r)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return p(Xe)||Ze}disable(){this._getContextManager().disable(),m(Xe,x.instance())}}})),M,Qe=s((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.SAMPLED=1]=`SAMPLED`})(M||={})})),$e,N,P,F=s((()=>{Qe(),$e=`0000000000000000`,N=`00000000000000000000000000000000`,P={traceId:N,spanId:$e,traceFlags:M.NONE}})),I,et=s((()=>{F(),I=class{constructor(e=P){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,t){}}}));function tt(e){return e.getValue(L)||void 0}function nt(){return tt(A.getInstance().active())}function rt(e,t){return e.setValue(L,t)}function it(e){return e.deleteValue(L)}function at(e,t){return rt(e,new I(t))}function ot(e){return tt(e)?.spanContext()}var L,st=s((()=>{T(),et(),j(),L=C(`OpenTelemetry Context Key SPAN`)}));function ct(e,t){if(typeof e!=`string`||e.length!==t)return!1;let n=0;for(let t=0;t<e.length;t+=4)n+=(z[e.charCodeAt(t)]|0)+(z[e.charCodeAt(t+1)]|0)+(z[e.charCodeAt(t+2)]|0)+(z[e.charCodeAt(t+3)]|0);return n===t}function lt(e){return ct(e,32)&&e!==`00000000000000000000000000000000`}function ut(e){return ct(e,16)&&e!==`0000000000000000`}function R(e){return lt(e.traceId)&&ut(e.spanId)}function dt(e){return new I(e)}var z,B=s((()=>{F(),et(),z=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1])}));function ft(e){return typeof e==`object`&&!!e&&`spanId`in e&&typeof e.spanId==`string`&&`traceId`in e&&typeof e.traceId==`string`&&`traceFlags`in e&&typeof e.traceFlags==`number`}var V,pt,mt=s((()=>{j(),st(),et(),B(),V=A.getInstance(),pt=class{startSpan(e,t,n=V.active()){if(t?.root)return new I;let r=n&&ot(n);return ft(r)&&R(r)?new I(r):new I}startActiveSpan(e,t,n,r){let i,a,o;if(arguments.length<2)return;arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);let s=a??V.active(),c=this.startSpan(e,i,s),l=rt(s,c);return V.with(l,o,void 0,c)}}})),ht,gt,_t=s((()=>{mt(),ht=new pt,gt=class{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}startSpan(e,t,n){return this._getTracer().startSpan(e,t,n)}startActiveSpan(e,t,n,r){let i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}_getTracer(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):ht}}})),vt,yt=s((()=>{mt(),vt=class{getTracer(e,t,n){return new pt}}})),bt,H,xt=s((()=>{_t(),yt(),bt=new vt,H=class{getTracer(e,t,n){return this.getDelegateTracer(e,t,n)??new gt(this,e,t,n)}getDelegate(){return this._delegate??bt}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,n){return this._delegate?.getTracer(e,t,n)}}})),St,Ct=s((()=>{(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(St||={})})),wt,Tt=s((()=>{(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(wt||={})})),Et,Dt=s((()=>{(function(e){e[e.UNSET=0]=`UNSET`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`})(Et||={})}));function Ot(e){return At.test(e)}function kt(e){return jt.test(e)&&!Mt.test(e)}var U,At,jt,Mt,Nt=s((()=>{U=`[_0-9a-z-*/]`,At=RegExp(`^(?:${`[a-z]${U}{0,255}`}|${`[a-z0-9]${U}{0,240}@[a-z]${U}{0,13}`})$`),jt=/^[ -~]{0,255}[!-~]$/,Mt=/,|=/})),Pt,Ft,It,Lt,Rt,zt=s((()=>{Nt(),Pt=32,Ft=512,It=`,`,Lt=`=`,Rt=class e{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return Array.from(this._internalState.keys()).reduceRight((e,t)=>(e.push(t+Lt+this.get(t)),e),[]).join(It)}_parse(e){e.length>Ft||(this._internalState=e.split(It).reduceRight((e,t)=>{let n=t.trim(),r=n.indexOf(Lt);if(r!==-1){let i=n.slice(0,r),a=n.slice(r+1,t.length);Ot(i)&&kt(a)&&e.set(i,a)}return e},new Map),this._internalState.size>Pt&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Pt))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}}));function Bt(e){return new Rt(e)}var Vt=s((()=>{zt()})),W,Ht=s((()=>{j(),W=A.getInstance()})),G,Ut=s((()=>{S(),G=x.instance()})),Wt,Gt,Kt=s((()=>{He(),Wt=class{getMeter(e,t,n){return Pe}},Gt=new Wt})),K,qt,Jt=s((()=>{Kt(),_(),S(),K=`metrics`,qt=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalMeterProvider(e){return f(K,e,x.instance())}getMeterProvider(){return p(K)||Gt}getMeter(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}disable(){m(K,x.instance())}}})),q,Yt=s((()=>{Jt(),q=qt.getInstance()})),Xt,Zt=s((()=>{Xt=class{inject(e,t){}extract(e,t){return e}fields(){return[]}}}));function Qt(e){return e.getValue(J)||void 0}function $t(){return Qt(A.getInstance().active())}function en(e,t){return e.setValue(J,t)}function tn(e){return e.deleteValue(J)}var J,nn=s((()=>{j(),T(),J=C(`OpenTelemetry Baggage Key`)})),Y,rn,an,on=s((()=>{_(),Zt(),qe(),nn(),xe(),S(),Y=`propagation`,rn=new Xt,an=class e{constructor(){this.createBaggage=ve,this.getBaggage=Qt,this.getActiveBaggage=$t,this.setBaggage=en,this.deleteBaggage=tn}static getInstance(){return this._instance||=new e,this._instance}setGlobalPropagator(e){return f(Y,e,x.instance())}inject(e,t,n=Ke){return this._getGlobalPropagator().inject(e,t,n)}extract(e,t,n=Ge){return this._getGlobalPropagator().extract(e,t,n)}fields(){return this._getGlobalPropagator().fields()}disable(){m(Y,x.instance())}_getGlobalPropagator(){return p(Y)||rn}}})),X,sn=s((()=>{on(),X=an.getInstance()})),Z,cn,ln=s((()=>{_(),xt(),B(),st(),S(),Z=`trace`,cn=class e{constructor(){this._proxyTracerProvider=new H,this.wrapSpanContext=dt,this.isSpanContextValid=R,this.deleteSpan=it,this.getSpan=tt,this.getActiveSpan=nt,this.getSpanContext=ot,this.setSpan=rt,this.setSpanContext=at}static getInstance(){return this._instance||=new e,this._instance}setGlobalTracerProvider(e){let t=f(Z,this._proxyTracerProvider,x.instance());return t&&this._proxyTracerProvider.setDelegate(e),t}getTracerProvider(){return p(Z)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){m(Z,x.instance()),this._proxyTracerProvider=new H}}})),Q,un=s((()=>{ln(),Q=cn.getInstance()})),dn=l({DiagConsoleLogger:()=>Ce,DiagLogLevel:()=>y,INVALID_SPANID:()=>$e,INVALID_SPAN_CONTEXT:()=>P,INVALID_TRACEID:()=>N,ProxyTracer:()=>gt,ProxyTracerProvider:()=>H,ROOT_CONTEXT:()=>w,SamplingDecision:()=>St,SpanKind:()=>wt,SpanStatusCode:()=>Et,TraceFlags:()=>M,ValueType:()=>Ue,baggageEntryMetadataFromString:()=>ye,context:()=>W,createContextKey:()=>C,createNoopMeter:()=>Te,createTraceState:()=>Bt,default:()=>fn,defaultTextMapGetter:()=>Ge,defaultTextMapSetter:()=>Ke,diag:()=>G,isSpanContextValid:()=>R,isValidSpanId:()=>ut,isValidTraceId:()=>lt,metrics:()=>q,propagation:()=>X,trace:()=>Q}),fn,pn=s((()=>{xe(),T(),we(),b(),He(),We(),qe(),_t(),xt(),Ct(),Tt(),Dt(),Qe(),Vt(),B(),F(),Ht(),Ut(),Yt(),sn(),un(),fn={context:W,diag:G,metrics:q,propagation:X,trace:Q}}));function $(e){let t={},n=e.length;for(let r=0;r<n;r++){let n=e[r];n&&(t[String(n).toUpperCase().replace(/[-.]/g,`_`)]=n)}return t}var mn=s((()=>{})),hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i,ea,ta,na,ra,ia,aa,oa,sa,ca,la,ua,da,fa,pa,ma,ha,ga,_a,va,ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,Ja,Ya,Xa,Za,Qa,$a,eo,to,no,ro,io,ao,oo,so,co,lo,uo,fo,po,mo,ho,go,_o,vo,yo,bo,xo,So,Co,wo,To,Eo,Do,Oo,ko,Ao,jo,Mo,No,Po,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,as,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac,oc,sc,cc,lc,uc,dc,fc,pc,mc,hc,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,Tc,Ec,Dc,Oc,kc,Ac,jc,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc,Zc,Qc,$c,el,tl,nl,rl,il,al,ol,sl,cl,ll,ul,dl,fl,pl,ml,hl,gl,_l,vl,yl,bl,xl,Sl,Cl,wl,Tl,El,Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Fl,Il,Ll,Rl,zl,Bl,Vl,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du,fu,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su,Cu,wu,Tu,Eu,Du,Ou,ku,Au,ju,Mu,Nu,Pu,Fu,Iu,Lu,Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu,Ju,Yu,Xu,Zu,Qu,$u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd,pd,md,hd,gd,_d,vd,yd,bd,xd,Sd,Cd,wd,Td,Ed,Dd,Od,kd=s((()=>{mn(),hn=`aws.lambda.invoked_arn`,gn=`db.system`,_n=`db.connection_string`,vn=`db.user`,yn=`db.jdbc.driver_classname`,bn=`db.name`,xn=`db.statement`,Sn=`db.operation`,Cn=`db.mssql.instance_name`,wn=`db.cassandra.keyspace`,Tn=`db.cassandra.page_size`,En=`db.cassandra.consistency_level`,Dn=`db.cassandra.table`,On=`db.cassandra.idempotence`,kn=`db.cassandra.speculative_execution_count`,An=`db.cassandra.coordinator.id`,jn=`db.cassandra.coordinator.dc`,Mn=`db.hbase.namespace`,Nn=`db.redis.database_index`,Pn=`db.mongodb.collection`,Fn=`db.sql.table`,In=`exception.type`,Ln=`exception.message`,Rn=`exception.stacktrace`,zn=`exception.escaped`,Bn=`faas.trigger`,Vn=`faas.execution`,Hn=`faas.document.collection`,Un=`faas.document.operation`,Wn=`faas.document.time`,Gn=`faas.document.name`,Kn=`faas.time`,qn=`faas.cron`,Jn=`faas.coldstart`,Yn=`faas.invoked_name`,Xn=`faas.invoked_provider`,Zn=`faas.invoked_region`,Qn=`net.transport`,$n=`net.peer.ip`,er=`net.peer.port`,tr=`net.peer.name`,nr=`net.host.ip`,rr=`net.host.port`,ir=`net.host.name`,ar=`net.host.connection.type`,or=`net.host.connection.subtype`,sr=`net.host.carrier.name`,cr=`net.host.carrier.mcc`,lr=`net.host.carrier.mnc`,ur=`net.host.carrier.icc`,dr=`peer.service`,fr=`enduser.id`,pr=`enduser.role`,mr=`enduser.scope`,hr=`thread.id`,gr=`thread.name`,_r=`code.function`,vr=`code.namespace`,yr=`code.filepath`,br=`code.lineno`,xr=`http.method`,Sr=`http.url`,Cr=`http.target`,wr=`http.host`,Tr=`http.scheme`,Er=`http.status_code`,Dr=`http.flavor`,Or=`http.user_agent`,kr=`http.request_content_length`,Ar=`http.request_content_length_uncompressed`,jr=`http.response_content_length`,Mr=`http.response_content_length_uncompressed`,Nr=`http.server_name`,Pr=`http.route`,Fr=`http.client_ip`,Ir=`aws.dynamodb.table_names`,Lr=`aws.dynamodb.consumed_capacity`,Rr=`aws.dynamodb.item_collection_metrics`,zr=`aws.dynamodb.provisioned_read_capacity`,Br=`aws.dynamodb.provisioned_write_capacity`,Vr=`aws.dynamodb.consistent_read`,Hr=`aws.dynamodb.projection`,Ur=`aws.dynamodb.limit`,Wr=`aws.dynamodb.attributes_to_get`,Gr=`aws.dynamodb.index_name`,Kr=`aws.dynamodb.select`,qr=`aws.dynamodb.global_secondary_indexes`,Jr=`aws.dynamodb.local_secondary_indexes`,Yr=`aws.dynamodb.exclusive_start_table`,Xr=`aws.dynamodb.table_count`,Zr=`aws.dynamodb.scan_forward`,Qr=`aws.dynamodb.segment`,$r=`aws.dynamodb.total_segments`,ei=`aws.dynamodb.count`,ti=`aws.dynamodb.scanned_count`,ni=`aws.dynamodb.attribute_definitions`,ri=`aws.dynamodb.global_secondary_index_updates`,ii=`messaging.system`,ai=`messaging.destination`,oi=`messaging.destination_kind`,si=`messaging.temp_destination`,ci=`messaging.protocol`,li=`messaging.protocol_version`,ui=`messaging.url`,di=`messaging.message_id`,fi=`messaging.conversation_id`,pi=`messaging.message_payload_size_bytes`,mi=`messaging.message_payload_compressed_size_bytes`,hi=`messaging.operation`,gi=`messaging.consumer_id`,_i=`messaging.rabbitmq.routing_key`,vi=`messaging.kafka.message_key`,yi=`messaging.kafka.consumer_group`,bi=`messaging.kafka.client_id`,xi=`messaging.kafka.partition`,Si=`messaging.kafka.tombstone`,Ci=`rpc.system`,wi=`rpc.service`,Ti=`rpc.method`,Ei=`rpc.grpc.status_code`,Di=`rpc.jsonrpc.version`,Oi=`rpc.jsonrpc.request_id`,ki=`rpc.jsonrpc.error_code`,Ai=`rpc.jsonrpc.error_message`,ji=`message.type`,Mi=`message.id`,Ni=`message.compressed_size`,Pi=`message.uncompressed_size`,Fi=hn,Ii=gn,Li=_n,Ri=vn,zi=yn,Bi=bn,Vi=xn,Hi=Sn,Ui=Cn,Wi=wn,Gi=Tn,Ki=En,qi=Dn,Ji=On,Yi=kn,Xi=An,Zi=jn,Qi=Mn,$i=Nn,ea=Pn,ta=Fn,na=In,ra=Ln,ia=Rn,aa=zn,oa=Bn,sa=Vn,ca=Hn,la=Un,ua=Wn,da=Gn,fa=Kn,pa=qn,ma=Jn,ha=Yn,ga=Xn,_a=Zn,va=Qn,ya=$n,ba=er,xa=tr,Sa=nr,Ca=rr,wa=ir,Ta=ar,Ea=or,Da=sr,Oa=cr,ka=lr,Aa=ur,ja=dr,Ma=fr,Na=pr,Pa=mr,Fa=hr,Ia=gr,La=_r,Ra=vr,za=yr,Ba=br,Va=xr,Ha=Sr,Ua=Cr,Wa=wr,Ga=Tr,Ka=Er,qa=Dr,Ja=Or,Ya=kr,Xa=Ar,Za=jr,Qa=Mr,$a=Nr,eo=Pr,to=Fr,no=Ir,ro=Lr,io=Rr,ao=zr,oo=Br,so=Vr,co=Hr,lo=Ur,uo=Wr,fo=Gr,po=Kr,mo=qr,ho=Jr,go=Yr,_o=Xr,vo=Zr,yo=Qr,bo=$r,xo=ei,So=ti,Co=ni,wo=ri,To=ii,Eo=ai,Do=oi,Oo=si,ko=ci,Ao=li,jo=ui,Mo=di,No=fi,Po=pi,Fo=mi,Io=hi,Lo=gi,Ro=_i,zo=vi,Bo=yi,Vo=bi,Ho=xi,Uo=Si,Wo=Ci,Go=wi,Ko=Ti,qo=Ei,Jo=Di,Yo=Oi,Xo=ki,Zo=Ai,Qo=ji,$o=Mi,es=Ni,ts=Pi,ns=$([hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi]),rs=`other_sql`,is=`mssql`,as=`mysql`,os=`oracle`,ss=`db2`,cs=`postgresql`,ls=`redshift`,us=`hive`,ds=`cloudscape`,fs=`hsqldb`,ps=`progress`,ms=`maxdb`,hs=`hanadb`,gs=`ingres`,_s=`firstsql`,vs=`edb`,ys=`cache`,bs=`adabas`,xs=`firebird`,Ss=`derby`,Cs=`filemaker`,ws=`informix`,Ts=`instantdb`,Es=`interbase`,Ds=`mariadb`,Os=`netezza`,ks=`pervasive`,As=`pointbase`,js=`sqlite`,Ms=`sybase`,Ns=`teradata`,Ps=`vertica`,Fs=`h2`,Is=`coldfusion`,Ls=`cassandra`,Rs=`hbase`,zs=`mongodb`,Bs=`redis`,Vs=`couchbase`,Hs=`couchdb`,Us=`cosmosdb`,Ws=`dynamodb`,Gs=`neo4j`,Ks=`geode`,qs=`elasticsearch`,Js=`memcached`,Ys=`cockroachdb`,Xs=rs,Zs=is,Qs=as,$s=os,ec=cs,tc=ls,nc=us,rc=ds,ic=fs,ac=ps,oc=ms,sc=hs,cc=gs,lc=_s,uc=ys,dc=bs,fc=xs,pc=Ss,mc=Cs,hc=ws,gc=Ts,_c=Es,vc=Ds,yc=Os,bc=ks,xc=As,Sc=js,Cc=Ms,wc=Ns,Tc=Ps,Ec=Is,Dc=Ls,Oc=Rs,kc=zs,Ac=Bs,jc=Vs,Mc=Hs,Nc=Us,Pc=Ws,Fc=Gs,Ic=Ks,Lc=qs,Rc=Js,zc=Ys,Bc=$([rs,is,as,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js,Ys]),Vc=`all`,Hc=`each_quorum`,Uc=`quorum`,Wc=`local_quorum`,Gc=`one`,Kc=`two`,qc=`three`,Jc=`local_one`,Yc=`any`,Xc=`serial`,Zc=`local_serial`,Qc=Hc,$c=Uc,el=Wc,tl=qc,nl=Jc,rl=Xc,il=Zc,al=$([Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc,Zc]),ol=`datasource`,sl=`http`,cl=`pubsub`,ll=`timer`,ul=`other`,dl=ol,fl=sl,pl=cl,ml=ll,hl=ul,gl=$([ol,sl,cl,ll,ul]),_l=`insert`,vl=`edit`,yl=`delete`,bl=_l,xl=vl,Sl=yl,Cl=$([_l,vl,yl]),wl=`alibaba_cloud`,Tl=`aws`,El=`azure`,Dl=`gcp`,Ol=wl,kl=El,Al=$([wl,Tl,El,Dl]),jl=`ip_tcp`,Ml=`ip_udp`,Nl=`ip`,Pl=`unix`,Fl=`pipe`,Il=`inproc`,Ll=`other`,Rl=jl,zl=Ml,Bl=Pl,Vl=Fl,Hl=Il,Ul=Ll,Wl=$([jl,Ml,Nl,Pl,Fl,Il,Ll]),Gl=`wifi`,Kl=`wired`,ql=`cell`,Jl=`unavailable`,Yl=`unknown`,Xl=Gl,Zl=Kl,Ql=ql,$l=Jl,eu=Yl,tu=$([Gl,Kl,ql,Jl,Yl]),nu=`gprs`,ru=`edge`,iu=`umts`,au=`cdma`,ou=`evdo_0`,su=`evdo_a`,cu=`cdma2000_1xrtt`,lu=`hsdpa`,uu=`hsupa`,du=`hspa`,fu=`iden`,pu=`evdo_b`,mu=`lte`,hu=`ehrpd`,gu=`hspap`,_u=`gsm`,vu=`td_scdma`,yu=`iwlan`,bu=`nr`,xu=`nrnsa`,Su=`lte_ca`,Cu=nu,wu=ru,Tu=iu,Eu=au,Du=ou,Ou=su,ku=cu,Au=lu,ju=uu,Mu=du,Nu=fu,Pu=pu,Fu=hu,Iu=gu,Lu=vu,Ru=yu,zu=xu,Bu=Su,Vu=$([nu,ru,iu,au,ou,su,cu,lu,uu,du,fu,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su]),Hu=`1.0`,Uu=`1.1`,Wu=`2.0`,Gu=`SPDY`,Ku=`QUIC`,qu=Gu,Ju=Ku,Yu={HTTP_1_0:Hu,HTTP_1_1:Uu,HTTP_2_0:Wu,SPDY:Gu,QUIC:Ku},Xu=`queue`,Zu=`topic`,Qu=Xu,$u=Zu,ed=$([Xu,Zu]),td=`receive`,nd=`process`,rd=td,id=nd,ad=$([td,nd]),od=0,sd=1,cd=2,ld=3,ud=4,dd=5,fd=6,pd=7,md=8,hd=9,gd=10,_d=11,vd=12,yd=13,bd=14,xd=15,Sd=16,Cd={OK:od,CANCELLED:sd,UNKNOWN:cd,INVALID_ARGUMENT:ld,DEADLINE_EXCEEDED:ud,NOT_FOUND:dd,ALREADY_EXISTS:fd,PERMISSION_DENIED:pd,RESOURCE_EXHAUSTED:md,FAILED_PRECONDITION:hd,ABORTED:gd,OUT_OF_RANGE:_d,UNIMPLEMENTED:vd,INTERNAL:yd,UNAVAILABLE:bd,DATA_LOSS:xd,UNAUTHENTICATED:Sd},wd=`SENT`,Td=`RECEIVED`,Ed=wd,Dd=Td,Od=$([wd,Td])})),Ad=s((()=>{kd()})),jd,Md,Nd,Pd,Fd,Id,Ld,Rd,zd,Bd,Vd,Hd,Ud,Wd,Gd,Kd,qd,Jd,Yd,Xd,Zd,Qd,$d,ef,tf,nf,rf,af,of,sf,cf,lf,uf,df,ff,pf,mf,hf,gf,_f,vf,yf,bf,xf,Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp,pp,mp,hp,gp,_p,vp,yp,bp,xp,Sp,Cp,wp,Tp,Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp,Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,om,sm,cm,lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym,bm,xm,Sm,Cm,wm,Tm,Em,Dm,Om,km,Am,jm,Mm,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,Um,Wm,Gm,Km,qm,Jm,Ym,Xm,Zm,Qm,$m,eh,th,nh,rh,ih,ah,oh,sh,ch,lh,uh,dh,fh,ph,mh,hh,gh,_h,vh,yh,bh,xh,Sh,Ch,wh,Th,Eh,Dh,Oh,kh,Ah,jh,Mh,Nh,Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh,Qh,$h,eg,tg,ng,rg,ig,ag,og,sg,cg,lg,ug,dg,fg,pg,mg,hg,gg,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg=s((()=>{mn(),jd=`cloud.provider`,Md=`cloud.account.id`,Nd=`cloud.region`,Pd=`cloud.availability_zone`,Fd=`cloud.platform`,Id=`aws.ecs.container.arn`,Ld=`aws.ecs.cluster.arn`,Rd=`aws.ecs.launchtype`,zd=`aws.ecs.task.arn`,Bd=`aws.ecs.task.family`,Vd=`aws.ecs.task.revision`,Hd=`aws.eks.cluster.arn`,Ud=`aws.log.group.names`,Wd=`aws.log.group.arns`,Gd=`aws.log.stream.names`,Kd=`aws.log.stream.arns`,qd=`container.name`,Jd=`container.id`,Yd=`container.runtime`,Xd=`container.image.name`,Zd=`container.image.tag`,Qd=`deployment.environment`,$d=`device.id`,ef=`device.model.identifier`,tf=`device.model.name`,nf=`faas.name`,rf=`faas.id`,af=`faas.version`,of=`faas.instance`,sf=`faas.max_memory`,cf=`host.id`,lf=`host.name`,uf=`host.type`,df=`host.arch`,ff=`host.image.name`,pf=`host.image.id`,mf=`host.image.version`,hf=`k8s.cluster.name`,gf=`k8s.node.name`,_f=`k8s.node.uid`,vf=`k8s.namespace.name`,yf=`k8s.pod.uid`,bf=`k8s.pod.name`,xf=`k8s.container.name`,Sf=`k8s.replicaset.uid`,Cf=`k8s.replicaset.name`,wf=`k8s.deployment.uid`,Tf=`k8s.deployment.name`,Ef=`k8s.statefulset.uid`,Df=`k8s.statefulset.name`,Of=`k8s.daemonset.uid`,kf=`k8s.daemonset.name`,Af=`k8s.job.uid`,jf=`k8s.job.name`,Mf=`k8s.cronjob.uid`,Nf=`k8s.cronjob.name`,Pf=`os.type`,Ff=`os.description`,If=`os.name`,Lf=`os.version`,Rf=`process.pid`,zf=`process.executable.name`,Bf=`process.executable.path`,Vf=`process.command`,Hf=`process.command_line`,Uf=`process.command_args`,Wf=`process.owner`,Gf=`process.runtime.name`,Kf=`process.runtime.version`,qf=`process.runtime.description`,Jf=`service.name`,Yf=`service.namespace`,Xf=`service.instance.id`,Zf=`service.version`,Qf=`telemetry.sdk.name`,$f=`telemetry.sdk.language`,ep=`telemetry.sdk.version`,tp=`telemetry.auto.version`,np=`webengine.name`,rp=`webengine.version`,ip=`webengine.description`,ap=jd,op=Md,sp=Nd,cp=Pd,lp=Fd,up=Id,dp=Ld,fp=Rd,pp=zd,mp=Bd,hp=Vd,gp=Hd,_p=Ud,vp=Wd,yp=Gd,bp=Kd,xp=qd,Sp=Jd,Cp=Yd,wp=Xd,Tp=Zd,Ep=Qd,Dp=$d,Op=ef,kp=tf,Ap=nf,jp=rf,Mp=af,Np=of,Pp=sf,Fp=cf,Ip=lf,Lp=uf,Rp=df,zp=ff,Bp=pf,Vp=mf,Hp=hf,Up=gf,Wp=_f,Gp=vf,Kp=yf,qp=bf,Jp=xf,Yp=Sf,Xp=Cf,Zp=wf,Qp=Tf,$p=Ef,em=Df,tm=Of,nm=kf,rm=Af,im=jf,am=Mf,om=Nf,sm=Pf,cm=Ff,lm=If,um=Lf,dm=Rf,fm=zf,pm=Bf,mm=Vf,hm=Hf,gm=Uf,_m=Wf,vm=Gf,ym=Kf,bm=qf,xm=Jf,Sm=Yf,Cm=Xf,wm=Zf,Tm=Qf,Em=$f,Dm=ep,Om=tp,km=np,Am=rp,jm=ip,Mm=$([jd,Md,Nd,Pd,Fd,Id,Ld,Rd,zd,Bd,Vd,Hd,Ud,Wd,Gd,Kd,qd,Jd,Yd,Xd,Zd,Qd,$d,ef,tf,nf,rf,af,of,sf,cf,lf,uf,df,ff,pf,mf,hf,gf,_f,vf,yf,bf,xf,Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip]),Nm=`alibaba_cloud`,Pm=`aws`,Fm=`azure`,Im=`gcp`,Lm=Nm,Rm=Fm,zm=$([Nm,Pm,Fm,Im]),Bm=`alibaba_cloud_ecs`,Vm=`alibaba_cloud_fc`,Hm=`aws_ec2`,Um=`aws_ecs`,Wm=`aws_eks`,Gm=`aws_lambda`,Km=`aws_elastic_beanstalk`,qm=`azure_vm`,Jm=`azure_container_instances`,Ym=`azure_aks`,Xm=`azure_functions`,Zm=`azure_app_service`,Qm=`gcp_compute_engine`,$m=`gcp_cloud_run`,eh=`gcp_kubernetes_engine`,th=`gcp_cloud_functions`,nh=`gcp_app_engine`,rh=Bm,ih=Vm,ah=Hm,oh=Um,sh=Wm,ch=Gm,lh=Km,uh=qm,dh=Jm,fh=Ym,ph=Xm,mh=Zm,hh=Qm,gh=$m,_h=eh,vh=th,yh=nh,bh=$([Bm,Vm,Hm,Um,Wm,Gm,Km,qm,Jm,Ym,Xm,Zm,Qm,$m,eh,th,nh]),xh=`ec2`,Sh=`fargate`,Ch=Sh,wh=$([xh,Sh]),Th=`amd64`,Eh=`arm32`,Dh=`arm64`,Oh=`ia64`,kh=`ppc32`,Ah=`ppc64`,jh=`x86`,Mh=Th,Nh=Eh,Ph=Dh,Fh=Oh,Ih=kh,Lh=Ah,Rh=$([Th,Eh,Dh,Oh,kh,Ah,jh]),zh=`windows`,Bh=`linux`,Vh=`darwin`,Hh=`freebsd`,Uh=`netbsd`,Wh=`openbsd`,Gh=`dragonflybsd`,Kh=`hpux`,qh=`aix`,Jh=`solaris`,Yh=`z_os`,Xh=zh,Zh=Bh,Qh=Vh,$h=Hh,eg=Uh,tg=Wh,ng=Gh,rg=Kh,ig=Jh,ag=Yh,og=$([zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh]),sg=`cpp`,cg=`dotnet`,lg=`erlang`,ug=`go`,dg=`java`,fg=`nodejs`,pg=`php`,mg=`python`,hg=`ruby`,gg=`webjs`,_g=cg,vg=lg,yg=dg,bg=fg,xg=mg,Sg=hg,Cg=gg,wg=$([sg,cg,lg,ug,dg,fg,pg,mg,hg,gg])})),Eg=s((()=>{Tg()})),Dg,Og,kg,Ag,jg,Mg,Ng,Pg,Fg,Ig,Lg,Rg,zg,Bg,Vg,Hg,Ug,Wg,Gg,Kg,qg,Jg,Yg,Xg,Zg,Qg,$g,e_,t_,n_,r_,i_,a_,o_,s_,c_,l_,u_,d_,f_,p_,m_,h_,g_,__,v_,y_,b_,x_,S_,C_,w_,T_,E_,D_,O_,k_,A_,j_,M_,N_,P_,F_,I_,L_,R_,z_,B_,V_,H_,U_,W_,G_,K_,q_,J_,Y_,X_,Z_,Q_,$_,ev,tv,nv,rv,iv,av,ov,sv,cv,lv,uv,dv,fv,pv,mv,hv,gv,_v,vv,yv,bv,xv,Sv,Cv,wv,Tv,Ev,Dv,Ov,kv,Av,jv,Mv,Nv,Pv,Fv,Iv,Lv,Rv,zv,Bv,Vv,Hv,Uv,Wv,Gv,Kv,qv,Jv,Yv,Xv,Zv,Qv,$v,ey,ty,ny,ry,iy,ay,oy,sy,cy,ly,uy,dy,fy,py,my,hy,gy,_y,vy,yy,by,xy,Sy,Cy,wy,Ty,Ey,Dy,Oy,ky,Ay,jy,My,Ny,Py,Fy,Iy,Ly,Ry,zy,By,Vy,Hy,Uy,Wy,Gy,Ky=s((()=>{Dg=`aspnetcore.diagnostics.exception.result`,Og=`aborted`,kg=`handled`,Ag=`skipped`,jg=`unhandled`,Mg=`aspnetcore.diagnostics.handler.type`,Ng=`aspnetcore.rate_limiting.policy`,Pg=`aspnetcore.rate_limiting.result`,Fg=`acquired`,Ig=`endpoint_limiter`,Lg=`global_limiter`,Rg=`request_canceled`,zg=`aspnetcore.request.is_unhandled`,Bg=`aspnetcore.routing.is_fallback`,Vg=`aspnetcore.routing.match_status`,Hg=`failure`,Ug=`success`,Wg=`aspnetcore.user.is_authenticated`,Gg=`client.address`,Kg=`client.port`,qg=`code.column.number`,Jg=`code.file.path`,Yg=`code.function.name`,Xg=`code.line.number`,Zg=`code.stacktrace`,Qg=`container.id`,$g=`container.image.name`,e_=`container.image.repo_digests`,t_=`container.image.tags`,n_=`db.collection.name`,r_=`db.namespace`,i_=`db.operation.batch.size`,a_=`db.operation.name`,o_=`db.query.summary`,s_=`db.query.text`,c_=`db.response.status_code`,l_=`db.stored_procedure.name`,u_=`db.system.name`,d_=`mariadb`,f_=`microsoft.sql_server`,p_=`mysql`,m_=`postgresql`,h_=`deployment.environment.name`,g_=`development`,__=`production`,v_=`staging`,y_=`test`,b_=`dotnet.gc.heap.generation`,x_=`gen0`,S_=`gen1`,C_=`gen2`,w_=`error.type`,T_=`_OTHER`,E_=`exception.escaped`,D_=`exception.message`,O_=`exception.stacktrace`,k_=`exception.type`,A_=e=>`http.request.header.${e}`,j_=`http.request.method`,M_=`_OTHER`,N_=`CONNECT`,P_=`DELETE`,F_=`HEAD`,I_=`OPTIONS`,L_=`PATCH`,R_=`POST`,z_=`TRACE`,B_=`http.request.method_original`,V_=`http.request.resend_count`,H_=e=>`http.response.header.${e}`,U_=`http.response.status_code`,W_=`http.route`,G_=`jvm.gc.action`,K_=`jvm.gc.name`,q_=`jvm.memory.pool.name`,J_=`jvm.memory.type`,Y_=`heap`,X_=`non_heap`,Z_=`jvm.thread.daemon`,Q_=`jvm.thread.state`,$_=`blocked`,ev=`runnable`,tv=`terminated`,nv=`timed_waiting`,rv=`waiting`,iv=`k8s.cluster.name`,av=`k8s.cluster.uid`,ov=`k8s.container.name`,sv=`k8s.container.restart_count`,cv=e=>`k8s.cronjob.annotation.${e}`,lv=e=>`k8s.cronjob.label.${e}`,uv=`k8s.cronjob.name`,dv=`k8s.cronjob.uid`,fv=e=>`k8s.daemonset.annotation.${e}`,pv=e=>`k8s.daemonset.label.${e}`,mv=`k8s.daemonset.name`,hv=`k8s.daemonset.uid`,gv=e=>`k8s.deployment.annotation.${e}`,_v=e=>`k8s.deployment.label.${e}`,vv=`k8s.deployment.name`,yv=`k8s.deployment.uid`,bv=e=>`k8s.job.annotation.${e}`,xv=e=>`k8s.job.label.${e}`,Sv=`k8s.job.name`,Cv=`k8s.job.uid`,wv=e=>`k8s.namespace.annotation.${e}`,Tv=e=>`k8s.namespace.label.${e}`,Ev=`k8s.namespace.name`,Dv=e=>`k8s.node.annotation.${e}`,Ov=e=>`k8s.node.label.${e}`,kv=`k8s.node.name`,Av=`k8s.node.uid`,jv=e=>`k8s.pod.annotation.${e}`,Mv=`k8s.pod.hostname`,Nv=`k8s.pod.ip`,Pv=e=>`k8s.pod.label.${e}`,Fv=`k8s.pod.name`,Iv=`k8s.pod.start_time`,Lv=`k8s.pod.uid`,Rv=e=>`k8s.replicaset.annotation.${e}`,zv=e=>`k8s.replicaset.label.${e}`,Bv=`k8s.replicaset.name`,Vv=`k8s.replicaset.uid`,Hv=e=>`k8s.statefulset.annotation.${e}`,Uv=e=>`k8s.statefulset.label.${e}`,Wv=`k8s.statefulset.name`,Gv=`k8s.statefulset.uid`,Kv=`network.local.address`,qv=`network.local.port`,Jv=`network.peer.address`,Yv=`network.peer.port`,Xv=`network.protocol.name`,Zv=`network.protocol.version`,Qv=`network.transport`,$v=`pipe`,ey=`quic`,ty=`unix`,ny=`network.type`,ry=`ipv4`,iy=`ipv6`,ay=`otel.event.name`,oy=`otel.scope.name`,sy=`otel.scope.version`,cy=`otel.status_code`,ly=`ERROR`,uy=`otel.status_description`,dy=`server.address`,fy=`server.port`,py=`service.instance.id`,my=`service.name`,hy=`service.namespace`,gy=`service.version`,_y=`signalr.connection.status`,vy=`app_shutdown`,yy=`normal_closure`,by=`timeout`,xy=`signalr.transport`,Sy=`long_polling`,Cy=`server_sent_events`,wy=`web_sockets`,Ty=`telemetry.distro.name`,Ey=`telemetry.distro.version`,Dy=`telemetry.sdk.language`,Oy=`dotnet`,ky=`erlang`,Ay=`java`,jy=`kotlin`,My=`nodejs`,Ny=`python`,Py=`ruby`,Fy=`rust`,Iy=`swift`,Ly=`webjs`,Ry=`telemetry.sdk.name`,zy=`telemetry.sdk.version`,By=`url.fragment`,Vy=`url.full`,Hy=`url.path`,Uy=`url.query`,Wy=`url.scheme`,Gy=`user_agent.original`})),qy,Jy,Yy,Xy,Zy,Qy,$y,eb,tb,nb,rb,ib,ab,ob,sb,cb,lb,ub,db,fb,pb,mb,hb,gb,_b,vb,yb,bb,xb,Sb,Cb,wb,Tb,Eb,Db,Ob,kb,Ab,jb,Mb,Nb,Pb,Fb,Ib,Lb,Rb,zb,Bb,Vb,Hb,Ub,Wb=s((()=>{qy=`aspnetcore.diagnostics.exceptions`,Jy=`aspnetcore.rate_limiting.active_request_leases`,Yy=`aspnetcore.rate_limiting.queued_requests`,Xy=`aspnetcore.rate_limiting.request.time_in_queue`,Zy=`aspnetcore.rate_limiting.request_lease.duration`,Qy=`aspnetcore.rate_limiting.requests`,$y=`aspnetcore.routing.match_attempts`,eb=`db.client.operation.duration`,tb=`dotnet.assembly.count`,nb=`dotnet.exceptions`,rb=`dotnet.gc.collections`,ib=`dotnet.gc.heap.total_allocated`,ab=`dotnet.gc.last_collection.heap.fragmentation.size`,ob=`dotnet.gc.last_collection.heap.size`,sb=`dotnet.gc.last_collection.memory.committed_size`,cb=`dotnet.gc.pause.time`,lb=`dotnet.jit.compilation.time`,ub=`dotnet.jit.compiled_il.size`,db=`dotnet.jit.compiled_methods`,fb=`dotnet.monitor.lock_contentions`,pb=`dotnet.process.cpu.count`,mb=`dotnet.process.cpu.time`,hb=`dotnet.process.memory.working_set`,gb=`dotnet.thread_pool.queue.length`,_b=`dotnet.thread_pool.thread.count`,vb=`dotnet.thread_pool.work_item.count`,yb=`dotnet.timer.count`,bb=`http.client.request.duration`,xb=`http.server.request.duration`,Sb=`jvm.class.count`,Cb=`jvm.class.loaded`,wb=`jvm.class.unloaded`,Tb=`jvm.cpu.count`,Eb=`jvm.cpu.recent_utilization`,Db=`jvm.cpu.time`,Ob=`jvm.gc.duration`,kb=`jvm.memory.committed`,Ab=`jvm.memory.limit`,jb=`jvm.memory.used`,Mb=`jvm.memory.used_after_last_gc`,Nb=`jvm.thread.count`,Pb=`kestrel.active_connections`,Fb=`kestrel.active_tls_handshakes`,Ib=`kestrel.connection.duration`,Lb=`kestrel.queued_connections`,Rb=`kestrel.queued_requests`,zb=`kestrel.rejected_connections`,Bb=`kestrel.tls_handshake.duration`,Vb=`kestrel.upgraded_connections`,Hb=`signalr.server.active_connections`,Ub=`signalr.server.connection.duration`})),Gb,Kb=s((()=>{Gb=`exception`})),qb=l({ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>Og,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>kg,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Ag,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>jg,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Fg,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Ig,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Lg,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Rg,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Hg,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>Ug,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>Dg,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Mg,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Ng,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Pg,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>zg,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Bg,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Vg,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Wg,ATTR_CLIENT_ADDRESS:()=>Gg,ATTR_CLIENT_PORT:()=>Kg,ATTR_CODE_COLUMN_NUMBER:()=>qg,ATTR_CODE_FILE_PATH:()=>Jg,ATTR_CODE_FUNCTION_NAME:()=>Yg,ATTR_CODE_LINE_NUMBER:()=>Xg,ATTR_CODE_STACKTRACE:()=>Zg,ATTR_CONTAINER_ID:()=>Qg,ATTR_CONTAINER_IMAGE_NAME:()=>$g,ATTR_CONTAINER_IMAGE_REPO_DIGESTS:()=>e_,ATTR_CONTAINER_IMAGE_TAGS:()=>t_,ATTR_DB_COLLECTION_NAME:()=>n_,ATTR_DB_NAMESPACE:()=>r_,ATTR_DB_OPERATION_BATCH_SIZE:()=>i_,ATTR_DB_OPERATION_NAME:()=>a_,ATTR_DB_QUERY_SUMMARY:()=>o_,ATTR_DB_QUERY_TEXT:()=>s_,ATTR_DB_RESPONSE_STATUS_CODE:()=>c_,ATTR_DB_STORED_PROCEDURE_NAME:()=>l_,ATTR_DB_SYSTEM_NAME:()=>u_,ATTR_DEPLOYMENT_ENVIRONMENT_NAME:()=>h_,ATTR_DOTNET_GC_HEAP_GENERATION:()=>b_,ATTR_ERROR_TYPE:()=>w_,ATTR_EXCEPTION_ESCAPED:()=>E_,ATTR_EXCEPTION_MESSAGE:()=>D_,ATTR_EXCEPTION_STACKTRACE:()=>O_,ATTR_EXCEPTION_TYPE:()=>k_,ATTR_HTTP_REQUEST_HEADER:()=>A_,ATTR_HTTP_REQUEST_METHOD:()=>j_,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>B_,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>V_,ATTR_HTTP_RESPONSE_HEADER:()=>H_,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>U_,ATTR_HTTP_ROUTE:()=>W_,ATTR_JVM_GC_ACTION:()=>G_,ATTR_JVM_GC_NAME:()=>K_,ATTR_JVM_MEMORY_POOL_NAME:()=>q_,ATTR_JVM_MEMORY_TYPE:()=>J_,ATTR_JVM_THREAD_DAEMON:()=>Z_,ATTR_JVM_THREAD_STATE:()=>Q_,ATTR_K8S_CLUSTER_NAME:()=>iv,ATTR_K8S_CLUSTER_UID:()=>av,ATTR_K8S_CONTAINER_NAME:()=>ov,ATTR_K8S_CONTAINER_RESTART_COUNT:()=>sv,ATTR_K8S_CRONJOB_ANNOTATION:()=>cv,ATTR_K8S_CRONJOB_LABEL:()=>lv,ATTR_K8S_CRONJOB_NAME:()=>uv,ATTR_K8S_CRONJOB_UID:()=>dv,ATTR_K8S_DAEMONSET_ANNOTATION:()=>fv,ATTR_K8S_DAEMONSET_LABEL:()=>pv,ATTR_K8S_DAEMONSET_NAME:()=>mv,ATTR_K8S_DAEMONSET_UID:()=>hv,ATTR_K8S_DEPLOYMENT_ANNOTATION:()=>gv,ATTR_K8S_DEPLOYMENT_LABEL:()=>_v,ATTR_K8S_DEPLOYMENT_NAME:()=>vv,ATTR_K8S_DEPLOYMENT_UID:()=>yv,ATTR_K8S_JOB_ANNOTATION:()=>bv,ATTR_K8S_JOB_LABEL:()=>xv,ATTR_K8S_JOB_NAME:()=>Sv,ATTR_K8S_JOB_UID:()=>Cv,ATTR_K8S_NAMESPACE_ANNOTATION:()=>wv,ATTR_K8S_NAMESPACE_LABEL:()=>Tv,ATTR_K8S_NAMESPACE_NAME:()=>Ev,ATTR_K8S_NODE_ANNOTATION:()=>Dv,ATTR_K8S_NODE_LABEL:()=>Ov,ATTR_K8S_NODE_NAME:()=>kv,ATTR_K8S_NODE_UID:()=>Av,ATTR_K8S_POD_ANNOTATION:()=>jv,ATTR_K8S_POD_HOSTNAME:()=>Mv,ATTR_K8S_POD_IP:()=>Nv,ATTR_K8S_POD_LABEL:()=>Pv,ATTR_K8S_POD_NAME:()=>Fv,ATTR_K8S_POD_START_TIME:()=>Iv,ATTR_K8S_POD_UID:()=>Lv,ATTR_K8S_REPLICASET_ANNOTATION:()=>Rv,ATTR_K8S_REPLICASET_LABEL:()=>zv,ATTR_K8S_REPLICASET_NAME:()=>Bv,ATTR_K8S_REPLICASET_UID:()=>Vv,ATTR_K8S_STATEFULSET_ANNOTATION:()=>Hv,ATTR_K8S_STATEFULSET_LABEL:()=>Uv,ATTR_K8S_STATEFULSET_NAME:()=>Wv,ATTR_K8S_STATEFULSET_UID:()=>Gv,ATTR_NETWORK_LOCAL_ADDRESS:()=>Kv,ATTR_NETWORK_LOCAL_PORT:()=>qv,ATTR_NETWORK_PEER_ADDRESS:()=>Jv,ATTR_NETWORK_PEER_PORT:()=>Yv,ATTR_NETWORK_PROTOCOL_NAME:()=>Xv,ATTR_NETWORK_PROTOCOL_VERSION:()=>Zv,ATTR_NETWORK_TRANSPORT:()=>Qv,ATTR_NETWORK_TYPE:()=>ny,ATTR_OTEL_EVENT_NAME:()=>ay,ATTR_OTEL_SCOPE_NAME:()=>oy,ATTR_OTEL_SCOPE_VERSION:()=>sy,ATTR_OTEL_STATUS_CODE:()=>cy,ATTR_OTEL_STATUS_DESCRIPTION:()=>uy,ATTR_SERVER_ADDRESS:()=>dy,ATTR_SERVER_PORT:()=>fy,ATTR_SERVICE_INSTANCE_ID:()=>py,ATTR_SERVICE_NAME:()=>my,ATTR_SERVICE_NAMESPACE:()=>hy,ATTR_SERVICE_VERSION:()=>gy,ATTR_SIGNALR_CONNECTION_STATUS:()=>_y,ATTR_SIGNALR_TRANSPORT:()=>xy,ATTR_TELEMETRY_DISTRO_NAME:()=>Ty,ATTR_TELEMETRY_DISTRO_VERSION:()=>Ey,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Dy,ATTR_TELEMETRY_SDK_NAME:()=>Ry,ATTR_TELEMETRY_SDK_VERSION:()=>zy,ATTR_URL_FRAGMENT:()=>By,ATTR_URL_FULL:()=>Vy,ATTR_URL_PATH:()=>Hy,ATTR_URL_QUERY:()=>Uy,ATTR_URL_SCHEME:()=>Wy,ATTR_USER_AGENT_ORIGINAL:()=>Gy,AWSECSLAUNCHTYPEVALUES_EC2:()=>`ec2`,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Ch,AwsEcsLaunchtypeValues:()=>wh,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>rh,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>ih,CLOUDPLATFORMVALUES_AWS_EC2:()=>ah,CLOUDPLATFORMVALUES_AWS_ECS:()=>oh,CLOUDPLATFORMVALUES_AWS_EKS:()=>sh,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>lh,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>ch,CLOUDPLATFORMVALUES_AZURE_AKS:()=>fh,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>mh,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>dh,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>ph,CLOUDPLATFORMVALUES_AZURE_VM:()=>uh,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>yh,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>vh,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>gh,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>hh,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>_h,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Lm,CLOUDPROVIDERVALUES_AWS:()=>`aws`,CLOUDPROVIDERVALUES_AZURE:()=>Rm,CLOUDPROVIDERVALUES_GCP:()=>`gcp`,CloudPlatformValues:()=>bh,CloudProviderValues:()=>zm,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>`all`,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>`any`,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Qc,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>nl,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>el,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>il,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>`one`,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>$c,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>rl,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>tl,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>`two`,DBSYSTEMVALUES_ADABAS:()=>dc,DBSYSTEMVALUES_CACHE:()=>uc,DBSYSTEMVALUES_CASSANDRA:()=>Dc,DBSYSTEMVALUES_CLOUDSCAPE:()=>rc,DBSYSTEMVALUES_COCKROACHDB:()=>zc,DBSYSTEMVALUES_COLDFUSION:()=>Ec,DBSYSTEMVALUES_COSMOSDB:()=>Nc,DBSYSTEMVALUES_COUCHBASE:()=>jc,DBSYSTEMVALUES_COUCHDB:()=>Mc,DBSYSTEMVALUES_DB2:()=>`db2`,DBSYSTEMVALUES_DERBY:()=>pc,DBSYSTEMVALUES_DYNAMODB:()=>Pc,DBSYSTEMVALUES_EDB:()=>`edb`,DBSYSTEMVALUES_ELASTICSEARCH:()=>Lc,DBSYSTEMVALUES_FILEMAKER:()=>mc,DBSYSTEMVALUES_FIREBIRD:()=>fc,DBSYSTEMVALUES_FIRSTSQL:()=>lc,DBSYSTEMVALUES_GEODE:()=>Ic,DBSYSTEMVALUES_H2:()=>`h2`,DBSYSTEMVALUES_HANADB:()=>sc,DBSYSTEMVALUES_HBASE:()=>Oc,DBSYSTEMVALUES_HIVE:()=>nc,DBSYSTEMVALUES_HSQLDB:()=>ic,DBSYSTEMVALUES_INFORMIX:()=>hc,DBSYSTEMVALUES_INGRES:()=>cc,DBSYSTEMVALUES_INSTANTDB:()=>gc,DBSYSTEMVALUES_INTERBASE:()=>_c,DBSYSTEMVALUES_MARIADB:()=>vc,DBSYSTEMVALUES_MAXDB:()=>oc,DBSYSTEMVALUES_MEMCACHED:()=>Rc,DBSYSTEMVALUES_MONGODB:()=>kc,DBSYSTEMVALUES_MSSQL:()=>Zs,DBSYSTEMVALUES_MYSQL:()=>Qs,DBSYSTEMVALUES_NEO4J:()=>Fc,DBSYSTEMVALUES_NETEZZA:()=>yc,DBSYSTEMVALUES_ORACLE:()=>$s,DBSYSTEMVALUES_OTHER_SQL:()=>Xs,DBSYSTEMVALUES_PERVASIVE:()=>bc,DBSYSTEMVALUES_POINTBASE:()=>xc,DBSYSTEMVALUES_POSTGRESQL:()=>ec,DBSYSTEMVALUES_PROGRESS:()=>ac,DBSYSTEMVALUES_REDIS:()=>Ac,DBSYSTEMVALUES_REDSHIFT:()=>tc,DBSYSTEMVALUES_SQLITE:()=>Sc,DBSYSTEMVALUES_SYBASE:()=>Cc,DBSYSTEMVALUES_TERADATA:()=>wc,DBSYSTEMVALUES_VERTICA:()=>Tc,DB_SYSTEM_NAME_VALUE_MARIADB:()=>d_,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>f_,DB_SYSTEM_NAME_VALUE_MYSQL:()=>p_,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>m_,DEPLOYMENT_ENVIRONMENT_NAME_VALUE_DEVELOPMENT:()=>g_,DEPLOYMENT_ENVIRONMENT_NAME_VALUE_PRODUCTION:()=>__,DEPLOYMENT_ENVIRONMENT_NAME_VALUE_STAGING:()=>v_,DEPLOYMENT_ENVIRONMENT_NAME_VALUE_TEST:()=>y_,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>x_,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>S_,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>C_,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>`loh`,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>`poh`,DbCassandraConsistencyLevelValues:()=>al,DbSystemValues:()=>Bc,ERROR_TYPE_VALUE_OTHER:()=>T_,EVENT_EXCEPTION:()=>Gb,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>Sl,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>xl,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>bl,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Ol,FAASINVOKEDPROVIDERVALUES_AWS:()=>`aws`,FAASINVOKEDPROVIDERVALUES_AZURE:()=>kl,FAASINVOKEDPROVIDERVALUES_GCP:()=>`gcp`,FAASTRIGGERVALUES_DATASOURCE:()=>dl,FAASTRIGGERVALUES_HTTP:()=>fl,FAASTRIGGERVALUES_OTHER:()=>hl,FAASTRIGGERVALUES_PUBSUB:()=>pl,FAASTRIGGERVALUES_TIMER:()=>ml,FaasDocumentOperationValues:()=>Cl,FaasInvokedProviderValues:()=>Al,FaasTriggerValues:()=>gl,HOSTARCHVALUES_AMD64:()=>Mh,HOSTARCHVALUES_ARM32:()=>Nh,HOSTARCHVALUES_ARM64:()=>Ph,HOSTARCHVALUES_IA64:()=>Fh,HOSTARCHVALUES_PPC32:()=>Ih,HOSTARCHVALUES_PPC64:()=>Lh,HOSTARCHVALUES_X86:()=>`x86`,HTTPFLAVORVALUES_HTTP_1_0:()=>`1.0`,HTTPFLAVORVALUES_HTTP_1_1:()=>`1.1`,HTTPFLAVORVALUES_HTTP_2_0:()=>`2.0`,HTTPFLAVORVALUES_QUIC:()=>Ju,HTTPFLAVORVALUES_SPDY:()=>qu,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>N_,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>P_,HTTP_REQUEST_METHOD_VALUE_GET:()=>`GET`,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>F_,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>I_,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>M_,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>L_,HTTP_REQUEST_METHOD_VALUE_POST:()=>R_,HTTP_REQUEST_METHOD_VALUE_PUT:()=>`PUT`,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>z_,HostArchValues:()=>Rh,HttpFlavorValues:()=>Yu,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Y_,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>X_,JVM_THREAD_STATE_VALUE_BLOCKED:()=>$_,JVM_THREAD_STATE_VALUE_NEW:()=>`new`,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>ev,JVM_THREAD_STATE_VALUE_TERMINATED:()=>tv,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>nv,JVM_THREAD_STATE_VALUE_WAITING:()=>rv,MESSAGETYPEVALUES_RECEIVED:()=>Dd,MESSAGETYPEVALUES_SENT:()=>Ed,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>Qu,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>$u,MESSAGINGOPERATIONVALUES_PROCESS:()=>id,MESSAGINGOPERATIONVALUES_RECEIVE:()=>rd,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>qy,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Jy,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Yy,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Qy,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Zy,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>Xy,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>$y,METRIC_DB_CLIENT_OPERATION_DURATION:()=>eb,METRIC_DOTNET_ASSEMBLY_COUNT:()=>tb,METRIC_DOTNET_EXCEPTIONS:()=>nb,METRIC_DOTNET_GC_COLLECTIONS:()=>rb,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>ib,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>ab,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>ob,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>sb,METRIC_DOTNET_GC_PAUSE_TIME:()=>cb,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>lb,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>ub,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>db,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>fb,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>pb,METRIC_DOTNET_PROCESS_CPU_TIME:()=>mb,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>hb,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>gb,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>_b,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>vb,METRIC_DOTNET_TIMER_COUNT:()=>yb,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>bb,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>xb,METRIC_JVM_CLASS_COUNT:()=>Sb,METRIC_JVM_CLASS_LOADED:()=>Cb,METRIC_JVM_CLASS_UNLOADED:()=>wb,METRIC_JVM_CPU_COUNT:()=>Tb,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>Eb,METRIC_JVM_CPU_TIME:()=>Db,METRIC_JVM_GC_DURATION:()=>Ob,METRIC_JVM_MEMORY_COMMITTED:()=>kb,METRIC_JVM_MEMORY_LIMIT:()=>Ab,METRIC_JVM_MEMORY_USED:()=>jb,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Mb,METRIC_JVM_THREAD_COUNT:()=>Nb,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Pb,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Fb,METRIC_KESTREL_CONNECTION_DURATION:()=>Ib,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Lb,METRIC_KESTREL_QUEUED_REQUESTS:()=>Rb,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>zb,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Bb,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>Vb,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Hb,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Ub,MessageTypeValues:()=>Od,MessagingDestinationKindValues:()=>ed,MessagingOperationValues:()=>ad,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>Eu,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>ku,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>wu,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>Fu,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>Du,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>Ou,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Pu,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Cu,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>`gsm`,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>Au,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>Mu,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>Iu,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>ju,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>Nu,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>Ru,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>`lte`,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>Bu,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>`nr`,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>zu,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>Lu,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>Tu,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>Ql,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>$l,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>eu,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>Xl,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>Zl,NETTRANSPORTVALUES_INPROC:()=>Hl,NETTRANSPORTVALUES_IP:()=>`ip`,NETTRANSPORTVALUES_IP_TCP:()=>Rl,NETTRANSPORTVALUES_IP_UDP:()=>zl,NETTRANSPORTVALUES_OTHER:()=>Ul,NETTRANSPORTVALUES_PIPE:()=>Vl,NETTRANSPORTVALUES_UNIX:()=>Bl,NETWORK_TRANSPORT_VALUE_PIPE:()=>$v,NETWORK_TRANSPORT_VALUE_QUIC:()=>ey,NETWORK_TRANSPORT_VALUE_TCP:()=>`tcp`,NETWORK_TRANSPORT_VALUE_UDP:()=>`udp`,NETWORK_TRANSPORT_VALUE_UNIX:()=>ty,NETWORK_TYPE_VALUE_IPV4:()=>ry,NETWORK_TYPE_VALUE_IPV6:()=>iy,NetHostConnectionSubtypeValues:()=>Vu,NetHostConnectionTypeValues:()=>tu,NetTransportValues:()=>Wl,OSTYPEVALUES_AIX:()=>`aix`,OSTYPEVALUES_DARWIN:()=>Qh,OSTYPEVALUES_DRAGONFLYBSD:()=>ng,OSTYPEVALUES_FREEBSD:()=>$h,OSTYPEVALUES_HPUX:()=>rg,OSTYPEVALUES_LINUX:()=>Zh,OSTYPEVALUES_NETBSD:()=>eg,OSTYPEVALUES_OPENBSD:()=>tg,OSTYPEVALUES_SOLARIS:()=>ig,OSTYPEVALUES_WINDOWS:()=>Xh,OSTYPEVALUES_Z_OS:()=>ag,OTEL_STATUS_CODE_VALUE_ERROR:()=>ly,OTEL_STATUS_CODE_VALUE_OK:()=>`OK`,OsTypeValues:()=>og,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>10,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>6,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>1,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>15,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>4,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>9,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>13,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>3,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>5,RPCGRPCSTATUSCODEVALUES_OK:()=>0,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>11,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>7,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>8,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>16,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>14,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>12,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>2,RpcGrpcStatusCodeValues:()=>Cd,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>uo,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>Co,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>so,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>ro,SEMATTRS_AWS_DYNAMODB_COUNT:()=>xo,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>go,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>mo,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>wo,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>fo,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>io,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>lo,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>ho,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>co,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>ao,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>oo,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>So,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>vo,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>yo,SEMATTRS_AWS_DYNAMODB_SELECT:()=>po,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>_o,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>no,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>bo,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>Fi,SEMATTRS_CODE_FILEPATH:()=>za,SEMATTRS_CODE_FUNCTION:()=>La,SEMATTRS_CODE_LINENO:()=>Ba,SEMATTRS_CODE_NAMESPACE:()=>Ra,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Ki,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>Zi,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>Xi,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Ji,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>Wi,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Gi,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Yi,SEMATTRS_DB_CASSANDRA_TABLE:()=>qi,SEMATTRS_DB_CONNECTION_STRING:()=>Li,SEMATTRS_DB_HBASE_NAMESPACE:()=>Qi,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>zi,SEMATTRS_DB_MONGODB_COLLECTION:()=>ea,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>Ui,SEMATTRS_DB_NAME:()=>Bi,SEMATTRS_DB_OPERATION:()=>Hi,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>$i,SEMATTRS_DB_SQL_TABLE:()=>ta,SEMATTRS_DB_STATEMENT:()=>Vi,SEMATTRS_DB_SYSTEM:()=>Ii,SEMATTRS_DB_USER:()=>Ri,SEMATTRS_ENDUSER_ID:()=>Ma,SEMATTRS_ENDUSER_ROLE:()=>Na,SEMATTRS_ENDUSER_SCOPE:()=>Pa,SEMATTRS_EXCEPTION_ESCAPED:()=>aa,SEMATTRS_EXCEPTION_MESSAGE:()=>ra,SEMATTRS_EXCEPTION_STACKTRACE:()=>ia,SEMATTRS_EXCEPTION_TYPE:()=>na,SEMATTRS_FAAS_COLDSTART:()=>ma,SEMATTRS_FAAS_CRON:()=>pa,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>ca,SEMATTRS_FAAS_DOCUMENT_NAME:()=>da,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>la,SEMATTRS_FAAS_DOCUMENT_TIME:()=>ua,SEMATTRS_FAAS_EXECUTION:()=>sa,SEMATTRS_FAAS_INVOKED_NAME:()=>ha,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>ga,SEMATTRS_FAAS_INVOKED_REGION:()=>_a,SEMATTRS_FAAS_TIME:()=>fa,SEMATTRS_FAAS_TRIGGER:()=>oa,SEMATTRS_HTTP_CLIENT_IP:()=>to,SEMATTRS_HTTP_FLAVOR:()=>qa,SEMATTRS_HTTP_HOST:()=>Wa,SEMATTRS_HTTP_METHOD:()=>Va,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>Ya,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>Xa,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>Za,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>Qa,SEMATTRS_HTTP_ROUTE:()=>eo,SEMATTRS_HTTP_SCHEME:()=>Ga,SEMATTRS_HTTP_SERVER_NAME:()=>$a,SEMATTRS_HTTP_STATUS_CODE:()=>Ka,SEMATTRS_HTTP_TARGET:()=>Ua,SEMATTRS_HTTP_URL:()=>Ha,SEMATTRS_HTTP_USER_AGENT:()=>Ja,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>es,SEMATTRS_MESSAGE_ID:()=>$o,SEMATTRS_MESSAGE_TYPE:()=>Qo,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>ts,SEMATTRS_MESSAGING_CONSUMER_ID:()=>Lo,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>No,SEMATTRS_MESSAGING_DESTINATION:()=>Eo,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>Do,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>Vo,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>Bo,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>zo,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>Ho,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>Uo,SEMATTRS_MESSAGING_MESSAGE_ID:()=>Mo,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>Fo,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>Po,SEMATTRS_MESSAGING_OPERATION:()=>Io,SEMATTRS_MESSAGING_PROTOCOL:()=>ko,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>Ao,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>Ro,SEMATTRS_MESSAGING_SYSTEM:()=>To,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>Oo,SEMATTRS_MESSAGING_URL:()=>jo,SEMATTRS_NET_HOST_CARRIER_ICC:()=>Aa,SEMATTRS_NET_HOST_CARRIER_MCC:()=>Oa,SEMATTRS_NET_HOST_CARRIER_MNC:()=>ka,SEMATTRS_NET_HOST_CARRIER_NAME:()=>Da,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>Ea,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>Ta,SEMATTRS_NET_HOST_IP:()=>Sa,SEMATTRS_NET_HOST_NAME:()=>wa,SEMATTRS_NET_HOST_PORT:()=>Ca,SEMATTRS_NET_PEER_IP:()=>ya,SEMATTRS_NET_PEER_NAME:()=>xa,SEMATTRS_NET_PEER_PORT:()=>ba,SEMATTRS_NET_TRANSPORT:()=>va,SEMATTRS_PEER_SERVICE:()=>ja,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>qo,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>Xo,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>Zo,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>Yo,SEMATTRS_RPC_JSONRPC_VERSION:()=>Jo,SEMATTRS_RPC_METHOD:()=>Ko,SEMATTRS_RPC_SERVICE:()=>Go,SEMATTRS_RPC_SYSTEM:()=>Wo,SEMATTRS_THREAD_ID:()=>Fa,SEMATTRS_THREAD_NAME:()=>Ia,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>dp,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>up,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>fp,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>pp,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>mp,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>hp,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>gp,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>vp,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>_p,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>bp,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>yp,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>op,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>cp,SEMRESATTRS_CLOUD_PLATFORM:()=>lp,SEMRESATTRS_CLOUD_PROVIDER:()=>ap,SEMRESATTRS_CLOUD_REGION:()=>sp,SEMRESATTRS_CONTAINER_ID:()=>Sp,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>wp,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Tp,SEMRESATTRS_CONTAINER_NAME:()=>xp,SEMRESATTRS_CONTAINER_RUNTIME:()=>Cp,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Ep,SEMRESATTRS_DEVICE_ID:()=>Dp,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>Op,SEMRESATTRS_DEVICE_MODEL_NAME:()=>kp,SEMRESATTRS_FAAS_ID:()=>jp,SEMRESATTRS_FAAS_INSTANCE:()=>Np,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Pp,SEMRESATTRS_FAAS_NAME:()=>Ap,SEMRESATTRS_FAAS_VERSION:()=>Mp,SEMRESATTRS_HOST_ARCH:()=>Rp,SEMRESATTRS_HOST_ID:()=>Fp,SEMRESATTRS_HOST_IMAGE_ID:()=>Bp,SEMRESATTRS_HOST_IMAGE_NAME:()=>zp,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Vp,SEMRESATTRS_HOST_NAME:()=>Ip,SEMRESATTRS_HOST_TYPE:()=>Lp,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Hp,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Jp,SEMRESATTRS_K8S_CRONJOB_NAME:()=>om,SEMRESATTRS_K8S_CRONJOB_UID:()=>am,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>nm,SEMRESATTRS_K8S_DAEMONSET_UID:()=>tm,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Qp,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>Zp,SEMRESATTRS_K8S_JOB_NAME:()=>im,SEMRESATTRS_K8S_JOB_UID:()=>rm,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>Gp,SEMRESATTRS_K8S_NODE_NAME:()=>Up,SEMRESATTRS_K8S_NODE_UID:()=>Wp,SEMRESATTRS_K8S_POD_NAME:()=>qp,SEMRESATTRS_K8S_POD_UID:()=>Kp,SEMRESATTRS_K8S_REPLICASET_NAME:()=>Xp,SEMRESATTRS_K8S_REPLICASET_UID:()=>Yp,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>em,SEMRESATTRS_K8S_STATEFULSET_UID:()=>$p,SEMRESATTRS_OS_DESCRIPTION:()=>cm,SEMRESATTRS_OS_NAME:()=>lm,SEMRESATTRS_OS_TYPE:()=>sm,SEMRESATTRS_OS_VERSION:()=>um,SEMRESATTRS_PROCESS_COMMAND:()=>mm,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>gm,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>hm,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>fm,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>pm,SEMRESATTRS_PROCESS_OWNER:()=>_m,SEMRESATTRS_PROCESS_PID:()=>dm,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>bm,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>vm,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>ym,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Cm,SEMRESATTRS_SERVICE_NAME:()=>xm,SEMRESATTRS_SERVICE_NAMESPACE:()=>Sm,SEMRESATTRS_SERVICE_VERSION:()=>wm,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Om,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Em,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Tm,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Dm,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>jm,SEMRESATTRS_WEBENGINE_NAME:()=>km,SEMRESATTRS_WEBENGINE_VERSION:()=>Am,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>vy,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>yy,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>by,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Sy,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>Cy,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>wy,SemanticAttributes:()=>ns,SemanticResourceAttributes:()=>Mm,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>`cpp`,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>_g,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>vg,TELEMETRYSDKLANGUAGEVALUES_GO:()=>`go`,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>yg,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>bg,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>`php`,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>xg,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Sg,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>Cg,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>`cpp`,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Oy,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>ky,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>`go`,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Ay,TELEMETRY_SDK_LANGUAGE_VALUE_KOTLIN:()=>jy,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>My,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>`php`,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Ny,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Py,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Fy,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Iy,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Ly,TelemetrySdkLanguageValues:()=>wg}),Jb=s((()=>{Ad(),Eg(),Ky(),Wb(),Kb()}));export{te as $,B as A,Te as B,Ht as C,Tt as D,wt as E,F,ye as G,w as H,M as I,b as J,xe as K,Qe as L,lt as M,P as N,St as O,N as P,ne as Q,Ue as R,W as S,Dt as T,C as U,He as V,T as W,s as X,c as Y,l as Z,X as _,k_ as a,G as b,Ry as c,Ky as d,u as et,dn as f,sn as g,Q as h,O_ as i,R as j,Ct as k,zy as l,un as m,Jb as n,my as o,pn as p,y as q,D_ as r,Dy as s,qb as t,My as u,Yt as v,Et as w,Ut as x,q as y,We as z};