makecoder 2.0.87 → 2.0.89

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/gemini-cli-devtools",
3
- "version": "0.37.1",
3
+ "version": "0.37.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -1,5 +1,5 @@
1
1
  const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
- import{Gf as f,kk as a,mk as p,nk as m,ok as A,pk as T,qk as y,rk as v,sk as w,tk as C,zc as g}from"./chunk-YE6OXWU4.js";import{Id as i,Rd as l,b as o,be as k,pa as d}from"./chunk-VEQE4EAQ.js";import"./chunk-TWIC4BKL.js";import"./chunk-JAFVB6DI.js";import"./chunk-A5A5SUZN.js";import"./chunk-YUXORC52.js";var U=class extends a{constructor(e,t,r,n){super();this.config=e;this.agentName=t;this.agentCardUrl=n;this.tokenStorage=new m(d.getA2AOAuthTokensPath(),"gemini-cli-a2a"),this.authorizationUrl=e.authorization_url,this.tokenUrl=e.token_url,this.scopes=e.scopes,this.mergeAgentCardDefaults(r)}type="oauth2";tokenStorage;cachedToken=null;authorizationUrl;tokenUrl;scopes;async initialize(){(!this.authorizationUrl||!this.tokenUrl)&&this.agentCardUrl&&await this.fetchAgentCardDefaults();let e=await this.tokenStorage.getCredentials(this.agentName);e&&!this.tokenStorage.isTokenExpired(e.token)&&(this.cachedToken=e.token,o.debug(`[OAuth2AuthProvider] Loaded valid cached token for "${this.agentName}"`))}async headers(){if(this.cachedToken&&!this.tokenStorage.isTokenExpired(this.cachedToken))return{Authorization:`Bearer ${this.cachedToken.accessToken}`};if(this.cachedToken?.refreshToken&&this.tokenUrl&&this.config.client_id)try{let e=await C({clientId:this.config.client_id,clientSecret:this.config.client_secret,scopes:this.scopes},this.cachedToken.refreshToken,this.tokenUrl);return this.cachedToken=this.toOAuthToken(e,this.cachedToken.refreshToken),await this.persistToken(),{Authorization:`Bearer ${this.cachedToken.accessToken}`}}catch(e){o.debug(`[OAuth2AuthProvider] Refresh failed, falling back to interactive flow: ${i(e)}`),await this.tokenStorage.deleteCredentials(this.agentName)}return this.cachedToken=await this.authenticateInteractively(),{Authorization:`Bearer ${this.cachedToken.accessToken}`}}async shouldRetryWithHeaders(e,t){if(t.status!==401&&t.status!==403){this.authRetryCount=0;return}if(!(this.authRetryCount>=a.MAX_AUTH_RETRIES))return this.authRetryCount++,o.debug("[OAuth2AuthProvider] Auth failure, clearing token and re-authenticating"),this.cachedToken=null,await this.tokenStorage.deleteCredentials(this.agentName),this.headers()}mergeAgentCardDefaults(e){if(e?.securitySchemes){for(let t of Object.values(e.securitySchemes))if(t.type==="oauth2"&&t.flows.authorizationCode){let r=t.flows.authorizationCode;this.authorizationUrl??=r.authorizationUrl,this.tokenUrl??=r.tokenUrl,this.scopes??=Object.keys(r.scopes);break}}}async fetchAgentCardDefaults(){if(this.agentCardUrl)try{o.debug(`[OAuth2AuthProvider] Fetching agent card from ${this.agentCardUrl}`);let t=await new p().resolve(this.agentCardUrl,"");this.mergeAgentCardDefaults(t)}catch(e){o.warn(`[OAuth2AuthProvider] Could not fetch agent card for OAuth URL discovery: ${i(e)}`)}}async authenticateInteractively(){if(!this.config.client_id)throw new Error(`OAuth2 authentication for agent "${this.agentName}" requires a client_id. Add client_id to the auth config in your agent definition.`);if(!this.authorizationUrl||!this.tokenUrl)throw new Error(`OAuth2 authentication for agent "${this.agentName}" requires authorization_url and token_url. Provide them in the auth config or ensure the agent card exposes an oauth2 security scheme.`);let e={clientId:this.config.client_id,clientSecret:this.config.client_secret,authorizationUrl:this.authorizationUrl,tokenUrl:this.tokenUrl,scopes:this.scopes},t=A(),r=y(e.redirectUri),n=T(t.state,r),s=await n.port,h=v(e,t,s,void 0);if(!await g(`Authentication required for A2A agent: '${this.agentName}'.`))throw new l("Authentication cancelled by user.");k.emitFeedback("info",`\u2192 Opening your browser for OAuth sign-in...
2
+ import{Gf as f,kk as a,mk as p,nk as m,ok as A,pk as T,qk as y,rk as v,sk as w,tk as C,zc as g}from"./chunk-NQYDZB3F.js";import{Id as i,Rd as l,b as o,be as k,pa as d}from"./chunk-VEQE4EAQ.js";import"./chunk-TWIC4BKL.js";import"./chunk-JAFVB6DI.js";import"./chunk-A5A5SUZN.js";import"./chunk-YUXORC52.js";var U=class extends a{constructor(e,t,r,n){super();this.config=e;this.agentName=t;this.agentCardUrl=n;this.tokenStorage=new m(d.getA2AOAuthTokensPath(),"gemini-cli-a2a"),this.authorizationUrl=e.authorization_url,this.tokenUrl=e.token_url,this.scopes=e.scopes,this.mergeAgentCardDefaults(r)}type="oauth2";tokenStorage;cachedToken=null;authorizationUrl;tokenUrl;scopes;async initialize(){(!this.authorizationUrl||!this.tokenUrl)&&this.agentCardUrl&&await this.fetchAgentCardDefaults();let e=await this.tokenStorage.getCredentials(this.agentName);e&&!this.tokenStorage.isTokenExpired(e.token)&&(this.cachedToken=e.token,o.debug(`[OAuth2AuthProvider] Loaded valid cached token for "${this.agentName}"`))}async headers(){if(this.cachedToken&&!this.tokenStorage.isTokenExpired(this.cachedToken))return{Authorization:`Bearer ${this.cachedToken.accessToken}`};if(this.cachedToken?.refreshToken&&this.tokenUrl&&this.config.client_id)try{let e=await C({clientId:this.config.client_id,clientSecret:this.config.client_secret,scopes:this.scopes},this.cachedToken.refreshToken,this.tokenUrl);return this.cachedToken=this.toOAuthToken(e,this.cachedToken.refreshToken),await this.persistToken(),{Authorization:`Bearer ${this.cachedToken.accessToken}`}}catch(e){o.debug(`[OAuth2AuthProvider] Refresh failed, falling back to interactive flow: ${i(e)}`),await this.tokenStorage.deleteCredentials(this.agentName)}return this.cachedToken=await this.authenticateInteractively(),{Authorization:`Bearer ${this.cachedToken.accessToken}`}}async shouldRetryWithHeaders(e,t){if(t.status!==401&&t.status!==403){this.authRetryCount=0;return}if(!(this.authRetryCount>=a.MAX_AUTH_RETRIES))return this.authRetryCount++,o.debug("[OAuth2AuthProvider] Auth failure, clearing token and re-authenticating"),this.cachedToken=null,await this.tokenStorage.deleteCredentials(this.agentName),this.headers()}mergeAgentCardDefaults(e){if(e?.securitySchemes){for(let t of Object.values(e.securitySchemes))if(t.type==="oauth2"&&t.flows.authorizationCode){let r=t.flows.authorizationCode;this.authorizationUrl??=r.authorizationUrl,this.tokenUrl??=r.tokenUrl,this.scopes??=Object.keys(r.scopes);break}}}async fetchAgentCardDefaults(){if(this.agentCardUrl)try{o.debug(`[OAuth2AuthProvider] Fetching agent card from ${this.agentCardUrl}`);let t=await new p().resolve(this.agentCardUrl,"");this.mergeAgentCardDefaults(t)}catch(e){o.warn(`[OAuth2AuthProvider] Could not fetch agent card for OAuth URL discovery: ${i(e)}`)}}async authenticateInteractively(){if(!this.config.client_id)throw new Error(`OAuth2 authentication for agent "${this.agentName}" requires a client_id. Add client_id to the auth config in your agent definition.`);if(!this.authorizationUrl||!this.tokenUrl)throw new Error(`OAuth2 authentication for agent "${this.agentName}" requires authorization_url and token_url. Provide them in the auth config or ensure the agent card exposes an oauth2 security scheme.`);let e={clientId:this.config.client_id,clientSecret:this.config.client_secret,authorizationUrl:this.authorizationUrl,tokenUrl:this.tokenUrl,scopes:this.scopes},t=A(),r=y(e.redirectUri),n=T(t.state,r),s=await n.port,h=v(e,t,s,void 0);if(!await g(`Authentication required for A2A agent: '${this.agentName}'.`))throw new l("Authentication cancelled by user.");k.emitFeedback("info",`\u2192 Opening your browser for OAuth sign-in...
3
3
 
4
4
  If the browser does not open, copy and paste this URL into your browser:
5
5
  ${h}
@@ -1,5 +1,5 @@
1
1
  const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
- import{Gf as g,kk as a,mk as p,nk as m,ok as A,pk as T,qk as w,rk as y,sk as U,tk as C,zc as f}from"./chunk-6V5V2R7S.js";import{Id as n,Rd as l,b as o,be as k,pa as d}from"./chunk-5OV5S6OY.js";import"./chunk-TWIC4BKL.js";import"./chunk-JAFVB6DI.js";import"./chunk-A5A5SUZN.js";import"./chunk-YUXORC52.js";var v=class extends a{config;agentName;agentCardUrl;type="oauth2";tokenStorage;cachedToken=null;authorizationUrl;tokenUrl;scopes;constructor(e,t,r,i){super(),this.config=e,this.agentName=t,this.agentCardUrl=i,this.tokenStorage=new m(d.getA2AOAuthTokensPath(),"gemini-cli-a2a"),this.authorizationUrl=e.authorization_url,this.tokenUrl=e.token_url,this.scopes=e.scopes,this.mergeAgentCardDefaults(r)}async initialize(){(!this.authorizationUrl||!this.tokenUrl)&&this.agentCardUrl&&await this.fetchAgentCardDefaults();let e=await this.tokenStorage.getCredentials(this.agentName);e&&!this.tokenStorage.isTokenExpired(e.token)&&(this.cachedToken=e.token,o.debug(`[OAuth2AuthProvider] Loaded valid cached token for "${this.agentName}"`))}async headers(){if(this.cachedToken&&!this.tokenStorage.isTokenExpired(this.cachedToken))return{Authorization:`Bearer ${this.cachedToken.accessToken}`};if(this.cachedToken?.refreshToken&&this.tokenUrl&&this.config.client_id)try{let e=await C({clientId:this.config.client_id,clientSecret:this.config.client_secret,scopes:this.scopes},this.cachedToken.refreshToken,this.tokenUrl);return this.cachedToken=this.toOAuthToken(e,this.cachedToken.refreshToken),await this.persistToken(),{Authorization:`Bearer ${this.cachedToken.accessToken}`}}catch(e){o.debug(`[OAuth2AuthProvider] Refresh failed, falling back to interactive flow: ${n(e)}`),await this.tokenStorage.deleteCredentials(this.agentName)}return this.cachedToken=await this.authenticateInteractively(),{Authorization:`Bearer ${this.cachedToken.accessToken}`}}async shouldRetryWithHeaders(e,t){if(t.status!==401&&t.status!==403){this.authRetryCount=0;return}if(!(this.authRetryCount>=a.MAX_AUTH_RETRIES))return this.authRetryCount++,o.debug("[OAuth2AuthProvider] Auth failure, clearing token and re-authenticating"),this.cachedToken=null,await this.tokenStorage.deleteCredentials(this.agentName),this.headers()}mergeAgentCardDefaults(e){if(e?.securitySchemes){for(let t of Object.values(e.securitySchemes))if(t.type==="oauth2"&&t.flows.authorizationCode){let r=t.flows.authorizationCode;this.authorizationUrl??=r.authorizationUrl,this.tokenUrl??=r.tokenUrl,this.scopes??=Object.keys(r.scopes);break}}}async fetchAgentCardDefaults(){if(this.agentCardUrl)try{o.debug(`[OAuth2AuthProvider] Fetching agent card from ${this.agentCardUrl}`);let t=await new p().resolve(this.agentCardUrl,"");this.mergeAgentCardDefaults(t)}catch(e){o.warn(`[OAuth2AuthProvider] Could not fetch agent card for OAuth URL discovery: ${n(e)}`)}}async authenticateInteractively(){if(!this.config.client_id)throw new Error(`OAuth2 authentication for agent "${this.agentName}" requires a client_id. Add client_id to the auth config in your agent definition.`);if(!this.authorizationUrl||!this.tokenUrl)throw new Error(`OAuth2 authentication for agent "${this.agentName}" requires authorization_url and token_url. Provide them in the auth config or ensure the agent card exposes an oauth2 security scheme.`);let e={clientId:this.config.client_id,clientSecret:this.config.client_secret,authorizationUrl:this.authorizationUrl,tokenUrl:this.tokenUrl,scopes:this.scopes},t=A(),r=w(e.redirectUri),i=T(t.state,r),s=await i.port,h=y(e,t,s,void 0);if(!await f(`Authentication required for A2A agent: '${this.agentName}'.`))throw new l("Authentication cancelled by user.");k.emitFeedback("info",`\u2192 Opening your browser for OAuth sign-in...
2
+ import{Gf as g,kk as a,mk as p,nk as m,ok as A,pk as T,qk as w,rk as y,sk as U,tk as C,zc as f}from"./chunk-UNZWUZT5.js";import{Id as n,Rd as l,b as o,be as k,pa as d}from"./chunk-5OV5S6OY.js";import"./chunk-TWIC4BKL.js";import"./chunk-JAFVB6DI.js";import"./chunk-A5A5SUZN.js";import"./chunk-YUXORC52.js";var v=class extends a{config;agentName;agentCardUrl;type="oauth2";tokenStorage;cachedToken=null;authorizationUrl;tokenUrl;scopes;constructor(e,t,r,i){super(),this.config=e,this.agentName=t,this.agentCardUrl=i,this.tokenStorage=new m(d.getA2AOAuthTokensPath(),"gemini-cli-a2a"),this.authorizationUrl=e.authorization_url,this.tokenUrl=e.token_url,this.scopes=e.scopes,this.mergeAgentCardDefaults(r)}async initialize(){(!this.authorizationUrl||!this.tokenUrl)&&this.agentCardUrl&&await this.fetchAgentCardDefaults();let e=await this.tokenStorage.getCredentials(this.agentName);e&&!this.tokenStorage.isTokenExpired(e.token)&&(this.cachedToken=e.token,o.debug(`[OAuth2AuthProvider] Loaded valid cached token for "${this.agentName}"`))}async headers(){if(this.cachedToken&&!this.tokenStorage.isTokenExpired(this.cachedToken))return{Authorization:`Bearer ${this.cachedToken.accessToken}`};if(this.cachedToken?.refreshToken&&this.tokenUrl&&this.config.client_id)try{let e=await C({clientId:this.config.client_id,clientSecret:this.config.client_secret,scopes:this.scopes},this.cachedToken.refreshToken,this.tokenUrl);return this.cachedToken=this.toOAuthToken(e,this.cachedToken.refreshToken),await this.persistToken(),{Authorization:`Bearer ${this.cachedToken.accessToken}`}}catch(e){o.debug(`[OAuth2AuthProvider] Refresh failed, falling back to interactive flow: ${n(e)}`),await this.tokenStorage.deleteCredentials(this.agentName)}return this.cachedToken=await this.authenticateInteractively(),{Authorization:`Bearer ${this.cachedToken.accessToken}`}}async shouldRetryWithHeaders(e,t){if(t.status!==401&&t.status!==403){this.authRetryCount=0;return}if(!(this.authRetryCount>=a.MAX_AUTH_RETRIES))return this.authRetryCount++,o.debug("[OAuth2AuthProvider] Auth failure, clearing token and re-authenticating"),this.cachedToken=null,await this.tokenStorage.deleteCredentials(this.agentName),this.headers()}mergeAgentCardDefaults(e){if(e?.securitySchemes){for(let t of Object.values(e.securitySchemes))if(t.type==="oauth2"&&t.flows.authorizationCode){let r=t.flows.authorizationCode;this.authorizationUrl??=r.authorizationUrl,this.tokenUrl??=r.tokenUrl,this.scopes??=Object.keys(r.scopes);break}}}async fetchAgentCardDefaults(){if(this.agentCardUrl)try{o.debug(`[OAuth2AuthProvider] Fetching agent card from ${this.agentCardUrl}`);let t=await new p().resolve(this.agentCardUrl,"");this.mergeAgentCardDefaults(t)}catch(e){o.warn(`[OAuth2AuthProvider] Could not fetch agent card for OAuth URL discovery: ${n(e)}`)}}async authenticateInteractively(){if(!this.config.client_id)throw new Error(`OAuth2 authentication for agent "${this.agentName}" requires a client_id. Add client_id to the auth config in your agent definition.`);if(!this.authorizationUrl||!this.tokenUrl)throw new Error(`OAuth2 authentication for agent "${this.agentName}" requires authorization_url and token_url. Provide them in the auth config or ensure the agent card exposes an oauth2 security scheme.`);let e={clientId:this.config.client_id,clientSecret:this.config.client_secret,authorizationUrl:this.authorizationUrl,tokenUrl:this.tokenUrl,scopes:this.scopes},t=A(),r=w(e.redirectUri),i=T(t.state,r),s=await i.port,h=y(e,t,s,void 0);if(!await f(`Authentication required for A2A agent: '${this.agentName}'.`))throw new l("Authentication cancelled by user.");k.emitFeedback("info",`\u2192 Opening your browser for OAuth sign-in...
3
3
 
4
4
  If the browser does not open, copy and paste this URL into your browser:
5
5
  ${h}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makecoder",
3
- "version": "2.0.87",
3
+ "version": "2.0.89",
4
4
  "description": "MakeCoder: Unified AI agent CLI tool integrating Claude Code, Codex and Gemini CLI",
5
5
  "main": "./dist/coder.js",
6
6
  "bin": {
@@ -35,9 +35,9 @@
35
35
  "zod": "^3.25.76"
36
36
  },
37
37
  "optionalDependencies": {
38
- "makecoder-codex-darwin-arm64": "2.0.87",
39
- "makecoder-codex-linux-x64": "2.0.87",
40
- "makecoder-codex-win32-x64": "2.0.87"
38
+ "makecoder-codex-darwin-arm64": "2.0.89",
39
+ "makecoder-codex-linux-x64": "2.0.89",
40
+ "makecoder-codex-win32-x64": "2.0.89"
41
41
  },
42
42
  "engines": {
43
43
  "node": ">=20.0.0"