@yawlabs/ansible-mcp 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,7 +18,7 @@ Your checkout has `community.general 9.5.2`; the model's training data has whate
18
18
  - **Installed, not latest** -- the source of truth is `ansible-doc --json` run against your collections paths, with redirects (`ufw` -> `community.general.ufw`) and tombstones resolved.
19
19
  - **Checks what lint skips** -- `ansible-lint`'s `args` rule skips modules with action plugins (`copy`, `template`); `ansible_check_task_args` catches their unknown options and bad values, and says plainly which cross-option rules ansible-doc cannot express.
20
20
  - **YAML 1.1 aware** -- Ansible parses YAML 1.1, so unquoted `off` is `false` and `0755` is the integer 493. The server reads YAML the same way and says when that is probably a bug.
21
- - **Read-only by construction** -- configured vault password scripts never run (a server-owned dummy password file replaces them), script and plugin inventory sources are off by default, and play-level lookups are refused before Ansible parses a playbook.
21
+ - **Read-only by construction** -- configured vault password scripts never run (a server-owned dummy password file replaces them), script and plugin inventory sources are off by default, and play-level lookups are refused before Ansible parses a playbook (as is any playbook or lint target the pre-scan cannot fully read).
22
22
  - **Collection upgrade impact** -- downloads only the target version into its own cache and diffs the arg specs of the modules your tasks actually use, tied to file:line.
23
23
  - **macOS, Linux, and Windows through WSL** -- Ansible has no Windows control node; on Windows the server spawns it through `wsl.exe --exec` (no shell anywhere).
24
24
 
package/dist/index.js CHANGED
@@ -1915,10 +1915,16 @@ function extractTask(map, file, doc, extra = {}) {
1915
1915
  t.form = "kv";
1916
1916
  t.args = Object.entries(kv).map(([k, val]) => ({ name: k, line: v.line, value: val }));
1917
1917
  } else if (v.kind === "map") {
1918
- const mod = scalarString(get(v, "module"));
1918
+ const modNode = get(v, "module");
1919
+ const [mod, ...rest] = splitArgs(scalarString(modNode) ?? "");
1919
1920
  if (mod) t.action = mod;
1920
1921
  t.form = "dict";
1921
1922
  t.args = v.entries.filter((e) => e.key !== "module").map((e) => entryArg(e.key, e.keyLine, e.value));
1923
+ if (mod && rest.length > 0) {
1924
+ const kv = parseKv(rest.join(" "), isCheckRawAction(mod));
1925
+ t.args = t.args.filter((a) => !(a.name in kv));
1926
+ for (const [k, val] of Object.entries(kv)) t.args.push({ name: k, line: modNode.line, value: val });
1927
+ }
1922
1928
  }
1923
1929
  if (actions.length > 0) t.conflicting = [actionKw.key, ...actions.map((a) => a.key)];
1924
1930
  } else if (actions.length > 0) {
package/dist/server.js CHANGED
@@ -1914,10 +1914,16 @@ function extractTask(map, file, doc, extra = {}) {
1914
1914
  t.form = "kv";
1915
1915
  t.args = Object.entries(kv).map(([k, val]) => ({ name: k, line: v.line, value: val }));
1916
1916
  } else if (v.kind === "map") {
1917
- const mod = scalarString(get(v, "module"));
1917
+ const modNode = get(v, "module");
1918
+ const [mod, ...rest] = splitArgs(scalarString(modNode) ?? "");
1918
1919
  if (mod) t.action = mod;
1919
1920
  t.form = "dict";
1920
1921
  t.args = v.entries.filter((e) => e.key !== "module").map((e) => entryArg(e.key, e.keyLine, e.value));
1922
+ if (mod && rest.length > 0) {
1923
+ const kv = parseKv(rest.join(" "), isCheckRawAction(mod));
1924
+ t.args = t.args.filter((a) => !(a.name in kv));
1925
+ for (const [k, val] of Object.entries(kv)) t.args.push({ name: k, line: modNode.line, value: val });
1926
+ }
1921
1927
  }
1922
1928
  if (actions.length > 0) t.conflicting = [actionKw.key, ...actions.map((a) => a.key)];
1923
1929
  } else if (actions.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yawlabs/ansible-mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "mcpName": "io.github.YawLabs/ansible-mcp",
5
5
  "description": "Ansible MCP server for what is true in THIS checkout: installed module specs, task-argument checks, role interfaces, inventory (redacted), play structure, config, collection drift and collection-upgrade impact",
6
6
  "license": "MIT",