reskill 1.19.0 → 1.20.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 +12 -6
- package/README.zh-CN.md +12 -6
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/index.js +56 -9
- package/dist/core/config-loader.d.ts +8 -0
- package/dist/core/config-loader.d.ts.map +1 -1
- package/dist/core/lock-manager.d.ts +8 -0
- package/dist/core/lock-manager.d.ts.map +1 -1
- package/dist/core/skill-manager.d.ts +7 -0
- package/dist/core/skill-manager.d.ts.map +1 -1
- package/dist/index.js +42 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -76,8 +76,13 @@ npx reskill@latest <command> # Or use npx directly
|
|
|
76
76
|
| `-f, --force` | `install` | Force reinstall even if already installed |
|
|
77
77
|
| `-s, --skill <names...>` | `install` | Select specific skill(s) by name from a multi-skill repo |
|
|
78
78
|
| `--list` | `install` | List available skills in the repository without installing |
|
|
79
|
+
| `--skip-manifest` | `install` | Skip all `skills.json` and `skills.lock` writes (for platform integration) |
|
|
79
80
|
| `-t, --token <token>` | `install`, `find`, `group`, `publish`, `login` | Auth token for registry API requests (for CI/CD) |
|
|
80
81
|
| `-r, --registry <url>` | `install`, `find`, `group`, `publish`, `login`, `logout`, `whoami` | Registry URL override for registry-enabled commands |
|
|
82
|
+
| `--tag <tag>` | `publish` | Git tag to publish |
|
|
83
|
+
| `--access <level>` | `publish` | Access level: `public` (default) or `restricted` |
|
|
84
|
+
| `-n, --dry-run` | `publish` | Validate without publishing |
|
|
85
|
+
| `-g, --group <path>` | `publish` | Publish skill into a group (e.g., `kanyun/frontend`) |
|
|
81
86
|
| `-j, --json` | `list`, `info`, `outdated`, `doctor`, `group`, `find` | Output as JSON |
|
|
82
87
|
| `-l, --limit <n>` | `find` | Maximum number of search results |
|
|
83
88
|
| `--skip-network` | `doctor` | Skip network connectivity checks |
|
|
@@ -293,12 +298,13 @@ reskill install @scope/private-skill --registry https://your-registry.com --toke
|
|
|
293
298
|
|
|
294
299
|
| Variable | Description | Default |
|
|
295
300
|
| ------------------- | ----------------------------------------------- | ------------------------------ |
|
|
296
|
-
| `RESKILL_CACHE_DIR`
|
|
297
|
-
| `RESKILL_TOKEN`
|
|
298
|
-
| `RESKILL_REGISTRY`
|
|
299
|
-
| `
|
|
300
|
-
| `
|
|
301
|
-
| `
|
|
301
|
+
| `RESKILL_CACHE_DIR` | Global cache directory | `~/.reskill-cache` |
|
|
302
|
+
| `RESKILL_TOKEN` | Auth token (takes precedence over ~/.reskillrc) | - |
|
|
303
|
+
| `RESKILL_REGISTRY` | Default registry URL | `https://registry.reskill.dev` |
|
|
304
|
+
| `RESKILL_NO_MANIFEST` | Skip `skills.json` and `skills.lock` writes (set to `1` to enable) | - |
|
|
305
|
+
| `DEBUG` | Enable debug logging | - |
|
|
306
|
+
| `VERBOSE` | Enable debug logging (same effect as `DEBUG`) | - |
|
|
307
|
+
| `NO_COLOR` | Disable colored output | - |
|
|
302
308
|
|
|
303
309
|
reskill checks for newer versions in the background and shows an upgrade tip after command execution.
|
|
304
310
|
|
package/README.zh-CN.md
CHANGED
|
@@ -76,8 +76,13 @@ npx reskill@latest <command> # 或直接使用 npx
|
|
|
76
76
|
| `-f, --force` | `install` | 强制重新安装 |
|
|
77
77
|
| `-s, --skill <names...>` | `install` | 从多 skill 仓库中选择指定 skill |
|
|
78
78
|
| `--list` | `install` | 列出仓库中可用的 skills(不安装) |
|
|
79
|
+
| `--skip-manifest` | `install` | 跳过 `skills.json` 和 `skills.lock` 写入(用于平台集成) |
|
|
79
80
|
| `-t, --token <token>` | `install`, `find`, `group`, `publish`, `login` | 认证令牌(用于 CI/CD 访问私有 skill) |
|
|
80
81
|
| `-r, --registry <url>` | `install`, `find`, `group`, `publish`, `login`, `logout`, `whoami` | 覆盖 registry URL(用于 registry 相关命令) |
|
|
82
|
+
| `--tag <tag>` | `publish` | 发布的 Git tag |
|
|
83
|
+
| `--access <level>` | `publish` | 访问级别:`public`(默认)或 `restricted` |
|
|
84
|
+
| `-n, --dry-run` | `publish` | 仅验证不发布 |
|
|
85
|
+
| `-g, --group <path>` | `publish` | 发布到指定分组(如 `kanyun/frontend`) |
|
|
81
86
|
| `-j, --json` | `list`, `info`, `outdated`, `doctor`, `group`, `find` | JSON 格式输出 |
|
|
82
87
|
| `-l, --limit <n>` | `find` | 限制搜索结果数量 |
|
|
83
88
|
| `--skip-network` | `doctor` | 跳过网络连通性检查 |
|
|
@@ -293,12 +298,13 @@ reskill install @scope/private-skill --registry https://your-registry.com --toke
|
|
|
293
298
|
|
|
294
299
|
| 变量 | 说明 | 默认值 |
|
|
295
300
|
| ------------------- | ------------------------------- | ------------------------------ |
|
|
296
|
-
| `RESKILL_CACHE_DIR`
|
|
297
|
-
| `RESKILL_TOKEN`
|
|
298
|
-
| `RESKILL_REGISTRY`
|
|
299
|
-
| `
|
|
300
|
-
| `
|
|
301
|
-
| `
|
|
301
|
+
| `RESKILL_CACHE_DIR` | 全局缓存目录 | `~/.reskill-cache` |
|
|
302
|
+
| `RESKILL_TOKEN` | 认证令牌(优先于 ~/.reskillrc) | - |
|
|
303
|
+
| `RESKILL_REGISTRY` | 默认 registry URL | `https://registry.reskill.dev` |
|
|
304
|
+
| `RESKILL_NO_MANIFEST` | 跳过 `skills.json` 和 `skills.lock` 写入(设为 `1` 启用) | - |
|
|
305
|
+
| `DEBUG` | 启用调试日志 | - |
|
|
306
|
+
| `VERBOSE` | 启用调试日志(与 `DEBUG` 等效) | - |
|
|
307
|
+
| `NO_COLOR` | 禁用彩色输出 | - |
|
|
302
308
|
|
|
303
309
|
reskill 会在后台检查新版本,并在命令执行后提示升级信息。
|
|
304
310
|
|
|
@@ -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;AAq6BpC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,SAuHvB,CAAC;AAEL,eAAe,cAAc,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -2132,6 +2132,20 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2132
2132
|
return __WEBPACK_EXTERNAL_MODULE_node_path__.join(this.projectRoot, installDir);
|
|
2133
2133
|
}
|
|
2134
2134
|
// ==========================================================================
|
|
2135
|
+
// No-Manifest Mode (platform integration)
|
|
2136
|
+
// ==========================================================================
|
|
2137
|
+
_noManifest = false;
|
|
2138
|
+
/**
|
|
2139
|
+
* Enable/disable no-manifest mode.
|
|
2140
|
+
* When enabled, all write operations (save, create, addSkill, updateDefaults,
|
|
2141
|
+
* addRegistry) become no-ops. Read operations are unaffected.
|
|
2142
|
+
*/ setNoManifest(enabled) {
|
|
2143
|
+
this._noManifest = enabled;
|
|
2144
|
+
}
|
|
2145
|
+
get noManifest() {
|
|
2146
|
+
return this._noManifest;
|
|
2147
|
+
}
|
|
2148
|
+
// ==========================================================================
|
|
2135
2149
|
// File Operations
|
|
2136
2150
|
// ==========================================================================
|
|
2137
2151
|
/**
|
|
@@ -2167,7 +2181,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2167
2181
|
*/ save(config) {
|
|
2168
2182
|
const toSave = config ?? this.config;
|
|
2169
2183
|
if (!toSave) throw new Error('No config to save');
|
|
2170
|
-
writeJson(this.configPath, toSave);
|
|
2184
|
+
if (!this._noManifest) writeJson(this.configPath, toSave);
|
|
2171
2185
|
this.config = toSave;
|
|
2172
2186
|
}
|
|
2173
2187
|
/**
|
|
@@ -2175,6 +2189,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2175
2189
|
*
|
|
2176
2190
|
* @returns true if file was created, false if it already existed
|
|
2177
2191
|
*/ ensureExists() {
|
|
2192
|
+
if (this._noManifest) return false;
|
|
2178
2193
|
if (this.exists()) return false;
|
|
2179
2194
|
this.create();
|
|
2180
2195
|
return true;
|
|
@@ -2237,6 +2252,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2237
2252
|
*
|
|
2238
2253
|
* @param updates - Partial defaults to merge
|
|
2239
2254
|
*/ updateDefaults(updates) {
|
|
2255
|
+
if (this._noManifest) return;
|
|
2240
2256
|
this.ensureConfigLoaded();
|
|
2241
2257
|
if (this.config) {
|
|
2242
2258
|
this.config.defaults = {
|
|
@@ -2372,6 +2388,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2372
2388
|
*
|
|
2373
2389
|
* Also auto-adds the registry to the registries field if it's a well-known registry.
|
|
2374
2390
|
*/ addSkill(name, ref) {
|
|
2391
|
+
if (this._noManifest) return;
|
|
2375
2392
|
this.ensureConfigLoaded();
|
|
2376
2393
|
if (this.config) {
|
|
2377
2394
|
this.config.skills[name] = ref;
|
|
@@ -2392,6 +2409,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2392
2409
|
* @param name - Registry name (e.g., 'github', 'gitlab', 'internal')
|
|
2393
2410
|
* @param url - Registry URL (e.g., 'https://github.com')
|
|
2394
2411
|
*/ addRegistry(name, url) {
|
|
2412
|
+
if (this._noManifest) return;
|
|
2395
2413
|
if (!this.config) // Config not loaded - this is expected when called before load()/create()
|
|
2396
2414
|
// Callers like addSkill() ensure config is loaded before calling this
|
|
2397
2415
|
return;
|
|
@@ -2425,6 +2443,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2425
2443
|
*
|
|
2426
2444
|
* @returns true if skill was removed, false if it didn't exist
|
|
2427
2445
|
*/ removeSkill(name) {
|
|
2446
|
+
if (this._noManifest) return false;
|
|
2428
2447
|
this.ensureConfigLoaded();
|
|
2429
2448
|
if (this.config?.skills[name]) {
|
|
2430
2449
|
delete this.config.skills[name];
|
|
@@ -3018,11 +3037,22 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
3018
3037
|
projectRoot;
|
|
3019
3038
|
lockPath;
|
|
3020
3039
|
lockData = null;
|
|
3040
|
+
_noManifest = false;
|
|
3021
3041
|
constructor(projectRoot){
|
|
3022
3042
|
this.projectRoot = projectRoot || process.cwd();
|
|
3023
3043
|
this.lockPath = getSkillsLockPath(this.projectRoot);
|
|
3024
3044
|
}
|
|
3025
3045
|
/**
|
|
3046
|
+
* Enable/disable no-manifest mode.
|
|
3047
|
+
* When enabled, disk write operations (save, set, remove) become no-ops.
|
|
3048
|
+
* lockSkill() still returns a LockedSkill but does not persist it.
|
|
3049
|
+
*/ setNoManifest(enabled) {
|
|
3050
|
+
this._noManifest = enabled;
|
|
3051
|
+
}
|
|
3052
|
+
get noManifest() {
|
|
3053
|
+
return this._noManifest;
|
|
3054
|
+
}
|
|
3055
|
+
/**
|
|
3026
3056
|
* Get lock file path
|
|
3027
3057
|
*/ getLockPath() {
|
|
3028
3058
|
return this.lockPath;
|
|
@@ -3060,6 +3090,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
3060
3090
|
/**
|
|
3061
3091
|
* Save lock file
|
|
3062
3092
|
*/ save(lockToSave) {
|
|
3093
|
+
if (this._noManifest) return;
|
|
3063
3094
|
const toSave = lockToSave || this.lockData;
|
|
3064
3095
|
if (!toSave) throw new Error('No lock to save');
|
|
3065
3096
|
writeJson(this.lockPath, toSave);
|
|
@@ -3076,11 +3107,12 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
3076
3107
|
*/ set(name, skill) {
|
|
3077
3108
|
const lock = this.load();
|
|
3078
3109
|
lock.skills[name] = skill;
|
|
3079
|
-
this.save();
|
|
3110
|
+
if (!this._noManifest) this.save();
|
|
3080
3111
|
}
|
|
3081
3112
|
/**
|
|
3082
3113
|
* Remove locked skill
|
|
3083
3114
|
*/ remove(name) {
|
|
3115
|
+
if (this._noManifest) return false;
|
|
3084
3116
|
const lock = this.load();
|
|
3085
3117
|
if (lock.skills[name]) {
|
|
3086
3118
|
delete lock.skills[name];
|
|
@@ -3966,6 +3998,14 @@ class RegistryResolver {
|
|
|
3966
3998
|
this.resolver = new GitResolver('github', void 0, (registryName)=>this.config.getRegistryUrl(registryName));
|
|
3967
3999
|
this.httpResolver = new HttpResolver();
|
|
3968
4000
|
this.registryResolver = new RegistryResolver();
|
|
4001
|
+
if (options?.noManifest ?? '1' === process.env.RESKILL_NO_MANIFEST) this.setNoManifest(true);
|
|
4002
|
+
}
|
|
4003
|
+
/**
|
|
4004
|
+
* Enable/disable no-manifest mode on both ConfigLoader and LockManager.
|
|
4005
|
+
* When enabled, no skills.json or skills.lock writes occur.
|
|
4006
|
+
*/ setNoManifest(enabled) {
|
|
4007
|
+
this.config.setNoManifest(enabled);
|
|
4008
|
+
this.lockManager.setNoManifest(enabled);
|
|
3969
4009
|
}
|
|
3970
4010
|
/**
|
|
3971
4011
|
* Check if in global mode
|
|
@@ -7167,7 +7207,8 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
7167
7207
|
storedMode,
|
|
7168
7208
|
isReinstallAll: 0 === skills.length,
|
|
7169
7209
|
isBatchInstall: skills.length > 1,
|
|
7170
|
-
skipConfirm: options.yes ?? false
|
|
7210
|
+
skipConfirm: options.yes ?? false,
|
|
7211
|
+
skipManifest: options.skipManifest ?? false
|
|
7171
7212
|
};
|
|
7172
7213
|
}
|
|
7173
7214
|
// ============================================================================
|
|
@@ -7357,7 +7398,8 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
7357
7398
|
// Execute installation (no confirmation for reinstall all)
|
|
7358
7399
|
spinner.start('Installing skills...');
|
|
7359
7400
|
const skillManager = new SkillManager(void 0, {
|
|
7360
|
-
global: false
|
|
7401
|
+
global: false,
|
|
7402
|
+
noManifest: ctx.skipManifest
|
|
7361
7403
|
});
|
|
7362
7404
|
let totalInstalled = 0;
|
|
7363
7405
|
let totalFailed = 0;
|
|
@@ -7392,7 +7434,8 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
7392
7434
|
const skill = skills[0];
|
|
7393
7435
|
const cwd = process.cwd();
|
|
7394
7436
|
const skillManager = new SkillManager(void 0, {
|
|
7395
|
-
global: installGlobally
|
|
7437
|
+
global: installGlobally,
|
|
7438
|
+
noManifest: ctx.skipManifest
|
|
7396
7439
|
});
|
|
7397
7440
|
// Detect whether the ref points to a multi-skill directory
|
|
7398
7441
|
spinner.start('Resolving skill...');
|
|
@@ -7508,7 +7551,8 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
7508
7551
|
* Multi-skill path: list or install selected skills from a single repo (--skill / --list)
|
|
7509
7552
|
*/ async function installMultiSkillFromRepo(ref, skillNames, listOnly, ctx, targetAgents, installGlobally, installMode, spinner) {
|
|
7510
7553
|
const skillManager = new SkillManager(void 0, {
|
|
7511
|
-
global: installGlobally
|
|
7554
|
+
global: installGlobally,
|
|
7555
|
+
noManifest: ctx.skipManifest
|
|
7512
7556
|
});
|
|
7513
7557
|
if (listOnly) {
|
|
7514
7558
|
spinner.start('Discovering skills...');
|
|
@@ -7601,7 +7645,8 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
7601
7645
|
}
|
|
7602
7646
|
// Execute installation for all skills in parallel
|
|
7603
7647
|
const skillManager = new SkillManager(void 0, {
|
|
7604
|
-
global: installGlobally
|
|
7648
|
+
global: installGlobally,
|
|
7649
|
+
noManifest: ctx.skipManifest
|
|
7605
7650
|
});
|
|
7606
7651
|
const successfulSkills = [];
|
|
7607
7652
|
const failedSkills = [];
|
|
@@ -7740,7 +7785,7 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
7740
7785
|
* Behavior:
|
|
7741
7786
|
* - Single skill install: Prompts for agents/mode (stored config as defaults)
|
|
7742
7787
|
* - Reinstall all (no args): Uses stored config directly, no confirmation
|
|
7743
|
-
*/ 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)=>{
|
|
7788
|
+
*/ 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)').option('--skip-manifest', 'Skip all skills.json and skills.lock writes (for platform integration)').action(async (skills, options)=>{
|
|
7744
7789
|
// Handle --all flag implications
|
|
7745
7790
|
if (options.all) {
|
|
7746
7791
|
options.yes = true;
|
|
@@ -7752,6 +7797,8 @@ const DEFAULT_INSTALL_DIR = '.skills';
|
|
|
7752
7797
|
const token = authManager.getToken(options.registry);
|
|
7753
7798
|
if (token) options.token = token;
|
|
7754
7799
|
}
|
|
7800
|
+
// Resolve skip-manifest mode: --skip-manifest flag > RESKILL_NO_MANIFEST env
|
|
7801
|
+
if (!options.skipManifest && '1' === process.env.RESKILL_NO_MANIFEST) options.skipManifest = true;
|
|
7755
7802
|
// Create execution context
|
|
7756
7803
|
const ctx = createInstallContext(skills, options);
|
|
7757
7804
|
// Print banner
|
|
@@ -9565,7 +9612,7 @@ async function publishAction(skillPath, options) {
|
|
|
9565
9612
|
// ============================================================================
|
|
9566
9613
|
// Command Definition
|
|
9567
9614
|
// ============================================================================
|
|
9568
|
-
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('
|
|
9615
|
+
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('--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').option('-g, --group <path>', 'Publish skill into a group (e.g., "kanyun/frontend")').option('-t, --token <token>', 'Auth token for registry API requests (for CI/CD)').action(publishAction);
|
|
9569
9616
|
/**
|
|
9570
9617
|
* uninstall command - Uninstall one or more skills
|
|
9571
9618
|
*/ 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)=>{
|
|
@@ -38,6 +38,14 @@ export declare class ConfigLoader {
|
|
|
38
38
|
* Get installation directory (resolved absolute path)
|
|
39
39
|
*/
|
|
40
40
|
getInstallDir(): string;
|
|
41
|
+
private _noManifest;
|
|
42
|
+
/**
|
|
43
|
+
* Enable/disable no-manifest mode.
|
|
44
|
+
* When enabled, all write operations (save, create, addSkill, updateDefaults,
|
|
45
|
+
* addRegistry) become no-ops. Read operations are unaffected.
|
|
46
|
+
*/
|
|
47
|
+
setNoManifest(enabled: boolean): void;
|
|
48
|
+
get noManifest(): boolean;
|
|
41
49
|
/**
|
|
42
50
|
* Check if configuration file exists
|
|
43
51
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/core/config-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAiCpE;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGrD,CAAC;AAMF;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,MAAM,CAA2B;gBAE7B,WAAW,CAAC,EAAE,MAAM;IAShC;;OAEG;IACH,cAAc,IAAI,MAAM;IAIxB;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,aAAa,IAAI,MAAM;IASvB;;OAEG;IACH,MAAM,IAAI,OAAO;IAIjB;;;;OAIG;IACH,IAAI,IAAI,UAAU;IAiBlB;;OAEG;IACH,MAAM,IAAI,UAAU;IAKpB;;;;;OAKG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/core/config-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAiCpE;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA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GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IA2BnD;;;;;;;;;OASG;IACH,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAoBtC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAuCzB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA8B1B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAiBzC;;;;;;;;;;OAUG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAkB5C;;;;;;;OAOG;IACH,OAAO,CAAC,sBAAsB;IAa9B;;;;OAIG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAYlC;;OAEG;IACH,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAUnC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAK/B;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAS7C;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAU1B;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAK3B;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -12,7 +12,15 @@ export declare class LockManager {
|
|
|
12
12
|
private projectRoot;
|
|
13
13
|
private lockPath;
|
|
14
14
|
private lockData;
|
|
15
|
+
private _noManifest;
|
|
15
16
|
constructor(projectRoot?: string);
|
|
17
|
+
/**
|
|
18
|
+
* Enable/disable no-manifest mode.
|
|
19
|
+
* When enabled, disk write operations (save, set, remove) become no-ops.
|
|
20
|
+
* lockSkill() still returns a LockedSkill but does not persist it.
|
|
21
|
+
*/
|
|
22
|
+
setNoManifest(enabled: boolean): void;
|
|
23
|
+
get noManifest(): boolean;
|
|
16
24
|
/**
|
|
17
25
|
* Get lock file path
|
|
18
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock-manager.d.ts","sourceRoot":"","sources":["../../src/core/lock-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGjE;;GAEG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;;GAIG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAA2B;
|
|
1
|
+
{"version":3,"file":"lock-manager.d.ts","sourceRoot":"","sources":["../../src/core/lock-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGjE;;GAEG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;;GAIG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,WAAW,CAAS;gBAEhB,WAAW,CAAC,EAAE,MAAM;IAKhC;;;;OAIG;IACH,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIrC,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;OAEG;IACH,WAAW,IAAI,MAAM;IAIrB;;OAEG;IACH,MAAM,IAAI,OAAO;IAIjB;;OAEG;IACH,IAAI,IAAI,UAAU;IAsBlB;;OAEG;IACH,MAAM,IAAI,UAAU;IAKpB;;OAEG;IACH,IAAI,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI;IAUnC;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAK1C;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI;IAQ3C;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAW7B;;OAEG;IACH,SAAS,CACP,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GACA,WAAW;IAmBd;;OAEG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC;IAKrC;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAK1B;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAQtD;;OAEG;IACH,KAAK,IAAI,IAAI;IAQb;;OAEG;IACH,MAAM,IAAI,IAAI;CAOf;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -9,6 +9,8 @@ import { type ParsedSkillWithPath } from './skill-parser.js';
|
|
|
9
9
|
export interface SkillManagerOptions {
|
|
10
10
|
/** Global mode, install to ~/.agents/skills/ */
|
|
11
11
|
global?: boolean;
|
|
12
|
+
/** Skip all skills.json and skills.lock writes (platform integration mode) */
|
|
13
|
+
noManifest?: boolean;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* SkillManager - Core Skill management class
|
|
@@ -30,6 +32,11 @@ export declare class SkillManager {
|
|
|
30
32
|
private lockManager;
|
|
31
33
|
private isGlobal;
|
|
32
34
|
constructor(projectRoot?: string, options?: SkillManagerOptions);
|
|
35
|
+
/**
|
|
36
|
+
* Enable/disable no-manifest mode on both ConfigLoader and LockManager.
|
|
37
|
+
* When enabled, no skills.json or skills.lock writes occur.
|
|
38
|
+
*/
|
|
39
|
+
setNoManifest(enabled: boolean): void;
|
|
33
40
|
/**
|
|
34
41
|
* Check if in global mode
|
|
35
42
|
*/
|
|
@@ -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;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;
|
|
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;IACjB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;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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@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2259
2259
|
return __WEBPACK_EXTERNAL_MODULE_node_path__.join(this.projectRoot, installDir);
|
|
2260
2260
|
}
|
|
2261
2261
|
// ==========================================================================
|
|
2262
|
+
// No-Manifest Mode (platform integration)
|
|
2263
|
+
// ==========================================================================
|
|
2264
|
+
_noManifest = false;
|
|
2265
|
+
/**
|
|
2266
|
+
* Enable/disable no-manifest mode.
|
|
2267
|
+
* When enabled, all write operations (save, create, addSkill, updateDefaults,
|
|
2268
|
+
* addRegistry) become no-ops. Read operations are unaffected.
|
|
2269
|
+
*/ setNoManifest(enabled) {
|
|
2270
|
+
this._noManifest = enabled;
|
|
2271
|
+
}
|
|
2272
|
+
get noManifest() {
|
|
2273
|
+
return this._noManifest;
|
|
2274
|
+
}
|
|
2275
|
+
// ==========================================================================
|
|
2262
2276
|
// File Operations
|
|
2263
2277
|
// ==========================================================================
|
|
2264
2278
|
/**
|
|
@@ -2294,7 +2308,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2294
2308
|
*/ save(config) {
|
|
2295
2309
|
const toSave = config ?? this.config;
|
|
2296
2310
|
if (!toSave) throw new Error('No config to save');
|
|
2297
|
-
writeJson(this.configPath, toSave);
|
|
2311
|
+
if (!this._noManifest) writeJson(this.configPath, toSave);
|
|
2298
2312
|
this.config = toSave;
|
|
2299
2313
|
}
|
|
2300
2314
|
/**
|
|
@@ -2302,6 +2316,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2302
2316
|
*
|
|
2303
2317
|
* @returns true if file was created, false if it already existed
|
|
2304
2318
|
*/ ensureExists() {
|
|
2319
|
+
if (this._noManifest) return false;
|
|
2305
2320
|
if (this.exists()) return false;
|
|
2306
2321
|
this.create();
|
|
2307
2322
|
return true;
|
|
@@ -2364,6 +2379,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2364
2379
|
*
|
|
2365
2380
|
* @param updates - Partial defaults to merge
|
|
2366
2381
|
*/ updateDefaults(updates) {
|
|
2382
|
+
if (this._noManifest) return;
|
|
2367
2383
|
this.ensureConfigLoaded();
|
|
2368
2384
|
if (this.config) {
|
|
2369
2385
|
this.config.defaults = {
|
|
@@ -2499,6 +2515,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2499
2515
|
*
|
|
2500
2516
|
* Also auto-adds the registry to the registries field if it's a well-known registry.
|
|
2501
2517
|
*/ addSkill(name, ref) {
|
|
2518
|
+
if (this._noManifest) return;
|
|
2502
2519
|
this.ensureConfigLoaded();
|
|
2503
2520
|
if (this.config) {
|
|
2504
2521
|
this.config.skills[name] = ref;
|
|
@@ -2519,6 +2536,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2519
2536
|
* @param name - Registry name (e.g., 'github', 'gitlab', 'internal')
|
|
2520
2537
|
* @param url - Registry URL (e.g., 'https://github.com')
|
|
2521
2538
|
*/ addRegistry(name, url) {
|
|
2539
|
+
if (this._noManifest) return;
|
|
2522
2540
|
if (!this.config) // Config not loaded - this is expected when called before load()/create()
|
|
2523
2541
|
// Callers like addSkill() ensure config is loaded before calling this
|
|
2524
2542
|
return;
|
|
@@ -2552,6 +2570,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
2552
2570
|
*
|
|
2553
2571
|
* @returns true if skill was removed, false if it didn't exist
|
|
2554
2572
|
*/ removeSkill(name) {
|
|
2573
|
+
if (this._noManifest) return false;
|
|
2555
2574
|
this.ensureConfigLoaded();
|
|
2556
2575
|
if (this.config?.skills[name]) {
|
|
2557
2576
|
delete this.config.skills[name];
|
|
@@ -3145,11 +3164,22 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
3145
3164
|
projectRoot;
|
|
3146
3165
|
lockPath;
|
|
3147
3166
|
lockData = null;
|
|
3167
|
+
_noManifest = false;
|
|
3148
3168
|
constructor(projectRoot){
|
|
3149
3169
|
this.projectRoot = projectRoot || process.cwd();
|
|
3150
3170
|
this.lockPath = getSkillsLockPath(this.projectRoot);
|
|
3151
3171
|
}
|
|
3152
3172
|
/**
|
|
3173
|
+
* Enable/disable no-manifest mode.
|
|
3174
|
+
* When enabled, disk write operations (save, set, remove) become no-ops.
|
|
3175
|
+
* lockSkill() still returns a LockedSkill but does not persist it.
|
|
3176
|
+
*/ setNoManifest(enabled) {
|
|
3177
|
+
this._noManifest = enabled;
|
|
3178
|
+
}
|
|
3179
|
+
get noManifest() {
|
|
3180
|
+
return this._noManifest;
|
|
3181
|
+
}
|
|
3182
|
+
/**
|
|
3153
3183
|
* Get lock file path
|
|
3154
3184
|
*/ getLockPath() {
|
|
3155
3185
|
return this.lockPath;
|
|
@@ -3187,6 +3217,7 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
3187
3217
|
/**
|
|
3188
3218
|
* Save lock file
|
|
3189
3219
|
*/ save(lockToSave) {
|
|
3220
|
+
if (this._noManifest) return;
|
|
3190
3221
|
const toSave = lockToSave || this.lockData;
|
|
3191
3222
|
if (!toSave) throw new Error('No lock to save');
|
|
3192
3223
|
writeJson(this.lockPath, toSave);
|
|
@@ -3203,11 +3234,12 @@ ${CURSOR_BRIDGE_MARKER}
|
|
|
3203
3234
|
*/ set(name, skill) {
|
|
3204
3235
|
const lock = this.load();
|
|
3205
3236
|
lock.skills[name] = skill;
|
|
3206
|
-
this.save();
|
|
3237
|
+
if (!this._noManifest) this.save();
|
|
3207
3238
|
}
|
|
3208
3239
|
/**
|
|
3209
3240
|
* Remove locked skill
|
|
3210
3241
|
*/ remove(name) {
|
|
3242
|
+
if (this._noManifest) return false;
|
|
3211
3243
|
const lock = this.load();
|
|
3212
3244
|
if (lock.skills[name]) {
|
|
3213
3245
|
delete lock.skills[name];
|
|
@@ -4351,6 +4383,14 @@ class RegistryResolver {
|
|
|
4351
4383
|
this.resolver = new GitResolver('github', void 0, (registryName)=>this.config.getRegistryUrl(registryName));
|
|
4352
4384
|
this.httpResolver = new HttpResolver();
|
|
4353
4385
|
this.registryResolver = new RegistryResolver();
|
|
4386
|
+
if (options?.noManifest ?? '1' === process.env.RESKILL_NO_MANIFEST) this.setNoManifest(true);
|
|
4387
|
+
}
|
|
4388
|
+
/**
|
|
4389
|
+
* Enable/disable no-manifest mode on both ConfigLoader and LockManager.
|
|
4390
|
+
* When enabled, no skills.json or skills.lock writes occur.
|
|
4391
|
+
*/ setNoManifest(enabled) {
|
|
4392
|
+
this.config.setNoManifest(enabled);
|
|
4393
|
+
this.lockManager.setNoManifest(enabled);
|
|
4354
4394
|
}
|
|
4355
4395
|
/**
|
|
4356
4396
|
* Check if in global mode
|