AGENTS.md@internal/mcpA

AGENTS.md@internal/mcp from iohub/yagent is an AGENTS.md file: the standing instructions coding agents read in that repo.

Install it, pinned
mdr add iohub/yagent/internal/mcp/AGENTS.md@git:20261024.9b44441

Pins git:20261024.9b44441 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
AGENTS.md file
Repository
iohub/yagent
Path
internal/mcp/AGENTS.md
Versions recorded
3
Latest version
git:20261024.9b44441, committed Oct 24, 2026
First version recorded
Oct 23, 2026
Size
9,480 bytes
Repository stars
31
License
Apache-2.0

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# internal/mcp — 一个 JSON-RPC 客户端 + 一个多 server Manager

> 范围:本目录不可派生的约束。设计与判据见 `docs/skills-and-mcp-design.md`;
> 全局摘要见根 `AGENTS.md` §5.3 与 §11 坑 44/45。

## 边界

`client.go` 是传输层(stdio 上的 JSON-RPC 2.0),`manager.go` 是生命周期层(多 server、发现、重连、状态账)。
本包只认识标准库 + `internal/supervise`:**不 import** `toolspec`/`tools`/`config`/`messaging` ——
它只吐 `DiscoveredTool`/`ServerHealth` 这种纯数据,翻译由 `internal/app` 与 `internal/tools` 做。

## 硬约束

**1. 传输层只增不改。** `sendJSON`(持 `writeMu`)、`doRequest`(deadline 取调用方 ctx 与
`RequestTimeout` 的较小值)、`readLoop`(乱序按 ID 配对)、`IsAlive`(只读两个原子位)不许重写。
`ListTools` 与 `Instructions` 是新增方法,用的仍是同一条 `doRequest`。

**2. `RequestTimeout <= 0 → 30s` 的兜底只在 `NewMCPClient` 一处。**
上游(app / Manager / config 模板)都不许再抄一个 30 —— 两处各写一个就是一件事的两种真相。

**3. hint 用 `*bool`。** `readOnlyHint: false` 与"没声明"在能力判定里走向不同分支(前者明确有副作用,
后者 fail-safe 按写处理),裸 `bool` 分不清。

**4. `Start` 只同步 spawn,绝不等发现。** 分两半是硬约束:`app.Init` 在 `Start` 返回后立刻
`Client("codeseek")` —— 6 个手写桥在装配期捕获那个指针,客户端晚一步登记就是永久 nil
(比慢更糟);而 initialize 可能几分钟(冷索引),等它就是"终端启动卡在 MCP"。
发现阶段的两条超时各管一件事:`ReadyTimeout`(默认 15 分钟)等 initialize,超时**只留在
starting**、不杀进程;`StartupTimeout` 管 `tools/list`,失败且进程还活着 ⇒ degraded。
`WaitForReady` 上界是调用方的 ctx,装配路径不调它。
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add iohub/yagent/internal/mcp/AGENTS.md@sha256:23d16c60543fbbeb

The line at the top of this page pins the label git:20261024.9b44441, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_oxbjhgqvgwsr6vok.svg)](https://markdownregistry.com/a/art_oxbjhgqvgwsr6vok)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 3 versions of this file, between Oct 23, 2026 and Oct 24, 2026, more than one a day.

versioncommittedcommitsizeaudit
git:20261024.9b44441 latest2026-10-24 9b44441 9,480 BA view · diff
git:20261023.914b4e12026-10-23 914b4e1 4,304 BA view · diff
git:20261023.34d22952026-10-23 34d2295 3,347 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (9480 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

iohub/yagent · 31 stars · license Apache-2.0 · pushed 2026-11-05 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_oxbjhgqvgwsr6vok
GET https://markdownregistry.com/api/v1/resolve?ref=iohub/yagent/internal/mcp/AGENTS.md
GET https://markdownregistry.com/api/v1/blob/23d16c60543fbbebe9583c225290d4b7284094d9e3eddd4fce4629df11b69b0b

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: how to write a good AGENTS.md · AGENTS.md vs CLAUDE.md · which agent file does what.

More from iohub/yagent

AGENTS.md AGENTS.md file
iohub/yagent · AGENTS.md
git:20261103.104f21a · audit A · 31 stars
AGENTS.md@internal AGENTS.md file
iohub/yagent · internal/AGENTS.md
git:20261026.7381d71 · audit A · 31 stars
AGENTS.md@internal/agents AGENTS.md file
iohub/yagent · internal/agents/AGENTS.md
git:20261103.104f21a · audit A · 31 stars
AGENTS.md@internal/agents/director AGENTS.md file
iohub/yagent · internal/agents/director/AGENTS.md
git:20261103.104f21a · audit A · 31 stars
AGENTS.md@internal/app AGENTS.md file
iohub/yagent · internal/app/AGENTS.md
git:20261024.9b44441 · audit A · 31 stars
AGENTS.md@internal/blackboard AGENTS.md file
iohub/yagent · internal/blackboard/AGENTS.md
git:20261026.89c0391 · audit A · 31 stars
AGENTS.md@internal/blueprint AGENTS.md file
iohub/yagent · internal/blueprint/AGENTS.md
git:20261026.9762922 · audit A · 31 stars
AGENTS.md@internal/browserctl AGENTS.md file
iohub/yagent · internal/browserctl/AGENTS.md
git:20261030.25a3126 · audit A · 31 stars
AGENTS.md@internal/compression AGENTS.md file
iohub/yagent · internal/compression/AGENTS.md
git:20261028.19903d6 · audit A · 31 stars
AGENTS.md@internal/config AGENTS.md file
iohub/yagent · internal/config/AGENTS.md
git:20261024.9b44441 · audit A · 31 stars
AGENTS.md@internal/http AGENTS.md file
iohub/yagent · internal/http/AGENTS.md
git:20261026.7381d71 · audit A · 31 stars
AGENTS.md@internal/llm AGENTS.md file
iohub/yagent · internal/llm/AGENTS.md
git:20261027.0637c8b · audit A · 31 stars

Every file in iohub/yagent

Browse by kind, by grade A, or by owner.