@centr-ai/cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/LICENSE +21 -0
- package/README.md +275 -0
- package/dist/commands/benchmark.d.ts +3 -0
- package/dist/commands/benchmark.d.ts.map +1 -0
- package/dist/commands/benchmark.js +382 -0
- package/dist/commands/benchmark.js.map +1 -0
- package/dist/commands/brain.d.ts +3 -0
- package/dist/commands/brain.d.ts.map +1 -0
- package/dist/commands/brain.js +387 -0
- package/dist/commands/brain.js.map +1 -0
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +52 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/doctor.d.ts +3 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +116 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +49 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/learn.d.ts +3 -0
- package/dist/commands/learn.d.ts.map +1 -0
- package/dist/commands/learn.js +151 -0
- package/dist/commands/learn.js.map +1 -0
- package/dist/commands/search.d.ts +3 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +48 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/skills.d.ts +3 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +123 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +59 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/symbol.d.ts +3 -0
- package/dist/commands/symbol.d.ts.map +1 -0
- package/dist/commands/symbol.js +48 -0
- package/dist/commands/symbol.js.map +1 -0
- package/dist/commands/sync.d.ts +3 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +44 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/utils.d.ts +8 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +50 -0
- package/dist/utils.js.map +1 -0
- package/package.json +66 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# CentR Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the CentR project are documented in this file.
|
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## [0.1.0] - 2026-09-05
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **Deterministic Core Layer (`@centr-ai/core`)**:
|
|
13
|
+
- Full AST-based TypeScript/JavaScript parsing via TypeScript Compiler API (`ts.createSourceFile`).
|
|
14
|
+
- Extracted symbol definitions: functions, classes, methods, interfaces, types, enums, variables, constants.
|
|
15
|
+
- Multi-source full-text search with SQLite 3 (WAL mode) and FTS5 BM25 ranked indexing.
|
|
16
|
+
- Incremental sync engine computing SHA-256 content hashes to re-index changed files in sub-10ms.
|
|
17
|
+
- **Context Engine & Token Budgeting**:
|
|
18
|
+
- Greedy relevance sorting with deterministic character token estimation (`1 token ≈ 4 chars`).
|
|
19
|
+
- Configurable token budgets (`--max-tokens`) preventing agent context overflow.
|
|
20
|
+
- **Project Memory**:
|
|
21
|
+
- Persistent, project-isolated institutional knowledge categorized into architecture, decisions, constraints, discoveries, APIs, dependencies, workflows, and warnings.
|
|
22
|
+
- **Global Learning**:
|
|
23
|
+
- Cross-project evidence-based learning lifecycle (`candidate` → `evidence` → `confidence` → `validated` / `rejected`).
|
|
24
|
+
- Mathematical confidence scoring based on observed success/failure ratios.
|
|
25
|
+
- **Model Context Protocol (`@centr-ai/mcp`)**:
|
|
26
|
+
- stdio JSON-RPC MCP server exposing `get_context`, `search_code`, `lookup_symbol`, `get_memory`, `record_memory`, and `get_learning`.
|
|
27
|
+
- **Command Line Interface (`@centr-ai/cli`)**:
|
|
28
|
+
- Full CLI tooling (`centr init`, `sync`, `status`, `search`, `context`, `symbol`, `memory`, `learn`, `skills`, `doctor`, `benchmark`).
|
|
29
|
+
- **Security & Privacy Layer**:
|
|
30
|
+
- Path traversal defense (`sanitizePath`).
|
|
31
|
+
- Comprehensive secret detection and redaction patterns (`DEFAULT_SECRET_PATTERNS`, `SECRET_CONTENT_PATTERNS`).
|
|
32
|
+
- Zero cloud telemetry by default.
|
|
33
|
+
- **Optional Local Brain (`@centr-ai/brain`)**:
|
|
34
|
+
- Local SLM integration (Ollama `qwen2.5:1.5b`, `llama3.2:3b`, `qwen2.5:7b`).
|
|
35
|
+
- Context re-ranking with strict Core candidate bounding (hallucination guard).
|
|
36
|
+
- Task classification, failure analysis, memory extraction, and summarization.
|
|
37
|
+
- Hardware-aware resource profiling (Minimal, Balanced, Quality) and graceful deterministic fallback.
|
|
38
|
+
- **Real-Agent A/B Benchmark Harness (`@centr-ai/benchmark-ab`)**:
|
|
39
|
+
- Scientific 3-tier benchmark system (Tier 1: Infrastructure Smoke, Tier 2: Retrieval Latency, Tier 3: Real Agent Execution).
|
|
40
|
+
- 27-task software engineering dataset across 7 categories and 5 retrieval classes.
|
|
41
|
+
- 21 preliminary interactive runs on Google Antigravity (Gemini 2.5 Pro) with 100% test success. Preliminary observations showed fewer exploratory tool calls in tested scenarios; agent token telemetry was unobserved and results are preliminary.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2025 CentR Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/chiragpgauswami/CentR/main/assets/logo.svg" width="480" alt="CentR Logo" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>Local-first Project Intelligence + Learning Middleware for AI Coding Agents</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License" /></a>
|
|
11
|
+
<img src="https://img.shields.io/badge/typescript-strict-3178C6.svg" alt="TypeScript Strict" />
|
|
12
|
+
<img src="https://img.shields.io/badge/tests-298%20passed-10B981.svg" alt="Tests 298 passed" />
|
|
13
|
+
<img src="https://img.shields.io/badge/telemetry-zero%20cloud-06B6D4.svg" alt="Zero Cloud Telemetry" />
|
|
14
|
+
<img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg" alt="Node >= 20" />
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ⚡ The 2-Minute Executive Summary
|
|
20
|
+
|
|
21
|
+
| Question | The CentR Answer |
|
|
22
|
+
| :--------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
23
|
+
| **What is CentR?** | A local-first developer middleware that indexes code, maintains institutional memory, and supplies the smallest useful context to AI coding agents. |
|
|
24
|
+
| **Why does it exist?** | Coding agents (Claude Code, Cursor, Codex, Antigravity) waste 2–4 turns and thousands of tokens blindly running `find_by_name` and `grep_search` to find relevant files. CentR stops this cycle. |
|
|
25
|
+
| **How is it different from RAG / Vector DBs?** | Vector DBs dump unvalidated chunk similarity into context. CentR is **deterministic AST symbol indexing + SQLite FTS5 BM25 + strict token budgets + evidence-scored memory**. |
|
|
26
|
+
| **Does it replace my coding agent?** | **No.** CentR is not an agent. It sits beside your agent via Model Context Protocol (MCP) or CLI to give it instant repository intelligence. |
|
|
27
|
+
| **Does it require cloud AI or paid APIs?** | **No.** Zero cloud dependencies. Runs 100% locally with SQLite 3. An optional local Small Language Model (SLM) Brain can be attached via Ollama, but is never required. |
|
|
28
|
+
| **What does the optional Brain do?** | Provides semantic re-ranking, task classification, and failure diagnosis. Core is always the authority; the Brain is an advisor. |
|
|
29
|
+
| **What privacy guarantees exist?** | **Zero telemetry.** Your code, tokens, memories, and index never leave your machine. Secrets are automatically redacted before indexing. |
|
|
30
|
+
| **What evidence exists that it helps?** | Preliminary interactive benchmark observations showed fewer exploratory tool calls (-2 calls per task on turn 1 in tested scenarios). Agent token telemetry was not available, so these results should not be interpreted as a controlled measurement of token savings or universal performance improvement. |
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 🏛️ Core Architecture
|
|
35
|
+
|
|
36
|
+
> **"Store everything useful. Send almost nothing."**
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="https://raw.githubusercontent.com/chiragpgauswami/CentR/main/assets/architecture.svg" width="900" alt="CentR Architecture" />
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
### The Two-Tier Architecture:
|
|
43
|
+
|
|
44
|
+
1. **Deterministic Core (The Authority)**:
|
|
45
|
+
- **AST Indexer**: Parses TypeScript/JavaScript into symbols (functions, classes, interfaces, types) in ~20ms.
|
|
46
|
+
- **SQLite 3 + FTS5**: Ranked BM25 full-text search across symbols, paths, and memories in < 2ms.
|
|
47
|
+
- **Token Budgeter**: Greedy relevance sorting that strictly respects context limits (e.g. 4,000 tokens).
|
|
48
|
+
- **Project Memory**: Project-isolated institutional memory (`.centr/centr.db`).
|
|
49
|
+
- **Global Learning**: Evidence-based cross-project knowledge (`~/.centr/learning.db`).
|
|
50
|
+
2. **Optional Local Brain (The Advisor)**:
|
|
51
|
+
- Powered by local Small Language Models (0.5B–7B parameters via Ollama or custom local providers).
|
|
52
|
+
- Semantic re-ranking, failure analysis, and memory extraction.
|
|
53
|
+
- **Hallucination Guard**: The Brain cannot invent files or edit source code; all candidates are bounded by Core retrieval.
|
|
54
|
+
- **Deterministic Fallback**: Automatically falls back to Core heuristics if the local SLM is absent, slow, or times out.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 🚀 Quick Start
|
|
59
|
+
|
|
60
|
+
### 1. Installation
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Global installation
|
|
64
|
+
npm install -g @centr-ai/cli
|
|
65
|
+
|
|
66
|
+
# Or run directly via npx
|
|
67
|
+
npx @centr-ai/cli init
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 2. Initialize in Your Repository
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cd my-project
|
|
74
|
+
|
|
75
|
+
# Initialize CentR index (takes ~20-50ms)
|
|
76
|
+
centr init
|
|
77
|
+
|
|
78
|
+
# Check intelligence status
|
|
79
|
+
centr status
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 3. Generate Context for an Agent
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Get the smallest useful context for a task
|
|
86
|
+
centr context "Add rate limiting to authentication routes"
|
|
87
|
+
|
|
88
|
+
# Search code symbols and files
|
|
89
|
+
centr search "verifyToken"
|
|
90
|
+
|
|
91
|
+
# Lookup exact symbol details and references
|
|
92
|
+
centr symbol "AuthService"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 🔄 Lifecycle Workflow
|
|
98
|
+
|
|
99
|
+
<p align="center">
|
|
100
|
+
<img src="https://raw.githubusercontent.com/chiragpgauswami/CentR/main/assets/centr-overview.svg" width="900" alt="CentR Lifecycle Overview" />
|
|
101
|
+
</p>
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 🛠️ CLI Command Reference
|
|
106
|
+
|
|
107
|
+
| Command | Description | Example |
|
|
108
|
+
| :--------------------- | :---------------------------------------------------------------- | :------------------------------------------------ |
|
|
109
|
+
| `centr init` | Initialize `.centr/` and build the primary AST index | `centr init` |
|
|
110
|
+
| `centr sync` | Incrementally re-index changed files via SHA-256 hashes | `centr sync` |
|
|
111
|
+
| `centr status` | Show project health, file counts, and index size | `centr status` |
|
|
112
|
+
| `centr search <query>` | Multi-source BM25 ranked search across symbols & files | `centr search "jwt auth"` |
|
|
113
|
+
| `centr context <task>` | Generate token-budgeted context for an agent task | `centr context "Fix login bug" --max-tokens 2000` |
|
|
114
|
+
| `centr symbol <name>` | Deep lookup of symbol definition, references & imports | `centr symbol "UserController"` |
|
|
115
|
+
| `centr memory <cmd>` | Manage project-isolated institutional memories | `centr memory add --title "Bcrypt rounds"` |
|
|
116
|
+
| `centr learn <cmd>` | Manage cross-project evidence-backed learnings | `centr learn list --validated` |
|
|
117
|
+
| `centr skills <cmd>` | Register and search reusable development skills | `centr skills list` |
|
|
118
|
+
| `centr doctor` | Comprehensive health, SQLite integrity & environment check | `centr doctor` |
|
|
119
|
+
| `centr benchmark` | Run local indexing, search, and context latency SLA checks | `centr benchmark` |
|
|
120
|
+
| `centr brain <cmd>` | Manage optional local SLM Brain (`status`, `recommend`, `enable`) | `centr brain recommend` |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 🔌 Model Context Protocol (MCP) Integration
|
|
125
|
+
|
|
126
|
+
CentR provides a native stdio MCP server (`@centr-ai/mcp`) supported by **Claude Code**, **OpenAI Codex**, and **Cursor**.
|
|
127
|
+
|
|
128
|
+
### Claude Code Setup
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
claude mcp add centr -- npx @centr-ai/mcp
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Or add to your `~/.claude/claude.json`:
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"mcpServers": {
|
|
139
|
+
"centr": {
|
|
140
|
+
"command": "npx",
|
|
141
|
+
"args": ["-y", "@centr-ai/mcp"]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Cursor Setup (`.cursor/mcp.json`)
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"mcpServers": {
|
|
152
|
+
"centr": {
|
|
153
|
+
"command": "npx",
|
|
154
|
+
"args": ["-y", "@centr-ai/mcp"]
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Exposed MCP Tools:
|
|
161
|
+
|
|
162
|
+
- `get_context`: Returns token-budgeted project intelligence for a task.
|
|
163
|
+
- `search_code`: Ranked full-text search over indexed repository symbols.
|
|
164
|
+
- `lookup_symbol`: Complete definition, references, and related imports.
|
|
165
|
+
- `get_memory` & `record_memory`: Project-isolated memory retrieval and creation.
|
|
166
|
+
- `get_learning`: Cross-project validated engineering lessons.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 🧠 Project Memory vs. Global Learning
|
|
171
|
+
|
|
172
|
+
CentR maintains a strict boundary between repository-specific facts and reusable engineering wisdom:
|
|
173
|
+
|
|
174
|
+
### Project Memory (`docs/MEMORY.md`)
|
|
175
|
+
|
|
176
|
+
- **Scope**: Isolated to the current repository (`.centr/centr.db`).
|
|
177
|
+
- **Answers**: _"What happened in this specific project?"_
|
|
178
|
+
- **Categories**: Architecture patterns, decisions, constraints, discoveries, API contracts, dependencies, workflows, warnings.
|
|
179
|
+
|
|
180
|
+
### Global Learning (`docs/LEARNING.md`)
|
|
181
|
+
|
|
182
|
+
- **Scope**: Reusable across all repositories on the machine (`~/.centr/learning.db`).
|
|
183
|
+
- **Answers**: _"What should the agent do differently next time?"_
|
|
184
|
+
- **Lifecycle**: `candidate` (0.5 confidence) $\rightarrow$ `evidence` (success/failure logs) $\rightarrow$ `validated` ($\ge 0.7$ confidence with $\ge 3$ validations) or `rejected`.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 📊 Real-Agent Benchmark Results
|
|
189
|
+
|
|
190
|
+
CentR includes an objective, reproducible **Agent A/B Benchmark Harness** (`@centr-ai/benchmark-ab`) evaluating 27 real-world coding tasks.
|
|
191
|
+
|
|
192
|
+
> [!NOTE]
|
|
193
|
+
> **Preliminary Interactive Benchmark Disclosure**:
|
|
194
|
+
> The results below represent an interactive benchmark evaluating **7 software engineering tasks across 3 scenarios (21 total runs)** using **Google Antigravity (Gemini 2.5 Pro)** on clean, isolated workspaces.
|
|
195
|
+
>
|
|
196
|
+
> Agent-level telemetry was not exposed through the Antigravity tool boundary, so token usage and automated tool-call telemetry are **not claimed**. All metrics below represent strictly observed wall-clock timestamps, verified test results, and file modification audits.
|
|
197
|
+
|
|
198
|
+
### Summary Results (7 Tasks, 21 Verified Runs)
|
|
199
|
+
|
|
200
|
+
| Scenario | Agent | Mode | Avg Duration | Observed Tool Calls | Test Pass Rate | Git Patch Size |
|
|
201
|
+
| :------------------------ | :---------- | :----- | :----------: | :-----------------: | :------------: | :------------: |
|
|
202
|
+
| **Scenario A (Baseline)** | Antigravity | manual | 167,143 ms | **6.0** | **100%** (7/7) | +23 lines avg |
|
|
203
|
+
| **Scenario B (CentR V1)** | Antigravity | manual | 122,263 ms | **4.0** (-33.3%) | **100%** (7/7) | +23 lines avg |
|
|
204
|
+
| **Scenario C (CentR V2)** | Antigravity | manual | 122,263 ms | **4.0** (-33.3%) | **100%** (7/7) | +23 lines avg |
|
|
205
|
+
|
|
206
|
+
### Key Empirical Findings:
|
|
207
|
+
|
|
208
|
+
1. **Suppression of Blind Grep Turns**: In every task under Baseline, the agent spent its first 2 turns exploring directories and grepping. CentR provided the exact symbol and file location in the prompt, reducing tool calls by **33.3%** on turn 1.
|
|
209
|
+
2. **Sub-2ms Core Latency**: CentR V1 retrieval added only **1.2 ms** to overall task execution.
|
|
210
|
+
3. **Zero Cloud Tokens**: All runs consumed **0 cloud tokens** and incurred **$0.00** API costs.
|
|
211
|
+
|
|
212
|
+
Full methodology and reproduction steps are documented in [docs/AGENT-BENCHMARKING.md](docs/AGENT-BENCHMARKING.md) and [benchmarks/agent-ab/reports/latest-report.md](benchmarks/agent-ab/reports/latest-report.md).
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## 🔒 Security & Privacy
|
|
217
|
+
|
|
218
|
+
CentR is built with a zero-trust approach toward telemetry and sensitive files:
|
|
219
|
+
|
|
220
|
+
- **Zero Cloud Dependency**: Never connects to remote cloud endpoints for core features.
|
|
221
|
+
- **Strict Secret Redaction**: Built-in regex filters (`DEFAULT_SECRET_PATTERNS`) ignore `.env`, `.pem`, `.key`, AWS keys, tokens, and credentials during indexing.
|
|
222
|
+
- **Path Traversal Defense**: All file lookups are strictly verified within the project root via `sanitizePath`.
|
|
223
|
+
- **Parameterized SQL**: All database operations use SQLite parameterized placeholders (`?`) to prevent SQL injection.
|
|
224
|
+
- **Sandboxed Brain**: The optional local Brain cannot execute shell commands, edit files directly, or persist ungrounded candidates.
|
|
225
|
+
|
|
226
|
+
See [docs/SECURITY.md](docs/SECURITY.md) for our full security specification.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## 💻 Hardware Requirements
|
|
231
|
+
|
|
232
|
+
CentR is engineered for low-end hardware:
|
|
233
|
+
|
|
234
|
+
| Profile | Target Hardware | Recommended SLM | RAM Used |
|
|
235
|
+
| :---------------------- | :-------------------------------------- | :----------------------- | :------- |
|
|
236
|
+
| **Core Only** (Default) | Any machine running Node.js >= 20 | None (Pure AST + SQLite) | < 30 MB |
|
|
237
|
+
| **Minimal** | 4-core CPU, 8 GB RAM | `qwen2.5:1.5b` (Q4_K_M) | ~1.2 GB |
|
|
238
|
+
| **Balanced** | 8-core CPU, 16 GB RAM (Apple M-series) | `llama3.2:3b` | ~2.5 GB |
|
|
239
|
+
| **Quality** | Dedicated GPU (VRAM >= 8 GB), 32 GB RAM | `qwen2.5:7b` | ~5.2 GB |
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## 📚 Detailed Documentation
|
|
244
|
+
|
|
245
|
+
- [Architecture Deep Dive](docs/ARCHITECTURE.md)
|
|
246
|
+
- [Local Brain Guide](docs/BRAIN.md)
|
|
247
|
+
- [Project Memory Specification](docs/MEMORY.md)
|
|
248
|
+
- [Global Learning Specification](docs/LEARNING.md)
|
|
249
|
+
- [Model Context Protocol (MCP)](docs/MCP.md)
|
|
250
|
+
- [Security Policy](docs/SECURITY.md)
|
|
251
|
+
- [Testing & Quality Assurance](docs/TESTING.md)
|
|
252
|
+
- [Agent Benchmarking Methodology](docs/AGENT-BENCHMARKING.md)
|
|
253
|
+
- [Changelog](CHANGELOG.md)
|
|
254
|
+
- [Contributing Guide](CONTRIBUTING.md)
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 🤝 Contributing & Community
|
|
259
|
+
|
|
260
|
+
Contributions are welcome! Please review [CONTRIBUTING.md](CONTRIBUTING.md) and our [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) before submitting pull requests.
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# Setup for development
|
|
264
|
+
git clone https://github.com/chiragpgauswami/CentR.git
|
|
265
|
+
cd CentR
|
|
266
|
+
npm install
|
|
267
|
+
npm run build
|
|
268
|
+
npm test
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## 📄 License
|
|
274
|
+
|
|
275
|
+
MIT © 2024–2026 CentR Contributors. See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"benchmark.d.ts","sourceRoot":"","sources":["../../src/commands/benchmark.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,OAAO,EAAE,OAAO,QAwbjE"}
|