feat: add memindadm runtime policy for agent code runs (Phase 1.5)

Persist code-run gates in admin DB and expose them via /auth/status so H5 can honor runtime policy without VITE rebuilds.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-23 21:33:27 +08:00
parent 13f5c740a1
commit 239c41f935
12 changed files with 639 additions and 43 deletions
+9
View File
@@ -905,6 +905,14 @@ export type PolicyDefinition = {
risk: 'low' | 'medium' | 'high';
};
export type AgentCodeRunClientPolicy = {
codeRun?: {
enabled?: boolean;
pageDataDevAutodetect?: boolean;
generalAutodetect?: boolean;
};
};
export type AuthStatus = {
authenticated: boolean;
mode?: 'user' | 'legacy' | 'none' | 'unavailable';
@@ -913,6 +921,7 @@ export type AuthStatus = {
capabilities?: CapabilityMap;
grantedSkills?: string[];
unrestricted?: boolean;
agentCodeRun?: AgentCodeRunClientPolicy | null;
};
export type PathGrant = {