Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@
[![Trust Center](https://img.shields.io/badge/Trust-SIG%20Lite%20%2F%20SOC%202-00F59B?style=for-the-badge)](https://ritualdev.in/trust)
[![Playground](https://img.shields.io/badge/Playground-Live%20Demo-00D4FF?style=for-the-badge)](https://ritualdev.in/playground)

> Zero-leak secret defense, kernel sandboxing, and real-time status bar guardrails for Claude Code, Cursor, Windsurf, GitHub Copilot, and Aider.
> **Canonical RitualDev-Lab IDE Extension**: Unified zero-leak secret defense (**AgentShield**), SQL mutation approval drawer (**DBShield**), and MCP context compactor status (**SkillPrism**) for VS Code, Cursor, Windsurf, GitHub Copilot, and Claude Code.

---

## ⚡ Features

- **Live Status Bar Guard**: Instant indicator in the bottom IDE bar: `🛡️ AgentShield: Guarded (0 Leaks)` or `⚠️ AgentShield: N Leaks!`.
- **Real-Time Diagnostic Squiggles**: Highlights unmasked API keys (OpenAI, Anthropic, AWS, GitHub, Stripe, Slack) and `/proc/self/environ` reads right as you or your AI agent types.
- **Terminal Interceptor & Gate**: Direct integration with `npx @ritualdev-lab/agentshield ci --enforce` to audit full workspaces.
- **Unified 3-Layer Activity Bar Panels**:
- **AgentShield OS Sandbox Profile** (`Bubblewrap` / `Seatbelt` / `AppContainer`, IMDS isolation, volatile surrogates)
- **DBShield Mutation Approvals** (1-click human-in-the-loop SQL DDL/DML approval & rejection drawer)
- **SkillPrism MCP Context Compactor** (JIT receipts, indirect prompt-injection guard, Redis failover status)
- **Live Status Bar Guard**: Instant indicators for `🛡️ AgentShield: Guarded`, `🔒 Sandbox`, `🌐 Net: Git Only`, and `⚡ SkillPrism: JIT Active`.
- **Real-Time Diagnostic Squiggles & 1-Click Redact**: Highlights unmasked API keys (OpenAI, Anthropic, AWS, GitHub, Stripe, Slack) and `/proc/self/environ` reads right as you or your AI agent types.
- **Unified Stack Validation**: Run `npx @ritualdev-lab/agentshield up --dry-run` or `npx @ritualdev-lab/agentshield ci --enforce` directly from the command palette.
- **100% Air-Gapped**: Runs completely locally with zero outbound telemetry (`AGENTSHIELD_AIR_GAPPED=1`).

---
Expand Down
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
{
"id": "agentshield.sandboxView",
"name": "OS Sandbox Runtime Profile"
},
{
"id": "agentshield.skillprismView",
"name": "SkillPrism MCP Context Compactor"
}
]
},
Expand Down Expand Up @@ -110,6 +114,17 @@
"command": "agentshield.switchSandboxProfile",
"title": "Switch Active OS Sandbox Profile",
"category": "AgentShield"
},
{
"command": "agentshield.refreshSkillPrism",
"title": "Refresh SkillPrism MCP Context Compactor Status",
"icon": "$(refresh)",
"category": "AgentShield"
},
{
"command": "agentshield.runUnifiedUp",
"title": "Validate Unified Stack (ritual.policy.yaml)",
"category": "AgentShield"
}
],
"menus": {
Expand Down
58 changes: 56 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface PendingMutation {
let statusBarItem: vscode.StatusBarItem;
let sandboxStatusBarItem: vscode.StatusBarItem;
let egressStatusBarItem: vscode.StatusBarItem;
let skillprismStatusBarItem: vscode.StatusBarItem;
let diagnosticCollection: vscode.DiagnosticCollection;
let leakCount = 0;
let currentProfileName = "Strict";
Expand Down Expand Up @@ -165,6 +166,31 @@ export class SandboxProfileProvider implements vscode.TreeDataProvider<SandboxPr
}
}

export class SkillPrismStatusProvider implements vscode.TreeDataProvider<SandboxProfileTreeItem> {
private _onDidChangeTreeData = new vscode.EventEmitter<
SandboxProfileTreeItem | undefined | null | void
>();
readonly onDidChangeTreeData = this._onDidChangeTreeData.event;

refresh(): void {
this._onDidChangeTreeData.fire();
}

getTreeItem(element: SandboxProfileTreeItem): vscode.TreeItem {
return element;
}

getChildren(): Thenable<SandboxProfileTreeItem[]> {
const items = [
new SandboxProfileTreeItem("MCP Compactor", "JIT Tool Receipts Active", "zap"),
new SandboxProfileTreeItem("Prompt-Injection Guard", "Enabled (Phase 7 Sanitizer)", "shield"),
new SandboxProfileTreeItem("Redis Failover", "Automatic Local SQLite/LRU Fallback", "database"),
new SandboxProfileTreeItem("Unified Orchestrator", "ritual.policy.yaml (agentshield up)", "layers"),
];
return Promise.resolve(items);
}
}

export function activate(context: vscode.ExtensionContext) {
// 1. Initialize Real-Time Status Bar Indicators
statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 102);
Expand All @@ -183,15 +209,30 @@ export function activate(context: vscode.ExtensionContext) {
"AgentShield Egress Filter: AI agent outbound network access confined strictly to Git repositories.";
egressStatusBarItem.show();

context.subscriptions.push(statusBarItem, sandboxStatusBarItem, egressStatusBarItem);
skillprismStatusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 99);
skillprismStatusBarItem.command = "agentshield.refreshSkillPrism";
skillprismStatusBarItem.text = "$(zap) SkillPrism: JIT Active";
skillprismStatusBarItem.tooltip =
"SkillPrism MCP Context Compactor & Prompt-Injection Guard status. Click to refresh.";
skillprismStatusBarItem.show();

// 2. Initialize Activity Bar Views
context.subscriptions.push(
statusBarItem,
sandboxStatusBarItem,
egressStatusBarItem,
skillprismStatusBarItem,
);

// 2. Initialize Activity Bar Views (Canonical 3-Layer Stack)
const mutationProvider = new MutationApprovalProvider();
vscode.window.registerTreeDataProvider("agentshield.mutationsView", mutationProvider);

const sandboxProvider = new SandboxProfileProvider();
vscode.window.registerTreeDataProvider("agentshield.sandboxView", sandboxProvider);

const skillprismProvider = new SkillPrismStatusProvider();
vscode.window.registerTreeDataProvider("agentshield.skillprismView", skillprismProvider);

// 3. Initialize Real-Time Diagnostic Collection
diagnosticCollection = vscode.languages.createDiagnosticCollection("agentshield");
context.subscriptions.push(diagnosticCollection);
Expand Down Expand Up @@ -364,6 +405,19 @@ export function activate(context: vscode.ExtensionContext) {
vscode.env.openExternal(vscode.Uri.parse("https://ritualdev.in/trust"));
}),

vscode.commands.registerCommand("agentshield.refreshSkillPrism", () => {
skillprismProvider.refresh();
vscode.window.showInformationMessage(
"⚡ SkillPrism: Refreshed MCP Context Compactor & Prompt-Injection Guard status.",
);
}),

vscode.commands.registerCommand("agentshield.runUnifiedUp", () => {
const terminal = vscode.window.createTerminal("AgentShield Unified Stack");
terminal.show();
terminal.sendText("npx @ritualdev-lab/agentshield up --dry-run");
}),

// 5. Register 1-Click Redact Quick-Fix CodeAction Provider
vscode.languages.registerCodeActionsProvider(
{ scheme: "file" },
Expand Down
Loading