@aventurevc/aventure-cli 0.8.387 → 0.8.389

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/aventure-cli/index.js +1 -1
  2. package/dist/aventure-cli/unified-operations.json +1 -1
  3. package/dist/chunks/{api-key-bearer-credential-DpuLoYkG.js → api-key-bearer-credential-BSMWDa2p.js} +1 -1
  4. package/dist/chunks/{api-key-bearer-credential-BB4N6Moa.js → api-key-bearer-credential-d15DEdZf.js} +1 -1
  5. package/dist/chunks/{api-key-credential-CvGuNqg7.js → api-key-credential-BY2EG-tL.js} +1 -1
  6. package/dist/chunks/{api-key-credential-v7YT_b1y.js → api-key-credential-DtJo4PuD.js} +1 -1
  7. package/dist/chunks/{api-key-credential-verification-C_DQtQyx.js → api-key-credential-verification-BDoox7nQ.js} +1 -1
  8. package/dist/chunks/{api-key-credential-verification-DC-YG5wa.js → api-key-credential-verification-CD6pe9fG.js} +1 -1
  9. package/dist/chunks/{api-key-login-DSWEmjPA.js → api-key-login-B5-eq3iF.js} +1 -1
  10. package/dist/chunks/{auth-resolver-CRpJNNB2.js → auth-resolver-BVbuFsfi.js} +1 -1
  11. package/dist/chunks/auth-resolver-DykPZD3G.js +1 -0
  12. package/dist/chunks/{auth-status-check-DcY55e4Q.js → auth-status-check-3BK1T5aj.js} +1 -1
  13. package/dist/chunks/{auth-status-check-Cwf6uUZP.js → auth-status-check-DcJWYQeI.js} +1 -1
  14. package/dist/chunks/{auth-status-render-DlSjZ6kk.js → auth-status-render-CcCJbwiP.js} +1 -1
  15. package/dist/chunks/{aventure-cli-SEyW_1AB.js → aventure-cli-C_o6osUY.js} +5 -5
  16. package/dist/chunks/{batch-io-D3B-dxmh.js → batch-io-Ng5oTeLW.js} +1 -1
  17. package/dist/chunks/{builtin-auth-IPP_Zmbj.js → builtin-auth-6zV2pxCr.js} +4 -4
  18. package/dist/chunks/{builtin-run-wait-5yr1WK3I.js → builtin-run-wait-DZUZRIl_.js} +1 -1
  19. package/dist/chunks/{builtin-update-DJT_3I5O.js → builtin-update-zRz5G9pm.js} +1 -1
  20. package/dist/chunks/{cli-help-policy-DCn_wXe1.js → cli-help-policy-iy_Fz2j6.js} +1 -1
  21. package/dist/chunks/{completion-CnY6V98Y.js → completion-OrsZ17qd.js} +1 -1
  22. package/dist/chunks/{contract-SAu4Y_Kd.js → contract-BpcQGCfB.js} +1 -1
  23. package/dist/chunks/{contract-parameter-BjPYOnhE.js → contract-parameter-10RPYmpI.js} +1 -1
  24. package/dist/chunks/{credential-store-xkwn77zF.js → credential-store-C5oiR_ZP.js} +1 -1
  25. package/dist/chunks/env-D3pZuSTl.js +1 -0
  26. package/dist/chunks/{generated-option-order-DYmytWyF.js → generated-option-order-DQX1SZcc.js} +1 -1
  27. package/dist/chunks/{help-catalog-PSifyPm6.js → help-catalog-DbyrRHS0.js} +1 -1
  28. package/dist/chunks/{help-intent-GX3-dXkS.js → help-intent-CPighdYX.js} +1 -1
  29. package/dist/chunks/{logging-DYzy2g8p.js → logging-Mv7SKhBo.js} +1 -1
  30. package/dist/chunks/{logging-CNg4ihxv.js → logging-ivDNkWRg.js} +1 -1
  31. package/dist/chunks/logout-BnPicjvz.js +1 -0
  32. package/dist/chunks/{logout-Dxt8vao3.js → logout-DO3r1gDy.js} +1 -1
  33. package/dist/chunks/oauth-bearer-credential-DHaaOgxy.js +1 -0
  34. package/dist/chunks/oauth-bearer-credential-kDhKjz8Q.js +1 -0
  35. package/dist/chunks/oauth-credential-CQV59duj.js +1 -0
  36. package/dist/chunks/{oauth-credential-CYLRKH91.js → oauth-credential-fLi_x98K.js} +1 -1
  37. package/dist/chunks/{oauth-login-155QGdTQ.js → oauth-login-CHgAKEd1.js} +1 -1
  38. package/dist/chunks/{oauth-login-BDOwNja7.js → oauth-login-DZPuWPFn.js} +1 -1
  39. package/dist/chunks/{openapi-call-Gchy3s8a.js → openapi-call-CYoiasc4.js} +1 -1
  40. package/dist/chunks/openapi-call-DiAOq3qX.js +102 -0
  41. package/dist/chunks/openapi-snapshot.json +1 -1
  42. package/dist/chunks/{operations-DbanGAPY.js → operations-C4j6V27I.js} +1 -1
  43. package/dist/chunks/operations-catalog-C5vdl7n1.js +1 -0
  44. package/dist/chunks/{operations-catalog-D_8difUe.js → operations-catalog-CyD5YtCp.js} +1 -1
  45. package/dist/chunks/{operations-metadata-CzOMH0PS.js → operations-metadata-DjvxsFgc.js} +1 -1
  46. package/dist/chunks/{output-D8SD_tSW.js → output-BQTNQtpz.js} +1 -1
  47. package/dist/chunks/{output-XyvDx9ok.js → output-Dy6hOK5_.js} +1 -1
  48. package/dist/chunks/{parse-error-hint-0Xc2T5On.js → parse-error-hint-BnCCswXI.js} +1 -1
  49. package/dist/chunks/{payload-operand-guard-Cne4mq9F.js → payload-operand-guard-Bf6TzgSw.js} +1 -1
  50. package/dist/chunks/{startup-auth-DfEgkGG8.js → startup-auth-DDajhJnj.js} +1 -1
  51. package/dist/chunks/{startup-auth-BuGIFRmd.js → startup-auth-Dryojbbf.js} +1 -1
  52. package/dist/chunks/{text-response-DP30fs3r.js → text-response-DtttC2nQ.js} +1 -1
  53. package/dist/chunks/{tool-policy-DG8pafmI.js → tool-policy-BoGFH7K_.js} +1 -1
  54. package/package.json +3 -3
  55. package/dist/chunks/auth-resolver-DNfIzKg-.js +0 -1
  56. package/dist/chunks/env-DGAe95Xm.js +0 -1
  57. package/dist/chunks/logout-GwrTE5av.js +0 -1
  58. package/dist/chunks/oauth-bearer-credential-BiDojkqU.js +0 -1
  59. package/dist/chunks/oauth-bearer-credential-CxuQ4uM5.js +0 -1
  60. package/dist/chunks/oauth-credential-D5ioBfGK.js +0 -1
  61. package/dist/chunks/openapi-call-DRowSHyQ.js +0 -102
  62. package/dist/chunks/operations-catalog-D4YIaQHB.js +0 -1
@@ -1 +0,0 @@
1
- import{Yt as e}from"./auth-BNDyLTqp-z6VNZXaE.js";import{i as t}from"./webapi-B2JTupyg.js";import{n,r}from"./api-target-vxev2RKl.js";import{t as i}from"./credential-redaction-Cl6Eny3X.js";import{a,i as o,o as s,r as c,t as l}from"./credential-store-xkwn77zF.js";import{t as u}from"./client-C-w059lW.js";import"./dist-oUS6BQ43.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 n=r(e),o=M(n,t),c;try{c=await a(async()=>await s(f,j(n),o))}catch(e){throw Error(`OAuth credential could not be stored — ${i(e,[o,...A(t.tokens)])}`,{cause:e})}return{host:n,provider:c,credential:N(n,o)}}async function _(e){let t=r(e),n;try{n=await o(f,j(t))}catch(e){return{state:`unavailable`,summary:i(e)}}let{record:a,keyringFailure:s}=n;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=r(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=r(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=n(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 r=n(t.resource);if(r.host!==e&&!(r.isLoopback&&n(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};