Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
bf90d4d
feat: release v1.5.0 - resolve Zod schema mismatch, fix inspect_model…
matty-drexler May 30, 2026
1c53008
fix: align inspect_model field categorization with Python engine stri…
matty-drexler May 30, 2026
b90c533
feat: release v1.5.0 - implement dynamic MetadataCache, unified build…
matty-drexler May 30, 2026
7be75d1
feat: release v1.5.0 - add pagination and metadata envelope to aggreg…
matty-drexler May 30, 2026
ba1663f
fix: sanitize aggregate_records options to prevent undefined XML-RPC …
matty-drexler May 30, 2026
f04968d
feat: release v1.5.0 - optimize aggregate_records output by removing …
matty-drexler May 30, 2026
af5485f
fix: make aggregate_records groupby parameter tolerant of both native…
matty-drexler May 30, 2026
65a0834
feat: release v1.5.0 - add command-line switches to start-inspectors.sh
matty-drexler May 30, 2026
7def57f
fix: enforce local Zod schema parsing inside tools to apply default f…
matty-drexler May 30, 2026
a914663
feat: release v1.5.0 - make get_action dynamically self-healing acros…
matty-drexler May 30, 2026
2a7a9c3
fix: release v1.5.0 - correct listModels unit test assertion to inclu…
matty-drexler May 30, 2026
48ee6e7
feat: release v1.5.0 - integrate interactive menus, dynamic action vi…
matty-drexler May 30, 2026
9973180
feat: release v1.5.0 - resolve get_menu unit tests for recursive tree…
matty-drexler May 30, 2026
f5e9255
feat: release v1.5.0 - implement Local Neighborhood Context algorithm…
matty-drexler May 30, 2026
66a41f6
docs: align JSON schemas and parameter defaults with server-side Zod …
matty-drexler May 30, 2026
1bec92c
docs: update README with v1.5.0 features, Breadth/Depth tools, Metada…
matty-drexler May 30, 2026
204121a
feat: release v1.5.0 - decommission server-side SkillGuard gating and…
matty-drexler May 30, 2026
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
92 changes: 62 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
# Brass-Monkey 🐒: Gemini CLI Extension for Odoo

**Status: ⚠️ BETA RELEASE**
*Verified Compatibility: Odoo v15 and v18. Other versions may work but have not been fully end-to-end tested.*
**Status: RELEASE v1.5.0 STABLE**
*Verified Compatibility: Odoo v15 through v18+ (Enterprise and Community).*

**Brass-Monkey** is a high-fidelity **Gemini CLI extension** that provides a secure, intelligent, and business-aware bridge to **Odoo**. It enables AI agents to navigate Odoo's complex ERP/CRM architecture, manage multiple instances, and perform safe, audited record operations using the Model Context Protocol (MCP).
**Brass-Monkey** is a high-fidelity, secure, and cognitively optimized **Gemini CLI extension** and Model Context Protocol (MCP) bridge for **Odoo**. It enables AI agents to navigate Odoo's complex ERP/CRM architecture, manage multiple instances, and perform highly audited record operations with extreme context-window efficiency.

---

## 🌟 Key Features

- **Stateful MCP Architecture:** Uses a persistent Model Context Protocol (MCP) server to maintain active Odoo sessions and connections.
- **Multi-Instance Manager:** Manage Production, Staging, and Dev environments in one session.
- **The "Breadth vs. Depth" Search Paradigm:** Uses lightweight paginated searches (`search_records`) for record discovery, and structured detail-fetchers (`get_record` / `get_records`) to build 360-degree interactive "Record Dashboards" containing child rows, Chatter threads, and real-time security ACLs.
- **In-Memory Metadata Caching:** Accelerates default database queries to **0ms metadata latency** by caching model configurations locally and performing parallel, background warming of parent-model schemas.
- **Hierarchical "Local Neighborhood" Navigation:** Exposes Odoo's menus (`get_menu`) as pruned, recursive JSON trees that cleanly map ancestral breadcrumbs, direct children, and immediate folder siblings while pruning out 95% of unrelated system noise.
- **Self-Healing Action Resolution:** Dynamically inspects Odoo's base tables to auto-resolve action types (`get_action`), supporting window, server, client, and report actions natively with zero parameter crashes.
- **OS-Level Security:** API Keys are stored in your operating system's secure keychain (Windows Credential Vault, macOS Keychain).
- **Audit & Reversibility:** Every write operation captures a "Before Snapshot" and logs a mandatory justification to the Odoo record's Chatter.
- **Middleware Orchestration:** Handles Odoo's complexity (Translations, Many2one labels, Search Hints) server-side, providing a "Forgiving Format" to AI agents.
- **Version-Aware:** Automatically adapts to Odoo versions (v14 through v18+).
- **Forgiving Interface:** Advanced Zod schemas reduce "formatting chatter" by automatically handling type coercion and array wrapping.
- **Audit & Reversibility:** Every write operation captures a "Before Snapshot" and logs a mandatory justification to Odoo's `ir.logging` and the record's Chatter.
- **23 Domain Skills:** Deep functional expertise pre-loaded for Sales, MRP, Finance, HR, and more.

---

## 🚀 Quick Start

### 1. Installation
The recommended way to install **Brass-Monkey** is using the official Gemini CLI extension command. This will guide you through the interactive setup of your first Odoo instance.

```bash
gemini extensions install https://github.com/your-org/brass-monkey.git
gemini extensions install https://github.com/actinon-com/brass-monkey.git
```

### 2. Configuration
Expand All @@ -37,20 +40,34 @@ You can update these settings later or add additional instances using:
```bash
# Update existing default instance
gemini extensions config brass-monkey

# Add a new named instance via the agent
# "Setup a new Odoo instance called 'staging'"
```

---

## 🛠️ Available Tools

| Category | Tools |
| :--- | :--- |
| **Discovery** | `list_models`, `inspect_model` |
| **UX & Navigation** | `get_menu`, `get_action`, `get_view` |
| **Safe CRUD** | `search_read`, `create_record`, `write_record`, `unlink_record` |
| **Reports** | `list_reports`, `download_report` |
| **Workspace** | `setup_instance`, `list_instances`, `switch_instance`, `get_info` |
| Category | Tool | Description |
| :--- | :--- | :--- |
| **Discovery** | `list_models` | Search and list Odoo's technical models with pagination. |
| | `inspect_model` | Perform a deep architectural audit of any Odoo model's fields, modules, and rules. |
| **UX & Navigation** | `get_menu` | Retrieve recursive, pruned JSON trees of menus (hierarchical drilling or semantic search). |
| | `get_action` | Retrieve Window, Server, Client, or Report Action details with view-mode bindings. |
| | `get_view` | Retrieve raw XML/definitions for Odoo form, tree, or kanban views. |
| **Safe CRUD** | `search_records` | Search Odoo records, returning a lightweight breadcrumbs-envelope and list totals. |
| | `get_record` | Retrieve a 360-degree detailed dashboard of a single record, including lines and chatter. |
| | `get_records` | Retrieve deep, multi-line detailed reports for multiple records in batch. |
| | `create_record` | Create new records in a specified model with mandatory business justification. |
| | `write_record` | Update existing records with field-level snapshot tracking. |
| | `unlink_record` | Delete records from Odoo (highly audited). |
| | `aggregate_records`| Server-side grouping and pivot-style aggregations with custom offset pagination. |
| **Reports** | `list_reports` | List all available PDF reports (Invoices, Quotations, Packing Slips) for a model. |
| | `download_report` | Generate and retrieve PDF report data. |
| **Workspace** | `setup_instance` | Add and authenticate new Odoo environments. |
| | `list_instances` | List all configured environments. |
| | `switch_instance` | Change the active environment. |
| | `get_info` | Retrieve server version and configuration stats. |

---

## 💼 Domain Skills Catalog

Expand All @@ -64,22 +81,37 @@ Brass-Monkey includes specialized guidance for the following Odoo areas:
- **Content:** `knowledge`, `documents`, `worksheets`.
- **Intelligence:** `spreadsheets`, `dashboards`.

---

## 💻 Local Development & Isolated Testing

For developers working on this extension, you can run isolated tests against your live Odoo database without modifying your stable global installation.

1. Create a local `.env` file in the root of the workspace (ignored by git):
```env
ODOO_URL="https://my-company.odoo.com"
ODOO_DB="my-database"
ODOO_USERNAME="my-email@company.com"
ODOO_API_KEY="my-api-key"
```

2. Start the parallel MCP Inspectors using the helper script:
```bash
# Start all three inspectors (Production, Development, Python)
./start-inspectors.sh --all

# Start ONLY your local workspace development inspector (Port 6275, Proxy 6278)
./start-inspectors.sh --dev
```

---

## 🛡️ Security & Privacy

- **Zero Cleartext Policy:** API keys are never stored in your project folder or logged to the console.
- **Audit Trail:** All AI actions are attributed and logged within Odoo's `ir.logging` and record Chatter.
- **Production Guard:** Writing to Odoo requires an explicit business `justification`.

## 💡 Troubleshooting Tip

**Snapshot Awareness:** Static field maps in skills are "convenience snapshots." If you have custom Studio fields or a unique Odoo configuration, simply tell the agent to **"Inspect the model again"** to refresh its live technical knowledge.

## 📄 License

This project is licensed under the MIT License.

---

### 🌐 GitHub Topics (Recommended)
To make this project more visible on GitHub, please add the following topics to the repository settings:
`gemini-cli`, `odoo`, `mcp`, `ai-agent`, `extension`, `erp`, `crm`, `typescript`
8 changes: 4 additions & 4 deletions dist/bundle/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ export * from './services/instance-manager.js';
export * from './services/config-store.js';
export * from './services/credential-store.js';
export * from './services/audit-service.js';
export * from './services/skill-guard.js';
export * from './services/response-pruner.js';
export * from './services/metadata-cache.js';
export * from './services/metadata-resolver.js';
export * from './tools/setup_instance.js';
export * from './tools/list_instances.js';
export * from './tools/switch_instance.js';
Expand All @@ -14,7 +15,8 @@ export * from './tools/inspect_model.js';
export * from './tools/get_menu.js';
export * from './tools/get_action.js';
export * from './tools/get_view.js';
export * from './tools/search_read.js';
export * from './tools/search_records.js';
export * from './tools/get_record.js';
export * from './tools/create_record.js';
export * from './tools/write_record.js';
export * from './tools/unlink_record.js';
Expand All @@ -24,6 +26,4 @@ export * from './tools/get_info.js';
export * from './tools/get_environment.js';
export * from './tools/trace_ui_path.js';
export * from './tools/aggregate_records.js';
export * from './tools/search_count.js';
export * from './tools/get_audit_log.js';
export * from './tools/activate_skill.js';
Loading
Loading