rulesync 7.8.0 → 7.9.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/{chunk-PEMFIVEG.js → chunk-HA3HGPC7.js} +841 -589
- package/dist/cli/index.cjs +1125 -873
- package/dist/cli/index.js +2 -2
- package/dist/index.cjs +866 -614
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -606,7 +606,7 @@ function getBaseDirsInLightOfGlobal({
|
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
// src/lib/generate.ts
|
|
609
|
-
import { join as
|
|
609
|
+
import { join as join113 } from "path";
|
|
610
610
|
import { intersection } from "es-toolkit";
|
|
611
611
|
|
|
612
612
|
// src/features/commands/commands-processor.ts
|
|
@@ -2991,7 +2991,7 @@ var CommandsProcessor = class extends FeatureProcessor {
|
|
|
2991
2991
|
};
|
|
2992
2992
|
|
|
2993
2993
|
// src/features/hooks/hooks-processor.ts
|
|
2994
|
-
import { z as
|
|
2994
|
+
import { z as z16 } from "zod/mini";
|
|
2995
2995
|
|
|
2996
2996
|
// src/types/hooks.ts
|
|
2997
2997
|
import { z as z14 } from "zod/mini";
|
|
@@ -3056,6 +3056,14 @@ var OPENCODE_HOOK_EVENTS = [
|
|
|
3056
3056
|
"afterShellExecution",
|
|
3057
3057
|
"permissionRequest"
|
|
3058
3058
|
];
|
|
3059
|
+
var COPILOT_HOOK_EVENTS = [
|
|
3060
|
+
"sessionStart",
|
|
3061
|
+
"sessionEnd",
|
|
3062
|
+
"afterSubmitPrompt",
|
|
3063
|
+
"preToolUse",
|
|
3064
|
+
"postToolUse",
|
|
3065
|
+
"afterError"
|
|
3066
|
+
];
|
|
3059
3067
|
var FACTORYDROID_HOOK_EVENTS = [
|
|
3060
3068
|
"sessionStart",
|
|
3061
3069
|
"sessionEnd",
|
|
@@ -3075,6 +3083,7 @@ var HooksConfigSchema = z14.looseObject({
|
|
|
3075
3083
|
hooks: hooksRecordSchema,
|
|
3076
3084
|
cursor: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
|
|
3077
3085
|
claudecode: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
|
|
3086
|
+
copilot: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
|
|
3078
3087
|
opencode: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
|
|
3079
3088
|
factorydroid: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) }))
|
|
3080
3089
|
});
|
|
@@ -3144,6 +3153,17 @@ var CANONICAL_TO_OPENCODE_EVENT_NAMES = {
|
|
|
3144
3153
|
afterShellExecution: "command.executed",
|
|
3145
3154
|
permissionRequest: "permission.asked"
|
|
3146
3155
|
};
|
|
3156
|
+
var CANONICAL_TO_COPILOT_EVENT_NAMES = {
|
|
3157
|
+
sessionStart: "sessionStart",
|
|
3158
|
+
sessionEnd: "sessionEnd",
|
|
3159
|
+
afterSubmitPrompt: "userPromptSubmitted",
|
|
3160
|
+
preToolUse: "preToolUse",
|
|
3161
|
+
postToolUse: "postToolUse",
|
|
3162
|
+
afterError: "errorOccurred"
|
|
3163
|
+
};
|
|
3164
|
+
var COPILOT_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
|
|
3165
|
+
Object.entries(CANONICAL_TO_COPILOT_EVENT_NAMES).map(([k, v]) => [v, k])
|
|
3166
|
+
);
|
|
3147
3167
|
|
|
3148
3168
|
// src/features/hooks/claudecode-hooks.ts
|
|
3149
3169
|
import { join as join21 } from "path";
|
|
@@ -3420,8 +3440,185 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
|
|
|
3420
3440
|
}
|
|
3421
3441
|
};
|
|
3422
3442
|
|
|
3423
|
-
// src/features/hooks/
|
|
3443
|
+
// src/features/hooks/copilot-hooks.ts
|
|
3424
3444
|
import { join as join22 } from "path";
|
|
3445
|
+
import { z as z15 } from "zod/mini";
|
|
3446
|
+
var CopilotHookEntrySchema = z15.looseObject({
|
|
3447
|
+
type: z15.string(),
|
|
3448
|
+
bash: z15.optional(z15.string()),
|
|
3449
|
+
powershell: z15.optional(z15.string()),
|
|
3450
|
+
timeoutSec: z15.optional(z15.number())
|
|
3451
|
+
});
|
|
3452
|
+
function canonicalToCopilotHooks(config) {
|
|
3453
|
+
const isWindows = process.platform === "win32";
|
|
3454
|
+
const commandField = isWindows ? "powershell" : "bash";
|
|
3455
|
+
const supported = new Set(COPILOT_HOOK_EVENTS);
|
|
3456
|
+
const sharedConfigHooks = {};
|
|
3457
|
+
for (const [event, defs] of Object.entries(config.hooks)) {
|
|
3458
|
+
if (supported.has(event)) {
|
|
3459
|
+
sharedConfigHooks[event] = defs;
|
|
3460
|
+
}
|
|
3461
|
+
}
|
|
3462
|
+
const effectiveHooks = {
|
|
3463
|
+
...sharedConfigHooks,
|
|
3464
|
+
...config.copilot?.hooks
|
|
3465
|
+
};
|
|
3466
|
+
const copilot = {};
|
|
3467
|
+
for (const [eventName, definitions] of Object.entries(effectiveHooks)) {
|
|
3468
|
+
const copilotEventName = CANONICAL_TO_COPILOT_EVENT_NAMES[eventName] ?? eventName;
|
|
3469
|
+
const entries = [];
|
|
3470
|
+
for (const def of definitions) {
|
|
3471
|
+
const hookType = def.type ?? "command";
|
|
3472
|
+
if (def.matcher) continue;
|
|
3473
|
+
if (hookType !== "command") continue;
|
|
3474
|
+
const command = def.command;
|
|
3475
|
+
const timeout = def.timeout;
|
|
3476
|
+
const rest = Object.fromEntries(
|
|
3477
|
+
Object.entries(def).filter(
|
|
3478
|
+
([k]) => !["type", "matcher", "command", "prompt", "timeout"].includes(k)
|
|
3479
|
+
)
|
|
3480
|
+
);
|
|
3481
|
+
entries.push({
|
|
3482
|
+
type: hookType,
|
|
3483
|
+
...command !== void 0 && command !== null && { [commandField]: command },
|
|
3484
|
+
...timeout !== void 0 && timeout !== null && { timeoutSec: timeout },
|
|
3485
|
+
...rest
|
|
3486
|
+
});
|
|
3487
|
+
}
|
|
3488
|
+
if (entries.length > 0) {
|
|
3489
|
+
copilot[copilotEventName] = entries;
|
|
3490
|
+
}
|
|
3491
|
+
}
|
|
3492
|
+
return copilot;
|
|
3493
|
+
}
|
|
3494
|
+
function resolveImportCommand(entry) {
|
|
3495
|
+
const hasBash = typeof entry.bash === "string";
|
|
3496
|
+
const hasPowershell = typeof entry.powershell === "string";
|
|
3497
|
+
if (hasBash && hasPowershell) {
|
|
3498
|
+
const isWindows = process.platform === "win32";
|
|
3499
|
+
const chosen = isWindows ? "powershell" : "bash";
|
|
3500
|
+
const ignored = isWindows ? "bash" : "powershell";
|
|
3501
|
+
logger.warn(
|
|
3502
|
+
`Copilot hook has both bash and powershell commands; using ${chosen} and ignoring ${ignored} on this platform.`
|
|
3503
|
+
);
|
|
3504
|
+
return isWindows ? entry.powershell : entry.bash;
|
|
3505
|
+
} else if (hasBash) {
|
|
3506
|
+
return entry.bash;
|
|
3507
|
+
} else if (hasPowershell) {
|
|
3508
|
+
return entry.powershell;
|
|
3509
|
+
}
|
|
3510
|
+
return void 0;
|
|
3511
|
+
}
|
|
3512
|
+
function copilotHooksToCanonical(copilotHooks) {
|
|
3513
|
+
if (copilotHooks === null || copilotHooks === void 0 || typeof copilotHooks !== "object") {
|
|
3514
|
+
return {};
|
|
3515
|
+
}
|
|
3516
|
+
const canonical = {};
|
|
3517
|
+
for (const [copilotEventName, hookEntries] of Object.entries(copilotHooks)) {
|
|
3518
|
+
const eventName = COPILOT_TO_CANONICAL_EVENT_NAMES[copilotEventName] ?? copilotEventName;
|
|
3519
|
+
if (!Array.isArray(hookEntries)) continue;
|
|
3520
|
+
const defs = [];
|
|
3521
|
+
for (const rawEntry of hookEntries) {
|
|
3522
|
+
const parseResult = CopilotHookEntrySchema.safeParse(rawEntry);
|
|
3523
|
+
if (!parseResult.success) continue;
|
|
3524
|
+
const entry = parseResult.data;
|
|
3525
|
+
const command = resolveImportCommand(entry);
|
|
3526
|
+
const timeout = entry.timeoutSec;
|
|
3527
|
+
defs.push({
|
|
3528
|
+
type: "command",
|
|
3529
|
+
...command !== void 0 && { command },
|
|
3530
|
+
...timeout !== void 0 && { timeout }
|
|
3531
|
+
});
|
|
3532
|
+
}
|
|
3533
|
+
if (defs.length > 0) {
|
|
3534
|
+
canonical[eventName] = defs;
|
|
3535
|
+
}
|
|
3536
|
+
}
|
|
3537
|
+
return canonical;
|
|
3538
|
+
}
|
|
3539
|
+
var CopilotHooks = class _CopilotHooks extends ToolHooks {
|
|
3540
|
+
constructor(params) {
|
|
3541
|
+
super({
|
|
3542
|
+
...params,
|
|
3543
|
+
fileContent: params.fileContent ?? "{}"
|
|
3544
|
+
});
|
|
3545
|
+
}
|
|
3546
|
+
static getSettablePaths(_options = {}) {
|
|
3547
|
+
return {
|
|
3548
|
+
relativeDirPath: join22(".github", "hooks"),
|
|
3549
|
+
relativeFilePath: "copilot-hooks.json"
|
|
3550
|
+
};
|
|
3551
|
+
}
|
|
3552
|
+
static async fromFile({
|
|
3553
|
+
baseDir = process.cwd(),
|
|
3554
|
+
validate = true,
|
|
3555
|
+
global = false
|
|
3556
|
+
}) {
|
|
3557
|
+
const paths = _CopilotHooks.getSettablePaths({ global });
|
|
3558
|
+
const filePath = join22(baseDir, paths.relativeDirPath, paths.relativeFilePath);
|
|
3559
|
+
const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
|
|
3560
|
+
return new _CopilotHooks({
|
|
3561
|
+
baseDir,
|
|
3562
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3563
|
+
relativeFilePath: paths.relativeFilePath,
|
|
3564
|
+
fileContent,
|
|
3565
|
+
validate
|
|
3566
|
+
});
|
|
3567
|
+
}
|
|
3568
|
+
static async fromRulesyncHooks({
|
|
3569
|
+
baseDir = process.cwd(),
|
|
3570
|
+
rulesyncHooks,
|
|
3571
|
+
validate = true
|
|
3572
|
+
}) {
|
|
3573
|
+
const paths = _CopilotHooks.getSettablePaths();
|
|
3574
|
+
const config = rulesyncHooks.getJson();
|
|
3575
|
+
const copilotHooks = canonicalToCopilotHooks(config);
|
|
3576
|
+
const fileContent = JSON.stringify({ version: 1, hooks: copilotHooks }, null, 2);
|
|
3577
|
+
return new _CopilotHooks({
|
|
3578
|
+
baseDir,
|
|
3579
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3580
|
+
relativeFilePath: paths.relativeFilePath,
|
|
3581
|
+
fileContent,
|
|
3582
|
+
validate
|
|
3583
|
+
});
|
|
3584
|
+
}
|
|
3585
|
+
toRulesyncHooks() {
|
|
3586
|
+
let parsed;
|
|
3587
|
+
try {
|
|
3588
|
+
parsed = JSON.parse(this.getFileContent());
|
|
3589
|
+
} catch (error) {
|
|
3590
|
+
throw new Error(
|
|
3591
|
+
`Failed to parse Copilot hooks content in ${join22(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
|
|
3592
|
+
{
|
|
3593
|
+
cause: error
|
|
3594
|
+
}
|
|
3595
|
+
);
|
|
3596
|
+
}
|
|
3597
|
+
const hooks = copilotHooksToCanonical(parsed.hooks);
|
|
3598
|
+
return this.toRulesyncHooksDefault({
|
|
3599
|
+
fileContent: JSON.stringify({ version: 1, hooks }, null, 2)
|
|
3600
|
+
});
|
|
3601
|
+
}
|
|
3602
|
+
validate() {
|
|
3603
|
+
return { success: true, error: null };
|
|
3604
|
+
}
|
|
3605
|
+
static forDeletion({
|
|
3606
|
+
baseDir = process.cwd(),
|
|
3607
|
+
relativeDirPath,
|
|
3608
|
+
relativeFilePath
|
|
3609
|
+
}) {
|
|
3610
|
+
return new _CopilotHooks({
|
|
3611
|
+
baseDir,
|
|
3612
|
+
relativeDirPath,
|
|
3613
|
+
relativeFilePath,
|
|
3614
|
+
fileContent: JSON.stringify({ hooks: {} }, null, 2),
|
|
3615
|
+
validate: false
|
|
3616
|
+
});
|
|
3617
|
+
}
|
|
3618
|
+
};
|
|
3619
|
+
|
|
3620
|
+
// src/features/hooks/cursor-hooks.ts
|
|
3621
|
+
import { join as join23 } from "path";
|
|
3425
3622
|
var CursorHooks = class _CursorHooks extends ToolHooks {
|
|
3426
3623
|
constructor(params) {
|
|
3427
3624
|
const { rulesyncHooks: _r, ...rest } = params;
|
|
@@ -3442,7 +3639,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
|
|
|
3442
3639
|
}) {
|
|
3443
3640
|
const paths = _CursorHooks.getSettablePaths();
|
|
3444
3641
|
const fileContent = await readFileContent(
|
|
3445
|
-
|
|
3642
|
+
join23(baseDir, paths.relativeDirPath, paths.relativeFilePath)
|
|
3446
3643
|
);
|
|
3447
3644
|
return new _CursorHooks({
|
|
3448
3645
|
baseDir,
|
|
@@ -3522,7 +3719,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
|
|
|
3522
3719
|
};
|
|
3523
3720
|
|
|
3524
3721
|
// src/features/hooks/factorydroid-hooks.ts
|
|
3525
|
-
import { join as
|
|
3722
|
+
import { join as join24 } from "path";
|
|
3526
3723
|
function canonicalToFactorydroidHooks(config) {
|
|
3527
3724
|
const supported = new Set(FACTORYDROID_HOOK_EVENTS);
|
|
3528
3725
|
const sharedHooks = {};
|
|
@@ -3627,7 +3824,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
|
|
|
3627
3824
|
global = false
|
|
3628
3825
|
}) {
|
|
3629
3826
|
const paths = _FactorydroidHooks.getSettablePaths({ global });
|
|
3630
|
-
const filePath =
|
|
3827
|
+
const filePath = join24(baseDir, paths.relativeDirPath, paths.relativeFilePath);
|
|
3631
3828
|
const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
|
|
3632
3829
|
return new _FactorydroidHooks({
|
|
3633
3830
|
baseDir,
|
|
@@ -3644,7 +3841,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
|
|
|
3644
3841
|
global = false
|
|
3645
3842
|
}) {
|
|
3646
3843
|
const paths = _FactorydroidHooks.getSettablePaths({ global });
|
|
3647
|
-
const filePath =
|
|
3844
|
+
const filePath = join24(baseDir, paths.relativeDirPath, paths.relativeFilePath);
|
|
3648
3845
|
const existingContent = await readOrInitializeFileContent(
|
|
3649
3846
|
filePath,
|
|
3650
3847
|
JSON.stringify({}, null, 2)
|
|
@@ -3676,7 +3873,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
|
|
|
3676
3873
|
settings = JSON.parse(this.getFileContent());
|
|
3677
3874
|
} catch (error) {
|
|
3678
3875
|
throw new Error(
|
|
3679
|
-
`Failed to parse Factory Droid hooks content in ${
|
|
3876
|
+
`Failed to parse Factory Droid hooks content in ${join24(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
|
|
3680
3877
|
{
|
|
3681
3878
|
cause: error
|
|
3682
3879
|
}
|
|
@@ -3706,7 +3903,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
|
|
|
3706
3903
|
};
|
|
3707
3904
|
|
|
3708
3905
|
// src/features/hooks/opencode-hooks.ts
|
|
3709
|
-
import { join as
|
|
3906
|
+
import { join as join25 } from "path";
|
|
3710
3907
|
var NAMED_HOOKS = /* @__PURE__ */ new Set(["tool.execute.before", "tool.execute.after"]);
|
|
3711
3908
|
function escapeForTemplateLiteral(command) {
|
|
3712
3909
|
return command.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${");
|
|
@@ -3804,7 +4001,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
|
|
|
3804
4001
|
}
|
|
3805
4002
|
static getSettablePaths(options) {
|
|
3806
4003
|
return {
|
|
3807
|
-
relativeDirPath: options?.global ?
|
|
4004
|
+
relativeDirPath: options?.global ? join25(".config", "opencode", "plugins") : join25(".opencode", "plugins"),
|
|
3808
4005
|
relativeFilePath: "rulesync-hooks.js"
|
|
3809
4006
|
};
|
|
3810
4007
|
}
|
|
@@ -3815,7 +4012,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
|
|
|
3815
4012
|
}) {
|
|
3816
4013
|
const paths = _OpencodeHooks.getSettablePaths({ global });
|
|
3817
4014
|
const fileContent = await readFileContent(
|
|
3818
|
-
|
|
4015
|
+
join25(baseDir, paths.relativeDirPath, paths.relativeFilePath)
|
|
3819
4016
|
);
|
|
3820
4017
|
return new _OpencodeHooks({
|
|
3821
4018
|
baseDir,
|
|
@@ -3864,43 +4061,83 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
|
|
|
3864
4061
|
};
|
|
3865
4062
|
|
|
3866
4063
|
// src/features/hooks/hooks-processor.ts
|
|
3867
|
-
var hooksProcessorToolTargetTuple = [
|
|
3868
|
-
|
|
4064
|
+
var hooksProcessorToolTargetTuple = [
|
|
4065
|
+
"cursor",
|
|
4066
|
+
"claudecode",
|
|
4067
|
+
"copilot",
|
|
4068
|
+
"opencode",
|
|
4069
|
+
"factorydroid"
|
|
4070
|
+
];
|
|
4071
|
+
var HooksProcessorToolTargetSchema = z16.enum(hooksProcessorToolTargetTuple);
|
|
3869
4072
|
var toolHooksFactories = /* @__PURE__ */ new Map([
|
|
3870
4073
|
[
|
|
3871
4074
|
"cursor",
|
|
3872
4075
|
{
|
|
3873
4076
|
class: CursorHooks,
|
|
3874
|
-
meta: {
|
|
4077
|
+
meta: {
|
|
4078
|
+
supportsProject: true,
|
|
4079
|
+
supportsGlobal: false,
|
|
4080
|
+
supportsImport: true
|
|
4081
|
+
},
|
|
3875
4082
|
supportedEvents: CURSOR_HOOK_EVENTS,
|
|
3876
|
-
supportedHookTypes: ["command", "prompt"]
|
|
4083
|
+
supportedHookTypes: ["command", "prompt"],
|
|
4084
|
+
supportsMatcher: true
|
|
3877
4085
|
}
|
|
3878
4086
|
],
|
|
3879
4087
|
[
|
|
3880
4088
|
"claudecode",
|
|
3881
4089
|
{
|
|
3882
4090
|
class: ClaudecodeHooks,
|
|
3883
|
-
meta: {
|
|
4091
|
+
meta: {
|
|
4092
|
+
supportsProject: true,
|
|
4093
|
+
supportsGlobal: true,
|
|
4094
|
+
supportsImport: true
|
|
4095
|
+
},
|
|
3884
4096
|
supportedEvents: CLAUDE_HOOK_EVENTS,
|
|
3885
|
-
supportedHookTypes: ["command", "prompt"]
|
|
4097
|
+
supportedHookTypes: ["command", "prompt"],
|
|
4098
|
+
supportsMatcher: true
|
|
4099
|
+
}
|
|
4100
|
+
],
|
|
4101
|
+
[
|
|
4102
|
+
"copilot",
|
|
4103
|
+
{
|
|
4104
|
+
class: CopilotHooks,
|
|
4105
|
+
meta: {
|
|
4106
|
+
supportsProject: true,
|
|
4107
|
+
supportsGlobal: false,
|
|
4108
|
+
supportsImport: true
|
|
4109
|
+
},
|
|
4110
|
+
supportedEvents: COPILOT_HOOK_EVENTS,
|
|
4111
|
+
supportedHookTypes: ["command"],
|
|
4112
|
+
supportsMatcher: false
|
|
3886
4113
|
}
|
|
3887
4114
|
],
|
|
3888
4115
|
[
|
|
3889
4116
|
"opencode",
|
|
3890
4117
|
{
|
|
3891
4118
|
class: OpencodeHooks,
|
|
3892
|
-
meta: {
|
|
4119
|
+
meta: {
|
|
4120
|
+
supportsProject: true,
|
|
4121
|
+
supportsGlobal: true,
|
|
4122
|
+
supportsImport: false
|
|
4123
|
+
},
|
|
3893
4124
|
supportedEvents: OPENCODE_HOOK_EVENTS,
|
|
3894
|
-
supportedHookTypes: ["command"]
|
|
4125
|
+
supportedHookTypes: ["command"],
|
|
4126
|
+
supportsMatcher: true
|
|
3895
4127
|
}
|
|
3896
4128
|
],
|
|
3897
4129
|
[
|
|
3898
4130
|
"factorydroid",
|
|
3899
4131
|
{
|
|
3900
4132
|
class: FactorydroidHooks,
|
|
3901
|
-
meta: {
|
|
4133
|
+
meta: {
|
|
4134
|
+
supportsProject: true,
|
|
4135
|
+
supportsGlobal: true,
|
|
4136
|
+
supportsImport: true
|
|
4137
|
+
},
|
|
3902
4138
|
supportedEvents: FACTORYDROID_HOOK_EVENTS,
|
|
3903
|
-
supportedHookTypes: ["command", "prompt"]
|
|
4139
|
+
supportedHookTypes: ["command", "prompt"],
|
|
4140
|
+
supportsMatcher: true
|
|
3904
4141
|
}
|
|
3905
4142
|
]
|
|
3906
4143
|
]);
|
|
@@ -4017,6 +4254,21 @@ var HooksProcessor = class extends FeatureProcessor {
|
|
|
4017
4254
|
);
|
|
4018
4255
|
}
|
|
4019
4256
|
}
|
|
4257
|
+
if (!factory.supportsMatcher) {
|
|
4258
|
+
const eventsWithMatcher = /* @__PURE__ */ new Set();
|
|
4259
|
+
for (const [event, defs] of Object.entries(effectiveHooks)) {
|
|
4260
|
+
for (const def of defs) {
|
|
4261
|
+
if (def.matcher) {
|
|
4262
|
+
eventsWithMatcher.add(event);
|
|
4263
|
+
}
|
|
4264
|
+
}
|
|
4265
|
+
}
|
|
4266
|
+
if (eventsWithMatcher.size > 0) {
|
|
4267
|
+
logger.warn(
|
|
4268
|
+
`Skipped matcher hook(s) for ${this.toolTarget} (not supported): ${Array.from(eventsWithMatcher).join(", ")}`
|
|
4269
|
+
);
|
|
4270
|
+
}
|
|
4271
|
+
}
|
|
4020
4272
|
const toolHooks = await factory.class.fromRulesyncHooks({
|
|
4021
4273
|
baseDir: this.baseDir,
|
|
4022
4274
|
rulesyncHooks,
|
|
@@ -4041,13 +4293,13 @@ var HooksProcessor = class extends FeatureProcessor {
|
|
|
4041
4293
|
};
|
|
4042
4294
|
|
|
4043
4295
|
// src/features/ignore/ignore-processor.ts
|
|
4044
|
-
import { z as
|
|
4296
|
+
import { z as z17 } from "zod/mini";
|
|
4045
4297
|
|
|
4046
4298
|
// src/features/ignore/augmentcode-ignore.ts
|
|
4047
|
-
import { join as
|
|
4299
|
+
import { join as join27 } from "path";
|
|
4048
4300
|
|
|
4049
4301
|
// src/features/ignore/rulesync-ignore.ts
|
|
4050
|
-
import { join as
|
|
4302
|
+
import { join as join26 } from "path";
|
|
4051
4303
|
var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
|
|
4052
4304
|
validate() {
|
|
4053
4305
|
return { success: true, error: null };
|
|
@@ -4067,12 +4319,12 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
|
|
|
4067
4319
|
static async fromFile() {
|
|
4068
4320
|
const baseDir = process.cwd();
|
|
4069
4321
|
const paths = this.getSettablePaths();
|
|
4070
|
-
const recommendedPath =
|
|
4322
|
+
const recommendedPath = join26(
|
|
4071
4323
|
baseDir,
|
|
4072
4324
|
paths.recommended.relativeDirPath,
|
|
4073
4325
|
paths.recommended.relativeFilePath
|
|
4074
4326
|
);
|
|
4075
|
-
const legacyPath =
|
|
4327
|
+
const legacyPath = join26(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
|
|
4076
4328
|
if (await fileExists(recommendedPath)) {
|
|
4077
4329
|
const fileContent2 = await readFileContent(recommendedPath);
|
|
4078
4330
|
return new _RulesyncIgnore({
|
|
@@ -4188,7 +4440,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
|
|
|
4188
4440
|
validate = true
|
|
4189
4441
|
}) {
|
|
4190
4442
|
const fileContent = await readFileContent(
|
|
4191
|
-
|
|
4443
|
+
join27(
|
|
4192
4444
|
baseDir,
|
|
4193
4445
|
this.getSettablePaths().relativeDirPath,
|
|
4194
4446
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4218,7 +4470,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
|
|
|
4218
4470
|
};
|
|
4219
4471
|
|
|
4220
4472
|
// src/features/ignore/claudecode-ignore.ts
|
|
4221
|
-
import { join as
|
|
4473
|
+
import { join as join28 } from "path";
|
|
4222
4474
|
import { uniq } from "es-toolkit";
|
|
4223
4475
|
var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
|
|
4224
4476
|
constructor(params) {
|
|
@@ -4261,7 +4513,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
|
|
|
4261
4513
|
const fileContent = rulesyncIgnore.getFileContent();
|
|
4262
4514
|
const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
|
|
4263
4515
|
const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
|
|
4264
|
-
const filePath =
|
|
4516
|
+
const filePath = join28(
|
|
4265
4517
|
baseDir,
|
|
4266
4518
|
this.getSettablePaths().relativeDirPath,
|
|
4267
4519
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4297,7 +4549,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
|
|
|
4297
4549
|
validate = true
|
|
4298
4550
|
}) {
|
|
4299
4551
|
const fileContent = await readFileContent(
|
|
4300
|
-
|
|
4552
|
+
join28(
|
|
4301
4553
|
baseDir,
|
|
4302
4554
|
this.getSettablePaths().relativeDirPath,
|
|
4303
4555
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4327,7 +4579,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
|
|
|
4327
4579
|
};
|
|
4328
4580
|
|
|
4329
4581
|
// src/features/ignore/cline-ignore.ts
|
|
4330
|
-
import { join as
|
|
4582
|
+
import { join as join29 } from "path";
|
|
4331
4583
|
var ClineIgnore = class _ClineIgnore extends ToolIgnore {
|
|
4332
4584
|
static getSettablePaths() {
|
|
4333
4585
|
return {
|
|
@@ -4364,7 +4616,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
|
|
|
4364
4616
|
validate = true
|
|
4365
4617
|
}) {
|
|
4366
4618
|
const fileContent = await readFileContent(
|
|
4367
|
-
|
|
4619
|
+
join29(
|
|
4368
4620
|
baseDir,
|
|
4369
4621
|
this.getSettablePaths().relativeDirPath,
|
|
4370
4622
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4394,7 +4646,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
|
|
|
4394
4646
|
};
|
|
4395
4647
|
|
|
4396
4648
|
// src/features/ignore/cursor-ignore.ts
|
|
4397
|
-
import { join as
|
|
4649
|
+
import { join as join30 } from "path";
|
|
4398
4650
|
var CursorIgnore = class _CursorIgnore extends ToolIgnore {
|
|
4399
4651
|
static getSettablePaths() {
|
|
4400
4652
|
return {
|
|
@@ -4427,7 +4679,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
|
|
|
4427
4679
|
validate = true
|
|
4428
4680
|
}) {
|
|
4429
4681
|
const fileContent = await readFileContent(
|
|
4430
|
-
|
|
4682
|
+
join30(
|
|
4431
4683
|
baseDir,
|
|
4432
4684
|
this.getSettablePaths().relativeDirPath,
|
|
4433
4685
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4457,7 +4709,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
|
|
|
4457
4709
|
};
|
|
4458
4710
|
|
|
4459
4711
|
// src/features/ignore/geminicli-ignore.ts
|
|
4460
|
-
import { join as
|
|
4712
|
+
import { join as join31 } from "path";
|
|
4461
4713
|
var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
|
|
4462
4714
|
static getSettablePaths() {
|
|
4463
4715
|
return {
|
|
@@ -4484,7 +4736,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
|
|
|
4484
4736
|
validate = true
|
|
4485
4737
|
}) {
|
|
4486
4738
|
const fileContent = await readFileContent(
|
|
4487
|
-
|
|
4739
|
+
join31(
|
|
4488
4740
|
baseDir,
|
|
4489
4741
|
this.getSettablePaths().relativeDirPath,
|
|
4490
4742
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4514,7 +4766,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
|
|
|
4514
4766
|
};
|
|
4515
4767
|
|
|
4516
4768
|
// src/features/ignore/goose-ignore.ts
|
|
4517
|
-
import { join as
|
|
4769
|
+
import { join as join32 } from "path";
|
|
4518
4770
|
var GooseIgnore = class _GooseIgnore extends ToolIgnore {
|
|
4519
4771
|
static getSettablePaths() {
|
|
4520
4772
|
return {
|
|
@@ -4551,7 +4803,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
|
|
|
4551
4803
|
validate = true
|
|
4552
4804
|
}) {
|
|
4553
4805
|
const fileContent = await readFileContent(
|
|
4554
|
-
|
|
4806
|
+
join32(
|
|
4555
4807
|
baseDir,
|
|
4556
4808
|
this.getSettablePaths().relativeDirPath,
|
|
4557
4809
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4581,7 +4833,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
|
|
|
4581
4833
|
};
|
|
4582
4834
|
|
|
4583
4835
|
// src/features/ignore/junie-ignore.ts
|
|
4584
|
-
import { join as
|
|
4836
|
+
import { join as join33 } from "path";
|
|
4585
4837
|
var JunieIgnore = class _JunieIgnore extends ToolIgnore {
|
|
4586
4838
|
static getSettablePaths() {
|
|
4587
4839
|
return {
|
|
@@ -4608,7 +4860,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
|
|
|
4608
4860
|
validate = true
|
|
4609
4861
|
}) {
|
|
4610
4862
|
const fileContent = await readFileContent(
|
|
4611
|
-
|
|
4863
|
+
join33(
|
|
4612
4864
|
baseDir,
|
|
4613
4865
|
this.getSettablePaths().relativeDirPath,
|
|
4614
4866
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4638,7 +4890,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
|
|
|
4638
4890
|
};
|
|
4639
4891
|
|
|
4640
4892
|
// src/features/ignore/kilo-ignore.ts
|
|
4641
|
-
import { join as
|
|
4893
|
+
import { join as join34 } from "path";
|
|
4642
4894
|
var KiloIgnore = class _KiloIgnore extends ToolIgnore {
|
|
4643
4895
|
static getSettablePaths() {
|
|
4644
4896
|
return {
|
|
@@ -4675,7 +4927,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
|
|
|
4675
4927
|
validate = true
|
|
4676
4928
|
}) {
|
|
4677
4929
|
const fileContent = await readFileContent(
|
|
4678
|
-
|
|
4930
|
+
join34(
|
|
4679
4931
|
baseDir,
|
|
4680
4932
|
this.getSettablePaths().relativeDirPath,
|
|
4681
4933
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4705,7 +4957,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
|
|
|
4705
4957
|
};
|
|
4706
4958
|
|
|
4707
4959
|
// src/features/ignore/kiro-ignore.ts
|
|
4708
|
-
import { join as
|
|
4960
|
+
import { join as join35 } from "path";
|
|
4709
4961
|
var KiroIgnore = class _KiroIgnore extends ToolIgnore {
|
|
4710
4962
|
static getSettablePaths() {
|
|
4711
4963
|
return {
|
|
@@ -4732,7 +4984,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
|
|
|
4732
4984
|
validate = true
|
|
4733
4985
|
}) {
|
|
4734
4986
|
const fileContent = await readFileContent(
|
|
4735
|
-
|
|
4987
|
+
join35(
|
|
4736
4988
|
baseDir,
|
|
4737
4989
|
this.getSettablePaths().relativeDirPath,
|
|
4738
4990
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4762,7 +5014,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
|
|
|
4762
5014
|
};
|
|
4763
5015
|
|
|
4764
5016
|
// src/features/ignore/qwencode-ignore.ts
|
|
4765
|
-
import { join as
|
|
5017
|
+
import { join as join36 } from "path";
|
|
4766
5018
|
var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
|
|
4767
5019
|
static getSettablePaths() {
|
|
4768
5020
|
return {
|
|
@@ -4789,7 +5041,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
|
|
|
4789
5041
|
validate = true
|
|
4790
5042
|
}) {
|
|
4791
5043
|
const fileContent = await readFileContent(
|
|
4792
|
-
|
|
5044
|
+
join36(
|
|
4793
5045
|
baseDir,
|
|
4794
5046
|
this.getSettablePaths().relativeDirPath,
|
|
4795
5047
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4819,7 +5071,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
|
|
|
4819
5071
|
};
|
|
4820
5072
|
|
|
4821
5073
|
// src/features/ignore/roo-ignore.ts
|
|
4822
|
-
import { join as
|
|
5074
|
+
import { join as join37 } from "path";
|
|
4823
5075
|
var RooIgnore = class _RooIgnore extends ToolIgnore {
|
|
4824
5076
|
static getSettablePaths() {
|
|
4825
5077
|
return {
|
|
@@ -4846,7 +5098,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
|
|
|
4846
5098
|
validate = true
|
|
4847
5099
|
}) {
|
|
4848
5100
|
const fileContent = await readFileContent(
|
|
4849
|
-
|
|
5101
|
+
join37(
|
|
4850
5102
|
baseDir,
|
|
4851
5103
|
this.getSettablePaths().relativeDirPath,
|
|
4852
5104
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4876,7 +5128,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
|
|
|
4876
5128
|
};
|
|
4877
5129
|
|
|
4878
5130
|
// src/features/ignore/windsurf-ignore.ts
|
|
4879
|
-
import { join as
|
|
5131
|
+
import { join as join38 } from "path";
|
|
4880
5132
|
var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
|
|
4881
5133
|
static getSettablePaths() {
|
|
4882
5134
|
return {
|
|
@@ -4903,7 +5155,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
|
|
|
4903
5155
|
validate = true
|
|
4904
5156
|
}) {
|
|
4905
5157
|
const fileContent = await readFileContent(
|
|
4906
|
-
|
|
5158
|
+
join38(
|
|
4907
5159
|
baseDir,
|
|
4908
5160
|
this.getSettablePaths().relativeDirPath,
|
|
4909
5161
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4933,7 +5185,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
|
|
|
4933
5185
|
};
|
|
4934
5186
|
|
|
4935
5187
|
// src/features/ignore/zed-ignore.ts
|
|
4936
|
-
import { join as
|
|
5188
|
+
import { join as join39 } from "path";
|
|
4937
5189
|
import { uniq as uniq2 } from "es-toolkit";
|
|
4938
5190
|
var ZedIgnore = class _ZedIgnore extends ToolIgnore {
|
|
4939
5191
|
constructor(params) {
|
|
@@ -4970,7 +5222,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
|
|
|
4970
5222
|
}) {
|
|
4971
5223
|
const fileContent = rulesyncIgnore.getFileContent();
|
|
4972
5224
|
const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
|
|
4973
|
-
const filePath =
|
|
5225
|
+
const filePath = join39(
|
|
4974
5226
|
baseDir,
|
|
4975
5227
|
this.getSettablePaths().relativeDirPath,
|
|
4976
5228
|
this.getSettablePaths().relativeFilePath
|
|
@@ -4997,7 +5249,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
|
|
|
4997
5249
|
validate = true
|
|
4998
5250
|
}) {
|
|
4999
5251
|
const fileContent = await readFileContent(
|
|
5000
|
-
|
|
5252
|
+
join39(
|
|
5001
5253
|
baseDir,
|
|
5002
5254
|
this.getSettablePaths().relativeDirPath,
|
|
5003
5255
|
this.getSettablePaths().relativeFilePath
|
|
@@ -5043,7 +5295,7 @@ var ignoreProcessorToolTargets = [
|
|
|
5043
5295
|
"windsurf",
|
|
5044
5296
|
"zed"
|
|
5045
5297
|
];
|
|
5046
|
-
var IgnoreProcessorToolTargetSchema =
|
|
5298
|
+
var IgnoreProcessorToolTargetSchema = z17.enum(ignoreProcessorToolTargets);
|
|
5047
5299
|
var toolIgnoreFactories = /* @__PURE__ */ new Map([
|
|
5048
5300
|
["augmentcode", { class: AugmentcodeIgnore }],
|
|
5049
5301
|
["claudecode", { class: ClaudecodeIgnore }],
|
|
@@ -5181,49 +5433,49 @@ var IgnoreProcessor = class extends FeatureProcessor {
|
|
|
5181
5433
|
};
|
|
5182
5434
|
|
|
5183
5435
|
// src/features/mcp/mcp-processor.ts
|
|
5184
|
-
import { z as
|
|
5436
|
+
import { z as z21 } from "zod/mini";
|
|
5185
5437
|
|
|
5186
5438
|
// src/features/mcp/claudecode-mcp.ts
|
|
5187
|
-
import { join as
|
|
5439
|
+
import { join as join41 } from "path";
|
|
5188
5440
|
|
|
5189
5441
|
// src/features/mcp/rulesync-mcp.ts
|
|
5190
|
-
import { join as
|
|
5442
|
+
import { join as join40 } from "path";
|
|
5191
5443
|
import { omit } from "es-toolkit/object";
|
|
5192
|
-
import { z as
|
|
5444
|
+
import { z as z19 } from "zod/mini";
|
|
5193
5445
|
|
|
5194
5446
|
// src/types/mcp.ts
|
|
5195
|
-
import { z as
|
|
5196
|
-
var McpServerSchema =
|
|
5197
|
-
type:
|
|
5198
|
-
command:
|
|
5199
|
-
args:
|
|
5200
|
-
url:
|
|
5201
|
-
httpUrl:
|
|
5202
|
-
env:
|
|
5203
|
-
disabled:
|
|
5204
|
-
networkTimeout:
|
|
5205
|
-
timeout:
|
|
5206
|
-
trust:
|
|
5207
|
-
cwd:
|
|
5208
|
-
transport:
|
|
5209
|
-
alwaysAllow:
|
|
5210
|
-
tools:
|
|
5211
|
-
kiroAutoApprove:
|
|
5212
|
-
kiroAutoBlock:
|
|
5213
|
-
headers:
|
|
5214
|
-
enabledTools:
|
|
5215
|
-
disabledTools:
|
|
5447
|
+
import { z as z18 } from "zod/mini";
|
|
5448
|
+
var McpServerSchema = z18.object({
|
|
5449
|
+
type: z18.optional(z18.enum(["stdio", "sse", "http"])),
|
|
5450
|
+
command: z18.optional(z18.union([z18.string(), z18.array(z18.string())])),
|
|
5451
|
+
args: z18.optional(z18.array(z18.string())),
|
|
5452
|
+
url: z18.optional(z18.string()),
|
|
5453
|
+
httpUrl: z18.optional(z18.string()),
|
|
5454
|
+
env: z18.optional(z18.record(z18.string(), z18.string())),
|
|
5455
|
+
disabled: z18.optional(z18.boolean()),
|
|
5456
|
+
networkTimeout: z18.optional(z18.number()),
|
|
5457
|
+
timeout: z18.optional(z18.number()),
|
|
5458
|
+
trust: z18.optional(z18.boolean()),
|
|
5459
|
+
cwd: z18.optional(z18.string()),
|
|
5460
|
+
transport: z18.optional(z18.enum(["stdio", "sse", "http"])),
|
|
5461
|
+
alwaysAllow: z18.optional(z18.array(z18.string())),
|
|
5462
|
+
tools: z18.optional(z18.array(z18.string())),
|
|
5463
|
+
kiroAutoApprove: z18.optional(z18.array(z18.string())),
|
|
5464
|
+
kiroAutoBlock: z18.optional(z18.array(z18.string())),
|
|
5465
|
+
headers: z18.optional(z18.record(z18.string(), z18.string())),
|
|
5466
|
+
enabledTools: z18.optional(z18.array(z18.string())),
|
|
5467
|
+
disabledTools: z18.optional(z18.array(z18.string()))
|
|
5216
5468
|
});
|
|
5217
|
-
var McpServersSchema =
|
|
5469
|
+
var McpServersSchema = z18.record(z18.string(), McpServerSchema);
|
|
5218
5470
|
|
|
5219
5471
|
// src/features/mcp/rulesync-mcp.ts
|
|
5220
|
-
var RulesyncMcpServerSchema =
|
|
5221
|
-
targets:
|
|
5222
|
-
description:
|
|
5223
|
-
exposed:
|
|
5472
|
+
var RulesyncMcpServerSchema = z19.extend(McpServerSchema, {
|
|
5473
|
+
targets: z19.optional(RulesyncTargetsSchema),
|
|
5474
|
+
description: z19.optional(z19.string()),
|
|
5475
|
+
exposed: z19.optional(z19.boolean())
|
|
5224
5476
|
});
|
|
5225
|
-
var RulesyncMcpConfigSchema =
|
|
5226
|
-
mcpServers:
|
|
5477
|
+
var RulesyncMcpConfigSchema = z19.object({
|
|
5478
|
+
mcpServers: z19.record(z19.string(), RulesyncMcpServerSchema)
|
|
5227
5479
|
});
|
|
5228
5480
|
var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
|
|
5229
5481
|
json;
|
|
@@ -5259,12 +5511,12 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
|
|
|
5259
5511
|
static async fromFile({ validate = true }) {
|
|
5260
5512
|
const baseDir = process.cwd();
|
|
5261
5513
|
const paths = this.getSettablePaths();
|
|
5262
|
-
const recommendedPath =
|
|
5514
|
+
const recommendedPath = join40(
|
|
5263
5515
|
baseDir,
|
|
5264
5516
|
paths.recommended.relativeDirPath,
|
|
5265
5517
|
paths.recommended.relativeFilePath
|
|
5266
5518
|
);
|
|
5267
|
-
const legacyPath =
|
|
5519
|
+
const legacyPath = join40(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
|
|
5268
5520
|
if (await fileExists(recommendedPath)) {
|
|
5269
5521
|
const fileContent2 = await readFileContent(recommendedPath);
|
|
5270
5522
|
return new _RulesyncMcp({
|
|
@@ -5409,7 +5661,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
|
|
|
5409
5661
|
global = false
|
|
5410
5662
|
}) {
|
|
5411
5663
|
const paths = this.getSettablePaths({ global });
|
|
5412
|
-
const fileContent = await readFileContentOrNull(
|
|
5664
|
+
const fileContent = await readFileContentOrNull(join41(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
|
|
5413
5665
|
const json = JSON.parse(fileContent);
|
|
5414
5666
|
const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
|
|
5415
5667
|
return new _ClaudecodeMcp({
|
|
@@ -5428,7 +5680,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
|
|
|
5428
5680
|
}) {
|
|
5429
5681
|
const paths = this.getSettablePaths({ global });
|
|
5430
5682
|
const fileContent = await readOrInitializeFileContent(
|
|
5431
|
-
|
|
5683
|
+
join41(baseDir, paths.relativeDirPath, paths.relativeFilePath),
|
|
5432
5684
|
JSON.stringify({ mcpServers: {} }, null, 2)
|
|
5433
5685
|
);
|
|
5434
5686
|
const json = JSON.parse(fileContent);
|
|
@@ -5467,7 +5719,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
|
|
|
5467
5719
|
};
|
|
5468
5720
|
|
|
5469
5721
|
// src/features/mcp/cline-mcp.ts
|
|
5470
|
-
import { join as
|
|
5722
|
+
import { join as join42 } from "path";
|
|
5471
5723
|
var ClineMcp = class _ClineMcp extends ToolMcp {
|
|
5472
5724
|
json;
|
|
5473
5725
|
constructor(params) {
|
|
@@ -5488,7 +5740,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
|
|
|
5488
5740
|
validate = true
|
|
5489
5741
|
}) {
|
|
5490
5742
|
const fileContent = await readFileContent(
|
|
5491
|
-
|
|
5743
|
+
join42(
|
|
5492
5744
|
baseDir,
|
|
5493
5745
|
this.getSettablePaths().relativeDirPath,
|
|
5494
5746
|
this.getSettablePaths().relativeFilePath
|
|
@@ -5537,7 +5789,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
|
|
|
5537
5789
|
};
|
|
5538
5790
|
|
|
5539
5791
|
// src/features/mcp/codexcli-mcp.ts
|
|
5540
|
-
import { join as
|
|
5792
|
+
import { join as join43 } from "path";
|
|
5541
5793
|
import * as smolToml from "smol-toml";
|
|
5542
5794
|
function convertFromCodexFormat(codexMcp) {
|
|
5543
5795
|
const result = {};
|
|
@@ -5620,7 +5872,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
|
|
|
5620
5872
|
global = false
|
|
5621
5873
|
}) {
|
|
5622
5874
|
const paths = this.getSettablePaths({ global });
|
|
5623
|
-
const fileContent = await readFileContentOrNull(
|
|
5875
|
+
const fileContent = await readFileContentOrNull(join43(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
|
|
5624
5876
|
return new _CodexcliMcp({
|
|
5625
5877
|
baseDir,
|
|
5626
5878
|
relativeDirPath: paths.relativeDirPath,
|
|
@@ -5636,7 +5888,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
|
|
|
5636
5888
|
global = false
|
|
5637
5889
|
}) {
|
|
5638
5890
|
const paths = this.getSettablePaths({ global });
|
|
5639
|
-
const configTomlFilePath =
|
|
5891
|
+
const configTomlFilePath = join43(baseDir, paths.relativeDirPath, paths.relativeFilePath);
|
|
5640
5892
|
const configTomlFileContent = await readOrInitializeFileContent(
|
|
5641
5893
|
configTomlFilePath,
|
|
5642
5894
|
smolToml.stringify({})
|
|
@@ -5693,7 +5945,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
|
|
|
5693
5945
|
};
|
|
5694
5946
|
|
|
5695
5947
|
// src/features/mcp/copilot-mcp.ts
|
|
5696
|
-
import { join as
|
|
5948
|
+
import { join as join44 } from "path";
|
|
5697
5949
|
function convertToCopilotFormat(mcpServers) {
|
|
5698
5950
|
return { servers: mcpServers };
|
|
5699
5951
|
}
|
|
@@ -5720,7 +5972,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
|
|
|
5720
5972
|
validate = true
|
|
5721
5973
|
}) {
|
|
5722
5974
|
const fileContent = await readFileContent(
|
|
5723
|
-
|
|
5975
|
+
join44(
|
|
5724
5976
|
baseDir,
|
|
5725
5977
|
this.getSettablePaths().relativeDirPath,
|
|
5726
5978
|
this.getSettablePaths().relativeFilePath
|
|
@@ -5773,7 +6025,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
|
|
|
5773
6025
|
};
|
|
5774
6026
|
|
|
5775
6027
|
// src/features/mcp/cursor-mcp.ts
|
|
5776
|
-
import { join as
|
|
6028
|
+
import { join as join45 } from "path";
|
|
5777
6029
|
var CURSOR_ENV_VAR_PATTERN = /\$\{env:([^}]+)\}/g;
|
|
5778
6030
|
function isMcpServers(value) {
|
|
5779
6031
|
return value !== void 0 && value !== null && typeof value === "object";
|
|
@@ -5834,7 +6086,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
|
|
|
5834
6086
|
validate = true
|
|
5835
6087
|
}) {
|
|
5836
6088
|
const fileContent = await readFileContent(
|
|
5837
|
-
|
|
6089
|
+
join45(
|
|
5838
6090
|
baseDir,
|
|
5839
6091
|
this.getSettablePaths().relativeDirPath,
|
|
5840
6092
|
this.getSettablePaths().relativeFilePath
|
|
@@ -5902,7 +6154,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
|
|
|
5902
6154
|
};
|
|
5903
6155
|
|
|
5904
6156
|
// src/features/mcp/factorydroid-mcp.ts
|
|
5905
|
-
import { join as
|
|
6157
|
+
import { join as join46 } from "path";
|
|
5906
6158
|
var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
|
|
5907
6159
|
json;
|
|
5908
6160
|
constructor(params) {
|
|
@@ -5923,7 +6175,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
|
|
|
5923
6175
|
validate = true
|
|
5924
6176
|
}) {
|
|
5925
6177
|
const fileContent = await readFileContent(
|
|
5926
|
-
|
|
6178
|
+
join46(
|
|
5927
6179
|
baseDir,
|
|
5928
6180
|
this.getSettablePaths().relativeDirPath,
|
|
5929
6181
|
this.getSettablePaths().relativeFilePath
|
|
@@ -5983,7 +6235,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
|
|
|
5983
6235
|
};
|
|
5984
6236
|
|
|
5985
6237
|
// src/features/mcp/geminicli-mcp.ts
|
|
5986
|
-
import { join as
|
|
6238
|
+
import { join as join47 } from "path";
|
|
5987
6239
|
var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
|
|
5988
6240
|
json;
|
|
5989
6241
|
constructor(params) {
|
|
@@ -6011,7 +6263,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
|
|
|
6011
6263
|
global = false
|
|
6012
6264
|
}) {
|
|
6013
6265
|
const paths = this.getSettablePaths({ global });
|
|
6014
|
-
const fileContent = await readFileContentOrNull(
|
|
6266
|
+
const fileContent = await readFileContentOrNull(join47(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
|
|
6015
6267
|
const json = JSON.parse(fileContent);
|
|
6016
6268
|
const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
|
|
6017
6269
|
return new _GeminiCliMcp({
|
|
@@ -6030,7 +6282,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
|
|
|
6030
6282
|
}) {
|
|
6031
6283
|
const paths = this.getSettablePaths({ global });
|
|
6032
6284
|
const fileContent = await readOrInitializeFileContent(
|
|
6033
|
-
|
|
6285
|
+
join47(baseDir, paths.relativeDirPath, paths.relativeFilePath),
|
|
6034
6286
|
JSON.stringify({ mcpServers: {} }, null, 2)
|
|
6035
6287
|
);
|
|
6036
6288
|
const json = JSON.parse(fileContent);
|
|
@@ -6075,7 +6327,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
|
|
|
6075
6327
|
};
|
|
6076
6328
|
|
|
6077
6329
|
// src/features/mcp/junie-mcp.ts
|
|
6078
|
-
import { join as
|
|
6330
|
+
import { join as join48 } from "path";
|
|
6079
6331
|
var JunieMcp = class _JunieMcp extends ToolMcp {
|
|
6080
6332
|
json;
|
|
6081
6333
|
constructor(params) {
|
|
@@ -6087,7 +6339,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
|
|
|
6087
6339
|
}
|
|
6088
6340
|
static getSettablePaths() {
|
|
6089
6341
|
return {
|
|
6090
|
-
relativeDirPath:
|
|
6342
|
+
relativeDirPath: join48(".junie", "mcp"),
|
|
6091
6343
|
relativeFilePath: "mcp.json"
|
|
6092
6344
|
};
|
|
6093
6345
|
}
|
|
@@ -6096,7 +6348,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
|
|
|
6096
6348
|
validate = true
|
|
6097
6349
|
}) {
|
|
6098
6350
|
const fileContent = await readFileContent(
|
|
6099
|
-
|
|
6351
|
+
join48(
|
|
6100
6352
|
baseDir,
|
|
6101
6353
|
this.getSettablePaths().relativeDirPath,
|
|
6102
6354
|
this.getSettablePaths().relativeFilePath
|
|
@@ -6145,7 +6397,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
|
|
|
6145
6397
|
};
|
|
6146
6398
|
|
|
6147
6399
|
// src/features/mcp/kilo-mcp.ts
|
|
6148
|
-
import { join as
|
|
6400
|
+
import { join as join49 } from "path";
|
|
6149
6401
|
var KiloMcp = class _KiloMcp extends ToolMcp {
|
|
6150
6402
|
json;
|
|
6151
6403
|
constructor(params) {
|
|
@@ -6166,7 +6418,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
|
|
|
6166
6418
|
validate = true
|
|
6167
6419
|
}) {
|
|
6168
6420
|
const paths = this.getSettablePaths();
|
|
6169
|
-
const fileContent = await readFileContentOrNull(
|
|
6421
|
+
const fileContent = await readFileContentOrNull(join49(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
|
|
6170
6422
|
return new _KiloMcp({
|
|
6171
6423
|
baseDir,
|
|
6172
6424
|
relativeDirPath: paths.relativeDirPath,
|
|
@@ -6214,7 +6466,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
|
|
|
6214
6466
|
};
|
|
6215
6467
|
|
|
6216
6468
|
// src/features/mcp/kiro-mcp.ts
|
|
6217
|
-
import { join as
|
|
6469
|
+
import { join as join50 } from "path";
|
|
6218
6470
|
var KiroMcp = class _KiroMcp extends ToolMcp {
|
|
6219
6471
|
json;
|
|
6220
6472
|
constructor(params) {
|
|
@@ -6226,7 +6478,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
|
|
|
6226
6478
|
}
|
|
6227
6479
|
static getSettablePaths() {
|
|
6228
6480
|
return {
|
|
6229
|
-
relativeDirPath:
|
|
6481
|
+
relativeDirPath: join50(".kiro", "settings"),
|
|
6230
6482
|
relativeFilePath: "mcp.json"
|
|
6231
6483
|
};
|
|
6232
6484
|
}
|
|
@@ -6235,7 +6487,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
|
|
|
6235
6487
|
validate = true
|
|
6236
6488
|
}) {
|
|
6237
6489
|
const paths = this.getSettablePaths();
|
|
6238
|
-
const fileContent = await readFileContentOrNull(
|
|
6490
|
+
const fileContent = await readFileContentOrNull(join50(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
|
|
6239
6491
|
return new _KiroMcp({
|
|
6240
6492
|
baseDir,
|
|
6241
6493
|
relativeDirPath: paths.relativeDirPath,
|
|
@@ -6283,29 +6535,29 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
|
|
|
6283
6535
|
};
|
|
6284
6536
|
|
|
6285
6537
|
// src/features/mcp/opencode-mcp.ts
|
|
6286
|
-
import { join as
|
|
6287
|
-
import { z as
|
|
6288
|
-
var OpencodeMcpLocalServerSchema =
|
|
6289
|
-
type:
|
|
6290
|
-
command:
|
|
6291
|
-
environment:
|
|
6292
|
-
enabled:
|
|
6293
|
-
cwd:
|
|
6538
|
+
import { join as join51 } from "path";
|
|
6539
|
+
import { z as z20 } from "zod/mini";
|
|
6540
|
+
var OpencodeMcpLocalServerSchema = z20.object({
|
|
6541
|
+
type: z20.literal("local"),
|
|
6542
|
+
command: z20.array(z20.string()),
|
|
6543
|
+
environment: z20.optional(z20.record(z20.string(), z20.string())),
|
|
6544
|
+
enabled: z20._default(z20.boolean(), true),
|
|
6545
|
+
cwd: z20.optional(z20.string())
|
|
6294
6546
|
});
|
|
6295
|
-
var OpencodeMcpRemoteServerSchema =
|
|
6296
|
-
type:
|
|
6297
|
-
url:
|
|
6298
|
-
headers:
|
|
6299
|
-
enabled:
|
|
6547
|
+
var OpencodeMcpRemoteServerSchema = z20.object({
|
|
6548
|
+
type: z20.literal("remote"),
|
|
6549
|
+
url: z20.string(),
|
|
6550
|
+
headers: z20.optional(z20.record(z20.string(), z20.string())),
|
|
6551
|
+
enabled: z20._default(z20.boolean(), true)
|
|
6300
6552
|
});
|
|
6301
|
-
var OpencodeMcpServerSchema =
|
|
6553
|
+
var OpencodeMcpServerSchema = z20.union([
|
|
6302
6554
|
OpencodeMcpLocalServerSchema,
|
|
6303
6555
|
OpencodeMcpRemoteServerSchema
|
|
6304
6556
|
]);
|
|
6305
|
-
var OpencodeConfigSchema =
|
|
6306
|
-
$schema:
|
|
6307
|
-
mcp:
|
|
6308
|
-
tools:
|
|
6557
|
+
var OpencodeConfigSchema = z20.looseObject({
|
|
6558
|
+
$schema: z20.optional(z20.string()),
|
|
6559
|
+
mcp: z20.optional(z20.record(z20.string(), OpencodeMcpServerSchema)),
|
|
6560
|
+
tools: z20.optional(z20.record(z20.string(), z20.boolean()))
|
|
6309
6561
|
});
|
|
6310
6562
|
function convertFromOpencodeFormat(opencodeMcp, tools) {
|
|
6311
6563
|
return Object.fromEntries(
|
|
@@ -6423,7 +6675,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
|
|
|
6423
6675
|
static getSettablePaths({ global } = {}) {
|
|
6424
6676
|
if (global) {
|
|
6425
6677
|
return {
|
|
6426
|
-
relativeDirPath:
|
|
6678
|
+
relativeDirPath: join51(".config", "opencode"),
|
|
6427
6679
|
relativeFilePath: "opencode.json"
|
|
6428
6680
|
};
|
|
6429
6681
|
}
|
|
@@ -6438,7 +6690,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
|
|
|
6438
6690
|
global = false
|
|
6439
6691
|
}) {
|
|
6440
6692
|
const paths = this.getSettablePaths({ global });
|
|
6441
|
-
const fileContent = await readFileContentOrNull(
|
|
6693
|
+
const fileContent = await readFileContentOrNull(join51(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcp":{}}';
|
|
6442
6694
|
const json = JSON.parse(fileContent);
|
|
6443
6695
|
const newJson = { ...json, mcp: json.mcp ?? {} };
|
|
6444
6696
|
return new _OpencodeMcp({
|
|
@@ -6457,7 +6709,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
|
|
|
6457
6709
|
}) {
|
|
6458
6710
|
const paths = this.getSettablePaths({ global });
|
|
6459
6711
|
const fileContent = await readOrInitializeFileContent(
|
|
6460
|
-
|
|
6712
|
+
join51(baseDir, paths.relativeDirPath, paths.relativeFilePath),
|
|
6461
6713
|
JSON.stringify({ mcp: {} }, null, 2)
|
|
6462
6714
|
);
|
|
6463
6715
|
const json = JSON.parse(fileContent);
|
|
@@ -6510,7 +6762,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
|
|
|
6510
6762
|
};
|
|
6511
6763
|
|
|
6512
6764
|
// src/features/mcp/roo-mcp.ts
|
|
6513
|
-
import { join as
|
|
6765
|
+
import { join as join52 } from "path";
|
|
6514
6766
|
function isRooMcpServers(value) {
|
|
6515
6767
|
return value !== void 0 && value !== null && typeof value === "object";
|
|
6516
6768
|
}
|
|
@@ -6562,7 +6814,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
|
|
|
6562
6814
|
validate = true
|
|
6563
6815
|
}) {
|
|
6564
6816
|
const fileContent = await readFileContent(
|
|
6565
|
-
|
|
6817
|
+
join52(
|
|
6566
6818
|
baseDir,
|
|
6567
6819
|
this.getSettablePaths().relativeDirPath,
|
|
6568
6820
|
this.getSettablePaths().relativeFilePath
|
|
@@ -6633,7 +6885,7 @@ var mcpProcessorToolTargetTuple = [
|
|
|
6633
6885
|
"opencode",
|
|
6634
6886
|
"roo"
|
|
6635
6887
|
];
|
|
6636
|
-
var McpProcessorToolTargetSchema =
|
|
6888
|
+
var McpProcessorToolTargetSchema = z21.enum(mcpProcessorToolTargetTuple);
|
|
6637
6889
|
var toolMcpFactories = /* @__PURE__ */ new Map([
|
|
6638
6890
|
[
|
|
6639
6891
|
"claudecode",
|
|
@@ -6935,25 +7187,25 @@ var McpProcessor = class extends FeatureProcessor {
|
|
|
6935
7187
|
};
|
|
6936
7188
|
|
|
6937
7189
|
// src/features/rules/rules-processor.ts
|
|
6938
|
-
import { basename as basename10, join as
|
|
7190
|
+
import { basename as basename10, join as join112, relative as relative5 } from "path";
|
|
6939
7191
|
import { encode } from "@toon-format/toon";
|
|
6940
|
-
import { z as
|
|
7192
|
+
import { z as z53 } from "zod/mini";
|
|
6941
7193
|
|
|
6942
7194
|
// src/constants/general.ts
|
|
6943
7195
|
var SKILL_FILE_NAME = "SKILL.md";
|
|
6944
7196
|
|
|
6945
7197
|
// src/features/skills/agentsmd-skill.ts
|
|
6946
|
-
import { join as
|
|
7198
|
+
import { join as join56 } from "path";
|
|
6947
7199
|
|
|
6948
7200
|
// src/features/skills/simulated-skill.ts
|
|
6949
|
-
import { join as
|
|
6950
|
-
import { z as
|
|
7201
|
+
import { join as join55 } from "path";
|
|
7202
|
+
import { z as z22 } from "zod/mini";
|
|
6951
7203
|
|
|
6952
7204
|
// src/features/skills/tool-skill.ts
|
|
6953
|
-
import { join as
|
|
7205
|
+
import { join as join54 } from "path";
|
|
6954
7206
|
|
|
6955
7207
|
// src/types/ai-dir.ts
|
|
6956
|
-
import path2, { basename as basename3, join as
|
|
7208
|
+
import path2, { basename as basename3, join as join53, relative as relative4, resolve as resolve4 } from "path";
|
|
6957
7209
|
var AiDir = class {
|
|
6958
7210
|
/**
|
|
6959
7211
|
* @example "."
|
|
@@ -7047,8 +7299,8 @@ var AiDir = class {
|
|
|
7047
7299
|
* @returns Array of files with their relative paths and buffers
|
|
7048
7300
|
*/
|
|
7049
7301
|
static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
|
|
7050
|
-
const dirPath =
|
|
7051
|
-
const glob =
|
|
7302
|
+
const dirPath = join53(baseDir, relativeDirPath, dirName);
|
|
7303
|
+
const glob = join53(dirPath, "**", "*");
|
|
7052
7304
|
const filePaths = await findFilesByGlobs(glob, { type: "file" });
|
|
7053
7305
|
const filteredPaths = filePaths.filter((filePath) => basename3(filePath) !== excludeFileName);
|
|
7054
7306
|
const files = await Promise.all(
|
|
@@ -7146,8 +7398,8 @@ var ToolSkill = class extends AiDir {
|
|
|
7146
7398
|
}) {
|
|
7147
7399
|
const settablePaths = getSettablePaths({ global });
|
|
7148
7400
|
const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
|
|
7149
|
-
const skillDirPath =
|
|
7150
|
-
const skillFilePath =
|
|
7401
|
+
const skillDirPath = join54(baseDir, actualRelativeDirPath, dirName);
|
|
7402
|
+
const skillFilePath = join54(skillDirPath, SKILL_FILE_NAME);
|
|
7151
7403
|
if (!await fileExists(skillFilePath)) {
|
|
7152
7404
|
throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
|
|
7153
7405
|
}
|
|
@@ -7171,16 +7423,16 @@ var ToolSkill = class extends AiDir {
|
|
|
7171
7423
|
}
|
|
7172
7424
|
requireMainFileFrontmatter() {
|
|
7173
7425
|
if (!this.mainFile?.frontmatter) {
|
|
7174
|
-
throw new Error(`Frontmatter is not defined in ${
|
|
7426
|
+
throw new Error(`Frontmatter is not defined in ${join54(this.relativeDirPath, this.dirName)}`);
|
|
7175
7427
|
}
|
|
7176
7428
|
return this.mainFile.frontmatter;
|
|
7177
7429
|
}
|
|
7178
7430
|
};
|
|
7179
7431
|
|
|
7180
7432
|
// src/features/skills/simulated-skill.ts
|
|
7181
|
-
var SimulatedSkillFrontmatterSchema =
|
|
7182
|
-
name:
|
|
7183
|
-
description:
|
|
7433
|
+
var SimulatedSkillFrontmatterSchema = z22.looseObject({
|
|
7434
|
+
name: z22.string(),
|
|
7435
|
+
description: z22.string()
|
|
7184
7436
|
});
|
|
7185
7437
|
var SimulatedSkill = class extends ToolSkill {
|
|
7186
7438
|
frontmatter;
|
|
@@ -7211,7 +7463,7 @@ var SimulatedSkill = class extends ToolSkill {
|
|
|
7211
7463
|
const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
|
|
7212
7464
|
if (!result.success) {
|
|
7213
7465
|
throw new Error(
|
|
7214
|
-
`Invalid frontmatter in ${
|
|
7466
|
+
`Invalid frontmatter in ${join55(relativeDirPath, dirName)}: ${formatError(result.error)}`
|
|
7215
7467
|
);
|
|
7216
7468
|
}
|
|
7217
7469
|
}
|
|
@@ -7269,8 +7521,8 @@ var SimulatedSkill = class extends ToolSkill {
|
|
|
7269
7521
|
}) {
|
|
7270
7522
|
const settablePaths = this.getSettablePaths();
|
|
7271
7523
|
const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
|
|
7272
|
-
const skillDirPath =
|
|
7273
|
-
const skillFilePath =
|
|
7524
|
+
const skillDirPath = join55(baseDir, actualRelativeDirPath, dirName);
|
|
7525
|
+
const skillFilePath = join55(skillDirPath, SKILL_FILE_NAME);
|
|
7274
7526
|
if (!await fileExists(skillFilePath)) {
|
|
7275
7527
|
throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
|
|
7276
7528
|
}
|
|
@@ -7347,7 +7599,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
|
|
|
7347
7599
|
throw new Error("AgentsmdSkill does not support global mode.");
|
|
7348
7600
|
}
|
|
7349
7601
|
return {
|
|
7350
|
-
relativeDirPath:
|
|
7602
|
+
relativeDirPath: join56(".agents", "skills")
|
|
7351
7603
|
};
|
|
7352
7604
|
}
|
|
7353
7605
|
static async fromDir(params) {
|
|
@@ -7374,11 +7626,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
|
|
|
7374
7626
|
};
|
|
7375
7627
|
|
|
7376
7628
|
// src/features/skills/factorydroid-skill.ts
|
|
7377
|
-
import { join as
|
|
7629
|
+
import { join as join57 } from "path";
|
|
7378
7630
|
var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
|
|
7379
7631
|
static getSettablePaths(_options) {
|
|
7380
7632
|
return {
|
|
7381
|
-
relativeDirPath:
|
|
7633
|
+
relativeDirPath: join57(".factory", "skills")
|
|
7382
7634
|
};
|
|
7383
7635
|
}
|
|
7384
7636
|
static async fromDir(params) {
|
|
@@ -7405,11 +7657,11 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
|
|
|
7405
7657
|
};
|
|
7406
7658
|
|
|
7407
7659
|
// src/features/skills/skills-processor.ts
|
|
7408
|
-
import { basename as basename5, join as
|
|
7409
|
-
import { z as
|
|
7660
|
+
import { basename as basename5, join as join74 } from "path";
|
|
7661
|
+
import { z as z37 } from "zod/mini";
|
|
7410
7662
|
|
|
7411
7663
|
// src/types/dir-feature-processor.ts
|
|
7412
|
-
import { join as
|
|
7664
|
+
import { join as join58 } from "path";
|
|
7413
7665
|
var DirFeatureProcessor = class {
|
|
7414
7666
|
baseDir;
|
|
7415
7667
|
dryRun;
|
|
@@ -7440,7 +7692,7 @@ var DirFeatureProcessor = class {
|
|
|
7440
7692
|
const mainFile = aiDir.getMainFile();
|
|
7441
7693
|
let mainFileContent;
|
|
7442
7694
|
if (mainFile) {
|
|
7443
|
-
const mainFilePath =
|
|
7695
|
+
const mainFilePath = join58(dirPath, mainFile.name);
|
|
7444
7696
|
const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter);
|
|
7445
7697
|
mainFileContent = addTrailingNewline(content);
|
|
7446
7698
|
const existingContent = await readFileContentOrNull(mainFilePath);
|
|
@@ -7454,7 +7706,7 @@ var DirFeatureProcessor = class {
|
|
|
7454
7706
|
const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
|
|
7455
7707
|
otherFileContents.push(contentWithNewline);
|
|
7456
7708
|
if (!dirHasChanges) {
|
|
7457
|
-
const filePath =
|
|
7709
|
+
const filePath = join58(dirPath, file.relativeFilePathToDirPath);
|
|
7458
7710
|
const existingContent = await readFileContentOrNull(filePath);
|
|
7459
7711
|
if (existingContent !== contentWithNewline) {
|
|
7460
7712
|
dirHasChanges = true;
|
|
@@ -7468,22 +7720,22 @@ var DirFeatureProcessor = class {
|
|
|
7468
7720
|
if (this.dryRun) {
|
|
7469
7721
|
logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
|
|
7470
7722
|
if (mainFile) {
|
|
7471
|
-
logger.info(`[DRY RUN] Would write: ${
|
|
7472
|
-
changedPaths.push(
|
|
7723
|
+
logger.info(`[DRY RUN] Would write: ${join58(dirPath, mainFile.name)}`);
|
|
7724
|
+
changedPaths.push(join58(relativeDir, mainFile.name));
|
|
7473
7725
|
}
|
|
7474
7726
|
for (const file of otherFiles) {
|
|
7475
|
-
logger.info(`[DRY RUN] Would write: ${
|
|
7476
|
-
changedPaths.push(
|
|
7727
|
+
logger.info(`[DRY RUN] Would write: ${join58(dirPath, file.relativeFilePathToDirPath)}`);
|
|
7728
|
+
changedPaths.push(join58(relativeDir, file.relativeFilePathToDirPath));
|
|
7477
7729
|
}
|
|
7478
7730
|
} else {
|
|
7479
7731
|
await ensureDir(dirPath);
|
|
7480
7732
|
if (mainFile && mainFileContent) {
|
|
7481
|
-
const mainFilePath =
|
|
7733
|
+
const mainFilePath = join58(dirPath, mainFile.name);
|
|
7482
7734
|
await writeFileContent(mainFilePath, mainFileContent);
|
|
7483
|
-
changedPaths.push(
|
|
7735
|
+
changedPaths.push(join58(relativeDir, mainFile.name));
|
|
7484
7736
|
}
|
|
7485
7737
|
for (const [i, file] of otherFiles.entries()) {
|
|
7486
|
-
const filePath =
|
|
7738
|
+
const filePath = join58(dirPath, file.relativeFilePathToDirPath);
|
|
7487
7739
|
const content = otherFileContents[i];
|
|
7488
7740
|
if (content === void 0) {
|
|
7489
7741
|
throw new Error(
|
|
@@ -7491,7 +7743,7 @@ var DirFeatureProcessor = class {
|
|
|
7491
7743
|
);
|
|
7492
7744
|
}
|
|
7493
7745
|
await writeFileContent(filePath, content);
|
|
7494
|
-
changedPaths.push(
|
|
7746
|
+
changedPaths.push(join58(relativeDir, file.relativeFilePathToDirPath));
|
|
7495
7747
|
}
|
|
7496
7748
|
}
|
|
7497
7749
|
changedCount++;
|
|
@@ -7523,38 +7775,38 @@ var DirFeatureProcessor = class {
|
|
|
7523
7775
|
};
|
|
7524
7776
|
|
|
7525
7777
|
// src/features/skills/agentsskills-skill.ts
|
|
7526
|
-
import { join as
|
|
7527
|
-
import { z as
|
|
7778
|
+
import { join as join60 } from "path";
|
|
7779
|
+
import { z as z24 } from "zod/mini";
|
|
7528
7780
|
|
|
7529
7781
|
// src/features/skills/rulesync-skill.ts
|
|
7530
|
-
import { join as
|
|
7531
|
-
import { z as
|
|
7532
|
-
var RulesyncSkillFrontmatterSchemaInternal =
|
|
7533
|
-
name:
|
|
7534
|
-
description:
|
|
7535
|
-
targets:
|
|
7536
|
-
claudecode:
|
|
7537
|
-
|
|
7538
|
-
"allowed-tools":
|
|
7782
|
+
import { join as join59 } from "path";
|
|
7783
|
+
import { z as z23 } from "zod/mini";
|
|
7784
|
+
var RulesyncSkillFrontmatterSchemaInternal = z23.looseObject({
|
|
7785
|
+
name: z23.string(),
|
|
7786
|
+
description: z23.string(),
|
|
7787
|
+
targets: z23._default(RulesyncTargetsSchema, ["*"]),
|
|
7788
|
+
claudecode: z23.optional(
|
|
7789
|
+
z23.looseObject({
|
|
7790
|
+
"allowed-tools": z23.optional(z23.array(z23.string()))
|
|
7539
7791
|
})
|
|
7540
7792
|
),
|
|
7541
|
-
codexcli:
|
|
7542
|
-
|
|
7543
|
-
"short-description":
|
|
7793
|
+
codexcli: z23.optional(
|
|
7794
|
+
z23.looseObject({
|
|
7795
|
+
"short-description": z23.optional(z23.string())
|
|
7544
7796
|
})
|
|
7545
7797
|
),
|
|
7546
|
-
opencode:
|
|
7547
|
-
|
|
7548
|
-
"allowed-tools":
|
|
7798
|
+
opencode: z23.optional(
|
|
7799
|
+
z23.looseObject({
|
|
7800
|
+
"allowed-tools": z23.optional(z23.array(z23.string()))
|
|
7549
7801
|
})
|
|
7550
7802
|
),
|
|
7551
|
-
copilot:
|
|
7552
|
-
|
|
7553
|
-
license:
|
|
7803
|
+
copilot: z23.optional(
|
|
7804
|
+
z23.looseObject({
|
|
7805
|
+
license: z23.optional(z23.string())
|
|
7554
7806
|
})
|
|
7555
7807
|
),
|
|
7556
|
-
cline:
|
|
7557
|
-
roo:
|
|
7808
|
+
cline: z23.optional(z23.looseObject({})),
|
|
7809
|
+
roo: z23.optional(z23.looseObject({}))
|
|
7558
7810
|
});
|
|
7559
7811
|
var RulesyncSkillFrontmatterSchema = RulesyncSkillFrontmatterSchemaInternal;
|
|
7560
7812
|
var RulesyncSkill = class _RulesyncSkill extends AiDir {
|
|
@@ -7594,7 +7846,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
|
|
|
7594
7846
|
}
|
|
7595
7847
|
getFrontmatter() {
|
|
7596
7848
|
if (!this.mainFile?.frontmatter) {
|
|
7597
|
-
throw new Error(`Frontmatter is not defined in ${
|
|
7849
|
+
throw new Error(`Frontmatter is not defined in ${join59(this.relativeDirPath, this.dirName)}`);
|
|
7598
7850
|
}
|
|
7599
7851
|
const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
|
|
7600
7852
|
return result;
|
|
@@ -7620,8 +7872,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
|
|
|
7620
7872
|
dirName,
|
|
7621
7873
|
global = false
|
|
7622
7874
|
}) {
|
|
7623
|
-
const skillDirPath =
|
|
7624
|
-
const skillFilePath =
|
|
7875
|
+
const skillDirPath = join59(baseDir, relativeDirPath, dirName);
|
|
7876
|
+
const skillFilePath = join59(skillDirPath, SKILL_FILE_NAME);
|
|
7625
7877
|
if (!await fileExists(skillFilePath)) {
|
|
7626
7878
|
throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
|
|
7627
7879
|
}
|
|
@@ -7651,14 +7903,14 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
|
|
|
7651
7903
|
};
|
|
7652
7904
|
|
|
7653
7905
|
// src/features/skills/agentsskills-skill.ts
|
|
7654
|
-
var AgentsSkillsSkillFrontmatterSchema =
|
|
7655
|
-
name:
|
|
7656
|
-
description:
|
|
7906
|
+
var AgentsSkillsSkillFrontmatterSchema = z24.looseObject({
|
|
7907
|
+
name: z24.string(),
|
|
7908
|
+
description: z24.string()
|
|
7657
7909
|
});
|
|
7658
7910
|
var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
|
|
7659
7911
|
constructor({
|
|
7660
7912
|
baseDir = process.cwd(),
|
|
7661
|
-
relativeDirPath =
|
|
7913
|
+
relativeDirPath = join60(".agents", "skills"),
|
|
7662
7914
|
dirName,
|
|
7663
7915
|
frontmatter,
|
|
7664
7916
|
body,
|
|
@@ -7690,7 +7942,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
|
|
|
7690
7942
|
throw new Error("AgentsSkillsSkill does not support global mode.");
|
|
7691
7943
|
}
|
|
7692
7944
|
return {
|
|
7693
|
-
relativeDirPath:
|
|
7945
|
+
relativeDirPath: join60(".agents", "skills")
|
|
7694
7946
|
};
|
|
7695
7947
|
}
|
|
7696
7948
|
getFrontmatter() {
|
|
@@ -7769,9 +8021,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
|
|
|
7769
8021
|
});
|
|
7770
8022
|
const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
7771
8023
|
if (!result.success) {
|
|
7772
|
-
const skillDirPath =
|
|
8024
|
+
const skillDirPath = join60(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
7773
8025
|
throw new Error(
|
|
7774
|
-
`Invalid frontmatter in ${
|
|
8026
|
+
`Invalid frontmatter in ${join60(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
7775
8027
|
);
|
|
7776
8028
|
}
|
|
7777
8029
|
return new _AgentsSkillsSkill({
|
|
@@ -7806,16 +8058,16 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
|
|
|
7806
8058
|
};
|
|
7807
8059
|
|
|
7808
8060
|
// src/features/skills/antigravity-skill.ts
|
|
7809
|
-
import { join as
|
|
7810
|
-
import { z as
|
|
7811
|
-
var AntigravitySkillFrontmatterSchema =
|
|
7812
|
-
name:
|
|
7813
|
-
description:
|
|
8061
|
+
import { join as join61 } from "path";
|
|
8062
|
+
import { z as z25 } from "zod/mini";
|
|
8063
|
+
var AntigravitySkillFrontmatterSchema = z25.looseObject({
|
|
8064
|
+
name: z25.string(),
|
|
8065
|
+
description: z25.string()
|
|
7814
8066
|
});
|
|
7815
8067
|
var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
|
|
7816
8068
|
constructor({
|
|
7817
8069
|
baseDir = process.cwd(),
|
|
7818
|
-
relativeDirPath =
|
|
8070
|
+
relativeDirPath = join61(".agent", "skills"),
|
|
7819
8071
|
dirName,
|
|
7820
8072
|
frontmatter,
|
|
7821
8073
|
body,
|
|
@@ -7847,11 +8099,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
|
|
|
7847
8099
|
} = {}) {
|
|
7848
8100
|
if (global) {
|
|
7849
8101
|
return {
|
|
7850
|
-
relativeDirPath:
|
|
8102
|
+
relativeDirPath: join61(".gemini", "antigravity", "skills")
|
|
7851
8103
|
};
|
|
7852
8104
|
}
|
|
7853
8105
|
return {
|
|
7854
|
-
relativeDirPath:
|
|
8106
|
+
relativeDirPath: join61(".agent", "skills")
|
|
7855
8107
|
};
|
|
7856
8108
|
}
|
|
7857
8109
|
getFrontmatter() {
|
|
@@ -7930,9 +8182,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
|
|
|
7930
8182
|
});
|
|
7931
8183
|
const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
7932
8184
|
if (!result.success) {
|
|
7933
|
-
const skillDirPath =
|
|
8185
|
+
const skillDirPath = join61(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
7934
8186
|
throw new Error(
|
|
7935
|
-
`Invalid frontmatter in ${
|
|
8187
|
+
`Invalid frontmatter in ${join61(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
7936
8188
|
);
|
|
7937
8189
|
}
|
|
7938
8190
|
return new _AntigravitySkill({
|
|
@@ -7966,17 +8218,17 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
|
|
|
7966
8218
|
};
|
|
7967
8219
|
|
|
7968
8220
|
// src/features/skills/claudecode-skill.ts
|
|
7969
|
-
import { join as
|
|
7970
|
-
import { z as
|
|
7971
|
-
var ClaudecodeSkillFrontmatterSchema =
|
|
7972
|
-
name:
|
|
7973
|
-
description:
|
|
7974
|
-
"allowed-tools":
|
|
8221
|
+
import { join as join62 } from "path";
|
|
8222
|
+
import { z as z26 } from "zod/mini";
|
|
8223
|
+
var ClaudecodeSkillFrontmatterSchema = z26.looseObject({
|
|
8224
|
+
name: z26.string(),
|
|
8225
|
+
description: z26.string(),
|
|
8226
|
+
"allowed-tools": z26.optional(z26.array(z26.string()))
|
|
7975
8227
|
});
|
|
7976
8228
|
var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
|
|
7977
8229
|
constructor({
|
|
7978
8230
|
baseDir = process.cwd(),
|
|
7979
|
-
relativeDirPath =
|
|
8231
|
+
relativeDirPath = join62(".claude", "skills"),
|
|
7980
8232
|
dirName,
|
|
7981
8233
|
frontmatter,
|
|
7982
8234
|
body,
|
|
@@ -8007,7 +8259,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
|
|
|
8007
8259
|
global: _global = false
|
|
8008
8260
|
} = {}) {
|
|
8009
8261
|
return {
|
|
8010
|
-
relativeDirPath:
|
|
8262
|
+
relativeDirPath: join62(".claude", "skills")
|
|
8011
8263
|
};
|
|
8012
8264
|
}
|
|
8013
8265
|
getFrontmatter() {
|
|
@@ -8092,9 +8344,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
|
|
|
8092
8344
|
});
|
|
8093
8345
|
const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
8094
8346
|
if (!result.success) {
|
|
8095
|
-
const skillDirPath =
|
|
8347
|
+
const skillDirPath = join62(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
8096
8348
|
throw new Error(
|
|
8097
|
-
`Invalid frontmatter in ${
|
|
8349
|
+
`Invalid frontmatter in ${join62(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
8098
8350
|
);
|
|
8099
8351
|
}
|
|
8100
8352
|
return new _ClaudecodeSkill({
|
|
@@ -8128,16 +8380,16 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
|
|
|
8128
8380
|
};
|
|
8129
8381
|
|
|
8130
8382
|
// src/features/skills/cline-skill.ts
|
|
8131
|
-
import { join as
|
|
8132
|
-
import { z as
|
|
8133
|
-
var ClineSkillFrontmatterSchema =
|
|
8134
|
-
name:
|
|
8135
|
-
description:
|
|
8383
|
+
import { join as join63 } from "path";
|
|
8384
|
+
import { z as z27 } from "zod/mini";
|
|
8385
|
+
var ClineSkillFrontmatterSchema = z27.looseObject({
|
|
8386
|
+
name: z27.string(),
|
|
8387
|
+
description: z27.string()
|
|
8136
8388
|
});
|
|
8137
8389
|
var ClineSkill = class _ClineSkill extends ToolSkill {
|
|
8138
8390
|
constructor({
|
|
8139
8391
|
baseDir = process.cwd(),
|
|
8140
|
-
relativeDirPath =
|
|
8392
|
+
relativeDirPath = join63(".cline", "skills"),
|
|
8141
8393
|
dirName,
|
|
8142
8394
|
frontmatter,
|
|
8143
8395
|
body,
|
|
@@ -8166,7 +8418,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
|
|
|
8166
8418
|
}
|
|
8167
8419
|
static getSettablePaths(_options = {}) {
|
|
8168
8420
|
return {
|
|
8169
|
-
relativeDirPath:
|
|
8421
|
+
relativeDirPath: join63(".cline", "skills")
|
|
8170
8422
|
};
|
|
8171
8423
|
}
|
|
8172
8424
|
getFrontmatter() {
|
|
@@ -8253,13 +8505,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
|
|
|
8253
8505
|
});
|
|
8254
8506
|
const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
8255
8507
|
if (!result.success) {
|
|
8256
|
-
const skillDirPath =
|
|
8508
|
+
const skillDirPath = join63(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
8257
8509
|
throw new Error(
|
|
8258
|
-
`Invalid frontmatter in ${
|
|
8510
|
+
`Invalid frontmatter in ${join63(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
8259
8511
|
);
|
|
8260
8512
|
}
|
|
8261
8513
|
if (result.data.name !== loaded.dirName) {
|
|
8262
|
-
const skillFilePath =
|
|
8514
|
+
const skillFilePath = join63(
|
|
8263
8515
|
loaded.baseDir,
|
|
8264
8516
|
loaded.relativeDirPath,
|
|
8265
8517
|
loaded.dirName,
|
|
@@ -8300,21 +8552,21 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
|
|
|
8300
8552
|
};
|
|
8301
8553
|
|
|
8302
8554
|
// src/features/skills/codexcli-skill.ts
|
|
8303
|
-
import { join as
|
|
8304
|
-
import { z as
|
|
8305
|
-
var CodexCliSkillFrontmatterSchema =
|
|
8306
|
-
name:
|
|
8307
|
-
description:
|
|
8308
|
-
metadata:
|
|
8309
|
-
|
|
8310
|
-
"short-description":
|
|
8555
|
+
import { join as join64 } from "path";
|
|
8556
|
+
import { z as z28 } from "zod/mini";
|
|
8557
|
+
var CodexCliSkillFrontmatterSchema = z28.looseObject({
|
|
8558
|
+
name: z28.string(),
|
|
8559
|
+
description: z28.string(),
|
|
8560
|
+
metadata: z28.optional(
|
|
8561
|
+
z28.looseObject({
|
|
8562
|
+
"short-description": z28.optional(z28.string())
|
|
8311
8563
|
})
|
|
8312
8564
|
)
|
|
8313
8565
|
});
|
|
8314
8566
|
var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
|
|
8315
8567
|
constructor({
|
|
8316
8568
|
baseDir = process.cwd(),
|
|
8317
|
-
relativeDirPath =
|
|
8569
|
+
relativeDirPath = join64(".codex", "skills"),
|
|
8318
8570
|
dirName,
|
|
8319
8571
|
frontmatter,
|
|
8320
8572
|
body,
|
|
@@ -8345,7 +8597,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
|
|
|
8345
8597
|
global: _global = false
|
|
8346
8598
|
} = {}) {
|
|
8347
8599
|
return {
|
|
8348
|
-
relativeDirPath:
|
|
8600
|
+
relativeDirPath: join64(".codex", "skills")
|
|
8349
8601
|
};
|
|
8350
8602
|
}
|
|
8351
8603
|
getFrontmatter() {
|
|
@@ -8434,9 +8686,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
|
|
|
8434
8686
|
});
|
|
8435
8687
|
const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
8436
8688
|
if (!result.success) {
|
|
8437
|
-
const skillDirPath =
|
|
8689
|
+
const skillDirPath = join64(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
8438
8690
|
throw new Error(
|
|
8439
|
-
`Invalid frontmatter in ${
|
|
8691
|
+
`Invalid frontmatter in ${join64(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
8440
8692
|
);
|
|
8441
8693
|
}
|
|
8442
8694
|
return new _CodexCliSkill({
|
|
@@ -8470,17 +8722,17 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
|
|
|
8470
8722
|
};
|
|
8471
8723
|
|
|
8472
8724
|
// src/features/skills/copilot-skill.ts
|
|
8473
|
-
import { join as
|
|
8474
|
-
import { z as
|
|
8475
|
-
var CopilotSkillFrontmatterSchema =
|
|
8476
|
-
name:
|
|
8477
|
-
description:
|
|
8478
|
-
license:
|
|
8725
|
+
import { join as join65 } from "path";
|
|
8726
|
+
import { z as z29 } from "zod/mini";
|
|
8727
|
+
var CopilotSkillFrontmatterSchema = z29.looseObject({
|
|
8728
|
+
name: z29.string(),
|
|
8729
|
+
description: z29.string(),
|
|
8730
|
+
license: z29.optional(z29.string())
|
|
8479
8731
|
});
|
|
8480
8732
|
var CopilotSkill = class _CopilotSkill extends ToolSkill {
|
|
8481
8733
|
constructor({
|
|
8482
8734
|
baseDir = process.cwd(),
|
|
8483
|
-
relativeDirPath =
|
|
8735
|
+
relativeDirPath = join65(".github", "skills"),
|
|
8484
8736
|
dirName,
|
|
8485
8737
|
frontmatter,
|
|
8486
8738
|
body,
|
|
@@ -8512,7 +8764,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
|
|
|
8512
8764
|
throw new Error("CopilotSkill does not support global mode.");
|
|
8513
8765
|
}
|
|
8514
8766
|
return {
|
|
8515
|
-
relativeDirPath:
|
|
8767
|
+
relativeDirPath: join65(".github", "skills")
|
|
8516
8768
|
};
|
|
8517
8769
|
}
|
|
8518
8770
|
getFrontmatter() {
|
|
@@ -8597,9 +8849,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
|
|
|
8597
8849
|
});
|
|
8598
8850
|
const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
8599
8851
|
if (!result.success) {
|
|
8600
|
-
const skillDirPath =
|
|
8852
|
+
const skillDirPath = join65(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
8601
8853
|
throw new Error(
|
|
8602
|
-
`Invalid frontmatter in ${
|
|
8854
|
+
`Invalid frontmatter in ${join65(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
8603
8855
|
);
|
|
8604
8856
|
}
|
|
8605
8857
|
return new _CopilotSkill({
|
|
@@ -8634,16 +8886,16 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
|
|
|
8634
8886
|
};
|
|
8635
8887
|
|
|
8636
8888
|
// src/features/skills/cursor-skill.ts
|
|
8637
|
-
import { join as
|
|
8638
|
-
import { z as
|
|
8639
|
-
var CursorSkillFrontmatterSchema =
|
|
8640
|
-
name:
|
|
8641
|
-
description:
|
|
8889
|
+
import { join as join66 } from "path";
|
|
8890
|
+
import { z as z30 } from "zod/mini";
|
|
8891
|
+
var CursorSkillFrontmatterSchema = z30.looseObject({
|
|
8892
|
+
name: z30.string(),
|
|
8893
|
+
description: z30.string()
|
|
8642
8894
|
});
|
|
8643
8895
|
var CursorSkill = class _CursorSkill extends ToolSkill {
|
|
8644
8896
|
constructor({
|
|
8645
8897
|
baseDir = process.cwd(),
|
|
8646
|
-
relativeDirPath =
|
|
8898
|
+
relativeDirPath = join66(".cursor", "skills"),
|
|
8647
8899
|
dirName,
|
|
8648
8900
|
frontmatter,
|
|
8649
8901
|
body,
|
|
@@ -8672,7 +8924,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
|
|
|
8672
8924
|
}
|
|
8673
8925
|
static getSettablePaths(_options) {
|
|
8674
8926
|
return {
|
|
8675
|
-
relativeDirPath:
|
|
8927
|
+
relativeDirPath: join66(".cursor", "skills")
|
|
8676
8928
|
};
|
|
8677
8929
|
}
|
|
8678
8930
|
getFrontmatter() {
|
|
@@ -8751,9 +9003,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
|
|
|
8751
9003
|
});
|
|
8752
9004
|
const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
8753
9005
|
if (!result.success) {
|
|
8754
|
-
const skillDirPath =
|
|
9006
|
+
const skillDirPath = join66(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
8755
9007
|
throw new Error(
|
|
8756
|
-
`Invalid frontmatter in ${
|
|
9008
|
+
`Invalid frontmatter in ${join66(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
8757
9009
|
);
|
|
8758
9010
|
}
|
|
8759
9011
|
return new _CursorSkill({
|
|
@@ -8788,11 +9040,11 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
|
|
|
8788
9040
|
};
|
|
8789
9041
|
|
|
8790
9042
|
// src/features/skills/geminicli-skill.ts
|
|
8791
|
-
import { join as
|
|
8792
|
-
import { z as
|
|
8793
|
-
var GeminiCliSkillFrontmatterSchema =
|
|
8794
|
-
name:
|
|
8795
|
-
description:
|
|
9043
|
+
import { join as join67 } from "path";
|
|
9044
|
+
import { z as z31 } from "zod/mini";
|
|
9045
|
+
var GeminiCliSkillFrontmatterSchema = z31.looseObject({
|
|
9046
|
+
name: z31.string(),
|
|
9047
|
+
description: z31.string()
|
|
8796
9048
|
});
|
|
8797
9049
|
var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
|
|
8798
9050
|
constructor({
|
|
@@ -8828,7 +9080,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
|
|
|
8828
9080
|
global: _global = false
|
|
8829
9081
|
} = {}) {
|
|
8830
9082
|
return {
|
|
8831
|
-
relativeDirPath:
|
|
9083
|
+
relativeDirPath: join67(".gemini", "skills")
|
|
8832
9084
|
};
|
|
8833
9085
|
}
|
|
8834
9086
|
getFrontmatter() {
|
|
@@ -8907,9 +9159,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
|
|
|
8907
9159
|
});
|
|
8908
9160
|
const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
8909
9161
|
if (!result.success) {
|
|
8910
|
-
const skillDirPath =
|
|
9162
|
+
const skillDirPath = join67(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
8911
9163
|
throw new Error(
|
|
8912
|
-
`Invalid frontmatter in ${
|
|
9164
|
+
`Invalid frontmatter in ${join67(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
8913
9165
|
);
|
|
8914
9166
|
}
|
|
8915
9167
|
return new _GeminiCliSkill({
|
|
@@ -8944,16 +9196,16 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
|
|
|
8944
9196
|
};
|
|
8945
9197
|
|
|
8946
9198
|
// src/features/skills/kilo-skill.ts
|
|
8947
|
-
import { join as
|
|
8948
|
-
import { z as
|
|
8949
|
-
var KiloSkillFrontmatterSchema =
|
|
8950
|
-
name:
|
|
8951
|
-
description:
|
|
9199
|
+
import { join as join68 } from "path";
|
|
9200
|
+
import { z as z32 } from "zod/mini";
|
|
9201
|
+
var KiloSkillFrontmatterSchema = z32.looseObject({
|
|
9202
|
+
name: z32.string(),
|
|
9203
|
+
description: z32.string()
|
|
8952
9204
|
});
|
|
8953
9205
|
var KiloSkill = class _KiloSkill extends ToolSkill {
|
|
8954
9206
|
constructor({
|
|
8955
9207
|
baseDir = process.cwd(),
|
|
8956
|
-
relativeDirPath =
|
|
9208
|
+
relativeDirPath = join68(".kilocode", "skills"),
|
|
8957
9209
|
dirName,
|
|
8958
9210
|
frontmatter,
|
|
8959
9211
|
body,
|
|
@@ -8984,7 +9236,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
|
|
|
8984
9236
|
global: _global = false
|
|
8985
9237
|
} = {}) {
|
|
8986
9238
|
return {
|
|
8987
|
-
relativeDirPath:
|
|
9239
|
+
relativeDirPath: join68(".kilocode", "skills")
|
|
8988
9240
|
};
|
|
8989
9241
|
}
|
|
8990
9242
|
getFrontmatter() {
|
|
@@ -9071,13 +9323,13 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
|
|
|
9071
9323
|
});
|
|
9072
9324
|
const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
9073
9325
|
if (!result.success) {
|
|
9074
|
-
const skillDirPath =
|
|
9326
|
+
const skillDirPath = join68(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
9075
9327
|
throw new Error(
|
|
9076
|
-
`Invalid frontmatter in ${
|
|
9328
|
+
`Invalid frontmatter in ${join68(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
9077
9329
|
);
|
|
9078
9330
|
}
|
|
9079
9331
|
if (result.data.name !== loaded.dirName) {
|
|
9080
|
-
const skillFilePath =
|
|
9332
|
+
const skillFilePath = join68(
|
|
9081
9333
|
loaded.baseDir,
|
|
9082
9334
|
loaded.relativeDirPath,
|
|
9083
9335
|
loaded.dirName,
|
|
@@ -9118,16 +9370,16 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
|
|
|
9118
9370
|
};
|
|
9119
9371
|
|
|
9120
9372
|
// src/features/skills/kiro-skill.ts
|
|
9121
|
-
import { join as
|
|
9122
|
-
import { z as
|
|
9123
|
-
var KiroSkillFrontmatterSchema =
|
|
9124
|
-
name:
|
|
9125
|
-
description:
|
|
9373
|
+
import { join as join69 } from "path";
|
|
9374
|
+
import { z as z33 } from "zod/mini";
|
|
9375
|
+
var KiroSkillFrontmatterSchema = z33.looseObject({
|
|
9376
|
+
name: z33.string(),
|
|
9377
|
+
description: z33.string()
|
|
9126
9378
|
});
|
|
9127
9379
|
var KiroSkill = class _KiroSkill extends ToolSkill {
|
|
9128
9380
|
constructor({
|
|
9129
9381
|
baseDir = process.cwd(),
|
|
9130
|
-
relativeDirPath =
|
|
9382
|
+
relativeDirPath = join69(".kiro", "skills"),
|
|
9131
9383
|
dirName,
|
|
9132
9384
|
frontmatter,
|
|
9133
9385
|
body,
|
|
@@ -9159,7 +9411,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
|
|
|
9159
9411
|
throw new Error("KiroSkill does not support global mode.");
|
|
9160
9412
|
}
|
|
9161
9413
|
return {
|
|
9162
|
-
relativeDirPath:
|
|
9414
|
+
relativeDirPath: join69(".kiro", "skills")
|
|
9163
9415
|
};
|
|
9164
9416
|
}
|
|
9165
9417
|
getFrontmatter() {
|
|
@@ -9246,13 +9498,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
|
|
|
9246
9498
|
});
|
|
9247
9499
|
const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
9248
9500
|
if (!result.success) {
|
|
9249
|
-
const skillDirPath =
|
|
9501
|
+
const skillDirPath = join69(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
9250
9502
|
throw new Error(
|
|
9251
|
-
`Invalid frontmatter in ${
|
|
9503
|
+
`Invalid frontmatter in ${join69(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
9252
9504
|
);
|
|
9253
9505
|
}
|
|
9254
9506
|
if (result.data.name !== loaded.dirName) {
|
|
9255
|
-
const skillFilePath =
|
|
9507
|
+
const skillFilePath = join69(
|
|
9256
9508
|
loaded.baseDir,
|
|
9257
9509
|
loaded.relativeDirPath,
|
|
9258
9510
|
loaded.dirName,
|
|
@@ -9294,17 +9546,17 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
|
|
|
9294
9546
|
};
|
|
9295
9547
|
|
|
9296
9548
|
// src/features/skills/opencode-skill.ts
|
|
9297
|
-
import { join as
|
|
9298
|
-
import { z as
|
|
9299
|
-
var OpenCodeSkillFrontmatterSchema =
|
|
9300
|
-
name:
|
|
9301
|
-
description:
|
|
9302
|
-
"allowed-tools":
|
|
9549
|
+
import { join as join70 } from "path";
|
|
9550
|
+
import { z as z34 } from "zod/mini";
|
|
9551
|
+
var OpenCodeSkillFrontmatterSchema = z34.looseObject({
|
|
9552
|
+
name: z34.string(),
|
|
9553
|
+
description: z34.string(),
|
|
9554
|
+
"allowed-tools": z34.optional(z34.array(z34.string()))
|
|
9303
9555
|
});
|
|
9304
9556
|
var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
|
|
9305
9557
|
constructor({
|
|
9306
9558
|
baseDir = process.cwd(),
|
|
9307
|
-
relativeDirPath =
|
|
9559
|
+
relativeDirPath = join70(".opencode", "skill"),
|
|
9308
9560
|
dirName,
|
|
9309
9561
|
frontmatter,
|
|
9310
9562
|
body,
|
|
@@ -9333,7 +9585,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
|
|
|
9333
9585
|
}
|
|
9334
9586
|
static getSettablePaths({ global = false } = {}) {
|
|
9335
9587
|
return {
|
|
9336
|
-
relativeDirPath: global ?
|
|
9588
|
+
relativeDirPath: global ? join70(".config", "opencode", "skill") : join70(".opencode", "skill")
|
|
9337
9589
|
};
|
|
9338
9590
|
}
|
|
9339
9591
|
getFrontmatter() {
|
|
@@ -9418,9 +9670,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
|
|
|
9418
9670
|
});
|
|
9419
9671
|
const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
9420
9672
|
if (!result.success) {
|
|
9421
|
-
const skillDirPath =
|
|
9673
|
+
const skillDirPath = join70(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
9422
9674
|
throw new Error(
|
|
9423
|
-
`Invalid frontmatter in ${
|
|
9675
|
+
`Invalid frontmatter in ${join70(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
9424
9676
|
);
|
|
9425
9677
|
}
|
|
9426
9678
|
return new _OpenCodeSkill({
|
|
@@ -9454,16 +9706,16 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
|
|
|
9454
9706
|
};
|
|
9455
9707
|
|
|
9456
9708
|
// src/features/skills/replit-skill.ts
|
|
9457
|
-
import { join as
|
|
9458
|
-
import { z as
|
|
9459
|
-
var ReplitSkillFrontmatterSchema =
|
|
9460
|
-
name:
|
|
9461
|
-
description:
|
|
9709
|
+
import { join as join71 } from "path";
|
|
9710
|
+
import { z as z35 } from "zod/mini";
|
|
9711
|
+
var ReplitSkillFrontmatterSchema = z35.looseObject({
|
|
9712
|
+
name: z35.string(),
|
|
9713
|
+
description: z35.string()
|
|
9462
9714
|
});
|
|
9463
9715
|
var ReplitSkill = class _ReplitSkill extends ToolSkill {
|
|
9464
9716
|
constructor({
|
|
9465
9717
|
baseDir = process.cwd(),
|
|
9466
|
-
relativeDirPath =
|
|
9718
|
+
relativeDirPath = join71(".agents", "skills"),
|
|
9467
9719
|
dirName,
|
|
9468
9720
|
frontmatter,
|
|
9469
9721
|
body,
|
|
@@ -9495,7 +9747,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
|
|
|
9495
9747
|
throw new Error("ReplitSkill does not support global mode.");
|
|
9496
9748
|
}
|
|
9497
9749
|
return {
|
|
9498
|
-
relativeDirPath:
|
|
9750
|
+
relativeDirPath: join71(".agents", "skills")
|
|
9499
9751
|
};
|
|
9500
9752
|
}
|
|
9501
9753
|
getFrontmatter() {
|
|
@@ -9574,9 +9826,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
|
|
|
9574
9826
|
});
|
|
9575
9827
|
const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
9576
9828
|
if (!result.success) {
|
|
9577
|
-
const skillDirPath =
|
|
9829
|
+
const skillDirPath = join71(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
9578
9830
|
throw new Error(
|
|
9579
|
-
`Invalid frontmatter in ${
|
|
9831
|
+
`Invalid frontmatter in ${join71(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
9580
9832
|
);
|
|
9581
9833
|
}
|
|
9582
9834
|
return new _ReplitSkill({
|
|
@@ -9611,16 +9863,16 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
|
|
|
9611
9863
|
};
|
|
9612
9864
|
|
|
9613
9865
|
// src/features/skills/roo-skill.ts
|
|
9614
|
-
import { join as
|
|
9615
|
-
import { z as
|
|
9616
|
-
var RooSkillFrontmatterSchema =
|
|
9617
|
-
name:
|
|
9618
|
-
description:
|
|
9866
|
+
import { join as join72 } from "path";
|
|
9867
|
+
import { z as z36 } from "zod/mini";
|
|
9868
|
+
var RooSkillFrontmatterSchema = z36.looseObject({
|
|
9869
|
+
name: z36.string(),
|
|
9870
|
+
description: z36.string()
|
|
9619
9871
|
});
|
|
9620
9872
|
var RooSkill = class _RooSkill extends ToolSkill {
|
|
9621
9873
|
constructor({
|
|
9622
9874
|
baseDir = process.cwd(),
|
|
9623
|
-
relativeDirPath =
|
|
9875
|
+
relativeDirPath = join72(".roo", "skills"),
|
|
9624
9876
|
dirName,
|
|
9625
9877
|
frontmatter,
|
|
9626
9878
|
body,
|
|
@@ -9651,7 +9903,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
|
|
|
9651
9903
|
global: _global = false
|
|
9652
9904
|
} = {}) {
|
|
9653
9905
|
return {
|
|
9654
|
-
relativeDirPath:
|
|
9906
|
+
relativeDirPath: join72(".roo", "skills")
|
|
9655
9907
|
};
|
|
9656
9908
|
}
|
|
9657
9909
|
getFrontmatter() {
|
|
@@ -9738,13 +9990,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
|
|
|
9738
9990
|
});
|
|
9739
9991
|
const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
9740
9992
|
if (!result.success) {
|
|
9741
|
-
const skillDirPath =
|
|
9993
|
+
const skillDirPath = join72(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
|
|
9742
9994
|
throw new Error(
|
|
9743
|
-
`Invalid frontmatter in ${
|
|
9995
|
+
`Invalid frontmatter in ${join72(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
9744
9996
|
);
|
|
9745
9997
|
}
|
|
9746
9998
|
if (result.data.name !== loaded.dirName) {
|
|
9747
|
-
const skillFilePath =
|
|
9999
|
+
const skillFilePath = join72(
|
|
9748
10000
|
loaded.baseDir,
|
|
9749
10001
|
loaded.relativeDirPath,
|
|
9750
10002
|
loaded.dirName,
|
|
@@ -9785,14 +10037,14 @@ var RooSkill = class _RooSkill extends ToolSkill {
|
|
|
9785
10037
|
};
|
|
9786
10038
|
|
|
9787
10039
|
// src/features/skills/skills-utils.ts
|
|
9788
|
-
import { basename as basename4, join as
|
|
10040
|
+
import { basename as basename4, join as join73 } from "path";
|
|
9789
10041
|
async function getLocalSkillDirNames(baseDir) {
|
|
9790
|
-
const skillsDir =
|
|
10042
|
+
const skillsDir = join73(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
|
|
9791
10043
|
const names = /* @__PURE__ */ new Set();
|
|
9792
10044
|
if (!await directoryExists(skillsDir)) {
|
|
9793
10045
|
return names;
|
|
9794
10046
|
}
|
|
9795
|
-
const dirPaths = await findFilesByGlobs(
|
|
10047
|
+
const dirPaths = await findFilesByGlobs(join73(skillsDir, "*"), { type: "dir" });
|
|
9796
10048
|
for (const dirPath of dirPaths) {
|
|
9797
10049
|
const name = basename4(dirPath);
|
|
9798
10050
|
if (name === basename4(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
|
|
@@ -9820,7 +10072,7 @@ var skillsProcessorToolTargetTuple = [
|
|
|
9820
10072
|
"replit",
|
|
9821
10073
|
"roo"
|
|
9822
10074
|
];
|
|
9823
|
-
var SkillsProcessorToolTargetSchema =
|
|
10075
|
+
var SkillsProcessorToolTargetSchema = z37.enum(skillsProcessorToolTargetTuple);
|
|
9824
10076
|
var toolSkillFactories = /* @__PURE__ */ new Map([
|
|
9825
10077
|
[
|
|
9826
10078
|
"agentsmd",
|
|
@@ -10021,10 +10273,10 @@ var SkillsProcessor = class extends DirFeatureProcessor {
|
|
|
10021
10273
|
)
|
|
10022
10274
|
);
|
|
10023
10275
|
const localSkillNames = new Set(localDirNames);
|
|
10024
|
-
const curatedDirPath =
|
|
10276
|
+
const curatedDirPath = join74(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
|
|
10025
10277
|
let curatedSkills = [];
|
|
10026
10278
|
if (await directoryExists(curatedDirPath)) {
|
|
10027
|
-
const curatedDirPaths = await findFilesByGlobs(
|
|
10279
|
+
const curatedDirPaths = await findFilesByGlobs(join74(curatedDirPath, "*"), { type: "dir" });
|
|
10028
10280
|
const curatedDirNames = curatedDirPaths.map((path3) => basename5(path3));
|
|
10029
10281
|
const nonConflicting = curatedDirNames.filter((name) => {
|
|
10030
10282
|
if (localSkillNames.has(name)) {
|
|
@@ -10058,8 +10310,8 @@ var SkillsProcessor = class extends DirFeatureProcessor {
|
|
|
10058
10310
|
async loadToolDirs() {
|
|
10059
10311
|
const factory = this.getFactory(this.toolTarget);
|
|
10060
10312
|
const paths = factory.class.getSettablePaths({ global: this.global });
|
|
10061
|
-
const skillsDirPath =
|
|
10062
|
-
const dirPaths = await findFilesByGlobs(
|
|
10313
|
+
const skillsDirPath = join74(this.baseDir, paths.relativeDirPath);
|
|
10314
|
+
const dirPaths = await findFilesByGlobs(join74(skillsDirPath, "*"), { type: "dir" });
|
|
10063
10315
|
const dirNames = dirPaths.map((path3) => basename5(path3));
|
|
10064
10316
|
const toolSkills = await Promise.all(
|
|
10065
10317
|
dirNames.map(
|
|
@@ -10076,8 +10328,8 @@ var SkillsProcessor = class extends DirFeatureProcessor {
|
|
|
10076
10328
|
async loadToolDirsToDelete() {
|
|
10077
10329
|
const factory = this.getFactory(this.toolTarget);
|
|
10078
10330
|
const paths = factory.class.getSettablePaths({ global: this.global });
|
|
10079
|
-
const skillsDirPath =
|
|
10080
|
-
const dirPaths = await findFilesByGlobs(
|
|
10331
|
+
const skillsDirPath = join74(this.baseDir, paths.relativeDirPath);
|
|
10332
|
+
const dirPaths = await findFilesByGlobs(join74(skillsDirPath, "*"), { type: "dir" });
|
|
10081
10333
|
const dirNames = dirPaths.map((path3) => basename5(path3));
|
|
10082
10334
|
const toolSkills = dirNames.map(
|
|
10083
10335
|
(dirName) => factory.class.forDeletion({
|
|
@@ -10139,11 +10391,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
|
|
|
10139
10391
|
};
|
|
10140
10392
|
|
|
10141
10393
|
// src/features/subagents/agentsmd-subagent.ts
|
|
10142
|
-
import { join as
|
|
10394
|
+
import { join as join76 } from "path";
|
|
10143
10395
|
|
|
10144
10396
|
// src/features/subagents/simulated-subagent.ts
|
|
10145
|
-
import { basename as basename6, join as
|
|
10146
|
-
import { z as
|
|
10397
|
+
import { basename as basename6, join as join75 } from "path";
|
|
10398
|
+
import { z as z38 } from "zod/mini";
|
|
10147
10399
|
|
|
10148
10400
|
// src/features/subagents/tool-subagent.ts
|
|
10149
10401
|
var ToolSubagent = class extends ToolFile {
|
|
@@ -10195,9 +10447,9 @@ var ToolSubagent = class extends ToolFile {
|
|
|
10195
10447
|
};
|
|
10196
10448
|
|
|
10197
10449
|
// src/features/subagents/simulated-subagent.ts
|
|
10198
|
-
var SimulatedSubagentFrontmatterSchema =
|
|
10199
|
-
name:
|
|
10200
|
-
description:
|
|
10450
|
+
var SimulatedSubagentFrontmatterSchema = z38.object({
|
|
10451
|
+
name: z38.string(),
|
|
10452
|
+
description: z38.string()
|
|
10201
10453
|
});
|
|
10202
10454
|
var SimulatedSubagent = class extends ToolSubagent {
|
|
10203
10455
|
frontmatter;
|
|
@@ -10207,7 +10459,7 @@ var SimulatedSubagent = class extends ToolSubagent {
|
|
|
10207
10459
|
const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
10208
10460
|
if (!result.success) {
|
|
10209
10461
|
throw new Error(
|
|
10210
|
-
`Invalid frontmatter in ${
|
|
10462
|
+
`Invalid frontmatter in ${join75(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
10211
10463
|
);
|
|
10212
10464
|
}
|
|
10213
10465
|
}
|
|
@@ -10258,7 +10510,7 @@ var SimulatedSubagent = class extends ToolSubagent {
|
|
|
10258
10510
|
return {
|
|
10259
10511
|
success: false,
|
|
10260
10512
|
error: new Error(
|
|
10261
|
-
`Invalid frontmatter in ${
|
|
10513
|
+
`Invalid frontmatter in ${join75(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
10262
10514
|
)
|
|
10263
10515
|
};
|
|
10264
10516
|
}
|
|
@@ -10268,7 +10520,7 @@ var SimulatedSubagent = class extends ToolSubagent {
|
|
|
10268
10520
|
relativeFilePath,
|
|
10269
10521
|
validate = true
|
|
10270
10522
|
}) {
|
|
10271
|
-
const filePath =
|
|
10523
|
+
const filePath = join75(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
|
|
10272
10524
|
const fileContent = await readFileContent(filePath);
|
|
10273
10525
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
10274
10526
|
const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -10304,7 +10556,7 @@ var SimulatedSubagent = class extends ToolSubagent {
|
|
|
10304
10556
|
var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
|
|
10305
10557
|
static getSettablePaths() {
|
|
10306
10558
|
return {
|
|
10307
|
-
relativeDirPath:
|
|
10559
|
+
relativeDirPath: join76(".agents", "subagents")
|
|
10308
10560
|
};
|
|
10309
10561
|
}
|
|
10310
10562
|
static async fromFile(params) {
|
|
@@ -10327,11 +10579,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
|
|
|
10327
10579
|
};
|
|
10328
10580
|
|
|
10329
10581
|
// src/features/subagents/factorydroid-subagent.ts
|
|
10330
|
-
import { join as
|
|
10582
|
+
import { join as join77 } from "path";
|
|
10331
10583
|
var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
|
|
10332
10584
|
static getSettablePaths(_options) {
|
|
10333
10585
|
return {
|
|
10334
|
-
relativeDirPath:
|
|
10586
|
+
relativeDirPath: join77(".factory", "droids")
|
|
10335
10587
|
};
|
|
10336
10588
|
}
|
|
10337
10589
|
static async fromFile(params) {
|
|
@@ -10354,11 +10606,11 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
|
|
|
10354
10606
|
};
|
|
10355
10607
|
|
|
10356
10608
|
// src/features/subagents/geminicli-subagent.ts
|
|
10357
|
-
import { join as
|
|
10609
|
+
import { join as join78 } from "path";
|
|
10358
10610
|
var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
|
|
10359
10611
|
static getSettablePaths() {
|
|
10360
10612
|
return {
|
|
10361
|
-
relativeDirPath:
|
|
10613
|
+
relativeDirPath: join78(".gemini", "subagents")
|
|
10362
10614
|
};
|
|
10363
10615
|
}
|
|
10364
10616
|
static async fromFile(params) {
|
|
@@ -10381,11 +10633,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
|
|
|
10381
10633
|
};
|
|
10382
10634
|
|
|
10383
10635
|
// src/features/subagents/roo-subagent.ts
|
|
10384
|
-
import { join as
|
|
10636
|
+
import { join as join79 } from "path";
|
|
10385
10637
|
var RooSubagent = class _RooSubagent extends SimulatedSubagent {
|
|
10386
10638
|
static getSettablePaths() {
|
|
10387
10639
|
return {
|
|
10388
|
-
relativeDirPath:
|
|
10640
|
+
relativeDirPath: join79(".roo", "subagents")
|
|
10389
10641
|
};
|
|
10390
10642
|
}
|
|
10391
10643
|
static async fromFile(params) {
|
|
@@ -10408,20 +10660,20 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
|
|
|
10408
10660
|
};
|
|
10409
10661
|
|
|
10410
10662
|
// src/features/subagents/subagents-processor.ts
|
|
10411
|
-
import { basename as basename9, join as
|
|
10412
|
-
import { z as
|
|
10663
|
+
import { basename as basename9, join as join87 } from "path";
|
|
10664
|
+
import { z as z46 } from "zod/mini";
|
|
10413
10665
|
|
|
10414
10666
|
// src/features/subagents/claudecode-subagent.ts
|
|
10415
|
-
import { join as
|
|
10416
|
-
import { z as
|
|
10667
|
+
import { join as join81 } from "path";
|
|
10668
|
+
import { z as z40 } from "zod/mini";
|
|
10417
10669
|
|
|
10418
10670
|
// src/features/subagents/rulesync-subagent.ts
|
|
10419
|
-
import { basename as basename7, join as
|
|
10420
|
-
import { z as
|
|
10421
|
-
var RulesyncSubagentFrontmatterSchema =
|
|
10422
|
-
targets:
|
|
10423
|
-
name:
|
|
10424
|
-
description:
|
|
10671
|
+
import { basename as basename7, join as join80 } from "path";
|
|
10672
|
+
import { z as z39 } from "zod/mini";
|
|
10673
|
+
var RulesyncSubagentFrontmatterSchema = z39.looseObject({
|
|
10674
|
+
targets: z39._default(RulesyncTargetsSchema, ["*"]),
|
|
10675
|
+
name: z39.string(),
|
|
10676
|
+
description: z39.string()
|
|
10425
10677
|
});
|
|
10426
10678
|
var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
10427
10679
|
frontmatter;
|
|
@@ -10430,7 +10682,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
10430
10682
|
const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
10431
10683
|
if (!parseResult.success && rest.validate !== false) {
|
|
10432
10684
|
throw new Error(
|
|
10433
|
-
`Invalid frontmatter in ${
|
|
10685
|
+
`Invalid frontmatter in ${join80(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
|
|
10434
10686
|
);
|
|
10435
10687
|
}
|
|
10436
10688
|
const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
|
|
@@ -10463,7 +10715,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
10463
10715
|
return {
|
|
10464
10716
|
success: false,
|
|
10465
10717
|
error: new Error(
|
|
10466
|
-
`Invalid frontmatter in ${
|
|
10718
|
+
`Invalid frontmatter in ${join80(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
10467
10719
|
)
|
|
10468
10720
|
};
|
|
10469
10721
|
}
|
|
@@ -10471,7 +10723,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
10471
10723
|
static async fromFile({
|
|
10472
10724
|
relativeFilePath
|
|
10473
10725
|
}) {
|
|
10474
|
-
const filePath =
|
|
10726
|
+
const filePath = join80(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
|
|
10475
10727
|
const fileContent = await readFileContent(filePath);
|
|
10476
10728
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
10477
10729
|
const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -10490,13 +10742,13 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
10490
10742
|
};
|
|
10491
10743
|
|
|
10492
10744
|
// src/features/subagents/claudecode-subagent.ts
|
|
10493
|
-
var ClaudecodeSubagentFrontmatterSchema =
|
|
10494
|
-
name:
|
|
10495
|
-
description:
|
|
10496
|
-
model:
|
|
10497
|
-
tools:
|
|
10498
|
-
permissionMode:
|
|
10499
|
-
skills:
|
|
10745
|
+
var ClaudecodeSubagentFrontmatterSchema = z40.looseObject({
|
|
10746
|
+
name: z40.string(),
|
|
10747
|
+
description: z40.string(),
|
|
10748
|
+
model: z40.optional(z40.string()),
|
|
10749
|
+
tools: z40.optional(z40.union([z40.string(), z40.array(z40.string())])),
|
|
10750
|
+
permissionMode: z40.optional(z40.string()),
|
|
10751
|
+
skills: z40.optional(z40.union([z40.string(), z40.array(z40.string())]))
|
|
10500
10752
|
});
|
|
10501
10753
|
var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
10502
10754
|
frontmatter;
|
|
@@ -10506,7 +10758,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
10506
10758
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
10507
10759
|
if (!result.success) {
|
|
10508
10760
|
throw new Error(
|
|
10509
|
-
`Invalid frontmatter in ${
|
|
10761
|
+
`Invalid frontmatter in ${join81(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
10510
10762
|
);
|
|
10511
10763
|
}
|
|
10512
10764
|
}
|
|
@@ -10518,7 +10770,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
10518
10770
|
}
|
|
10519
10771
|
static getSettablePaths(_options = {}) {
|
|
10520
10772
|
return {
|
|
10521
|
-
relativeDirPath:
|
|
10773
|
+
relativeDirPath: join81(".claude", "agents")
|
|
10522
10774
|
};
|
|
10523
10775
|
}
|
|
10524
10776
|
getFrontmatter() {
|
|
@@ -10594,7 +10846,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
10594
10846
|
return {
|
|
10595
10847
|
success: false,
|
|
10596
10848
|
error: new Error(
|
|
10597
|
-
`Invalid frontmatter in ${
|
|
10849
|
+
`Invalid frontmatter in ${join81(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
10598
10850
|
)
|
|
10599
10851
|
};
|
|
10600
10852
|
}
|
|
@@ -10612,7 +10864,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
10612
10864
|
global = false
|
|
10613
10865
|
}) {
|
|
10614
10866
|
const paths = this.getSettablePaths({ global });
|
|
10615
|
-
const filePath =
|
|
10867
|
+
const filePath = join81(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
10616
10868
|
const fileContent = await readFileContent(filePath);
|
|
10617
10869
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
10618
10870
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -10647,16 +10899,16 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
10647
10899
|
};
|
|
10648
10900
|
|
|
10649
10901
|
// src/features/subagents/codexcli-subagent.ts
|
|
10650
|
-
import { join as
|
|
10902
|
+
import { join as join82 } from "path";
|
|
10651
10903
|
import * as smolToml2 from "smol-toml";
|
|
10652
|
-
import { z as
|
|
10653
|
-
var CodexCliSubagentTomlSchema =
|
|
10654
|
-
name:
|
|
10655
|
-
description:
|
|
10656
|
-
developer_instructions:
|
|
10657
|
-
model:
|
|
10658
|
-
model_reasoning_effort:
|
|
10659
|
-
sandbox_mode:
|
|
10904
|
+
import { z as z41 } from "zod/mini";
|
|
10905
|
+
var CodexCliSubagentTomlSchema = z41.looseObject({
|
|
10906
|
+
name: z41.string(),
|
|
10907
|
+
description: z41.optional(z41.string()),
|
|
10908
|
+
developer_instructions: z41.optional(z41.string()),
|
|
10909
|
+
model: z41.optional(z41.string()),
|
|
10910
|
+
model_reasoning_effort: z41.optional(z41.string()),
|
|
10911
|
+
sandbox_mode: z41.optional(z41.string())
|
|
10660
10912
|
});
|
|
10661
10913
|
var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
10662
10914
|
body;
|
|
@@ -10667,7 +10919,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
|
10667
10919
|
CodexCliSubagentTomlSchema.parse(parsed);
|
|
10668
10920
|
} catch (error) {
|
|
10669
10921
|
throw new Error(
|
|
10670
|
-
`Invalid TOML in ${
|
|
10922
|
+
`Invalid TOML in ${join82(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
|
|
10671
10923
|
{ cause: error }
|
|
10672
10924
|
);
|
|
10673
10925
|
}
|
|
@@ -10679,7 +10931,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
|
10679
10931
|
}
|
|
10680
10932
|
static getSettablePaths(_options = {}) {
|
|
10681
10933
|
return {
|
|
10682
|
-
relativeDirPath:
|
|
10934
|
+
relativeDirPath: join82(".codex", "agents")
|
|
10683
10935
|
};
|
|
10684
10936
|
}
|
|
10685
10937
|
getBody() {
|
|
@@ -10691,7 +10943,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
|
10691
10943
|
parsed = CodexCliSubagentTomlSchema.parse(smolToml2.parse(this.body));
|
|
10692
10944
|
} catch (error) {
|
|
10693
10945
|
throw new Error(
|
|
10694
|
-
`Failed to parse TOML in ${
|
|
10946
|
+
`Failed to parse TOML in ${join82(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
|
|
10695
10947
|
{ cause: error }
|
|
10696
10948
|
);
|
|
10697
10949
|
}
|
|
@@ -10772,7 +11024,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
|
10772
11024
|
global = false
|
|
10773
11025
|
}) {
|
|
10774
11026
|
const paths = this.getSettablePaths({ global });
|
|
10775
|
-
const filePath =
|
|
11027
|
+
const filePath = join82(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
10776
11028
|
const fileContent = await readFileContent(filePath);
|
|
10777
11029
|
const subagent = new _CodexCliSubagent({
|
|
10778
11030
|
baseDir,
|
|
@@ -10810,13 +11062,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
|
10810
11062
|
};
|
|
10811
11063
|
|
|
10812
11064
|
// src/features/subagents/copilot-subagent.ts
|
|
10813
|
-
import { join as
|
|
10814
|
-
import { z as
|
|
11065
|
+
import { join as join83 } from "path";
|
|
11066
|
+
import { z as z42 } from "zod/mini";
|
|
10815
11067
|
var REQUIRED_TOOL = "agent/runSubagent";
|
|
10816
|
-
var CopilotSubagentFrontmatterSchema =
|
|
10817
|
-
name:
|
|
10818
|
-
description:
|
|
10819
|
-
tools:
|
|
11068
|
+
var CopilotSubagentFrontmatterSchema = z42.looseObject({
|
|
11069
|
+
name: z42.string(),
|
|
11070
|
+
description: z42.string(),
|
|
11071
|
+
tools: z42.optional(z42.union([z42.string(), z42.array(z42.string())]))
|
|
10820
11072
|
});
|
|
10821
11073
|
var normalizeTools = (tools) => {
|
|
10822
11074
|
if (!tools) {
|
|
@@ -10836,7 +11088,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
10836
11088
|
const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
10837
11089
|
if (!result.success) {
|
|
10838
11090
|
throw new Error(
|
|
10839
|
-
`Invalid frontmatter in ${
|
|
11091
|
+
`Invalid frontmatter in ${join83(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
10840
11092
|
);
|
|
10841
11093
|
}
|
|
10842
11094
|
}
|
|
@@ -10848,7 +11100,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
10848
11100
|
}
|
|
10849
11101
|
static getSettablePaths(_options = {}) {
|
|
10850
11102
|
return {
|
|
10851
|
-
relativeDirPath:
|
|
11103
|
+
relativeDirPath: join83(".github", "agents")
|
|
10852
11104
|
};
|
|
10853
11105
|
}
|
|
10854
11106
|
getFrontmatter() {
|
|
@@ -10922,7 +11174,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
10922
11174
|
return {
|
|
10923
11175
|
success: false,
|
|
10924
11176
|
error: new Error(
|
|
10925
|
-
`Invalid frontmatter in ${
|
|
11177
|
+
`Invalid frontmatter in ${join83(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
10926
11178
|
)
|
|
10927
11179
|
};
|
|
10928
11180
|
}
|
|
@@ -10940,7 +11192,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
10940
11192
|
global = false
|
|
10941
11193
|
}) {
|
|
10942
11194
|
const paths = this.getSettablePaths({ global });
|
|
10943
|
-
const filePath =
|
|
11195
|
+
const filePath = join83(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
10944
11196
|
const fileContent = await readFileContent(filePath);
|
|
10945
11197
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
10946
11198
|
const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -10976,11 +11228,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
10976
11228
|
};
|
|
10977
11229
|
|
|
10978
11230
|
// src/features/subagents/cursor-subagent.ts
|
|
10979
|
-
import { join as
|
|
10980
|
-
import { z as
|
|
10981
|
-
var CursorSubagentFrontmatterSchema =
|
|
10982
|
-
name:
|
|
10983
|
-
description:
|
|
11231
|
+
import { join as join84 } from "path";
|
|
11232
|
+
import { z as z43 } from "zod/mini";
|
|
11233
|
+
var CursorSubagentFrontmatterSchema = z43.looseObject({
|
|
11234
|
+
name: z43.string(),
|
|
11235
|
+
description: z43.string()
|
|
10984
11236
|
});
|
|
10985
11237
|
var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
10986
11238
|
frontmatter;
|
|
@@ -10990,7 +11242,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
|
10990
11242
|
const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
10991
11243
|
if (!result.success) {
|
|
10992
11244
|
throw new Error(
|
|
10993
|
-
`Invalid frontmatter in ${
|
|
11245
|
+
`Invalid frontmatter in ${join84(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
10994
11246
|
);
|
|
10995
11247
|
}
|
|
10996
11248
|
}
|
|
@@ -11002,7 +11254,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
|
11002
11254
|
}
|
|
11003
11255
|
static getSettablePaths(_options = {}) {
|
|
11004
11256
|
return {
|
|
11005
|
-
relativeDirPath:
|
|
11257
|
+
relativeDirPath: join84(".cursor", "agents")
|
|
11006
11258
|
};
|
|
11007
11259
|
}
|
|
11008
11260
|
getFrontmatter() {
|
|
@@ -11069,7 +11321,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
|
11069
11321
|
return {
|
|
11070
11322
|
success: false,
|
|
11071
11323
|
error: new Error(
|
|
11072
|
-
`Invalid frontmatter in ${
|
|
11324
|
+
`Invalid frontmatter in ${join84(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
11073
11325
|
)
|
|
11074
11326
|
};
|
|
11075
11327
|
}
|
|
@@ -11087,7 +11339,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
|
11087
11339
|
global = false
|
|
11088
11340
|
}) {
|
|
11089
11341
|
const paths = this.getSettablePaths({ global });
|
|
11090
|
-
const filePath =
|
|
11342
|
+
const filePath = join84(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
11091
11343
|
const fileContent = await readFileContent(filePath);
|
|
11092
11344
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
11093
11345
|
const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -11123,23 +11375,23 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
|
11123
11375
|
};
|
|
11124
11376
|
|
|
11125
11377
|
// src/features/subagents/kiro-subagent.ts
|
|
11126
|
-
import { join as
|
|
11127
|
-
import { z as
|
|
11128
|
-
var KiroCliSubagentJsonSchema =
|
|
11129
|
-
name:
|
|
11130
|
-
description:
|
|
11131
|
-
prompt:
|
|
11132
|
-
tools:
|
|
11133
|
-
toolAliases:
|
|
11134
|
-
toolSettings:
|
|
11135
|
-
toolSchema:
|
|
11136
|
-
hooks:
|
|
11137
|
-
model:
|
|
11138
|
-
mcpServers:
|
|
11139
|
-
useLegacyMcpJson:
|
|
11140
|
-
resources:
|
|
11141
|
-
allowedTools:
|
|
11142
|
-
includeMcpJson:
|
|
11378
|
+
import { join as join85 } from "path";
|
|
11379
|
+
import { z as z44 } from "zod/mini";
|
|
11380
|
+
var KiroCliSubagentJsonSchema = z44.looseObject({
|
|
11381
|
+
name: z44.string(),
|
|
11382
|
+
description: z44.optional(z44.nullable(z44.string())),
|
|
11383
|
+
prompt: z44.optional(z44.nullable(z44.string())),
|
|
11384
|
+
tools: z44.optional(z44.nullable(z44.array(z44.string()))),
|
|
11385
|
+
toolAliases: z44.optional(z44.nullable(z44.record(z44.string(), z44.string()))),
|
|
11386
|
+
toolSettings: z44.optional(z44.nullable(z44.unknown())),
|
|
11387
|
+
toolSchema: z44.optional(z44.nullable(z44.unknown())),
|
|
11388
|
+
hooks: z44.optional(z44.nullable(z44.record(z44.string(), z44.array(z44.unknown())))),
|
|
11389
|
+
model: z44.optional(z44.nullable(z44.string())),
|
|
11390
|
+
mcpServers: z44.optional(z44.nullable(z44.record(z44.string(), z44.unknown()))),
|
|
11391
|
+
useLegacyMcpJson: z44.optional(z44.nullable(z44.boolean())),
|
|
11392
|
+
resources: z44.optional(z44.nullable(z44.array(z44.string()))),
|
|
11393
|
+
allowedTools: z44.optional(z44.nullable(z44.array(z44.string()))),
|
|
11394
|
+
includeMcpJson: z44.optional(z44.nullable(z44.boolean()))
|
|
11143
11395
|
});
|
|
11144
11396
|
var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
11145
11397
|
body;
|
|
@@ -11150,7 +11402,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
|
11150
11402
|
KiroCliSubagentJsonSchema.parse(parsed);
|
|
11151
11403
|
} catch (error) {
|
|
11152
11404
|
throw new Error(
|
|
11153
|
-
`Invalid JSON in ${
|
|
11405
|
+
`Invalid JSON in ${join85(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
|
|
11154
11406
|
{ cause: error }
|
|
11155
11407
|
);
|
|
11156
11408
|
}
|
|
@@ -11162,7 +11414,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
|
11162
11414
|
}
|
|
11163
11415
|
static getSettablePaths(_options = {}) {
|
|
11164
11416
|
return {
|
|
11165
|
-
relativeDirPath:
|
|
11417
|
+
relativeDirPath: join85(".kiro", "agents")
|
|
11166
11418
|
};
|
|
11167
11419
|
}
|
|
11168
11420
|
getBody() {
|
|
@@ -11174,7 +11426,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
|
11174
11426
|
parsed = JSON.parse(this.body);
|
|
11175
11427
|
} catch (error) {
|
|
11176
11428
|
throw new Error(
|
|
11177
|
-
`Failed to parse JSON in ${
|
|
11429
|
+
`Failed to parse JSON in ${join85(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
|
|
11178
11430
|
{ cause: error }
|
|
11179
11431
|
);
|
|
11180
11432
|
}
|
|
@@ -11255,7 +11507,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
|
11255
11507
|
global = false
|
|
11256
11508
|
}) {
|
|
11257
11509
|
const paths = this.getSettablePaths({ global });
|
|
11258
|
-
const filePath =
|
|
11510
|
+
const filePath = join85(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
11259
11511
|
const fileContent = await readFileContent(filePath);
|
|
11260
11512
|
const subagent = new _KiroSubagent({
|
|
11261
11513
|
baseDir,
|
|
@@ -11293,12 +11545,12 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
|
11293
11545
|
};
|
|
11294
11546
|
|
|
11295
11547
|
// src/features/subagents/opencode-subagent.ts
|
|
11296
|
-
import { basename as basename8, join as
|
|
11297
|
-
import { z as
|
|
11298
|
-
var OpenCodeSubagentFrontmatterSchema =
|
|
11299
|
-
description:
|
|
11300
|
-
mode:
|
|
11301
|
-
name:
|
|
11548
|
+
import { basename as basename8, join as join86 } from "path";
|
|
11549
|
+
import { z as z45 } from "zod/mini";
|
|
11550
|
+
var OpenCodeSubagentFrontmatterSchema = z45.looseObject({
|
|
11551
|
+
description: z45.string(),
|
|
11552
|
+
mode: z45._default(z45.string(), "subagent"),
|
|
11553
|
+
name: z45.optional(z45.string())
|
|
11302
11554
|
});
|
|
11303
11555
|
var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
|
|
11304
11556
|
frontmatter;
|
|
@@ -11308,7 +11560,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
|
|
|
11308
11560
|
const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
11309
11561
|
if (!result.success) {
|
|
11310
11562
|
throw new Error(
|
|
11311
|
-
`Invalid frontmatter in ${
|
|
11563
|
+
`Invalid frontmatter in ${join86(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
11312
11564
|
);
|
|
11313
11565
|
}
|
|
11314
11566
|
}
|
|
@@ -11322,7 +11574,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
|
|
|
11322
11574
|
global = false
|
|
11323
11575
|
} = {}) {
|
|
11324
11576
|
return {
|
|
11325
|
-
relativeDirPath: global ?
|
|
11577
|
+
relativeDirPath: global ? join86(".config", "opencode", "agent") : join86(".opencode", "agent")
|
|
11326
11578
|
};
|
|
11327
11579
|
}
|
|
11328
11580
|
getFrontmatter() {
|
|
@@ -11388,7 +11640,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
|
|
|
11388
11640
|
return {
|
|
11389
11641
|
success: false,
|
|
11390
11642
|
error: new Error(
|
|
11391
|
-
`Invalid frontmatter in ${
|
|
11643
|
+
`Invalid frontmatter in ${join86(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
11392
11644
|
)
|
|
11393
11645
|
};
|
|
11394
11646
|
}
|
|
@@ -11405,7 +11657,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
|
|
|
11405
11657
|
global = false
|
|
11406
11658
|
}) {
|
|
11407
11659
|
const paths = this.getSettablePaths({ global });
|
|
11408
|
-
const filePath =
|
|
11660
|
+
const filePath = join86(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
11409
11661
|
const fileContent = await readFileContent(filePath);
|
|
11410
11662
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
11411
11663
|
const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -11454,7 +11706,7 @@ var subagentsProcessorToolTargetTuple = [
|
|
|
11454
11706
|
"opencode",
|
|
11455
11707
|
"roo"
|
|
11456
11708
|
];
|
|
11457
|
-
var SubagentsProcessorToolTargetSchema =
|
|
11709
|
+
var SubagentsProcessorToolTargetSchema = z46.enum(subagentsProcessorToolTargetTuple);
|
|
11458
11710
|
var toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
11459
11711
|
[
|
|
11460
11712
|
"agentsmd",
|
|
@@ -11616,7 +11868,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
11616
11868
|
* Load and parse rulesync subagent files from .rulesync/subagents/ directory
|
|
11617
11869
|
*/
|
|
11618
11870
|
async loadRulesyncFiles() {
|
|
11619
|
-
const subagentsDir =
|
|
11871
|
+
const subagentsDir = join87(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
|
|
11620
11872
|
const dirExists = await directoryExists(subagentsDir);
|
|
11621
11873
|
if (!dirExists) {
|
|
11622
11874
|
logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
|
|
@@ -11631,7 +11883,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
11631
11883
|
logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
|
|
11632
11884
|
const rulesyncSubagents = [];
|
|
11633
11885
|
for (const mdFile of mdFiles) {
|
|
11634
|
-
const filepath =
|
|
11886
|
+
const filepath = join87(subagentsDir, mdFile);
|
|
11635
11887
|
try {
|
|
11636
11888
|
const rulesyncSubagent = await RulesyncSubagent.fromFile({
|
|
11637
11889
|
relativeFilePath: mdFile,
|
|
@@ -11661,7 +11913,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
11661
11913
|
const factory = this.getFactory(this.toolTarget);
|
|
11662
11914
|
const paths = factory.class.getSettablePaths({ global: this.global });
|
|
11663
11915
|
const subagentFilePaths = await findFilesByGlobs(
|
|
11664
|
-
|
|
11916
|
+
join87(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
|
|
11665
11917
|
);
|
|
11666
11918
|
if (forDeletion) {
|
|
11667
11919
|
const toolSubagents2 = subagentFilePaths.map(
|
|
@@ -11726,49 +11978,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
11726
11978
|
};
|
|
11727
11979
|
|
|
11728
11980
|
// src/features/rules/agentsmd-rule.ts
|
|
11729
|
-
import { join as
|
|
11981
|
+
import { join as join90 } from "path";
|
|
11730
11982
|
|
|
11731
11983
|
// src/features/rules/tool-rule.ts
|
|
11732
|
-
import { join as
|
|
11984
|
+
import { join as join89 } from "path";
|
|
11733
11985
|
|
|
11734
11986
|
// src/features/rules/rulesync-rule.ts
|
|
11735
|
-
import { join as
|
|
11736
|
-
import { z as
|
|
11737
|
-
var RulesyncRuleFrontmatterSchema =
|
|
11738
|
-
root:
|
|
11739
|
-
localRoot:
|
|
11740
|
-
targets:
|
|
11741
|
-
description:
|
|
11742
|
-
globs:
|
|
11743
|
-
agentsmd:
|
|
11744
|
-
|
|
11987
|
+
import { join as join88 } from "path";
|
|
11988
|
+
import { z as z47 } from "zod/mini";
|
|
11989
|
+
var RulesyncRuleFrontmatterSchema = z47.object({
|
|
11990
|
+
root: z47.optional(z47.boolean()),
|
|
11991
|
+
localRoot: z47.optional(z47.boolean()),
|
|
11992
|
+
targets: z47._default(RulesyncTargetsSchema, ["*"]),
|
|
11993
|
+
description: z47.optional(z47.string()),
|
|
11994
|
+
globs: z47.optional(z47.array(z47.string())),
|
|
11995
|
+
agentsmd: z47.optional(
|
|
11996
|
+
z47.object({
|
|
11745
11997
|
// @example "path/to/subproject"
|
|
11746
|
-
subprojectPath:
|
|
11998
|
+
subprojectPath: z47.optional(z47.string())
|
|
11747
11999
|
})
|
|
11748
12000
|
),
|
|
11749
|
-
claudecode:
|
|
11750
|
-
|
|
12001
|
+
claudecode: z47.optional(
|
|
12002
|
+
z47.object({
|
|
11751
12003
|
// Glob patterns for conditional rules (takes precedence over globs)
|
|
11752
12004
|
// @example ["src/**/*.ts", "tests/**/*.test.ts"]
|
|
11753
|
-
paths:
|
|
12005
|
+
paths: z47.optional(z47.array(z47.string()))
|
|
11754
12006
|
})
|
|
11755
12007
|
),
|
|
11756
|
-
cursor:
|
|
11757
|
-
|
|
11758
|
-
alwaysApply:
|
|
11759
|
-
description:
|
|
11760
|
-
globs:
|
|
12008
|
+
cursor: z47.optional(
|
|
12009
|
+
z47.object({
|
|
12010
|
+
alwaysApply: z47.optional(z47.boolean()),
|
|
12011
|
+
description: z47.optional(z47.string()),
|
|
12012
|
+
globs: z47.optional(z47.array(z47.string()))
|
|
11761
12013
|
})
|
|
11762
12014
|
),
|
|
11763
|
-
copilot:
|
|
11764
|
-
|
|
11765
|
-
excludeAgent:
|
|
12015
|
+
copilot: z47.optional(
|
|
12016
|
+
z47.object({
|
|
12017
|
+
excludeAgent: z47.optional(z47.union([z47.literal("code-review"), z47.literal("coding-agent")]))
|
|
11766
12018
|
})
|
|
11767
12019
|
),
|
|
11768
|
-
antigravity:
|
|
11769
|
-
|
|
11770
|
-
trigger:
|
|
11771
|
-
globs:
|
|
12020
|
+
antigravity: z47.optional(
|
|
12021
|
+
z47.looseObject({
|
|
12022
|
+
trigger: z47.optional(z47.string()),
|
|
12023
|
+
globs: z47.optional(z47.array(z47.string()))
|
|
11772
12024
|
})
|
|
11773
12025
|
)
|
|
11774
12026
|
});
|
|
@@ -11779,7 +12031,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
11779
12031
|
const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
|
|
11780
12032
|
if (!parseResult.success && rest.validate !== false) {
|
|
11781
12033
|
throw new Error(
|
|
11782
|
-
`Invalid frontmatter in ${
|
|
12034
|
+
`Invalid frontmatter in ${join88(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
|
|
11783
12035
|
);
|
|
11784
12036
|
}
|
|
11785
12037
|
const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
|
|
@@ -11814,7 +12066,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
11814
12066
|
return {
|
|
11815
12067
|
success: false,
|
|
11816
12068
|
error: new Error(
|
|
11817
|
-
`Invalid frontmatter in ${
|
|
12069
|
+
`Invalid frontmatter in ${join88(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
11818
12070
|
)
|
|
11819
12071
|
};
|
|
11820
12072
|
}
|
|
@@ -11823,7 +12075,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
11823
12075
|
relativeFilePath,
|
|
11824
12076
|
validate = true
|
|
11825
12077
|
}) {
|
|
11826
|
-
const filePath =
|
|
12078
|
+
const filePath = join88(
|
|
11827
12079
|
process.cwd(),
|
|
11828
12080
|
this.getSettablePaths().recommended.relativeDirPath,
|
|
11829
12081
|
relativeFilePath
|
|
@@ -11925,7 +12177,7 @@ var ToolRule = class extends ToolFile {
|
|
|
11925
12177
|
rulesyncRule,
|
|
11926
12178
|
validate = true,
|
|
11927
12179
|
rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
|
|
11928
|
-
nonRootPath = { relativeDirPath:
|
|
12180
|
+
nonRootPath = { relativeDirPath: join89(".agents", "memories") }
|
|
11929
12181
|
}) {
|
|
11930
12182
|
const params = this.buildToolRuleParamsDefault({
|
|
11931
12183
|
baseDir,
|
|
@@ -11936,7 +12188,7 @@ var ToolRule = class extends ToolFile {
|
|
|
11936
12188
|
});
|
|
11937
12189
|
const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
|
|
11938
12190
|
if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
|
|
11939
|
-
params.relativeDirPath =
|
|
12191
|
+
params.relativeDirPath = join89(rulesyncFrontmatter.agentsmd.subprojectPath);
|
|
11940
12192
|
params.relativeFilePath = "AGENTS.md";
|
|
11941
12193
|
}
|
|
11942
12194
|
return params;
|
|
@@ -11985,7 +12237,7 @@ var ToolRule = class extends ToolFile {
|
|
|
11985
12237
|
}
|
|
11986
12238
|
};
|
|
11987
12239
|
function buildToolPath(toolDir, subDir, excludeToolDir) {
|
|
11988
|
-
return excludeToolDir ? subDir :
|
|
12240
|
+
return excludeToolDir ? subDir : join89(toolDir, subDir);
|
|
11989
12241
|
}
|
|
11990
12242
|
|
|
11991
12243
|
// src/features/rules/agentsmd-rule.ts
|
|
@@ -12014,8 +12266,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
12014
12266
|
validate = true
|
|
12015
12267
|
}) {
|
|
12016
12268
|
const isRoot = relativeFilePath === "AGENTS.md";
|
|
12017
|
-
const relativePath = isRoot ? "AGENTS.md" :
|
|
12018
|
-
const fileContent = await readFileContent(
|
|
12269
|
+
const relativePath = isRoot ? "AGENTS.md" : join90(".agents", "memories", relativeFilePath);
|
|
12270
|
+
const fileContent = await readFileContent(join90(baseDir, relativePath));
|
|
12019
12271
|
return new _AgentsMdRule({
|
|
12020
12272
|
baseDir,
|
|
12021
12273
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
|
|
@@ -12070,21 +12322,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
12070
12322
|
};
|
|
12071
12323
|
|
|
12072
12324
|
// src/features/rules/antigravity-rule.ts
|
|
12073
|
-
import { join as
|
|
12074
|
-
import { z as
|
|
12075
|
-
var AntigravityRuleFrontmatterSchema =
|
|
12076
|
-
trigger:
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12325
|
+
import { join as join91 } from "path";
|
|
12326
|
+
import { z as z48 } from "zod/mini";
|
|
12327
|
+
var AntigravityRuleFrontmatterSchema = z48.looseObject({
|
|
12328
|
+
trigger: z48.optional(
|
|
12329
|
+
z48.union([
|
|
12330
|
+
z48.literal("always_on"),
|
|
12331
|
+
z48.literal("glob"),
|
|
12332
|
+
z48.literal("manual"),
|
|
12333
|
+
z48.literal("model_decision"),
|
|
12334
|
+
z48.string()
|
|
12083
12335
|
// accepts any string for forward compatibility
|
|
12084
12336
|
])
|
|
12085
12337
|
),
|
|
12086
|
-
globs:
|
|
12087
|
-
description:
|
|
12338
|
+
globs: z48.optional(z48.string()),
|
|
12339
|
+
description: z48.optional(z48.string())
|
|
12088
12340
|
});
|
|
12089
12341
|
function parseGlobsString(globs) {
|
|
12090
12342
|
if (!globs) {
|
|
@@ -12229,7 +12481,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
|
|
|
12229
12481
|
const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
|
|
12230
12482
|
if (!result.success) {
|
|
12231
12483
|
throw new Error(
|
|
12232
|
-
`Invalid frontmatter in ${
|
|
12484
|
+
`Invalid frontmatter in ${join91(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
12233
12485
|
);
|
|
12234
12486
|
}
|
|
12235
12487
|
}
|
|
@@ -12253,7 +12505,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
|
|
|
12253
12505
|
relativeFilePath,
|
|
12254
12506
|
validate = true
|
|
12255
12507
|
}) {
|
|
12256
|
-
const filePath =
|
|
12508
|
+
const filePath = join91(
|
|
12257
12509
|
baseDir,
|
|
12258
12510
|
this.getSettablePaths().nonRoot.relativeDirPath,
|
|
12259
12511
|
relativeFilePath
|
|
@@ -12394,7 +12646,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
|
|
|
12394
12646
|
};
|
|
12395
12647
|
|
|
12396
12648
|
// src/features/rules/augmentcode-legacy-rule.ts
|
|
12397
|
-
import { join as
|
|
12649
|
+
import { join as join92 } from "path";
|
|
12398
12650
|
var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
|
|
12399
12651
|
toRulesyncRule() {
|
|
12400
12652
|
const rulesyncFrontmatter = {
|
|
@@ -12455,8 +12707,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
|
|
|
12455
12707
|
}) {
|
|
12456
12708
|
const settablePaths = this.getSettablePaths();
|
|
12457
12709
|
const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
|
|
12458
|
-
const relativePath = isRoot ? settablePaths.root.relativeFilePath :
|
|
12459
|
-
const fileContent = await readFileContent(
|
|
12710
|
+
const relativePath = isRoot ? settablePaths.root.relativeFilePath : join92(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
|
|
12711
|
+
const fileContent = await readFileContent(join92(baseDir, relativePath));
|
|
12460
12712
|
return new _AugmentcodeLegacyRule({
|
|
12461
12713
|
baseDir,
|
|
12462
12714
|
relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
|
|
@@ -12485,7 +12737,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
|
|
|
12485
12737
|
};
|
|
12486
12738
|
|
|
12487
12739
|
// src/features/rules/augmentcode-rule.ts
|
|
12488
|
-
import { join as
|
|
12740
|
+
import { join as join93 } from "path";
|
|
12489
12741
|
var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
|
|
12490
12742
|
toRulesyncRule() {
|
|
12491
12743
|
return this.toRulesyncRuleDefault();
|
|
@@ -12516,7 +12768,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
|
|
|
12516
12768
|
relativeFilePath,
|
|
12517
12769
|
validate = true
|
|
12518
12770
|
}) {
|
|
12519
|
-
const filePath =
|
|
12771
|
+
const filePath = join93(
|
|
12520
12772
|
baseDir,
|
|
12521
12773
|
this.getSettablePaths().nonRoot.relativeDirPath,
|
|
12522
12774
|
relativeFilePath
|
|
@@ -12556,7 +12808,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
|
|
|
12556
12808
|
};
|
|
12557
12809
|
|
|
12558
12810
|
// src/features/rules/claudecode-legacy-rule.ts
|
|
12559
|
-
import { join as
|
|
12811
|
+
import { join as join94 } from "path";
|
|
12560
12812
|
var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
12561
12813
|
static getSettablePaths({
|
|
12562
12814
|
global,
|
|
@@ -12591,7 +12843,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
12591
12843
|
if (isRoot) {
|
|
12592
12844
|
const relativePath2 = paths.root.relativeFilePath;
|
|
12593
12845
|
const fileContent2 = await readFileContent(
|
|
12594
|
-
|
|
12846
|
+
join94(baseDir, paths.root.relativeDirPath, relativePath2)
|
|
12595
12847
|
);
|
|
12596
12848
|
return new _ClaudecodeLegacyRule({
|
|
12597
12849
|
baseDir,
|
|
@@ -12605,8 +12857,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
12605
12857
|
if (!paths.nonRoot) {
|
|
12606
12858
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
12607
12859
|
}
|
|
12608
|
-
const relativePath =
|
|
12609
|
-
const fileContent = await readFileContent(
|
|
12860
|
+
const relativePath = join94(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
12861
|
+
const fileContent = await readFileContent(join94(baseDir, relativePath));
|
|
12610
12862
|
return new _ClaudecodeLegacyRule({
|
|
12611
12863
|
baseDir,
|
|
12612
12864
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -12665,10 +12917,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
12665
12917
|
};
|
|
12666
12918
|
|
|
12667
12919
|
// src/features/rules/claudecode-rule.ts
|
|
12668
|
-
import { join as
|
|
12669
|
-
import { z as
|
|
12670
|
-
var ClaudecodeRuleFrontmatterSchema =
|
|
12671
|
-
paths:
|
|
12920
|
+
import { join as join95 } from "path";
|
|
12921
|
+
import { z as z49 } from "zod/mini";
|
|
12922
|
+
var ClaudecodeRuleFrontmatterSchema = z49.object({
|
|
12923
|
+
paths: z49.optional(z49.array(z49.string()))
|
|
12672
12924
|
});
|
|
12673
12925
|
var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
12674
12926
|
frontmatter;
|
|
@@ -12700,7 +12952,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
12700
12952
|
const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
|
|
12701
12953
|
if (!result.success) {
|
|
12702
12954
|
throw new Error(
|
|
12703
|
-
`Invalid frontmatter in ${
|
|
12955
|
+
`Invalid frontmatter in ${join95(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
12704
12956
|
);
|
|
12705
12957
|
}
|
|
12706
12958
|
}
|
|
@@ -12728,7 +12980,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
12728
12980
|
const isRoot = relativeFilePath === paths.root.relativeFilePath;
|
|
12729
12981
|
if (isRoot) {
|
|
12730
12982
|
const fileContent2 = await readFileContent(
|
|
12731
|
-
|
|
12983
|
+
join95(baseDir, paths.root.relativeDirPath, paths.root.relativeFilePath)
|
|
12732
12984
|
);
|
|
12733
12985
|
return new _ClaudecodeRule({
|
|
12734
12986
|
baseDir,
|
|
@@ -12743,16 +12995,16 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
12743
12995
|
if (!paths.nonRoot) {
|
|
12744
12996
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
12745
12997
|
}
|
|
12746
|
-
const relativePath =
|
|
12747
|
-
const fileContent = await readFileContent(
|
|
12998
|
+
const relativePath = join95(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
12999
|
+
const fileContent = await readFileContent(join95(baseDir, relativePath));
|
|
12748
13000
|
const { frontmatter, body: content } = parseFrontmatter(
|
|
12749
13001
|
fileContent,
|
|
12750
|
-
|
|
13002
|
+
join95(baseDir, relativePath)
|
|
12751
13003
|
);
|
|
12752
13004
|
const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
|
|
12753
13005
|
if (!result.success) {
|
|
12754
13006
|
throw new Error(
|
|
12755
|
-
`Invalid frontmatter in ${
|
|
13007
|
+
`Invalid frontmatter in ${join95(baseDir, relativePath)}: ${formatError(result.error)}`
|
|
12756
13008
|
);
|
|
12757
13009
|
}
|
|
12758
13010
|
return new _ClaudecodeRule({
|
|
@@ -12859,7 +13111,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
12859
13111
|
return {
|
|
12860
13112
|
success: false,
|
|
12861
13113
|
error: new Error(
|
|
12862
|
-
`Invalid frontmatter in ${
|
|
13114
|
+
`Invalid frontmatter in ${join95(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
12863
13115
|
)
|
|
12864
13116
|
};
|
|
12865
13117
|
}
|
|
@@ -12879,10 +13131,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
12879
13131
|
};
|
|
12880
13132
|
|
|
12881
13133
|
// src/features/rules/cline-rule.ts
|
|
12882
|
-
import { join as
|
|
12883
|
-
import { z as
|
|
12884
|
-
var ClineRuleFrontmatterSchema =
|
|
12885
|
-
description:
|
|
13134
|
+
import { join as join96 } from "path";
|
|
13135
|
+
import { z as z50 } from "zod/mini";
|
|
13136
|
+
var ClineRuleFrontmatterSchema = z50.object({
|
|
13137
|
+
description: z50.string()
|
|
12886
13138
|
});
|
|
12887
13139
|
var ClineRule = class _ClineRule extends ToolRule {
|
|
12888
13140
|
static getSettablePaths(_options = {}) {
|
|
@@ -12925,7 +13177,7 @@ var ClineRule = class _ClineRule extends ToolRule {
|
|
|
12925
13177
|
validate = true
|
|
12926
13178
|
}) {
|
|
12927
13179
|
const fileContent = await readFileContent(
|
|
12928
|
-
|
|
13180
|
+
join96(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
12929
13181
|
);
|
|
12930
13182
|
return new _ClineRule({
|
|
12931
13183
|
baseDir,
|
|
@@ -12951,7 +13203,7 @@ var ClineRule = class _ClineRule extends ToolRule {
|
|
|
12951
13203
|
};
|
|
12952
13204
|
|
|
12953
13205
|
// src/features/rules/codexcli-rule.ts
|
|
12954
|
-
import { join as
|
|
13206
|
+
import { join as join97 } from "path";
|
|
12955
13207
|
var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
12956
13208
|
static getSettablePaths({
|
|
12957
13209
|
global,
|
|
@@ -12986,7 +13238,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
12986
13238
|
if (isRoot) {
|
|
12987
13239
|
const relativePath2 = paths.root.relativeFilePath;
|
|
12988
13240
|
const fileContent2 = await readFileContent(
|
|
12989
|
-
|
|
13241
|
+
join97(baseDir, paths.root.relativeDirPath, relativePath2)
|
|
12990
13242
|
);
|
|
12991
13243
|
return new _CodexcliRule({
|
|
12992
13244
|
baseDir,
|
|
@@ -13000,8 +13252,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
13000
13252
|
if (!paths.nonRoot) {
|
|
13001
13253
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
13002
13254
|
}
|
|
13003
|
-
const relativePath =
|
|
13004
|
-
const fileContent = await readFileContent(
|
|
13255
|
+
const relativePath = join97(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
13256
|
+
const fileContent = await readFileContent(join97(baseDir, relativePath));
|
|
13005
13257
|
return new _CodexcliRule({
|
|
13006
13258
|
baseDir,
|
|
13007
13259
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -13060,12 +13312,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
13060
13312
|
};
|
|
13061
13313
|
|
|
13062
13314
|
// src/features/rules/copilot-rule.ts
|
|
13063
|
-
import { join as
|
|
13064
|
-
import { z as
|
|
13065
|
-
var CopilotRuleFrontmatterSchema =
|
|
13066
|
-
description:
|
|
13067
|
-
applyTo:
|
|
13068
|
-
excludeAgent:
|
|
13315
|
+
import { join as join98 } from "path";
|
|
13316
|
+
import { z as z51 } from "zod/mini";
|
|
13317
|
+
var CopilotRuleFrontmatterSchema = z51.object({
|
|
13318
|
+
description: z51.optional(z51.string()),
|
|
13319
|
+
applyTo: z51.optional(z51.string()),
|
|
13320
|
+
excludeAgent: z51.optional(z51.union([z51.literal("code-review"), z51.literal("coding-agent")]))
|
|
13069
13321
|
});
|
|
13070
13322
|
var CopilotRule = class _CopilotRule extends ToolRule {
|
|
13071
13323
|
frontmatter;
|
|
@@ -13094,7 +13346,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
13094
13346
|
const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
|
|
13095
13347
|
if (!result.success) {
|
|
13096
13348
|
throw new Error(
|
|
13097
|
-
`Invalid frontmatter in ${
|
|
13349
|
+
`Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
13098
13350
|
);
|
|
13099
13351
|
}
|
|
13100
13352
|
}
|
|
@@ -13184,8 +13436,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
13184
13436
|
const paths = this.getSettablePaths({ global });
|
|
13185
13437
|
const isRoot = relativeFilePath === paths.root.relativeFilePath;
|
|
13186
13438
|
if (isRoot) {
|
|
13187
|
-
const relativePath2 =
|
|
13188
|
-
const fileContent2 = await readFileContent(
|
|
13439
|
+
const relativePath2 = join98(paths.root.relativeDirPath, paths.root.relativeFilePath);
|
|
13440
|
+
const fileContent2 = await readFileContent(join98(baseDir, relativePath2));
|
|
13189
13441
|
return new _CopilotRule({
|
|
13190
13442
|
baseDir,
|
|
13191
13443
|
relativeDirPath: paths.root.relativeDirPath,
|
|
@@ -13199,16 +13451,16 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
13199
13451
|
if (!paths.nonRoot) {
|
|
13200
13452
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
13201
13453
|
}
|
|
13202
|
-
const relativePath =
|
|
13203
|
-
const fileContent = await readFileContent(
|
|
13454
|
+
const relativePath = join98(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
13455
|
+
const fileContent = await readFileContent(join98(baseDir, relativePath));
|
|
13204
13456
|
const { frontmatter, body: content } = parseFrontmatter(
|
|
13205
13457
|
fileContent,
|
|
13206
|
-
|
|
13458
|
+
join98(baseDir, relativePath)
|
|
13207
13459
|
);
|
|
13208
13460
|
const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
|
|
13209
13461
|
if (!result.success) {
|
|
13210
13462
|
throw new Error(
|
|
13211
|
-
`Invalid frontmatter in ${
|
|
13463
|
+
`Invalid frontmatter in ${join98(baseDir, relativeFilePath)}: ${formatError(result.error)}`
|
|
13212
13464
|
);
|
|
13213
13465
|
}
|
|
13214
13466
|
return new _CopilotRule({
|
|
@@ -13250,7 +13502,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
13250
13502
|
return {
|
|
13251
13503
|
success: false,
|
|
13252
13504
|
error: new Error(
|
|
13253
|
-
`Invalid frontmatter in ${
|
|
13505
|
+
`Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
13254
13506
|
)
|
|
13255
13507
|
};
|
|
13256
13508
|
}
|
|
@@ -13270,12 +13522,12 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
13270
13522
|
};
|
|
13271
13523
|
|
|
13272
13524
|
// src/features/rules/cursor-rule.ts
|
|
13273
|
-
import { join as
|
|
13274
|
-
import { z as
|
|
13275
|
-
var CursorRuleFrontmatterSchema =
|
|
13276
|
-
description:
|
|
13277
|
-
globs:
|
|
13278
|
-
alwaysApply:
|
|
13525
|
+
import { join as join99 } from "path";
|
|
13526
|
+
import { z as z52 } from "zod/mini";
|
|
13527
|
+
var CursorRuleFrontmatterSchema = z52.object({
|
|
13528
|
+
description: z52.optional(z52.string()),
|
|
13529
|
+
globs: z52.optional(z52.string()),
|
|
13530
|
+
alwaysApply: z52.optional(z52.boolean())
|
|
13279
13531
|
});
|
|
13280
13532
|
var CursorRule = class _CursorRule extends ToolRule {
|
|
13281
13533
|
frontmatter;
|
|
@@ -13292,7 +13544,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
13292
13544
|
const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
|
|
13293
13545
|
if (!result.success) {
|
|
13294
13546
|
throw new Error(
|
|
13295
|
-
`Invalid frontmatter in ${
|
|
13547
|
+
`Invalid frontmatter in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
13296
13548
|
);
|
|
13297
13549
|
}
|
|
13298
13550
|
}
|
|
@@ -13408,7 +13660,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
13408
13660
|
relativeFilePath,
|
|
13409
13661
|
validate = true
|
|
13410
13662
|
}) {
|
|
13411
|
-
const filePath =
|
|
13663
|
+
const filePath = join99(
|
|
13412
13664
|
baseDir,
|
|
13413
13665
|
this.getSettablePaths().nonRoot.relativeDirPath,
|
|
13414
13666
|
relativeFilePath
|
|
@@ -13418,7 +13670,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
13418
13670
|
const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
|
|
13419
13671
|
if (!result.success) {
|
|
13420
13672
|
throw new Error(
|
|
13421
|
-
`Invalid frontmatter in ${
|
|
13673
|
+
`Invalid frontmatter in ${join99(baseDir, relativeFilePath)}: ${formatError(result.error)}`
|
|
13422
13674
|
);
|
|
13423
13675
|
}
|
|
13424
13676
|
return new _CursorRule({
|
|
@@ -13455,7 +13707,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
13455
13707
|
return {
|
|
13456
13708
|
success: false,
|
|
13457
13709
|
error: new Error(
|
|
13458
|
-
`Invalid frontmatter in ${
|
|
13710
|
+
`Invalid frontmatter in ${join99(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
13459
13711
|
)
|
|
13460
13712
|
};
|
|
13461
13713
|
}
|
|
@@ -13475,7 +13727,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
13475
13727
|
};
|
|
13476
13728
|
|
|
13477
13729
|
// src/features/rules/factorydroid-rule.ts
|
|
13478
|
-
import { join as
|
|
13730
|
+
import { join as join100 } from "path";
|
|
13479
13731
|
var FactorydroidRule = class _FactorydroidRule extends ToolRule {
|
|
13480
13732
|
constructor({ fileContent, root, ...rest }) {
|
|
13481
13733
|
super({
|
|
@@ -13515,8 +13767,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
|
|
|
13515
13767
|
const paths = this.getSettablePaths({ global });
|
|
13516
13768
|
const isRoot = relativeFilePath === paths.root.relativeFilePath;
|
|
13517
13769
|
if (isRoot) {
|
|
13518
|
-
const relativePath2 =
|
|
13519
|
-
const fileContent2 = await readFileContent(
|
|
13770
|
+
const relativePath2 = join100(paths.root.relativeDirPath, paths.root.relativeFilePath);
|
|
13771
|
+
const fileContent2 = await readFileContent(join100(baseDir, relativePath2));
|
|
13520
13772
|
return new _FactorydroidRule({
|
|
13521
13773
|
baseDir,
|
|
13522
13774
|
relativeDirPath: paths.root.relativeDirPath,
|
|
@@ -13529,8 +13781,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
|
|
|
13529
13781
|
if (!paths.nonRoot) {
|
|
13530
13782
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
13531
13783
|
}
|
|
13532
|
-
const relativePath =
|
|
13533
|
-
const fileContent = await readFileContent(
|
|
13784
|
+
const relativePath = join100(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
13785
|
+
const fileContent = await readFileContent(join100(baseDir, relativePath));
|
|
13534
13786
|
return new _FactorydroidRule({
|
|
13535
13787
|
baseDir,
|
|
13536
13788
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -13589,7 +13841,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
|
|
|
13589
13841
|
};
|
|
13590
13842
|
|
|
13591
13843
|
// src/features/rules/geminicli-rule.ts
|
|
13592
|
-
import { join as
|
|
13844
|
+
import { join as join101 } from "path";
|
|
13593
13845
|
var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
13594
13846
|
static getSettablePaths({
|
|
13595
13847
|
global,
|
|
@@ -13624,7 +13876,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
|
13624
13876
|
if (isRoot) {
|
|
13625
13877
|
const relativePath2 = paths.root.relativeFilePath;
|
|
13626
13878
|
const fileContent2 = await readFileContent(
|
|
13627
|
-
|
|
13879
|
+
join101(baseDir, paths.root.relativeDirPath, relativePath2)
|
|
13628
13880
|
);
|
|
13629
13881
|
return new _GeminiCliRule({
|
|
13630
13882
|
baseDir,
|
|
@@ -13638,8 +13890,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
|
13638
13890
|
if (!paths.nonRoot) {
|
|
13639
13891
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
13640
13892
|
}
|
|
13641
|
-
const relativePath =
|
|
13642
|
-
const fileContent = await readFileContent(
|
|
13893
|
+
const relativePath = join101(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
13894
|
+
const fileContent = await readFileContent(join101(baseDir, relativePath));
|
|
13643
13895
|
return new _GeminiCliRule({
|
|
13644
13896
|
baseDir,
|
|
13645
13897
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -13698,7 +13950,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
|
13698
13950
|
};
|
|
13699
13951
|
|
|
13700
13952
|
// src/features/rules/goose-rule.ts
|
|
13701
|
-
import { join as
|
|
13953
|
+
import { join as join102 } from "path";
|
|
13702
13954
|
var GooseRule = class _GooseRule extends ToolRule {
|
|
13703
13955
|
static getSettablePaths({
|
|
13704
13956
|
global,
|
|
@@ -13733,7 +13985,7 @@ var GooseRule = class _GooseRule extends ToolRule {
|
|
|
13733
13985
|
if (isRoot) {
|
|
13734
13986
|
const relativePath2 = paths.root.relativeFilePath;
|
|
13735
13987
|
const fileContent2 = await readFileContent(
|
|
13736
|
-
|
|
13988
|
+
join102(baseDir, paths.root.relativeDirPath, relativePath2)
|
|
13737
13989
|
);
|
|
13738
13990
|
return new _GooseRule({
|
|
13739
13991
|
baseDir,
|
|
@@ -13747,8 +13999,8 @@ var GooseRule = class _GooseRule extends ToolRule {
|
|
|
13747
13999
|
if (!paths.nonRoot) {
|
|
13748
14000
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
13749
14001
|
}
|
|
13750
|
-
const relativePath =
|
|
13751
|
-
const fileContent = await readFileContent(
|
|
14002
|
+
const relativePath = join102(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
14003
|
+
const fileContent = await readFileContent(join102(baseDir, relativePath));
|
|
13752
14004
|
return new _GooseRule({
|
|
13753
14005
|
baseDir,
|
|
13754
14006
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -13807,7 +14059,7 @@ var GooseRule = class _GooseRule extends ToolRule {
|
|
|
13807
14059
|
};
|
|
13808
14060
|
|
|
13809
14061
|
// src/features/rules/junie-rule.ts
|
|
13810
|
-
import { join as
|
|
14062
|
+
import { join as join103 } from "path";
|
|
13811
14063
|
var JunieRule = class _JunieRule extends ToolRule {
|
|
13812
14064
|
static getSettablePaths(_options = {}) {
|
|
13813
14065
|
return {
|
|
@@ -13826,8 +14078,8 @@ var JunieRule = class _JunieRule extends ToolRule {
|
|
|
13826
14078
|
validate = true
|
|
13827
14079
|
}) {
|
|
13828
14080
|
const isRoot = relativeFilePath === "guidelines.md";
|
|
13829
|
-
const relativePath = isRoot ? "guidelines.md" :
|
|
13830
|
-
const fileContent = await readFileContent(
|
|
14081
|
+
const relativePath = isRoot ? "guidelines.md" : join103(".junie", "memories", relativeFilePath);
|
|
14082
|
+
const fileContent = await readFileContent(join103(baseDir, relativePath));
|
|
13831
14083
|
return new _JunieRule({
|
|
13832
14084
|
baseDir,
|
|
13833
14085
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
|
|
@@ -13882,7 +14134,7 @@ var JunieRule = class _JunieRule extends ToolRule {
|
|
|
13882
14134
|
};
|
|
13883
14135
|
|
|
13884
14136
|
// src/features/rules/kilo-rule.ts
|
|
13885
|
-
import { join as
|
|
14137
|
+
import { join as join104 } from "path";
|
|
13886
14138
|
var KiloRule = class _KiloRule extends ToolRule {
|
|
13887
14139
|
static getSettablePaths(_options = {}) {
|
|
13888
14140
|
return {
|
|
@@ -13897,7 +14149,7 @@ var KiloRule = class _KiloRule extends ToolRule {
|
|
|
13897
14149
|
validate = true
|
|
13898
14150
|
}) {
|
|
13899
14151
|
const fileContent = await readFileContent(
|
|
13900
|
-
|
|
14152
|
+
join104(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
13901
14153
|
);
|
|
13902
14154
|
return new _KiloRule({
|
|
13903
14155
|
baseDir,
|
|
@@ -13949,7 +14201,7 @@ var KiloRule = class _KiloRule extends ToolRule {
|
|
|
13949
14201
|
};
|
|
13950
14202
|
|
|
13951
14203
|
// src/features/rules/kiro-rule.ts
|
|
13952
|
-
import { join as
|
|
14204
|
+
import { join as join105 } from "path";
|
|
13953
14205
|
var KiroRule = class _KiroRule extends ToolRule {
|
|
13954
14206
|
static getSettablePaths(_options = {}) {
|
|
13955
14207
|
return {
|
|
@@ -13964,7 +14216,7 @@ var KiroRule = class _KiroRule extends ToolRule {
|
|
|
13964
14216
|
validate = true
|
|
13965
14217
|
}) {
|
|
13966
14218
|
const fileContent = await readFileContent(
|
|
13967
|
-
|
|
14219
|
+
join105(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
13968
14220
|
);
|
|
13969
14221
|
return new _KiroRule({
|
|
13970
14222
|
baseDir,
|
|
@@ -14018,7 +14270,7 @@ var KiroRule = class _KiroRule extends ToolRule {
|
|
|
14018
14270
|
};
|
|
14019
14271
|
|
|
14020
14272
|
// src/features/rules/opencode-rule.ts
|
|
14021
|
-
import { join as
|
|
14273
|
+
import { join as join106 } from "path";
|
|
14022
14274
|
var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
14023
14275
|
static getSettablePaths({
|
|
14024
14276
|
global,
|
|
@@ -14053,7 +14305,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
|
14053
14305
|
if (isRoot) {
|
|
14054
14306
|
const relativePath2 = paths.root.relativeFilePath;
|
|
14055
14307
|
const fileContent2 = await readFileContent(
|
|
14056
|
-
|
|
14308
|
+
join106(baseDir, paths.root.relativeDirPath, relativePath2)
|
|
14057
14309
|
);
|
|
14058
14310
|
return new _OpenCodeRule({
|
|
14059
14311
|
baseDir,
|
|
@@ -14067,8 +14319,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
|
14067
14319
|
if (!paths.nonRoot) {
|
|
14068
14320
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
14069
14321
|
}
|
|
14070
|
-
const relativePath =
|
|
14071
|
-
const fileContent = await readFileContent(
|
|
14322
|
+
const relativePath = join106(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
14323
|
+
const fileContent = await readFileContent(join106(baseDir, relativePath));
|
|
14072
14324
|
return new _OpenCodeRule({
|
|
14073
14325
|
baseDir,
|
|
14074
14326
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -14127,7 +14379,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
|
14127
14379
|
};
|
|
14128
14380
|
|
|
14129
14381
|
// src/features/rules/qwencode-rule.ts
|
|
14130
|
-
import { join as
|
|
14382
|
+
import { join as join107 } from "path";
|
|
14131
14383
|
var QwencodeRule = class _QwencodeRule extends ToolRule {
|
|
14132
14384
|
static getSettablePaths(_options = {}) {
|
|
14133
14385
|
return {
|
|
@@ -14146,8 +14398,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
|
|
|
14146
14398
|
validate = true
|
|
14147
14399
|
}) {
|
|
14148
14400
|
const isRoot = relativeFilePath === "QWEN.md";
|
|
14149
|
-
const relativePath = isRoot ? "QWEN.md" :
|
|
14150
|
-
const fileContent = await readFileContent(
|
|
14401
|
+
const relativePath = isRoot ? "QWEN.md" : join107(".qwen", "memories", relativeFilePath);
|
|
14402
|
+
const fileContent = await readFileContent(join107(baseDir, relativePath));
|
|
14151
14403
|
return new _QwencodeRule({
|
|
14152
14404
|
baseDir,
|
|
14153
14405
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
|
|
@@ -14199,7 +14451,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
|
|
|
14199
14451
|
};
|
|
14200
14452
|
|
|
14201
14453
|
// src/features/rules/replit-rule.ts
|
|
14202
|
-
import { join as
|
|
14454
|
+
import { join as join108 } from "path";
|
|
14203
14455
|
var ReplitRule = class _ReplitRule extends ToolRule {
|
|
14204
14456
|
static getSettablePaths(_options = {}) {
|
|
14205
14457
|
return {
|
|
@@ -14221,7 +14473,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
|
|
|
14221
14473
|
}
|
|
14222
14474
|
const relativePath = paths.root.relativeFilePath;
|
|
14223
14475
|
const fileContent = await readFileContent(
|
|
14224
|
-
|
|
14476
|
+
join108(baseDir, paths.root.relativeDirPath, relativePath)
|
|
14225
14477
|
);
|
|
14226
14478
|
return new _ReplitRule({
|
|
14227
14479
|
baseDir,
|
|
@@ -14287,7 +14539,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
|
|
|
14287
14539
|
};
|
|
14288
14540
|
|
|
14289
14541
|
// src/features/rules/roo-rule.ts
|
|
14290
|
-
import { join as
|
|
14542
|
+
import { join as join109 } from "path";
|
|
14291
14543
|
var RooRule = class _RooRule extends ToolRule {
|
|
14292
14544
|
static getSettablePaths(_options = {}) {
|
|
14293
14545
|
return {
|
|
@@ -14302,7 +14554,7 @@ var RooRule = class _RooRule extends ToolRule {
|
|
|
14302
14554
|
validate = true
|
|
14303
14555
|
}) {
|
|
14304
14556
|
const fileContent = await readFileContent(
|
|
14305
|
-
|
|
14557
|
+
join109(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
14306
14558
|
);
|
|
14307
14559
|
return new _RooRule({
|
|
14308
14560
|
baseDir,
|
|
@@ -14371,7 +14623,7 @@ var RooRule = class _RooRule extends ToolRule {
|
|
|
14371
14623
|
};
|
|
14372
14624
|
|
|
14373
14625
|
// src/features/rules/warp-rule.ts
|
|
14374
|
-
import { join as
|
|
14626
|
+
import { join as join110 } from "path";
|
|
14375
14627
|
var WarpRule = class _WarpRule extends ToolRule {
|
|
14376
14628
|
constructor({ fileContent, root, ...rest }) {
|
|
14377
14629
|
super({
|
|
@@ -14397,8 +14649,8 @@ var WarpRule = class _WarpRule extends ToolRule {
|
|
|
14397
14649
|
validate = true
|
|
14398
14650
|
}) {
|
|
14399
14651
|
const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
|
|
14400
|
-
const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath :
|
|
14401
|
-
const fileContent = await readFileContent(
|
|
14652
|
+
const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join110(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
|
|
14653
|
+
const fileContent = await readFileContent(join110(baseDir, relativePath));
|
|
14402
14654
|
return new _WarpRule({
|
|
14403
14655
|
baseDir,
|
|
14404
14656
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
|
|
@@ -14453,7 +14705,7 @@ var WarpRule = class _WarpRule extends ToolRule {
|
|
|
14453
14705
|
};
|
|
14454
14706
|
|
|
14455
14707
|
// src/features/rules/windsurf-rule.ts
|
|
14456
|
-
import { join as
|
|
14708
|
+
import { join as join111 } from "path";
|
|
14457
14709
|
var WindsurfRule = class _WindsurfRule extends ToolRule {
|
|
14458
14710
|
static getSettablePaths(_options = {}) {
|
|
14459
14711
|
return {
|
|
@@ -14468,7 +14720,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
|
|
|
14468
14720
|
validate = true
|
|
14469
14721
|
}) {
|
|
14470
14722
|
const fileContent = await readFileContent(
|
|
14471
|
-
|
|
14723
|
+
join111(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
14472
14724
|
);
|
|
14473
14725
|
return new _WindsurfRule({
|
|
14474
14726
|
baseDir,
|
|
@@ -14544,8 +14796,8 @@ var rulesProcessorToolTargets = [
|
|
|
14544
14796
|
"warp",
|
|
14545
14797
|
"windsurf"
|
|
14546
14798
|
];
|
|
14547
|
-
var RulesProcessorToolTargetSchema =
|
|
14548
|
-
var formatRulePaths = (rules) => rules.map((r) =>
|
|
14799
|
+
var RulesProcessorToolTargetSchema = z53.enum(rulesProcessorToolTargets);
|
|
14800
|
+
var formatRulePaths = (rules) => rules.map((r) => join112(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
|
|
14549
14801
|
var toolRuleFactories = /* @__PURE__ */ new Map([
|
|
14550
14802
|
[
|
|
14551
14803
|
"agentsmd",
|
|
@@ -14920,7 +15172,7 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
14920
15172
|
}).relativeDirPath;
|
|
14921
15173
|
return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
|
|
14922
15174
|
const frontmatter = skill.getFrontmatter();
|
|
14923
|
-
const relativePath =
|
|
15175
|
+
const relativePath = join112(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
|
|
14924
15176
|
return {
|
|
14925
15177
|
name: frontmatter.name,
|
|
14926
15178
|
description: frontmatter.description,
|
|
@@ -15033,8 +15285,8 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
15033
15285
|
* Load and parse rulesync rule files from .rulesync/rules/ directory
|
|
15034
15286
|
*/
|
|
15035
15287
|
async loadRulesyncFiles() {
|
|
15036
|
-
const rulesyncBaseDir =
|
|
15037
|
-
const files = await findFilesByGlobs(
|
|
15288
|
+
const rulesyncBaseDir = join112(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
|
|
15289
|
+
const files = await findFilesByGlobs(join112(rulesyncBaseDir, "**", "*.md"));
|
|
15038
15290
|
logger.debug(`Found ${files.length} rulesync files`);
|
|
15039
15291
|
const rulesyncRules = await Promise.all(
|
|
15040
15292
|
files.map((file) => {
|
|
@@ -15101,7 +15353,7 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
15101
15353
|
return [];
|
|
15102
15354
|
}
|
|
15103
15355
|
const rootFilePaths = await findFilesByGlobs(
|
|
15104
|
-
|
|
15356
|
+
join112(
|
|
15105
15357
|
this.baseDir,
|
|
15106
15358
|
settablePaths.root.relativeDirPath ?? ".",
|
|
15107
15359
|
settablePaths.root.relativeFilePath
|
|
@@ -15139,7 +15391,7 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
15139
15391
|
return [];
|
|
15140
15392
|
}
|
|
15141
15393
|
const localRootFilePaths = await findFilesByGlobs(
|
|
15142
|
-
|
|
15394
|
+
join112(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md")
|
|
15143
15395
|
);
|
|
15144
15396
|
return localRootFilePaths.map(
|
|
15145
15397
|
(filePath) => factory.class.forDeletion({
|
|
@@ -15155,9 +15407,9 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
15155
15407
|
if (!settablePaths.nonRoot) {
|
|
15156
15408
|
return [];
|
|
15157
15409
|
}
|
|
15158
|
-
const nonRootBaseDir =
|
|
15410
|
+
const nonRootBaseDir = join112(this.baseDir, settablePaths.nonRoot.relativeDirPath);
|
|
15159
15411
|
const nonRootFilePaths = await findFilesByGlobs(
|
|
15160
|
-
|
|
15412
|
+
join112(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
|
|
15161
15413
|
);
|
|
15162
15414
|
if (forDeletion) {
|
|
15163
15415
|
return nonRootFilePaths.map((filePath) => {
|
|
@@ -15289,14 +15541,14 @@ s/<command> [arguments]
|
|
|
15289
15541
|
This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
|
|
15290
15542
|
The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
|
|
15291
15543
|
|
|
15292
|
-
When users call a custom slash command, you have to look for the markdown file, \`${
|
|
15544
|
+
When users call a custom slash command, you have to look for the markdown file, \`${join112(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
|
|
15293
15545
|
const subagentsSection = subagents ? `## Simulated Subagents
|
|
15294
15546
|
|
|
15295
15547
|
Simulated subagents are specialized AI assistants that can be invoked to handle specific types of tasks. In this case, it can be appear something like custom slash commands simply. Simulated subagents can be called by custom slash commands.
|
|
15296
15548
|
|
|
15297
|
-
When users call a simulated subagent, it will look for the corresponding markdown file, \`${
|
|
15549
|
+
When users call a simulated subagent, it will look for the corresponding markdown file, \`${join112(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
|
|
15298
15550
|
|
|
15299
|
-
For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${
|
|
15551
|
+
For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join112(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
|
|
15300
15552
|
const skillsSection = skills ? this.generateSkillsSection(skills) : "";
|
|
15301
15553
|
const result = [
|
|
15302
15554
|
overview,
|
|
@@ -15368,7 +15620,7 @@ async function processEmptyFeatureGeneration(params) {
|
|
|
15368
15620
|
return { count: totalCount, paths: [], hasDiff };
|
|
15369
15621
|
}
|
|
15370
15622
|
async function checkRulesyncDirExists(params) {
|
|
15371
|
-
return fileExists(
|
|
15623
|
+
return fileExists(join113(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
|
|
15372
15624
|
}
|
|
15373
15625
|
async function generate(params) {
|
|
15374
15626
|
const { config } = params;
|