fix(agent-run): tolerate goosed stdio MCP listing gaps during session reconcile.
Memind CI / Test, build, and release guards (push) Failing after 4s
Memind CI / Test, build, and release guards (push) Failing after 4s
Skip hot-adding stdio extensions goosed omits from /extensions, stabilize MCP scope during session start, and wire chat intent routing into the agent-run worker. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+23
-10
@@ -1438,7 +1438,17 @@ export function createTkmindProxy({
|
||||
} = {},
|
||||
) {
|
||||
const resolvedWorkingDir = workingDir ?? await userAuth.resolveWorkingDir(userId);
|
||||
const baseSessionPolicy = sessionPolicy ?? await userAuth.getAgentSessionPolicy(userId);
|
||||
const mcpScopeSessionId = crypto.randomUUID();
|
||||
const mcpScope = sessionPolicy
|
||||
? null
|
||||
: {
|
||||
sessionId: mcpScopeSessionId,
|
||||
packageId: `cp_${mcpScopeSessionId}`,
|
||||
};
|
||||
const baseSessionPolicy = sessionPolicy ?? await userAuth.getAgentSessionPolicy(
|
||||
userId,
|
||||
mcpScope ?? {},
|
||||
);
|
||||
const resolvedSessionPolicy = disableImageReading
|
||||
? withoutSessionImageRead(baseSessionPolicy)
|
||||
: baseSessionPolicy;
|
||||
@@ -1472,15 +1482,18 @@ export function createTkmindProxy({
|
||||
const baseSessionScopedPolicy =
|
||||
typeof userAuth.getAgentSessionPolicy ===
|
||||
'function'
|
||||
? await userAuth.getAgentSessionPolicy(
|
||||
userId,
|
||||
{
|
||||
toolMode:
|
||||
resolvedSessionPolicy
|
||||
?.toolMode ?? 'chat',
|
||||
sessionId: session.id,
|
||||
packageId: `cp_${session.id}`,
|
||||
},
|
||||
? (
|
||||
sessionPolicy
|
||||
? resolvedSessionPolicy
|
||||
: await userAuth.getAgentSessionPolicy(
|
||||
userId,
|
||||
{
|
||||
toolMode:
|
||||
resolvedSessionPolicy
|
||||
?.toolMode ?? 'chat',
|
||||
...mcpScope,
|
||||
},
|
||||
)
|
||||
)
|
||||
: resolvedSessionPolicy;
|
||||
const sessionScopedPolicy = disableImageReading
|
||||
|
||||
Reference in New Issue
Block a user