agentsmesh 0.10.0 → 0.11.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/canonical.js CHANGED
@@ -17,9 +17,9 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
17
17
  var __esm = (fn, res) => function __init() {
18
18
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
19
19
  };
20
- var __export = (target14, all) => {
20
+ var __export = (target16, all) => {
21
21
  for (var name in all)
22
- __defProp(target14, name, { get: all[name], enumerable: true });
22
+ __defProp(target16, name, { get: all[name], enumerable: true });
23
23
  };
24
24
 
25
25
  // src/core/errors.ts
@@ -333,36 +333,38 @@ var init_path_helpers = __esm({
333
333
  });
334
334
 
335
335
  // src/config/core/conversions.ts
336
- function usesCommandSkillProjection(target14) {
337
- return Object.prototype.hasOwnProperty.call(DEFAULT_COMMANDS_TO_SKILLS, target14);
336
+ function usesCommandSkillProjection(target16) {
337
+ return Object.prototype.hasOwnProperty.call(DEFAULT_COMMANDS_TO_SKILLS, target16);
338
338
  }
339
- function usesAgentSkillProjection(target14) {
340
- return Object.prototype.hasOwnProperty.call(DEFAULT_AGENTS_TO_SKILLS, target14);
339
+ function usesAgentSkillProjection(target16) {
340
+ return Object.prototype.hasOwnProperty.call(DEFAULT_AGENTS_TO_SKILLS, target16);
341
341
  }
342
342
  function resolveConversionValue(value, scope) {
343
343
  if (value === void 0) return void 0;
344
344
  if (typeof value === "boolean") return value;
345
345
  return value[scope];
346
346
  }
347
- function shouldConvertCommandsToSkills(config, target14, defaultEnabled, scope = "project") {
348
- const raw = config.conversions?.commands_to_skills?.[target14];
347
+ function shouldConvertCommandsToSkills(config, target16, defaultEnabled, scope = "project") {
348
+ const raw = config.conversions?.commands_to_skills?.[target16];
349
349
  const configVal = resolveConversionValue(raw, scope);
350
350
  if (configVal !== void 0) return configVal;
351
- if (usesCommandSkillProjection(target14)) return DEFAULT_COMMANDS_TO_SKILLS[target14];
351
+ if (usesCommandSkillProjection(target16)) return DEFAULT_COMMANDS_TO_SKILLS[target16];
352
352
  return defaultEnabled ?? false;
353
353
  }
354
- function shouldConvertAgentsToSkills(config, target14, defaultEnabled, scope = "project") {
355
- const raw = config.conversions?.agents_to_skills?.[target14];
354
+ function shouldConvertAgentsToSkills(config, target16, defaultEnabled, scope = "project") {
355
+ const raw = config.conversions?.agents_to_skills?.[target16];
356
356
  const configVal = resolveConversionValue(raw, scope);
357
357
  if (configVal !== void 0) return configVal;
358
- if (usesAgentSkillProjection(target14)) return DEFAULT_AGENTS_TO_SKILLS[target14];
358
+ if (usesAgentSkillProjection(target16)) return DEFAULT_AGENTS_TO_SKILLS[target16];
359
359
  return defaultEnabled ?? false;
360
360
  }
361
361
  var DEFAULT_COMMANDS_TO_SKILLS, DEFAULT_AGENTS_TO_SKILLS;
362
362
  var init_conversions = __esm({
363
363
  "src/config/core/conversions.ts"() {
364
364
  DEFAULT_COMMANDS_TO_SKILLS = {
365
- "codex-cli": true
365
+ "codex-cli": true,
366
+ goose: true,
367
+ kiro: true
366
368
  };
367
369
  DEFAULT_AGENTS_TO_SKILLS = {
368
370
  "gemini-cli": false,
@@ -370,7 +372,10 @@ var init_conversions = __esm({
370
372
  cline: true,
371
373
  "codex-cli": false,
372
374
  // native .codex/agents/*.toml per agent-structures
373
- windsurf: true
375
+ windsurf: true,
376
+ goose: true,
377
+ antigravity: true,
378
+ continue: true
374
379
  };
375
380
  }
376
381
  });
@@ -406,11 +411,11 @@ var init_capabilities = __esm({
406
411
  // src/targets/catalog/shared-artifact-owner.ts
407
412
  function findSharedArtifactOwnershipConflicts(descriptors) {
408
413
  const owners = [];
409
- for (const descriptor14 of descriptors) {
410
- if (!descriptor14.sharedArtifacts) continue;
411
- for (const [prefix, role] of Object.entries(descriptor14.sharedArtifacts)) {
414
+ for (const descriptor16 of descriptors) {
415
+ if (!descriptor16.sharedArtifacts) continue;
416
+ for (const [prefix, role] of Object.entries(descriptor16.sharedArtifacts)) {
412
417
  if (role !== "owner") continue;
413
- owners.push({ targetId: descriptor14.id, prefix });
418
+ owners.push({ targetId: descriptor16.id, prefix });
414
419
  }
415
420
  }
416
421
  const conflicts = [];
@@ -460,9 +465,11 @@ var init_builtin_target_ids_generated = __esm({
460
465
  "copilot",
461
466
  "cursor",
462
467
  "gemini-cli",
468
+ "goose",
463
469
  "junie",
464
470
  "kilo-code",
465
471
  "kiro",
472
+ "opencode",
466
473
  "roo-code",
467
474
  "windsurf"
468
475
  ];
@@ -477,6 +484,99 @@ var init_target_ids = __esm({
477
484
  TARGET_IDS = BUILTIN_TARGET_IDS;
478
485
  }
479
486
  });
487
+
488
+ // src/targets/projection/projected-agent-skill.ts
489
+ function toStringArray(value) {
490
+ if (Array.isArray(value)) {
491
+ return value.filter((entry) => typeof entry === "string" && entry.length > 0);
492
+ }
493
+ if (typeof value === "string" && value.length > 0) {
494
+ return value.split(",").map((entry) => entry.trim()).filter(Boolean);
495
+ }
496
+ return [];
497
+ }
498
+ function toHooks2(value) {
499
+ if (!value || typeof value !== "object" || Array.isArray(value)) return {};
500
+ const hooks = {};
501
+ for (const [event, entries] of Object.entries(value)) {
502
+ if (!Array.isArray(entries)) continue;
503
+ hooks[event] = entries.filter(
504
+ (entry) => entry !== null && typeof entry === "object" && typeof entry.matcher === "string" && typeof entry.command === "string"
505
+ );
506
+ }
507
+ return hooks;
508
+ }
509
+ function projectedAgentSkillDirName(name) {
510
+ return `${PROJECTED_AGENT_SKILL_PREFIX}${name}`;
511
+ }
512
+ function serializeProjectedAgentSkill(agent) {
513
+ const frontmatter = {
514
+ name: projectedAgentSkillDirName(agent.name),
515
+ description: agent.description || void 0,
516
+ "x-agentsmesh-kind": "agent",
517
+ "x-agentsmesh-name": agent.name,
518
+ "x-agentsmesh-tools": agent.tools.length > 0 ? agent.tools : void 0,
519
+ "x-agentsmesh-disallowed-tools": agent.disallowedTools.length > 0 ? agent.disallowedTools : void 0,
520
+ "x-agentsmesh-model": agent.model || void 0,
521
+ "x-agentsmesh-permission-mode": agent.permissionMode || void 0,
522
+ "x-agentsmesh-max-turns": agent.maxTurns > 0 ? agent.maxTurns : void 0,
523
+ "x-agentsmesh-mcp-servers": agent.mcpServers.length > 0 ? agent.mcpServers : void 0,
524
+ "x-agentsmesh-hooks": Object.keys(agent.hooks).length > 0 ? agent.hooks : void 0,
525
+ "x-agentsmesh-skills": agent.skills.length > 0 ? agent.skills : void 0,
526
+ "x-agentsmesh-memory": agent.memory || void 0
527
+ };
528
+ Object.keys(frontmatter).forEach((key) => {
529
+ if (frontmatter[key] === void 0) delete frontmatter[key];
530
+ });
531
+ return serializeFrontmatter(frontmatter, agent.body.trim() || "");
532
+ }
533
+ function parseProjectedAgentSkillFrontmatter(frontmatter, dirName) {
534
+ if (frontmatter["x-agentsmesh-kind"] !== "agent") return null;
535
+ const metadataName = typeof frontmatter["x-agentsmesh-name"] === "string" ? frontmatter["x-agentsmesh-name"] : "";
536
+ const derivedName = dirName.startsWith(PROJECTED_AGENT_SKILL_PREFIX) ? dirName.slice(PROJECTED_AGENT_SKILL_PREFIX.length) : dirName.startsWith(LEGACY_PROJECTED_AGENT_SKILL_PREFIX) ? dirName.slice(LEGACY_PROJECTED_AGENT_SKILL_PREFIX.length) : "";
537
+ const name = (metadataName || derivedName).trim();
538
+ if (!name) return null;
539
+ return {
540
+ name,
541
+ description: typeof frontmatter.description === "string" ? frontmatter.description : "",
542
+ tools: toStringArray(frontmatter["x-agentsmesh-tools"]),
543
+ disallowedTools: toStringArray(frontmatter["x-agentsmesh-disallowed-tools"]),
544
+ model: typeof frontmatter["x-agentsmesh-model"] === "string" ? frontmatter["x-agentsmesh-model"] : "",
545
+ permissionMode: typeof frontmatter["x-agentsmesh-permission-mode"] === "string" ? frontmatter["x-agentsmesh-permission-mode"] : "",
546
+ maxTurns: typeof frontmatter["x-agentsmesh-max-turns"] === "number" ? frontmatter["x-agentsmesh-max-turns"] : Number(frontmatter["x-agentsmesh-max-turns"] ?? 0),
547
+ mcpServers: toStringArray(frontmatter["x-agentsmesh-mcp-servers"]),
548
+ hooks: toHooks2(frontmatter["x-agentsmesh-hooks"]),
549
+ skills: toStringArray(frontmatter["x-agentsmesh-skills"]),
550
+ memory: typeof frontmatter["x-agentsmesh-memory"] === "string" ? frontmatter["x-agentsmesh-memory"] : ""
551
+ };
552
+ }
553
+ function serializeImportedAgent(agent, body) {
554
+ const frontmatter = {
555
+ name: agent.name,
556
+ description: agent.description,
557
+ tools: agent.tools,
558
+ disallowedTools: agent.disallowedTools.length > 0 ? agent.disallowedTools : void 0,
559
+ model: agent.model || void 0,
560
+ permissionMode: agent.permissionMode || void 0,
561
+ maxTurns: agent.maxTurns > 0 ? agent.maxTurns : void 0,
562
+ mcpServers: agent.mcpServers.length > 0 ? agent.mcpServers : void 0,
563
+ hooks: Object.keys(agent.hooks).length > 0 ? agent.hooks : void 0,
564
+ skills: agent.skills.length > 0 ? agent.skills : void 0,
565
+ memory: agent.memory || void 0
566
+ };
567
+ Object.keys(frontmatter).forEach((key) => {
568
+ if (frontmatter[key] === void 0) delete frontmatter[key];
569
+ });
570
+ return serializeFrontmatter(frontmatter, body.trim() || "");
571
+ }
572
+ var PROJECTED_AGENT_SKILL_PREFIX, LEGACY_PROJECTED_AGENT_SKILL_PREFIX;
573
+ var init_projected_agent_skill = __esm({
574
+ "src/targets/projection/projected-agent-skill.ts"() {
575
+ init_markdown();
576
+ PROJECTED_AGENT_SKILL_PREFIX = "am-agent-";
577
+ LEGACY_PROJECTED_AGENT_SKILL_PREFIX = "ab-agent-";
578
+ }
579
+ });
480
580
  function escapeRegExp(value) {
481
581
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
482
582
  }
@@ -524,7 +624,7 @@ function appendEmbeddedRulesBlock(content, rules) {
524
624
 
525
625
  ${block}` : block;
526
626
  }
527
- function toStringArray(value) {
627
+ function toStringArray2(value) {
528
628
  return Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : [];
529
629
  }
530
630
  function parseMarker(value) {
@@ -536,8 +636,8 @@ function parseMarker(value) {
536
636
  return {
537
637
  source: record.source,
538
638
  description: typeof record.description === "string" ? record.description : "",
539
- globs: toStringArray(record.globs),
540
- targets: toStringArray(record.targets)
639
+ globs: toStringArray2(record.globs),
640
+ targets: toStringArray2(record.targets)
541
641
  };
542
642
  } catch {
543
643
  return null;
@@ -654,7 +754,7 @@ ${ROOT_CONTRACT_END}`;
654
754
  ];
655
755
  }
656
756
  });
657
- function toStringArray2(value) {
757
+ function toStringArray3(value) {
658
758
  if (Array.isArray(value)) {
659
759
  return value.filter((entry) => typeof entry === "string").map((entry) => entry.trim()).filter(Boolean);
660
760
  }
@@ -699,7 +799,7 @@ async function serializeImportedRuleWithFallback(destinationPath, importedFrontm
699
799
  description: typeof mergedFrontmatter.description === "string" ? mergedFrontmatter.description : ""
700
800
  };
701
801
  if (canonicalFrontmatter.root === false) {
702
- canonicalFrontmatter.globs = toStringArray2(mergedFrontmatter.globs);
802
+ canonicalFrontmatter.globs = toStringArray3(mergedFrontmatter.globs);
703
803
  }
704
804
  for (const [key, value] of Object.entries(mergedFrontmatter)) {
705
805
  if (key === "root" || key === "description" || key === "globs" || value === void 0) continue;
@@ -717,8 +817,8 @@ var init_import_metadata_core = __esm({
717
817
  async function serializeImportedCommandWithFallback(destinationPath, imported, body) {
718
818
  const existingFrontmatter = await readExistingFrontmatter(destinationPath);
719
819
  const existingAllowedTools = (() => {
720
- const fromCamel = toStringArray2(existingFrontmatter.allowedTools);
721
- return fromCamel.length > 0 ? fromCamel : toStringArray2(existingFrontmatter["allowed-tools"]);
820
+ const fromCamel = toStringArray3(existingFrontmatter.allowedTools);
821
+ return fromCamel.length > 0 ? fromCamel : toStringArray3(existingFrontmatter["allowed-tools"]);
722
822
  })();
723
823
  const description = imported.hasDescription ? imported.description ?? "" : typeof existingFrontmatter.description === "string" ? existingFrontmatter.description : "";
724
824
  const allowedTools = imported.hasAllowedTools ? imported.allowedTools ?? [] : existingAllowedTools;
@@ -739,16 +839,16 @@ async function serializeImportedSkillWithFallback(destinationPath, importedFront
739
839
  }
740
840
  async function serializeImportedAgentWithFallback(destinationPath, importedFrontmatter, body) {
741
841
  const existingFrontmatter = await readExistingFrontmatter(destinationPath);
742
- const tools = Object.prototype.hasOwnProperty.call(importedFrontmatter, "tools") ? toStringArray2(importedFrontmatter.tools) : (() => {
743
- const existingTools = toStringArray2(existingFrontmatter.tools);
842
+ const tools = Object.prototype.hasOwnProperty.call(importedFrontmatter, "tools") ? toStringArray3(importedFrontmatter.tools) : (() => {
843
+ const existingTools = toStringArray3(existingFrontmatter.tools);
744
844
  return existingTools.length > 0 ? existingTools : [];
745
845
  })();
746
846
  const disallowedTools = Object.prototype.hasOwnProperty.call(
747
847
  importedFrontmatter,
748
848
  "disallowedTools"
749
- ) ? toStringArray2(importedFrontmatter.disallowedTools) : Object.prototype.hasOwnProperty.call(importedFrontmatter, "disallowed-tools") ? toStringArray2(importedFrontmatter["disallowed-tools"]) : toStringArray2(existingFrontmatter.disallowedTools);
750
- const mcpServers = Object.prototype.hasOwnProperty.call(importedFrontmatter, "mcpServers") ? toStringArray2(importedFrontmatter.mcpServers) : Object.prototype.hasOwnProperty.call(importedFrontmatter, "mcp-servers") ? toStringArray2(importedFrontmatter["mcp-servers"]) : toStringArray2(existingFrontmatter.mcpServers);
751
- const skills = Object.prototype.hasOwnProperty.call(importedFrontmatter, "skills") ? toStringArray2(importedFrontmatter.skills) : toStringArray2(existingFrontmatter.skills);
849
+ ) ? toStringArray3(importedFrontmatter.disallowedTools) : Object.prototype.hasOwnProperty.call(importedFrontmatter, "disallowed-tools") ? toStringArray3(importedFrontmatter["disallowed-tools"]) : toStringArray3(existingFrontmatter.disallowedTools);
850
+ const mcpServers = Object.prototype.hasOwnProperty.call(importedFrontmatter, "mcpServers") ? toStringArray3(importedFrontmatter.mcpServers) : Object.prototype.hasOwnProperty.call(importedFrontmatter, "mcp-servers") ? toStringArray3(importedFrontmatter["mcp-servers"]) : toStringArray3(existingFrontmatter.mcpServers);
851
+ const skills = Object.prototype.hasOwnProperty.call(importedFrontmatter, "skills") ? toStringArray3(importedFrontmatter.skills) : toStringArray3(existingFrontmatter.skills);
752
852
  const maxTurnsRaw = importedFrontmatter.maxTurns ?? importedFrontmatter["max-turns"] ?? existingFrontmatter.maxTurns;
753
853
  const maxTurns = typeof maxTurnsRaw === "number" ? maxTurnsRaw : Number(maxTurnsRaw ?? 0);
754
854
  const hooks = readHooks(importedFrontmatter) ?? readHooks(existingFrontmatter);
@@ -784,6 +884,77 @@ var init_import_metadata = __esm({
784
884
  init_import_metadata_serialize();
785
885
  }
786
886
  });
887
+
888
+ // src/targets/codex-cli/command-skill.ts
889
+ function toStringArray4(value) {
890
+ if (Array.isArray(value)) {
891
+ return value.filter((entry) => typeof entry === "string" && entry.length > 0);
892
+ }
893
+ if (typeof value === "string" && value.length > 0) {
894
+ return value.split(",").map((entry) => entry.trim()).filter(Boolean);
895
+ }
896
+ return [];
897
+ }
898
+ function commandSkillDirName(name) {
899
+ return `${CODEX_COMMAND_SKILL_PREFIX}${name}`;
900
+ }
901
+ function serializeCommandSkill(command) {
902
+ const frontmatter = {
903
+ name: commandSkillDirName(command.name),
904
+ description: command.description || void 0,
905
+ "x-agentsmesh-kind": "command",
906
+ "x-agentsmesh-name": command.name,
907
+ "x-agentsmesh-allowed-tools": command.allowedTools.length > 0 ? command.allowedTools : void 0
908
+ };
909
+ if (frontmatter.description === void 0) delete frontmatter.description;
910
+ if (frontmatter["x-agentsmesh-allowed-tools"] === void 0) {
911
+ delete frontmatter["x-agentsmesh-allowed-tools"];
912
+ }
913
+ return serializeFrontmatter(frontmatter, command.body.trim() || "");
914
+ }
915
+ function parseCommandSkillFrontmatter(frontmatter, dirName) {
916
+ if (frontmatter["x-agentsmesh-kind"] !== "command") return null;
917
+ const metadataName = typeof frontmatter["x-agentsmesh-name"] === "string" ? frontmatter["x-agentsmesh-name"] : "";
918
+ const derivedName = dirName.startsWith(CODEX_COMMAND_SKILL_PREFIX) ? dirName.slice(CODEX_COMMAND_SKILL_PREFIX.length) : dirName.startsWith(LEGACY_CODEX_COMMAND_SKILL_PREFIX) ? dirName.slice(LEGACY_CODEX_COMMAND_SKILL_PREFIX.length) : "";
919
+ const name = (metadataName || derivedName).trim();
920
+ if (!name) return null;
921
+ return {
922
+ name,
923
+ description: typeof frontmatter.description === "string" ? frontmatter.description : "",
924
+ allowedTools: toStringArray4(frontmatter["x-agentsmesh-allowed-tools"])
925
+ };
926
+ }
927
+ function serializeImportedCommand(command, body) {
928
+ return serializeFrontmatter(
929
+ {
930
+ description: command.description,
931
+ "allowed-tools": command.allowedTools
932
+ },
933
+ body.trim() || ""
934
+ );
935
+ }
936
+ var CODEX_COMMAND_SKILL_PREFIX, LEGACY_CODEX_COMMAND_SKILL_PREFIX;
937
+ var init_command_skill = __esm({
938
+ "src/targets/codex-cli/command-skill.ts"() {
939
+ init_markdown();
940
+ CODEX_COMMAND_SKILL_PREFIX = "am-command-";
941
+ LEGACY_CODEX_COMMAND_SKILL_PREFIX = "ab-command-";
942
+ }
943
+ });
944
+ function shouldImportScopedAgentsRule(relDir) {
945
+ const segments = relDir.split("/").filter(Boolean);
946
+ if (segments.length === 0) return false;
947
+ if (segments.some((segment) => segment.startsWith("."))) return false;
948
+ const relPath = segments.join("/");
949
+ return !relPath.startsWith("tests/e2e/fixtures/");
950
+ }
951
+ async function removePathIfExists(path) {
952
+ await rm(path, { recursive: true, force: true });
953
+ }
954
+ var init_scoped_agents_import = __esm({
955
+ "src/targets/import/scoped-agents-import.ts"() {
956
+ }
957
+ });
787
958
  function generateEmbeddedSkills(canonical, skillsDir) {
788
959
  const outputs = [];
789
960
  for (const skill of canonical.skills) {
@@ -823,6 +994,42 @@ async function importEmbeddedSkills(projectRoot, skillsDir, fromTool, results, n
823
994
  const { frontmatter, body } = parseFrontmatter(
824
995
  normalize(sourceSkillContent, sourceSkillFile, destinationSkillFile)
825
996
  );
997
+ const projectedCommand = parseCommandSkillFrontmatter(frontmatter, entry.name);
998
+ if (projectedCommand) {
999
+ await removePathIfExists(join(projectRoot, AB_SKILLS, entry.name));
1000
+ const destDir = join(projectRoot, AB_COMMANDS);
1001
+ await mkdirp(destDir);
1002
+ const commandPath = join(destDir, `${projectedCommand.name}.md`);
1003
+ await writeFileAtomic(
1004
+ commandPath,
1005
+ serializeImportedCommand(projectedCommand, normalize(body, sourceSkillFile, commandPath))
1006
+ );
1007
+ results.push({
1008
+ fromTool,
1009
+ fromPath: sourceSkillFile,
1010
+ toPath: `${AB_COMMANDS}/${projectedCommand.name}.md`,
1011
+ feature: "commands"
1012
+ });
1013
+ continue;
1014
+ }
1015
+ const projectedAgent = parseProjectedAgentSkillFrontmatter(frontmatter, entry.name);
1016
+ if (projectedAgent) {
1017
+ await removePathIfExists(join(projectRoot, AB_SKILLS, entry.name));
1018
+ const destDir = join(projectRoot, AB_AGENTS);
1019
+ await mkdirp(destDir);
1020
+ const agentPath = join(destDir, `${projectedAgent.name}.md`);
1021
+ await writeFileAtomic(
1022
+ agentPath,
1023
+ serializeImportedAgent(projectedAgent, normalize(body, sourceSkillFile, agentPath))
1024
+ );
1025
+ results.push({
1026
+ fromTool,
1027
+ fromPath: sourceSkillFile,
1028
+ toPath: `${AB_AGENTS}/${projectedAgent.name}.md`,
1029
+ feature: "agents"
1030
+ });
1031
+ continue;
1032
+ }
826
1033
  const output = await serializeImportedSkillWithFallback(
827
1034
  destinationSkillFile,
828
1035
  { ...frontmatter, name: entry.name },
@@ -854,13 +1061,18 @@ async function importEmbeddedSkills(projectRoot, skillsDir, fromTool, results, n
854
1061
  }
855
1062
  }
856
1063
  }
857
- var AB_SKILLS;
1064
+ var AB_SKILLS, AB_COMMANDS, AB_AGENTS;
858
1065
  var init_embedded_skill = __esm({
859
1066
  "src/targets/import/embedded-skill.ts"() {
860
1067
  init_fs();
861
1068
  init_markdown();
862
1069
  init_import_metadata();
1070
+ init_projected_agent_skill();
1071
+ init_command_skill();
1072
+ init_scoped_agents_import();
863
1073
  AB_SKILLS = ".agentsmesh/skills";
1074
+ AB_COMMANDS = ".agentsmesh/commands";
1075
+ AB_AGENTS = ".agentsmesh/agents";
864
1076
  }
865
1077
  });
866
1078
 
@@ -928,6 +1140,12 @@ function generateMcp(canonical) {
928
1140
  }
929
1141
  ];
930
1142
  }
1143
+ function generateAgents(canonical) {
1144
+ return canonical.agents.map((agent) => ({
1145
+ path: `${ANTIGRAVITY_SKILLS_DIR}/${projectedAgentSkillDirName(agent.name)}/SKILL.md`,
1146
+ content: serializeProjectedAgentSkill(agent)
1147
+ }));
1148
+ }
931
1149
  function renderAntigravityGlobalInstructions(canonical) {
932
1150
  const root = canonical.rules.find((rule) => rule.root);
933
1151
  const nonRootRules = canonical.rules.filter((rule) => {
@@ -940,6 +1158,7 @@ var init_generator = __esm({
940
1158
  "src/targets/antigravity/generator.ts"() {
941
1159
  init_embedded_skill();
942
1160
  init_managed_blocks();
1161
+ init_projected_agent_skill();
943
1162
  init_constants();
944
1163
  }
945
1164
  });
@@ -990,7 +1209,7 @@ function toToolsArray2(v) {
990
1209
  }
991
1210
  return [];
992
1211
  }
993
- function toStringArray3(value) {
1212
+ function toStringArray5(value) {
994
1213
  return Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : [];
995
1214
  }
996
1215
  function toStringRecord(value) {
@@ -1080,7 +1299,7 @@ function commandMapper(spec) {
1080
1299
  hasDescription: true,
1081
1300
  description: pickString(remapped.description),
1082
1301
  hasAllowedTools: true,
1083
- allowedTools: toStringArray3(remapped["allowed-tools"])
1302
+ allowedTools: toStringArray5(remapped["allowed-tools"])
1084
1303
  },
1085
1304
  body
1086
1305
  );
@@ -1259,7 +1478,7 @@ function parseMcpJson(content) {
1259
1478
  out[name] = {
1260
1479
  type: typeof server.type === "string" ? server.type : "stdio",
1261
1480
  command: server.command,
1262
- args: toStringArray3(server.args),
1481
+ args: toStringArray5(server.args),
1263
1482
  env: toStringRecord(server.env),
1264
1483
  description
1265
1484
  };
@@ -1324,14 +1543,14 @@ function specsForFeature(importer, feature) {
1324
1543
  if (Array.isArray(value)) return value;
1325
1544
  return [value];
1326
1545
  }
1327
- async function runDescriptorImport(descriptor14, projectRoot, scope, options) {
1328
- const importer = descriptor14.importer;
1546
+ async function runDescriptorImport(descriptor16, projectRoot, scope, options) {
1547
+ const importer = descriptor16.importer;
1329
1548
  if (!importer) return [];
1330
- const normalize = options?.normalize ?? await createImportReferenceNormalizer(descriptor14.id, projectRoot, scope);
1549
+ const normalize = options?.normalize ?? await createImportReferenceNormalizer(descriptor16.id, projectRoot, scope);
1331
1550
  const results = [];
1332
1551
  for (const feature of IMPORT_FEATURE_ORDER) {
1333
1552
  for (const spec of specsForFeature(importer, feature)) {
1334
- results.push(...await runSpec(spec, scope, projectRoot, descriptor14.id, normalize));
1553
+ results.push(...await runSpec(spec, scope, projectRoot, descriptor16.id, normalize));
1335
1554
  }
1336
1555
  }
1337
1556
  return results;
@@ -1645,177 +1864,27 @@ var init_linter = __esm({
1645
1864
  init_constants();
1646
1865
  }
1647
1866
  });
1648
-
1649
- // src/targets/codex-cli/command-skill.ts
1650
- function toStringArray4(value) {
1651
- if (Array.isArray(value)) {
1652
- return value.filter((entry) => typeof entry === "string" && entry.length > 0);
1653
- }
1654
- if (typeof value === "string" && value.length > 0) {
1655
- return value.split(",").map((entry) => entry.trim()).filter(Boolean);
1656
- }
1657
- return [];
1867
+ function rel(projectRoot, absPath) {
1868
+ return pathApi(projectRoot).relative(projectRoot, absPath).replace(/\\/g, "/");
1658
1869
  }
1659
- function commandSkillDirName(name) {
1660
- return `${CODEX_COMMAND_SKILL_PREFIX}${name}`;
1870
+ async function listFiles(projectRoot, dir) {
1871
+ return readDirRecursive(pathApi(projectRoot).join(projectRoot, dir)).catch(() => []);
1661
1872
  }
1662
- function serializeCommandSkill(command) {
1663
- const frontmatter = {
1664
- name: commandSkillDirName(command.name),
1665
- description: command.description || void 0,
1666
- "x-agentsmesh-kind": "command",
1667
- "x-agentsmesh-name": command.name,
1668
- "x-agentsmesh-allowed-tools": command.allowedTools.length > 0 ? command.allowedTools : void 0
1669
- };
1670
- if (frontmatter.description === void 0) delete frontmatter.description;
1671
- if (frontmatter["x-agentsmesh-allowed-tools"] === void 0) {
1672
- delete frontmatter["x-agentsmesh-allowed-tools"];
1873
+ function addDirectoryMapping(refs, from, to) {
1874
+ refs.set(from, to);
1875
+ refs.set(`${from}/`, `${to}/`);
1876
+ }
1877
+ function addAncestorMappings(refs, fromPath, toPath, stopDir) {
1878
+ let fromDir = posix.dirname(fromPath);
1879
+ let toDir = posix.dirname(toPath);
1880
+ while (fromDir !== stopDir && fromDir !== ".") {
1881
+ addDirectoryMapping(refs, fromDir, toDir);
1882
+ fromDir = posix.dirname(fromDir);
1883
+ toDir = posix.dirname(toDir);
1673
1884
  }
1674
- return serializeFrontmatter(frontmatter, command.body.trim() || "");
1675
1885
  }
1676
- function parseCommandSkillFrontmatter(frontmatter, dirName) {
1677
- if (frontmatter["x-agentsmesh-kind"] !== "command") return null;
1678
- const metadataName = typeof frontmatter["x-agentsmesh-name"] === "string" ? frontmatter["x-agentsmesh-name"] : "";
1679
- const derivedName = dirName.startsWith(CODEX_COMMAND_SKILL_PREFIX) ? dirName.slice(CODEX_COMMAND_SKILL_PREFIX.length) : dirName.startsWith(LEGACY_CODEX_COMMAND_SKILL_PREFIX) ? dirName.slice(LEGACY_CODEX_COMMAND_SKILL_PREFIX.length) : "";
1680
- const name = (metadataName || derivedName).trim();
1681
- if (!name) return null;
1682
- return {
1683
- name,
1684
- description: typeof frontmatter.description === "string" ? frontmatter.description : "",
1685
- allowedTools: toStringArray4(frontmatter["x-agentsmesh-allowed-tools"])
1686
- };
1687
- }
1688
- function serializeImportedCommand(command, body) {
1689
- return serializeFrontmatter(
1690
- {
1691
- description: command.description,
1692
- "allowed-tools": command.allowedTools
1693
- },
1694
- body.trim() || ""
1695
- );
1696
- }
1697
- var CODEX_COMMAND_SKILL_PREFIX, LEGACY_CODEX_COMMAND_SKILL_PREFIX;
1698
- var init_command_skill = __esm({
1699
- "src/targets/codex-cli/command-skill.ts"() {
1700
- init_markdown();
1701
- CODEX_COMMAND_SKILL_PREFIX = "am-command-";
1702
- LEGACY_CODEX_COMMAND_SKILL_PREFIX = "ab-command-";
1703
- }
1704
- });
1705
-
1706
- // src/targets/projection/projected-agent-skill.ts
1707
- function toStringArray5(value) {
1708
- if (Array.isArray(value)) {
1709
- return value.filter((entry) => typeof entry === "string" && entry.length > 0);
1710
- }
1711
- if (typeof value === "string" && value.length > 0) {
1712
- return value.split(",").map((entry) => entry.trim()).filter(Boolean);
1713
- }
1714
- return [];
1715
- }
1716
- function toHooks2(value) {
1717
- if (!value || typeof value !== "object" || Array.isArray(value)) return {};
1718
- const hooks = {};
1719
- for (const [event, entries] of Object.entries(value)) {
1720
- if (!Array.isArray(entries)) continue;
1721
- hooks[event] = entries.filter(
1722
- (entry) => entry !== null && typeof entry === "object" && typeof entry.matcher === "string" && typeof entry.command === "string"
1723
- );
1724
- }
1725
- return hooks;
1726
- }
1727
- function projectedAgentSkillDirName(name) {
1728
- return `${PROJECTED_AGENT_SKILL_PREFIX}${name}`;
1729
- }
1730
- function serializeProjectedAgentSkill(agent) {
1731
- const frontmatter = {
1732
- name: projectedAgentSkillDirName(agent.name),
1733
- description: agent.description || void 0,
1734
- "x-agentsmesh-kind": "agent",
1735
- "x-agentsmesh-name": agent.name,
1736
- "x-agentsmesh-tools": agent.tools.length > 0 ? agent.tools : void 0,
1737
- "x-agentsmesh-disallowed-tools": agent.disallowedTools.length > 0 ? agent.disallowedTools : void 0,
1738
- "x-agentsmesh-model": agent.model || void 0,
1739
- "x-agentsmesh-permission-mode": agent.permissionMode || void 0,
1740
- "x-agentsmesh-max-turns": agent.maxTurns > 0 ? agent.maxTurns : void 0,
1741
- "x-agentsmesh-mcp-servers": agent.mcpServers.length > 0 ? agent.mcpServers : void 0,
1742
- "x-agentsmesh-hooks": Object.keys(agent.hooks).length > 0 ? agent.hooks : void 0,
1743
- "x-agentsmesh-skills": agent.skills.length > 0 ? agent.skills : void 0,
1744
- "x-agentsmesh-memory": agent.memory || void 0
1745
- };
1746
- Object.keys(frontmatter).forEach((key) => {
1747
- if (frontmatter[key] === void 0) delete frontmatter[key];
1748
- });
1749
- return serializeFrontmatter(frontmatter, agent.body.trim() || "");
1750
- }
1751
- function parseProjectedAgentSkillFrontmatter(frontmatter, dirName) {
1752
- if (frontmatter["x-agentsmesh-kind"] !== "agent") return null;
1753
- const metadataName = typeof frontmatter["x-agentsmesh-name"] === "string" ? frontmatter["x-agentsmesh-name"] : "";
1754
- const derivedName = dirName.startsWith(PROJECTED_AGENT_SKILL_PREFIX) ? dirName.slice(PROJECTED_AGENT_SKILL_PREFIX.length) : dirName.startsWith(LEGACY_PROJECTED_AGENT_SKILL_PREFIX) ? dirName.slice(LEGACY_PROJECTED_AGENT_SKILL_PREFIX.length) : "";
1755
- const name = (metadataName || derivedName).trim();
1756
- if (!name) return null;
1757
- return {
1758
- name,
1759
- description: typeof frontmatter.description === "string" ? frontmatter.description : "",
1760
- tools: toStringArray5(frontmatter["x-agentsmesh-tools"]),
1761
- disallowedTools: toStringArray5(frontmatter["x-agentsmesh-disallowed-tools"]),
1762
- model: typeof frontmatter["x-agentsmesh-model"] === "string" ? frontmatter["x-agentsmesh-model"] : "",
1763
- permissionMode: typeof frontmatter["x-agentsmesh-permission-mode"] === "string" ? frontmatter["x-agentsmesh-permission-mode"] : "",
1764
- maxTurns: typeof frontmatter["x-agentsmesh-max-turns"] === "number" ? frontmatter["x-agentsmesh-max-turns"] : Number(frontmatter["x-agentsmesh-max-turns"] ?? 0),
1765
- mcpServers: toStringArray5(frontmatter["x-agentsmesh-mcp-servers"]),
1766
- hooks: toHooks2(frontmatter["x-agentsmesh-hooks"]),
1767
- skills: toStringArray5(frontmatter["x-agentsmesh-skills"]),
1768
- memory: typeof frontmatter["x-agentsmesh-memory"] === "string" ? frontmatter["x-agentsmesh-memory"] : ""
1769
- };
1770
- }
1771
- function serializeImportedAgent(agent, body) {
1772
- const frontmatter = {
1773
- name: agent.name,
1774
- description: agent.description,
1775
- tools: agent.tools,
1776
- disallowedTools: agent.disallowedTools.length > 0 ? agent.disallowedTools : void 0,
1777
- model: agent.model || void 0,
1778
- permissionMode: agent.permissionMode || void 0,
1779
- maxTurns: agent.maxTurns > 0 ? agent.maxTurns : void 0,
1780
- mcpServers: agent.mcpServers.length > 0 ? agent.mcpServers : void 0,
1781
- hooks: Object.keys(agent.hooks).length > 0 ? agent.hooks : void 0,
1782
- skills: agent.skills.length > 0 ? agent.skills : void 0,
1783
- memory: agent.memory || void 0
1784
- };
1785
- Object.keys(frontmatter).forEach((key) => {
1786
- if (frontmatter[key] === void 0) delete frontmatter[key];
1787
- });
1788
- return serializeFrontmatter(frontmatter, body.trim() || "");
1789
- }
1790
- var PROJECTED_AGENT_SKILL_PREFIX, LEGACY_PROJECTED_AGENT_SKILL_PREFIX;
1791
- var init_projected_agent_skill = __esm({
1792
- "src/targets/projection/projected-agent-skill.ts"() {
1793
- init_markdown();
1794
- PROJECTED_AGENT_SKILL_PREFIX = "am-agent-";
1795
- LEGACY_PROJECTED_AGENT_SKILL_PREFIX = "ab-agent-";
1796
- }
1797
- });
1798
- function rel(projectRoot, absPath) {
1799
- return pathApi(projectRoot).relative(projectRoot, absPath).replace(/\\/g, "/");
1800
- }
1801
- async function listFiles(projectRoot, dir) {
1802
- return readDirRecursive(pathApi(projectRoot).join(projectRoot, dir)).catch(() => []);
1803
- }
1804
- function addDirectoryMapping(refs, from, to) {
1805
- refs.set(from, to);
1806
- refs.set(`${from}/`, `${to}/`);
1807
- }
1808
- function addAncestorMappings(refs, fromPath, toPath, stopDir) {
1809
- let fromDir = posix.dirname(fromPath);
1810
- let toDir = posix.dirname(toPath);
1811
- while (fromDir !== stopDir && fromDir !== ".") {
1812
- addDirectoryMapping(refs, fromDir, toDir);
1813
- fromDir = posix.dirname(fromDir);
1814
- toDir = posix.dirname(toDir);
1815
- }
1816
- }
1817
- function addSimpleFileMapping(refs, fromPath, canonicalDir, extension) {
1818
- refs.set(fromPath, `${canonicalDir}/${basename(fromPath, extension)}.md`);
1886
+ function addSimpleFileMapping(refs, fromPath, canonicalDir, extension) {
1887
+ refs.set(fromPath, `${canonicalDir}/${basename(fromPath, extension)}.md`);
1819
1888
  }
1820
1889
  function addSkillLikeMapping(refs, relPath, skillsDir) {
1821
1890
  if (!relPath.startsWith(`${skillsDir}/`)) return;
@@ -1832,12 +1901,12 @@ function addSkillLikeMapping(refs, relPath, skillsDir) {
1832
1901
  if (!dirName || !filePath) return;
1833
1902
  const commandPrefix = dirName.startsWith(CODEX_COMMAND_SKILL_PREFIX) ? CODEX_COMMAND_SKILL_PREFIX : dirName.startsWith(LEGACY_CODEX_COMMAND_SKILL_PREFIX) ? LEGACY_CODEX_COMMAND_SKILL_PREFIX : null;
1834
1903
  if (commandPrefix && filePath === "SKILL.md") {
1835
- refs.set(relPath, `${AB_COMMANDS}/${dirName.slice(commandPrefix.length)}.md`);
1904
+ refs.set(relPath, `${AB_COMMANDS2}/${dirName.slice(commandPrefix.length)}.md`);
1836
1905
  return;
1837
1906
  }
1838
1907
  const agentPrefix = dirName.startsWith(PROJECTED_AGENT_SKILL_PREFIX) ? PROJECTED_AGENT_SKILL_PREFIX : dirName.startsWith(LEGACY_PROJECTED_AGENT_SKILL_PREFIX) ? LEGACY_PROJECTED_AGENT_SKILL_PREFIX : null;
1839
1908
  if (agentPrefix && filePath === "SKILL.md") {
1840
- refs.set(relPath, `${AB_AGENTS}/${dirName.slice(agentPrefix.length)}.md`);
1909
+ refs.set(relPath, `${AB_AGENTS2}/${dirName.slice(agentPrefix.length)}.md`);
1841
1910
  return;
1842
1911
  }
1843
1912
  const canonicalBase = `${AB_SKILLS2}/${dirName}`;
@@ -1855,18 +1924,18 @@ async function targetRootSegments() {
1855
1924
  if (targetRootSegmentsCache !== void 0) return targetRootSegmentsCache;
1856
1925
  const { BUILTIN_TARGETS: BUILTIN_TARGETS2 } = await Promise.resolve().then(() => (init_builtin_targets(), builtin_targets_exports));
1857
1926
  const roots = /* @__PURE__ */ new Set();
1858
- for (const descriptor14 of BUILTIN_TARGETS2) {
1927
+ for (const descriptor16 of BUILTIN_TARGETS2) {
1859
1928
  for (const path of [
1860
- descriptor14.project.rootInstructionPath,
1861
- descriptor14.project.skillDir,
1862
- ...descriptor14.project.managedOutputs?.dirs ?? [],
1863
- ...descriptor14.project.managedOutputs?.files ?? [],
1864
- ...descriptor14.detectionPaths,
1865
- descriptor14.globalSupport?.layout.rootInstructionPath,
1866
- descriptor14.globalSupport?.layout.skillDir,
1867
- ...descriptor14.globalSupport?.layout.managedOutputs?.dirs ?? [],
1868
- ...descriptor14.globalSupport?.layout.managedOutputs?.files ?? [],
1869
- ...descriptor14.globalSupport?.detectionPaths ?? []
1929
+ descriptor16.project.rootInstructionPath,
1930
+ descriptor16.project.skillDir,
1931
+ ...descriptor16.project.managedOutputs?.dirs ?? [],
1932
+ ...descriptor16.project.managedOutputs?.files ?? [],
1933
+ ...descriptor16.detectionPaths,
1934
+ descriptor16.globalSupport?.layout.rootInstructionPath,
1935
+ descriptor16.globalSupport?.layout.skillDir,
1936
+ ...descriptor16.globalSupport?.layout.managedOutputs?.dirs ?? [],
1937
+ ...descriptor16.globalSupport?.layout.managedOutputs?.files ?? [],
1938
+ ...descriptor16.globalSupport?.detectionPaths ?? []
1870
1939
  ]) {
1871
1940
  if (path !== void 0) {
1872
1941
  const segment = firstPathSegment(path);
@@ -1923,7 +1992,7 @@ async function addScopedAgentsMappings(refs, projectRoot) {
1923
1992
  refs.set(relPath, `${AB_RULES}/${ruleName}.md`);
1924
1993
  }
1925
1994
  }
1926
- var AB_RULES, AB_COMMANDS, AB_AGENTS, AB_SKILLS2, targetRootSegmentsCache;
1995
+ var AB_RULES, AB_COMMANDS2, AB_AGENTS2, AB_SKILLS2, targetRootSegmentsCache;
1927
1996
  var init_import_map_shared = __esm({
1928
1997
  "src/core/reference/import-map-shared.ts"() {
1929
1998
  init_path_helpers();
@@ -1931,19 +2000,19 @@ var init_import_map_shared = __esm({
1931
2000
  init_command_skill();
1932
2001
  init_projected_agent_skill();
1933
2002
  AB_RULES = ".agentsmesh/rules";
1934
- AB_COMMANDS = ".agentsmesh/commands";
1935
- AB_AGENTS = ".agentsmesh/agents";
2003
+ AB_COMMANDS2 = ".agentsmesh/commands";
2004
+ AB_AGENTS2 = ".agentsmesh/agents";
1936
2005
  AB_SKILLS2 = ".agentsmesh/skills";
1937
2006
  }
1938
2007
  });
1939
2008
 
1940
2009
  // src/core/reference/import-maps/constants.ts
1941
- var AB_RULES2, AB_COMMANDS2, AB_AGENTS2;
2010
+ var AB_RULES2, AB_COMMANDS3, AB_AGENTS3;
1942
2011
  var init_constants2 = __esm({
1943
2012
  "src/core/reference/import-maps/constants.ts"() {
1944
2013
  AB_RULES2 = ".agentsmesh/rules";
1945
- AB_COMMANDS2 = ".agentsmesh/commands";
1946
- AB_AGENTS2 = ".agentsmesh/agents";
2014
+ AB_COMMANDS3 = ".agentsmesh/commands";
2015
+ AB_AGENTS3 = ".agentsmesh/agents";
1947
2016
  }
1948
2017
  });
1949
2018
 
@@ -1965,7 +2034,7 @@ async function buildAntigravityImportPaths(refs, projectRoot, scope = "project")
1965
2034
  addSimpleFileMapping(refs, relPath, AB_RULES2, ".md");
1966
2035
  }
1967
2036
  for (const absPath of await listFiles(projectRoot, ANTIGRAVITY_WORKFLOWS_DIR)) {
1968
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2037
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
1969
2038
  }
1970
2039
  for (const absPath of await listFiles(projectRoot, ANTIGRAVITY_SKILLS_DIR)) {
1971
2040
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ANTIGRAVITY_SKILLS_DIR);
@@ -2023,10 +2092,10 @@ async function buildClaudeCodeImportPaths(refs, projectRoot, scope = "project")
2023
2092
  addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_RULES2, ".md");
2024
2093
  }
2025
2094
  for (const absPath of await listFiles(projectRoot, ".claude/commands")) {
2026
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2095
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2027
2096
  }
2028
2097
  for (const absPath of await listFiles(projectRoot, ".claude/agents")) {
2029
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS2, ".md");
2098
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".md");
2030
2099
  }
2031
2100
  for (const absPath of await listFiles(projectRoot, ".claude/skills")) {
2032
2101
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ".claude/skills");
@@ -2071,7 +2140,7 @@ async function buildClineImportPaths(refs, projectRoot, scope = "project") {
2071
2140
  addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_RULES2, ".md");
2072
2141
  }
2073
2142
  for (const absPath of await listFiles(projectRoot, CLINE_GLOBAL_WORKFLOWS_DIR)) {
2074
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2143
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2075
2144
  }
2076
2145
  for (const absPath of await listFiles(projectRoot, CLINE_SKILLS_DIR)) {
2077
2146
  addSkillLikeMapping(refs, rel(projectRoot, absPath), CLINE_SKILLS_DIR);
@@ -2088,7 +2157,7 @@ async function buildClineImportPaths(refs, projectRoot, scope = "project") {
2088
2157
  addSimpleFileMapping(refs, relPath, AB_RULES2, ".md");
2089
2158
  }
2090
2159
  for (const absPath of await listFiles(projectRoot, ".clinerules/workflows")) {
2091
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2160
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2092
2161
  }
2093
2162
  for (const absPath of await listFiles(projectRoot, ".cline/skills")) {
2094
2163
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ".cline/skills");
@@ -2126,7 +2195,7 @@ async function buildCodexCliImportPaths(refs, projectRoot, scope = "project") {
2126
2195
  }
2127
2196
  }
2128
2197
  for (const absPath of await listFiles(projectRoot, ".codex/agents")) {
2129
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS2, ".toml");
2198
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".toml");
2130
2199
  }
2131
2200
  for (const absPath of await listFiles(projectRoot, ".agents/skills")) {
2132
2201
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ".agents/skills");
@@ -2167,7 +2236,7 @@ async function buildContinueImportPaths(refs, projectRoot, scope = "project") {
2167
2236
  addSimpleFileMapping(refs, relPath, AB_RULES2, ".md");
2168
2237
  }
2169
2238
  for (const absPath of await listFiles(projectRoot, ".continue/prompts")) {
2170
- refs.set(rel(projectRoot, absPath), `${AB_COMMANDS2}/${basename(absPath, ".md")}.md`);
2239
+ refs.set(rel(projectRoot, absPath), `${AB_COMMANDS3}/${basename(absPath, ".md")}.md`);
2171
2240
  }
2172
2241
  for (const absPath of await listFiles(projectRoot, ".continue/skills")) {
2173
2242
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ".continue/skills");
@@ -2201,10 +2270,10 @@ async function buildCopilotImportPaths(refs, projectRoot) {
2201
2270
  addCopilotInstructionMapping(refs, rel(projectRoot, absPath));
2202
2271
  }
2203
2272
  for (const absPath of await listFiles(projectRoot, ".github/prompts")) {
2204
- refs.set(rel(projectRoot, absPath), `${AB_COMMANDS2}/${basename(absPath, ".prompt.md")}.md`);
2273
+ refs.set(rel(projectRoot, absPath), `${AB_COMMANDS3}/${basename(absPath, ".prompt.md")}.md`);
2205
2274
  }
2206
2275
  for (const absPath of await listFiles(projectRoot, ".github/agents")) {
2207
- refs.set(rel(projectRoot, absPath), `${AB_AGENTS2}/${basename(absPath, ".agent.md")}.md`);
2276
+ refs.set(rel(projectRoot, absPath), `${AB_AGENTS3}/${basename(absPath, ".agent.md")}.md`);
2208
2277
  }
2209
2278
  for (const absPath of await listFiles(projectRoot, ".github/skills")) {
2210
2279
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ".github/skills");
@@ -2260,10 +2329,10 @@ async function buildCursorImportPaths(refs, projectRoot, scope = "project") {
2260
2329
  addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_RULES2, ".mdc");
2261
2330
  }
2262
2331
  for (const absPath of await listFiles(projectRoot, ".cursor/commands")) {
2263
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2332
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2264
2333
  }
2265
2334
  for (const absPath of await listFiles(projectRoot, ".cursor/agents")) {
2266
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS2, ".md");
2335
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".md");
2267
2336
  }
2268
2337
  for (const absPath of await listFiles(projectRoot, ".cursor/skills")) {
2269
2338
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ".cursor/skills");
@@ -2275,10 +2344,10 @@ async function buildCursorImportPaths(refs, projectRoot, scope = "project") {
2275
2344
  addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_RULES2, ".mdc");
2276
2345
  }
2277
2346
  for (const absPath of await listFiles(projectRoot, ".cursor/commands")) {
2278
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2347
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2279
2348
  }
2280
2349
  for (const absPath of await listFiles(projectRoot, ".cursor/agents")) {
2281
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS2, ".md");
2350
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".md");
2282
2351
  }
2283
2352
  for (const absPath of await listFiles(projectRoot, ".cursor/skills")) {
2284
2353
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ".cursor/skills");
@@ -2305,10 +2374,10 @@ async function buildGeminiCliImportPaths(refs, projectRoot) {
2305
2374
  const relativeNoExt = noExt.startsWith(commandsPrefix) ? noExt.slice(commandsPrefix.length) : noExt;
2306
2375
  const segments = relativeNoExt.split("/").filter(Boolean);
2307
2376
  const canonicalName = segments.join(":");
2308
- refs.set(relPath, `${AB_COMMANDS2}/${canonicalName}.md`);
2377
+ refs.set(relPath, `${AB_COMMANDS3}/${canonicalName}.md`);
2309
2378
  }
2310
2379
  for (const absPath of await listFiles(projectRoot, ".gemini/agents")) {
2311
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS2, ".md");
2380
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".md");
2312
2381
  }
2313
2382
  for (const absPath of await listFiles(projectRoot, ".gemini/skills")) {
2314
2383
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ".gemini/skills");
@@ -2321,9 +2390,50 @@ var init_gemini_cli = __esm({
2321
2390
  }
2322
2391
  });
2323
2392
 
2393
+ // src/targets/goose/constants.ts
2394
+ var GOOSE_TARGET, GOOSE_ROOT_FILE, GOOSE_SKILLS_DIR, GOOSE_IGNORE, GOOSE_GLOBAL_DIR, GOOSE_GLOBAL_ROOT_FILE, GOOSE_GLOBAL_IGNORE, GOOSE_GLOBAL_SKILLS_DIR, GOOSE_CANONICAL_RULES_DIR, GOOSE_CANONICAL_IGNORE;
2395
+ var init_constants7 = __esm({
2396
+ "src/targets/goose/constants.ts"() {
2397
+ GOOSE_TARGET = "goose";
2398
+ GOOSE_ROOT_FILE = ".goosehints";
2399
+ GOOSE_SKILLS_DIR = ".agents/skills";
2400
+ GOOSE_IGNORE = ".gooseignore";
2401
+ GOOSE_GLOBAL_DIR = ".config/goose";
2402
+ GOOSE_GLOBAL_ROOT_FILE = `${GOOSE_GLOBAL_DIR}/.goosehints`;
2403
+ GOOSE_GLOBAL_IGNORE = `${GOOSE_GLOBAL_DIR}/.gooseignore`;
2404
+ GOOSE_GLOBAL_SKILLS_DIR = ".agents/skills";
2405
+ GOOSE_CANONICAL_RULES_DIR = ".agentsmesh/rules";
2406
+ GOOSE_CANONICAL_IGNORE = ".agentsmesh/ignore";
2407
+ }
2408
+ });
2409
+
2410
+ // src/core/reference/import-maps/goose.ts
2411
+ async function buildGooseImportPaths(refs, projectRoot, scope = "project") {
2412
+ if (scope === "global") {
2413
+ refs.set(GOOSE_GLOBAL_ROOT_FILE, `${AB_RULES2}/_root.md`);
2414
+ for (const absPath of await listFiles(projectRoot, GOOSE_GLOBAL_SKILLS_DIR)) {
2415
+ addSkillLikeMapping(refs, rel(projectRoot, absPath), GOOSE_GLOBAL_SKILLS_DIR);
2416
+ }
2417
+ refs.set(GOOSE_GLOBAL_IGNORE, ".agentsmesh/ignore");
2418
+ return;
2419
+ }
2420
+ refs.set(GOOSE_ROOT_FILE, `${AB_RULES2}/_root.md`);
2421
+ for (const absPath of await listFiles(projectRoot, GOOSE_SKILLS_DIR)) {
2422
+ addSkillLikeMapping(refs, rel(projectRoot, absPath), GOOSE_SKILLS_DIR);
2423
+ }
2424
+ refs.set(GOOSE_IGNORE, ".agentsmesh/ignore");
2425
+ }
2426
+ var init_goose = __esm({
2427
+ "src/core/reference/import-maps/goose.ts"() {
2428
+ init_import_map_shared();
2429
+ init_constants7();
2430
+ init_constants2();
2431
+ }
2432
+ });
2433
+
2324
2434
  // src/targets/junie/constants.ts
2325
2435
  var JUNIE_TARGET, JUNIE_DIR, JUNIE_GUIDELINES, JUNIE_CI_GUIDELINES, JUNIE_DOT_AGENTS, JUNIE_AGENTS_FALLBACK, JUNIE_MCP_DIR, JUNIE_MCP_FILE, JUNIE_SKILLS_DIR, JUNIE_RULES_DIR, JUNIE_COMMANDS_DIR, JUNIE_AGENTS_DIR, JUNIE_IGNORE, JUNIE_GLOBAL_DIR, JUNIE_GLOBAL_SKILLS_DIR, JUNIE_GLOBAL_AGENTS_DIR, JUNIE_GLOBAL_COMMANDS_DIR, JUNIE_GLOBAL_MCP_DIR, JUNIE_GLOBAL_MCP_FILE, JUNIE_GLOBAL_AGENTS_MD, JUNIE_GLOBAL_AGENTS_SKILLS_DIR, JUNIE_CANONICAL_ROOT_RULE, JUNIE_CANONICAL_RULES_DIR, JUNIE_CANONICAL_COMMANDS_DIR, JUNIE_CANONICAL_AGENTS_DIR, JUNIE_CANONICAL_MCP, JUNIE_CANONICAL_IGNORE;
2326
- var init_constants7 = __esm({
2436
+ var init_constants8 = __esm({
2327
2437
  "src/targets/junie/constants.ts"() {
2328
2438
  JUNIE_TARGET = "junie";
2329
2439
  JUNIE_DIR = ".junie";
@@ -2364,10 +2474,10 @@ async function buildJunieImportPaths(refs, projectRoot) {
2364
2474
  addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_RULES2, ".md");
2365
2475
  }
2366
2476
  for (const absPath of await listFiles(projectRoot, ".junie/commands")) {
2367
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2477
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2368
2478
  }
2369
2479
  for (const absPath of await listFiles(projectRoot, ".junie/agents")) {
2370
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS2, ".md");
2480
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".md");
2371
2481
  }
2372
2482
  for (const absPath of await listFiles(projectRoot, ".junie/skills")) {
2373
2483
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ".junie/skills");
@@ -2376,14 +2486,14 @@ async function buildJunieImportPaths(refs, projectRoot) {
2376
2486
  var init_junie = __esm({
2377
2487
  "src/core/reference/import-maps/junie.ts"() {
2378
2488
  init_import_map_shared();
2379
- init_constants7();
2489
+ init_constants8();
2380
2490
  init_constants2();
2381
2491
  }
2382
2492
  });
2383
2493
 
2384
2494
  // src/targets/kilo-code/constants.ts
2385
2495
  var KILO_CODE_TARGET, KILO_CODE_DIR, KILO_CODE_ROOT_RULE, KILO_CODE_RULES_DIR, KILO_CODE_COMMANDS_DIR, KILO_CODE_AGENTS_DIR, KILO_CODE_SKILLS_DIR, KILO_CODE_MCP_FILE, KILO_CODE_IGNORE, KILO_CODE_LEGACY_DIR, KILO_CODE_LEGACY_RULES_DIR, KILO_CODE_LEGACY_WORKFLOWS_DIR, KILO_CODE_LEGACY_SKILLS_DIR, KILO_CODE_LEGACY_MCP_FILE, KILO_CODE_LEGACY_MODES_FILE, KILO_CODE_GLOBAL_DIR, KILO_CODE_GLOBAL_AGENTS_MD, KILO_CODE_GLOBAL_RULES_DIR, KILO_CODE_GLOBAL_COMMANDS_DIR, KILO_CODE_GLOBAL_AGENTS_DIR, KILO_CODE_GLOBAL_SKILLS_DIR, KILO_CODE_GLOBAL_MCP_FILE, KILO_CODE_GLOBAL_IGNORE, KILO_CODE_GLOBAL_AGENTS_SKILLS_DIR, KILO_CODE_CANONICAL_RULES_DIR, KILO_CODE_CANONICAL_COMMANDS_DIR, KILO_CODE_CANONICAL_AGENTS_DIR, KILO_CODE_CANONICAL_MCP, KILO_CODE_CANONICAL_IGNORE;
2386
- var init_constants8 = __esm({
2496
+ var init_constants9 = __esm({
2387
2497
  "src/targets/kilo-code/constants.ts"() {
2388
2498
  KILO_CODE_TARGET = "kilo-code";
2389
2499
  KILO_CODE_DIR = ".kilo";
@@ -2423,10 +2533,10 @@ async function buildKiloCodeImportPaths(refs, projectRoot, scope = "project") {
2423
2533
  addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_RULES2, ".md");
2424
2534
  }
2425
2535
  for (const absPath of await listFiles(projectRoot, KILO_CODE_GLOBAL_COMMANDS_DIR)) {
2426
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2536
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2427
2537
  }
2428
2538
  for (const absPath of await listFiles(projectRoot, KILO_CODE_GLOBAL_AGENTS_DIR)) {
2429
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS2, ".md");
2539
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".md");
2430
2540
  }
2431
2541
  for (const absPath of await listFiles(projectRoot, KILO_CODE_GLOBAL_SKILLS_DIR)) {
2432
2542
  addSkillLikeMapping(refs, rel(projectRoot, absPath), KILO_CODE_GLOBAL_SKILLS_DIR);
@@ -2439,10 +2549,10 @@ async function buildKiloCodeImportPaths(refs, projectRoot, scope = "project") {
2439
2549
  addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_RULES2, ".md");
2440
2550
  }
2441
2551
  for (const absPath of await listFiles(projectRoot, KILO_CODE_COMMANDS_DIR)) {
2442
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2552
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2443
2553
  }
2444
2554
  for (const absPath of await listFiles(projectRoot, KILO_CODE_AGENTS_DIR)) {
2445
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS2, ".md");
2555
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".md");
2446
2556
  }
2447
2557
  for (const absPath of await listFiles(projectRoot, KILO_CODE_SKILLS_DIR)) {
2448
2558
  addSkillLikeMapping(refs, rel(projectRoot, absPath), KILO_CODE_SKILLS_DIR);
@@ -2457,7 +2567,7 @@ async function buildKiloCodeImportPaths(refs, projectRoot, scope = "project") {
2457
2567
  addSimpleFileMapping(refs, relPath, AB_RULES2, ".md");
2458
2568
  }
2459
2569
  for (const absPath of await listFiles(projectRoot, KILO_CODE_LEGACY_WORKFLOWS_DIR)) {
2460
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2570
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2461
2571
  }
2462
2572
  for (const absPath of await listFiles(projectRoot, KILO_CODE_LEGACY_SKILLS_DIR)) {
2463
2573
  addSkillLikeMapping(refs, rel(projectRoot, absPath), KILO_CODE_LEGACY_SKILLS_DIR);
@@ -2467,14 +2577,14 @@ async function buildKiloCodeImportPaths(refs, projectRoot, scope = "project") {
2467
2577
  var init_kilo_code = __esm({
2468
2578
  "src/core/reference/import-maps/kilo-code.ts"() {
2469
2579
  init_import_map_shared();
2470
- init_constants8();
2580
+ init_constants9();
2471
2581
  init_constants2();
2472
2582
  }
2473
2583
  });
2474
2584
 
2475
2585
  // src/targets/kiro/constants.ts
2476
2586
  var KIRO_TARGET, KIRO_AGENTS_MD, KIRO_DIR, KIRO_STEERING_DIR, KIRO_SKILLS_DIR, KIRO_AGENTS_DIR, KIRO_HOOKS_DIR, KIRO_SETTINGS_DIR, KIRO_MCP_FILE, KIRO_IGNORE, KIRO_GLOBAL_STEERING_DIR, KIRO_GLOBAL_STEERING_AGENTS_MD, KIRO_GLOBAL_SKILLS_DIR, KIRO_GLOBAL_AGENTS_DIR, KIRO_GLOBAL_MCP_FILE, KIRO_GLOBAL_IGNORE, KIRO_GLOBAL_AGENTS_SKILLS_DIR, KIRO_CANONICAL_ROOT_RULE, KIRO_CANONICAL_RULES_DIR, KIRO_CANONICAL_AGENTS_DIR, KIRO_CANONICAL_MCP, KIRO_CANONICAL_HOOKS, KIRO_CANONICAL_IGNORE;
2477
- var init_constants9 = __esm({
2587
+ var init_constants10 = __esm({
2478
2588
  "src/targets/kiro/constants.ts"() {
2479
2589
  KIRO_TARGET = "kiro";
2480
2590
  KIRO_AGENTS_MD = "AGENTS.md";
@@ -2515,7 +2625,7 @@ async function buildKiroImportPaths(refs, projectRoot, scope = "project") {
2515
2625
  addSkillLikeMapping(refs, rel(projectRoot, absPath), KIRO_GLOBAL_SKILLS_DIR);
2516
2626
  }
2517
2627
  for (const absPath of await listFiles(projectRoot, KIRO_GLOBAL_AGENTS_DIR)) {
2518
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS2, ".md");
2628
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".md");
2519
2629
  }
2520
2630
  return;
2521
2631
  }
@@ -2527,20 +2637,89 @@ async function buildKiroImportPaths(refs, projectRoot, scope = "project") {
2527
2637
  addSkillLikeMapping(refs, rel(projectRoot, absPath), KIRO_SKILLS_DIR);
2528
2638
  }
2529
2639
  for (const absPath of await listFiles(projectRoot, KIRO_AGENTS_DIR)) {
2530
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS2, ".md");
2640
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".md");
2531
2641
  }
2532
2642
  }
2533
2643
  var init_kiro = __esm({
2534
2644
  "src/core/reference/import-maps/kiro.ts"() {
2535
2645
  init_import_map_shared();
2536
- init_constants9();
2646
+ init_constants10();
2647
+ init_constants2();
2648
+ }
2649
+ });
2650
+
2651
+ // src/targets/opencode/constants.ts
2652
+ var OPENCODE_TARGET, OPENCODE_DIR, OPENCODE_ROOT_RULE, OPENCODE_RULES_DIR, OPENCODE_COMMANDS_DIR, OPENCODE_AGENTS_DIR, OPENCODE_SKILLS_DIR, OPENCODE_CONFIG_FILE, OPENCODE_GLOBAL_DIR, OPENCODE_GLOBAL_AGENTS_MD, OPENCODE_GLOBAL_RULES_DIR, OPENCODE_GLOBAL_COMMANDS_DIR, OPENCODE_GLOBAL_AGENTS_DIR, OPENCODE_GLOBAL_SKILLS_DIR, OPENCODE_GLOBAL_CONFIG_FILE, OPENCODE_GLOBAL_AGENTS_SKILLS_DIR, OPENCODE_CANONICAL_RULES_DIR, OPENCODE_CANONICAL_COMMANDS_DIR, OPENCODE_CANONICAL_AGENTS_DIR, OPENCODE_CANONICAL_MCP;
2653
+ var init_constants11 = __esm({
2654
+ "src/targets/opencode/constants.ts"() {
2655
+ OPENCODE_TARGET = "opencode";
2656
+ OPENCODE_DIR = ".opencode";
2657
+ OPENCODE_ROOT_RULE = "AGENTS.md";
2658
+ OPENCODE_RULES_DIR = `${OPENCODE_DIR}/rules`;
2659
+ OPENCODE_COMMANDS_DIR = `${OPENCODE_DIR}/commands`;
2660
+ OPENCODE_AGENTS_DIR = `${OPENCODE_DIR}/agents`;
2661
+ OPENCODE_SKILLS_DIR = `${OPENCODE_DIR}/skills`;
2662
+ OPENCODE_CONFIG_FILE = "opencode.json";
2663
+ OPENCODE_GLOBAL_DIR = ".config/opencode";
2664
+ OPENCODE_GLOBAL_AGENTS_MD = `${OPENCODE_GLOBAL_DIR}/AGENTS.md`;
2665
+ OPENCODE_GLOBAL_RULES_DIR = `${OPENCODE_GLOBAL_DIR}/rules`;
2666
+ OPENCODE_GLOBAL_COMMANDS_DIR = `${OPENCODE_GLOBAL_DIR}/commands`;
2667
+ OPENCODE_GLOBAL_AGENTS_DIR = `${OPENCODE_GLOBAL_DIR}/agents`;
2668
+ OPENCODE_GLOBAL_SKILLS_DIR = `${OPENCODE_GLOBAL_DIR}/skills`;
2669
+ OPENCODE_GLOBAL_CONFIG_FILE = `${OPENCODE_GLOBAL_DIR}/opencode.json`;
2670
+ OPENCODE_GLOBAL_AGENTS_SKILLS_DIR = ".agents/skills";
2671
+ OPENCODE_CANONICAL_RULES_DIR = ".agentsmesh/rules";
2672
+ OPENCODE_CANONICAL_COMMANDS_DIR = ".agentsmesh/commands";
2673
+ OPENCODE_CANONICAL_AGENTS_DIR = ".agentsmesh/agents";
2674
+ OPENCODE_CANONICAL_MCP = ".agentsmesh/mcp.json";
2675
+ }
2676
+ });
2677
+
2678
+ // src/core/reference/import-maps/opencode.ts
2679
+ async function buildOpencodeImportPaths(refs, projectRoot, scope = "project") {
2680
+ if (scope === "global") {
2681
+ refs.set(OPENCODE_GLOBAL_AGENTS_MD, `${AB_RULES2}/_root.md`);
2682
+ for (const absPath of await listFiles(projectRoot, OPENCODE_GLOBAL_RULES_DIR)) {
2683
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_RULES2, ".md");
2684
+ }
2685
+ for (const absPath of await listFiles(projectRoot, OPENCODE_GLOBAL_COMMANDS_DIR)) {
2686
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2687
+ }
2688
+ for (const absPath of await listFiles(projectRoot, OPENCODE_GLOBAL_AGENTS_DIR)) {
2689
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".md");
2690
+ }
2691
+ for (const absPath of await listFiles(projectRoot, OPENCODE_GLOBAL_SKILLS_DIR)) {
2692
+ addSkillLikeMapping(refs, rel(projectRoot, absPath), OPENCODE_GLOBAL_SKILLS_DIR);
2693
+ }
2694
+ refs.set(OPENCODE_GLOBAL_CONFIG_FILE, ".agentsmesh/mcp.json");
2695
+ return;
2696
+ }
2697
+ refs.set(OPENCODE_ROOT_RULE, `${AB_RULES2}/_root.md`);
2698
+ for (const absPath of await listFiles(projectRoot, OPENCODE_RULES_DIR)) {
2699
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_RULES2, ".md");
2700
+ }
2701
+ for (const absPath of await listFiles(projectRoot, OPENCODE_COMMANDS_DIR)) {
2702
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2703
+ }
2704
+ for (const absPath of await listFiles(projectRoot, OPENCODE_AGENTS_DIR)) {
2705
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_AGENTS3, ".md");
2706
+ }
2707
+ for (const absPath of await listFiles(projectRoot, OPENCODE_SKILLS_DIR)) {
2708
+ addSkillLikeMapping(refs, rel(projectRoot, absPath), OPENCODE_SKILLS_DIR);
2709
+ }
2710
+ refs.set(OPENCODE_CONFIG_FILE, ".agentsmesh/mcp.json");
2711
+ }
2712
+ var init_opencode = __esm({
2713
+ "src/core/reference/import-maps/opencode.ts"() {
2714
+ init_import_map_shared();
2715
+ init_constants11();
2537
2716
  init_constants2();
2538
2717
  }
2539
2718
  });
2540
2719
 
2541
2720
  // src/targets/roo-code/constants.ts
2542
2721
  var ROO_CODE_TARGET, ROO_CODE_DIR, ROO_CODE_ROOT_RULE, ROO_CODE_ROOT_RULE_FALLBACK, ROO_CODE_RULES_DIR, ROO_CODE_COMMANDS_DIR, ROO_CODE_SKILLS_DIR, ROO_CODE_MCP_FILE, ROO_CODE_IGNORE, ROO_CODE_MODES_FILE, ROO_CODE_GLOBAL_MODES_FILE, ROO_CODE_GLOBAL_DIR, ROO_CODE_GLOBAL_RULES_DIR, ROO_CODE_GLOBAL_COMMANDS_DIR, ROO_CODE_GLOBAL_SKILLS_DIR, ROO_CODE_GLOBAL_MCP_FILE, ROO_CODE_GLOBAL_IGNORE, ROO_CODE_GLOBAL_AGENTS_MD, ROO_CODE_GLOBAL_AGENTS_SKILLS_DIR, ROO_CODE_CANONICAL_RULES_DIR, ROO_CODE_CANONICAL_COMMANDS_DIR, ROO_CODE_CANONICAL_MCP, ROO_CODE_CANONICAL_IGNORE;
2543
- var init_constants10 = __esm({
2722
+ var init_constants12 = __esm({
2544
2723
  "src/targets/roo-code/constants.ts"() {
2545
2724
  ROO_CODE_TARGET = "roo-code";
2546
2725
  ROO_CODE_DIR = ".roo";
@@ -2576,7 +2755,7 @@ async function buildRooCodeImportPaths(refs, projectRoot, scope = "project") {
2576
2755
  addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_RULES2, ".md");
2577
2756
  }
2578
2757
  for (const absPath of await listFiles(projectRoot, ROO_CODE_GLOBAL_COMMANDS_DIR)) {
2579
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2758
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2580
2759
  }
2581
2760
  for (const absPath of await listFiles(projectRoot, ROO_CODE_GLOBAL_SKILLS_DIR)) {
2582
2761
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ROO_CODE_GLOBAL_SKILLS_DIR);
@@ -2598,7 +2777,7 @@ async function buildRooCodeImportPaths(refs, projectRoot, scope = "project") {
2598
2777
  }
2599
2778
  }
2600
2779
  for (const absPath of await listFiles(projectRoot, ROO_CODE_COMMANDS_DIR)) {
2601
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2780
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2602
2781
  }
2603
2782
  for (const absPath of await listFiles(projectRoot, ROO_CODE_SKILLS_DIR)) {
2604
2783
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ROO_CODE_SKILLS_DIR);
@@ -2607,7 +2786,7 @@ async function buildRooCodeImportPaths(refs, projectRoot, scope = "project") {
2607
2786
  var init_roo_code = __esm({
2608
2787
  "src/core/reference/import-maps/roo-code.ts"() {
2609
2788
  init_import_map_shared();
2610
- init_constants10();
2789
+ init_constants12();
2611
2790
  init_constants2();
2612
2791
  }
2613
2792
  });
@@ -2621,7 +2800,7 @@ async function buildWindsurfImportPaths(refs, projectRoot) {
2621
2800
  addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_RULES2, ".md");
2622
2801
  }
2623
2802
  for (const absPath of await listFiles(projectRoot, ".windsurf/workflows")) {
2624
- addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS2, ".md");
2803
+ addSimpleFileMapping(refs, rel(projectRoot, absPath), AB_COMMANDS3, ".md");
2625
2804
  }
2626
2805
  for (const absPath of await listFiles(projectRoot, ".windsurf/skills")) {
2627
2806
  addSkillLikeMapping(refs, rel(projectRoot, absPath), ".windsurf/skills");
@@ -2645,9 +2824,11 @@ var init_import_maps = __esm({
2645
2824
  init_copilot();
2646
2825
  init_cursor();
2647
2826
  init_gemini_cli();
2827
+ init_goose();
2648
2828
  init_junie();
2649
2829
  init_kilo_code();
2650
2830
  init_kiro();
2831
+ init_opencode();
2651
2832
  init_roo_code();
2652
2833
  init_windsurf();
2653
2834
  }
@@ -2665,6 +2846,7 @@ var target, project, global, globalCapabilities, descriptor;
2665
2846
  var init_antigravity2 = __esm({
2666
2847
  "src/targets/antigravity/index.ts"() {
2667
2848
  init_capabilities();
2849
+ init_projected_agent_skill();
2668
2850
  init_generator();
2669
2851
  init_constants();
2670
2852
  init_importer();
@@ -2676,6 +2858,7 @@ var init_antigravity2 = __esm({
2676
2858
  primaryRootInstructionPath: ANTIGRAVITY_RULES_ROOT,
2677
2859
  generateRules,
2678
2860
  generateCommands,
2861
+ generateAgents,
2679
2862
  generateSkills,
2680
2863
  generateMcp,
2681
2864
  importFrom: importFromAntigravity
@@ -2694,8 +2877,8 @@ var init_antigravity2 = __esm({
2694
2877
  commandPath(name, _config) {
2695
2878
  return `${ANTIGRAVITY_WORKFLOWS_DIR}/${name}.md`;
2696
2879
  },
2697
- agentPath(_name, _config) {
2698
- return null;
2880
+ agentPath(name) {
2881
+ return `${ANTIGRAVITY_SKILLS_DIR}/${projectedAgentSkillDirName(name)}/SKILL.md`;
2699
2882
  }
2700
2883
  }
2701
2884
  };
@@ -2726,8 +2909,8 @@ var init_antigravity2 = __esm({
2726
2909
  commandPath(name, _config) {
2727
2910
  return `${ANTIGRAVITY_GLOBAL_WORKFLOWS_DIR}/${name}.md`;
2728
2911
  },
2729
- agentPath(_name, _config) {
2730
- return null;
2912
+ agentPath(name) {
2913
+ return `${ANTIGRAVITY_SKILLS_DIR}/${projectedAgentSkillDirName(name)}/SKILL.md`;
2731
2914
  }
2732
2915
  }
2733
2916
  };
@@ -2757,6 +2940,7 @@ var init_antigravity2 = __esm({
2757
2940
  permissions: "none"
2758
2941
  },
2759
2942
  emptyImportMessage: "No Antigravity config found (.agents/rules/, .agents/skills/, or .agents/workflows/).",
2943
+ supportsConversion: { agents: true },
2760
2944
  lintRules,
2761
2945
  project,
2762
2946
  globalSupport: {
@@ -2874,7 +3058,7 @@ function generateCommands2(canonical) {
2874
3058
  return { path: `${CLAUDE_COMMANDS_DIR}/${cmd.name}.md`, content };
2875
3059
  });
2876
3060
  }
2877
- function generateAgents(canonical) {
3061
+ function generateAgents2(canonical) {
2878
3062
  return canonical.agents.map((agent) => {
2879
3063
  const frontmatter = {
2880
3064
  name: agent.name,
@@ -3135,7 +3319,7 @@ var init_claude_code2 = __esm({
3135
3319
  init_skill_mirror();
3136
3320
  init_global_instructions();
3137
3321
  init_global_extras();
3138
- init_importer13();
3322
+ init_importer15();
3139
3323
  init_import_mappers2();
3140
3324
  init_linter2();
3141
3325
  init_import_map_builders();
@@ -3144,7 +3328,7 @@ var init_claude_code2 = __esm({
3144
3328
  primaryRootInstructionPath: CLAUDE_ROOT,
3145
3329
  generateRules: generateRules2,
3146
3330
  generateCommands: generateCommands2,
3147
- generateAgents,
3331
+ generateAgents: generateAgents2,
3148
3332
  generateSkills: generateSkills2,
3149
3333
  generateMcp: generateMcp2,
3150
3334
  generatePermissions,
@@ -3350,7 +3534,7 @@ function generateMcp3(canonical) {
3350
3534
  const content = JSON.stringify({ mcpServers: canonical.mcp.mcpServers }, null, 2);
3351
3535
  return [{ path: CLINE_MCP_SETTINGS, content }];
3352
3536
  }
3353
- function generateAgents2(canonical) {
3537
+ function generateAgents3(canonical) {
3354
3538
  return canonical.agents.map((agent) => ({
3355
3539
  path: `${CLINE_SKILLS_DIR}/${projectedAgentSkillDirName(agent.name)}/SKILL.md`,
3356
3540
  content: serializeProjectedAgentSkill(agent)
@@ -3939,11 +4123,11 @@ var init_linter3 = __esm({
3939
4123
  });
3940
4124
 
3941
4125
  // src/core/lint/shared/helpers.ts
3942
- function createWarning(file, target14, message) {
4126
+ function createWarning(file, target16, message) {
3943
4127
  return {
3944
4128
  level: "warning",
3945
4129
  file,
3946
- target: target14,
4130
+ target: target16,
3947
4131
  message
3948
4132
  };
3949
4133
  }
@@ -3953,12 +4137,12 @@ function formatOxfordComma(items) {
3953
4137
  if (items.length === 2) return `${items[0]} and ${items[1]}`;
3954
4138
  return `${items.slice(0, -1).join(", ")}, and ${items[items.length - 1]}`;
3955
4139
  }
3956
- function createUnsupportedHookWarning(event, target14, supportedEvents, options) {
3957
- const by = options?.unsupportedBy ?? target14;
4140
+ function createUnsupportedHookWarning(event, target16, supportedEvents, options) {
4141
+ const by = options?.unsupportedBy ?? target16;
3958
4142
  const supported = formatOxfordComma(supportedEvents);
3959
4143
  return createWarning(
3960
4144
  ".agentsmesh/hooks.yaml",
3961
- target14,
4145
+ target16,
3962
4146
  `${event} is not supported by ${by}; only ${supported} are projected.`
3963
4147
  );
3964
4148
  }
@@ -4015,7 +4199,7 @@ var init_cline2 = __esm({
4015
4199
  primaryRootInstructionPath: CLINE_AGENTS_MD,
4016
4200
  generateRules: generateRules3,
4017
4201
  generateCommands: generateCommands3,
4018
- generateAgents: generateAgents2,
4202
+ generateAgents: generateAgents3,
4019
4203
  generateSkills: generateSkills3,
4020
4204
  generateMcp: generateMcp3,
4021
4205
  generateHooks: generateHooks2,
@@ -4142,7 +4326,7 @@ var init_cline2 = __esm({
4142
4326
 
4143
4327
  // src/targets/codex-cli/constants.ts
4144
4328
  var CODEX_TARGET, CODEX_MD, AGENTS_MD, CODEX_GLOBAL_AGENTS_MD, CODEX_GLOBAL_AGENTS_OVERRIDE_MD, CODEX_SKILLS_DIR, CODEX_SKILLS_FALLBACK_DIR, CODEX_CONFIG_TOML, CODEX_INSTRUCTIONS_DIR, CODEX_RULES_DIR, CODEX_AGENTS_DIR, CODEX_CANONICAL_RULES_DIR, CODEX_CANONICAL_COMMANDS_DIR, CODEX_CANONICAL_AGENTS_DIR, CODEX_CANONICAL_SKILLS_DIR, CODEX_CANONICAL_MCP, CODEX_RULE_EMBED_MARKER, CODEX_RULE_EMBED_JSON_PREFIX, CODEX_RULE_EMBED_B64_BEGIN, CODEX_RULE_EMBED_B64_END, CODEX_RULE_EMBED_B64_LINE, CODEX_RULE_INDEX_START, CODEX_RULE_INDEX_END;
4145
- var init_constants11 = __esm({
4329
+ var init_constants13 = __esm({
4146
4330
  "src/targets/codex-cli/constants.ts"() {
4147
4331
  CODEX_TARGET = "codex-cli";
4148
4332
  CODEX_MD = "codex.md";
@@ -4205,7 +4389,7 @@ function summarizeRule(rule) {
4205
4389
  scopes.push(`Enforced in \`${CODEX_RULES_DIR}/${ruleSlug3(rule.source)}.rules\`.`);
4206
4390
  }
4207
4391
  if (rule.targets.length > 0) {
4208
- scopes.push(`Targeted to ${rule.targets.map((target14) => `\`${target14}\``).join(", ")}.`);
4392
+ scopes.push(`Targeted to ${rule.targets.map((target16) => `\`${target16}\``).join(", ")}.`);
4209
4393
  }
4210
4394
  return scopes.join(" ");
4211
4395
  }
@@ -4235,7 +4419,7 @@ function stripCodexRuleIndex(content) {
4235
4419
  var init_instruction_mirror = __esm({
4236
4420
  "src/targets/codex-cli/instruction-mirror.ts"() {
4237
4421
  init_markdown();
4238
- init_constants11();
4422
+ init_constants13();
4239
4423
  }
4240
4424
  });
4241
4425
  function looksLikeCodexRulesDsl(body) {
@@ -4301,7 +4485,7 @@ function renderCodexGlobalInstructions(canonical) {
4301
4485
  var init_rules = __esm({
4302
4486
  "src/targets/codex-cli/generator/rules.ts"() {
4303
4487
  init_managed_blocks();
4304
- init_constants11();
4488
+ init_constants13();
4305
4489
  init_instruction_mirror();
4306
4490
  }
4307
4491
  });
@@ -4342,13 +4526,13 @@ function generateCommands4(canonical) {
4342
4526
  var init_skills = __esm({
4343
4527
  "src/targets/codex-cli/generator/skills.ts"() {
4344
4528
  init_markdown();
4345
- init_constants11();
4529
+ init_constants13();
4346
4530
  init_command_skill();
4347
4531
  }
4348
4532
  });
4349
4533
 
4350
4534
  // src/targets/codex-cli/generator/agents.ts
4351
- function generateAgents3(canonical) {
4535
+ function generateAgents4(canonical) {
4352
4536
  return canonical.agents.map((agent) => ({
4353
4537
  path: `${CODEX_AGENTS_DIR}/${agent.name}.toml`,
4354
4538
  content: serializeAgentToCodexToml(agent)
@@ -4383,7 +4567,7 @@ ${body}
4383
4567
  }
4384
4568
  var init_agents = __esm({
4385
4569
  "src/targets/codex-cli/generator/agents.ts"() {
4386
- init_constants11();
4570
+ init_constants13();
4387
4571
  }
4388
4572
  });
4389
4573
 
@@ -4435,7 +4619,7 @@ function needsTomlQuoting(key) {
4435
4619
  var init_mcp = __esm({
4436
4620
  "src/targets/codex-cli/generator/mcp.ts"() {
4437
4621
  init_mcp_servers();
4438
- init_constants11();
4622
+ init_constants13();
4439
4623
  }
4440
4624
  });
4441
4625
 
@@ -4506,21 +4690,7 @@ var init_mcp_helpers = __esm({
4506
4690
  "src/targets/codex-cli/mcp-helpers.ts"() {
4507
4691
  init_fs();
4508
4692
  init_mcp_merge();
4509
- init_constants11();
4510
- }
4511
- });
4512
- function shouldImportScopedAgentsRule(relDir) {
4513
- const segments = relDir.split("/").filter(Boolean);
4514
- if (segments.length === 0) return false;
4515
- if (segments.some((segment) => segment.startsWith("."))) return false;
4516
- const relPath = segments.join("/");
4517
- return !relPath.startsWith("tests/e2e/fixtures/");
4518
- }
4519
- async function removePathIfExists(path) {
4520
- await rm(path, { recursive: true, force: true });
4521
- }
4522
- var init_scoped_agents_import = __esm({
4523
- "src/targets/import/scoped-agents-import.ts"() {
4693
+ init_constants13();
4524
4694
  }
4525
4695
  });
4526
4696
  async function importSkills(projectRoot, results, normalize) {
@@ -4600,7 +4770,7 @@ var init_skills_adapter2 = __esm({
4600
4770
  init_projected_agent_skill();
4601
4771
  init_scoped_agents_import();
4602
4772
  init_skill_import_pipeline();
4603
- init_constants11();
4773
+ init_constants13();
4604
4774
  }
4605
4775
  });
4606
4776
  async function importCodexAgentsFromToml(projectRoot, results, normalize) {
@@ -4653,7 +4823,7 @@ var init_importer_agents = __esm({
4653
4823
  "src/targets/codex-cli/importer-agents.ts"() {
4654
4824
  init_fs();
4655
4825
  init_projected_agent_skill();
4656
- init_constants11();
4826
+ init_constants13();
4657
4827
  }
4658
4828
  });
4659
4829
  function tryParseEmbeddedCanonicalFromCodexRules(content) {
@@ -4696,7 +4866,7 @@ function tryParseEmbeddedCanonicalFromCodexRules(content) {
4696
4866
  }
4697
4867
  var init_codex_rules_embed = __esm({
4698
4868
  "src/targets/codex-cli/codex-rules-embed.ts"() {
4699
- init_constants11();
4869
+ init_constants13();
4700
4870
  }
4701
4871
  });
4702
4872
  async function importCodexNonRootRuleFiles(projectRoot, destDir, normalize) {
@@ -4770,7 +4940,7 @@ var init_import_codex_non_root_rules = __esm({
4770
4940
  init_fs();
4771
4941
  init_markdown();
4772
4942
  init_import_metadata();
4773
- init_constants11();
4943
+ init_constants13();
4774
4944
  init_codex_rules_embed();
4775
4945
  }
4776
4946
  });
@@ -4892,7 +5062,7 @@ var init_importer_rules2 = __esm({
4892
5062
  init_embedded_rules();
4893
5063
  init_import_orchestrator();
4894
5064
  init_scoped_agents_import();
4895
- init_constants11();
5065
+ init_constants13();
4896
5066
  init_import_codex_non_root_rules();
4897
5067
  init_instruction_mirror();
4898
5068
  }
@@ -4917,7 +5087,7 @@ async function importFromCodex(projectRoot, options) {
4917
5087
  var init_importer3 = __esm({
4918
5088
  "src/targets/codex-cli/importer.ts"() {
4919
5089
  init_import_rewriter();
4920
- init_constants11();
5090
+ init_constants13();
4921
5091
  init_mcp_helpers();
4922
5092
  init_skills_adapter2();
4923
5093
  init_importer_agents();
@@ -4942,7 +5112,7 @@ function lintRules4(canonical, projectRoot, _projectFiles) {
4942
5112
  }
4943
5113
  var init_linter4 = __esm({
4944
5114
  "src/targets/codex-cli/linter.ts"() {
4945
- init_constants11();
5115
+ init_constants13();
4946
5116
  }
4947
5117
  });
4948
5118
 
@@ -4992,7 +5162,7 @@ var target4, project4, global3, globalCapabilities4, descriptor4;
4992
5162
  var init_codex_cli2 = __esm({
4993
5163
  "src/targets/codex-cli/index.ts"() {
4994
5164
  init_generator5();
4995
- init_constants11();
5165
+ init_constants13();
4996
5166
  init_importer3();
4997
5167
  init_linter4();
4998
5168
  init_lint2();
@@ -5005,7 +5175,7 @@ var init_codex_cli2 = __esm({
5005
5175
  primaryRootInstructionPath: AGENTS_MD,
5006
5176
  generateRules: generateRules4,
5007
5177
  generateCommands: generateCommands4,
5008
- generateAgents: generateAgents3,
5178
+ generateAgents: generateAgents4,
5009
5179
  generateSkills: generateSkills4,
5010
5180
  generateMcp: generateMcp4,
5011
5181
  importFrom: importFromCodex
@@ -5213,12 +5383,19 @@ function generateMcp5(canonical) {
5213
5383
  }
5214
5384
  ];
5215
5385
  }
5386
+ function generateAgents5(canonical) {
5387
+ return canonical.agents.map((agent) => ({
5388
+ path: `${CONTINUE_SKILLS_DIR}/${projectedAgentSkillDirName(agent.name)}/SKILL.md`,
5389
+ content: serializeProjectedAgentSkill(agent)
5390
+ }));
5391
+ }
5216
5392
  function generateSkills5(canonical) {
5217
5393
  return generateEmbeddedSkills(canonical, CONTINUE_SKILLS_DIR);
5218
5394
  }
5219
5395
  var init_generator6 = __esm({
5220
5396
  "src/targets/continue/generator.ts"() {
5221
5397
  init_embedded_skill();
5398
+ init_projected_agent_skill();
5222
5399
  init_markdown();
5223
5400
  init_command_rule();
5224
5401
  init_constants5();
@@ -5236,7 +5413,7 @@ function readMcpServers(content, extension) {
5236
5413
  servers[name] = {
5237
5414
  type: typeof server.type === "string" ? server.type : "stdio",
5238
5415
  command: server.command,
5239
- args: toStringArray3(server.args),
5416
+ args: toStringArray5(server.args),
5240
5417
  env: toStringRecord(server.env),
5241
5418
  description: typeof server.description === "string" ? server.description : void 0
5242
5419
  };
@@ -5478,6 +5655,7 @@ var init_scope_extras = __esm({
5478
5655
  var target5, project5, globalLayout2, globalCapabilities5, descriptor5;
5479
5656
  var init_continue2 = __esm({
5480
5657
  "src/targets/continue/index.ts"() {
5658
+ init_projected_agent_skill();
5481
5659
  init_generator6();
5482
5660
  init_constants5();
5483
5661
  init_importer4();
@@ -5492,6 +5670,7 @@ var init_continue2 = __esm({
5492
5670
  primaryRootInstructionPath: CONTINUE_ROOT_RULE,
5493
5671
  generateRules: generateRules5,
5494
5672
  generateCommands: generateCommands5,
5673
+ generateAgents: generateAgents5,
5495
5674
  generateSkills: generateSkills5,
5496
5675
  generateMcp: generateMcp5,
5497
5676
  importFrom: importFromContinue
@@ -5510,8 +5689,8 @@ var init_continue2 = __esm({
5510
5689
  commandPath(name, _config) {
5511
5690
  return continueCommandRulePath(name);
5512
5691
  },
5513
- agentPath(_name, _config) {
5514
- return null;
5692
+ agentPath(name) {
5693
+ return `${CONTINUE_SKILLS_DIR}/${projectedAgentSkillDirName(name)}/SKILL.md`;
5515
5694
  }
5516
5695
  }
5517
5696
  };
@@ -5538,8 +5717,8 @@ var init_continue2 = __esm({
5538
5717
  commandPath(name, _config) {
5539
5718
  return `${CONTINUE_PROMPTS_DIR}/${name}.md`;
5540
5719
  },
5541
- agentPath(_name, _config) {
5542
- return null;
5720
+ agentPath(name) {
5721
+ return `${CONTINUE_SKILLS_DIR}/${projectedAgentSkillDirName(name)}/SKILL.md`;
5543
5722
  }
5544
5723
  }
5545
5724
  };
@@ -5569,6 +5748,7 @@ var init_continue2 = __esm({
5569
5748
  permissions: "none"
5570
5749
  },
5571
5750
  emptyImportMessage: "No Continue config found (.continue/rules/*.md, .continue/skills, or .continue/mcpServers/*).",
5751
+ supportsConversion: { agents: true },
5572
5752
  lintRules: lintRules5,
5573
5753
  lint: {
5574
5754
  commands: lintCommands2
@@ -5611,7 +5791,7 @@ var init_continue2 = __esm({
5611
5791
 
5612
5792
  // src/targets/copilot/constants.ts
5613
5793
  var COPILOT_TARGET, COPILOT_INSTRUCTIONS, COPILOT_CONTEXT_DIR, COPILOT_INSTRUCTIONS_DIR, COPILOT_PROMPTS_DIR, COPILOT_HOOKS_DIR, COPILOT_SKILLS_DIR, COPILOT_AGENTS_DIR, COPILOT_CANONICAL_RULES_DIR, COPILOT_CANONICAL_COMMANDS_DIR, COPILOT_CANONICAL_AGENTS_DIR, COPILOT_CANONICAL_SKILLS_DIR, COPILOT_CANONICAL_HOOKS, COPILOT_LEGACY_HOOKS_DIR, COPILOT_GLOBAL_INSTRUCTIONS, COPILOT_GLOBAL_AGENTS_DIR, COPILOT_GLOBAL_SKILLS_DIR, COPILOT_GLOBAL_PROMPTS_DIR, COPILOT_GLOBAL_AGENTS_MD, COPILOT_GLOBAL_CLAUDE_SKILLS_DIR, COPILOT_GLOBAL_AGENTS_SKILLS_DIR;
5614
- var init_constants12 = __esm({
5794
+ var init_constants14 = __esm({
5615
5795
  "src/targets/copilot/constants.ts"() {
5616
5796
  COPILOT_TARGET = "copilot";
5617
5797
  COPILOT_INSTRUCTIONS = ".github/copilot-instructions.md";
@@ -5676,7 +5856,7 @@ function parseCommandPromptFrontmatter(frontmatter, promptPath) {
5676
5856
  var init_command_prompt = __esm({
5677
5857
  "src/targets/copilot/command-prompt.ts"() {
5678
5858
  init_markdown();
5679
- init_constants12();
5859
+ init_constants14();
5680
5860
  }
5681
5861
  });
5682
5862
 
@@ -5779,7 +5959,7 @@ function generateSkills6(canonical) {
5779
5959
  }
5780
5960
  return outputs;
5781
5961
  }
5782
- function generateAgents4(canonical) {
5962
+ function generateAgents6(canonical) {
5783
5963
  return canonical.agents.map((agent) => {
5784
5964
  const frontmatter = {
5785
5965
  name: agent.name,
@@ -5828,7 +6008,7 @@ function generateHooks3(canonical) {
5828
6008
  var init_generator7 = __esm({
5829
6009
  "src/targets/copilot/generator.ts"() {
5830
6010
  init_markdown();
5831
- init_constants12();
6011
+ init_constants14();
5832
6012
  init_command_prompt();
5833
6013
  init_hook_entry();
5834
6014
  }
@@ -5922,7 +6102,7 @@ async function importHooks(projectRoot, results) {
5922
6102
  var init_hook_parser = __esm({
5923
6103
  "src/targets/copilot/hook-parser.ts"() {
5924
6104
  init_fs();
5925
- init_constants12();
6105
+ init_constants14();
5926
6106
  }
5927
6107
  });
5928
6108
  async function importSkills2(projectRoot, results, normalize, skillsDirRel = COPILOT_SKILLS_DIR) {
@@ -5943,7 +6123,7 @@ async function importSkills2(projectRoot, results, normalize, skillsDirRel = COP
5943
6123
  var init_skills_adapter3 = __esm({
5944
6124
  "src/targets/copilot/skills-adapter.ts"() {
5945
6125
  init_skill_import_pipeline();
5946
- init_constants12();
6126
+ init_constants14();
5947
6127
  }
5948
6128
  });
5949
6129
 
@@ -5966,7 +6146,7 @@ var init_importer5 = __esm({
5966
6146
  "src/targets/copilot/importer.ts"() {
5967
6147
  init_import_rewriter();
5968
6148
  init_descriptor_import_runner();
5969
- init_constants12();
6149
+ init_constants14();
5970
6150
  init_hook_parser();
5971
6151
  init_skills_adapter3();
5972
6152
  init_copilot2();
@@ -5985,7 +6165,7 @@ var init_import_mappers4 = __esm({
5985
6165
  init_import_metadata();
5986
6166
  init_shared_import_helpers();
5987
6167
  init_command_prompt();
5988
- init_constants12();
6168
+ init_constants14();
5989
6169
  copilotLegacyRuleMapper = async ({
5990
6170
  relativePath,
5991
6171
  normalizeTo,
@@ -6102,7 +6282,7 @@ function lintRules6(canonical, projectRoot, projectFiles, options) {
6102
6282
  var init_linter6 = __esm({
6103
6283
  "src/targets/copilot/linter.ts"() {
6104
6284
  init_validate_rules();
6105
- init_constants12();
6285
+ init_constants14();
6106
6286
  }
6107
6287
  });
6108
6288
 
@@ -6219,7 +6399,7 @@ var SCRIPT_PREFIX_RE;
6219
6399
  var init_hook_assets = __esm({
6220
6400
  "src/targets/copilot/hook-assets.ts"() {
6221
6401
  init_fs();
6222
- init_constants12();
6402
+ init_constants14();
6223
6403
  init_hook_entry();
6224
6404
  SCRIPT_PREFIX_RE = /^(?<prefix>\s*(?:(?:bash|sh|zsh)\s+)?)["']?(?<path>(?:\.\.\/|\.\/|[^/\s"'`]+\/)[^\s"'`]+)["']?(?<suffix>(?:\s.*)?)$/;
6225
6405
  }
@@ -6233,7 +6413,7 @@ var generateCopilotGlobalExtras;
6233
6413
  var init_scope_extras2 = __esm({
6234
6414
  "src/targets/copilot/scope-extras.ts"() {
6235
6415
  init_fs();
6236
- init_constants12();
6416
+ init_constants14();
6237
6417
  generateCopilotGlobalExtras = async (canonical, projectRoot, scope, enabledFeatures) => {
6238
6418
  if (scope !== "global" || !enabledFeatures.has("rules")) return [];
6239
6419
  const root = canonical.rules.find((r) => r.root);
@@ -6256,7 +6436,7 @@ var target6, project6, global4, globalCapabilities6, descriptor6;
6256
6436
  var init_copilot2 = __esm({
6257
6437
  "src/targets/copilot/index.ts"() {
6258
6438
  init_generator7();
6259
- init_constants12();
6439
+ init_constants14();
6260
6440
  init_importer5();
6261
6441
  init_import_mappers4();
6262
6442
  init_linter6();
@@ -6270,7 +6450,7 @@ var init_copilot2 = __esm({
6270
6450
  primaryRootInstructionPath: COPILOT_INSTRUCTIONS,
6271
6451
  generateRules: generateRules6,
6272
6452
  generateCommands: generateCommands6,
6273
- generateAgents: generateAgents4,
6453
+ generateAgents: generateAgents6,
6274
6454
  generateSkills: generateSkills6,
6275
6455
  generateHooks: generateHooks3,
6276
6456
  importFrom: importFromCopilot
@@ -6574,7 +6754,7 @@ var init_skills2 = __esm({
6574
6754
  });
6575
6755
 
6576
6756
  // src/targets/cursor/generator/agents.ts
6577
- function generateAgents5(canonical) {
6757
+ function generateAgents7(canonical) {
6578
6758
  return canonical.agents.map((agent) => {
6579
6759
  const frontmatter = {
6580
6760
  name: agent.name,
@@ -7347,7 +7527,7 @@ var init_cursor2 = __esm({
7347
7527
  primaryRootInstructionPath: CURSOR_GENERAL_RULE,
7348
7528
  generateRules: generateRules7,
7349
7529
  generateCommands: generateCommands7,
7350
- generateAgents: generateAgents5,
7530
+ generateAgents: generateAgents7,
7351
7531
  generateSkills: generateSkills7,
7352
7532
  generateMcp: generateMcp6,
7353
7533
  generatePermissions: generatePermissions2,
@@ -7514,7 +7694,7 @@ var init_cursor2 = __esm({
7514
7694
 
7515
7695
  // src/targets/gemini-cli/constants.ts
7516
7696
  var GEMINI_TARGET, GEMINI_ROOT, GEMINI_COMPAT_AGENTS, GEMINI_RULES_DIR, GEMINI_COMPAT_INNER_ROOT, GEMINI_COMMANDS_DIR, GEMINI_POLICIES_DIR, GEMINI_SETTINGS, GEMINI_IGNORE, GEMINI_SKILLS_DIR, GEMINI_AGENTS_DIR, GEMINI_SYSTEM, GEMINI_DEFAULT_POLICIES_FILE, GEMINI_CANONICAL_RULES_DIR, GEMINI_CANONICAL_COMMANDS_DIR, GEMINI_CANONICAL_AGENTS_DIR, GEMINI_CANONICAL_SKILLS_DIR, GEMINI_CANONICAL_MCP, GEMINI_CANONICAL_HOOKS, GEMINI_CANONICAL_IGNORE, GEMINI_CANONICAL_PERMISSIONS, GEMINI_GLOBAL_ROOT, GEMINI_GLOBAL_COMPAT_AGENTS, GEMINI_GLOBAL_SETTINGS, GEMINI_GLOBAL_COMMANDS_DIR, GEMINI_GLOBAL_SKILLS_DIR, GEMINI_GLOBAL_AGENTS_DIR;
7517
- var init_constants13 = __esm({
7697
+ var init_constants15 = __esm({
7518
7698
  "src/targets/gemini-cli/constants.ts"() {
7519
7699
  GEMINI_TARGET = "gemini-cli";
7520
7700
  GEMINI_ROOT = "GEMINI.md";
@@ -7566,7 +7746,7 @@ function generateRules8(canonical) {
7566
7746
  var init_rules3 = __esm({
7567
7747
  "src/targets/gemini-cli/generator/rules.ts"() {
7568
7748
  init_managed_blocks();
7569
- init_constants13();
7749
+ init_constants15();
7570
7750
  }
7571
7751
  });
7572
7752
  function canonicalCommandNameToGeminiTomlPath(cmdName, commandsDir) {
@@ -7606,13 +7786,13 @@ function generateCommands8(canonical) {
7606
7786
  }
7607
7787
  var init_commands2 = __esm({
7608
7788
  "src/targets/gemini-cli/generator/commands.ts"() {
7609
- init_constants13();
7789
+ init_constants15();
7610
7790
  init_command_namespace();
7611
7791
  }
7612
7792
  });
7613
7793
 
7614
7794
  // src/targets/gemini-cli/generator/agents.ts
7615
- function generateAgents6(canonical) {
7795
+ function generateAgents8(canonical) {
7616
7796
  return canonical.agents.map((agent) => {
7617
7797
  const frontmatter = {
7618
7798
  name: agent.name,
@@ -7634,7 +7814,7 @@ function generateAgents6(canonical) {
7634
7814
  var init_agents3 = __esm({
7635
7815
  "src/targets/gemini-cli/generator/agents.ts"() {
7636
7816
  init_markdown();
7637
- init_constants13();
7817
+ init_constants15();
7638
7818
  }
7639
7819
  });
7640
7820
 
@@ -7665,7 +7845,7 @@ function generateSkills8(canonical) {
7665
7845
  var init_skills3 = __esm({
7666
7846
  "src/targets/gemini-cli/generator/skills.ts"() {
7667
7847
  init_markdown();
7668
- init_constants13();
7848
+ init_constants15();
7669
7849
  }
7670
7850
  });
7671
7851
 
@@ -7726,7 +7906,7 @@ function generateGeminiSettingsFiles(canonical) {
7726
7906
  var init_settings = __esm({
7727
7907
  "src/targets/gemini-cli/generator/settings.ts"() {
7728
7908
  init_hook_command();
7729
- init_constants13();
7909
+ init_constants15();
7730
7910
  }
7731
7911
  });
7732
7912
 
@@ -7737,7 +7917,7 @@ function generateIgnore4(canonical) {
7737
7917
  }
7738
7918
  var init_ignore2 = __esm({
7739
7919
  "src/targets/gemini-cli/generator/ignore.ts"() {
7740
- init_constants13();
7920
+ init_constants15();
7741
7921
  }
7742
7922
  });
7743
7923
 
@@ -7838,7 +8018,7 @@ function generateGeminiPermissionsPolicies(canonical) {
7838
8018
  }
7839
8019
  var init_policies_generator = __esm({
7840
8020
  "src/targets/gemini-cli/policies-generator.ts"() {
7841
- init_constants13();
8021
+ init_constants15();
7842
8022
  }
7843
8023
  });
7844
8024
  function mapGeminiHookEvent(event) {
@@ -7966,7 +8146,7 @@ var init_format_helpers_settings = __esm({
7966
8146
  "src/targets/gemini-cli/format-helpers-settings.ts"() {
7967
8147
  init_hook_command();
7968
8148
  init_fs();
7969
- init_constants13();
8149
+ init_constants15();
7970
8150
  init_format_helpers_shared();
7971
8151
  }
7972
8152
  });
@@ -7991,7 +8171,7 @@ async function importGeminiIgnore(projectRoot, results) {
7991
8171
  var init_format_helpers = __esm({
7992
8172
  "src/targets/gemini-cli/format-helpers.ts"() {
7993
8173
  init_fs();
7994
- init_constants13();
8174
+ init_constants15();
7995
8175
  init_format_helpers_shared();
7996
8176
  init_format_helpers_settings();
7997
8177
  }
@@ -8099,7 +8279,7 @@ async function importGeminiPolicies(projectRoot) {
8099
8279
  var init_policies_importer = __esm({
8100
8280
  "src/targets/gemini-cli/policies-importer.ts"() {
8101
8281
  init_fs();
8102
- init_constants13();
8282
+ init_constants15();
8103
8283
  }
8104
8284
  });
8105
8285
  function stripProjectRootCanonicalPrefix(content, projectRoot) {
@@ -8225,7 +8405,7 @@ var init_importer_skills_agents = __esm({
8225
8405
  init_markdown();
8226
8406
  init_import_metadata();
8227
8407
  init_projected_agent_skill();
8228
- init_constants13();
8408
+ init_constants15();
8229
8409
  }
8230
8410
  });
8231
8411
  async function importRootRule2(projectRoot, results, normalize) {
@@ -8301,7 +8481,7 @@ var init_importer7 = __esm({
8301
8481
  init_import_metadata();
8302
8482
  init_embedded_rules();
8303
8483
  init_descriptor_import_runner();
8304
- init_constants13();
8484
+ init_constants15();
8305
8485
  init_gemini_cli2();
8306
8486
  init_format_helpers();
8307
8487
  init_policies_importer();
@@ -8369,7 +8549,7 @@ var init_importer_mappers3 = __esm({
8369
8549
  init_import_metadata();
8370
8550
  init_shared_import_helpers();
8371
8551
  init_format_helpers();
8372
- init_constants13();
8552
+ init_constants15();
8373
8553
  }
8374
8554
  });
8375
8555
 
@@ -8393,7 +8573,7 @@ function lintRules8(canonical, projectRoot, projectFiles, options) {
8393
8573
  var init_linter8 = __esm({
8394
8574
  "src/targets/gemini-cli/linter.ts"() {
8395
8575
  init_validate_rules();
8396
- init_constants13();
8576
+ init_constants15();
8397
8577
  }
8398
8578
  });
8399
8579
 
@@ -8474,7 +8654,7 @@ var init_gemini_cli2 = __esm({
8474
8654
  init_generator11();
8475
8655
  init_capabilities();
8476
8656
  init_policies_generator();
8477
- init_constants13();
8657
+ init_constants15();
8478
8658
  init_importer7();
8479
8659
  init_import_mappers6();
8480
8660
  init_linter8();
@@ -8490,7 +8670,7 @@ var init_gemini_cli2 = __esm({
8490
8670
  primaryRootInstructionPath: GEMINI_ROOT,
8491
8671
  generateRules: generateRules8,
8492
8672
  generateCommands: generateCommands8,
8493
- generateAgents: generateAgents6,
8673
+ generateAgents: generateAgents8,
8494
8674
  generateSkills: generateSkills8,
8495
8675
  generateIgnore: generateIgnore4,
8496
8676
  generatePermissions: generateGeminiPermissionsPolicies,
@@ -8668,7 +8848,261 @@ var init_gemini_cli2 = __esm({
8668
8848
  };
8669
8849
  }
8670
8850
  });
8851
+
8852
+ // src/targets/goose/generator.ts
8671
8853
  function generateRules9(canonical) {
8854
+ const root = canonical.rules.find((rule) => rule.root);
8855
+ const nonRootRules = canonical.rules.filter((rule) => {
8856
+ if (rule.root) return false;
8857
+ return rule.targets.length === 0 || rule.targets.includes(GOOSE_TARGET);
8858
+ });
8859
+ const rootBody = root?.body.trim() ?? "";
8860
+ const content = appendEmbeddedRulesBlock(rootBody, nonRootRules);
8861
+ if (!content) return [];
8862
+ return [{ path: GOOSE_ROOT_FILE, content }];
8863
+ }
8864
+ function generateSkills9(canonical) {
8865
+ return generateEmbeddedSkills(canonical, GOOSE_SKILLS_DIR);
8866
+ }
8867
+ function generateCommands9(canonical) {
8868
+ return canonical.commands.map((command) => ({
8869
+ path: `${GOOSE_SKILLS_DIR}/${commandSkillDirName(command.name)}/SKILL.md`,
8870
+ content: serializeCommandSkill(command)
8871
+ }));
8872
+ }
8873
+ function generateAgents9(canonical) {
8874
+ return canonical.agents.map((agent) => ({
8875
+ path: `${GOOSE_SKILLS_DIR}/${projectedAgentSkillDirName(agent.name)}/SKILL.md`,
8876
+ content: serializeProjectedAgentSkill(agent)
8877
+ }));
8878
+ }
8879
+ function generateIgnore5(canonical) {
8880
+ if (canonical.ignore.length === 0) return [];
8881
+ return [{ path: GOOSE_IGNORE, content: canonical.ignore.join("\n") }];
8882
+ }
8883
+ var init_generator12 = __esm({
8884
+ "src/targets/goose/generator.ts"() {
8885
+ init_embedded_skill();
8886
+ init_managed_blocks();
8887
+ init_projected_agent_skill();
8888
+ init_command_skill();
8889
+ init_constants7();
8890
+ }
8891
+ });
8892
+
8893
+ // src/targets/goose/importer.ts
8894
+ async function importFromGoose(projectRoot, options = {}) {
8895
+ const scope = options.scope ?? "project";
8896
+ const results = [];
8897
+ const normalize = await createImportReferenceNormalizer(GOOSE_TARGET, projectRoot, scope);
8898
+ results.push(...await runDescriptorImport(descriptor9, projectRoot, scope, { normalize }));
8899
+ const skillsDir = scope === "global" ? GOOSE_GLOBAL_SKILLS_DIR : GOOSE_SKILLS_DIR;
8900
+ await importEmbeddedSkills(projectRoot, skillsDir, GOOSE_TARGET, results, normalize);
8901
+ return results;
8902
+ }
8903
+ var init_importer8 = __esm({
8904
+ "src/targets/goose/importer.ts"() {
8905
+ init_import_rewriter();
8906
+ init_embedded_skill();
8907
+ init_descriptor_import_runner();
8908
+ init_constants7();
8909
+ init_goose2();
8910
+ }
8911
+ });
8912
+
8913
+ // src/targets/goose/linter.ts
8914
+ function lintRules9(canonical, projectRoot, projectFiles, options) {
8915
+ return validateRules(canonical, projectRoot, projectFiles, {
8916
+ checkGlobMatches: options?.scope !== "global"
8917
+ }).map((diagnostic) => ({
8918
+ ...diagnostic,
8919
+ target: GOOSE_TARGET
8920
+ }));
8921
+ }
8922
+ var init_linter9 = __esm({
8923
+ "src/targets/goose/linter.ts"() {
8924
+ init_validate_rules();
8925
+ init_constants7();
8926
+ }
8927
+ });
8928
+
8929
+ // src/targets/goose/lint.ts
8930
+ function lintHooks4(canonical) {
8931
+ if (!canonical.hooks) return [];
8932
+ const hasEntries = Object.values(canonical.hooks).some(
8933
+ (entries) => Array.isArray(entries) && entries.length > 0
8934
+ );
8935
+ if (!hasEntries) return [];
8936
+ return [
8937
+ createWarning(
8938
+ ".agentsmesh/hooks.yaml",
8939
+ "goose",
8940
+ "Goose has no lifecycle hook system; canonical hooks are not projected."
8941
+ )
8942
+ ];
8943
+ }
8944
+ function lintPermissions2(canonical) {
8945
+ if (!canonical.permissions) return [];
8946
+ const { allow, deny } = canonical.permissions;
8947
+ const ask = canonical.permissions.ask ?? [];
8948
+ if (allow.length === 0 && deny.length === 0 && ask.length === 0) return [];
8949
+ return [
8950
+ createWarning(
8951
+ ".agentsmesh/permissions.yaml",
8952
+ "goose",
8953
+ "Goose permissions are managed at runtime via permission.yaml in ~/.config/goose/; canonical permissions are not projected."
8954
+ )
8955
+ ];
8956
+ }
8957
+ function lintMcp3(canonical) {
8958
+ if (!canonical.mcp || Object.keys(canonical.mcp.mcpServers).length === 0) return [];
8959
+ return [
8960
+ createWarning(
8961
+ ".agentsmesh/mcp.json",
8962
+ "goose",
8963
+ "Goose MCP extensions are configured globally in ~/.config/goose/config.yaml; project-level MCP is not projected."
8964
+ )
8965
+ ];
8966
+ }
8967
+ var init_lint7 = __esm({
8968
+ "src/targets/goose/lint.ts"() {
8969
+ init_helpers();
8970
+ }
8971
+ });
8972
+
8973
+ // src/targets/goose/index.ts
8974
+ var target9, project9, globalLayout3, capabilities, descriptor9;
8975
+ var init_goose2 = __esm({
8976
+ "src/targets/goose/index.ts"() {
8977
+ init_command_skill();
8978
+ init_projected_agent_skill();
8979
+ init_generator12();
8980
+ init_skill_mirror();
8981
+ init_importer8();
8982
+ init_linter9();
8983
+ init_lint7();
8984
+ init_import_map_builders();
8985
+ init_constants7();
8986
+ target9 = {
8987
+ name: GOOSE_TARGET,
8988
+ primaryRootInstructionPath: GOOSE_ROOT_FILE,
8989
+ generateRules: generateRules9,
8990
+ generateCommands: generateCommands9,
8991
+ generateAgents: generateAgents9,
8992
+ generateSkills: generateSkills9,
8993
+ generateIgnore: generateIgnore5,
8994
+ importFrom: importFromGoose
8995
+ };
8996
+ project9 = {
8997
+ rootInstructionPath: GOOSE_ROOT_FILE,
8998
+ skillDir: GOOSE_SKILLS_DIR,
8999
+ managedOutputs: {
9000
+ dirs: [GOOSE_SKILLS_DIR],
9001
+ files: [GOOSE_ROOT_FILE, GOOSE_IGNORE]
9002
+ },
9003
+ paths: {
9004
+ rulePath(_slug) {
9005
+ return GOOSE_ROOT_FILE;
9006
+ },
9007
+ commandPath(name) {
9008
+ return `${GOOSE_SKILLS_DIR}/${commandSkillDirName(name)}/SKILL.md`;
9009
+ },
9010
+ agentPath(name) {
9011
+ return `${GOOSE_SKILLS_DIR}/${projectedAgentSkillDirName(name)}/SKILL.md`;
9012
+ }
9013
+ }
9014
+ };
9015
+ globalLayout3 = {
9016
+ rootInstructionPath: GOOSE_GLOBAL_ROOT_FILE,
9017
+ skillDir: GOOSE_GLOBAL_SKILLS_DIR,
9018
+ managedOutputs: {
9019
+ dirs: [GOOSE_GLOBAL_SKILLS_DIR],
9020
+ files: [GOOSE_GLOBAL_ROOT_FILE, GOOSE_GLOBAL_IGNORE]
9021
+ },
9022
+ rewriteGeneratedPath(path) {
9023
+ if (path === GOOSE_ROOT_FILE) return GOOSE_GLOBAL_ROOT_FILE;
9024
+ if (path === GOOSE_IGNORE) return GOOSE_GLOBAL_IGNORE;
9025
+ if (path.startsWith(`${GOOSE_SKILLS_DIR}/`)) {
9026
+ return path;
9027
+ }
9028
+ return path;
9029
+ },
9030
+ mirrorGlobalPath(path, activeTargets) {
9031
+ return mirrorSkillsToAgents(path, GOOSE_GLOBAL_SKILLS_DIR, activeTargets);
9032
+ },
9033
+ paths: {
9034
+ rulePath(_slug) {
9035
+ return GOOSE_GLOBAL_ROOT_FILE;
9036
+ },
9037
+ commandPath(name) {
9038
+ return `${GOOSE_GLOBAL_SKILLS_DIR}/${commandSkillDirName(name)}/SKILL.md`;
9039
+ },
9040
+ agentPath(name) {
9041
+ return `${GOOSE_GLOBAL_SKILLS_DIR}/${projectedAgentSkillDirName(name)}/SKILL.md`;
9042
+ }
9043
+ }
9044
+ };
9045
+ capabilities = {
9046
+ rules: "native",
9047
+ additionalRules: "embedded",
9048
+ commands: "none",
9049
+ agents: "none",
9050
+ skills: "native",
9051
+ mcp: "none",
9052
+ hooks: "none",
9053
+ ignore: "native",
9054
+ permissions: "none"
9055
+ };
9056
+ descriptor9 = {
9057
+ id: GOOSE_TARGET,
9058
+ generators: target9,
9059
+ capabilities,
9060
+ emptyImportMessage: "No Goose config found (.goosehints, .agents/skills, or .gooseignore).",
9061
+ lintRules: lintRules9,
9062
+ lint: {
9063
+ hooks: lintHooks4,
9064
+ permissions: lintPermissions2,
9065
+ mcp: lintMcp3
9066
+ },
9067
+ supportsConversion: { commands: true, agents: true },
9068
+ project: project9,
9069
+ globalSupport: {
9070
+ capabilities,
9071
+ detectionPaths: [GOOSE_GLOBAL_ROOT_FILE, GOOSE_GLOBAL_IGNORE, GOOSE_GLOBAL_SKILLS_DIR],
9072
+ layout: globalLayout3
9073
+ },
9074
+ importer: {
9075
+ rules: {
9076
+ feature: "rules",
9077
+ mode: "singleFile",
9078
+ source: {
9079
+ project: [GOOSE_ROOT_FILE],
9080
+ global: [GOOSE_GLOBAL_ROOT_FILE]
9081
+ },
9082
+ canonicalDir: GOOSE_CANONICAL_RULES_DIR,
9083
+ canonicalRootFilename: "_root.md",
9084
+ markAsRoot: true
9085
+ },
9086
+ ignore: {
9087
+ feature: "ignore",
9088
+ mode: "flatFile",
9089
+ source: {
9090
+ project: [GOOSE_IGNORE],
9091
+ global: [GOOSE_GLOBAL_IGNORE]
9092
+ },
9093
+ canonicalDir: ".agentsmesh",
9094
+ canonicalFilename: GOOSE_CANONICAL_IGNORE
9095
+ }
9096
+ },
9097
+ sharedArtifacts: {
9098
+ ".agents/skills/": "consumer"
9099
+ },
9100
+ buildImportPaths: buildGooseImportPaths,
9101
+ detectionPaths: [GOOSE_ROOT_FILE, GOOSE_IGNORE]
9102
+ };
9103
+ }
9104
+ });
9105
+ function generateRules10(canonical) {
8672
9106
  const outputs = [];
8673
9107
  const root = canonical.rules.find((rule) => rule.root);
8674
9108
  if (root) {
@@ -8709,7 +9143,7 @@ function generateMcp7(canonical) {
8709
9143
  );
8710
9144
  return [{ path: JUNIE_MCP_FILE, content: JSON.stringify({ mcpServers: servers }, null, 2) }];
8711
9145
  }
8712
- function generateCommands9(canonical) {
9146
+ function generateCommands10(canonical) {
8713
9147
  return canonical.commands.map((command) => {
8714
9148
  const frontmatter = {
8715
9149
  description: command.description || void 0
@@ -8721,7 +9155,7 @@ function generateCommands9(canonical) {
8721
9155
  };
8722
9156
  });
8723
9157
  }
8724
- function generateAgents7(canonical) {
9158
+ function generateAgents10(canonical) {
8725
9159
  return canonical.agents.map((agent) => {
8726
9160
  const frontmatter = {
8727
9161
  name: agent.name,
@@ -8740,11 +9174,11 @@ function generateAgents7(canonical) {
8740
9174
  };
8741
9175
  });
8742
9176
  }
8743
- function generateIgnore5(canonical) {
9177
+ function generateIgnore6(canonical) {
8744
9178
  if (canonical.ignore.length === 0) return [];
8745
9179
  return [{ path: JUNIE_IGNORE, content: canonical.ignore.join("\n") }];
8746
9180
  }
8747
- function generateSkills9(canonical) {
9181
+ function generateSkills10(canonical) {
8748
9182
  return generateEmbeddedSkills(canonical, JUNIE_SKILLS_DIR);
8749
9183
  }
8750
9184
  function renderJunieGlobalInstructions(canonical) {
@@ -8755,13 +9189,13 @@ function renderJunieGlobalInstructions(canonical) {
8755
9189
  });
8756
9190
  return appendEmbeddedRulesBlock(root?.body.trim() ?? "", nonRootRules);
8757
9191
  }
8758
- var init_generator12 = __esm({
9192
+ var init_generator13 = __esm({
8759
9193
  "src/targets/junie/generator.ts"() {
8760
9194
  init_mcp_servers();
8761
9195
  init_embedded_skill();
8762
9196
  init_managed_blocks();
8763
9197
  init_markdown();
8764
- init_constants7();
9198
+ init_constants8();
8765
9199
  }
8766
9200
  });
8767
9201
  async function importRootRule3(projectRoot, results, normalize) {
@@ -8804,11 +9238,11 @@ async function importFromJunie(projectRoot) {
8804
9238
  const results = [];
8805
9239
  const normalize = await createImportReferenceNormalizer(JUNIE_TARGET, projectRoot);
8806
9240
  await importRootRule3(projectRoot, results, normalize);
8807
- results.push(...await runDescriptorImport(descriptor9, projectRoot, "project", { normalize }));
9241
+ results.push(...await runDescriptorImport(descriptor10, projectRoot, "project", { normalize }));
8808
9242
  await importEmbeddedSkills(projectRoot, JUNIE_SKILLS_DIR, JUNIE_TARGET, results, normalize);
8809
9243
  return results;
8810
9244
  }
8811
- var init_importer8 = __esm({
9245
+ var init_importer9 = __esm({
8812
9246
  "src/targets/junie/importer.ts"() {
8813
9247
  init_import_rewriter();
8814
9248
  init_fs();
@@ -8817,13 +9251,13 @@ var init_importer8 = __esm({
8817
9251
  init_embedded_rules();
8818
9252
  init_import_metadata();
8819
9253
  init_descriptor_import_runner();
8820
- init_constants7();
9254
+ init_constants8();
8821
9255
  init_junie2();
8822
9256
  }
8823
9257
  });
8824
9258
 
8825
9259
  // src/targets/junie/linter.ts
8826
- function lintRules9(canonical, projectRoot, projectFiles, options) {
9260
+ function lintRules10(canonical, projectRoot, projectFiles, options) {
8827
9261
  return validateRules(canonical, projectRoot, projectFiles, {
8828
9262
  checkGlobMatches: options?.scope !== "global"
8829
9263
  }).map((diagnostic) => ({
@@ -8831,15 +9265,15 @@ function lintRules9(canonical, projectRoot, projectFiles, options) {
8831
9265
  target: JUNIE_TARGET
8832
9266
  }));
8833
9267
  }
8834
- var init_linter9 = __esm({
9268
+ var init_linter10 = __esm({
8835
9269
  "src/targets/junie/linter.ts"() {
8836
9270
  init_validate_rules();
8837
- init_constants7();
9271
+ init_constants8();
8838
9272
  }
8839
9273
  });
8840
9274
 
8841
9275
  // src/targets/junie/lint.ts
8842
- function lintMcp3(canonical) {
9276
+ function lintMcp4(canonical) {
8843
9277
  if (!canonical.mcp || Object.keys(canonical.mcp.mcpServers).length === 0) return [];
8844
9278
  const diagnostics = [];
8845
9279
  for (const [name, server] of Object.entries(canonical.mcp.mcpServers)) {
@@ -8855,7 +9289,7 @@ function lintMcp3(canonical) {
8855
9289
  }
8856
9290
  return diagnostics;
8857
9291
  }
8858
- var init_lint7 = __esm({
9292
+ var init_lint8 = __esm({
8859
9293
  "src/targets/junie/lint.ts"() {
8860
9294
  init_mcp_servers();
8861
9295
  init_helpers();
@@ -8863,28 +9297,28 @@ var init_lint7 = __esm({
8863
9297
  });
8864
9298
 
8865
9299
  // src/targets/junie/index.ts
8866
- var target9, project9, global7, globalCapabilities9, descriptor9;
9300
+ var target10, project10, global7, globalCapabilities9, descriptor10;
8867
9301
  var init_junie2 = __esm({
8868
9302
  "src/targets/junie/index.ts"() {
8869
- init_generator12();
8870
- init_constants7();
9303
+ init_generator13();
9304
+ init_constants8();
8871
9305
  init_skill_mirror();
8872
- init_importer8();
8873
- init_linter9();
8874
- init_lint7();
9306
+ init_importer9();
9307
+ init_linter10();
9308
+ init_lint8();
8875
9309
  init_import_map_builders();
8876
- target9 = {
9310
+ target10 = {
8877
9311
  name: "junie",
8878
9312
  primaryRootInstructionPath: JUNIE_DOT_AGENTS,
8879
- generateRules: generateRules9,
8880
- generateCommands: generateCommands9,
8881
- generateAgents: generateAgents7,
8882
- generateSkills: generateSkills9,
9313
+ generateRules: generateRules10,
9314
+ generateCommands: generateCommands10,
9315
+ generateAgents: generateAgents10,
9316
+ generateSkills: generateSkills10,
8883
9317
  generateMcp: generateMcp7,
8884
- generateIgnore: generateIgnore5,
9318
+ generateIgnore: generateIgnore6,
8885
9319
  importFrom: importFromJunie
8886
9320
  };
8887
- project9 = {
9321
+ project10 = {
8888
9322
  rootInstructionPath: JUNIE_DOT_AGENTS,
8889
9323
  skillDir: ".junie/skills",
8890
9324
  managedOutputs: {
@@ -8966,9 +9400,9 @@ var init_junie2 = __esm({
8966
9400
  ignore: "none",
8967
9401
  permissions: "none"
8968
9402
  };
8969
- descriptor9 = {
9403
+ descriptor10 = {
8970
9404
  id: "junie",
8971
- generators: target9,
9405
+ generators: target10,
8972
9406
  capabilities: {
8973
9407
  rules: "native",
8974
9408
  additionalRules: "native",
@@ -8981,11 +9415,11 @@ var init_junie2 = __esm({
8981
9415
  permissions: "none"
8982
9416
  },
8983
9417
  emptyImportMessage: "No Junie config found (.junie/guidelines.md, .junie/AGENTS.md, .junie/skills, .junie/mcp/mcp.json, or .aiignore).",
8984
- lintRules: lintRules9,
9418
+ lintRules: lintRules10,
8985
9419
  lint: {
8986
- mcp: lintMcp3
9420
+ mcp: lintMcp4
8987
9421
  },
8988
- project: project9,
9422
+ project: project10,
8989
9423
  globalSupport: {
8990
9424
  capabilities: globalCapabilities9,
8991
9425
  detectionPaths: [
@@ -9048,7 +9482,7 @@ var init_junie2 = __esm({
9048
9482
  };
9049
9483
  }
9050
9484
  });
9051
- function generateRules10(canonical) {
9485
+ function generateRules11(canonical) {
9052
9486
  const outputs = [];
9053
9487
  const root = canonical.rules.find((rule) => rule.root);
9054
9488
  if (root) {
@@ -9072,7 +9506,7 @@ function generateRules10(canonical) {
9072
9506
  }
9073
9507
  return outputs;
9074
9508
  }
9075
- function generateCommands10(canonical) {
9509
+ function generateCommands11(canonical) {
9076
9510
  return canonical.commands.map((command) => {
9077
9511
  const frontmatter = {};
9078
9512
  if (command.description) frontmatter.description = command.description;
@@ -9082,7 +9516,7 @@ function generateCommands10(canonical) {
9082
9516
  };
9083
9517
  });
9084
9518
  }
9085
- function generateAgents8(canonical) {
9519
+ function generateAgents11(canonical) {
9086
9520
  return canonical.agents.map((agent) => {
9087
9521
  const slug = basename(agent.source, ".md");
9088
9522
  const frontmatter = { mode: "subagent" };
@@ -9105,18 +9539,18 @@ function generateMcp8(canonical) {
9105
9539
  }
9106
9540
  ];
9107
9541
  }
9108
- function generateIgnore6(canonical) {
9542
+ function generateIgnore7(canonical) {
9109
9543
  if (canonical.ignore.length === 0) return [];
9110
9544
  return [{ path: KILO_CODE_IGNORE, content: canonical.ignore.join("\n") }];
9111
9545
  }
9112
- function generateSkills10(canonical) {
9546
+ function generateSkills11(canonical) {
9113
9547
  return generateEmbeddedSkills(canonical, KILO_CODE_SKILLS_DIR);
9114
9548
  }
9115
- var init_generator13 = __esm({
9549
+ var init_generator14 = __esm({
9116
9550
  "src/targets/kilo-code/generator.ts"() {
9117
9551
  init_embedded_skill();
9118
9552
  init_markdown();
9119
- init_constants8();
9553
+ init_constants9();
9120
9554
  }
9121
9555
  });
9122
9556
  var kiloNonRootRuleMapper, kiloCommandMapper, kiloAgentMapper;
@@ -9124,7 +9558,7 @@ var init_import_mappers7 = __esm({
9124
9558
  "src/targets/kilo-code/import-mappers.ts"() {
9125
9559
  init_markdown();
9126
9560
  init_import_metadata();
9127
- init_constants8();
9561
+ init_constants9();
9128
9562
  kiloNonRootRuleMapper = async ({
9129
9563
  relativePath,
9130
9564
  normalizeTo,
@@ -9301,7 +9735,7 @@ async function importFromKiloCode(projectRoot, options = {}) {
9301
9735
  const scope = options.scope ?? "project";
9302
9736
  const results = [];
9303
9737
  const normalize = await createImportReferenceNormalizer(KILO_CODE_TARGET, projectRoot, scope);
9304
- results.push(...await runDescriptorImport(descriptor10, projectRoot, scope, { normalize }));
9738
+ results.push(...await runDescriptorImport(descriptor11, projectRoot, scope, { normalize }));
9305
9739
  await importEmbeddedSkills(
9306
9740
  projectRoot,
9307
9741
  KILO_CODE_SKILLS_DIR,
@@ -9324,7 +9758,7 @@ async function importFromKiloCode(projectRoot, options = {}) {
9324
9758
  return results;
9325
9759
  }
9326
9760
  var CANONICAL_ROOT_RULE_PATH, LEGACY_ROOT_RULE_FILE;
9327
- var init_importer9 = __esm({
9761
+ var init_importer10 = __esm({
9328
9762
  "src/targets/kilo-code/importer.ts"() {
9329
9763
  init_import_rewriter();
9330
9764
  init_embedded_skill();
@@ -9334,7 +9768,7 @@ var init_importer9 = __esm({
9334
9768
  init_import_metadata();
9335
9769
  init_markdown();
9336
9770
  init_import_mappers7();
9337
- init_constants8();
9771
+ init_constants9();
9338
9772
  init_kilo_code2();
9339
9773
  CANONICAL_ROOT_RULE_PATH = `${KILO_CODE_CANONICAL_RULES_DIR}/_root.md`;
9340
9774
  LEGACY_ROOT_RULE_FILE = "00-root.md";
@@ -9342,7 +9776,7 @@ var init_importer9 = __esm({
9342
9776
  });
9343
9777
 
9344
9778
  // src/targets/kilo-code/linter.ts
9345
- function lintRules10(canonical, projectRoot, projectFiles, options) {
9779
+ function lintRules11(canonical, projectRoot, projectFiles, options) {
9346
9780
  return validateRules(canonical, projectRoot, projectFiles, {
9347
9781
  checkGlobMatches: options?.scope !== "global"
9348
9782
  }).map((diagnostic) => ({
@@ -9350,15 +9784,15 @@ function lintRules10(canonical, projectRoot, projectFiles, options) {
9350
9784
  target: KILO_CODE_TARGET
9351
9785
  }));
9352
9786
  }
9353
- var init_linter10 = __esm({
9787
+ var init_linter11 = __esm({
9354
9788
  "src/targets/kilo-code/linter.ts"() {
9355
9789
  init_validate_rules();
9356
- init_constants8();
9790
+ init_constants9();
9357
9791
  }
9358
9792
  });
9359
9793
 
9360
9794
  // src/targets/kilo-code/lint.ts
9361
- function lintHooks4(canonical) {
9795
+ function lintHooks5(canonical) {
9362
9796
  if (!canonical.hooks) return [];
9363
9797
  const hasEntries = Object.values(canonical.hooks).some(
9364
9798
  (entries) => Array.isArray(entries) && entries.length > 0
@@ -9372,7 +9806,7 @@ function lintHooks4(canonical) {
9372
9806
  )
9373
9807
  ];
9374
9808
  }
9375
- function lintPermissions2(canonical) {
9809
+ function lintPermissions3(canonical) {
9376
9810
  if (!canonical.permissions) return [];
9377
9811
  const { allow, deny } = canonical.permissions;
9378
9812
  const ask = canonical.permissions.ask ?? [];
@@ -9385,36 +9819,36 @@ function lintPermissions2(canonical) {
9385
9819
  )
9386
9820
  ];
9387
9821
  }
9388
- var init_lint8 = __esm({
9822
+ var init_lint9 = __esm({
9389
9823
  "src/targets/kilo-code/lint.ts"() {
9390
9824
  init_helpers();
9391
9825
  }
9392
9826
  });
9393
9827
 
9394
9828
  // src/targets/kilo-code/index.ts
9395
- var target10, project10, globalLayout3, capabilities, descriptor10;
9829
+ var target11, project11, globalLayout4, capabilities2, descriptor11;
9396
9830
  var init_kilo_code2 = __esm({
9397
9831
  "src/targets/kilo-code/index.ts"() {
9398
- init_generator13();
9399
- init_constants8();
9832
+ init_generator14();
9833
+ init_constants9();
9400
9834
  init_skill_mirror();
9401
- init_importer9();
9835
+ init_importer10();
9402
9836
  init_import_mappers7();
9403
- init_linter10();
9404
- init_lint8();
9837
+ init_linter11();
9838
+ init_lint9();
9405
9839
  init_import_map_builders();
9406
- target10 = {
9840
+ target11 = {
9407
9841
  name: KILO_CODE_TARGET,
9408
9842
  primaryRootInstructionPath: KILO_CODE_ROOT_RULE,
9409
- generateRules: generateRules10,
9410
- generateCommands: generateCommands10,
9411
- generateAgents: generateAgents8,
9412
- generateSkills: generateSkills10,
9843
+ generateRules: generateRules11,
9844
+ generateCommands: generateCommands11,
9845
+ generateAgents: generateAgents11,
9846
+ generateSkills: generateSkills11,
9413
9847
  generateMcp: generateMcp8,
9414
- generateIgnore: generateIgnore6,
9848
+ generateIgnore: generateIgnore7,
9415
9849
  importFrom: importFromKiloCode
9416
9850
  };
9417
- project10 = {
9851
+ project11 = {
9418
9852
  rootInstructionPath: KILO_CODE_ROOT_RULE,
9419
9853
  skillDir: KILO_CODE_SKILLS_DIR,
9420
9854
  managedOutputs: {
@@ -9433,7 +9867,7 @@ var init_kilo_code2 = __esm({
9433
9867
  }
9434
9868
  }
9435
9869
  };
9436
- globalLayout3 = {
9870
+ globalLayout4 = {
9437
9871
  rootInstructionPath: KILO_CODE_GLOBAL_AGENTS_MD,
9438
9872
  skillDir: KILO_CODE_GLOBAL_SKILLS_DIR,
9439
9873
  managedOutputs: {
@@ -9465,7 +9899,7 @@ var init_kilo_code2 = __esm({
9465
9899
  }
9466
9900
  }
9467
9901
  };
9468
- capabilities = {
9902
+ capabilities2 = {
9469
9903
  rules: "native",
9470
9904
  additionalRules: "native",
9471
9905
  commands: "native",
@@ -9476,19 +9910,19 @@ var init_kilo_code2 = __esm({
9476
9910
  ignore: "native",
9477
9911
  permissions: "none"
9478
9912
  };
9479
- descriptor10 = {
9913
+ descriptor11 = {
9480
9914
  id: KILO_CODE_TARGET,
9481
- generators: target10,
9482
- capabilities,
9915
+ generators: target11,
9916
+ capabilities: capabilities2,
9483
9917
  emptyImportMessage: "No Kilo Code config found (AGENTS.md, .kilo/rules, .kilo/commands, .kilo/agents, .kilo/skills, .kilo/mcp.json, .kilocodeignore, .kilocode/, or .kilocodemodes).",
9484
- lintRules: lintRules10,
9918
+ lintRules: lintRules11,
9485
9919
  lint: {
9486
- hooks: lintHooks4,
9487
- permissions: lintPermissions2
9920
+ hooks: lintHooks5,
9921
+ permissions: lintPermissions3
9488
9922
  },
9489
- project: project10,
9923
+ project: project11,
9490
9924
  globalSupport: {
9491
- capabilities,
9925
+ capabilities: capabilities2,
9492
9926
  detectionPaths: [
9493
9927
  KILO_CODE_GLOBAL_AGENTS_MD,
9494
9928
  KILO_CODE_GLOBAL_RULES_DIR,
@@ -9498,7 +9932,7 @@ var init_kilo_code2 = __esm({
9498
9932
  KILO_CODE_GLOBAL_MCP_FILE,
9499
9933
  KILO_CODE_GLOBAL_IGNORE
9500
9934
  ],
9501
- layout: globalLayout3
9935
+ layout: globalLayout4
9502
9936
  },
9503
9937
  importer: {
9504
9938
  rules: [
@@ -9699,7 +10133,7 @@ function steeringFrontmatter(rule) {
9699
10133
  if (rule.description) frontmatter.description = rule.description;
9700
10134
  return frontmatter;
9701
10135
  }
9702
- function generateRules11(canonical) {
10136
+ function generateRules12(canonical) {
9703
10137
  const outputs = [];
9704
10138
  const root = canonical.rules.find((rule) => rule.root);
9705
10139
  if (root) {
@@ -9716,7 +10150,13 @@ function generateRules11(canonical) {
9716
10150
  }
9717
10151
  return outputs;
9718
10152
  }
9719
- function generateSkills11(canonical) {
10153
+ function generateCommands12(canonical) {
10154
+ return canonical.commands.map((command) => ({
10155
+ path: `${KIRO_SKILLS_DIR}/${commandSkillDirName(command.name)}/SKILL.md`,
10156
+ content: serializeCommandSkill(command)
10157
+ }));
10158
+ }
10159
+ function generateSkills12(canonical) {
9720
10160
  return generateEmbeddedSkills(canonical, KIRO_SKILLS_DIR);
9721
10161
  }
9722
10162
  function generateMcp9(canonical) {
@@ -9735,7 +10175,7 @@ function generateHooks5(canonical) {
9735
10175
  content: hook.content
9736
10176
  }));
9737
10177
  }
9738
- function generateAgents9(canonical) {
10178
+ function generateAgents12(canonical) {
9739
10179
  return canonical.agents.map((agent) => {
9740
10180
  const frontmatter = {
9741
10181
  name: agent.name,
@@ -9750,16 +10190,17 @@ function generateAgents9(canonical) {
9750
10190
  return { path: `${KIRO_AGENTS_DIR}/${agent.name}.md`, content };
9751
10191
  });
9752
10192
  }
9753
- function generateIgnore7(canonical) {
10193
+ function generateIgnore8(canonical) {
9754
10194
  if (canonical.ignore.length === 0) return [];
9755
10195
  return [{ path: KIRO_IGNORE, content: canonical.ignore.join("\n") }];
9756
10196
  }
9757
- var init_generator14 = __esm({
10197
+ var init_generator15 = __esm({
9758
10198
  "src/targets/kiro/generator.ts"() {
9759
10199
  init_embedded_skill();
10200
+ init_command_skill();
9760
10201
  init_markdown();
9761
10202
  init_hook_format();
9762
- init_constants9();
10203
+ init_constants10();
9763
10204
  }
9764
10205
  });
9765
10206
  function canonicalRuleMeta(frontmatter) {
@@ -9848,12 +10289,12 @@ async function importFromKiro(projectRoot, options = {}) {
9848
10289
  const normalize = await createImportReferenceNormalizer(KIRO_TARGET, projectRoot, scope);
9849
10290
  await importRoot(projectRoot, results, normalize, scope);
9850
10291
  await importNonRootRules(projectRoot, results, normalize);
9851
- results.push(...await runDescriptorImport(descriptor11, projectRoot, scope, { normalize }));
10292
+ results.push(...await runDescriptorImport(descriptor12, projectRoot, scope, { normalize }));
9852
10293
  await importEmbeddedSkills(projectRoot, KIRO_SKILLS_DIR, KIRO_TARGET, results, normalize);
9853
10294
  if (scope === "project") await importHooks2(projectRoot, results);
9854
10295
  return results;
9855
10296
  }
9856
- var init_importer10 = __esm({
10297
+ var init_importer11 = __esm({
9857
10298
  "src/targets/kiro/importer.ts"() {
9858
10299
  init_import_rewriter();
9859
10300
  init_embedded_skill();
@@ -9864,13 +10305,13 @@ var init_importer10 = __esm({
9864
10305
  init_fs();
9865
10306
  init_markdown();
9866
10307
  init_hook_format();
9867
- init_constants9();
10308
+ init_constants10();
9868
10309
  init_kiro2();
9869
10310
  }
9870
10311
  });
9871
10312
 
9872
10313
  // src/targets/kiro/linter.ts
9873
- function lintRules11(canonical, projectRoot, projectFiles, options) {
10314
+ function lintRules12(canonical, projectRoot, projectFiles, options) {
9874
10315
  return validateRules(canonical, projectRoot, projectFiles, {
9875
10316
  checkGlobMatches: options?.scope !== "global"
9876
10317
  }).map((diagnostic) => ({
@@ -9878,15 +10319,15 @@ function lintRules11(canonical, projectRoot, projectFiles, options) {
9878
10319
  target: KIRO_TARGET
9879
10320
  }));
9880
10321
  }
9881
- var init_linter11 = __esm({
10322
+ var init_linter12 = __esm({
9882
10323
  "src/targets/kiro/linter.ts"() {
9883
10324
  init_validate_rules();
9884
- init_constants9();
10325
+ init_constants10();
9885
10326
  }
9886
10327
  });
9887
10328
 
9888
10329
  // src/targets/kiro/lint.ts
9889
- function lintHooks5(canonical) {
10330
+ function lintHooks6(canonical) {
9890
10331
  if (!canonical.hooks || Object.keys(canonical.hooks).length === 0) return [];
9891
10332
  const supported = ["PreToolUse", "PostToolUse", "UserPromptSubmit", "SubagentStop"];
9892
10333
  const supportedSet = new Set(supported);
@@ -9894,184 +10335,652 @@ function lintHooks5(canonical) {
9894
10335
  (event) => createUnsupportedHookWarning(event, "kiro", supported, { unsupportedBy: "Kiro hooks" })
9895
10336
  );
9896
10337
  }
9897
- var init_lint9 = __esm({
10338
+ var init_lint10 = __esm({
9898
10339
  "src/targets/kiro/lint.ts"() {
9899
10340
  init_helpers();
9900
10341
  }
9901
10342
  });
9902
10343
 
9903
- // src/targets/kiro/index.ts
9904
- var target11, project11, global8, globalCapabilities10, descriptor11;
9905
- var init_kiro2 = __esm({
9906
- "src/targets/kiro/index.ts"() {
9907
- init_generator14();
10344
+ // src/targets/kiro/index.ts
10345
+ var target12, project12, global8, globalCapabilities10, descriptor12;
10346
+ var init_kiro2 = __esm({
10347
+ "src/targets/kiro/index.ts"() {
10348
+ init_command_skill();
10349
+ init_generator15();
10350
+ init_skill_mirror();
10351
+ init_importer11();
10352
+ init_linter12();
10353
+ init_lint10();
10354
+ init_import_map_builders();
10355
+ init_constants10();
10356
+ target12 = {
10357
+ name: KIRO_TARGET,
10358
+ primaryRootInstructionPath: KIRO_AGENTS_MD,
10359
+ generateRules: generateRules12,
10360
+ generateCommands: generateCommands12,
10361
+ generateAgents: generateAgents12,
10362
+ generateSkills: generateSkills12,
10363
+ generateMcp: generateMcp9,
10364
+ generateHooks: generateHooks5,
10365
+ generateIgnore: generateIgnore8,
10366
+ importFrom: importFromKiro
10367
+ };
10368
+ project12 = {
10369
+ rootInstructionPath: KIRO_AGENTS_MD,
10370
+ skillDir: KIRO_SKILLS_DIR,
10371
+ managedOutputs: {
10372
+ dirs: [".kiro/hooks", ".kiro/skills", ".kiro/steering", ".kiro/agents"],
10373
+ files: ["AGENTS.md", ".kiro/settings/mcp.json", ".kiroignore"]
10374
+ },
10375
+ paths: {
10376
+ rulePath(slug, _rule) {
10377
+ return `${KIRO_STEERING_DIR}/${slug}.md`;
10378
+ },
10379
+ commandPath(name) {
10380
+ return `${KIRO_SKILLS_DIR}/${commandSkillDirName(name)}/SKILL.md`;
10381
+ },
10382
+ agentPath(name, _config) {
10383
+ return `${KIRO_AGENTS_DIR}/${name}.md`;
10384
+ }
10385
+ }
10386
+ };
10387
+ global8 = {
10388
+ rootInstructionPath: KIRO_GLOBAL_STEERING_AGENTS_MD,
10389
+ skillDir: KIRO_GLOBAL_SKILLS_DIR,
10390
+ managedOutputs: {
10391
+ dirs: [
10392
+ KIRO_GLOBAL_STEERING_DIR,
10393
+ KIRO_GLOBAL_SKILLS_DIR,
10394
+ KIRO_GLOBAL_AGENTS_DIR,
10395
+ KIRO_GLOBAL_AGENTS_SKILLS_DIR
10396
+ ],
10397
+ files: [KIRO_GLOBAL_STEERING_AGENTS_MD, KIRO_GLOBAL_MCP_FILE, KIRO_GLOBAL_IGNORE]
10398
+ },
10399
+ rewriteGeneratedPath(path) {
10400
+ if (path === KIRO_AGENTS_MD) {
10401
+ return KIRO_GLOBAL_STEERING_AGENTS_MD;
10402
+ }
10403
+ if (path.startsWith(`${KIRO_STEERING_DIR}/`)) {
10404
+ return path.replace(`${KIRO_STEERING_DIR}/`, `${KIRO_GLOBAL_STEERING_DIR}/`);
10405
+ }
10406
+ if (path.startsWith(`${KIRO_SKILLS_DIR}/`)) {
10407
+ return path.replace(`${KIRO_SKILLS_DIR}/`, `${KIRO_GLOBAL_SKILLS_DIR}/`);
10408
+ }
10409
+ if (path.startsWith(`${KIRO_AGENTS_DIR}/`)) {
10410
+ return path.replace(`${KIRO_AGENTS_DIR}/`, `${KIRO_GLOBAL_AGENTS_DIR}/`);
10411
+ }
10412
+ if (path === KIRO_MCP_FILE) {
10413
+ return KIRO_GLOBAL_MCP_FILE;
10414
+ }
10415
+ if (path === KIRO_IGNORE) {
10416
+ return KIRO_GLOBAL_IGNORE;
10417
+ }
10418
+ if (path.startsWith(`${KIRO_HOOKS_DIR}/`)) {
10419
+ return null;
10420
+ }
10421
+ return path;
10422
+ },
10423
+ mirrorGlobalPath(path, activeTargets) {
10424
+ return mirrorSkillsToAgents(path, ".kiro/skills", activeTargets);
10425
+ },
10426
+ paths: {
10427
+ rulePath(slug, _rule) {
10428
+ return `${KIRO_GLOBAL_STEERING_DIR}/${slug}.md`;
10429
+ },
10430
+ commandPath(name) {
10431
+ return `${KIRO_SKILLS_DIR}/${commandSkillDirName(name)}/SKILL.md`;
10432
+ },
10433
+ agentPath(name, _config) {
10434
+ return `${KIRO_GLOBAL_AGENTS_DIR}/${name}.md`;
10435
+ }
10436
+ }
10437
+ };
10438
+ globalCapabilities10 = {
10439
+ rules: "native",
10440
+ additionalRules: "native",
10441
+ commands: "none",
10442
+ agents: "native",
10443
+ skills: "native",
10444
+ mcp: "native",
10445
+ hooks: "none",
10446
+ ignore: "native",
10447
+ permissions: "none"
10448
+ };
10449
+ descriptor12 = {
10450
+ id: KIRO_TARGET,
10451
+ generators: target12,
10452
+ capabilities: {
10453
+ rules: "native",
10454
+ additionalRules: "native",
10455
+ commands: "none",
10456
+ agents: "native",
10457
+ skills: "native",
10458
+ mcp: "native",
10459
+ hooks: "native",
10460
+ ignore: "native",
10461
+ permissions: "none"
10462
+ },
10463
+ emptyImportMessage: "No Kiro config found (AGENTS.md, .kiro/steering, .kiro/skills, .kiro/agents, .kiro/hooks, .kiro/settings/mcp.json, or .kiroignore).",
10464
+ supportsConversion: { commands: true },
10465
+ lintRules: lintRules12,
10466
+ lint: {
10467
+ hooks: lintHooks6
10468
+ },
10469
+ project: project12,
10470
+ globalSupport: {
10471
+ capabilities: globalCapabilities10,
10472
+ detectionPaths: [
10473
+ KIRO_GLOBAL_STEERING_DIR,
10474
+ KIRO_GLOBAL_STEERING_AGENTS_MD,
10475
+ KIRO_GLOBAL_SKILLS_DIR,
10476
+ KIRO_GLOBAL_AGENTS_DIR,
10477
+ KIRO_GLOBAL_MCP_FILE,
10478
+ KIRO_GLOBAL_IGNORE
10479
+ ],
10480
+ layout: global8
10481
+ },
10482
+ importer: {
10483
+ agents: {
10484
+ feature: "agents",
10485
+ mode: "directory",
10486
+ source: { project: [KIRO_AGENTS_DIR], global: [KIRO_AGENTS_DIR] },
10487
+ canonicalDir: KIRO_CANONICAL_AGENTS_DIR,
10488
+ extensions: [".md"],
10489
+ preset: "agent"
10490
+ },
10491
+ mcp: {
10492
+ feature: "mcp",
10493
+ mode: "mcpJson",
10494
+ source: { project: [KIRO_MCP_FILE], global: [KIRO_GLOBAL_MCP_FILE] },
10495
+ canonicalDir: ".agentsmesh",
10496
+ canonicalFilename: KIRO_CANONICAL_MCP
10497
+ },
10498
+ ignore: {
10499
+ feature: "ignore",
10500
+ mode: "flatFile",
10501
+ source: { project: [KIRO_IGNORE], global: [KIRO_GLOBAL_IGNORE] },
10502
+ canonicalDir: ".agentsmesh",
10503
+ canonicalFilename: KIRO_CANONICAL_IGNORE
10504
+ }
10505
+ },
10506
+ buildImportPaths: buildKiroImportPaths,
10507
+ detectionPaths: [
10508
+ KIRO_STEERING_DIR,
10509
+ KIRO_SKILLS_DIR,
10510
+ KIRO_AGENTS_DIR,
10511
+ KIRO_HOOKS_DIR,
10512
+ KIRO_MCP_FILE,
10513
+ KIRO_IGNORE
10514
+ ]
10515
+ };
10516
+ }
10517
+ });
10518
+ function generateRules13(canonical) {
10519
+ const outputs = [];
10520
+ const root = canonical.rules.find((rule) => rule.root);
10521
+ if (root) {
10522
+ outputs.push({
10523
+ path: OPENCODE_ROOT_RULE,
10524
+ content: root.body.trim() ? root.body : ""
10525
+ });
10526
+ }
10527
+ for (const rule of canonical.rules) {
10528
+ if (rule.root) continue;
10529
+ if (rule.targets.length > 0 && !rule.targets.includes(OPENCODE_TARGET)) continue;
10530
+ const slug = basename(rule.source, ".md");
10531
+ const frontmatter = {};
10532
+ if (rule.description) frontmatter.description = rule.description;
10533
+ if (rule.globs.length > 0) frontmatter.globs = rule.globs;
10534
+ const content = Object.keys(frontmatter).length > 0 ? serializeFrontmatter(frontmatter, rule.body.trim() || "") : rule.body.trim() || "";
10535
+ outputs.push({
10536
+ path: `${OPENCODE_RULES_DIR}/${slug}.md`,
10537
+ content
10538
+ });
10539
+ }
10540
+ return outputs;
10541
+ }
10542
+ function generateCommands13(canonical) {
10543
+ return canonical.commands.map((command) => {
10544
+ const frontmatter = {};
10545
+ if (command.description) frontmatter.description = command.description;
10546
+ return {
10547
+ path: `${OPENCODE_COMMANDS_DIR}/${command.name}.md`,
10548
+ content: serializeFrontmatter(frontmatter, command.body.trim() || "")
10549
+ };
10550
+ });
10551
+ }
10552
+ function generateAgents13(canonical) {
10553
+ return canonical.agents.map((agent) => {
10554
+ const slug = basename(agent.source, ".md");
10555
+ const frontmatter = { mode: "subagent" };
10556
+ if (agent.description) frontmatter.description = agent.description;
10557
+ if (agent.model) frontmatter.model = agent.model;
10558
+ if (agent.tools.length > 0) frontmatter.tools = agent.tools;
10559
+ if (agent.disallowedTools.length > 0) frontmatter.disallowedTools = agent.disallowedTools;
10560
+ return {
10561
+ path: `${OPENCODE_AGENTS_DIR}/${slug}.md`,
10562
+ content: serializeFrontmatter(frontmatter, agent.body.trim() || "")
10563
+ };
10564
+ });
10565
+ }
10566
+ function toOpenCodeMcpServer(server) {
10567
+ if ("url" in server) {
10568
+ const entry2 = { type: "remote", url: server.url };
10569
+ if (Object.keys(server.headers).length > 0) entry2.headers = server.headers;
10570
+ if (server.description) entry2.description = server.description;
10571
+ return entry2;
10572
+ }
10573
+ const entry = {
10574
+ type: "local",
10575
+ command: [server.command, ...server.args]
10576
+ };
10577
+ if (Object.keys(server.env).length > 0) entry.environment = server.env;
10578
+ if (server.description) entry.description = server.description;
10579
+ return entry;
10580
+ }
10581
+ function generateMcp10(canonical) {
10582
+ if (!canonical.mcp || Object.keys(canonical.mcp.mcpServers).length === 0) return [];
10583
+ const mcpEntries = {};
10584
+ for (const [name, server] of Object.entries(canonical.mcp.mcpServers)) {
10585
+ mcpEntries[name] = toOpenCodeMcpServer(server);
10586
+ }
10587
+ return [
10588
+ {
10589
+ path: OPENCODE_CONFIG_FILE,
10590
+ content: JSON.stringify({ mcp: mcpEntries }, null, 2)
10591
+ }
10592
+ ];
10593
+ }
10594
+ function generateSkills13(canonical) {
10595
+ return generateEmbeddedSkills(canonical, OPENCODE_SKILLS_DIR);
10596
+ }
10597
+ var init_generator16 = __esm({
10598
+ "src/targets/opencode/generator.ts"() {
10599
+ init_embedded_skill();
10600
+ init_markdown();
10601
+ init_constants11();
10602
+ }
10603
+ });
10604
+ function toStringRecord2(value) {
10605
+ if (!value || typeof value !== "object" || Array.isArray(value)) return {};
10606
+ const out = {};
10607
+ for (const [k, v] of Object.entries(value)) {
10608
+ if (typeof v === "string") out[k] = v;
10609
+ }
10610
+ return out;
10611
+ }
10612
+ function parseOpenCodeMcp(content) {
10613
+ let parsed;
10614
+ try {
10615
+ parsed = JSON.parse(content);
10616
+ } catch {
10617
+ return {};
10618
+ }
10619
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
10620
+ const raw = parsed.mcp;
10621
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) return {};
10622
+ const out = {};
10623
+ for (const [name, value] of Object.entries(raw)) {
10624
+ if (!value || typeof value !== "object" || Array.isArray(value)) continue;
10625
+ const entry = value;
10626
+ if (typeof entry.url === "string") {
10627
+ out[name] = {
10628
+ type: "url",
10629
+ url: entry.url,
10630
+ headers: toStringRecord2(entry.headers),
10631
+ env: toStringRecord2(entry.environment),
10632
+ ...typeof entry.description === "string" ? { description: entry.description } : {}
10633
+ };
10634
+ continue;
10635
+ }
10636
+ if (Array.isArray(entry.command) && entry.command.length > 0) {
10637
+ const cmdArr = entry.command;
10638
+ const command = cmdArr[0];
10639
+ if (command === void 0) continue;
10640
+ const args = cmdArr.slice(1);
10641
+ out[name] = {
10642
+ type: "stdio",
10643
+ command,
10644
+ args,
10645
+ env: toStringRecord2(entry.environment),
10646
+ ...typeof entry.description === "string" ? { description: entry.description } : {}
10647
+ };
10648
+ }
10649
+ }
10650
+ return out;
10651
+ }
10652
+ async function importMcp4(projectRoot, scope, results) {
10653
+ const configFile = scope === "global" ? OPENCODE_GLOBAL_CONFIG_FILE : OPENCODE_CONFIG_FILE;
10654
+ const srcPath = join(projectRoot, configFile);
10655
+ const content = await readFileSafe(srcPath);
10656
+ if (content === null) return;
10657
+ const imported = parseOpenCodeMcp(content);
10658
+ if (Object.keys(imported).length === 0) return;
10659
+ await writeMcpWithMerge(projectRoot, OPENCODE_CANONICAL_MCP, imported);
10660
+ results.push({
10661
+ feature: "mcp",
10662
+ fromTool: OPENCODE_TARGET,
10663
+ fromPath: srcPath,
10664
+ toPath: OPENCODE_CANONICAL_MCP
10665
+ });
10666
+ }
10667
+ async function importFromOpenCode(projectRoot, options = {}) {
10668
+ const scope = options.scope ?? "project";
10669
+ const results = [];
10670
+ const normalize = await createImportReferenceNormalizer(OPENCODE_TARGET, projectRoot, scope);
10671
+ results.push(...await runDescriptorImport(descriptor13, projectRoot, scope, { normalize }));
10672
+ await importEmbeddedSkills(projectRoot, OPENCODE_SKILLS_DIR, OPENCODE_TARGET, results, normalize);
10673
+ await importMcp4(projectRoot, scope, results);
10674
+ return results;
10675
+ }
10676
+ var init_importer12 = __esm({
10677
+ "src/targets/opencode/importer.ts"() {
10678
+ init_import_rewriter();
10679
+ init_embedded_skill();
10680
+ init_descriptor_import_runner();
10681
+ init_mcp_merge();
10682
+ init_fs();
10683
+ init_constants11();
10684
+ init_opencode2();
10685
+ }
10686
+ });
10687
+ var opencodeNonRootRuleMapper, opencodeCommandMapper, opencodeAgentMapper;
10688
+ var init_import_mappers8 = __esm({
10689
+ "src/targets/opencode/import-mappers.ts"() {
10690
+ init_markdown();
10691
+ init_import_metadata();
10692
+ init_constants11();
10693
+ opencodeNonRootRuleMapper = async ({
10694
+ relativePath,
10695
+ normalizeTo,
10696
+ destDir
10697
+ }) => {
10698
+ const destPath = join(destDir, relativePath);
10699
+ const { frontmatter, body } = parseFrontmatter(normalizeTo(destPath));
10700
+ return {
10701
+ destPath,
10702
+ toPath: `${OPENCODE_CANONICAL_RULES_DIR}/${relativePath}`,
10703
+ content: await serializeImportedRuleWithFallback(
10704
+ destPath,
10705
+ {
10706
+ root: false,
10707
+ description: typeof frontmatter.description === "string" ? frontmatter.description : void 0,
10708
+ globs: Array.isArray(frontmatter.globs) ? frontmatter.globs : void 0
10709
+ },
10710
+ body
10711
+ )
10712
+ };
10713
+ };
10714
+ opencodeCommandMapper = async ({
10715
+ relativePath,
10716
+ normalizeTo,
10717
+ destDir
10718
+ }) => {
10719
+ const destPath = join(destDir, relativePath);
10720
+ const { frontmatter, body } = parseFrontmatter(normalizeTo(destPath));
10721
+ return {
10722
+ destPath,
10723
+ toPath: `${OPENCODE_CANONICAL_COMMANDS_DIR}/${relativePath}`,
10724
+ content: await serializeImportedCommandWithFallback(
10725
+ destPath,
10726
+ {
10727
+ hasDescription: Object.prototype.hasOwnProperty.call(frontmatter, "description"),
10728
+ description: typeof frontmatter.description === "string" ? frontmatter.description : void 0,
10729
+ hasAllowedTools: false,
10730
+ allowedTools: []
10731
+ },
10732
+ body
10733
+ )
10734
+ };
10735
+ };
10736
+ opencodeAgentMapper = async ({
10737
+ relativePath,
10738
+ normalizeTo,
10739
+ destDir
10740
+ }) => {
10741
+ const destPath = join(destDir, relativePath);
10742
+ const { frontmatter, body } = parseFrontmatter(normalizeTo(destPath));
10743
+ return {
10744
+ destPath,
10745
+ toPath: `${OPENCODE_CANONICAL_AGENTS_DIR}/${relativePath}`,
10746
+ content: await serializeImportedAgentWithFallback(destPath, frontmatter, body)
10747
+ };
10748
+ };
10749
+ }
10750
+ });
10751
+
10752
+ // src/targets/opencode/linter.ts
10753
+ function lintRules13(canonical, projectRoot, projectFiles, options) {
10754
+ return validateRules(canonical, projectRoot, projectFiles, {
10755
+ checkGlobMatches: options?.scope !== "global"
10756
+ }).map((diagnostic) => ({
10757
+ ...diagnostic,
10758
+ target: OPENCODE_TARGET
10759
+ }));
10760
+ }
10761
+ var init_linter13 = __esm({
10762
+ "src/targets/opencode/linter.ts"() {
10763
+ init_validate_rules();
10764
+ init_constants11();
10765
+ }
10766
+ });
10767
+
10768
+ // src/targets/opencode/lint.ts
10769
+ function lintHooks7(canonical) {
10770
+ if (!canonical.hooks) return [];
10771
+ const hasEntries = Object.values(canonical.hooks).some(
10772
+ (entries) => Array.isArray(entries) && entries.length > 0
10773
+ );
10774
+ if (!hasEntries) return [];
10775
+ return [
10776
+ createWarning(
10777
+ ".agentsmesh/hooks.yaml",
10778
+ "opencode",
10779
+ "opencode hooks are plugin-based (TypeScript/JavaScript); canonical config hooks are not projected."
10780
+ )
10781
+ ];
10782
+ }
10783
+ function lintPermissions4(canonical) {
10784
+ if (!canonical.permissions) return [];
10785
+ const { allow, deny } = canonical.permissions;
10786
+ const ask = canonical.permissions.ask ?? [];
10787
+ if (allow.length === 0 && deny.length === 0 && ask.length === 0) return [];
10788
+ return [
10789
+ createWarning(
10790
+ ".agentsmesh/permissions.yaml",
10791
+ "opencode",
10792
+ "opencode permissions live in opencode.json, which agentsmesh does not generate in v1; canonical permissions are not projected."
10793
+ )
10794
+ ];
10795
+ }
10796
+ function lintIgnore(canonical) {
10797
+ if (canonical.ignore.length === 0) return [];
10798
+ return [
10799
+ createWarning(
10800
+ ".agentsmesh/ignore",
10801
+ "opencode",
10802
+ "opencode has no dedicated ignore file; canonical ignore patterns are not projected. Configure watcher.ignore in opencode.json manually."
10803
+ )
10804
+ ];
10805
+ }
10806
+ var init_lint11 = __esm({
10807
+ "src/targets/opencode/lint.ts"() {
10808
+ init_helpers();
10809
+ }
10810
+ });
10811
+
10812
+ // src/targets/opencode/index.ts
10813
+ var target13, project13, globalLayout5, capabilities3, descriptor13;
10814
+ var init_opencode2 = __esm({
10815
+ "src/targets/opencode/index.ts"() {
10816
+ init_generator16();
10817
+ init_constants11();
9908
10818
  init_skill_mirror();
9909
- init_importer10();
9910
- init_linter11();
9911
- init_lint9();
10819
+ init_importer12();
10820
+ init_import_mappers8();
10821
+ init_linter13();
10822
+ init_lint11();
9912
10823
  init_import_map_builders();
9913
- init_constants9();
9914
- target11 = {
9915
- name: KIRO_TARGET,
9916
- primaryRootInstructionPath: KIRO_AGENTS_MD,
9917
- generateRules: generateRules11,
9918
- generateAgents: generateAgents9,
9919
- generateSkills: generateSkills11,
9920
- generateMcp: generateMcp9,
9921
- generateHooks: generateHooks5,
9922
- generateIgnore: generateIgnore7,
9923
- importFrom: importFromKiro
10824
+ target13 = {
10825
+ name: OPENCODE_TARGET,
10826
+ primaryRootInstructionPath: OPENCODE_ROOT_RULE,
10827
+ generateRules: generateRules13,
10828
+ generateCommands: generateCommands13,
10829
+ generateAgents: generateAgents13,
10830
+ generateSkills: generateSkills13,
10831
+ generateMcp: generateMcp10,
10832
+ importFrom: importFromOpenCode
9924
10833
  };
9925
- project11 = {
9926
- rootInstructionPath: KIRO_AGENTS_MD,
9927
- skillDir: KIRO_SKILLS_DIR,
10834
+ project13 = {
10835
+ rootInstructionPath: OPENCODE_ROOT_RULE,
10836
+ skillDir: OPENCODE_SKILLS_DIR,
9928
10837
  managedOutputs: {
9929
- dirs: [".kiro/hooks", ".kiro/skills", ".kiro/steering", ".kiro/agents"],
9930
- files: ["AGENTS.md", ".kiro/settings/mcp.json", ".kiroignore"]
10838
+ dirs: [OPENCODE_RULES_DIR, OPENCODE_COMMANDS_DIR, OPENCODE_AGENTS_DIR, OPENCODE_SKILLS_DIR],
10839
+ files: [OPENCODE_ROOT_RULE, OPENCODE_CONFIG_FILE]
9931
10840
  },
9932
10841
  paths: {
9933
- rulePath(slug, _rule) {
9934
- return `${KIRO_STEERING_DIR}/${slug}.md`;
10842
+ rulePath(slug) {
10843
+ return `${OPENCODE_RULES_DIR}/${slug}.md`;
9935
10844
  },
9936
- commandPath(_name, _config) {
9937
- return null;
10845
+ commandPath(name) {
10846
+ return `${OPENCODE_COMMANDS_DIR}/${name}.md`;
9938
10847
  },
9939
- agentPath(name, _config) {
9940
- return `${KIRO_AGENTS_DIR}/${name}.md`;
10848
+ agentPath(name) {
10849
+ return `${OPENCODE_AGENTS_DIR}/${name}.md`;
9941
10850
  }
9942
10851
  }
9943
10852
  };
9944
- global8 = {
9945
- rootInstructionPath: KIRO_GLOBAL_STEERING_AGENTS_MD,
9946
- skillDir: KIRO_GLOBAL_SKILLS_DIR,
10853
+ globalLayout5 = {
10854
+ rootInstructionPath: OPENCODE_GLOBAL_AGENTS_MD,
10855
+ skillDir: OPENCODE_GLOBAL_SKILLS_DIR,
9947
10856
  managedOutputs: {
9948
10857
  dirs: [
9949
- KIRO_GLOBAL_STEERING_DIR,
9950
- KIRO_GLOBAL_SKILLS_DIR,
9951
- KIRO_GLOBAL_AGENTS_DIR,
9952
- KIRO_GLOBAL_AGENTS_SKILLS_DIR
10858
+ OPENCODE_GLOBAL_RULES_DIR,
10859
+ OPENCODE_GLOBAL_COMMANDS_DIR,
10860
+ OPENCODE_GLOBAL_AGENTS_DIR,
10861
+ OPENCODE_GLOBAL_SKILLS_DIR,
10862
+ OPENCODE_GLOBAL_AGENTS_SKILLS_DIR
9953
10863
  ],
9954
- files: [KIRO_GLOBAL_STEERING_AGENTS_MD, KIRO_GLOBAL_MCP_FILE, KIRO_GLOBAL_IGNORE]
10864
+ files: [OPENCODE_GLOBAL_AGENTS_MD, OPENCODE_GLOBAL_CONFIG_FILE]
9955
10865
  },
9956
10866
  rewriteGeneratedPath(path) {
9957
- if (path === KIRO_AGENTS_MD) {
9958
- return KIRO_GLOBAL_STEERING_AGENTS_MD;
9959
- }
9960
- if (path.startsWith(`${KIRO_STEERING_DIR}/`)) {
9961
- return path.replace(`${KIRO_STEERING_DIR}/`, `${KIRO_GLOBAL_STEERING_DIR}/`);
9962
- }
9963
- if (path.startsWith(`${KIRO_SKILLS_DIR}/`)) {
9964
- return path.replace(`${KIRO_SKILLS_DIR}/`, `${KIRO_GLOBAL_SKILLS_DIR}/`);
9965
- }
9966
- if (path.startsWith(`${KIRO_AGENTS_DIR}/`)) {
9967
- return path.replace(`${KIRO_AGENTS_DIR}/`, `${KIRO_GLOBAL_AGENTS_DIR}/`);
9968
- }
9969
- if (path === KIRO_MCP_FILE) {
9970
- return KIRO_GLOBAL_MCP_FILE;
9971
- }
9972
- if (path === KIRO_IGNORE) {
9973
- return KIRO_GLOBAL_IGNORE;
9974
- }
9975
- if (path.startsWith(`${KIRO_HOOKS_DIR}/`)) {
9976
- return null;
9977
- }
10867
+ if (path === OPENCODE_ROOT_RULE) return OPENCODE_GLOBAL_AGENTS_MD;
10868
+ if (path === OPENCODE_CONFIG_FILE) return OPENCODE_GLOBAL_CONFIG_FILE;
9978
10869
  return path;
9979
10870
  },
9980
10871
  mirrorGlobalPath(path, activeTargets) {
9981
- return mirrorSkillsToAgents(path, ".kiro/skills", activeTargets);
10872
+ return mirrorSkillsToAgents(path, OPENCODE_GLOBAL_SKILLS_DIR, activeTargets);
9982
10873
  },
9983
10874
  paths: {
9984
- rulePath(slug, _rule) {
9985
- return `${KIRO_GLOBAL_STEERING_DIR}/${slug}.md`;
10875
+ rulePath(slug) {
10876
+ return `${OPENCODE_GLOBAL_RULES_DIR}/${slug}.md`;
9986
10877
  },
9987
- commandPath(_name, _config) {
9988
- return null;
10878
+ commandPath(name) {
10879
+ return `${OPENCODE_GLOBAL_COMMANDS_DIR}/${name}.md`;
9989
10880
  },
9990
- agentPath(name, _config) {
9991
- return `${KIRO_GLOBAL_AGENTS_DIR}/${name}.md`;
10881
+ agentPath(name) {
10882
+ return `${OPENCODE_GLOBAL_AGENTS_DIR}/${name}.md`;
9992
10883
  }
9993
10884
  }
9994
10885
  };
9995
- globalCapabilities10 = {
10886
+ capabilities3 = {
9996
10887
  rules: "native",
9997
10888
  additionalRules: "native",
9998
- commands: "none",
10889
+ commands: "native",
9999
10890
  agents: "native",
10000
10891
  skills: "native",
10001
10892
  mcp: "native",
10002
10893
  hooks: "none",
10003
- ignore: "native",
10894
+ ignore: "none",
10004
10895
  permissions: "none"
10005
10896
  };
10006
- descriptor11 = {
10007
- id: KIRO_TARGET,
10008
- generators: target11,
10009
- capabilities: {
10010
- rules: "native",
10011
- additionalRules: "native",
10012
- commands: "none",
10013
- agents: "native",
10014
- skills: "native",
10015
- mcp: "native",
10016
- hooks: "native",
10017
- ignore: "native",
10018
- permissions: "none"
10019
- },
10020
- emptyImportMessage: "No Kiro config found (AGENTS.md, .kiro/steering, .kiro/skills, .kiro/agents, .kiro/hooks, .kiro/settings/mcp.json, or .kiroignore).",
10021
- lintRules: lintRules11,
10897
+ descriptor13 = {
10898
+ id: OPENCODE_TARGET,
10899
+ generators: target13,
10900
+ capabilities: capabilities3,
10901
+ emptyImportMessage: "No OpenCode config found (AGENTS.md, .opencode/rules, .opencode/commands, .opencode/agents, .opencode/skills, or opencode.json).",
10902
+ lintRules: lintRules13,
10022
10903
  lint: {
10023
- hooks: lintHooks5
10904
+ hooks: lintHooks7,
10905
+ permissions: lintPermissions4,
10906
+ ignore: lintIgnore
10024
10907
  },
10025
- project: project11,
10908
+ project: project13,
10026
10909
  globalSupport: {
10027
- capabilities: globalCapabilities10,
10910
+ capabilities: capabilities3,
10028
10911
  detectionPaths: [
10029
- KIRO_GLOBAL_STEERING_DIR,
10030
- KIRO_GLOBAL_STEERING_AGENTS_MD,
10031
- KIRO_GLOBAL_SKILLS_DIR,
10032
- KIRO_GLOBAL_AGENTS_DIR,
10033
- KIRO_GLOBAL_MCP_FILE,
10034
- KIRO_GLOBAL_IGNORE
10912
+ OPENCODE_GLOBAL_AGENTS_MD,
10913
+ OPENCODE_GLOBAL_RULES_DIR,
10914
+ OPENCODE_GLOBAL_COMMANDS_DIR,
10915
+ OPENCODE_GLOBAL_AGENTS_DIR,
10916
+ OPENCODE_GLOBAL_SKILLS_DIR,
10917
+ OPENCODE_GLOBAL_CONFIG_FILE
10035
10918
  ],
10036
- layout: global8
10919
+ layout: globalLayout5
10037
10920
  },
10038
10921
  importer: {
10922
+ rules: [
10923
+ {
10924
+ feature: "rules",
10925
+ mode: "singleFile",
10926
+ source: {
10927
+ project: [OPENCODE_ROOT_RULE],
10928
+ global: [OPENCODE_GLOBAL_AGENTS_MD]
10929
+ },
10930
+ canonicalDir: OPENCODE_CANONICAL_RULES_DIR,
10931
+ canonicalRootFilename: "_root.md",
10932
+ markAsRoot: true
10933
+ },
10934
+ {
10935
+ feature: "rules",
10936
+ mode: "directory",
10937
+ source: {
10938
+ project: [OPENCODE_RULES_DIR],
10939
+ global: [OPENCODE_GLOBAL_RULES_DIR]
10940
+ },
10941
+ canonicalDir: OPENCODE_CANONICAL_RULES_DIR,
10942
+ extensions: [".md"],
10943
+ map: opencodeNonRootRuleMapper
10944
+ }
10945
+ ],
10946
+ commands: {
10947
+ feature: "commands",
10948
+ mode: "directory",
10949
+ source: {
10950
+ project: [OPENCODE_COMMANDS_DIR],
10951
+ global: [OPENCODE_GLOBAL_COMMANDS_DIR]
10952
+ },
10953
+ canonicalDir: OPENCODE_CANONICAL_COMMANDS_DIR,
10954
+ extensions: [".md"],
10955
+ map: opencodeCommandMapper
10956
+ },
10039
10957
  agents: {
10040
10958
  feature: "agents",
10041
10959
  mode: "directory",
10042
- source: { project: [KIRO_AGENTS_DIR], global: [KIRO_AGENTS_DIR] },
10043
- canonicalDir: KIRO_CANONICAL_AGENTS_DIR,
10960
+ source: {
10961
+ project: [OPENCODE_AGENTS_DIR],
10962
+ global: [OPENCODE_GLOBAL_AGENTS_DIR]
10963
+ },
10964
+ canonicalDir: OPENCODE_CANONICAL_AGENTS_DIR,
10044
10965
  extensions: [".md"],
10045
- preset: "agent"
10046
- },
10047
- mcp: {
10048
- feature: "mcp",
10049
- mode: "mcpJson",
10050
- source: { project: [KIRO_MCP_FILE], global: [KIRO_GLOBAL_MCP_FILE] },
10051
- canonicalDir: ".agentsmesh",
10052
- canonicalFilename: KIRO_CANONICAL_MCP
10053
- },
10054
- ignore: {
10055
- feature: "ignore",
10056
- mode: "flatFile",
10057
- source: { project: [KIRO_IGNORE], global: [KIRO_GLOBAL_IGNORE] },
10058
- canonicalDir: ".agentsmesh",
10059
- canonicalFilename: KIRO_CANONICAL_IGNORE
10966
+ map: opencodeAgentMapper
10060
10967
  }
10968
+ // MCP is imported manually in importer.ts because OpenCode uses `mcp`
10969
+ // key (not `mcpServers`) with a different server format.
10061
10970
  },
10062
- buildImportPaths: buildKiroImportPaths,
10971
+ buildImportPaths: buildOpencodeImportPaths,
10063
10972
  detectionPaths: [
10064
- KIRO_STEERING_DIR,
10065
- KIRO_SKILLS_DIR,
10066
- KIRO_AGENTS_DIR,
10067
- KIRO_HOOKS_DIR,
10068
- KIRO_MCP_FILE,
10069
- KIRO_IGNORE
10973
+ OPENCODE_RULES_DIR,
10974
+ OPENCODE_COMMANDS_DIR,
10975
+ OPENCODE_AGENTS_DIR,
10976
+ OPENCODE_SKILLS_DIR,
10977
+ OPENCODE_CONFIG_FILE,
10978
+ "opencode.jsonc"
10070
10979
  ]
10071
10980
  };
10072
10981
  }
10073
10982
  });
10074
- function generateRules12(canonical) {
10983
+ function generateRules14(canonical) {
10075
10984
  const outputs = [];
10076
10985
  const root = canonical.rules.find((rule) => rule.root);
10077
10986
  if (root) {
@@ -10091,7 +11000,7 @@ function generateRules12(canonical) {
10091
11000
  }
10092
11001
  return outputs;
10093
11002
  }
10094
- function generateCommands11(canonical) {
11003
+ function generateCommands14(canonical) {
10095
11004
  return canonical.commands.map((command) => {
10096
11005
  const frontmatter = {};
10097
11006
  if (command.description) frontmatter.description = command.description;
@@ -10101,7 +11010,7 @@ function generateCommands11(canonical) {
10101
11010
  };
10102
11011
  });
10103
11012
  }
10104
- function generateMcp10(canonical) {
11013
+ function generateMcp11(canonical) {
10105
11014
  if (!canonical.mcp || Object.keys(canonical.mcp.mcpServers).length === 0) return [];
10106
11015
  return [
10107
11016
  {
@@ -10110,14 +11019,14 @@ function generateMcp10(canonical) {
10110
11019
  }
10111
11020
  ];
10112
11021
  }
10113
- function generateIgnore8(canonical) {
11022
+ function generateIgnore9(canonical) {
10114
11023
  if (canonical.ignore.length === 0) return [];
10115
11024
  return [{ path: ROO_CODE_IGNORE, content: canonical.ignore.join("\n") }];
10116
11025
  }
10117
- function generateSkills12(canonical) {
11026
+ function generateSkills14(canonical) {
10118
11027
  return generateEmbeddedSkills(canonical, ROO_CODE_SKILLS_DIR);
10119
11028
  }
10120
- function generateAgents10(canonical) {
11029
+ function generateAgents14(canonical) {
10121
11030
  if (canonical.agents.length === 0) return [];
10122
11031
  const customModes = canonical.agents.map((agent) => {
10123
11032
  const slug = basename(agent.source, ".md");
@@ -10128,19 +11037,19 @@ function generateAgents10(canonical) {
10128
11037
  });
10129
11038
  return [{ path: ROO_CODE_MODES_FILE, content: stringify({ customModes }) }];
10130
11039
  }
10131
- var init_generator15 = __esm({
11040
+ var init_generator17 = __esm({
10132
11041
  "src/targets/roo-code/generator.ts"() {
10133
11042
  init_embedded_skill();
10134
11043
  init_markdown();
10135
- init_constants10();
11044
+ init_constants12();
10136
11045
  }
10137
11046
  });
10138
11047
  var rooNonRootRuleMapper, rooCommandMapper;
10139
- var init_import_mappers8 = __esm({
11048
+ var init_import_mappers9 = __esm({
10140
11049
  "src/targets/roo-code/import-mappers.ts"() {
10141
11050
  init_markdown();
10142
11051
  init_import_metadata();
10143
- init_constants10();
11052
+ init_constants12();
10144
11053
  rooNonRootRuleMapper = async ({
10145
11054
  relativePath,
10146
11055
  normalizeTo,
@@ -10224,25 +11133,25 @@ async function importFromRooCode(projectRoot, options = {}) {
10224
11133
  const scope = options.scope ?? "project";
10225
11134
  const results = [];
10226
11135
  const normalize = await createImportReferenceNormalizer(ROO_CODE_TARGET, projectRoot, scope);
10227
- results.push(...await runDescriptorImport(descriptor12, projectRoot, scope, { normalize }));
11136
+ results.push(...await runDescriptorImport(descriptor14, projectRoot, scope, { normalize }));
10228
11137
  await importPerModeRules(projectRoot, results, normalize);
10229
11138
  await importEmbeddedSkills(projectRoot, ROO_CODE_SKILLS_DIR, ROO_CODE_TARGET, results, normalize);
10230
11139
  return results;
10231
11140
  }
10232
- var init_importer11 = __esm({
11141
+ var init_importer13 = __esm({
10233
11142
  "src/targets/roo-code/importer.ts"() {
10234
11143
  init_import_rewriter();
10235
11144
  init_embedded_skill();
10236
11145
  init_import_orchestrator();
10237
11146
  init_descriptor_import_runner();
10238
- init_import_mappers8();
10239
- init_constants10();
11147
+ init_import_mappers9();
11148
+ init_constants12();
10240
11149
  init_roo_code2();
10241
11150
  }
10242
11151
  });
10243
11152
 
10244
11153
  // src/targets/roo-code/linter.ts
10245
- function lintRules12(canonical, projectRoot, projectFiles, options) {
11154
+ function lintRules14(canonical, projectRoot, projectFiles, options) {
10246
11155
  return validateRules(canonical, projectRoot, projectFiles, {
10247
11156
  checkGlobMatches: options?.scope !== "global"
10248
11157
  }).map((diagnostic) => ({
@@ -10250,10 +11159,10 @@ function lintRules12(canonical, projectRoot, projectFiles, options) {
10250
11159
  target: ROO_CODE_TARGET
10251
11160
  }));
10252
11161
  }
10253
- var init_linter12 = __esm({
11162
+ var init_linter14 = __esm({
10254
11163
  "src/targets/roo-code/linter.ts"() {
10255
11164
  init_validate_rules();
10256
- init_constants10();
11165
+ init_constants12();
10257
11166
  }
10258
11167
  });
10259
11168
  function computeStatus5(existing, content) {
@@ -10261,29 +11170,29 @@ function computeStatus5(existing, content) {
10261
11170
  if (existing !== content) return "updated";
10262
11171
  return "unchanged";
10263
11172
  }
10264
- var target12, project12, generateRooGlobalExtras, global9, globalCapabilities11, descriptor12;
11173
+ var target14, project14, generateRooGlobalExtras, global9, globalCapabilities11, descriptor14;
10265
11174
  var init_roo_code2 = __esm({
10266
11175
  "src/targets/roo-code/index.ts"() {
10267
11176
  init_fs();
10268
- init_generator15();
10269
- init_constants10();
11177
+ init_generator17();
11178
+ init_constants12();
10270
11179
  init_skill_mirror();
10271
- init_importer11();
10272
- init_import_mappers8();
10273
- init_linter12();
11180
+ init_importer13();
11181
+ init_import_mappers9();
11182
+ init_linter14();
10274
11183
  init_import_map_builders();
10275
- target12 = {
11184
+ target14 = {
10276
11185
  name: "roo-code",
10277
11186
  primaryRootInstructionPath: ROO_CODE_ROOT_RULE,
10278
- generateRules: generateRules12,
10279
- generateCommands: generateCommands11,
10280
- generateSkills: generateSkills12,
10281
- generateMcp: generateMcp10,
10282
- generateIgnore: generateIgnore8,
10283
- generateAgents: generateAgents10,
11187
+ generateRules: generateRules14,
11188
+ generateCommands: generateCommands14,
11189
+ generateSkills: generateSkills14,
11190
+ generateMcp: generateMcp11,
11191
+ generateIgnore: generateIgnore9,
11192
+ generateAgents: generateAgents14,
10284
11193
  importFrom: importFromRooCode
10285
11194
  };
10286
- project12 = {
11195
+ project14 = {
10287
11196
  rootInstructionPath: ROO_CODE_ROOT_RULE,
10288
11197
  skillDir: ".roo/skills",
10289
11198
  managedOutputs: {
@@ -10391,9 +11300,9 @@ var init_roo_code2 = __esm({
10391
11300
  ignore: "native",
10392
11301
  permissions: "none"
10393
11302
  };
10394
- descriptor12 = {
11303
+ descriptor14 = {
10395
11304
  id: "roo-code",
10396
- generators: target12,
11305
+ generators: target14,
10397
11306
  capabilities: {
10398
11307
  rules: "native",
10399
11308
  additionalRules: "native",
@@ -10406,8 +11315,8 @@ var init_roo_code2 = __esm({
10406
11315
  permissions: "none"
10407
11316
  },
10408
11317
  emptyImportMessage: "No Roo Code config found (.roo/rules, .roo/commands, .roo/skills, .roo/mcp.json, .rooignore, or .roorules).",
10409
- lintRules: lintRules12,
10410
- project: project12,
11318
+ lintRules: lintRules14,
11319
+ project: project14,
10411
11320
  globalSupport: {
10412
11321
  capabilities: globalCapabilities11,
10413
11322
  detectionPaths: [
@@ -10490,7 +11399,7 @@ var init_roo_code2 = __esm({
10490
11399
 
10491
11400
  // src/targets/windsurf/constants.ts
10492
11401
  var WINDSURF_TARGET, WINDSURF_RULES_ROOT, WINDSURF_RULES_DIR, WINDSURF_IGNORE, CODEIUM_IGNORE, WINDSURF_AGENTS_MD, WINDSURF_HOOKS_FILE, WINDSURF_MCP_EXAMPLE_FILE, WINDSURF_MCP_CONFIG_FILE, WINDSURF_WORKFLOWS_DIR, WINDSURF_SKILLS_DIR, WINDSURF_CANONICAL_RULES_DIR, WINDSURF_CANONICAL_COMMANDS_DIR, WINDSURF_CANONICAL_AGENTS_DIR, WINDSURF_CANONICAL_SKILLS_DIR, WINDSURF_CANONICAL_IGNORE, WINDSURF_CANONICAL_HOOKS, WINDSURF_CANONICAL_MCP, WINDSURF_GLOBAL_RULES, WINDSURF_GLOBAL_SKILLS_DIR, WINDSURF_GLOBAL_WORKFLOWS_DIR, WINDSURF_GLOBAL_HOOKS_FILE, WINDSURF_GLOBAL_MCP_FILE, WINDSURF_GLOBAL_IGNORE, WINDSURF_GLOBAL_AGENTS_SKILLS_DIR;
10493
- var init_constants14 = __esm({
11402
+ var init_constants16 = __esm({
10494
11403
  "src/targets/windsurf/constants.ts"() {
10495
11404
  WINDSURF_TARGET = "windsurf";
10496
11405
  WINDSURF_RULES_ROOT = ".windsurfrules";
@@ -10529,7 +11438,7 @@ function directoryScopedRuleDir(globs) {
10529
11438
  if (dirs.length !== globs.length) return null;
10530
11439
  return dirs.every((dir) => dir === dirs[0]) ? dirs[0] : null;
10531
11440
  }
10532
- function generateRules13(canonical) {
11441
+ function generateRules15(canonical) {
10533
11442
  const outputs = [];
10534
11443
  const root = canonical.rules.find((r) => r.root);
10535
11444
  if (!root) return [];
@@ -10566,23 +11475,23 @@ function generateRules13(canonical) {
10566
11475
  var init_rules4 = __esm({
10567
11476
  "src/targets/windsurf/generator/rules.ts"() {
10568
11477
  init_markdown();
10569
- init_constants14();
11478
+ init_constants16();
10570
11479
  }
10571
11480
  });
10572
11481
 
10573
11482
  // src/targets/windsurf/generator/ignore.ts
10574
- function generateIgnore9(canonical) {
11483
+ function generateIgnore10(canonical) {
10575
11484
  if (!canonical.ignore || canonical.ignore.length === 0) return [];
10576
11485
  return [{ path: CODEIUM_IGNORE, content: canonical.ignore.join("\n") }];
10577
11486
  }
10578
11487
  var init_ignore3 = __esm({
10579
11488
  "src/targets/windsurf/generator/ignore.ts"() {
10580
- init_constants14();
11489
+ init_constants16();
10581
11490
  }
10582
11491
  });
10583
11492
 
10584
11493
  // src/targets/windsurf/generator/workflows.ts
10585
- function generateCommands12(canonical) {
11494
+ function generateCommands15(canonical) {
10586
11495
  return canonical.commands.map((cmd) => {
10587
11496
  const frontmatter = {
10588
11497
  description: cmd.description.trim() || void 0,
@@ -10601,12 +11510,12 @@ function generateCommands12(canonical) {
10601
11510
  var init_workflows = __esm({
10602
11511
  "src/targets/windsurf/generator/workflows.ts"() {
10603
11512
  init_markdown();
10604
- init_constants14();
11513
+ init_constants16();
10605
11514
  }
10606
11515
  });
10607
11516
 
10608
11517
  // src/targets/windsurf/generator/agents.ts
10609
- function generateAgents11(canonical) {
11518
+ function generateAgents15(canonical) {
10610
11519
  return canonical.agents.map((agent) => ({
10611
11520
  path: `${WINDSURF_SKILLS_DIR}/${projectedAgentSkillDirName(agent.name)}/SKILL.md`,
10612
11521
  content: serializeProjectedAgentSkill(agent)
@@ -10615,12 +11524,12 @@ function generateAgents11(canonical) {
10615
11524
  var init_agents4 = __esm({
10616
11525
  "src/targets/windsurf/generator/agents.ts"() {
10617
11526
  init_projected_agent_skill();
10618
- init_constants14();
11527
+ init_constants16();
10619
11528
  }
10620
11529
  });
10621
11530
 
10622
11531
  // src/targets/windsurf/generator/mcp.ts
10623
- function generateMcp11(canonical) {
11532
+ function generateMcp12(canonical) {
10624
11533
  if (!canonical.mcp || Object.keys(canonical.mcp.mcpServers).length === 0) return [];
10625
11534
  return [
10626
11535
  {
@@ -10631,7 +11540,7 @@ function generateMcp11(canonical) {
10631
11540
  }
10632
11541
  var init_mcp3 = __esm({
10633
11542
  "src/targets/windsurf/generator/mcp.ts"() {
10634
- init_constants14();
11543
+ init_constants16();
10635
11544
  }
10636
11545
  });
10637
11546
 
@@ -10674,12 +11583,12 @@ function generateHooks6(canonical) {
10674
11583
  var init_hooks2 = __esm({
10675
11584
  "src/targets/windsurf/generator/hooks.ts"() {
10676
11585
  init_hook_command();
10677
- init_constants14();
11586
+ init_constants16();
10678
11587
  }
10679
11588
  });
10680
11589
 
10681
11590
  // src/targets/windsurf/generator/skills.ts
10682
- function generateSkills13(canonical) {
11591
+ function generateSkills15(canonical) {
10683
11592
  const outputs = [];
10684
11593
  for (const skill of canonical.skills) {
10685
11594
  const frontmatter = {
@@ -10701,12 +11610,12 @@ function generateSkills13(canonical) {
10701
11610
  var init_skills4 = __esm({
10702
11611
  "src/targets/windsurf/generator/skills.ts"() {
10703
11612
  init_markdown();
10704
- init_constants14();
11613
+ init_constants16();
10705
11614
  }
10706
11615
  });
10707
11616
 
10708
11617
  // src/targets/windsurf/generator/index.ts
10709
- var init_generator16 = __esm({
11618
+ var init_generator18 = __esm({
10710
11619
  "src/targets/windsurf/generator/index.ts"() {
10711
11620
  init_rules4();
10712
11621
  init_ignore3();
@@ -10719,9 +11628,9 @@ var init_generator16 = __esm({
10719
11628
  });
10720
11629
 
10721
11630
  // src/targets/windsurf/generator.ts
10722
- var init_generator17 = __esm({
11631
+ var init_generator19 = __esm({
10723
11632
  "src/targets/windsurf/generator.ts"() {
10724
- init_generator16();
11633
+ init_generator18();
10725
11634
  }
10726
11635
  });
10727
11636
  function toStringArray8(value) {
@@ -10773,7 +11682,7 @@ var init_importer_workflows = __esm({
10773
11682
  init_fs();
10774
11683
  init_markdown();
10775
11684
  init_import_metadata();
10776
- init_constants14();
11685
+ init_constants16();
10777
11686
  }
10778
11687
  });
10779
11688
  async function importSkills4(projectRoot, results, normalize, skillsRelDir = WINDSURF_SKILLS_DIR) {
@@ -10820,7 +11729,7 @@ var init_skills_adapter5 = __esm({
10820
11729
  init_projected_agent_skill();
10821
11730
  init_scoped_agents_import();
10822
11731
  init_skill_import_pipeline();
10823
- init_constants14();
11732
+ init_constants16();
10824
11733
  }
10825
11734
  });
10826
11735
  async function importWindsurfHooks(projectRoot, results) {
@@ -10918,7 +11827,7 @@ async function importWindsurfMcp(projectRoot, results) {
10918
11827
  var init_importer_hooks_mcp = __esm({
10919
11828
  "src/targets/windsurf/importer-hooks-mcp.ts"() {
10920
11829
  init_fs();
10921
- init_constants14();
11830
+ init_constants16();
10922
11831
  }
10923
11832
  });
10924
11833
  async function importFromWindsurf(projectRoot, options) {
@@ -11055,7 +11964,7 @@ async function importFromWindsurf(projectRoot, options) {
11055
11964
  await importWindsurfMcp(projectRoot, results);
11056
11965
  return results;
11057
11966
  }
11058
- var init_importer12 = __esm({
11967
+ var init_importer14 = __esm({
11059
11968
  "src/targets/windsurf/importer.ts"() {
11060
11969
  init_import_rewriter();
11061
11970
  init_fs();
@@ -11063,13 +11972,13 @@ var init_importer12 = __esm({
11063
11972
  init_import_metadata();
11064
11973
  init_import_orchestrator();
11065
11974
  init_scoped_agents_import();
11066
- init_constants14();
11975
+ init_constants16();
11067
11976
  init_importer_workflows();
11068
11977
  init_skills_adapter5();
11069
11978
  init_importer_hooks_mcp();
11070
11979
  }
11071
11980
  });
11072
- function lintRules13(canonical, projectRoot, _projectFiles) {
11981
+ function lintRules15(canonical, projectRoot, _projectFiles) {
11073
11982
  const diags = [];
11074
11983
  const { rules } = canonical;
11075
11984
  if (rules.length > 0) {
@@ -11096,9 +12005,9 @@ function lintRules13(canonical, projectRoot, _projectFiles) {
11096
12005
  }
11097
12006
  return diags;
11098
12007
  }
11099
- var init_linter13 = __esm({
12008
+ var init_linter15 = __esm({
11100
12009
  "src/targets/windsurf/linter.ts"() {
11101
- init_constants14();
12010
+ init_constants16();
11102
12011
  }
11103
12012
  });
11104
12013
 
@@ -11112,7 +12021,7 @@ function lintCommands6(canonical) {
11112
12021
  )
11113
12022
  );
11114
12023
  }
11115
- function lintMcp4(canonical) {
12024
+ function lintMcp5(canonical) {
11116
12025
  if (!canonical.mcp || Object.keys(canonical.mcp.mcpServers).length === 0) return [];
11117
12026
  return [
11118
12027
  createWarning(
@@ -11122,7 +12031,7 @@ function lintMcp4(canonical) {
11122
12031
  )
11123
12032
  ];
11124
12033
  }
11125
- var init_lint10 = __esm({
12034
+ var init_lint12 = __esm({
11126
12035
  "src/targets/windsurf/lint.ts"() {
11127
12036
  init_helpers();
11128
12037
  }
@@ -11135,32 +12044,32 @@ function directoryScopedRuleDir2(globs) {
11135
12044
  if (dirs.length !== globs.length) return null;
11136
12045
  return dirs.every((dir) => dir === dirs[0]) ? dirs[0] : null;
11137
12046
  }
11138
- var target13, project13, global10, globalCapabilities12, descriptor13;
12047
+ var target15, project15, global10, globalCapabilities12, descriptor15;
11139
12048
  var init_windsurf2 = __esm({
11140
12049
  "src/targets/windsurf/index.ts"() {
11141
- init_generator17();
12050
+ init_generator19();
11142
12051
  init_capabilities();
11143
- init_constants14();
12052
+ init_constants16();
11144
12053
  init_skill_mirror();
11145
- init_importer12();
11146
- init_linter13();
11147
- init_lint10();
12054
+ init_importer14();
12055
+ init_linter15();
12056
+ init_lint12();
11148
12057
  init_import_map_builders();
11149
12058
  init_conversions();
11150
12059
  init_projected_agent_skill();
11151
- target13 = {
12060
+ target15 = {
11152
12061
  name: "windsurf",
11153
12062
  primaryRootInstructionPath: WINDSURF_AGENTS_MD,
11154
- generateRules: generateRules13,
11155
- generateCommands: generateCommands12,
11156
- generateAgents: generateAgents11,
11157
- generateSkills: generateSkills13,
11158
- generateMcp: generateMcp11,
12063
+ generateRules: generateRules15,
12064
+ generateCommands: generateCommands15,
12065
+ generateAgents: generateAgents15,
12066
+ generateSkills: generateSkills15,
12067
+ generateMcp: generateMcp12,
11159
12068
  generateHooks: generateHooks6,
11160
- generateIgnore: generateIgnore9,
12069
+ generateIgnore: generateIgnore10,
11161
12070
  importFrom: importFromWindsurf
11162
12071
  };
11163
- project13 = {
12072
+ project15 = {
11164
12073
  rootInstructionPath: WINDSURF_AGENTS_MD,
11165
12074
  extraRuleOutputPaths(rule) {
11166
12075
  if (rule.root) return [WINDSURF_AGENTS_MD];
@@ -11255,9 +12164,9 @@ var init_windsurf2 = __esm({
11255
12164
  ignore: "native",
11256
12165
  permissions: "none"
11257
12166
  };
11258
- descriptor13 = {
12167
+ descriptor15 = {
11259
12168
  id: "windsurf",
11260
- generators: target13,
12169
+ generators: target15,
11261
12170
  capabilities: {
11262
12171
  rules: "native",
11263
12172
  additionalRules: "native",
@@ -11271,12 +12180,12 @@ var init_windsurf2 = __esm({
11271
12180
  },
11272
12181
  emptyImportMessage: "No Windsurf config found (.windsurfrules, .windsurf/rules, .windsurfignore, or .codeiumignore).",
11273
12182
  supportsConversion: { agents: true },
11274
- lintRules: lintRules13,
12183
+ lintRules: lintRules15,
11275
12184
  lint: {
11276
12185
  commands: lintCommands6,
11277
- mcp: lintMcp4
12186
+ mcp: lintMcp5
11278
12187
  },
11279
- project: project13,
12188
+ project: project15,
11280
12189
  globalSupport: {
11281
12190
  capabilities: globalCapabilities12,
11282
12191
  detectionPaths: [
@@ -11319,67 +12228,80 @@ function builtinTargetsMap() {
11319
12228
  }
11320
12229
  return _builtinTargetsMap;
11321
12230
  }
11322
- function getBuiltinTargetDefinition(target14) {
11323
- return builtinTargetsMap().get(target14);
12231
+ function getBuiltinTargetDefinition(target16) {
12232
+ return builtinTargetsMap().get(target16);
11324
12233
  }
11325
- function getTargetCapabilities(target14, scope = "project") {
11326
- const descriptor14 = getBuiltinTargetDefinition(target14) ?? getDescriptor(target14);
11327
- if (!descriptor14) return void 0;
11328
- const raw = scope === "global" ? descriptor14.globalSupport?.capabilities ?? descriptor14.capabilities : descriptor14.capabilities;
12234
+ function getTargetCapabilities(target16, scope = "project") {
12235
+ const descriptor16 = getBuiltinTargetDefinition(target16) ?? getDescriptor(target16);
12236
+ if (!descriptor16) return void 0;
12237
+ const raw = scope === "global" ? descriptor16.globalSupport?.capabilities ?? descriptor16.capabilities : descriptor16.capabilities;
11329
12238
  return normalizeTargetCapabilities(raw);
11330
12239
  }
11331
- function getTargetDetectionPaths(target14, scope = "project") {
11332
- const descriptor14 = getBuiltinTargetDefinition(target14) ?? getDescriptor(target14);
11333
- if (!descriptor14) return [];
12240
+ function getTargetDetectionPaths(target16, scope = "project") {
12241
+ const descriptor16 = getBuiltinTargetDefinition(target16) ?? getDescriptor(target16);
12242
+ if (!descriptor16) return [];
11334
12243
  if (scope === "global") {
11335
- return descriptor14.globalSupport?.detectionPaths ?? [];
12244
+ return descriptor16.globalSupport?.detectionPaths ?? [];
11336
12245
  }
11337
- return descriptor14.detectionPaths;
12246
+ return descriptor16.detectionPaths;
11338
12247
  }
11339
- function getTargetLayout(target14, scope = "project") {
11340
- const descriptor14 = getBuiltinTargetDefinition(target14) ?? getDescriptor(target14);
11341
- if (!descriptor14) return void 0;
12248
+ function getTargetLayout(target16, scope = "project") {
12249
+ const descriptor16 = getBuiltinTargetDefinition(target16) ?? getDescriptor(target16);
12250
+ if (!descriptor16) return void 0;
11342
12251
  if (scope === "global") {
11343
- return descriptor14.globalSupport?.layout;
12252
+ return descriptor16.globalSupport?.layout;
11344
12253
  }
11345
- return descriptor14.project;
12254
+ return descriptor16.project;
11346
12255
  }
11347
- function getTargetPrimaryRootInstructionPath(target14, scope = "project") {
11348
- return getTargetLayout(target14, scope)?.rootInstructionPath;
12256
+ function getTargetPrimaryRootInstructionPath(target16, scope = "project") {
12257
+ return getTargetLayout(target16, scope)?.rootInstructionPath;
11349
12258
  }
11350
- function getTargetSkillDir(target14, scope = "project") {
11351
- return getTargetLayout(target14, scope)?.skillDir;
12259
+ function getTargetSkillDir(target16, scope = "project") {
12260
+ return getTargetLayout(target16, scope)?.skillDir;
11352
12261
  }
11353
- function getTargetManagedOutputs(target14, scope = "project") {
11354
- return getTargetLayout(target14, scope)?.managedOutputs;
12262
+ function getTargetManagedOutputs(target16, scope = "project") {
12263
+ return getTargetLayout(target16, scope)?.managedOutputs;
11355
12264
  }
11356
- function rewriteGeneratedOutputPath(target14, path, scope = "project") {
11357
- const layout = getTargetLayout(target14, scope);
12265
+ function rewriteGeneratedOutputPath(target16, path, scope = "project") {
12266
+ const layout = getTargetLayout(target16, scope);
11358
12267
  if (!layout) return null;
11359
12268
  return layout.rewriteGeneratedPath ? layout.rewriteGeneratedPath(path) : path;
11360
12269
  }
11361
- function isFeatureSuppressedByConversion(descriptor14, feature, config, scope) {
11362
- if (!descriptor14 || !config) return false;
11363
- if (feature === "commands" && descriptor14.supportsConversion?.commands) {
11364
- return !shouldConvertCommandsToSkills(config, descriptor14.id, true, scope);
12270
+ function isFeatureSuppressedByConversion(descriptor16, feature, config, scope) {
12271
+ if (!descriptor16 || !config) return false;
12272
+ if (feature === "commands" && descriptor16.supportsConversion?.commands) {
12273
+ return !shouldConvertCommandsToSkills(config, descriptor16.id, true, scope);
11365
12274
  }
11366
- if (feature === "agents" && descriptor14.supportsConversion?.agents) {
11367
- return !shouldConvertAgentsToSkills(config, descriptor14.id, true, scope);
12275
+ if (feature === "agents" && descriptor16.supportsConversion?.agents) {
12276
+ return !shouldConvertAgentsToSkills(config, descriptor16.id, true, scope);
11368
12277
  }
11369
12278
  return false;
11370
12279
  }
11371
- function getEffectiveTargetSupportLevel(target14, feature, config, scope = "project") {
11372
- const baseLevel = getTargetCapabilities(target14, scope)?.[feature]?.level ?? "none";
12280
+ function isConversionUpgrading(descriptor16, feature, config, scope) {
12281
+ if (!descriptor16 || !config) return false;
12282
+ if (feature === "commands" && descriptor16.supportsConversion?.commands) {
12283
+ return shouldConvertCommandsToSkills(config, descriptor16.id, true, scope);
12284
+ }
12285
+ if (feature === "agents" && descriptor16.supportsConversion?.agents) {
12286
+ return shouldConvertAgentsToSkills(config, descriptor16.id, true, scope);
12287
+ }
12288
+ return false;
12289
+ }
12290
+ function getEffectiveTargetSupportLevel(target16, feature, config, scope = "project") {
12291
+ const baseLevel = getTargetCapabilities(target16, scope)?.[feature]?.level ?? "none";
12292
+ const descriptor16 = getBuiltinTargetDefinition(target16) ?? getDescriptor(target16);
12293
+ if (baseLevel === "none" && isConversionUpgrading(descriptor16, feature, config, scope)) {
12294
+ return "embedded";
12295
+ }
11373
12296
  if (baseLevel !== "embedded") return baseLevel;
11374
- const descriptor14 = getBuiltinTargetDefinition(target14) ?? getDescriptor(target14);
11375
- return isFeatureSuppressedByConversion(descriptor14, feature, config, scope) ? "none" : baseLevel;
12297
+ return isFeatureSuppressedByConversion(descriptor16, feature, config, scope) ? "none" : baseLevel;
11376
12298
  }
11377
- function resolveTargetFeatureGenerator(target14, feature, config, scope = "project") {
11378
- const descriptor14 = getBuiltinTargetDefinition(target14) ?? getDescriptor(target14);
11379
- if (!descriptor14?.generators) return void 0;
11380
- if (isFeatureSuppressedByConversion(descriptor14, feature, config, scope)) return void 0;
12299
+ function resolveTargetFeatureGenerator(target16, feature, config, scope = "project") {
12300
+ const descriptor16 = getBuiltinTargetDefinition(target16) ?? getDescriptor(target16);
12301
+ if (!descriptor16?.generators) return void 0;
12302
+ if (isFeatureSuppressedByConversion(descriptor16, feature, config, scope)) return void 0;
11381
12303
  const pick = PICK_FEATURE_GENERATOR[feature];
11382
- return pick === null ? void 0 : pick(descriptor14.generators);
12304
+ return pick === null ? void 0 : pick(descriptor16.generators);
11383
12305
  }
11384
12306
  var BUILTIN_TARGETS, _builtinTargetsMap, PICK_FEATURE_GENERATOR;
11385
12307
  var init_builtin_targets = __esm({
@@ -11397,9 +12319,11 @@ var init_builtin_targets = __esm({
11397
12319
  init_copilot2();
11398
12320
  init_cursor2();
11399
12321
  init_gemini_cli2();
12322
+ init_goose2();
11400
12323
  init_junie2();
11401
12324
  init_kilo_code2();
11402
12325
  init_kiro2();
12326
+ init_opencode2();
11403
12327
  init_roo_code2();
11404
12328
  init_windsurf2();
11405
12329
  BUILTIN_TARGETS = [
@@ -11415,7 +12339,9 @@ var init_builtin_targets = __esm({
11415
12339
  descriptor10,
11416
12340
  descriptor11,
11417
12341
  descriptor12,
11418
- descriptor13
12342
+ descriptor13,
12343
+ descriptor14,
12344
+ descriptor15
11419
12345
  ];
11420
12346
  PICK_FEATURE_GENERATOR = {
11421
12347
  rules: (g) => g.generateRules,
@@ -11436,12 +12362,12 @@ function capabilityLevel(capability) {
11436
12362
  function canUseScopedSettings(feature) {
11437
12363
  return settingsBackedFeatures.includes(feature);
11438
12364
  }
11439
- function validateCapabilityImplementations(descriptor14, capabilities2, ctx, pathPrefix) {
12365
+ function validateCapabilityImplementations(descriptor16, capabilities4, ctx, pathPrefix) {
11440
12366
  for (const requirement of generatorRequirements) {
11441
- const level = capabilityLevel(capabilities2[requirement.feature]);
12367
+ const level = capabilityLevel(capabilities4[requirement.feature]);
11442
12368
  if (level === "none") continue;
11443
- const hasGenerator = typeof descriptor14.generators[requirement.generator] === "function";
11444
- const hasSettingsEmitter = canUseScopedSettings(requirement.feature) && typeof descriptor14.emitScopedSettings === "function";
12369
+ const hasGenerator = typeof descriptor16.generators[requirement.generator] === "function";
12370
+ const hasSettingsEmitter = canUseScopedSettings(requirement.feature) && typeof descriptor16.emitScopedSettings === "function";
11445
12371
  if (hasGenerator || hasSettingsEmitter) continue;
11446
12372
  ctx.addIssue({
11447
12373
  code: "custom",
@@ -11566,9 +12492,9 @@ var init_registry = __esm({
11566
12492
  });
11567
12493
 
11568
12494
  // src/core/reference/import-map.ts
11569
- async function buildImportReferenceMap(target14, projectRoot, scope = "project") {
12495
+ async function buildImportReferenceMap(target16, projectRoot, scope = "project") {
11570
12496
  const refs = /* @__PURE__ */ new Map();
11571
- const def = getDescriptor(target14);
12497
+ const def = getDescriptor(target16);
11572
12498
  if (def) {
11573
12499
  await def.buildImportPaths(refs, projectRoot, scope);
11574
12500
  }
@@ -11581,12 +12507,12 @@ var init_import_map = __esm({
11581
12507
  });
11582
12508
 
11583
12509
  // src/core/reference/link-format-registry.ts
11584
- function topLevelDotfilePrefixes(descriptor14) {
11585
- const layouts = [descriptor14.project, descriptor14.globalSupport?.layout].filter(
12510
+ function topLevelDotfilePrefixes(descriptor16) {
12511
+ const layouts = [descriptor16.project, descriptor16.globalSupport?.layout].filter(
11586
12512
  (l) => l !== void 0
11587
12513
  );
11588
12514
  const candidates = [
11589
- ...descriptor14.detectionPaths,
12515
+ ...descriptor16.detectionPaths,
11590
12516
  ...layouts.flatMap((l) => l.managedOutputs?.dirs ?? []),
11591
12517
  ...layouts.flatMap((l) => l.managedOutputs?.files ?? [])
11592
12518
  ];
@@ -11599,8 +12525,8 @@ function topLevelDotfilePrefixes(descriptor14) {
11599
12525
  }
11600
12526
  function buildDefaultRootRelativePrefixes() {
11601
12527
  const set = /* @__PURE__ */ new Set([".agentsmesh/"]);
11602
- for (const descriptor14 of BUILTIN_TARGETS) {
11603
- for (const prefix of topLevelDotfilePrefixes(descriptor14)) set.add(prefix);
12528
+ for (const descriptor16 of BUILTIN_TARGETS) {
12529
+ for (const prefix of topLevelDotfilePrefixes(descriptor16)) set.add(prefix);
11604
12530
  }
11605
12531
  return Array.from(set);
11606
12532
  }
@@ -11833,21 +12759,21 @@ function formatLinkPathForDestinationLegacy(projectRoot, destinationFile, absolu
11833
12759
  const api = pathApi(projectRoot);
11834
12760
  const root = normalizeForProject(projectRoot, projectRoot);
11835
12761
  const destFile = normalizeForProject(projectRoot, destinationFile);
11836
- const target14 = normalizeForProject(projectRoot, absoluteTargetPath);
11837
- if (!isUnderProjectRoot(projectRoot, target14)) {
11838
- return toProjectRootReference(projectRoot, target14, keepSlash)?.text ?? null;
12762
+ const target16 = normalizeForProject(projectRoot, absoluteTargetPath);
12763
+ if (!isUnderProjectRoot(projectRoot, target16)) {
12764
+ return toProjectRootReference(projectRoot, target16, keepSlash)?.text ?? null;
11839
12765
  }
11840
12766
  const destDir = normalizeForProject(projectRoot, api.dirname(destFile));
11841
12767
  if (!isUnderProjectRoot(projectRoot, destDir) && destDir !== root) {
11842
- return toProjectRootReference(projectRoot, target14, keepSlash)?.text ?? null;
12768
+ return toProjectRootReference(projectRoot, target16, keepSlash)?.text ?? null;
11843
12769
  }
11844
- let rel2 = api.relative(destDir, target14).replace(/\\/g, "/");
12770
+ let rel2 = api.relative(destDir, target16).replace(/\\/g, "/");
11845
12771
  if (api.isAbsolute(rel2) || WINDOWS_ABSOLUTE_PATH.test(rel2)) {
11846
- return toProjectRootRelative(projectRoot, target14, keepSlash);
12772
+ return toProjectRootRelative(projectRoot, target16, keepSlash);
11847
12773
  }
11848
12774
  const joined = normalizeForProject(projectRoot, api.join(destDir, rel2));
11849
12775
  if (!isUnderProjectRoot(projectRoot, joined)) {
11850
- return toProjectRootRelative(projectRoot, target14, keepSlash);
12776
+ return toProjectRootRelative(projectRoot, target16, keepSlash);
11851
12777
  }
11852
12778
  if (rel2 === "" || rel2 === ".") {
11853
12779
  rel2 = ".";
@@ -11866,11 +12792,11 @@ var init_link_rebaser_formatting = __esm({
11866
12792
  // src/core/reference/link-rebaser-output.ts
11867
12793
  function formatLinkPathForDestination(projectRoot, destinationFile, absoluteTargetPath, keepSlash, options = {}) {
11868
12794
  const scope = options.scope ?? "project";
11869
- const target14 = normalizeForProject(projectRoot, absoluteTargetPath);
11870
- if (isReadingContextOptions(options) && isUnderAgentsMesh(projectRoot, destinationFile) && isUnderAgentsMesh(projectRoot, target14)) {
12795
+ const target16 = normalizeForProject(projectRoot, absoluteTargetPath);
12796
+ if (isReadingContextOptions(options) && isUnderAgentsMesh(projectRoot, destinationFile) && isUnderAgentsMesh(projectRoot, target16)) {
11871
12797
  const api = pathApi(projectRoot);
11872
12798
  const root = normalizeForProject(projectRoot, projectRoot);
11873
- const rel2 = api.relative(root, target14).replace(/\\/g, "/");
12799
+ const rel2 = api.relative(root, target16).replace(/\\/g, "/");
11874
12800
  if (!rel2.startsWith("..") && rel2.length > 0) {
11875
12801
  return keepSlash && !rel2.endsWith("/") ? `${rel2}/` : rel2;
11876
12802
  }
@@ -11885,10 +12811,10 @@ function formatLinkPathForDestination(projectRoot, destinationFile, absoluteTarg
11885
12811
  );
11886
12812
  }
11887
12813
  if (scope === "global" && !isUnderAgentsMesh(projectRoot, destinationFile)) {
11888
- return toProjectRootReference(projectRoot, target14, keepSlash)?.text ?? null;
12814
+ return toProjectRootReference(projectRoot, target16, keepSlash)?.text ?? null;
11889
12815
  }
11890
12816
  const meshCanonicalForShape = (() => {
11891
- if (isUnderAgentsMesh(projectRoot, target14)) return target14;
12817
+ if (isUnderAgentsMesh(projectRoot, target16)) return target16;
11892
12818
  const logical = options.logicalMeshSourceAbsolute;
11893
12819
  if (logical && isUnderAgentsMesh(projectRoot, normalizeForProject(projectRoot, logical))) {
11894
12820
  return normalizeForProject(projectRoot, logical);
@@ -11896,9 +12822,9 @@ function formatLinkPathForDestination(projectRoot, destinationFile, absoluteTarg
11896
12822
  return null;
11897
12823
  })();
11898
12824
  if (!meshCanonicalForShape) {
11899
- return toProjectRootReference(projectRoot, target14, keepSlash)?.text ?? null;
12825
+ return toProjectRootReference(projectRoot, target16, keepSlash)?.text ?? null;
11900
12826
  }
11901
- const treatAsDirectory = keepSlash || (options.pathIsDirectory?.(target14) ?? false);
12827
+ const treatAsDirectory = keepSlash || (options.pathIsDirectory?.(target16) ?? false);
11902
12828
  if (treatAsDirectory) {
11903
12829
  const meshRelative = toAgentsMeshRootRelative(projectRoot, meshCanonicalForShape, keepSlash);
11904
12830
  if (meshRelative !== null) return meshRelative;
@@ -12264,10 +13190,10 @@ function pathVariants(api, path) {
12264
13190
  }
12265
13191
  return variants;
12266
13192
  }
12267
- async function createImportReferenceNormalizer(target14, projectRoot, scope = "project") {
13193
+ async function createImportReferenceNormalizer(target16, projectRoot, scope = "project") {
12268
13194
  const api = pathApi(projectRoot);
12269
13195
  const refs = /* @__PURE__ */ new Map();
12270
- const targets = Array.from(/* @__PURE__ */ new Set([target14, ...TARGET_IDS]));
13196
+ const targets = Array.from(/* @__PURE__ */ new Set([target16, ...TARGET_IDS]));
12271
13197
  for (const candidate of targets) {
12272
13198
  const candidateRefs = await buildImportReferenceMap(candidate, projectRoot, scope);
12273
13199
  for (const [targetPath, canonicalPath] of candidateRefs.entries()) {
@@ -12492,7 +13418,7 @@ async function importFromClaudeCode(projectRoot, options = {}) {
12492
13418
  await importSettings2(projectRoot, results);
12493
13419
  return results;
12494
13420
  }
12495
- var init_importer13 = __esm({
13421
+ var init_importer15 = __esm({
12496
13422
  "src/targets/claude-code/importer.ts"() {
12497
13423
  init_import_rewriter();
12498
13424
  init_descriptor_import_runner();
@@ -12735,13 +13661,13 @@ function parseGitlabSource(source) {
12735
13661
  const slash = slug.lastIndexOf("/");
12736
13662
  if (slash < 0) return null;
12737
13663
  const namespace = slug.slice(0, slash).trim();
12738
- const project14 = slug.slice(slash + 1).trim();
12739
- if (!namespace || !project14) return null;
13664
+ const project16 = slug.slice(slash + 1).trim();
13665
+ if (!namespace || !project16) return null;
12740
13666
  return {
12741
13667
  namespace,
12742
- project: project14,
13668
+ project: project16,
12743
13669
  ref,
12744
- cloneUrl: `https://gitlab.com/${namespace}/${project14}.git`
13670
+ cloneUrl: `https://gitlab.com/${namespace}/${project16}.git`
12745
13671
  };
12746
13672
  }
12747
13673
  function parseGitSource(source) {
@@ -13545,17 +14471,17 @@ var logger = {
13545
14471
  };
13546
14472
 
13547
14473
  // src/canonical/extends/native-extends-importer.ts
13548
- init_importer13();
14474
+ init_importer15();
13549
14475
  init_importer6();
13550
14476
  init_importer5();
13551
14477
  init_importer7();
13552
14478
  init_importer3();
13553
- init_importer12();
14479
+ init_importer14();
13554
14480
  init_importer2();
13555
14481
  init_importer4();
13556
- init_importer8();
13557
- init_importer10();
13558
14482
  init_importer9();
14483
+ init_importer11();
14484
+ init_importer10();
13559
14485
  var NATIVE_IMPORTERS = {
13560
14486
  "claude-code": importFromClaudeCode,
13561
14487
  cursor: importFromCursor,
@@ -14094,8 +15020,8 @@ function deepMergeObjects(base, overrides2) {
14094
15020
  }
14095
15021
  return result;
14096
15022
  }
14097
- function mergeLocalConfig(project14, local) {
14098
- const merged = { ...project14 };
15023
+ function mergeLocalConfig(project16, local) {
15024
+ const merged = { ...project16 };
14099
15025
  if (Array.isArray(local.targets) && local.targets.length > 0) {
14100
15026
  merged.targets = local.targets;
14101
15027
  }
@@ -14115,7 +15041,7 @@ function mergeLocalConfig(project14, local) {
14115
15041
  );
14116
15042
  }
14117
15043
  if (Array.isArray(local.extends) && local.extends.length > 0) {
14118
- merged.extends = [...project14.extends ?? [], ...local.extends];
15044
+ merged.extends = [...project16.extends ?? [], ...local.extends];
14119
15045
  }
14120
15046
  return merged;
14121
15047
  }