@marsapi/cli 0.0.166 → 0.0.167

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,5 +1,89 @@
1
1
  {
2
2
  "announcements": [],
3
+ "cli_client": {
4
+ "agy_models": [
5
+ "gemini-4-argon",
6
+ "gemini-3.8-flash",
7
+ "gemini-3.7-flash",
8
+ "gemini-3.6-flash",
9
+ "gemini-3.1-pro-preview"
10
+ ],
11
+ "default_models": {
12
+ "haiku": "claude-haiku-4-5-20251001",
13
+ "opus": "claude-opus-5-5[1m]",
14
+ "reasoning": "claude-opus-5-5[1m]",
15
+ "sonnet": "claude-sonnet-5[1m]"
16
+ },
17
+ "one_million_fallback": [
18
+ "claude-opus-4-8",
19
+ "claude-opus-4-7",
20
+ "claude-opus-4-6",
21
+ "claude-opus-5",
22
+ "claude-opus-5-5",
23
+ "claude-sonnet-5",
24
+ "claude-sonnet-5-5",
25
+ "claude-haiku-5-5",
26
+ "claude-fable-5",
27
+ "claude-fable-5-1"
28
+ ],
29
+ "retired_default_models": {
30
+ "opus": [
31
+ "claude-opus-4-6",
32
+ "claude-opus-4-8[1m]"
33
+ ],
34
+ "reasoning": [
35
+ "claude-opus-4-6",
36
+ "claude-opus-4-8[1m]"
37
+ ],
38
+ "sonnet": [
39
+ "claude-sonnet-4-6"
40
+ ]
41
+ },
42
+ "retired_models": [
43
+ "deepseek-v4-flash",
44
+ "glm-5.2",
45
+ "qwen3.7-max",
46
+ "qwen3.7-plus"
47
+ ],
48
+ "tier_chains": {
49
+ "fable": [
50
+ "claude-fable-5-1",
51
+ "claude-fable-5",
52
+ "claude-opus-5-5",
53
+ "claude-opus-5",
54
+ "claude-opus-4-8"
55
+ ],
56
+ "haiku": [
57
+ "claude-haiku-4-5-20251001"
58
+ ],
59
+ "opus": [
60
+ "claude-opus-5-5",
61
+ "claude-opus-5",
62
+ "claude-opus-4-8",
63
+ "claude-opus-4-7",
64
+ "claude-opus-4-6"
65
+ ],
66
+ "sonnet": [
67
+ "claude-sonnet-5",
68
+ "claude-sonnet-4-6"
69
+ ]
70
+ },
71
+ "tool_defaults": {
72
+ "atomcode": "gpt-6.1-sol",
73
+ "claude-code": "",
74
+ "codex": "gpt-6-astra",
75
+ "grok": "grok-4.6",
76
+ "hermes": "gpt-6.1-sol",
77
+ "openclaw": "gpt-6.1-sol",
78
+ "opencode": "gpt-6.1-sol"
79
+ },
80
+ "tool_min_versions": {
81
+ "agy": "1.3.5",
82
+ "claude-code": "2.1.291",
83
+ "claude-desktop": "2.2553.0",
84
+ "codex": "0.122.0"
85
+ }
86
+ },
3
87
  "defaults": {
4
88
  "language": "zh-CN",
5
89
  "permission_mode": "full_auto"
@@ -2076,89 +2160,5 @@
2076
2160
  "min_version": ""
2077
2161
  }
2078
2162
  },
2079
- "upgrade_message": "",
2080
- "vibecli": {
2081
- "agy_models": [
2082
- "gemini-4-argon",
2083
- "gemini-3.8-flash",
2084
- "gemini-3.7-flash",
2085
- "gemini-3.6-flash",
2086
- "gemini-3.1-pro-preview"
2087
- ],
2088
- "default_models": {
2089
- "haiku": "claude-haiku-4-5-20251001",
2090
- "opus": "claude-opus-5-5[1m]",
2091
- "reasoning": "claude-opus-5-5[1m]",
2092
- "sonnet": "claude-sonnet-5[1m]"
2093
- },
2094
- "one_million_fallback": [
2095
- "claude-opus-4-8",
2096
- "claude-opus-4-7",
2097
- "claude-opus-4-6",
2098
- "claude-opus-5",
2099
- "claude-opus-5-5",
2100
- "claude-sonnet-5",
2101
- "claude-sonnet-5-5",
2102
- "claude-haiku-5-5",
2103
- "claude-fable-5",
2104
- "claude-fable-5-1"
2105
- ],
2106
- "retired_default_models": {
2107
- "opus": [
2108
- "claude-opus-4-6",
2109
- "claude-opus-4-8[1m]"
2110
- ],
2111
- "reasoning": [
2112
- "claude-opus-4-6",
2113
- "claude-opus-4-8[1m]"
2114
- ],
2115
- "sonnet": [
2116
- "claude-sonnet-4-6"
2117
- ]
2118
- },
2119
- "retired_models": [
2120
- "deepseek-v4-flash",
2121
- "glm-5.2",
2122
- "qwen3.7-max",
2123
- "qwen3.7-plus"
2124
- ],
2125
- "tier_chains": {
2126
- "fable": [
2127
- "claude-fable-5-1",
2128
- "claude-fable-5",
2129
- "claude-opus-5-5",
2130
- "claude-opus-5",
2131
- "claude-opus-4-8"
2132
- ],
2133
- "haiku": [
2134
- "claude-haiku-4-5-20251001"
2135
- ],
2136
- "opus": [
2137
- "claude-opus-5-5",
2138
- "claude-opus-5",
2139
- "claude-opus-4-8",
2140
- "claude-opus-4-7",
2141
- "claude-opus-4-6"
2142
- ],
2143
- "sonnet": [
2144
- "claude-sonnet-5",
2145
- "claude-sonnet-4-6"
2146
- ]
2147
- },
2148
- "tool_defaults": {
2149
- "atomcode": "gpt-6.1-sol",
2150
- "claude-code": "",
2151
- "codex": "gpt-6-astra",
2152
- "grok": "grok-4.6",
2153
- "hermes": "gpt-6.1-sol",
2154
- "openclaw": "gpt-6.1-sol",
2155
- "opencode": "gpt-6.1-sol"
2156
- },
2157
- "tool_min_versions": {
2158
- "agy": "1.3.5",
2159
- "claude-code": "2.1.291",
2160
- "claude-desktop": "2.2553.0",
2161
- "codex": "0.122.0"
2162
- }
2163
- }
2163
+ "upgrade_message": ""
2164
2164
  }
@@ -1,5 +1,89 @@
1
1
  {
2
2
  "announcements": [],
3
+ "cli_client": {
4
+ "agy_models": [
5
+ "gemini-4-argon",
6
+ "gemini-3.8-flash",
7
+ "gemini-3.7-flash",
8
+ "gemini-3.6-flash",
9
+ "gemini-3.1-pro-preview"
10
+ ],
11
+ "default_models": {
12
+ "haiku": "claude-haiku-4-5-20251001",
13
+ "opus": "claude-opus-5-5[1m]",
14
+ "reasoning": "claude-opus-5-5[1m]",
15
+ "sonnet": "claude-sonnet-5[1m]"
16
+ },
17
+ "one_million_fallback": [
18
+ "claude-opus-4-8",
19
+ "claude-opus-4-7",
20
+ "claude-opus-4-6",
21
+ "claude-opus-5",
22
+ "claude-opus-5-5",
23
+ "claude-sonnet-5",
24
+ "claude-sonnet-5-5",
25
+ "claude-haiku-5-5",
26
+ "claude-fable-5",
27
+ "claude-fable-5-1"
28
+ ],
29
+ "retired_default_models": {
30
+ "opus": [
31
+ "claude-opus-4-6",
32
+ "claude-opus-4-8[1m]"
33
+ ],
34
+ "reasoning": [
35
+ "claude-opus-4-6",
36
+ "claude-opus-4-8[1m]"
37
+ ],
38
+ "sonnet": [
39
+ "claude-sonnet-4-6"
40
+ ]
41
+ },
42
+ "retired_models": [
43
+ "deepseek-v4-flash",
44
+ "glm-5.2",
45
+ "qwen3.7-max",
46
+ "qwen3.7-plus"
47
+ ],
48
+ "tier_chains": {
49
+ "fable": [
50
+ "claude-fable-5-1",
51
+ "claude-fable-5",
52
+ "claude-opus-5-5",
53
+ "claude-opus-5",
54
+ "claude-opus-4-8"
55
+ ],
56
+ "haiku": [
57
+ "claude-haiku-4-5-20251001"
58
+ ],
59
+ "opus": [
60
+ "claude-opus-5-5",
61
+ "claude-opus-5",
62
+ "claude-opus-4-8",
63
+ "claude-opus-4-7",
64
+ "claude-opus-4-6"
65
+ ],
66
+ "sonnet": [
67
+ "claude-sonnet-5",
68
+ "claude-sonnet-4-6"
69
+ ]
70
+ },
71
+ "tool_defaults": {
72
+ "atomcode": "gpt-6.1-sol",
73
+ "claude-code": "",
74
+ "codex": "gpt-6-astra",
75
+ "grok": "grok-4.6",
76
+ "hermes": "gpt-6.1-sol",
77
+ "openclaw": "gpt-6.1-sol",
78
+ "opencode": "gpt-6.1-sol"
79
+ },
80
+ "tool_min_versions": {
81
+ "agy": "1.3.5",
82
+ "claude-code": "2.1.291",
83
+ "claude-desktop": "2.2553.0",
84
+ "codex": "0.122.0"
85
+ }
86
+ },
3
87
  "defaults": {
4
88
  "language": "zh-CN",
5
89
  "permission_mode": "full_auto"
@@ -2076,89 +2160,5 @@
2076
2160
  "min_version": ""
2077
2161
  }
2078
2162
  },
2079
- "upgrade_message": "",
2080
- "vibecli": {
2081
- "agy_models": [
2082
- "gemini-4-argon",
2083
- "gemini-3.8-flash",
2084
- "gemini-3.7-flash",
2085
- "gemini-3.6-flash",
2086
- "gemini-3.1-pro-preview"
2087
- ],
2088
- "default_models": {
2089
- "haiku": "claude-haiku-4-5-20251001",
2090
- "opus": "claude-opus-5-5[1m]",
2091
- "reasoning": "claude-opus-5-5[1m]",
2092
- "sonnet": "claude-sonnet-5[1m]"
2093
- },
2094
- "one_million_fallback": [
2095
- "claude-opus-4-8",
2096
- "claude-opus-4-7",
2097
- "claude-opus-4-6",
2098
- "claude-opus-5",
2099
- "claude-opus-5-5",
2100
- "claude-sonnet-5",
2101
- "claude-sonnet-5-5",
2102
- "claude-haiku-5-5",
2103
- "claude-fable-5",
2104
- "claude-fable-5-1"
2105
- ],
2106
- "retired_default_models": {
2107
- "opus": [
2108
- "claude-opus-4-6",
2109
- "claude-opus-4-8[1m]"
2110
- ],
2111
- "reasoning": [
2112
- "claude-opus-4-6",
2113
- "claude-opus-4-8[1m]"
2114
- ],
2115
- "sonnet": [
2116
- "claude-sonnet-4-6"
2117
- ]
2118
- },
2119
- "retired_models": [
2120
- "deepseek-v4-flash",
2121
- "glm-5.2",
2122
- "qwen3.7-max",
2123
- "qwen3.7-plus"
2124
- ],
2125
- "tier_chains": {
2126
- "fable": [
2127
- "claude-fable-5-1",
2128
- "claude-fable-5",
2129
- "claude-opus-5-5",
2130
- "claude-opus-5",
2131
- "claude-opus-4-8"
2132
- ],
2133
- "haiku": [
2134
- "claude-haiku-4-5-20251001"
2135
- ],
2136
- "opus": [
2137
- "claude-opus-5-5",
2138
- "claude-opus-5",
2139
- "claude-opus-4-8",
2140
- "claude-opus-4-7",
2141
- "claude-opus-4-6"
2142
- ],
2143
- "sonnet": [
2144
- "claude-sonnet-5",
2145
- "claude-sonnet-4-6"
2146
- ]
2147
- },
2148
- "tool_defaults": {
2149
- "atomcode": "gpt-6.1-sol",
2150
- "claude-code": "",
2151
- "codex": "gpt-6-astra",
2152
- "grok": "grok-4.6",
2153
- "hermes": "gpt-6.1-sol",
2154
- "openclaw": "gpt-6.1-sol",
2155
- "opencode": "gpt-6.1-sol"
2156
- },
2157
- "tool_min_versions": {
2158
- "agy": "1.3.5",
2159
- "claude-code": "2.1.291",
2160
- "claude-desktop": "2.2553.0",
2161
- "codex": "0.122.0"
2162
- }
2163
- }
2163
+ "upgrade_message": ""
2164
2164
  }
@@ -1 +1 @@
1
- export const CLIENT_CONFIG_PATH="/api/platform/vibecode/config";export const KEY_INFO_PATH="/api/platform/vibecode/key";export const CLIENT_SECTION="vibecli";export const MIN_CLIENT_VERSION="min_vibecli_version";export const INSTALL_ID_HEADER="X-VibeCLI-Install-Id";
1
+ import{brand as t}from"./brand.js";export const NEUTRAL_GATEWAY_PROTOCOL={clientConfigPath:"/api/platform/cli/config",keyInfoPath:"/api/platform/cli/key",telemetryPath:"/api/platform/cli/telemetry",reportPath:"/api/platform/cli/report",clientSection:"cli_client",minClientVersion:"min_cli_version",installIdHeader:"X-CLI-Install-Id"};const e={...NEUTRAL_GATEWAY_PROTOCOL,...t().gatewayProtocol};export const CLIENT_CONFIG_PATH=e.clientConfigPath;export const KEY_INFO_PATH=e.keyInfoPath;export const TELEMETRY_PATH=e.telemetryPath;export const REPORT_PATH=e.reportPath;export const CLIENT_SECTION=e.clientSection;export const MIN_CLIENT_VERSION=e.minClientVersion;export const INSTALL_ID_HEADER=e.installIdHeader;
@@ -1 +1 @@
1
- import{randomUUID as e}from"crypto";import{arch as t,homedir as r,release as o}from"os";import{brand as n,brandEnv as s,CLI_NAME as a}from"./brand.js";import{clientVersion as i,installId as c}from"./client-config.js";import{configManager as l}from"./config.js";import{gatewayAddresses as u}from"./gateway-addresses.js";import{INSTALL_ID_HEADER as p}from"./gateway-protocol.js";const d=e();let f="wizard",m=[];const g=new Set;let h=null,y=S;export function telemetryEnabled(){if(process.env.VITEST&&!w)return!1;const e=s("TELEMETRY")?.trim().toLowerCase();return!("0"===e||"false"===e||"off"===e)}let w=!1;export function setTelemetrySenderForTests(e){y=e??S,w=null!==e,m=[]}export function clientHeaders(){const e=`${a}/${i()} (${process.platform} ${o()}; ${t()}) node/${process.versions.node}`;return telemetryEnabled()?{"User-Agent":e,[p]:c()}:{"User-Agent":e}}export function installClientHeaders(){const e=globalThis.fetch;if(!e||e.gatewayHeaders)return;const t=(t,r)=>{try{const o=new URL("string"==typeof t||t instanceof URL?t.toString():t.url);if(new Set([l.getBaseUrl(),...u().map(e=>e.url)].map(e=>new URL(e).host)).has(o.host)){const o=new Headers(r?.headers??(t instanceof Request?t.headers:void 0));for(const[e,t]of Object.entries(clientHeaders()))o.has(e)||o.set(e,t);return e(t,{...r,headers:o})}}catch{}return e(t,r)};t.gatewayHeaders=!0,globalThis.fetch=t}export function telemetryPending(){return g.size>0}function T(){return{install_id:c(),cli_version:i(),brand:n().id,os:process.platform,os_release:o(),arch:t(),node_version:process.versions.node}}export function maskHome(e){const t=r();if(!t||t.length<2)return e;const o=new Set([t,t.replace(/\\/g,"/")]);let n=e;for(const e of o)n=n.split(e).join("~");return n}export function maskSecrets(e){return maskHome(e).replace(/(sk-[A-Za-z0-9_-]{2})[A-Za-z0-9_-]{8,}([A-Za-z0-9_-]{4})\b/g,"$1…$2").replace(/(Bearer\s+)[A-Za-z0-9._~+/=-]{8,}/gi,"$1…").replace(/(\b[a-z][a-z0-9+.-]*:\/\/)[^\s/@:]+(?::[^\s/@]*)?@/gi,"$1…@").replace(/\b((?:api[_-]?key|token|password|passwd|secret|auth)\s*[=:]\s*)("?)[^\s"&;,]{6,}\2/gi,"$1$2…$2")}export function setTelemetryCommand(e){f=e}export function track(e,t,r={}){if(!telemetryEnabled())return;const o=void 0===r.error?void 0:maskSecrets(r.error instanceof Error?r.error.message:String(r.error)).slice(0,2e3);m.push({ts:Date.now(),session:d,command:f,step:e,status:t,...void 0!==r.duration_ms?{duration_ms:Math.round(r.duration_ms)}:{},...o?{error:o}:{},...r.detail?{detail:r.detail}:{}}),"start"===t?b():h||(h=setTimeout(b,500),h.unref())}export async function trackStep(e,t,r){const o=Date.now();track(e,"start",r?{detail:r}:{});try{const r=await t();return track(e,"ok",{duration_ms:Date.now()-o}),r}catch(t){throw track(e,"fail",{duration_ms:Date.now()-o,error:t}),t}}function b(){if(h&&(clearTimeout(h),h=null),0===m.length)return;const e=m.splice(0,50),t=y("/api/platform/vibecode/telemetry",{...T(),events:e},3e3).then(()=>{},()=>{}).finally(()=>g.delete(t));g.add(t),m.length>0&&b()}export async function flushTelemetry(e=1500){b(),0!==g.size&&await Promise.race([Promise.allSettled([...g]),new Promise(t=>setTimeout(t,e).unref())])}export async function uploadReport(e){try{const t=await y("/api/platform/vibecode/report",{...T(),report:e},2e4),r=t?.data?.code;return"string"==typeof r&&r?r:null}catch{return null}}async function S(e,t,r){const o=l.getApiKey()?.trim(),n=await fetch(new URL(e,l.getBaseUrl()).toString(),{method:"POST",headers:{"Content-Type":"application/json",...clientHeaders(),...o?{Authorization:`Bearer ${o}`}:{}},body:JSON.stringify(t),signal:AbortSignal.timeout(r)});if(!n.ok)throw new Error(`HTTP ${n.status}`);return n.json().catch(()=>null)}
1
+ import{randomUUID as e}from"crypto";import{arch as t,homedir as r,release as n}from"os";import{brand as o,brandEnv as s,CLI_NAME as a}from"./brand.js";import{clientVersion as i,installId as c}from"./client-config.js";import{configManager as l}from"./config.js";import{gatewayAddresses as u}from"./gateway-addresses.js";import{INSTALL_ID_HEADER as d,REPORT_PATH as f,TELEMETRY_PATH as p}from"./gateway-protocol.js";const m=e();let g="wizard",h=[];const w=new Set;let y=null,T=_;export function telemetryEnabled(){if(process.env.VITEST&&!S)return!1;const e=s("TELEMETRY")?.trim().toLowerCase();return!("0"===e||"false"===e||"off"===e)}let S=!1;export function setTelemetrySenderForTests(e){T=e??_,S=null!==e,h=[]}export function clientHeaders(){const e=`${a}/${i()} (${process.platform} ${n()}; ${t()}) node/${process.versions.node}`;return telemetryEnabled()?{"User-Agent":e,[d]:c()}:{"User-Agent":e}}export function installClientHeaders(){const e=globalThis.fetch;if(!e||e.gatewayHeaders)return;const t=(t,r)=>{try{const n=new URL("string"==typeof t||t instanceof URL?t.toString():t.url);if(new Set([l.getBaseUrl(),...u().map(e=>e.url)].map(e=>new URL(e).host)).has(n.host)){const n=new Headers(r?.headers??(t instanceof Request?t.headers:void 0));for(const[e,t]of Object.entries(clientHeaders()))n.has(e)||n.set(e,t);return e(t,{...r,headers:n})}}catch{}return e(t,r)};t.gatewayHeaders=!0,globalThis.fetch=t}export function telemetryPending(){return w.size>0}function $(){return{install_id:c(),cli_version:i(),brand:o().id,os:process.platform,os_release:n(),arch:t(),node_version:process.versions.node}}export function maskHome(e){const t=r();if(!t||t.length<2)return e;const n=new Set([t,t.replace(/\\/g,"/")]);let o=e;for(const e of n)o=o.split(e).join("~");return o}export function maskSecrets(e){return maskHome(e).replace(/(sk-[A-Za-z0-9_-]{2})[A-Za-z0-9_-]{8,}([A-Za-z0-9_-]{4})\b/g,"$1…$2").replace(/(Bearer\s+)[A-Za-z0-9._~+/=-]{8,}/gi,"$1…").replace(/(\b[a-z][a-z0-9+.-]*:\/\/)[^\s/@:]+(?::[^\s/@]*)?@/gi,"$1…@").replace(/\b((?:api[_-]?key|token|password|passwd|secret|auth)\s*[=:]\s*)("?)[^\s"&;,]{6,}\2/gi,"$1$2…$2")}export function setTelemetryCommand(e){g=e}export function track(e,t,r={}){if(!telemetryEnabled())return;const n=void 0===r.error?void 0:maskSecrets(r.error instanceof Error?r.error.message:String(r.error)).slice(0,2e3);h.push({ts:Date.now(),session:m,command:g,step:e,status:t,...void 0!==r.duration_ms?{duration_ms:Math.round(r.duration_ms)}:{},...n?{error:n}:{},...r.detail?{detail:r.detail}:{}}),"start"===t?k():y||(y=setTimeout(k,500),y.unref())}export async function trackStep(e,t,r){const n=Date.now();track(e,"start",r?{detail:r}:{});try{const r=await t();return track(e,"ok",{duration_ms:Date.now()-n}),r}catch(t){throw track(e,"fail",{duration_ms:Date.now()-n,error:t}),t}}function k(){if(y&&(clearTimeout(y),y=null),0===h.length)return;const e=h.splice(0,50),t=T(p,{...$(),events:e},3e3).then(()=>{},()=>{}).finally(()=>w.delete(t));w.add(t),h.length>0&&k()}export async function flushTelemetry(e=1500){k(),0!==w.size&&await Promise.race([Promise.allSettled([...w]),new Promise(t=>setTimeout(t,e).unref())])}export async function uploadReport(e){try{const t=await T(f,{...$(),report:e},2e4),r=t?.data?.code;return"string"==typeof r&&r?r:null}catch{return null}}async function _(e,t,r){const n=l.getApiKey()?.trim(),o=await fetch(new URL(e,l.getBaseUrl()).toString(),{method:"POST",headers:{"Content-Type":"application/json",...clientHeaders(),...n?{Authorization:`Bearer ${n}`}:{}},body:JSON.stringify(t),signal:AbortSignal.timeout(r)});if(!o.ok)throw new Error(`HTTP ${o.status}`);return o.json().catch(()=>null)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marsapi/cli",
3
- "version": "0.0.166",
3
+ "version": "0.0.167",
4
4
  "description": "Configure Claude Code, Codex, Grok Build and other coding tools for Mars AI with one command",
5
5
  "main": "dist/index.js",
6
6
  "bin": {