@xship/cli 0.0.187 → 0.0.188
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.
|
@@ -103,9 +103,9 @@
|
|
|
103
103
|
"groups": [
|
|
104
104
|
"Claude 官方特供版"
|
|
105
105
|
],
|
|
106
|
-
"hint": "支持 Fable,完美缓存,只能在 Claude Code、IDE 官方插件和桌面端中使用",
|
|
106
|
+
"hint": "其他模型照常能用;Claude 支持 Fable,完美缓存,只能在 Claude Code、IDE 官方插件和桌面端中使用",
|
|
107
107
|
"id": "claude-special",
|
|
108
|
-
"label": "
|
|
108
|
+
"label": "Claude 用官方版"
|
|
109
109
|
}
|
|
110
110
|
]
|
|
111
111
|
},
|
|
@@ -2206,6 +2206,47 @@
|
|
|
2206
2206
|
"name": "Gemini 4 Carbon",
|
|
2207
2207
|
"recommended": false
|
|
2208
2208
|
},
|
|
2209
|
+
{
|
|
2210
|
+
"capabilities": {
|
|
2211
|
+
"contextWindowTokens": 1048576,
|
|
2212
|
+
"functionCall": true,
|
|
2213
|
+
"imageOutput": false,
|
|
2214
|
+
"inputModalities": [
|
|
2215
|
+
"text",
|
|
2216
|
+
"image",
|
|
2217
|
+
"video",
|
|
2218
|
+
"audio"
|
|
2219
|
+
],
|
|
2220
|
+
"knowledgeCutoff": "2026-03-31",
|
|
2221
|
+
"maxOutput": 65536,
|
|
2222
|
+
"outputModalities": [
|
|
2223
|
+
"text"
|
|
2224
|
+
],
|
|
2225
|
+
"reasoning": true,
|
|
2226
|
+
"reasoningEfforts": [
|
|
2227
|
+
"low",
|
|
2228
|
+
"medium",
|
|
2229
|
+
"high",
|
|
2230
|
+
"xhigh"
|
|
2231
|
+
],
|
|
2232
|
+
"structuredOutput": true,
|
|
2233
|
+
"video": true,
|
|
2234
|
+
"vision": true
|
|
2235
|
+
},
|
|
2236
|
+
"context_window": 1048576,
|
|
2237
|
+
"description": "100 万上下文 | 复杂编码 | Agent 任务",
|
|
2238
|
+
"endpoint_types": [
|
|
2239
|
+
"gemini",
|
|
2240
|
+
"openai"
|
|
2241
|
+
],
|
|
2242
|
+
"group": "",
|
|
2243
|
+
"group_name": "",
|
|
2244
|
+
"hidden": false,
|
|
2245
|
+
"id": "gemini-4-neon",
|
|
2246
|
+
"max_output_tokens": 65536,
|
|
2247
|
+
"name": "Gemini 4 Neon",
|
|
2248
|
+
"recommended": false
|
|
2249
|
+
},
|
|
2209
2250
|
{
|
|
2210
2251
|
"capabilities": {
|
|
2211
2252
|
"contextWindowTokens": 1048576,
|
|
@@ -2488,7 +2529,7 @@
|
|
|
2488
2529
|
"tool": "gemini"
|
|
2489
2530
|
}
|
|
2490
2531
|
],
|
|
2491
|
-
"revision": "2026-11-
|
|
2532
|
+
"revision": "2026-11-20T09:26:26Z-10",
|
|
2492
2533
|
"schema": 1,
|
|
2493
2534
|
"tools": {
|
|
2494
2535
|
"claude": {
|
|
@@ -103,9 +103,9 @@
|
|
|
103
103
|
"groups": [
|
|
104
104
|
"Claude 官方特供版"
|
|
105
105
|
],
|
|
106
|
-
"hint": "支持 Fable,完美缓存,只能在 Claude Code、IDE 官方插件和桌面端中使用",
|
|
106
|
+
"hint": "其他模型照常能用;Claude 支持 Fable,完美缓存,只能在 Claude Code、IDE 官方插件和桌面端中使用",
|
|
107
107
|
"id": "claude-special",
|
|
108
|
-
"label": "
|
|
108
|
+
"label": "Claude 用官方版"
|
|
109
109
|
}
|
|
110
110
|
]
|
|
111
111
|
},
|
|
@@ -2206,6 +2206,47 @@
|
|
|
2206
2206
|
"name": "Gemini 4 Carbon",
|
|
2207
2207
|
"recommended": false
|
|
2208
2208
|
},
|
|
2209
|
+
{
|
|
2210
|
+
"capabilities": {
|
|
2211
|
+
"contextWindowTokens": 1048576,
|
|
2212
|
+
"functionCall": true,
|
|
2213
|
+
"imageOutput": false,
|
|
2214
|
+
"inputModalities": [
|
|
2215
|
+
"text",
|
|
2216
|
+
"image",
|
|
2217
|
+
"video",
|
|
2218
|
+
"audio"
|
|
2219
|
+
],
|
|
2220
|
+
"knowledgeCutoff": "2026-03-31",
|
|
2221
|
+
"maxOutput": 65536,
|
|
2222
|
+
"outputModalities": [
|
|
2223
|
+
"text"
|
|
2224
|
+
],
|
|
2225
|
+
"reasoning": true,
|
|
2226
|
+
"reasoningEfforts": [
|
|
2227
|
+
"low",
|
|
2228
|
+
"medium",
|
|
2229
|
+
"high",
|
|
2230
|
+
"xhigh"
|
|
2231
|
+
],
|
|
2232
|
+
"structuredOutput": true,
|
|
2233
|
+
"video": true,
|
|
2234
|
+
"vision": true
|
|
2235
|
+
},
|
|
2236
|
+
"context_window": 1048576,
|
|
2237
|
+
"description": "100 万上下文 | 复杂编码 | Agent 任务",
|
|
2238
|
+
"endpoint_types": [
|
|
2239
|
+
"gemini",
|
|
2240
|
+
"openai"
|
|
2241
|
+
],
|
|
2242
|
+
"group": "",
|
|
2243
|
+
"group_name": "",
|
|
2244
|
+
"hidden": false,
|
|
2245
|
+
"id": "gemini-4-neon",
|
|
2246
|
+
"max_output_tokens": 65536,
|
|
2247
|
+
"name": "Gemini 4 Neon",
|
|
2248
|
+
"recommended": false
|
|
2249
|
+
},
|
|
2209
2250
|
{
|
|
2210
2251
|
"capabilities": {
|
|
2211
2252
|
"contextWindowTokens": 1048576,
|
|
@@ -2488,7 +2529,7 @@
|
|
|
2488
2529
|
"tool": "gemini"
|
|
2489
2530
|
}
|
|
2490
2531
|
],
|
|
2491
|
-
"revision": "2026-11-
|
|
2532
|
+
"revision": "2026-11-20T09:26:26Z-10",
|
|
2492
2533
|
"schema": 1,
|
|
2493
2534
|
"tools": {
|
|
2494
2535
|
"claude": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{chmodSync as t,existsSync as n,readFileSync as
|
|
1
|
+
import{chmodSync as t,existsSync as n,readFileSync as e,realpathSync as o,unlinkSync as r}from"fs";import{join as s}from"path";import{logger as i}from"../utils/logger.js";import{getShellRcFilePath as c}from"./env-cleanup.js";import{broadcastEnvChange as f,deleteWindowsEnv as p,readWindowsEnv as u,setUserEnv as l}from"./windows-env.js";import{atomicWriteFile as m,backupBeforeWrite as a}from"./tools/backup.js";import{toolHome as $}from"./tools/types.js";import{CLI_NAME as d}from"./brand.js";const h=t=>`# ${d}:${t}`;function v(){const t=$(),e=new Set,o=c();o&&e.add(o);for(const o of[".zshrc",".bashrc"]){const r=s(t,o);n(r)&&e.add(r)}return[...e]}function j(t,n,e){const o=`"${function(t){const n=$();return t.startsWith(n+"/")?`$HOME/${t.slice(n.length+1)}`:t}(n)}"`;return t.endsWith(".fish")?`test -f ${o}; and source ${o} ${h(e)}`:`[ -f ${o} ] && . ${o} ${h(e)}`}function E(t,e){const r=n(t)?o(t):t;a(r),m(r,e)}function w(t,n){return t.split("\n").filter(t=>!t.trimEnd().endsWith(h(n))).join("\n")}function b(t,n){if(/['\r\n]/.test(n))throw new Error(`${t} contains a quote or newline and cannot be written to a shell env file`)}export function writePersistentEnv(o,r,s){for(const[t,n]of Object.entries(s))b(t,n);const i=Object.entries(s).map(([t,n])=>`export ${t}='${n}'`).join("\n");a(r),m(r,`# Written by ${d}. Loaded from your shell profile.\n${i}\n`,384),t(r,384);for(const[t,n]of Object.entries(s))process.env[t]=n;if("win32"===process.platform){for(const[t,n]of Object.entries(s))l(t,n);return f(),{rcFiles:[]}}const c=[];for(const t of v()){const s=n(t)?e(t,"utf-8"):"",i=j(t,r,o);if(s.split("\n").some(t=>t.trimEnd()===i)){c.push(t);continue}const f=w(s,o).replace(/\n*$/,"");E(t,`${f?f+"\n\n":""}${i}\n`),c.push(t)}return{rcFiles:c}}export function removePersistentEnv(t,o,s){const c=readPersistentEnvFile(o);let l=!1;if("win32"===process.platform){let t=!1;for(const n of s)if(void 0!==c[n]&&u("user",n)===c[n])try{p("user",n),t=!0}catch(t){l=!0,i.logError("persistentEnv.remove",t)}t&&f()}else for(const o of v()){if(!n(o))continue;const r=e(o,"utf-8"),s=w(r,t);s!==r&&E(o,s)}!l&&n(o)&&(a(o),r(o))}export function persistentEnvApplied(t){return"win32"!==process.platform||Object.entries(readPersistentEnvFile(t)).every(([t,n])=>u("user",t)===n)}export function readPersistentEnvFile(t){const o={};if(!n(t))return o;for(const n of e(t,"utf-8").split("\n")){const t=n.match(/^export ([A-Z_][A-Z0-9_]*)='([^']*)'$/);t&&(o[t[1]]=t[2])}return o}
|
|
@@ -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{
|
|
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{persistentEnvApplied as s,readPersistentEnvFile as c,removePersistentEnv as u,writePersistentEnv as p}from"../persistent-env.js";import{backupBeforeWrite as m,atomicWriteFile as d}from"./backup.js";import{findInstalls as g,mirrorInstallCommand as y}from"./tool-installs.js";import{toolHome as f}from"./types.js";import{brand as h,PROVIDER_KEY as v}from"../brand.js";const A="agy",_="AGY_LLM_GATEWAY_URL",E="AGY_LLM_GATEWAY_API_KEY",j="AGY_LLM_GATEWAY_MODELS",w=["GEMINI_API_KEY","GOOGLE_GEMINI_BASE_URL"],K="gemini",b=()=>n(f(),".gemini","antigravity-cli"),I=()=>n(b(),"settings.json"),P=()=>n(b(),`${v}.env`),M=()=>n(f(),".antigravity","settings.json"),G=h().installMirror?.agy,L={command:"agy",native:{binDir:"win32"===process.platform?["AppData","Local","agy","bin"]:[".local","bin"],updateArgs:["update"],dataDirs:[]},...G?{mirrorScript:{sh:`${G}/install.sh`,ps1:`${G}/install.ps1`}}:{}};function $(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(!$(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(I(),"~/.gemini/antigravity-cli/settings.json"),S=()=>C(M(),"~/.antigravity/settings.json");function Y(r,e,n){m(r),d(r,JSON.stringify(e,null,2)+"\n",n),void 0!==n&&t(r,n)}function x(t){return(t||"").replace(/\/+$/,"").replace(/\/v1(beta)?$/,"")}const k=/-(minimal|low|medium|high|xhigh|max)$/;function O(t){const r=a().gatewayModels,e=t?r.filter(r=>t.models.includes(r)||t.models.includes(r.replace(k,""))):[];return e.length>0?e:r}function U(t){const r=t.replace(/-preview$/,""),e=k.exec(r)?.[1];return e?`${i(r.replace(k,""))} (${e[0].toUpperCase()}${e.slice(1)})`:i(r)}function D(t){const r=t.gateway;return $(r)&&!0===r.enabled&&"string"==typeof r.apiKey&&r.apiKey.trim()&&"string"==typeof r.url?{url:r.url,apiKey:r.apiKey}:null}function R(t){const r=t.models;return $(r)&&Array.isArray(r.list)?r.list.map(t=>$(t)&&"string"==typeof t.modelId?t.modelId:"").filter(Boolean):[]}function T(){try{if(N().modelProvider!==K)return null}catch{return null}const t=c(P()),r=t.GEMINI_API_KEY;return r&&r.trim()?{apiKey:r,url:t.GOOGLE_GEMINI_BASE_URL??""}:null}function B(t){const r=c(P());return r[_]===t.url&&r[E]===t.apiKey}function W(t,r,e){const n=N(),o=S();o.gateway={...$(o.gateway)?o.gateway:{},enabled:!0,url:r,apiKey:t,wireProtocol:"genai"},o.models={...$(o.models)?o.models:{},defaultModelId:e[0],list:e.map(t=>({modelId:t,displayName:U(t),supportsThinking:!0}))},Y(M(),o,384),w.some(t=>void 0!==c(P())[t])&&u(A,P(),w);const i=p(A,P(),{[_]:r,[E]:t,[j]:e.join(",")}).rcFiles;for(const t of w)delete process.env[t];return n.modelProvider===K&&(delete n.modelProvider,Y(I(),n)),i}let J=null,F=null;export const antigravityAdapter={name:"agy",displayName:"Antigravity CLI",command:"agy",installCommand:y(L),installSpec:L,configPath:M(),wantsModelCatalog:!0,loadPrivateConfig(t){N(),S();const r=O(t.catalog);J=W(t.apiKey,x(t.baseUrl),r),F=r},unloadPrivateConfig(){try{const t=S();D(t)&&(delete t.gateway,delete t.models,Y(M(),t,384))}catch(t){l.logError("antigravityAdapter.unloadPrivateConfig",t)}try{const t=N();t.modelProvider===K&&(delete t.modelProvider,Y(I(),t))}catch(t){l.logError("antigravityAdapter.unloadPrivateConfig",t)}u(A,P(),[_,E,j,...w])},detectCurrentConfig(){try{const t=D(S());if(t)return{apiKey:t.apiKey}}catch{return{apiKey:null}}return{apiKey:T()?.apiKey??null}},listedModels(){try{const t=S(),r=D(t);if(r)return B(r)?R(t):[]}catch{return null}return T()?[]:null},refreshModelMenu(t){const r=S(),e=D(r)??T();if(!e)return;const n=O(t.catalog),o=e.url||x(t.baseUrl),i=D(r);null!==i&&B(i)&&R(r).join(",")===n.join(",")&&c(P())[j]===n.join(",")&&s(P())&&null===T()||W(e.apiKey,o,n)},getConfig(){try{return S()}catch(t){return l.logError("antigravityAdapter.getConfig",t),null}},applyNotes(){const t=[];if(F&&F.length>0){const r=F.map(U);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===J||0===g(L).length||t.push({kind:"action",text:o.t("tools.agy.open_new_terminal")}),t},backupPaths:()=>[M(),I(),P()],forceResetPaths:()=>[P()]};
|
package/dist/models.json
CHANGED
package/models.json
CHANGED