reskill 1.18.0 → 1.19.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 +35 -24
- package/README.zh-CN.md +35 -24
- package/dist/cli/commands/group.d.ts.map +1 -1
- package/dist/cli/index.js +38 -21
- package/dist/core/skill-manager.d.ts +6 -1
- package/dist/core/skill-manager.d.ts.map +1 -1
- package/dist/index.js +14 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,22 +65,22 @@ npx reskill@latest <command> # Or use npx directly
|
|
|
65
65
|
|
|
66
66
|
### Common Options
|
|
67
67
|
|
|
68
|
-
| Option | Commands
|
|
69
|
-
| ------------------------- |
|
|
70
|
-
| `--no-save` | `install`
|
|
71
|
-
| `-g, --global` | `install`, `uninstall`, `list`
|
|
72
|
-
| `-a, --agent <agents...>` | `install`
|
|
73
|
-
| `--mode <mode>` | `install`
|
|
74
|
-
| `--all` | `install`
|
|
75
|
-
| `-y, --yes` | `install`, `uninstall`, `publish`
|
|
76
|
-
| `-f, --force` | `install`
|
|
77
|
-
| `-s, --skill <names...>` | `install`
|
|
78
|
-
| `--list` | `install`
|
|
79
|
-
| `-t, --token <token>` | `install`
|
|
80
|
-
| `-r, --registry <url>` | `install`, `group`, `publish`
|
|
81
|
-
| `-j, --json` | `list`, `info`, `outdated`, `doctor`, `group`
|
|
82
|
-
| `-l, --limit <n>` | `find`
|
|
83
|
-
| `--skip-network` | `doctor`
|
|
68
|
+
| Option | Commands | Description |
|
|
69
|
+
| ------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
70
|
+
| `--no-save` | `install` | Install without saving to `skills.json` (for personal skills) |
|
|
71
|
+
| `-g, --global` | `install`, `uninstall`, `list` | Install/manage skills globally (user directory) |
|
|
72
|
+
| `-a, --agent <agents...>` | `install` | Specify target agents (e.g., `cursor`, `claude-code`) |
|
|
73
|
+
| `--mode <mode>` | `install` | Installation mode: `symlink` (default) or `copy` |
|
|
74
|
+
| `--all` | `install` | Install to all agents |
|
|
75
|
+
| `-y, --yes` | `install`, `uninstall`, `publish` | Skip confirmation prompts |
|
|
76
|
+
| `-f, --force` | `install` | Force reinstall even if already installed |
|
|
77
|
+
| `-s, --skill <names...>` | `install` | Select specific skill(s) by name from a multi-skill repo |
|
|
78
|
+
| `--list` | `install` | List available skills in the repository without installing |
|
|
79
|
+
| `-t, --token <token>` | `install`, `find`, `group`, `publish`, `login` | Auth token for registry API requests (for CI/CD) |
|
|
80
|
+
| `-r, --registry <url>` | `install`, `find`, `group`, `publish`, `login`, `logout`, `whoami` | Registry URL override for registry-enabled commands |
|
|
81
|
+
| `-j, --json` | `list`, `info`, `outdated`, `doctor`, `group`, `find` | Output as JSON |
|
|
82
|
+
| `-l, --limit <n>` | `find` | Maximum number of search results |
|
|
83
|
+
| `--skip-network` | `doctor` | Skip network connectivity checks |
|
|
84
84
|
|
|
85
85
|
Run `reskill <command> --help` for complete options and detailed usage.
|
|
86
86
|
|
|
@@ -222,14 +222,25 @@ git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.company.
|
|
|
222
222
|
|
|
223
223
|
Skills are installed to `.skills/` by default and can be integrated with any agent:
|
|
224
224
|
|
|
225
|
-
| Agent | Path
|
|
226
|
-
| -------------- |
|
|
227
|
-
|
|
|
228
|
-
|
|
|
229
|
-
|
|
|
230
|
-
|
|
|
231
|
-
|
|
|
232
|
-
|
|
|
225
|
+
| Agent | Path |
|
|
226
|
+
| -------------- | ------------------ |
|
|
227
|
+
| Amp | `.agents/skills` |
|
|
228
|
+
| Antigravity | `.agent/skills` |
|
|
229
|
+
| Claude Code | `.claude/skills` |
|
|
230
|
+
| Clawdbot | `skills` |
|
|
231
|
+
| Codex | `.codex/skills` |
|
|
232
|
+
| Cursor | `.cursor/skills` |
|
|
233
|
+
| Droid | `.factory/skills` |
|
|
234
|
+
| Gemini CLI | `.gemini/skills` |
|
|
235
|
+
| GitHub Copilot | `.github/skills` |
|
|
236
|
+
| Goose | `.goose/skills` |
|
|
237
|
+
| Kilo Code | `.kilocode/skills` |
|
|
238
|
+
| Kiro CLI | `.kiro/skills` |
|
|
239
|
+
| Neovate | `.neovate/skills` |
|
|
240
|
+
| OpenCode | `.opencode/skills` |
|
|
241
|
+
| Roo Code | `.roo/skills` |
|
|
242
|
+
| Trae | `.trae/skills` |
|
|
243
|
+
| Windsurf | `.windsurf/skills` |
|
|
233
244
|
|
|
234
245
|
## Publishing Skills
|
|
235
246
|
|
package/README.zh-CN.md
CHANGED
|
@@ -65,22 +65,22 @@ npx reskill@latest <command> # 或直接使用 npx
|
|
|
65
65
|
|
|
66
66
|
### 常用选项
|
|
67
67
|
|
|
68
|
-
| 选项 | 适用命令
|
|
69
|
-
| ------------------------- |
|
|
70
|
-
| `--no-save` | `install`
|
|
71
|
-
| `-g, --global` | `install`, `uninstall`, `list`
|
|
72
|
-
| `-a, --agent <agents...>` | `install`
|
|
73
|
-
| `--mode <mode>` | `install`
|
|
74
|
-
| `--all` | `install`
|
|
75
|
-
| `-y, --yes` | `install`, `uninstall`, `publish`
|
|
76
|
-
| `-f, --force` | `install`
|
|
77
|
-
| `-s, --skill <names...>` | `install`
|
|
78
|
-
| `--list` | `install`
|
|
79
|
-
| `-t, --token <token>` | `install`
|
|
80
|
-
| `-r, --registry <url>` | `install`, `group`, `publish`
|
|
81
|
-
| `-j, --json` | `list`, `info`, `outdated`, `doctor`, `group`
|
|
82
|
-
| `-l, --limit <n>` | `find`
|
|
83
|
-
| `--skip-network` | `doctor`
|
|
68
|
+
| 选项 | 适用命令 | 说明 |
|
|
69
|
+
| ------------------------- | ------------------------------------------------------------- | -------------------------------------------- |
|
|
70
|
+
| `--no-save` | `install` | 安装时不保存到 `skills.json`(用于个人技能) |
|
|
71
|
+
| `-g, --global` | `install`, `uninstall`, `list` | 全局安装/管理技能(用户目录) |
|
|
72
|
+
| `-a, --agent <agents...>` | `install` | 指定目标 Agent(如 `cursor`, `claude-code`) |
|
|
73
|
+
| `--mode <mode>` | `install` | 安装模式:`symlink`(默认)或 `copy` |
|
|
74
|
+
| `--all` | `install` | 安装到所有 Agent |
|
|
75
|
+
| `-y, --yes` | `install`, `uninstall`, `publish` | 跳过确认提示 |
|
|
76
|
+
| `-f, --force` | `install` | 强制重新安装 |
|
|
77
|
+
| `-s, --skill <names...>` | `install` | 从多 skill 仓库中选择指定 skill |
|
|
78
|
+
| `--list` | `install` | 列出仓库中可用的 skills(不安装) |
|
|
79
|
+
| `-t, --token <token>` | `install`, `find`, `group`, `publish`, `login` | 认证令牌(用于 CI/CD 访问私有 skill) |
|
|
80
|
+
| `-r, --registry <url>` | `install`, `find`, `group`, `publish`, `login`, `logout`, `whoami` | 覆盖 registry URL(用于 registry 相关命令) |
|
|
81
|
+
| `-j, --json` | `list`, `info`, `outdated`, `doctor`, `group`, `find` | JSON 格式输出 |
|
|
82
|
+
| `-l, --limit <n>` | `find` | 限制搜索结果数量 |
|
|
83
|
+
| `--skip-network` | `doctor` | 跳过网络连通性检查 |
|
|
84
84
|
|
|
85
85
|
运行 `reskill <command> --help` 查看完整选项和详细用法。
|
|
86
86
|
|
|
@@ -222,14 +222,25 @@ git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.company.
|
|
|
222
222
|
|
|
223
223
|
Skills 默认安装到 `.skills/`,可与任何 Agent 集成:
|
|
224
224
|
|
|
225
|
-
| Agent | 路径
|
|
226
|
-
| -------------- |
|
|
227
|
-
|
|
|
228
|
-
|
|
|
229
|
-
|
|
|
230
|
-
|
|
|
231
|
-
|
|
|
232
|
-
|
|
|
225
|
+
| Agent | 路径 |
|
|
226
|
+
| -------------- | ------------------ |
|
|
227
|
+
| Amp | `.agents/skills` |
|
|
228
|
+
| Antigravity | `.agent/skills` |
|
|
229
|
+
| Claude Code | `.claude/skills` |
|
|
230
|
+
| Clawdbot | `skills` |
|
|
231
|
+
| Codex | `.codex/skills` |
|
|
232
|
+
| Cursor | `.cursor/skills` |
|
|
233
|
+
| Droid | `.factory/skills` |
|
|
234
|
+
| Gemini CLI | `.gemini/skills` |
|
|
235
|
+
| GitHub Copilot | `.github/skills` |
|
|
236
|
+
| Goose | `.goose/skills` |
|
|
237
|
+
| Kilo Code | `.kilocode/skills` |
|
|
238
|
+
| Kiro CLI | `.kiro/skills` |
|
|
239
|
+
| Neovate | `.neovate/skills` |
|
|
240
|
+
| OpenCode | `.opencode/skills` |
|
|
241
|
+
| Roo Code | `.roo/skills` |
|
|
242
|
+
| Trae | `.trae/skills` |
|
|
243
|
+
| Windsurf | `.windsurf/skills` |
|
|
233
244
|
|
|
234
245
|
## 发布 Skills
|
|
235
246
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/group.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/group.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0fpC,eAAO,MAAM,YAAY,SAA0D,CAAC;AAyCpF,eAAe,YAAY,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -4305,14 +4305,17 @@ class RegistryResolver {
|
|
|
4305
4305
|
*
|
|
4306
4306
|
* Resolution order:
|
|
4307
4307
|
* 1. Explicit CLI override (options.registry)
|
|
4308
|
-
* 2. Scoped skills → getRegistryUrl(scope)
|
|
4308
|
+
* 2. Scoped skills → getRegistryUrl(scope, scopeRegistries from skills.json)
|
|
4309
4309
|
* 3. Unscoped skills → lock file registry (O(1), no network)
|
|
4310
4310
|
* 4. Unscoped skills → probe skills.json registries (non-git-host, network)
|
|
4311
4311
|
* 5. Default → PUBLIC_REGISTRY
|
|
4312
4312
|
*/ async resolveRegistryUrl(ref, explicitRegistry) {
|
|
4313
4313
|
if (explicitRegistry) return explicitRegistry;
|
|
4314
4314
|
const parsed = parseSkillIdentifier(ref);
|
|
4315
|
-
if (parsed.scope)
|
|
4315
|
+
if (parsed.scope) {
|
|
4316
|
+
const scopeRegistries = this.getScopeRegistriesFromConfig();
|
|
4317
|
+
return getRegistryUrl(parsed.scope, scopeRegistries);
|
|
4318
|
+
}
|
|
4316
4319
|
// Fast path: lock file has registry URL
|
|
4317
4320
|
const locked = this.lockManager.get(parsed.name);
|
|
4318
4321
|
if (locked?.registry) return locked.registry;
|
|
@@ -4344,6 +4347,15 @@ class RegistryResolver {
|
|
|
4344
4347
|
return gitHostPatterns.some((pattern)=>normalizedUrl.includes(pattern));
|
|
4345
4348
|
}
|
|
4346
4349
|
/**
|
|
4350
|
+
* Extract @scope-prefixed entries from skills.json registries
|
|
4351
|
+
* so users can configure custom scope→registry mappings declaratively.
|
|
4352
|
+
*/ getScopeRegistriesFromConfig() {
|
|
4353
|
+
const registries = this.config.getRegistries();
|
|
4354
|
+
const scopeRegistries = {};
|
|
4355
|
+
for (const [name, url] of Object.entries(registries))if (name.startsWith('@')) scopeRegistries[name] = url;
|
|
4356
|
+
return scopeRegistries;
|
|
4357
|
+
}
|
|
4358
|
+
/**
|
|
4347
4359
|
* Derive a registry name from a URL for storing in skills.json.registries.
|
|
4348
4360
|
* Returns null for git hosts (already in DEFAULT_REGISTRIES).
|
|
4349
4361
|
*/ deriveRegistryName(registryUrl) {
|
|
@@ -6705,13 +6717,18 @@ function assertValidGroupPath(path) {
|
|
|
6705
6717
|
// ============================================================================
|
|
6706
6718
|
// Client Factory
|
|
6707
6719
|
// ============================================================================
|
|
6708
|
-
function createClient(registry) {
|
|
6720
|
+
function createClient(registry, cliToken) {
|
|
6721
|
+
// --token flag takes highest priority
|
|
6722
|
+
if (cliToken) return new RegistryClient({
|
|
6723
|
+
registry,
|
|
6724
|
+
token: cliToken
|
|
6725
|
+
});
|
|
6709
6726
|
const authManager = new AuthManager();
|
|
6710
6727
|
const token = authManager.getToken(registry);
|
|
6711
6728
|
if (!token) {
|
|
6712
6729
|
logger_logger.error('Authentication required');
|
|
6713
6730
|
logger_logger.newline();
|
|
6714
|
-
logger_logger.log("Run 'reskill login' to authenticate
|
|
6731
|
+
logger_logger.log("Run 'reskill login' to authenticate, or pass --token <token>.");
|
|
6715
6732
|
process.exit(1);
|
|
6716
6733
|
}
|
|
6717
6734
|
return new RegistryClient({
|
|
@@ -6809,7 +6826,7 @@ function displayMemberList(members, groupPath, json) {
|
|
|
6809
6826
|
// ============================================================================
|
|
6810
6827
|
async function listAction(options) {
|
|
6811
6828
|
const registry = resolveRegistry(options.registry);
|
|
6812
|
-
const client = createClient(registry);
|
|
6829
|
+
const client = createClient(registry, options.token);
|
|
6813
6830
|
try {
|
|
6814
6831
|
const groups = await client.listGroups({
|
|
6815
6832
|
flat: Boolean(options.tree)
|
|
@@ -6836,7 +6853,7 @@ async function createAction(name, options) {
|
|
|
6836
6853
|
if (options.parent) {
|
|
6837
6854
|
const normalizedParent = normalizeGroupPath(options.parent);
|
|
6838
6855
|
assertValidGroupPath(normalizedParent);
|
|
6839
|
-
client = createClient(registry);
|
|
6856
|
+
client = createClient(registry, options.token);
|
|
6840
6857
|
try {
|
|
6841
6858
|
const parentGroup = await client.resolveGroup(normalizedParent);
|
|
6842
6859
|
parentId = parentGroup.id;
|
|
@@ -6847,7 +6864,7 @@ async function createAction(name, options) {
|
|
|
6847
6864
|
}
|
|
6848
6865
|
}
|
|
6849
6866
|
try {
|
|
6850
|
-
const ensuredClient = client ?? createClient(registry);
|
|
6867
|
+
const ensuredClient = client ?? createClient(registry, options.token);
|
|
6851
6868
|
const group = await ensuredClient.createGroup({
|
|
6852
6869
|
name,
|
|
6853
6870
|
slug,
|
|
@@ -6872,7 +6889,7 @@ async function infoAction(groupPath, options) {
|
|
|
6872
6889
|
const normalized = normalizeGroupPath(groupPath);
|
|
6873
6890
|
assertValidGroupPath(normalized);
|
|
6874
6891
|
const registry = resolveRegistry(options.registry);
|
|
6875
|
-
const client = createClient(registry);
|
|
6892
|
+
const client = createClient(registry, options.token);
|
|
6876
6893
|
try {
|
|
6877
6894
|
const detail = await client.resolveGroup(normalized);
|
|
6878
6895
|
displayGroupDetail(detail, options.json || false);
|
|
@@ -6888,7 +6905,7 @@ async function deleteAction(groupPath, options) {
|
|
|
6888
6905
|
const normalized = normalizeGroupPath(groupPath);
|
|
6889
6906
|
assertValidGroupPath(normalized);
|
|
6890
6907
|
const registry = resolveRegistry(options.registry);
|
|
6891
|
-
const client = createClient(registry);
|
|
6908
|
+
const client = createClient(registry, options.token);
|
|
6892
6909
|
try {
|
|
6893
6910
|
const detail = await client.resolveGroup(normalized);
|
|
6894
6911
|
if (options.dryRun) {
|
|
@@ -6933,7 +6950,7 @@ async function memberListAction(groupPath, options) {
|
|
|
6933
6950
|
const normalized = normalizeGroupPath(groupPath);
|
|
6934
6951
|
assertValidGroupPath(normalized);
|
|
6935
6952
|
const registry = resolveRegistry(options.registry);
|
|
6936
|
-
const client = createClient(registry);
|
|
6953
|
+
const client = createClient(registry, options.token);
|
|
6937
6954
|
try {
|
|
6938
6955
|
const detail = await client.resolveGroup(normalized);
|
|
6939
6956
|
const members = await client.listGroupMembers(detail.id);
|
|
@@ -6947,7 +6964,7 @@ async function memberAddAction(groupPath, userIds, options) {
|
|
|
6947
6964
|
const normalized = normalizeGroupPath(groupPath);
|
|
6948
6965
|
assertValidGroupPath(normalized);
|
|
6949
6966
|
const registry = resolveRegistry(options.registry);
|
|
6950
|
-
const client = createClient(registry);
|
|
6967
|
+
const client = createClient(registry, options.token);
|
|
6951
6968
|
const role = options.role || 'developer';
|
|
6952
6969
|
if (!validateRole(role)) {
|
|
6953
6970
|
logger_logger.error(`Invalid role "${role}". Must be one of: ${VALID_ROLES.join(', ')}`);
|
|
@@ -6966,7 +6983,7 @@ async function memberRemoveAction(groupPath, userId, options) {
|
|
|
6966
6983
|
const normalized = normalizeGroupPath(groupPath);
|
|
6967
6984
|
assertValidGroupPath(normalized);
|
|
6968
6985
|
const registry = resolveRegistry(options.registry);
|
|
6969
|
-
const client = createClient(registry);
|
|
6986
|
+
const client = createClient(registry, options.token);
|
|
6970
6987
|
try {
|
|
6971
6988
|
const detail = await client.resolveGroup(normalized);
|
|
6972
6989
|
await client.removeGroupMember(detail.id, userId);
|
|
@@ -6980,7 +6997,7 @@ async function memberRoleAction(groupPath, userId, role, options) {
|
|
|
6980
6997
|
const normalized = normalizeGroupPath(groupPath);
|
|
6981
6998
|
assertValidGroupPath(normalized);
|
|
6982
6999
|
const registry = resolveRegistry(options.registry);
|
|
6983
|
-
const client = createClient(registry);
|
|
7000
|
+
const client = createClient(registry, options.token);
|
|
6984
7001
|
if (!validateRole(role)) {
|
|
6985
7002
|
logger_logger.error(`Invalid role "${role}". Must be one of: ${VALID_ROLES.join(', ')}`);
|
|
6986
7003
|
process.exit(1);
|
|
@@ -6998,15 +7015,15 @@ async function memberRoleAction(groupPath, userId, role, options) {
|
|
|
6998
7015
|
// Command Definitions
|
|
6999
7016
|
// ============================================================================
|
|
7000
7017
|
const memberCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('member').description('Manage group members');
|
|
7001
|
-
memberCommand.command('list <path>').description('List members of a group').option('-r, --registry <url>', 'Registry URL').option('-j, --json', 'Output as JSON').action(memberListAction);
|
|
7002
|
-
memberCommand.command('add <path> <users...>').description('Add members to a group').option('-r, --registry <url>', 'Registry URL').option('--role <role>', 'Role to assign (owner|maintainer|developer)', 'developer').action(memberAddAction);
|
|
7003
|
-
memberCommand.command('remove <path> <user>').description('Remove a member from a group').option('-r, --registry <url>', 'Registry URL').action(memberRemoveAction);
|
|
7004
|
-
memberCommand.command('role <path> <user> <role>').description("Change a member's role").option('-r, --registry <url>', 'Registry URL').action(memberRoleAction);
|
|
7018
|
+
memberCommand.command('list <path>').description('List members of a group').option('-r, --registry <url>', 'Registry URL').option('-t, --token <token>', 'Auth token for registry API requests (for CI/CD)').option('-j, --json', 'Output as JSON').action(memberListAction);
|
|
7019
|
+
memberCommand.command('add <path> <users...>').description('Add members to a group').option('-r, --registry <url>', 'Registry URL').option('-t, --token <token>', 'Auth token for registry API requests (for CI/CD)').option('--role <role>', 'Role to assign (owner|maintainer|developer)', 'developer').action(memberAddAction);
|
|
7020
|
+
memberCommand.command('remove <path> <user>').description('Remove a member from a group').option('-r, --registry <url>', 'Registry URL').option('-t, --token <token>', 'Auth token for registry API requests (for CI/CD)').action(memberRemoveAction);
|
|
7021
|
+
memberCommand.command('role <path> <user> <role>').description("Change a member's role").option('-r, --registry <url>', 'Registry URL').option('-t, --token <token>', 'Auth token for registry API requests (for CI/CD)').action(memberRoleAction);
|
|
7005
7022
|
const groupCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('group').description('Manage skill groups');
|
|
7006
|
-
groupCommand.command('list').description('List visible groups').option('-r, --registry <url>', 'Registry URL').option('--tree', 'Render groups as a tree (requests flat group list)').option('-j, --json', 'Output as JSON').action(listAction);
|
|
7007
|
-
groupCommand.command('create <name>').description('Create a new group').option('-r, --registry <url>', 'Registry URL').option('-d, --description <text>', 'Group description').option('--visibility <level>', 'Visibility: public or private', 'public').option('--parent <path>', 'Parent group path (for sub groups)').option('-j, --json', 'Output as JSON').action(createAction);
|
|
7008
|
-
groupCommand.command('info <path>').description('Show group details').option('-r, --registry <url>', 'Registry URL').option('-j, --json', 'Output as JSON').action(infoAction);
|
|
7009
|
-
groupCommand.command('delete <path>').description('Delete a group').option('-r, --registry <url>', 'Registry URL').option('-n, --dry-run', 'Preview deletion without executing').option('-y, --yes', 'Skip confirmation').action(deleteAction);
|
|
7023
|
+
groupCommand.command('list').description('List visible groups').option('-r, --registry <url>', 'Registry URL').option('-t, --token <token>', 'Auth token for registry API requests (for CI/CD)').option('--tree', 'Render groups as a tree (requests flat group list)').option('-j, --json', 'Output as JSON').action(listAction);
|
|
7024
|
+
groupCommand.command('create <name>').description('Create a new group').option('-r, --registry <url>', 'Registry URL').option('-t, --token <token>', 'Auth token for registry API requests (for CI/CD)').option('-d, --description <text>', 'Group description').option('--visibility <level>', 'Visibility: public or private', 'public').option('--parent <path>', 'Parent group path (for sub groups)').option('-j, --json', 'Output as JSON').action(createAction);
|
|
7025
|
+
groupCommand.command('info <path>').description('Show group details').option('-r, --registry <url>', 'Registry URL').option('-t, --token <token>', 'Auth token for registry API requests (for CI/CD)').option('-j, --json', 'Output as JSON').action(infoAction);
|
|
7026
|
+
groupCommand.command('delete <path>').description('Delete a group').option('-r, --registry <url>', 'Registry URL').option('-t, --token <token>', 'Auth token for registry API requests (for CI/CD)').option('-n, --dry-run', 'Preview deletion without executing').option('-y, --yes', 'Skip confirmation').action(deleteAction);
|
|
7010
7027
|
groupCommand.addCommand(memberCommand);
|
|
7011
7028
|
/**
|
|
7012
7029
|
* info command - Show skill details
|
|
@@ -118,7 +118,7 @@ export declare class SkillManager {
|
|
|
118
118
|
*
|
|
119
119
|
* Resolution order:
|
|
120
120
|
* 1. Explicit CLI override (options.registry)
|
|
121
|
-
* 2. Scoped skills → getRegistryUrl(scope)
|
|
121
|
+
* 2. Scoped skills → getRegistryUrl(scope, scopeRegistries from skills.json)
|
|
122
122
|
* 3. Unscoped skills → lock file registry (O(1), no network)
|
|
123
123
|
* 4. Unscoped skills → probe skills.json registries (non-git-host, network)
|
|
124
124
|
* 5. Default → PUBLIC_REGISTRY
|
|
@@ -129,6 +129,11 @@ export declare class SkillManager {
|
|
|
129
129
|
* Git hosts are not skill registries and should be skipped during probe.
|
|
130
130
|
*/
|
|
131
131
|
private isGitHostRegistry;
|
|
132
|
+
/**
|
|
133
|
+
* Extract @scope-prefixed entries from skills.json registries
|
|
134
|
+
* so users can configure custom scope→registry mappings declaratively.
|
|
135
|
+
*/
|
|
136
|
+
private getScopeRegistriesFromConfig;
|
|
132
137
|
/**
|
|
133
138
|
* Derive a registry name from a URL for storing in skills.json.registries.
|
|
134
139
|
* Returns null for git hosts (already in DEFAULT_REGISTRIES).
|
|
@@ -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;
|
|
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;AAoB3B,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,EAEzB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,gDAAgD;IAChD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAc;IAC9B,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,QAAQ,CAAU;gBAEd,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB;IAc/D;;OAEG;IACH,YAAY,IAAI,OAAO;IAIvB;;OAEG;IACH,cAAc,IAAI,MAAM;IAIxB;;;;;OAKG;IACH,aAAa,IAAI,MAAM;IAOvB;;;;;;OAMG;IACH,qBAAqB,IAAI,MAAM;IAM/B;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IA0BlC;;OAEG;IAC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ACW,sBAAsB;IAgGpC;;OAEG;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;IA0FtC;;;;;;;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
|
@@ -4690,14 +4690,17 @@ class RegistryResolver {
|
|
|
4690
4690
|
*
|
|
4691
4691
|
* Resolution order:
|
|
4692
4692
|
* 1. Explicit CLI override (options.registry)
|
|
4693
|
-
* 2. Scoped skills → getRegistryUrl(scope)
|
|
4693
|
+
* 2. Scoped skills → getRegistryUrl(scope, scopeRegistries from skills.json)
|
|
4694
4694
|
* 3. Unscoped skills → lock file registry (O(1), no network)
|
|
4695
4695
|
* 4. Unscoped skills → probe skills.json registries (non-git-host, network)
|
|
4696
4696
|
* 5. Default → PUBLIC_REGISTRY
|
|
4697
4697
|
*/ async resolveRegistryUrl(ref, explicitRegistry) {
|
|
4698
4698
|
if (explicitRegistry) return explicitRegistry;
|
|
4699
4699
|
const parsed = parseSkillIdentifier(ref);
|
|
4700
|
-
if (parsed.scope)
|
|
4700
|
+
if (parsed.scope) {
|
|
4701
|
+
const scopeRegistries = this.getScopeRegistriesFromConfig();
|
|
4702
|
+
return getRegistryUrl(parsed.scope, scopeRegistries);
|
|
4703
|
+
}
|
|
4701
4704
|
// Fast path: lock file has registry URL
|
|
4702
4705
|
const locked = this.lockManager.get(parsed.name);
|
|
4703
4706
|
if (locked?.registry) return locked.registry;
|
|
@@ -4729,6 +4732,15 @@ class RegistryResolver {
|
|
|
4729
4732
|
return gitHostPatterns.some((pattern)=>normalizedUrl.includes(pattern));
|
|
4730
4733
|
}
|
|
4731
4734
|
/**
|
|
4735
|
+
* Extract @scope-prefixed entries from skills.json registries
|
|
4736
|
+
* so users can configure custom scope→registry mappings declaratively.
|
|
4737
|
+
*/ getScopeRegistriesFromConfig() {
|
|
4738
|
+
const registries = this.config.getRegistries();
|
|
4739
|
+
const scopeRegistries = {};
|
|
4740
|
+
for (const [name, url] of Object.entries(registries))if (name.startsWith('@')) scopeRegistries[name] = url;
|
|
4741
|
+
return scopeRegistries;
|
|
4742
|
+
}
|
|
4743
|
+
/**
|
|
4732
4744
|
* Derive a registry name from a URL for storing in skills.json.registries.
|
|
4733
4745
|
* Returns null for git hosts (already in DEFAULT_REGISTRIES).
|
|
4734
4746
|
*/ deriveRegistryName(registryUrl) {
|