rust-faf-mcp 0.5.1 → 0.7.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/README.md +26 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
**Persistent Project Context for Rust MCP clients. Native. Fast. cargo install**
|
|
8
8
|
|
|
9
|
-
**The
|
|
9
|
+
**The Table-of-8 Edition (v0.7.0)** — `one.faf/rust-faf-mcp` · **rmcp 3.0.1** (MCP Tier 1 foundation) · **faf-rust-sdk 3.1** (the same always-33 kernel `faf-wasm-sdk` uses) · solid cargo-native Rust MCP for Rust devs
|
|
10
10
|
|
|
11
|
-
**v0.
|
|
11
|
+
**v0.7.0** — Setup and Sweep confirm AI's side of the bargain. The Table-of-8 is human approved. See [CHANGELOG](./CHANGELOG.md#070---2026-09-01--the-table-of-8-edition).
|
|
12
12
|
|
|
13
13
|
**FAF defines. MD instructs. AI codes.**
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
[](https://crates.io/crates/rust-faf-mcp)
|
|
18
18
|
[](https://faf.one)
|
|
19
|
-
[](https://github.com/Wolfe-Jam/rust-faf-mcp)
|
|
20
20
|
[](https://www.iana.org/assignments/media-types/application/vnd.faf+yaml)
|
|
21
21
|
[](LICENSE)
|
|
22
22
|
|
|
@@ -61,18 +61,23 @@ brew install Wolfe-Jam/faf/rust-faf-mcp
|
|
|
61
61
|
|
|
62
62
|
## One command, done forever
|
|
63
63
|
|
|
64
|
-
`faf_auto`
|
|
64
|
+
`faf_auto` runs **setup** if `project.faf` is missing (tree detection writes mechanical facts), then syncs `CLAUDE.md`. It does not rewrite an existing file. **Confirm setup (sweeps)** lists what setup occupied — walk it; not a second write-gate. Empty human slots stay empty until you state them.
|
|
65
65
|
|
|
66
66
|
```
|
|
67
67
|
faf_auto complete
|
|
68
68
|
━━━━━━━━━━━━━━━━━
|
|
69
|
-
Score: 0% →
|
|
69
|
+
Score: 0% → 42% (+42) ● GREEN
|
|
70
70
|
Steps:
|
|
71
|
-
1.
|
|
72
|
-
2.
|
|
73
|
-
3. Created CLAUDE.md
|
|
71
|
+
1. Setup — created project.faf
|
|
72
|
+
2. Created CLAUDE.md
|
|
74
73
|
|
|
75
74
|
Path: /home/user/my-project
|
|
75
|
+
|
|
76
|
+
Confirm setup (sweeps)
|
|
77
|
+
Walk these. Detection is already a fact. Not a second write-gate.
|
|
78
|
+
project.name my-api
|
|
79
|
+
project.main_language Rust
|
|
80
|
+
stack.backend Rust
|
|
76
81
|
```
|
|
77
82
|
|
|
78
83
|
What it produces:
|
|
@@ -109,8 +114,9 @@ Every AI agent reads this once and knows exactly what you're building. No 20-min
|
|
|
109
114
|
|
|
110
115
|
| Tool | What it does |
|
|
111
116
|
|------|-------------|
|
|
112
|
-
| `faf_auto` |
|
|
113
|
-
| `faf_init` |
|
|
117
|
+
| `faf_auto` | Setup if missing, sync `CLAUDE.md`, score — Confirm setup (sweeps); does not invent 6Ws |
|
|
118
|
+
| `faf_init` | Setup: first write from the tree. Refuses if the file exists. Confirm setup (sweeps). 6Ws stay empty |
|
|
119
|
+
| `faf_go` | Table-of-8 + Confirm setup (sweeps). 6Ws score after ☑. Below 100: add Human Context. After 100: courtesy check every 30 days (90 max) |
|
|
114
120
|
| `faf_git` | Generate `project.faf` from any GitHub repo URL — no clone needed |
|
|
115
121
|
| `faf_discover` | Walk up the directory tree to find the nearest `project.faf` |
|
|
116
122
|
|
|
@@ -120,6 +126,7 @@ Every AI agent reads this once and knows exactly what you're building. No 20-min
|
|
|
120
126
|
|------|-------------|
|
|
121
127
|
| `faf_score` | Score AI-readiness 0-100% with field-level breakdown |
|
|
122
128
|
| `faf_sync` | Sync `project.faf` → `CLAUDE.md` (preserves existing content) |
|
|
129
|
+
| `faf_agents` | Generate `AGENTS.md` from `project.faf` (non-destructive, preserves hand-written content) |
|
|
123
130
|
|
|
124
131
|
### Optimize
|
|
125
132
|
|
|
@@ -129,7 +136,7 @@ Every AI agent reads this once and knows exactly what you're building. No 20-min
|
|
|
129
136
|
| `faf_compress` | Compress `.faf` for token-limited contexts (`minimal` / `standard` / `full`) |
|
|
130
137
|
| `faf_tokens` | Estimate token count at each compression level |
|
|
131
138
|
|
|
132
|
-
`faf_init`
|
|
139
|
+
`faf_init` will not overwrite an existing file. Setup occupies mechanical facts; Confirm setup (sweeps) is the walk. Empty human slots stay empty until `faf_go`.
|
|
133
140
|
|
|
134
141
|
## Architecture
|
|
135
142
|
|
|
@@ -137,22 +144,22 @@ Every AI agent reads this once and knows exactly what you're building. No 20-min
|
|
|
137
144
|
src/
|
|
138
145
|
├── main.rs # ~20 lines — tokio entry, rmcp stdio transport
|
|
139
146
|
├── server.rs # FafServer: #[tool_router], ServerHandler, resources
|
|
140
|
-
└── tools.rs # Business logic —
|
|
147
|
+
└── tools.rs # Business logic — tools as pure functions returning Value
|
|
141
148
|
```
|
|
142
149
|
|
|
143
150
|
- **Runtime**: `tokio` single-threaded (`current_thread`)
|
|
144
151
|
- **HTTP**: `reqwest` async (only used by `faf_git` for GitHub API)
|
|
145
|
-
- **SDK**: `faf-rust-sdk` **3.
|
|
152
|
+
- **SDK**: `faf-rust-sdk` **3.1** (Cargo pin — the facade over `faf-kernel`/`faf-fafb` in [faf-rust](https://github.com/Wolfe-Jam/faf-rust); `score()` for the real Mk4 number, `validate()` for structural checks only)
|
|
146
153
|
- **Server**: **`rmcp` 3.0.1** with `#[tool_router]` / `#[tool_handler]` — JSON-RPC, schema generation, stdio transport (Tier-1 assessed SDK cut)
|
|
147
154
|
|
|
148
155
|
Tools return `serde_json::Value`. The server adapts them to `Result<String, String>` for rmcp's `IntoCallToolResult`.
|
|
149
156
|
|
|
150
157
|
## Testing
|
|
151
158
|
|
|
152
|
-
|
|
159
|
+
171 tests (136 integration + 35 unit):
|
|
153
160
|
|
|
154
161
|
```bash
|
|
155
|
-
cargo test # runs all
|
|
162
|
+
cargo test # runs all 171
|
|
156
163
|
|
|
157
164
|
# Full ship bar (same gates as GitHub CI — run before push)
|
|
158
165
|
bash scripts/ci.sh
|
|
@@ -163,12 +170,13 @@ bash scripts/install-hooks.sh
|
|
|
163
170
|
| File | Tests | Coverage |
|
|
164
171
|
|------|-------|----------|
|
|
165
172
|
| `mcp_protocol.rs` | 9 | Init handshake, tools/list, resources, schema validation, ID preservation |
|
|
166
|
-
| `tools_functional.rs` |
|
|
173
|
+
| `tools_functional.rs` | 31 | Tools — happy path, error paths, language detection, faf_go |
|
|
167
174
|
| `tier1_security.rs` | 12 | Path traversal, null bytes, shell injection, oversized input, malformed JSON |
|
|
168
|
-
| `tier2_engine.rs` |
|
|
175
|
+
| `tier2_engine.rs` | 36 | Corrupt YAML, sync replacement, pipelines, dual manifests, legacy filenames, direct paths |
|
|
169
176
|
| `tier3_edge_cases.rs` | 10 | Unicode, CJK, score boundaries, unknown fields, GitHub URL parsing |
|
|
170
177
|
| `tier4_aero.rs` | 22 | Manifest structure, version sync, server.json, context block, manifest-server cross-validation |
|
|
171
|
-
| `
|
|
178
|
+
| `wjttc_setup.rs` | 16 | Setup / Confirm setup (sweeps) — BRAKE · ENGINE · AERO · TYRE · PIT |
|
|
179
|
+
| `src` unit | 35 | setup sweep, skills digest, `agents::`, `inject::`, intent, app-type |
|
|
172
180
|
|
|
173
181
|
Tests spawn the compiled binary as a subprocess and communicate via stdin/stdout JSON-RPC — true integration tests against the real server.
|
|
174
182
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rust-faf-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"mcpName": "one.faf/rust-faf-mcp",
|
|
5
5
|
"description": "Persistent project context — Rust-native MCP server. IANA-registered .faf format. npm shim downloads the native binary from GitHub Releases.",
|
|
6
6
|
"license": "MIT",
|