6 Commits

Author SHA1 Message Date
Val-sss
a99dcfe255 fix: move tree-sitter back to base deps (pre-built wheels available)
tree-sitter and tree-sitter-python provide pre-built wheels for
Windows/Mac/Linux on Python 3.10-3.12, so no compiler needed.
AST engine is now always installed with base package.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-30 12:16:23 +08:00
Val-sss
edd7e5d1ee feat: publish to PyPI + fix installation issues
- Restructure deps: move llama-cpp-python/tree-sitter to optional
  (base install is pure Python, no compiler needed)
- Add __main__.py for pipx/python -m support
- Add GitHub Actions auto-publish on tag push
- Fix install scripts: correct package name, remove Ollama check,
  add pipx priority
- Wrap ast_engine imports in try/except for graceful degradation
- Published v1.0.7 to PyPI: pip install kwcode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-30 11:45:56 +08:00
Val-sss
c6197d0316 v0.7.0: P1+P2+搜索重构+UI全面优化
P1: KWCODE.md规则注入、/plan风险评估、Checkpoint快照、DocReader
P2: 模型能力自适应、飞轮通知、价值量化仪表盘
搜索: 四级提取管道、并行搜索+BM25重排、意图感知、ChatExpert门控
UI: spinner动画、结果摘要、静默日志、重影大字Header
新增: kwcode setup-search 一键安装SearXNG
测试: 282/282 PASS (含17个E2E真实模型测试)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-28 17:52:59 +08:00
Val-sss
8660e26b1a Rename CLI command kaiwu → kwqode
- Entry point: kwqode = "kaiwu.cli.main:app"
- Display name: KwQode (banners, help, REPL prompt)
- MCP tool: kwqode_execute
- Python package name kaiwu/ and imports unchanged
- .kaiwu/ config dir and KAIWU.md unchanged

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 10:01:04 +08:00
Val-sss
5e6a4096a8 China network optimization: proxy, Bing fallback, ModelScope auto-switch
Three-layer China network support:
1. Model download: auto-detect HuggingFace connectivity, switch to
   ModelScope when unreachable. MODELSCOPE_MODELS mapping added.
2. Search: DDG primary, auto-fallback to cn.bing.com HTML scraping
   when DDG fails (SEARCH-RED-5 revised). Zero API keys.
3. Fetch: all httpx calls now support KAIWU_PROXY/HTTPS_PROXY env var
   and ~/.kaiwu/config.yaml proxy field.

New module: kaiwu/core/network.py — unified network detection + proxy config.
CLI shows network status hint on startup when China network detected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 09:48:49 +08:00
Val-sss
5668419bdf Kaiwu v0.4: expert registry, flywheel, 3-layer memory, MCP router
Major additions:
- Expert registry with 12 builtin experts (keyword matching, lifecycle)
- 3-layer memory system (PROJECT.md / EXPERT.md / PATTERN.md)
- Expert flywheel (trajectory → pattern → generate → 3-gate → lifecycle)
- Expert packaging (.kwx import/export)
- KaiwuMCP Router (single kaiwu_execute tool)
- CLI subcommands: expert list/info/export/install/remove/create, status, serve-mcp
- V5/V6 validation script frameworks
- Install scripts (install.ps1 + install.sh) with Chinese mirror support
- README_zh.md Chinese documentation

Verified: 24/24 tests pass, E2E fibonacci bug fix (gemma3:4b, 22.4s),
10/10 CORE red line constraints satisfied, Windows cmd native OK.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 00:18:04 +08:00