rulesync 6.1.0 → 6.2.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 +1 -1
- package/dist/index.cjs +328 -200
- package/dist/index.js +327 -199
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4070,14 +4070,16 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
|
|
|
4070
4070
|
static forDeletion({
|
|
4071
4071
|
baseDir = process.cwd(),
|
|
4072
4072
|
relativeDirPath,
|
|
4073
|
-
relativeFilePath
|
|
4073
|
+
relativeFilePath,
|
|
4074
|
+
global = false
|
|
4074
4075
|
}) {
|
|
4075
4076
|
return new _ClaudecodeMcp({
|
|
4076
4077
|
baseDir,
|
|
4077
4078
|
relativeDirPath,
|
|
4078
4079
|
relativeFilePath,
|
|
4079
4080
|
fileContent: "{}",
|
|
4080
|
-
validate: false
|
|
4081
|
+
validate: false,
|
|
4082
|
+
global
|
|
4081
4083
|
});
|
|
4082
4084
|
}
|
|
4083
4085
|
};
|
|
@@ -4540,17 +4542,25 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
|
|
|
4540
4542
|
validate() {
|
|
4541
4543
|
return { success: true, error: null };
|
|
4542
4544
|
}
|
|
4545
|
+
/**
|
|
4546
|
+
* settings.json may contain other settings, so it should not be deleted.
|
|
4547
|
+
*/
|
|
4548
|
+
isDeletable() {
|
|
4549
|
+
return false;
|
|
4550
|
+
}
|
|
4543
4551
|
static forDeletion({
|
|
4544
4552
|
baseDir = process.cwd(),
|
|
4545
4553
|
relativeDirPath,
|
|
4546
|
-
relativeFilePath
|
|
4554
|
+
relativeFilePath,
|
|
4555
|
+
global = false
|
|
4547
4556
|
}) {
|
|
4548
4557
|
return new _GeminiCliMcp({
|
|
4549
4558
|
baseDir,
|
|
4550
4559
|
relativeDirPath,
|
|
4551
4560
|
relativeFilePath,
|
|
4552
4561
|
fileContent: "{}",
|
|
4553
|
-
validate: false
|
|
4562
|
+
validate: false,
|
|
4563
|
+
global
|
|
4554
4564
|
});
|
|
4555
4565
|
}
|
|
4556
4566
|
};
|
|
@@ -4954,14 +4964,16 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
|
|
|
4954
4964
|
static forDeletion({
|
|
4955
4965
|
baseDir = process.cwd(),
|
|
4956
4966
|
relativeDirPath,
|
|
4957
|
-
relativeFilePath
|
|
4967
|
+
relativeFilePath,
|
|
4968
|
+
global = false
|
|
4958
4969
|
}) {
|
|
4959
4970
|
return new _OpencodeMcp({
|
|
4960
4971
|
baseDir,
|
|
4961
4972
|
relativeDirPath,
|
|
4962
4973
|
relativeFilePath,
|
|
4963
4974
|
fileContent: "{}",
|
|
4964
|
-
validate: false
|
|
4975
|
+
validate: false,
|
|
4976
|
+
global
|
|
4965
4977
|
});
|
|
4966
4978
|
}
|
|
4967
4979
|
};
|
|
@@ -5335,7 +5347,7 @@ var McpProcessor = class extends FeatureProcessor {
|
|
|
5335
5347
|
// src/features/rules/rules-processor.ts
|
|
5336
5348
|
var import_toon = require("@toon-format/toon");
|
|
5337
5349
|
var import_node_path97 = require("path");
|
|
5338
|
-
var
|
|
5350
|
+
var import_mini45 = require("zod/mini");
|
|
5339
5351
|
|
|
5340
5352
|
// src/constants/general.ts
|
|
5341
5353
|
var SKILL_FILE_NAME = "SKILL.md";
|
|
@@ -7966,39 +7978,12 @@ var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
|
|
|
7966
7978
|
}
|
|
7967
7979
|
};
|
|
7968
7980
|
|
|
7969
|
-
// src/features/subagents/cursor-subagent.ts
|
|
7970
|
-
var import_node_path66 = require("path");
|
|
7971
|
-
var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
|
|
7972
|
-
static getSettablePaths() {
|
|
7973
|
-
return {
|
|
7974
|
-
relativeDirPath: (0, import_node_path66.join)(".cursor", "subagents")
|
|
7975
|
-
};
|
|
7976
|
-
}
|
|
7977
|
-
static async fromFile(params) {
|
|
7978
|
-
const baseParams = await this.fromFileDefault(params);
|
|
7979
|
-
return new _CursorSubagent(baseParams);
|
|
7980
|
-
}
|
|
7981
|
-
static fromRulesyncSubagent(params) {
|
|
7982
|
-
const baseParams = this.fromRulesyncSubagentDefault(params);
|
|
7983
|
-
return new _CursorSubagent(baseParams);
|
|
7984
|
-
}
|
|
7985
|
-
static isTargetedByRulesyncSubagent(rulesyncSubagent) {
|
|
7986
|
-
return this.isTargetedByRulesyncSubagentDefault({
|
|
7987
|
-
rulesyncSubagent,
|
|
7988
|
-
toolTarget: "cursor"
|
|
7989
|
-
});
|
|
7990
|
-
}
|
|
7991
|
-
static forDeletion(params) {
|
|
7992
|
-
return new _CursorSubagent(this.forDeletionDefault(params));
|
|
7993
|
-
}
|
|
7994
|
-
};
|
|
7995
|
-
|
|
7996
7981
|
// src/features/subagents/geminicli-subagent.ts
|
|
7997
|
-
var
|
|
7982
|
+
var import_node_path66 = require("path");
|
|
7998
7983
|
var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
|
|
7999
7984
|
static getSettablePaths() {
|
|
8000
7985
|
return {
|
|
8001
|
-
relativeDirPath: (0,
|
|
7986
|
+
relativeDirPath: (0, import_node_path66.join)(".gemini", "subagents")
|
|
8002
7987
|
};
|
|
8003
7988
|
}
|
|
8004
7989
|
static async fromFile(params) {
|
|
@@ -8021,11 +8006,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
|
|
|
8021
8006
|
};
|
|
8022
8007
|
|
|
8023
8008
|
// src/features/subagents/roo-subagent.ts
|
|
8024
|
-
var
|
|
8009
|
+
var import_node_path67 = require("path");
|
|
8025
8010
|
var RooSubagent = class _RooSubagent extends SimulatedSubagent {
|
|
8026
8011
|
static getSettablePaths() {
|
|
8027
8012
|
return {
|
|
8028
|
-
relativeDirPath: (0,
|
|
8013
|
+
relativeDirPath: (0, import_node_path67.join)(".roo", "subagents")
|
|
8029
8014
|
};
|
|
8030
8015
|
}
|
|
8031
8016
|
static async fromFile(params) {
|
|
@@ -8049,14 +8034,14 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
|
|
|
8049
8034
|
|
|
8050
8035
|
// src/features/subagents/subagents-processor.ts
|
|
8051
8036
|
var import_node_path74 = require("path");
|
|
8052
|
-
var
|
|
8037
|
+
var import_mini38 = require("zod/mini");
|
|
8053
8038
|
|
|
8054
8039
|
// src/features/subagents/claudecode-subagent.ts
|
|
8055
|
-
var
|
|
8040
|
+
var import_node_path69 = require("path");
|
|
8056
8041
|
var import_mini33 = require("zod/mini");
|
|
8057
8042
|
|
|
8058
8043
|
// src/features/subagents/rulesync-subagent.ts
|
|
8059
|
-
var
|
|
8044
|
+
var import_node_path68 = require("path");
|
|
8060
8045
|
var import_mini32 = require("zod/mini");
|
|
8061
8046
|
var RulesyncSubagentFrontmatterSchema = import_mini32.z.looseObject({
|
|
8062
8047
|
targets: RulesyncTargetsSchema,
|
|
@@ -8071,7 +8056,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
8071
8056
|
const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
8072
8057
|
if (!result.success) {
|
|
8073
8058
|
throw new Error(
|
|
8074
|
-
`Invalid frontmatter in ${(0,
|
|
8059
|
+
`Invalid frontmatter in ${(0, import_node_path68.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
8075
8060
|
);
|
|
8076
8061
|
}
|
|
8077
8062
|
}
|
|
@@ -8104,7 +8089,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
8104
8089
|
return {
|
|
8105
8090
|
success: false,
|
|
8106
8091
|
error: new Error(
|
|
8107
|
-
`Invalid frontmatter in ${(0,
|
|
8092
|
+
`Invalid frontmatter in ${(0, import_node_path68.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
8108
8093
|
)
|
|
8109
8094
|
};
|
|
8110
8095
|
}
|
|
@@ -8113,14 +8098,14 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
8113
8098
|
relativeFilePath
|
|
8114
8099
|
}) {
|
|
8115
8100
|
const fileContent = await readFileContent(
|
|
8116
|
-
(0,
|
|
8101
|
+
(0, import_node_path68.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath)
|
|
8117
8102
|
);
|
|
8118
8103
|
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
8119
8104
|
const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
8120
8105
|
if (!result.success) {
|
|
8121
8106
|
throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
|
|
8122
8107
|
}
|
|
8123
|
-
const filename = (0,
|
|
8108
|
+
const filename = (0, import_node_path68.basename)(relativeFilePath);
|
|
8124
8109
|
return new _RulesyncSubagent({
|
|
8125
8110
|
baseDir: process.cwd(),
|
|
8126
8111
|
relativeDirPath: this.getSettablePaths().relativeDirPath,
|
|
@@ -8148,7 +8133,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
8148
8133
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
8149
8134
|
if (!result.success) {
|
|
8150
8135
|
throw new Error(
|
|
8151
|
-
`Invalid frontmatter in ${(0,
|
|
8136
|
+
`Invalid frontmatter in ${(0, import_node_path69.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
8152
8137
|
);
|
|
8153
8138
|
}
|
|
8154
8139
|
}
|
|
@@ -8160,7 +8145,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
8160
8145
|
}
|
|
8161
8146
|
static getSettablePaths(_options = {}) {
|
|
8162
8147
|
return {
|
|
8163
|
-
relativeDirPath: (0,
|
|
8148
|
+
relativeDirPath: (0, import_node_path69.join)(".claude", "agents")
|
|
8164
8149
|
};
|
|
8165
8150
|
}
|
|
8166
8151
|
getFrontmatter() {
|
|
@@ -8234,7 +8219,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
8234
8219
|
return {
|
|
8235
8220
|
success: false,
|
|
8236
8221
|
error: new Error(
|
|
8237
|
-
`Invalid frontmatter in ${(0,
|
|
8222
|
+
`Invalid frontmatter in ${(0, import_node_path69.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
8238
8223
|
)
|
|
8239
8224
|
};
|
|
8240
8225
|
}
|
|
@@ -8252,7 +8237,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
8252
8237
|
global = false
|
|
8253
8238
|
}) {
|
|
8254
8239
|
const paths = this.getSettablePaths({ global });
|
|
8255
|
-
const filePath = (0,
|
|
8240
|
+
const filePath = (0, import_node_path69.join)(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
8256
8241
|
const fileContent = await readFileContent(filePath);
|
|
8257
8242
|
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
8258
8243
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -8287,7 +8272,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
8287
8272
|
};
|
|
8288
8273
|
|
|
8289
8274
|
// src/features/subagents/copilot-subagent.ts
|
|
8290
|
-
var
|
|
8275
|
+
var import_node_path70 = require("path");
|
|
8291
8276
|
var import_mini34 = require("zod/mini");
|
|
8292
8277
|
var REQUIRED_TOOL = "agent/runSubagent";
|
|
8293
8278
|
var CopilotSubagentFrontmatterSchema = import_mini34.z.looseObject({
|
|
@@ -8313,7 +8298,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
8313
8298
|
const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
8314
8299
|
if (!result.success) {
|
|
8315
8300
|
throw new Error(
|
|
8316
|
-
`Invalid frontmatter in ${(0,
|
|
8301
|
+
`Invalid frontmatter in ${(0, import_node_path70.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
8317
8302
|
);
|
|
8318
8303
|
}
|
|
8319
8304
|
}
|
|
@@ -8325,7 +8310,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
8325
8310
|
}
|
|
8326
8311
|
static getSettablePaths(_options = {}) {
|
|
8327
8312
|
return {
|
|
8328
|
-
relativeDirPath: (0,
|
|
8313
|
+
relativeDirPath: (0, import_node_path70.join)(".github", "agents")
|
|
8329
8314
|
};
|
|
8330
8315
|
}
|
|
8331
8316
|
getFrontmatter() {
|
|
@@ -8399,7 +8384,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
8399
8384
|
return {
|
|
8400
8385
|
success: false,
|
|
8401
8386
|
error: new Error(
|
|
8402
|
-
`Invalid frontmatter in ${(0,
|
|
8387
|
+
`Invalid frontmatter in ${(0, import_node_path70.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
8403
8388
|
)
|
|
8404
8389
|
};
|
|
8405
8390
|
}
|
|
@@ -8417,7 +8402,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
8417
8402
|
global = false
|
|
8418
8403
|
}) {
|
|
8419
8404
|
const paths = this.getSettablePaths({ global });
|
|
8420
|
-
const filePath = (0,
|
|
8405
|
+
const filePath = (0, import_node_path70.join)(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
8421
8406
|
const fileContent = await readFileContent(filePath);
|
|
8422
8407
|
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
8423
8408
|
const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -8452,24 +8437,171 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
8452
8437
|
}
|
|
8453
8438
|
};
|
|
8454
8439
|
|
|
8455
|
-
// src/features/subagents/
|
|
8456
|
-
var
|
|
8440
|
+
// src/features/subagents/cursor-subagent.ts
|
|
8441
|
+
var import_node_path71 = require("path");
|
|
8457
8442
|
var import_mini35 = require("zod/mini");
|
|
8458
|
-
var
|
|
8443
|
+
var CursorSubagentFrontmatterSchema = import_mini35.z.looseObject({
|
|
8459
8444
|
name: import_mini35.z.string(),
|
|
8460
|
-
description: import_mini35.z.
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8445
|
+
description: import_mini35.z.string()
|
|
8446
|
+
});
|
|
8447
|
+
var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
8448
|
+
frontmatter;
|
|
8449
|
+
body;
|
|
8450
|
+
constructor({ frontmatter, body, ...rest }) {
|
|
8451
|
+
if (rest.validate !== false) {
|
|
8452
|
+
const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
8453
|
+
if (!result.success) {
|
|
8454
|
+
throw new Error(
|
|
8455
|
+
`Invalid frontmatter in ${(0, import_node_path71.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
8456
|
+
);
|
|
8457
|
+
}
|
|
8458
|
+
}
|
|
8459
|
+
super({
|
|
8460
|
+
...rest
|
|
8461
|
+
});
|
|
8462
|
+
this.frontmatter = frontmatter;
|
|
8463
|
+
this.body = body;
|
|
8464
|
+
}
|
|
8465
|
+
static getSettablePaths(_options = {}) {
|
|
8466
|
+
return {
|
|
8467
|
+
relativeDirPath: (0, import_node_path71.join)(".cursor", "agents")
|
|
8468
|
+
};
|
|
8469
|
+
}
|
|
8470
|
+
getFrontmatter() {
|
|
8471
|
+
return this.frontmatter;
|
|
8472
|
+
}
|
|
8473
|
+
getBody() {
|
|
8474
|
+
return this.body;
|
|
8475
|
+
}
|
|
8476
|
+
toRulesyncSubagent() {
|
|
8477
|
+
const { name, description, ...rest } = this.frontmatter;
|
|
8478
|
+
const rulesyncFrontmatter = {
|
|
8479
|
+
targets: ["*"],
|
|
8480
|
+
name,
|
|
8481
|
+
description,
|
|
8482
|
+
cursor: {
|
|
8483
|
+
...rest
|
|
8484
|
+
}
|
|
8485
|
+
};
|
|
8486
|
+
return new RulesyncSubagent({
|
|
8487
|
+
baseDir: ".",
|
|
8488
|
+
// RulesyncSubagent baseDir is always the project root directory
|
|
8489
|
+
frontmatter: rulesyncFrontmatter,
|
|
8490
|
+
body: this.body,
|
|
8491
|
+
relativeDirPath: RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH,
|
|
8492
|
+
relativeFilePath: this.getRelativeFilePath(),
|
|
8493
|
+
validate: true
|
|
8494
|
+
});
|
|
8495
|
+
}
|
|
8496
|
+
static fromRulesyncSubagent({
|
|
8497
|
+
baseDir = process.cwd(),
|
|
8498
|
+
rulesyncSubagent,
|
|
8499
|
+
validate = true,
|
|
8500
|
+
global = false
|
|
8501
|
+
}) {
|
|
8502
|
+
const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
|
|
8503
|
+
const cursorSection = rulesyncFrontmatter.cursor ?? {};
|
|
8504
|
+
const cursorFrontmatter = {
|
|
8505
|
+
name: rulesyncFrontmatter.name,
|
|
8506
|
+
description: rulesyncFrontmatter.description,
|
|
8507
|
+
...cursorSection
|
|
8508
|
+
};
|
|
8509
|
+
const body = rulesyncSubagent.getBody();
|
|
8510
|
+
const fileContent = stringifyFrontmatter(body, cursorFrontmatter);
|
|
8511
|
+
const paths = this.getSettablePaths({ global });
|
|
8512
|
+
return new _CursorSubagent({
|
|
8513
|
+
baseDir,
|
|
8514
|
+
frontmatter: cursorFrontmatter,
|
|
8515
|
+
body,
|
|
8516
|
+
relativeDirPath: paths.relativeDirPath,
|
|
8517
|
+
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
8518
|
+
fileContent,
|
|
8519
|
+
validate,
|
|
8520
|
+
global
|
|
8521
|
+
});
|
|
8522
|
+
}
|
|
8523
|
+
validate() {
|
|
8524
|
+
if (!this.frontmatter) {
|
|
8525
|
+
return { success: true, error: null };
|
|
8526
|
+
}
|
|
8527
|
+
const result = CursorSubagentFrontmatterSchema.safeParse(this.frontmatter);
|
|
8528
|
+
if (result.success) {
|
|
8529
|
+
return { success: true, error: null };
|
|
8530
|
+
} else {
|
|
8531
|
+
return {
|
|
8532
|
+
success: false,
|
|
8533
|
+
error: new Error(
|
|
8534
|
+
`Invalid frontmatter in ${(0, import_node_path71.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
8535
|
+
)
|
|
8536
|
+
};
|
|
8537
|
+
}
|
|
8538
|
+
}
|
|
8539
|
+
static isTargetedByRulesyncSubagent(rulesyncSubagent) {
|
|
8540
|
+
return this.isTargetedByRulesyncSubagentDefault({
|
|
8541
|
+
rulesyncSubagent,
|
|
8542
|
+
toolTarget: "cursor"
|
|
8543
|
+
});
|
|
8544
|
+
}
|
|
8545
|
+
static async fromFile({
|
|
8546
|
+
baseDir = process.cwd(),
|
|
8547
|
+
relativeFilePath,
|
|
8548
|
+
validate = true,
|
|
8549
|
+
global = false
|
|
8550
|
+
}) {
|
|
8551
|
+
const paths = this.getSettablePaths({ global });
|
|
8552
|
+
const filePath = (0, import_node_path71.join)(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
8553
|
+
const fileContent = await readFileContent(filePath);
|
|
8554
|
+
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
8555
|
+
const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
8556
|
+
if (!result.success) {
|
|
8557
|
+
throw new Error(`Invalid frontmatter in ${filePath}: ${formatError(result.error)}`);
|
|
8558
|
+
}
|
|
8559
|
+
return new _CursorSubagent({
|
|
8560
|
+
baseDir,
|
|
8561
|
+
relativeDirPath: paths.relativeDirPath,
|
|
8562
|
+
relativeFilePath,
|
|
8563
|
+
frontmatter: result.data,
|
|
8564
|
+
body: content.trim(),
|
|
8565
|
+
fileContent,
|
|
8566
|
+
validate,
|
|
8567
|
+
global
|
|
8568
|
+
});
|
|
8569
|
+
}
|
|
8570
|
+
static forDeletion({
|
|
8571
|
+
baseDir = process.cwd(),
|
|
8572
|
+
relativeDirPath,
|
|
8573
|
+
relativeFilePath
|
|
8574
|
+
}) {
|
|
8575
|
+
return new _CursorSubagent({
|
|
8576
|
+
baseDir,
|
|
8577
|
+
relativeDirPath,
|
|
8578
|
+
relativeFilePath,
|
|
8579
|
+
frontmatter: { name: "", description: "" },
|
|
8580
|
+
body: "",
|
|
8581
|
+
fileContent: "",
|
|
8582
|
+
validate: false
|
|
8583
|
+
});
|
|
8584
|
+
}
|
|
8585
|
+
};
|
|
8586
|
+
|
|
8587
|
+
// src/features/subagents/kiro-subagent.ts
|
|
8588
|
+
var import_node_path72 = require("path");
|
|
8589
|
+
var import_mini36 = require("zod/mini");
|
|
8590
|
+
var KiroCliSubagentJsonSchema = import_mini36.z.looseObject({
|
|
8591
|
+
name: import_mini36.z.string(),
|
|
8592
|
+
description: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.string())),
|
|
8593
|
+
prompt: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.string())),
|
|
8594
|
+
tools: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.array(import_mini36.z.string()))),
|
|
8595
|
+
toolAliases: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.record(import_mini36.z.string(), import_mini36.z.string()))),
|
|
8596
|
+
toolSettings: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.unknown())),
|
|
8597
|
+
toolSchema: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.unknown())),
|
|
8598
|
+
hooks: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.record(import_mini36.z.string(), import_mini36.z.array(import_mini36.z.unknown())))),
|
|
8599
|
+
model: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.string())),
|
|
8600
|
+
mcpServers: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.record(import_mini36.z.string(), import_mini36.z.unknown()))),
|
|
8601
|
+
useLegacyMcpJson: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.boolean())),
|
|
8602
|
+
resources: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.array(import_mini36.z.string()))),
|
|
8603
|
+
allowedTools: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.array(import_mini36.z.string()))),
|
|
8604
|
+
includeMcpJson: import_mini36.z.optional(import_mini36.z.nullable(import_mini36.z.boolean()))
|
|
8473
8605
|
});
|
|
8474
8606
|
var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
8475
8607
|
body;
|
|
@@ -8591,11 +8723,11 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
|
8591
8723
|
|
|
8592
8724
|
// src/features/subagents/opencode-subagent.ts
|
|
8593
8725
|
var import_node_path73 = require("path");
|
|
8594
|
-
var
|
|
8595
|
-
var OpenCodeSubagentFrontmatterSchema =
|
|
8596
|
-
description:
|
|
8597
|
-
mode:
|
|
8598
|
-
name:
|
|
8726
|
+
var import_mini37 = require("zod/mini");
|
|
8727
|
+
var OpenCodeSubagentFrontmatterSchema = import_mini37.z.looseObject({
|
|
8728
|
+
description: import_mini37.z.string(),
|
|
8729
|
+
mode: import_mini37.z.literal("subagent"),
|
|
8730
|
+
name: import_mini37.z.optional(import_mini37.z.string())
|
|
8599
8731
|
});
|
|
8600
8732
|
var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
|
|
8601
8733
|
frontmatter;
|
|
@@ -8750,7 +8882,7 @@ var subagentsProcessorToolTargetTuple = [
|
|
|
8750
8882
|
"opencode",
|
|
8751
8883
|
"roo"
|
|
8752
8884
|
];
|
|
8753
|
-
var SubagentsProcessorToolTargetSchema =
|
|
8885
|
+
var SubagentsProcessorToolTargetSchema = import_mini38.z.enum(subagentsProcessorToolTargetTuple);
|
|
8754
8886
|
var toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
8755
8887
|
[
|
|
8756
8888
|
"agentsmd",
|
|
@@ -8791,7 +8923,7 @@ var toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
|
8791
8923
|
"cursor",
|
|
8792
8924
|
{
|
|
8793
8925
|
class: CursorSubagent,
|
|
8794
|
-
meta: { supportsSimulated:
|
|
8926
|
+
meta: { supportsSimulated: false, supportsGlobal: false, filePattern: "*.md" }
|
|
8795
8927
|
}
|
|
8796
8928
|
],
|
|
8797
8929
|
[
|
|
@@ -9006,42 +9138,42 @@ var import_node_path76 = require("path");
|
|
|
9006
9138
|
|
|
9007
9139
|
// src/features/rules/rulesync-rule.ts
|
|
9008
9140
|
var import_node_path75 = require("path");
|
|
9009
|
-
var
|
|
9010
|
-
var RulesyncRuleFrontmatterSchema =
|
|
9011
|
-
root:
|
|
9012
|
-
localRoot:
|
|
9013
|
-
targets:
|
|
9014
|
-
description:
|
|
9015
|
-
globs:
|
|
9016
|
-
agentsmd:
|
|
9017
|
-
|
|
9141
|
+
var import_mini39 = require("zod/mini");
|
|
9142
|
+
var RulesyncRuleFrontmatterSchema = import_mini39.z.object({
|
|
9143
|
+
root: import_mini39.z.optional(import_mini39.z.boolean()),
|
|
9144
|
+
localRoot: import_mini39.z.optional(import_mini39.z.boolean()),
|
|
9145
|
+
targets: import_mini39.z.optional(RulesyncTargetsSchema),
|
|
9146
|
+
description: import_mini39.z.optional(import_mini39.z.string()),
|
|
9147
|
+
globs: import_mini39.z.optional(import_mini39.z.array(import_mini39.z.string())),
|
|
9148
|
+
agentsmd: import_mini39.z.optional(
|
|
9149
|
+
import_mini39.z.object({
|
|
9018
9150
|
// @example "path/to/subproject"
|
|
9019
|
-
subprojectPath:
|
|
9151
|
+
subprojectPath: import_mini39.z.optional(import_mini39.z.string())
|
|
9020
9152
|
})
|
|
9021
9153
|
),
|
|
9022
|
-
claudecode:
|
|
9023
|
-
|
|
9154
|
+
claudecode: import_mini39.z.optional(
|
|
9155
|
+
import_mini39.z.object({
|
|
9024
9156
|
// Glob patterns for conditional rules (takes precedence over globs)
|
|
9025
9157
|
// @example "src/**/*.ts, tests/**/*.test.ts"
|
|
9026
|
-
paths:
|
|
9158
|
+
paths: import_mini39.z.optional(import_mini39.z.string())
|
|
9027
9159
|
})
|
|
9028
9160
|
),
|
|
9029
|
-
cursor:
|
|
9030
|
-
|
|
9031
|
-
alwaysApply:
|
|
9032
|
-
description:
|
|
9033
|
-
globs:
|
|
9161
|
+
cursor: import_mini39.z.optional(
|
|
9162
|
+
import_mini39.z.object({
|
|
9163
|
+
alwaysApply: import_mini39.z.optional(import_mini39.z.boolean()),
|
|
9164
|
+
description: import_mini39.z.optional(import_mini39.z.string()),
|
|
9165
|
+
globs: import_mini39.z.optional(import_mini39.z.array(import_mini39.z.string()))
|
|
9034
9166
|
})
|
|
9035
9167
|
),
|
|
9036
|
-
copilot:
|
|
9037
|
-
|
|
9038
|
-
excludeAgent:
|
|
9168
|
+
copilot: import_mini39.z.optional(
|
|
9169
|
+
import_mini39.z.object({
|
|
9170
|
+
excludeAgent: import_mini39.z.optional(import_mini39.z.union([import_mini39.z.literal("code-review"), import_mini39.z.literal("coding-agent")]))
|
|
9039
9171
|
})
|
|
9040
9172
|
),
|
|
9041
|
-
antigravity:
|
|
9042
|
-
|
|
9043
|
-
trigger:
|
|
9044
|
-
globs:
|
|
9173
|
+
antigravity: import_mini39.z.optional(
|
|
9174
|
+
import_mini39.z.looseObject({
|
|
9175
|
+
trigger: import_mini39.z.optional(import_mini39.z.string()),
|
|
9176
|
+
globs: import_mini39.z.optional(import_mini39.z.array(import_mini39.z.string()))
|
|
9045
9177
|
})
|
|
9046
9178
|
)
|
|
9047
9179
|
});
|
|
@@ -9342,20 +9474,20 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
9342
9474
|
|
|
9343
9475
|
// src/features/rules/antigravity-rule.ts
|
|
9344
9476
|
var import_node_path78 = require("path");
|
|
9345
|
-
var
|
|
9346
|
-
var AntigravityRuleFrontmatterSchema =
|
|
9347
|
-
trigger:
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9477
|
+
var import_mini40 = require("zod/mini");
|
|
9478
|
+
var AntigravityRuleFrontmatterSchema = import_mini40.z.looseObject({
|
|
9479
|
+
trigger: import_mini40.z.optional(
|
|
9480
|
+
import_mini40.z.union([
|
|
9481
|
+
import_mini40.z.literal("always_on"),
|
|
9482
|
+
import_mini40.z.literal("glob"),
|
|
9483
|
+
import_mini40.z.literal("manual"),
|
|
9484
|
+
import_mini40.z.literal("model_decision"),
|
|
9485
|
+
import_mini40.z.string()
|
|
9354
9486
|
// accepts any string for forward compatibility
|
|
9355
9487
|
])
|
|
9356
9488
|
),
|
|
9357
|
-
globs:
|
|
9358
|
-
description:
|
|
9489
|
+
globs: import_mini40.z.optional(import_mini40.z.string()),
|
|
9490
|
+
description: import_mini40.z.optional(import_mini40.z.string())
|
|
9359
9491
|
});
|
|
9360
9492
|
function parseGlobsString(globs) {
|
|
9361
9493
|
if (!globs) {
|
|
@@ -9933,9 +10065,9 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
9933
10065
|
|
|
9934
10066
|
// src/features/rules/claudecode-rule.ts
|
|
9935
10067
|
var import_node_path82 = require("path");
|
|
9936
|
-
var
|
|
9937
|
-
var ClaudecodeRuleFrontmatterSchema =
|
|
9938
|
-
paths:
|
|
10068
|
+
var import_mini41 = require("zod/mini");
|
|
10069
|
+
var ClaudecodeRuleFrontmatterSchema = import_mini41.z.object({
|
|
10070
|
+
paths: import_mini41.z.optional(import_mini41.z.string())
|
|
9939
10071
|
});
|
|
9940
10072
|
var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
9941
10073
|
frontmatter;
|
|
@@ -10143,9 +10275,9 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
10143
10275
|
|
|
10144
10276
|
// src/features/rules/cline-rule.ts
|
|
10145
10277
|
var import_node_path83 = require("path");
|
|
10146
|
-
var
|
|
10147
|
-
var ClineRuleFrontmatterSchema =
|
|
10148
|
-
description:
|
|
10278
|
+
var import_mini42 = require("zod/mini");
|
|
10279
|
+
var ClineRuleFrontmatterSchema = import_mini42.z.object({
|
|
10280
|
+
description: import_mini42.z.string()
|
|
10149
10281
|
});
|
|
10150
10282
|
var ClineRule = class _ClineRule extends ToolRule {
|
|
10151
10283
|
static getSettablePaths() {
|
|
@@ -10322,11 +10454,11 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
10322
10454
|
|
|
10323
10455
|
// src/features/rules/copilot-rule.ts
|
|
10324
10456
|
var import_node_path85 = require("path");
|
|
10325
|
-
var
|
|
10326
|
-
var CopilotRuleFrontmatterSchema =
|
|
10327
|
-
description:
|
|
10328
|
-
applyTo:
|
|
10329
|
-
excludeAgent:
|
|
10457
|
+
var import_mini43 = require("zod/mini");
|
|
10458
|
+
var CopilotRuleFrontmatterSchema = import_mini43.z.object({
|
|
10459
|
+
description: import_mini43.z.optional(import_mini43.z.string()),
|
|
10460
|
+
applyTo: import_mini43.z.optional(import_mini43.z.string()),
|
|
10461
|
+
excludeAgent: import_mini43.z.optional(import_mini43.z.union([import_mini43.z.literal("code-review"), import_mini43.z.literal("coding-agent")]))
|
|
10330
10462
|
});
|
|
10331
10463
|
var CopilotRule = class _CopilotRule extends ToolRule {
|
|
10332
10464
|
frontmatter;
|
|
@@ -10510,11 +10642,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
10510
10642
|
|
|
10511
10643
|
// src/features/rules/cursor-rule.ts
|
|
10512
10644
|
var import_node_path86 = require("path");
|
|
10513
|
-
var
|
|
10514
|
-
var CursorRuleFrontmatterSchema =
|
|
10515
|
-
description:
|
|
10516
|
-
globs:
|
|
10517
|
-
alwaysApply:
|
|
10645
|
+
var import_mini44 = require("zod/mini");
|
|
10646
|
+
var CursorRuleFrontmatterSchema = import_mini44.z.object({
|
|
10647
|
+
description: import_mini44.z.optional(import_mini44.z.string()),
|
|
10648
|
+
globs: import_mini44.z.optional(import_mini44.z.string()),
|
|
10649
|
+
alwaysApply: import_mini44.z.optional(import_mini44.z.boolean())
|
|
10518
10650
|
});
|
|
10519
10651
|
var CursorRule = class _CursorRule extends ToolRule {
|
|
10520
10652
|
frontmatter;
|
|
@@ -11520,7 +11652,7 @@ var rulesProcessorToolTargets = [
|
|
|
11520
11652
|
"warp",
|
|
11521
11653
|
"windsurf"
|
|
11522
11654
|
];
|
|
11523
|
-
var RulesProcessorToolTargetSchema =
|
|
11655
|
+
var RulesProcessorToolTargetSchema = import_mini45.z.enum(rulesProcessorToolTargets);
|
|
11524
11656
|
var toolRuleFactories = /* @__PURE__ */ new Map([
|
|
11525
11657
|
[
|
|
11526
11658
|
"agentsmd",
|
|
@@ -11612,11 +11744,7 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
|
|
|
11612
11744
|
meta: {
|
|
11613
11745
|
extension: "mdc",
|
|
11614
11746
|
supportsGlobal: false,
|
|
11615
|
-
ruleDiscoveryMode: "auto"
|
|
11616
|
-
additionalConventions: {
|
|
11617
|
-
subagents: { subagentClass: CursorSubagent }
|
|
11618
|
-
},
|
|
11619
|
-
createsSeparateConventionsRule: true
|
|
11747
|
+
ruleDiscoveryMode: "auto"
|
|
11620
11748
|
}
|
|
11621
11749
|
}
|
|
11622
11750
|
],
|
|
@@ -12427,7 +12555,7 @@ async function generateCommand(options) {
|
|
|
12427
12555
|
silent: config.getSilent()
|
|
12428
12556
|
});
|
|
12429
12557
|
logger.info("Generating files...");
|
|
12430
|
-
if (!await checkRulesyncDirExists({ baseDir:
|
|
12558
|
+
if (!await checkRulesyncDirExists({ baseDir: process.cwd() })) {
|
|
12431
12559
|
logger.error("\u274C .rulesync directory not found. Run 'rulesync init' first.");
|
|
12432
12560
|
process.exit(1);
|
|
12433
12561
|
}
|
|
@@ -13072,11 +13200,11 @@ Keep the summary concise and ready to reuse in future tasks.`
|
|
|
13072
13200
|
var import_fastmcp = require("fastmcp");
|
|
13073
13201
|
|
|
13074
13202
|
// src/mcp/tools.ts
|
|
13075
|
-
var
|
|
13203
|
+
var import_mini52 = require("zod/mini");
|
|
13076
13204
|
|
|
13077
13205
|
// src/mcp/commands.ts
|
|
13078
13206
|
var import_node_path101 = require("path");
|
|
13079
|
-
var
|
|
13207
|
+
var import_mini46 = require("zod/mini");
|
|
13080
13208
|
var maxCommandSizeBytes = 1024 * 1024;
|
|
13081
13209
|
var maxCommandsCount = 1e3;
|
|
13082
13210
|
async function listCommands() {
|
|
@@ -13195,17 +13323,17 @@ async function deleteCommand({ relativePathFromCwd }) {
|
|
|
13195
13323
|
}
|
|
13196
13324
|
}
|
|
13197
13325
|
var commandToolSchemas = {
|
|
13198
|
-
listCommands:
|
|
13199
|
-
getCommand:
|
|
13200
|
-
relativePathFromCwd:
|
|
13326
|
+
listCommands: import_mini46.z.object({}),
|
|
13327
|
+
getCommand: import_mini46.z.object({
|
|
13328
|
+
relativePathFromCwd: import_mini46.z.string()
|
|
13201
13329
|
}),
|
|
13202
|
-
putCommand:
|
|
13203
|
-
relativePathFromCwd:
|
|
13330
|
+
putCommand: import_mini46.z.object({
|
|
13331
|
+
relativePathFromCwd: import_mini46.z.string(),
|
|
13204
13332
|
frontmatter: RulesyncCommandFrontmatterSchema,
|
|
13205
|
-
body:
|
|
13333
|
+
body: import_mini46.z.string()
|
|
13206
13334
|
}),
|
|
13207
|
-
deleteCommand:
|
|
13208
|
-
relativePathFromCwd:
|
|
13335
|
+
deleteCommand: import_mini46.z.object({
|
|
13336
|
+
relativePathFromCwd: import_mini46.z.string()
|
|
13209
13337
|
})
|
|
13210
13338
|
};
|
|
13211
13339
|
var commandTools = {
|
|
@@ -13254,7 +13382,7 @@ var commandTools = {
|
|
|
13254
13382
|
|
|
13255
13383
|
// src/mcp/ignore.ts
|
|
13256
13384
|
var import_node_path102 = require("path");
|
|
13257
|
-
var
|
|
13385
|
+
var import_mini47 = require("zod/mini");
|
|
13258
13386
|
var maxIgnoreFileSizeBytes = 100 * 1024;
|
|
13259
13387
|
async function getIgnoreFile() {
|
|
13260
13388
|
const ignoreFilePath = (0, import_node_path102.join)(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
|
|
@@ -13311,11 +13439,11 @@ async function deleteIgnoreFile() {
|
|
|
13311
13439
|
}
|
|
13312
13440
|
}
|
|
13313
13441
|
var ignoreToolSchemas = {
|
|
13314
|
-
getIgnoreFile:
|
|
13315
|
-
putIgnoreFile:
|
|
13316
|
-
content:
|
|
13442
|
+
getIgnoreFile: import_mini47.z.object({}),
|
|
13443
|
+
putIgnoreFile: import_mini47.z.object({
|
|
13444
|
+
content: import_mini47.z.string()
|
|
13317
13445
|
}),
|
|
13318
|
-
deleteIgnoreFile:
|
|
13446
|
+
deleteIgnoreFile: import_mini47.z.object({})
|
|
13319
13447
|
};
|
|
13320
13448
|
var ignoreTools = {
|
|
13321
13449
|
getIgnoreFile: {
|
|
@@ -13349,7 +13477,7 @@ var ignoreTools = {
|
|
|
13349
13477
|
|
|
13350
13478
|
// src/mcp/mcp.ts
|
|
13351
13479
|
var import_node_path103 = require("path");
|
|
13352
|
-
var
|
|
13480
|
+
var import_mini48 = require("zod/mini");
|
|
13353
13481
|
var maxMcpSizeBytes = 1024 * 1024;
|
|
13354
13482
|
async function getMcpFile() {
|
|
13355
13483
|
const config = await ConfigResolver.resolve({});
|
|
@@ -13439,11 +13567,11 @@ async function deleteMcpFile() {
|
|
|
13439
13567
|
}
|
|
13440
13568
|
}
|
|
13441
13569
|
var mcpToolSchemas = {
|
|
13442
|
-
getMcpFile:
|
|
13443
|
-
putMcpFile:
|
|
13444
|
-
content:
|
|
13570
|
+
getMcpFile: import_mini48.z.object({}),
|
|
13571
|
+
putMcpFile: import_mini48.z.object({
|
|
13572
|
+
content: import_mini48.z.string()
|
|
13445
13573
|
}),
|
|
13446
|
-
deleteMcpFile:
|
|
13574
|
+
deleteMcpFile: import_mini48.z.object({})
|
|
13447
13575
|
};
|
|
13448
13576
|
var mcpTools = {
|
|
13449
13577
|
getMcpFile: {
|
|
@@ -13477,7 +13605,7 @@ var mcpTools = {
|
|
|
13477
13605
|
|
|
13478
13606
|
// src/mcp/rules.ts
|
|
13479
13607
|
var import_node_path104 = require("path");
|
|
13480
|
-
var
|
|
13608
|
+
var import_mini49 = require("zod/mini");
|
|
13481
13609
|
var maxRuleSizeBytes = 1024 * 1024;
|
|
13482
13610
|
var maxRulesCount = 1e3;
|
|
13483
13611
|
async function listRules() {
|
|
@@ -13596,17 +13724,17 @@ async function deleteRule({ relativePathFromCwd }) {
|
|
|
13596
13724
|
}
|
|
13597
13725
|
}
|
|
13598
13726
|
var ruleToolSchemas = {
|
|
13599
|
-
listRules:
|
|
13600
|
-
getRule:
|
|
13601
|
-
relativePathFromCwd:
|
|
13727
|
+
listRules: import_mini49.z.object({}),
|
|
13728
|
+
getRule: import_mini49.z.object({
|
|
13729
|
+
relativePathFromCwd: import_mini49.z.string()
|
|
13602
13730
|
}),
|
|
13603
|
-
putRule:
|
|
13604
|
-
relativePathFromCwd:
|
|
13731
|
+
putRule: import_mini49.z.object({
|
|
13732
|
+
relativePathFromCwd: import_mini49.z.string(),
|
|
13605
13733
|
frontmatter: RulesyncRuleFrontmatterSchema,
|
|
13606
|
-
body:
|
|
13734
|
+
body: import_mini49.z.string()
|
|
13607
13735
|
}),
|
|
13608
|
-
deleteRule:
|
|
13609
|
-
relativePathFromCwd:
|
|
13736
|
+
deleteRule: import_mini49.z.object({
|
|
13737
|
+
relativePathFromCwd: import_mini49.z.string()
|
|
13610
13738
|
})
|
|
13611
13739
|
};
|
|
13612
13740
|
var ruleTools = {
|
|
@@ -13655,7 +13783,7 @@ var ruleTools = {
|
|
|
13655
13783
|
|
|
13656
13784
|
// src/mcp/skills.ts
|
|
13657
13785
|
var import_node_path105 = require("path");
|
|
13658
|
-
var
|
|
13786
|
+
var import_mini50 = require("zod/mini");
|
|
13659
13787
|
var maxSkillSizeBytes = 1024 * 1024;
|
|
13660
13788
|
var maxSkillsCount = 1e3;
|
|
13661
13789
|
function aiDirFileToMcpSkillFile(file) {
|
|
@@ -13823,23 +13951,23 @@ async function deleteSkill({
|
|
|
13823
13951
|
);
|
|
13824
13952
|
}
|
|
13825
13953
|
}
|
|
13826
|
-
var McpSkillFileSchema =
|
|
13827
|
-
name:
|
|
13828
|
-
body:
|
|
13954
|
+
var McpSkillFileSchema = import_mini50.z.object({
|
|
13955
|
+
name: import_mini50.z.string(),
|
|
13956
|
+
body: import_mini50.z.string()
|
|
13829
13957
|
});
|
|
13830
13958
|
var skillToolSchemas = {
|
|
13831
|
-
listSkills:
|
|
13832
|
-
getSkill:
|
|
13833
|
-
relativeDirPathFromCwd:
|
|
13959
|
+
listSkills: import_mini50.z.object({}),
|
|
13960
|
+
getSkill: import_mini50.z.object({
|
|
13961
|
+
relativeDirPathFromCwd: import_mini50.z.string()
|
|
13834
13962
|
}),
|
|
13835
|
-
putSkill:
|
|
13836
|
-
relativeDirPathFromCwd:
|
|
13963
|
+
putSkill: import_mini50.z.object({
|
|
13964
|
+
relativeDirPathFromCwd: import_mini50.z.string(),
|
|
13837
13965
|
frontmatter: RulesyncSkillFrontmatterSchema,
|
|
13838
|
-
body:
|
|
13839
|
-
otherFiles:
|
|
13966
|
+
body: import_mini50.z.string(),
|
|
13967
|
+
otherFiles: import_mini50.z.optional(import_mini50.z.array(McpSkillFileSchema))
|
|
13840
13968
|
}),
|
|
13841
|
-
deleteSkill:
|
|
13842
|
-
relativeDirPathFromCwd:
|
|
13969
|
+
deleteSkill: import_mini50.z.object({
|
|
13970
|
+
relativeDirPathFromCwd: import_mini50.z.string()
|
|
13843
13971
|
})
|
|
13844
13972
|
};
|
|
13845
13973
|
var skillTools = {
|
|
@@ -13889,7 +14017,7 @@ var skillTools = {
|
|
|
13889
14017
|
|
|
13890
14018
|
// src/mcp/subagents.ts
|
|
13891
14019
|
var import_node_path106 = require("path");
|
|
13892
|
-
var
|
|
14020
|
+
var import_mini51 = require("zod/mini");
|
|
13893
14021
|
var maxSubagentSizeBytes = 1024 * 1024;
|
|
13894
14022
|
var maxSubagentsCount = 1e3;
|
|
13895
14023
|
async function listSubagents() {
|
|
@@ -14013,17 +14141,17 @@ async function deleteSubagent({ relativePathFromCwd }) {
|
|
|
14013
14141
|
}
|
|
14014
14142
|
}
|
|
14015
14143
|
var subagentToolSchemas = {
|
|
14016
|
-
listSubagents:
|
|
14017
|
-
getSubagent:
|
|
14018
|
-
relativePathFromCwd:
|
|
14144
|
+
listSubagents: import_mini51.z.object({}),
|
|
14145
|
+
getSubagent: import_mini51.z.object({
|
|
14146
|
+
relativePathFromCwd: import_mini51.z.string()
|
|
14019
14147
|
}),
|
|
14020
|
-
putSubagent:
|
|
14021
|
-
relativePathFromCwd:
|
|
14148
|
+
putSubagent: import_mini51.z.object({
|
|
14149
|
+
relativePathFromCwd: import_mini51.z.string(),
|
|
14022
14150
|
frontmatter: RulesyncSubagentFrontmatterSchema,
|
|
14023
|
-
body:
|
|
14151
|
+
body: import_mini51.z.string()
|
|
14024
14152
|
}),
|
|
14025
|
-
deleteSubagent:
|
|
14026
|
-
relativePathFromCwd:
|
|
14153
|
+
deleteSubagent: import_mini51.z.object({
|
|
14154
|
+
relativePathFromCwd: import_mini51.z.string()
|
|
14027
14155
|
})
|
|
14028
14156
|
};
|
|
14029
14157
|
var subagentTools = {
|
|
@@ -14071,20 +14199,20 @@ var subagentTools = {
|
|
|
14071
14199
|
};
|
|
14072
14200
|
|
|
14073
14201
|
// src/mcp/tools.ts
|
|
14074
|
-
var rulesyncFeatureSchema =
|
|
14075
|
-
var rulesyncOperationSchema =
|
|
14076
|
-
var skillFileSchema =
|
|
14077
|
-
name:
|
|
14078
|
-
body:
|
|
14202
|
+
var rulesyncFeatureSchema = import_mini52.z.enum(["rule", "command", "subagent", "skill", "ignore", "mcp"]);
|
|
14203
|
+
var rulesyncOperationSchema = import_mini52.z.enum(["list", "get", "put", "delete"]);
|
|
14204
|
+
var skillFileSchema = import_mini52.z.object({
|
|
14205
|
+
name: import_mini52.z.string(),
|
|
14206
|
+
body: import_mini52.z.string()
|
|
14079
14207
|
});
|
|
14080
|
-
var rulesyncToolSchema =
|
|
14208
|
+
var rulesyncToolSchema = import_mini52.z.object({
|
|
14081
14209
|
feature: rulesyncFeatureSchema,
|
|
14082
14210
|
operation: rulesyncOperationSchema,
|
|
14083
|
-
targetPathFromCwd:
|
|
14084
|
-
frontmatter:
|
|
14085
|
-
body:
|
|
14086
|
-
otherFiles:
|
|
14087
|
-
content:
|
|
14211
|
+
targetPathFromCwd: import_mini52.z.optional(import_mini52.z.string()),
|
|
14212
|
+
frontmatter: import_mini52.z.optional(import_mini52.z.unknown()),
|
|
14213
|
+
body: import_mini52.z.optional(import_mini52.z.string()),
|
|
14214
|
+
otherFiles: import_mini52.z.optional(import_mini52.z.array(skillFileSchema)),
|
|
14215
|
+
content: import_mini52.z.optional(import_mini52.z.string())
|
|
14088
14216
|
});
|
|
14089
14217
|
var supportedOperationsByFeature = {
|
|
14090
14218
|
rule: ["list", "get", "put", "delete"],
|
|
@@ -14280,7 +14408,7 @@ async function mcpCommand({ version }) {
|
|
|
14280
14408
|
}
|
|
14281
14409
|
|
|
14282
14410
|
// src/cli/index.ts
|
|
14283
|
-
var getVersion = () => "6.
|
|
14411
|
+
var getVersion = () => "6.2.0";
|
|
14284
14412
|
var main = async () => {
|
|
14285
14413
|
const program = new import_commander.Command();
|
|
14286
14414
|
const version = getVersion();
|
|
@@ -14347,7 +14475,7 @@ var main = async () => {
|
|
|
14347
14475
|
"Generate simulated commands. This feature is only available for copilot, cursor and codexcli."
|
|
14348
14476
|
).option(
|
|
14349
14477
|
"--simulate-subagents",
|
|
14350
|
-
"Generate simulated subagents. This feature is only available for copilot
|
|
14478
|
+
"Generate simulated subagents. This feature is only available for copilot and codexcli."
|
|
14351
14479
|
).option(
|
|
14352
14480
|
"--simulate-skills",
|
|
14353
14481
|
"Generate simulated skills. This feature is only available for copilot, cursor and codexcli."
|