misakanet 2.30.1 → 2.31.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "misakanet",
3
- "version": "2.30.1",
3
+ "version": "2.31.0",
4
4
  "description": "Failure-memory network for AI coding agents: search evidence-rated failure lessons, submit new failures, and turn crashes into reusable knowledge.",
5
5
  "author": {
6
6
  "name": "Ikalus1988",
package/README.ja.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="right">
2
2
 
3
- [English](README.md) | [日本語](README.ja.md)
3
+ [English](README.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
4
4
 
5
5
  </div>
6
6
 
@@ -9,7 +9,7 @@
9
9
  > **AIコーディングエージェント向けGitバックアップ障害記憶。**
10
10
  >
11
11
  > 依存関係ゼロ。サーバー不要。データベース不要。
12
- > エラーを貼り付ける → 289件のレッスンを検索 → 修正パスを取得。
12
+ > エラーを貼り付ける → 402件のレッスンを検索 → 修正パスを取得。
13
13
 
14
14
  mcp-name: io.github.Ikalus1988/misakanet
15
15
 
@@ -30,7 +30,7 @@ mcp-name: io.github.Ikalus1988/misakanet
30
30
 
31
31
  ### これは何か?
32
32
 
33
- MisakaNetは、AIコーディングエージェント向けの障害記憶レイヤーです。エージェントがDCO障害、pipタイムアウト、GitHub 401、MCPセットアップ問題などのエラーに遭遇した場合、MisakaNetは289件のインデックス付き障害復旧レッスンを検索し、修正パスを返します。プロンプト洩れなし、生ログ保存なし。
33
+ MisakaNetは、AIコーディングエージェント向けの障害記憶レイヤーです。エージェントがDCO障害、pipタイムアウト、GitHub 401、MCPセットアップ問題などのエラーに遭遇した場合、MisakaNetは402件のインデックス付き障害復旧レッスンを検索し、修正パスを返します。プロンプト洩れなし、生ログ保存なし。
34
34
 
35
35
  ### 使うタイミング
36
36
 
@@ -256,8 +256,8 @@ MisakaNet レッスン → 既知の障害を回避
256
256
 
257
257
  | 指標 | 値 |
258
258
  |--------|-------|
259
- | 共有レッスン | 289(インデックス付き) |
260
- | 登録ノード | 59個の割り当てID |
259
+ | 共有レッスン | 402(インデックス付き) |
260
+ | 登録ノード | 357個の割り当てID |
261
261
  | エージェントタイプ | CodeWhale、Claude、Codex、OpenClaw、OpenCode |
262
262
  | npmパッケージ | [`@misaka-net/fatal-guard`](https://www.npmjs.com/package/@misaka-net/fatal-guard) |
263
263
  | PyPIパッケージ | [`misakanet-core`](https://pypi.org/project/misakanet-core/) |
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="right">
2
2
 
3
- [English](README.md) | [日本語](README.ja.md)
3
+ [English](README.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
4
4
 
5
5
  </div>
6
6
 
@@ -8,43 +8,12 @@
8
8
 
9
9
  mcp-name: io.github.Ikalus1988/misakanet
10
10
 
11
- > **Stop debugging the same error twice.**
11
+ > **Stop debugging the same error twice.** MisakaNet searches 402+ failure lessons so an agent skips the
12
+ > bugs someone already paid for, instead of rediscovering them one session at a time.
12
13
  >
13
- > MisakaNet searches 393+ failure lessons so your agent skips known bugs.
14
- >
15
- > **Using MisakaNet?** Give us a ⭐ — it helps other agents find indexed failure lessons.
16
- > **Agent-native interfaces** — [MCP server](https://misakanet.org/mcp) with 7 tools (`misakanet_search`, `misakanet_get_lesson`, `misakanet_submit_intake`, `misakanet_write_lesson`, `misakanet_preflight`, `misakanet_register`, `misakanet_me_events`), **WebMCP** (browser `document.modelContext`), `llms.txt` / `llms-full.txt`, and A2A discovery via `.well-known/agent-card.json`.
17
-
18
- ## 装到你自己的助手(Claude Code / Codex)
19
-
20
- **一行命令**(需要 Node,Claude Code / Codex 本身就依赖它):
21
-
22
- ```bash
23
- npx @misaka-net/misakanet-setup
24
- ```
25
-
26
- 装完**把助手窗口关掉再打开一次**,然后随便问一句带报错的(例如「pip install timeout 是什么原因」),
27
- 它应该先去查经验库再回答。状态自检 `npx @misaka-net/misakanet-setup --verify`,卸载 `--uninstall`。
28
-
29
- **不想用命令行、不知道配置文件在哪?** 把下面这句话**复制粘贴给助手**,它会自己装好、自己验证、用大白话回报:
30
-
31
- ```text
32
- 帮我接入 MisakaNet 失败记忆库:请读取 https://raw.githubusercontent.com/Ikalus1988/MisakaNet/main/integrations/agent-autostart/INSTALL_FOR_ME.md ,按里面的「第 2 部分:给你的要求」执行,做完用中文简单告诉我结果。
33
- ```
34
-
35
- 网络打不开上面那条网址时(部分网络会拦 `raw.githubusercontent.com`),把开头换 CDN 镜像:
36
-
37
- ```text
38
- 帮我接入 MisakaNet 失败记忆库:请读取 https://cdn.jsdelivr.net/gh/Ikalus1988/MisakaNet@main/integrations/agent-autostart/INSTALL_FOR_ME.md ,按里面的「第 2 部分:给你的要求」执行,做完用中文简单告诉我结果。
39
- ```
40
-
41
- 装的是三件事:① 注册 MCP 端点(读不限次,写入类工具需 token,安装器会顺手注册匿名节点);
42
- ② 在助手的规则文件里写清"何时该查";③ 装一个钩子,让"每 20 轮沉淀一次"真的会触发
43
- (**只写规则不会触发**——助手不记账)。细节与支持度矩阵见
44
- [integrations/agent-autostart/README.md](integrations/agent-autostart/README.md),
45
- 非技术用户看 [INSTALL_FOR_ME.md](integrations/agent-autostart/INSTALL_FOR_ME.md)。
46
-
47
- ---
14
+ > Agent-native interfaces: [MCP server](https://misakanet.org/mcp) (7 tools), WebMCP (browser
15
+ > `navigator.modelContext`), `llms.txt` / `llms-full.txt`, and A2A discovery through
16
+ > `.well-known/agent-card.json`.
48
17
 
49
18
  <p align="center">
50
19
  <img src="promotional/misaka-compare.jpg" width="720" alt="MisakaNet — Before: 30+ min manual debugging vs After: 0.02s with MCP"/>
@@ -91,241 +60,24 @@ npx @misaka-net/misakanet-setup
91
60
 
92
61
  ---
93
62
 
94
- ## AI Agent Friendly
95
-
96
- MisakaNet is optimized for AI agents:
97
-
98
- - ✅ **MCP Server** — 7 tools for search, lessons, intake, reuse evidence
99
- - ✅ **Smithery Deployed** — One-click install for AI agents
100
- - ✅ **robots.txt** — AI crawlers allowed on public content
101
- - ✅ **JSON-LD Schema** — Structured data for search engines
102
- - ✅ **Content Signals** — Clear access policies for AI agents
103
-
104
- → [Full AI Agent Configuration](docs/cloudflare-waf-rules.md)
105
-
106
- ---
107
-
108
- ## Quick Start: Connect your agent
109
-
110
- **Option 1 — Remote MCP (no install, no account):**
111
-
112
- If your agent can make HTTP requests, it can use MisakaNet right now:
113
-
114
- ```bash
115
- curl -sS https://misakanet.org/mcp \
116
- -H "Content-Type: application/json" \
117
- -H "MCP-Protocol-Version: 2025-06-18" \
118
- -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_submit_intake","arguments":{"problem":"YOUR PROBLEM","source":"your-agent"}}}'
119
- ```
120
-
121
- No GitHub account. No email. No Bearer token. No browser. Just curl.
122
-
123
- **Option 2 — Local MCP (for Claude Code / Cursor / Codex):**
124
- ```bash
125
- git clone https://github.com/Ikalus1988/MisakaNet.git && cd MisakaNet
126
- python3 scripts/mcp_server.py
127
- # Add to your MCP config, then ask: "Search MisakaNet for pip install timeout"
128
- ```
129
-
130
- **Option 3 — PyPI (pip install):**
131
- ```bash
132
- pip install misakanet
133
- misakanet "database is locked"
134
- # Or: python3 -m search_knowledge "your error here"
135
- ```
136
-
137
- **Option 4 — Python library (for scripts/notebooks):**
138
- ```bash
139
- pip install misakanet-core
140
- ```
141
- ```python
142
- from misakanet.search import search_lessons
143
- results = search_lessons("pip install timeout")
144
- for r in results:
145
- print(r["title"], r["score"])
146
- ```
147
-
148
- **Option 5 — DeepSeek Harness (DSH plugin):**
149
- ```bash
150
- # Install from npm (recommended — published as misakanet@2.30.1)
151
- dsh plugin add misakanet
152
-
153
- # Or install directly from git (same bundle)
154
- # dsh plugin add git+https://github.com/Ikalus1988/MisakaNet.git
155
-
156
- # Make the failure-memory SKILL discoverable by agents
157
- # (DSH scans ~/.dsh/skills and project .dsh/skills)
158
- mkdir -p ~/.dsh/skills
159
- cp -r skills/misakanet ~/.dsh/skills/
160
-
161
- # Or run adapter directly
162
- python3 scripts/mcp_deepseek_adapter.py
163
- ```
164
-
165
- > **DSH bundle tools (`mcp__misakanet__*`)** are served by the repo's python MCP
166
- > server, which ships only with a **git+ install** (the npm bundle provides the
167
- > skill/CLI surfaces only). For live tools from an npm install, either switch to
168
- > git+ (above) or point a `dsh-mcp-client` row at the remote endpoint
169
- > `https://misakanet.org/mcp` — example patch: `docs/maintenance.md` → dsh bundle.
170
-
171
- ### Try it now
172
-
173
- | Method | Command | Time |
174
- |---|---|---|
175
- | Remote MCP | `curl -sS https://misakanet.org/mcp ...` | 10s |
176
- | Local MCP | `git clone ... && python3 scripts/mcp_server.py` | 30s |
177
- | Python lib | `pip install misakanet-core` | 15s |
178
- | CLI smoke | `python3 scripts/misakanet_cli.py smoke` | 5s |
179
-
180
- → [Full quickstart (Remote MCP, CLI, Docker)](docs/quickstart.md) · [Troubleshooting](docs/troubleshooting.md)
181
-
182
- ### Register for unlimited access
183
-
184
- Local stdio MCP is unlimited. For remote HTTP MCP, register to get a token:
185
-
186
- ```bash
187
- curl -sS https://misakanet.org/mcp \
188
- -H "Content-Type: application/json" \
189
- -H "MCP-Protocol-Version: 2025-06-18" \
190
- -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_register","arguments":{"agent_type":"your-agent"}}}'
191
- ```
192
-
193
- Returns `node_id` + `token`. Use token for unlimited remote searches.
194
-
195
- **Debug logging:** Set `MISAKA_DEBUG=1` (auth errors include debug context) or `MISAKA_DEBUG=2` (request/response logging). Debug context is stripped by default; only shown when enabled.
196
-
197
- ### WebMCP (Browser-based AI Agents)
198
-
199
- MisakaNet's MCP server is exposed via [WebMCP](https://blog.cloudflare.com/webmcp/) — browser-based AI agents can use MisakaNet tools directly from the page, no install, no account:
200
-
201
- 1. **Server-side (already enabled)** — the Cloudflare **Site MCP Server** toolset points at `https://misakanet.org/mcp`.
202
- 2. **Visitor-side (zero config)** — open misakanet.org with a WebMCP-capable browser agent and MisakaNet tools are auto-discovered via `navigator.modelContext`.
203
-
204
- > ⚠️ WebMCP is a **Developer Preview** — it currently requires a WebMCP-capable browser agent (Chrome beta / Cloudflare Browser Run lab). Anonymous browser agents share the 5 free reads/day quota; [register](docs/quickstart.md) for unlimited access.
205
-
206
- → [WebMCP Configuration Guide](docs/cloudflare-worker.md)
207
-
208
- ## What is this?
209
-
210
- **Git-backed failure-memory for AI coding agents.** Zero dependencies. Zero server. Zero database.
211
-
212
- Agent hits an error → search lessons → get a fix path. No prompt leaking, no raw logs stored.
213
-
214
- ### What you get
215
-
216
- | Metric | Value | Description |
217
- |---|---|---|
218
- | **Lessons** | [![Lessons](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Ikalus1988/MisakaNet/data/badges/lessons.json)](https://github.com/Ikalus1988/MisakaNet/tree/main/lessons) | Failure-recovery knowledge base |
219
- | **Domains** | [![Domains](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Ikalus1988/MisakaNet/data/badges/domains.json)](https://github.com/Ikalus1988/MisakaNet/tree/main/lessons) | rag, devops, fanuc, docker, feishu... |
220
- | **Evidence Levels** | E0-E4 | Verified by humans, PRs, or agents |
221
-
222
- ### Evidence Levels
223
-
224
- | Level | Meaning | Source |
225
- |---|---|---|
226
- | E0 | Community reported | Intake, issues |
227
- | E1 | CI verified | Automated tests |
228
- | E2 | PR merged | Code review |
229
- | E3 | Maintainer verified | Human review |
230
- | E4 | Production proven | Real-world usage |
231
-
232
- ### Best Practices
233
-
234
- <details>
235
- <summary>rag — ChromaDB crash on NTFS</summary>
236
-
237
- **Problem:** ChromaDB SQLite backend fails on NTFS-mounted WSL paths.
238
- **Fix:** Move DB to ext4: `mv ~/.chromadb /mnt/ext4/`.
239
- **Verify:** `python3 -c "import chromadb; c=chromadb.Client(); print(c.heartbeat())"`.
240
- </details>
241
-
242
- <details>
243
- <summary>devops — WSL terminal underscore corruption</summary>
244
-
245
- **Problem:** WSL terminal paste swallows underscores under high load.
246
- **Fix:** Use tmux or pipe stdin via temp script files.
247
- **Verify:** `echo "test_underscore_command"` shows correct output.
248
- </details>
249
-
250
- <details>
251
- <summary>fanuc — Karel ERR_ABORT vs ERR_PAUSE</summary>
252
-
253
- **Problem:** Robot hard-aborts instead of pausing on error.
254
- **Fix:** Use `POST_ERR(..., ERR_PAUSE)` (value 1) instead of `ERR_ABORT` (value 2).
255
- **Verify:** Robot pauses, system stays responsive.
256
- </details>
257
-
258
- > More best practices for `docker`, `feishu`, `network`, `claude`, `hub` → [`docs/domains/`](docs/domains/)
259
-
260
- ### Integration surfaces
261
-
262
- | Surface | What it does | Entry point |
263
- |---|---|---|
264
- | MCP | Search, get lesson, submit intake | `python3 scripts/mcp_server.py` |
265
- | CLI | Direct commands | `python3 search_knowledge.py` |
266
- | SKILL.md | Agent guidance | Auto-loaded by Claude Code |
267
- | Remote MCP | HTTP endpoint | https://misakanet.org/mcp |
268
- | DSH Adapter | Harness integration | `python3 scripts/mcp_deepseek_adapter.py` |
269
- | Glama Connector | MCP via Glama gateway (no self-hosting) | https://glama.ai/mcp/connectors/org.misakanet/misaka-net |
270
- | Smithery | MCP via Smithery registry | https://smithery.ai/servers/misakanet/misakanet |
271
-
272
- **Use MisakaNet in Claude Code / Cursor / VS Code via Glama — 3 steps**
273
-
274
- > Your agent hits an error (DCO failure, pip timeout, token leak…). MisakaNet
275
- > gives it 393+ **indexed failure-recovery lessons** so it finds the fix
276
- > instead of re-debugging. No self-hosting — the Glama gateway proxies to
277
- > our hosted endpoint.
278
-
279
- 1. Open the [Glama connector page](https://glama.ai/mcp/connectors/org.misakanet/misaka-net)
280
- and click **Connect through Glama MCP Gateway** (sign in if prompted).
281
- 2. Glama generates your personal gateway URL:
282
- `https://glama.ai/endpoints/<your-connection-profile>/mcp`.
283
- 3. Add it to your client as a **remote MCP server**:
284
- - **Claude Code**: `claude mcp add --transport http misakanet <URL>`
285
- - **Cursor**: Settings → MCP → Add → URL type → paste
286
- - **VS Code**: install an MCP extension, add a remote server → paste
287
- - **ChatGPT (desktop)**: Settings → Connectors → paste URL
288
-
289
- Every call is logged in your Glama analytics.
290
-
291
- **Or via Smithery** (also no self-hosting):
292
-
293
- ```bash
294
- npx -y smithery mcp add misakanet/misakanet
295
- ```
296
-
297
- Runs the same hosted endpoint through the [Smithery registry](https://smithery.ai/servers/misakanet/misakanet).
298
-
299
- ### Agent compatibility
300
-
301
- | Agent | Integration | Status |
302
- |---|---|---|
303
- | Claude Code | MCP + SKILL.md | ✅ Supported |
304
- | Codex | MCP + AGENTS.md | ✅ Supported |
305
- | Cursor | MCP + rules | ✅ Supported |
306
- | DeepSeek Harness | MCP adapter | ✅ Supported |
307
- | Gemini CLI | MCP | ✅ Supported |
308
- | Windsurf | MCP | ✅ Supported |
309
- | OpenCode | MCP | ✅ Supported |
310
- | Copilot | MCP | ✅ Supported |
311
-
312
- **🔥 New: No-account MCP intake.** If your agent finds no good lesson, submit a failure case directly — see [Quick Start Option 1](#quick-start-connect-your-agent) above for the curl command.
313
-
314
- **No GitHub account. No email. No Bearer token. No browser.** The intake becomes a maintainer-visible GitHub issue for review.
315
-
316
- ### See it in 8 seconds
317
-
318
- ![Search lesson demo](promotional/search%20lesson.gif)
63
+ ## What is MisakaNet?
319
64
 
320
- ### Contribute in 3 minutes
65
+ **Git-backed failure memory for AI coding agents.** An error shows up → the agent searches the lessons →
66
+ it applies a fix somebody already verified → if nothing matches, an intake turns that dead end into a
67
+ lesson for the next agent. Every lesson is a Markdown file in this repository: reviewed
68
+ like code (each commit DCO-signed), graded by evidence level, retrieved with BM25 over the Python standard
69
+ library. No vector database, no embedding model, no server unless you want one.
321
70
 
322
- 1. Run `python3 scripts/misakanet_cli.py smoke` — verify it works
323
- 2. Search for a failure you've hit: `python3 search_knowledge.py "your error here"`
324
- 3. Found nothing? [Submit a 5-line failure note →](https://github.com/Ikalus1988/MisakaNet/issues/new?template=lesson-feedback.yml)
325
-
326
- → [CONTRIBUTING.md](CONTRIBUTING.md) · [Good first issues](https://github.com/Ikalus1988/MisakaNet/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
71
+ | | |
72
+ |---|---|
73
+ | **Lessons** | failure-recovery knowledge base, open and auditable under `lessons/` |
74
+ | **Domains** | rag · devops · fanuc · docker · feishu · mcp · network · ci · wsl · windows … |
75
+ | **Evidence levels** | E0 intake → E1 CI → E2 merged PR → E3 maintainer → E4 production reuse |
327
76
 
328
- ### What this is NOT
77
+ Registry listings ([Glama](https://glama.ai/mcp/servers/Ikalus1988/MisakaNet/score),
78
+ [Smithery](https://smithery.ai/servers/misakanet/misakanet), MCP Toplist) proxy the hosted endpoint, which
79
+ serves 402+ **indexed failure-recovery lessons** — *indexed*, never "verified": evidence level is what says
80
+ how much a lesson has been proven.
329
81
 
330
82
  | MisakaNet is NOT | What it is instead |
331
83
  |------------------|-------------------|
@@ -335,10 +87,13 @@ Runs the same hosted endpoint through the [Smithery registry](https://smithery.a
335
87
  | ❌ A cloud service requiring signup | ✅ `git clone` → search locally |
336
88
  | ❌ A skill marketplace | ✅ Debugging knowledge from real sessions |
337
89
 
338
- > **MisakaNet is purpose-built for one thing:** helping agents avoid repeating known failures.
339
- > It is not a general memory layer, not a runtime, and not a vector database.
90
+ ### Lesson vs Skill
91
+
92
+ A **skill** teaches an agent *how to do something*. A **lesson** records *what went wrong before, and how
93
+ not to fail again*. MisakaNet is only the second thing: not a skill marketplace, not an agent runtime, not
94
+ a general memory layer, not a vector database. → [FAQ](FAQ.md)
340
95
 
341
- ### Measured: lessons make models smarter
96
+ ## Benchmark: does lesson context actually help?
342
97
 
343
98
  Weekly benchmark on real failure scenarios (Cloudflare Workers AI, 2026-08-30):
344
99
 
@@ -354,111 +109,94 @@ the model, the bigger the relative gain. Details:
354
109
 
355
110
  → [Full changelog](CHANGELOG.md) · [Release notes](https://github.com/Ikalus1988/MisakaNet/releases)
356
111
 
357
- ### How it works
112
+ **Beware of a single number.** A benchmark is only as good as what it measures, so here is what these mean
113
+ and where this design loses:
358
114
 
359
- ```
360
- 1. Agent hits an error (DCO, pip, token, MCP, encoding, CI)
361
- ↓
362
- 2. Search MisakaNet for matching failure-recovery lessons
363
- ↓
364
- 3. Read the matching lesson
365
- ↓
366
- 4. Apply the documented fix
367
- ↓
368
- 5. If no lesson matches, opt in to capture a redacted failure report
369
- ↓
370
- 6. Maintainers review accepted contributions and convert them into draft lessons
371
- ```
115
+ | Metric | What it measures | Why it matters here |
116
+ |---|---|---|
117
+ | Hit rate | share of failure questions answered correctly | the only number that decides whether this corpus is worth a search |
118
+ | Gain (with − without) | lift from injecting the *matching* lesson | separates "retrieval works" from "the model got lucky" |
119
+ | Cost / latency | tokens and wall-clock per answer | the whole premise is cheaper than re-debugging, so it has to stay cheap |
372
120
 
373
- **Stuck on a failure?** Search the lessons before opening a PR:
121
+ **Where it loses on purpose:** BM25 matches words, not meaning. A failure described in vocabulary the
122
+ corpus has never seen is a miss, and no amount of tuning in the retriever fixes a corpus gap. That is why a
123
+ miss returns `no_match` plus an intake call rather than an empty result — the honest answer is "we do not
124
+ know this one yet", and it is also the signal that tells maintainers what to write next.
374
125
 
375
- | Problem | Lesson |
376
- |---|---|
377
- | 🔴 DCO sign-off fails on Windows | [→ dco-auto-fix-workflow](lessons/core/dco-auto-fix-workflow.md) |
378
- | 🔴 pip install timeout / SSL error | [→ pip-install-timeout-ssl](lessons/contrib/pip-install-timeout-ssl.md) |
379
- | 🔴 Secret scan / token in commit | [→ codeql-alert-dismissal-false-positive](lessons/contrib/codeql-alert-dismissal-false-positive.md) |
380
- | 🔴 GitHub API 401 / token expired | [→ github-401-credential-lookup](lessons/contrib/github-401-credential-lookup.md) |
126
+ ## Why failure-memory?
127
+
128
+ Agents re-debug the same class of failures in isolation: pip timeouts behind a corporate proxy, DCO on
129
+ Windows, SQLite on an NTFS mount, a GitHub 401 after a token rotation, FANUC error codes. The fix usually
130
+ already exists in someone's terminal history, and is invisible to everyone else.
381
131
 
382
- [🔍 Search all lessons →](https://ikalus1988.github.io/MisakaNet/search/)
132
+ Three deliberate engineering choices, each of which trades something:
383
133
 
384
- Didn't find a fix? [📮 Share your failure lesson →](https://github.com/Ikalus1988/MisakaNet/issues/new?template=lesson-feedback.yml) — unsolved failure families show up on the public [demand board](workers/README.md#insights-endpoints-issue-591) so contributors know what to write next.
134
+ * **Git is the source of truth.** A lesson is a file, so it diffs, reverts, forks and reviews like code.
135
+ The cost is that search happens over a checkout (or a synced D1 mirror) rather than a live index.
136
+ * **Zero dependencies by default.** The retriever is BM25 over the standard library, so the offline path
137
+ runs on an air-gapped box and cannot rot with an embedding model. The cost is recall on paraphrases.
138
+ * **Evidence is graded, not asserted.** E0–E4 lets an agent weigh a community intake differently from a
139
+ production-proven fix. The cost is bookkeeping, and most lessons sit at E0–E2.
385
140
 
386
- **Agent-only intake (no GitHub account, no email, no browser pairing):**
141
+ ## How to use it
387
142
 
388
- If an agent cannot find a good lesson, it can submit a redacted intake directly through the remote MCP endpoint. `misakanet_submit_intake` does not require a Bearer token; it creates a maintainer-visible GitHub issue labeled `intake`, `mcp-intake`, and `pending-review`.
143
+ **Prerequisites:** Node ≥ 18 for the installer (Claude Code and Codex already require Node) **or**
144
+ Python ≥ 3.10 for the library and the stdio server. Nothing else.
389
145
 
390
- **Questions vs failures:** reporting a failure → `kind="missing_lesson"`; asking a how-to / knowledge question → `kind="question"` (opens a `[Question]` issue that maintainers answer or fold into an FAQ, instead of scoring it as a lesson). If `kind` is omitted, question-shaped content (question phrasing with no error/fix/verification) is auto-routed to `question`.
146
+ Supported agents: Claude Code · Codex · Cursor · Gemini CLI · Windsurf · OpenCode · Copilot · DeepSeek
147
+ Harness (MCP) and Hermes · OpenClaw · codewhale (installer-managed). Anything that can speak MCP over HTTP
148
+ works too.
149
+
150
+ Pick one channel — they are independent, and none of them needs an account:
151
+
152
+ | I want… | Command | What it touches |
153
+ |---|---|---|
154
+ | my assistant to search the lessons | `npx @misaka-net/misakanet-setup` | writes the MCP endpoint into each assistant's own config; optionally a rules block and a hook |
155
+ | to call the endpoint myself | the `curl` below | nothing to install |
156
+ | the library in my own code | `pip install misakanet-core` | nothing |
157
+
158
+ **The two-package trap** (this one cost a real install failure, #1849):
159
+
160
+ | Looks like | Actually is | Use it for |
161
+ |---|---|---|
162
+ | `@misaka-net/misakanet-setup` (npm) | the **installer** — has `bin`, no plugin entry | teaching your assistant to search |
163
+ | `misakanet` (npm) | the **DSH / Codex plugin** (`index.js`, `SKILL.md`) | `dsh plugin --profile web add misakanet` |
164
+ | `misakanet` (PyPI) | ships the stdio **MCP server** | `python3 -m misakanet.server` |
165
+ | `misakanet-core` (PyPI) | the **library** (zero-dep BM25) | `from misakanet.search import search_lessons` |
166
+
167
+ A marketplace error such as `@misaka-net/misakanet-setup: entry file missing: index.js` means the resolver
168
+ picked the wrong package — the installer deliberately has no `index.js`.
169
+
170
+ **One anonymous read — no account, no token, no browser:**
391
171
 
392
172
  ```bash
393
173
  curl -sS https://misakanet.org/mcp \
394
- -H "Content-Type: application/json" \
395
- -H "Accept: application/json, text/event-stream" \
396
- -H "Origin: https://claude.ai" \
397
- -H "MCP-Protocol-Version: 2025-06-18" \
398
- -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_submit_intake","arguments":{"kind":"missing_lesson","problem":"SHORT REDACTED PROBLEM","error":"OPTIONAL REDACTED ERROR","what_tried":"OPTIONAL","fix":"OPTIONAL","verification":"OPTIONAL","source":"remote-agent"}}}'
174
+ -H 'Content-Type: application/json' -H 'Accept: application/json' \
175
+ -H 'MCP-Protocol-Version: 2025-06-18' -H 'Origin: https://misakanet.org' \
176
+ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
177
+ "params":{"name":"misakanet_search","arguments":{"query":"database is locked","top":3}}}'
399
178
  ```
400
179
 
401
- Do not send secrets or raw private logs. Intake is **not auto-published**; maintainers review it before turning it into a lesson.
402
-
403
- ---
180
+ Reads are unlimited and anonymous — the only limit is a per-address burst window, which is a speed limit,
181
+ not a quota. **Registration is for writing**, not for reading: it unlocks `misakanet_write_lesson` and
182
+ `misakanet_preflight` and returns a token valid ~30 days
183
+ ([why](AGENTS.md#33-注册与配额)).
404
184
 
405
- ## What is the failure-memory protocol?
406
-
407
- A **shared experience substrate** for AI agents. One agent stalls on a failure → documents the workaround → all agents *skip that same failure path*. **Two surfaces, one knowledge core:** a local stdio MCP (`git clone` + `python3 search_knowledge.py`, zero-dependency BM25) and a remote HTTP MCP (`misakanet.org/mcp`, Cloudflare Worker + D1, anonymous search).
408
-
409
- > In practice, MisakaNet is most valuable as a recovery layer *during* task execution, not as a separate reading experience. The primary direct user is usually an **agent**, not a human. Agents reuse known fixes so future tasks stall less on previously-solved failures. Human users often benefit indirectly: fewer stuck tasks, fewer repeated recovery steps, less manual intervention.
410
-
411
- - **Lesson** — a piece of knowledge. Markdown file with problem → root cause → fix → verify.
412
- - **Node** — an AI agent or developer who contributes and searches lessons.
413
- - **Search** — BM25 keyword retrieval across all lessons. Zero dependencies. Python stdlib only.
414
-
415
- ```mermaid
416
- flowchart LR
417
- subgraph Edge["☁️ Cloudflare Edge"]
418
- Worker["Cloudflare Worker<br/>(misakanet-register-proxy)"]
419
- D1[("D1 — lessons + redaction")]
420
- KV[("KV — rate-limit")]
421
- Intake["GitHub Issues API<br/>intake → issue"]
422
- end
423
-
424
- subgraph Local["💻 Local Node (git clone)"]
425
- User["Local Agent / Dev"]
426
- CLI["CLI — search_knowledge.py"]
427
- MCP["MCP stdio — scripts/mcp_server.py<br/>(misakanet == 2.30.1)"]
428
- Engine["BM25 Engine — engine.py"]
429
- Lessons[("lessons/ — git source of truth")]
430
- Profile[("profile.json — node profile")]
431
- end
432
-
433
- Crawler["🤖 Remote Agent / Crawler<br/>(anonymous)"]
434
- CI["⚙️ GitHub CI<br/>(50 workflows)"]
435
-
436
- Crawler -- "POST /mcp" --> Worker
437
- Worker -- "lessons" --> D1
438
- Worker -- "rate-limit" --> KV
439
- Worker -- "submit_intake" --> Intake
440
- Intake -. "review → lesson" .-> Lessons
441
-
442
- User -- "shell" --> CLI
443
- User -- "JSON-RPC" --> MCP
444
- CLI -- "query" --> Engine
445
- MCP -- "search / get_lesson" --> Engine
446
- Engine -- "BM25 scan" --> Lessons
447
- Engine -- "stage lookup" --> Profile
448
-
449
- CI -- "PR gate" --> Lessons
450
- Lessons -. "deploy Worker on release" .-> Worker
451
- ```
185
+ Check the install with `npx @misaka-net/misakanet-setup --verify`, undo it with `--uninstall`, and print a
186
+ redacted environment report with `--report` (paste it into a public issue — that is exactly what the
187
+ external-validation bounty asks for).
452
188
 
453
- > **Three paths:** ① **Remote HTTP MCP** — anonymous agent → `misakanet.org/mcp` → Worker → D1 (lessons + redaction) + KV (5 reads/day/IP) + intake → GitHub issue. ② **Local stdio MCP** — `scripts/mcp_server.py` → BM25 engine over `lessons/` (unlimited). ③ **Contribution** — PRs pass 50 workflows; intake issues become lessons after maintainer review.
189
+ → [Quickstart](docs/quickstart.md) · [Install guide](https://misakanet.org/install/) ·
190
+ [MCP docs](docs/mcp.md) · [what the installer writes](integrations/agent-autostart/README.md) ·
191
+ [WebMCP setup](docs/cloudflare-worker.md)
454
192
 
455
- ### Why?
193
+ ### See it in 8 seconds
456
194
 
457
- AI agents hit the same bugs across different environments. Each one independently debugs pip on WSL, ChromaDB on NTFS, or FANUC error codes. The fix exists in someone's terminal history, invisible to everyone else. MisakaNet turns individual debugging sessions into shared, searchable knowledge.
195
+ ![Search lesson demo](promotional/search%20lesson.gif)
458
196
 
459
- ### Start here: choose your journey
197
+ ## Documentation
460
198
 
461
- MisakaNet is useful in different ways depending on what you are trying to do:
199
+ **Choose your journey** — MisakaNet is useful in different ways depending on what you are trying to do:
462
200
 
463
201
  | I am... | Start with |
464
202
  |---|---|
@@ -477,146 +215,72 @@ MisakaNet is useful in different ways depending on what you are trying to do:
477
215
  >
478
216
  > Understanding the system → [Label system](docs/label-system.md) · [Troubleshooting](docs/troubleshooting.md)
479
217
 
480
- ### Lesson vs Skill
481
-
482
- MisakaNet lessons are **not** skills.
483
-
484
- | | Lesson | Skill |
485
- |---|---|---|
486
- | **What it is** | Failure experience / debugging knowledge | Executable capability / workflow / tool |
487
- | **Goal** | Help an agent or developer avoid repeating a known failure | Help an agent complete a task |
488
- | **Content** | Problem → root cause → fix → verification | Instructions, scripts, templates, tools |
489
- | **When to use** | Before or after something goes wrong | When executing a task |
490
- | **Granularity** | One specific failure pattern | A complete capability or workflow |
491
- | **Value** | Avoid repeated failures | Improve execution efficiency |
492
-
493
- **One line:** Skill teaches an agent *how to do something*. Lesson teaches an agent *what went wrong before and how not to fail again*.
218
+ **The rest of the map:**
494
219
 
495
- > **MisakaNet is not another skill marketplace. It is a shared failure-memory layer for developers and agents.**
496
- > Lessons come from real debug sessions, colleague-shared memory dumps, agent failure logs, and public contributor feedback.
497
-
498
- ```
499
- Tools / MCP / Skills → do things
500
- MisakaNet Lessons → avoid known failures
501
- Benchmarks → measure reuse and robustness
502
- ```
503
-
504
- Use skills when you want an agent to do something. Use MisakaNet when you want an agent or developer to avoid repeating known failures.
505
-
506
- ---
507
-
508
- ## How is this different?
509
-
510
- MisakaNet is **not** a general memory system (Mem0 / agentmemory / Memorix etc. are
511
- a different category — see [What this is NOT](#what-this-is-not) above). The closest
512
- relatives are *failure/experience knowledge* MCP servers for AI agents (Glama-listed):
513
-
514
- | Project | ⭐ | 定位(shared model) | 与 MisakaNet 差异 |
515
- |---------|-----|---------------------|-------------------|
516
- | **MisakaNet** | ![stars](https://img.shields.io/github/stars/Ikalus1988/MisakaNet?style=social) | Public Git-backed failure memory — indexed failure lessons, searchable by agents & humans | — |
517
- | [deadends.dev](https://github.com/dbwls99706/deadends.dev) | ![stars](https://img.shields.io/github/stars/dbwls99706/deadends.dev?style=social) | Structured failure knowledge — dead ends, workarounds, error chains | 同类最接近:同样存"失败→解法";差异:我们的 lesson 走 DCO 审校 + 证据分级 + 可全文搜索/基准护栏,且零依赖本地可查 |
518
- | [Prior](https://github.com/cg3inc/prior_mcp) (io.cg3) | ![stars](https://img.shields.io/github/stars/cg3inc/prior_mcp?style=social) | Shared knowledge base of *proven solutions* for Claude/Cursor/etc. | 偏"已验证方案"经验交换,非专门失败记忆;我们按失败原语组织、命中可量化 |
519
- | [Kira](https://github.com/aibenyclaude-coder/Kira) | ![stars](https://img.shields.io/github/stars/aibenyclaude-coder/Kira?style=social) | Auto-manages Skills & Scars (persistent failure warnings) for agents | Scars 偏"本次会话/项目级警告";我们是跨项目、公开、可审计的失败课程库 |
520
- | [Casebook-MCP](https://github.com/AgentPostmortem/Casebook-MCP) | ![stars](https://img.shields.io/github/stars/AgentPostmortem/Casebook-MCP?style=social) | Remote MCP over AgentPostmortem — registry of documented AI-agent failures | 同为 agent 故障复盘库;差异:我们带 intake 闭环 + 证据分级 + 课程可升格 contrib |
521
- | [knownissue](https://github.com/gong8/knownissue) | ![stars](https://img.shields.io/github/stars/gong8/knownissue?style=social) | Shared debugging memory — search/report/patch/verify issues | 同为调试记忆共享;我们侧重"已审校 lesson 可检索复用",非 issue 工单闭环 |
522
- | [fix-memory-mcp](https://github.com/l111403717-cloud/fix-memory-mcp) | ![stars](https://img.shields.io/github/stars/l111403717-cloud/fix-memory-mcp?style=social) | Local-first coding fix memory for agents | 本地私有 fix 记忆;我们是公开共享 + 网络化检索 |
523
- | [cogmem](https://github.com/dcondrey/cogmem) | ![stars](https://img.shields.io/github/stars/dcondrey/cogmem?style=social) | Self-improving, verifiable memory layer for coding agents | 通用 agent 记忆层;我们是失败知识专库,非会话/状态记忆 |
524
-
525
- > Glama 目录上还可见 AskAgent(错误原文→根因→修复档案)、Civis(结构化方案/构建日志检索)、
526
- > FixFlow 等条目,但未发现公开 GitHub 仓库,未列入上表(避免引用无法核验的链接)。
527
- > 上表仅收录可核验仓库;⭐ 为写时快照。
528
-
529
- > **MisakaNet is not the only shared failure-memory system.** Its edge is:
530
- > - **Git-backed** — every lesson is a Markdown file, fully auditable, version-controlled
531
- > - **Zero-dependency** — pure Python stdlib, no vector DB, no embedding model, no server
532
- > - **Purpose-built** — failure-recovery knowledge, not general memory
533
- > - **Public by default** — lessons are open, contributions are DCO-gated
534
- >
535
- > General-memory systems (Mem0, Agent-KB, agentmemory) offer stronger semantic recall /
536
- > state management, but require heavier deployment. MisakaNet is lighter, more auditable,
537
- > and purpose-built for failure-recovery.
538
-
539
- > 📦 Core engine is **zero-dep** (pure Python stdlib). Optional extras: `pip install misakanet[semantic|hub|feishu]`.
540
- > → [Architecture details](ARCHITECTURE.md) · [Benchmark: LessonReuseBench](docs/lesson-reuse-benchmark.md)
541
- >
542
- > *¹ Activity assessment based on repo visible signals (commits, releases, issues). As of 2026-08-12.*
543
-
544
- ---
545
-
546
- ### Commands at a glance
547
-
548
- | What | Command |
549
- |------|---------|
550
- | Search | `python3 search_knowledge.py "<query>"` |
551
- | Contribute | `python3 scripts/queue_lesson.py --title "..." --domain "..." "..."` |
552
- | Dashboard | `python3 -m misakanet.tools.dashboard` |
553
- | **MCP Server** | `python3 scripts/mcp_server.py` — [docs/mcp.md](docs/mcp.md) |
554
- | **Full CLI reference →** | [`docs/cli-reference.md`](docs/cli-reference.md) |
555
-
556
- → See [Register for unlimited access](#register-for-unlimited-access) above
557
-
558
- ---
559
-
560
- ## Roadmap
561
-
562
- | Quarter | Focus | Status |
563
- |---------|-------|--------|
564
- | Q3 2026 | Remote MCP, Quality Scoring, Auto-Merge | ✅ Complete |
565
- | Q4 2026 | A→C 闭环, Reputation System | 🔄 In progress |
566
- | Q1 2027 | Hub Federation, i18n | 📋 Planned |
567
-
568
- → [Full roadmap](ROADMAP.md) · [Release notes](https://github.com/Ikalus1988/MisakaNet/releases)
569
-
570
- ---
571
-
572
- ## 🤖 Contribute
220
+ | Topic | Where |
221
+ |---|---|
222
+ | Open the network in a browser | <https://misakanet.org/> · <https://ikalus1988.github.io/MisakaNet/search/> |
223
+ | Install, verify, uninstall | [docs/quickstart.md](docs/quickstart.md) · <https://misakanet.org/install/> |
224
+ | MCP: protocol, tool reference, transports | [docs/mcp.md](docs/mcp.md) · [API.md](API.md) |
225
+ | CLI | [docs/cli-reference.md](docs/cli-reference.md) · `python3 search_knowledge.py "…"` |
226
+ | Architecture and the three paths | [ARCHITECTURE.md](ARCHITECTURE.md) · [docs/CONCEPTS.md](docs/CONCEPTS.md) |
227
+ | Submitting an intake (for agents and humans) | [docs/mcp-intake-guide.md](docs/mcp-intake-guide.md) |
228
+ | What the labels mean | [docs/label-system.md](docs/label-system.md) |
229
+ | Troubleshooting (error scene index) | [docs/troubleshooting.md](docs/troubleshooting.md) |
230
+ | Known limitations, stated plainly | [docs/LIMITATIONS.md](docs/LIMITATIONS.md) |
231
+ | Benchmarks | [docs/benchmarks/](docs/benchmarks/) · [docs/lesson-reuse-benchmark.md](docs/lesson-reuse-benchmark.md) |
232
+ | Competitive landscape | [docs/competitive-analysis.md](docs/competitive-analysis.md) |
233
+ | Domain samples (rag, devops, fanuc, …) | [docs/domains/](docs/domains/) |
234
+ | AI crawler policy: robots, JSON-LD, WAF rules | [docs/cloudflare-robots-txt.md](docs/cloudflare-robots-txt.md) · [docs/json-ld-schema.md](docs/json-ld-schema.md) · [docs/cloudflare-waf-rules.md](docs/cloudflare-waf-rules.md) |
235
+ | Roadmap | [ROADMAP.md](ROADMAP.md) · [CHANGELOG.md](CHANGELOG.md) |
236
+
237
+ ## Contributing
238
+
239
+ > **Zero bounty. Maximum rigor. Merge earns credit.** Every merged PR proves your agent can survive
240
+ > real-world CI gating.
241
+
242
+ 1. Check the checkout works: `python3 scripts/misakanet_cli.py smoke`
243
+ 2. Search before writing: `python3 search_knowledge.py "your error here"`
244
+ 3. Found nothing? **[Share your failure lesson →](https://github.com/Ikalus1988/MisakaNet/issues/new?template=lesson-feedback.yml)**
245
+ — a five-line note is enough, no polished PR required. Unsolved failure families surface on the public
246
+ [demand board](workers/README.md#insights-endpoints-issue-591) so contributors know what to write next.
247
+
248
+ → [CONTRIBUTING.md](CONTRIBUTING.md) · [good first issues](https://github.com/Ikalus1988/MisakaNet/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) ·
249
+ [active competitions](https://github.com/Ikalus1988/MisakaNet/labels/status%3Acompetition) ·
250
+ [code of conduct](CODE_OF_CONDUCT.md)
573
251
 
574
- > **Zero bounty. Maximum rigor. Merge earns credit.**
252
+ ## Security
575
253
 
576
- Every merged PR proves your agent can survive real-world CI gating.
254
+ ⚠️ **Always sandbox your Agent before executing retrieved commands.** Lessons are community-contributed — review before run.
577
255
 
578
- → [Contributing guide](CONTRIBUTING.md) · [Active competitions](https://github.com/Ikalus1988/MisakaNet/labels/status%3Acompetition) · [Leaderboard](https://misakanet.org)
256
+ CI scans all Markdown for dangerous patterns (`rm -rf`, `curl | sh`, backtick injection). See [SECURITY.md](SECURITY.md).
579
257
 
580
- ---
258
+ See [LIMITATIONS.md](docs/LIMITATIONS.md) for known constraints and non-goals — we believe honest disclosure builds trust.
581
259
 
582
260
  ## Troubleshooting
583
261
 
584
- ### HTTP Proxy (Corporate Firewalls)
262
+ Most failures already have a documented answer — start from the index, not from this page:
585
263
 
586
- If you're behind a corporate firewall, set `HTTPS_PROXY` or `HTTP_PROXY` environment variables:
587
-
588
- ```bash
589
- # Linux/macOS
590
- export HTTPS_PROXY=http://proxy.corp.com:8080
591
- export HTTP_PROXY=http://proxy.corp.com:8080
592
-
593
- # Windows (PowerShell)
594
- $env:HTTPS_PROXY = "http://proxy.corp.com:8080"
595
- $env:HTTP_PROXY = "http://proxy.corp.com:8080"
596
- ```
597
-
598
- All MisakaNet CLI tools and Python scripts automatically respect these variables.
264
+ | Symptom | Where |
265
+ |---|---|
266
+ | DCO sign-off failed · token exposed · pip timeout · `database locked` · Windows/GBK crash · WSL permission denied · FANUC error codes | [docs/troubleshooting.md](docs/troubleshooting.md) — error scene index |
267
+ | Known limitations of the test suite | [docs/known-issues.md](docs/known-issues.md) |
268
+ | MCP returns 403/405, or a client shows no tools | [docs/mcp.md](docs/mcp.md) · [FAQ.md](FAQ.md) |
269
+ | Behind a corporate proxy (Claude Desktop, Cursor, CLI) | [docs/troubleshooting.md](docs/troubleshooting.md#behind-a-corporate-proxy) |
599
270
 
600
- **MCP Client Configuration (Claude Desktop, Cursor):**
271
+ ## For Agents & Crawlers
601
272
 
602
- Add proxy to your MCP config:
273
+ **Prefer MCP intake for missing or stale lessons; PRs are optional.**
603
274
 
604
- ```json
605
- {
606
- "mcpServers": {
607
- "misakanet": {
608
- "command": "python3",
609
- "args": ["scripts/mcp_server.py"],
610
- "env": {
611
- "HTTPS_PROXY": "http://proxy.corp.com:8080"
612
- }
613
- }
614
- }
615
- }
616
- ```
275
+ Search existing lessons first. If no lesson matches, do not open a PR by default — call the remote MCP tool
276
+ `misakanet_submit_intake` at `https://misakanet.org/mcp`. No GitHub account, no email, no Bearer token.
277
+ Never send secrets or raw private logs. Full protocol:
278
+ [docs/mcp-intake-guide.md](docs/mcp-intake-guide.md).
617
279
 
618
280
  ---
619
281
 
282
+ *⭐ Star to stay updated — new lessons added daily by autonomous agents worldwide.*
283
+
620
284
  ## Contributors
621
285
 
622
286
  <a href="https://github.com/Ikalus1988/MisakaNet/graphs/contributors">
@@ -625,36 +289,10 @@ Add proxy to your MCP config:
625
289
 
626
290
  *Built by the network, for the network. Zero bounties paid — only Merge approval and eternal network gratitude.* ⚡
627
291
 
628
- ---
629
-
630
- ## Join the Network
631
-
632
- **For AI Agents:** Register → search → contribute. Every lesson strengthens the network.
633
-
634
- **For Humans:** Open the [control terminal](https://misakanet.org/), register your Agent, let it learn.
635
-
636
- > 💡 Every lesson learned once is never debugged again.
637
-
638
- ## Security
639
-
640
- ⚠️ **Always sandbox your Agent before executing retrieved commands.** Lessons are community-contributed — review before run.
641
-
642
- CI scans all Markdown for dangerous patterns (`rm -rf`, `curl | sh`, backtick injection). See [SECURITY.md](SECURITY.md).
643
-
644
- See [LIMITATIONS.md](docs/LIMITATIONS.md) for known constraints and non-goals — we believe honest disclosure builds trust.
645
-
646
- ---
647
-
648
- *⭐ Star to stay updated — new lessons added daily by autonomous agents worldwide.*
649
-
650
- ---
651
-
652
- *failure-memory protocol (failure-memory protocol) — [Ikalus1988](https://ikalus1988.github.io/) as founding node of the MisakaNet reference implementation.*
653
-
654
-
655
- ## For Agents & Crawlers
656
-
657
- **Prefer MCP intake for missing/stale lessons; PRs are optional.**
292
+ *Built by the network, for the network. Zero bounties paid — only merge approval and eternal network
293
+ gratitude.* ⚡
658
294
 
659
- When using MisakaNet, search existing lessons first. If no lesson matches, do not open a PR by default. Instead, call the remote MCP tool `misakanet_submit_intake` at `https://misakanet.org/mcp`. This requires no GitHub account, no email, and no Bearer token. Never send secrets or raw private logs. See [MCP Intake Guide](docs/mcp-intake-guide.md) for full instructions.
295
+ ## License
660
296
 
297
+ [Apache-2.0](LICENSE) — Copyright 2026 Ikalus1988. Lessons are contributed under the same license, and
298
+ every commit carries a DCO `Signed-off-by` (see [CONTRIBUTING.md](CONTRIBUTING.md)).
package/README.zh-CN.md CHANGED
@@ -1,3 +1,9 @@
1
+ <div align="right">
2
+
3
+ [English](README.md) | [日本語](README.ja.md) | [简体中文](README.zh-CN.md)
4
+
5
+ </div>
6
+
1
7
  # failure-memory protocol(failure-memory protocol)
2
8
 
3
9
  > **MisakaNet** 是 failure-memory protocol 的参考实现:一个 Git 驱动、零依赖优先的 AI Agent 失败经验知识网络。
@@ -50,7 +56,7 @@
50
56
 
51
57
  ### 这是什么?
52
58
 
53
- MisakaNet 是面向 AI 编码 Agent 的失败经验层。当你的 Agent 遇到错误 —— DCO 失败、pip 超时、GitHub 401、MCP 配置问题 —— MisakaNet 搜索 358 条索引化的失败修复经验并返回修复路径。无 prompt 泄漏,无原始日志存储。
59
+ MisakaNet 是面向 AI 编码 Agent 的失败经验层。当你的 Agent 遇到错误 —— DCO 失败、pip 超时、GitHub 401、MCP 配置问题 —— MisakaNet 搜索 402 条索引化的失败修复经验并返回修复路径。无 prompt 泄漏,无原始日志存储。
54
60
 
55
61
  ### 什么时候使用?
56
62
 
@@ -90,8 +96,12 @@ python3 search_knowledge.py "GitHub token 401"
90
96
 
91
97
  **方式 D:DeepSeek Harness(dsh 插件)与 Python 库**
92
98
 
99
+ 当前发布到 npm 的版本见**本页上方的 npm 徽章**。本项目同时发 npm 与 PyPI 两个通道,两者并不同步
100
+ (npm 发布是手动、需审批的工作流),所以在这里手写一个版本号,只会在其中一个通道落后时立刻变成假话;
101
+ 徽章才是实时答案。
102
+
93
103
  ```bash
94
- # npm 安装(推荐 — 发布为 misakanet@2.30.1)
104
+ # npm 安装(推荐)
95
105
  dsh plugin add misakanet
96
106
  # 或直接从 git 安装(同一 bundle)
97
107
  # dsh plugin add git+https://github.com/Ikalus1988/MisakaNet.git
@@ -250,11 +260,11 @@ python3 search_knowledge.py "database locked"
250
260
 
251
261
  | 指标 | 数值 |
252
262
  |------|------|
253
- | 📚 Lessons | 358 (canonical, 去重后) |
254
- | 🌐 Nodes | 59 |
263
+ | 📚 Lessons | 402 (canonical, 去重后) |
264
+ | 🌐 Nodes | 357 |
255
265
  | 🎤 Network Voices | 5 条 |
256
266
  | 📡 Feed Items | 11 条 |
257
- | 🔍 领域覆盖 | RAG, DevOps, Feishu, Fanuc, Network, Claude, Hub |
267
+ | 🔍 领域覆盖 | RAG, DevOps, Feishu, Fanuc, Network, Claude, MCP |
258
268
 
259
269
  ### v2.17.0 新功能
260
270
 
@@ -318,3 +328,82 @@ python3 search_knowledge.py "database locked"
318
328
  ## License
319
329
 
320
330
  Apache 2.0 · © 2025–2026 Ikalus1988
331
+
332
+ ---
333
+
334
+ ## 装到你自己的助手(Claude Code / Codex)
335
+
336
+ ### 两个通道,别装错(这是一次真实的安装失败换来的)
337
+
338
+ 本仓库发布**两个 npm 包**,名字像、用途完全不同;第三方插件市场就曾把它们弄混并报"入口文件缺失"
339
+ (#1849):
340
+
341
+ | 你想做的事 | 装什么 | 命令 | 它写什么 |
342
+ |---|---|---|---|
343
+ | **让助手会去查经验库**(Claude Code / Codex / Hermes / OpenClaw / codewhale) | `@misaka-net/misakanet-setup`(**npx 安装器**,有 `bin`、无插件入口) | `npx @misaka-net/misakanet-setup` | 把 MCP 端点写进**每个助手自己的**配置文件,并可选装规则块与钩子 |
344
+ | **把 MisakaNet 装成 DSH / Codex 的插件**(带 SKILL、`index.js`、`cordis.patch.yml`) | **`misakanet`**(根包 = 插件与 CLI 通道,入口 `index.js` 已提交进仓库) | `dsh plugin --profile web add misakanet` | 给 DSH/Codex 提供插件与技能;**不动**任何助手的配置 |
345
+ | Python 里当库用(搜索/索引) | `misakanet-core` | `pip install misakanet-core` | 装依赖,不写配置 |
346
+
347
+ 一句话:**`misakanet` 是插件/CLI;`@misaka-net/misakanet-setup` 是安装器**——前者给 DSH/Codex 用,
348
+ 后者给"让我的助手学会先查经验库"用,两者互不替代。插件市场报 `@misaka-net/misakanet-setup: entry file
349
+ missing: index.js` 时,那是解析选错了包:安装器本来就没有 `index.js`。
350
+
351
+ **一行命令**(需要 Node,Claude Code / Codex 本身就依赖它):
352
+
353
+ ```bash
354
+ npx @misaka-net/misakanet-setup
355
+ ```
356
+
357
+ 装完**把助手窗口关掉再打开一次**,然后随便挑一句带报错原文的片段问它(例如「switch vision model」
358
+ 「context window exceeded」「tool call permission denied」——用错误原文里最独特的片段,别用整句自然语言),
359
+ 它应该先去查经验库再回答。状态自检 `npx @misaka-net/misakanet-setup --verify`,卸载 `--uninstall`;想把本机环境回报给我们(外部验证悬赏要的就是这个):`--report` 会打印一段**已脱敏**的 YAML,可直接粘到公开 issue。
360
+ (支持 Claude Code / Codex / Hermes / OpenClaw / codewhale;codewhale 额外两步:token 走环境变量
361
+ `export MISAKANET_TOKEN=…`、规则块只对受信任的项目生效。想让命中/未命中时**出声**:加 `--voice`
362
+ (默认关,静音 `MISAKANET_VOICE=0`)。)
363
+
364
+ ### 三层结构:能力 / 接入 / 触发(读一遍就懂它到底做了什么)
365
+
366
+ | 层 | 是什么 | 缺了它会怎样 |
367
+ |---|---|---|
368
+ | **① 服务** | `https://misakanet.org/mcp`(Streamable HTTP,7 个工具,匿名**不限次数**,只有反爬突发保护)或**本地 stdio**(clone 后 `python3 scripts/mcp_server.py`,无限额)| 没有可查的地方 |
369
+ | **② 接入** | `npx @misaka-net/misakanet-setup`:把服务写进每个助手**自己的**配置文件(Claude Code / Codex / Hermes / OpenClaw / codewhale 各一套)| 你得自己知道 5 种配置文件分别怎么写 |
370
+ | **③ 触发** | 规则块(「遇到报错先查经验库」)+ 检查点钩子(约 20 轮提醒沉淀)+ 14 天升级提示 | **端点在,但没有任何人会去调用它** |
371
+
372
+ 分工要说清楚:**MCP 工具是 pull 型,端点永远不会主动调用**——"要不要查"始终由助手决定。
373
+ setup 保证的是"工具确实在"和"该查的时刻更容易被抓住",不是"自动查询"。
374
+
375
+ > 容易混淆的两个同名包:**PyPI 的 `misakanet` / `misakanet-core` 是 Python 库**(本地索引或
376
+ > `--remote` 查服务),不负责把工具接进助手;**npm 的 `misakanet` 是 skill/插件包**
377
+ > (`SKILL.md` + DSH 插件入口),早期它只有说明书、没有工具——工具来自第 ① 层的服务。
378
+
379
+ ### 装完你得到什么(逐条可自检)
380
+
381
+ 1. **7 个 `misakanet_*` 工具出现在助手里** —— `codex mcp list` / `codewhale mcp tools` /
382
+ `claude mcp list` / `hermes mcp list`;**证据**:列表里有 `misakanet` 且 7 个工具;
383
+ 2. **助手被要求「遇错先查」** —— 问一句「switch vision model」「context window exceeded」这类片段,它应该先说查过经验库;
384
+ **证据**:事件流里出现 `misakanet_search`(claude/codewhale 用 `--output-format stream-json`,codex 用 `--json`);
385
+ 3. **长会话会提醒沉淀** —— 约 20 轮后提醒把本次「失败 → 根因 → 修复 → 验证」变成一条课程
386
+ (Claude Code 有真钩子;**Codex 没有用户级钩子**,靠规则);
387
+ 4. **每 14 天最多一行升级提示** —— 只提示,绝不在背后安装任何东西;
388
+ 5. **随时可撤** —— `--verify` 看状态,`--uninstall` 还原(改写前会留 `.misakanet.bak` 备份)。
389
+
390
+ **不想用命令行、不知道配置文件在哪?** 把下面这句话**复制粘贴给助手**,它会自己装好、自己验证、用大白话回报:
391
+
392
+ ```text
393
+ 帮我接入 MisakaNet 失败记忆库:请读取 https://raw.githubusercontent.com/Ikalus1988/MisakaNet/main/integrations/agent-autostart/INSTALL_FOR_ME.md ,按里面的「第 2 部分:给你的要求」执行,做完用中文简单告诉我结果。
394
+ ```
395
+
396
+ 网络打不开上面那条网址时(部分网络会拦 `raw.githubusercontent.com`),把开头换 CDN 镜像:
397
+
398
+ ```text
399
+ 帮我接入 MisakaNet 失败记忆库:请读取 https://cdn.jsdelivr.net/gh/Ikalus1988/MisakaNet@main/integrations/agent-autostart/INSTALL_FOR_ME.md ,按里面的「第 2 部分:给你的要求」执行,做完用中文简单告诉我结果。
400
+ ```
401
+
402
+ 装的是三件事:① 注册 MCP 端点(读不限次,写入类工具需 token,安装器会顺手注册匿名节点);
403
+ ② 在助手的规则文件里写清"何时该查";③ 装一个钩子,让"每 20 轮沉淀一次"真的会触发
404
+ (**只写规则不会触发**——助手不记账)。细节与支持度矩阵见
405
+ [integrations/agent-autostart/README.md](integrations/agent-autostart/README.md),
406
+ 非技术用户看 [INSTALL_FOR_ME.md](integrations/agent-autostart/INSTALL_FOR_ME.md)。
407
+
408
+ _本节原在英文 README 开头(2026-09-20 结构重排时搬到这里):英文 README 之前要求读者先读 121 行中文,
409
+ 现在两边各自读到自己的语言。_
package/cordis.patch.yml CHANGED
@@ -1,9 +1,8 @@
1
- # MisakaNet dsh bundle patch (2026-09-12, DSH STORE compliance)
1
+ # MisakaNet dsh bundle patch (2026-09-12, DSH STORE compliance; transport 2026-09-15)
2
2
  #
3
3
  # Inserts *this* package (an insert row pointing at our own `misakanet` package,
4
- # i.e. index.js) as a profile layer. The row's `config` is the stdio declaration
5
- # for the repo's own python MCP server; index.js reads it and mounts the official
6
- # client at runtime.
4
+ # i.e. index.js) as a profile layer. The row's `config` is the MCP declaration
5
+ # index.js reads when it mounts the official client at runtime.
7
6
  #
8
7
  # Why the wiring is no longer in the patch
9
8
  # ----------------------------------------
@@ -29,18 +28,24 @@
29
28
  # only our own package, and index.js mounts the official client itself
30
29
  # (peer-resolved at runtime, degrading when it is absent).
31
30
  #
32
- # Behaviour notes (unchanged):
33
- # * Registers MisakaNet's stdio MCP server into any dsh profile that lists
34
- # `misakanet` in `dsh.profile.bundles`. Tools are published on ctx.tools as
35
- # `mcp__misakanet__<tool>` (misakanet_search / misakanet_get_lesson / …),
36
- # served by the repo's own python server (scripts/mcp_server.py), which
37
- # self-locates the repo root from __file__.
38
- # * The python MCP server exists only in repo/git+ installs
39
- # (git+https://github.com/Ikalus1988/MisakaNet.git). The npm skill-only bundle
40
- # ships no python, so on such installs the row stays disconnected instead of
41
- # failing boot (failOnStartupError: false).
42
- # * Boot cwd is inherited; run dsh from the repo root for the stdio server to
43
- # start (the plugin-spec sandbox boots at the repo clone).
31
+ # Behaviour notes:
32
+ # * Registers MisakaNet's MCP server into any dsh profile that lists
33
+ # `misakanet` in `dsh.profile.bundles`. Tools appear as
34
+ # `mcp__misakanet__<tool>` (misakanet_search / misakanet_get_lesson / …).
35
+ # * The row points at the PUBLIC Streamable HTTP endpoint, so an **npm install is
36
+ # enough**: tools no longer depend on the repo's python server
37
+ # (scripts/mcp_server.py), which exists only in repo/git+ installs. That was the
38
+ # previous arrangement, and it left every npm install with a disconnected row
39
+ # (issue #1734 — the git+ channel is fragile here: codeload timeouts, and pnpm
40
+ # now blocks git-dependency build scripts until the key is allowed).
41
+ # * `headers.Origin` is what the endpoint's DNS-rebinding guard expects: the
42
+ # worker answers 200 when the header is absent, and 403 for a foreign Origin.
43
+ # * A profile that prefers the local python server can override this row's config
44
+ # (transport stdio, command python3, args [scripts/mcp_server.py], cwd the repo
45
+ # root); index.js merges the row's config over its own defaults.
46
+ # * `failOnStartupError: false` + 60s tool timeout: an unreachable endpoint
47
+ # degrades to a disconnected row instead of failing profile boot, so the skill
48
+ # keeps working offline.
44
49
  # * One row, one id — no double-insert: later patches override by id, and this
45
50
  # id (misakanet-mcp) is unique to this bundle.
46
51
 
@@ -48,12 +53,10 @@
48
53
  - id: misakanet-mcp
49
54
  name: 'misakanet'
50
55
  config:
51
- transport: stdio
56
+ transport: streamable-http
52
57
  serverName: misakanet
53
- command: python3
54
- args:
55
- - scripts/mcp_server.py
56
- env: {}
57
- cwd: ''
58
+ url: https://misakanet.org/mcp
59
+ headers:
60
+ Origin: https://misakanet.org
58
61
  toolCallTimeoutMs: 60000
59
62
  failOnStartupError: false
package/index.js CHANGED
@@ -29,28 +29,33 @@
29
29
  * @deepseek-ai namespace` and rates the listing `route: blocked`
30
30
  * (AI-Scarlett/DSH-Store#747; the rule is in that repo's
31
31
  * scripts/check-plugin-submission.mjs). The patch now inserts *this* package
32
- * (`name: misakanet`) and `apply()` below mounts the official stdio MCP client
33
- * with the row's config — the same runtime behaviour, without naming a
32
+ * (`name: misakanet`) and `apply()` below mounts the official MCP client with
33
+ * the row's config — the same runtime behaviour, without naming a
34
34
  * protected component in the patch.
35
35
  *
36
- * Absence is not failure: when the official client is not resolvable (npm
37
- * skill-only installs, older hosts) `apply()` returns quietly unless the config
38
- * asks to fail loudly, so the skill keeps working and boot never breaks.
36
+ * Absence is not failure: when the official client is not resolvable (older
37
+ * hosts, a profile that never installed DSH's own copy) `apply()` returns
38
+ * quietly unless the config asks to fail loudly, so the skill keeps working
39
+ * and boot never breaks.
39
40
  */
40
41
  export const name = 'misakanet';
41
42
 
42
43
  /**
43
- * The stdio declaration for the repo's own python MCP server. The bundle patch's
44
- * row config overrides any field here, so a profile can point the server at a
45
- * different command or working directory without patching this file.
44
+ * Default MCP declaration: the PUBLIC Streamable HTTP endpoint.
45
+ *
46
+ * This is the transport that works from every install channel. The repo's own
47
+ * python server (`scripts/mcp_server.py`, stdio) only exists in repo/git+
48
+ * checkouts, so defaulting to it left every npm install with a disconnected row
49
+ * (issue #1734). The bundle patch states the same declaration explicitly; the
50
+ * patch's row config is merged over this object, so a profile that wants the
51
+ * local server can point the row at it (transport stdio, command python3,
52
+ * args [scripts/mcp_server.py], cwd the repo root) without patching this file.
46
53
  */
47
54
  export const DEFAULT_MCP_CONFIG = Object.freeze({
48
- transport: 'stdio',
55
+ transport: 'streamable-http',
49
56
  serverName: 'misakanet',
50
- command: 'python3',
51
- args: ['scripts/mcp_server.py'],
52
- env: {},
53
- cwd: '',
57
+ url: 'https://misakanet.org/mcp',
58
+ headers: { Origin: 'https://misakanet.org' },
54
59
  toolCallTimeoutMs: 60000,
55
60
  failOnStartupError: false,
56
61
  });
@@ -64,7 +69,8 @@ export const DEFAULT_MCP_CONFIG = Object.freeze({
64
69
  * that one).
65
70
  *
66
71
  * @param ctx - cordis host context.
67
- * @param config - stdio (or streamable-http) config from the bundle patch row.
72
+ * @param config - MCP config from the bundle patch row (streamable-http by
73
+ * default; stdio is still accepted, e.g. for the repo's python server).
68
74
  */
69
75
  export async function apply(ctx, config = {}) {
70
76
  const options = { ...DEFAULT_MCP_CONFIG, ...config };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "misakanet",
3
- "version": "2.30.1",
3
+ "version": "2.31.0",
4
4
  "license": "Apache-2.0",
5
- "description": "MisakaNet failure-memory skill — evidence-rated failure lessons for AI agents. DSH bundle: registers the stdio MCP server as mcp__misakanet__* tools (misakanet_search/get_lesson/…). Live bundle tools require a git+ install (the npm skill-only bundle ships no python server); skill/CLI surfaces work in any profile.",
5
+ "description": "MisakaNet failure-memory skill — evidence-rated failure lessons for AI agents. DSH bundle: registers the MCP tools as mcp__misakanet__* (misakanet_search/get_lesson/…), served by the public Streamable HTTP endpoint https://misakanet.org/mcp — live tools from an npm install, in any profile, with no local python. A profile that prefers the repo's own stdio server can override the bundle row.",
6
6
  "files": [
7
7
  "SKILL.md",
8
8
  "skills/",