rulesync 4.1.0 → 4.1.1
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 +7 -4
- package/dist/index.cjs +294 -155
- package/dist/index.js +293 -154
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4729,7 +4729,7 @@ var McpProcessor = class extends FeatureProcessor {
|
|
|
4729
4729
|
// src/features/rules/rules-processor.ts
|
|
4730
4730
|
var import_node_path85 = require("path");
|
|
4731
4731
|
var import_toon = require("@toon-format/toon");
|
|
4732
|
-
var
|
|
4732
|
+
var import_mini37 = require("zod/mini");
|
|
4733
4733
|
|
|
4734
4734
|
// src/constants/general.ts
|
|
4735
4735
|
var SKILL_FILE_NAME = "SKILL.md";
|
|
@@ -6478,39 +6478,12 @@ var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
|
|
|
6478
6478
|
}
|
|
6479
6479
|
};
|
|
6480
6480
|
|
|
6481
|
-
// src/features/subagents/copilot-subagent.ts
|
|
6482
|
-
var import_node_path57 = require("path");
|
|
6483
|
-
var CopilotSubagent = class _CopilotSubagent extends SimulatedSubagent {
|
|
6484
|
-
static getSettablePaths() {
|
|
6485
|
-
return {
|
|
6486
|
-
relativeDirPath: (0, import_node_path57.join)(".github", "subagents")
|
|
6487
|
-
};
|
|
6488
|
-
}
|
|
6489
|
-
static async fromFile(params) {
|
|
6490
|
-
const baseParams = await this.fromFileDefault(params);
|
|
6491
|
-
return new _CopilotSubagent(baseParams);
|
|
6492
|
-
}
|
|
6493
|
-
static fromRulesyncSubagent(params) {
|
|
6494
|
-
const baseParams = this.fromRulesyncSubagentDefault(params);
|
|
6495
|
-
return new _CopilotSubagent(baseParams);
|
|
6496
|
-
}
|
|
6497
|
-
static isTargetedByRulesyncSubagent(rulesyncSubagent) {
|
|
6498
|
-
return this.isTargetedByRulesyncSubagentDefault({
|
|
6499
|
-
rulesyncSubagent,
|
|
6500
|
-
toolTarget: "copilot"
|
|
6501
|
-
});
|
|
6502
|
-
}
|
|
6503
|
-
static forDeletion(params) {
|
|
6504
|
-
return new _CopilotSubagent(this.forDeletionDefault(params));
|
|
6505
|
-
}
|
|
6506
|
-
};
|
|
6507
|
-
|
|
6508
6481
|
// src/features/subagents/cursor-subagent.ts
|
|
6509
|
-
var
|
|
6482
|
+
var import_node_path57 = require("path");
|
|
6510
6483
|
var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
|
|
6511
6484
|
static getSettablePaths() {
|
|
6512
6485
|
return {
|
|
6513
|
-
relativeDirPath: (0,
|
|
6486
|
+
relativeDirPath: (0, import_node_path57.join)(".cursor", "subagents")
|
|
6514
6487
|
};
|
|
6515
6488
|
}
|
|
6516
6489
|
static async fromFile(params) {
|
|
@@ -6533,11 +6506,11 @@ var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
|
|
|
6533
6506
|
};
|
|
6534
6507
|
|
|
6535
6508
|
// src/features/subagents/geminicli-subagent.ts
|
|
6536
|
-
var
|
|
6509
|
+
var import_node_path58 = require("path");
|
|
6537
6510
|
var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
|
|
6538
6511
|
static getSettablePaths() {
|
|
6539
6512
|
return {
|
|
6540
|
-
relativeDirPath: (0,
|
|
6513
|
+
relativeDirPath: (0, import_node_path58.join)(".gemini", "subagents")
|
|
6541
6514
|
};
|
|
6542
6515
|
}
|
|
6543
6516
|
static async fromFile(params) {
|
|
@@ -6560,11 +6533,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
|
|
|
6560
6533
|
};
|
|
6561
6534
|
|
|
6562
6535
|
// src/features/subagents/roo-subagent.ts
|
|
6563
|
-
var
|
|
6536
|
+
var import_node_path59 = require("path");
|
|
6564
6537
|
var RooSubagent = class _RooSubagent extends SimulatedSubagent {
|
|
6565
6538
|
static getSettablePaths() {
|
|
6566
6539
|
return {
|
|
6567
|
-
relativeDirPath: (0,
|
|
6540
|
+
relativeDirPath: (0, import_node_path59.join)(".roo", "subagents")
|
|
6568
6541
|
};
|
|
6569
6542
|
}
|
|
6570
6543
|
static async fromFile(params) {
|
|
@@ -6588,14 +6561,14 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
|
|
|
6588
6561
|
|
|
6589
6562
|
// src/features/subagents/subagents-processor.ts
|
|
6590
6563
|
var import_node_path63 = require("path");
|
|
6591
|
-
var
|
|
6564
|
+
var import_mini30 = require("zod/mini");
|
|
6592
6565
|
|
|
6593
6566
|
// src/features/subagents/claudecode-subagent.ts
|
|
6594
|
-
var
|
|
6567
|
+
var import_node_path61 = require("path");
|
|
6595
6568
|
var import_mini28 = require("zod/mini");
|
|
6596
6569
|
|
|
6597
6570
|
// src/features/subagents/rulesync-subagent.ts
|
|
6598
|
-
var
|
|
6571
|
+
var import_node_path60 = require("path");
|
|
6599
6572
|
var import_mini27 = require("zod/mini");
|
|
6600
6573
|
var RulesyncSubagentFrontmatterSchema = import_mini27.z.looseObject({
|
|
6601
6574
|
targets: RulesyncTargetsSchema,
|
|
@@ -6610,7 +6583,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
6610
6583
|
const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
6611
6584
|
if (!result.success) {
|
|
6612
6585
|
throw new Error(
|
|
6613
|
-
`Invalid frontmatter in ${(0,
|
|
6586
|
+
`Invalid frontmatter in ${(0, import_node_path60.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
6614
6587
|
);
|
|
6615
6588
|
}
|
|
6616
6589
|
}
|
|
@@ -6643,7 +6616,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
6643
6616
|
return {
|
|
6644
6617
|
success: false,
|
|
6645
6618
|
error: new Error(
|
|
6646
|
-
`Invalid frontmatter in ${(0,
|
|
6619
|
+
`Invalid frontmatter in ${(0, import_node_path60.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
6647
6620
|
)
|
|
6648
6621
|
};
|
|
6649
6622
|
}
|
|
@@ -6652,14 +6625,14 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
6652
6625
|
relativeFilePath
|
|
6653
6626
|
}) {
|
|
6654
6627
|
const fileContent = await readFileContent(
|
|
6655
|
-
(0,
|
|
6628
|
+
(0, import_node_path60.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath)
|
|
6656
6629
|
);
|
|
6657
6630
|
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
6658
6631
|
const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
6659
6632
|
if (!result.success) {
|
|
6660
6633
|
throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
|
|
6661
6634
|
}
|
|
6662
|
-
const filename = (0,
|
|
6635
|
+
const filename = (0, import_node_path60.basename)(relativeFilePath);
|
|
6663
6636
|
return new _RulesyncSubagent({
|
|
6664
6637
|
baseDir: process.cwd(),
|
|
6665
6638
|
relativeDirPath: this.getSettablePaths().relativeDirPath,
|
|
@@ -6687,7 +6660,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
6687
6660
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
6688
6661
|
if (!result.success) {
|
|
6689
6662
|
throw new Error(
|
|
6690
|
-
`Invalid frontmatter in ${(0,
|
|
6663
|
+
`Invalid frontmatter in ${(0, import_node_path61.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
6691
6664
|
);
|
|
6692
6665
|
}
|
|
6693
6666
|
}
|
|
@@ -6699,7 +6672,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
6699
6672
|
}
|
|
6700
6673
|
static getSettablePaths(_options = {}) {
|
|
6701
6674
|
return {
|
|
6702
|
-
relativeDirPath: (0,
|
|
6675
|
+
relativeDirPath: (0, import_node_path61.join)(".claude", "agents")
|
|
6703
6676
|
};
|
|
6704
6677
|
}
|
|
6705
6678
|
getFrontmatter() {
|
|
@@ -6773,7 +6746,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
6773
6746
|
return {
|
|
6774
6747
|
success: false,
|
|
6775
6748
|
error: new Error(
|
|
6776
|
-
`Invalid frontmatter in ${(0,
|
|
6749
|
+
`Invalid frontmatter in ${(0, import_node_path61.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
6777
6750
|
)
|
|
6778
6751
|
};
|
|
6779
6752
|
}
|
|
@@ -6791,7 +6764,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
6791
6764
|
global = false
|
|
6792
6765
|
}) {
|
|
6793
6766
|
const paths = this.getSettablePaths({ global });
|
|
6794
|
-
const filePath = (0,
|
|
6767
|
+
const filePath = (0, import_node_path61.join)(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
6795
6768
|
const fileContent = await readFileContent(filePath);
|
|
6796
6769
|
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
6797
6770
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -6825,6 +6798,172 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
6825
6798
|
}
|
|
6826
6799
|
};
|
|
6827
6800
|
|
|
6801
|
+
// src/features/subagents/copilot-subagent.ts
|
|
6802
|
+
var import_node_path62 = require("path");
|
|
6803
|
+
var import_mini29 = require("zod/mini");
|
|
6804
|
+
var REQUIRED_TOOL = "agent/runSubagent";
|
|
6805
|
+
var CopilotSubagentFrontmatterSchema = import_mini29.z.looseObject({
|
|
6806
|
+
name: import_mini29.z.string(),
|
|
6807
|
+
description: import_mini29.z.string(),
|
|
6808
|
+
tools: import_mini29.z.optional(import_mini29.z.union([import_mini29.z.string(), import_mini29.z.array(import_mini29.z.string())]))
|
|
6809
|
+
});
|
|
6810
|
+
var normalizeTools = (tools) => {
|
|
6811
|
+
if (!tools) {
|
|
6812
|
+
return [];
|
|
6813
|
+
}
|
|
6814
|
+
return Array.isArray(tools) ? tools : [tools];
|
|
6815
|
+
};
|
|
6816
|
+
var ensureRequiredTool = (tools) => {
|
|
6817
|
+
const mergedTools = /* @__PURE__ */ new Set([REQUIRED_TOOL, ...tools]);
|
|
6818
|
+
return Array.from(mergedTools);
|
|
6819
|
+
};
|
|
6820
|
+
var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
6821
|
+
frontmatter;
|
|
6822
|
+
body;
|
|
6823
|
+
constructor({ frontmatter, body, ...rest }) {
|
|
6824
|
+
if (rest.validate !== false) {
|
|
6825
|
+
const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
6826
|
+
if (!result.success) {
|
|
6827
|
+
throw new Error(
|
|
6828
|
+
`Invalid frontmatter in ${(0, import_node_path62.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
6829
|
+
);
|
|
6830
|
+
}
|
|
6831
|
+
}
|
|
6832
|
+
super({
|
|
6833
|
+
...rest
|
|
6834
|
+
});
|
|
6835
|
+
this.frontmatter = frontmatter;
|
|
6836
|
+
this.body = body;
|
|
6837
|
+
}
|
|
6838
|
+
static getSettablePaths(_options = {}) {
|
|
6839
|
+
return {
|
|
6840
|
+
relativeDirPath: (0, import_node_path62.join)(".github", "agents")
|
|
6841
|
+
};
|
|
6842
|
+
}
|
|
6843
|
+
getFrontmatter() {
|
|
6844
|
+
return this.frontmatter;
|
|
6845
|
+
}
|
|
6846
|
+
getBody() {
|
|
6847
|
+
return this.body;
|
|
6848
|
+
}
|
|
6849
|
+
toRulesyncSubagent() {
|
|
6850
|
+
const { name, description, tools, ...rest } = this.frontmatter;
|
|
6851
|
+
const rulesyncFrontmatter = {
|
|
6852
|
+
targets: ["copilot"],
|
|
6853
|
+
name,
|
|
6854
|
+
description,
|
|
6855
|
+
copilot: {
|
|
6856
|
+
...tools && { tools },
|
|
6857
|
+
...rest
|
|
6858
|
+
}
|
|
6859
|
+
};
|
|
6860
|
+
return new RulesyncSubagent({
|
|
6861
|
+
baseDir: ".",
|
|
6862
|
+
// RulesyncCommand baseDir is always the project root directory
|
|
6863
|
+
frontmatter: rulesyncFrontmatter,
|
|
6864
|
+
body: this.body,
|
|
6865
|
+
relativeDirPath: RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH,
|
|
6866
|
+
relativeFilePath: this.getRelativeFilePath(),
|
|
6867
|
+
validate: true
|
|
6868
|
+
});
|
|
6869
|
+
}
|
|
6870
|
+
static fromRulesyncSubagent({
|
|
6871
|
+
baseDir = process.cwd(),
|
|
6872
|
+
rulesyncSubagent,
|
|
6873
|
+
validate = true,
|
|
6874
|
+
global = false
|
|
6875
|
+
}) {
|
|
6876
|
+
const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
|
|
6877
|
+
const copilotSection = rulesyncFrontmatter.copilot ?? {};
|
|
6878
|
+
const toolsField = copilotSection.tools;
|
|
6879
|
+
const userTools = normalizeTools(
|
|
6880
|
+
Array.isArray(toolsField) || typeof toolsField === "string" ? toolsField : void 0
|
|
6881
|
+
);
|
|
6882
|
+
const mergedTools = ensureRequiredTool(userTools);
|
|
6883
|
+
const copilotFrontmatter = {
|
|
6884
|
+
name: rulesyncFrontmatter.name,
|
|
6885
|
+
description: rulesyncFrontmatter.description,
|
|
6886
|
+
...copilotSection,
|
|
6887
|
+
...mergedTools.length > 0 && { tools: mergedTools }
|
|
6888
|
+
};
|
|
6889
|
+
const body = rulesyncSubagent.getBody();
|
|
6890
|
+
const fileContent = stringifyFrontmatter(body, copilotFrontmatter);
|
|
6891
|
+
const paths = this.getSettablePaths({ global });
|
|
6892
|
+
return new _CopilotSubagent({
|
|
6893
|
+
baseDir,
|
|
6894
|
+
frontmatter: copilotFrontmatter,
|
|
6895
|
+
body,
|
|
6896
|
+
relativeDirPath: paths.relativeDirPath,
|
|
6897
|
+
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
6898
|
+
fileContent,
|
|
6899
|
+
validate,
|
|
6900
|
+
global
|
|
6901
|
+
});
|
|
6902
|
+
}
|
|
6903
|
+
validate() {
|
|
6904
|
+
if (!this.frontmatter) {
|
|
6905
|
+
return { success: true, error: null };
|
|
6906
|
+
}
|
|
6907
|
+
const result = CopilotSubagentFrontmatterSchema.safeParse(this.frontmatter);
|
|
6908
|
+
if (result.success) {
|
|
6909
|
+
return { success: true, error: null };
|
|
6910
|
+
} else {
|
|
6911
|
+
return {
|
|
6912
|
+
success: false,
|
|
6913
|
+
error: new Error(
|
|
6914
|
+
`Invalid frontmatter in ${(0, import_node_path62.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
6915
|
+
)
|
|
6916
|
+
};
|
|
6917
|
+
}
|
|
6918
|
+
}
|
|
6919
|
+
static isTargetedByRulesyncSubagent(rulesyncSubagent) {
|
|
6920
|
+
return this.isTargetedByRulesyncSubagentDefault({
|
|
6921
|
+
rulesyncSubagent,
|
|
6922
|
+
toolTarget: "copilot"
|
|
6923
|
+
});
|
|
6924
|
+
}
|
|
6925
|
+
static async fromFile({
|
|
6926
|
+
baseDir = process.cwd(),
|
|
6927
|
+
relativeFilePath,
|
|
6928
|
+
validate = true,
|
|
6929
|
+
global = false
|
|
6930
|
+
}) {
|
|
6931
|
+
const paths = this.getSettablePaths({ global });
|
|
6932
|
+
const filePath = (0, import_node_path62.join)(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
6933
|
+
const fileContent = await readFileContent(filePath);
|
|
6934
|
+
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
6935
|
+
const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
6936
|
+
if (!result.success) {
|
|
6937
|
+
throw new Error(`Invalid frontmatter in ${filePath}: ${formatError(result.error)}`);
|
|
6938
|
+
}
|
|
6939
|
+
return new _CopilotSubagent({
|
|
6940
|
+
baseDir,
|
|
6941
|
+
relativeDirPath: paths.relativeDirPath,
|
|
6942
|
+
relativeFilePath,
|
|
6943
|
+
frontmatter: result.data,
|
|
6944
|
+
body: content.trim(),
|
|
6945
|
+
fileContent,
|
|
6946
|
+
validate,
|
|
6947
|
+
global
|
|
6948
|
+
});
|
|
6949
|
+
}
|
|
6950
|
+
static forDeletion({
|
|
6951
|
+
baseDir = process.cwd(),
|
|
6952
|
+
relativeDirPath,
|
|
6953
|
+
relativeFilePath
|
|
6954
|
+
}) {
|
|
6955
|
+
return new _CopilotSubagent({
|
|
6956
|
+
baseDir,
|
|
6957
|
+
relativeDirPath,
|
|
6958
|
+
relativeFilePath,
|
|
6959
|
+
frontmatter: { name: "", description: "" },
|
|
6960
|
+
body: "",
|
|
6961
|
+
fileContent: "",
|
|
6962
|
+
validate: false
|
|
6963
|
+
});
|
|
6964
|
+
}
|
|
6965
|
+
};
|
|
6966
|
+
|
|
6828
6967
|
// src/features/subagents/subagents-processor.ts
|
|
6829
6968
|
var subagentsProcessorToolTargetTuple = [
|
|
6830
6969
|
"agentsmd",
|
|
@@ -6835,7 +6974,7 @@ var subagentsProcessorToolTargetTuple = [
|
|
|
6835
6974
|
"geminicli",
|
|
6836
6975
|
"roo"
|
|
6837
6976
|
];
|
|
6838
|
-
var SubagentsProcessorToolTargetSchema =
|
|
6977
|
+
var SubagentsProcessorToolTargetSchema = import_mini30.z.enum(subagentsProcessorToolTargetTuple);
|
|
6839
6978
|
var toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
6840
6979
|
[
|
|
6841
6980
|
"agentsmd",
|
|
@@ -6849,7 +6988,10 @@ var toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
|
6849
6988
|
"codexcli",
|
|
6850
6989
|
{ class: CodexCliSubagent, meta: { supportsSimulated: true, supportsGlobal: false } }
|
|
6851
6990
|
],
|
|
6852
|
-
[
|
|
6991
|
+
[
|
|
6992
|
+
"copilot",
|
|
6993
|
+
{ class: CopilotSubagent, meta: { supportsSimulated: false, supportsGlobal: false } }
|
|
6994
|
+
],
|
|
6853
6995
|
["cursor", { class: CursorSubagent, meta: { supportsSimulated: true, supportsGlobal: false } }],
|
|
6854
6996
|
[
|
|
6855
6997
|
"geminicli",
|
|
@@ -7040,41 +7182,41 @@ var import_node_path65 = require("path");
|
|
|
7040
7182
|
|
|
7041
7183
|
// src/features/rules/rulesync-rule.ts
|
|
7042
7184
|
var import_node_path64 = require("path");
|
|
7043
|
-
var
|
|
7044
|
-
var RulesyncRuleFrontmatterSchema =
|
|
7045
|
-
root:
|
|
7046
|
-
targets:
|
|
7047
|
-
description:
|
|
7048
|
-
globs:
|
|
7049
|
-
agentsmd:
|
|
7050
|
-
|
|
7185
|
+
var import_mini31 = require("zod/mini");
|
|
7186
|
+
var RulesyncRuleFrontmatterSchema = import_mini31.z.object({
|
|
7187
|
+
root: import_mini31.z.optional(import_mini31.z.optional(import_mini31.z.boolean())),
|
|
7188
|
+
targets: import_mini31.z.optional(RulesyncTargetsSchema),
|
|
7189
|
+
description: import_mini31.z.optional(import_mini31.z.string()),
|
|
7190
|
+
globs: import_mini31.z.optional(import_mini31.z.array(import_mini31.z.string())),
|
|
7191
|
+
agentsmd: import_mini31.z.optional(
|
|
7192
|
+
import_mini31.z.object({
|
|
7051
7193
|
// @example "path/to/subproject"
|
|
7052
|
-
subprojectPath:
|
|
7194
|
+
subprojectPath: import_mini31.z.optional(import_mini31.z.string())
|
|
7053
7195
|
})
|
|
7054
7196
|
),
|
|
7055
|
-
claudecode:
|
|
7056
|
-
|
|
7197
|
+
claudecode: import_mini31.z.optional(
|
|
7198
|
+
import_mini31.z.object({
|
|
7057
7199
|
// Glob patterns for conditional rules (takes precedence over globs)
|
|
7058
7200
|
// @example "src/**/*.ts, tests/**/*.test.ts"
|
|
7059
|
-
paths:
|
|
7201
|
+
paths: import_mini31.z.optional(import_mini31.z.string())
|
|
7060
7202
|
})
|
|
7061
7203
|
),
|
|
7062
|
-
cursor:
|
|
7063
|
-
|
|
7064
|
-
alwaysApply:
|
|
7065
|
-
description:
|
|
7066
|
-
globs:
|
|
7204
|
+
cursor: import_mini31.z.optional(
|
|
7205
|
+
import_mini31.z.object({
|
|
7206
|
+
alwaysApply: import_mini31.z.optional(import_mini31.z.boolean()),
|
|
7207
|
+
description: import_mini31.z.optional(import_mini31.z.string()),
|
|
7208
|
+
globs: import_mini31.z.optional(import_mini31.z.array(import_mini31.z.string()))
|
|
7067
7209
|
})
|
|
7068
7210
|
),
|
|
7069
|
-
copilot:
|
|
7070
|
-
|
|
7071
|
-
excludeAgent:
|
|
7211
|
+
copilot: import_mini31.z.optional(
|
|
7212
|
+
import_mini31.z.object({
|
|
7213
|
+
excludeAgent: import_mini31.z.optional(import_mini31.z.union([import_mini31.z.literal("code-review"), import_mini31.z.literal("coding-agent")]))
|
|
7072
7214
|
})
|
|
7073
7215
|
),
|
|
7074
|
-
antigravity:
|
|
7075
|
-
|
|
7076
|
-
trigger:
|
|
7077
|
-
globs:
|
|
7216
|
+
antigravity: import_mini31.z.optional(
|
|
7217
|
+
import_mini31.z.looseObject({
|
|
7218
|
+
trigger: import_mini31.z.optional(import_mini31.z.string()),
|
|
7219
|
+
globs: import_mini31.z.optional(import_mini31.z.array(import_mini31.z.string()))
|
|
7078
7220
|
})
|
|
7079
7221
|
)
|
|
7080
7222
|
});
|
|
@@ -7482,20 +7624,20 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
|
|
|
7482
7624
|
|
|
7483
7625
|
// src/features/rules/antigravity-rule.ts
|
|
7484
7626
|
var import_node_path68 = require("path");
|
|
7485
|
-
var
|
|
7486
|
-
var AntigravityRuleFrontmatterSchema =
|
|
7487
|
-
trigger:
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7627
|
+
var import_mini32 = require("zod/mini");
|
|
7628
|
+
var AntigravityRuleFrontmatterSchema = import_mini32.z.looseObject({
|
|
7629
|
+
trigger: import_mini32.z.optional(
|
|
7630
|
+
import_mini32.z.union([
|
|
7631
|
+
import_mini32.z.literal("always_on"),
|
|
7632
|
+
import_mini32.z.literal("glob"),
|
|
7633
|
+
import_mini32.z.literal("manual"),
|
|
7634
|
+
import_mini32.z.literal("model_decision"),
|
|
7635
|
+
import_mini32.z.string()
|
|
7494
7636
|
// accepts any string for forward compatibility
|
|
7495
7637
|
])
|
|
7496
7638
|
),
|
|
7497
|
-
globs:
|
|
7498
|
-
description:
|
|
7639
|
+
globs: import_mini32.z.optional(import_mini32.z.string()),
|
|
7640
|
+
description: import_mini32.z.optional(import_mini32.z.string())
|
|
7499
7641
|
});
|
|
7500
7642
|
function parseGlobsString(globs) {
|
|
7501
7643
|
if (!globs) {
|
|
@@ -8073,9 +8215,9 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
8073
8215
|
|
|
8074
8216
|
// src/features/rules/claudecode-rule.ts
|
|
8075
8217
|
var import_node_path72 = require("path");
|
|
8076
|
-
var
|
|
8077
|
-
var ClaudecodeRuleFrontmatterSchema =
|
|
8078
|
-
paths:
|
|
8218
|
+
var import_mini33 = require("zod/mini");
|
|
8219
|
+
var ClaudecodeRuleFrontmatterSchema = import_mini33.z.object({
|
|
8220
|
+
paths: import_mini33.z.optional(import_mini33.z.string())
|
|
8079
8221
|
});
|
|
8080
8222
|
var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
8081
8223
|
frontmatter;
|
|
@@ -8283,9 +8425,9 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
8283
8425
|
|
|
8284
8426
|
// src/features/rules/cline-rule.ts
|
|
8285
8427
|
var import_node_path73 = require("path");
|
|
8286
|
-
var
|
|
8287
|
-
var ClineRuleFrontmatterSchema =
|
|
8288
|
-
description:
|
|
8428
|
+
var import_mini34 = require("zod/mini");
|
|
8429
|
+
var ClineRuleFrontmatterSchema = import_mini34.z.object({
|
|
8430
|
+
description: import_mini34.z.string()
|
|
8289
8431
|
});
|
|
8290
8432
|
var ClineRule = class _ClineRule extends ToolRule {
|
|
8291
8433
|
static getSettablePaths() {
|
|
@@ -8462,11 +8604,11 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
8462
8604
|
|
|
8463
8605
|
// src/features/rules/copilot-rule.ts
|
|
8464
8606
|
var import_node_path75 = require("path");
|
|
8465
|
-
var
|
|
8466
|
-
var CopilotRuleFrontmatterSchema =
|
|
8467
|
-
description:
|
|
8468
|
-
applyTo:
|
|
8469
|
-
excludeAgent:
|
|
8607
|
+
var import_mini35 = require("zod/mini");
|
|
8608
|
+
var CopilotRuleFrontmatterSchema = import_mini35.z.object({
|
|
8609
|
+
description: import_mini35.z.optional(import_mini35.z.string()),
|
|
8610
|
+
applyTo: import_mini35.z.optional(import_mini35.z.string()),
|
|
8611
|
+
excludeAgent: import_mini35.z.optional(import_mini35.z.union([import_mini35.z.literal("code-review"), import_mini35.z.literal("coding-agent")]))
|
|
8470
8612
|
});
|
|
8471
8613
|
var CopilotRule = class _CopilotRule extends ToolRule {
|
|
8472
8614
|
frontmatter;
|
|
@@ -8650,11 +8792,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
8650
8792
|
|
|
8651
8793
|
// src/features/rules/cursor-rule.ts
|
|
8652
8794
|
var import_node_path76 = require("path");
|
|
8653
|
-
var
|
|
8654
|
-
var CursorRuleFrontmatterSchema =
|
|
8655
|
-
description:
|
|
8656
|
-
globs:
|
|
8657
|
-
alwaysApply:
|
|
8795
|
+
var import_mini36 = require("zod/mini");
|
|
8796
|
+
var CursorRuleFrontmatterSchema = import_mini36.z.object({
|
|
8797
|
+
description: import_mini36.z.optional(import_mini36.z.string()),
|
|
8798
|
+
globs: import_mini36.z.optional(import_mini36.z.string()),
|
|
8799
|
+
alwaysApply: import_mini36.z.optional(import_mini36.z.boolean())
|
|
8658
8800
|
});
|
|
8659
8801
|
var CursorRule = class _CursorRule extends ToolRule {
|
|
8660
8802
|
frontmatter;
|
|
@@ -9504,7 +9646,7 @@ var rulesProcessorToolTargets = [
|
|
|
9504
9646
|
"warp",
|
|
9505
9647
|
"windsurf"
|
|
9506
9648
|
];
|
|
9507
|
-
var RulesProcessorToolTargetSchema =
|
|
9649
|
+
var RulesProcessorToolTargetSchema = import_mini37.z.enum(rulesProcessorToolTargets);
|
|
9508
9650
|
var toolRuleFactories = /* @__PURE__ */ new Map([
|
|
9509
9651
|
[
|
|
9510
9652
|
"agentsmd",
|
|
@@ -9592,10 +9734,7 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
|
|
|
9592
9734
|
meta: {
|
|
9593
9735
|
extension: "md",
|
|
9594
9736
|
supportsGlobal: false,
|
|
9595
|
-
ruleDiscoveryMode: "auto"
|
|
9596
|
-
additionalConventions: {
|
|
9597
|
-
subagents: { subagentClass: CopilotSubagent }
|
|
9598
|
-
}
|
|
9737
|
+
ruleDiscoveryMode: "auto"
|
|
9599
9738
|
}
|
|
9600
9739
|
}
|
|
9601
9740
|
],
|
|
@@ -10376,7 +10515,7 @@ var RULESYNC_IGNORE_ENTRIES = [
|
|
|
10376
10515
|
"**/.github/copilot-instructions.md",
|
|
10377
10516
|
"**/.github/instructions/",
|
|
10378
10517
|
"**/.github/prompts/",
|
|
10379
|
-
"**/.github/
|
|
10518
|
+
"**/.github/agents/",
|
|
10380
10519
|
"**/.github/skills/",
|
|
10381
10520
|
"**/.vscode/mcp.json",
|
|
10382
10521
|
// Junie
|
|
@@ -10865,7 +11004,7 @@ var import_fastmcp = require("fastmcp");
|
|
|
10865
11004
|
|
|
10866
11005
|
// src/mcp/commands.ts
|
|
10867
11006
|
var import_node_path88 = require("path");
|
|
10868
|
-
var
|
|
11007
|
+
var import_mini38 = require("zod/mini");
|
|
10869
11008
|
var maxCommandSizeBytes = 1024 * 1024;
|
|
10870
11009
|
var maxCommandsCount = 1e3;
|
|
10871
11010
|
async function listCommands() {
|
|
@@ -10984,17 +11123,17 @@ async function deleteCommand({ relativePathFromCwd }) {
|
|
|
10984
11123
|
}
|
|
10985
11124
|
}
|
|
10986
11125
|
var commandToolSchemas = {
|
|
10987
|
-
listCommands:
|
|
10988
|
-
getCommand:
|
|
10989
|
-
relativePathFromCwd:
|
|
11126
|
+
listCommands: import_mini38.z.object({}),
|
|
11127
|
+
getCommand: import_mini38.z.object({
|
|
11128
|
+
relativePathFromCwd: import_mini38.z.string()
|
|
10990
11129
|
}),
|
|
10991
|
-
putCommand:
|
|
10992
|
-
relativePathFromCwd:
|
|
11130
|
+
putCommand: import_mini38.z.object({
|
|
11131
|
+
relativePathFromCwd: import_mini38.z.string(),
|
|
10993
11132
|
frontmatter: RulesyncCommandFrontmatterSchema,
|
|
10994
|
-
body:
|
|
11133
|
+
body: import_mini38.z.string()
|
|
10995
11134
|
}),
|
|
10996
|
-
deleteCommand:
|
|
10997
|
-
relativePathFromCwd:
|
|
11135
|
+
deleteCommand: import_mini38.z.object({
|
|
11136
|
+
relativePathFromCwd: import_mini38.z.string()
|
|
10998
11137
|
})
|
|
10999
11138
|
};
|
|
11000
11139
|
var commandTools = {
|
|
@@ -11043,7 +11182,7 @@ var commandTools = {
|
|
|
11043
11182
|
|
|
11044
11183
|
// src/mcp/ignore.ts
|
|
11045
11184
|
var import_node_path89 = require("path");
|
|
11046
|
-
var
|
|
11185
|
+
var import_mini39 = require("zod/mini");
|
|
11047
11186
|
var maxIgnoreFileSizeBytes = 100 * 1024;
|
|
11048
11187
|
async function getIgnoreFile() {
|
|
11049
11188
|
const ignoreFilePath = (0, import_node_path89.join)(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
|
|
@@ -11100,11 +11239,11 @@ async function deleteIgnoreFile() {
|
|
|
11100
11239
|
}
|
|
11101
11240
|
}
|
|
11102
11241
|
var ignoreToolSchemas = {
|
|
11103
|
-
getIgnoreFile:
|
|
11104
|
-
putIgnoreFile:
|
|
11105
|
-
content:
|
|
11242
|
+
getIgnoreFile: import_mini39.z.object({}),
|
|
11243
|
+
putIgnoreFile: import_mini39.z.object({
|
|
11244
|
+
content: import_mini39.z.string()
|
|
11106
11245
|
}),
|
|
11107
|
-
deleteIgnoreFile:
|
|
11246
|
+
deleteIgnoreFile: import_mini39.z.object({})
|
|
11108
11247
|
};
|
|
11109
11248
|
var ignoreTools = {
|
|
11110
11249
|
getIgnoreFile: {
|
|
@@ -11138,7 +11277,7 @@ var ignoreTools = {
|
|
|
11138
11277
|
|
|
11139
11278
|
// src/mcp/mcp.ts
|
|
11140
11279
|
var import_node_path90 = require("path");
|
|
11141
|
-
var
|
|
11280
|
+
var import_mini40 = require("zod/mini");
|
|
11142
11281
|
var maxMcpSizeBytes = 1024 * 1024;
|
|
11143
11282
|
async function getMcpFile() {
|
|
11144
11283
|
const config = await ConfigResolver.resolve({});
|
|
@@ -11228,11 +11367,11 @@ async function deleteMcpFile() {
|
|
|
11228
11367
|
}
|
|
11229
11368
|
}
|
|
11230
11369
|
var mcpToolSchemas = {
|
|
11231
|
-
getMcpFile:
|
|
11232
|
-
putMcpFile:
|
|
11233
|
-
content:
|
|
11370
|
+
getMcpFile: import_mini40.z.object({}),
|
|
11371
|
+
putMcpFile: import_mini40.z.object({
|
|
11372
|
+
content: import_mini40.z.string()
|
|
11234
11373
|
}),
|
|
11235
|
-
deleteMcpFile:
|
|
11374
|
+
deleteMcpFile: import_mini40.z.object({})
|
|
11236
11375
|
};
|
|
11237
11376
|
var mcpTools = {
|
|
11238
11377
|
getMcpFile: {
|
|
@@ -11266,7 +11405,7 @@ var mcpTools = {
|
|
|
11266
11405
|
|
|
11267
11406
|
// src/mcp/rules.ts
|
|
11268
11407
|
var import_node_path91 = require("path");
|
|
11269
|
-
var
|
|
11408
|
+
var import_mini41 = require("zod/mini");
|
|
11270
11409
|
var maxRuleSizeBytes = 1024 * 1024;
|
|
11271
11410
|
var maxRulesCount = 1e3;
|
|
11272
11411
|
async function listRules() {
|
|
@@ -11385,17 +11524,17 @@ async function deleteRule({ relativePathFromCwd }) {
|
|
|
11385
11524
|
}
|
|
11386
11525
|
}
|
|
11387
11526
|
var ruleToolSchemas = {
|
|
11388
|
-
listRules:
|
|
11389
|
-
getRule:
|
|
11390
|
-
relativePathFromCwd:
|
|
11527
|
+
listRules: import_mini41.z.object({}),
|
|
11528
|
+
getRule: import_mini41.z.object({
|
|
11529
|
+
relativePathFromCwd: import_mini41.z.string()
|
|
11391
11530
|
}),
|
|
11392
|
-
putRule:
|
|
11393
|
-
relativePathFromCwd:
|
|
11531
|
+
putRule: import_mini41.z.object({
|
|
11532
|
+
relativePathFromCwd: import_mini41.z.string(),
|
|
11394
11533
|
frontmatter: RulesyncRuleFrontmatterSchema,
|
|
11395
|
-
body:
|
|
11534
|
+
body: import_mini41.z.string()
|
|
11396
11535
|
}),
|
|
11397
|
-
deleteRule:
|
|
11398
|
-
relativePathFromCwd:
|
|
11536
|
+
deleteRule: import_mini41.z.object({
|
|
11537
|
+
relativePathFromCwd: import_mini41.z.string()
|
|
11399
11538
|
})
|
|
11400
11539
|
};
|
|
11401
11540
|
var ruleTools = {
|
|
@@ -11444,7 +11583,7 @@ var ruleTools = {
|
|
|
11444
11583
|
|
|
11445
11584
|
// src/mcp/skills.ts
|
|
11446
11585
|
var import_node_path92 = require("path");
|
|
11447
|
-
var
|
|
11586
|
+
var import_mini42 = require("zod/mini");
|
|
11448
11587
|
var maxSkillSizeBytes = 1024 * 1024;
|
|
11449
11588
|
var maxSkillsCount = 1e3;
|
|
11450
11589
|
function aiDirFileToMcpSkillFile(file) {
|
|
@@ -11612,23 +11751,23 @@ async function deleteSkill({
|
|
|
11612
11751
|
);
|
|
11613
11752
|
}
|
|
11614
11753
|
}
|
|
11615
|
-
var McpSkillFileSchema =
|
|
11616
|
-
name:
|
|
11617
|
-
body:
|
|
11754
|
+
var McpSkillFileSchema = import_mini42.z.object({
|
|
11755
|
+
name: import_mini42.z.string(),
|
|
11756
|
+
body: import_mini42.z.string()
|
|
11618
11757
|
});
|
|
11619
11758
|
var skillToolSchemas = {
|
|
11620
|
-
listSkills:
|
|
11621
|
-
getSkill:
|
|
11622
|
-
relativeDirPathFromCwd:
|
|
11759
|
+
listSkills: import_mini42.z.object({}),
|
|
11760
|
+
getSkill: import_mini42.z.object({
|
|
11761
|
+
relativeDirPathFromCwd: import_mini42.z.string()
|
|
11623
11762
|
}),
|
|
11624
|
-
putSkill:
|
|
11625
|
-
relativeDirPathFromCwd:
|
|
11763
|
+
putSkill: import_mini42.z.object({
|
|
11764
|
+
relativeDirPathFromCwd: import_mini42.z.string(),
|
|
11626
11765
|
frontmatter: RulesyncSkillFrontmatterSchema,
|
|
11627
|
-
body:
|
|
11628
|
-
otherFiles:
|
|
11766
|
+
body: import_mini42.z.string(),
|
|
11767
|
+
otherFiles: import_mini42.z.optional(import_mini42.z.array(McpSkillFileSchema))
|
|
11629
11768
|
}),
|
|
11630
|
-
deleteSkill:
|
|
11631
|
-
relativeDirPathFromCwd:
|
|
11769
|
+
deleteSkill: import_mini42.z.object({
|
|
11770
|
+
relativeDirPathFromCwd: import_mini42.z.string()
|
|
11632
11771
|
})
|
|
11633
11772
|
};
|
|
11634
11773
|
var skillTools = {
|
|
@@ -11678,7 +11817,7 @@ var skillTools = {
|
|
|
11678
11817
|
|
|
11679
11818
|
// src/mcp/subagents.ts
|
|
11680
11819
|
var import_node_path93 = require("path");
|
|
11681
|
-
var
|
|
11820
|
+
var import_mini43 = require("zod/mini");
|
|
11682
11821
|
var maxSubagentSizeBytes = 1024 * 1024;
|
|
11683
11822
|
var maxSubagentsCount = 1e3;
|
|
11684
11823
|
async function listSubagents() {
|
|
@@ -11802,17 +11941,17 @@ async function deleteSubagent({ relativePathFromCwd }) {
|
|
|
11802
11941
|
}
|
|
11803
11942
|
}
|
|
11804
11943
|
var subagentToolSchemas = {
|
|
11805
|
-
listSubagents:
|
|
11806
|
-
getSubagent:
|
|
11807
|
-
relativePathFromCwd:
|
|
11944
|
+
listSubagents: import_mini43.z.object({}),
|
|
11945
|
+
getSubagent: import_mini43.z.object({
|
|
11946
|
+
relativePathFromCwd: import_mini43.z.string()
|
|
11808
11947
|
}),
|
|
11809
|
-
putSubagent:
|
|
11810
|
-
relativePathFromCwd:
|
|
11948
|
+
putSubagent: import_mini43.z.object({
|
|
11949
|
+
relativePathFromCwd: import_mini43.z.string(),
|
|
11811
11950
|
frontmatter: RulesyncSubagentFrontmatterSchema,
|
|
11812
|
-
body:
|
|
11951
|
+
body: import_mini43.z.string()
|
|
11813
11952
|
}),
|
|
11814
|
-
deleteSubagent:
|
|
11815
|
-
relativePathFromCwd:
|
|
11953
|
+
deleteSubagent: import_mini43.z.object({
|
|
11954
|
+
relativePathFromCwd: import_mini43.z.string()
|
|
11816
11955
|
})
|
|
11817
11956
|
};
|
|
11818
11957
|
var subagentTools = {
|
|
@@ -11896,7 +12035,7 @@ async function mcpCommand({ version }) {
|
|
|
11896
12035
|
}
|
|
11897
12036
|
|
|
11898
12037
|
// src/cli/index.ts
|
|
11899
|
-
var getVersion = () => "4.1.
|
|
12038
|
+
var getVersion = () => "4.1.1";
|
|
11900
12039
|
var main = async () => {
|
|
11901
12040
|
const program = new import_commander.Command();
|
|
11902
12041
|
const version = getVersion();
|