@quicktvui/ai 1.1.6 → 1.1.12
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 +2 -2
- package/rules/.claude/commands/create-component.md +5 -0
- package/rules/.claude/commands/create-page.md +5 -0
- package/rules/.claude/commands/create-project.md +5 -0
- package/rules/.claude/commands/lookup-api.md +5 -0
- package/rules/.claude/commands/lookup-css.md +5 -0
- package/rules/.clinerules +14 -0
- package/rules/.cursorrules +14 -0
- package/rules/.github/copilot-instructions.md +14 -0
- package/rules/.windsurfrules +14 -0
- package/rules/AGENTS.md +36 -1
- package/rules/AI_HANDOFF.md +5 -0
- package/rules/CLAUDE.md +36 -1
- package/rules/GEMINI.md +36 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quicktvui/ai",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.12",
|
|
4
4
|
"description": "QuickTVUI AI 开发规范与脚手架注入工具",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "https://github.com/quicktvui/quicktvui-template.git"
|
|
22
22
|
}
|
|
23
|
-
}
|
|
23
|
+
}
|
package/rules/.clinerules
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: .clinerules
|
|
3
|
+
version: 0.6.1
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# .clinerules - QuickTVUI AI Development Guide
|
|
2
7
|
|
|
3
8
|
> Drop this file into any QuickTVUI project root. Works with Cline/Roo-Code.
|
|
@@ -77,6 +82,15 @@ Hard requirements:
|
|
|
77
82
|
- If user asks to launch a specific ES app/version/source, run:
|
|
78
83
|
`quicktvui-ai run-esapp --project <project-path> --pkg <es-package> [options]`
|
|
79
84
|
|
|
85
|
+
|
|
86
|
+
## Game Loop & Timer Constraints (CRITICAL)
|
|
87
|
+
|
|
88
|
+
- For game pages with continuous motion, `requestAnimationFrame` or fixed-tick loops (`setInterval`) MUST have explicit start/stop ownership.
|
|
89
|
+
- `requestAnimationFrame` IDs MUST be stored in a registry variable (for example `rafId`/`activeRafIds`) and canceled on lifecycle exit (`onESPause`, `onESStop`, `onESDestroy`, and unmount hooks).
|
|
90
|
+
- All `setTimeout`/`setInterval` IDs MUST be registered in a unified timer registry, and reclaimed via one cleanup function (定时器注册表统一回收), then called from every exit path (game over, route leave, lifecycle pause/destroy).
|
|
91
|
+
- Do NOT create orphan loops/timers without a cancellation path.
|
|
92
|
+
- In background or non-playing states, loops MUST pause or run at reduced frequency to avoid wasted CPU.
|
|
93
|
+
|
|
80
94
|
## 🔥 ARCHITECTURAL GOTCHAS (CRITICAL)
|
|
81
95
|
|
|
82
96
|
AI assistants frequently fail by applying traditional Web paradigms to QuickTVUI. **You MUST memorize these constraints**:
|
package/rules/.cursorrules
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: .cursorrules
|
|
3
|
+
version: 0.6.1
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# .cursorrules - QuickTVUI AI Development Guide
|
|
2
7
|
|
|
3
8
|
> Drop this file into any QuickTVUI project root. Works with Cursor.
|
|
@@ -77,6 +82,15 @@ Hard requirements:
|
|
|
77
82
|
- If user asks to launch a specific ES app/version/source, run:
|
|
78
83
|
`quicktvui-ai run-esapp --project <project-path> --pkg <es-package> [options]`
|
|
79
84
|
|
|
85
|
+
|
|
86
|
+
## Game Loop & Timer Constraints (CRITICAL)
|
|
87
|
+
|
|
88
|
+
- For game pages with continuous motion, `requestAnimationFrame` or fixed-tick loops (`setInterval`) MUST have explicit start/stop ownership.
|
|
89
|
+
- `requestAnimationFrame` IDs MUST be stored in a registry variable (for example `rafId`/`activeRafIds`) and canceled on lifecycle exit (`onESPause`, `onESStop`, `onESDestroy`, and unmount hooks).
|
|
90
|
+
- All `setTimeout`/`setInterval` IDs MUST be registered in a unified timer registry, and reclaimed via one cleanup function (定时器注册表统一回收), then called from every exit path (game over, route leave, lifecycle pause/destroy).
|
|
91
|
+
- Do NOT create orphan loops/timers without a cancellation path.
|
|
92
|
+
- In background or non-playing states, loops MUST pause or run at reduced frequency to avoid wasted CPU.
|
|
93
|
+
|
|
80
94
|
## 🔥 ARCHITECTURAL GOTCHAS (CRITICAL)
|
|
81
95
|
|
|
82
96
|
AI assistants frequently fail by applying traditional Web paradigms to QuickTVUI. **You MUST memorize these constraints**:
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: copilot-instructions.md
|
|
3
|
+
version: 1.1.12
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# copilot-instructions.md - QuickTVUI AI Development Guide
|
|
2
7
|
|
|
3
8
|
> Works with GitHub Copilot.
|
|
@@ -43,6 +48,15 @@ When asked to create a new QuickTVUI project, you MUST NOT generate a generic Vu
|
|
|
43
48
|
4. **Install Deps**: `yarn install`
|
|
44
49
|
5. **Setup Reminder**: Remind the user to run `npm install -g @quicktvui/cli@latest` and `qui setup` if they haven't configured the environment (see https://quicktvui.com/zh-CN/guide/basic/quick-start.html).
|
|
45
50
|
|
|
51
|
+
|
|
52
|
+
## Game Loop & Timer Constraints (CRITICAL)
|
|
53
|
+
|
|
54
|
+
- For game pages with continuous motion, `requestAnimationFrame` or fixed-tick loops (`setInterval`) MUST have explicit start/stop ownership.
|
|
55
|
+
- `requestAnimationFrame` IDs MUST be stored in a registry variable (for example `rafId`/`activeRafIds`) and canceled on lifecycle exit (`onESPause`, `onESStop`, `onESDestroy`, and unmount hooks).
|
|
56
|
+
- All `setTimeout`/`setInterval` IDs MUST be registered in a unified timer registry, and reclaimed via one cleanup function (定时器注册表统一回收), then called from every exit path (game over, route leave, lifecycle pause/destroy).
|
|
57
|
+
- Do NOT create orphan loops/timers without a cancellation path.
|
|
58
|
+
- In background or non-playing states, loops MUST pause or run at reduced frequency to avoid wasted CPU.
|
|
59
|
+
|
|
46
60
|
## 🔥 ARCHITECTURAL GOTCHAS (CRITICAL)
|
|
47
61
|
|
|
48
62
|
AI assistants frequently fail by applying traditional Web paradigms to QuickTVUI. **You MUST memorize these constraints**:
|
package/rules/.windsurfrules
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: .windsurfrules
|
|
3
|
+
version: 0.6.1
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# .windsurfrules - QuickTVUI AI Development Guide
|
|
2
7
|
|
|
3
8
|
> Drop this file into any QuickTVUI project root. Works with Windsurf.
|
|
@@ -77,6 +82,15 @@ Hard requirements:
|
|
|
77
82
|
- If user asks to launch a specific ES app/version/source, run:
|
|
78
83
|
`quicktvui-ai run-esapp --project <project-path> --pkg <es-package> [options]`
|
|
79
84
|
|
|
85
|
+
|
|
86
|
+
## Game Loop & Timer Constraints (CRITICAL)
|
|
87
|
+
|
|
88
|
+
- For game pages with continuous motion, `requestAnimationFrame` or fixed-tick loops (`setInterval`) MUST have explicit start/stop ownership.
|
|
89
|
+
- `requestAnimationFrame` IDs MUST be stored in a registry variable (for example `rafId`/`activeRafIds`) and canceled on lifecycle exit (`onESPause`, `onESStop`, `onESDestroy`, and unmount hooks).
|
|
90
|
+
- All `setTimeout`/`setInterval` IDs MUST be registered in a unified timer registry, and reclaimed via one cleanup function (定时器注册表统一回收), then called from every exit path (game over, route leave, lifecycle pause/destroy).
|
|
91
|
+
- Do NOT create orphan loops/timers without a cancellation path.
|
|
92
|
+
- In background or non-playing states, loops MUST pause or run at reduced frequency to avoid wasted CPU.
|
|
93
|
+
|
|
80
94
|
## 🔥 ARCHITECTURAL GOTCHAS (CRITICAL)
|
|
81
95
|
|
|
82
96
|
AI assistants frequently fail by applying traditional Web paradigms to QuickTVUI. **You MUST memorize these constraints**:
|
package/rules/AGENTS.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: AGENTS.md
|
|
3
|
+
version: 1.1.12
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# AGENTS.md - QuickTVUI AI Development Guide
|
|
2
7
|
|
|
3
8
|
> Drop this file into any QuickTVUI project root. Works with OpenAI Codex and other AI tools.
|
|
@@ -58,8 +63,38 @@ Hard requirements:
|
|
|
58
63
|
- Do NOT skip adb device detection, runtime install/config, or server host configuration when preparing TV run.
|
|
59
64
|
- AI MUST discover and use existing `quicktvui-ai-cli` commands first (`quicktvui-ai --help`, `quicktvui-ai <command> --help`) for env/device/runtime/run-to-TV operations.
|
|
60
65
|
- If a required step has no corresponding `quicktvui-ai-cli` command, AI MUST explicitly state the CLI gap first, then use a manual fallback workflow.
|
|
66
|
+
- If only one device is connected, AI MUST NOT enforce TV/phone distinction.
|
|
61
67
|
- If multiple devices are connected, AI MUST ask user to choose target serial and MUST NOT silently pick one.
|
|
62
|
-
-
|
|
68
|
+
- In multi-device mode, AI MUST distinguish TV-like vs phone/tablet targets, and ask confirmation before continuing with non-TV targets.
|
|
69
|
+
- Emulator targets are treated as TV-like devices.
|
|
70
|
+
- AI MUST NOT auto-download/create Google emulator in setup flow. If no device is available, ask user to install/start emulator manually (recommended: https://mumu.163.com) and then reconnect.
|
|
71
|
+
- Runtime APK download source policy (MANDATORY):
|
|
72
|
+
- Prefer `http://hub.quicktvui.com/repository/maven-files/` first.
|
|
73
|
+
- If hub download fails, fallback ONLY to trusted repositories:
|
|
74
|
+
- `https://gitee.com/quicktvui/quicktvui-runtime-apk`
|
|
75
|
+
- `https://github.com/quicktvui/quicktvui-runtime-apk`
|
|
76
|
+
- Metadata entry priority:
|
|
77
|
+
1) `https://gitee.com/quicktvui/quicktvui-runtime-apk/raw/main/manifests/latest.json`
|
|
78
|
+
2) `https://raw.githubusercontent.com/quicktvui/quicktvui-runtime-apk/main/manifests/latest.json`
|
|
79
|
+
- Channel policy:
|
|
80
|
+
- Default `release`.
|
|
81
|
+
- If `latest-release.json` has `status: pending` or no usable version, fallback to `debug`.
|
|
82
|
+
- If user explicitly requests `debug`/`release`, use the requested channel.
|
|
83
|
+
- Metadata and download flow:
|
|
84
|
+
1) Read `latest.json` and resolve channel manifest path.
|
|
85
|
+
2) Read `latest-release.json` or `latest-debug.json`.
|
|
86
|
+
3) Extract `repo_path` and `sha256`.
|
|
87
|
+
4) Build URL: `<base>/<repo_path>`, base is:
|
|
88
|
+
- Gitee: `https://gitee.com/quicktvui/quicktvui-runtime-apk/raw/main`
|
|
89
|
+
- GitHub: `https://raw.githubusercontent.com/quicktvui/quicktvui-runtime-apk/main`
|
|
90
|
+
5) Download APK and verify SHA256 before install.
|
|
91
|
+
6) Install with `adb install -r <apk_file>`.
|
|
92
|
+
- Game Loop & Timer Constraints (CRITICAL):
|
|
93
|
+
- For game pages with continuous motion, `requestAnimationFrame` or fixed-tick loops (`setInterval`) MUST have explicit start/stop ownership.
|
|
94
|
+
- `requestAnimationFrame` IDs MUST be stored in a registry variable (for example `rafId`/`activeRafIds`) and canceled on lifecycle exit (`onESPause`, `onESStop`, `onESDestroy`, and unmount hooks).
|
|
95
|
+
- All `setTimeout`/`setInterval` IDs MUST be registered in a unified timer registry, and reclaimed via one cleanup function (定时器注册表统一回收), then called from every exit path (game over, route leave, lifecycle pause/destroy).
|
|
96
|
+
- Do NOT create orphan loops/timers without a cancellation path.
|
|
97
|
+
- In background or non-playing states, loops MUST pause or run at reduced frequency to avoid wasted CPU.
|
|
63
98
|
- If runtime already exists on target device, AI MUST ask whether to reinstall/reset runtime before run.
|
|
64
99
|
- Before runtime launch, AI MUST verify the target runtime package exposes runtime-launch activity capability (expected activity: `eskit.sdk.core.ui.BrowserProxyActivity` with `android.intent.action.VIEW` + `esapp` scheme).
|
|
65
100
|
- Recommended check commands:
|
package/rules/AI_HANDOFF.md
CHANGED
package/rules/CLAUDE.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: CLAUDE.md
|
|
3
|
+
version: 1.1.12
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# QuickTVUI - AI 开发指南
|
|
2
7
|
|
|
3
8
|
> 本文件可放入任何 QuickTVUI 项目根目录,AI 工具会自动加载。
|
|
@@ -58,8 +63,38 @@ Hard requirements:
|
|
|
58
63
|
- Do NOT skip adb device detection, runtime install/config, or server host configuration when preparing TV run.
|
|
59
64
|
- AI MUST discover and use existing `quicktvui-ai-cli` commands first (`quicktvui-ai --help`, `quicktvui-ai <command> --help`) for env/device/runtime/run-to-TV operations.
|
|
60
65
|
- If a required step has no corresponding `quicktvui-ai-cli` command, AI MUST explicitly state the CLI gap first, then use a manual fallback workflow.
|
|
66
|
+
- If only one device is connected, AI MUST NOT enforce TV/phone distinction.
|
|
61
67
|
- If multiple devices are connected, AI MUST ask user to choose target serial and MUST NOT silently pick one.
|
|
62
|
-
-
|
|
68
|
+
- In multi-device mode, AI MUST distinguish TV-like vs phone/tablet targets, and ask confirmation before continuing with non-TV targets.
|
|
69
|
+
- Emulator targets are treated as TV-like devices.
|
|
70
|
+
- AI MUST NOT auto-download/create Google emulator in setup flow. If no device is available, ask user to install/start emulator manually (recommended: https://mumu.163.com) and then reconnect.
|
|
71
|
+
- Runtime APK download source policy (MANDATORY):
|
|
72
|
+
- Prefer `http://hub.quicktvui.com/repository/maven-files/` first.
|
|
73
|
+
- If hub download fails, fallback ONLY to trusted repositories:
|
|
74
|
+
- `https://gitee.com/quicktvui/quicktvui-runtime-apk`
|
|
75
|
+
- `https://github.com/quicktvui/quicktvui-runtime-apk`
|
|
76
|
+
- Metadata entry priority:
|
|
77
|
+
1) `https://gitee.com/quicktvui/quicktvui-runtime-apk/raw/main/manifests/latest.json`
|
|
78
|
+
2) `https://raw.githubusercontent.com/quicktvui/quicktvui-runtime-apk/main/manifests/latest.json`
|
|
79
|
+
- Channel policy:
|
|
80
|
+
- Default `release`.
|
|
81
|
+
- If `latest-release.json` has `status: pending` or no usable version, fallback to `debug`.
|
|
82
|
+
- If user explicitly requests `debug`/`release`, use the requested channel.
|
|
83
|
+
- Metadata and download flow:
|
|
84
|
+
1) Read `latest.json` and resolve channel manifest path.
|
|
85
|
+
2) Read `latest-release.json` or `latest-debug.json`.
|
|
86
|
+
3) Extract `repo_path` and `sha256`.
|
|
87
|
+
4) Build URL: `<base>/<repo_path>`, base is:
|
|
88
|
+
- Gitee: `https://gitee.com/quicktvui/quicktvui-runtime-apk/raw/main`
|
|
89
|
+
- GitHub: `https://raw.githubusercontent.com/quicktvui/quicktvui-runtime-apk/main`
|
|
90
|
+
5) Download APK and verify SHA256 before install.
|
|
91
|
+
6) Install with `adb install -r <apk_file>`.
|
|
92
|
+
- Game Loop & Timer Constraints (CRITICAL):
|
|
93
|
+
- For game pages with continuous motion, `requestAnimationFrame` or fixed-tick loops (`setInterval`) MUST have explicit start/stop ownership.
|
|
94
|
+
- `requestAnimationFrame` IDs MUST be stored in a registry variable (for example `rafId`/`activeRafIds`) and canceled on lifecycle exit (`onESPause`, `onESStop`, `onESDestroy`, and unmount hooks).
|
|
95
|
+
- All `setTimeout`/`setInterval` IDs MUST be registered in a unified timer registry, and reclaimed via one cleanup function (定时器注册表统一回收), then called from every exit path (game over, route leave, lifecycle pause/destroy).
|
|
96
|
+
- Do NOT create orphan loops/timers without a cancellation path.
|
|
97
|
+
- In background or non-playing states, loops MUST pause or run at reduced frequency to avoid wasted CPU.
|
|
63
98
|
- If runtime already exists on target device, AI MUST ask whether to reinstall/reset runtime before run.
|
|
64
99
|
- Before runtime launch, AI MUST verify the target runtime package exposes runtime-launch activity capability (expected activity: `eskit.sdk.core.ui.BrowserProxyActivity` with `android.intent.action.VIEW` + `esapp` scheme).
|
|
65
100
|
- Recommended check commands:
|
package/rules/GEMINI.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: GEMINI.md
|
|
3
|
+
version: 1.1.12
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# GEMINI.md - QuickTVUI AI 开发指南
|
|
2
7
|
|
|
3
8
|
> 放入任何 QuickTVUI 项目根目录,Gemini CLI / Gemini Code Assist 自动加载。
|
|
@@ -50,8 +55,38 @@ Hard requirements:
|
|
|
50
55
|
- Do NOT skip adb device detection, runtime install/config, or server host configuration when preparing TV run.
|
|
51
56
|
- AI MUST discover and use existing `quicktvui-ai-cli` commands first (`quicktvui-ai --help`, `quicktvui-ai <command> --help`) for env/device/runtime/run-to-TV operations.
|
|
52
57
|
- If a required step has no corresponding `quicktvui-ai-cli` command, AI MUST explicitly state the CLI gap first, then use a manual fallback workflow.
|
|
58
|
+
- If only one device is connected, AI MUST NOT enforce TV/phone distinction.
|
|
53
59
|
- If multiple devices are connected, AI MUST ask user to choose target serial and MUST NOT silently pick one.
|
|
54
|
-
-
|
|
60
|
+
- In multi-device mode, AI MUST distinguish TV-like vs phone/tablet targets, and ask confirmation before continuing with non-TV targets.
|
|
61
|
+
- Emulator targets are treated as TV-like devices.
|
|
62
|
+
- AI MUST NOT auto-download/create Google emulator in setup flow. If no device is available, ask user to install/start emulator manually (recommended: https://mumu.163.com) and then reconnect.
|
|
63
|
+
- Runtime APK download source policy (MANDATORY):
|
|
64
|
+
- Prefer `http://hub.quicktvui.com/repository/maven-files/` first.
|
|
65
|
+
- If hub download fails, fallback ONLY to trusted repositories:
|
|
66
|
+
- `https://gitee.com/quicktvui/quicktvui-runtime-apk`
|
|
67
|
+
- `https://github.com/quicktvui/quicktvui-runtime-apk`
|
|
68
|
+
- Metadata entry priority:
|
|
69
|
+
1) `https://gitee.com/quicktvui/quicktvui-runtime-apk/raw/main/manifests/latest.json`
|
|
70
|
+
2) `https://raw.githubusercontent.com/quicktvui/quicktvui-runtime-apk/main/manifests/latest.json`
|
|
71
|
+
- Channel policy:
|
|
72
|
+
- Default `release`.
|
|
73
|
+
- If `latest-release.json` has `status: pending` or no usable version, fallback to `debug`.
|
|
74
|
+
- If user explicitly requests `debug`/`release`, use the requested channel.
|
|
75
|
+
- Metadata and download flow:
|
|
76
|
+
1) Read `latest.json` and resolve channel manifest path.
|
|
77
|
+
2) Read `latest-release.json` or `latest-debug.json`.
|
|
78
|
+
3) Extract `repo_path` and `sha256`.
|
|
79
|
+
4) Build URL: `<base>/<repo_path>`, base is:
|
|
80
|
+
- Gitee: `https://gitee.com/quicktvui/quicktvui-runtime-apk/raw/main`
|
|
81
|
+
- GitHub: `https://raw.githubusercontent.com/quicktvui/quicktvui-runtime-apk/main`
|
|
82
|
+
5) Download APK and verify SHA256 before install.
|
|
83
|
+
6) Install with `adb install -r <apk_file>`.
|
|
84
|
+
- Game Loop & Timer Constraints (CRITICAL):
|
|
85
|
+
- For game pages with continuous motion, `requestAnimationFrame` or fixed-tick loops (`setInterval`) MUST have explicit start/stop ownership.
|
|
86
|
+
- `requestAnimationFrame` IDs MUST be stored in a registry variable (for example `rafId`/`activeRafIds`) and canceled on lifecycle exit (`onESPause`, `onESStop`, `onESDestroy`, and unmount hooks).
|
|
87
|
+
- All `setTimeout`/`setInterval` IDs MUST be registered in a unified timer registry, and reclaimed via one cleanup function (定时器注册表统一回收), then called from every exit path (game over, route leave, lifecycle pause/destroy).
|
|
88
|
+
- Do NOT create orphan loops/timers without a cancellation path.
|
|
89
|
+
- In background or non-playing states, loops MUST pause or run at reduced frequency to avoid wasted CPU.
|
|
55
90
|
- If runtime already exists on target device, AI MUST ask whether to reinstall/reset runtime before run.
|
|
56
91
|
- Before runtime launch, AI MUST verify the target runtime package exposes runtime-launch activity capability (expected activity: `eskit.sdk.core.ui.BrowserProxyActivity` with `android.intent.action.VIEW` + `esapp` scheme).
|
|
57
92
|
- Recommended check commands:
|