dsh-dbhub-live: Instructions file for Codex

AGENTS.md

dsh-dbhub-live AGENTS.md is an instructions file for Codex, OpenCode from mr-mihu/dsh-dbhub-live. It costs 3,602 tokens per session, scanned C, original, MIT.

Repository instructions for AI agents working on a plugin that connects a database server to DSH, a host application, and its browser interface.

In plain words
What is it for?
Use them when developing or debugging the plugin, especially its database connections, workspace configuration, runtime state, and tests.
Why use it?
They give developers one place to understand the code structure, connection handling, settings, and rules for changing the plugin safely.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is mr-mihu/dsh-dbhub-live's own configuration. It tells Codex and OpenCode how to work on dsh-dbhub-live itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dsh-dbhub-live configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mr-mihu/dsh-dbhub-live. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mr-mihu/dsh-dbhub-live/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/mr-mihu/dsh-dbhub-live

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dsh-dbhub-live AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mr-mihu/dsh-dbhub-live/agents-md/github.svg)](https://agentmods.dev/instructions/mr-mihu/dsh-dbhub-live/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mr-mihu/dsh-dbhub-live/agents-md"><img src="https://agentmods.dev/badge/instructions/mr-mihu/dsh-dbhub-live/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dsh-dbhub-live AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mr-mihu/dsh-dbhub-live/agents-md"><img src="https://agentmods.dev/badge/instructions/mr-mihu/dsh-dbhub-live/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,602 This file is loaded in full into every session.
When invoked 3,602 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.03602 $0.03602
Opus 5.5 $0.01441 $0.01441
Sonnet 5.5 $0.00720 $0.00720
Haiku 4.5 $0.00360 $0.00360

Measured 12d ago against content hash 6218decf8645, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

dsh-dbhub-live AGENTS.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

- 秘密字段「留空 = 保持原值」;`auth==='key'` 且无已存路径时落 `DEFAULT_SSH_KEY_PATH = '~/.ssh/id_ed25519'`;载荷统一走 `connDraftOf` / `withConnDraft`。
AGENTS.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — dsh-dbhub-live

本仓库的 AI/维护者入口:这里只记结论(规则、常量、命令、门禁)。原因与踩坑过程见 doc/ARCHITECTURE.md,操作步骤见 doc/DEVELOPMENT.md(调试)/ doc/CLIENT.md(客户端半)/ doc/RELEASE.md(发布)/ doc/DESENSITIZE.md(脱敏),改动前要核查的联动清单见 doc/IMPACT-MATRIX.md。业务需求 doc/REQUIREMENTS.md,用户文档 README.md。

定位

DSH host 插件(Node ESM)+ Web client 插件:把 dbhub(Bytebase 的数据库 MCP 服务器)接入 DSH。两个性质:零知识(DSN/密码只在宿主侧,模型只见 source 句柄与元数据)+ 一次性进程(每次调用 spawn 一条 dbhub,跑完即杀)。附配置页(设置 → DBHub 数据库工具 / 侧边栏 / 插件页「配置」):连接管理、连接测试、SSH 层独立测试、环境级只读、SSH 隧道、版本与更新检查;5.2 起三套布局(弹窗 / 宽屏 / 小屏)。

仓库结构

lib/          host + 客户端实现(模块地图见 ARCHITECTURE)| test/ 单测 | scripts/ 门禁脚本
release-test/ 版本矩阵实测 | doc/ 文档 | .github/ CI | cordis.patch.yml bundle patch | .env 本地脱敏黑名单

模块一览、各文件职责在 doc/ARCHITECTURE.md。

红线(结论)

零知识

  • 工具参数不得有 dsn;dbhub_configure 收到 args.dsn 直接拒绝(result.noDsnViaModel)。
  • 模型可见文本(结果/列表/标签/错误/stderr/诊断)一律过 connLabel 或 scrubSecrets;清洗要折叠任意 URL 连接串的整个 userinfo → 原因。
  • 密码与完整 DSN 只经界面:askUser(configure)/ configOp(配置页)。门禁 test/zero-knowledge.test.mjs。

一次性进程

  • resolveSource 解 DSN → runAdhoc 起一条 dbhub --transport stdio,跑完 terminate。无常驻服务(无指纹 / mtime / 空闲回收 / respawn / 孤儿清理 / 配置重启)→ 原因。
  • 工具恒 4 个:configure / list_sources / execute_sql / search_objects;不为工作区×环境注册工具。
  • apply() 只注册工具 + startBackgroundBoot bookkeeping;dbhub 解析发生在每次调用(runtime.json 缓存);无数据源照常启动。

执行路径

  • ro === true || ssh != null → 临时 --config;其余走 --dsn。
  • TOML 里秘密只写 ${DSH_DBHUB_SEC_*} 占位符,真值走子进程 env;引用集合 == env 键集合(test/toml.test.mjs)。
  • [[tools]] 是白名单:只读必须写两条 → 原因。
  • 版本门槛:1.4.0 起实测;< 1.0.0 拒绝(result.dbhubTooOld);不生成未实测写法。
  • 临时文件在 $DSH_HOME/storages/dsh-dbhub-live/tmp/:finally 尽力删 + boot 时 sweepTempToml()。

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago Changed · -137 lines · -15,656 tokens per session 6218decf8645
  2. 28d ago Changed · +70 lines · +6,049 tokens per session scan A → C 938ce0c5df48
  3. 29d ago Changed · +46 lines · +5,731 tokens per session 28742aaef619
  4. 1mo ago Changed · +23 lines · +2,852 tokens per session f4ce2a54261f
  5. 2mo ago Changed · +17 lines · +992 tokens per session 7a1b08d71c0c
  6. 2mo ago First seen · 98 lines · 3,634 tokens per session scan A cb6d961ac83b

Subscribe to this mod's changes

dsh-dbhub-live AGENTS.md is an instructions file published in the GitHub repository mr-mihu/dsh-dbhub-live (2 stars, last pushed 11d ago), licensed MIT. It adds 3,602 tokens to every session, about $0.0144 per session on Opus 5.5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

dsh-dbhub-live AGENTS.md compared with instructions from other repositories

dsh-dbhub-live AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dsh-dbhub-live AGENTS.mdmr-mihu/dsh-dbhub-liveInstructions file211d agoMITC3,602Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode