@opencangjie/skills 0.0.37 → 0.0.39

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/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- # Changelog
1
+ # Changelog
2
2
 
3
3
  All notable changes to the `@opencangjie/skills` SDK will be documented in this file.
4
4
 
@@ -7,7 +7,7 @@ All notable changes to the `@opencangjie/skills` SDK will be documented in this
7
7
  ### Fixed
8
8
  - **Windows `npx skills stop` command**: Now uses `taskkill /F /PID` on Windows to properly terminate runtime process
9
9
  - Previous `process.kill(pid, 'SIGTERM')` didn't work on Windows for detached processes
10
- - **Runtime v0.0.13**: Temporary directory now uses sibling `temp` directory of `SKILL_INSTALL_PATH`
10
+ - **Runtime v0.0.16**: Temporary directory now uses sibling `temp` directory of `SKILL_INSTALL_PATH`
11
11
  - If `SKILL_INSTALL_PATH=./skills`, temp directory will be `./temp/git-clone`
12
12
  - This ensures proper permissions and accessibility for the temp directory
13
13
 
package/README.md CHANGED
@@ -32,10 +32,48 @@ npx @opencangjie/skills add ./my-skill
32
32
  npx skills install-runtime
33
33
 
34
34
  # Or specify a version
35
- npx skills install-runtime --runtime-version 0.0.13
35
+ npx skills install-runtime --runtime-version 0.0.16
36
36
  ```
37
37
 
38
- ### 2. Start the Runtime
38
+ ### 2. Configure the Runtime
39
+
40
+ Before starting the runtime, you need to configure the AI model API key. The runtime requires an AI model to process skill execution and natural language understanding.
41
+
42
+ Edit the `.env` file in the runtime directory:
43
+ - **Windows**: `%USERPROFILE%\.agentskills-runtime\<platform>-<arch>\release\.env`
44
+ - **macOS/Linux**: `~/.agentskills-runtime/<platform>-<arch>/release/.env`
45
+
46
+ Where `<platform>-<arch>` is your system architecture, e.g., `win-x64`, `darwin-x64`, or `linux-x64`
47
+
48
+ Add your AI model configuration (choose one provider):
49
+
50
+ ```ini
51
+ # Option 1: StepFun (阶跃星辰)
52
+ MODEL_PROVIDER=stepfun
53
+ MODEL_NAME=step-1-8k
54
+ STEPFUN_API_KEY=your_stepfun_api_key_here
55
+ STEPFUN_BASE_URL=https://api.stepfun.com/v1
56
+
57
+ # Option 2: DeepSeek
58
+ MODEL_PROVIDER=deepseek
59
+ MODEL_NAME=deepseek-chat
60
+ DEEPSEEK_API_KEY=your_deepseek_api_key_here
61
+
62
+ # Option 3: 华为云 MaaS
63
+ MODEL_PROVIDER=maas
64
+ MAAS_API_KEY=your_maas_api_key_here
65
+ MAAS_BASE_URL=https://api.modelarts-maas.com/v2
66
+ MAAS_MODEL_NAME=qwen3-coder-480b-a35b-instruct
67
+
68
+ # Option 4: Sophnet
69
+ MODEL_PROVIDER=sophnet
70
+ SOPHNET_API_KEY=your_sophnet_api_key_here
71
+ SOPHNET_BASE_URL=https://www.sophnet.com/api/open-apis/v1
72
+ ```
73
+
74
+ > **Note**: Without proper AI model configuration, the runtime will fail to start with an error like "Get env variable XXX_API_KEY error."
75
+
76
+ ### 3. Start the Runtime
39
77
 
40
78
  ```bash
41
79
  # Start in background (default)
@@ -48,7 +86,7 @@ npx skills start --foreground
48
86
  npx skills start --port 3000 --host 0.0.0.0
49
87
  ```
50
88
 
51
- ### 3. Manage Skills
89
+ ### 4. Manage Skills
52
90
 
53
91
  ```bash
54
92
  # Find and install skills
@@ -72,7 +110,7 @@ Download and install the AgentSkills runtime binary.
72
110
 
73
111
  ```bash
74
112
  npx skills install-runtime
75
- npx skills install-runtime --runtime-version 0.0.13
113
+ npx skills install-runtime --runtime-version 0.0.16
76
114
  ```
77
115
 
78
116
  #### `npx skills start`
@@ -136,11 +174,23 @@ npx skills find skill --source atomgit --limit 5
136
174
  Install a skill from GitHub or local path.
137
175
 
138
176
  ```bash
177
+ # Install from local directory
139
178
  npx skills add ./my-skill
179
+
180
+ # Install from GitHub repository
140
181
  npx skills add github.com/user/skill-repo
141
182
  npx skills add github.com/user/skill-repo --branch develop
183
+
184
+ # Install from multi-skill repository (specify subdirectory)
185
+ npx skills add https://github.com/user/skills-repo/tree/main/skills/my-skill
186
+ npx skills add https://atomgit.com/user/skills-repo/tree/main/skills/skill-creator
187
+
188
+ # Install with options
189
+ npx skills add github.com/user/skill-repo -y # Skip confirmation
142
190
  ```
143
191
 
192
+ > **Tip**: For repositories containing multiple skills, use the `/tree/<branch>/<skill-path>` format to specify the exact subdirectory. This avoids the interactive selection prompt.
193
+
144
194
  #### `npx skills list`
145
195
 
146
196
  List installed skills.
@@ -653,18 +703,26 @@ onMounted(loadSkills);
653
703
  // apps/backend/package.json
654
704
  {
655
705
  "dependencies": {
656
- "@opencangjie/skills": "^0.0.13"
706
+ "@opencangjie/skills": "^0.0.16"
657
707
  }
658
708
  }
659
709
 
660
710
  // apps/uctoo-app-client-pc/package.json
661
711
  {
662
712
  "dependencies": {
663
- "@opencangjie/skills": "^0.0.13"
713
+ "@opencangjie/skills": "^0.0.16"
664
714
  }
665
715
  }
666
716
  ```
667
717
 
718
+ ## Links
719
+
720
+ - [NPM Package](https://www.npmjs.com/package/@opencangjie/skills)
721
+ - [Documentation](https://atomgit.com/uctoo/agentskills-runtime#readme)
722
+ - [Repository](https://atomgit.com/uctoo/agentskills-runtime)
723
+ - [Issue Tracker](https://atomgit.com/uctoo/agentskills-runtime/issues)
724
+ - [Python SDK](../python)
725
+
668
726
  ## License
669
727
 
670
728
  MIT
package/README_cn.md CHANGED
@@ -32,10 +32,48 @@ npx @opencangjie/skills add ./my-skill
32
32
  npx skills install-runtime
33
33
 
34
34
  # 或指定版本
35
- npx skills install-runtime --version 0.0.1
35
+ npx skills install-runtime --runtime-version 0.0.16
36
36
  ```
37
37
 
38
- ### 2. 启动运行时
38
+ ### 2. 配置运行时
39
+
40
+ 在启动运行时之前,您需要配置 AI 模型 API 密钥。运行时需要 AI 模型来处理技能执行和自然语言理解。
41
+
42
+ 编辑运行时目录中的 `.env` 文件:
43
+ - **Windows**: `%USERPROFILE%\.agentskills-runtime\<platform>-<arch>\release\.env`
44
+ - **macOS/Linux**: `~/.agentskills-runtime/<platform>-<arch>/release/.env`
45
+
46
+ 其中 `<platform>-<arch>` 是您的系统架构,例如 `win-x64`、`darwin-x64` 或 `linux-x64`
47
+
48
+ 添加您的 AI 模型配置(选择一个提供商):
49
+
50
+ ```ini
51
+ # 选项 1: StepFun (阶跃星辰)
52
+ MODEL_PROVIDER=stepfun
53
+ MODEL_NAME=step-1-8k
54
+ STEPFUN_API_KEY=your_stepfun_api_key_here
55
+ STEPFUN_BASE_URL=https://api.stepfun.com/v1
56
+
57
+ # 选项 2: DeepSeek
58
+ MODEL_PROVIDER=deepseek
59
+ MODEL_NAME=deepseek-chat
60
+ DEEPSEEK_API_KEY=your_deepseek_api_key_here
61
+
62
+ # 选项 3: 华为云 MaaS
63
+ MODEL_PROVIDER=maas
64
+ MAAS_API_KEY=your_maas_api_key_here
65
+ MAAS_BASE_URL=https://api.modelarts-maas.com/v2
66
+ MAAS_MODEL_NAME=qwen3-coder-480b-a35b-instruct
67
+
68
+ # 选项 4: Sophnet
69
+ MODEL_PROVIDER=sophnet
70
+ SOPHNET_API_KEY=your_sophnet_api_key_here
71
+ SOPHNET_BASE_URL=https://www.sophnet.com/api/open-apis/v1
72
+ ```
73
+
74
+ > **注意**:如果没有正确配置 AI 模型,运行时将无法启动,并显示类似 "Get env variable XXX_API_KEY error" 的错误。
75
+
76
+ ### 3. 启动运行时
39
77
 
40
78
  ```bash
41
79
  # 后台启动(默认)
@@ -48,7 +86,7 @@ npx skills start --foreground
48
86
  npx skills start --port 3000 --host 0.0.0.0
49
87
  ```
50
88
 
51
- ### 3. 管理技能
89
+ ### 4. 管理技能
52
90
 
53
91
  ```bash
54
92
  # 查找并安装技能
@@ -72,7 +110,7 @@ npx skills run my-skill -p '{"input": "data"}'
72
110
 
73
111
  ```bash
74
112
  npx skills install-runtime
75
- npx skills install-runtime --runtime-version 0.0.13
113
+ npx skills install-runtime --runtime-version 0.0.16
76
114
  ```
77
115
 
78
116
  #### `npx skills start`
@@ -136,11 +174,23 @@ npx skills find skill --source atomgit --limit 5
136
174
  从 GitHub 或本地路径安装技能。
137
175
 
138
176
  ```bash
177
+ # 从本地目录安装
139
178
  npx skills add ./my-skill
179
+
180
+ # 从 GitHub 仓库安装
140
181
  npx skills add github.com/user/skill-repo
141
182
  npx skills add github.com/user/skill-repo --branch develop
183
+
184
+ # 从多技能仓库安装(指定子目录)
185
+ npx skills add https://github.com/user/skills-repo/tree/main/skills/my-skill
186
+ npx skills add https://atomgit.com/user/skills-repo/tree/main/skills/skill-creator
187
+
188
+ # 带选项安装
189
+ npx skills add github.com/user/skill-repo -y # 跳过确认
142
190
  ```
143
191
 
192
+ > **提示**:对于包含多个技能的仓库,使用 `/tree/<分支>/<技能路径>` 格式指定具体的子目录。这样可以避免交互式选择提示。
193
+
144
194
  #### `npx skills list`
145
195
 
146
196
  列出已安装的技能。
@@ -653,18 +703,26 @@ onMounted(loadSkills);
653
703
  // apps/backend/package.json
654
704
  {
655
705
  "dependencies": {
656
- "@opencangjie/skills": "^0.0.13"
706
+ "@opencangjie/skills": "^0.0.16"
657
707
  }
658
708
  }
659
709
 
660
710
  // apps/uctoo-app-client-pc/package.json
661
711
  {
662
712
  "dependencies": {
663
- "@opencangjie/skills": "^0.0.13"
713
+ "@opencangjie/skills": "^0.0.16"
664
714
  }
665
715
  }
666
716
  ```
667
717
 
718
+ ## 相关链接
719
+
720
+ - [NPM 包](https://www.npmjs.com/package/@opencangjie/skills)
721
+ - [文档](https://atomgit.com/uctoo/agentskills-runtime#readme)
722
+ - [仓库](https://atomgit.com/uctoo/agentskills-runtime)
723
+ - [问题追踪](https://atomgit.com/uctoo/agentskills-runtime/issues)
724
+ - [Python SDK](../python)
725
+
668
726
  ## 许可证
669
727
 
670
728
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencangjie/skills",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "JavaScript/TypeScript SDK for AgentSkills Runtime - Install, manage, and execute AI agent skills with built-in runtime support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -89,7 +89,7 @@
89
89
  }
90
90
  },
91
91
  "runtime": {
92
- "version": "0.0.15",
92
+ "version": "0.0.17",
93
93
  "downloadUrl": "https://atomgit.com/UCToo/agentskills-runtime/releases",
94
94
  "platforms": {
95
95
  "win32-x64": "agentskills-runtime-win-x64.tar.gz",
@@ -53,7 +53,8 @@ function getPlatform() {
53
53
  }
54
54
 
55
55
  function getRuntimeDir() {
56
- return path.join(__dirname, '..', 'runtime');
56
+ const homeDir = os.homedir();
57
+ return path.join(homeDir, '.agentskills-runtime');
57
58
  }
58
59
 
59
60
  function getRuntimePath() {
@@ -142,6 +143,27 @@ async function downloadRuntime(version = RUNTIME_VERSION) {
142
143
  fs.chmodSync(runtimePath, '755');
143
144
  }
144
145
 
146
+ // Handle .env file - preserve existing configuration
147
+ const releaseDir = getRuntimeWorkingDir();
148
+ const envFile = path.join(releaseDir, '.env');
149
+ const envExampleFile = path.join(releaseDir, '.env.example');
150
+
151
+ if (!fs.existsSync(envFile) && fs.existsSync(envExampleFile)) {
152
+ fs.copyFileSync(envExampleFile, envFile);
153
+ console.log('Created .env file from .env.example');
154
+ } else if (!fs.existsSync(envFile)) {
155
+ const defaultEnvContent = `# AgentSkills Runtime Configuration
156
+ # This file was auto-generated. Edit as needed.
157
+
158
+ # Skill Installation Path
159
+ SKILL_INSTALL_PATH=./skills
160
+ `;
161
+ fs.writeFileSync(envFile, defaultEnvContent);
162
+ console.log('Created default .env file');
163
+ } else {
164
+ console.log('Preserved existing .env file');
165
+ }
166
+
145
167
  console.log(`AgentSkills Runtime v${version} downloaded successfully from ${mirror.name}!`);
146
168
  return true;
147
169
  } catch (error) {