Skip to main content
Glama
user-namespace.ts1.24 kB
export interface UserNamespaceConfig { uid: number; gid: number; subUidStart: number; subUidCount: number; subGidStart: number; subGidCount: number; } export class UserNamespaceManager { static async createUserNamespace(config: UserNamespaceConfig): Promise<string> { const namespaceId = `ns-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`; // In a real implementation, this would configure user namespaces // For now, return a mock namespace ID return namespaceId; } static async destroyUserNamespace(namespaceId: string): Promise<void> { // Mock cleanup - in real implementation would clean up namespace console.log(`Cleaning up user namespace: ${namespaceId}`); } static async destroyNamespace(namespaceId: string): Promise<void> { return this.destroyUserNamespace(namespaceId); } static async enforceNonRootExecution(): Promise<void> { // Mock implementation - would configure non-root execution console.log('Enforcing non-root execution'); } static getDefaultConfig(): UserNamespaceConfig { return { uid: 1001, gid: 1001, subUidStart: 100000, subUidCount: 65536, subGidStart: 100000, subGidCount: 65536 }; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/perfecxion-ai/secure-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server