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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ jobs:
shell: pwsh
run: |
git fetch origin main
tools/invariant-checks/run-checks.ps1
scripts/invariant-checks/run-checks.ps1
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,9 @@ backup-*.db
# OS metadata
.DS_Store
Thumbs.db
tools/embedding-provider/__pycache__/

tools/embedding-provider/__pycache__/

examples/embedding-provider/__pycache__/

.agents/
.venv/
spike/**/target/
coverage_report.txt
/releases/
.kimi/
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Tantivy 一致性修复 — `repair_tantivy_consistency_at()` 启动时自动检测 orphan/missing 文档
- 性能回归基线 — `test_keyword_search_latency_regression_1k` / `_10k`(profile-aware 阈值)
- `TempStorageBackend` — 测试隔离后端,消除 `DEVBASE_DATA_DIR` 竞态
- **Architecture Invariants CI 自动化** — `tools/invariant-checks/run-checks.ps1`
- **Architecture Invariants CI 自动化** — `scripts/invariant-checks/run-checks.ps1`
- G5 (RF-6):diff-only 检测新增生产代码 `unwrap`/`expect`/`panic`(排除 `#[cfg(test)]`)
- T11:`mcp/tools` 禁止直接调用 `rusqlite::Connection`
- T12:`tui/render` 纯消费检查(禁止写入操作)
Expand Down Expand Up @@ -172,7 +172,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 新增: `python`, `bun`, `zig`, `java`
- `get_tool_version` 支持 stderr fallback (Java 输出到 stderr)
- `fmt_version` 改进: Java 引号提取、Docker/Python 格式处理
- **P5: 架构不变量自动化 CI** — `tools/invariant-checks/run-checks.ps1`
- **P5: 架构不变量自动化 CI** — `scripts/invariant-checks/run-checks.ps1`
- G5: diff-only 检测新增生产代码 unwrap/expect/panic(排除 `#[cfg(test)]`)
- T11: 检测 `mcp/tools/*` 直接调用 `rusqlite::Connection`
- T12: 检测 `tui/render/*` 写入操作
Expand Down Expand Up @@ -485,7 +485,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Schema v13: `code_symbol_links` table (source_repo, source_symbol, target_repo, target_symbol, link_type, strength)
- `src/symbol_links.rs`: `compute_similar_signature_links()` (Jaccard token overlap), `compute_co_located_links()` (same-file clustering)
- `generate_and_save_links()`: persists links with ON CONFLICT IGNORE upsert
- **External Embedding Provider** — Reference Python implementation in `tools/embedding-provider/`
- **External Embedding Provider** — Reference Python implementation in `examples/embedding-provider/`
- `index.py`: Ollama `/api/embeddings` client, batch generation, cross-platform registry DB path
- Byte-compatible f32 little-endian serialization via `struct.pack`
- CLI: `--repo-id`, `--model`, `--ollama-url`, `--batch-size`, `--force`
Expand Down
4 changes: 2 additions & 2 deletions docs/AGENTS-full.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ done
| 10 | OpLog 结构化 | Schema v12, OplogEventType 枚举, JSON metadata, duration_ms | `7aa2a65` |
| 11 | 性能基准 | criterion benches: index_repo_full, cosine_similarity, extract_symbols, CMake | `8e0f236` |
| 12 | 混合检索核心 | `search::hybrid.rs`: RRF 归并, keyword_search, hybrid_search_symbols | `7fca714` |
| 13 | 外部 Embedding Provider | Python CLI `tools/embedding-provider/`, Ollama 批量生成, 字节兼容序列化 | `574fb96` |
| 13 | 外部 Embedding Provider | Python CLI `examples/embedding-provider/`, Ollama 批量生成, 字节兼容序列化 | `574fb96` |
| 14a | 跨 repo 语义聚合 | `cross_repo_search_symbols()` INTERSECT tag 过滤, `devkit_cross_repo_search` | `8e762c7` |
| 14b | 知识覆盖报告 | `oplog_analytics.rs`: 表存在性容错, 覆盖度/健康度/活动流, `devkit_knowledge_report` | `869bcbf` |
| 15a | 显式知识链接 | Schema v13 `code_symbol_links`, Jaccard 签名相似度, 同文件聚类, `devkit_related_symbols` | `d462209` |
Expand Down Expand Up @@ -453,7 +453,7 @@ v0.11.3 已交付(tagged)。v0.12.0-alpha 全部功能已完成,进入发
**Embedding 状态**:
- `code_embeddings`: **56,722** 行(37.0% 覆盖率),覆盖 10 个仓库
- `skills.embedding`: 3 个 builtin skill 已有 384-dim 向量
- 生成工具:`tools/embedding-provider/skills.py`(sentence-transformers `all-MiniLM-L6-v2`)
- 生成工具:`examples/embedding-provider/skills.py`(sentence-transformers `all-MiniLM-L6-v2`)
- 激活路径:启动 Ollama + `devbase index <repo>` 生成 embedding,或配置远程 provider 于 `config.toml [embedding]` 段

### 2026-05-04 索引性能实验记录
Expand Down
2 changes: 1 addition & 1 deletion docs/theory/three-repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ devbase 的当前架构已经**天然横跨三层**,只是没有明确形式
| `search/hybrid` + `semantic_index` | Layer 1→2 桥梁 | ✅ 成熟:keyword + vector + RRF |
| `mcp/` (31 tools) | Layer 3 (MCP 仓库) | ✅ 成熟:Stable/Beta/Experimental 三级 |
| `vault/` + `skill-sync-prototype` | Layer 2 (Skill 仓库) | 🔄 原型:Vault→Skill 同步设计完成,待实现 |
| `tools/embedding-provider/` | Layer 2→3 桥梁 | ✅ 可用:local.py 引擎无关 |
| `examples/embedding-provider/` | Layer 2→3 桥梁 | ✅ 可用:local.py 引擎无关 |
| **Skill Runtime** (`devbase skill` CLI) | Layer 2 (Skill 仓库) | ❌ 未开始:registry + executor + sandbox |
| **Protocol Adapter** (MCP + OpenAPI 统一) | Layer 3 (MCP 仓库) | ❌ 未开始:ToolRegistry 模式移植 |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pip install cmake

## Differences from Python Provider

| 维度 | Python (`tools/embedding-provider/`) | Rust (`tools/embedding-provider-rs/`) |
| 维度 | Python (`examples/embedding-provider/`) | Rust (`examples/embedding-provider-rs/`) |
|------|--------------------------------------|---------------------------------------|
| 依赖 | `requests` (HTTP) → Ollama | `embellama` (本地 GGUF 直接加载) |
| 运行时 | 需要 Ollama 服务 | 零外部服务,纯本地推理 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ devbase follows an **"outboard brain"** design: the Rust core handles storage, i

```bash
# 1. Clone or navigate into this directory
cd tools/embedding-provider
cd examples/embedding-provider

# 2. Install dependencies
pip install -r requirements.txt
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 juice094
# devbase Architecture Invariant CI Checks
# Run from repo root: tools/invariant-checks/run-checks.ps1
# Run from repo root: scripts/invariant-checks/run-checks.ps1

$ErrorActionPreference = "Stop"
$script:Failed = 0
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion skills/embed-repo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ outputs:
---
# Embed Repository

This skill invokes the local embedding provider (`tools/embedding-provider/local.py`)
This skill invokes the local embedding provider (`examples/embedding-provider/local.py`)
to generate 384-dimensional vectors for all code symbols in the specified repository.

## Usage
Expand Down
21 changes: 0 additions & 21 deletions tools/clean_db.rs

This file was deleted.

Loading