@meshstream/agent-skills 0.2.0 → 0.4.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MeshStream Agent Skills
2
2
 
3
- 这是 MeshStream AI Coding Skill 的本地预览包。它把接入、排错和 P2P 验收规则安装到项目目录,不读取或上传客户代码,也不会写入凭据。
3
+ 这是 MeshStream AI Coding Skill 的本地预览包。它把 Web、Android、iOS / macOS、Windows、Flutter、React Native 和 uni-app 的接入、排错和 P2P 验收规则安装到项目目录,不读取或上传客户代码,也不会写入凭据。
4
4
 
5
5
  ## 本地测试
6
6
 
@@ -20,6 +20,17 @@ npx @meshstream/agent-skills add --ide codebuddy
20
20
  npx @meshstream/agent-skills add --ide all
21
21
  ```
22
22
 
23
+ The installer writes these project-local files:
24
+
25
+ | Editor | File | How the editor uses it |
26
+ | --- | --- | --- |
27
+ | Codex | `.codex/skills/meshstream-sdk-integration/SKILL.md` | Loaded as a project skill for the current task |
28
+ | Cursor | `.cursor/rules/meshstream-sdk-integration.mdc` | Available as a project rule; enable it in Rules when needed |
29
+ | Claude Code | `.claude/skills/meshstream-sdk-integration/SKILL.md` | Available as the `/meshstream-sdk-integration` skill |
30
+ | CodeBuddy | `.codebuddy/skills/meshstream-sdk-integration/SKILL.md` | Loaded by the project skill workflow after reopening the session |
31
+
32
+ Run the command from the application project root, then start a new editor chat. Existing files are preserved; use `--force` only to replace an older installed rule.
33
+
23
34
  本地预览:
24
35
 
25
36
  ```bash
@@ -27,3 +38,5 @@ node src/cli.mjs add --ide all --project /path/to/project
27
38
  ```
28
39
 
29
40
  默认保留已有文件;只有显式传入 `--force` 才会替换已有的 MeshStream 指令文件。
41
+
42
+ 安装后,规则会先识别项目平台和播放器,再读取对应官方文档;移动端验收要求真实设备或明确标记未执行,不能用 Web 示例或模拟器结果替代。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshstream/agent-skills",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "description": "MeshStream AI Coding skills for SDK integration, troubleshooting, and P2P acceptance.",
6
6
  "repository": {
package/src/cli.mjs CHANGED
@@ -5,14 +5,14 @@ import process from "node:process";
5
5
  import { claudeBody, cursorBody, skillBody } from "./skill-content.mjs";
6
6
 
7
7
  const targets = {
8
- codex: [{ path: ".codex/skills/meshstream-web-integration/SKILL.md", body: skillBody }],
9
- cursor: [{ path: ".cursor/rules/meshstream-web-integration.mdc", body: cursorBody }],
10
- claude: [{ path: ".claude/skills/meshstream-web-integration/SKILL.md", body: claudeBody }],
11
- codebuddy: [{ path: ".codebuddy/skills/meshstream-web-integration/SKILL.md", body: skillBody }],
8
+ codex: [{ path: ".codex/skills/meshstream-sdk-integration/SKILL.md", body: skillBody }],
9
+ cursor: [{ path: ".cursor/rules/meshstream-sdk-integration.mdc", body: cursorBody }],
10
+ claude: [{ path: ".claude/skills/meshstream-sdk-integration/SKILL.md", body: claudeBody }],
11
+ codebuddy: [{ path: ".codebuddy/skills/meshstream-sdk-integration/SKILL.md", body: skillBody }],
12
12
  };
13
13
 
14
14
  function usage() {
15
- return `MeshStream Agent Skills\n\nUsage:\n meshstream-agent-skills add --ide <codex|cursor|claude|codebuddy|all> [--project <path>] [--force]\n\nThe installer writes only the selected editor's project-local instructions. Existing files are preserved unless --force is supplied.`;
15
+ return `MeshStream Agent Skills\n\nUsage:\n meshstream-agent-skills add --ide <codex|cursor|claude|codebuddy|all> [--project <path>] [--force]\n\nThe installer writes platform-aware SDK instructions for Web, Android, iOS/macOS, Windows, Flutter, React Native, and uni-app. Existing files are preserved unless --force is supplied.`;
16
16
  }
17
17
 
18
18
  function parseArgs(argv) {
@@ -1,9 +1,9 @@
1
1
  export const skillBody = `---
2
- name: meshstream-web-integration
3
- description: Integrate, troubleshoot, and verify MeshStream Web SDK in an existing playback project.
2
+ name: meshstream-sdk-integration
3
+ description: Integrate, troubleshoot, and verify MeshStream SDKs across Web, native, and cross-platform playback projects.
4
4
  ---
5
5
 
6
- # MeshStream Web SDK integration
6
+ # MeshStream SDK integration
7
7
 
8
8
  Use the official MeshStream developer documentation as the source of truth:
9
9
 
@@ -12,6 +12,18 @@ Use the official MeshStream developer documentation as the source of truth:
12
12
  - https://meshstream.net/docs/sdk/web-setup
13
13
  - https://meshstream.net/docs/sdk/web
14
14
  - https://meshstream.net/docs/sdk/web-advanced
15
+ - https://meshstream.net/docs/sdk/android-setup
16
+ - https://meshstream.net/docs/sdk/android
17
+ - https://meshstream.net/docs/sdk/ios-setup
18
+ - https://meshstream.net/docs/sdk/ios
19
+ - https://meshstream.net/docs/sdk/windows-setup
20
+ - https://meshstream.net/docs/sdk/windows
21
+ - https://meshstream.net/docs/sdk/flutter-setup
22
+ - https://meshstream.net/docs/sdk/flutter
23
+ - https://meshstream.net/docs/sdk/react-native-setup
24
+ - https://meshstream.net/docs/sdk/react-native
25
+ - https://meshstream.net/docs/sdk/uniapp-setup
26
+ - https://meshstream.net/docs/sdk/uniapp
15
27
  - https://meshstream.net/docs/concepts/statistics
16
28
  - https://meshstream.net/docs/troubleshooting
17
29
 
@@ -20,13 +32,13 @@ search_docs, get_sdk_release, get_integration_guide, and get_troubleshooting_gui
20
32
 
21
33
  ## Required workflow
22
34
 
23
- 1. Identify the framework, player, media protocol, package manager, and existing playback lifecycle.
24
- 2. Use an exact SDK version listed in the official public release table. Do not invent APIs or versions.
35
+ 1. Identify the target platform (Web, Android, iOS/macOS, Windows, Flutter, React Native, or uni-app), framework, player, media protocol, package manager, and existing playback lifecycle.
36
+ 2. Read the matching platform setup and integration guides, then use an exact SDK version listed in the official public release table. Do not invent APIs or versions.
25
37
  3. Read SDK keys from environment variables or restricted runtime configuration. Never write keys, SecretKeys, signed URLs, Authorization headers, or Cookies into source, logs, or chat.
26
- 4. Reuse the existing player, origin, CDN, DRM, ABR, and authentication behavior.
38
+ 4. Reuse the existing player, origin, CDN, DRM, ABR, and authentication behavior. Native clients use the documented local playback proxy; do not move Web Service Worker code into native projects.
27
39
  5. Keep CDN fallback when bootstrap, Tracker, WebRTC, ICE, or P2P segment transfer is unavailable.
28
- 6. Release the MeshStream session on source change, playback end, page hide, and player destruction.
29
- 7. Run the existing build and test commands after making the smallest necessary change.
40
+ 6. Release the MeshStream session on source change, playback end, page hide/background, and player/controller destruction.
41
+ 7. Run the existing build and test commands after making the smallest necessary change; use a real device for mobile acceptance when available.
30
42
 
31
43
  ## Supported task modes
32
44
 
@@ -38,7 +50,7 @@ Choose the smallest mode that matches the request:
38
50
  - **feature extension:** preserve the current integration and add one requested capability with focused tests and lifecycle cleanup;
39
51
  - **documentation lookup:** use the read-only MeshStream docs MCP and include source URLs in the answer.
40
52
 
41
- For Android, iOS, macOS, Windows, Flutter, React Native, and Uniapp, use the matching official setup and advanced guides. Do not silently downgrade a real-device or cross-network check to a simulator or build-only result.
53
+ For Android, iOS, macOS, Windows, Flutter, React Native, and uni-app, use the matching official setup and advanced guides. Cross-platform wrappers must use published native dependencies, never local AARs, Pods, or internal source paths. Do not silently downgrade a real-device or cross-network check to a simulator or build-only result.
42
54
 
43
55
  ## P2P acceptance requirements
44
56
 
@@ -65,17 +77,25 @@ Report:
65
77
  6. devices, networks, or production conditions that were not tested.
66
78
  `;
67
79
 
68
- export const cursorBody = `# MeshStream Web SDK integration
80
+ export const cursorBody = `---
81
+ description: Platform-aware MeshStream SDK integration, troubleshooting, and P2P acceptance
82
+ alwaysApply: false
83
+ ---
84
+
85
+ # MeshStream SDK integration
69
86
 
70
87
  Use this rule when working on MeshStream playback integration. Follow the official docs at https://meshstream.net/docs/ai-coding and use an exact public SDK version.
71
88
 
89
+ Supported targets: Web, Android, iOS/macOS, Windows, Flutter, React Native, and uni-app.
90
+
72
91
  ## Workflow
73
92
 
74
- 1. Identify the framework, player, protocol, and package manager.
75
- 2. Read the MeshStream Web SDK setup and integration docs before editing.
93
+ 1. Identify the target platform, framework, player, protocol, package manager, and playback lifecycle.
94
+ 2. Read the matching MeshStream platform setup and integration docs before editing.
76
95
  3. Keep existing player, CDN, origin authentication, DRM, and ABR behavior.
77
- 4. Keep CDN fallback and release the session on source change, page hide, and player destruction.
78
- 5. Run the existing build and tests.
96
+ 4. On native clients use the documented local playback proxy; on Web use the documented Service Worker/MSE path when supported.
97
+ 5. Keep CDN fallback and release the session on source change, page hide/background, playback end, and player/controller destruction.
98
+ 6. Run the existing build and tests, then prefer real-device acceptance for mobile platforms.
79
99
 
80
100
  Never put SDK keys, SecretKeys, signed media URLs, Authorization headers, Cookies, or production logs in source or chat.
81
101