makecoder 4.1.27 → 4.1.29
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/coder.js +212 -212
- package/dist/darwin-arm64/cc.js +30 -2
- package/dist/darwin-x64/cc.js +30 -2
- package/dist/linux-arm64/cc.js +30 -2
- package/dist/linux-x64/cc.js +30 -2
- package/dist/win32-x64/cc.js +30 -2
- package/package.json +5 -5
package/dist/darwin-arm64/cc.js
CHANGED
|
@@ -23,16 +23,44 @@ var Fd4=Object.create;var{getPrototypeOf:gd4,defineProperty:URH,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.1.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.29' + '&session_id=' + V_() + (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.1.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.1.29');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
|
36
|
+
try {
|
|
37
|
+
const __body = payload && payload.body;
|
|
38
|
+
if (__body && Array.isArray(__body.messages)) {
|
|
39
|
+
const __out = [];
|
|
40
|
+
for (const __m of __body.messages) {
|
|
41
|
+
if (!__m || typeof __m !== 'object' || !Array.isArray(__m.content)) { __out.push(__m); continue; }
|
|
42
|
+
const __pulled = [];
|
|
43
|
+
const __newContent = __m.content.map((__b) => {
|
|
44
|
+
if (__b && __b.type === 'tool_result' && Array.isArray(__b.content)) {
|
|
45
|
+
const __kept = [];
|
|
46
|
+
for (const __c of __b.content) {
|
|
47
|
+
if (__c && __c.type === 'image') __pulled.push(__c);
|
|
48
|
+
else __kept.push(__c);
|
|
49
|
+
}
|
|
50
|
+
if (__pulled.length > 0) {
|
|
51
|
+
if (__kept.length === 0) __kept.push({ type: 'text', text: '[image content provided in the following user message]' });
|
|
52
|
+
return Object.assign({}, __b, { content: __kept });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return __b;
|
|
56
|
+
});
|
|
57
|
+
__out.push(Object.assign({}, __m, { content: __newContent }));
|
|
58
|
+
if (__pulled.length > 0) __out.push({ role: 'user', content: __pulled });
|
|
59
|
+
}
|
|
60
|
+
__body.messages = __out;
|
|
61
|
+
}
|
|
62
|
+
} catch (__e) {}
|
|
63
|
+
|
|
36
64
|
payload.timeout = 6000000;
|
|
37
65
|
return A._X__post(patchedUrl, payload, ...remainArgs)
|
|
38
66
|
},
|
package/dist/darwin-x64/cc.js
CHANGED
|
@@ -23,16 +23,44 @@ var gcK=Object.create;var{getPrototypeOf:QcK,defineProperty:BEH,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.1.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.29' + '&session_id=' + I6() + (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.1.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.1.29');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
|
36
|
+
try {
|
|
37
|
+
const __body = payload && payload.body;
|
|
38
|
+
if (__body && Array.isArray(__body.messages)) {
|
|
39
|
+
const __out = [];
|
|
40
|
+
for (const __m of __body.messages) {
|
|
41
|
+
if (!__m || typeof __m !== 'object' || !Array.isArray(__m.content)) { __out.push(__m); continue; }
|
|
42
|
+
const __pulled = [];
|
|
43
|
+
const __newContent = __m.content.map((__b) => {
|
|
44
|
+
if (__b && __b.type === 'tool_result' && Array.isArray(__b.content)) {
|
|
45
|
+
const __kept = [];
|
|
46
|
+
for (const __c of __b.content) {
|
|
47
|
+
if (__c && __c.type === 'image') __pulled.push(__c);
|
|
48
|
+
else __kept.push(__c);
|
|
49
|
+
}
|
|
50
|
+
if (__pulled.length > 0) {
|
|
51
|
+
if (__kept.length === 0) __kept.push({ type: 'text', text: '[image content provided in the following user message]' });
|
|
52
|
+
return Object.assign({}, __b, { content: __kept });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return __b;
|
|
56
|
+
});
|
|
57
|
+
__out.push(Object.assign({}, __m, { content: __newContent }));
|
|
58
|
+
if (__pulled.length > 0) __out.push({ role: 'user', content: __pulled });
|
|
59
|
+
}
|
|
60
|
+
__body.messages = __out;
|
|
61
|
+
}
|
|
62
|
+
} catch (__e) {}
|
|
63
|
+
|
|
36
64
|
payload.timeout = 6000000;
|
|
37
65
|
return A._X__post(patchedUrl, payload, ...remainArgs)
|
|
38
66
|
},
|
package/dist/linux-arm64/cc.js
CHANGED
|
@@ -23,16 +23,44 @@ var bc5=Object.create;var{getPrototypeOf:xc5,defineProperty:Ukq,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.1.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.29' + '&session_id=' + y8() + (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.1.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.1.29');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
|
36
|
+
try {
|
|
37
|
+
const __body = payload && payload.body;
|
|
38
|
+
if (__body && Array.isArray(__body.messages)) {
|
|
39
|
+
const __out = [];
|
|
40
|
+
for (const __m of __body.messages) {
|
|
41
|
+
if (!__m || typeof __m !== 'object' || !Array.isArray(__m.content)) { __out.push(__m); continue; }
|
|
42
|
+
const __pulled = [];
|
|
43
|
+
const __newContent = __m.content.map((__b) => {
|
|
44
|
+
if (__b && __b.type === 'tool_result' && Array.isArray(__b.content)) {
|
|
45
|
+
const __kept = [];
|
|
46
|
+
for (const __c of __b.content) {
|
|
47
|
+
if (__c && __c.type === 'image') __pulled.push(__c);
|
|
48
|
+
else __kept.push(__c);
|
|
49
|
+
}
|
|
50
|
+
if (__pulled.length > 0) {
|
|
51
|
+
if (__kept.length === 0) __kept.push({ type: 'text', text: '[image content provided in the following user message]' });
|
|
52
|
+
return Object.assign({}, __b, { content: __kept });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return __b;
|
|
56
|
+
});
|
|
57
|
+
__out.push(Object.assign({}, __m, { content: __newContent }));
|
|
58
|
+
if (__pulled.length > 0) __out.push({ role: 'user', content: __pulled });
|
|
59
|
+
}
|
|
60
|
+
__body.messages = __out;
|
|
61
|
+
}
|
|
62
|
+
} catch (__e) {}
|
|
63
|
+
|
|
36
64
|
payload.timeout = 6000000;
|
|
37
65
|
return A._X__post(patchedUrl, payload, ...remainArgs)
|
|
38
66
|
},
|
package/dist/linux-x64/cc.js
CHANGED
|
@@ -23,16 +23,44 @@ var Cc9=Object.create;var{getPrototypeOf:bc9,defineProperty:UTH,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.1.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.29' + '&session_id=' + y$() + (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.1.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.1.29');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
|
36
|
+
try {
|
|
37
|
+
const __body = payload && payload.body;
|
|
38
|
+
if (__body && Array.isArray(__body.messages)) {
|
|
39
|
+
const __out = [];
|
|
40
|
+
for (const __m of __body.messages) {
|
|
41
|
+
if (!__m || typeof __m !== 'object' || !Array.isArray(__m.content)) { __out.push(__m); continue; }
|
|
42
|
+
const __pulled = [];
|
|
43
|
+
const __newContent = __m.content.map((__b) => {
|
|
44
|
+
if (__b && __b.type === 'tool_result' && Array.isArray(__b.content)) {
|
|
45
|
+
const __kept = [];
|
|
46
|
+
for (const __c of __b.content) {
|
|
47
|
+
if (__c && __c.type === 'image') __pulled.push(__c);
|
|
48
|
+
else __kept.push(__c);
|
|
49
|
+
}
|
|
50
|
+
if (__pulled.length > 0) {
|
|
51
|
+
if (__kept.length === 0) __kept.push({ type: 'text', text: '[image content provided in the following user message]' });
|
|
52
|
+
return Object.assign({}, __b, { content: __kept });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return __b;
|
|
56
|
+
});
|
|
57
|
+
__out.push(Object.assign({}, __m, { content: __newContent }));
|
|
58
|
+
if (__pulled.length > 0) __out.push({ role: 'user', content: __pulled });
|
|
59
|
+
}
|
|
60
|
+
__body.messages = __out;
|
|
61
|
+
}
|
|
62
|
+
} catch (__e) {}
|
|
63
|
+
|
|
36
64
|
payload.timeout = 6000000;
|
|
37
65
|
return A._X__post(patchedUrl, payload, ...remainArgs)
|
|
38
66
|
},
|
package/dist/win32-x64/cc.js
CHANGED
|
@@ -23,16 +23,44 @@ var Cc4=Object.create;var{getPrototypeOf:bc4,defineProperty:BVH,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.1.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.29' + '&session_id=' + E8() + (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.1.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.1.29');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
|
36
|
+
try {
|
|
37
|
+
const __body = payload && payload.body;
|
|
38
|
+
if (__body && Array.isArray(__body.messages)) {
|
|
39
|
+
const __out = [];
|
|
40
|
+
for (const __m of __body.messages) {
|
|
41
|
+
if (!__m || typeof __m !== 'object' || !Array.isArray(__m.content)) { __out.push(__m); continue; }
|
|
42
|
+
const __pulled = [];
|
|
43
|
+
const __newContent = __m.content.map((__b) => {
|
|
44
|
+
if (__b && __b.type === 'tool_result' && Array.isArray(__b.content)) {
|
|
45
|
+
const __kept = [];
|
|
46
|
+
for (const __c of __b.content) {
|
|
47
|
+
if (__c && __c.type === 'image') __pulled.push(__c);
|
|
48
|
+
else __kept.push(__c);
|
|
49
|
+
}
|
|
50
|
+
if (__pulled.length > 0) {
|
|
51
|
+
if (__kept.length === 0) __kept.push({ type: 'text', text: '[image content provided in the following user message]' });
|
|
52
|
+
return Object.assign({}, __b, { content: __kept });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return __b;
|
|
56
|
+
});
|
|
57
|
+
__out.push(Object.assign({}, __m, { content: __newContent }));
|
|
58
|
+
if (__pulled.length > 0) __out.push({ role: 'user', content: __pulled });
|
|
59
|
+
}
|
|
60
|
+
__body.messages = __out;
|
|
61
|
+
}
|
|
62
|
+
} catch (__e) {}
|
|
63
|
+
|
|
36
64
|
payload.timeout = 6000000;
|
|
37
65
|
return A._X__post(patchedUrl, payload, ...remainArgs)
|
|
38
66
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "makecoder",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.29",
|
|
4
4
|
"description": "MakeCoder Coder: AI Agent Runtime OS that runs and orchestrates Claude Code, Codex, Gemini and more across CLI, API, Web and chat",
|
|
5
5
|
"main": "./dist/coder.js",
|
|
6
6
|
"bin": {
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"scripts/postinstall.js"
|
|
53
53
|
],
|
|
54
54
|
"optionalDependencies": {
|
|
55
|
-
"makecoder-bin-darwin-arm64": "4.1.
|
|
56
|
-
"makecoder-bin-linux-arm64": "4.1.
|
|
57
|
-
"makecoder-bin-linux-x64": "4.1.
|
|
58
|
-
"makecoder-bin-win-x64": "4.1.
|
|
55
|
+
"makecoder-bin-darwin-arm64": "4.1.29",
|
|
56
|
+
"makecoder-bin-linux-arm64": "4.1.29",
|
|
57
|
+
"makecoder-bin-linux-x64": "4.1.29",
|
|
58
|
+
"makecoder-bin-win-x64": "4.1.29"
|
|
59
59
|
}
|
|
60
60
|
}
|