makecoder 4.0.74 → 4.0.76
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.
- package/dist/cc.mjs +2 -2
- package/dist/coder.js +1 -1
- package/dist/darwin-arm64/cc.js +2 -2
- package/dist/darwin-x64/cc.js +2 -2
- package/dist/linux-x64/cc.js +2 -2
- package/dist/win32-x64/cc.js +2 -2
- package/package.json +4 -4
- package/scripts/postinstall.js +10 -30
- package/dist/darwin-x64/bfs +0 -0
- package/dist/darwin-x64/rg +0 -0
- package/dist/darwin-x64/ugrep +0 -0
- package/dist/linux-arm64/rg +0 -0
package/dist/cc.mjs
CHANGED
|
@@ -20,13 +20,13 @@ import{createRequire as vP5}from"node:module";var MP5=Object.create;var{getProto
|
|
|
20
20
|
Object.assign(A, {
|
|
21
21
|
post(...args) {
|
|
22
22
|
const [url, payload, ...remainArgs] = args;
|
|
23
|
-
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.
|
|
23
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.76' + '&session_id=' + I8() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
|
|
24
24
|
if (process.env.CODER_APIKEY) {
|
|
25
25
|
const headerValues = payload.headers.values;
|
|
26
26
|
headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
payload.headers.values.set('X-Coder-Version', '4.0.
|
|
29
|
+
payload.headers.values.set('X-Coder-Version', '4.0.76');
|
|
30
30
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
31
31
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
32
32
|
|
package/dist/coder.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var st=Object.create;var ge=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var ct=Object.getPrototypeOf,lt=Object.prototype.hasOwnProperty;var _=(c,e)=>()=>(e||c((e={exports:{}}).exports,e),e.exports);var dt=(c,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of at(e))!lt.call(c,r)&&r!==t&&ge(c,r,{get:()=>e[r],enumerable:!(o=it(e,r))||o.enumerable});return c};var ut=(c,e,t)=>(t=c!=null?st(ct(c)):{},dt(e||!c||!c.__esModule?ge(t,"default",{value:c,enumerable:!0}):t,c));var j=_((io,mt)=>{mt.exports={name:"makecoder",version:"4.0.
|
|
2
|
+
var st=Object.create;var ge=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var ct=Object.getPrototypeOf,lt=Object.prototype.hasOwnProperty;var _=(c,e)=>()=>(e||c((e={exports:{}}).exports,e),e.exports);var dt=(c,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of at(e))!lt.call(c,r)&&r!==t&&ge(c,r,{get:()=>e[r],enumerable:!(o=it(e,r))||o.enumerable});return c};var ut=(c,e,t)=>(t=c!=null?st(ct(c)):{},dt(e||!c||!c.__esModule?ge(t,"default",{value:c,enumerable:!0}):t,c));var j=_((io,mt)=>{mt.exports={name:"makecoder",version:"4.0.76",description:"MakeCoder: Unified AI agent CLI tool integrating Claude Code, Codex and Gemini CLI",main:"./dist/coder.js",bin:{coder:"./dist/coder.js"},scripts:{test:'echo "Error: no test specified" && exit 1',start:"node ./src/coder.js",build:"node scripts/build.js","build:clean":"node scripts/build.js --clean","build:dev":"node scripts/build.js --no-minify --sourcemap",postinstall:"node scripts/postinstall.js"},keywords:["cli","ai","claude","gemini","codex","agent"],author:"makecoder",license:"MIT",repository:{type:"git",url:"https://github.com/makecoderai/coder.git"},homepage:"https://github.com/makecoderai/coder",dependencies:{bun:">=1.3.12","node-fetch":"^3.3.2",open:"^10.1.0",zod:"^3.25.76"},engines:{node:">=20.0.0"},devDependencies:{chokidar:"^4.0.3"},files:["dist","scripts/postinstall.js"]}});var we=_((ao,Ie)=>{var A=require("fs"),ye=require("path"),pt=require("os"),ft=new Set(["auth","skills","wiki","team"]),be=new Set(["claude","gemini","codex"]),ht=new Set(["pub","auth","update","skills","wiki","team"]),z=class{constructor(){let e=process.env.CODER_PROFILE,t=e?`.coder.${e}`:".coder";this.configPath=ye.join(pt.homedir(),t,"config.json"),this.defaultConfig={agent:"claude",auth:{apikey:null}}}loadConfig(){let e=ye.dirname(this.configPath);try{return A.existsSync(e)||A.mkdirSync(e,{recursive:!0}),A.existsSync(this.configPath)||A.writeFileSync(this.configPath,JSON.stringify(this.defaultConfig,null,2)),JSON.parse(A.readFileSync(this.configPath,"utf8"))}catch{return{...this.defaultConfig}}}getApiKeyFromConfig(e){return e.auth?.apikey?e.auth.apikey:e.auth?.ak&&e.auth?.sk?`${e.auth.ak}.${e.auth.sk}`:null}saveAuthToConfig(e){let t=this.loadConfig();t.auth={apikey:e};try{return A.writeFileSync(this.configPath,JSON.stringify(t,null,2)),!0}catch{return!1}}clearAuthFromConfig(){let e=this.loadConfig();e.auth={apikey:null};try{return A.writeFileSync(this.configPath,JSON.stringify(e,null,2)),!0}catch{return!1}}getTeam(){return this.loadConfig().team||null}setTeam(e,t){let o=this.loadConfig();e==null?delete o.team:o.team={id:e,name:t||""};try{return A.writeFileSync(this.configPath,JSON.stringify(o,null,2)),!0}catch{return!1}}getTeamManual(){return!!this.loadConfig().team_manual}setTeamManual(e){let t=this.loadConfig();e?t.team_manual=!0:delete t.team_manual;try{return A.writeFileSync(this.configPath,JSON.stringify(t,null,2)),!0}catch{return!1}}async parse(e=process.argv.slice(2)){let t=this.loadConfig(),o={agent:t.agent||"claude",remainingArgs:[]},r=0;if(e.length>0){if(be.has(e[0]))o.agent=e[0],o.agentSetBySubcommand=!0,r=1;else if(ht.has(e[0])){if(o.command=e[0],r=1,e[0]==="auth"){let n=e[1];n==="--help"||n==="-h"?o.authSubcommand="--help":(o.authSubcommand=n,o.authRemainingArgs=e.slice(2)),r=e.length}else if(e[0]==="skills"){let n=e[1];o.skillsSubcommand=n==="--help"||n==="-h"?void 0:n,o.skillsArg=e[2],o.skillsRemainingArgs=e.slice(2),r=e.length}else if(e[0]==="wiki"){let n=e[1];o.wikiSubcommand=n==="--help"||n==="-h"?void 0:n,o.wikiArg=e[2],o.wikiRemainingArgs=e.slice(2),r=e.length}else if(e[0]==="team"){let n=e[1];o.teamSubcommand=n==="--help"||n==="-h"?void 0:n,o.teamArg=e[2],o.teamRemainingArgs=e.slice(2),r=e.length}}}for(;r<e.length;){let n=e[r];if(n==="--agent"){if(o.agentSetBySubcommand)throw new Error(`\u4E0D\u80FD\u540C\u65F6\u4F7F\u7528\u5B50\u547D\u4EE4 '${o.agent}' \u548C --agent\uFF0C\u8BF7\u9009\u62E9\u5176\u4E00`);let i=e[r+1];if(!i||!be.has(i))throw new Error("--agent \u9700\u8981\u6307\u5B9A\u4EE3\u7406\u7C7B\u578B\uFF08claude|gemini|codex\uFF09");o.agent=i,r+=2}else if(n==="--apikey"){let i=e[r+1];if(!i||i.startsWith("--"))throw new Error("--apikey \u9700\u8981\u63D0\u4F9B API Key \u503C");if(i.indexOf(".")===-1)throw new Error("API Key \u683C\u5F0F\u9519\u8BEF\uFF0C\u5E94\u4E3A <ak>.<sk>");o.apikey=i,r+=2}else if(n==="--name"){let i=e[r+1];i&&!i.startsWith("--")?(o.pubName=i,r+=2):r+=1}else if(n==="--allow-clone")o.allowClone=!0,r+=1;else if(n==="--meta-data"){let i=e[r+1];if(!i||i.startsWith("--"))throw new Error("--meta-data \u9700\u8981\u4E00\u4E2A JSON \u5B57\u7B26\u4E32\u503C");try{JSON.parse(i)}catch(a){throw new Error(`--meta-data \u4E0D\u662F\u5408\u6CD5\u7684 JSON\uFF1A${a.message}`)}o.pubMetaData=i,r+=2}else{o.remainingArgs=e.slice(r);break}}if(o.command!=="auth"&&!o.apikey){let n=this.getApiKeyFromConfig(t);o.apikey=n||process.env.CODER_APIKEY||null}o.codevServer=process.env.CODEV_SERVER||t.codevServer||"https://makecoder.com/bigapis/codev/v1";let s=o.remainingArgs.includes("--version")||o.remainingArgs.includes("-v")||o.remainingArgs.includes("--help")||o.remainingArgs.includes("-h");return!ft.has(o.command)&&!s&&!o.apikey&&await this._oauthLogin(o),o}async _oauthLogin(e){console.log(`\u274C \u5C1A\u672A\u767B\u5F55
|
|
3
3
|
`),console.log("\u8BF7\u5148\u767B\u5F55:"),console.log(` coder auth login
|
|
4
4
|
`),console.log("\u6216\u76F4\u63A5\u63D0\u4F9B API Key:"),console.log(` coder auth login --apikey <your-api-key>
|
|
5
5
|
`),console.log(`\u83B7\u53D6 API Key: https://makecoder.com/my/apikeys
|
package/dist/darwin-arm64/cc.js
CHANGED
|
@@ -23,13 +23,13 @@ var PP4=Object.create;var{getPrototypeOf:WP4,defineProperty:_2H,getOwnPropertyNa
|
|
|
23
23
|
Object.assign(A, {
|
|
24
24
|
post(...args) {
|
|
25
25
|
const [url, payload, ...remainArgs] = args;
|
|
26
|
-
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.76' + '&session_id=' + S_() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
|
|
27
27
|
if (process.env.CODER_APIKEY) {
|
|
28
28
|
const headerValues = payload.headers.values;
|
|
29
29
|
headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
payload.headers.values.set('X-Coder-Version', '4.0.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.0.76');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
package/dist/darwin-x64/cc.js
CHANGED
|
@@ -23,13 +23,13 @@ var WPK=Object.create;var{getPrototypeOf:GPK,defineProperty:_2H,getOwnPropertyNa
|
|
|
23
23
|
Object.assign(A, {
|
|
24
24
|
post(...args) {
|
|
25
25
|
const [url, payload, ...remainArgs] = args;
|
|
26
|
-
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.76' + '&session_id=' + S6() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
|
|
27
27
|
if (process.env.CODER_APIKEY) {
|
|
28
28
|
const headerValues = payload.headers.values;
|
|
29
29
|
headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
payload.headers.values.set('X-Coder-Version', '4.0.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.0.76');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
package/dist/linux-x64/cc.js
CHANGED
|
@@ -23,13 +23,13 @@ var MP9=Object.create;var{getPrototypeOf:jP9,defineProperty:qWH,getOwnPropertyNa
|
|
|
23
23
|
Object.assign(A, {
|
|
24
24
|
post(...args) {
|
|
25
25
|
const [url, payload, ...remainArgs] = args;
|
|
26
|
-
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.76' + '&session_id=' + R$() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
|
|
27
27
|
if (process.env.CODER_APIKEY) {
|
|
28
28
|
const headerValues = payload.headers.values;
|
|
29
29
|
headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
payload.headers.values.set('X-Coder-Version', '4.0.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.0.76');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
package/dist/win32-x64/cc.js
CHANGED
|
@@ -23,13 +23,13 @@ var PJ_=Object.create;var{getPrototypeOf:WJ_,defineProperty:K2H,getOwnPropertyNa
|
|
|
23
23
|
Object.assign(A, {
|
|
24
24
|
post(...args) {
|
|
25
25
|
const [url, payload, ...remainArgs] = args;
|
|
26
|
-
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.76' + '&session_id=' + R8() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
|
|
27
27
|
if (process.env.CODER_APIKEY) {
|
|
28
28
|
const headerValues = payload.headers.values;
|
|
29
29
|
headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
payload.headers.values.set('X-Coder-Version', '4.0.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.0.76');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "makecoder",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.76",
|
|
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": {
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"scripts/postinstall.js"
|
|
47
47
|
],
|
|
48
48
|
"optionalDependencies": {
|
|
49
|
-
"makecoder-codex-darwin-arm64": "4.0.
|
|
50
|
-
"makecoder-codex-linux-x64": "4.0.
|
|
51
|
-
"makecoder-codex-win32-x64": "4.0.
|
|
49
|
+
"makecoder-codex-darwin-arm64": "4.0.76",
|
|
50
|
+
"makecoder-codex-linux-x64": "4.0.76",
|
|
51
|
+
"makecoder-codex-win32-x64": "4.0.76"
|
|
52
52
|
}
|
|
53
53
|
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -45,37 +45,17 @@ function npmCmd() {
|
|
|
45
45
|
return process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
'win32-x64': 'makecoder-codex-win32-x64',
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
// Search-tool binaries bundled with coder. rg is always present; ugrep/bfs
|
|
55
|
-
// only on some platforms. Order is irrelevant — each is resolved independently.
|
|
48
|
+
// Search-tool binaries shipped under dist/<platform>/ (populated at build time
|
|
49
|
+
// by `make fetch_tools`, which pulls them from the coder-tools Artifactory).
|
|
50
|
+
// rg is always present; ugrep/bfs only on some platforms.
|
|
56
51
|
const SEARCH_TOOLS = ['rg', 'ugrep', 'bfs'];
|
|
57
52
|
|
|
58
|
-
// Resolve a
|
|
59
|
-
// 1. the per-platform codex sub-package (makecoder-codex-*) bin/
|
|
60
|
-
// 2. dist/{platform}-{arch}/ fallback (darwin-x64, linux-arm64)
|
|
53
|
+
// Resolve a bundled tool binary from dist/<platform>/<tool>[.exe].
|
|
61
54
|
function resolveToolSource(tool) {
|
|
62
55
|
const platformKey = `${process.platform}-${process.arch}`;
|
|
63
56
|
const binName = process.platform === 'win32' ? `${tool}.exe` : tool;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (codexPkg) {
|
|
67
|
-
try {
|
|
68
|
-
const pkgJson = require.resolve(`${codexPkg}/package.json`, {
|
|
69
|
-
paths: [path.join(__dirname, '..')],
|
|
70
|
-
});
|
|
71
|
-
const candidate = path.join(path.dirname(pkgJson), 'bin', binName);
|
|
72
|
-
if (fs.existsSync(candidate)) return { src: candidate, binName };
|
|
73
|
-
} catch {}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const distCandidate = path.join(__dirname, '..', 'dist', platformKey, binName);
|
|
77
|
-
if (fs.existsSync(distCandidate)) return { src: distCandidate, binName };
|
|
78
|
-
|
|
57
|
+
const candidate = path.join(__dirname, '..', 'dist', platformKey, binName);
|
|
58
|
+
if (fs.existsSync(candidate)) return { src: candidate, binName };
|
|
79
59
|
return null;
|
|
80
60
|
}
|
|
81
61
|
|
|
@@ -90,8 +70,9 @@ function globalBinDir() {
|
|
|
90
70
|
}
|
|
91
71
|
|
|
92
72
|
// Place a native tool next to the `coder` bin so it resolves on PATH for codex,
|
|
93
|
-
// the terminal, and any other agent that shells out to it
|
|
94
|
-
// Code
|
|
73
|
+
// the terminal, and any other agent that shells out to it. The patched Claude
|
|
74
|
+
// Code find/grep wrappers also rely on rg/ugrep/bfs being on PATH. Best-effort:
|
|
75
|
+
// failure is non-fatal (tools just won't be on PATH).
|
|
95
76
|
function linkTool(tool) {
|
|
96
77
|
const resolved = resolveToolSource(tool);
|
|
97
78
|
if (!resolved) {
|
|
@@ -119,8 +100,7 @@ function linkTool(tool) {
|
|
|
119
100
|
console.log(`${tool} linked to ${target}`);
|
|
120
101
|
} catch (error) {
|
|
121
102
|
// Windows without symlink privilege, or a global bin dir we can't write
|
|
122
|
-
// to. Try a copy, then give up quietly
|
|
123
|
-
// coder's internal redirect, this only affects direct use on PATH.
|
|
103
|
+
// to. Try a copy, then give up quietly.
|
|
124
104
|
try {
|
|
125
105
|
fs.copyFileSync(resolved.src, target);
|
|
126
106
|
if (process.platform !== 'win32') fs.chmodSync(target, 0o755);
|
package/dist/darwin-x64/bfs
DELETED
|
Binary file
|
package/dist/darwin-x64/rg
DELETED
|
Binary file
|
package/dist/darwin-x64/ugrep
DELETED
|
Binary file
|
package/dist/linux-arm64/rg
DELETED
|
Binary file
|