Skip to content

Commit 73efea9

Browse files
author
SIN-Agent
committed
feat(bundle): v0.5.0 — standalone mcp_server.py + 28 tools
Adds the standalone mcp_server.py module (per user request — was previously only embedded in cli.py::serve). New console scripts: - sin-serve (primary) - sin-serve-mcp (alias) Now exposes 28 MCP tools (was 24) with 4 new ones: - sin_vfs_resolve — resolve sckg://, poc://, ibd://, adw://, efsm://, oracle://, conflict:// to structured content - sin_vfs_schemes — list all URI schemes - sin_ast_edit — tree-sitter AST edit + POC verification (falls back to hashline if tree-sitter missing) - sin_hashline_validate — validate a previously-created hashline patch Plus the review tool from sin-code-review-interface subsystem. README updated with: - Full 28-tool MCP inventory table - Native → SIN tool coverage table (read/write/edit/bash/search/find/grep/ glob/list/webfetch/task → sin_* tools) - Console script examples + install verification Verified: - sin-serve MCP handshake returns 28 tools - All 4 new tools callable via tools/call - sin serve (legacy) returns same 28 tools Bumps to v0.5.0
1 parent 15ff4de commit 73efea9

4 files changed

Lines changed: 719 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9797
- All 9 subsystem Python packages importable
9898
- `sin serve` exposes 24 tools via `tools/list` MCP handshake
9999
- `pip install -e .[all]` completes successfully
100+
101+
## [0.5.0] - 2026-06-04 — Standalone mcp_server.py + 28 tools + README coverage
102+
103+
### Added
104+
- **`src/sin_code_bundle/mcp_server.py`** — standalone MCP server module
105+
(in addition to `cli.py::serve`). Invoke via:
106+
- `python -m sin_code_bundle.mcp_server`
107+
- `sin-serve` console script
108+
- `sin serve` (legacy, identical)
109+
- **2 new console scripts**: `sin-serve`, `sin-serve-mcp`
110+
- **4 new MCP tools** (sin serve now exposes **28** instead of 24):
111+
- `sin_vfs_resolve` — resolve a SIN URI scheme (`sckg://`, `poc://`, etc.) to structured content
112+
- `sin_vfs_schemes` — list all available URI schemes with descriptions
113+
- `sin_ast_edit` — tree-sitter AST-based edit with POC verification, falls back to hashline
114+
- `sin_hashline_validate` — validate a previously-created hashline patch can still be applied
115+
- **`review` tool** from sin-code-review-interface subsystem
116+
- **README**: full tool-coverage table (native → SIN) + 28-tool MCP inventory
117+
+ console script examples + install verification
118+
119+
### Changed
120+
- `pyproject.toml` adds `sin-serve` and `sin-serve-mcp` console scripts
121+
- Bundle version bumped to 0.5.0
122+
123+
### Verified
124+
- `sin-serve` MCP handshake returns **28 tools**
125+
- All 4 new tools (sin_vfs_resolve, sin_vfs_schemes, sin_ast_edit, sin_hashline_validate) functional
126+
- `sin serve` (legacy) still works, returns same 28 tools

‎README.md‎

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ verification oracle.
3838
## What the Bundle does
3939

4040
- Provides a single `sin` CLI over all subsystems.
41-
- Exposes a unified MCP server so one entry serves agents all tools.
41+
- Exposes a unified MCP server (`sin serve` or `sin-serve`) so one entry
42+
serves agents **28 tools** out of the box.
4243
- **Auto-detects and installs external MCP servers**: `gitnexus` (graph context)
4344
and `simone-mcp` (code intelligence) are checked and installed if missing.
4445
- **Checks 8 Python subsystems**: SCKG, IBD, POC, EFSM, ADW, Oracle,
@@ -47,6 +48,71 @@ verification oracle.
4748
- **Degrades gracefully**: each subsystem is an optional dependency. The bundle
4849
detects which are installed (`sin status`) and only wires up what's available.
4950

51+
## MCP tools exposed (28 total)
52+
53+
The `sin-serve` MCP server (or equivalently `sin serve`) replaces opencode's
54+
native read/write/edit/bash/search with SIN-Code tools that add structural
55+
understanding, secret-redaction, hashline-anchored edits, and semantic
56+
URI resolution.
57+
58+
| # | Tool | Replaces | Subsystem | What it does |
59+
|---|------|----------|-----------|--------------|
60+
| 1 | **`sin_read`** | `read` | vfs + grasp | URI-scheme (`sckg://`, `poc://`, `ibd://`, etc.) aware, size-safe, summarize mode |
61+
| 2 | **`sin_write`** | `write` | atomic + AST | Atomic write with auto-backup + syntax pre-validation for .py/.ts/.js/.go |
62+
| 3 | **`sin_edit`** | `edit` | hashline | Hashline-anchored semantic patches (line-shift resilient, content-hash) |
63+
| 4 | **`sin_bash`** | `bash` | execute (Go) | Safe exec with secret-redaction + timeout + structured JSON (safety_check, retry_info, learned_patterns) |
64+
| 5 | **`sin_search`** | `search`/`find`/`grep`/`glob` | scout (Go) + Python | Semantic + regex + symbol + usage search, single-file + directory |
65+
| 6 | `sin_vfs_resolve` | (new) | vfs | Resolve URI scheme → structured content |
66+
| 7 | `sin_vfs_schemes` | (new) | vfs | List all available URI schemes |
67+
| 8 | `sin_ast_edit` | (new) | ast_edit | Tree-sitter AST-based edit with POC verification |
68+
| 9 | `sin_hashline_validate` | (new) | hashline | Validate a previously-created hashline patch |
69+
| 10 | `impact` | (new) | sin-code-sckg | Blast-radius impact analysis for a symbol |
70+
| 11 | `semantic_diff` | (new) | sin-code-ibd | Semantic intent diff between two files |
71+
| 12 | `semantic_review` | (new) | sin-code-ibd | Intent + risk in one call |
72+
| 13 | `architectural_debt` | (new) | sin-code-adw | Current architectural debt score |
73+
| 14 | `verify_tests` | (new) | sin-code-oracle | Verify agent-generated code (security/perf/correctness) |
74+
| 15 | `prove` | (new) | sin-code-poc | Generate and verify proofs of correctness |
75+
| 16 | `mock_env` | (new) | sin-code-efsm | Manage ephemeral full-stack mock environment |
76+
| 17 | `orchestrate` | (new) | sin-code-orchestration | Submit a task to the multi-agent orchestrator |
77+
| 18 | `task_status` | (new) | sin-code-orchestration | Get status of an orchestrated task |
78+
| 19 | `review` | (new) | sin-code-review-interface | SOTA review on a single file |
79+
| 20 | `recall_tool` | (new) | sin-brain | Search memory tiers (recall/archival/graph) |
80+
| 21 | `remember_tool` | (new) | sin-brain | Persist a memory entry (decision/convention/fix/pitfall/preference) |
81+
| 22 | `forget_tool` | (new) | sin-brain | Delete a memory entry by id |
82+
| 23 | `pin_tool` | (new) | sin-brain | Pin a memory entry (never evicted) |
83+
| 24 | `link_evidence_tool` | (new) | sin-brain | Attach a subsystem verdict to a memory |
84+
| 25 | `gitnexus_context` | (new) | gitnexus | Structural graph context for a symbol |
85+
| 26 | `gitnexus_impact` | (new) | gitnexus | Blast-radius impact via graph (auto-indexes) |
86+
| 27 | `gitnexus_ai_context` | (new) | gitnexus | Task-scoped, graph-aware context bundle |
87+
| 28 | `markitdown_convert` | (new) | markitdown | Convert PDF/DOCX/PPTX/XLSX/image → Markdown |
88+
| 29 | `codocs_check` | (new) | codocs | Find broken co-located `.doc.md` references |
89+
90+
### Native → SIN tool coverage (mandatory in `~/.config/opencode/opencode.json`)
91+
92+
| Native opencode tool | SIN replacement | Notes |
93+
|----------------------|-----------------|-------|
94+
| `read` | `sin_read` | URI-aware, size-safe, summarize mode |
95+
| `write` | `sin_write` | Atomic + syntax-validate + auto-backup |
96+
| `edit` | `sin_edit` | Hashline-anchored, line-shift resilient |
97+
| `bash` | `sin_bash` | Secret-redaction + timeout + structured JSON |
98+
| `search` | `sin_search` | Semantic + regex + symbol + usage |
99+
| `find` | `sin_search` (path=dir) | Directory rglob fallback |
100+
| `grep` | `sin_search` (search_type=regex) | Pattern search across files |
101+
| `glob` | `sin_search` (regex) | Pattern-match file paths |
102+
| `list` | `sin_read` (path=dir) | Returns `{"type": "directory", "items": [...]}` |
103+
| `webfetch` | `sin_bash` (`curl ...`) or `sin_search` (URL) | HTTP fetch via bash |
104+
| `task` | `sin_bash` (`sin orchestrate ...`) | Subagent via orchestrate subsystem |
105+
106+
The `~/.config/opencode/opencode.json` shipped with this repo sets:
107+
```json
108+
{
109+
"tools": { "read/write/edit/bash/search/find/grep/glob/list/webfetch/task": false },
110+
"mcp": { "sin-code-bundle": { "type": "local", "command": ["sin", "serve"], "enabled": true } }
111+
}
112+
```
113+
Native tools are disabled by the global AGENTS.md mandate so agents use
114+
the SIN-Code replacements exclusively.
115+
50116
## Quickstart
51117

52118
### One-command full install

‎pyproject.toml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "sin-code-bundle"
7-
version = "0.4.0"
7+
version = "0.5.0"
88
description = "Structural intelligence for AI coding agents: impact analysis, semantic diff, architectural-debt breaker, and an independent verification Oracle — over MCP."
99
readme = "README.md"
1010
requires-python = ">=3.11"
@@ -85,6 +85,8 @@ Issues = "https://github.com/OpenSIN-Code/SIN-Code-Bundle/issues"
8585

8686
[project.scripts]
8787
sin = "sin_code_bundle.cli:app"
88+
sin-serve = "sin_code_bundle.mcp_server:main"
89+
sin-serve-mcp = "sin_code_bundle.mcp_server:main"
8890

8991
[tool.setuptools.packages.find]
9092
where = ["src"]
@@ -98,7 +100,7 @@ testpaths = ["tests"]
98100

99101
[tool.ruff]
100102
line-length = 100
101-
target-version = "0.4.0"
103+
target-version = "0.5.0"
102104
# CoDocs example fixtures demonstrate doc co-location, not runnable code.
103105
extend-exclude = ["examples", "build", "dist"]
104106

0 commit comments

Comments
 (0)