@caishenai/cli 0.0.172 → 0.0.173

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.
@@ -1939,6 +1939,46 @@
1939
1939
  "name": "Gemini 4 Argon",
1940
1940
  "recommended": false
1941
1941
  },
1942
+ {
1943
+ "capabilities": {
1944
+ "contextWindowTokens": 1048576,
1945
+ "functionCall": true,
1946
+ "imageOutput": false,
1947
+ "inputModalities": [
1948
+ "text",
1949
+ "image",
1950
+ "video",
1951
+ "audio"
1952
+ ],
1953
+ "knowledgeCutoff": "2026-03-31",
1954
+ "maxOutput": 65536,
1955
+ "outputModalities": [
1956
+ "text"
1957
+ ],
1958
+ "reasoning": true,
1959
+ "reasoningEfforts": [
1960
+ "low",
1961
+ "medium",
1962
+ "high"
1963
+ ],
1964
+ "structuredOutput": true,
1965
+ "video": true,
1966
+ "vision": true
1967
+ },
1968
+ "context_window": 1048576,
1969
+ "description": "100 万上下文 | 前沿推理 | 长程 Agent",
1970
+ "endpoint_types": [
1971
+ "gemini",
1972
+ "openai"
1973
+ ],
1974
+ "group": "",
1975
+ "group_name": "",
1976
+ "hidden": false,
1977
+ "id": "gemini-4-carbon",
1978
+ "max_output_tokens": 65536,
1979
+ "name": "Gemini 4 Carbon",
1980
+ "recommended": false
1981
+ },
1942
1982
  {
1943
1983
  "capabilities": {
1944
1984
  "contextWindowTokens": 1048576,
@@ -2180,7 +2220,7 @@
2180
2220
  "tool": "gemini"
2181
2221
  }
2182
2222
  ],
2183
- "revision": "2026-11-10T00:13:23Z-14",
2223
+ "revision": "2026-11-10T18:59:17Z-15",
2184
2224
  "schema": 1,
2185
2225
  "tools": {
2186
2226
  "claude": {
@@ -1939,6 +1939,46 @@
1939
1939
  "name": "Gemini 4 Argon",
1940
1940
  "recommended": false
1941
1941
  },
1942
+ {
1943
+ "capabilities": {
1944
+ "contextWindowTokens": 1048576,
1945
+ "functionCall": true,
1946
+ "imageOutput": false,
1947
+ "inputModalities": [
1948
+ "text",
1949
+ "image",
1950
+ "video",
1951
+ "audio"
1952
+ ],
1953
+ "knowledgeCutoff": "2026-03-31",
1954
+ "maxOutput": 65536,
1955
+ "outputModalities": [
1956
+ "text"
1957
+ ],
1958
+ "reasoning": true,
1959
+ "reasoningEfforts": [
1960
+ "low",
1961
+ "medium",
1962
+ "high"
1963
+ ],
1964
+ "structuredOutput": true,
1965
+ "video": true,
1966
+ "vision": true
1967
+ },
1968
+ "context_window": 1048576,
1969
+ "description": "100 万上下文 | 前沿推理 | 长程 Agent",
1970
+ "endpoint_types": [
1971
+ "gemini",
1972
+ "openai"
1973
+ ],
1974
+ "group": "",
1975
+ "group_name": "",
1976
+ "hidden": false,
1977
+ "id": "gemini-4-carbon",
1978
+ "max_output_tokens": 65536,
1979
+ "name": "Gemini 4 Carbon",
1980
+ "recommended": false
1981
+ },
1942
1982
  {
1943
1983
  "capabilities": {
1944
1984
  "contextWindowTokens": 1048576,
@@ -2180,7 +2220,7 @@
2180
2220
  "tool": "gemini"
2181
2221
  }
2182
2222
  ],
2183
- "revision": "2026-11-10T00:13:23Z-14",
2223
+ "revision": "2026-11-10T18:59:17Z-15",
2184
2224
  "schema": 1,
2185
2225
  "tools": {
2186
2226
  "claude": {
@@ -1 +1 @@
1
- import{chmodSync as t,existsSync as r,readFileSync as e}from"fs";import{join as n}from"path";import{i18n as o}from"../i18n.js";import{prettyModelName as i}from"../gateway-models.js";import{getAgyRules as a}from"../model-registry.js";import{logger as l}from"../../utils/logger.js";import{readPersistentEnvFile as s,removePersistentEnv as c,writePersistentEnv as u}from"../persistent-env.js";import{backupBeforeWrite as p,atomicWriteFile as g}from"./backup.js";import{findInstalls as d,mirrorInstallCommand as m}from"./tool-installs.js";import{toolHome as y}from"./types.js";import{brand as f,PROVIDER_KEY as v}from"../brand.js";const A="agy",_="AGY_LLM_GATEWAY_URL",h="AGY_LLM_GATEWAY_API_KEY",E="AGY_LLM_GATEWAY_MODELS",j=["GEMINI_API_KEY","GOOGLE_GEMINI_BASE_URL"],w="gemini",K=()=>n(y(),".gemini","antigravity-cli"),b=()=>n(K(),"settings.json"),I=()=>n(K(),`${v}.env`),P=()=>n(y(),".antigravity","settings.json"),M=f().installMirror?.agy,G={command:"agy",native:{binDir:"win32"===process.platform?["AppData","Local","agy","bin"]:[".local","bin"],updateArgs:["update"],dataDirs:[]},...M?{mirrorScript:{sh:`${M}/install.sh`,ps1:`${M}/install.ps1`}}:{}};function L(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}function C(t,n){if(!r(t))return{};const o=e(t,"utf-8");if(!o.trim())return{};try{const t=JSON.parse(o);if(!L(t))throw new Error(`${n} root must be an object`);return t}catch(t){throw new Error(`Existing ${n} cannot be parsed; back it up and fix it first: ${t instanceof Error?t.message:String(t)}`)}}const N=()=>C(b(),"~/.gemini/antigravity-cli/settings.json"),S=()=>C(P(),"~/.antigravity/settings.json");function Y(r,e,n){p(r),g(r,JSON.stringify(e,null,2)+"\n",n),void 0!==n&&t(r,n)}function $(t){return(t||"").replace(/\/+$/,"").replace(/\/v1(beta)?$/,"")}function k(t){const r=a().gatewayModels,e=t?r.filter(r=>t.models.includes(r)):[];return e.length>0?e:r}const O=t=>i(t.replace(/-preview$/,""));function x(t){const r=t.gateway;return L(r)&&!0===r.enabled&&"string"==typeof r.apiKey&&r.apiKey.trim()&&"string"==typeof r.url?{url:r.url,apiKey:r.apiKey}:null}function U(t){const r=t.models;return L(r)&&Array.isArray(r.list)?r.list.map(t=>L(t)&&"string"==typeof t.modelId?t.modelId:"").filter(Boolean):[]}function D(){try{if(N().modelProvider!==w)return null}catch{return null}const t=s(I()),r=t.GEMINI_API_KEY;return r&&r.trim()?{apiKey:r,url:t.GOOGLE_GEMINI_BASE_URL??""}:null}function R(t){const r=s(I());return r[_]===t.url&&r[h]===t.apiKey}function T(t,r,e){const n=N(),o=S();o.gateway={...L(o.gateway)?o.gateway:{},enabled:!0,url:r,apiKey:t,wireProtocol:"genai"},o.models={...L(o.models)?o.models:{},defaultModelId:e[0],list:e.map(t=>({modelId:t,displayName:O(t),supportsThinking:!0}))},Y(P(),o,384),j.some(t=>void 0!==s(I())[t])&&c(A,I(),j);const i=u(A,I(),{[_]:r,[h]:t,[E]:e.join(",")}).rcFiles;for(const t of j)delete process.env[t];return n.modelProvider===w&&(delete n.modelProvider,Y(b(),n)),i}let B=null,W=null;export const antigravityAdapter={name:"agy",displayName:"Antigravity CLI",command:"agy",installCommand:m(G),installSpec:G,configPath:P(),wantsModelCatalog:!0,loadPrivateConfig(t){N(),S();const r=k(t.catalog);B=T(t.apiKey,$(t.baseUrl),r),W=r},unloadPrivateConfig(){try{const t=S();x(t)&&(delete t.gateway,delete t.models,Y(P(),t,384))}catch(t){l.logError("antigravityAdapter.unloadPrivateConfig",t)}try{const t=N();t.modelProvider===w&&(delete t.modelProvider,Y(b(),t))}catch(t){l.logError("antigravityAdapter.unloadPrivateConfig",t)}c(A,I(),[_,h,E,...j])},detectCurrentConfig(){try{const t=x(S());if(t)return{apiKey:t.apiKey}}catch{return{apiKey:null}}return{apiKey:D()?.apiKey??null}},listedModels(){try{const t=S(),r=x(t);if(r)return R(r)?U(t):[]}catch{return null}return D()?[]:null},refreshModelMenu(t){const r=S(),e=x(r)??D();if(!e)return;const n=k(t.catalog),o=e.url||$(t.baseUrl),i=x(r);null!==i&&R(i)&&U(r).join(",")===n.join(",")&&s(I())[E]===n.join(",")&&null===D()||T(e.apiKey,o,n)},getConfig(){try{return S()}catch(t){return l.logError("antigravityAdapter.getConfig",t),null}},applyNotes(){const t=[];if(W&&W.length>0){const r=W.map(O);t.push({kind:"summary",text:o.t("tools.agy.menu_written",{count:String(r.length),list:r.join(o.t("tools.grok.list_separator")),default:r[0]})})}return null===B||0===d(G).length||t.push({kind:"action",text:o.t("tools.agy.open_new_terminal")}),t},backupPaths:()=>[P(),b(),I()],forceResetPaths:()=>[I()]};
1
+ import{chmodSync as t,existsSync as r,readFileSync as e}from"fs";import{join as n}from"path";import{i18n as o}from"../i18n.js";import{prettyModelName as i}from"../gateway-models.js";import{getAgyRules as a}from"../model-registry.js";import{logger as l}from"../../utils/logger.js";import{readPersistentEnvFile as s,removePersistentEnv as c,writePersistentEnv as u}from"../persistent-env.js";import{backupBeforeWrite as p,atomicWriteFile as m}from"./backup.js";import{findInstalls as d,mirrorInstallCommand as g}from"./tool-installs.js";import{toolHome as y}from"./types.js";import{brand as f,PROVIDER_KEY as h}from"../brand.js";const v="agy",A="AGY_LLM_GATEWAY_URL",_="AGY_LLM_GATEWAY_API_KEY",E="AGY_LLM_GATEWAY_MODELS",j=["GEMINI_API_KEY","GOOGLE_GEMINI_BASE_URL"],w="gemini",K=()=>n(y(),".gemini","antigravity-cli"),b=()=>n(K(),"settings.json"),I=()=>n(K(),`${h}.env`),P=()=>n(y(),".antigravity","settings.json"),M=f().installMirror?.agy,G={command:"agy",native:{binDir:"win32"===process.platform?["AppData","Local","agy","bin"]:[".local","bin"],updateArgs:["update"],dataDirs:[]},...M?{mirrorScript:{sh:`${M}/install.sh`,ps1:`${M}/install.ps1`}}:{}};function L(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}function $(t,n){if(!r(t))return{};const o=e(t,"utf-8");if(!o.trim())return{};try{const t=JSON.parse(o);if(!L(t))throw new Error(`${n} root must be an object`);return t}catch(t){throw new Error(`Existing ${n} cannot be parsed; back it up and fix it first: ${t instanceof Error?t.message:String(t)}`)}}const C=()=>$(b(),"~/.gemini/antigravity-cli/settings.json"),N=()=>$(P(),"~/.antigravity/settings.json");function S(r,e,n){p(r),m(r,JSON.stringify(e,null,2)+"\n",n),void 0!==n&&t(r,n)}function Y(t){return(t||"").replace(/\/+$/,"").replace(/\/v1(beta)?$/,"")}const x=/-(minimal|low|medium|high|xhigh|max)$/;function k(t){const r=a().gatewayModels,e=t?r.filter(r=>t.models.includes(r)||t.models.includes(r.replace(x,""))):[];return e.length>0?e:r}function O(t){const r=t.replace(/-preview$/,""),e=x.exec(r)?.[1];return e?`${i(r.replace(x,""))} (${e[0].toUpperCase()}${e.slice(1)})`:i(r)}function U(t){const r=t.gateway;return L(r)&&!0===r.enabled&&"string"==typeof r.apiKey&&r.apiKey.trim()&&"string"==typeof r.url?{url:r.url,apiKey:r.apiKey}:null}function D(t){const r=t.models;return L(r)&&Array.isArray(r.list)?r.list.map(t=>L(t)&&"string"==typeof t.modelId?t.modelId:"").filter(Boolean):[]}function R(){try{if(C().modelProvider!==w)return null}catch{return null}const t=s(I()),r=t.GEMINI_API_KEY;return r&&r.trim()?{apiKey:r,url:t.GOOGLE_GEMINI_BASE_URL??""}:null}function T(t){const r=s(I());return r[A]===t.url&&r[_]===t.apiKey}function B(t,r,e){const n=C(),o=N();o.gateway={...L(o.gateway)?o.gateway:{},enabled:!0,url:r,apiKey:t,wireProtocol:"genai"},o.models={...L(o.models)?o.models:{},defaultModelId:e[0],list:e.map(t=>({modelId:t,displayName:O(t),supportsThinking:!0}))},S(P(),o,384),j.some(t=>void 0!==s(I())[t])&&c(v,I(),j);const i=u(v,I(),{[A]:r,[_]:t,[E]:e.join(",")}).rcFiles;for(const t of j)delete process.env[t];return n.modelProvider===w&&(delete n.modelProvider,S(b(),n)),i}let W=null,J=null;export const antigravityAdapter={name:"agy",displayName:"Antigravity CLI",command:"agy",installCommand:g(G),installSpec:G,configPath:P(),wantsModelCatalog:!0,loadPrivateConfig(t){C(),N();const r=k(t.catalog);W=B(t.apiKey,Y(t.baseUrl),r),J=r},unloadPrivateConfig(){try{const t=N();U(t)&&(delete t.gateway,delete t.models,S(P(),t,384))}catch(t){l.logError("antigravityAdapter.unloadPrivateConfig",t)}try{const t=C();t.modelProvider===w&&(delete t.modelProvider,S(b(),t))}catch(t){l.logError("antigravityAdapter.unloadPrivateConfig",t)}c(v,I(),[A,_,E,...j])},detectCurrentConfig(){try{const t=U(N());if(t)return{apiKey:t.apiKey}}catch{return{apiKey:null}}return{apiKey:R()?.apiKey??null}},listedModels(){try{const t=N(),r=U(t);if(r)return T(r)?D(t):[]}catch{return null}return R()?[]:null},refreshModelMenu(t){const r=N(),e=U(r)??R();if(!e)return;const n=k(t.catalog),o=e.url||Y(t.baseUrl),i=U(r);null!==i&&T(i)&&D(r).join(",")===n.join(",")&&s(I())[E]===n.join(",")&&null===R()||B(e.apiKey,o,n)},getConfig(){try{return N()}catch(t){return l.logError("antigravityAdapter.getConfig",t),null}},applyNotes(){const t=[];if(J&&J.length>0){const r=J.map(O);t.push({kind:"summary",text:o.t("tools.agy.menu_written",{count:String(r.length),list:r.join(o.t("tools.grok.list_separator")),default:r[0]})})}return null===W||0===d(G).length||t.push({kind:"action",text:o.t("tools.agy.open_new_terminal")}),t},backupPaths:()=>[P(),b(),I()],forceResetPaths:()=>[I()]};
package/dist/models.json CHANGED
@@ -287,6 +287,7 @@
287
287
  "agy": {
288
288
  "gatewayModels": [
289
289
  "gemini-4-argon",
290
+ "gemini-4-carbon-medium",
290
291
  "gemini-3.8-flash",
291
292
  "gemini-3.7-flash",
292
293
  "gemini-3.6-flash",
package/models.json CHANGED
@@ -287,6 +287,7 @@
287
287
  "agy": {
288
288
  "gatewayModels": [
289
289
  "gemini-4-argon",
290
+ "gemini-4-carbon-medium",
290
291
  "gemini-3.8-flash",
291
292
  "gemini-3.7-flash",
292
293
  "gemini-3.6-flash",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caishenai/cli",
3
- "version": "0.0.172",
3
+ "version": "0.0.173",
4
4
  "description": "Configure Claude Code, Codex, Grok Build and other coding tools for 财神 AI with one command",
5
5
  "main": "dist/index.js",
6
6
  "bin": {