agent-skills-standard 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -627,13 +627,13 @@ const getAgentDefinition = (id) => {
627
627
  return {
628
628
  id,
629
629
  name: "Antigravity",
630
- path: ".agent/skills",
631
- ruleFile: ".agent/rules",
630
+ path: ".agents/skills",
631
+ ruleFile: ".agents/rules",
632
632
  ruleExtension: ".md",
633
633
  frontmatterStyle: "cursor",
634
- detectionFiles: [".agent"],
634
+ detectionFiles: [".agents"],
635
635
  workflowFormat: "native",
636
- workflowPath: ".agent/workflows"
636
+ workflowPath: ".agents/workflows"
637
637
  };
638
638
  case Agent.OpenAI:
639
639
  return {
@@ -1879,28 +1879,118 @@ const getTargets = (home = os.homedir()) => {
1879
1879
  [Agent.Cursor]: {
1880
1880
  agent: Agent.Cursor,
1881
1881
  projectFile: ".cursor/mcp.json",
1882
- userFile: path.join(HOME, ".cursor", "mcp.json"),
1882
+ userFile: (() => {
1883
+ if (process.platform === "win32") {
1884
+ return path.join(
1885
+ HOME,
1886
+ "AppData",
1887
+ "Roaming",
1888
+ "Cursor",
1889
+ "User",
1890
+ "globalStorage",
1891
+ "mcp.json"
1892
+ );
1893
+ }
1894
+ if (process.platform === "darwin") {
1895
+ return path.join(
1896
+ HOME,
1897
+ "Library",
1898
+ "Application Support",
1899
+ "Cursor",
1900
+ "User",
1901
+ "globalStorage",
1902
+ "mcp.json"
1903
+ );
1904
+ }
1905
+ if (process.platform === "linux") {
1906
+ return path.join(
1907
+ HOME,
1908
+ ".config",
1909
+ "Cursor",
1910
+ "User",
1911
+ "globalStorage",
1912
+ "mcp.json"
1913
+ );
1914
+ }
1915
+ return path.join(HOME, ".cursor", "mcp.json");
1916
+ })(),
1883
1917
  key: "mcpServers",
1884
1918
  shape: "map"
1885
1919
  },
1886
1920
  [Agent.Antigravity]: {
1887
1921
  agent: Agent.Antigravity,
1888
- projectFile: ".antigravity/mcp.json",
1889
- userFile: null,
1922
+ projectFile: ".antigravity/mcp_config.json",
1923
+ userFile: (() => {
1924
+ if (process.platform === "win32") {
1925
+ return path.join(
1926
+ HOME,
1927
+ "AppData",
1928
+ "Local",
1929
+ "Google",
1930
+ "Antigravity",
1931
+ "mcp_config.json"
1932
+ );
1933
+ }
1934
+ if (process.platform === "darwin") {
1935
+ return path.join(
1936
+ HOME,
1937
+ "Library",
1938
+ "Application Support",
1939
+ "Google",
1940
+ "Antigravity",
1941
+ "mcp_config.json"
1942
+ );
1943
+ }
1944
+ return path.join(HOME, ".gemini", "antigravity", "mcp_config.json");
1945
+ })(),
1890
1946
  key: "mcpServers",
1891
1947
  shape: "map"
1892
1948
  },
1893
1949
  [Agent.Kiro]: {
1894
1950
  agent: Agent.Kiro,
1895
1951
  projectFile: ".kiro/settings/mcp.json",
1896
- userFile: null,
1952
+ userFile: (() => {
1953
+ if (process.platform === "win32") {
1954
+ return path.join(
1955
+ HOME,
1956
+ "AppData",
1957
+ "Roaming",
1958
+ "Kiro",
1959
+ "settings",
1960
+ "mcp.json"
1961
+ );
1962
+ }
1963
+ return path.join(HOME, ".kiro", "settings", "mcp.json");
1964
+ })(),
1897
1965
  key: "mcpServers",
1898
1966
  shape: "map"
1899
1967
  },
1900
1968
  [Agent.Windsurf]: {
1901
1969
  agent: Agent.Windsurf,
1902
1970
  projectFile: ".codeium/windsurf/mcp_config.json",
1903
- userFile: path.join(HOME, ".codeium", "windsurf", "mcp_config.json"),
1971
+ userFile: (() => {
1972
+ if (process.platform === "win32") {
1973
+ return path.join(
1974
+ HOME,
1975
+ "AppData",
1976
+ "Roaming",
1977
+ "Codeium",
1978
+ "Windsurf",
1979
+ "mcp_config.json"
1980
+ );
1981
+ }
1982
+ if (process.platform === "darwin") {
1983
+ return path.join(
1984
+ HOME,
1985
+ "Library",
1986
+ "Application Support",
1987
+ "Codeium",
1988
+ "Windsurf",
1989
+ "mcp_config.json"
1990
+ );
1991
+ }
1992
+ return path.join(HOME, ".codeium", "windsurf", "mcp_config.json");
1993
+ })(),
1904
1994
  key: "mcpServers",
1905
1995
  shape: "map"
1906
1996
  },
@@ -1913,7 +2003,7 @@ const getTargets = (home = os.homedir()) => {
1913
2003
  },
1914
2004
  [Agent.Roo]: {
1915
2005
  agent: Agent.Roo,
1916
- projectFile: ".roo/mcp.json",
2006
+ projectFile: ".roo/mcp_config.json",
1917
2007
  userFile: null,
1918
2008
  key: "mcpServers",
1919
2009
  shape: "map"
@@ -1924,6 +2014,64 @@ const getTargets = (home = os.homedir()) => {
1924
2014
  userFile: path.join(HOME, ".gemini", "settings.json"),
1925
2015
  key: "mcpServers",
1926
2016
  shape: "map"
2017
+ },
2018
+ [Agent.Copilot]: {
2019
+ agent: Agent.Copilot,
2020
+ projectFile: ".vscode/mcp.json",
2021
+ userFile: (() => {
2022
+ if (process.platform === "darwin") {
2023
+ return path.join(
2024
+ HOME,
2025
+ "Library",
2026
+ "Application Support",
2027
+ "Code",
2028
+ "User",
2029
+ "globalStorage",
2030
+ "github.copilot-chat",
2031
+ "mcp.json"
2032
+ );
2033
+ }
2034
+ if (process.platform === "win32") {
2035
+ return path.join(
2036
+ HOME,
2037
+ "AppData",
2038
+ "Roaming",
2039
+ "Code",
2040
+ "User",
2041
+ "globalStorage",
2042
+ "github.copilot-chat",
2043
+ "mcp.json"
2044
+ );
2045
+ }
2046
+ if (process.platform === "linux") {
2047
+ return path.join(
2048
+ HOME,
2049
+ ".config",
2050
+ "Code",
2051
+ "User",
2052
+ "globalStorage",
2053
+ "github.copilot-chat",
2054
+ "mcp.json"
2055
+ );
2056
+ }
2057
+ return null;
2058
+ })(),
2059
+ key: "servers",
2060
+ shape: "map"
2061
+ },
2062
+ [Agent.OpenCode]: {
2063
+ agent: Agent.OpenCode,
2064
+ projectFile: "opencode.json",
2065
+ userFile: path.join(HOME, ".config", "opencode", "opencode.json"),
2066
+ key: "mcp",
2067
+ shape: "map"
2068
+ },
2069
+ [Agent.OpenAI]: {
2070
+ agent: Agent.OpenAI,
2071
+ projectFile: ".codex/mcp.json",
2072
+ userFile: path.join(HOME, ".codex", "mcp.json"),
2073
+ key: "mcpServers",
2074
+ shape: "map"
1927
2075
  }
1928
2076
  };
1929
2077
  };
@@ -2649,7 +2797,7 @@ class IndexContentBuilder {
2649
2797
  "",
2650
2798
  "> [!IMPORTANT] PATH RESOLUTION (Cross-Platform)",
2651
2799
  "> Skill IDs in the list below (e.g., `[category/skill-name]`) represent the relative folder path.",
2652
- "> Because this project supports multiple AI agents, skills may reside in a base directory like `.gemini/skills/`, `.agent/skills/`, or `.cursor/skills/`.",
2800
+ "> Because this project supports multiple AI agents, skills may reside in a base directory like `.gemini/skills/`, `.agents/skills/`, or `.cursor/skills/`.",
2653
2801
  "> **Action:** You must prepend the correct base directory to the ID. (Example: If ID is `[flutter/cicd]`, the file is at `<BASE_DIR>/flutter/cicd/SKILL.md`). Use your file search tools (e.g., `list_directory` or `find`) if you are unsure of the base directory.",
2654
2802
  "",
2655
2803
  "| Trigger Type | What to match | Required Action |",
@@ -3896,16 +4044,21 @@ class SyncCommand {
3896
4044
  async runMcpPhase(config, options) {
3897
4045
  const mcp = config.mcp ?? defaultMcpConfig();
3898
4046
  const agents = config.agents ?? [];
3899
- if (!mcp.prompted) {
4047
+ if (!mcp.prompted || !mcp.enabled && mcp.prompted) {
3900
4048
  if (!process.stdin.isTTY && !options.yes) {
3901
- console.log(
3902
- pc.gray(
3903
- "\nℹ️ MCP integration not yet configured. Run `ags mcp enable` (or `ags mcp scope project`) when ready."
3904
- )
3905
- );
4049
+ if (!mcp.prompted) {
4050
+ console.log(
4051
+ pc.gray(
4052
+ "\nℹ️ MCP integration not yet configured. Run `ags mcp enable` (or `ags mcp scope project`) when ready."
4053
+ )
4054
+ );
4055
+ }
3906
4056
  return;
3907
4057
  }
3908
- const decided = await this.promptMcpConsent(options);
4058
+ const decided = await this.promptMcpConsent(
4059
+ options,
4060
+ mcp.prompted && !mcp.enabled
4061
+ );
3909
4062
  config.mcp = {
3910
4063
  enabled: decided.enabled,
3911
4064
  scope: decided.enabled ? decided.scope : "disabled",
@@ -3940,31 +4093,52 @@ class SyncCommand {
3940
4093
  console.log(`${tag} ${w.agent.padEnd(12)} ${pc.gray(w.file)}`);
3941
4094
  }
3942
4095
  for (const w of report.userWrites) {
3943
- console.log(` ${pc.green("+ wrote ")} ${w.agent.padEnd(12)} ${pc.gray(w.file)}`);
4096
+ console.log(
4097
+ ` ${pc.green("+ wrote ")} ${w.agent.padEnd(12)} ${pc.gray(w.file)}`
4098
+ );
3944
4099
  }
3945
4100
  for (const d of report.declined) {
3946
- console.log(` ${pc.gray("- ")} ${d.agent.padEnd(12)} ${pc.gray(d.file)} (declined)`);
4101
+ console.log(
4102
+ ` ${pc.gray("- ")} ${d.agent.padEnd(12)} ${pc.gray(d.file)} (declined)`
4103
+ );
3947
4104
  }
3948
4105
  if (report.snippets.length > 0) {
3949
4106
  console.log(
3950
- pc.gray(` ${report.snippets.length} snippet(s) written to ./mcp-config-snippets/`)
4107
+ pc.gray(
4108
+ ` ${report.snippets.length} snippet(s) written to ./mcp-config-snippets/`
4109
+ )
3951
4110
  );
3952
4111
  }
3953
4112
  if (report.unsupported.length > 0) {
3954
4113
  console.log(
3955
- pc.gray(` (skipped — no MCP support yet: ${report.unsupported.join(", ")})`)
4114
+ pc.gray(
4115
+ ` (skipped — no MCP support yet: ${report.unsupported.join(", ")})`
4116
+ )
3956
4117
  );
3957
4118
  }
3958
4119
  }
3959
- async promptMcpConsent(options) {
4120
+ async promptMcpConsent(options, wasDisabled = false) {
3960
4121
  if (options.yes) {
3961
4122
  return { enabled: true, scope: "project" };
3962
4123
  }
3963
4124
  console.log(pc.bold("\n🔌 MCP server setup\n"));
3964
- console.log("agent-skills-standard ships an optional MCP server that serves your skills");
4125
+ if (wasDisabled) {
4126
+ console.log(
4127
+ pc.yellow(
4128
+ "MCP integration is currently disabled. Would you like to enable it now?"
4129
+ )
4130
+ );
4131
+ }
4132
+ console.log(
4133
+ "agent-skills-standard ships an optional MCP server that serves your skills"
4134
+ );
3965
4135
  console.log("to AI agents at runtime. Quick comparison:\n");
3966
- console.log(pc.bold(" WITHOUT MCP:") + " sub-agents skip skill loading; no audit trail");
3967
- console.log(pc.bold(" WITH MCP: ") + " every sub-agent can call load_skills_for_files; auditable\n");
4136
+ console.log(
4137
+ pc.bold(" WITHOUT MCP:") + " sub-agents skip skill loading; no audit trail"
4138
+ );
4139
+ console.log(
4140
+ pc.bold(" WITH MCP: ") + " every sub-agent can call load_skills_for_files; auditable\n"
4141
+ );
3968
4142
  const decision = await inquirer.prompt([
3969
4143
  {
3970
4144
  type: "confirm",
@@ -3997,7 +4171,7 @@ class SyncCommand {
3997
4171
  return decision;
3998
4172
  }
3999
4173
  }
4000
- const version = "2.2.0";
4174
+ const version = "2.2.1";
4001
4175
  const pkg = {
4002
4176
  version
4003
4177
  };
@@ -4528,7 +4702,7 @@ dotenv.config();
4528
4702
  const program = new commander.Command();
4529
4703
  program.name("agent-skills-standard").description(
4530
4704
  "A CLI to manage and sync AI agent skills for Cursor, Claude, Copilot, Windsurf, and more."
4531
- ).version("2.2.0");
4705
+ ).version("2.2.1");
4532
4706
  program.command("init").description("Initialize a .skillsrc configuration file interactively").action(async () => {
4533
4707
  const init = new InitCommand();
4534
4708
  await init.run();