@opencangjie/skills 0.0.27 → 0.0.28
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/scripts/runtime.js +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencangjie/skills",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
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",
|
package/scripts/runtime.js
CHANGED
|
@@ -17,13 +17,15 @@ const RUNTIME_VERSION = packageJson.runtime && packageJson.runtime.version ? pac
|
|
|
17
17
|
const DOWNLOAD_MIRRORS = [
|
|
18
18
|
{
|
|
19
19
|
name: 'atomgit',
|
|
20
|
-
url: `https://atomgit.com/${ATOMGIT_REPO}/releases
|
|
20
|
+
url: `https://api.atomgit.com/api/v5/repos/${ATOMGIT_REPO}/releases`,
|
|
21
|
+
downloadPath: `/attach_files`,
|
|
21
22
|
priority: 1,
|
|
22
23
|
region: 'china'
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
26
|
name: 'github',
|
|
26
27
|
url: `https://github.com/${GITHUB_REPO}/releases/download`,
|
|
28
|
+
downloadPath: '',
|
|
27
29
|
priority: 2,
|
|
28
30
|
region: 'global'
|
|
29
31
|
}
|
|
@@ -121,7 +123,13 @@ async function downloadRuntime(version = RUNTIME_VERSION) {
|
|
|
121
123
|
const archivePath = path.join(runtimeDir, 'runtime.tar.gz');
|
|
122
124
|
|
|
123
125
|
for (const mirror of DOWNLOAD_MIRRORS) {
|
|
124
|
-
|
|
126
|
+
let downloadUrl;
|
|
127
|
+
|
|
128
|
+
if (mirror.name === 'atomgit') {
|
|
129
|
+
downloadUrl = `${mirror.url}/v${version}/attach_files/${fileName}/download`;
|
|
130
|
+
} else {
|
|
131
|
+
downloadUrl = `${mirror.url}/v${version}/${fileName}`;
|
|
132
|
+
}
|
|
125
133
|
|
|
126
134
|
console.log(`Trying mirror: ${mirror.name} (${mirror.region})`);
|
|
127
135
|
console.log(`URL: ${downloadUrl}`);
|