mindspace: close authority boundaries
This commit is contained in:
@@ -344,7 +344,10 @@ export function createMindSpaceAgentRunner({
|
||||
}
|
||||
|
||||
const workingDir = await userAuth.resolveWorkingDir(claim.userId);
|
||||
const sessionPolicy = await userAuth.getAgentSessionPolicy(claim.userId);
|
||||
let sessionPolicy =
|
||||
await userAuth.getAgentSessionPolicy(
|
||||
claim.userId,
|
||||
);
|
||||
const publishLayout = await userAuth.getUserPublishLayout(claim.userId);
|
||||
const startSession = await readJsonResponse(
|
||||
await apiFetch('/agent/start', {
|
||||
@@ -362,6 +365,14 @@ export function createMindSpaceAgentRunner({
|
||||
if (!sessionId) {
|
||||
throw runnerError('Agent 会话启动失败', 'worker_unavailable');
|
||||
}
|
||||
sessionPolicy =
|
||||
await userAuth.getAgentSessionPolicy(
|
||||
claim.userId,
|
||||
{
|
||||
sessionId,
|
||||
packageId: `cp_${sessionId}`,
|
||||
},
|
||||
);
|
||||
await agentJobService.setSessionId(jobId, claim.jobToken, sessionId);
|
||||
await sessionStore.registerAgentSession(claim.userId, sessionId);
|
||||
await reconcileAgentSession(
|
||||
|
||||
Reference in New Issue
Block a user