@meshstream/agent-skills 0.1.0 → 0.3.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 +4 -1
- package/package.json +13 -4
- package/src/cli.mjs +6 -5
- package/src/skill-content.mjs +40 -13
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MeshStream Agent Skills
|
|
2
2
|
|
|
3
|
-
这是 MeshStream AI Coding Skill
|
|
3
|
+
这是 MeshStream AI Coding Skill 的本地预览包。它把 Web、Android、iOS / macOS、Windows、Flutter、React Native 和 uni-app 的接入、排错和 P2P 验收规则安装到项目目录,不读取或上传客户代码,也不会写入凭据。
|
|
4
4
|
|
|
5
5
|
## 本地测试
|
|
6
6
|
|
|
@@ -16,6 +16,7 @@ npm test
|
|
|
16
16
|
npx @meshstream/agent-skills add --ide codex
|
|
17
17
|
npx @meshstream/agent-skills add --ide cursor
|
|
18
18
|
npx @meshstream/agent-skills add --ide claude
|
|
19
|
+
npx @meshstream/agent-skills add --ide codebuddy
|
|
19
20
|
npx @meshstream/agent-skills add --ide all
|
|
20
21
|
```
|
|
21
22
|
|
|
@@ -26,3 +27,5 @@ node src/cli.mjs add --ide all --project /path/to/project
|
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
默认保留已有文件;只有显式传入 `--force` 才会替换已有的 MeshStream 指令文件。
|
|
30
|
+
|
|
31
|
+
安装后,规则会先识别项目平台和播放器,再读取对应官方文档;移动端验收要求真实设备或明确标记未执行,不能用 Web 示例或模拟器结果替代。
|
package/package.json
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshstream/agent-skills",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "MeshStream AI Coding skills for SDK integration, troubleshooting, and P2P acceptance.",
|
|
6
|
-
"repository": {
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/Mesh-Stream/meshstream-ai-tools.git",
|
|
9
|
+
"directory": "packages/agent-skills"
|
|
10
|
+
},
|
|
7
11
|
"homepage": "https://meshstream.net/docs/ai-coding",
|
|
8
12
|
"type": "module",
|
|
9
|
-
"publishConfig": {
|
|
10
|
-
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"src",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
11
20
|
"bin": {
|
|
12
21
|
"meshstream-agent-skills": "src/cli.mjs"
|
|
13
22
|
},
|
package/src/cli.mjs
CHANGED
|
@@ -5,13 +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-
|
|
9
|
-
cursor: [{ path: ".cursor/rules/meshstream-
|
|
10
|
-
claude: [{ path: ".claude/skills/meshstream-
|
|
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 }],
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
function usage() {
|
|
14
|
-
return `MeshStream Agent Skills\n\nUsage:\n meshstream-agent-skills add --ide <codex|cursor|claude|all> [--project <path>] [--force]\n\nThe installer writes
|
|
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.`;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
function parseArgs(argv) {
|
|
@@ -31,7 +32,7 @@ function parseArgs(argv) {
|
|
|
31
32
|
async function install(options) {
|
|
32
33
|
const requested = options.ide === "all" ? Object.keys(targets) : [options.ide];
|
|
33
34
|
if (!requested[0] || requested.some((ide) => !targets[ide])) {
|
|
34
|
-
throw new Error("--ide must be codex, cursor, claude, or all");
|
|
35
|
+
throw new Error("--ide must be codex, cursor, claude, codebuddy, or all");
|
|
35
36
|
}
|
|
36
37
|
const written = [];
|
|
37
38
|
for (const ide of requested) {
|
package/src/skill-content.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const skillBody = `---
|
|
2
|
-
name: meshstream-
|
|
3
|
-
description: Integrate, troubleshoot, and verify MeshStream Web
|
|
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
|
|
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,25 @@ 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.
|
|
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.
|
|
42
|
+
|
|
43
|
+
## Supported task modes
|
|
44
|
+
|
|
45
|
+
Choose the smallest mode that matches the request:
|
|
46
|
+
|
|
47
|
+
- **from-zero integration:** inspect the project, select the platform SDK and existing player, then produce the smallest working change;
|
|
48
|
+
- **demo run:** find the repository's public example or demo, configure only local environment variables, run it, and report the actual result;
|
|
49
|
+
- **troubleshooting:** collect the concrete error, SDK status, bootstrap/Tracker/ICE evidence, and CDN fallback result before proposing a fix;
|
|
50
|
+
- **feature extension:** preserve the current integration and add one requested capability with focused tests and lifecycle cleanup;
|
|
51
|
+
- **documentation lookup:** use the read-only MeshStream docs MCP and include source URLs in the answer.
|
|
52
|
+
|
|
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.
|
|
30
54
|
|
|
31
55
|
## P2P acceptance requirements
|
|
32
56
|
|
|
@@ -53,17 +77,20 @@ Report:
|
|
|
53
77
|
6. devices, networks, or production conditions that were not tested.
|
|
54
78
|
`;
|
|
55
79
|
|
|
56
|
-
export const cursorBody = `# MeshStream
|
|
80
|
+
export const cursorBody = `# MeshStream SDK integration
|
|
57
81
|
|
|
58
82
|
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.
|
|
59
83
|
|
|
84
|
+
Supported targets: Web, Android, iOS/macOS, Windows, Flutter, React Native, and uni-app.
|
|
85
|
+
|
|
60
86
|
## Workflow
|
|
61
87
|
|
|
62
|
-
1. Identify the framework, player, protocol, and
|
|
63
|
-
2. Read the MeshStream
|
|
88
|
+
1. Identify the target platform, framework, player, protocol, package manager, and playback lifecycle.
|
|
89
|
+
2. Read the matching MeshStream platform setup and integration docs before editing.
|
|
64
90
|
3. Keep existing player, CDN, origin authentication, DRM, and ABR behavior.
|
|
65
|
-
4.
|
|
66
|
-
5.
|
|
91
|
+
4. On native clients use the documented local playback proxy; on Web use the documented Service Worker/MSE path when supported.
|
|
92
|
+
5. Keep CDN fallback and release the session on source change, page hide/background, playback end, and player/controller destruction.
|
|
93
|
+
6. Run the existing build and tests, then prefer real-device acceptance for mobile platforms.
|
|
67
94
|
|
|
68
95
|
Never put SDK keys, SecretKeys, signed media URLs, Authorization headers, Cookies, or production logs in source or chat.
|
|
69
96
|
|