reskill 1.12.0 → 1.14.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/README.md +22 -3
- package/README.zh-CN.md +22 -3
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/index.js +274 -139
- package/dist/core/registry-resolver.d.ts +2 -1
- package/dist/core/registry-resolver.d.ts.map +1 -1
- package/dist/core/skill-manager.d.ts +17 -0
- package/dist/core/skill-manager.d.ts.map +1 -1
- package/dist/index.js +60 -5
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,7 +75,8 @@ npx reskill@latest <command> # Or use npx directly
|
|
|
75
75
|
| `-f, --force` | `install` | Force reinstall even if already installed |
|
|
76
76
|
| `-s, --skill <names...>` | `install` | Select specific skill(s) by name from a multi-skill repo |
|
|
77
77
|
| `--list` | `install` | List available skills in the repository without installing |
|
|
78
|
-
| `-r, --registry <url>` | `install`
|
|
78
|
+
| `-r, --registry <url>` | `install`, `publish` | Registry URL override for registry-based installs |
|
|
79
|
+
| `-t, --token <token>` | `install` | Auth token for registry API requests (for CI/CD) |
|
|
79
80
|
| `-j, --json` | `list`, `info`, `outdated`, `doctor` | Output as JSON |
|
|
80
81
|
|
|
81
82
|
Run `reskill <command> --help` for complete options and detailed usage.
|
|
@@ -116,7 +117,7 @@ npx reskill@latest install github:user/skill1 github:user/skill2@v1.0.0
|
|
|
116
117
|
|
|
117
118
|
### Monorepo Support
|
|
118
119
|
|
|
119
|
-
For repositories containing multiple skills (monorepo),
|
|
120
|
+
For repositories containing multiple skills (monorepo), you can install a specific skill by path or install all skills from a parent directory:
|
|
120
121
|
|
|
121
122
|
```bash
|
|
122
123
|
# Shorthand format with subpath
|
|
@@ -129,9 +130,12 @@ npx reskill@latest install git@gitlab.company.com:team/skills.git/backend/apis@v
|
|
|
129
130
|
|
|
130
131
|
# GitHub web URL automatically extracts subpath
|
|
131
132
|
npx reskill@latest install https://github.com/org/monorepo/tree/main/skills/planning
|
|
133
|
+
|
|
134
|
+
# Point to a parent directory — auto-detects and installs all child skills
|
|
135
|
+
npx reskill@latest install https://github.com/org/monorepo/tree/main/skills
|
|
132
136
|
```
|
|
133
137
|
|
|
134
|
-
|
|
138
|
+
When the target directory has no root `SKILL.md` but contains subdirectories with `SKILL.md` files, reskill automatically discovers and installs all child skills. Each skill is saved separately in `skills.json`.
|
|
135
139
|
|
|
136
140
|
### HTTP/OSS URL Support
|
|
137
141
|
|
|
@@ -223,6 +227,21 @@ reskill publish
|
|
|
223
227
|
|
|
224
228
|
For detailed publishing guidelines, see the [CLI Specification](./docs/cli-spec.md#publish).
|
|
225
229
|
|
|
230
|
+
### Installing Private Skills
|
|
231
|
+
|
|
232
|
+
After logging in with `reskill login`, the token stored in `~/.reskillrc` is automatically used during `reskill install` to access private skills:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
# Token is automatically read from ~/.reskillrc (requires --registry to match)
|
|
236
|
+
reskill install @scope/private-skill --registry https://your-registry.com
|
|
237
|
+
|
|
238
|
+
# Or use RESKILL_TOKEN env var (works without --registry)
|
|
239
|
+
RESKILL_TOKEN=<token> reskill install @scope/private-skill
|
|
240
|
+
|
|
241
|
+
# Or pass token directly (for CI/CD)
|
|
242
|
+
reskill install @scope/private-skill --registry https://your-registry.com --token <token>
|
|
243
|
+
```
|
|
244
|
+
|
|
226
245
|
## Environment Variables
|
|
227
246
|
|
|
228
247
|
| Variable | Description | Default |
|
package/README.zh-CN.md
CHANGED
|
@@ -75,7 +75,8 @@ npx reskill@latest <command> # 或直接使用 npx
|
|
|
75
75
|
| `-f, --force` | `install` | 强制重新安装 |
|
|
76
76
|
| `-s, --skill <names...>` | `install` | 从多 skill 仓库中选择指定 skill |
|
|
77
77
|
| `--list` | `install` | 列出仓库中可用的 skills(不安装) |
|
|
78
|
-
| `-r, --registry <url>` | `install`
|
|
78
|
+
| `-r, --registry <url>` | `install`, `publish` | 覆盖 registry URL(用于 registry 安装) |
|
|
79
|
+
| `-t, --token <token>` | `install` | 认证令牌(用于 CI/CD 访问私有 skill) |
|
|
79
80
|
| `-j, --json` | `list`, `info`, `outdated`, `doctor` | JSON 格式输出 |
|
|
80
81
|
|
|
81
82
|
运行 `reskill <command> --help` 查看完整选项和详细用法。
|
|
@@ -116,7 +117,7 @@ npx reskill@latest install github:user/skill1 github:user/skill2@v1.0.0
|
|
|
116
117
|
|
|
117
118
|
### Monorepo 支持
|
|
118
119
|
|
|
119
|
-
对于包含多个技能的仓库(monorepo
|
|
120
|
+
对于包含多个技能的仓库(monorepo),可以指定技能目录的路径安装单个技能,也可以指向父目录一键安装所有技能:
|
|
120
121
|
|
|
121
122
|
```bash
|
|
122
123
|
# 简写格式带子路径
|
|
@@ -129,9 +130,12 @@ npx reskill@latest install git@gitlab.company.com:team/skills.git/backend/apis@v
|
|
|
129
130
|
|
|
130
131
|
# GitHub 网页 URL 自动提取子路径
|
|
131
132
|
npx reskill@latest install https://github.com/org/monorepo/tree/main/skills/planning
|
|
133
|
+
|
|
134
|
+
# 指向父目录 — 自动发现并安装所有子技能
|
|
135
|
+
npx reskill@latest install https://github.com/org/monorepo/tree/main/skills
|
|
132
136
|
```
|
|
133
137
|
|
|
134
|
-
|
|
138
|
+
当目标目录没有根 `SKILL.md` 但包含带有 `SKILL.md` 的子目录时,reskill 会自动发现并安装所有子技能。每个技能会分别保存到 `skills.json` 中。
|
|
135
139
|
|
|
136
140
|
### HTTP/OSS URL 支持
|
|
137
141
|
|
|
@@ -220,6 +224,21 @@ reskill publish
|
|
|
220
224
|
|
|
221
225
|
详细的发布指南请参考 [CLI 规范](./docs/cli-spec.md#publish)。
|
|
222
226
|
|
|
227
|
+
### 安装私有 Skills
|
|
228
|
+
|
|
229
|
+
通过 `reskill login` 登录后,`reskill install` 会自动使用 `~/.reskillrc` 中的 token 访问私有 skill:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
# 自动从 ~/.reskillrc 读取 token(需配合 --registry 指定 registry)
|
|
233
|
+
reskill install @scope/private-skill --registry https://your-registry.com
|
|
234
|
+
|
|
235
|
+
# 或通过 RESKILL_TOKEN 环境变量(无需 --registry)
|
|
236
|
+
RESKILL_TOKEN=<token> reskill install @scope/private-skill
|
|
237
|
+
|
|
238
|
+
# 或直接传入 token(用于 CI/CD)
|
|
239
|
+
reskill install @scope/private-skill --registry https://your-registry.com --token <token>
|
|
240
|
+
```
|
|
241
|
+
|
|
223
242
|
## 环境变量
|
|
224
243
|
|
|
225
244
|
| 变量 | 说明 | 默认值 |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAs5BpC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,SA8GvB,CAAC;AAEL,eAAe,cAAc,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -3710,13 +3710,14 @@ class RegistryResolver {
|
|
|
3710
3710
|
*
|
|
3711
3711
|
* @param ref - Skill reference (e.g., "@kanyun/planning-with-files@2.4.5" or "my-skill@latest")
|
|
3712
3712
|
* @param overrideRegistryUrl - Optional registry URL override (bypasses scope-based lookup)
|
|
3713
|
+
* @param token - Optional auth token for private skill access
|
|
3713
3714
|
* @returns Resolved skill information including downloaded tarball
|
|
3714
3715
|
*
|
|
3715
3716
|
* @example
|
|
3716
3717
|
* const result = await resolver.resolve('@kanyun/planning-with-files@2.4.5');
|
|
3717
3718
|
* console.log(result.shortName); // 'planning-with-files'
|
|
3718
3719
|
* console.log(result.version); // '2.4.5'
|
|
3719
|
-
*/ async resolve(ref, overrideRegistryUrl) {
|
|
3720
|
+
*/ async resolve(ref, overrideRegistryUrl, token) {
|
|
3720
3721
|
// 1. Parse skill identifier
|
|
3721
3722
|
const parsed = parseSkillIdentifier(ref);
|
|
3722
3723
|
const shortName = getShortName(parsed.fullName);
|
|
@@ -3724,7 +3725,8 @@ class RegistryResolver {
|
|
|
3724
3725
|
const registryUrl = overrideRegistryUrl || getRegistryUrl(parsed.scope);
|
|
3725
3726
|
// 3. Create client and resolve version
|
|
3726
3727
|
const client = new RegistryClient({
|
|
3727
|
-
registry: registryUrl
|
|
3728
|
+
registry: registryUrl,
|
|
3729
|
+
token
|
|
3728
3730
|
});
|
|
3729
3731
|
const version = await client.resolveVersion(parsed.fullName, parsed.version);
|
|
3730
3732
|
// 4. Download tarball
|
|
@@ -4134,6 +4136,9 @@ class RegistryResolver {
|
|
|
4134
4136
|
const locked = this.lockManager.get(parsed.name);
|
|
4135
4137
|
if (locked?.registry) return locked.registry;
|
|
4136
4138
|
// Slow path: probe configured registries (skip git hosts)
|
|
4139
|
+
// Note: token is intentionally NOT passed during probe to avoid leaking
|
|
4140
|
+
// credentials to unrelated registries. Token is only used after the
|
|
4141
|
+
// target registry is determined.
|
|
4137
4142
|
const registries = this.config.getRegistries();
|
|
4138
4143
|
for (const [name, url] of Object.entries(registries))if (!this.isGitHostRegistry(name, url)) try {
|
|
4139
4144
|
const client = new RegistryClient({
|
|
@@ -4333,6 +4338,54 @@ class RegistryResolver {
|
|
|
4333
4338
|
// Multi-Agent installation methods
|
|
4334
4339
|
// ============================================================================
|
|
4335
4340
|
/**
|
|
4341
|
+
* Detect whether a ref points to a single skill or a multi-skill directory.
|
|
4342
|
+
*
|
|
4343
|
+
* Returns `{ type: 'single' }` when the cached root contains a SKILL.md (or
|
|
4344
|
+
* when the source is registry/HTTP — those are always single-skill).
|
|
4345
|
+
* Returns `{ type: 'multi', skills }` when the root has **no** SKILL.md but
|
|
4346
|
+
* `discoverSkillsInDir()` finds child skills underneath.
|
|
4347
|
+
*
|
|
4348
|
+
* The method caches the repo as a side-effect so that the subsequent
|
|
4349
|
+
* `installToAgents` / `installSkillsFromRepo` call hits the cache.
|
|
4350
|
+
*/ async detectSkillsInRef(ref) {
|
|
4351
|
+
// Only Git refs can be multi-skill directories
|
|
4352
|
+
if (this.isRegistrySource(ref) || this.isHttpSource(ref)) return {
|
|
4353
|
+
type: 'single'
|
|
4354
|
+
};
|
|
4355
|
+
const resolved = await this.resolver.resolve(ref);
|
|
4356
|
+
const { parsed } = resolved;
|
|
4357
|
+
const gitRef = resolved.ref;
|
|
4358
|
+
// Ensure the repo is cached (result unused — we only need the side-effect)
|
|
4359
|
+
if (!await this.cache.get(parsed, gitRef)) await this.cache.cache(resolved.repoUrl, parsed, gitRef, gitRef);
|
|
4360
|
+
const cachePath = this.cache.getCachePath(parsed, gitRef);
|
|
4361
|
+
// When parsed.skillName is set (ref has #fragment), resolve to the
|
|
4362
|
+
// specific skill subdirectory so we check the right SKILL.md.
|
|
4363
|
+
const sourcePath = this.resolveSourcePath(cachePath, parsed);
|
|
4364
|
+
const metadata = this.getSkillMetadataFromDir(sourcePath);
|
|
4365
|
+
if (metadata) return {
|
|
4366
|
+
type: 'single'
|
|
4367
|
+
};
|
|
4368
|
+
// No SKILL.md at root — check for child skills.
|
|
4369
|
+
// cachePath is correct here (not sourcePath) for two reasons:
|
|
4370
|
+
// 1. When parsed.skillName is set, resolveSourcePath() either returns a
|
|
4371
|
+
// subdirectory (→ metadata found → already returned 'single' above) or
|
|
4372
|
+
// throws (skill not found). So we never reach this line with
|
|
4373
|
+
// sourcePath ≠ cachePath.
|
|
4374
|
+
// 2. When parsed.subPath is set, CacheManager.cache() already copies only
|
|
4375
|
+
// the subPath subdirectory into cachePath, so discovery is scoped to
|
|
4376
|
+
// the intended directory automatically.
|
|
4377
|
+
const discovered = discoverSkillsInDir(cachePath);
|
|
4378
|
+
if (discovered.length > 0) return {
|
|
4379
|
+
type: 'multi',
|
|
4380
|
+
skills: discovered
|
|
4381
|
+
};
|
|
4382
|
+
// No skills found at all. Return 'single' so the caller proceeds to
|
|
4383
|
+
// installToAgents, which will produce a clear error ("no SKILL.md found").
|
|
4384
|
+
return {
|
|
4385
|
+
type: 'single'
|
|
4386
|
+
};
|
|
4387
|
+
}
|
|
4388
|
+
/**
|
|
4336
4389
|
* Install skill to multiple agents
|
|
4337
4390
|
*
|
|
4338
4391
|
* @param ref - Skill reference (e.g., github:user/repo@v1.0.0 or HTTP URL)
|
|
@@ -4601,7 +4654,8 @@ class RegistryResolver {
|
|
|
4601
4654
|
const parsed = parseSkillIdentifier(ref);
|
|
4602
4655
|
const registryUrl = await this.resolveRegistryUrl(ref, options.registry);
|
|
4603
4656
|
const client = new RegistryClient({
|
|
4604
|
-
registry: registryUrl
|
|
4657
|
+
registry: registryUrl,
|
|
4658
|
+
token: options.token
|
|
4605
4659
|
});
|
|
4606
4660
|
// Query skill info to determine source_type
|
|
4607
4661
|
let skillInfo;
|
|
@@ -4622,7 +4676,7 @@ class RegistryResolver {
|
|
|
4622
4676
|
});
|
|
4623
4677
|
// 1. Resolve registry skill (pass pre-resolved registryUrl)
|
|
4624
4678
|
logger_logger["package"](`Resolving ${ref} from registry...`);
|
|
4625
|
-
const resolved = await this.registryResolver.resolve(ref, registryUrl);
|
|
4679
|
+
const resolved = await this.registryResolver.resolve(ref, registryUrl, options.token);
|
|
4626
4680
|
const { shortName, version, registryUrl: resolvedRegistryUrl, tarball, parsed: resolvedParsed } = resolved;
|
|
4627
4681
|
// 2. Check if already installed (skip if --force)
|
|
4628
4682
|
const skillPath = this.getSkillPath(shortName);
|
|
@@ -4832,7 +4886,8 @@ class RegistryResolver {
|
|
|
4832
4886
|
const version = 'latest';
|
|
4833
4887
|
// Download tarball via RegistryClient (handles auth + 302 redirect to signed URL)
|
|
4834
4888
|
const client = new RegistryClient({
|
|
4835
|
-
registry: registryUrl
|
|
4889
|
+
registry: registryUrl,
|
|
4890
|
+
token: options.token
|
|
4836
4891
|
});
|
|
4837
4892
|
const { tarball } = await client.downloadSkill(parsed.fullName, version);
|
|
4838
4893
|
logger_logger["package"](`Installing ${shortName} from ${registryUrl} to ${targetAgents.length} agent(s)...`);
|
|
@@ -6136,6 +6191,133 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
6136
6191
|
// Display summary (use options.installDir directly since we just set it)
|
|
6137
6192
|
displayConfigSummary(options.installDir);
|
|
6138
6193
|
});
|
|
6194
|
+
/**
|
|
6195
|
+
* AuthManager - Handle authentication token management
|
|
6196
|
+
*
|
|
6197
|
+
* Manages tokens for registry authentication.
|
|
6198
|
+
* Tokens are stored in ~/.reskillrc or via RESKILL_TOKEN environment variable.
|
|
6199
|
+
*/ // ============================================================================
|
|
6200
|
+
// Constants
|
|
6201
|
+
// ============================================================================
|
|
6202
|
+
const CONFIG_FILE_NAME = '.reskillrc';
|
|
6203
|
+
// ============================================================================
|
|
6204
|
+
// AuthManager Class
|
|
6205
|
+
// ============================================================================
|
|
6206
|
+
class AuthManager {
|
|
6207
|
+
configPath;
|
|
6208
|
+
constructor(){
|
|
6209
|
+
const home = process.env.HOME || process.env.USERPROFILE || '';
|
|
6210
|
+
this.configPath = __WEBPACK_EXTERNAL_MODULE_node_path__.join(home, CONFIG_FILE_NAME);
|
|
6211
|
+
}
|
|
6212
|
+
/**
|
|
6213
|
+
* Get the default registry URL from environment variable
|
|
6214
|
+
*
|
|
6215
|
+
* Returns undefined if no registry is configured - there is no hardcoded default
|
|
6216
|
+
* to prevent accidental publishing to unintended registries.
|
|
6217
|
+
*/ getDefaultRegistry() {
|
|
6218
|
+
return process.env.RESKILL_REGISTRY;
|
|
6219
|
+
}
|
|
6220
|
+
/**
|
|
6221
|
+
* Get path to config file
|
|
6222
|
+
*/ getConfigPath() {
|
|
6223
|
+
return this.configPath;
|
|
6224
|
+
}
|
|
6225
|
+
/**
|
|
6226
|
+
* Get token for a registry
|
|
6227
|
+
*
|
|
6228
|
+
* Priority:
|
|
6229
|
+
* 1. RESKILL_TOKEN environment variable
|
|
6230
|
+
* 2. Token from ~/.reskillrc for the specified registry
|
|
6231
|
+
*/ getToken(registry) {
|
|
6232
|
+
// Check environment variable first
|
|
6233
|
+
const envToken = process.env.RESKILL_TOKEN;
|
|
6234
|
+
if (envToken) return envToken;
|
|
6235
|
+
// Read from config file
|
|
6236
|
+
const config = this.readConfig();
|
|
6237
|
+
if (!config?.registries) return;
|
|
6238
|
+
const targetRegistry = registry || this.getDefaultRegistry();
|
|
6239
|
+
if (!targetRegistry) return;
|
|
6240
|
+
const auth = config.registries[targetRegistry];
|
|
6241
|
+
return auth?.token;
|
|
6242
|
+
}
|
|
6243
|
+
/**
|
|
6244
|
+
* Check if token exists for a registry
|
|
6245
|
+
*/ hasToken(registry) {
|
|
6246
|
+
return void 0 !== this.getToken(registry);
|
|
6247
|
+
}
|
|
6248
|
+
/**
|
|
6249
|
+
* Get email for a registry
|
|
6250
|
+
*/ getEmail(registry) {
|
|
6251
|
+
const config = this.readConfig();
|
|
6252
|
+
if (!config?.registries) return;
|
|
6253
|
+
const targetRegistry = registry || this.getDefaultRegistry();
|
|
6254
|
+
if (!targetRegistry) return;
|
|
6255
|
+
const auth = config.registries[targetRegistry];
|
|
6256
|
+
return auth?.email;
|
|
6257
|
+
}
|
|
6258
|
+
/**
|
|
6259
|
+
* Get handle for a registry
|
|
6260
|
+
*/ getHandle(registry) {
|
|
6261
|
+
const config = this.readConfig();
|
|
6262
|
+
if (!config?.registries) return;
|
|
6263
|
+
const targetRegistry = registry || this.getDefaultRegistry();
|
|
6264
|
+
if (!targetRegistry) return;
|
|
6265
|
+
const auth = config.registries[targetRegistry];
|
|
6266
|
+
return auth?.handle;
|
|
6267
|
+
}
|
|
6268
|
+
/**
|
|
6269
|
+
* Set token for a registry
|
|
6270
|
+
*
|
|
6271
|
+
* Note: When no registry is specified and RESKILL_REGISTRY env var is not set,
|
|
6272
|
+
* this method will throw an error. The calling code should ensure a registry
|
|
6273
|
+
* is always provided (either explicitly or via environment variable).
|
|
6274
|
+
*/ setToken(token, registry, email, handle) {
|
|
6275
|
+
const config = this.readConfig() || {};
|
|
6276
|
+
const targetRegistry = registry || this.getDefaultRegistry();
|
|
6277
|
+
if (!targetRegistry) throw new Error('No registry specified. Set RESKILL_REGISTRY environment variable or provide registry explicitly.');
|
|
6278
|
+
if (!config.registries) config.registries = {};
|
|
6279
|
+
config.registries[targetRegistry] = {
|
|
6280
|
+
token,
|
|
6281
|
+
...email && {
|
|
6282
|
+
email
|
|
6283
|
+
},
|
|
6284
|
+
...handle && {
|
|
6285
|
+
handle
|
|
6286
|
+
}
|
|
6287
|
+
};
|
|
6288
|
+
this.writeConfig(config);
|
|
6289
|
+
}
|
|
6290
|
+
/**
|
|
6291
|
+
* Remove token for a registry
|
|
6292
|
+
*/ removeToken(registry) {
|
|
6293
|
+
const config = this.readConfig();
|
|
6294
|
+
if (!config?.registries) return;
|
|
6295
|
+
const targetRegistry = registry || this.getDefaultRegistry();
|
|
6296
|
+
if (!targetRegistry) return;
|
|
6297
|
+
delete config.registries[targetRegistry];
|
|
6298
|
+
this.writeConfig(config);
|
|
6299
|
+
}
|
|
6300
|
+
/**
|
|
6301
|
+
* Read config file
|
|
6302
|
+
*/ readConfig() {
|
|
6303
|
+
try {
|
|
6304
|
+
if (!external_node_fs_.existsSync(this.configPath)) return null;
|
|
6305
|
+
const content = external_node_fs_.readFileSync(this.configPath, 'utf-8');
|
|
6306
|
+
if (!content.trim()) return null;
|
|
6307
|
+
return JSON.parse(content);
|
|
6308
|
+
} catch {
|
|
6309
|
+
return null;
|
|
6310
|
+
}
|
|
6311
|
+
}
|
|
6312
|
+
/**
|
|
6313
|
+
* Write config file
|
|
6314
|
+
*/ writeConfig(config) {
|
|
6315
|
+
const content = JSON.stringify(config, null, 2);
|
|
6316
|
+
external_node_fs_.writeFileSync(this.configPath, content, {
|
|
6317
|
+
mode: 384
|
|
6318
|
+
});
|
|
6319
|
+
}
|
|
6320
|
+
}
|
|
6139
6321
|
// ============================================================================
|
|
6140
6322
|
// Utility Functions
|
|
6141
6323
|
// ============================================================================
|
|
@@ -6381,7 +6563,8 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
6381
6563
|
force: options.force,
|
|
6382
6564
|
save: false,
|
|
6383
6565
|
mode: installMode,
|
|
6384
|
-
registry: options.registry
|
|
6566
|
+
registry: options.registry,
|
|
6567
|
+
token: options.token
|
|
6385
6568
|
});
|
|
6386
6569
|
const successCount = Array.from(results.values()).filter((r)=>r.success).length;
|
|
6387
6570
|
totalInstalled += successCount;
|
|
@@ -6405,6 +6588,18 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
6405
6588
|
const { skills, options, configLoader, skipConfirm } = ctx;
|
|
6406
6589
|
const skill = skills[0];
|
|
6407
6590
|
const cwd = process.cwd();
|
|
6591
|
+
const skillManager = new SkillManager(void 0, {
|
|
6592
|
+
global: installGlobally
|
|
6593
|
+
});
|
|
6594
|
+
// Detect whether the ref points to a multi-skill directory
|
|
6595
|
+
spinner.start('Resolving skill...');
|
|
6596
|
+
const detection = await skillManager.detectSkillsInRef(skill);
|
|
6597
|
+
spinner.stop('Resolved');
|
|
6598
|
+
if ('multi' === detection.type) {
|
|
6599
|
+
await installAutoDetectedMultiSkill(skill, detection.skills, ctx, skillManager, targetAgents, installGlobally, installMode, spinner);
|
|
6600
|
+
return;
|
|
6601
|
+
}
|
|
6602
|
+
// --- Single skill path (existing behaviour) ---
|
|
6408
6603
|
// Show installation summary
|
|
6409
6604
|
const summaryLines = [
|
|
6410
6605
|
__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skill),
|
|
@@ -6424,14 +6619,12 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
6424
6619
|
}
|
|
6425
6620
|
// Execute installation
|
|
6426
6621
|
spinner.start(`Installing ${skill}...`);
|
|
6427
|
-
const skillManager = new SkillManager(void 0, {
|
|
6428
|
-
global: installGlobally
|
|
6429
|
-
});
|
|
6430
6622
|
const { skill: installed, results } = await skillManager.installToAgents(skill, targetAgents, {
|
|
6431
6623
|
force: options.force,
|
|
6432
6624
|
save: false !== options.save && !installGlobally,
|
|
6433
6625
|
mode: installMode,
|
|
6434
|
-
registry: options.registry
|
|
6626
|
+
registry: options.registry,
|
|
6627
|
+
token: options.token
|
|
6435
6628
|
});
|
|
6436
6629
|
spinner.stop('Installation complete');
|
|
6437
6630
|
// Process and display results
|
|
@@ -6447,6 +6640,67 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
6447
6640
|
});
|
|
6448
6641
|
}
|
|
6449
6642
|
}
|
|
6643
|
+
/**
|
|
6644
|
+
* Handle auto-detected multi-skill directory: show summary, confirm, install all.
|
|
6645
|
+
*
|
|
6646
|
+
* Called when `detectSkillsInRef` discovers that the ref points to a parent
|
|
6647
|
+
* directory (no SKILL.md at root) containing multiple child skills.
|
|
6648
|
+
*/ async function installAutoDetectedMultiSkill(ref, discoveredSkills, ctx, skillManager, targetAgents, installGlobally, installMode, spinner) {
|
|
6649
|
+
const { options, configLoader, skipConfirm } = ctx;
|
|
6650
|
+
const skillNames = discoveredSkills.map((s)=>s.name);
|
|
6651
|
+
// Show discovered skills
|
|
6652
|
+
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.step(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].bold(`Found ${discoveredSkills.length} skill(s)`));
|
|
6653
|
+
for (const s of discoveredSkills)__WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.message(` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(s.name)}${s.description ? ` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim(s.description)}` : ''}`);
|
|
6654
|
+
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.message('');
|
|
6655
|
+
// Show installation summary
|
|
6656
|
+
const summaryLines = [
|
|
6657
|
+
__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(ref),
|
|
6658
|
+
` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('→')} ${formatAgentNames(targetAgents)}`,
|
|
6659
|
+
` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('Skills:')} ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(skillNames.join(', '))}`,
|
|
6660
|
+
` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('Scope:')} ${installGlobally ? 'Global' : 'Project'}${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim(', Mode:')} ${installMode}`
|
|
6661
|
+
];
|
|
6662
|
+
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.note(summaryLines.join('\n'), 'Multi-Skill Install');
|
|
6663
|
+
// Confirm
|
|
6664
|
+
if (!skipConfirm) {
|
|
6665
|
+
const confirmed = await __WEBPACK_EXTERNAL_MODULE__clack_prompts__.confirm({
|
|
6666
|
+
message: 'Install all discovered skills?'
|
|
6667
|
+
});
|
|
6668
|
+
if (__WEBPACK_EXTERNAL_MODULE__clack_prompts__.isCancel(confirmed) || !confirmed) {
|
|
6669
|
+
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.cancel('Installation cancelled');
|
|
6670
|
+
process.exit(0);
|
|
6671
|
+
}
|
|
6672
|
+
}
|
|
6673
|
+
// Install all discovered skills (empty skillNames = install all)
|
|
6674
|
+
spinner.start('Installing skills...');
|
|
6675
|
+
const result = await skillManager.installSkillsFromRepo(ref, [], targetAgents, {
|
|
6676
|
+
force: options.force,
|
|
6677
|
+
save: false !== options.save && !installGlobally,
|
|
6678
|
+
mode: installMode,
|
|
6679
|
+
registry: options.registry,
|
|
6680
|
+
token: options.token
|
|
6681
|
+
});
|
|
6682
|
+
spinner.stop('Installation complete');
|
|
6683
|
+
if (result.listOnly) return;
|
|
6684
|
+
const { installed, skipped } = result;
|
|
6685
|
+
// Display results
|
|
6686
|
+
if (0 === installed.length && skipped.length > 0) {
|
|
6687
|
+
const skipLines = skipped.map((s)=>` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('–')} ${s.name}: ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim(s.reason)}`);
|
|
6688
|
+
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.note(skipLines.join('\n'), __WEBPACK_EXTERNAL_MODULE_chalk__["default"].yellow('All skills were already installed'));
|
|
6689
|
+
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.info('Use --force to reinstall.');
|
|
6690
|
+
return;
|
|
6691
|
+
}
|
|
6692
|
+
const resultLines = installed.map((r)=>` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].green('✓')} ${r.skill.name}@${r.skill.version}`);
|
|
6693
|
+
if (skipped.length > 0) for (const s of skipped)resultLines.push(` ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim('–')} ${s.name}: ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].dim(s.reason)}`);
|
|
6694
|
+
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.note(resultLines.join('\n'), __WEBPACK_EXTERNAL_MODULE_chalk__["default"].green(`Installed ${installed.length} skill(s)`));
|
|
6695
|
+
// Save installation defaults
|
|
6696
|
+
if (!installGlobally && installed.length > 0 && configLoader.exists()) {
|
|
6697
|
+
configLoader.reload();
|
|
6698
|
+
configLoader.updateDefaults({
|
|
6699
|
+
targetAgents,
|
|
6700
|
+
installMode
|
|
6701
|
+
});
|
|
6702
|
+
}
|
|
6703
|
+
}
|
|
6450
6704
|
/**
|
|
6451
6705
|
* Multi-skill path: list or install selected skills from a single repo (--skill / --list)
|
|
6452
6706
|
*/ async function installMultiSkillFromRepo(ref, skillNames, listOnly, ctx, targetAgents, installGlobally, installMode, spinner) {
|
|
@@ -6495,7 +6749,8 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
6495
6749
|
force: ctx.options.force,
|
|
6496
6750
|
save: false !== ctx.options.save && !installGlobally,
|
|
6497
6751
|
mode: installMode,
|
|
6498
|
-
registry: ctx.options.registry
|
|
6752
|
+
registry: ctx.options.registry,
|
|
6753
|
+
token: ctx.options.token
|
|
6499
6754
|
});
|
|
6500
6755
|
spinner.stop('Installation complete');
|
|
6501
6756
|
// listOnly is always false here (the listOnly path returns early above)
|
|
@@ -6555,6 +6810,7 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
6555
6810
|
force: options.force,
|
|
6556
6811
|
save: false !== options.save && !installGlobally,
|
|
6557
6812
|
registry: options.registry,
|
|
6813
|
+
token: options.token,
|
|
6558
6814
|
mode: installMode
|
|
6559
6815
|
});
|
|
6560
6816
|
const successful = Array.from(results.values()).filter((r)=>r.success);
|
|
@@ -6681,12 +6937,18 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
6681
6937
|
* Behavior:
|
|
6682
6938
|
* - Single skill install: Prompts for agents/mode (stored config as defaults)
|
|
6683
6939
|
* - Reinstall all (no args): Uses stored config directly, no confirmation
|
|
6684
|
-
*/ const installCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('install').alias('i').description('Install one or more skills, or all skills from skills.json').argument('[skills...]', 'Skill references (e.g., github:user/skill@v1.0.0 or git@github.com:user/repo.git)').option('-f, --force', 'Force reinstall even if already installed').option('-g, --global', 'Install globally to user home directory').option('--no-save', 'Do not save to skills.json').option('-a, --agent <agents...>', 'Specify target agents (e.g., cursor, claude-code)').option('--mode <mode>', 'Installation mode: symlink or copy').option('-y, --yes', 'Skip confirmation prompts').option('--all', 'Install to all agents (implies -y -g)').option('-s, --skill <names...>', 'Select specific skill(s) by name from a multi-skill repository').option('--list', 'List available skills in the repository without installing').option('-r, --registry <url>', 'Registry URL override for registry-based installs').action(async (skills, options)=>{
|
|
6940
|
+
*/ const installCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('install').alias('i').description('Install one or more skills, or all skills from skills.json').argument('[skills...]', 'Skill references (e.g., github:user/skill@v1.0.0 or git@github.com:user/repo.git)').option('-f, --force', 'Force reinstall even if already installed').option('-g, --global', 'Install globally to user home directory').option('--no-save', 'Do not save to skills.json').option('-a, --agent <agents...>', 'Specify target agents (e.g., cursor, claude-code)').option('--mode <mode>', 'Installation mode: symlink or copy').option('-y, --yes', 'Skip confirmation prompts').option('--all', 'Install to all agents (implies -y -g)').option('-s, --skill <names...>', 'Select specific skill(s) by name from a multi-skill repository').option('--list', 'List available skills in the repository without installing').option('-r, --registry <url>', 'Registry URL override for registry-based installs').option('-t, --token <token>', 'Auth token for registry API requests (for CI/CD)').action(async (skills, options)=>{
|
|
6685
6941
|
// Handle --all flag implications
|
|
6686
6942
|
if (options.all) {
|
|
6687
6943
|
options.yes = true;
|
|
6688
6944
|
options.global = true;
|
|
6689
6945
|
}
|
|
6946
|
+
// Resolve auth token: --token flag > RESKILL_TOKEN env > ~/.reskillrc
|
|
6947
|
+
if (!options.token) {
|
|
6948
|
+
const authManager = new AuthManager();
|
|
6949
|
+
const token = authManager.getToken(options.registry);
|
|
6950
|
+
if (token) options.token = token;
|
|
6951
|
+
}
|
|
6690
6952
|
// Create execution context
|
|
6691
6953
|
const ctx = createInstallContext(skills, options);
|
|
6692
6954
|
// Print banner
|
|
@@ -6769,133 +7031,6 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
6769
7031
|
logger_logger.newline();
|
|
6770
7032
|
logger_logger.log(`Total: ${skills.length} skill(s)`);
|
|
6771
7033
|
});
|
|
6772
|
-
/**
|
|
6773
|
-
* AuthManager - Handle authentication token management
|
|
6774
|
-
*
|
|
6775
|
-
* Manages tokens for registry authentication.
|
|
6776
|
-
* Tokens are stored in ~/.reskillrc or via RESKILL_TOKEN environment variable.
|
|
6777
|
-
*/ // ============================================================================
|
|
6778
|
-
// Constants
|
|
6779
|
-
// ============================================================================
|
|
6780
|
-
const CONFIG_FILE_NAME = '.reskillrc';
|
|
6781
|
-
// ============================================================================
|
|
6782
|
-
// AuthManager Class
|
|
6783
|
-
// ============================================================================
|
|
6784
|
-
class AuthManager {
|
|
6785
|
-
configPath;
|
|
6786
|
-
constructor(){
|
|
6787
|
-
const home = process.env.HOME || process.env.USERPROFILE || '';
|
|
6788
|
-
this.configPath = __WEBPACK_EXTERNAL_MODULE_node_path__.join(home, CONFIG_FILE_NAME);
|
|
6789
|
-
}
|
|
6790
|
-
/**
|
|
6791
|
-
* Get the default registry URL from environment variable
|
|
6792
|
-
*
|
|
6793
|
-
* Returns undefined if no registry is configured - there is no hardcoded default
|
|
6794
|
-
* to prevent accidental publishing to unintended registries.
|
|
6795
|
-
*/ getDefaultRegistry() {
|
|
6796
|
-
return process.env.RESKILL_REGISTRY;
|
|
6797
|
-
}
|
|
6798
|
-
/**
|
|
6799
|
-
* Get path to config file
|
|
6800
|
-
*/ getConfigPath() {
|
|
6801
|
-
return this.configPath;
|
|
6802
|
-
}
|
|
6803
|
-
/**
|
|
6804
|
-
* Get token for a registry
|
|
6805
|
-
*
|
|
6806
|
-
* Priority:
|
|
6807
|
-
* 1. RESKILL_TOKEN environment variable
|
|
6808
|
-
* 2. Token from ~/.reskillrc for the specified registry
|
|
6809
|
-
*/ getToken(registry) {
|
|
6810
|
-
// Check environment variable first
|
|
6811
|
-
const envToken = process.env.RESKILL_TOKEN;
|
|
6812
|
-
if (envToken) return envToken;
|
|
6813
|
-
// Read from config file
|
|
6814
|
-
const config = this.readConfig();
|
|
6815
|
-
if (!config?.registries) return;
|
|
6816
|
-
const targetRegistry = registry || this.getDefaultRegistry();
|
|
6817
|
-
if (!targetRegistry) return;
|
|
6818
|
-
const auth = config.registries[targetRegistry];
|
|
6819
|
-
return auth?.token;
|
|
6820
|
-
}
|
|
6821
|
-
/**
|
|
6822
|
-
* Check if token exists for a registry
|
|
6823
|
-
*/ hasToken(registry) {
|
|
6824
|
-
return void 0 !== this.getToken(registry);
|
|
6825
|
-
}
|
|
6826
|
-
/**
|
|
6827
|
-
* Get email for a registry
|
|
6828
|
-
*/ getEmail(registry) {
|
|
6829
|
-
const config = this.readConfig();
|
|
6830
|
-
if (!config?.registries) return;
|
|
6831
|
-
const targetRegistry = registry || this.getDefaultRegistry();
|
|
6832
|
-
if (!targetRegistry) return;
|
|
6833
|
-
const auth = config.registries[targetRegistry];
|
|
6834
|
-
return auth?.email;
|
|
6835
|
-
}
|
|
6836
|
-
/**
|
|
6837
|
-
* Get handle for a registry
|
|
6838
|
-
*/ getHandle(registry) {
|
|
6839
|
-
const config = this.readConfig();
|
|
6840
|
-
if (!config?.registries) return;
|
|
6841
|
-
const targetRegistry = registry || this.getDefaultRegistry();
|
|
6842
|
-
if (!targetRegistry) return;
|
|
6843
|
-
const auth = config.registries[targetRegistry];
|
|
6844
|
-
return auth?.handle;
|
|
6845
|
-
}
|
|
6846
|
-
/**
|
|
6847
|
-
* Set token for a registry
|
|
6848
|
-
*
|
|
6849
|
-
* Note: When no registry is specified and RESKILL_REGISTRY env var is not set,
|
|
6850
|
-
* this method will throw an error. The calling code should ensure a registry
|
|
6851
|
-
* is always provided (either explicitly or via environment variable).
|
|
6852
|
-
*/ setToken(token, registry, email, handle) {
|
|
6853
|
-
const config = this.readConfig() || {};
|
|
6854
|
-
const targetRegistry = registry || this.getDefaultRegistry();
|
|
6855
|
-
if (!targetRegistry) throw new Error('No registry specified. Set RESKILL_REGISTRY environment variable or provide registry explicitly.');
|
|
6856
|
-
if (!config.registries) config.registries = {};
|
|
6857
|
-
config.registries[targetRegistry] = {
|
|
6858
|
-
token,
|
|
6859
|
-
...email && {
|
|
6860
|
-
email
|
|
6861
|
-
},
|
|
6862
|
-
...handle && {
|
|
6863
|
-
handle
|
|
6864
|
-
}
|
|
6865
|
-
};
|
|
6866
|
-
this.writeConfig(config);
|
|
6867
|
-
}
|
|
6868
|
-
/**
|
|
6869
|
-
* Remove token for a registry
|
|
6870
|
-
*/ removeToken(registry) {
|
|
6871
|
-
const config = this.readConfig();
|
|
6872
|
-
if (!config?.registries) return;
|
|
6873
|
-
const targetRegistry = registry || this.getDefaultRegistry();
|
|
6874
|
-
if (!targetRegistry) return;
|
|
6875
|
-
delete config.registries[targetRegistry];
|
|
6876
|
-
this.writeConfig(config);
|
|
6877
|
-
}
|
|
6878
|
-
/**
|
|
6879
|
-
* Read config file
|
|
6880
|
-
*/ readConfig() {
|
|
6881
|
-
try {
|
|
6882
|
-
if (!external_node_fs_.existsSync(this.configPath)) return null;
|
|
6883
|
-
const content = external_node_fs_.readFileSync(this.configPath, 'utf-8');
|
|
6884
|
-
if (!content.trim()) return null;
|
|
6885
|
-
return JSON.parse(content);
|
|
6886
|
-
} catch {
|
|
6887
|
-
return null;
|
|
6888
|
-
}
|
|
6889
|
-
}
|
|
6890
|
-
/**
|
|
6891
|
-
* Write config file
|
|
6892
|
-
*/ writeConfig(config) {
|
|
6893
|
-
const content = JSON.stringify(config, null, 2);
|
|
6894
|
-
external_node_fs_.writeFileSync(this.configPath, content, {
|
|
6895
|
-
mode: 384
|
|
6896
|
-
});
|
|
6897
|
-
}
|
|
6898
|
-
}
|
|
6899
7034
|
/**
|
|
6900
7035
|
* login command - Authenticate with a reskill registry
|
|
6901
7036
|
*
|
|
@@ -43,6 +43,7 @@ export declare class RegistryResolver {
|
|
|
43
43
|
*
|
|
44
44
|
* @param ref - Skill reference (e.g., "@kanyun/planning-with-files@2.4.5" or "my-skill@latest")
|
|
45
45
|
* @param overrideRegistryUrl - Optional registry URL override (bypasses scope-based lookup)
|
|
46
|
+
* @param token - Optional auth token for private skill access
|
|
46
47
|
* @returns Resolved skill information including downloaded tarball
|
|
47
48
|
*
|
|
48
49
|
* @example
|
|
@@ -50,7 +51,7 @@ export declare class RegistryResolver {
|
|
|
50
51
|
* console.log(result.shortName); // 'planning-with-files'
|
|
51
52
|
* console.log(result.version); // '2.4.5'
|
|
52
53
|
*/
|
|
53
|
-
resolve(ref: string, overrideRegistryUrl?: string): Promise<RegistryResolveResult>;
|
|
54
|
+
resolve(ref: string, overrideRegistryUrl?: string, token?: string): Promise<RegistryResolveResult>;
|
|
54
55
|
/**
|
|
55
56
|
* Extract tarball to a target directory
|
|
56
57
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-resolver.d.ts","sourceRoot":"","sources":["../../src/core/registry-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,4BAA4B,CAAC;AAQpC,MAAM,WAAW,qBAAqB;IACpC,8BAA8B;IAC9B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,qBAAa,gBAAgB;IAC3B;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAwC1C
|
|
1
|
+
{"version":3,"file":"registry-resolver.d.ts","sourceRoot":"","sources":["../../src/core/registry-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,4BAA4B,CAAC;AAQpC,MAAM,WAAW,qBAAqB;IACpC,8BAA8B;IAC9B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,qBAAa,gBAAgB;IAC3B;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAwC1C;;;;;;;;;;;;OAYG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA+BxG;;;;;;OAMG;IACG,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAWjE"}
|
|
@@ -180,6 +180,23 @@ export declare class SkillManager {
|
|
|
180
180
|
latest: string;
|
|
181
181
|
updateAvailable: boolean;
|
|
182
182
|
}>>;
|
|
183
|
+
/**
|
|
184
|
+
* Detect whether a ref points to a single skill or a multi-skill directory.
|
|
185
|
+
*
|
|
186
|
+
* Returns `{ type: 'single' }` when the cached root contains a SKILL.md (or
|
|
187
|
+
* when the source is registry/HTTP — those are always single-skill).
|
|
188
|
+
* Returns `{ type: 'multi', skills }` when the root has **no** SKILL.md but
|
|
189
|
+
* `discoverSkillsInDir()` finds child skills underneath.
|
|
190
|
+
*
|
|
191
|
+
* The method caches the repo as a side-effect so that the subsequent
|
|
192
|
+
* `installToAgents` / `installSkillsFromRepo` call hits the cache.
|
|
193
|
+
*/
|
|
194
|
+
detectSkillsInRef(ref: string): Promise<{
|
|
195
|
+
type: 'single';
|
|
196
|
+
} | {
|
|
197
|
+
type: 'multi';
|
|
198
|
+
skills: ParsedSkillWithPath[];
|
|
199
|
+
}>;
|
|
183
200
|
/**
|
|
184
201
|
* Install skill to multiple agents
|
|
185
202
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-manager.d.ts","sourceRoot":"","sources":["../../src/core/skill-manager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EAIf,MAAM,mBAAmB,CAAC;AAmB3B,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAGL,KAAK,mBAAmB,EA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EG;YACW,uBAAuB;IAgGrC;;;;;;;OAOG;YACW,2BAA2B;IA6KzC;;;;;;;;OAQG;YACW,uBAAuB;IA2ErC;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,0BAA0B;IAyBlC;;;OAGG;IACH,OAAO,CAAC,cAAc;IAQtB;;;;;OAKG;YACW,wBAAwB;IAwFtC;;;;;;;OAOG;IACG,sBAAsB,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAWpD;;OAEG;IACH,qBAAqB,IAAI,WAAW;IAQpC;;OAEG;IACH,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG;QAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE;IAenF;;OAEG;IACH,gBAAgB,IAAI,SAAS,EAAE;IAI/B;;OAEG;IACH,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC;CAyBtF;AAED,eAAe,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3705,13 +3705,14 @@ class RegistryResolver {
|
|
|
3705
3705
|
*
|
|
3706
3706
|
* @param ref - Skill reference (e.g., "@kanyun/planning-with-files@2.4.5" or "my-skill@latest")
|
|
3707
3707
|
* @param overrideRegistryUrl - Optional registry URL override (bypasses scope-based lookup)
|
|
3708
|
+
* @param token - Optional auth token for private skill access
|
|
3708
3709
|
* @returns Resolved skill information including downloaded tarball
|
|
3709
3710
|
*
|
|
3710
3711
|
* @example
|
|
3711
3712
|
* const result = await resolver.resolve('@kanyun/planning-with-files@2.4.5');
|
|
3712
3713
|
* console.log(result.shortName); // 'planning-with-files'
|
|
3713
3714
|
* console.log(result.version); // '2.4.5'
|
|
3714
|
-
*/ async resolve(ref, overrideRegistryUrl) {
|
|
3715
|
+
*/ async resolve(ref, overrideRegistryUrl, token) {
|
|
3715
3716
|
// 1. Parse skill identifier
|
|
3716
3717
|
const parsed = parseSkillIdentifier(ref);
|
|
3717
3718
|
const shortName = getShortName(parsed.fullName);
|
|
@@ -3719,7 +3720,8 @@ class RegistryResolver {
|
|
|
3719
3720
|
const registryUrl = overrideRegistryUrl || getRegistryUrl(parsed.scope);
|
|
3720
3721
|
// 3. Create client and resolve version
|
|
3721
3722
|
const client = new RegistryClient({
|
|
3722
|
-
registry: registryUrl
|
|
3723
|
+
registry: registryUrl,
|
|
3724
|
+
token
|
|
3723
3725
|
});
|
|
3724
3726
|
const version = await client.resolveVersion(parsed.fullName, parsed.version);
|
|
3725
3727
|
// 4. Download tarball
|
|
@@ -4129,6 +4131,9 @@ class RegistryResolver {
|
|
|
4129
4131
|
const locked = this.lockManager.get(parsed.name);
|
|
4130
4132
|
if (locked?.registry) return locked.registry;
|
|
4131
4133
|
// Slow path: probe configured registries (skip git hosts)
|
|
4134
|
+
// Note: token is intentionally NOT passed during probe to avoid leaking
|
|
4135
|
+
// credentials to unrelated registries. Token is only used after the
|
|
4136
|
+
// target registry is determined.
|
|
4132
4137
|
const registries = this.config.getRegistries();
|
|
4133
4138
|
for (const [name, url] of Object.entries(registries))if (!this.isGitHostRegistry(name, url)) try {
|
|
4134
4139
|
const client = new RegistryClient({
|
|
@@ -4328,6 +4333,54 @@ class RegistryResolver {
|
|
|
4328
4333
|
// Multi-Agent installation methods
|
|
4329
4334
|
// ============================================================================
|
|
4330
4335
|
/**
|
|
4336
|
+
* Detect whether a ref points to a single skill or a multi-skill directory.
|
|
4337
|
+
*
|
|
4338
|
+
* Returns `{ type: 'single' }` when the cached root contains a SKILL.md (or
|
|
4339
|
+
* when the source is registry/HTTP — those are always single-skill).
|
|
4340
|
+
* Returns `{ type: 'multi', skills }` when the root has **no** SKILL.md but
|
|
4341
|
+
* `discoverSkillsInDir()` finds child skills underneath.
|
|
4342
|
+
*
|
|
4343
|
+
* The method caches the repo as a side-effect so that the subsequent
|
|
4344
|
+
* `installToAgents` / `installSkillsFromRepo` call hits the cache.
|
|
4345
|
+
*/ async detectSkillsInRef(ref) {
|
|
4346
|
+
// Only Git refs can be multi-skill directories
|
|
4347
|
+
if (this.isRegistrySource(ref) || this.isHttpSource(ref)) return {
|
|
4348
|
+
type: 'single'
|
|
4349
|
+
};
|
|
4350
|
+
const resolved = await this.resolver.resolve(ref);
|
|
4351
|
+
const { parsed } = resolved;
|
|
4352
|
+
const gitRef = resolved.ref;
|
|
4353
|
+
// Ensure the repo is cached (result unused — we only need the side-effect)
|
|
4354
|
+
if (!await this.cache.get(parsed, gitRef)) await this.cache.cache(resolved.repoUrl, parsed, gitRef, gitRef);
|
|
4355
|
+
const cachePath = this.cache.getCachePath(parsed, gitRef);
|
|
4356
|
+
// When parsed.skillName is set (ref has #fragment), resolve to the
|
|
4357
|
+
// specific skill subdirectory so we check the right SKILL.md.
|
|
4358
|
+
const sourcePath = this.resolveSourcePath(cachePath, parsed);
|
|
4359
|
+
const metadata = this.getSkillMetadataFromDir(sourcePath);
|
|
4360
|
+
if (metadata) return {
|
|
4361
|
+
type: 'single'
|
|
4362
|
+
};
|
|
4363
|
+
// No SKILL.md at root — check for child skills.
|
|
4364
|
+
// cachePath is correct here (not sourcePath) for two reasons:
|
|
4365
|
+
// 1. When parsed.skillName is set, resolveSourcePath() either returns a
|
|
4366
|
+
// subdirectory (→ metadata found → already returned 'single' above) or
|
|
4367
|
+
// throws (skill not found). So we never reach this line with
|
|
4368
|
+
// sourcePath ≠ cachePath.
|
|
4369
|
+
// 2. When parsed.subPath is set, CacheManager.cache() already copies only
|
|
4370
|
+
// the subPath subdirectory into cachePath, so discovery is scoped to
|
|
4371
|
+
// the intended directory automatically.
|
|
4372
|
+
const discovered = discoverSkillsInDir(cachePath);
|
|
4373
|
+
if (discovered.length > 0) return {
|
|
4374
|
+
type: 'multi',
|
|
4375
|
+
skills: discovered
|
|
4376
|
+
};
|
|
4377
|
+
// No skills found at all. Return 'single' so the caller proceeds to
|
|
4378
|
+
// installToAgents, which will produce a clear error ("no SKILL.md found").
|
|
4379
|
+
return {
|
|
4380
|
+
type: 'single'
|
|
4381
|
+
};
|
|
4382
|
+
}
|
|
4383
|
+
/**
|
|
4331
4384
|
* Install skill to multiple agents
|
|
4332
4385
|
*
|
|
4333
4386
|
* @param ref - Skill reference (e.g., github:user/repo@v1.0.0 or HTTP URL)
|
|
@@ -4596,7 +4649,8 @@ class RegistryResolver {
|
|
|
4596
4649
|
const parsed = parseSkillIdentifier(ref);
|
|
4597
4650
|
const registryUrl = await this.resolveRegistryUrl(ref, options.registry);
|
|
4598
4651
|
const client = new RegistryClient({
|
|
4599
|
-
registry: registryUrl
|
|
4652
|
+
registry: registryUrl,
|
|
4653
|
+
token: options.token
|
|
4600
4654
|
});
|
|
4601
4655
|
// Query skill info to determine source_type
|
|
4602
4656
|
let skillInfo;
|
|
@@ -4617,7 +4671,7 @@ class RegistryResolver {
|
|
|
4617
4671
|
});
|
|
4618
4672
|
// 1. Resolve registry skill (pass pre-resolved registryUrl)
|
|
4619
4673
|
logger_logger["package"](`Resolving ${ref} from registry...`);
|
|
4620
|
-
const resolved = await this.registryResolver.resolve(ref, registryUrl);
|
|
4674
|
+
const resolved = await this.registryResolver.resolve(ref, registryUrl, options.token);
|
|
4621
4675
|
const { shortName, version, registryUrl: resolvedRegistryUrl, tarball, parsed: resolvedParsed } = resolved;
|
|
4622
4676
|
// 2. Check if already installed (skip if --force)
|
|
4623
4677
|
const skillPath = this.getSkillPath(shortName);
|
|
@@ -4827,7 +4881,8 @@ class RegistryResolver {
|
|
|
4827
4881
|
const version = 'latest';
|
|
4828
4882
|
// Download tarball via RegistryClient (handles auth + 302 redirect to signed URL)
|
|
4829
4883
|
const client = new RegistryClient({
|
|
4830
|
-
registry: registryUrl
|
|
4884
|
+
registry: registryUrl,
|
|
4885
|
+
token: options.token
|
|
4831
4886
|
});
|
|
4832
4887
|
const { tarball } = await client.downloadSkill(parsed.fullName, version);
|
|
4833
4888
|
logger_logger["package"](`Installing ${shortName} from ${registryUrl} to ${targetAgents.length} agent(s)...`);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -244,6 +244,8 @@ export interface InstallOptions {
|
|
|
244
244
|
yes?: boolean;
|
|
245
245
|
/** Registry URL override (for registry-based installs) */
|
|
246
246
|
registry?: string;
|
|
247
|
+
/** Auth token for registry API requests (enables private skill access) */
|
|
248
|
+
token?: string;
|
|
247
249
|
/** Registry context for web-published skills (carries registry name through Git/HTTP install) */
|
|
248
250
|
registryContext?: RegistryInstallContext;
|
|
249
251
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAMxE;;GAEG;AACH,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;AAEvC;;GAEG;AACH,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEvE;;GAEG;AACH,YAAY,EACV,WAAW,EACX,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAMjC;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,wCAAwC;IACxC,WAAW,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IACjC,sFAAsF;IACtF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,sBA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