rulesync 3.12.8 → 3.13.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 CHANGED
@@ -354,7 +354,7 @@ Simulated commands and subagents allow you to generate simulated commands and su
354
354
  Call your-subagent to achieve something.
355
355
  ```
356
356
 
357
- #### Modular MCP (Experimental)
357
+ ## Modular MCP (Experimental)
358
358
 
359
359
  Rulesync supports compressing tokens consumed by MCP servers [d-kimuson/modular-mcp](https://github.com/d-kimuson/modular-mcp) for context saving. When enabled with `--modular-mcp`, it additionally generates `modular-mcp.json`.
360
360
 
@@ -481,7 +481,7 @@ Focus on the difference of MCP tools usage.
481
481
  |Disabled Modular MCP| 15.7k tokens (7.9%) |
482
482
  |Enabled Modular MCP| 1.3k tokens (0.6%) |
483
483
 
484
- So, in this case, approximately 92% reduction in token usage!
484
+ So, in this case, approximately 92% reduction in MCP tools consumption!
485
485
  </details>
486
486
 
487
487
  ## Contributing
package/dist/index.cjs CHANGED
@@ -42,13 +42,6 @@ var import_consola = require("consola");
42
42
 
43
43
  // src/utils/vitest.ts
44
44
  var isEnvTest = process.env.NODE_ENV === "test";
45
- function getVitestWorkerId() {
46
- const vitestWorkerId = process.env.VITEST_WORKER_ID;
47
- if (!vitestWorkerId) {
48
- throw new Error("VITEST_WORKER_ID is not set");
49
- }
50
- return vitestWorkerId;
51
- }
52
45
 
53
46
  // src/utils/logger.ts
54
47
  var Logger = class {
@@ -172,7 +165,7 @@ async function removeFile(filepath) {
172
165
  }
173
166
  function getHomeDirectory() {
174
167
  if (isEnvTest) {
175
- return (0, import_node_path.join)("./tmp", "tests", "home", getVitestWorkerId());
168
+ throw new Error("getHomeDirectory() must be mocked in test environment");
176
169
  }
177
170
  return import_node_os.default.homedir();
178
171
  }
@@ -5364,11 +5357,17 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5364
5357
  this.body = body;
5365
5358
  }
5366
5359
  toRulesyncRule() {
5360
+ let globs;
5361
+ if (this.isRoot()) {
5362
+ globs = ["**/*"];
5363
+ } else if (this.frontmatter.applyTo) {
5364
+ globs = this.frontmatter.applyTo.split(",").map((g) => g.trim());
5365
+ }
5367
5366
  const rulesyncFrontmatter = {
5368
5367
  targets: ["*"],
5369
5368
  root: this.isRoot(),
5370
5369
  description: this.frontmatter.description,
5371
- globs: this.isRoot() ? ["**/*"] : []
5370
+ globs
5372
5371
  };
5373
5372
  const originalFilePath = this.getRelativeFilePath();
5374
5373
  const relativeFilePath = originalFilePath.replace(/\.instructions\.md$/, ".md");
@@ -7701,7 +7700,7 @@ Attention, again, you are just the planner, so though you can read any files and
7701
7700
  }
7702
7701
 
7703
7702
  // src/cli/index.ts
7704
- var getVersion = () => "3.12.8";
7703
+ var getVersion = () => "3.13.0";
7705
7704
  var main = async () => {
7706
7705
  const program = new import_commander.Command();
7707
7706
  const version = getVersion();
package/dist/index.js CHANGED
@@ -19,13 +19,6 @@ import { consola } from "consola";
19
19
 
20
20
  // src/utils/vitest.ts
21
21
  var isEnvTest = process.env.NODE_ENV === "test";
22
- function getVitestWorkerId() {
23
- const vitestWorkerId = process.env.VITEST_WORKER_ID;
24
- if (!vitestWorkerId) {
25
- throw new Error("VITEST_WORKER_ID is not set");
26
- }
27
- return vitestWorkerId;
28
- }
29
22
 
30
23
  // src/utils/logger.ts
31
24
  var Logger = class {
@@ -149,7 +142,7 @@ async function removeFile(filepath) {
149
142
  }
150
143
  function getHomeDirectory() {
151
144
  if (isEnvTest) {
152
- return join("./tmp", "tests", "home", getVitestWorkerId());
145
+ throw new Error("getHomeDirectory() must be mocked in test environment");
153
146
  }
154
147
  return os.homedir();
155
148
  }
@@ -5341,11 +5334,17 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5341
5334
  this.body = body;
5342
5335
  }
5343
5336
  toRulesyncRule() {
5337
+ let globs;
5338
+ if (this.isRoot()) {
5339
+ globs = ["**/*"];
5340
+ } else if (this.frontmatter.applyTo) {
5341
+ globs = this.frontmatter.applyTo.split(",").map((g) => g.trim());
5342
+ }
5344
5343
  const rulesyncFrontmatter = {
5345
5344
  targets: ["*"],
5346
5345
  root: this.isRoot(),
5347
5346
  description: this.frontmatter.description,
5348
- globs: this.isRoot() ? ["**/*"] : []
5347
+ globs
5349
5348
  };
5350
5349
  const originalFilePath = this.getRelativeFilePath();
5351
5350
  const relativeFilePath = originalFilePath.replace(/\.instructions\.md$/, ".md");
@@ -7678,7 +7677,7 @@ Attention, again, you are just the planner, so though you can read any files and
7678
7677
  }
7679
7678
 
7680
7679
  // src/cli/index.ts
7681
- var getVersion = () => "3.12.8";
7680
+ var getVersion = () => "3.13.0";
7682
7681
  var main = async () => {
7683
7682
  const program = new Command();
7684
7683
  const version = getVersion();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "3.12.8",
3
+ "version": "3.13.0",
4
4
  "description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
5
5
  "keywords": [
6
6
  "ai",