diff --git a/package.json b/package.json index 4952e25..de3a68d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ritual-agent-defense", "displayName": "Ritual Agent Defense", "description": "Unified AI Agent Runtime Defense, Kernel Sandboxing, Database Guardrails & Context Optimizer for Cursor, VS Code, and Windsurf", - "version": "0.1.0", + "version": "0.2.0", "publisher": "ritualdev-lab", "repository": { "type": "git", @@ -103,6 +103,31 @@ { "command": "ritual.configureMcp", "title": "Ritual: Add Tool to Cursor / Claude mcp.json" + }, + { + "command": "ritual.dbshield.startProxy", + "title": "DBShield: Launch PostgreSQL Wire Proxy (:5433)", + "icon": "$(server-process)" + }, + { + "command": "ritual.dbshield.topMonitor", + "title": "DBShield: Launch Interactive Terminal Monitor (top)", + "icon": "$(dashboard)" + }, + { + "command": "ritual.dbshield.auditWorkspace", + "title": "DBShield: Audit Workspace Migrations & Lock Hazards", + "icon": "$(shield)" + }, + { + "command": "ritual.dbshield.openSimulator", + "title": "DBShield: Open Interactive SQL Guardrail Simulator", + "icon": "$(play)" + }, + { + "command": "ritual.dbshield.configureMcp", + "title": "DBShield: 1-Click Configure Cursor / Antigravity MCP", + "icon": "$(tools)" } ], "menus": { diff --git a/src/extension.ts b/src/extension.ts index 660eaf2..518edb0 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -147,6 +147,50 @@ export function activate(context: vscode.ExtensionContext): void { } await configureMcpServer(tool); }), + + vscode.commands.registerCommand("ritual.dbshield.startProxy", () => { + const term = vscode.window.createTerminal("DBShield Wire Proxy"); + term.show(); + term.sendText("npx @ritualdev-lab/dbshield proxy --port 5433"); + vscode.window.showInformationMessage("🚀 [DBShield] PostgreSQL Wire Proxy started on port 5433."); + }), + + vscode.commands.registerCommand("ritual.dbshield.topMonitor", () => { + const term = vscode.window.createTerminal("DBShield Top Monitor"); + term.show(); + term.sendText("npx @ritualdev-lab/dbshield top"); + }), + + vscode.commands.registerCommand("ritual.dbshield.auditWorkspace", () => { + const term = vscode.window.createTerminal("DBShield Audit"); + term.show(); + term.sendText("npx @ritualdev-lab/dbshield audit ."); + }), + + vscode.commands.registerCommand("ritual.dbshield.openSimulator", () => { + vscode.env.openExternal(vscode.Uri.parse("https://ritualdev.in/dbshield/#simulator")); + }), + + vscode.commands.registerCommand("ritual.dbshield.configureMcp", async () => { + const pick = await vscode.window.showQuickPick( + [ + "Cursor IDE (.cursor/mcp.json in Workspace)", + "Google Antigravity (.antigravity/mcp.json in Workspace)", + "Claude Desktop (claude_desktop_config.json)", + ], + { placeHolder: "Select target IDE to configure DBShield MCP server:" }, + ); + if (!pick) return; + const term = vscode.window.createTerminal("DBShield Configurator"); + term.show(); + if (pick.includes("Cursor")) { + term.sendText("npx @ritualdev-lab/dbshield install-cursor"); + } else if (pick.includes("Antigravity")) { + term.sendText("npx @ritualdev-lab/dbshield install-antigravity"); + } else { + term.sendText("npx @ritualdev-lab/dbshield install-claude"); + } + }), ); // Initial update