reskill 1.4.2 → 1.6.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/dist/cli/commands/login.d.ts.map +1 -1
- package/dist/cli/commands/uninstall.d.ts +1 -1
- package/dist/cli/commands/uninstall.d.ts.map +1 -1
- package/dist/cli/index.js +75 -28
- package/dist/core/cache-manager.d.ts +1 -0
- package/dist/core/cache-manager.d.ts.map +1 -1
- package/dist/core/registry-client.d.ts +19 -0
- package/dist/core/registry-client.d.ts.map +1 -1
- package/dist/index.js +23 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/login.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/login.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyFpC,eAAO,MAAM,YAAY,SAOH,CAAC;AAEvB,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC;;GAEG;AACH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAqHzB,CAAC;AAEL,eAAe,gBAAgB,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -1418,10 +1418,14 @@ const installer_SKILLS_SUBDIR = 'skills';
|
|
|
1418
1418
|
*
|
|
1419
1419
|
* For different reference formats, cache paths are:
|
|
1420
1420
|
* - github:user/repo@v1.0.0 -> ~/.reskill-cache/github/user/repo/v1.0.0
|
|
1421
|
+
* - github:org/monorepo/skills/pdf@v1.0.0 -> ~/.reskill-cache/github/org/monorepo/skills/pdf/v1.0.0
|
|
1421
1422
|
* - git@github.com:user/repo.git@v1.0.0 -> ~/.reskill-cache/github.com/user/repo/v1.0.0
|
|
1422
1423
|
* - https://gitlab.company.com/team/skill.git@v2.0.0 -> ~/.reskill-cache/gitlab.company.com/team/skill/v2.0.0
|
|
1423
1424
|
*/ getSkillCachePath(parsed, version) {
|
|
1424
|
-
|
|
1425
|
+
const basePath = __WEBPACK_EXTERNAL_MODULE_node_path__.join(this.cacheDir, parsed.registry, parsed.owner, parsed.repo);
|
|
1426
|
+
// Include subPath in cache path to differentiate skills in monorepos
|
|
1427
|
+
if (parsed.subPath) return __WEBPACK_EXTERNAL_MODULE_node_path__.join(basePath, parsed.subPath, version);
|
|
1428
|
+
return __WEBPACK_EXTERNAL_MODULE_node_path__.join(basePath, version);
|
|
1425
1429
|
}
|
|
1426
1430
|
/**
|
|
1427
1431
|
* Get cache path (alias for getSkillCachePath)
|
|
@@ -2702,6 +2706,24 @@ class RegistryClient {
|
|
|
2702
2706
|
return data;
|
|
2703
2707
|
}
|
|
2704
2708
|
/**
|
|
2709
|
+
* CLI login - verify token and get user info
|
|
2710
|
+
*
|
|
2711
|
+
* Calls POST /api/auth/login-cli to validate the token and retrieve user information.
|
|
2712
|
+
* This is the preferred method for CLI authentication.
|
|
2713
|
+
*
|
|
2714
|
+
* @returns User information if authentication succeeds
|
|
2715
|
+
* @throws RegistryError if authentication fails
|
|
2716
|
+
*/ async loginCli() {
|
|
2717
|
+
const url = `${this.config.registry}/api/auth/login-cli`;
|
|
2718
|
+
const response = await fetch(url, {
|
|
2719
|
+
method: 'POST',
|
|
2720
|
+
headers: this.getAuthHeaders()
|
|
2721
|
+
});
|
|
2722
|
+
const data = await response.json();
|
|
2723
|
+
if (!response.ok) throw new RegistryError(data.error || `Login failed: ${response.status}`, response.status, data);
|
|
2724
|
+
return data;
|
|
2725
|
+
}
|
|
2726
|
+
/**
|
|
2705
2727
|
* Create tarball from skill files
|
|
2706
2728
|
*
|
|
2707
2729
|
* @param skillPath - Path to the skill directory
|
|
@@ -5983,23 +6005,24 @@ async function loginAction(options) {
|
|
|
5983
6005
|
*/ async function loginWithToken(token, registry, authManager) {
|
|
5984
6006
|
logger_logger.log(`Verifying token with ${registry}...`);
|
|
5985
6007
|
logger_logger.newline();
|
|
5986
|
-
// Verify token by calling
|
|
6008
|
+
// Verify token by calling login-cli endpoint
|
|
5987
6009
|
const client = new RegistryClient({
|
|
5988
6010
|
registry,
|
|
5989
6011
|
token
|
|
5990
6012
|
});
|
|
5991
6013
|
try {
|
|
5992
|
-
const response = await client.
|
|
6014
|
+
const response = await client.loginCli();
|
|
5993
6015
|
if (!response.success || !response.user) {
|
|
5994
6016
|
logger_logger.error(response.error || 'Token verification failed');
|
|
5995
6017
|
process.exit(1);
|
|
5996
6018
|
}
|
|
5997
|
-
// Save token with handle
|
|
5998
|
-
authManager.setToken(token, registry,
|
|
6019
|
+
// Save token with handle and email
|
|
6020
|
+
authManager.setToken(token, registry, response.user.email, response.user.handle);
|
|
5999
6021
|
logger_logger.log('✓ Token verified and saved!');
|
|
6000
6022
|
logger_logger.newline();
|
|
6001
6023
|
logger_logger.log(` Handle: @${response.user.handle}`);
|
|
6002
6024
|
logger_logger.log(` Username: ${response.user.id}`);
|
|
6025
|
+
if (response.user.email) logger_logger.log(` Email: ${response.user.email}`);
|
|
6003
6026
|
logger_logger.log(` Registry: ${registry}`);
|
|
6004
6027
|
logger_logger.newline();
|
|
6005
6028
|
logger_logger.log(`Token saved to ${authManager.getConfigPath()}`);
|
|
@@ -7153,8 +7176,8 @@ async function publishAction(skillPath, options) {
|
|
|
7153
7176
|
// ============================================================================
|
|
7154
7177
|
const publishCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('publish').alias('pub').description('Publish a skill to the registry').argument('[path]', 'Path to skill directory', '.').option('-r, --registry <url>', 'Registry URL (or set RESKILL_REGISTRY env var, or defaults.publishRegistry in skills.json)').option('-t, --tag <tag>', 'Git tag to publish').option('--access <level>', 'Access level: public or restricted', 'public').option('-n, --dry-run', 'Validate without publishing').option('-y, --yes', 'Skip confirmation prompts').action(publishAction);
|
|
7155
7178
|
/**
|
|
7156
|
-
* uninstall command - Uninstall
|
|
7157
|
-
*/ const uninstallCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('uninstall').alias('un').alias('remove').alias('rm').description('Uninstall
|
|
7179
|
+
* uninstall command - Uninstall one or more skills
|
|
7180
|
+
*/ const uninstallCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('uninstall').alias('un').alias('remove').alias('rm').description('Uninstall one or more skills').argument('<skills...>', 'Skill names to uninstall').option('-g, --global', 'Uninstall from global installation (~/.claude/skills)').option('-y, --yes', 'Skip confirmation prompts').action(async (skillNames, options)=>{
|
|
7158
7181
|
const isGlobal = options.global || false;
|
|
7159
7182
|
const skipConfirm = options.yes || false;
|
|
7160
7183
|
const skillManager = new SkillManager(void 0, {
|
|
@@ -7162,7 +7185,7 @@ const publishCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('publis
|
|
|
7162
7185
|
});
|
|
7163
7186
|
console.log();
|
|
7164
7187
|
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.intro(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].bgCyan.black(' reskill '));
|
|
7165
|
-
// Check which agents have
|
|
7188
|
+
// Check which agents have these skills installed
|
|
7166
7189
|
// Use installDir from config to match where skills are actually installed
|
|
7167
7190
|
const config = new ConfigLoader(process.cwd());
|
|
7168
7191
|
const defaults = config.getDefaults();
|
|
@@ -7172,43 +7195,67 @@ const publishCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('publis
|
|
|
7172
7195
|
installDir: defaults.installDir
|
|
7173
7196
|
});
|
|
7174
7197
|
const allAgentTypes = Object.keys(agents);
|
|
7175
|
-
const
|
|
7176
|
-
const
|
|
7177
|
-
|
|
7198
|
+
const skillsToUninstall = [];
|
|
7199
|
+
const notInstalledSkills = [];
|
|
7200
|
+
for (const skillName of skillNames){
|
|
7201
|
+
const installedAgents = allAgentTypes.filter((agent)=>installer.isInstalled(skillName, agent));
|
|
7202
|
+
const isInCanonical = installer.isInstalledInCanonical(skillName);
|
|
7203
|
+
if (0 !== installedAgents.length || isInCanonical) skillsToUninstall.push({
|
|
7204
|
+
name: skillName,
|
|
7205
|
+
installedAgents,
|
|
7206
|
+
isInCanonical
|
|
7207
|
+
});
|
|
7208
|
+
else notInstalledSkills.push(skillName);
|
|
7209
|
+
}
|
|
7210
|
+
// Warn about skills that are not installed
|
|
7211
|
+
for (const skillName of notInstalledSkills){
|
|
7178
7212
|
const location = isGlobal ? '(global)' : '';
|
|
7179
7213
|
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.warn(`Skill ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skillName)} is not installed ${location}`.trim());
|
|
7214
|
+
}
|
|
7215
|
+
if (0 === skillsToUninstall.length) {
|
|
7180
7216
|
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.outro('Done');
|
|
7181
7217
|
process.exit(0);
|
|
7182
7218
|
}
|
|
7183
7219
|
// Show uninstallation summary
|
|
7184
7220
|
const summaryLines = [];
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7221
|
+
for (const skill of skillsToUninstall){
|
|
7222
|
+
summaryLines.push(`${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skill.name)}`);
|
|
7223
|
+
const agentNames = skill.installedAgents.map((a)=>agents[a].displayName).join(', ');
|
|
7224
|
+
if (agentNames) summaryLines.push(` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('→')} ${agentNames}`);
|
|
7225
|
+
if (skill.isInCanonical && 0 === skill.installedAgents.length) summaryLines.push(` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('→')} Canonical location only`);
|
|
7226
|
+
summaryLines.push(` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('Scope:')} ${isGlobal ? 'Global' : 'Project'}`);
|
|
7227
|
+
summaryLines.push('');
|
|
7228
|
+
}
|
|
7229
|
+
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.note(summaryLines.join('\n').trim(), 'Uninstallation Summary');
|
|
7191
7230
|
if (!skipConfirm) {
|
|
7192
7231
|
const confirmed = await __WEBPACK_EXTERNAL_MODULE__clack_prompts__.confirm({
|
|
7193
|
-
message:
|
|
7232
|
+
message: `Proceed with uninstalling ${skillsToUninstall.length} skill(s)?`
|
|
7194
7233
|
});
|
|
7195
7234
|
if (__WEBPACK_EXTERNAL_MODULE__clack_prompts__.isCancel(confirmed) || !confirmed) {
|
|
7196
7235
|
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.cancel('Uninstallation cancelled');
|
|
7197
7236
|
process.exit(0);
|
|
7198
7237
|
}
|
|
7199
7238
|
}
|
|
7200
|
-
// Uninstall
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7239
|
+
// Uninstall all skills
|
|
7240
|
+
let totalSuccess = 0;
|
|
7241
|
+
let totalFailed = 0;
|
|
7242
|
+
for (const skill of skillsToUninstall){
|
|
7243
|
+
// Uninstall from all detected agents (also removes canonical location)
|
|
7244
|
+
const results = skillManager.uninstallFromAgents(skill.name, skill.installedAgents);
|
|
7245
|
+
const successCount = Array.from(results.values()).filter((r)=>r).length;
|
|
7246
|
+
// Count canonical removal as success if it was there
|
|
7247
|
+
const totalRemoved = successCount + (skill.isInCanonical ? 1 : 0);
|
|
7248
|
+
if (totalRemoved > 0) __WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.success(`Uninstalled ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skill.name)} from ${successCount} agent(s)`);
|
|
7249
|
+
else {
|
|
7250
|
+
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.error(`Failed to uninstall ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skill.name)}`);
|
|
7251
|
+
totalFailed++;
|
|
7252
|
+
}
|
|
7209
7253
|
}
|
|
7210
7254
|
console.log();
|
|
7211
|
-
|
|
7255
|
+
if (totalFailed > 0) {
|
|
7256
|
+
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.outro(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].yellow(`Done with ${totalFailed} failure(s)`));
|
|
7257
|
+
process.exit(1);
|
|
7258
|
+
} else __WEBPACK_EXTERNAL_MODULE__clack_prompts__.outro(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].green('Done!'));
|
|
7212
7259
|
});
|
|
7213
7260
|
/**
|
|
7214
7261
|
* update command - Update installed skills
|
|
@@ -34,6 +34,7 @@ export declare class CacheManager {
|
|
|
34
34
|
*
|
|
35
35
|
* For different reference formats, cache paths are:
|
|
36
36
|
* - github:user/repo@v1.0.0 -> ~/.reskill-cache/github/user/repo/v1.0.0
|
|
37
|
+
* - github:org/monorepo/skills/pdf@v1.0.0 -> ~/.reskill-cache/github/org/monorepo/skills/pdf/v1.0.0
|
|
37
38
|
* - git@github.com:user/repo.git@v1.0.0 -> ~/.reskill-cache/github.com/user/repo/v1.0.0
|
|
38
39
|
* - https://gitlab.company.com/team/skill.git@v2.0.0 -> ~/.reskill-cache/gitlab.company.com/team/skill/v2.0.0
|
|
39
40
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-manager.d.ts","sourceRoot":"","sources":["../../src/core/cache-manager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,m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M,GACd,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IA+B5C;;;;;OAKG;IACG,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBtF;;OAEG;IACH,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAW1D;;OAEG;IACH,QAAQ,IAAI,IAAI;IAIhB;;OAEG;IACH,QAAQ,IAAI;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE;IA2BzD;;;;;;;;OAQG;IACG,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAoCrE;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -39,6 +39,15 @@ export interface WhoamiResponse {
|
|
|
39
39
|
handle: string;
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
+
export interface LoginCliResponse {
|
|
43
|
+
success: boolean;
|
|
44
|
+
error?: string;
|
|
45
|
+
user?: {
|
|
46
|
+
id: string;
|
|
47
|
+
handle: string;
|
|
48
|
+
email?: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
42
51
|
export interface SkillMetadataResponse {
|
|
43
52
|
name: string;
|
|
44
53
|
'dist-tags': Record<string, string>;
|
|
@@ -65,6 +74,16 @@ export declare class RegistryClient {
|
|
|
65
74
|
* Get current user info (whoami)
|
|
66
75
|
*/
|
|
67
76
|
whoami(): Promise<WhoamiResponse>;
|
|
77
|
+
/**
|
|
78
|
+
* CLI login - verify token and get user info
|
|
79
|
+
*
|
|
80
|
+
* Calls POST /api/auth/login-cli to validate the token and retrieve user information.
|
|
81
|
+
* This is the preferred method for CLI authentication.
|
|
82
|
+
*
|
|
83
|
+
* @returns User information if authentication succeeds
|
|
84
|
+
* @throws RegistryError if authentication fails
|
|
85
|
+
*/
|
|
86
|
+
loginCli(): Promise<LoginCliResponse>;
|
|
68
87
|
/**
|
|
69
88
|
* Create tarball from skill files
|
|
70
89
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-client.d.ts","sourceRoot":"","sources":["../../src/core/registry-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMrD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAA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G,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC;IAqBvC;;;;;;;;OAQG;IACG,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAqB3C;;;;;;;OAOG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IA4C5F;;;;;;;OAOG;IACG,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAoCzD;;;;;;;;;;;OAWG;IACG,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAuD/E;;;;;;;;;;OAUG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IA4BhF;;;;;;;;OAQG;IACH,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAKlD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO;IAsB3E;;OAEG;IACG,OAAO,CACX,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAO,GAC7B,OAAO,CAAC,eAAe,CAAC;CAiE5B;AAED,eAAe,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1142,10 +1142,14 @@ const installer_SKILLS_SUBDIR = 'skills';
|
|
|
1142
1142
|
*
|
|
1143
1143
|
* For different reference formats, cache paths are:
|
|
1144
1144
|
* - github:user/repo@v1.0.0 -> ~/.reskill-cache/github/user/repo/v1.0.0
|
|
1145
|
+
* - github:org/monorepo/skills/pdf@v1.0.0 -> ~/.reskill-cache/github/org/monorepo/skills/pdf/v1.0.0
|
|
1145
1146
|
* - git@github.com:user/repo.git@v1.0.0 -> ~/.reskill-cache/github.com/user/repo/v1.0.0
|
|
1146
1147
|
* - https://gitlab.company.com/team/skill.git@v2.0.0 -> ~/.reskill-cache/gitlab.company.com/team/skill/v2.0.0
|
|
1147
1148
|
*/ getSkillCachePath(parsed, version) {
|
|
1148
|
-
|
|
1149
|
+
const basePath = __WEBPACK_EXTERNAL_MODULE_node_path__.join(this.cacheDir, parsed.registry, parsed.owner, parsed.repo);
|
|
1150
|
+
// Include subPath in cache path to differentiate skills in monorepos
|
|
1151
|
+
if (parsed.subPath) return __WEBPACK_EXTERNAL_MODULE_node_path__.join(basePath, parsed.subPath, version);
|
|
1152
|
+
return __WEBPACK_EXTERNAL_MODULE_node_path__.join(basePath, version);
|
|
1149
1153
|
}
|
|
1150
1154
|
/**
|
|
1151
1155
|
* Get cache path (alias for getSkillCachePath)
|
|
@@ -2599,6 +2603,24 @@ class RegistryClient {
|
|
|
2599
2603
|
return data;
|
|
2600
2604
|
}
|
|
2601
2605
|
/**
|
|
2606
|
+
* CLI login - verify token and get user info
|
|
2607
|
+
*
|
|
2608
|
+
* Calls POST /api/auth/login-cli to validate the token and retrieve user information.
|
|
2609
|
+
* This is the preferred method for CLI authentication.
|
|
2610
|
+
*
|
|
2611
|
+
* @returns User information if authentication succeeds
|
|
2612
|
+
* @throws RegistryError if authentication fails
|
|
2613
|
+
*/ async loginCli() {
|
|
2614
|
+
const url = `${this.config.registry}/api/auth/login-cli`;
|
|
2615
|
+
const response = await fetch(url, {
|
|
2616
|
+
method: 'POST',
|
|
2617
|
+
headers: this.getAuthHeaders()
|
|
2618
|
+
});
|
|
2619
|
+
const data = await response.json();
|
|
2620
|
+
if (!response.ok) throw new RegistryError(data.error || `Login failed: ${response.status}`, response.status, data);
|
|
2621
|
+
return data;
|
|
2622
|
+
}
|
|
2623
|
+
/**
|
|
2602
2624
|
* Create tarball from skill files
|
|
2603
2625
|
*
|
|
2604
2626
|
* @param skillPath - Path to the skill directory
|