fix(session): propagate network context
Agent CI/CD / docker-image (push) Failing after 15m0s
Agent CI/CD / deploy-fallback-log (push) Successful in 0s

This commit is contained in:
2026-07-17 16:33:11 +08:00
parent 40c0395fb1
commit d782b7fa11
8 changed files with 31 additions and 3 deletions
+4
View File
@@ -11,6 +11,7 @@ export type AgentAuthContext = {
role: string;
isSuperuser: boolean;
projectId: string;
network: string;
projectRole: string;
tokenExpiresAt?: string;
};
@@ -22,6 +23,7 @@ type AgentAuthContextResponse = {
role?: unknown;
is_superuser?: unknown;
project_id?: unknown;
network?: unknown;
project_role?: unknown;
token_expires_at?: unknown;
};
@@ -53,6 +55,7 @@ const normalizeAgentAuthContext = (
typeof payload.role !== "string" ||
typeof payload.is_superuser !== "boolean" ||
typeof payload.project_id !== "string" ||
typeof payload.network !== "string" ||
typeof payload.project_role !== "string"
) {
return null;
@@ -65,6 +68,7 @@ const normalizeAgentAuthContext = (
role: payload.role,
isSuperuser: payload.is_superuser,
projectId: payload.project_id,
network: payload.network,
projectRole: payload.project_role,
tokenExpiresAt:
typeof payload.token_expires_at === "string"