rulesync 8.24.0 → 8.25.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/dist/cli/index.js CHANGED
@@ -79,7 +79,7 @@ import {
79
79
  stringifyFrontmatter,
80
80
  toPosixPath,
81
81
  writeFileContent
82
- } from "../chunk-KWUW4DM2.js";
82
+ } from "../chunk-YJH5W5OM.js";
83
83
 
84
84
  // src/cli/index.ts
85
85
  import { Command } from "commander";
@@ -1306,6 +1306,7 @@ var GITIGNORE_ENTRY_REGISTRY = [
1306
1306
  // Augment Code
1307
1307
  { target: "augmentcode", feature: "rules", entry: "**/.augment/rules/" },
1308
1308
  { target: "augmentcode", feature: "rules", entry: "**/.augment-guidelines" },
1309
+ { target: "augmentcode", feature: "commands", entry: "**/.augment/commands/" },
1309
1310
  { target: "augmentcode", feature: "ignore", entry: "**/.augmentignore" },
1310
1311
  { target: "augmentcode", feature: "permissions", entry: "**/.augment/settings.json" },
1311
1312
  // Claude Code
@@ -1452,9 +1453,9 @@ var GITIGNORE_ENTRY_REGISTRY = [
1452
1453
  // Keep this after ignore entries like "**/.aiignore" so the exception remains effective.
1453
1454
  { target: "common", feature: "general", entry: "!.rulesync/.aiignore" },
1454
1455
  // OpenCode
1455
- { target: "opencode", feature: "commands", entry: "**/.opencode/command/" },
1456
- { target: "opencode", feature: "subagents", entry: "**/.opencode/agent/" },
1457
- { target: "opencode", feature: "skills", entry: "**/.opencode/skill/" },
1456
+ { target: "opencode", feature: "commands", entry: "**/.opencode/commands/" },
1457
+ { target: "opencode", feature: "subagents", entry: "**/.opencode/agents/" },
1458
+ { target: "opencode", feature: "skills", entry: "**/.opencode/skills/" },
1458
1459
  { target: "opencode", feature: "mcp", entry: "**/.opencode/plugins/" },
1459
1460
  { target: "opencode", feature: "general", entry: "**/.opencode/memories/" },
1460
1461
  {
@@ -1503,12 +1504,17 @@ var GITIGNORE_ENTRY_REGISTRY = [
1503
1504
  { target: "takt", feature: "general", entry: "**/.takt/.cache/" },
1504
1505
  { target: "takt", feature: "general", entry: "**/.takt/config.yaml" },
1505
1506
  // Windsurf
1507
+ { target: "windsurf", feature: "rules", entry: "**/.windsurf/rules/" },
1508
+ { target: "windsurf", feature: "commands", entry: "**/.windsurf/workflows/" },
1509
+ { target: "windsurf", feature: "mcp", entry: "**/.windsurf/mcp_config.json" },
1510
+ { target: "windsurf", feature: "hooks", entry: "**/.windsurf/hooks.json" },
1506
1511
  { target: "windsurf", feature: "skills", entry: "**/.windsurf/skills/" },
1507
1512
  { target: "windsurf", feature: "skills", entry: "**/.codeium/windsurf/skills/" },
1508
1513
  // Warp
1509
1514
  // `/init` now writes `AGENTS.md` (handled by the shared AGENTS.md entry above).
1510
1515
  { target: "warp", feature: "rules", entry: "**/.warp/" },
1511
1516
  { target: "warp", feature: "mcp", entry: "**/.warp/.mcp.json" },
1517
+ { target: "warp", feature: "skills", entry: "**/.warp/skills/" },
1512
1518
  // Zed
1513
1519
  // `.rules` is the project rules file. `.agents/skills/` is shared with the
1514
1520
  // antigravity targets (already registered above); re-tagging it for `zed`
@@ -4507,7 +4513,6 @@ async function executeConvert(options) {
4507
4513
  }
4508
4514
  const config = await ConfigResolver.resolve({
4509
4515
  targets: [fromTool, ...toTools],
4510
- // eslint-disable-next-line no-type-assertion/no-type-assertion
4511
4516
  features: options.features ?? ["*"],
4512
4517
  global: options.global,
4513
4518
  dryRun: options.dryRun,
@@ -4587,9 +4592,7 @@ async function executeGenerate(options = {}) {
4587
4592
  };
4588
4593
  }
4589
4594
  const config = await ConfigResolver.resolve({
4590
- // eslint-disable-next-line no-type-assertion/no-type-assertion
4591
4595
  targets: options.targets,
4592
- // eslint-disable-next-line no-type-assertion/no-type-assertion
4593
4596
  features: options.features,
4594
4597
  delete: options.delete,
4595
4598
  global: options.global,
@@ -4611,11 +4614,21 @@ async function executeGenerate(options = {}) {
4611
4614
  };
4612
4615
  }
4613
4616
  }
4617
+ function buildGenerateMessage(params) {
4618
+ const { totalCount, config } = params;
4619
+ const targets = config.getTargets().join(", ");
4620
+ const features = config.getFeatures().join(", ");
4621
+ if (totalCount > 0) {
4622
+ return `Generated ${totalCount} file(s) for targets [${targets}] and features [${features}].`;
4623
+ }
4624
+ return `No files needed updating for targets [${targets}] and features [${features}]. 'generate' only writes files whose content changed, so a totalCount of 0 means the outputs are already up to date \u2014 this is a successful no-op, not a failure.`;
4625
+ }
4614
4626
  function buildSuccessResponse2(params) {
4615
4627
  const { generateResult, config } = params;
4616
4628
  const totalCount = calculateTotalCount(generateResult);
4617
4629
  return {
4618
4630
  success: true,
4631
+ message: buildGenerateMessage({ totalCount, config }),
4619
4632
  result: {
4620
4633
  rulesCount: generateResult.rulesCount,
4621
4634
  ignoreCount: generateResult.ignoreCount,
@@ -4644,7 +4657,7 @@ var generateToolSchemas = {
4644
4657
  var generateTools = {
4645
4658
  executeGenerate: {
4646
4659
  name: "executeGenerate",
4647
- description: "Execute the rulesync generate command to create output files for AI tools. Uses rulesync.jsonc settings by default, but options can override them.",
4660
+ description: "Execute the rulesync generate command to create output files for AI tools. Uses rulesync.jsonc settings by default, but options can override them. Idempotent: only files whose content changed are written, so a totalCount of 0 means the outputs are already up to date (a successful no-op), not a failure. See the 'message' field for a human-readable summary.",
4648
4661
  parameters: generateToolSchemas.executeGenerate,
4649
4662
  execute: async (options = {}) => {
4650
4663
  const result = await executeGenerate(options);
@@ -4897,9 +4910,7 @@ async function executeImport(options) {
4897
4910
  };
4898
4911
  }
4899
4912
  const config = await ConfigResolver.resolve({
4900
- // eslint-disable-next-line no-type-assertion/no-type-assertion
4901
4913
  targets: [options.target],
4902
- // eslint-disable-next-line no-type-assertion/no-type-assertion
4903
4914
  features: options.features,
4904
4915
  global: options.global,
4905
4916
  // Always use default outputRoots (process.cwd()) and configPath
@@ -6090,7 +6101,6 @@ var rulesyncTool = {
6090
6101
  async function mcpCommand(logger5, { version }) {
6091
6102
  const server = new FastMCP({
6092
6103
  name: "Rulesync MCP Server",
6093
- // eslint-disable-next-line no-type-assertion/no-type-assertion
6094
6104
  version,
6095
6105
  instructions: "This server handles Rulesync files including rules, commands, MCP, ignore files, subagents and skills for any AI agents. It should be used when you need those files."
6096
6106
  });
@@ -6269,10 +6279,7 @@ async function downloadFile(url, destPath) {
6269
6279
  }
6270
6280
  const fileStream = fs.createWriteStream(destPath);
6271
6281
  let downloadedBytes = 0;
6272
- const bodyReader = Readable.fromWeb(
6273
- // eslint-disable-next-line no-type-assertion/no-type-assertion
6274
- response.body
6275
- );
6282
+ const bodyReader = Readable.fromWeb(response.body);
6276
6283
  const sizeChecker = new Transform({
6277
6284
  transform(chunk, _encoding, callback) {
6278
6285
  downloadedBytes += chunk.length;
@@ -6532,7 +6539,7 @@ function wrapCommand({
6532
6539
  }
6533
6540
 
6534
6541
  // src/cli/index.ts
6535
- var getVersion = () => "8.24.0";
6542
+ var getVersion = () => "8.25.0";
6536
6543
  function wrapCommand2(name, errorCode, handler) {
6537
6544
  return wrapCommand({ name, errorCode, handler, getVersion });
6538
6545
  }
@@ -6625,17 +6632,11 @@ var main = async () => {
6625
6632
  const mode = parseInstallMode(rawMode);
6626
6633
  await installCommand(logger5, {
6627
6634
  mode,
6628
- // eslint-disable-next-line no-type-assertion/no-type-assertion
6629
6635
  update: options.update,
6630
- // eslint-disable-next-line no-type-assertion/no-type-assertion
6631
6636
  frozen: options.frozen,
6632
- // eslint-disable-next-line no-type-assertion/no-type-assertion
6633
6637
  token: options.token,
6634
- // eslint-disable-next-line no-type-assertion/no-type-assertion
6635
6638
  configPath: options.config,
6636
- // eslint-disable-next-line no-type-assertion/no-type-assertion
6637
6639
  verbose: options.verbose,
6638
- // eslint-disable-next-line no-type-assertion/no-type-assertion
6639
6640
  silent: options.silent
6640
6641
  });
6641
6642
  })