rulesync 7.12.1 → 7.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.
@@ -3238,7 +3238,10 @@ function canonicalToToolHooks({
3238
3238
  const entries = [];
3239
3239
  for (const [matcherKey, defs] of byMatcher) {
3240
3240
  const hooks = defs.map((def) => {
3241
- const command = def.command !== void 0 && def.command !== null && !def.command.startsWith("$") ? `${converterConfig.projectDirVar}/${def.command.replace(/^\.\//, "")}` : def.command;
3241
+ const commandText = def.command;
3242
+ const trimmedCommand = typeof commandText === "string" ? commandText.trimStart() : void 0;
3243
+ const shouldPrefix = typeof trimmedCommand === "string" && !trimmedCommand.startsWith("$") && (!converterConfig.prefixDotRelativeCommandsOnly || trimmedCommand.startsWith("."));
3244
+ const command = shouldPrefix && typeof trimmedCommand === "string" ? `${converterConfig.projectDirVar}/${trimmedCommand.replace(/^\.\//, "")}` : def.command;
3242
3245
  return {
3243
3246
  type: def.type ?? "command",
3244
3247
  ...command !== void 0 && command !== null && { command },
@@ -3388,7 +3391,8 @@ var CLAUDE_CONVERTER_CONFIG = {
3388
3391
  supportedEvents: CLAUDE_HOOK_EVENTS,
3389
3392
  canonicalToToolEventNames: CANONICAL_TO_CLAUDE_EVENT_NAMES,
3390
3393
  toolToCanonicalEventNames: CLAUDE_TO_CANONICAL_EVENT_NAMES,
3391
- projectDirVar: "$CLAUDE_PROJECT_DIR"
3394
+ projectDirVar: "$CLAUDE_PROJECT_DIR",
3395
+ prefixDotRelativeCommandsOnly: true
3392
3396
  };
3393
3397
  var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
3394
3398
  constructor(params) {
@@ -3918,7 +3922,10 @@ function canonicalToGeminicliHooks(config) {
3918
3922
  const entries = [];
3919
3923
  for (const [matcherKey, defs] of byMatcher) {
3920
3924
  const hooks = defs.map((def) => {
3921
- const command = def.command !== void 0 && def.command !== null && !def.command.startsWith("$") ? `$GEMINI_PROJECT_DIR/${def.command.replace(/^\.\//, "")}` : def.command;
3925
+ const commandText = def.command;
3926
+ const trimmedCommand = typeof commandText === "string" ? commandText.trimStart() : void 0;
3927
+ const shouldPrefix = typeof trimmedCommand === "string" && !trimmedCommand.startsWith("$") && trimmedCommand.startsWith(".");
3928
+ const command = shouldPrefix && typeof trimmedCommand === "string" ? `$GEMINI_PROJECT_DIR/${trimmedCommand.replace(/^\.\//, "")}` : def.command;
3922
3929
  return {
3923
3930
  type: def.type ?? "command",
3924
3931
  ...command !== void 0 && command !== null && { command },
@@ -7996,7 +8003,8 @@ var RulesyncSkillFrontmatterSchemaInternal = z24.looseObject({
7996
8003
  claudecode: z24.optional(
7997
8004
  z24.looseObject({
7998
8005
  "allowed-tools": z24.optional(z24.array(z24.string())),
7999
- model: z24.optional(z24.string())
8006
+ model: z24.optional(z24.string()),
8007
+ "disable-model-invocation": z24.optional(z24.boolean())
8000
8008
  })
8001
8009
  ),
8002
8010
  codexcli: z24.optional(
@@ -8433,7 +8441,8 @@ var ClaudecodeSkillFrontmatterSchema = z27.looseObject({
8433
8441
  name: z27.string(),
8434
8442
  description: z27.string(),
8435
8443
  "allowed-tools": z27.optional(z27.array(z27.string())),
8436
- model: z27.optional(z27.string())
8444
+ model: z27.optional(z27.string()),
8445
+ "disable-model-invocation": z27.optional(z27.boolean())
8437
8446
  });
8438
8447
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8439
8448
  constructor({
@@ -8501,7 +8510,10 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8501
8510
  const frontmatter = this.getFrontmatter();
8502
8511
  const claudecodeSection = {
8503
8512
  ...frontmatter["allowed-tools"] && { "allowed-tools": frontmatter["allowed-tools"] },
8504
- ...frontmatter.model && { model: frontmatter.model }
8513
+ ...frontmatter.model && { model: frontmatter.model },
8514
+ ...frontmatter["disable-model-invocation"] !== void 0 && {
8515
+ "disable-model-invocation": frontmatter["disable-model-invocation"]
8516
+ }
8505
8517
  };
8506
8518
  const rulesyncFrontmatter = {
8507
8519
  name: frontmatter.name,
@@ -8534,6 +8546,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8534
8546
  },
8535
8547
  ...rulesyncFrontmatter.claudecode?.model && {
8536
8548
  model: rulesyncFrontmatter.claudecode.model
8549
+ },
8550
+ ...rulesyncFrontmatter.claudecode?.["disable-model-invocation"] !== void 0 && {
8551
+ "disable-model-invocation": rulesyncFrontmatter.claudecode["disable-model-invocation"]
8537
8552
  }
8538
8553
  };
8539
8554
  const settablePaths = _ClaudecodeSkill.getSettablePaths({ global });
@@ -2973,7 +2973,10 @@ function canonicalToToolHooks({
2973
2973
  const entries = [];
2974
2974
  for (const [matcherKey, defs] of byMatcher) {
2975
2975
  const hooks = defs.map((def) => {
2976
- const command = def.command !== void 0 && def.command !== null && !def.command.startsWith("$") ? `${converterConfig.projectDirVar}/${def.command.replace(/^\.\//, "")}` : def.command;
2976
+ const commandText = def.command;
2977
+ const trimmedCommand = typeof commandText === "string" ? commandText.trimStart() : void 0;
2978
+ const shouldPrefix = typeof trimmedCommand === "string" && !trimmedCommand.startsWith("$") && (!converterConfig.prefixDotRelativeCommandsOnly || trimmedCommand.startsWith("."));
2979
+ const command = shouldPrefix && typeof trimmedCommand === "string" ? `${converterConfig.projectDirVar}/${trimmedCommand.replace(/^\.\//, "")}` : def.command;
2977
2980
  return {
2978
2981
  type: def.type ?? "command",
2979
2982
  ...command !== void 0 && command !== null && { command },
@@ -3123,7 +3126,8 @@ var CLAUDE_CONVERTER_CONFIG = {
3123
3126
  supportedEvents: CLAUDE_HOOK_EVENTS,
3124
3127
  canonicalToToolEventNames: CANONICAL_TO_CLAUDE_EVENT_NAMES,
3125
3128
  toolToCanonicalEventNames: CLAUDE_TO_CANONICAL_EVENT_NAMES,
3126
- projectDirVar: "$CLAUDE_PROJECT_DIR"
3129
+ projectDirVar: "$CLAUDE_PROJECT_DIR",
3130
+ prefixDotRelativeCommandsOnly: true
3127
3131
  };
3128
3132
  var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
3129
3133
  constructor(params) {
@@ -3653,7 +3657,10 @@ function canonicalToGeminicliHooks(config) {
3653
3657
  const entries = [];
3654
3658
  for (const [matcherKey, defs] of byMatcher) {
3655
3659
  const hooks = defs.map((def) => {
3656
- const command = def.command !== void 0 && def.command !== null && !def.command.startsWith("$") ? `$GEMINI_PROJECT_DIR/${def.command.replace(/^\.\//, "")}` : def.command;
3660
+ const commandText = def.command;
3661
+ const trimmedCommand = typeof commandText === "string" ? commandText.trimStart() : void 0;
3662
+ const shouldPrefix = typeof trimmedCommand === "string" && !trimmedCommand.startsWith("$") && trimmedCommand.startsWith(".");
3663
+ const command = shouldPrefix && typeof trimmedCommand === "string" ? `$GEMINI_PROJECT_DIR/${trimmedCommand.replace(/^\.\//, "")}` : def.command;
3657
3664
  return {
3658
3665
  type: def.type ?? "command",
3659
3666
  ...command !== void 0 && command !== null && { command },
@@ -7731,7 +7738,8 @@ var RulesyncSkillFrontmatterSchemaInternal = import_mini23.z.looseObject({
7731
7738
  claudecode: import_mini23.z.optional(
7732
7739
  import_mini23.z.looseObject({
7733
7740
  "allowed-tools": import_mini23.z.optional(import_mini23.z.array(import_mini23.z.string())),
7734
- model: import_mini23.z.optional(import_mini23.z.string())
7741
+ model: import_mini23.z.optional(import_mini23.z.string()),
7742
+ "disable-model-invocation": import_mini23.z.optional(import_mini23.z.boolean())
7735
7743
  })
7736
7744
  ),
7737
7745
  codexcli: import_mini23.z.optional(
@@ -8168,7 +8176,8 @@ var ClaudecodeSkillFrontmatterSchema = import_mini26.z.looseObject({
8168
8176
  name: import_mini26.z.string(),
8169
8177
  description: import_mini26.z.string(),
8170
8178
  "allowed-tools": import_mini26.z.optional(import_mini26.z.array(import_mini26.z.string())),
8171
- model: import_mini26.z.optional(import_mini26.z.string())
8179
+ model: import_mini26.z.optional(import_mini26.z.string()),
8180
+ "disable-model-invocation": import_mini26.z.optional(import_mini26.z.boolean())
8172
8181
  });
8173
8182
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8174
8183
  constructor({
@@ -8236,7 +8245,10 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8236
8245
  const frontmatter = this.getFrontmatter();
8237
8246
  const claudecodeSection = {
8238
8247
  ...frontmatter["allowed-tools"] && { "allowed-tools": frontmatter["allowed-tools"] },
8239
- ...frontmatter.model && { model: frontmatter.model }
8248
+ ...frontmatter.model && { model: frontmatter.model },
8249
+ ...frontmatter["disable-model-invocation"] !== void 0 && {
8250
+ "disable-model-invocation": frontmatter["disable-model-invocation"]
8251
+ }
8240
8252
  };
8241
8253
  const rulesyncFrontmatter = {
8242
8254
  name: frontmatter.name,
@@ -8269,6 +8281,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8269
8281
  },
8270
8282
  ...rulesyncFrontmatter.claudecode?.model && {
8271
8283
  model: rulesyncFrontmatter.claudecode.model
8284
+ },
8285
+ ...rulesyncFrontmatter.claudecode?.["disable-model-invocation"] !== void 0 && {
8286
+ "disable-model-invocation": rulesyncFrontmatter.claudecode["disable-model-invocation"]
8272
8287
  }
8273
8288
  };
8274
8289
  const settablePaths = _ClaudecodeSkill.getSettablePaths({ global });
@@ -20192,7 +20207,7 @@ async function updateCommand(currentVersion, options) {
20192
20207
  }
20193
20208
 
20194
20209
  // src/cli/index.ts
20195
- var getVersion = () => "7.12.1";
20210
+ var getVersion = () => "7.13.0";
20196
20211
  var main = async () => {
20197
20212
  const program = new import_commander.Command();
20198
20213
  const version = getVersion();
package/dist/cli/index.js CHANGED
@@ -60,7 +60,7 @@ import {
60
60
  removeTempDirectory,
61
61
  stringifyFrontmatter,
62
62
  writeFileContent
63
- } from "../chunk-3FGQWAXN.js";
63
+ } from "../chunk-JGRHJWG5.js";
64
64
 
65
65
  // src/cli/index.ts
66
66
  import { Command } from "commander";
@@ -3807,7 +3807,7 @@ async function updateCommand(currentVersion, options) {
3807
3807
  }
3808
3808
 
3809
3809
  // src/cli/index.ts
3810
- var getVersion = () => "7.12.1";
3810
+ var getVersion = () => "7.13.0";
3811
3811
  var main = async () => {
3812
3812
  const program = new Command();
3813
3813
  const version = getVersion();
package/dist/index.cjs CHANGED
@@ -3266,7 +3266,10 @@ function canonicalToToolHooks({
3266
3266
  const entries = [];
3267
3267
  for (const [matcherKey, defs] of byMatcher) {
3268
3268
  const hooks = defs.map((def) => {
3269
- const command = def.command !== void 0 && def.command !== null && !def.command.startsWith("$") ? `${converterConfig.projectDirVar}/${def.command.replace(/^\.\//, "")}` : def.command;
3269
+ const commandText = def.command;
3270
+ const trimmedCommand = typeof commandText === "string" ? commandText.trimStart() : void 0;
3271
+ const shouldPrefix = typeof trimmedCommand === "string" && !trimmedCommand.startsWith("$") && (!converterConfig.prefixDotRelativeCommandsOnly || trimmedCommand.startsWith("."));
3272
+ const command = shouldPrefix && typeof trimmedCommand === "string" ? `${converterConfig.projectDirVar}/${trimmedCommand.replace(/^\.\//, "")}` : def.command;
3270
3273
  return {
3271
3274
  type: def.type ?? "command",
3272
3275
  ...command !== void 0 && command !== null && { command },
@@ -3416,7 +3419,8 @@ var CLAUDE_CONVERTER_CONFIG = {
3416
3419
  supportedEvents: CLAUDE_HOOK_EVENTS,
3417
3420
  canonicalToToolEventNames: CANONICAL_TO_CLAUDE_EVENT_NAMES,
3418
3421
  toolToCanonicalEventNames: CLAUDE_TO_CANONICAL_EVENT_NAMES,
3419
- projectDirVar: "$CLAUDE_PROJECT_DIR"
3422
+ projectDirVar: "$CLAUDE_PROJECT_DIR",
3423
+ prefixDotRelativeCommandsOnly: true
3420
3424
  };
3421
3425
  var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
3422
3426
  constructor(params) {
@@ -3946,7 +3950,10 @@ function canonicalToGeminicliHooks(config) {
3946
3950
  const entries = [];
3947
3951
  for (const [matcherKey, defs] of byMatcher) {
3948
3952
  const hooks = defs.map((def) => {
3949
- const command = def.command !== void 0 && def.command !== null && !def.command.startsWith("$") ? `$GEMINI_PROJECT_DIR/${def.command.replace(/^\.\//, "")}` : def.command;
3953
+ const commandText = def.command;
3954
+ const trimmedCommand = typeof commandText === "string" ? commandText.trimStart() : void 0;
3955
+ const shouldPrefix = typeof trimmedCommand === "string" && !trimmedCommand.startsWith("$") && trimmedCommand.startsWith(".");
3956
+ const command = shouldPrefix && typeof trimmedCommand === "string" ? `$GEMINI_PROJECT_DIR/${trimmedCommand.replace(/^\.\//, "")}` : def.command;
3950
3957
  return {
3951
3958
  type: def.type ?? "command",
3952
3959
  ...command !== void 0 && command !== null && { command },
@@ -8024,7 +8031,8 @@ var RulesyncSkillFrontmatterSchemaInternal = import_mini24.z.looseObject({
8024
8031
  claudecode: import_mini24.z.optional(
8025
8032
  import_mini24.z.looseObject({
8026
8033
  "allowed-tools": import_mini24.z.optional(import_mini24.z.array(import_mini24.z.string())),
8027
- model: import_mini24.z.optional(import_mini24.z.string())
8034
+ model: import_mini24.z.optional(import_mini24.z.string()),
8035
+ "disable-model-invocation": import_mini24.z.optional(import_mini24.z.boolean())
8028
8036
  })
8029
8037
  ),
8030
8038
  codexcli: import_mini24.z.optional(
@@ -8461,7 +8469,8 @@ var ClaudecodeSkillFrontmatterSchema = import_mini27.z.looseObject({
8461
8469
  name: import_mini27.z.string(),
8462
8470
  description: import_mini27.z.string(),
8463
8471
  "allowed-tools": import_mini27.z.optional(import_mini27.z.array(import_mini27.z.string())),
8464
- model: import_mini27.z.optional(import_mini27.z.string())
8472
+ model: import_mini27.z.optional(import_mini27.z.string()),
8473
+ "disable-model-invocation": import_mini27.z.optional(import_mini27.z.boolean())
8465
8474
  });
8466
8475
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8467
8476
  constructor({
@@ -8529,7 +8538,10 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8529
8538
  const frontmatter = this.getFrontmatter();
8530
8539
  const claudecodeSection = {
8531
8540
  ...frontmatter["allowed-tools"] && { "allowed-tools": frontmatter["allowed-tools"] },
8532
- ...frontmatter.model && { model: frontmatter.model }
8541
+ ...frontmatter.model && { model: frontmatter.model },
8542
+ ...frontmatter["disable-model-invocation"] !== void 0 && {
8543
+ "disable-model-invocation": frontmatter["disable-model-invocation"]
8544
+ }
8533
8545
  };
8534
8546
  const rulesyncFrontmatter = {
8535
8547
  name: frontmatter.name,
@@ -8562,6 +8574,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8562
8574
  },
8563
8575
  ...rulesyncFrontmatter.claudecode?.model && {
8564
8576
  model: rulesyncFrontmatter.claudecode.model
8577
+ },
8578
+ ...rulesyncFrontmatter.claudecode?.["disable-model-invocation"] !== void 0 && {
8579
+ "disable-model-invocation": rulesyncFrontmatter.claudecode["disable-model-invocation"]
8565
8580
  }
8566
8581
  };
8567
8582
  const settablePaths = _ClaudecodeSkill.getSettablePaths({ global });
package/dist/index.d.cts CHANGED
@@ -166,6 +166,7 @@ declare const RulesyncSkillFrontmatterSchemaInternal: z.ZodMiniObject<{
166
166
  claudecode: z.ZodMiniOptional<z.ZodMiniObject<{
167
167
  "allowed-tools": z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
168
168
  model: z.ZodMiniOptional<z.ZodMiniString<string>>;
169
+ "disable-model-invocation": z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
169
170
  }, z.core.$loose>>;
170
171
  codexcli: z.ZodMiniOptional<z.ZodMiniObject<{
171
172
  "short-description": z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -186,6 +187,7 @@ type RulesyncSkillFrontmatterInput = {
186
187
  claudecode?: {
187
188
  "allowed-tools"?: string[];
188
189
  model?: string;
190
+ "disable-model-invocation"?: boolean;
189
191
  };
190
192
  codexcli?: {
191
193
  "short-description"?: string;
package/dist/index.d.ts CHANGED
@@ -166,6 +166,7 @@ declare const RulesyncSkillFrontmatterSchemaInternal: z.ZodMiniObject<{
166
166
  claudecode: z.ZodMiniOptional<z.ZodMiniObject<{
167
167
  "allowed-tools": z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
168
168
  model: z.ZodMiniOptional<z.ZodMiniString<string>>;
169
+ "disable-model-invocation": z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
169
170
  }, z.core.$loose>>;
170
171
  codexcli: z.ZodMiniOptional<z.ZodMiniObject<{
171
172
  "short-description": z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -186,6 +187,7 @@ type RulesyncSkillFrontmatterInput = {
186
187
  claudecode?: {
187
188
  "allowed-tools"?: string[];
188
189
  model?: string;
190
+ "disable-model-invocation"?: boolean;
189
191
  };
190
192
  codexcli?: {
191
193
  "short-description"?: string;
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  generate,
7
7
  importFromTool,
8
8
  logger
9
- } from "./chunk-3FGQWAXN.js";
9
+ } from "./chunk-JGRHJWG5.js";
10
10
 
11
11
  // src/index.ts
12
12
  async function generate2(options = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "7.12.1",
3
+ "version": "7.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",