@aventurevc/aventure-cli 0.8.260 → 0.8.262
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aventure-cli/command-catalog.compact.txt +38 -24
- package/dist/aventure-cli/index.js +1 -1
- package/dist/aventure-cli/unified-operations.json +148 -342
- package/dist/chunks/{api-key-bearer-credential-BTq9cAKP.js → api-key-bearer-credential-D586Q1L7.js} +1 -1
- package/dist/chunks/api-key-bearer-credential-DEZKjKL-.js +1 -0
- package/dist/chunks/api-key-credential-BTOE6OP7.js +3 -0
- package/dist/chunks/{api-key-credential-DzDcIKGs.js → api-key-credential-Dhxu48K0.js} +1 -1
- package/dist/chunks/api-key-credential-verification-CMk32JD7.js +1 -0
- package/dist/chunks/{api-key-credential-verification-D2blVIRu.js → api-key-credential-verification-CUU5cckn.js} +1 -1
- package/dist/chunks/api-key-login-BJI6Ad4b.js +7 -0
- package/dist/chunks/api-target-vxev2RKl.js +1 -0
- package/dist/chunks/auth-status-check-BDR8XKPB.js +1 -0
- package/dist/chunks/auth-status-check-CPyp2D0A.js +1 -0
- package/dist/chunks/auth-status-render-BO4IwIlg.js +2 -0
- package/dist/chunks/aventure-cli-C-Z5ciaS.js +11 -0
- package/dist/chunks/batch-io-Cb3-QK6P.js +1 -0
- package/dist/chunks/builtin-auth-DauKrM4V.js +6 -0
- package/dist/chunks/builtin-research-run-wait-DM9GCCGe.js +1 -0
- package/dist/chunks/{builtin-update-F0HKnfKe.js → builtin-update-BPxnYKpW.js} +1 -1
- package/dist/chunks/{cli-help-policy-DKV7chuM.js → cli-help-policy-DEf3PBDq.js} +1 -1
- package/dist/chunks/completion-CZoZCR6E.js +20 -0
- package/dist/chunks/{contract-parameter-C7Ead17E.js → contract-parameter-CppTkTpe.js} +1 -1
- package/dist/chunks/contract-v51xXOaI.js +1 -0
- package/dist/chunks/credential-redaction-DkES7qwH.js +1 -0
- package/dist/chunks/credential-store-Ch55NV_o.js +2 -0
- package/dist/chunks/detail-De_7DRUQ.js +1 -0
- package/dist/chunks/detail-zcQG4hro.js +1 -0
- package/dist/chunks/entity-BtU2r6nM.js +1 -0
- package/dist/chunks/generated-option-order-CudU6Yw8.js +1 -0
- package/dist/chunks/help-catalog-DXLgbwPh.js +2 -0
- package/dist/chunks/{help-intent-Ck5LJ9aC.js → help-intent-DbGYJG2N.js} +1 -1
- package/dist/chunks/logout-CIBD4T84.js +1 -0
- package/dist/chunks/logout-DnZfM-yG.js +1 -0
- package/dist/chunks/{mcp-generation-contract-BIeGZmML.js → mcp-generation-contract-C3oiw_GO.js} +1 -1
- package/dist/chunks/mcp-generation-contract-CNU5y-_S.js +1 -0
- package/dist/chunks/oauth-bearer-credential--9PYtE-n.js +1 -0
- package/dist/chunks/oauth-bearer-credential-Cn4aocZ1.js +1 -0
- package/dist/chunks/oauth-credential-CwYfd2EW.js +1 -0
- package/dist/chunks/oauth-credential-JVu2zmhX.js +1 -0
- package/dist/chunks/{oauth-login-BoWRyiMk.js → oauth-login-D5EEdaKi.js} +3 -3
- package/dist/chunks/{oauth-login-DEqo9C-G.js → oauth-login-DicjS9Tx.js} +1 -1
- package/dist/chunks/{openapi-call-C2DSQh2x.js → openapi-call-CLWtbauy.js} +1 -1
- package/dist/chunks/{openapi-call-DObkFneE.js → openapi-call-DFEUNgpa.js} +2 -2
- package/dist/chunks/{openapi-commands-D1Bjfem-.js → openapi-commands-CyUNgn1Z.js} +1 -1
- package/dist/chunks/openapi-commands-KkzNFtRC.js +1 -0
- package/dist/chunks/openapi-composites-CAAz75K-.js +1 -0
- package/dist/chunks/openapi-snapshot-CCicH4oA.js +1 -0
- package/dist/chunks/operations-DzqUv3ML.js +3 -0
- package/dist/chunks/operations-catalog-CHDk9b_5.js +1 -0
- package/dist/chunks/operations-catalog-DsWWlmgB.js +7 -0
- package/dist/chunks/operations-metadata-CX-dyDHN.js +2 -0
- package/dist/chunks/{output-CuZPzAlH.js → output-BfVBxCSc.js} +1 -1
- package/dist/chunks/output-BqEaaW3q.js +4 -0
- package/dist/chunks/output-mode-DIXw-DJj.js +1 -0
- package/dist/chunks/output-mode-halBRI36.js +1 -0
- package/dist/chunks/{parse-error-hint-C6VGe_NR.js → parse-error-hint-D61PeZmm.js} +2 -2
- package/dist/chunks/{run-detail-CIBpS8hz.js → run-detail-DDP5CJqb.js} +1 -1
- package/dist/chunks/startup-auth-C9cPkDnU.js +1 -0
- package/dist/chunks/{startup-auth-B4zldrFK.js → startup-auth-DFOFJLCK.js} +1 -1
- package/dist/chunks/text-response-CJTl1zqq.js +16 -0
- package/dist/chunks/tool-policy-BKMbulwX.js +1 -0
- package/package.json +3 -3
- package/dist/chunks/api-key-bearer-credential-CVcJxkw2.js +0 -1
- package/dist/chunks/api-key-credential-BFOFznef.js +0 -3
- package/dist/chunks/api-key-credential-verification-Dwd-qqAU.js +0 -1
- package/dist/chunks/api-key-login-B2iWS8j_.js +0 -7
- package/dist/chunks/auth-status-render-DtKkm4Nj.js +0 -2
- package/dist/chunks/aventure-cli-CyRcmK1h.js +0 -11
- package/dist/chunks/batch-io-l87mE7Ym.js +0 -1
- package/dist/chunks/builtin-auth-BzN0DeX5.js +0 -17
- package/dist/chunks/builtin-research-run-wait-0Nfzicqd.js +0 -1
- package/dist/chunks/completion-DEnWzb9C.js +0 -20
- package/dist/chunks/contract-BgjxlOnT.js +0 -1
- package/dist/chunks/credential-redaction-BbeDpMUf.js +0 -1
- package/dist/chunks/credential-store-yivldnnZ.js +0 -2
- package/dist/chunks/detail-DFVJrldR.js +0 -1
- package/dist/chunks/detail-DP6lF4pb.js +0 -1
- package/dist/chunks/entity-Cg2n2mP0.js +0 -1
- package/dist/chunks/generated-option-order-0l9dYmAK.js +0 -1
- package/dist/chunks/help-catalog-PjbSvhQY.js +0 -2
- package/dist/chunks/logout-6FG-rkmk.js +0 -1
- package/dist/chunks/logout-C6gksSro.js +0 -1
- package/dist/chunks/mcp-generation-contract-BXN1e5sx.js +0 -1
- package/dist/chunks/oauth-bearer-credential-Bck2hv18.js +0 -1
- package/dist/chunks/oauth-bearer-credential-C5jKo8Q5.js +0 -1
- package/dist/chunks/oauth-credential-C2uLXL3z.js +0 -1
- package/dist/chunks/oauth-credential-Dl2t7SrT.js +0 -1
- package/dist/chunks/openapi-commands-DlyuuuLD.js +0 -1
- package/dist/chunks/openapi-composites-B9JPhVYN.js +0 -1
- package/dist/chunks/openapi-snapshot-CYmg22H9.js +0 -1
- package/dist/chunks/operations-C-iAOsyp.js +0 -2
- package/dist/chunks/operations-catalog-Co_WOkDJ.js +0 -7
- package/dist/chunks/operations-catalog-wWCK90Jo.js +0 -1
- package/dist/chunks/operations-metadata-f89kI3gd.js +0 -2
- package/dist/chunks/output-BeXk_9Ef.js +0 -5
- package/dist/chunks/output-mode-BMhOAO06.js +0 -1
- package/dist/chunks/output-mode-vV9080Ml.js +0 -1
- package/dist/chunks/private-live-identity-AuYLZJvL.js +0 -1
- package/dist/chunks/private-live-identity-w8v84cKs.js +0 -1
- package/dist/chunks/startup-auth-CB7kyta-.js +0 -1
- package/dist/chunks/text-response-DqVfmBxR.js +0 -16
- package/dist/chunks/tool-policy-DfLvQfqr.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./package-DEeHDoOT.js";import{f as t,t as n}from"./env-DSqe8wia.js";import{o as r}from"./logging-81KzSgWu.js";import{a as i,t as a}from"./credential-redaction-BbeDpMUf.js";import{r as o}from"./api-key-credential-BFOFznef.js";import{a as s}from"./credential-store-yivldnnZ.js";import{t as c}from"./api-key-bearer-credential-CVcJxkw2.js";import{a as l,f as u,h as d,n as f,o as p,t as m}from"./oauth-credential-C2uLXL3z.js";import"./http-credentials-BUPEQD7v.js";async function h(){let e=await o(i(t().host)).catch(()=>null);return e===null||e.state===`unavailable`||e.state===`found`&&e.stored.activation===`active`}async function g(o,s){if(S())return;let u=async(t,n,i,l=!1)=>{if(await c(s),!S())throw l?n:C(t,o,n,i);r({component:o??e().bin[0],event:`oauth_credential_bypassed`,message:`OAuth sign-in is unavailable (${t}); using the stored API key.`,...n===void 0?{}:{error:Error(a(n,x(i)))}})},d=async(t,n,i,s)=>{if(s){let e=await p(t.host).catch(()=>void 0);if(e?.state===`found`&&e.stored.credential.tokens.access_token!==t.credential.tokens.access_token)return await m(e.stored,!1)}try{await f(t.host)}catch(i){r({component:o??e().bin[0],event:`oauth_credential_retire_failed`,message:`the saved OAuth credential is dead (${n}) but could not be removed`,error:Error(a(i,x(t)))})}await u(n,i,t)},m=async(e,t)=>{let n=(n,r)=>d(e,n,r,t),r=e.credential;if(l(r)){if(r.tokens.refresh_token===void 0)return await n(`the saved OAuth credential has expired`);try{r=await v(e)}catch(t){let{OAuthError:r,OAuthErrorCode:i}=await import(`./dist-tIPA3BCL.js`),a=i.InvalidGrant;return t instanceof r&&t.code===a?await n(`aVenture sign-in rejected the saved refresh token`,t):await u(`the saved OAuth credential could not be renewed`,t,e,!(t instanceof r))}}if(t&&r===e.credential&&(y(r)||!await h()))return g(r);let i;try{let{verifyUserBearerToken:e}=await import(`./openapi-call-C2DSQh2x.js`);i=await e(r.tokens.access_token,new URL(r.client.resource))!==null}catch(t){let{errors:r}=await import(`./webapi-WYeLOETY.js`);return t instanceof r.JWTInvalid?await n(`the saved OAuth credential is malformed`,t):await u(`the saved OAuth credential could not be verified`,t,e,!0)}if(!i)return await n(`the saved OAuth credential was rejected`);await b(e.host,r,o),g(r)},g=e=>{S()||(process.env[n.authToken]=e.tokens.access_token,s?.(`oauth`))},_;try{_=i(t().host)}catch(e){throw C(`the API host could not select its OAuth credential`,o,e)}let w;try{w=await p(_)}catch(e){return await u(`the saved OAuth credential is invalid or expired`,e)}if(w.state!==`missing`){if(w.state===`unavailable`)return await u(`the saved OAuth credential could not be read`,Error(w.summary));await m(w.stored,!0)}}async function _(){if(S())return;let e=await p(i(t().host));e.state===`found`&&(process.env[n.authToken]=e.stored.credential.tokens.access_token)}async function v(t){return await s(async()=>{let n=await p(t.host),i=n.state===`found`?n.stored:t;if(!l(i.credential))return i.credential;let{renewOAuthTokens:o}=await import(`./oauth-login-DEqo9C-G.js`),s=m(i.credential.client,await o(i));try{await d(t.host,s)}catch(t){r({component:e().bin[0],event:`oauth_credential_store_failed`,message:`renewed OAuth credential could not be stored; this command uses it and the next one falls back to the API key or sign-in`,error:Error(a(t,u(s.tokens)))})}return s})}function y(e){if(e.verifiedAt===void 0)return!1;let t=Date.now()-new Date(e.verifiedAt).getTime();return t>=0&&t<9e5}async function b(t,n,i){let o=new Date().toISOString();try{await s(async()=>{let e=await p(t);e.state===`found`&&e.stored.credential.tokens.access_token===n.tokens.access_token&&await d(t,{...e.stored.credential,verifiedAt:o})})}catch(t){r({component:i??e().bin[0],event:`oauth_credential_verification_unrecorded`,message:`the saved OAuth credential was verified but the verification could not be stored`,error:Error(a(t,u(n.tokens)))})}}function x(e){return e===void 0?[]:u(e.credential.tokens)}function S(){return(process.env[n.authToken]?.trim().length??0)>0}function C(t,n,r,i){let o=r===void 0?``:` — ${a(r,x(i))}`,s=n??e().bin[0];return Error(`OAuth sign-in is required: ${t}. Run \`${s} auth login\` before retrying.${o}`)}export{_ as n,v as r,g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as materializeCliOAuthBearerCredential,n as materializeSavedCliOAuthBearerCredential}from"./oauth-bearer-credential-Bck2hv18.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Yt as e}from"./auth-BNDyLTqp-GYAzJXBe.js";import{i as t}from"./webapi-B2JTupyg.js";import{a as n,i as r,t as i}from"./credential-redaction-BbeDpMUf.js";import{a,i as o,o as s,r as c,t as l}from"./credential-store-yivldnnZ.js";import{t as u}from"./client-BwCSrdti.js";import"./dist-DaW7WEqw.js";var d=u.omit({mcpResource:!0}),f=`vc.aventure.aventure-cli.oauth`,p=`oauth:`,m=6e4;function h(e,t){let n=L(t);return{client:e,expiresAt:z(R(n)),tokens:n}}async function g(e,t){let r=n(e),o=M(r,t),c;try{c=await a(async()=>await s(f,j(r),o))}catch(e){throw Error(`OAuth credential could not be stored — ${i(e,[o,...A(t.tokens)])}`,{cause:e})}return{host:r,provider:c,credential:N(r,o)}}async function _(e){let t=n(e),r;try{r=await o(f,j(t))}catch(e){return{state:`unavailable`,summary:i(e)}}let{record:a,keyringFailure:s}=r;return a===void 0?s===void 0?{state:`missing`}:{state:`missing`,keyringFailure:s}:{state:`found`,stored:{host:t,provider:a.provider,credential:N(t,a.value)}}}async function v(e){let t=n(e);await a(async()=>await l(f,j(t)))}async function y(e){try{return await _(e)}catch(e){return{state:`invalid`,summary:i(e)}}}async function b(e){let t=await y(e);if(t.state!==`missing`)return t;let n=await x(e);return n.state===`unavailable`?n:n.keyringFailure===void 0?{state:`missing`}:{state:`missing`,keyringFailure:n.keyringFailure}}async function x(e){let t=n(e);try{return{state:`available`,...await c(f,j(t))}}catch(e){return{state:`unavailable`,summary:i(e)}}}function S(e){return E(e.authorizationServer,`authorization server`)}function C(e){if(URL.canParse(e.resource)&&new URL(e.resource).protocol===`http:`){let t=r(e.resource);if(t.isLoopback)return new URL(t.origin)}return E(e.resource,`resource`)}function w(e){if(e.clientId.trim()!==e.clientId||e.clientId.length===0)throw Error(`OAuth client ID must not be blank`);return e.clientId}function T(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}function E(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 D(e){return new Date(e.expiresAt).getTime()-m<=Date.now()}function O(e){let t=k(e.tokens.id_token)??k(e.tokens.access_token),n=t?.email;return{subject:t?.sub??null,email:typeof n==`string`?n:null}}function k(e){if(e!==void 0)try{return t(e)}catch{return}}function A(e){return[e.access_token,e.refresh_token,e.id_token]}function j(e){return`${p}${e}`}function M(e,t){return JSON.stringify({client:P(e,t.client),expiresAt:B(t.expiresAt,`absolute expiry`),tokens:L(t.tokens),...t.verifiedAt===void 0?{}:{verifiedAt:B(t.verifiedAt,`verification time`)}})}function N(e,t){let n;try{n=JSON.parse(t)}catch(e){throw Error(`OS OAuth credential entry failed schema validation`,{cause:e})}if(!H(n))throw Error(`OS OAuth credential entry failed schema validation`);return{client:P(e,F(n.client)),expiresAt:B(n.expiresAt,`absolute expiry`),tokens:L(I(n.tokens)),...n.verifiedAt===void 0?{}:{verifiedAt:B(n.verifiedAt,`verification time`)}}}function P(e,t){let n=r(t.resource);if(n.host!==e&&!(n.isLoopback&&r(e).isLoopback))throw Error(`OAuth client resource must match the credential API host`);return t}function F(e){let t=d.safeParse(e);if(!t.success)throw Error(`OS OAuth credential entry failed canonical client validation`,{cause:t.error});return t.data}function I(t){let n=e.safeParse(t);if(!n.success)throw Error(`OS OAuth credential entry failed OAuth token validation`,{cause:n.error});return n.data}function L(e){if(!V(e.access_token)||e.token_type.trim().toLowerCase()!==`bearer`)throw Error(`OAuth token response must contain a bearer access token`);if(e.refresh_token!==void 0&&!V(e.refresh_token))throw Error(`OAuth token response has an invalid refresh token`);return R(e),e}function R(e){let t=e.expires_in;if(typeof t!=`number`||!Number.isSafeInteger(t)||t<=0)throw Error(`OAuth token response must contain a positive expires_in`);return t}function z(e){let t=new Date(Date.now()+e*1e3);if(!Number.isFinite(t.getTime()))throw Error(`OAuth token response has an expiry outside the supported date range`);return t.toISOString()}function B(e,t){if(typeof e!=`string`)throw Error(`OS OAuth credential entry has an invalid ${t}`);let n=new Date(e);if(!Number.isFinite(n.getTime())||n.toISOString()!==e)throw Error(`OS OAuth credential entry has an invalid ${t}`);return e}function V(e){return e.trim()===e&&e.length>0}function H(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{D as a,w as c,T as d,A as f,g as h,b as i,O as l,E as m,v as n,_ as o,x as p,y as r,S as s,h as t,C as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{i as inspectOAuthCredentialStorage,a as isOAuthCredentialExpired}from"./oauth-credential-C2uLXL3z.js";
|