AGENTS.md@internal/browserctlA

AGENTS.md@internal/browserctl 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/browserctl/AGENTS.md@git:20261030.25a3126

Pins git:20261030.25a3126 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
AGENTS.md file
Repository
iohub/yagent
Path
internal/browserctl/AGENTS.md
Versions recorded
4
Latest version
git:20261030.25a3126, committed Oct 30, 2026
First version recorded
Oct 21, 2026
Size
6,306 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/browserctl — browser-control CLI 执行层

> 范围:本目录内不可派生的约束。全局摘要见仓库根 `AGENTS.md` §5.4。
> (原 `docs/browser-agent-design.md` 已不存在,浏览器侧的规格由本文件与 `internal/tools/AGENTS.md` 持有。)

## 边界

外部 `browser-control`(Rust CLI)的执行层:进程/工作区/CDP 生命周期/URL 策略/输出整形。
**不是 Agent**,不决定何时该用浏览器(在 `internal/agents` 与 `internal/tools`),不含工具 schema。
工具层的 14 个 `browser_*` 全部 `Serial`,理由见 `internal/tools/AGENTS.md`。

## 硬约束

**1. `cmd.Dir` 是纪律,不是建议。** 上游把状态写在 **CWD 相对**的 `.browser-control/`,没有任何
环境变量能改这个根(`session.go:64-66`、`manager.go:34-35`)。所有调用必须带 `Dir`
(经 `mgr.spawnOpts` 注入,`spawn.go:53-54` → `session.go:95`);漏设就会**在用户仓库里长出该目录**。
`WorkspaceDir` 是唯一入口(`manager.go:149-152`),新增调用点不要自己拼路径。

**2. 必须显式注入 `BROWSER_CONTROL_CDP_URL`**(`manager.go:524-531`):没有它上游会硬扫
9222/9223,于是连到用户自己的调试浏览器或另一个任务。自启端口从 `CDPPortBase`(9333) 起并**跳过**
9222/9223(`:560-566`)。上游内部 CDP 超时默认仅 15s,本包按最长 wait 把它抬到 ≥65s,
下限与 `config.MinBrowserCDPTimeout` 共用一个常量(`:542-549`)——**别在别处重复注入这个变量**。
外层 `commandTimeout` 必须大于内层,否则判定权被抢(`:551-558`)。

**3. 同一 Session 内串行**:current-tab 与快照 ref 是磁盘上的共享状态(`session.go:77-88`)。

**4. 子进程不经 shell,argv 全由调用方构造**(`spawn.go:41-43`)——这是"LLM 提供的字符串不可能被
解释成 shell 元字符"的前提。
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add iohub/yagent/internal/browserctl/AGENTS.md@sha256:767335abaf142115

The line at the top of this page pins the label git:20261030.25a3126, 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_uvgojt4wrhfezmj7.svg)](https://markdownregistry.com/a/art_uvgojt4wrhfezmj7)

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

Versions

The registry has recorded 4 versions of this file, between Oct 21, 2026 and Oct 30, 2026, about one every 3 days.

versioncommittedcommitsizeaudit
git:20261030.25a3126 latest2026-10-30 25a3126 6,306 BA view · diff
git:20261024.9b444412026-10-24 9b44441 5,264 BA view · diff
git:20261022.53411ac2026-10-22 53411ac 3,845 BA view · diff
git:20261021.9f5bf872026-10-21 9f5bf87 3,845 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 (6306 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_uvgojt4wrhfezmj7
GET https://markdownregistry.com/api/v1/resolve?ref=iohub/yagent/internal/browserctl/AGENTS.md
GET https://markdownregistry.com/api/v1/blob/767335abaf1421152e01cad06a3242a2707548bf7c97a1e5d77b038dbbad8ed8

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/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
AGENTS.md@internal/mcp AGENTS.md file
iohub/yagent · internal/mcp/AGENTS.md
git:20261024.9b44441 · audit A · 31 stars

Every file in iohub/yagent

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