@shiyuhang0/ticloud-oncall 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +6 -20
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -13,32 +13,22 @@ TiDB Cloud oncall plugin for [opencode](https://opencode.ai).
13
13
 
14
14
  ## Quickstart
15
15
 
16
- ### 1. Install
17
-
18
- ```bash
19
- npm install @shiyuhang0/ticloud-oncall
20
- ```
21
-
22
- ### 2. Configure opencode
23
-
24
- 在 opencode 配置文件中加载 plugin:
16
+ `opencode.json` 中配置 plugin,opencode 启动时会自动安装,无需手动 `npm install`:
25
17
 
26
18
  ```json
27
19
  {
28
20
  "plugin": [
29
- ["@shiyuhang0/ticloud-oncall", {
21
+ ["@shiyuhang0/ticloud-oncall@0.1.1", {
30
22
  "CLINIC_API_KEY": "<your-clinic-api-key>",
31
- "CLINIC_ENV": "prod",
32
23
  "REPO_ROOTS": [
33
- "/Users/you/github/tidb-cloud",
34
- "/Users/you/github/platform-services"
24
+ "/Users/you/github"
35
25
  ]
36
26
  }]
37
27
  ]
38
28
  }
39
29
  ```
40
30
 
41
- ### 3. Use
31
+ ### Use
42
32
 
43
33
  ```text
44
34
  Analyze cluster 10004146697249526430 for recent errors.
@@ -60,12 +50,6 @@ Use metadata and logs to narrow candidate repos from REPO_ROOTS.
60
50
  | `CLINIC_ENV` | No | `prod` | Clinic environment |
61
51
  | `REPO_ROOTS` | No | `[]` | Local repo paths for code search |
62
52
 
63
- ## Constraints
64
-
65
- - 日志查询必须先 `labels` / `label_values`,再宽搜,再窄搜
66
- - 单次 Loki 查询时间范围不超过 30 天
67
- - `explore` 只应搜索从 `REPO_ROOTS` 中缩小后的候选 repo
68
-
69
53
  ## Development
70
54
 
71
55
  ```bash
@@ -77,6 +61,8 @@ npm run typecheck
77
61
 
78
62
  ## Publish
79
63
 
64
+ Bump version in `package.json`, then:
65
+
80
66
  ```bash
81
67
  npm publish --access public
82
68
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shiyuhang0/ticloud-oncall",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "TiDB Cloud oncall plugin for opencode",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",