rulesync 7.21.0 → 7.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -51,6 +51,10 @@ var RULESYNC_COMMANDS_RELATIVE_DIR_PATH = (0, import_node_path.join)(RULESYNC_RE
51
51
  var RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH = (0, import_node_path.join)(RULESYNC_RELATIVE_DIR_PATH, "subagents");
52
52
  var RULESYNC_MCP_RELATIVE_FILE_PATH = (0, import_node_path.join)(RULESYNC_RELATIVE_DIR_PATH, "mcp.json");
53
53
  var RULESYNC_HOOKS_RELATIVE_FILE_PATH = (0, import_node_path.join)(RULESYNC_RELATIVE_DIR_PATH, "hooks.json");
54
+ var RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH = (0, import_node_path.join)(
55
+ RULESYNC_RELATIVE_DIR_PATH,
56
+ "permissions.json"
57
+ );
54
58
  var RULESYNC_AIIGNORE_FILE_NAME = ".aiignore";
55
59
  var RULESYNC_AIIGNORE_RELATIVE_FILE_PATH = (0, import_node_path.join)(RULESYNC_RELATIVE_DIR_PATH, ".aiignore");
56
60
  var RULESYNC_IGNORE_RELATIVE_FILE_PATH = ".rulesyncignore";
@@ -244,7 +248,8 @@ var ALL_FEATURES = [
244
248
  "subagents",
245
249
  "commands",
246
250
  "skills",
247
- "hooks"
251
+ "hooks",
252
+ "permissions"
248
253
  ];
249
254
  var ALL_FEATURES_WITH_WILDCARD = [...ALL_FEATURES, "*"];
250
255
  var FeatureSchema = import_mini.z.enum(ALL_FEATURES);
@@ -269,6 +274,7 @@ var ALL_TOOL_TARGETS = [
269
274
  "copilot",
270
275
  "copilotcli",
271
276
  "cursor",
277
+ "deepagents",
272
278
  "factorydroid",
273
279
  "geminicli",
274
280
  "goose",
@@ -603,7 +609,7 @@ function getBaseDirsInLightOfGlobal({
603
609
  }
604
610
 
605
611
  // src/lib/generate.ts
606
- var import_node_path120 = require("path");
612
+ var import_node_path125 = require("path");
607
613
  var import_es_toolkit4 = require("es-toolkit");
608
614
 
609
615
  // src/features/commands/commands-processor.ts
@@ -2925,7 +2931,7 @@ var toolCommandFactories = /* @__PURE__ */ new Map([
2925
2931
  meta: {
2926
2932
  extension: "md",
2927
2933
  supportsProject: true,
2928
- supportsGlobal: true,
2934
+ supportsGlobal: false,
2929
2935
  isSimulated: true,
2930
2936
  supportsSubdirectory: false
2931
2937
  }
@@ -3287,6 +3293,15 @@ var FACTORYDROID_HOOK_EVENTS = [
3287
3293
  "notification",
3288
3294
  "setup"
3289
3295
  ];
3296
+ var DEEPAGENTS_HOOK_EVENTS = [
3297
+ "sessionStart",
3298
+ "sessionEnd",
3299
+ "beforeSubmitPrompt",
3300
+ "permissionRequest",
3301
+ "postToolUseFailure",
3302
+ "stop",
3303
+ "preCompact"
3304
+ ];
3290
3305
  var GEMINICLI_HOOK_EVENTS = [
3291
3306
  "sessionStart",
3292
3307
  "sessionEnd",
@@ -3309,7 +3324,8 @@ var HooksConfigSchema = import_mini15.z.looseObject({
3309
3324
  copilot: import_mini15.z.optional(import_mini15.z.looseObject({ hooks: import_mini15.z.optional(hooksRecordSchema) })),
3310
3325
  opencode: import_mini15.z.optional(import_mini15.z.looseObject({ hooks: import_mini15.z.optional(hooksRecordSchema) })),
3311
3326
  factorydroid: import_mini15.z.optional(import_mini15.z.looseObject({ hooks: import_mini15.z.optional(hooksRecordSchema) })),
3312
- geminicli: import_mini15.z.optional(import_mini15.z.looseObject({ hooks: import_mini15.z.optional(hooksRecordSchema) }))
3327
+ geminicli: import_mini15.z.optional(import_mini15.z.looseObject({ hooks: import_mini15.z.optional(hooksRecordSchema) })),
3328
+ deepagents: import_mini15.z.optional(import_mini15.z.looseObject({ hooks: import_mini15.z.optional(hooksRecordSchema) }))
3313
3329
  });
3314
3330
  var CANONICAL_TO_CLAUDE_EVENT_NAMES = {
3315
3331
  sessionStart: "SessionStart",
@@ -3406,6 +3422,18 @@ var CANONICAL_TO_GEMINICLI_EVENT_NAMES = {
3406
3422
  var GEMINICLI_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3407
3423
  Object.entries(CANONICAL_TO_GEMINICLI_EVENT_NAMES).map(([k, v]) => [v, k])
3408
3424
  );
3425
+ var CANONICAL_TO_DEEPAGENTS_EVENT_NAMES = {
3426
+ sessionStart: "session.start",
3427
+ sessionEnd: "session.end",
3428
+ beforeSubmitPrompt: "user.prompt",
3429
+ permissionRequest: "permission.request",
3430
+ postToolUseFailure: "tool.error",
3431
+ stop: "task.complete",
3432
+ preCompact: "context.compact"
3433
+ };
3434
+ var DEEPAGENTS_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3435
+ Object.entries(CANONICAL_TO_DEEPAGENTS_EVENT_NAMES).map(([k, v]) => [v, k])
3436
+ );
3409
3437
 
3410
3438
  // src/features/hooks/claudecode-hooks.ts
3411
3439
  var import_node_path24 = require("path");
@@ -4008,8 +4036,145 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
4008
4036
  }
4009
4037
  };
4010
4038
 
4011
- // src/features/hooks/factorydroid-hooks.ts
4039
+ // src/features/hooks/deepagents-hooks.ts
4012
4040
  var import_node_path27 = require("path");
4041
+ function isDeepagentsHooksFile(val) {
4042
+ if (typeof val !== "object" || val === null || !("hooks" in val)) return false;
4043
+ return Array.isArray(val.hooks);
4044
+ }
4045
+ function canonicalToDeepagentsHooks(config) {
4046
+ const supported = new Set(DEEPAGENTS_HOOK_EVENTS);
4047
+ const effectiveHooks = {
4048
+ ...config.hooks,
4049
+ ...config.deepagents?.hooks
4050
+ };
4051
+ const entries = [];
4052
+ for (const [canonicalEvent, definitions] of Object.entries(effectiveHooks)) {
4053
+ if (!supported.has(canonicalEvent)) continue;
4054
+ const deepagentsEvent = CANONICAL_TO_DEEPAGENTS_EVENT_NAMES[canonicalEvent];
4055
+ if (!deepagentsEvent) continue;
4056
+ for (const def of definitions) {
4057
+ if (def.type === "prompt") continue;
4058
+ if (!def.command) continue;
4059
+ if (def.matcher) continue;
4060
+ entries.push({
4061
+ command: ["bash", "-c", def.command],
4062
+ events: [deepagentsEvent]
4063
+ });
4064
+ }
4065
+ }
4066
+ return entries;
4067
+ }
4068
+ function deepagentsToCanonicalHooks(hooksEntries) {
4069
+ const canonical = {};
4070
+ for (const entry of hooksEntries) {
4071
+ if (!Array.isArray(entry.command) || entry.command.length === 0) continue;
4072
+ let command;
4073
+ if (entry.command.length === 3 && entry.command[0] === "bash" && entry.command[1] === "-c") {
4074
+ command = entry.command[2] ?? "";
4075
+ } else {
4076
+ command = entry.command.join(" ");
4077
+ }
4078
+ const events = entry.events ?? [];
4079
+ for (const deepagentsEvent of events) {
4080
+ const canonicalEvent = DEEPAGENTS_TO_CANONICAL_EVENT_NAMES[deepagentsEvent];
4081
+ if (!canonicalEvent) continue;
4082
+ const existing = canonical[canonicalEvent];
4083
+ if (existing) {
4084
+ existing.push({ type: "command", command });
4085
+ } else {
4086
+ canonical[canonicalEvent] = [{ type: "command", command }];
4087
+ }
4088
+ }
4089
+ }
4090
+ return canonical;
4091
+ }
4092
+ var DeepagentsHooks = class _DeepagentsHooks extends ToolHooks {
4093
+ constructor(params) {
4094
+ super({
4095
+ ...params,
4096
+ fileContent: params.fileContent ?? JSON.stringify({ hooks: [] }, null, 2)
4097
+ });
4098
+ }
4099
+ isDeletable() {
4100
+ return true;
4101
+ }
4102
+ static getSettablePaths(_options = {}) {
4103
+ return {
4104
+ relativeDirPath: ".deepagents",
4105
+ relativeFilePath: "hooks.json"
4106
+ };
4107
+ }
4108
+ static async fromFile({
4109
+ baseDir = process.cwd(),
4110
+ validate = true,
4111
+ global = false
4112
+ }) {
4113
+ const paths = _DeepagentsHooks.getSettablePaths({ global });
4114
+ const filePath = (0, import_node_path27.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4115
+ const fileContent = await readFileContentOrNull(filePath) ?? JSON.stringify({ hooks: [] }, null, 2);
4116
+ return new _DeepagentsHooks({
4117
+ baseDir,
4118
+ relativeDirPath: paths.relativeDirPath,
4119
+ relativeFilePath: paths.relativeFilePath,
4120
+ fileContent,
4121
+ validate
4122
+ });
4123
+ }
4124
+ static fromRulesyncHooks({
4125
+ baseDir = process.cwd(),
4126
+ rulesyncHooks,
4127
+ validate = true,
4128
+ global = false
4129
+ }) {
4130
+ const config = rulesyncHooks.getJson();
4131
+ const hooks = canonicalToDeepagentsHooks(config);
4132
+ const fileContent = JSON.stringify({ hooks }, null, 2);
4133
+ const paths = _DeepagentsHooks.getSettablePaths({ global });
4134
+ return new _DeepagentsHooks({
4135
+ baseDir,
4136
+ relativeDirPath: paths.relativeDirPath,
4137
+ relativeFilePath: paths.relativeFilePath,
4138
+ fileContent,
4139
+ validate
4140
+ });
4141
+ }
4142
+ toRulesyncHooks() {
4143
+ let parsed;
4144
+ try {
4145
+ parsed = JSON.parse(this.getFileContent());
4146
+ } catch (error) {
4147
+ throw new Error(
4148
+ `Failed to parse deepagents hooks content in ${(0, import_node_path27.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4149
+ { cause: error }
4150
+ );
4151
+ }
4152
+ const hooksEntries = isDeepagentsHooksFile(parsed) ? parsed.hooks : [];
4153
+ const hooks = deepagentsToCanonicalHooks(hooksEntries);
4154
+ return this.toRulesyncHooksDefault({
4155
+ fileContent: JSON.stringify({ version: 1, hooks }, null, 2)
4156
+ });
4157
+ }
4158
+ validate() {
4159
+ return { success: true, error: null };
4160
+ }
4161
+ static forDeletion({
4162
+ baseDir = process.cwd(),
4163
+ relativeDirPath,
4164
+ relativeFilePath
4165
+ }) {
4166
+ return new _DeepagentsHooks({
4167
+ baseDir,
4168
+ relativeDirPath,
4169
+ relativeFilePath,
4170
+ fileContent: JSON.stringify({ hooks: [] }, null, 2),
4171
+ validate: false
4172
+ });
4173
+ }
4174
+ };
4175
+
4176
+ // src/features/hooks/factorydroid-hooks.ts
4177
+ var import_node_path28 = require("path");
4013
4178
  var FACTORYDROID_CONVERTER_CONFIG = {
4014
4179
  supportedEvents: FACTORYDROID_HOOK_EVENTS,
4015
4180
  canonicalToToolEventNames: CANONICAL_TO_FACTORYDROID_EVENT_NAMES,
@@ -4035,7 +4200,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4035
4200
  global = false
4036
4201
  }) {
4037
4202
  const paths = _FactorydroidHooks.getSettablePaths({ global });
4038
- const filePath = (0, import_node_path27.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4203
+ const filePath = (0, import_node_path28.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4039
4204
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4040
4205
  return new _FactorydroidHooks({
4041
4206
  baseDir,
@@ -4053,7 +4218,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4053
4218
  logger
4054
4219
  }) {
4055
4220
  const paths = _FactorydroidHooks.getSettablePaths({ global });
4056
- const filePath = (0, import_node_path27.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4221
+ const filePath = (0, import_node_path28.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4057
4222
  const existingContent = await readOrInitializeFileContent(
4058
4223
  filePath,
4059
4224
  JSON.stringify({}, null, 2)
@@ -4090,7 +4255,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4090
4255
  settings = JSON.parse(this.getFileContent());
4091
4256
  } catch (error) {
4092
4257
  throw new Error(
4093
- `Failed to parse Factory Droid hooks content in ${(0, import_node_path27.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4258
+ `Failed to parse Factory Droid hooks content in ${(0, import_node_path28.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4094
4259
  {
4095
4260
  cause: error
4096
4261
  }
@@ -4123,7 +4288,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4123
4288
  };
4124
4289
 
4125
4290
  // src/features/hooks/geminicli-hooks.ts
4126
- var import_node_path28 = require("path");
4291
+ var import_node_path29 = require("path");
4127
4292
  var import_mini17 = require("zod/mini");
4128
4293
  function canonicalToGeminicliHooks(config) {
4129
4294
  const geminiSupported = new Set(GEMINICLI_HOOK_EVENTS);
@@ -4232,7 +4397,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4232
4397
  global = false
4233
4398
  }) {
4234
4399
  const paths = _GeminicliHooks.getSettablePaths({ global });
4235
- const filePath = (0, import_node_path28.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4400
+ const filePath = (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4236
4401
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4237
4402
  return new _GeminicliHooks({
4238
4403
  baseDir,
@@ -4249,7 +4414,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4249
4414
  global = false
4250
4415
  }) {
4251
4416
  const paths = _GeminicliHooks.getSettablePaths({ global });
4252
- const filePath = (0, import_node_path28.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4417
+ const filePath = (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4253
4418
  const existingContent = await readOrInitializeFileContent(
4254
4419
  filePath,
4255
4420
  JSON.stringify({}, null, 2)
@@ -4281,7 +4446,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4281
4446
  settings = JSON.parse(this.getFileContent());
4282
4447
  } catch (error) {
4283
4448
  throw new Error(
4284
- `Failed to parse Gemini CLI hooks content in ${(0, import_node_path28.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4449
+ `Failed to parse Gemini CLI hooks content in ${(0, import_node_path29.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4285
4450
  {
4286
4451
  cause: error
4287
4452
  }
@@ -4311,7 +4476,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4311
4476
  };
4312
4477
 
4313
4478
  // src/features/hooks/opencode-hooks.ts
4314
- var import_node_path29 = require("path");
4479
+ var import_node_path30 = require("path");
4315
4480
  var NAMED_HOOKS = /* @__PURE__ */ new Set(["tool.execute.before", "tool.execute.after"]);
4316
4481
  function escapeForTemplateLiteral(command) {
4317
4482
  return command.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${");
@@ -4409,7 +4574,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4409
4574
  }
4410
4575
  static getSettablePaths(options) {
4411
4576
  return {
4412
- relativeDirPath: options?.global ? (0, import_node_path29.join)(".config", "opencode", "plugins") : (0, import_node_path29.join)(".opencode", "plugins"),
4577
+ relativeDirPath: options?.global ? (0, import_node_path30.join)(".config", "opencode", "plugins") : (0, import_node_path30.join)(".opencode", "plugins"),
4413
4578
  relativeFilePath: "rulesync-hooks.js"
4414
4579
  };
4415
4580
  }
@@ -4420,7 +4585,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4420
4585
  }) {
4421
4586
  const paths = _OpencodeHooks.getSettablePaths({ global });
4422
4587
  const fileContent = await readFileContent(
4423
- (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4588
+ (0, import_node_path30.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4424
4589
  );
4425
4590
  return new _OpencodeHooks({
4426
4591
  baseDir,
@@ -4475,7 +4640,8 @@ var hooksProcessorToolTargetTuple = [
4475
4640
  "copilot",
4476
4641
  "opencode",
4477
4642
  "factorydroid",
4478
- "geminicli"
4643
+ "geminicli",
4644
+ "deepagents"
4479
4645
  ];
4480
4646
  var HooksProcessorToolTargetSchema = import_mini18.z.enum(hooksProcessorToolTargetTuple);
4481
4647
  var toolHooksFactories = /* @__PURE__ */ new Map([
@@ -4558,11 +4724,21 @@ var toolHooksFactories = /* @__PURE__ */ new Map([
4558
4724
  supportedHookTypes: ["command"],
4559
4725
  supportsMatcher: true
4560
4726
  }
4727
+ ],
4728
+ [
4729
+ "deepagents",
4730
+ {
4731
+ class: DeepagentsHooks,
4732
+ meta: { supportsProject: false, supportsGlobal: true, supportsImport: true },
4733
+ supportedEvents: DEEPAGENTS_HOOK_EVENTS,
4734
+ supportedHookTypes: ["command"],
4735
+ supportsMatcher: false
4736
+ }
4561
4737
  ]
4562
4738
  ]);
4563
- var hooksProcessorToolTargets = [...toolHooksFactories.keys()];
4739
+ var hooksProcessorToolTargets = [...toolHooksFactories.entries()].filter(([, f]) => f.meta.supportsProject).map(([t]) => t);
4564
4740
  var hooksProcessorToolTargetsGlobal = [...toolHooksFactories.entries()].filter(([, f]) => f.meta.supportsGlobal).map(([t]) => t);
4565
- var hooksProcessorToolTargetsImportable = [...toolHooksFactories.entries()].filter(([, f]) => f.meta.supportsImport).map(([t]) => t);
4741
+ var hooksProcessorToolTargetsImportable = [...toolHooksFactories.entries()].filter(([, f]) => f.meta.supportsProject && f.meta.supportsImport).map(([t]) => t);
4566
4742
  var hooksProcessorToolTargetsGlobalImportable = [...toolHooksFactories.entries()].filter(([, f]) => f.meta.supportsGlobal && f.meta.supportsImport).map(([t]) => t);
4567
4743
  var HooksProcessor = class extends FeatureProcessor {
4568
4744
  toolTarget;
@@ -4716,10 +4892,10 @@ var HooksProcessor = class extends FeatureProcessor {
4716
4892
  var import_mini19 = require("zod/mini");
4717
4893
 
4718
4894
  // src/features/ignore/augmentcode-ignore.ts
4719
- var import_node_path31 = require("path");
4895
+ var import_node_path32 = require("path");
4720
4896
 
4721
4897
  // src/features/ignore/rulesync-ignore.ts
4722
- var import_node_path30 = require("path");
4898
+ var import_node_path31 = require("path");
4723
4899
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
4724
4900
  validate() {
4725
4901
  return { success: true, error: null };
@@ -4739,12 +4915,12 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
4739
4915
  static async fromFile() {
4740
4916
  const baseDir = process.cwd();
4741
4917
  const paths = this.getSettablePaths();
4742
- const recommendedPath = (0, import_node_path30.join)(
4918
+ const recommendedPath = (0, import_node_path31.join)(
4743
4919
  baseDir,
4744
4920
  paths.recommended.relativeDirPath,
4745
4921
  paths.recommended.relativeFilePath
4746
4922
  );
4747
- const legacyPath = (0, import_node_path30.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4923
+ const legacyPath = (0, import_node_path31.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4748
4924
  if (await fileExists(recommendedPath)) {
4749
4925
  const fileContent2 = await readFileContent(recommendedPath);
4750
4926
  return new _RulesyncIgnore({
@@ -4860,7 +5036,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
4860
5036
  validate = true
4861
5037
  }) {
4862
5038
  const fileContent = await readFileContent(
4863
- (0, import_node_path31.join)(
5039
+ (0, import_node_path32.join)(
4864
5040
  baseDir,
4865
5041
  this.getSettablePaths().relativeDirPath,
4866
5042
  this.getSettablePaths().relativeFilePath
@@ -4890,7 +5066,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
4890
5066
  };
4891
5067
 
4892
5068
  // src/features/ignore/claudecode-ignore.ts
4893
- var import_node_path32 = require("path");
5069
+ var import_node_path33 = require("path");
4894
5070
  var import_es_toolkit2 = require("es-toolkit");
4895
5071
  var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4896
5072
  constructor(params) {
@@ -4933,7 +5109,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4933
5109
  const fileContent = rulesyncIgnore.getFileContent();
4934
5110
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
4935
5111
  const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
4936
- const filePath = (0, import_node_path32.join)(
5112
+ const filePath = (0, import_node_path33.join)(
4937
5113
  baseDir,
4938
5114
  this.getSettablePaths().relativeDirPath,
4939
5115
  this.getSettablePaths().relativeFilePath
@@ -4969,7 +5145,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4969
5145
  validate = true
4970
5146
  }) {
4971
5147
  const fileContent = await readFileContent(
4972
- (0, import_node_path32.join)(
5148
+ (0, import_node_path33.join)(
4973
5149
  baseDir,
4974
5150
  this.getSettablePaths().relativeDirPath,
4975
5151
  this.getSettablePaths().relativeFilePath
@@ -4999,7 +5175,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4999
5175
  };
5000
5176
 
5001
5177
  // src/features/ignore/cline-ignore.ts
5002
- var import_node_path33 = require("path");
5178
+ var import_node_path34 = require("path");
5003
5179
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5004
5180
  static getSettablePaths() {
5005
5181
  return {
@@ -5036,7 +5212,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5036
5212
  validate = true
5037
5213
  }) {
5038
5214
  const fileContent = await readFileContent(
5039
- (0, import_node_path33.join)(
5215
+ (0, import_node_path34.join)(
5040
5216
  baseDir,
5041
5217
  this.getSettablePaths().relativeDirPath,
5042
5218
  this.getSettablePaths().relativeFilePath
@@ -5066,7 +5242,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5066
5242
  };
5067
5243
 
5068
5244
  // src/features/ignore/cursor-ignore.ts
5069
- var import_node_path34 = require("path");
5245
+ var import_node_path35 = require("path");
5070
5246
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
5071
5247
  static getSettablePaths() {
5072
5248
  return {
@@ -5099,7 +5275,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
5099
5275
  validate = true
5100
5276
  }) {
5101
5277
  const fileContent = await readFileContent(
5102
- (0, import_node_path34.join)(
5278
+ (0, import_node_path35.join)(
5103
5279
  baseDir,
5104
5280
  this.getSettablePaths().relativeDirPath,
5105
5281
  this.getSettablePaths().relativeFilePath
@@ -5129,7 +5305,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
5129
5305
  };
5130
5306
 
5131
5307
  // src/features/ignore/geminicli-ignore.ts
5132
- var import_node_path35 = require("path");
5308
+ var import_node_path36 = require("path");
5133
5309
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5134
5310
  static getSettablePaths() {
5135
5311
  return {
@@ -5156,7 +5332,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5156
5332
  validate = true
5157
5333
  }) {
5158
5334
  const fileContent = await readFileContent(
5159
- (0, import_node_path35.join)(
5335
+ (0, import_node_path36.join)(
5160
5336
  baseDir,
5161
5337
  this.getSettablePaths().relativeDirPath,
5162
5338
  this.getSettablePaths().relativeFilePath
@@ -5186,7 +5362,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5186
5362
  };
5187
5363
 
5188
5364
  // src/features/ignore/goose-ignore.ts
5189
- var import_node_path36 = require("path");
5365
+ var import_node_path37 = require("path");
5190
5366
  var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5191
5367
  static getSettablePaths() {
5192
5368
  return {
@@ -5223,7 +5399,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5223
5399
  validate = true
5224
5400
  }) {
5225
5401
  const fileContent = await readFileContent(
5226
- (0, import_node_path36.join)(
5402
+ (0, import_node_path37.join)(
5227
5403
  baseDir,
5228
5404
  this.getSettablePaths().relativeDirPath,
5229
5405
  this.getSettablePaths().relativeFilePath
@@ -5253,7 +5429,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5253
5429
  };
5254
5430
 
5255
5431
  // src/features/ignore/junie-ignore.ts
5256
- var import_node_path37 = require("path");
5432
+ var import_node_path38 = require("path");
5257
5433
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5258
5434
  static getSettablePaths() {
5259
5435
  return {
@@ -5280,7 +5456,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5280
5456
  validate = true
5281
5457
  }) {
5282
5458
  const fileContent = await readFileContent(
5283
- (0, import_node_path37.join)(
5459
+ (0, import_node_path38.join)(
5284
5460
  baseDir,
5285
5461
  this.getSettablePaths().relativeDirPath,
5286
5462
  this.getSettablePaths().relativeFilePath
@@ -5310,7 +5486,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5310
5486
  };
5311
5487
 
5312
5488
  // src/features/ignore/kilo-ignore.ts
5313
- var import_node_path38 = require("path");
5489
+ var import_node_path39 = require("path");
5314
5490
  var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5315
5491
  static getSettablePaths() {
5316
5492
  return {
@@ -5347,7 +5523,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5347
5523
  validate = true
5348
5524
  }) {
5349
5525
  const fileContent = await readFileContent(
5350
- (0, import_node_path38.join)(
5526
+ (0, import_node_path39.join)(
5351
5527
  baseDir,
5352
5528
  this.getSettablePaths().relativeDirPath,
5353
5529
  this.getSettablePaths().relativeFilePath
@@ -5377,7 +5553,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5377
5553
  };
5378
5554
 
5379
5555
  // src/features/ignore/kiro-ignore.ts
5380
- var import_node_path39 = require("path");
5556
+ var import_node_path40 = require("path");
5381
5557
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5382
5558
  static getSettablePaths() {
5383
5559
  return {
@@ -5404,7 +5580,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5404
5580
  validate = true
5405
5581
  }) {
5406
5582
  const fileContent = await readFileContent(
5407
- (0, import_node_path39.join)(
5583
+ (0, import_node_path40.join)(
5408
5584
  baseDir,
5409
5585
  this.getSettablePaths().relativeDirPath,
5410
5586
  this.getSettablePaths().relativeFilePath
@@ -5434,7 +5610,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5434
5610
  };
5435
5611
 
5436
5612
  // src/features/ignore/qwencode-ignore.ts
5437
- var import_node_path40 = require("path");
5613
+ var import_node_path41 = require("path");
5438
5614
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5439
5615
  static getSettablePaths() {
5440
5616
  return {
@@ -5461,7 +5637,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5461
5637
  validate = true
5462
5638
  }) {
5463
5639
  const fileContent = await readFileContent(
5464
- (0, import_node_path40.join)(
5640
+ (0, import_node_path41.join)(
5465
5641
  baseDir,
5466
5642
  this.getSettablePaths().relativeDirPath,
5467
5643
  this.getSettablePaths().relativeFilePath
@@ -5491,7 +5667,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5491
5667
  };
5492
5668
 
5493
5669
  // src/features/ignore/roo-ignore.ts
5494
- var import_node_path41 = require("path");
5670
+ var import_node_path42 = require("path");
5495
5671
  var RooIgnore = class _RooIgnore extends ToolIgnore {
5496
5672
  static getSettablePaths() {
5497
5673
  return {
@@ -5518,7 +5694,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5518
5694
  validate = true
5519
5695
  }) {
5520
5696
  const fileContent = await readFileContent(
5521
- (0, import_node_path41.join)(
5697
+ (0, import_node_path42.join)(
5522
5698
  baseDir,
5523
5699
  this.getSettablePaths().relativeDirPath,
5524
5700
  this.getSettablePaths().relativeFilePath
@@ -5548,7 +5724,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5548
5724
  };
5549
5725
 
5550
5726
  // src/features/ignore/windsurf-ignore.ts
5551
- var import_node_path42 = require("path");
5727
+ var import_node_path43 = require("path");
5552
5728
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5553
5729
  static getSettablePaths() {
5554
5730
  return {
@@ -5575,7 +5751,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5575
5751
  validate = true
5576
5752
  }) {
5577
5753
  const fileContent = await readFileContent(
5578
- (0, import_node_path42.join)(
5754
+ (0, import_node_path43.join)(
5579
5755
  baseDir,
5580
5756
  this.getSettablePaths().relativeDirPath,
5581
5757
  this.getSettablePaths().relativeFilePath
@@ -5605,7 +5781,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5605
5781
  };
5606
5782
 
5607
5783
  // src/features/ignore/zed-ignore.ts
5608
- var import_node_path43 = require("path");
5784
+ var import_node_path44 = require("path");
5609
5785
  var import_es_toolkit3 = require("es-toolkit");
5610
5786
  var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5611
5787
  constructor(params) {
@@ -5642,7 +5818,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5642
5818
  }) {
5643
5819
  const fileContent = rulesyncIgnore.getFileContent();
5644
5820
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
5645
- const filePath = (0, import_node_path43.join)(
5821
+ const filePath = (0, import_node_path44.join)(
5646
5822
  baseDir,
5647
5823
  this.getSettablePaths().relativeDirPath,
5648
5824
  this.getSettablePaths().relativeFilePath
@@ -5669,7 +5845,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5669
5845
  validate = true
5670
5846
  }) {
5671
5847
  const fileContent = await readFileContent(
5672
- (0, import_node_path43.join)(
5848
+ (0, import_node_path44.join)(
5673
5849
  baseDir,
5674
5850
  this.getSettablePaths().relativeDirPath,
5675
5851
  this.getSettablePaths().relativeFilePath
@@ -5857,10 +6033,10 @@ var IgnoreProcessor = class extends FeatureProcessor {
5857
6033
  var import_mini23 = require("zod/mini");
5858
6034
 
5859
6035
  // src/features/mcp/claudecode-mcp.ts
5860
- var import_node_path45 = require("path");
6036
+ var import_node_path46 = require("path");
5861
6037
 
5862
6038
  // src/features/mcp/rulesync-mcp.ts
5863
- var import_node_path44 = require("path");
6039
+ var import_node_path45 = require("path");
5864
6040
  var import_object = require("es-toolkit/object");
5865
6041
  var import_mini21 = require("zod/mini");
5866
6042
 
@@ -5939,12 +6115,12 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
5939
6115
  }) {
5940
6116
  const baseDir = process.cwd();
5941
6117
  const paths = this.getSettablePaths();
5942
- const recommendedPath = (0, import_node_path44.join)(
6118
+ const recommendedPath = (0, import_node_path45.join)(
5943
6119
  baseDir,
5944
6120
  paths.recommended.relativeDirPath,
5945
6121
  paths.recommended.relativeFilePath
5946
6122
  );
5947
- const legacyPath = (0, import_node_path44.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
6123
+ const legacyPath = (0, import_node_path45.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5948
6124
  if (await fileExists(recommendedPath)) {
5949
6125
  const fileContent2 = await readFileContent(recommendedPath);
5950
6126
  return new _RulesyncMcp({
@@ -6098,7 +6274,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6098
6274
  global = false
6099
6275
  }) {
6100
6276
  const paths = this.getSettablePaths({ global });
6101
- const fileContent = await readFileContentOrNull((0, import_node_path45.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6277
+ const fileContent = await readFileContentOrNull((0, import_node_path46.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6102
6278
  const json = JSON.parse(fileContent);
6103
6279
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6104
6280
  return new _ClaudecodeMcp({
@@ -6117,7 +6293,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6117
6293
  }) {
6118
6294
  const paths = this.getSettablePaths({ global });
6119
6295
  const fileContent = await readOrInitializeFileContent(
6120
- (0, import_node_path45.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6296
+ (0, import_node_path46.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6121
6297
  JSON.stringify({ mcpServers: {} }, null, 2)
6122
6298
  );
6123
6299
  const json = JSON.parse(fileContent);
@@ -6156,7 +6332,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6156
6332
  };
6157
6333
 
6158
6334
  // src/features/mcp/cline-mcp.ts
6159
- var import_node_path46 = require("path");
6335
+ var import_node_path47 = require("path");
6160
6336
  var ClineMcp = class _ClineMcp extends ToolMcp {
6161
6337
  json;
6162
6338
  constructor(params) {
@@ -6177,7 +6353,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
6177
6353
  validate = true
6178
6354
  }) {
6179
6355
  const fileContent = await readFileContent(
6180
- (0, import_node_path46.join)(
6356
+ (0, import_node_path47.join)(
6181
6357
  baseDir,
6182
6358
  this.getSettablePaths().relativeDirPath,
6183
6359
  this.getSettablePaths().relativeFilePath
@@ -6226,7 +6402,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
6226
6402
  };
6227
6403
 
6228
6404
  // src/features/mcp/codexcli-mcp.ts
6229
- var import_node_path47 = require("path");
6405
+ var import_node_path48 = require("path");
6230
6406
  var smolToml = __toESM(require("smol-toml"), 1);
6231
6407
  function convertFromCodexFormat(codexMcp) {
6232
6408
  const result = {};
@@ -6309,7 +6485,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6309
6485
  global = false
6310
6486
  }) {
6311
6487
  const paths = this.getSettablePaths({ global });
6312
- const fileContent = await readFileContentOrNull((0, import_node_path47.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
6488
+ const fileContent = await readFileContentOrNull((0, import_node_path48.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
6313
6489
  return new _CodexcliMcp({
6314
6490
  baseDir,
6315
6491
  relativeDirPath: paths.relativeDirPath,
@@ -6325,7 +6501,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6325
6501
  global = false
6326
6502
  }) {
6327
6503
  const paths = this.getSettablePaths({ global });
6328
- const configTomlFilePath = (0, import_node_path47.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6504
+ const configTomlFilePath = (0, import_node_path48.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6329
6505
  const configTomlFileContent = await readOrInitializeFileContent(
6330
6506
  configTomlFilePath,
6331
6507
  smolToml.stringify({})
@@ -6379,7 +6555,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6379
6555
  };
6380
6556
 
6381
6557
  // src/features/mcp/copilot-mcp.ts
6382
- var import_node_path48 = require("path");
6558
+ var import_node_path49 = require("path");
6383
6559
  function convertToCopilotFormat(mcpServers) {
6384
6560
  return { servers: mcpServers };
6385
6561
  }
@@ -6406,7 +6582,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
6406
6582
  validate = true
6407
6583
  }) {
6408
6584
  const fileContent = await readFileContent(
6409
- (0, import_node_path48.join)(
6585
+ (0, import_node_path49.join)(
6410
6586
  baseDir,
6411
6587
  this.getSettablePaths().relativeDirPath,
6412
6588
  this.getSettablePaths().relativeFilePath
@@ -6459,7 +6635,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
6459
6635
  };
6460
6636
 
6461
6637
  // src/features/mcp/copilotcli-mcp.ts
6462
- var import_node_path49 = require("path");
6638
+ var import_node_path50 = require("path");
6463
6639
  function addTypeField(mcpServers) {
6464
6640
  const result = {};
6465
6641
  for (const [name, server] of Object.entries(mcpServers)) {
@@ -6534,7 +6710,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
6534
6710
  global = false
6535
6711
  }) {
6536
6712
  const paths = this.getSettablePaths({ global });
6537
- const fileContent = await readFileContentOrNull((0, import_node_path49.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6713
+ const fileContent = await readFileContentOrNull((0, import_node_path50.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6538
6714
  const json = JSON.parse(fileContent);
6539
6715
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6540
6716
  return new _CopilotcliMcp({
@@ -6554,7 +6730,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
6554
6730
  }) {
6555
6731
  const paths = this.getSettablePaths({ global });
6556
6732
  const fileContent = await readOrInitializeFileContent(
6557
- (0, import_node_path49.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6733
+ (0, import_node_path50.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6558
6734
  JSON.stringify({ mcpServers: {} }, null, 2)
6559
6735
  );
6560
6736
  const json = JSON.parse(fileContent);
@@ -6596,7 +6772,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
6596
6772
  };
6597
6773
 
6598
6774
  // src/features/mcp/cursor-mcp.ts
6599
- var import_node_path50 = require("path");
6775
+ var import_node_path51 = require("path");
6600
6776
  var CURSOR_ENV_VAR_PATTERN = /\$\{env:([^}]+)\}/g;
6601
6777
  function isMcpServers(value) {
6602
6778
  return value !== void 0 && value !== null && typeof value === "object";
@@ -6646,7 +6822,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6646
6822
  this.json = JSON.parse(this.fileContent);
6647
6823
  } catch (error) {
6648
6824
  throw new Error(
6649
- `Failed to parse Cursor MCP config at ${(0, import_node_path50.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(error)}`,
6825
+ `Failed to parse Cursor MCP config at ${(0, import_node_path51.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(error)}`,
6650
6826
  { cause: error }
6651
6827
  );
6652
6828
  }
@@ -6672,14 +6848,14 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6672
6848
  global = false
6673
6849
  }) {
6674
6850
  const paths = this.getSettablePaths({ global });
6675
- const filePath = (0, import_node_path50.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6851
+ const filePath = (0, import_node_path51.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6676
6852
  const fileContent = await readFileContentOrNull(filePath) ?? '{"mcpServers":{}}';
6677
6853
  let json;
6678
6854
  try {
6679
6855
  json = JSON.parse(fileContent);
6680
6856
  } catch (error) {
6681
6857
  throw new Error(
6682
- `Failed to parse Cursor MCP config at ${(0, import_node_path50.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
6858
+ `Failed to parse Cursor MCP config at ${(0, import_node_path51.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
6683
6859
  { cause: error }
6684
6860
  );
6685
6861
  }
@@ -6701,7 +6877,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6701
6877
  }) {
6702
6878
  const paths = this.getSettablePaths({ global });
6703
6879
  const fileContent = await readOrInitializeFileContent(
6704
- (0, import_node_path50.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6880
+ (0, import_node_path51.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6705
6881
  JSON.stringify({ mcpServers: {} }, null, 2)
6706
6882
  );
6707
6883
  let json;
@@ -6709,7 +6885,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6709
6885
  json = JSON.parse(fileContent);
6710
6886
  } catch (error) {
6711
6887
  throw new Error(
6712
- `Failed to parse Cursor MCP config at ${(0, import_node_path50.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
6888
+ `Failed to parse Cursor MCP config at ${(0, import_node_path51.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
6713
6889
  { cause: error }
6714
6890
  );
6715
6891
  }
@@ -6757,62 +6933,145 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6757
6933
  }
6758
6934
  };
6759
6935
 
6760
- // src/features/mcp/factorydroid-mcp.ts
6761
- var import_node_path51 = require("path");
6762
- var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6936
+ // src/features/mcp/deepagents-mcp.ts
6937
+ var import_node_path52 = require("path");
6938
+ var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
6763
6939
  json;
6764
6940
  constructor(params) {
6765
6941
  super(params);
6766
- this.json = this.fileContent !== void 0 ? JSON.parse(this.fileContent) : {};
6942
+ this.json = JSON.parse(this.fileContent || "{}");
6767
6943
  }
6768
6944
  getJson() {
6769
6945
  return this.json;
6770
6946
  }
6771
- static getSettablePaths() {
6947
+ isDeletable() {
6948
+ return !this.global;
6949
+ }
6950
+ static getSettablePaths(_options = {}) {
6772
6951
  return {
6773
- relativeDirPath: ".factory",
6774
- relativeFilePath: "mcp.json"
6952
+ relativeDirPath: ".deepagents",
6953
+ relativeFilePath: ".mcp.json"
6775
6954
  };
6776
6955
  }
6777
6956
  static async fromFile({
6778
6957
  baseDir = process.cwd(),
6779
- validate = true
6958
+ validate = true,
6959
+ global = false
6780
6960
  }) {
6781
- const fileContent = await readFileContent(
6782
- (0, import_node_path51.join)(
6783
- baseDir,
6784
- this.getSettablePaths().relativeDirPath,
6785
- this.getSettablePaths().relativeFilePath
6786
- )
6787
- );
6788
- return new _FactorydroidMcp({
6961
+ const paths = this.getSettablePaths({ global });
6962
+ const fileContent = await readFileContentOrNull((0, import_node_path52.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6963
+ const json = JSON.parse(fileContent);
6964
+ const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6965
+ return new _DeepagentsMcp({
6789
6966
  baseDir,
6790
- relativeDirPath: this.getSettablePaths().relativeDirPath,
6791
- relativeFilePath: this.getSettablePaths().relativeFilePath,
6792
- fileContent,
6967
+ relativeDirPath: paths.relativeDirPath,
6968
+ relativeFilePath: paths.relativeFilePath,
6969
+ fileContent: JSON.stringify(newJson, null, 2),
6793
6970
  validate
6794
6971
  });
6795
6972
  }
6796
- static fromRulesyncMcp({
6973
+ static async fromRulesyncMcp({
6797
6974
  baseDir = process.cwd(),
6798
6975
  rulesyncMcp,
6799
- validate = true
6976
+ validate = true,
6977
+ global = false
6800
6978
  }) {
6801
- const json = rulesyncMcp.getJson();
6802
- const factorydroidConfig = {
6803
- mcpServers: json.mcpServers || {}
6804
- };
6805
- const fileContent = JSON.stringify(factorydroidConfig, null, 2);
6806
- return new _FactorydroidMcp({
6979
+ const paths = this.getSettablePaths({ global });
6980
+ const fileContent = await readOrInitializeFileContent(
6981
+ (0, import_node_path52.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6982
+ JSON.stringify({ mcpServers: {} }, null, 2)
6983
+ );
6984
+ const json = JSON.parse(fileContent);
6985
+ const mcpJson = { ...json, mcpServers: rulesyncMcp.getMcpServers() };
6986
+ return new _DeepagentsMcp({
6807
6987
  baseDir,
6808
- relativeDirPath: this.getSettablePaths().relativeDirPath,
6809
- relativeFilePath: this.getSettablePaths().relativeFilePath,
6810
- fileContent,
6988
+ relativeDirPath: paths.relativeDirPath,
6989
+ relativeFilePath: paths.relativeFilePath,
6990
+ fileContent: JSON.stringify(mcpJson, null, 2),
6811
6991
  validate
6812
6992
  });
6813
6993
  }
6814
6994
  toRulesyncMcp() {
6815
- return this.toRulesyncMcpDefault();
6995
+ return this.toRulesyncMcpDefault({
6996
+ fileContent: JSON.stringify({ mcpServers: this.json.mcpServers }, null, 2)
6997
+ });
6998
+ }
6999
+ validate() {
7000
+ return { success: true, error: null };
7001
+ }
7002
+ static forDeletion({
7003
+ baseDir = process.cwd(),
7004
+ relativeDirPath,
7005
+ relativeFilePath,
7006
+ global = false
7007
+ }) {
7008
+ return new _DeepagentsMcp({
7009
+ baseDir,
7010
+ relativeDirPath,
7011
+ relativeFilePath,
7012
+ fileContent: "{}",
7013
+ validate: false,
7014
+ global
7015
+ });
7016
+ }
7017
+ };
7018
+
7019
+ // src/features/mcp/factorydroid-mcp.ts
7020
+ var import_node_path53 = require("path");
7021
+ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
7022
+ json;
7023
+ constructor(params) {
7024
+ super(params);
7025
+ this.json = this.fileContent !== void 0 ? JSON.parse(this.fileContent) : {};
7026
+ }
7027
+ getJson() {
7028
+ return this.json;
7029
+ }
7030
+ static getSettablePaths() {
7031
+ return {
7032
+ relativeDirPath: ".factory",
7033
+ relativeFilePath: "mcp.json"
7034
+ };
7035
+ }
7036
+ static async fromFile({
7037
+ baseDir = process.cwd(),
7038
+ validate = true
7039
+ }) {
7040
+ const fileContent = await readFileContent(
7041
+ (0, import_node_path53.join)(
7042
+ baseDir,
7043
+ this.getSettablePaths().relativeDirPath,
7044
+ this.getSettablePaths().relativeFilePath
7045
+ )
7046
+ );
7047
+ return new _FactorydroidMcp({
7048
+ baseDir,
7049
+ relativeDirPath: this.getSettablePaths().relativeDirPath,
7050
+ relativeFilePath: this.getSettablePaths().relativeFilePath,
7051
+ fileContent,
7052
+ validate
7053
+ });
7054
+ }
7055
+ static fromRulesyncMcp({
7056
+ baseDir = process.cwd(),
7057
+ rulesyncMcp,
7058
+ validate = true
7059
+ }) {
7060
+ const json = rulesyncMcp.getJson();
7061
+ const factorydroidConfig = {
7062
+ mcpServers: json.mcpServers || {}
7063
+ };
7064
+ const fileContent = JSON.stringify(factorydroidConfig, null, 2);
7065
+ return new _FactorydroidMcp({
7066
+ baseDir,
7067
+ relativeDirPath: this.getSettablePaths().relativeDirPath,
7068
+ relativeFilePath: this.getSettablePaths().relativeFilePath,
7069
+ fileContent,
7070
+ validate
7071
+ });
7072
+ }
7073
+ toRulesyncMcp() {
7074
+ return this.toRulesyncMcpDefault();
6816
7075
  }
6817
7076
  validate() {
6818
7077
  return { success: true, error: null };
@@ -6833,7 +7092,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6833
7092
  };
6834
7093
 
6835
7094
  // src/features/mcp/geminicli-mcp.ts
6836
- var import_node_path52 = require("path");
7095
+ var import_node_path54 = require("path");
6837
7096
  var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6838
7097
  json;
6839
7098
  constructor(params) {
@@ -6861,7 +7120,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6861
7120
  global = false
6862
7121
  }) {
6863
7122
  const paths = this.getSettablePaths({ global });
6864
- const fileContent = await readFileContentOrNull((0, import_node_path52.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7123
+ const fileContent = await readFileContentOrNull((0, import_node_path54.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6865
7124
  const json = JSON.parse(fileContent);
6866
7125
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6867
7126
  return new _GeminiCliMcp({
@@ -6880,7 +7139,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6880
7139
  }) {
6881
7140
  const paths = this.getSettablePaths({ global });
6882
7141
  const fileContent = await readOrInitializeFileContent(
6883
- (0, import_node_path52.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7142
+ (0, import_node_path54.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6884
7143
  JSON.stringify({ mcpServers: {} }, null, 2)
6885
7144
  );
6886
7145
  const json = JSON.parse(fileContent);
@@ -6925,7 +7184,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6925
7184
  };
6926
7185
 
6927
7186
  // src/features/mcp/junie-mcp.ts
6928
- var import_node_path53 = require("path");
7187
+ var import_node_path55 = require("path");
6929
7188
  var JunieMcp = class _JunieMcp extends ToolMcp {
6930
7189
  json;
6931
7190
  constructor(params) {
@@ -6937,7 +7196,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6937
7196
  }
6938
7197
  static getSettablePaths() {
6939
7198
  return {
6940
- relativeDirPath: (0, import_node_path53.join)(".junie", "mcp"),
7199
+ relativeDirPath: (0, import_node_path55.join)(".junie", "mcp"),
6941
7200
  relativeFilePath: "mcp.json"
6942
7201
  };
6943
7202
  }
@@ -6946,7 +7205,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6946
7205
  validate = true
6947
7206
  }) {
6948
7207
  const fileContent = await readFileContent(
6949
- (0, import_node_path53.join)(
7208
+ (0, import_node_path55.join)(
6950
7209
  baseDir,
6951
7210
  this.getSettablePaths().relativeDirPath,
6952
7211
  this.getSettablePaths().relativeFilePath
@@ -6995,7 +7254,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6995
7254
  };
6996
7255
 
6997
7256
  // src/features/mcp/kilo-mcp.ts
6998
- var import_node_path54 = require("path");
7257
+ var import_node_path56 = require("path");
6999
7258
  var KiloMcp = class _KiloMcp extends ToolMcp {
7000
7259
  json;
7001
7260
  constructor(params) {
@@ -7016,7 +7275,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
7016
7275
  validate = true
7017
7276
  }) {
7018
7277
  const paths = this.getSettablePaths();
7019
- const fileContent = await readFileContentOrNull((0, import_node_path54.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7278
+ const fileContent = await readFileContentOrNull((0, import_node_path56.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7020
7279
  return new _KiloMcp({
7021
7280
  baseDir,
7022
7281
  relativeDirPath: paths.relativeDirPath,
@@ -7064,7 +7323,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
7064
7323
  };
7065
7324
 
7066
7325
  // src/features/mcp/kiro-mcp.ts
7067
- var import_node_path55 = require("path");
7326
+ var import_node_path57 = require("path");
7068
7327
  var KiroMcp = class _KiroMcp extends ToolMcp {
7069
7328
  json;
7070
7329
  constructor(params) {
@@ -7076,7 +7335,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
7076
7335
  }
7077
7336
  static getSettablePaths() {
7078
7337
  return {
7079
- relativeDirPath: (0, import_node_path55.join)(".kiro", "settings"),
7338
+ relativeDirPath: (0, import_node_path57.join)(".kiro", "settings"),
7080
7339
  relativeFilePath: "mcp.json"
7081
7340
  };
7082
7341
  }
@@ -7085,7 +7344,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
7085
7344
  validate = true
7086
7345
  }) {
7087
7346
  const paths = this.getSettablePaths();
7088
- const fileContent = await readFileContentOrNull((0, import_node_path55.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7347
+ const fileContent = await readFileContentOrNull((0, import_node_path57.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7089
7348
  return new _KiroMcp({
7090
7349
  baseDir,
7091
7350
  relativeDirPath: paths.relativeDirPath,
@@ -7133,7 +7392,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
7133
7392
  };
7134
7393
 
7135
7394
  // src/features/mcp/opencode-mcp.ts
7136
- var import_node_path56 = require("path");
7395
+ var import_node_path58 = require("path");
7137
7396
  var import_jsonc_parser2 = require("jsonc-parser");
7138
7397
  var import_mini22 = require("zod/mini");
7139
7398
  var OpencodeMcpLocalServerSchema = import_mini22.z.object({
@@ -7274,7 +7533,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7274
7533
  static getSettablePaths({ global } = {}) {
7275
7534
  if (global) {
7276
7535
  return {
7277
- relativeDirPath: (0, import_node_path56.join)(".config", "opencode"),
7536
+ relativeDirPath: (0, import_node_path58.join)(".config", "opencode"),
7278
7537
  relativeFilePath: "opencode.json"
7279
7538
  };
7280
7539
  }
@@ -7289,11 +7548,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7289
7548
  global = false
7290
7549
  }) {
7291
7550
  const basePaths = this.getSettablePaths({ global });
7292
- const jsonDir = (0, import_node_path56.join)(baseDir, basePaths.relativeDirPath);
7551
+ const jsonDir = (0, import_node_path58.join)(baseDir, basePaths.relativeDirPath);
7293
7552
  let fileContent = null;
7294
7553
  let relativeFilePath = "opencode.jsonc";
7295
- const jsoncPath = (0, import_node_path56.join)(jsonDir, "opencode.jsonc");
7296
- const jsonPath = (0, import_node_path56.join)(jsonDir, "opencode.json");
7554
+ const jsoncPath = (0, import_node_path58.join)(jsonDir, "opencode.jsonc");
7555
+ const jsonPath = (0, import_node_path58.join)(jsonDir, "opencode.json");
7297
7556
  fileContent = await readFileContentOrNull(jsoncPath);
7298
7557
  if (!fileContent) {
7299
7558
  fileContent = await readFileContentOrNull(jsonPath);
@@ -7319,11 +7578,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7319
7578
  global = false
7320
7579
  }) {
7321
7580
  const basePaths = this.getSettablePaths({ global });
7322
- const jsonDir = (0, import_node_path56.join)(baseDir, basePaths.relativeDirPath);
7581
+ const jsonDir = (0, import_node_path58.join)(baseDir, basePaths.relativeDirPath);
7323
7582
  let fileContent = null;
7324
7583
  let relativeFilePath = "opencode.jsonc";
7325
- const jsoncPath = (0, import_node_path56.join)(jsonDir, "opencode.jsonc");
7326
- const jsonPath = (0, import_node_path56.join)(jsonDir, "opencode.json");
7584
+ const jsoncPath = (0, import_node_path58.join)(jsonDir, "opencode.jsonc");
7585
+ const jsonPath = (0, import_node_path58.join)(jsonDir, "opencode.json");
7327
7586
  fileContent = await readFileContentOrNull(jsoncPath);
7328
7587
  if (!fileContent) {
7329
7588
  fileContent = await readFileContentOrNull(jsonPath);
@@ -7384,7 +7643,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7384
7643
  };
7385
7644
 
7386
7645
  // src/features/mcp/roo-mcp.ts
7387
- var import_node_path57 = require("path");
7646
+ var import_node_path59 = require("path");
7388
7647
  function isRooMcpServers(value) {
7389
7648
  return value !== void 0 && value !== null && typeof value === "object";
7390
7649
  }
@@ -7436,7 +7695,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
7436
7695
  validate = true
7437
7696
  }) {
7438
7697
  const fileContent = await readFileContent(
7439
- (0, import_node_path57.join)(
7698
+ (0, import_node_path59.join)(
7440
7699
  baseDir,
7441
7700
  this.getSettablePaths().relativeDirPath,
7442
7701
  this.getSettablePaths().relativeFilePath
@@ -7500,6 +7759,7 @@ var mcpProcessorToolTargetTuple = [
7500
7759
  "copilot",
7501
7760
  "copilotcli",
7502
7761
  "cursor",
7762
+ "deepagents",
7503
7763
  "factorydroid",
7504
7764
  "geminicli",
7505
7765
  "kilo",
@@ -7594,6 +7854,18 @@ var toolMcpFactories = /* @__PURE__ */ new Map([
7594
7854
  }
7595
7855
  }
7596
7856
  ],
7857
+ [
7858
+ "deepagents",
7859
+ {
7860
+ class: DeepagentsMcp,
7861
+ meta: {
7862
+ supportsProject: true,
7863
+ supportsGlobal: true,
7864
+ supportsEnabledTools: false,
7865
+ supportsDisabledTools: false
7866
+ }
7867
+ }
7868
+ ],
7597
7869
  [
7598
7870
  "factorydroid",
7599
7871
  {
@@ -7823,25 +8095,25 @@ var McpProcessor = class extends FeatureProcessor {
7823
8095
  };
7824
8096
 
7825
8097
  // src/features/rules/rules-processor.ts
7826
- var import_node_path119 = require("path");
8098
+ var import_node_path124 = require("path");
7827
8099
  var import_toon = require("@toon-format/toon");
7828
- var import_mini57 = require("zod/mini");
8100
+ var import_mini59 = require("zod/mini");
7829
8101
 
7830
8102
  // src/constants/general.ts
7831
8103
  var SKILL_FILE_NAME = "SKILL.md";
7832
8104
 
7833
8105
  // src/features/skills/agentsmd-skill.ts
7834
- var import_node_path61 = require("path");
8106
+ var import_node_path63 = require("path");
7835
8107
 
7836
8108
  // src/features/skills/simulated-skill.ts
7837
- var import_node_path60 = require("path");
8109
+ var import_node_path62 = require("path");
7838
8110
  var import_mini24 = require("zod/mini");
7839
8111
 
7840
8112
  // src/features/skills/tool-skill.ts
7841
- var import_node_path59 = require("path");
8113
+ var import_node_path61 = require("path");
7842
8114
 
7843
8115
  // src/types/ai-dir.ts
7844
- var import_node_path58 = __toESM(require("path"), 1);
8116
+ var import_node_path60 = __toESM(require("path"), 1);
7845
8117
  var AiDir = class {
7846
8118
  /**
7847
8119
  * @example "."
@@ -7875,7 +8147,7 @@ var AiDir = class {
7875
8147
  otherFiles = [],
7876
8148
  global = false
7877
8149
  }) {
7878
- if (dirName.includes(import_node_path58.default.sep) || dirName.includes("/") || dirName.includes("\\")) {
8150
+ if (dirName.includes(import_node_path60.default.sep) || dirName.includes("/") || dirName.includes("\\")) {
7879
8151
  throw new Error(`Directory name cannot contain path separators: dirName="${dirName}"`);
7880
8152
  }
7881
8153
  this.baseDir = baseDir;
@@ -7898,11 +8170,11 @@ var AiDir = class {
7898
8170
  return this.dirName;
7899
8171
  }
7900
8172
  getDirPath() {
7901
- const fullPath = import_node_path58.default.join(this.baseDir, this.relativeDirPath, this.dirName);
7902
- const resolvedFull = (0, import_node_path58.resolve)(fullPath);
7903
- const resolvedBase = (0, import_node_path58.resolve)(this.baseDir);
7904
- const rel = (0, import_node_path58.relative)(resolvedBase, resolvedFull);
7905
- if (rel.startsWith("..") || import_node_path58.default.isAbsolute(rel)) {
8173
+ const fullPath = import_node_path60.default.join(this.baseDir, this.relativeDirPath, this.dirName);
8174
+ const resolvedFull = (0, import_node_path60.resolve)(fullPath);
8175
+ const resolvedBase = (0, import_node_path60.resolve)(this.baseDir);
8176
+ const rel = (0, import_node_path60.relative)(resolvedBase, resolvedFull);
8177
+ if (rel.startsWith("..") || import_node_path60.default.isAbsolute(rel)) {
7906
8178
  throw new Error(
7907
8179
  `Path traversal detected: Final path escapes baseDir. baseDir="${this.baseDir}", relativeDirPath="${this.relativeDirPath}", dirName="${this.dirName}"`
7908
8180
  );
@@ -7916,7 +8188,7 @@ var AiDir = class {
7916
8188
  return this.otherFiles;
7917
8189
  }
7918
8190
  getRelativePathFromCwd() {
7919
- return import_node_path58.default.join(this.relativeDirPath, this.dirName);
8191
+ return import_node_path60.default.join(this.relativeDirPath, this.dirName);
7920
8192
  }
7921
8193
  getGlobal() {
7922
8194
  return this.global;
@@ -7935,15 +8207,15 @@ var AiDir = class {
7935
8207
  * @returns Array of files with their relative paths and buffers
7936
8208
  */
7937
8209
  static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
7938
- const dirPath = (0, import_node_path58.join)(baseDir, relativeDirPath, dirName);
7939
- const glob = (0, import_node_path58.join)(dirPath, "**", "*");
8210
+ const dirPath = (0, import_node_path60.join)(baseDir, relativeDirPath, dirName);
8211
+ const glob = (0, import_node_path60.join)(dirPath, "**", "*");
7940
8212
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
7941
- const filteredPaths = filePaths.filter((filePath) => (0, import_node_path58.basename)(filePath) !== excludeFileName);
8213
+ const filteredPaths = filePaths.filter((filePath) => (0, import_node_path60.basename)(filePath) !== excludeFileName);
7942
8214
  const files = await Promise.all(
7943
8215
  filteredPaths.map(async (filePath) => {
7944
8216
  const fileBuffer = await readFileBuffer(filePath);
7945
8217
  return {
7946
- relativeFilePathToDirPath: (0, import_node_path58.relative)(dirPath, filePath),
8218
+ relativeFilePathToDirPath: (0, import_node_path60.relative)(dirPath, filePath),
7947
8219
  fileBuffer
7948
8220
  };
7949
8221
  })
@@ -8034,8 +8306,8 @@ var ToolSkill = class extends AiDir {
8034
8306
  }) {
8035
8307
  const settablePaths = getSettablePaths({ global });
8036
8308
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
8037
- const skillDirPath = (0, import_node_path59.join)(baseDir, actualRelativeDirPath, dirName);
8038
- const skillFilePath = (0, import_node_path59.join)(skillDirPath, SKILL_FILE_NAME);
8309
+ const skillDirPath = (0, import_node_path61.join)(baseDir, actualRelativeDirPath, dirName);
8310
+ const skillFilePath = (0, import_node_path61.join)(skillDirPath, SKILL_FILE_NAME);
8039
8311
  if (!await fileExists(skillFilePath)) {
8040
8312
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
8041
8313
  }
@@ -8059,7 +8331,7 @@ var ToolSkill = class extends AiDir {
8059
8331
  }
8060
8332
  requireMainFileFrontmatter() {
8061
8333
  if (!this.mainFile?.frontmatter) {
8062
- throw new Error(`Frontmatter is not defined in ${(0, import_node_path59.join)(this.relativeDirPath, this.dirName)}`);
8334
+ throw new Error(`Frontmatter is not defined in ${(0, import_node_path61.join)(this.relativeDirPath, this.dirName)}`);
8063
8335
  }
8064
8336
  return this.mainFile.frontmatter;
8065
8337
  }
@@ -8099,7 +8371,7 @@ var SimulatedSkill = class extends ToolSkill {
8099
8371
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
8100
8372
  if (!result.success) {
8101
8373
  throw new Error(
8102
- `Invalid frontmatter in ${(0, import_node_path60.join)(relativeDirPath, dirName)}: ${formatError(result.error)}`
8374
+ `Invalid frontmatter in ${(0, import_node_path62.join)(relativeDirPath, dirName)}: ${formatError(result.error)}`
8103
8375
  );
8104
8376
  }
8105
8377
  }
@@ -8158,8 +8430,8 @@ var SimulatedSkill = class extends ToolSkill {
8158
8430
  }) {
8159
8431
  const settablePaths = this.getSettablePaths();
8160
8432
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
8161
- const skillDirPath = (0, import_node_path60.join)(baseDir, actualRelativeDirPath, dirName);
8162
- const skillFilePath = (0, import_node_path60.join)(skillDirPath, SKILL_FILE_NAME);
8433
+ const skillDirPath = (0, import_node_path62.join)(baseDir, actualRelativeDirPath, dirName);
8434
+ const skillFilePath = (0, import_node_path62.join)(skillDirPath, SKILL_FILE_NAME);
8163
8435
  if (!await fileExists(skillFilePath)) {
8164
8436
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
8165
8437
  }
@@ -8236,7 +8508,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
8236
8508
  throw new Error("AgentsmdSkill does not support global mode.");
8237
8509
  }
8238
8510
  return {
8239
- relativeDirPath: (0, import_node_path61.join)(".agents", "skills")
8511
+ relativeDirPath: (0, import_node_path63.join)(".agents", "skills")
8240
8512
  };
8241
8513
  }
8242
8514
  static async fromDir(params) {
@@ -8263,11 +8535,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
8263
8535
  };
8264
8536
 
8265
8537
  // src/features/skills/factorydroid-skill.ts
8266
- var import_node_path62 = require("path");
8538
+ var import_node_path64 = require("path");
8267
8539
  var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
8268
8540
  static getSettablePaths(_options) {
8269
8541
  return {
8270
- relativeDirPath: (0, import_node_path62.join)(".factory", "skills")
8542
+ relativeDirPath: (0, import_node_path64.join)(".factory", "skills")
8271
8543
  };
8272
8544
  }
8273
8545
  static async fromDir(params) {
@@ -8294,11 +8566,11 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
8294
8566
  };
8295
8567
 
8296
8568
  // src/features/skills/skills-processor.ts
8297
- var import_node_path80 = require("path");
8298
- var import_mini40 = require("zod/mini");
8569
+ var import_node_path83 = require("path");
8570
+ var import_mini41 = require("zod/mini");
8299
8571
 
8300
8572
  // src/types/dir-feature-processor.ts
8301
- var import_node_path63 = require("path");
8573
+ var import_node_path65 = require("path");
8302
8574
  var DirFeatureProcessor = class {
8303
8575
  baseDir;
8304
8576
  dryRun;
@@ -8338,7 +8610,7 @@ var DirFeatureProcessor = class {
8338
8610
  const mainFile = aiDir.getMainFile();
8339
8611
  let mainFileContent;
8340
8612
  if (mainFile) {
8341
- const mainFilePath = (0, import_node_path63.join)(dirPath, mainFile.name);
8613
+ const mainFilePath = (0, import_node_path65.join)(dirPath, mainFile.name);
8342
8614
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter, {
8343
8615
  avoidBlockScalars: this.avoidBlockScalars
8344
8616
  });
@@ -8354,7 +8626,7 @@ var DirFeatureProcessor = class {
8354
8626
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
8355
8627
  otherFileContents.push(contentWithNewline);
8356
8628
  if (!dirHasChanges) {
8357
- const filePath = (0, import_node_path63.join)(dirPath, file.relativeFilePathToDirPath);
8629
+ const filePath = (0, import_node_path65.join)(dirPath, file.relativeFilePathToDirPath);
8358
8630
  const existingContent = await readFileContentOrNull(filePath);
8359
8631
  if (existingContent !== contentWithNewline) {
8360
8632
  dirHasChanges = true;
@@ -8368,24 +8640,24 @@ var DirFeatureProcessor = class {
8368
8640
  if (this.dryRun) {
8369
8641
  this.logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
8370
8642
  if (mainFile) {
8371
- this.logger.info(`[DRY RUN] Would write: ${(0, import_node_path63.join)(dirPath, mainFile.name)}`);
8372
- changedPaths.push((0, import_node_path63.join)(relativeDir, mainFile.name));
8643
+ this.logger.info(`[DRY RUN] Would write: ${(0, import_node_path65.join)(dirPath, mainFile.name)}`);
8644
+ changedPaths.push((0, import_node_path65.join)(relativeDir, mainFile.name));
8373
8645
  }
8374
8646
  for (const file of otherFiles) {
8375
8647
  this.logger.info(
8376
- `[DRY RUN] Would write: ${(0, import_node_path63.join)(dirPath, file.relativeFilePathToDirPath)}`
8648
+ `[DRY RUN] Would write: ${(0, import_node_path65.join)(dirPath, file.relativeFilePathToDirPath)}`
8377
8649
  );
8378
- changedPaths.push((0, import_node_path63.join)(relativeDir, file.relativeFilePathToDirPath));
8650
+ changedPaths.push((0, import_node_path65.join)(relativeDir, file.relativeFilePathToDirPath));
8379
8651
  }
8380
8652
  } else {
8381
8653
  await ensureDir(dirPath);
8382
8654
  if (mainFile && mainFileContent) {
8383
- const mainFilePath = (0, import_node_path63.join)(dirPath, mainFile.name);
8655
+ const mainFilePath = (0, import_node_path65.join)(dirPath, mainFile.name);
8384
8656
  await writeFileContent(mainFilePath, mainFileContent);
8385
- changedPaths.push((0, import_node_path63.join)(relativeDir, mainFile.name));
8657
+ changedPaths.push((0, import_node_path65.join)(relativeDir, mainFile.name));
8386
8658
  }
8387
8659
  for (const [i, file] of otherFiles.entries()) {
8388
- const filePath = (0, import_node_path63.join)(dirPath, file.relativeFilePathToDirPath);
8660
+ const filePath = (0, import_node_path65.join)(dirPath, file.relativeFilePathToDirPath);
8389
8661
  const content = otherFileContents[i];
8390
8662
  if (content === void 0) {
8391
8663
  throw new Error(
@@ -8393,7 +8665,7 @@ var DirFeatureProcessor = class {
8393
8665
  );
8394
8666
  }
8395
8667
  await writeFileContent(filePath, content);
8396
- changedPaths.push((0, import_node_path63.join)(relativeDir, file.relativeFilePathToDirPath));
8668
+ changedPaths.push((0, import_node_path65.join)(relativeDir, file.relativeFilePathToDirPath));
8397
8669
  }
8398
8670
  }
8399
8671
  changedCount++;
@@ -8425,11 +8697,11 @@ var DirFeatureProcessor = class {
8425
8697
  };
8426
8698
 
8427
8699
  // src/features/skills/agentsskills-skill.ts
8428
- var import_node_path65 = require("path");
8700
+ var import_node_path67 = require("path");
8429
8701
  var import_mini26 = require("zod/mini");
8430
8702
 
8431
8703
  // src/features/skills/rulesync-skill.ts
8432
- var import_node_path64 = require("path");
8704
+ var import_node_path66 = require("path");
8433
8705
  var import_mini25 = require("zod/mini");
8434
8706
  var RulesyncSkillFrontmatterSchemaInternal = import_mini25.z.looseObject({
8435
8707
  name: import_mini25.z.string(),
@@ -8452,6 +8724,11 @@ var RulesyncSkillFrontmatterSchemaInternal = import_mini25.z.looseObject({
8452
8724
  "allowed-tools": import_mini25.z.optional(import_mini25.z.array(import_mini25.z.string()))
8453
8725
  })
8454
8726
  ),
8727
+ deepagents: import_mini25.z.optional(
8728
+ import_mini25.z.looseObject({
8729
+ "allowed-tools": import_mini25.z.optional(import_mini25.z.array(import_mini25.z.string()))
8730
+ })
8731
+ ),
8455
8732
  copilot: import_mini25.z.optional(
8456
8733
  import_mini25.z.looseObject({
8457
8734
  license: import_mini25.z.optional(import_mini25.z.string())
@@ -8498,7 +8775,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
8498
8775
  }
8499
8776
  getFrontmatter() {
8500
8777
  if (!this.mainFile?.frontmatter) {
8501
- throw new Error(`Frontmatter is not defined in ${(0, import_node_path64.join)(this.relativeDirPath, this.dirName)}`);
8778
+ throw new Error(`Frontmatter is not defined in ${(0, import_node_path66.join)(this.relativeDirPath, this.dirName)}`);
8502
8779
  }
8503
8780
  const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
8504
8781
  return result;
@@ -8524,8 +8801,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
8524
8801
  dirName,
8525
8802
  global = false
8526
8803
  }) {
8527
- const skillDirPath = (0, import_node_path64.join)(baseDir, relativeDirPath, dirName);
8528
- const skillFilePath = (0, import_node_path64.join)(skillDirPath, SKILL_FILE_NAME);
8804
+ const skillDirPath = (0, import_node_path66.join)(baseDir, relativeDirPath, dirName);
8805
+ const skillFilePath = (0, import_node_path66.join)(skillDirPath, SKILL_FILE_NAME);
8529
8806
  if (!await fileExists(skillFilePath)) {
8530
8807
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
8531
8808
  }
@@ -8562,7 +8839,7 @@ var AgentsSkillsSkillFrontmatterSchema = import_mini26.z.looseObject({
8562
8839
  var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8563
8840
  constructor({
8564
8841
  baseDir = process.cwd(),
8565
- relativeDirPath = (0, import_node_path65.join)(".agents", "skills"),
8842
+ relativeDirPath = (0, import_node_path67.join)(".agents", "skills"),
8566
8843
  dirName,
8567
8844
  frontmatter,
8568
8845
  body,
@@ -8594,7 +8871,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8594
8871
  throw new Error("AgentsSkillsSkill does not support global mode.");
8595
8872
  }
8596
8873
  return {
8597
- relativeDirPath: (0, import_node_path65.join)(".agents", "skills")
8874
+ relativeDirPath: (0, import_node_path67.join)(".agents", "skills")
8598
8875
  };
8599
8876
  }
8600
8877
  getFrontmatter() {
@@ -8674,9 +8951,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8674
8951
  });
8675
8952
  const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8676
8953
  if (!result.success) {
8677
- const skillDirPath = (0, import_node_path65.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8954
+ const skillDirPath = (0, import_node_path67.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8678
8955
  throw new Error(
8679
- `Invalid frontmatter in ${(0, import_node_path65.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8956
+ `Invalid frontmatter in ${(0, import_node_path67.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8680
8957
  );
8681
8958
  }
8682
8959
  return new _AgentsSkillsSkill({
@@ -8711,7 +8988,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8711
8988
  };
8712
8989
 
8713
8990
  // src/features/skills/antigravity-skill.ts
8714
- var import_node_path66 = require("path");
8991
+ var import_node_path68 = require("path");
8715
8992
  var import_mini27 = require("zod/mini");
8716
8993
  var AntigravitySkillFrontmatterSchema = import_mini27.z.looseObject({
8717
8994
  name: import_mini27.z.string(),
@@ -8720,7 +8997,7 @@ var AntigravitySkillFrontmatterSchema = import_mini27.z.looseObject({
8720
8997
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8721
8998
  constructor({
8722
8999
  baseDir = process.cwd(),
8723
- relativeDirPath = (0, import_node_path66.join)(".agent", "skills"),
9000
+ relativeDirPath = (0, import_node_path68.join)(".agent", "skills"),
8724
9001
  dirName,
8725
9002
  frontmatter,
8726
9003
  body,
@@ -8752,11 +9029,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8752
9029
  } = {}) {
8753
9030
  if (global) {
8754
9031
  return {
8755
- relativeDirPath: (0, import_node_path66.join)(".gemini", "antigravity", "skills")
9032
+ relativeDirPath: (0, import_node_path68.join)(".gemini", "antigravity", "skills")
8756
9033
  };
8757
9034
  }
8758
9035
  return {
8759
- relativeDirPath: (0, import_node_path66.join)(".agent", "skills")
9036
+ relativeDirPath: (0, import_node_path68.join)(".agent", "skills")
8760
9037
  };
8761
9038
  }
8762
9039
  getFrontmatter() {
@@ -8836,9 +9113,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8836
9113
  });
8837
9114
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
8838
9115
  if (!result.success) {
8839
- const skillDirPath = (0, import_node_path66.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9116
+ const skillDirPath = (0, import_node_path68.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8840
9117
  throw new Error(
8841
- `Invalid frontmatter in ${(0, import_node_path66.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9118
+ `Invalid frontmatter in ${(0, import_node_path68.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8842
9119
  );
8843
9120
  }
8844
9121
  return new _AntigravitySkill({
@@ -8872,7 +9149,7 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8872
9149
  };
8873
9150
 
8874
9151
  // src/features/skills/claudecode-skill.ts
8875
- var import_node_path67 = require("path");
9152
+ var import_node_path69 = require("path");
8876
9153
  var import_mini28 = require("zod/mini");
8877
9154
  var ClaudecodeSkillFrontmatterSchema = import_mini28.z.looseObject({
8878
9155
  name: import_mini28.z.string(),
@@ -8884,7 +9161,7 @@ var ClaudecodeSkillFrontmatterSchema = import_mini28.z.looseObject({
8884
9161
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8885
9162
  constructor({
8886
9163
  baseDir = process.cwd(),
8887
- relativeDirPath = (0, import_node_path67.join)(".claude", "skills"),
9164
+ relativeDirPath = (0, import_node_path69.join)(".claude", "skills"),
8888
9165
  dirName,
8889
9166
  frontmatter,
8890
9167
  body,
@@ -8915,7 +9192,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8915
9192
  global: _global = false
8916
9193
  } = {}) {
8917
9194
  return {
8918
- relativeDirPath: (0, import_node_path67.join)(".claude", "skills")
9195
+ relativeDirPath: (0, import_node_path69.join)(".claude", "skills")
8919
9196
  };
8920
9197
  }
8921
9198
  getFrontmatter() {
@@ -9012,9 +9289,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
9012
9289
  });
9013
9290
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9014
9291
  if (!result.success) {
9015
- const skillDirPath = (0, import_node_path67.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9292
+ const skillDirPath = (0, import_node_path69.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9016
9293
  throw new Error(
9017
- `Invalid frontmatter in ${(0, import_node_path67.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9294
+ `Invalid frontmatter in ${(0, import_node_path69.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9018
9295
  );
9019
9296
  }
9020
9297
  return new _ClaudecodeSkill({
@@ -9048,7 +9325,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
9048
9325
  };
9049
9326
 
9050
9327
  // src/features/skills/cline-skill.ts
9051
- var import_node_path68 = require("path");
9328
+ var import_node_path70 = require("path");
9052
9329
  var import_mini29 = require("zod/mini");
9053
9330
  var ClineSkillFrontmatterSchema = import_mini29.z.looseObject({
9054
9331
  name: import_mini29.z.string(),
@@ -9057,7 +9334,7 @@ var ClineSkillFrontmatterSchema = import_mini29.z.looseObject({
9057
9334
  var ClineSkill = class _ClineSkill extends ToolSkill {
9058
9335
  constructor({
9059
9336
  baseDir = process.cwd(),
9060
- relativeDirPath = (0, import_node_path68.join)(".cline", "skills"),
9337
+ relativeDirPath = (0, import_node_path70.join)(".cline", "skills"),
9061
9338
  dirName,
9062
9339
  frontmatter,
9063
9340
  body,
@@ -9086,7 +9363,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
9086
9363
  }
9087
9364
  static getSettablePaths(_options = {}) {
9088
9365
  return {
9089
- relativeDirPath: (0, import_node_path68.join)(".cline", "skills")
9366
+ relativeDirPath: (0, import_node_path70.join)(".cline", "skills")
9090
9367
  };
9091
9368
  }
9092
9369
  getFrontmatter() {
@@ -9174,13 +9451,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
9174
9451
  });
9175
9452
  const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9176
9453
  if (!result.success) {
9177
- const skillDirPath = (0, import_node_path68.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9454
+ const skillDirPath = (0, import_node_path70.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9178
9455
  throw new Error(
9179
- `Invalid frontmatter in ${(0, import_node_path68.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9456
+ `Invalid frontmatter in ${(0, import_node_path70.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9180
9457
  );
9181
9458
  }
9182
9459
  if (result.data.name !== loaded.dirName) {
9183
- const skillFilePath = (0, import_node_path68.join)(
9460
+ const skillFilePath = (0, import_node_path70.join)(
9184
9461
  loaded.baseDir,
9185
9462
  loaded.relativeDirPath,
9186
9463
  loaded.dirName,
@@ -9221,7 +9498,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
9221
9498
  };
9222
9499
 
9223
9500
  // src/features/skills/codexcli-skill.ts
9224
- var import_node_path69 = require("path");
9501
+ var import_node_path71 = require("path");
9225
9502
  var import_mini30 = require("zod/mini");
9226
9503
  var CodexCliSkillFrontmatterSchema = import_mini30.z.looseObject({
9227
9504
  name: import_mini30.z.string(),
@@ -9235,7 +9512,7 @@ var CodexCliSkillFrontmatterSchema = import_mini30.z.looseObject({
9235
9512
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
9236
9513
  constructor({
9237
9514
  baseDir = process.cwd(),
9238
- relativeDirPath = (0, import_node_path69.join)(".codex", "skills"),
9515
+ relativeDirPath = (0, import_node_path71.join)(".codex", "skills"),
9239
9516
  dirName,
9240
9517
  frontmatter,
9241
9518
  body,
@@ -9266,7 +9543,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
9266
9543
  global: _global = false
9267
9544
  } = {}) {
9268
9545
  return {
9269
- relativeDirPath: (0, import_node_path69.join)(".codex", "skills")
9546
+ relativeDirPath: (0, import_node_path71.join)(".codex", "skills")
9270
9547
  };
9271
9548
  }
9272
9549
  getFrontmatter() {
@@ -9356,9 +9633,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
9356
9633
  });
9357
9634
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9358
9635
  if (!result.success) {
9359
- const skillDirPath = (0, import_node_path69.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9636
+ const skillDirPath = (0, import_node_path71.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9360
9637
  throw new Error(
9361
- `Invalid frontmatter in ${(0, import_node_path69.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9638
+ `Invalid frontmatter in ${(0, import_node_path71.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9362
9639
  );
9363
9640
  }
9364
9641
  return new _CodexCliSkill({
@@ -9392,7 +9669,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
9392
9669
  };
9393
9670
 
9394
9671
  // src/features/skills/copilot-skill.ts
9395
- var import_node_path70 = require("path");
9672
+ var import_node_path72 = require("path");
9396
9673
  var import_mini31 = require("zod/mini");
9397
9674
  var CopilotSkillFrontmatterSchema = import_mini31.z.looseObject({
9398
9675
  name: import_mini31.z.string(),
@@ -9402,7 +9679,7 @@ var CopilotSkillFrontmatterSchema = import_mini31.z.looseObject({
9402
9679
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
9403
9680
  constructor({
9404
9681
  baseDir = process.cwd(),
9405
- relativeDirPath = (0, import_node_path70.join)(".github", "skills"),
9682
+ relativeDirPath = (0, import_node_path72.join)(".github", "skills"),
9406
9683
  dirName,
9407
9684
  frontmatter,
9408
9685
  body,
@@ -9434,7 +9711,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
9434
9711
  throw new Error("CopilotSkill does not support global mode.");
9435
9712
  }
9436
9713
  return {
9437
- relativeDirPath: (0, import_node_path70.join)(".github", "skills")
9714
+ relativeDirPath: (0, import_node_path72.join)(".github", "skills")
9438
9715
  };
9439
9716
  }
9440
9717
  getFrontmatter() {
@@ -9520,9 +9797,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
9520
9797
  });
9521
9798
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9522
9799
  if (!result.success) {
9523
- const skillDirPath = (0, import_node_path70.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9800
+ const skillDirPath = (0, import_node_path72.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9524
9801
  throw new Error(
9525
- `Invalid frontmatter in ${(0, import_node_path70.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9802
+ `Invalid frontmatter in ${(0, import_node_path72.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9526
9803
  );
9527
9804
  }
9528
9805
  return new _CopilotSkill({
@@ -9557,7 +9834,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
9557
9834
  };
9558
9835
 
9559
9836
  // src/features/skills/cursor-skill.ts
9560
- var import_node_path71 = require("path");
9837
+ var import_node_path73 = require("path");
9561
9838
  var import_mini32 = require("zod/mini");
9562
9839
  var CursorSkillFrontmatterSchema = import_mini32.z.looseObject({
9563
9840
  name: import_mini32.z.string(),
@@ -9566,7 +9843,7 @@ var CursorSkillFrontmatterSchema = import_mini32.z.looseObject({
9566
9843
  var CursorSkill = class _CursorSkill extends ToolSkill {
9567
9844
  constructor({
9568
9845
  baseDir = process.cwd(),
9569
- relativeDirPath = (0, import_node_path71.join)(".cursor", "skills"),
9846
+ relativeDirPath = (0, import_node_path73.join)(".cursor", "skills"),
9570
9847
  dirName,
9571
9848
  frontmatter,
9572
9849
  body,
@@ -9595,7 +9872,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
9595
9872
  }
9596
9873
  static getSettablePaths(_options) {
9597
9874
  return {
9598
- relativeDirPath: (0, import_node_path71.join)(".cursor", "skills")
9875
+ relativeDirPath: (0, import_node_path73.join)(".cursor", "skills")
9599
9876
  };
9600
9877
  }
9601
9878
  getFrontmatter() {
@@ -9675,9 +9952,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
9675
9952
  });
9676
9953
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9677
9954
  if (!result.success) {
9678
- const skillDirPath = (0, import_node_path71.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9955
+ const skillDirPath = (0, import_node_path73.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9679
9956
  throw new Error(
9680
- `Invalid frontmatter in ${(0, import_node_path71.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9957
+ `Invalid frontmatter in ${(0, import_node_path73.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9681
9958
  );
9682
9959
  }
9683
9960
  return new _CursorSkill({
@@ -9711,17 +9988,18 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
9711
9988
  }
9712
9989
  };
9713
9990
 
9714
- // src/features/skills/geminicli-skill.ts
9715
- var import_node_path72 = require("path");
9991
+ // src/features/skills/deepagents-skill.ts
9992
+ var import_node_path74 = require("path");
9716
9993
  var import_mini33 = require("zod/mini");
9717
- var GeminiCliSkillFrontmatterSchema = import_mini33.z.looseObject({
9994
+ var DeepagentsSkillFrontmatterSchema = import_mini33.z.looseObject({
9718
9995
  name: import_mini33.z.string(),
9719
- description: import_mini33.z.string()
9996
+ description: import_mini33.z.string(),
9997
+ "allowed-tools": import_mini33.z.optional(import_mini33.z.array(import_mini33.z.string()))
9720
9998
  });
9721
- var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9999
+ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
9722
10000
  constructor({
9723
10001
  baseDir = process.cwd(),
9724
- relativeDirPath = _GeminiCliSkill.getSettablePaths().relativeDirPath,
10002
+ relativeDirPath = (0, import_node_path74.join)(".deepagents", "skills"),
9725
10003
  dirName,
9726
10004
  frontmatter,
9727
10005
  body,
@@ -9748,28 +10026,29 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9748
10026
  }
9749
10027
  }
9750
10028
  }
9751
- static getSettablePaths({
9752
- global: _global = false
9753
- } = {}) {
10029
+ static getSettablePaths(options) {
10030
+ if (options?.global) {
10031
+ throw new Error("DeepagentsSkill does not support global mode.");
10032
+ }
9754
10033
  return {
9755
- relativeDirPath: (0, import_node_path72.join)(".gemini", "skills")
10034
+ relativeDirPath: (0, import_node_path74.join)(".deepagents", "skills")
9756
10035
  };
9757
10036
  }
9758
10037
  getFrontmatter() {
9759
- const result = GeminiCliSkillFrontmatterSchema.parse(this.requireMainFileFrontmatter());
10038
+ const result = DeepagentsSkillFrontmatterSchema.parse(this.requireMainFileFrontmatter());
9760
10039
  return result;
9761
10040
  }
9762
10041
  getBody() {
9763
10042
  return this.mainFile?.body ?? "";
9764
10043
  }
9765
10044
  validate() {
9766
- if (this.mainFile === void 0) {
10045
+ if (!this.mainFile) {
9767
10046
  return {
9768
10047
  success: false,
9769
10048
  error: new Error(`${this.getDirPath()}: ${SKILL_FILE_NAME} file does not exist`)
9770
10049
  };
9771
10050
  }
9772
- const result = GeminiCliSkillFrontmatterSchema.safeParse(this.mainFile.frontmatter);
10051
+ const result = DeepagentsSkillFrontmatterSchema.safeParse(this.mainFile.frontmatter);
9773
10052
  if (!result.success) {
9774
10053
  return {
9775
10054
  success: false,
@@ -9785,7 +10064,10 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9785
10064
  const rulesyncFrontmatter = {
9786
10065
  name: frontmatter.name,
9787
10066
  description: frontmatter.description,
9788
- targets: ["*"]
10067
+ targets: ["*"],
10068
+ ...frontmatter["allowed-tools"] && {
10069
+ deepagents: { "allowed-tools": frontmatter["allowed-tools"] }
10070
+ }
9789
10071
  };
9790
10072
  return new RulesyncSkill({
9791
10073
  baseDir: this.baseDir,
@@ -9804,17 +10086,18 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9804
10086
  validate = true,
9805
10087
  global = false
9806
10088
  }) {
9807
- const settablePaths = _GeminiCliSkill.getSettablePaths({ global });
10089
+ const settablePaths = _DeepagentsSkill.getSettablePaths({ global });
9808
10090
  const rulesyncFrontmatter = rulesyncSkill.getFrontmatter();
9809
- const geminiCliFrontmatter = {
10091
+ const deepagentsFrontmatter = {
9810
10092
  name: rulesyncFrontmatter.name,
9811
- description: rulesyncFrontmatter.description
10093
+ description: rulesyncFrontmatter.description,
10094
+ "allowed-tools": rulesyncFrontmatter.deepagents?.["allowed-tools"]
9812
10095
  };
9813
- return new _GeminiCliSkill({
10096
+ return new _DeepagentsSkill({
9814
10097
  baseDir,
9815
10098
  relativeDirPath: settablePaths.relativeDirPath,
9816
10099
  dirName: rulesyncSkill.getDirName(),
9817
- frontmatter: geminiCliFrontmatter,
10100
+ frontmatter: deepagentsFrontmatter,
9818
10101
  body: rulesyncSkill.getBody(),
9819
10102
  otherFiles: rulesyncSkill.getOtherFiles(),
9820
10103
  validate,
@@ -9823,21 +10106,21 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9823
10106
  }
9824
10107
  static isTargetedByRulesyncSkill(rulesyncSkill) {
9825
10108
  const targets = rulesyncSkill.getFrontmatter().targets;
9826
- return targets.includes("*") || targets.includes("geminicli");
10109
+ return targets.includes("*") || targets.includes("deepagents");
9827
10110
  }
9828
10111
  static async fromDir(params) {
9829
10112
  const loaded = await this.loadSkillDirContent({
9830
10113
  ...params,
9831
- getSettablePaths: _GeminiCliSkill.getSettablePaths
10114
+ getSettablePaths: _DeepagentsSkill.getSettablePaths
9832
10115
  });
9833
- const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10116
+ const result = DeepagentsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9834
10117
  if (!result.success) {
9835
- const skillDirPath = (0, import_node_path72.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10118
+ const skillDirPath = (0, import_node_path74.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9836
10119
  throw new Error(
9837
- `Invalid frontmatter in ${(0, import_node_path72.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10120
+ `Invalid frontmatter in ${(0, import_node_path74.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9838
10121
  );
9839
10122
  }
9840
- return new _GeminiCliSkill({
10123
+ return new _DeepagentsSkill({
9841
10124
  baseDir: loaded.baseDir,
9842
10125
  relativeDirPath: loaded.relativeDirPath,
9843
10126
  dirName: loaded.dirName,
@@ -9854,8 +10137,8 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9854
10137
  dirName,
9855
10138
  global = false
9856
10139
  }) {
9857
- const settablePaths = _GeminiCliSkill.getSettablePaths({ global });
9858
- return new _GeminiCliSkill({
10140
+ const settablePaths = _DeepagentsSkill.getSettablePaths({ global });
10141
+ return new _DeepagentsSkill({
9859
10142
  baseDir,
9860
10143
  relativeDirPath: relativeDirPath ?? settablePaths.relativeDirPath,
9861
10144
  dirName,
@@ -9868,17 +10151,17 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9868
10151
  }
9869
10152
  };
9870
10153
 
9871
- // src/features/skills/junie-skill.ts
9872
- var import_node_path73 = require("path");
10154
+ // src/features/skills/geminicli-skill.ts
10155
+ var import_node_path75 = require("path");
9873
10156
  var import_mini34 = require("zod/mini");
9874
- var JunieSkillFrontmatterSchema = import_mini34.z.looseObject({
10157
+ var GeminiCliSkillFrontmatterSchema = import_mini34.z.looseObject({
9875
10158
  name: import_mini34.z.string(),
9876
10159
  description: import_mini34.z.string()
9877
10160
  });
9878
- var JunieSkill = class _JunieSkill extends ToolSkill {
10161
+ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9879
10162
  constructor({
9880
10163
  baseDir = process.cwd(),
9881
- relativeDirPath = (0, import_node_path73.join)(".junie", "skills"),
10164
+ relativeDirPath = _GeminiCliSkill.getSettablePaths().relativeDirPath,
9882
10165
  dirName,
9883
10166
  frontmatter,
9884
10167
  body,
@@ -9905,29 +10188,28 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
9905
10188
  }
9906
10189
  }
9907
10190
  }
9908
- static getSettablePaths(options) {
9909
- if (options?.global) {
9910
- throw new Error("JunieSkill does not support global mode.");
9911
- }
10191
+ static getSettablePaths({
10192
+ global: _global = false
10193
+ } = {}) {
9912
10194
  return {
9913
- relativeDirPath: (0, import_node_path73.join)(".junie", "skills")
10195
+ relativeDirPath: (0, import_node_path75.join)(".gemini", "skills")
9914
10196
  };
9915
10197
  }
9916
10198
  getFrontmatter() {
9917
- const result = JunieSkillFrontmatterSchema.parse(this.requireMainFileFrontmatter());
10199
+ const result = GeminiCliSkillFrontmatterSchema.parse(this.requireMainFileFrontmatter());
9918
10200
  return result;
9919
10201
  }
9920
10202
  getBody() {
9921
10203
  return this.mainFile?.body ?? "";
9922
10204
  }
9923
10205
  validate() {
9924
- if (!this.mainFile) {
10206
+ if (this.mainFile === void 0) {
9925
10207
  return {
9926
10208
  success: false,
9927
10209
  error: new Error(`${this.getDirPath()}: ${SKILL_FILE_NAME} file does not exist`)
9928
10210
  };
9929
10211
  }
9930
- const result = JunieSkillFrontmatterSchema.safeParse(this.mainFile.frontmatter);
10212
+ const result = GeminiCliSkillFrontmatterSchema.safeParse(this.mainFile.frontmatter);
9931
10213
  if (!result.success) {
9932
10214
  return {
9933
10215
  success: false,
@@ -9936,14 +10218,6 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
9936
10218
  )
9937
10219
  };
9938
10220
  }
9939
- if (result.data.name !== this.getDirName()) {
9940
- return {
9941
- success: false,
9942
- error: new Error(
9943
- `${this.getDirPath()}: frontmatter name (${result.data.name}) must match directory name (${this.getDirName()})`
9944
- )
9945
- };
9946
- }
9947
10221
  return { success: true, error: null };
9948
10222
  }
9949
10223
  toRulesyncSkill() {
@@ -9965,21 +10239,22 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
9965
10239
  });
9966
10240
  }
9967
10241
  static fromRulesyncSkill({
10242
+ baseDir = process.cwd(),
9968
10243
  rulesyncSkill,
9969
10244
  validate = true,
9970
10245
  global = false
9971
10246
  }) {
9972
- const settablePaths = _JunieSkill.getSettablePaths({ global });
10247
+ const settablePaths = _GeminiCliSkill.getSettablePaths({ global });
9973
10248
  const rulesyncFrontmatter = rulesyncSkill.getFrontmatter();
9974
- const junieFrontmatter = {
10249
+ const geminiCliFrontmatter = {
9975
10250
  name: rulesyncFrontmatter.name,
9976
10251
  description: rulesyncFrontmatter.description
9977
10252
  };
9978
- return new _JunieSkill({
9979
- baseDir: rulesyncSkill.getBaseDir(),
10253
+ return new _GeminiCliSkill({
10254
+ baseDir,
9980
10255
  relativeDirPath: settablePaths.relativeDirPath,
9981
- dirName: junieFrontmatter.name,
9982
- frontmatter: junieFrontmatter,
10256
+ dirName: rulesyncSkill.getDirName(),
10257
+ frontmatter: geminiCliFrontmatter,
9983
10258
  body: rulesyncSkill.getBody(),
9984
10259
  otherFiles: rulesyncSkill.getOtherFiles(),
9985
10260
  validate,
@@ -9988,30 +10263,195 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
9988
10263
  }
9989
10264
  static isTargetedByRulesyncSkill(rulesyncSkill) {
9990
10265
  const targets = rulesyncSkill.getFrontmatter().targets;
9991
- return targets.includes("*") || targets.includes("junie");
10266
+ return targets.includes("*") || targets.includes("geminicli");
9992
10267
  }
9993
10268
  static async fromDir(params) {
9994
10269
  const loaded = await this.loadSkillDirContent({
9995
10270
  ...params,
9996
- getSettablePaths: _JunieSkill.getSettablePaths
10271
+ getSettablePaths: _GeminiCliSkill.getSettablePaths
9997
10272
  });
9998
- const result = JunieSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10273
+ const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9999
10274
  if (!result.success) {
10000
- const skillDirPath = (0, import_node_path73.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10275
+ const skillDirPath = (0, import_node_path75.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10001
10276
  throw new Error(
10002
- `Invalid frontmatter in ${(0, import_node_path73.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10277
+ `Invalid frontmatter in ${(0, import_node_path75.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10003
10278
  );
10004
10279
  }
10005
- if (result.data.name !== loaded.dirName) {
10006
- const skillFilePath = (0, import_node_path73.join)(
10007
- loaded.baseDir,
10008
- loaded.relativeDirPath,
10009
- loaded.dirName,
10010
- SKILL_FILE_NAME
10011
- );
10012
- throw new Error(
10013
- `Frontmatter name (${result.data.name}) must match directory name (${loaded.dirName}) in ${skillFilePath}`
10014
- );
10280
+ return new _GeminiCliSkill({
10281
+ baseDir: loaded.baseDir,
10282
+ relativeDirPath: loaded.relativeDirPath,
10283
+ dirName: loaded.dirName,
10284
+ frontmatter: result.data,
10285
+ body: loaded.body,
10286
+ otherFiles: loaded.otherFiles,
10287
+ validate: true,
10288
+ global: loaded.global
10289
+ });
10290
+ }
10291
+ static forDeletion({
10292
+ baseDir = process.cwd(),
10293
+ relativeDirPath,
10294
+ dirName,
10295
+ global = false
10296
+ }) {
10297
+ const settablePaths = _GeminiCliSkill.getSettablePaths({ global });
10298
+ return new _GeminiCliSkill({
10299
+ baseDir,
10300
+ relativeDirPath: relativeDirPath ?? settablePaths.relativeDirPath,
10301
+ dirName,
10302
+ frontmatter: { name: "", description: "" },
10303
+ body: "",
10304
+ otherFiles: [],
10305
+ validate: false,
10306
+ global
10307
+ });
10308
+ }
10309
+ };
10310
+
10311
+ // src/features/skills/junie-skill.ts
10312
+ var import_node_path76 = require("path");
10313
+ var import_mini35 = require("zod/mini");
10314
+ var JunieSkillFrontmatterSchema = import_mini35.z.looseObject({
10315
+ name: import_mini35.z.string(),
10316
+ description: import_mini35.z.string()
10317
+ });
10318
+ var JunieSkill = class _JunieSkill extends ToolSkill {
10319
+ constructor({
10320
+ baseDir = process.cwd(),
10321
+ relativeDirPath = (0, import_node_path76.join)(".junie", "skills"),
10322
+ dirName,
10323
+ frontmatter,
10324
+ body,
10325
+ otherFiles = [],
10326
+ validate = true,
10327
+ global = false
10328
+ }) {
10329
+ super({
10330
+ baseDir,
10331
+ relativeDirPath,
10332
+ dirName,
10333
+ mainFile: {
10334
+ name: SKILL_FILE_NAME,
10335
+ body,
10336
+ frontmatter: { ...frontmatter }
10337
+ },
10338
+ otherFiles,
10339
+ global
10340
+ });
10341
+ if (validate) {
10342
+ const result = this.validate();
10343
+ if (!result.success) {
10344
+ throw result.error;
10345
+ }
10346
+ }
10347
+ }
10348
+ static getSettablePaths(options) {
10349
+ if (options?.global) {
10350
+ throw new Error("JunieSkill does not support global mode.");
10351
+ }
10352
+ return {
10353
+ relativeDirPath: (0, import_node_path76.join)(".junie", "skills")
10354
+ };
10355
+ }
10356
+ getFrontmatter() {
10357
+ const result = JunieSkillFrontmatterSchema.parse(this.requireMainFileFrontmatter());
10358
+ return result;
10359
+ }
10360
+ getBody() {
10361
+ return this.mainFile?.body ?? "";
10362
+ }
10363
+ validate() {
10364
+ if (!this.mainFile) {
10365
+ return {
10366
+ success: false,
10367
+ error: new Error(`${this.getDirPath()}: ${SKILL_FILE_NAME} file does not exist`)
10368
+ };
10369
+ }
10370
+ const result = JunieSkillFrontmatterSchema.safeParse(this.mainFile.frontmatter);
10371
+ if (!result.success) {
10372
+ return {
10373
+ success: false,
10374
+ error: new Error(
10375
+ `Invalid frontmatter in ${this.getDirPath()}: ${formatError(result.error)}`
10376
+ )
10377
+ };
10378
+ }
10379
+ if (result.data.name !== this.getDirName()) {
10380
+ return {
10381
+ success: false,
10382
+ error: new Error(
10383
+ `${this.getDirPath()}: frontmatter name (${result.data.name}) must match directory name (${this.getDirName()})`
10384
+ )
10385
+ };
10386
+ }
10387
+ return { success: true, error: null };
10388
+ }
10389
+ toRulesyncSkill() {
10390
+ const frontmatter = this.getFrontmatter();
10391
+ const rulesyncFrontmatter = {
10392
+ name: frontmatter.name,
10393
+ description: frontmatter.description,
10394
+ targets: ["*"]
10395
+ };
10396
+ return new RulesyncSkill({
10397
+ baseDir: this.baseDir,
10398
+ relativeDirPath: RULESYNC_SKILLS_RELATIVE_DIR_PATH,
10399
+ dirName: this.getDirName(),
10400
+ frontmatter: rulesyncFrontmatter,
10401
+ body: this.getBody(),
10402
+ otherFiles: this.getOtherFiles(),
10403
+ validate: true,
10404
+ global: this.global
10405
+ });
10406
+ }
10407
+ static fromRulesyncSkill({
10408
+ rulesyncSkill,
10409
+ validate = true,
10410
+ global = false
10411
+ }) {
10412
+ const settablePaths = _JunieSkill.getSettablePaths({ global });
10413
+ const rulesyncFrontmatter = rulesyncSkill.getFrontmatter();
10414
+ const junieFrontmatter = {
10415
+ name: rulesyncFrontmatter.name,
10416
+ description: rulesyncFrontmatter.description
10417
+ };
10418
+ return new _JunieSkill({
10419
+ baseDir: rulesyncSkill.getBaseDir(),
10420
+ relativeDirPath: settablePaths.relativeDirPath,
10421
+ dirName: junieFrontmatter.name,
10422
+ frontmatter: junieFrontmatter,
10423
+ body: rulesyncSkill.getBody(),
10424
+ otherFiles: rulesyncSkill.getOtherFiles(),
10425
+ validate,
10426
+ global
10427
+ });
10428
+ }
10429
+ static isTargetedByRulesyncSkill(rulesyncSkill) {
10430
+ const targets = rulesyncSkill.getFrontmatter().targets;
10431
+ return targets.includes("*") || targets.includes("junie");
10432
+ }
10433
+ static async fromDir(params) {
10434
+ const loaded = await this.loadSkillDirContent({
10435
+ ...params,
10436
+ getSettablePaths: _JunieSkill.getSettablePaths
10437
+ });
10438
+ const result = JunieSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10439
+ if (!result.success) {
10440
+ const skillDirPath = (0, import_node_path76.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10441
+ throw new Error(
10442
+ `Invalid frontmatter in ${(0, import_node_path76.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10443
+ );
10444
+ }
10445
+ if (result.data.name !== loaded.dirName) {
10446
+ const skillFilePath = (0, import_node_path76.join)(
10447
+ loaded.baseDir,
10448
+ loaded.relativeDirPath,
10449
+ loaded.dirName,
10450
+ SKILL_FILE_NAME
10451
+ );
10452
+ throw new Error(
10453
+ `Frontmatter name (${result.data.name}) must match directory name (${loaded.dirName}) in ${skillFilePath}`
10454
+ );
10015
10455
  }
10016
10456
  return new _JunieSkill({
10017
10457
  baseDir: loaded.baseDir,
@@ -10045,16 +10485,16 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
10045
10485
  };
10046
10486
 
10047
10487
  // src/features/skills/kilo-skill.ts
10048
- var import_node_path74 = require("path");
10049
- var import_mini35 = require("zod/mini");
10050
- var KiloSkillFrontmatterSchema = import_mini35.z.looseObject({
10051
- name: import_mini35.z.string(),
10052
- description: import_mini35.z.string()
10488
+ var import_node_path77 = require("path");
10489
+ var import_mini36 = require("zod/mini");
10490
+ var KiloSkillFrontmatterSchema = import_mini36.z.looseObject({
10491
+ name: import_mini36.z.string(),
10492
+ description: import_mini36.z.string()
10053
10493
  });
10054
10494
  var KiloSkill = class _KiloSkill extends ToolSkill {
10055
10495
  constructor({
10056
10496
  baseDir = process.cwd(),
10057
- relativeDirPath = (0, import_node_path74.join)(".kilocode", "skills"),
10497
+ relativeDirPath = (0, import_node_path77.join)(".kilocode", "skills"),
10058
10498
  dirName,
10059
10499
  frontmatter,
10060
10500
  body,
@@ -10085,7 +10525,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
10085
10525
  global: _global = false
10086
10526
  } = {}) {
10087
10527
  return {
10088
- relativeDirPath: (0, import_node_path74.join)(".kilocode", "skills")
10528
+ relativeDirPath: (0, import_node_path77.join)(".kilocode", "skills")
10089
10529
  };
10090
10530
  }
10091
10531
  getFrontmatter() {
@@ -10173,13 +10613,13 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
10173
10613
  });
10174
10614
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10175
10615
  if (!result.success) {
10176
- const skillDirPath = (0, import_node_path74.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10616
+ const skillDirPath = (0, import_node_path77.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10177
10617
  throw new Error(
10178
- `Invalid frontmatter in ${(0, import_node_path74.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10618
+ `Invalid frontmatter in ${(0, import_node_path77.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10179
10619
  );
10180
10620
  }
10181
10621
  if (result.data.name !== loaded.dirName) {
10182
- const skillFilePath = (0, import_node_path74.join)(
10622
+ const skillFilePath = (0, import_node_path77.join)(
10183
10623
  loaded.baseDir,
10184
10624
  loaded.relativeDirPath,
10185
10625
  loaded.dirName,
@@ -10220,16 +10660,16 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
10220
10660
  };
10221
10661
 
10222
10662
  // src/features/skills/kiro-skill.ts
10223
- var import_node_path75 = require("path");
10224
- var import_mini36 = require("zod/mini");
10225
- var KiroSkillFrontmatterSchema = import_mini36.z.looseObject({
10226
- name: import_mini36.z.string(),
10227
- description: import_mini36.z.string()
10663
+ var import_node_path78 = require("path");
10664
+ var import_mini37 = require("zod/mini");
10665
+ var KiroSkillFrontmatterSchema = import_mini37.z.looseObject({
10666
+ name: import_mini37.z.string(),
10667
+ description: import_mini37.z.string()
10228
10668
  });
10229
10669
  var KiroSkill = class _KiroSkill extends ToolSkill {
10230
10670
  constructor({
10231
10671
  baseDir = process.cwd(),
10232
- relativeDirPath = (0, import_node_path75.join)(".kiro", "skills"),
10672
+ relativeDirPath = (0, import_node_path78.join)(".kiro", "skills"),
10233
10673
  dirName,
10234
10674
  frontmatter,
10235
10675
  body,
@@ -10261,7 +10701,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
10261
10701
  throw new Error("KiroSkill does not support global mode.");
10262
10702
  }
10263
10703
  return {
10264
- relativeDirPath: (0, import_node_path75.join)(".kiro", "skills")
10704
+ relativeDirPath: (0, import_node_path78.join)(".kiro", "skills")
10265
10705
  };
10266
10706
  }
10267
10707
  getFrontmatter() {
@@ -10349,13 +10789,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
10349
10789
  });
10350
10790
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10351
10791
  if (!result.success) {
10352
- const skillDirPath = (0, import_node_path75.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10792
+ const skillDirPath = (0, import_node_path78.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10353
10793
  throw new Error(
10354
- `Invalid frontmatter in ${(0, import_node_path75.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10794
+ `Invalid frontmatter in ${(0, import_node_path78.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10355
10795
  );
10356
10796
  }
10357
10797
  if (result.data.name !== loaded.dirName) {
10358
- const skillFilePath = (0, import_node_path75.join)(
10798
+ const skillFilePath = (0, import_node_path78.join)(
10359
10799
  loaded.baseDir,
10360
10800
  loaded.relativeDirPath,
10361
10801
  loaded.dirName,
@@ -10397,17 +10837,17 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
10397
10837
  };
10398
10838
 
10399
10839
  // src/features/skills/opencode-skill.ts
10400
- var import_node_path76 = require("path");
10401
- var import_mini37 = require("zod/mini");
10402
- var OpenCodeSkillFrontmatterSchema = import_mini37.z.looseObject({
10403
- name: import_mini37.z.string(),
10404
- description: import_mini37.z.string(),
10405
- "allowed-tools": import_mini37.z.optional(import_mini37.z.array(import_mini37.z.string()))
10840
+ var import_node_path79 = require("path");
10841
+ var import_mini38 = require("zod/mini");
10842
+ var OpenCodeSkillFrontmatterSchema = import_mini38.z.looseObject({
10843
+ name: import_mini38.z.string(),
10844
+ description: import_mini38.z.string(),
10845
+ "allowed-tools": import_mini38.z.optional(import_mini38.z.array(import_mini38.z.string()))
10406
10846
  });
10407
10847
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
10408
10848
  constructor({
10409
10849
  baseDir = process.cwd(),
10410
- relativeDirPath = (0, import_node_path76.join)(".opencode", "skill"),
10850
+ relativeDirPath = (0, import_node_path79.join)(".opencode", "skill"),
10411
10851
  dirName,
10412
10852
  frontmatter,
10413
10853
  body,
@@ -10436,7 +10876,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
10436
10876
  }
10437
10877
  static getSettablePaths({ global = false } = {}) {
10438
10878
  return {
10439
- relativeDirPath: global ? (0, import_node_path76.join)(".config", "opencode", "skill") : (0, import_node_path76.join)(".opencode", "skill")
10879
+ relativeDirPath: global ? (0, import_node_path79.join)(".config", "opencode", "skill") : (0, import_node_path79.join)(".opencode", "skill")
10440
10880
  };
10441
10881
  }
10442
10882
  getFrontmatter() {
@@ -10522,9 +10962,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
10522
10962
  });
10523
10963
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10524
10964
  if (!result.success) {
10525
- const skillDirPath = (0, import_node_path76.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10965
+ const skillDirPath = (0, import_node_path79.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10526
10966
  throw new Error(
10527
- `Invalid frontmatter in ${(0, import_node_path76.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10967
+ `Invalid frontmatter in ${(0, import_node_path79.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10528
10968
  );
10529
10969
  }
10530
10970
  return new _OpenCodeSkill({
@@ -10558,16 +10998,16 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
10558
10998
  };
10559
10999
 
10560
11000
  // src/features/skills/replit-skill.ts
10561
- var import_node_path77 = require("path");
10562
- var import_mini38 = require("zod/mini");
10563
- var ReplitSkillFrontmatterSchema = import_mini38.z.looseObject({
10564
- name: import_mini38.z.string(),
10565
- description: import_mini38.z.string()
11001
+ var import_node_path80 = require("path");
11002
+ var import_mini39 = require("zod/mini");
11003
+ var ReplitSkillFrontmatterSchema = import_mini39.z.looseObject({
11004
+ name: import_mini39.z.string(),
11005
+ description: import_mini39.z.string()
10566
11006
  });
10567
11007
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
10568
11008
  constructor({
10569
11009
  baseDir = process.cwd(),
10570
- relativeDirPath = (0, import_node_path77.join)(".agents", "skills"),
11010
+ relativeDirPath = (0, import_node_path80.join)(".agents", "skills"),
10571
11011
  dirName,
10572
11012
  frontmatter,
10573
11013
  body,
@@ -10599,7 +11039,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
10599
11039
  throw new Error("ReplitSkill does not support global mode.");
10600
11040
  }
10601
11041
  return {
10602
- relativeDirPath: (0, import_node_path77.join)(".agents", "skills")
11042
+ relativeDirPath: (0, import_node_path80.join)(".agents", "skills")
10603
11043
  };
10604
11044
  }
10605
11045
  getFrontmatter() {
@@ -10679,9 +11119,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
10679
11119
  });
10680
11120
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10681
11121
  if (!result.success) {
10682
- const skillDirPath = (0, import_node_path77.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11122
+ const skillDirPath = (0, import_node_path80.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10683
11123
  throw new Error(
10684
- `Invalid frontmatter in ${(0, import_node_path77.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11124
+ `Invalid frontmatter in ${(0, import_node_path80.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10685
11125
  );
10686
11126
  }
10687
11127
  return new _ReplitSkill({
@@ -10716,16 +11156,16 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
10716
11156
  };
10717
11157
 
10718
11158
  // src/features/skills/roo-skill.ts
10719
- var import_node_path78 = require("path");
10720
- var import_mini39 = require("zod/mini");
10721
- var RooSkillFrontmatterSchema = import_mini39.z.looseObject({
10722
- name: import_mini39.z.string(),
10723
- description: import_mini39.z.string()
11159
+ var import_node_path81 = require("path");
11160
+ var import_mini40 = require("zod/mini");
11161
+ var RooSkillFrontmatterSchema = import_mini40.z.looseObject({
11162
+ name: import_mini40.z.string(),
11163
+ description: import_mini40.z.string()
10724
11164
  });
10725
11165
  var RooSkill = class _RooSkill extends ToolSkill {
10726
11166
  constructor({
10727
11167
  baseDir = process.cwd(),
10728
- relativeDirPath = (0, import_node_path78.join)(".roo", "skills"),
11168
+ relativeDirPath = (0, import_node_path81.join)(".roo", "skills"),
10729
11169
  dirName,
10730
11170
  frontmatter,
10731
11171
  body,
@@ -10756,7 +11196,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
10756
11196
  global: _global = false
10757
11197
  } = {}) {
10758
11198
  return {
10759
- relativeDirPath: (0, import_node_path78.join)(".roo", "skills")
11199
+ relativeDirPath: (0, import_node_path81.join)(".roo", "skills")
10760
11200
  };
10761
11201
  }
10762
11202
  getFrontmatter() {
@@ -10844,13 +11284,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
10844
11284
  });
10845
11285
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10846
11286
  if (!result.success) {
10847
- const skillDirPath = (0, import_node_path78.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11287
+ const skillDirPath = (0, import_node_path81.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10848
11288
  throw new Error(
10849
- `Invalid frontmatter in ${(0, import_node_path78.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11289
+ `Invalid frontmatter in ${(0, import_node_path81.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10850
11290
  );
10851
11291
  }
10852
11292
  if (result.data.name !== loaded.dirName) {
10853
- const skillFilePath = (0, import_node_path78.join)(
11293
+ const skillFilePath = (0, import_node_path81.join)(
10854
11294
  loaded.baseDir,
10855
11295
  loaded.relativeDirPath,
10856
11296
  loaded.dirName,
@@ -10891,17 +11331,17 @@ var RooSkill = class _RooSkill extends ToolSkill {
10891
11331
  };
10892
11332
 
10893
11333
  // src/features/skills/skills-utils.ts
10894
- var import_node_path79 = require("path");
11334
+ var import_node_path82 = require("path");
10895
11335
  async function getLocalSkillDirNames(baseDir) {
10896
- const skillsDir = (0, import_node_path79.join)(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
11336
+ const skillsDir = (0, import_node_path82.join)(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
10897
11337
  const names = /* @__PURE__ */ new Set();
10898
11338
  if (!await directoryExists(skillsDir)) {
10899
11339
  return names;
10900
11340
  }
10901
- const dirPaths = await findFilesByGlobs((0, import_node_path79.join)(skillsDir, "*"), { type: "dir" });
11341
+ const dirPaths = await findFilesByGlobs((0, import_node_path82.join)(skillsDir, "*"), { type: "dir" });
10902
11342
  for (const dirPath of dirPaths) {
10903
- const name = (0, import_node_path79.basename)(dirPath);
10904
- if (name === (0, import_node_path79.basename)(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
11343
+ const name = (0, import_node_path82.basename)(dirPath);
11344
+ if (name === (0, import_node_path82.basename)(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
10905
11345
  names.add(name);
10906
11346
  }
10907
11347
  return names;
@@ -10918,6 +11358,7 @@ var skillsProcessorToolTargetTuple = [
10918
11358
  "codexcli",
10919
11359
  "copilot",
10920
11360
  "cursor",
11361
+ "deepagents",
10921
11362
  "factorydroid",
10922
11363
  "geminicli",
10923
11364
  "junie",
@@ -10927,7 +11368,7 @@ var skillsProcessorToolTargetTuple = [
10927
11368
  "replit",
10928
11369
  "roo"
10929
11370
  ];
10930
- var SkillsProcessorToolTargetSchema = import_mini40.z.enum(skillsProcessorToolTargetTuple);
11371
+ var SkillsProcessorToolTargetSchema = import_mini41.z.enum(skillsProcessorToolTargetTuple);
10931
11372
  var toolSkillFactories = /* @__PURE__ */ new Map([
10932
11373
  [
10933
11374
  "agentsmd",
@@ -10992,11 +11433,18 @@ var toolSkillFactories = /* @__PURE__ */ new Map([
10992
11433
  meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
10993
11434
  }
10994
11435
  ],
11436
+ [
11437
+ "deepagents",
11438
+ {
11439
+ class: DeepagentsSkill,
11440
+ meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: false }
11441
+ }
11442
+ ],
10995
11443
  [
10996
11444
  "factorydroid",
10997
11445
  {
10998
11446
  class: FactorydroidSkill,
10999
- meta: { supportsProject: true, supportsSimulated: true, supportsGlobal: true }
11447
+ meta: { supportsProject: true, supportsSimulated: true, supportsGlobal: false }
11000
11448
  }
11001
11449
  ],
11002
11450
  [
@@ -11137,11 +11585,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
11137
11585
  )
11138
11586
  );
11139
11587
  const localSkillNames = new Set(localDirNames);
11140
- const curatedDirPath = (0, import_node_path80.join)(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
11588
+ const curatedDirPath = (0, import_node_path83.join)(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
11141
11589
  let curatedSkills = [];
11142
11590
  if (await directoryExists(curatedDirPath)) {
11143
- const curatedDirPaths = await findFilesByGlobs((0, import_node_path80.join)(curatedDirPath, "*"), { type: "dir" });
11144
- const curatedDirNames = curatedDirPaths.map((path3) => (0, import_node_path80.basename)(path3));
11591
+ const curatedDirPaths = await findFilesByGlobs((0, import_node_path83.join)(curatedDirPath, "*"), { type: "dir" });
11592
+ const curatedDirNames = curatedDirPaths.map((path3) => (0, import_node_path83.basename)(path3));
11145
11593
  const nonConflicting = curatedDirNames.filter((name) => {
11146
11594
  if (localSkillNames.has(name)) {
11147
11595
  this.logger.debug(`Skipping curated skill "${name}": local skill takes precedence.`);
@@ -11174,9 +11622,9 @@ var SkillsProcessor = class extends DirFeatureProcessor {
11174
11622
  async loadToolDirs() {
11175
11623
  const factory = this.getFactory(this.toolTarget);
11176
11624
  const paths = factory.class.getSettablePaths({ global: this.global });
11177
- const skillsDirPath = (0, import_node_path80.join)(this.baseDir, paths.relativeDirPath);
11178
- const dirPaths = await findFilesByGlobs((0, import_node_path80.join)(skillsDirPath, "*"), { type: "dir" });
11179
- const dirNames = dirPaths.map((path3) => (0, import_node_path80.basename)(path3));
11625
+ const skillsDirPath = (0, import_node_path83.join)(this.baseDir, paths.relativeDirPath);
11626
+ const dirPaths = await findFilesByGlobs((0, import_node_path83.join)(skillsDirPath, "*"), { type: "dir" });
11627
+ const dirNames = dirPaths.map((path3) => (0, import_node_path83.basename)(path3));
11180
11628
  const toolSkills = await Promise.all(
11181
11629
  dirNames.map(
11182
11630
  (dirName) => factory.class.fromDir({
@@ -11192,9 +11640,9 @@ var SkillsProcessor = class extends DirFeatureProcessor {
11192
11640
  async loadToolDirsToDelete() {
11193
11641
  const factory = this.getFactory(this.toolTarget);
11194
11642
  const paths = factory.class.getSettablePaths({ global: this.global });
11195
- const skillsDirPath = (0, import_node_path80.join)(this.baseDir, paths.relativeDirPath);
11196
- const dirPaths = await findFilesByGlobs((0, import_node_path80.join)(skillsDirPath, "*"), { type: "dir" });
11197
- const dirNames = dirPaths.map((path3) => (0, import_node_path80.basename)(path3));
11643
+ const skillsDirPath = (0, import_node_path83.join)(this.baseDir, paths.relativeDirPath);
11644
+ const dirPaths = await findFilesByGlobs((0, import_node_path83.join)(skillsDirPath, "*"), { type: "dir" });
11645
+ const dirNames = dirPaths.map((path3) => (0, import_node_path83.basename)(path3));
11198
11646
  const toolSkills = dirNames.map(
11199
11647
  (dirName) => factory.class.forDeletion({
11200
11648
  baseDir: this.baseDir,
@@ -11255,11 +11703,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
11255
11703
  };
11256
11704
 
11257
11705
  // src/features/subagents/agentsmd-subagent.ts
11258
- var import_node_path82 = require("path");
11706
+ var import_node_path85 = require("path");
11259
11707
 
11260
11708
  // src/features/subagents/simulated-subagent.ts
11261
- var import_node_path81 = require("path");
11262
- var import_mini41 = require("zod/mini");
11709
+ var import_node_path84 = require("path");
11710
+ var import_mini42 = require("zod/mini");
11263
11711
 
11264
11712
  // src/features/subagents/tool-subagent.ts
11265
11713
  var ToolSubagent = class extends ToolFile {
@@ -11311,9 +11759,9 @@ var ToolSubagent = class extends ToolFile {
11311
11759
  };
11312
11760
 
11313
11761
  // src/features/subagents/simulated-subagent.ts
11314
- var SimulatedSubagentFrontmatterSchema = import_mini41.z.object({
11315
- name: import_mini41.z.string(),
11316
- description: import_mini41.z.optional(import_mini41.z.string())
11762
+ var SimulatedSubagentFrontmatterSchema = import_mini42.z.object({
11763
+ name: import_mini42.z.string(),
11764
+ description: import_mini42.z.optional(import_mini42.z.string())
11317
11765
  });
11318
11766
  var SimulatedSubagent = class extends ToolSubagent {
11319
11767
  frontmatter;
@@ -11323,7 +11771,7 @@ var SimulatedSubagent = class extends ToolSubagent {
11323
11771
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
11324
11772
  if (!result.success) {
11325
11773
  throw new Error(
11326
- `Invalid frontmatter in ${(0, import_node_path81.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11774
+ `Invalid frontmatter in ${(0, import_node_path84.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11327
11775
  );
11328
11776
  }
11329
11777
  }
@@ -11374,7 +11822,7 @@ var SimulatedSubagent = class extends ToolSubagent {
11374
11822
  return {
11375
11823
  success: false,
11376
11824
  error: new Error(
11377
- `Invalid frontmatter in ${(0, import_node_path81.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11825
+ `Invalid frontmatter in ${(0, import_node_path84.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11378
11826
  )
11379
11827
  };
11380
11828
  }
@@ -11384,7 +11832,7 @@ var SimulatedSubagent = class extends ToolSubagent {
11384
11832
  relativeFilePath,
11385
11833
  validate = true
11386
11834
  }) {
11387
- const filePath = (0, import_node_path81.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
11835
+ const filePath = (0, import_node_path84.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
11388
11836
  const fileContent = await readFileContent(filePath);
11389
11837
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11390
11838
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11394,7 +11842,7 @@ var SimulatedSubagent = class extends ToolSubagent {
11394
11842
  return {
11395
11843
  baseDir,
11396
11844
  relativeDirPath: this.getSettablePaths().relativeDirPath,
11397
- relativeFilePath: (0, import_node_path81.basename)(relativeFilePath),
11845
+ relativeFilePath: (0, import_node_path84.basename)(relativeFilePath),
11398
11846
  frontmatter: result.data,
11399
11847
  body: content.trim(),
11400
11848
  validate
@@ -11420,7 +11868,7 @@ var SimulatedSubagent = class extends ToolSubagent {
11420
11868
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
11421
11869
  static getSettablePaths() {
11422
11870
  return {
11423
- relativeDirPath: (0, import_node_path82.join)(".agents", "subagents")
11871
+ relativeDirPath: (0, import_node_path85.join)(".agents", "subagents")
11424
11872
  };
11425
11873
  }
11426
11874
  static async fromFile(params) {
@@ -11443,11 +11891,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
11443
11891
  };
11444
11892
 
11445
11893
  // src/features/subagents/factorydroid-subagent.ts
11446
- var import_node_path83 = require("path");
11894
+ var import_node_path86 = require("path");
11447
11895
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
11448
11896
  static getSettablePaths(_options) {
11449
11897
  return {
11450
- relativeDirPath: (0, import_node_path83.join)(".factory", "droids")
11898
+ relativeDirPath: (0, import_node_path86.join)(".factory", "droids")
11451
11899
  };
11452
11900
  }
11453
11901
  static async fromFile(params) {
@@ -11470,11 +11918,11 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
11470
11918
  };
11471
11919
 
11472
11920
  // src/features/subagents/geminicli-subagent.ts
11473
- var import_node_path84 = require("path");
11921
+ var import_node_path87 = require("path");
11474
11922
  var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
11475
11923
  static getSettablePaths() {
11476
11924
  return {
11477
- relativeDirPath: (0, import_node_path84.join)(".gemini", "subagents")
11925
+ relativeDirPath: (0, import_node_path87.join)(".gemini", "subagents")
11478
11926
  };
11479
11927
  }
11480
11928
  static async fromFile(params) {
@@ -11497,11 +11945,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
11497
11945
  };
11498
11946
 
11499
11947
  // src/features/subagents/roo-subagent.ts
11500
- var import_node_path85 = require("path");
11948
+ var import_node_path88 = require("path");
11501
11949
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
11502
11950
  static getSettablePaths() {
11503
11951
  return {
11504
- relativeDirPath: (0, import_node_path85.join)(".roo", "subagents")
11952
+ relativeDirPath: (0, import_node_path88.join)(".roo", "subagents")
11505
11953
  };
11506
11954
  }
11507
11955
  static async fromFile(params) {
@@ -11524,20 +11972,20 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
11524
11972
  };
11525
11973
 
11526
11974
  // src/features/subagents/subagents-processor.ts
11527
- var import_node_path94 = require("path");
11528
- var import_mini50 = require("zod/mini");
11975
+ var import_node_path98 = require("path");
11976
+ var import_mini52 = require("zod/mini");
11529
11977
 
11530
11978
  // src/features/subagents/claudecode-subagent.ts
11531
- var import_node_path87 = require("path");
11532
- var import_mini43 = require("zod/mini");
11979
+ var import_node_path90 = require("path");
11980
+ var import_mini44 = require("zod/mini");
11533
11981
 
11534
11982
  // src/features/subagents/rulesync-subagent.ts
11535
- var import_node_path86 = require("path");
11536
- var import_mini42 = require("zod/mini");
11537
- var RulesyncSubagentFrontmatterSchema = import_mini42.z.looseObject({
11538
- targets: import_mini42.z._default(RulesyncTargetsSchema, ["*"]),
11539
- name: import_mini42.z.string(),
11540
- description: import_mini42.z.optional(import_mini42.z.string())
11983
+ var import_node_path89 = require("path");
11984
+ var import_mini43 = require("zod/mini");
11985
+ var RulesyncSubagentFrontmatterSchema = import_mini43.z.looseObject({
11986
+ targets: import_mini43.z._default(RulesyncTargetsSchema, ["*"]),
11987
+ name: import_mini43.z.string(),
11988
+ description: import_mini43.z.optional(import_mini43.z.string())
11541
11989
  });
11542
11990
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
11543
11991
  frontmatter;
@@ -11546,7 +11994,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
11546
11994
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
11547
11995
  if (!parseResult.success && rest.validate !== false) {
11548
11996
  throw new Error(
11549
- `Invalid frontmatter in ${(0, import_node_path86.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
11997
+ `Invalid frontmatter in ${(0, import_node_path89.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
11550
11998
  );
11551
11999
  }
11552
12000
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -11579,7 +12027,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
11579
12027
  return {
11580
12028
  success: false,
11581
12029
  error: new Error(
11582
- `Invalid frontmatter in ${(0, import_node_path86.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12030
+ `Invalid frontmatter in ${(0, import_node_path89.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11583
12031
  )
11584
12032
  };
11585
12033
  }
@@ -11587,14 +12035,14 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
11587
12035
  static async fromFile({
11588
12036
  relativeFilePath
11589
12037
  }) {
11590
- const filePath = (0, import_node_path86.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
12038
+ const filePath = (0, import_node_path89.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
11591
12039
  const fileContent = await readFileContent(filePath);
11592
12040
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11593
12041
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
11594
12042
  if (!result.success) {
11595
12043
  throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
11596
12044
  }
11597
- const filename = (0, import_node_path86.basename)(relativeFilePath);
12045
+ const filename = (0, import_node_path89.basename)(relativeFilePath);
11598
12046
  return new _RulesyncSubagent({
11599
12047
  baseDir: process.cwd(),
11600
12048
  relativeDirPath: this.getSettablePaths().relativeDirPath,
@@ -11606,13 +12054,13 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
11606
12054
  };
11607
12055
 
11608
12056
  // src/features/subagents/claudecode-subagent.ts
11609
- var ClaudecodeSubagentFrontmatterSchema = import_mini43.z.looseObject({
11610
- name: import_mini43.z.string(),
11611
- description: import_mini43.z.optional(import_mini43.z.string()),
11612
- model: import_mini43.z.optional(import_mini43.z.string()),
11613
- tools: import_mini43.z.optional(import_mini43.z.union([import_mini43.z.string(), import_mini43.z.array(import_mini43.z.string())])),
11614
- permissionMode: import_mini43.z.optional(import_mini43.z.string()),
11615
- skills: import_mini43.z.optional(import_mini43.z.union([import_mini43.z.string(), import_mini43.z.array(import_mini43.z.string())]))
12057
+ var ClaudecodeSubagentFrontmatterSchema = import_mini44.z.looseObject({
12058
+ name: import_mini44.z.string(),
12059
+ description: import_mini44.z.optional(import_mini44.z.string()),
12060
+ model: import_mini44.z.optional(import_mini44.z.string()),
12061
+ tools: import_mini44.z.optional(import_mini44.z.union([import_mini44.z.string(), import_mini44.z.array(import_mini44.z.string())])),
12062
+ permissionMode: import_mini44.z.optional(import_mini44.z.string()),
12063
+ skills: import_mini44.z.optional(import_mini44.z.union([import_mini44.z.string(), import_mini44.z.array(import_mini44.z.string())]))
11616
12064
  });
11617
12065
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11618
12066
  frontmatter;
@@ -11622,7 +12070,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11622
12070
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
11623
12071
  if (!result.success) {
11624
12072
  throw new Error(
11625
- `Invalid frontmatter in ${(0, import_node_path87.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12073
+ `Invalid frontmatter in ${(0, import_node_path90.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11626
12074
  );
11627
12075
  }
11628
12076
  }
@@ -11634,7 +12082,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11634
12082
  }
11635
12083
  static getSettablePaths(_options = {}) {
11636
12084
  return {
11637
- relativeDirPath: (0, import_node_path87.join)(".claude", "agents")
12085
+ relativeDirPath: (0, import_node_path90.join)(".claude", "agents")
11638
12086
  };
11639
12087
  }
11640
12088
  getFrontmatter() {
@@ -11713,7 +12161,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11713
12161
  return {
11714
12162
  success: false,
11715
12163
  error: new Error(
11716
- `Invalid frontmatter in ${(0, import_node_path87.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12164
+ `Invalid frontmatter in ${(0, import_node_path90.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11717
12165
  )
11718
12166
  };
11719
12167
  }
@@ -11731,7 +12179,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11731
12179
  global = false
11732
12180
  }) {
11733
12181
  const paths = this.getSettablePaths({ global });
11734
- const filePath = (0, import_node_path87.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12182
+ const filePath = (0, import_node_path90.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11735
12183
  const fileContent = await readFileContent(filePath);
11736
12184
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11737
12185
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11766,16 +12214,16 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11766
12214
  };
11767
12215
 
11768
12216
  // src/features/subagents/codexcli-subagent.ts
11769
- var import_node_path88 = require("path");
12217
+ var import_node_path91 = require("path");
11770
12218
  var smolToml2 = __toESM(require("smol-toml"), 1);
11771
- var import_mini44 = require("zod/mini");
11772
- var CodexCliSubagentTomlSchema = import_mini44.z.looseObject({
11773
- name: import_mini44.z.string(),
11774
- description: import_mini44.z.optional(import_mini44.z.string()),
11775
- developer_instructions: import_mini44.z.optional(import_mini44.z.string()),
11776
- model: import_mini44.z.optional(import_mini44.z.string()),
11777
- model_reasoning_effort: import_mini44.z.optional(import_mini44.z.string()),
11778
- sandbox_mode: import_mini44.z.optional(import_mini44.z.string())
12219
+ var import_mini45 = require("zod/mini");
12220
+ var CodexCliSubagentTomlSchema = import_mini45.z.looseObject({
12221
+ name: import_mini45.z.string(),
12222
+ description: import_mini45.z.optional(import_mini45.z.string()),
12223
+ developer_instructions: import_mini45.z.optional(import_mini45.z.string()),
12224
+ model: import_mini45.z.optional(import_mini45.z.string()),
12225
+ model_reasoning_effort: import_mini45.z.optional(import_mini45.z.string()),
12226
+ sandbox_mode: import_mini45.z.optional(import_mini45.z.string())
11779
12227
  });
11780
12228
  var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11781
12229
  body;
@@ -11786,7 +12234,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11786
12234
  CodexCliSubagentTomlSchema.parse(parsed);
11787
12235
  } catch (error) {
11788
12236
  throw new Error(
11789
- `Invalid TOML in ${(0, import_node_path88.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
12237
+ `Invalid TOML in ${(0, import_node_path91.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
11790
12238
  { cause: error }
11791
12239
  );
11792
12240
  }
@@ -11798,7 +12246,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11798
12246
  }
11799
12247
  static getSettablePaths(_options = {}) {
11800
12248
  return {
11801
- relativeDirPath: (0, import_node_path88.join)(".codex", "agents")
12249
+ relativeDirPath: (0, import_node_path91.join)(".codex", "agents")
11802
12250
  };
11803
12251
  }
11804
12252
  getBody() {
@@ -11810,7 +12258,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11810
12258
  parsed = CodexCliSubagentTomlSchema.parse(smolToml2.parse(this.body));
11811
12259
  } catch (error) {
11812
12260
  throw new Error(
11813
- `Failed to parse TOML in ${(0, import_node_path88.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
12261
+ `Failed to parse TOML in ${(0, import_node_path91.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
11814
12262
  { cause: error }
11815
12263
  );
11816
12264
  }
@@ -11891,7 +12339,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11891
12339
  global = false
11892
12340
  }) {
11893
12341
  const paths = this.getSettablePaths({ global });
11894
- const filePath = (0, import_node_path88.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12342
+ const filePath = (0, import_node_path91.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11895
12343
  const fileContent = await readFileContent(filePath);
11896
12344
  const subagent = new _CodexCliSubagent({
11897
12345
  baseDir,
@@ -11929,13 +12377,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11929
12377
  };
11930
12378
 
11931
12379
  // src/features/subagents/copilot-subagent.ts
11932
- var import_node_path89 = require("path");
11933
- var import_mini45 = require("zod/mini");
12380
+ var import_node_path92 = require("path");
12381
+ var import_mini46 = require("zod/mini");
11934
12382
  var REQUIRED_TOOL = "agent/runSubagent";
11935
- var CopilotSubagentFrontmatterSchema = import_mini45.z.looseObject({
11936
- name: import_mini45.z.string(),
11937
- description: import_mini45.z.optional(import_mini45.z.string()),
11938
- tools: import_mini45.z.optional(import_mini45.z.union([import_mini45.z.string(), import_mini45.z.array(import_mini45.z.string())]))
12383
+ var CopilotSubagentFrontmatterSchema = import_mini46.z.looseObject({
12384
+ name: import_mini46.z.string(),
12385
+ description: import_mini46.z.optional(import_mini46.z.string()),
12386
+ tools: import_mini46.z.optional(import_mini46.z.union([import_mini46.z.string(), import_mini46.z.array(import_mini46.z.string())]))
11939
12387
  });
11940
12388
  var normalizeTools = (tools) => {
11941
12389
  if (!tools) {
@@ -11955,7 +12403,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11955
12403
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
11956
12404
  if (!result.success) {
11957
12405
  throw new Error(
11958
- `Invalid frontmatter in ${(0, import_node_path89.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12406
+ `Invalid frontmatter in ${(0, import_node_path92.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11959
12407
  );
11960
12408
  }
11961
12409
  }
@@ -11967,7 +12415,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11967
12415
  }
11968
12416
  static getSettablePaths(_options = {}) {
11969
12417
  return {
11970
- relativeDirPath: (0, import_node_path89.join)(".github", "agents")
12418
+ relativeDirPath: (0, import_node_path92.join)(".github", "agents")
11971
12419
  };
11972
12420
  }
11973
12421
  getFrontmatter() {
@@ -12021,7 +12469,154 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
12021
12469
  const paths = this.getSettablePaths({ global });
12022
12470
  return new _CopilotSubagent({
12023
12471
  baseDir,
12024
- frontmatter: copilotFrontmatter,
12472
+ frontmatter: copilotFrontmatter,
12473
+ body,
12474
+ relativeDirPath: paths.relativeDirPath,
12475
+ relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
12476
+ fileContent,
12477
+ validate,
12478
+ global
12479
+ });
12480
+ }
12481
+ validate() {
12482
+ if (!this.frontmatter) {
12483
+ return { success: true, error: null };
12484
+ }
12485
+ const result = CopilotSubagentFrontmatterSchema.safeParse(this.frontmatter);
12486
+ if (result.success) {
12487
+ return { success: true, error: null };
12488
+ } else {
12489
+ return {
12490
+ success: false,
12491
+ error: new Error(
12492
+ `Invalid frontmatter in ${(0, import_node_path92.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12493
+ )
12494
+ };
12495
+ }
12496
+ }
12497
+ static isTargetedByRulesyncSubagent(rulesyncSubagent) {
12498
+ return this.isTargetedByRulesyncSubagentDefault({
12499
+ rulesyncSubagent,
12500
+ toolTarget: "copilot"
12501
+ });
12502
+ }
12503
+ static async fromFile({
12504
+ baseDir = process.cwd(),
12505
+ relativeFilePath,
12506
+ validate = true,
12507
+ global = false
12508
+ }) {
12509
+ const paths = this.getSettablePaths({ global });
12510
+ const filePath = (0, import_node_path92.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12511
+ const fileContent = await readFileContent(filePath);
12512
+ const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12513
+ const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
12514
+ if (!result.success) {
12515
+ throw new Error(`Invalid frontmatter in ${filePath}: ${formatError(result.error)}`);
12516
+ }
12517
+ return new _CopilotSubagent({
12518
+ baseDir,
12519
+ relativeDirPath: paths.relativeDirPath,
12520
+ relativeFilePath,
12521
+ frontmatter: result.data,
12522
+ body: content.trim(),
12523
+ fileContent,
12524
+ validate,
12525
+ global
12526
+ });
12527
+ }
12528
+ static forDeletion({
12529
+ baseDir = process.cwd(),
12530
+ relativeDirPath,
12531
+ relativeFilePath
12532
+ }) {
12533
+ return new _CopilotSubagent({
12534
+ baseDir,
12535
+ relativeDirPath,
12536
+ relativeFilePath,
12537
+ frontmatter: { name: "", description: "" },
12538
+ body: "",
12539
+ fileContent: "",
12540
+ validate: false
12541
+ });
12542
+ }
12543
+ };
12544
+
12545
+ // src/features/subagents/cursor-subagent.ts
12546
+ var import_node_path93 = require("path");
12547
+ var import_mini47 = require("zod/mini");
12548
+ var CursorSubagentFrontmatterSchema = import_mini47.z.looseObject({
12549
+ name: import_mini47.z.string(),
12550
+ description: import_mini47.z.optional(import_mini47.z.string())
12551
+ });
12552
+ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
12553
+ frontmatter;
12554
+ body;
12555
+ constructor({ frontmatter, body, ...rest }) {
12556
+ if (rest.validate !== false) {
12557
+ const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
12558
+ if (!result.success) {
12559
+ throw new Error(
12560
+ `Invalid frontmatter in ${(0, import_node_path93.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12561
+ );
12562
+ }
12563
+ }
12564
+ super({
12565
+ ...rest
12566
+ });
12567
+ this.frontmatter = frontmatter;
12568
+ this.body = body;
12569
+ }
12570
+ static getSettablePaths(_options = {}) {
12571
+ return {
12572
+ relativeDirPath: (0, import_node_path93.join)(".cursor", "agents")
12573
+ };
12574
+ }
12575
+ getFrontmatter() {
12576
+ return this.frontmatter;
12577
+ }
12578
+ getBody() {
12579
+ return this.body;
12580
+ }
12581
+ toRulesyncSubagent() {
12582
+ const { name, description, ...rest } = this.frontmatter;
12583
+ const rulesyncFrontmatter = {
12584
+ targets: ["*"],
12585
+ name,
12586
+ description,
12587
+ cursor: {
12588
+ ...rest
12589
+ }
12590
+ };
12591
+ return new RulesyncSubagent({
12592
+ baseDir: ".",
12593
+ // RulesyncSubagent baseDir is always the project root directory
12594
+ frontmatter: rulesyncFrontmatter,
12595
+ body: this.body,
12596
+ relativeDirPath: RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH,
12597
+ relativeFilePath: this.getRelativeFilePath(),
12598
+ validate: true
12599
+ });
12600
+ }
12601
+ static fromRulesyncSubagent({
12602
+ baseDir = process.cwd(),
12603
+ rulesyncSubagent,
12604
+ validate = true,
12605
+ global = false
12606
+ }) {
12607
+ const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
12608
+ const cursorSection = rulesyncFrontmatter.cursor ?? {};
12609
+ const cursorFrontmatter = {
12610
+ name: rulesyncFrontmatter.name,
12611
+ description: rulesyncFrontmatter.description,
12612
+ ...cursorSection
12613
+ };
12614
+ const body = rulesyncSubagent.getBody();
12615
+ const fileContent = stringifyFrontmatter(body, cursorFrontmatter, { avoidBlockScalars: true });
12616
+ const paths = this.getSettablePaths({ global });
12617
+ return new _CursorSubagent({
12618
+ baseDir,
12619
+ frontmatter: cursorFrontmatter,
12025
12620
  body,
12026
12621
  relativeDirPath: paths.relativeDirPath,
12027
12622
  relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
@@ -12034,14 +12629,14 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
12034
12629
  if (!this.frontmatter) {
12035
12630
  return { success: true, error: null };
12036
12631
  }
12037
- const result = CopilotSubagentFrontmatterSchema.safeParse(this.frontmatter);
12632
+ const result = CursorSubagentFrontmatterSchema.safeParse(this.frontmatter);
12038
12633
  if (result.success) {
12039
12634
  return { success: true, error: null };
12040
12635
  } else {
12041
12636
  return {
12042
12637
  success: false,
12043
12638
  error: new Error(
12044
- `Invalid frontmatter in ${(0, import_node_path89.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12639
+ `Invalid frontmatter in ${(0, import_node_path93.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12045
12640
  )
12046
12641
  };
12047
12642
  }
@@ -12049,7 +12644,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
12049
12644
  static isTargetedByRulesyncSubagent(rulesyncSubagent) {
12050
12645
  return this.isTargetedByRulesyncSubagentDefault({
12051
12646
  rulesyncSubagent,
12052
- toolTarget: "copilot"
12647
+ toolTarget: "cursor"
12053
12648
  });
12054
12649
  }
12055
12650
  static async fromFile({
@@ -12059,14 +12654,14 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
12059
12654
  global = false
12060
12655
  }) {
12061
12656
  const paths = this.getSettablePaths({ global });
12062
- const filePath = (0, import_node_path89.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12657
+ const filePath = (0, import_node_path93.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12063
12658
  const fileContent = await readFileContent(filePath);
12064
12659
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12065
- const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
12660
+ const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
12066
12661
  if (!result.success) {
12067
12662
  throw new Error(`Invalid frontmatter in ${filePath}: ${formatError(result.error)}`);
12068
12663
  }
12069
- return new _CopilotSubagent({
12664
+ return new _CursorSubagent({
12070
12665
  baseDir,
12071
12666
  relativeDirPath: paths.relativeDirPath,
12072
12667
  relativeFilePath,
@@ -12082,7 +12677,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
12082
12677
  relativeDirPath,
12083
12678
  relativeFilePath
12084
12679
  }) {
12085
- return new _CopilotSubagent({
12680
+ return new _CursorSubagent({
12086
12681
  baseDir,
12087
12682
  relativeDirPath,
12088
12683
  relativeFilePath,
@@ -12094,34 +12689,33 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
12094
12689
  }
12095
12690
  };
12096
12691
 
12097
- // src/features/subagents/cursor-subagent.ts
12098
- var import_node_path90 = require("path");
12099
- var import_mini46 = require("zod/mini");
12100
- var CursorSubagentFrontmatterSchema = import_mini46.z.looseObject({
12101
- name: import_mini46.z.string(),
12102
- description: import_mini46.z.optional(import_mini46.z.string())
12692
+ // src/features/subagents/deepagents-subagent.ts
12693
+ var import_node_path94 = require("path");
12694
+ var import_mini48 = require("zod/mini");
12695
+ var DeepagentsSubagentFrontmatterSchema = import_mini48.z.looseObject({
12696
+ name: import_mini48.z.string(),
12697
+ description: import_mini48.z.optional(import_mini48.z.string()),
12698
+ model: import_mini48.z.optional(import_mini48.z.string())
12103
12699
  });
12104
- var CursorSubagent = class _CursorSubagent extends ToolSubagent {
12700
+ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
12105
12701
  frontmatter;
12106
12702
  body;
12107
12703
  constructor({ frontmatter, body, ...rest }) {
12108
12704
  if (rest.validate !== false) {
12109
- const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
12705
+ const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
12110
12706
  if (!result.success) {
12111
12707
  throw new Error(
12112
- `Invalid frontmatter in ${(0, import_node_path90.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12708
+ `Invalid frontmatter in ${(0, import_node_path94.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12113
12709
  );
12114
12710
  }
12115
12711
  }
12116
- super({
12117
- ...rest
12118
- });
12712
+ super({ ...rest });
12119
12713
  this.frontmatter = frontmatter;
12120
12714
  this.body = body;
12121
12715
  }
12122
12716
  static getSettablePaths(_options = {}) {
12123
12717
  return {
12124
- relativeDirPath: (0, import_node_path90.join)(".cursor", "agents")
12718
+ relativeDirPath: (0, import_node_path94.join)(".deepagents", "agents")
12125
12719
  };
12126
12720
  }
12127
12721
  getFrontmatter() {
@@ -12131,18 +12725,17 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
12131
12725
  return this.body;
12132
12726
  }
12133
12727
  toRulesyncSubagent() {
12134
- const { name, description, ...rest } = this.frontmatter;
12728
+ const { name, description, model } = this.frontmatter;
12729
+ const deepagentsSection = {};
12730
+ if (model) deepagentsSection.model = model;
12135
12731
  const rulesyncFrontmatter = {
12136
12732
  targets: ["*"],
12137
12733
  name,
12138
12734
  description,
12139
- cursor: {
12140
- ...rest
12141
- }
12735
+ ...Object.keys(deepagentsSection).length > 0 && { deepagents: deepagentsSection }
12142
12736
  };
12143
12737
  return new RulesyncSubagent({
12144
- baseDir: ".",
12145
- // RulesyncSubagent baseDir is always the project root directory
12738
+ baseDir: this.getBaseDir(),
12146
12739
  frontmatter: rulesyncFrontmatter,
12147
12740
  body: this.body,
12148
12741
  relativeDirPath: RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH,
@@ -12157,38 +12750,47 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
12157
12750
  global = false
12158
12751
  }) {
12159
12752
  const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
12160
- const cursorSection = rulesyncFrontmatter.cursor ?? {};
12161
- const cursorFrontmatter = {
12753
+ const deepagentsSection = this.filterToolSpecificSection(rulesyncFrontmatter.deepagents ?? {}, [
12754
+ "name",
12755
+ "description"
12756
+ ]);
12757
+ const rawFrontmatter = {
12162
12758
  name: rulesyncFrontmatter.name,
12163
12759
  description: rulesyncFrontmatter.description,
12164
- ...cursorSection
12760
+ ...deepagentsSection
12165
12761
  };
12762
+ const result = DeepagentsSubagentFrontmatterSchema.safeParse(rawFrontmatter);
12763
+ if (!result.success) {
12764
+ throw new Error(
12765
+ `Invalid deepagents subagent frontmatter in ${rulesyncSubagent.getRelativeFilePath()}: ${formatError(result.error)}`
12766
+ );
12767
+ }
12768
+ const deepagentsFrontmatter = result.data;
12166
12769
  const body = rulesyncSubagent.getBody();
12167
- const fileContent = stringifyFrontmatter(body, cursorFrontmatter, { avoidBlockScalars: true });
12770
+ const fileContent = stringifyFrontmatter(body, deepagentsFrontmatter);
12168
12771
  const paths = this.getSettablePaths({ global });
12169
- return new _CursorSubagent({
12772
+ return new _DeepagentsSubagent({
12170
12773
  baseDir,
12171
- frontmatter: cursorFrontmatter,
12774
+ frontmatter: deepagentsFrontmatter,
12172
12775
  body,
12173
12776
  relativeDirPath: paths.relativeDirPath,
12174
12777
  relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
12175
12778
  fileContent,
12176
- validate,
12177
- global
12779
+ validate
12178
12780
  });
12179
12781
  }
12180
12782
  validate() {
12181
12783
  if (!this.frontmatter) {
12182
12784
  return { success: true, error: null };
12183
12785
  }
12184
- const result = CursorSubagentFrontmatterSchema.safeParse(this.frontmatter);
12786
+ const result = DeepagentsSubagentFrontmatterSchema.safeParse(this.frontmatter);
12185
12787
  if (result.success) {
12186
12788
  return { success: true, error: null };
12187
12789
  } else {
12188
12790
  return {
12189
12791
  success: false,
12190
12792
  error: new Error(
12191
- `Invalid frontmatter in ${(0, import_node_path90.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12793
+ `Invalid frontmatter in ${(0, import_node_path94.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12192
12794
  )
12193
12795
  };
12194
12796
  }
@@ -12196,7 +12798,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
12196
12798
  static isTargetedByRulesyncSubagent(rulesyncSubagent) {
12197
12799
  return this.isTargetedByRulesyncSubagentDefault({
12198
12800
  rulesyncSubagent,
12199
- toolTarget: "cursor"
12801
+ toolTarget: "deepagents"
12200
12802
  });
12201
12803
  }
12202
12804
  static async fromFile({
@@ -12206,22 +12808,21 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
12206
12808
  global = false
12207
12809
  }) {
12208
12810
  const paths = this.getSettablePaths({ global });
12209
- const filePath = (0, import_node_path90.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12811
+ const filePath = (0, import_node_path94.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12210
12812
  const fileContent = await readFileContent(filePath);
12211
12813
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12212
- const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
12814
+ const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
12213
12815
  if (!result.success) {
12214
12816
  throw new Error(`Invalid frontmatter in ${filePath}: ${formatError(result.error)}`);
12215
12817
  }
12216
- return new _CursorSubagent({
12818
+ return new _DeepagentsSubagent({
12217
12819
  baseDir,
12218
12820
  relativeDirPath: paths.relativeDirPath,
12219
12821
  relativeFilePath,
12220
12822
  frontmatter: result.data,
12221
12823
  body: content.trim(),
12222
12824
  fileContent,
12223
- validate,
12224
- global
12825
+ validate
12225
12826
  });
12226
12827
  }
12227
12828
  static forDeletion({
@@ -12229,7 +12830,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
12229
12830
  relativeDirPath,
12230
12831
  relativeFilePath
12231
12832
  }) {
12232
- return new _CursorSubagent({
12833
+ return new _DeepagentsSubagent({
12233
12834
  baseDir,
12234
12835
  relativeDirPath,
12235
12836
  relativeFilePath,
@@ -12242,11 +12843,11 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
12242
12843
  };
12243
12844
 
12244
12845
  // src/features/subagents/junie-subagent.ts
12245
- var import_node_path91 = require("path");
12246
- var import_mini47 = require("zod/mini");
12247
- var JunieSubagentFrontmatterSchema = import_mini47.z.looseObject({
12248
- name: import_mini47.z.optional(import_mini47.z.string()),
12249
- description: import_mini47.z.string()
12846
+ var import_node_path95 = require("path");
12847
+ var import_mini49 = require("zod/mini");
12848
+ var JunieSubagentFrontmatterSchema = import_mini49.z.looseObject({
12849
+ name: import_mini49.z.optional(import_mini49.z.string()),
12850
+ description: import_mini49.z.string()
12250
12851
  });
12251
12852
  var JunieSubagent = class _JunieSubagent extends ToolSubagent {
12252
12853
  frontmatter;
@@ -12256,7 +12857,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
12256
12857
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
12257
12858
  if (!result.success) {
12258
12859
  throw new Error(
12259
- `Invalid frontmatter in ${(0, import_node_path91.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12860
+ `Invalid frontmatter in ${(0, import_node_path95.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12260
12861
  );
12261
12862
  }
12262
12863
  }
@@ -12271,7 +12872,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
12271
12872
  throw new Error("JunieSubagent does not support global mode.");
12272
12873
  }
12273
12874
  return {
12274
- relativeDirPath: (0, import_node_path91.join)(".junie", "agents")
12875
+ relativeDirPath: (0, import_node_path95.join)(".junie", "agents")
12275
12876
  };
12276
12877
  }
12277
12878
  getFrontmatter() {
@@ -12347,7 +12948,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
12347
12948
  return {
12348
12949
  success: false,
12349
12950
  error: new Error(
12350
- `Invalid frontmatter in ${(0, import_node_path91.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12951
+ `Invalid frontmatter in ${(0, import_node_path95.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12351
12952
  )
12352
12953
  };
12353
12954
  }
@@ -12365,7 +12966,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
12365
12966
  global = false
12366
12967
  }) {
12367
12968
  const paths = this.getSettablePaths({ global });
12368
- const filePath = (0, import_node_path91.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12969
+ const filePath = (0, import_node_path95.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12369
12970
  const fileContent = await readFileContent(filePath);
12370
12971
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12371
12972
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -12400,23 +13001,23 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
12400
13001
  };
12401
13002
 
12402
13003
  // src/features/subagents/kiro-subagent.ts
12403
- var import_node_path92 = require("path");
12404
- var import_mini48 = require("zod/mini");
12405
- var KiroCliSubagentJsonSchema = import_mini48.z.looseObject({
12406
- name: import_mini48.z.string(),
12407
- description: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.string())),
12408
- prompt: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.string())),
12409
- tools: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.array(import_mini48.z.string()))),
12410
- toolAliases: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.record(import_mini48.z.string(), import_mini48.z.string()))),
12411
- toolSettings: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.unknown())),
12412
- toolSchema: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.unknown())),
12413
- hooks: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.record(import_mini48.z.string(), import_mini48.z.array(import_mini48.z.unknown())))),
12414
- model: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.string())),
12415
- mcpServers: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.record(import_mini48.z.string(), import_mini48.z.unknown()))),
12416
- useLegacyMcpJson: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.boolean())),
12417
- resources: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.array(import_mini48.z.string()))),
12418
- allowedTools: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.array(import_mini48.z.string()))),
12419
- includeMcpJson: import_mini48.z.optional(import_mini48.z.nullable(import_mini48.z.boolean()))
13004
+ var import_node_path96 = require("path");
13005
+ var import_mini50 = require("zod/mini");
13006
+ var KiroCliSubagentJsonSchema = import_mini50.z.looseObject({
13007
+ name: import_mini50.z.string(),
13008
+ description: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.string())),
13009
+ prompt: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.string())),
13010
+ tools: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.array(import_mini50.z.string()))),
13011
+ toolAliases: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.record(import_mini50.z.string(), import_mini50.z.string()))),
13012
+ toolSettings: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.unknown())),
13013
+ toolSchema: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.unknown())),
13014
+ hooks: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.record(import_mini50.z.string(), import_mini50.z.array(import_mini50.z.unknown())))),
13015
+ model: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.string())),
13016
+ mcpServers: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.record(import_mini50.z.string(), import_mini50.z.unknown()))),
13017
+ useLegacyMcpJson: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.boolean())),
13018
+ resources: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.array(import_mini50.z.string()))),
13019
+ allowedTools: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.array(import_mini50.z.string()))),
13020
+ includeMcpJson: import_mini50.z.optional(import_mini50.z.nullable(import_mini50.z.boolean()))
12420
13021
  });
12421
13022
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12422
13023
  body;
@@ -12427,7 +13028,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12427
13028
  KiroCliSubagentJsonSchema.parse(parsed);
12428
13029
  } catch (error) {
12429
13030
  throw new Error(
12430
- `Invalid JSON in ${(0, import_node_path92.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
13031
+ `Invalid JSON in ${(0, import_node_path96.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
12431
13032
  { cause: error }
12432
13033
  );
12433
13034
  }
@@ -12439,7 +13040,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12439
13040
  }
12440
13041
  static getSettablePaths(_options = {}) {
12441
13042
  return {
12442
- relativeDirPath: (0, import_node_path92.join)(".kiro", "agents")
13043
+ relativeDirPath: (0, import_node_path96.join)(".kiro", "agents")
12443
13044
  };
12444
13045
  }
12445
13046
  getBody() {
@@ -12451,7 +13052,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12451
13052
  parsed = JSON.parse(this.body);
12452
13053
  } catch (error) {
12453
13054
  throw new Error(
12454
- `Failed to parse JSON in ${(0, import_node_path92.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
13055
+ `Failed to parse JSON in ${(0, import_node_path96.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
12455
13056
  { cause: error }
12456
13057
  );
12457
13058
  }
@@ -12532,7 +13133,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12532
13133
  global = false
12533
13134
  }) {
12534
13135
  const paths = this.getSettablePaths({ global });
12535
- const filePath = (0, import_node_path92.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13136
+ const filePath = (0, import_node_path96.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12536
13137
  const fileContent = await readFileContent(filePath);
12537
13138
  const subagent = new _KiroSubagent({
12538
13139
  baseDir,
@@ -12570,12 +13171,12 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12570
13171
  };
12571
13172
 
12572
13173
  // src/features/subagents/opencode-subagent.ts
12573
- var import_node_path93 = require("path");
12574
- var import_mini49 = require("zod/mini");
12575
- var OpenCodeSubagentFrontmatterSchema = import_mini49.z.looseObject({
12576
- description: import_mini49.z.optional(import_mini49.z.string()),
12577
- mode: import_mini49.z._default(import_mini49.z.string(), "subagent"),
12578
- name: import_mini49.z.optional(import_mini49.z.string())
13174
+ var import_node_path97 = require("path");
13175
+ var import_mini51 = require("zod/mini");
13176
+ var OpenCodeSubagentFrontmatterSchema = import_mini51.z.looseObject({
13177
+ description: import_mini51.z.optional(import_mini51.z.string()),
13178
+ mode: import_mini51.z._default(import_mini51.z.string(), "subagent"),
13179
+ name: import_mini51.z.optional(import_mini51.z.string())
12579
13180
  });
12580
13181
  var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
12581
13182
  frontmatter;
@@ -12585,7 +13186,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
12585
13186
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
12586
13187
  if (!result.success) {
12587
13188
  throw new Error(
12588
- `Invalid frontmatter in ${(0, import_node_path93.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13189
+ `Invalid frontmatter in ${(0, import_node_path97.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12589
13190
  );
12590
13191
  }
12591
13192
  }
@@ -12599,7 +13200,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
12599
13200
  global = false
12600
13201
  } = {}) {
12601
13202
  return {
12602
- relativeDirPath: global ? (0, import_node_path93.join)(".config", "opencode", "agent") : (0, import_node_path93.join)(".opencode", "agent")
13203
+ relativeDirPath: global ? (0, import_node_path97.join)(".config", "opencode", "agent") : (0, import_node_path97.join)(".opencode", "agent")
12603
13204
  };
12604
13205
  }
12605
13206
  getFrontmatter() {
@@ -12612,7 +13213,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
12612
13213
  const { description, mode, name, ...opencodeSection } = this.frontmatter;
12613
13214
  const rulesyncFrontmatter = {
12614
13215
  targets: ["*"],
12615
- name: name ?? (0, import_node_path93.basename)(this.getRelativeFilePath(), ".md"),
13216
+ name: name ?? (0, import_node_path97.basename)(this.getRelativeFilePath(), ".md"),
12616
13217
  description,
12617
13218
  opencode: { mode, ...opencodeSection }
12618
13219
  };
@@ -12665,7 +13266,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
12665
13266
  return {
12666
13267
  success: false,
12667
13268
  error: new Error(
12668
- `Invalid frontmatter in ${(0, import_node_path93.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13269
+ `Invalid frontmatter in ${(0, import_node_path97.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12669
13270
  )
12670
13271
  };
12671
13272
  }
@@ -12682,7 +13283,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
12682
13283
  global = false
12683
13284
  }) {
12684
13285
  const paths = this.getSettablePaths({ global });
12685
- const filePath = (0, import_node_path93.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13286
+ const filePath = (0, import_node_path97.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12686
13287
  const fileContent = await readFileContent(filePath);
12687
13288
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12688
13289
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -12725,6 +13326,7 @@ var subagentsProcessorToolTargetTuple = [
12725
13326
  "codexcli",
12726
13327
  "copilot",
12727
13328
  "cursor",
13329
+ "deepagents",
12728
13330
  "factorydroid",
12729
13331
  "geminicli",
12730
13332
  "junie",
@@ -12732,7 +13334,7 @@ var subagentsProcessorToolTargetTuple = [
12732
13334
  "opencode",
12733
13335
  "roo"
12734
13336
  ];
12735
- var SubagentsProcessorToolTargetSchema = import_mini50.z.enum(subagentsProcessorToolTargetTuple);
13337
+ var SubagentsProcessorToolTargetSchema = import_mini52.z.enum(subagentsProcessorToolTargetTuple);
12736
13338
  var toolSubagentFactories = /* @__PURE__ */ new Map([
12737
13339
  [
12738
13340
  "agentsmd",
@@ -12759,7 +13361,7 @@ var toolSubagentFactories = /* @__PURE__ */ new Map([
12759
13361
  "codexcli",
12760
13362
  {
12761
13363
  class: CodexCliSubagent,
12762
- meta: { supportsSimulated: false, supportsGlobal: false, filePattern: "*.toml" }
13364
+ meta: { supportsSimulated: false, supportsGlobal: true, filePattern: "*.toml" }
12763
13365
  }
12764
13366
  ],
12765
13367
  [
@@ -12776,11 +13378,18 @@ var toolSubagentFactories = /* @__PURE__ */ new Map([
12776
13378
  meta: { supportsSimulated: false, supportsGlobal: true, filePattern: "*.md" }
12777
13379
  }
12778
13380
  ],
13381
+ [
13382
+ "deepagents",
13383
+ {
13384
+ class: DeepagentsSubagent,
13385
+ meta: { supportsSimulated: false, supportsGlobal: false, filePattern: "*.md" }
13386
+ }
13387
+ ],
12779
13388
  [
12780
13389
  "factorydroid",
12781
13390
  {
12782
13391
  class: FactorydroidSubagent,
12783
- meta: { supportsSimulated: true, supportsGlobal: true, filePattern: "*.md" }
13392
+ meta: { supportsSimulated: true, supportsGlobal: false, filePattern: "*.md" }
12784
13393
  }
12785
13394
  ],
12786
13395
  [
@@ -12902,7 +13511,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
12902
13511
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
12903
13512
  */
12904
13513
  async loadRulesyncFiles() {
12905
- const subagentsDir = (0, import_node_path94.join)(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
13514
+ const subagentsDir = (0, import_node_path98.join)(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
12906
13515
  const dirExists = await directoryExists(subagentsDir);
12907
13516
  if (!dirExists) {
12908
13517
  this.logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -12917,7 +13526,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
12917
13526
  this.logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
12918
13527
  const rulesyncSubagents = [];
12919
13528
  for (const mdFile of mdFiles) {
12920
- const filepath = (0, import_node_path94.join)(subagentsDir, mdFile);
13529
+ const filepath = (0, import_node_path98.join)(subagentsDir, mdFile);
12921
13530
  try {
12922
13531
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
12923
13532
  relativeFilePath: mdFile,
@@ -12947,14 +13556,14 @@ var SubagentsProcessor = class extends FeatureProcessor {
12947
13556
  const factory = this.getFactory(this.toolTarget);
12948
13557
  const paths = factory.class.getSettablePaths({ global: this.global });
12949
13558
  const subagentFilePaths = await findFilesByGlobs(
12950
- (0, import_node_path94.join)(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
13559
+ (0, import_node_path98.join)(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
12951
13560
  );
12952
13561
  if (forDeletion) {
12953
13562
  const toolSubagents2 = subagentFilePaths.map(
12954
13563
  (path3) => factory.class.forDeletion({
12955
13564
  baseDir: this.baseDir,
12956
13565
  relativeDirPath: paths.relativeDirPath,
12957
- relativeFilePath: (0, import_node_path94.basename)(path3),
13566
+ relativeFilePath: (0, import_node_path98.basename)(path3),
12958
13567
  global: this.global
12959
13568
  })
12960
13569
  ).filter((subagent) => subagent.isDeletable());
@@ -12967,7 +13576,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
12967
13576
  subagentFilePaths.map(
12968
13577
  (path3) => factory.class.fromFile({
12969
13578
  baseDir: this.baseDir,
12970
- relativeFilePath: (0, import_node_path94.basename)(path3),
13579
+ relativeFilePath: (0, import_node_path98.basename)(path3),
12971
13580
  global: this.global
12972
13581
  })
12973
13582
  )
@@ -13014,49 +13623,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
13014
13623
  };
13015
13624
 
13016
13625
  // src/features/rules/agentsmd-rule.ts
13017
- var import_node_path97 = require("path");
13626
+ var import_node_path101 = require("path");
13018
13627
 
13019
13628
  // src/features/rules/tool-rule.ts
13020
- var import_node_path96 = require("path");
13629
+ var import_node_path100 = require("path");
13021
13630
 
13022
13631
  // src/features/rules/rulesync-rule.ts
13023
- var import_node_path95 = require("path");
13024
- var import_mini51 = require("zod/mini");
13025
- var RulesyncRuleFrontmatterSchema = import_mini51.z.object({
13026
- root: import_mini51.z.optional(import_mini51.z.boolean()),
13027
- localRoot: import_mini51.z.optional(import_mini51.z.boolean()),
13028
- targets: import_mini51.z._default(RulesyncTargetsSchema, ["*"]),
13029
- description: import_mini51.z.optional(import_mini51.z.string()),
13030
- globs: import_mini51.z.optional(import_mini51.z.array(import_mini51.z.string())),
13031
- agentsmd: import_mini51.z.optional(
13032
- import_mini51.z.object({
13632
+ var import_node_path99 = require("path");
13633
+ var import_mini53 = require("zod/mini");
13634
+ var RulesyncRuleFrontmatterSchema = import_mini53.z.object({
13635
+ root: import_mini53.z.optional(import_mini53.z.boolean()),
13636
+ localRoot: import_mini53.z.optional(import_mini53.z.boolean()),
13637
+ targets: import_mini53.z._default(RulesyncTargetsSchema, ["*"]),
13638
+ description: import_mini53.z.optional(import_mini53.z.string()),
13639
+ globs: import_mini53.z.optional(import_mini53.z.array(import_mini53.z.string())),
13640
+ agentsmd: import_mini53.z.optional(
13641
+ import_mini53.z.object({
13033
13642
  // @example "path/to/subproject"
13034
- subprojectPath: import_mini51.z.optional(import_mini51.z.string())
13643
+ subprojectPath: import_mini53.z.optional(import_mini53.z.string())
13035
13644
  })
13036
13645
  ),
13037
- claudecode: import_mini51.z.optional(
13038
- import_mini51.z.object({
13646
+ claudecode: import_mini53.z.optional(
13647
+ import_mini53.z.object({
13039
13648
  // Glob patterns for conditional rules (takes precedence over globs)
13040
13649
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
13041
- paths: import_mini51.z.optional(import_mini51.z.array(import_mini51.z.string()))
13650
+ paths: import_mini53.z.optional(import_mini53.z.array(import_mini53.z.string()))
13042
13651
  })
13043
13652
  ),
13044
- cursor: import_mini51.z.optional(
13045
- import_mini51.z.object({
13046
- alwaysApply: import_mini51.z.optional(import_mini51.z.boolean()),
13047
- description: import_mini51.z.optional(import_mini51.z.string()),
13048
- globs: import_mini51.z.optional(import_mini51.z.array(import_mini51.z.string()))
13653
+ cursor: import_mini53.z.optional(
13654
+ import_mini53.z.object({
13655
+ alwaysApply: import_mini53.z.optional(import_mini53.z.boolean()),
13656
+ description: import_mini53.z.optional(import_mini53.z.string()),
13657
+ globs: import_mini53.z.optional(import_mini53.z.array(import_mini53.z.string()))
13049
13658
  })
13050
13659
  ),
13051
- copilot: import_mini51.z.optional(
13052
- import_mini51.z.object({
13053
- excludeAgent: import_mini51.z.optional(import_mini51.z.union([import_mini51.z.literal("code-review"), import_mini51.z.literal("coding-agent")]))
13660
+ copilot: import_mini53.z.optional(
13661
+ import_mini53.z.object({
13662
+ excludeAgent: import_mini53.z.optional(import_mini53.z.union([import_mini53.z.literal("code-review"), import_mini53.z.literal("coding-agent")]))
13054
13663
  })
13055
13664
  ),
13056
- antigravity: import_mini51.z.optional(
13057
- import_mini51.z.looseObject({
13058
- trigger: import_mini51.z.optional(import_mini51.z.string()),
13059
- globs: import_mini51.z.optional(import_mini51.z.array(import_mini51.z.string()))
13665
+ antigravity: import_mini53.z.optional(
13666
+ import_mini53.z.looseObject({
13667
+ trigger: import_mini53.z.optional(import_mini53.z.string()),
13668
+ globs: import_mini53.z.optional(import_mini53.z.array(import_mini53.z.string()))
13060
13669
  })
13061
13670
  )
13062
13671
  });
@@ -13067,7 +13676,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
13067
13676
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
13068
13677
  if (!parseResult.success && rest.validate !== false) {
13069
13678
  throw new Error(
13070
- `Invalid frontmatter in ${(0, import_node_path95.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
13679
+ `Invalid frontmatter in ${(0, import_node_path99.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
13071
13680
  );
13072
13681
  }
13073
13682
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -13102,7 +13711,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
13102
13711
  return {
13103
13712
  success: false,
13104
13713
  error: new Error(
13105
- `Invalid frontmatter in ${(0, import_node_path95.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13714
+ `Invalid frontmatter in ${(0, import_node_path99.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13106
13715
  )
13107
13716
  };
13108
13717
  }
@@ -13111,7 +13720,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
13111
13720
  relativeFilePath,
13112
13721
  validate = true
13113
13722
  }) {
13114
- const filePath = (0, import_node_path95.join)(
13723
+ const filePath = (0, import_node_path99.join)(
13115
13724
  process.cwd(),
13116
13725
  this.getSettablePaths().recommended.relativeDirPath,
13117
13726
  relativeFilePath
@@ -13129,7 +13738,10 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
13129
13738
  description: result.data.description,
13130
13739
  globs: result.data.globs ?? [],
13131
13740
  agentsmd: result.data.agentsmd,
13132
- cursor: result.data.cursor
13741
+ claudecode: result.data.claudecode,
13742
+ cursor: result.data.cursor,
13743
+ copilot: result.data.copilot,
13744
+ antigravity: result.data.antigravity
13133
13745
  };
13134
13746
  return new _RulesyncRule({
13135
13747
  baseDir: process.cwd(),
@@ -13213,7 +13825,7 @@ var ToolRule = class extends ToolFile {
13213
13825
  rulesyncRule,
13214
13826
  validate = true,
13215
13827
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
13216
- nonRootPath = { relativeDirPath: (0, import_node_path96.join)(".agents", "memories") }
13828
+ nonRootPath = { relativeDirPath: (0, import_node_path100.join)(".agents", "memories") }
13217
13829
  }) {
13218
13830
  const params = this.buildToolRuleParamsDefault({
13219
13831
  baseDir,
@@ -13224,7 +13836,7 @@ var ToolRule = class extends ToolFile {
13224
13836
  });
13225
13837
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
13226
13838
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
13227
- params.relativeDirPath = (0, import_node_path96.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
13839
+ params.relativeDirPath = (0, import_node_path100.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
13228
13840
  params.relativeFilePath = "AGENTS.md";
13229
13841
  }
13230
13842
  return params;
@@ -13273,7 +13885,7 @@ var ToolRule = class extends ToolFile {
13273
13885
  }
13274
13886
  };
13275
13887
  function buildToolPath(toolDir, subDir, excludeToolDir) {
13276
- return excludeToolDir ? subDir : (0, import_node_path96.join)(toolDir, subDir);
13888
+ return excludeToolDir ? subDir : (0, import_node_path100.join)(toolDir, subDir);
13277
13889
  }
13278
13890
 
13279
13891
  // src/features/rules/agentsmd-rule.ts
@@ -13302,8 +13914,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
13302
13914
  validate = true
13303
13915
  }) {
13304
13916
  const isRoot = relativeFilePath === "AGENTS.md";
13305
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path97.join)(".agents", "memories", relativeFilePath);
13306
- const fileContent = await readFileContent((0, import_node_path97.join)(baseDir, relativePath));
13917
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path101.join)(".agents", "memories", relativeFilePath);
13918
+ const fileContent = await readFileContent((0, import_node_path101.join)(baseDir, relativePath));
13307
13919
  return new _AgentsMdRule({
13308
13920
  baseDir,
13309
13921
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -13358,21 +13970,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
13358
13970
  };
13359
13971
 
13360
13972
  // src/features/rules/antigravity-rule.ts
13361
- var import_node_path98 = require("path");
13362
- var import_mini52 = require("zod/mini");
13363
- var AntigravityRuleFrontmatterSchema = import_mini52.z.looseObject({
13364
- trigger: import_mini52.z.optional(
13365
- import_mini52.z.union([
13366
- import_mini52.z.literal("always_on"),
13367
- import_mini52.z.literal("glob"),
13368
- import_mini52.z.literal("manual"),
13369
- import_mini52.z.literal("model_decision"),
13370
- import_mini52.z.string()
13973
+ var import_node_path102 = require("path");
13974
+ var import_mini54 = require("zod/mini");
13975
+ var AntigravityRuleFrontmatterSchema = import_mini54.z.looseObject({
13976
+ trigger: import_mini54.z.optional(
13977
+ import_mini54.z.union([
13978
+ import_mini54.z.literal("always_on"),
13979
+ import_mini54.z.literal("glob"),
13980
+ import_mini54.z.literal("manual"),
13981
+ import_mini54.z.literal("model_decision"),
13982
+ import_mini54.z.string()
13371
13983
  // accepts any string for forward compatibility
13372
13984
  ])
13373
13985
  ),
13374
- globs: import_mini52.z.optional(import_mini52.z.string()),
13375
- description: import_mini52.z.optional(import_mini52.z.string())
13986
+ globs: import_mini54.z.optional(import_mini54.z.string()),
13987
+ description: import_mini54.z.optional(import_mini54.z.string())
13376
13988
  });
13377
13989
  function parseGlobsString(globs) {
13378
13990
  if (!globs) {
@@ -13517,7 +14129,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
13517
14129
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
13518
14130
  if (!result.success) {
13519
14131
  throw new Error(
13520
- `Invalid frontmatter in ${(0, import_node_path98.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14132
+ `Invalid frontmatter in ${(0, import_node_path102.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13521
14133
  );
13522
14134
  }
13523
14135
  }
@@ -13541,7 +14153,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
13541
14153
  relativeFilePath,
13542
14154
  validate = true
13543
14155
  }) {
13544
- const filePath = (0, import_node_path98.join)(
14156
+ const filePath = (0, import_node_path102.join)(
13545
14157
  baseDir,
13546
14158
  this.getSettablePaths().nonRoot.relativeDirPath,
13547
14159
  relativeFilePath
@@ -13681,7 +14293,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
13681
14293
  };
13682
14294
 
13683
14295
  // src/features/rules/augmentcode-legacy-rule.ts
13684
- var import_node_path99 = require("path");
14296
+ var import_node_path103 = require("path");
13685
14297
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
13686
14298
  toRulesyncRule() {
13687
14299
  const rulesyncFrontmatter = {
@@ -13741,8 +14353,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
13741
14353
  }) {
13742
14354
  const settablePaths = this.getSettablePaths();
13743
14355
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
13744
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path99.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
13745
- const fileContent = await readFileContent((0, import_node_path99.join)(baseDir, relativePath));
14356
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path103.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
14357
+ const fileContent = await readFileContent((0, import_node_path103.join)(baseDir, relativePath));
13746
14358
  return new _AugmentcodeLegacyRule({
13747
14359
  baseDir,
13748
14360
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -13771,7 +14383,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
13771
14383
  };
13772
14384
 
13773
14385
  // src/features/rules/augmentcode-rule.ts
13774
- var import_node_path100 = require("path");
14386
+ var import_node_path104 = require("path");
13775
14387
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
13776
14388
  toRulesyncRule() {
13777
14389
  return this.toRulesyncRuleDefault();
@@ -13802,7 +14414,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
13802
14414
  relativeFilePath,
13803
14415
  validate = true
13804
14416
  }) {
13805
- const filePath = (0, import_node_path100.join)(
14417
+ const filePath = (0, import_node_path104.join)(
13806
14418
  baseDir,
13807
14419
  this.getSettablePaths().nonRoot.relativeDirPath,
13808
14420
  relativeFilePath
@@ -13842,7 +14454,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
13842
14454
  };
13843
14455
 
13844
14456
  // src/features/rules/claudecode-legacy-rule.ts
13845
- var import_node_path101 = require("path");
14457
+ var import_node_path105 = require("path");
13846
14458
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
13847
14459
  static getSettablePaths({
13848
14460
  global,
@@ -13884,7 +14496,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
13884
14496
  if (isRoot) {
13885
14497
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
13886
14498
  const fileContent2 = await readFileContent(
13887
- (0, import_node_path101.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
14499
+ (0, import_node_path105.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
13888
14500
  );
13889
14501
  return new _ClaudecodeLegacyRule({
13890
14502
  baseDir,
@@ -13898,8 +14510,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
13898
14510
  if (!paths.nonRoot) {
13899
14511
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13900
14512
  }
13901
- const relativePath = (0, import_node_path101.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
13902
- const fileContent = await readFileContent((0, import_node_path101.join)(baseDir, relativePath));
14513
+ const relativePath = (0, import_node_path105.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14514
+ const fileContent = await readFileContent((0, import_node_path105.join)(baseDir, relativePath));
13903
14515
  return new _ClaudecodeLegacyRule({
13904
14516
  baseDir,
13905
14517
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -13958,10 +14570,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
13958
14570
  };
13959
14571
 
13960
14572
  // src/features/rules/claudecode-rule.ts
13961
- var import_node_path102 = require("path");
13962
- var import_mini53 = require("zod/mini");
13963
- var ClaudecodeRuleFrontmatterSchema = import_mini53.z.object({
13964
- paths: import_mini53.z.optional(import_mini53.z.array(import_mini53.z.string()))
14573
+ var import_node_path106 = require("path");
14574
+ var import_mini55 = require("zod/mini");
14575
+ var ClaudecodeRuleFrontmatterSchema = import_mini55.z.object({
14576
+ paths: import_mini55.z.optional(import_mini55.z.array(import_mini55.z.string()))
13965
14577
  });
13966
14578
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13967
14579
  frontmatter;
@@ -13999,7 +14611,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13999
14611
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
14000
14612
  if (!result.success) {
14001
14613
  throw new Error(
14002
- `Invalid frontmatter in ${(0, import_node_path102.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14614
+ `Invalid frontmatter in ${(0, import_node_path106.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14003
14615
  );
14004
14616
  }
14005
14617
  }
@@ -14029,7 +14641,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
14029
14641
  if (isRoot) {
14030
14642
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
14031
14643
  const fileContent2 = await readFileContent(
14032
- (0, import_node_path102.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
14644
+ (0, import_node_path106.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
14033
14645
  );
14034
14646
  return new _ClaudecodeRule({
14035
14647
  baseDir,
@@ -14044,8 +14656,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
14044
14656
  if (!paths.nonRoot) {
14045
14657
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14046
14658
  }
14047
- const relativePath = (0, import_node_path102.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14048
- const filePath = (0, import_node_path102.join)(baseDir, relativePath);
14659
+ const relativePath = (0, import_node_path106.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14660
+ const filePath = (0, import_node_path106.join)(baseDir, relativePath);
14049
14661
  const fileContent = await readFileContent(filePath);
14050
14662
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14051
14663
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
@@ -14156,7 +14768,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
14156
14768
  return {
14157
14769
  success: false,
14158
14770
  error: new Error(
14159
- `Invalid frontmatter in ${(0, import_node_path102.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14771
+ `Invalid frontmatter in ${(0, import_node_path106.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14160
14772
  )
14161
14773
  };
14162
14774
  }
@@ -14176,10 +14788,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
14176
14788
  };
14177
14789
 
14178
14790
  // src/features/rules/cline-rule.ts
14179
- var import_node_path103 = require("path");
14180
- var import_mini54 = require("zod/mini");
14181
- var ClineRuleFrontmatterSchema = import_mini54.z.object({
14182
- description: import_mini54.z.string()
14791
+ var import_node_path107 = require("path");
14792
+ var import_mini56 = require("zod/mini");
14793
+ var ClineRuleFrontmatterSchema = import_mini56.z.object({
14794
+ description: import_mini56.z.string()
14183
14795
  });
14184
14796
  var ClineRule = class _ClineRule extends ToolRule {
14185
14797
  static getSettablePaths(_options = {}) {
@@ -14222,7 +14834,7 @@ var ClineRule = class _ClineRule extends ToolRule {
14222
14834
  validate = true
14223
14835
  }) {
14224
14836
  const fileContent = await readFileContent(
14225
- (0, import_node_path103.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14837
+ (0, import_node_path107.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14226
14838
  );
14227
14839
  return new _ClineRule({
14228
14840
  baseDir,
@@ -14248,7 +14860,7 @@ var ClineRule = class _ClineRule extends ToolRule {
14248
14860
  };
14249
14861
 
14250
14862
  // src/features/rules/codexcli-rule.ts
14251
- var import_node_path104 = require("path");
14863
+ var import_node_path108 = require("path");
14252
14864
  var CodexcliRule = class _CodexcliRule extends ToolRule {
14253
14865
  static getSettablePaths({
14254
14866
  global,
@@ -14283,7 +14895,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
14283
14895
  if (isRoot) {
14284
14896
  const relativePath2 = paths.root.relativeFilePath;
14285
14897
  const fileContent2 = await readFileContent(
14286
- (0, import_node_path104.join)(baseDir, paths.root.relativeDirPath, relativePath2)
14898
+ (0, import_node_path108.join)(baseDir, paths.root.relativeDirPath, relativePath2)
14287
14899
  );
14288
14900
  return new _CodexcliRule({
14289
14901
  baseDir,
@@ -14297,8 +14909,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
14297
14909
  if (!paths.nonRoot) {
14298
14910
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14299
14911
  }
14300
- const relativePath = (0, import_node_path104.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14301
- const fileContent = await readFileContent((0, import_node_path104.join)(baseDir, relativePath));
14912
+ const relativePath = (0, import_node_path108.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14913
+ const fileContent = await readFileContent((0, import_node_path108.join)(baseDir, relativePath));
14302
14914
  return new _CodexcliRule({
14303
14915
  baseDir,
14304
14916
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14357,12 +14969,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
14357
14969
  };
14358
14970
 
14359
14971
  // src/features/rules/copilot-rule.ts
14360
- var import_node_path105 = require("path");
14361
- var import_mini55 = require("zod/mini");
14362
- var CopilotRuleFrontmatterSchema = import_mini55.z.object({
14363
- description: import_mini55.z.optional(import_mini55.z.string()),
14364
- applyTo: import_mini55.z.optional(import_mini55.z.string()),
14365
- excludeAgent: import_mini55.z.optional(import_mini55.z.union([import_mini55.z.literal("code-review"), import_mini55.z.literal("coding-agent")]))
14972
+ var import_node_path109 = require("path");
14973
+ var import_mini57 = require("zod/mini");
14974
+ var CopilotRuleFrontmatterSchema = import_mini57.z.object({
14975
+ description: import_mini57.z.optional(import_mini57.z.string()),
14976
+ applyTo: import_mini57.z.optional(import_mini57.z.string()),
14977
+ excludeAgent: import_mini57.z.optional(import_mini57.z.union([import_mini57.z.literal("code-review"), import_mini57.z.literal("coding-agent")]))
14366
14978
  });
14367
14979
  var CopilotRule = class _CopilotRule extends ToolRule {
14368
14980
  frontmatter;
@@ -14394,7 +15006,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
14394
15006
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
14395
15007
  if (!result.success) {
14396
15008
  throw new Error(
14397
- `Invalid frontmatter in ${(0, import_node_path105.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15009
+ `Invalid frontmatter in ${(0, import_node_path109.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14398
15010
  );
14399
15011
  }
14400
15012
  }
@@ -14484,8 +15096,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
14484
15096
  const paths = this.getSettablePaths({ global });
14485
15097
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
14486
15098
  if (isRoot) {
14487
- const relativePath2 = (0, import_node_path105.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
14488
- const filePath2 = (0, import_node_path105.join)(baseDir, relativePath2);
15099
+ const relativePath2 = (0, import_node_path109.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
15100
+ const filePath2 = (0, import_node_path109.join)(baseDir, relativePath2);
14489
15101
  const fileContent2 = await readFileContent(filePath2);
14490
15102
  return new _CopilotRule({
14491
15103
  baseDir,
@@ -14500,8 +15112,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
14500
15112
  if (!paths.nonRoot) {
14501
15113
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14502
15114
  }
14503
- const relativePath = (0, import_node_path105.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14504
- const filePath = (0, import_node_path105.join)(baseDir, relativePath);
15115
+ const relativePath = (0, import_node_path109.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
15116
+ const filePath = (0, import_node_path109.join)(baseDir, relativePath);
14505
15117
  const fileContent = await readFileContent(filePath);
14506
15118
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14507
15119
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
@@ -14547,7 +15159,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
14547
15159
  return {
14548
15160
  success: false,
14549
15161
  error: new Error(
14550
- `Invalid frontmatter in ${(0, import_node_path105.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15162
+ `Invalid frontmatter in ${(0, import_node_path109.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14551
15163
  )
14552
15164
  };
14553
15165
  }
@@ -14567,12 +15179,12 @@ var CopilotRule = class _CopilotRule extends ToolRule {
14567
15179
  };
14568
15180
 
14569
15181
  // src/features/rules/cursor-rule.ts
14570
- var import_node_path106 = require("path");
14571
- var import_mini56 = require("zod/mini");
14572
- var CursorRuleFrontmatterSchema = import_mini56.z.object({
14573
- description: import_mini56.z.optional(import_mini56.z.string()),
14574
- globs: import_mini56.z.optional(import_mini56.z.string()),
14575
- alwaysApply: import_mini56.z.optional(import_mini56.z.boolean())
15182
+ var import_node_path110 = require("path");
15183
+ var import_mini58 = require("zod/mini");
15184
+ var CursorRuleFrontmatterSchema = import_mini58.z.object({
15185
+ description: import_mini58.z.optional(import_mini58.z.string()),
15186
+ globs: import_mini58.z.optional(import_mini58.z.string()),
15187
+ alwaysApply: import_mini58.z.optional(import_mini58.z.boolean())
14576
15188
  });
14577
15189
  var CursorRule = class _CursorRule extends ToolRule {
14578
15190
  frontmatter;
@@ -14589,7 +15201,7 @@ var CursorRule = class _CursorRule extends ToolRule {
14589
15201
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
14590
15202
  if (!result.success) {
14591
15203
  throw new Error(
14592
- `Invalid frontmatter in ${(0, import_node_path106.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15204
+ `Invalid frontmatter in ${(0, import_node_path110.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14593
15205
  );
14594
15206
  }
14595
15207
  }
@@ -14705,7 +15317,7 @@ var CursorRule = class _CursorRule extends ToolRule {
14705
15317
  relativeFilePath,
14706
15318
  validate = true
14707
15319
  }) {
14708
- const filePath = (0, import_node_path106.join)(
15320
+ const filePath = (0, import_node_path110.join)(
14709
15321
  baseDir,
14710
15322
  this.getSettablePaths().nonRoot.relativeDirPath,
14711
15323
  relativeFilePath
@@ -14715,7 +15327,7 @@ var CursorRule = class _CursorRule extends ToolRule {
14715
15327
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
14716
15328
  if (!result.success) {
14717
15329
  throw new Error(
14718
- `Invalid frontmatter in ${(0, import_node_path106.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
15330
+ `Invalid frontmatter in ${(0, import_node_path110.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
14719
15331
  );
14720
15332
  }
14721
15333
  return new _CursorRule({
@@ -14752,7 +15364,7 @@ var CursorRule = class _CursorRule extends ToolRule {
14752
15364
  return {
14753
15365
  success: false,
14754
15366
  error: new Error(
14755
- `Invalid frontmatter in ${(0, import_node_path106.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15367
+ `Invalid frontmatter in ${(0, import_node_path110.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14756
15368
  )
14757
15369
  };
14758
15370
  }
@@ -14771,8 +15383,90 @@ var CursorRule = class _CursorRule extends ToolRule {
14771
15383
  }
14772
15384
  };
14773
15385
 
15386
+ // src/features/rules/deepagents-rule.ts
15387
+ var import_node_path111 = require("path");
15388
+ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
15389
+ constructor({ fileContent, root, ...rest }) {
15390
+ super({
15391
+ ...rest,
15392
+ fileContent,
15393
+ root: root ?? false
15394
+ });
15395
+ }
15396
+ static getSettablePaths(_options = {}) {
15397
+ return {
15398
+ root: {
15399
+ relativeDirPath: ".deepagents",
15400
+ relativeFilePath: "AGENTS.md"
15401
+ },
15402
+ nonRoot: {
15403
+ relativeDirPath: buildToolPath(".deepagents", "memories", _options.excludeToolDir)
15404
+ }
15405
+ };
15406
+ }
15407
+ static async fromFile({
15408
+ baseDir = process.cwd(),
15409
+ relativeFilePath,
15410
+ validate = true
15411
+ }) {
15412
+ const isRoot = relativeFilePath === "AGENTS.md";
15413
+ const relativePath = isRoot ? (0, import_node_path111.join)(".deepagents", "AGENTS.md") : (0, import_node_path111.join)(".deepagents", "memories", relativeFilePath);
15414
+ const fileContent = await readFileContent((0, import_node_path111.join)(baseDir, relativePath));
15415
+ return new _DeepagentsRule({
15416
+ baseDir,
15417
+ relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
15418
+ relativeFilePath: isRoot ? "AGENTS.md" : relativeFilePath,
15419
+ fileContent,
15420
+ validate,
15421
+ root: isRoot
15422
+ });
15423
+ }
15424
+ static forDeletion({
15425
+ baseDir = process.cwd(),
15426
+ relativeDirPath,
15427
+ relativeFilePath
15428
+ }) {
15429
+ const isRoot = relativeFilePath === "AGENTS.md" && relativeDirPath === ".deepagents";
15430
+ return new _DeepagentsRule({
15431
+ baseDir,
15432
+ relativeDirPath,
15433
+ relativeFilePath,
15434
+ fileContent: "",
15435
+ validate: false,
15436
+ root: isRoot
15437
+ });
15438
+ }
15439
+ static fromRulesyncRule({
15440
+ baseDir = process.cwd(),
15441
+ rulesyncRule,
15442
+ validate = true
15443
+ }) {
15444
+ return new _DeepagentsRule(
15445
+ this.buildToolRuleParamsAgentsmd({
15446
+ baseDir,
15447
+ rulesyncRule,
15448
+ validate,
15449
+ rootPath: this.getSettablePaths().root,
15450
+ nonRootPath: this.getSettablePaths().nonRoot
15451
+ })
15452
+ );
15453
+ }
15454
+ toRulesyncRule() {
15455
+ return this.toRulesyncRuleDefault();
15456
+ }
15457
+ validate() {
15458
+ return { success: true, error: null };
15459
+ }
15460
+ static isTargetedByRulesyncRule(rulesyncRule) {
15461
+ return this.isTargetedByRulesyncRuleDefault({
15462
+ rulesyncRule,
15463
+ toolTarget: "deepagents"
15464
+ });
15465
+ }
15466
+ };
15467
+
14774
15468
  // src/features/rules/factorydroid-rule.ts
14775
- var import_node_path107 = require("path");
15469
+ var import_node_path112 = require("path");
14776
15470
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
14777
15471
  constructor({ fileContent, root, ...rest }) {
14778
15472
  super({
@@ -14812,8 +15506,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
14812
15506
  const paths = this.getSettablePaths({ global });
14813
15507
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
14814
15508
  if (isRoot) {
14815
- const relativePath2 = (0, import_node_path107.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
14816
- const fileContent2 = await readFileContent((0, import_node_path107.join)(baseDir, relativePath2));
15509
+ const relativePath2 = (0, import_node_path112.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
15510
+ const fileContent2 = await readFileContent((0, import_node_path112.join)(baseDir, relativePath2));
14817
15511
  return new _FactorydroidRule({
14818
15512
  baseDir,
14819
15513
  relativeDirPath: paths.root.relativeDirPath,
@@ -14826,8 +15520,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
14826
15520
  if (!paths.nonRoot) {
14827
15521
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14828
15522
  }
14829
- const relativePath = (0, import_node_path107.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14830
- const fileContent = await readFileContent((0, import_node_path107.join)(baseDir, relativePath));
15523
+ const relativePath = (0, import_node_path112.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
15524
+ const fileContent = await readFileContent((0, import_node_path112.join)(baseDir, relativePath));
14831
15525
  return new _FactorydroidRule({
14832
15526
  baseDir,
14833
15527
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14886,7 +15580,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
14886
15580
  };
14887
15581
 
14888
15582
  // src/features/rules/geminicli-rule.ts
14889
- var import_node_path108 = require("path");
15583
+ var import_node_path113 = require("path");
14890
15584
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
14891
15585
  static getSettablePaths({
14892
15586
  global,
@@ -14921,7 +15615,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
14921
15615
  if (isRoot) {
14922
15616
  const relativePath2 = paths.root.relativeFilePath;
14923
15617
  const fileContent2 = await readFileContent(
14924
- (0, import_node_path108.join)(baseDir, paths.root.relativeDirPath, relativePath2)
15618
+ (0, import_node_path113.join)(baseDir, paths.root.relativeDirPath, relativePath2)
14925
15619
  );
14926
15620
  return new _GeminiCliRule({
14927
15621
  baseDir,
@@ -14935,8 +15629,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
14935
15629
  if (!paths.nonRoot) {
14936
15630
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14937
15631
  }
14938
- const relativePath = (0, import_node_path108.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14939
- const fileContent = await readFileContent((0, import_node_path108.join)(baseDir, relativePath));
15632
+ const relativePath = (0, import_node_path113.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
15633
+ const fileContent = await readFileContent((0, import_node_path113.join)(baseDir, relativePath));
14940
15634
  return new _GeminiCliRule({
14941
15635
  baseDir,
14942
15636
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14995,7 +15689,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
14995
15689
  };
14996
15690
 
14997
15691
  // src/features/rules/goose-rule.ts
14998
- var import_node_path109 = require("path");
15692
+ var import_node_path114 = require("path");
14999
15693
  var GooseRule = class _GooseRule extends ToolRule {
15000
15694
  static getSettablePaths({
15001
15695
  global,
@@ -15030,7 +15724,7 @@ var GooseRule = class _GooseRule extends ToolRule {
15030
15724
  if (isRoot) {
15031
15725
  const relativePath2 = paths.root.relativeFilePath;
15032
15726
  const fileContent2 = await readFileContent(
15033
- (0, import_node_path109.join)(baseDir, paths.root.relativeDirPath, relativePath2)
15727
+ (0, import_node_path114.join)(baseDir, paths.root.relativeDirPath, relativePath2)
15034
15728
  );
15035
15729
  return new _GooseRule({
15036
15730
  baseDir,
@@ -15044,8 +15738,8 @@ var GooseRule = class _GooseRule extends ToolRule {
15044
15738
  if (!paths.nonRoot) {
15045
15739
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
15046
15740
  }
15047
- const relativePath = (0, import_node_path109.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
15048
- const fileContent = await readFileContent((0, import_node_path109.join)(baseDir, relativePath));
15741
+ const relativePath = (0, import_node_path114.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
15742
+ const fileContent = await readFileContent((0, import_node_path114.join)(baseDir, relativePath));
15049
15743
  return new _GooseRule({
15050
15744
  baseDir,
15051
15745
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -15104,7 +15798,7 @@ var GooseRule = class _GooseRule extends ToolRule {
15104
15798
  };
15105
15799
 
15106
15800
  // src/features/rules/junie-rule.ts
15107
- var import_node_path110 = require("path");
15801
+ var import_node_path115 = require("path");
15108
15802
  var JunieRule = class _JunieRule extends ToolRule {
15109
15803
  static getSettablePaths(_options = {}) {
15110
15804
  return {
@@ -15123,8 +15817,8 @@ var JunieRule = class _JunieRule extends ToolRule {
15123
15817
  validate = true
15124
15818
  }) {
15125
15819
  const isRoot = relativeFilePath === "guidelines.md";
15126
- const relativePath = isRoot ? "guidelines.md" : (0, import_node_path110.join)(".junie", "memories", relativeFilePath);
15127
- const fileContent = await readFileContent((0, import_node_path110.join)(baseDir, relativePath));
15820
+ const relativePath = isRoot ? "guidelines.md" : (0, import_node_path115.join)(".junie", "memories", relativeFilePath);
15821
+ const fileContent = await readFileContent((0, import_node_path115.join)(baseDir, relativePath));
15128
15822
  return new _JunieRule({
15129
15823
  baseDir,
15130
15824
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -15179,7 +15873,7 @@ var JunieRule = class _JunieRule extends ToolRule {
15179
15873
  };
15180
15874
 
15181
15875
  // src/features/rules/kilo-rule.ts
15182
- var import_node_path111 = require("path");
15876
+ var import_node_path116 = require("path");
15183
15877
  var KiloRule = class _KiloRule extends ToolRule {
15184
15878
  static getSettablePaths(_options = {}) {
15185
15879
  return {
@@ -15194,7 +15888,7 @@ var KiloRule = class _KiloRule extends ToolRule {
15194
15888
  validate = true
15195
15889
  }) {
15196
15890
  const fileContent = await readFileContent(
15197
- (0, import_node_path111.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15891
+ (0, import_node_path116.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15198
15892
  );
15199
15893
  return new _KiloRule({
15200
15894
  baseDir,
@@ -15246,7 +15940,7 @@ var KiloRule = class _KiloRule extends ToolRule {
15246
15940
  };
15247
15941
 
15248
15942
  // src/features/rules/kiro-rule.ts
15249
- var import_node_path112 = require("path");
15943
+ var import_node_path117 = require("path");
15250
15944
  var KiroRule = class _KiroRule extends ToolRule {
15251
15945
  static getSettablePaths(_options = {}) {
15252
15946
  return {
@@ -15261,7 +15955,7 @@ var KiroRule = class _KiroRule extends ToolRule {
15261
15955
  validate = true
15262
15956
  }) {
15263
15957
  const fileContent = await readFileContent(
15264
- (0, import_node_path112.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15958
+ (0, import_node_path117.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15265
15959
  );
15266
15960
  return new _KiroRule({
15267
15961
  baseDir,
@@ -15315,7 +16009,7 @@ var KiroRule = class _KiroRule extends ToolRule {
15315
16009
  };
15316
16010
 
15317
16011
  // src/features/rules/opencode-rule.ts
15318
- var import_node_path113 = require("path");
16012
+ var import_node_path118 = require("path");
15319
16013
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
15320
16014
  static getSettablePaths({
15321
16015
  global,
@@ -15350,7 +16044,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
15350
16044
  if (isRoot) {
15351
16045
  const relativePath2 = paths.root.relativeFilePath;
15352
16046
  const fileContent2 = await readFileContent(
15353
- (0, import_node_path113.join)(baseDir, paths.root.relativeDirPath, relativePath2)
16047
+ (0, import_node_path118.join)(baseDir, paths.root.relativeDirPath, relativePath2)
15354
16048
  );
15355
16049
  return new _OpenCodeRule({
15356
16050
  baseDir,
@@ -15364,8 +16058,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
15364
16058
  if (!paths.nonRoot) {
15365
16059
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
15366
16060
  }
15367
- const relativePath = (0, import_node_path113.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
15368
- const fileContent = await readFileContent((0, import_node_path113.join)(baseDir, relativePath));
16061
+ const relativePath = (0, import_node_path118.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
16062
+ const fileContent = await readFileContent((0, import_node_path118.join)(baseDir, relativePath));
15369
16063
  return new _OpenCodeRule({
15370
16064
  baseDir,
15371
16065
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -15424,7 +16118,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
15424
16118
  };
15425
16119
 
15426
16120
  // src/features/rules/qwencode-rule.ts
15427
- var import_node_path114 = require("path");
16121
+ var import_node_path119 = require("path");
15428
16122
  var QwencodeRule = class _QwencodeRule extends ToolRule {
15429
16123
  static getSettablePaths(_options = {}) {
15430
16124
  return {
@@ -15443,8 +16137,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
15443
16137
  validate = true
15444
16138
  }) {
15445
16139
  const isRoot = relativeFilePath === "QWEN.md";
15446
- const relativePath = isRoot ? "QWEN.md" : (0, import_node_path114.join)(".qwen", "memories", relativeFilePath);
15447
- const fileContent = await readFileContent((0, import_node_path114.join)(baseDir, relativePath));
16140
+ const relativePath = isRoot ? "QWEN.md" : (0, import_node_path119.join)(".qwen", "memories", relativeFilePath);
16141
+ const fileContent = await readFileContent((0, import_node_path119.join)(baseDir, relativePath));
15448
16142
  return new _QwencodeRule({
15449
16143
  baseDir,
15450
16144
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -15496,7 +16190,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
15496
16190
  };
15497
16191
 
15498
16192
  // src/features/rules/replit-rule.ts
15499
- var import_node_path115 = require("path");
16193
+ var import_node_path120 = require("path");
15500
16194
  var ReplitRule = class _ReplitRule extends ToolRule {
15501
16195
  static getSettablePaths(_options = {}) {
15502
16196
  return {
@@ -15518,7 +16212,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
15518
16212
  }
15519
16213
  const relativePath = paths.root.relativeFilePath;
15520
16214
  const fileContent = await readFileContent(
15521
- (0, import_node_path115.join)(baseDir, paths.root.relativeDirPath, relativePath)
16215
+ (0, import_node_path120.join)(baseDir, paths.root.relativeDirPath, relativePath)
15522
16216
  );
15523
16217
  return new _ReplitRule({
15524
16218
  baseDir,
@@ -15584,7 +16278,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
15584
16278
  };
15585
16279
 
15586
16280
  // src/features/rules/roo-rule.ts
15587
- var import_node_path116 = require("path");
16281
+ var import_node_path121 = require("path");
15588
16282
  var RooRule = class _RooRule extends ToolRule {
15589
16283
  static getSettablePaths(_options = {}) {
15590
16284
  return {
@@ -15599,7 +16293,7 @@ var RooRule = class _RooRule extends ToolRule {
15599
16293
  validate = true
15600
16294
  }) {
15601
16295
  const fileContent = await readFileContent(
15602
- (0, import_node_path116.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
16296
+ (0, import_node_path121.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15603
16297
  );
15604
16298
  return new _RooRule({
15605
16299
  baseDir,
@@ -15668,7 +16362,7 @@ var RooRule = class _RooRule extends ToolRule {
15668
16362
  };
15669
16363
 
15670
16364
  // src/features/rules/warp-rule.ts
15671
- var import_node_path117 = require("path");
16365
+ var import_node_path122 = require("path");
15672
16366
  var WarpRule = class _WarpRule extends ToolRule {
15673
16367
  constructor({ fileContent, root, ...rest }) {
15674
16368
  super({
@@ -15694,8 +16388,8 @@ var WarpRule = class _WarpRule extends ToolRule {
15694
16388
  validate = true
15695
16389
  }) {
15696
16390
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
15697
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path117.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
15698
- const fileContent = await readFileContent((0, import_node_path117.join)(baseDir, relativePath));
16391
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path122.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
16392
+ const fileContent = await readFileContent((0, import_node_path122.join)(baseDir, relativePath));
15699
16393
  return new _WarpRule({
15700
16394
  baseDir,
15701
16395
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -15750,7 +16444,7 @@ var WarpRule = class _WarpRule extends ToolRule {
15750
16444
  };
15751
16445
 
15752
16446
  // src/features/rules/windsurf-rule.ts
15753
- var import_node_path118 = require("path");
16447
+ var import_node_path123 = require("path");
15754
16448
  var WindsurfRule = class _WindsurfRule extends ToolRule {
15755
16449
  static getSettablePaths(_options = {}) {
15756
16450
  return {
@@ -15765,7 +16459,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
15765
16459
  validate = true
15766
16460
  }) {
15767
16461
  const fileContent = await readFileContent(
15768
- (0, import_node_path118.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
16462
+ (0, import_node_path123.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15769
16463
  );
15770
16464
  return new _WindsurfRule({
15771
16465
  baseDir,
@@ -15828,6 +16522,7 @@ var rulesProcessorToolTargets = [
15828
16522
  "codexcli",
15829
16523
  "copilot",
15830
16524
  "cursor",
16525
+ "deepagents",
15831
16526
  "factorydroid",
15832
16527
  "geminicli",
15833
16528
  "goose",
@@ -15841,8 +16536,8 @@ var rulesProcessorToolTargets = [
15841
16536
  "warp",
15842
16537
  "windsurf"
15843
16538
  ];
15844
- var RulesProcessorToolTargetSchema = import_mini57.z.enum(rulesProcessorToolTargets);
15845
- var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path119.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
16539
+ var RulesProcessorToolTargetSchema = import_mini59.z.enum(rulesProcessorToolTargets);
16540
+ var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path124.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
15846
16541
  var toolRuleFactories = /* @__PURE__ */ new Map([
15847
16542
  [
15848
16543
  "agentsmd",
@@ -15959,6 +16654,17 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
15959
16654
  }
15960
16655
  }
15961
16656
  ],
16657
+ [
16658
+ "deepagents",
16659
+ {
16660
+ class: DeepagentsRule,
16661
+ meta: {
16662
+ extension: "md",
16663
+ supportsGlobal: false,
16664
+ ruleDiscoveryMode: "auto"
16665
+ }
16666
+ }
16667
+ ],
15962
16668
  [
15963
16669
  "factorydroid",
15964
16670
  {
@@ -16218,7 +16924,7 @@ var RulesProcessor = class extends FeatureProcessor {
16218
16924
  }).relativeDirPath;
16219
16925
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
16220
16926
  const frontmatter = skill.getFrontmatter();
16221
- const relativePath = (0, import_node_path119.join)(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
16927
+ const relativePath = (0, import_node_path124.join)(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
16222
16928
  return {
16223
16929
  name: frontmatter.name,
16224
16930
  description: frontmatter.description,
@@ -16331,12 +17037,12 @@ var RulesProcessor = class extends FeatureProcessor {
16331
17037
  * Load and parse rulesync rule files from .rulesync/rules/ directory
16332
17038
  */
16333
17039
  async loadRulesyncFiles() {
16334
- const rulesyncBaseDir = (0, import_node_path119.join)(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
16335
- const files = await findFilesByGlobs((0, import_node_path119.join)(rulesyncBaseDir, "**", "*.md"));
17040
+ const rulesyncBaseDir = (0, import_node_path124.join)(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
17041
+ const files = await findFilesByGlobs((0, import_node_path124.join)(rulesyncBaseDir, "**", "*.md"));
16336
17042
  this.logger.debug(`Found ${files.length} rulesync files`);
16337
17043
  const rulesyncRules = await Promise.all(
16338
17044
  files.map((file) => {
16339
- const relativeFilePath = (0, import_node_path119.relative)(rulesyncBaseDir, file);
17045
+ const relativeFilePath = (0, import_node_path124.relative)(rulesyncBaseDir, file);
16340
17046
  checkPathTraversal({
16341
17047
  relativePath: relativeFilePath,
16342
17048
  intendedRootDir: rulesyncBaseDir
@@ -16411,7 +17117,7 @@ var RulesProcessor = class extends FeatureProcessor {
16411
17117
  global: this.global
16412
17118
  });
16413
17119
  const resolveRelativeDirPath = (filePath) => {
16414
- const dirName = (0, import_node_path119.dirname)((0, import_node_path119.relative)(this.baseDir, filePath));
17120
+ const dirName = (0, import_node_path124.dirname)((0, import_node_path124.relative)(this.baseDir, filePath));
16415
17121
  return dirName === "" ? "." : dirName;
16416
17122
  };
16417
17123
  const findFilesWithFallback = async (primaryGlob, alternativeRoots, buildAltGlob) => {
@@ -16429,13 +17135,13 @@ var RulesProcessor = class extends FeatureProcessor {
16429
17135
  return [];
16430
17136
  }
16431
17137
  const uniqueRootFilePaths = await findFilesWithFallback(
16432
- (0, import_node_path119.join)(
17138
+ (0, import_node_path124.join)(
16433
17139
  this.baseDir,
16434
17140
  settablePaths.root.relativeDirPath ?? ".",
16435
17141
  settablePaths.root.relativeFilePath
16436
17142
  ),
16437
17143
  settablePaths.alternativeRoots,
16438
- (alt) => (0, import_node_path119.join)(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
17144
+ (alt) => (0, import_node_path124.join)(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
16439
17145
  );
16440
17146
  if (forDeletion) {
16441
17147
  return uniqueRootFilePaths.map((filePath) => {
@@ -16447,7 +17153,7 @@ var RulesProcessor = class extends FeatureProcessor {
16447
17153
  return factory.class.forDeletion({
16448
17154
  baseDir: this.baseDir,
16449
17155
  relativeDirPath,
16450
- relativeFilePath: (0, import_node_path119.basename)(filePath),
17156
+ relativeFilePath: (0, import_node_path124.basename)(filePath),
16451
17157
  global: this.global
16452
17158
  });
16453
17159
  }).filter((rule) => rule.isDeletable());
@@ -16461,7 +17167,7 @@ var RulesProcessor = class extends FeatureProcessor {
16461
17167
  });
16462
17168
  return factory.class.fromFile({
16463
17169
  baseDir: this.baseDir,
16464
- relativeFilePath: (0, import_node_path119.basename)(filePath),
17170
+ relativeFilePath: (0, import_node_path124.basename)(filePath),
16465
17171
  relativeDirPath,
16466
17172
  global: this.global
16467
17173
  });
@@ -16480,9 +17186,9 @@ var RulesProcessor = class extends FeatureProcessor {
16480
17186
  return [];
16481
17187
  }
16482
17188
  const uniqueLocalRootFilePaths = await findFilesWithFallback(
16483
- (0, import_node_path119.join)(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
17189
+ (0, import_node_path124.join)(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
16484
17190
  settablePaths.alternativeRoots,
16485
- (alt) => (0, import_node_path119.join)(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
17191
+ (alt) => (0, import_node_path124.join)(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
16486
17192
  );
16487
17193
  return uniqueLocalRootFilePaths.map((filePath) => {
16488
17194
  const relativeDirPath = resolveRelativeDirPath(filePath);
@@ -16493,7 +17199,7 @@ var RulesProcessor = class extends FeatureProcessor {
16493
17199
  return factory.class.forDeletion({
16494
17200
  baseDir: this.baseDir,
16495
17201
  relativeDirPath,
16496
- relativeFilePath: (0, import_node_path119.basename)(filePath),
17202
+ relativeFilePath: (0, import_node_path124.basename)(filePath),
16497
17203
  global: this.global
16498
17204
  });
16499
17205
  }).filter((rule) => rule.isDeletable());
@@ -16505,13 +17211,13 @@ var RulesProcessor = class extends FeatureProcessor {
16505
17211
  if (!settablePaths.nonRoot) {
16506
17212
  return [];
16507
17213
  }
16508
- const nonRootBaseDir = (0, import_node_path119.join)(this.baseDir, settablePaths.nonRoot.relativeDirPath);
17214
+ const nonRootBaseDir = (0, import_node_path124.join)(this.baseDir, settablePaths.nonRoot.relativeDirPath);
16509
17215
  const nonRootFilePaths = await findFilesByGlobs(
16510
- (0, import_node_path119.join)(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
17216
+ (0, import_node_path124.join)(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
16511
17217
  );
16512
17218
  if (forDeletion) {
16513
17219
  return nonRootFilePaths.map((filePath) => {
16514
- const relativeFilePath = (0, import_node_path119.relative)(nonRootBaseDir, filePath);
17220
+ const relativeFilePath = (0, import_node_path124.relative)(nonRootBaseDir, filePath);
16515
17221
  checkPathTraversal({
16516
17222
  relativePath: relativeFilePath,
16517
17223
  intendedRootDir: nonRootBaseDir
@@ -16526,7 +17232,7 @@ var RulesProcessor = class extends FeatureProcessor {
16526
17232
  }
16527
17233
  return await Promise.all(
16528
17234
  nonRootFilePaths.map((filePath) => {
16529
- const relativeFilePath = (0, import_node_path119.relative)(nonRootBaseDir, filePath);
17235
+ const relativeFilePath = (0, import_node_path124.relative)(nonRootBaseDir, filePath);
16530
17236
  checkPathTraversal({
16531
17237
  relativePath: relativeFilePath,
16532
17238
  intendedRootDir: nonRootBaseDir
@@ -16639,14 +17345,14 @@ s/<command> [arguments]
16639
17345
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
16640
17346
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
16641
17347
 
16642
- When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path119.join)(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
17348
+ When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path124.join)(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
16643
17349
  const subagentsSection = subagents ? `## Simulated Subagents
16644
17350
 
16645
17351
  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.
16646
17352
 
16647
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path119.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
17353
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path124.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
16648
17354
 
16649
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path119.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
17355
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path124.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
16650
17356
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
16651
17357
  const result = [
16652
17358
  overview,
@@ -16717,16 +17423,28 @@ async function processEmptyFeatureGeneration(params) {
16717
17423
  }
16718
17424
  return { count: totalCount, paths: [], hasDiff };
16719
17425
  }
17426
+ var SIMULATE_OPTION_MAP = {
17427
+ commands: "--simulate-commands",
17428
+ subagents: "--simulate-subagents",
17429
+ skills: "--simulate-skills"
17430
+ };
16720
17431
  function warnUnsupportedTargets(params) {
16721
- const { config, supportedTargets, featureName, logger } = params;
17432
+ const { config, supportedTargets, simulatedTargets = [], featureName, logger } = params;
16722
17433
  for (const target of config.getTargets()) {
16723
17434
  if (!supportedTargets.includes(target) && config.getFeatures(target).includes(featureName)) {
16724
- logger.warn(`Target '${target}' does not support the feature '${featureName}'. Skipping.`);
17435
+ const simulateOption = SIMULATE_OPTION_MAP[featureName];
17436
+ if (simulateOption && simulatedTargets.includes(target)) {
17437
+ logger.warn(
17438
+ `Target '${target}' only supports simulated '${featureName}'. Use '${simulateOption}' to enable it. Skipping.`
17439
+ );
17440
+ } else {
17441
+ logger.warn(`Target '${target}' does not support the feature '${featureName}'. Skipping.`);
17442
+ }
16725
17443
  }
16726
17444
  }
16727
17445
  }
16728
17446
  async function checkRulesyncDirExists(params) {
16729
- return fileExists((0, import_node_path120.join)(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
17447
+ return fileExists((0, import_node_path125.join)(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
16730
17448
  }
16731
17449
  async function generate(params) {
16732
17450
  const { config, logger } = params;
@@ -16902,6 +17620,7 @@ async function generateCommandsCore(params) {
16902
17620
  warnUnsupportedTargets({
16903
17621
  config,
16904
17622
  supportedTargets: supportedCommandsTargets,
17623
+ simulatedTargets: CommandsProcessor.getToolTargetsSimulated(),
16905
17624
  featureName: "commands",
16906
17625
  logger
16907
17626
  });
@@ -16944,6 +17663,7 @@ async function generateSubagentsCore(params) {
16944
17663
  warnUnsupportedTargets({
16945
17664
  config,
16946
17665
  supportedTargets: supportedSubagentsTargets,
17666
+ simulatedTargets: SubagentsProcessor.getToolTargetsSimulated(),
16947
17667
  featureName: "subagents",
16948
17668
  logger
16949
17669
  });
@@ -16987,6 +17707,7 @@ async function generateSkillsCore(params) {
16987
17707
  warnUnsupportedTargets({
16988
17708
  config,
16989
17709
  supportedTargets: supportedSkillsTargets,
17710
+ simulatedTargets: SkillsProcessor.getToolTargetsSimulated(),
16990
17711
  featureName: "skills",
16991
17712
  logger
16992
17713
  });