@quicktvui/ai 1.1.18 → 1.1.19
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.
- package/package.json +1 -1
- package/rules/.claude/commands/create-component.md +1 -1
- package/rules/.claude/commands/create-page.md +1 -1
- package/rules/.claude/commands/create-project.md +1 -1
- package/rules/.claude/commands/lookup-api.md +1 -1
- package/rules/.claude/commands/lookup-css.md +1 -1
- package/rules/.clinerules +9 -2
- package/rules/.cursorrules +9 -2
- package/rules/.docs/zh-CN/tool/api/plugin-server-api.md +18 -2
- package/rules/.docs/zh-CN/tool/api/runtime-status.md +95 -0
- package/rules/.docs/zh-CN/tool/cli/plugin-server.md +20 -3
- package/rules/.docs/zh-CN/tool/cli/runtime-status.md +49 -0
- package/rules/.github/copilot-instructions.md +9 -2
- package/rules/.windsurfrules +9 -2
- package/rules/AGENTS.md +13 -5
- package/rules/AI_HANDOFF.md +10 -4
- package/rules/CLAUDE.md +13 -5
- package/rules/GEMINI.md +13 -5
package/package.json
CHANGED
package/rules/.clinerules
CHANGED
|
@@ -104,12 +104,13 @@ AI MUST NOT claim it inspected runtime data unless MCP or `quicktvui-ai debug-*`
|
|
|
104
104
|
|
|
105
105
|
## Plugin Server Workflow (CRITICAL)
|
|
106
106
|
|
|
107
|
-
When the user asks AI to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`)
|
|
107
|
+
When the user asks AI to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`) or recent runtime load status from `/status`:
|
|
108
108
|
|
|
109
109
|
1. Prefer connected `quicktvui-ai-mcp` plugin tools:
|
|
110
110
|
- `plugin_server_check`
|
|
111
111
|
- `plugin_server_hello`
|
|
112
112
|
- `plugin_server_status`
|
|
113
|
+
- `quicktvui_runtime_status`
|
|
113
114
|
- `plugin_upload_so`
|
|
114
115
|
- `plugin_upload_plugin`
|
|
115
116
|
2. Otherwise use `quicktvui-ai plugin-*`
|
|
@@ -126,7 +127,10 @@ Required order:
|
|
|
126
127
|
3. Read current state:
|
|
127
128
|
- `plugin_server_status`
|
|
128
129
|
- or `quicktvui-ai plugin-status --device <serial>`
|
|
129
|
-
4.
|
|
130
|
+
4. If the task is to inspect recent runtime load state or latest error info after quick-app/plugin load:
|
|
131
|
+
- `quicktvui_runtime_status`
|
|
132
|
+
- or `quicktvui-ai runtime-status --device <serial>`
|
|
133
|
+
5. Upload So zip:
|
|
130
134
|
- choose the archive matching `ro.product.cpu.abi` on the service-corresponding device
|
|
131
135
|
- `quicktvui-ai plugin-upload-so --device <serial> --tag eskit.so.ffmpeg.command --pkg eskit.so.ffmpeg.command --file <zip-path>`
|
|
132
136
|
5. Upload plugin APK:
|
|
@@ -136,6 +140,7 @@ Hard requirements:
|
|
|
136
140
|
|
|
137
141
|
- Runtime endpoint behavior overrides markdown docs.
|
|
138
142
|
- Probe `/hello`, `/status`, `/uploadSo`, `/uploadPlugin` with `POST`, not `GET`.
|
|
143
|
+
- `/status` may include `data.loadStatus`, which is the authoritative recent runtime load-state/error map for quick-app/plugin startup. After `run-dev`, `run-esapp`, page-side install, or a startup failure, query `quicktvui_runtime_status` / `runtime-status` and report the package key plus `__debug__`.
|
|
139
144
|
- Resolve plugin server address in this order:
|
|
140
145
|
- explicit `baseUrl` / `--plugin-base-url`
|
|
141
146
|
- adb-connected device service address
|
|
@@ -154,7 +159,9 @@ Hard requirements:
|
|
|
154
159
|
- After uploading a newly rebuilt or replaced plugin package, restart the host/runtime process before validating page-side usage or startup; the running host does not hot-swap new plugin bytes automatically.
|
|
155
160
|
- Consult:
|
|
156
161
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/plugin-server-api.md`
|
|
162
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/runtime-status.md`
|
|
157
163
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/plugin-server.md`
|
|
164
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/runtime-status.md`
|
|
158
165
|
|
|
159
166
|
|
|
160
167
|
## Plugin Scaffold Workflow (CRITICAL)
|
package/rules/.cursorrules
CHANGED
|
@@ -104,12 +104,13 @@ AI MUST NOT claim it inspected runtime data unless MCP or `quicktvui-ai debug-*`
|
|
|
104
104
|
|
|
105
105
|
## Plugin Server Workflow (CRITICAL)
|
|
106
106
|
|
|
107
|
-
When the user asks AI to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`)
|
|
107
|
+
When the user asks AI to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`) or recent runtime load status from `/status`:
|
|
108
108
|
|
|
109
109
|
1. Prefer connected `quicktvui-ai-mcp` plugin tools:
|
|
110
110
|
- `plugin_server_check`
|
|
111
111
|
- `plugin_server_hello`
|
|
112
112
|
- `plugin_server_status`
|
|
113
|
+
- `quicktvui_runtime_status`
|
|
113
114
|
- `plugin_upload_so`
|
|
114
115
|
- `plugin_upload_plugin`
|
|
115
116
|
2. Otherwise use `quicktvui-ai plugin-*`
|
|
@@ -126,7 +127,10 @@ Required order:
|
|
|
126
127
|
3. Read current state:
|
|
127
128
|
- `plugin_server_status`
|
|
128
129
|
- or `quicktvui-ai plugin-status --device <serial>`
|
|
129
|
-
4.
|
|
130
|
+
4. If the task is to inspect recent runtime load state or latest error info after quick-app/plugin load:
|
|
131
|
+
- `quicktvui_runtime_status`
|
|
132
|
+
- or `quicktvui-ai runtime-status --device <serial>`
|
|
133
|
+
5. Upload So zip:
|
|
130
134
|
- choose the archive matching `ro.product.cpu.abi` on the service-corresponding device
|
|
131
135
|
- `quicktvui-ai plugin-upload-so --device <serial> --tag eskit.so.ffmpeg.command --pkg eskit.so.ffmpeg.command --file <zip-path>`
|
|
132
136
|
5. Upload plugin APK:
|
|
@@ -136,6 +140,7 @@ Hard requirements:
|
|
|
136
140
|
|
|
137
141
|
- Runtime endpoint behavior overrides markdown docs.
|
|
138
142
|
- Probe `/hello`, `/status`, `/uploadSo`, `/uploadPlugin` with `POST`, not `GET`.
|
|
143
|
+
- `/status` may include `data.loadStatus`, which is the authoritative recent runtime load-state/error map for quick-app/plugin startup. After `run-dev`, `run-esapp`, page-side install, or a startup failure, query `quicktvui_runtime_status` / `runtime-status` and report the package key plus `__debug__`.
|
|
139
144
|
- Resolve plugin server address in this order:
|
|
140
145
|
- explicit `baseUrl` / `--plugin-base-url`
|
|
141
146
|
- adb-connected device service address
|
|
@@ -154,7 +159,9 @@ Hard requirements:
|
|
|
154
159
|
- After uploading a newly rebuilt or replaced plugin package, restart the host/runtime process before validating page-side usage or startup; the running host does not hot-swap new plugin bytes automatically.
|
|
155
160
|
- Consult:
|
|
156
161
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/plugin-server-api.md`
|
|
162
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/runtime-status.md`
|
|
157
163
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/plugin-server.md`
|
|
164
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/runtime-status.md`
|
|
158
165
|
|
|
159
166
|
|
|
160
167
|
## Plugin Scaffold Workflow (CRITICAL)
|
|
@@ -25,6 +25,7 @@ http://<tv-ip>:36366/api/v1
|
|
|
25
25
|
6. `abi` 只在上传 So 时才需要。CLI / MCP 如果在 `uploadSo` 时未显式传 `abi`,会尝试读取当前插件服务对应设备的 `ro.product.cpu.abi` 并按需补齐;`check` / `hello` / `status` / `uploadPlugin` 不会主动查询 ABI。
|
|
26
26
|
7. `uploadPlugin` 返回成功,只代表插件包已上传到插件服务缓存;如果 Vue 页面需要实际使用该插件,还必须在页面侧通过 `useESPlugin()` 监听并调用 `installPlugin({ pkg })`,不能把“上传成功”误当成“页面已安装完成”。
|
|
27
27
|
8. 上传新的插件包到服务后,当前宿主 / runtime 进程不会自动热更新到新字节码;复测启动、注册或页面接入前,必须先重启宿主进程。
|
|
28
|
+
9. 当快应用、插件或页面刚刚发起加载后,若需要继续查看最近一次加载状态与错误信息,应优先查询 `/status` 中的 `data.loadStatus`,推荐参考同目录 `runtime-status.md`。
|
|
28
29
|
|
|
29
30
|
## 二、开启服务
|
|
30
31
|
|
|
@@ -70,15 +71,30 @@ quicktvui-ai plugin-enable-api --device <serial>
|
|
|
70
71
|
"soList": [
|
|
71
72
|
"eskit.so.player.v1"
|
|
72
73
|
],
|
|
73
|
-
"pluginList": []
|
|
74
|
+
"pluginList": [],
|
|
75
|
+
"loadStatus": {
|
|
76
|
+
"es.extscreen.runtime.error": {
|
|
77
|
+
"status": "SUCCESS",
|
|
78
|
+
"message": ""
|
|
79
|
+
},
|
|
80
|
+
"__debug__": {
|
|
81
|
+
"status": "ERROR",
|
|
82
|
+
"message": "网络不可用,请检查网络后重试"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
74
85
|
}
|
|
75
86
|
}
|
|
76
87
|
```
|
|
77
88
|
|
|
78
89
|
说明:
|
|
79
90
|
|
|
80
|
-
1. `soList` / `pluginList`
|
|
91
|
+
1. `soList` / `pluginList` / `loadStatus` 都以当前服务实际返回为准,不应脑补额外状态。
|
|
81
92
|
2. 即使上传插件成功,`pluginList` 也可能仍为空。
|
|
93
|
+
3. `loadStatus` 用于表达最近一次加载状态映射,key 一般是包名或 `__debug__`。
|
|
94
|
+
4. 当快应用加载失败、页面没起来、或插件安装后仍不可用时,AI 应优先继续分析 `loadStatus` 中对应项的 `status` / `message`。
|
|
95
|
+
5. QuickTVUI AI 推荐命令:
|
|
96
|
+
- CLI:`quicktvui-ai runtime-status --device <serial>`
|
|
97
|
+
- MCP:`quicktvui_runtime_status`
|
|
82
98
|
|
|
83
99
|
### 3.3 `POST /uploadSo`
|
|
84
100
|
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Runtime Status API
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 运行状态接口
|
|
7
|
+
|
|
8
|
+
## 一、用途
|
|
9
|
+
|
|
10
|
+
当快应用已经发起加载、插件已经上传或安装、页面启动失败,且 AI 需要继续查看最近一次加载状态与错误信息时,应读取插件服务的 `/status` 返回中的 `data.loadStatus`。
|
|
11
|
+
|
|
12
|
+
典型场景:
|
|
13
|
+
|
|
14
|
+
1. `run-dev` / `run-esapp` 后页面没有正常起来
|
|
15
|
+
2. 插件安装成功回调后,模块 / 组件仍未可用
|
|
16
|
+
3. 需要确认最近一次加载到底是 `SUCCESS` 还是 `ERROR`
|
|
17
|
+
4. 需要拿到最近一次失败消息继续诊断
|
|
18
|
+
|
|
19
|
+
## 二、接口信息
|
|
20
|
+
|
|
21
|
+
```http
|
|
22
|
+
POST /api/v1/status
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
说明:
|
|
26
|
+
|
|
27
|
+
1. 该接口是 `POST`,不要用 `GET`
|
|
28
|
+
2. 根路径默认是 `http://<tv-ip>:36366/api/v1`
|
|
29
|
+
3. 在调用前,应先通过 Toolkit 广播打开 `RESTFUL_API`
|
|
30
|
+
|
|
31
|
+
## 三、关键字段
|
|
32
|
+
|
|
33
|
+
| 字段 | 类型 | 说明 |
|
|
34
|
+
| ---- | ---- | ---- |
|
|
35
|
+
| `soList` | array | 当前已加载的 So 键列表 |
|
|
36
|
+
| `pluginList` | array | 当前已加载的插件包名列表 |
|
|
37
|
+
| `loadStatus` | object | 最近一次加载状态映射,key 一般是包名或 `__debug__` |
|
|
38
|
+
|
|
39
|
+
`loadStatus` 子字段:
|
|
40
|
+
|
|
41
|
+
| 字段 | 类型 | 说明 |
|
|
42
|
+
| ---- | ---- | ---- |
|
|
43
|
+
| `status` | string | `SUCCESS` 或 `ERROR` |
|
|
44
|
+
| `message` | string | 最近一次错误信息;成功时通常为空字符串 |
|
|
45
|
+
|
|
46
|
+
## 四、建议读取方式
|
|
47
|
+
|
|
48
|
+
优先使用 QuickTVUI AI 工具,而不是直接手写 curl。
|
|
49
|
+
|
|
50
|
+
### 4.1 CLI
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
quicktvui-ai runtime-status --device <serial>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 4.2 MCP
|
|
57
|
+
|
|
58
|
+
- `quicktvui_runtime_status`
|
|
59
|
+
|
|
60
|
+
## 五、判断规则
|
|
61
|
+
|
|
62
|
+
1. `plugin-status` / `plugin_server_status` 更适合读原始 `/status`
|
|
63
|
+
2. `runtime-status` / `quicktvui_runtime_status` 更适合聚焦 `loadStatus`
|
|
64
|
+
3. 分析时应同时看:
|
|
65
|
+
- 业务包名对应项
|
|
66
|
+
- `__debug__`
|
|
67
|
+
4. 如果 `message` 非空,应优先把它当成最近一次加载失败的直接线索
|
|
68
|
+
5. `status.pluginList` 为空,不代表 `loadStatus` 也没有信息
|
|
69
|
+
|
|
70
|
+
## 六、示例
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"code": 0,
|
|
75
|
+
"message": "success",
|
|
76
|
+
"data": {
|
|
77
|
+
"soList": [
|
|
78
|
+
"demo_arm64-v8a"
|
|
79
|
+
],
|
|
80
|
+
"pluginList": [
|
|
81
|
+
"eskit.plugin.test"
|
|
82
|
+
],
|
|
83
|
+
"loadStatus": {
|
|
84
|
+
"es.extscreen.runtime.error": {
|
|
85
|
+
"status": "SUCCESS",
|
|
86
|
+
"message": ""
|
|
87
|
+
},
|
|
88
|
+
"__debug__": {
|
|
89
|
+
"status": "ERROR",
|
|
90
|
+
"message": "网络不可用,请检查网络后重试"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
@@ -45,7 +45,24 @@ quicktvui-ai plugin-check --device <serial>
|
|
|
45
45
|
quicktvui-ai plugin-status --device <serial>
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
说明:
|
|
49
|
+
|
|
50
|
+
1. 该命令适合读取原始 `/status`
|
|
51
|
+
2. 重点关注 `soList`、`pluginList` 与原始 `data` 结构
|
|
52
|
+
|
|
53
|
+
### 2.4 查看最近加载状态与错误信息
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
quicktvui-ai runtime-status --device <serial>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
说明:
|
|
60
|
+
|
|
61
|
+
1. 该命令同样读取 `/status`,但会把 `data.loadStatus` 作为重点输出字段
|
|
62
|
+
2. 当快应用刚加载、插件刚安装、页面没起来、或需要继续看最近一次错误信息时,应优先使用这个命令
|
|
63
|
+
3. 重点关注具体包名对应项,以及 `__debug__` 下的 `status` / `message`
|
|
64
|
+
|
|
65
|
+
### 2.5 上传 So
|
|
49
66
|
|
|
50
67
|
```bash
|
|
51
68
|
quicktvui-ai plugin-upload-so \
|
|
@@ -61,7 +78,7 @@ quicktvui-ai plugin-upload-so \
|
|
|
61
78
|
2. 建议总是同时传 `--tag` 和 `--pkg`
|
|
62
79
|
3. So zip 必须和设备 ABI 一致
|
|
63
80
|
|
|
64
|
-
### 2.
|
|
81
|
+
### 2.6 上传插件 APK
|
|
65
82
|
|
|
66
83
|
```bash
|
|
67
84
|
quicktvui-ai plugin-upload-plugin \
|
|
@@ -76,7 +93,7 @@ quicktvui-ai plugin-upload-plugin \
|
|
|
76
93
|
2. 如果上传的是新构建或覆盖上传的插件包,复测前必须先重启宿主 / runtime 进程
|
|
77
94
|
3. 宿主重启后,再继续做 Vue 页面安装、注册校验或启动验证
|
|
78
95
|
|
|
79
|
-
### 2.
|
|
96
|
+
### 2.7 Vue 侧安装插件
|
|
80
97
|
|
|
81
98
|
`plugin-upload-plugin` 成功,只代表插件包已经进入插件服务缓存;如果页面里需要真正使用插件,还必须在 Vue 侧补齐安装流程。
|
|
82
99
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Runtime Status
|
|
3
|
+
lang: zh-CN
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 运行状态 CLI
|
|
7
|
+
|
|
8
|
+
## 一、用途
|
|
9
|
+
|
|
10
|
+
当快应用加载后页面未正常起来、插件安装后组件/模块仍未注册、或用户明确要求查看最近一次加载状态与错误信息时,优先使用:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
quicktvui-ai runtime-status --device <serial>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
这个命令底层仍调用 `/api/v1/status`,但会把 `data.loadStatus` 作为重点输出字段,方便 AI 继续判断最近一次加载是成功还是失败。
|
|
17
|
+
|
|
18
|
+
## 二、推荐时机
|
|
19
|
+
|
|
20
|
+
1. `quicktvui-ai run-dev` / `run-esapp` 之后
|
|
21
|
+
2. `plugin-upload-plugin` 或页面侧 `installPlugin({ pkg })` 之后
|
|
22
|
+
3. 页面空白、组件未注册、模块调用失败之后
|
|
23
|
+
4. 设备日志以外,还需要再看服务侧最近一次加载状态时
|
|
24
|
+
|
|
25
|
+
## 三、命令示例
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
quicktvui-ai runtime-status --device <serial>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
也可以显式指定服务地址:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
quicktvui-ai runtime-status --plugin-base-url http://<tv-ip>:36366
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 四、重点字段
|
|
38
|
+
|
|
39
|
+
1. `loadStatus.<pkg>.status`
|
|
40
|
+
2. `loadStatus.<pkg>.message`
|
|
41
|
+
3. `loadStatus.__debug__.status`
|
|
42
|
+
4. `loadStatus.__debug__.message`
|
|
43
|
+
|
|
44
|
+
## 五、判断规则
|
|
45
|
+
|
|
46
|
+
1. 这个命令适合查最近一次加载状态与错误信息
|
|
47
|
+
2. `plugin-status` 更适合读取原始 `/status` 缓存状态
|
|
48
|
+
3. 如果 `pluginList` 为空,也不能跳过 `loadStatus`
|
|
49
|
+
4. 如果刚重传了新插件版本,复测前应先重启宿主 / runtime 进程,再重新查询运行状态
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: copilot-instructions.md
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.19
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# copilot-instructions.md - QuickTVUI AI Development Guide
|
|
@@ -70,12 +70,13 @@ AI MUST NOT say it has checked logs/screenshots unless one of those MCP/CLI read
|
|
|
70
70
|
|
|
71
71
|
## Plugin Server Workflow (CRITICAL)
|
|
72
72
|
|
|
73
|
-
When the task is to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`)
|
|
73
|
+
When the task is to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`) or recent runtime load status from `/status`, AI MUST use this priority:
|
|
74
74
|
|
|
75
75
|
1. Prefer connected `quicktvui-ai-mcp` plugin tools:
|
|
76
76
|
- `plugin_server_check`
|
|
77
77
|
- `plugin_server_hello`
|
|
78
78
|
- `plugin_server_status`
|
|
79
|
+
- `quicktvui_runtime_status`
|
|
79
80
|
- `plugin_upload_so`
|
|
80
81
|
- `plugin_upload_plugin`
|
|
81
82
|
2. Otherwise use `quicktvui-ai plugin-*`
|
|
@@ -92,6 +93,9 @@ Required order:
|
|
|
92
93
|
- Read current state:
|
|
93
94
|
- `plugin_server_status`
|
|
94
95
|
- or `quicktvui-ai plugin-status --device <serial>`
|
|
96
|
+
- If the task is to inspect recent runtime load state or latest error info after quick-app/plugin load:
|
|
97
|
+
- `quicktvui_runtime_status`
|
|
98
|
+
- or `quicktvui-ai runtime-status --device <serial>`
|
|
95
99
|
- Resolve plugin server address:
|
|
96
100
|
- explicit `baseUrl` / `--plugin-base-url`
|
|
97
101
|
- adb-connected device service address
|
|
@@ -108,6 +112,7 @@ Hard requirements:
|
|
|
108
112
|
|
|
109
113
|
- Runtime endpoint behavior overrides markdown docs.
|
|
110
114
|
- Probe `/hello`, `/status`, `/uploadSo`, `/uploadPlugin` with `POST`, not `GET`.
|
|
115
|
+
- `/status` may include `data.loadStatus`, which is the authoritative recent runtime load-state/error map for quick-app/plugin startup. After `run-dev`, `run-esapp`, page-side install, or a startup failure, query `quicktvui_runtime_status` / `runtime-status` and report the package key plus `__debug__`.
|
|
111
116
|
- If AI is working inside the `quicktvui-ai` repo and finds doc/runtime drift, AI MUST update the docs.
|
|
112
117
|
- `uploadSo` currently has `pkg` / `tag` drift. AI SHOULD send both fields and trust successful `data.tag`.
|
|
113
118
|
- Default demo identifiers:
|
|
@@ -120,7 +125,9 @@ Hard requirements:
|
|
|
120
125
|
- After uploading a newly rebuilt or replaced plugin package, restart the host/runtime process before validating page-side usage or startup; the running host does not hot-swap new plugin bytes automatically.
|
|
121
126
|
- Consult:
|
|
122
127
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/plugin-server-api.md`
|
|
128
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/runtime-status.md`
|
|
123
129
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/plugin-server.md`
|
|
130
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/runtime-status.md`
|
|
124
131
|
|
|
125
132
|
|
|
126
133
|
## Plugin Scaffold Workflow (CRITICAL)
|
package/rules/.windsurfrules
CHANGED
|
@@ -104,12 +104,13 @@ AI MUST NOT claim it inspected runtime data unless MCP or `quicktvui-ai debug-*`
|
|
|
104
104
|
|
|
105
105
|
## Plugin Server Workflow (CRITICAL)
|
|
106
106
|
|
|
107
|
-
When the user asks AI to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`)
|
|
107
|
+
When the user asks AI to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`) or recent runtime load status from `/status`:
|
|
108
108
|
|
|
109
109
|
1. Prefer connected `quicktvui-ai-mcp` plugin tools:
|
|
110
110
|
- `plugin_server_check`
|
|
111
111
|
- `plugin_server_hello`
|
|
112
112
|
- `plugin_server_status`
|
|
113
|
+
- `quicktvui_runtime_status`
|
|
113
114
|
- `plugin_upload_so`
|
|
114
115
|
- `plugin_upload_plugin`
|
|
115
116
|
2. Otherwise use `quicktvui-ai plugin-*`
|
|
@@ -126,7 +127,10 @@ Required order:
|
|
|
126
127
|
3. Read current state:
|
|
127
128
|
- `plugin_server_status`
|
|
128
129
|
- or `quicktvui-ai plugin-status --device <serial>`
|
|
129
|
-
4.
|
|
130
|
+
4. If the task is to inspect recent runtime load state or latest error info after quick-app/plugin load:
|
|
131
|
+
- `quicktvui_runtime_status`
|
|
132
|
+
- or `quicktvui-ai runtime-status --device <serial>`
|
|
133
|
+
5. Upload So zip:
|
|
130
134
|
- choose the archive matching `ro.product.cpu.abi` on the service-corresponding device
|
|
131
135
|
- `quicktvui-ai plugin-upload-so --device <serial> --tag eskit.so.ffmpeg.command --pkg eskit.so.ffmpeg.command --file <zip-path>`
|
|
132
136
|
5. Upload plugin APK:
|
|
@@ -136,6 +140,7 @@ Hard requirements:
|
|
|
136
140
|
|
|
137
141
|
- Runtime endpoint behavior overrides markdown docs.
|
|
138
142
|
- Probe `/hello`, `/status`, `/uploadSo`, `/uploadPlugin` with `POST`, not `GET`.
|
|
143
|
+
- `/status` may include `data.loadStatus`, which is the authoritative recent runtime load-state/error map for quick-app/plugin startup. After `run-dev`, `run-esapp`, page-side install, or a startup failure, query `quicktvui_runtime_status` / `runtime-status` and report the package key plus `__debug__`.
|
|
139
144
|
- Resolve plugin server address in this order:
|
|
140
145
|
- explicit `baseUrl` / `--plugin-base-url`
|
|
141
146
|
- adb-connected device service address
|
|
@@ -154,7 +159,9 @@ Hard requirements:
|
|
|
154
159
|
- After uploading a newly rebuilt or replaced plugin package, restart the host/runtime process before validating page-side usage or startup; the running host does not hot-swap new plugin bytes automatically.
|
|
155
160
|
- Consult:
|
|
156
161
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/plugin-server-api.md`
|
|
162
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/runtime-status.md`
|
|
157
163
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/plugin-server.md`
|
|
164
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/runtime-status.md`
|
|
158
165
|
|
|
159
166
|
|
|
160
167
|
## Plugin Scaffold Workflow (CRITICAL)
|
package/rules/AGENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: AGENTS.md
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.19
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# AGENTS.md - QuickTVUI AI Development Guide
|
|
@@ -140,15 +140,17 @@ Hard requirements:
|
|
|
140
140
|
- If `debug-targets` returns an empty list, AI MUST clearly state that no active `ESDebugServer /ai/targets` are available yet.
|
|
141
141
|
- If `debug-native-logs` or `debug-screenshot` fails, AI MUST report the concrete command/error instead of fabricating fallback observations.
|
|
142
142
|
- When user asks for a screenshot and CLI mode is used, AI SHOULD prefer the file path returned by `quicktvui-ai debug-screenshot` rather than asking the user to locate the image manually.
|
|
143
|
+
- When the user is asking about recent quick-app load state, startup failure, or the latest runtime-side error message after load, AI SHOULD also query `quicktvui_runtime_status` / `quicktvui-ai runtime-status` and report the relevant package key plus `__debug__` from `data.loadStatus`.
|
|
143
144
|
|
|
144
145
|
## Plugin Server Workflow (CRITICAL)
|
|
145
146
|
|
|
146
|
-
When the user asks AI to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`)
|
|
147
|
+
When the user asks AI to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`) or recent runtime load status from `/status`, AI MUST use this priority:
|
|
147
148
|
|
|
148
149
|
1. Prefer connected `quicktvui-ai-mcp` plugin tools:
|
|
149
150
|
- `plugin_server_check`
|
|
150
151
|
- `plugin_server_hello`
|
|
151
152
|
- `plugin_server_status`
|
|
153
|
+
- `quicktvui_runtime_status`
|
|
152
154
|
- `plugin_upload_so`
|
|
153
155
|
- `plugin_upload_plugin`
|
|
154
156
|
2. If MCP is unavailable but shell/CLI execution is available, AI MUST use `quicktvui-ai plugin-*`.
|
|
@@ -165,22 +167,26 @@ Required workflow:
|
|
|
165
167
|
3. Read current state:
|
|
166
168
|
- MCP: `plugin_server_status`
|
|
167
169
|
- CLI: `quicktvui-ai plugin-status --device <serial>`
|
|
168
|
-
4.
|
|
170
|
+
4. If the user needs recent runtime load state or latest error info after quick-app/plugin load:
|
|
171
|
+
- MCP: `quicktvui_runtime_status`
|
|
172
|
+
- CLI: `quicktvui-ai runtime-status --device <serial>`
|
|
173
|
+
5. Resolve plugin server address:
|
|
169
174
|
- If `baseUrl` / `--plugin-base-url` is explicitly provided, use it
|
|
170
175
|
- Otherwise, if adb already has a connected target, use that target's plugin service address first
|
|
171
176
|
- If the target host cannot be inferred, use adb port forward and `http://127.0.0.1:36366`
|
|
172
177
|
- If multiple adb devices are connected, AI MUST ask the user to choose `serial` or provide service IP / `baseUrl`
|
|
173
178
|
- If no adb-connected device exists, AI MUST ask the user for service IP / `baseUrl`, and MUST NOT invent or hardcode a developer-specific TV IP
|
|
174
|
-
|
|
179
|
+
6. Upload So zip:
|
|
175
180
|
- choose the zip whose ABI matches `ro.product.cpu.abi` on the device that serves the current plugin endpoint
|
|
176
181
|
- CLI: `quicktvui-ai plugin-upload-so --device <serial> --tag eskit.so.ffmpeg.command --pkg eskit.so.ffmpeg.command --file <zip-path>`
|
|
177
|
-
|
|
182
|
+
7. Upload plugin APK:
|
|
178
183
|
- CLI: `quicktvui-ai plugin-upload-plugin --device <serial> --pkg eskit.plugin.imagequality --file <apk-path>`
|
|
179
184
|
|
|
180
185
|
Hard requirements:
|
|
181
186
|
|
|
182
187
|
- AI MUST treat live endpoint behavior as the source of truth over markdown docs.
|
|
183
188
|
- AI MUST probe `/hello`, `/status`, `/uploadSo`, `/uploadPlugin` with `POST`, not `GET`.
|
|
189
|
+
- `/status` may include `data.loadStatus`, which is the authoritative recent runtime load-state/error map for quick-app/plugin startup. After `run-dev`, `run-esapp`, page-side plugin install, or a startup failure, AI SHOULD query `quicktvui_runtime_status` / `runtime-status` and report the relevant package key plus `__debug__`.
|
|
184
190
|
- If AI is working inside the `quicktvui-ai` repository and docs disagree with the live interface, AI MUST update the docs to match the runtime behavior.
|
|
185
191
|
- `uploadSo` currently has observed `pkg` / `tag` drift. AI SHOULD send both `pkg` and `tag`, and treat successful response field `data.tag` as authoritative.
|
|
186
192
|
- The default demo identifiers are:
|
|
@@ -193,7 +199,9 @@ Hard requirements:
|
|
|
193
199
|
- Uploading a newly rebuilt or replaced plugin package to the plugin service does NOT hot-swap the already running host/runtime process. Before validating startup, registration, or page-side usage after a new plugin upload, AI MUST restart the host/runtime process so the new plugin bytes can take effect.
|
|
194
200
|
- AI SHOULD consult these packaged docs before generating commands or guidance:
|
|
195
201
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/plugin-server-api.md`
|
|
202
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/runtime-status.md`
|
|
196
203
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/plugin-server.md`
|
|
204
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/runtime-status.md`
|
|
197
205
|
|
|
198
206
|
## Plugin Scaffold Workflow (CRITICAL)
|
|
199
207
|
|
package/rules/AI_HANDOFF.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: AI_HANDOFF.md
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.19
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# QuickTVUI AI 集成 - 工作交接文档
|
|
@@ -104,22 +104,26 @@ AI 在编写业务逻辑时,极易带入传统 Web 开发习惯导致严重报
|
|
|
104
104
|
3. 读取状态
|
|
105
105
|
- MCP:`plugin_server_status`
|
|
106
106
|
- CLI:`quicktvui-ai plugin-status --device <serial>`
|
|
107
|
-
4.
|
|
107
|
+
4. 如果任务需要最近一次 runtime 加载状态与错误信息
|
|
108
|
+
- MCP:`quicktvui_runtime_status`
|
|
109
|
+
- CLI:`quicktvui-ai runtime-status --device <serial>`
|
|
110
|
+
5. 解析插件服务地址
|
|
108
111
|
- 如果显式传了 `baseUrl` / `--plugin-base-url`,优先使用该地址
|
|
109
112
|
- 否则,如果 adb 已连接设备,先尝试使用该设备的插件服务地址
|
|
110
113
|
- 如果无法从目标设备推断 host,则改用 adb 端口转发和 `http://127.0.0.1:36366`
|
|
111
114
|
- 如果同时连接了多台 adb 设备,后续 AI 必须要求用户选择 `serial` 或提供服务 IP / `baseUrl`
|
|
112
115
|
- 如果没有任何 adb 已连接设备,后续 AI 必须向用户索要服务 IP / `baseUrl`,不得脑补或写死某个开发者自己的电视 IP
|
|
113
|
-
|
|
116
|
+
6. 上传 So
|
|
114
117
|
- 必须先根据当前插件服务对应设备的 `ro.product.cpu.abi` 选择 zip
|
|
115
118
|
- CLI:`quicktvui-ai plugin-upload-so --device <serial> --tag eskit.so.ffmpeg.command --pkg eskit.so.ffmpeg.command --file <zip-path>`
|
|
116
|
-
|
|
119
|
+
7. 上传插件 APK
|
|
117
120
|
- CLI:`quicktvui-ai plugin-upload-plugin --device <serial> --pkg eskit.plugin.imagequality --file <apk-path>`
|
|
118
121
|
|
|
119
122
|
接手注意事项:
|
|
120
123
|
|
|
121
124
|
- 文档与接口返回不一致时,统一以接口真实返回为准
|
|
122
125
|
- `/hello`、`/status`、`/uploadSo`、`/uploadPlugin` 必须使用 `POST` 探测,不能用 `GET` 判断服务是否可用
|
|
126
|
+
- `/status` 中的 `data.loadStatus` 是最近一次 runtime 加载状态与错误信息的权威来源;接手后若要继续排查加载失败,应优先调用 `quicktvui_runtime_status` / `quicktvui-ai runtime-status`,并同时报告相关包名项与 `__debug__`
|
|
123
127
|
- 如果此时正在 `quicktvui-ai` 仓库中改规则或文档,必须同步把差异写回文档
|
|
124
128
|
- `uploadSo` 目前存在 `pkg` / `tag` 漂移,调用时应尽量同时传这两个字段
|
|
125
129
|
- 测试 Demo 固定标识:
|
|
@@ -129,7 +133,9 @@ AI 在编写业务逻辑时,极易带入传统 Web 开发习惯导致严重报
|
|
|
129
133
|
- 重新上传新的插件包后,接手方在复测前必须先重启宿主 / runtime 进程;当前进程不会自动热更新到新插件字节码
|
|
130
134
|
- 优先参考包内文档:
|
|
131
135
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/plugin-server-api.md`
|
|
136
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/runtime-status.md`
|
|
132
137
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/plugin-server.md`
|
|
138
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/runtime-status.md`
|
|
133
139
|
|
|
134
140
|
## 插件脚手架工作流 (CRITICAL)
|
|
135
141
|
|
package/rules/CLAUDE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: CLAUDE.md
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.19
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# QuickTVUI - AI 开发指南
|
|
@@ -139,15 +139,17 @@ Hard requirements:
|
|
|
139
139
|
- AI 未通过 MCP 或 `quicktvui-ai debug-*` 实际读取到数据前,不得声称自己已经检查过运行时日志、native logs 或截图
|
|
140
140
|
- `debug-targets` 为空时,必须明确说明当前 `ESDebugServer /ai/targets` 还没有可读 target
|
|
141
141
|
- `debug-native-logs` 或 `debug-screenshot` 失败时,必须原样报告命令和错误,不得编造兜底结论
|
|
142
|
+
- 如果用户要查最近一次快应用加载状态、启动失败,或最近一次 runtime 侧错误信息,AI 还应优先补查 `quicktvui_runtime_status` / `quicktvui-ai runtime-status`,并同时报告相关包名项与 `__debug__`
|
|
142
143
|
|
|
143
144
|
## Plugin Server Workflow (CRITICAL)
|
|
144
145
|
|
|
145
|
-
当用户要求 AI 检查、上传或联调电视插件服务接口(`/hello`、`/status`、`/uploadSo`、`/uploadPlugin
|
|
146
|
+
当用户要求 AI 检查、上传或联调电视插件服务接口(`/hello`、`/status`、`/uploadSo`、`/uploadPlugin`),或要求查看最近一次 runtime 加载状态与错误信息时,AI 必须遵循以下优先级:
|
|
146
147
|
|
|
147
148
|
1. 优先使用已连接的 `quicktvui-ai-mcp` 插件工具:
|
|
148
149
|
- `plugin_server_check`
|
|
149
150
|
- `plugin_server_hello`
|
|
150
151
|
- `plugin_server_status`
|
|
152
|
+
- `quicktvui_runtime_status`
|
|
151
153
|
- `plugin_upload_so`
|
|
152
154
|
- `plugin_upload_plugin`
|
|
153
155
|
2. 如果没有 MCP,但具备 shell/CLI 能力,则必须使用 `quicktvui-ai plugin-*`
|
|
@@ -164,22 +166,26 @@ Hard requirements:
|
|
|
164
166
|
3. 读取当前状态
|
|
165
167
|
- MCP:`plugin_server_status`
|
|
166
168
|
- CLI:`quicktvui-ai plugin-status --device <serial>`
|
|
167
|
-
4.
|
|
169
|
+
4. 如果任务需要最近一次 runtime 加载状态或错误信息
|
|
170
|
+
- MCP:`quicktvui_runtime_status`
|
|
171
|
+
- CLI:`quicktvui-ai runtime-status --device <serial>`
|
|
172
|
+
5. 解析插件服务地址
|
|
168
173
|
- 如果显式传了 `baseUrl` / `--plugin-base-url`,优先使用该地址
|
|
169
174
|
- 否则,如果 adb 已连接设备,先尝试使用该设备的插件服务地址
|
|
170
175
|
- 如果无法从目标设备推断 host,则改用 adb 端口转发和 `http://127.0.0.1:36366`
|
|
171
176
|
- 如果同时连接了多台 adb 设备,AI 必须要求用户选择 `serial` 或提供服务 IP / `baseUrl`
|
|
172
177
|
- 如果没有任何 adb 已连接设备,AI 必须向用户索要服务 IP / `baseUrl`,不得脑补或写死某个开发者自己的电视 IP
|
|
173
|
-
|
|
178
|
+
6. 上传 So
|
|
174
179
|
- 必须根据当前插件服务对应设备的 `ro.product.cpu.abi` 选择匹配的 zip
|
|
175
180
|
- CLI:`quicktvui-ai plugin-upload-so --device <serial> --tag eskit.so.ffmpeg.command --pkg eskit.so.ffmpeg.command --file <zip-path>`
|
|
176
|
-
|
|
181
|
+
7. 上传插件 APK
|
|
177
182
|
- CLI:`quicktvui-ai plugin-upload-plugin --device <serial> --pkg eskit.plugin.imagequality --file <apk-path>`
|
|
178
183
|
|
|
179
184
|
硬约束:
|
|
180
185
|
|
|
181
186
|
- 运行中接口返回永远优先于 markdown 文档。
|
|
182
187
|
- `/hello`、`/status`、`/uploadSo`、`/uploadPlugin` 必须使用 `POST` 探测,不能用 `GET` 判断服务是否可用。
|
|
188
|
+
- `/status` 中的 `data.loadStatus` 是最近一次 runtime 加载状态与错误信息的权威来源。执行 `run-dev`、`run-esapp`、页面侧安装插件、或启动失败后,AI 应优先查询 `quicktvui_runtime_status` / `runtime-status`,并同时报告相关包名项与 `__debug__`。
|
|
183
189
|
- 如果 AI 正在 `quicktvui-ai` 仓库内工作,且文档与实机接口不一致,必须回写文档。
|
|
184
190
|
- `uploadSo` 目前存在 `pkg` / `tag` 字段漂移,AI 应同时传 `pkg` 和 `tag`,成功后以返回的 `data.tag` 为准。
|
|
185
191
|
- 默认测试标识固定为:
|
|
@@ -192,7 +198,9 @@ Hard requirements:
|
|
|
192
198
|
- 重新上传新的插件包后,当前宿主 / runtime 进程不会自动热更新到新字节码;在重新验证启动、注册或页面接入之前,AI 必须先重启宿主 / runtime 进程。
|
|
193
199
|
- 生成命令或说明前,应优先查阅以下包内文档:
|
|
194
200
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/plugin-server-api.md`
|
|
201
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/runtime-status.md`
|
|
195
202
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/plugin-server.md`
|
|
203
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/runtime-status.md`
|
|
196
204
|
|
|
197
205
|
## Plugin Scaffold Workflow (CRITICAL)
|
|
198
206
|
|
package/rules/GEMINI.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: GEMINI.md
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.19
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# GEMINI.md - QuickTVUI AI 开发指南
|
|
@@ -130,15 +130,17 @@ Hard requirements:
|
|
|
130
130
|
- AI MUST NOT claim it inspected runtime data unless MCP or `quicktvui-ai debug-*` actually returned that data
|
|
131
131
|
- If `debug-targets` is empty, AI MUST say that `ESDebugServer /ai/targets` is still empty
|
|
132
132
|
- If `debug-native-logs` or `debug-screenshot` fails, AI MUST report the real command/error instead of inventing fallback observations
|
|
133
|
+
- When the task is to inspect recent quick-app load state, startup failure, or the latest runtime-side error message after load, AI SHOULD also query `quicktvui_runtime_status` / `quicktvui-ai runtime-status` and report the relevant package key plus `__debug__` from `data.loadStatus`
|
|
133
134
|
|
|
134
135
|
## Plugin Server Workflow (CRITICAL)
|
|
135
136
|
|
|
136
|
-
When the user asks AI to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`)
|
|
137
|
+
When the user asks AI to inspect, upload, or debug TV plugin server endpoints (`/hello`, `/status`, `/uploadSo`, `/uploadPlugin`) or recent runtime load status from `/status`:
|
|
137
138
|
|
|
138
139
|
1. Prefer connected `quicktvui-ai-mcp` plugin tools:
|
|
139
140
|
- `plugin_server_check`
|
|
140
141
|
- `plugin_server_hello`
|
|
141
142
|
- `plugin_server_status`
|
|
143
|
+
- `quicktvui_runtime_status`
|
|
142
144
|
- `plugin_upload_so`
|
|
143
145
|
- `plugin_upload_plugin`
|
|
144
146
|
2. Otherwise use `quicktvui-ai plugin-*`
|
|
@@ -155,22 +157,26 @@ Required order:
|
|
|
155
157
|
3. Read current state
|
|
156
158
|
- MCP: `plugin_server_status`
|
|
157
159
|
- CLI: `quicktvui-ai plugin-status --device <serial>`
|
|
158
|
-
4.
|
|
160
|
+
4. If the user needs recent runtime load state or latest error info after quick-app/plugin load
|
|
161
|
+
- MCP: `quicktvui_runtime_status`
|
|
162
|
+
- CLI: `quicktvui-ai runtime-status --device <serial>`
|
|
163
|
+
5. Resolve plugin server address
|
|
159
164
|
- If `baseUrl` / `--plugin-base-url` is explicitly provided, use it
|
|
160
165
|
- Otherwise, if adb already has a connected target, use that target's plugin service address first
|
|
161
166
|
- If the target host cannot be inferred, use adb port forward and `http://127.0.0.1:36366`
|
|
162
167
|
- If multiple adb devices are connected, AI MUST ask the user to choose `serial` or provide service IP / `baseUrl`
|
|
163
168
|
- If no adb-connected device exists, AI MUST ask the user for service IP / `baseUrl`, and MUST NOT invent a developer-specific TV IP
|
|
164
|
-
|
|
169
|
+
6. Upload So zip
|
|
165
170
|
- choose the archive that matches `ro.product.cpu.abi` on the device behind the current plugin service
|
|
166
171
|
- CLI: `quicktvui-ai plugin-upload-so --device <serial> --tag eskit.so.ffmpeg.command --pkg eskit.so.ffmpeg.command --file <zip-path>`
|
|
167
|
-
|
|
172
|
+
7. Upload plugin APK
|
|
168
173
|
- CLI: `quicktvui-ai plugin-upload-plugin --device <serial> --pkg eskit.plugin.imagequality --file <apk-path>`
|
|
169
174
|
|
|
170
175
|
Hard requirements:
|
|
171
176
|
|
|
172
177
|
- Runtime endpoint behavior overrides markdown docs.
|
|
173
178
|
- Probe `/hello`, `/status`, `/uploadSo`, `/uploadPlugin` with `POST`, not `GET`.
|
|
179
|
+
- `/status` may include `data.loadStatus`, which is the authoritative recent runtime load-state/error map for quick-app/plugin startup. After `run-dev`, `run-esapp`, page-side plugin install, or a startup failure, AI SHOULD query `quicktvui_runtime_status` / `runtime-status` and report the relevant package key plus `__debug__`.
|
|
174
180
|
- When AI is editing the `quicktvui-ai` repo itself and finds doc/runtime drift, AI MUST update docs.
|
|
175
181
|
- `uploadSo` currently shows `pkg` / `tag` drift. AI SHOULD send both `pkg` and `tag`, and trust `data.tag` in successful responses.
|
|
176
182
|
- Default demo identifiers:
|
|
@@ -183,7 +189,9 @@ Hard requirements:
|
|
|
183
189
|
- Uploading a newly rebuilt or replaced plugin package does NOT hot-swap the already running host/runtime process. Before validating startup, registration, or page-side usage after a new upload, AI MUST restart the host/runtime process.
|
|
184
190
|
- AI SHOULD consult:
|
|
185
191
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/plugin-server-api.md`
|
|
192
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/api/runtime-status.md`
|
|
186
193
|
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/plugin-server.md`
|
|
194
|
+
- `node_modules/@quicktvui/ai/rules/.docs/zh-CN/tool/cli/runtime-status.md`
|
|
187
195
|
|
|
188
196
|
## Plugin Scaffold Workflow (CRITICAL)
|
|
189
197
|
|