更新 lib/api.js

This commit is contained in:
QQ 2026-11-11 10:51:09 +08:00
parent 318b4a0254
commit d998236583
1 changed files with 16 additions and 0 deletions

View File

@ -195,6 +195,22 @@ export class CloudClient {
storageStatus() {
return this.request('GET', '/storage/status');
}
/** List the cloud skill center inventory (memory token). */
listSkills() {
return this.request('GET', '/skills');
}
/** Fetch one skill bundle with hashed, base64-carried files (memory token). */
skillBundle(name) {
return this.request('GET', `/skills/${encodeURIComponent(name)}/bundle`);
}
/** Create one skill in the center; `expected_revision` must be 0 (memory token). */
createSkill(body) {
return this.request('POST', '/skills', body);
}
/** Replace one skill's files/description at an expected revision (memory token). */
updateSkill(name, body) {
return this.request('PATCH', `/skills/${encodeURIComponent(name)}`, body);
}
/**
* One call against the dashboard auth surface (`/api/auth/*`).
*