mixdog 0.9.35 → 0.9.36
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/package.json
CHANGED
|
@@ -16,7 +16,7 @@ import { readServicePort, markServiceUnreachable, isConnRefuseError } from '../.
|
|
|
16
16
|
const AUTO_DETECT_PORTS = {
|
|
17
17
|
'mixdog-memory': { discovery: 'memory', dir: 'mixdog', file: 'active-instance.json', portField: 'memory_port', endpoint: '/mcp' },
|
|
18
18
|
};
|
|
19
|
-
const DEFAULT_MCP_CALL_TIMEOUT_MS =
|
|
19
|
+
const DEFAULT_MCP_CALL_TIMEOUT_MS = 120000;
|
|
20
20
|
// Per-server STARTUP handshake budget (connect + listTools). Codex parity: 10s.
|
|
21
21
|
export const DEFAULT_MCP_STARTUP_TIMEOUT_MS = 10000;
|
|
22
22
|
// --- State ---
|
|
@@ -227,12 +227,12 @@ export async function executeMcpTool(name, args) {
|
|
|
227
227
|
return capMcpOutput(text);
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
// MCP per-tool-call timeout.
|
|
231
|
-
//
|
|
232
|
-
//
|
|
233
|
-
// per-server timeoutMs/callTimeoutMs config value
|
|
234
|
-
// transport so the next dispatch reconnects fresh, but
|
|
235
|
-
// timed-out call automatically.
|
|
230
|
+
// MCP per-tool-call timeout. Default 2min: a hung/unresponsive MCP server
|
|
231
|
+
// (e.g. a busy editor) must not stall a tool call indefinitely. Genuinely
|
|
232
|
+
// long-running tools can raise/disable it via MIXDOG_MCP_CALL_TIMEOUT_MS or a
|
|
233
|
+
// per-server timeoutMs/callTimeoutMs config value (0/off/none/false disables).
|
|
234
|
+
// On expiry we close the transport so the next dispatch reconnects fresh, but
|
|
235
|
+
// we do not retry the timed-out call automatically (avoids side-effect dupes).
|
|
236
236
|
export function resolveMcpCallTimeoutMs(cfg = {}, env = process.env) {
|
|
237
237
|
const raw = cfg?.timeoutMs ?? cfg?.timeout_ms ?? cfg?.callTimeoutMs ?? cfg?.call_timeout_ms
|
|
238
238
|
?? env?.MIXDOG_MCP_CALL_TIMEOUT_MS;
|
package/src/tui/dist/index.mjs
CHANGED
|
@@ -23461,11 +23461,13 @@ function createContextState({ runtime, getState, getPendingSessionReset }) {
|
|
|
23461
23461
|
});
|
|
23462
23462
|
const routeState = () => {
|
|
23463
23463
|
const state = getState();
|
|
23464
|
+
const base = baseRouteState();
|
|
23465
|
+
const sameContextRoute = state.sessionId === base.sessionId && state.clientHostPid === base.clientHostPid && state.provider === base.provider && state.model === base.model && state.effort === base.effort && state.fast === base.fast && state.contextWindow === base.contextWindow && state.rawContextWindow === base.rawContextWindow;
|
|
23464
23466
|
return {
|
|
23465
|
-
...
|
|
23466
|
-
displayContextWindow: state.displayContextWindow || 0,
|
|
23467
|
-
compactBoundaryTokens: state.compactBoundaryTokens || 0,
|
|
23468
|
-
autoCompactTokenLimit: state.autoCompactTokenLimit || 0
|
|
23467
|
+
...base,
|
|
23468
|
+
displayContextWindow: sameContextRoute ? state.displayContextWindow || 0 : 0,
|
|
23469
|
+
compactBoundaryTokens: sameContextRoute ? state.compactBoundaryTokens || 0 : 0,
|
|
23470
|
+
autoCompactTokenLimit: sameContextRoute ? state.autoCompactTokenLimit || 0 : 0
|
|
23469
23471
|
};
|
|
23470
23472
|
};
|
|
23471
23473
|
function syncContextDisplayFields(ctx = null) {
|
|
@@ -48,11 +48,20 @@ export function createContextState({ runtime, getState, getPendingSessionReset }
|
|
|
48
48
|
|
|
49
49
|
const routeState = () => {
|
|
50
50
|
const state = getState();
|
|
51
|
+
const base = baseRouteState();
|
|
52
|
+
const sameContextRoute = state.sessionId === base.sessionId
|
|
53
|
+
&& state.clientHostPid === base.clientHostPid
|
|
54
|
+
&& state.provider === base.provider
|
|
55
|
+
&& state.model === base.model
|
|
56
|
+
&& state.effort === base.effort
|
|
57
|
+
&& state.fast === base.fast
|
|
58
|
+
&& state.contextWindow === base.contextWindow
|
|
59
|
+
&& state.rawContextWindow === base.rawContextWindow;
|
|
51
60
|
return {
|
|
52
|
-
...
|
|
53
|
-
displayContextWindow: state.displayContextWindow || 0,
|
|
54
|
-
compactBoundaryTokens: state.compactBoundaryTokens || 0,
|
|
55
|
-
autoCompactTokenLimit: state.autoCompactTokenLimit || 0,
|
|
61
|
+
...base,
|
|
62
|
+
displayContextWindow: sameContextRoute ? (state.displayContextWindow || 0) : 0,
|
|
63
|
+
compactBoundaryTokens: sameContextRoute ? (state.compactBoundaryTokens || 0) : 0,
|
|
64
|
+
autoCompactTokenLimit: sameContextRoute ? (state.autoCompactTokenLimit || 0) : 0,
|
|
56
65
|
};
|
|
57
66
|
};
|
|
58
67
|
|