@shiyuhang0/ticloud-oncall
v0.1.5
Published
TiDB Cloud oncall plugin for opencode
Readme
@shiyuhang0/ticloud-oncall
TiDB Cloud oncall plugin for opencode.
Features
ticloud— 主协调 agent,自动编排日志分析和元数据查询log-analyzer— Loki 日志分析 subagentmetadata-querier— 集群元数据查询 subagentclinic_cluster_query— Clinic 集群元数据查询 toolloki_log_query— Loki 直连日志查询 tool- 循环检测 — 自动检测重复 tool 调用并中断
Quickstart
在 opencode.json 中配置 plugin,opencode 启动时会自动安装,无需手动 npm install:
{
"plugin": [
["@shiyuhang0/ticloud-oncall", {
"CLINIC_API_KEY": "<your-clinic-api-key>",
"REPO_ROOTS": [
"/Users/you/github"
]
}]
]
}Use
Analyze cluster 10004146697249526430 for recent errors.结合代码搜索:
Diagnose issue INC-1234.
Cluster ID: 10004146697249526430
Use metadata and logs to narrow candidate repos from REPO_ROOTS.Configuration
| Key | Required | Default | Description |
|-----|----------|---------|-------------|
| CLINIC_API_KEY | Yes | — | Clinic API key |
| CLINIC_ENV | No | prod | Clinic environment |
| REPO_ROOTS | No | [] | Local repo paths for code search |
Development
npm install
npm run build
npm test
npm run typecheckPublish
Bump version in package.json, then:
npm publish --access public