@cg3/equip 0.5.1 → 0.5.3

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/bin/equip.js CHANGED
@@ -210,12 +210,12 @@ function reconcileState(toolName, pkg) {
210
210
  transport: entry.command ? "stdio" : "http",
211
211
  };
212
212
 
213
- // Check for rules
213
+ // Check for rules (only on platforms that support writable rules)
214
214
  if (def.rulesPath) {
215
215
  const rulesPath = def.rulesPath();
216
216
  try {
217
217
  const content = _fs.readFileSync(rulesPath, "utf-8");
218
- const versionMatch = content.match(new RegExp(`<!-- ${toolName}:v([\\d.]+) -->`));
218
+ const versionMatch = content.match(new RegExp(`<!-- ${toolName}:v([0-9.]+) -->`));
219
219
  if (versionMatch) {
220
220
  record.rulesPath = rulesPath;
221
221
  record.rulesVersion = versionMatch[1];
@@ -223,15 +223,17 @@ function reconcileState(toolName, pkg) {
223
223
  } catch {}
224
224
  }
225
225
 
226
- // Check for hooks (look for tool's hook directory)
227
- const hookDir = _path.join(require("os").homedir(), `.${toolName}`, "hooks");
228
- try {
229
- const hookFiles = _fs.readdirSync(hookDir).filter(f => f.endsWith(".js"));
230
- if (hookFiles.length > 0) {
231
- record.hookDir = hookDir;
232
- record.hookScripts = hookFiles;
233
- }
234
- } catch {}
226
+ // Check for hooks (only on platforms that support hooks)
227
+ if (def.hooks) {
228
+ const hookDir = _path.join(require("os").homedir(), `.${toolName}`, "hooks");
229
+ try {
230
+ const hookFiles = _fs.readdirSync(hookDir).filter(f => f.endsWith(".js"));
231
+ if (hookFiles.length > 0) {
232
+ record.hookDir = hookDir;
233
+ record.hookScripts = hookFiles;
234
+ }
235
+ } catch {}
236
+ }
235
237
 
236
238
  trackInstall(toolName, pkg, id, record);
237
239
  count++;
@@ -107,7 +107,7 @@ function runDoctor() {
107
107
  else {
108
108
  try {
109
109
  const rulesContent = fs.readFileSync(rulesPath, "utf-8");
110
- const versionMatch = rulesContent.match(new RegExp(`<!-- ${toolName}:v([\\d.]+) -->`));
110
+ const versionMatch = rulesContent.match(new RegExp(`<!-- ${toolName}:v([0-9.]+) -->`));
111
111
  if (!versionMatch) {
112
112
  cli.warn(` ${def.name}: rules block not found in ${sanitizePath(rulesPath)}`);
113
113
  issues++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cg3/equip",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Universal MCP + behavioral rules installer for AI coding agents",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",