nextclaw 0.9.26 → 0.9.27
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/dist/cli/index.js +11 -1
- package/package.json +2 -2
package/dist/cli/index.js
CHANGED
|
@@ -235,7 +235,7 @@ async function installMarketplaceSkill(options) {
|
|
|
235
235
|
throw new Error(`Invalid marketplace file path: ${file.path}`);
|
|
236
236
|
}
|
|
237
237
|
mkdirSync2(dirname(targetPath), { recursive: true });
|
|
238
|
-
const bytes = await fetchMarketplaceSkillFileBlob(apiBase, slug, file);
|
|
238
|
+
const bytes = file.contentBase64 ? decodeMarketplaceFileContent(file.path, file.contentBase64) : await fetchMarketplaceSkillFileBlob(apiBase, slug, file);
|
|
239
239
|
writeFileSync2(targetPath, bytes);
|
|
240
240
|
}
|
|
241
241
|
if (!existsSync2(join(destinationDir, "SKILL.md"))) {
|
|
@@ -376,6 +376,9 @@ async function fetchMarketplaceSkillFiles(apiBase, slug) {
|
|
|
376
376
|
if (typeof entry.downloadPath === "string" && entry.downloadPath.trim().length > 0) {
|
|
377
377
|
normalized.downloadPath = entry.downloadPath.trim();
|
|
378
378
|
}
|
|
379
|
+
if (typeof entry.contentBase64 === "string" && entry.contentBase64.trim().length > 0) {
|
|
380
|
+
normalized.contentBase64 = entry.contentBase64.trim();
|
|
381
|
+
}
|
|
379
382
|
return normalized;
|
|
380
383
|
});
|
|
381
384
|
return { files };
|
|
@@ -394,6 +397,13 @@ async function fetchMarketplaceSkillFileBlob(apiBase, slug, file) {
|
|
|
394
397
|
const arrayBuffer = await response.arrayBuffer();
|
|
395
398
|
return Buffer.from(arrayBuffer);
|
|
396
399
|
}
|
|
400
|
+
function decodeMarketplaceFileContent(path, contentBase64) {
|
|
401
|
+
const normalized = contentBase64.replace(/\s+/g, "");
|
|
402
|
+
if (!normalized || normalized.length % 4 !== 0 || !/^[A-Za-z0-9+/]+={0,2}$/.test(normalized)) {
|
|
403
|
+
throw new Error(`Invalid marketplace file contentBase64 for path: ${path}`);
|
|
404
|
+
}
|
|
405
|
+
return Buffer.from(normalized, "base64");
|
|
406
|
+
}
|
|
397
407
|
function resolveSkillFileDownloadUrl(apiBase, slug, file) {
|
|
398
408
|
const fallback = `${apiBase}/api/v1/skills/items/${encodeURIComponent(slug)}/files/blob?path=${encodeURIComponent(file.path)}`;
|
|
399
409
|
if (!file.downloadPath) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextclaw",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.27",
|
|
4
4
|
"description": "Lightweight personal AI assistant with CLI, multi-provider routing, and channel integrations.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"chokidar": "^3.6.0",
|
|
40
40
|
"commander": "^12.1.0",
|
|
41
41
|
"@nextclaw/core": "0.7.7",
|
|
42
|
-
"@nextclaw/runtime": "0.1.6",
|
|
43
42
|
"@nextclaw/server": "0.6.13",
|
|
43
|
+
"@nextclaw/runtime": "0.1.6",
|
|
44
44
|
"@nextclaw/openclaw-compat": "0.2.6"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|