How manishpatel00/onecli-agentvault works
OneCLI-AgentVault is a credential gateway and isolation proxy for AI agents, with a web dashboard and API for managing agents, connections, and access policies. The main runtime flow is an agent request through the Rust gateway, which matches and injects stored credentials before forwarding traffic; the dashboard/API supports setup and management. The README documents that flow and the gateway/API relationship. Sampled code confirms API route registration and app-connection service calls, but most gateway internals and several dashboard features were not inspected, so those links are limited to documented relationships.
Main entry points: gateway.rs HTTP gateway · apps.ts App connection routes · app.ts API application · policy-service.ts Policy service
Components 18
Gateway runtime
- HTTP gateway
apps/gateway/src/gateway.rs - Provider matching
apps/gateway/src/apps.rs - Credential injection
apps/gateway/src/inject.rs - Policy engine
apps/gateway/src/policy_engine.rs - HTTPS interception CA
apps/gateway/src/ca.rs
Management API
- API application
packages/api/src/app.ts - App connection routes
packages/api/src/routes/apps.ts - Connection service
packages/api/src/services/connection-service.ts - Policy service
packages/api/src/services/policy-service.ts - Host blocklists
packages/api/src/services/app-blocklist-service.ts
Dashboard
- Web dashboard
apps/web/src/app/(dashboard) - Web API binding
apps/web/src/lib/api/app.ts - App connection flow
apps/web/src/app/(connect)/app-connect
Credential storage
- Encrypted secrets
apps/gateway/src/db.rs - Application database
packages/db/src/index.ts
Other components
- AI agent
- Target APIs
- PostgreSQL
Connections 18
- AI agent → HTTP gateway: sends requests
- HTTP gateway → Provider matching: matches provider
apps/gateway/src/apps.rs - HTTP gateway → Credential injection: injects credentials
- HTTP gateway → Policy engine: enforces access
- HTTP gateway → HTTPS interception CA: intercepts HTTPS
- HTTP gateway → Encrypted secrets: resolves secrets
- HTTP gateway → API application: resolves credentials
- HTTP gateway → Target APIs: forwards requests
- API application → App connection routes: mounts routes
packages/api/src/app.ts - App connection routes → Connection service: lists connections
packages/api/src/routes/apps.ts - App connection routes → Host blocklists: reads blocklist
packages/api/src/routes/apps.ts - Policy service → Application database: persists rules
- Host blocklists → Policy service: uses policy scope
packages/api/src/services/app-blocklist-service.ts - Web dashboard → Web API binding: uses API client
- Web API binding → API application: creates API app
apps/web/src/lib/api/app.ts - App connection flow → App connection routes: configures connections
- Application database → PostgreSQL: stores records
- Encrypted secrets → PostgreSQL: stores credentials