Skip to content

Swift Implementation#1

Merged
mdgld merged 4 commits into
mainfrom
feat/python-dual-backend-fork
Jun 24, 2026
Merged

Swift Implementation#1
mdgld merged 4 commits into
mainfrom
feat/python-dual-backend-fork

Conversation

@mdgld

@mdgld mdgld commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Replace Python stub with production-ready Swift implementation:

  • Store.swift: GRDB-backed SQLite schema (metadata/files/chunks/vectors),
    WAL mode, cascade deletes, vector blob storage, SHA-256 incremental skip
  • Indexer.swift: walk→chunk→embed→store actor pipeline with progress callbacks
    and batch MLX embedding (32 chunks/call)
  • Search.swift: cosine similarity semantic, LIKE regex, RRF hybrid (k=60)
  • CkMLX.swift: IndexCmd, SearchCmd (--mode/--threshold/--jsonl), StatusCmd
    with model/dimension/counts/updated/size reporting
  • CkMLXMCPServer: JSON-RPC 2.0 stdio MCP server (ck-mlx-mcp binary) with
    4 tools: semantic_search, hybrid_search, regex_search, index_status;
    reads embedding_model from index metadata to avoid dimension mismatch
  • 9/9 tests passing; swift build + swift build -c release both clean
  • fix(server.py): handle Store init ValueError when embedding dim unknown

mdgld and others added 4 commits June 22, 2026 00:17
…CP server

Replace Python stub with production-ready Swift implementation:

- Store.swift: GRDB-backed SQLite schema (metadata/files/chunks/vectors),
  WAL mode, cascade deletes, vector blob storage, SHA-256 incremental skip
- Indexer.swift: walk→chunk→embed→store actor pipeline with progress callbacks
  and batch MLX embedding (32 chunks/call)
- Search.swift: cosine similarity semantic, LIKE regex, RRF hybrid (k=60)
- CkMLX.swift: IndexCmd, SearchCmd (--mode/--threshold/--jsonl), StatusCmd
  with model/dimension/counts/updated/size reporting
- CkMLXMCPServer: JSON-RPC 2.0 stdio MCP server (ck-mlx-mcp binary) with
  4 tools: semantic_search, hybrid_search, regex_search, index_status;
  reads embedding_model from index metadata to avoid dimension mismatch
- 9/9 tests passing; swift build + swift build -c release both clean
- fix(server.py): handle Store init ValueError when embedding dim unknown

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019rS8sKKTSAFpT3x2tEBBgD
@mdgld mdgld requested a review from Copilot June 24, 2026 20:46
@mdgld mdgld added the enhancement New feature or request label Jun 24, 2026
@mdgld mdgld changed the title Feat/python dual backend fork Swift Implementation Jun 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@mdgld mdgld merged commit c535bda into main Jun 24, 2026
1 check failed
@mdgld mdgld deleted the feat/python-dual-backend-fork branch June 24, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants