chore: rebuild CentOS7 release package

This commit is contained in:
shiyue
2026-06-26 11:17:47 +08:00
parent c387c92e4b
commit 756b9651f9
7 changed files with 1267 additions and 16 deletions

View File

@@ -24,6 +24,7 @@ if (args[0] !== 'app-server') {
const threads = new Map();
const pendingServerRequests = new Map();
const resumeMismatchThreads = new Set();
let nextServerRequestId = 1;
let mcpReloadCount = 0;
@@ -64,6 +65,12 @@ function tokenUsage(text) {
};
}
function retryScenarioKey(text, marker) {
return new RegExp(marker.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'i').test(String(text || ''))
? marker
: String(text || '');
}
function collaborationSummary(params = {}) {
const collaborationMode = params.collaborationMode;
const settings = collaborationMode?.settings || {};
@@ -623,8 +630,9 @@ function startTurn(params) {
}
if (/codexapp capacity retry/i.test(text)) {
const attempts = (thread.capacityRetryAttempts.get(text) || 0) + 1;
thread.capacityRetryAttempts.set(text, attempts);
const retryKey = retryScenarioKey(text, 'codexapp capacity retry');
const attempts = (thread.capacityRetryAttempts.get(retryKey) || 0) + 1;
thread.capacityRetryAttempts.set(retryKey, attempts);
if (attempts <= 2) {
if (attempts === 2) emitPartialCapacityOutput(thread, turnId);
emitCapacityError(thread, turnId);
@@ -633,8 +641,9 @@ function startTurn(params) {
}
if (/codexapp reconnect retry/i.test(text)) {
const attempts = (thread.reconnectRetryAttempts.get(text) || 0) + 1;
thread.reconnectRetryAttempts.set(text, attempts);
const retryKey = retryScenarioKey(text, 'codexapp reconnect retry');
const attempts = (thread.reconnectRetryAttempts.get(retryKey) || 0) + 1;
thread.reconnectRetryAttempts.set(retryKey, attempts);
if (attempts === 1) {
emitPartialCapacityOutput(thread, turnId);
send({
@@ -650,6 +659,17 @@ function startTurn(params) {
}
}
if (/codexapp retry thread mismatch/i.test(text)) {
const retryKey = retryScenarioKey(text, 'codexapp retry thread mismatch');
const attempts = (thread.capacityRetryAttempts.get(retryKey) || 0) + 1;
thread.capacityRetryAttempts.set(retryKey, attempts);
if (attempts === 1) {
resumeMismatchThreads.add(thread.id);
emitCapacityError(thread, turnId);
return { turn: { id: turnId, status: 'running', items: [] } };
}
}
if (/collaboration/i.test(text)) {
completeTurn(thread, turnId, `collaboration mode: ${collaborationSummary(params)}`);
return { turn: { id: turnId, status: 'running', items: [] } };
@@ -787,6 +807,11 @@ function handleRequest(message) {
return;
}
if (method === 'thread/resume') {
if (params.threadId && resumeMismatchThreads.delete(params.threadId)) {
const thread = ensureThread(null, params);
send({ id, result: { thread: threadPayload(thread), model: params.model || 'gpt-5.5', cwd: thread.cwd, modelProvider: 'mock', approvalPolicy: params.approvalPolicy || 'never', approvalsReviewer: 'user', sandbox: params.sandbox || 'danger-full-access' } });
return;
}
const thread = ensureThread(params.threadId, params);
send({ id, result: { thread: threadPayload(thread), model: params.model || 'gpt-5.5', cwd: thread.cwd, modelProvider: 'mock', approvalPolicy: params.approvalPolicy || 'never', approvalsReviewer: 'user', sandbox: params.sandbox || 'danger-full-access' } });
return;