@visulima/vis-mcp 1.0.0-alpha.12 → 1.0.0-alpha.14

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/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ ## @visulima/vis-mcp [1.0.0-alpha.14](https://github.com/visulima/visulima/compare/@visulima/vis-mcp@1.0.0-alpha.13...@visulima/vis-mcp@1.0.0-alpha.14) (2026-05-26)
2
+
3
+ ### Miscellaneous Chores
4
+
5
+ * **ci-stability:** green CI across vis, native, lint, tests, attw ([#651](https://github.com/visulima/visulima/issues/651)) ([d4eb684](https://github.com/visulima/visulima/commit/d4eb684b5f75c818c9251048c605a0ed54a268e3))
6
+ * **repo:** apply eslint --fix and prettier --fix across packages ([#650](https://github.com/visulima/visulima/issues/650)) ([2e26a84](https://github.com/visulima/visulima/commit/2e26a84774f218f21345e9a8ecd68236b6542743)), closes [#620](https://github.com/visulima/visulima/issues/620)
7
+
8
+ ### Tests
9
+
10
+ * **repo:** cover bin entry points in dist integration suite ([7479ef1](https://github.com/visulima/visulima/commit/7479ef113cf5ccef25692619082afb1b6a0eecab))
11
+
12
+
13
+ ### Dependencies
14
+
15
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.26
16
+ * **@visulima/vis:** upgraded to 1.0.0-alpha.24
17
+
18
+ ## @visulima/vis-mcp [1.0.0-alpha.13](https://github.com/visulima/visulima/compare/@visulima/vis-mcp@1.0.0-alpha.12...@visulima/vis-mcp@1.0.0-alpha.13) (2026-05-20)
19
+
20
+
21
+ ### Dependencies
22
+
23
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.25
24
+ * **@visulima/vis:** upgraded to 1.0.0-alpha.23
25
+
1
26
  ## @visulima/vis-mcp [1.0.0-alpha.12](https://github.com/visulima/visulima/compare/@visulima/vis-mcp@1.0.0-alpha.11...@visulima/vis-mcp@1.0.0-alpha.12) (2026-05-19)
2
27
 
3
28
 
package/dist/bin.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{startMcpServer as t}from"./packem_shared/registerAllTools-BIzixHAA.js";try{await t()}catch(r){process.stderr.write(`[vis-mcp] failed to start: ${r instanceof Error?r.message:String(r)}
2
+ import{startMcpServer as t}from"./packem_shared/registerAllTools-yHHXxJYr.js";try{await t()}catch(r){process.stderr.write(`[vis-mcp] failed to start: ${r instanceof Error?r.message:String(r)}
3
3
  `),process.exit(1)}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{execVis as o,execVisJson as s}from"./packem_shared/execVis-BzS_F-9x.js";import{errorResponse as i,okResponse as p}from"./packem_shared/okResponse-DdzqnveW.js";import{createMcpServer as c,registerAllTools as f,startMcpServer as m}from"./packem_shared/registerAllTools-BIzixHAA.js";import{registerCacheHash as g}from"./packem_shared/registerCacheHash-CVckSIVO.js";import{registerCacheWhy as n}from"./packem_shared/registerCacheWhy-CMzL-Pg3.js";import{registerDescribeProject as h}from"./packem_shared/registerDescribeProject-Dhuzun-I.js";import{registerGetRunLogs as V}from"./packem_shared/registerGetRunLogs-BxkRfYZU.js";import{registerListProjects as T}from"./packem_shared/registerListProjects-C-AZj8RT.js";import{registerListTargets as k}from"./packem_shared/registerListTargets-Cq6bkF7O.js";import{isValidRunId as v,isValidTaskId as C}from"./packem_shared/isValidRunId-BKsKMWQf.js";export{c as createMcpServer,i as errorResponse,o as execVis,s as execVisJson,v as isValidRunId,C as isValidTaskId,p as okResponse,f as registerAllTools,g as registerCacheHash,n as registerCacheWhy,h as registerDescribeProject,V as registerGetRunLogs,T as registerListProjects,k as registerListTargets,m as startMcpServer};
1
+ import{execVis as o,execVisJson as s}from"./packem_shared/execVis-BzS_F-9x.js";import{errorResponse as i,okResponse as p}from"./packem_shared/okResponse-DdzqnveW.js";import{createMcpServer as c,registerAllTools as f,startMcpServer as m}from"./packem_shared/registerAllTools-yHHXxJYr.js";import{registerCacheHash as g}from"./packem_shared/registerCacheHash-CVckSIVO.js";import{registerCacheWhy as n}from"./packem_shared/registerCacheWhy-CMzL-Pg3.js";import{registerDescribeProject as h}from"./packem_shared/registerDescribeProject-Dhuzun-I.js";import{registerGetRunLogs as V}from"./packem_shared/registerGetRunLogs-BxkRfYZU.js";import{registerListProjects as T}from"./packem_shared/registerListProjects-C-AZj8RT.js";import{registerListTargets as k}from"./packem_shared/registerListTargets-Cq6bkF7O.js";import{isValidRunId as v,isValidTaskId as C}from"./packem_shared/isValidRunId-BKsKMWQf.js";export{c as createMcpServer,i as errorResponse,o as execVis,s as execVisJson,v as isValidRunId,C as isValidTaskId,p as okResponse,f as registerAllTools,g as registerCacheHash,n as registerCacheWhy,h as registerDescribeProject,V as registerGetRunLogs,T as registerListProjects,k as registerListTargets,m as startMcpServer};
@@ -0,0 +1,3 @@
1
+ var b=Object.defineProperty;var n=(t,r)=>b(t,"name",{value:r,configurable:!0});import{readFile as w}from"node:fs/promises";import{createRequire as y}from"node:module";import{resolve as g,dirname as h}from"node:path";import{pathToFileURL as k,fileURLToPath as S}from"node:url";import{McpServer as j}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as O}from"@modelcontextprotocol/sdk/server/stdio.js";import{findUp as R}from"@visulima/fs";import*as e from"zod";import{execVisJson as p}from"./execVis-BzS_F-9x.js";import{okResponse as m,errorResponse as u}from"./okResponse-DdzqnveW.js";import{registerCacheHash as T}from"./registerCacheHash-CVckSIVO.js";import{registerCacheWhy as P}from"./registerCacheWhy-CMzL-Pg3.js";import{registerDescribeProject as V}from"./registerDescribeProject-Dhuzun-I.js";import{registerGetRunLogs as A}from"./registerGetRunLogs-BxkRfYZU.js";import{registerListProjects as _}from"./registerListProjects-C-AZj8RT.js";import{registerListTargets as B}from"./registerListTargets-Cq6bkF7O.js";var I=Object.defineProperty,C=n((t,r)=>I(t,"name",{value:r,configurable:!0}),"a$1");const D=e.object({advisoryCount:e.number(),lastSyncIso:e.string(),manifestEtag:e.string().nullable(),name:e.string()}),L=e.object({dbPath:e.string(),ecosystems:e.array(D),exists:e.boolean(),schemaVersion:e.number(),sizeBytes:e.number()}).catchall(e.unknown()),M=C(({server:t},r)=>{t.registerTool("advisory_status",{annotations:{readOnlyHint:!0},description:"Report the local OSV advisory DB freshness via `vis advisories status --format json`: DB path, schema version, per-ecosystem advisory counts, last sync timestamp, and ETag. Use this to detect whether the offline cache is stale before running an `audit` in offline mode.",inputSchema:{db:e.string().min(1).optional().describe("Override the cache DB path (default: <cache>/vis/advisories/db.sqlite).")}},async s=>{try{const a=["advisories","status","--format","json"];s.db!==void 0&&a.push("--db",s.db);const i=await p(r.visBin,a,{cwd:r.workspaceRoot}),o=L.parse(i);return m(o)}catch(a){return u(a)}})},"registerAdvisoryStatus");var E=Object.defineProperty,q=n((t,r)=>E(t,"name",{value:r,configurable:!0}),"a");const U=e.object({fixedVersions:e.array(e.string()).optional(),id:e.string(),severity:e.string(),summary:e.string().optional()}),$=e.object({acceptedRisk:e.unknown().optional(),name:e.string(),socketAlerts:e.array(e.unknown()).optional(),socketScore:e.number().nullable().optional(),version:e.string(),vulnerabilities:e.array(U)}),x=e.object({duplicates:e.array(e.object({name:e.string(),versionCount:e.number(),versions:e.array(e.string())})),packages:e.number(),results:e.array($),summary:e.object({accepted:e.number(),duplicatePackages:e.number(),issues:e.number(),total:e.number()})}).catchall(e.unknown()),H=["low","medium","high","critical"],F=q(({server:t},r)=>{t.registerTool("audit",{annotations:{readOnlyHint:!0},description:"Audit installed packages for known vulnerabilities and supply-chain risk via `vis audit --format json`. Defaults to the local offline OSV cache when one exists, otherwise falls back to the live OSV API. Returns the parsed audit payload (results, duplicates, summary).",inputSchema:{ecosystem:e.string().optional().describe("Comma-separated OSV ecosystems to scan. Defaults to 'npm' (the only matcher wired today)."),offline:e.boolean().optional().describe("Force the local OSV cache. Errors if the cache is missing — run `vis advisories sync` first."),prodOnly:e.boolean().optional().describe("Skip devDependencies — scan the production graph only."),severity:e.enum(H).optional().describe("Minimum severity to report. Defaults to 'low'."),showAccepted:e.boolean().optional().describe("Include findings already on the workspace's accepted-risk list."),usage:e.boolean().optional().describe("Apply the reachability filter — only report vulnerabilities in statically-imported packages.")}},async s=>{try{const a=["audit","--format","json"];s.severity&&a.push("--severity",s.severity),s.offline&&a.push("--offline"),s.prodOnly&&a.push("--prod-only"),s.usage&&a.push("--usage"),s.ecosystem&&a.push("--ecosystem",s.ecosystem),s.showAccepted&&a.push("--show-accepted");const i=await p(r.visBin,a,{cwd:r.workspaceRoot}),o=x.parse(i);return m(o)}catch(a){return u(a)}})},"registerAudit");var J=Object.defineProperty,N=n((t,r)=>J(t,"name",{value:r,configurable:!0}),"r");const W=N(({server:t},r)=>{t.registerTool("describe_template",{annotations:{readOnlyHint:!0},description:"Return full metadata for a scaffolding template: description, default destination, and the variable schema (name, type, default, required, prompt, enum values). Use this before suggesting a `vis generate` command so option values can be filled correctly.",inputSchema:{name:e.string().describe('Template name (e.g. "package", "component"). Use list_templates to see available names.')}},async({name:s})=>{try{const a=await p(r.visBin,["generate",s,"--describe","--json"],{cwd:r.workspaceRoot});return m(a)}catch(a){return u(a)}})},"registerDescribeTemplate");var z=Object.defineProperty,G=n((t,r)=>z(t,"name",{value:r,configurable:!0}),"n");const K=G(({server:t},r)=>{t.registerTool("list_templates",{annotations:{readOnlyHint:!0},description:"List scaffolding templates discovered in the workspace (`.vis/templates/`, `.moon/templates/`, and `vis.config.ts` `generator.templates`). Each entry includes name, source, on-disk path, and one-line description.",inputSchema:{}},async()=>{try{const s=await p(r.visBin,["generate","--list","--json"],{cwd:r.workspaceRoot});return m({count:s.length,templates:s})}catch(s){return u(s)}})},"registerListTemplates");var Q=Object.defineProperty,c=n((t,r)=>Q(t,"name",{value:r,configurable:!0}),"s");const X=c(t=>{const r=process.env.VIS_MCP_VIS_BIN;if(r)return g(r);const s=[{label:t,require:y(k(`${t}/package.json`))},{label:"vis-mcp install location",require:y(import.meta.url)}],a=[];let i,o;for(const{label:d,require:l}of s)try{i=l.resolve("@visulima/vis/package.json"),o=l("@visulima/vis/package.json");break}catch(v){a.push({error:v,label:d})}if(!i||!o){const d=a.at(-1)?.error,l=a.map(v=>v.label).join(", ");throw new Error(`Cannot resolve \`@visulima/vis\` (tried: ${l}). Install it as a workspace dependency, or set VIS_MCP_VIS_BIN to a vis CLI path.`,{cause:d})}const f=typeof o.bin=="string"?o.bin:o.bin?.vis;if(!f)throw new Error("`@visulima/vis` is installed but does not declare a `vis` bin entry — install a current version.");return g(h(i),f)},"resolveVisBin"),Y=c(async()=>{try{const t=await R("package.json",{cwd:h(S(import.meta.url))});return t?JSON.parse(await w(t,"utf8")).version??"0.0.0":"0.0.0"}catch(t){return process.stderr.write(`[vis-mcp] failed to read package.json: ${t instanceof Error?t.message:String(t)}
2
+ `),"0.0.0"}},"loadVersion"),Z=c((t,r)=>{_(t,r),V(t,r),B(t,r),K(t,r),W(t,r),A(t,r),P(t,r),T(t,r),F(t,r),M(t,r)},"registerAllTools"),ee=c(async t=>{const r=new j({name:"vis",version:await Y()}),s={server:r};return Z(s,t),{deps:s,server:r}},"createMcpServer"),ge=c(async()=>{const t=process.env.VIS_MCP_WORKSPACE_ROOT??process.cwd(),r={visBin:X(t),workspaceRoot:t},{server:s}=await ee(r);await s.connect(new O),process.stderr.write(`[vis-mcp] ready (workspace: ${r.workspaceRoot})
3
+ `)},"startMcpServer");export{ee as createMcpServer,Z as registerAllTools,ge as startMcpServer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/vis-mcp",
3
- "version": "1.0.0-alpha.12",
3
+ "version": "1.0.0-alpha.14",
4
4
  "description": "MCP (Model Context Protocol) server for @visulima/vis — exposes vis tooling to AI agents over stdio",
5
5
  "keywords": [
6
6
  "agent",
@@ -57,12 +57,12 @@
57
57
  ],
58
58
  "dependencies": {
59
59
  "@modelcontextprotocol/sdk": "^1.29.0",
60
- "@visulima/fs": "5.0.0-alpha.24",
60
+ "@visulima/fs": "5.0.0-alpha.26",
61
61
  "@visulima/path": "3.0.0-alpha.10",
62
62
  "zod": "4.4.3"
63
63
  },
64
64
  "peerDependencies": {
65
- "@visulima/vis": "1.0.0-alpha.22"
65
+ "@visulima/vis": "1.0.0-alpha.24"
66
66
  },
67
67
  "engines": {
68
68
  "node": "^22.14.0 || >=24.10.0"
@@ -1,3 +0,0 @@
1
- var y=Object.defineProperty;var n=(t,r)=>y(t,"name",{value:r,configurable:!0});import{readFile as g}from"node:fs/promises";import{createRequire as f}from"node:module";import{resolve as u,dirname as d}from"node:path";import{pathToFileURL as h,fileURLToPath as b}from"node:url";import{McpServer as w}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as k}from"@modelcontextprotocol/sdk/server/stdio.js";import{findUp as S}from"@visulima/fs";import*as e from"zod";import{execVisJson as l}from"./execVis-BzS_F-9x.js";import{okResponse as p,errorResponse as m}from"./okResponse-DdzqnveW.js";import{registerCacheHash as j}from"./registerCacheHash-CVckSIVO.js";import{registerCacheWhy as O}from"./registerCacheWhy-CMzL-Pg3.js";import{registerDescribeProject as R}from"./registerDescribeProject-Dhuzun-I.js";import{registerGetRunLogs as T}from"./registerGetRunLogs-BxkRfYZU.js";import{registerListProjects as P}from"./registerListProjects-C-AZj8RT.js";import{registerListTargets as V}from"./registerListTargets-Cq6bkF7O.js";var A=Object.defineProperty,_=n((t,r)=>A(t,"name",{value:r,configurable:!0}),"a$1");const B=e.object({advisoryCount:e.number(),lastSyncIso:e.string(),manifestEtag:e.string().nullable(),name:e.string()}),I=e.object({dbPath:e.string(),ecosystems:e.array(B),exists:e.boolean(),schemaVersion:e.number(),sizeBytes:e.number()}).catchall(e.unknown()),C=_(({server:t},r)=>{t.registerTool("advisory_status",{annotations:{readOnlyHint:!0},description:"Report the local OSV advisory DB freshness via `vis advisories status --format json`: DB path, schema version, per-ecosystem advisory counts, last sync timestamp, and ETag. Use this to detect whether the offline cache is stale before running an `audit` in offline mode.",inputSchema:{db:e.string().min(1).optional().describe("Override the cache DB path (default: <cache>/vis/advisories/db.sqlite).")}},async s=>{try{const a=["advisories","status","--format","json"];s.db!==void 0&&a.push("--db",s.db);const o=await l(r.visBin,a,{cwd:r.workspaceRoot}),i=I.parse(o);return p(i)}catch(a){return m(a)}})},"registerAdvisoryStatus");var D=Object.defineProperty,L=n((t,r)=>D(t,"name",{value:r,configurable:!0}),"a");const M=e.object({fixedVersions:e.array(e.string()).optional(),id:e.string(),severity:e.string(),summary:e.string().optional()}),E=e.object({acceptedRisk:e.unknown().optional(),name:e.string(),socketAlerts:e.array(e.unknown()).optional(),socketScore:e.number().nullable().optional(),version:e.string(),vulnerabilities:e.array(M)}),$=e.object({duplicates:e.array(e.object({name:e.string(),versionCount:e.number(),versions:e.array(e.string())})),packages:e.number(),results:e.array(E),summary:e.object({accepted:e.number(),duplicatePackages:e.number(),issues:e.number(),total:e.number()})}).catchall(e.unknown()),U=["low","medium","high","critical"],x=L(({server:t},r)=>{t.registerTool("audit",{annotations:{readOnlyHint:!0},description:"Audit installed packages for known vulnerabilities and supply-chain risk via `vis audit --format json`. Defaults to the local offline OSV cache when one exists, otherwise falls back to the live OSV API. Returns the parsed audit payload (results, duplicates, summary).",inputSchema:{ecosystem:e.string().optional().describe("Comma-separated OSV ecosystems to scan. Defaults to 'npm' (the only matcher wired today)."),offline:e.boolean().optional().describe("Force the local OSV cache. Errors if the cache is missing — run `vis advisories sync` first."),prodOnly:e.boolean().optional().describe("Skip devDependencies — scan the production graph only."),severity:e.enum(U).optional().describe("Minimum severity to report. Defaults to 'low'."),showAccepted:e.boolean().optional().describe("Include findings already on the workspace's accepted-risk list."),usage:e.boolean().optional().describe("Apply the reachability filter — only report vulnerabilities in statically-imported packages.")}},async s=>{try{const a=["audit","--format","json"];s.severity&&a.push("--severity",s.severity),s.offline&&a.push("--offline"),s.prodOnly&&a.push("--prod-only"),s.usage&&a.push("--usage"),s.ecosystem&&a.push("--ecosystem",s.ecosystem),s.showAccepted&&a.push("--show-accepted");const o=await l(r.visBin,a,{cwd:r.workspaceRoot}),i=$.parse(o);return p(i)}catch(a){return m(a)}})},"registerAudit");var H=Object.defineProperty,q=n((t,r)=>H(t,"name",{value:r,configurable:!0}),"r");const F=q(({server:t},r)=>{t.registerTool("describe_template",{annotations:{readOnlyHint:!0},description:"Return full metadata for a scaffolding template: description, default destination, and the variable schema (name, type, default, required, prompt, enum values). Use this before suggesting a `vis generate` command so option values can be filled correctly.",inputSchema:{name:e.string().describe('Template name (e.g. "package", "component"). Use list_templates to see available names.')}},async({name:s})=>{try{const a=await l(r.visBin,["generate",s,"--describe","--json"],{cwd:r.workspaceRoot});return p(a)}catch(a){return m(a)}})},"registerDescribeTemplate");var N=Object.defineProperty,J=n((t,r)=>N(t,"name",{value:r,configurable:!0}),"n");const W=J(({server:t},r)=>{t.registerTool("list_templates",{annotations:{readOnlyHint:!0},description:"List scaffolding templates discovered in the workspace (`.vis/templates/`, `.moon/templates/`, and `vis.config.ts` `generator.templates`). Each entry includes name, source, on-disk path, and one-line description.",inputSchema:{}},async()=>{try{const s=await l(r.visBin,["generate","--list","--json"],{cwd:r.workspaceRoot});return p({count:s.length,templates:s})}catch(s){return m(s)}})},"registerListTemplates");var z=Object.defineProperty,c=n((t,r)=>z(t,"name",{value:r,configurable:!0}),"s");const G=c(t=>{const r=process.env.VIS_MCP_VIS_BIN;if(r)return u(r);const s=f(h(`${t}/package.json`));let a,o;try{a=s.resolve("@visulima/vis/package.json"),o=s("@visulima/vis/package.json")}catch(v){throw new Error(`Cannot resolve \`@visulima/vis\` from ${t}. Install it as a workspace dependency, or set VIS_MCP_VIS_BIN to a vis CLI path.`,{cause:v})}const i=typeof o.bin=="string"?o.bin:o.bin?.vis;if(!i)throw new Error("`@visulima/vis` is installed but does not declare a `vis` bin entry — install a current version.");return u(d(a),i)},"resolveVisBin"),K=c(async()=>{try{const t=await S("package.json",{cwd:d(b(import.meta.url))});return t?JSON.parse(await g(t,"utf8")).version??"0.0.0":"0.0.0"}catch(t){return process.stderr.write(`[vis-mcp] failed to read package.json: ${t instanceof Error?t.message:String(t)}
2
- `),"0.0.0"}},"loadVersion"),Q=c((t,r)=>{P(t,r),R(t,r),V(t,r),W(t,r),F(t,r),T(t,r),O(t,r),j(t,r),x(t,r),C(t,r)},"registerAllTools"),X=c(async t=>{const r=new w({name:"vis",version:await K()}),s={server:r};return Q(s,t),{deps:s,server:r}},"createMcpServer"),ve=c(async()=>{const t=process.env.VIS_MCP_WORKSPACE_ROOT??process.cwd(),r={visBin:G(t),workspaceRoot:t},{server:s}=await X(r);await s.connect(new k),process.stderr.write(`[vis-mcp] ready (workspace: ${r.workspaceRoot})
3
- `)},"startMcpServer");export{X as createMcpServer,Q as registerAllTools,ve as startMcpServer};