@kanunilabs/mcp 1.0.13 → 1.0.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/data/corpus.json +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -103,7 +103,7 @@ ${ez(t,e)}`}function uo(t){return t.replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").rep
|
|
|
103
103
|
|
|
104
104
|
[Page cut at ${i.toLocaleString("en-US")} of ${t.length.toLocaleString("en-US")} characters. Read the rest one section at a time: \`get_doc\` with id \`${e.id}\` and \`section\` set to one of: ${r.join(", ")}.]`}function YI(t){return t.length<=Vr?t:`${t.slice(0,Vr)}
|
|
105
105
|
|
|
106
|
-
[Cut at ${Vr} characters; narrow the request.]`}function Iy(t,e){let n=t.replace(/^v/,"").split(".").map(r=>parseInt(r,10)||0),i=e.replace(/^v/,"").split(".").map(r=>parseInt(r,10)||0);for(let r=0;r<Math.max(n.length,i.length);r++){let o=(n[r]??0)-(i[r]??0);if(o)return o}return 0}var Py="1.0.
|
|
106
|
+
[Cut at ${Vr} characters; narrow the request.]`}function Iy(t,e){let n=t.replace(/^v/,"").split(".").map(r=>parseInt(r,10)||0),i=e.replace(/^v/,"").split(".").map(r=>parseInt(r,10)||0);for(let r=0;r<Math.max(n.length,i.length);r++){let o=(n[r]??0)-(i[r]??0);if(o)return o}return 0}var Py="1.0.14",zy=qe.enum(["datagrid","pivotgrid"]).optional().describe("Limit to one product: `datagrid` (DataGrid) or `pivotgrid` (PivotGrid)."),ws={readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},Ss=t=>({content:[{type:"text",text:t}]});function tz(t){let e=new af(t),n=new rf({name:"kanunilabs",title:"KanuniLabs DataGrid & PivotGrid docs",version:Py},{instructions:e.instructions()});return n.registerTool("search_docs",{title:"Search the KanuniLabs docs",description:"Full-text search over the KanuniLabs DataGrid and PivotGrid guides and API reference. Returns page ids with the matching section; read a page with get_doc.",inputSchema:{query:qe.string().min(1).describe('What to look for, in words or as an identifier: "export to excel", "showColumnTotals".'),product:zy,kind:qe.enum(["guide","api"]).optional().describe("Only guide pages, or only API reference pages."),limit:qe.number().int().min(1).max(20).optional().describe("How many results (default 8).")},annotations:ws},async i=>Ss(e.search(i.query,{product:i.product,kind:i.kind,limit:i.limit}))),n.registerTool("get_doc",{title:"Read a docs page",description:"One page of the docs as Markdown, by its id (`/docs/pivotgrid/export`) or its kanunilabs.com URL. Long pages are cut at a heading; pass `section` to read one heading and what is under it.",inputSchema:{id:qe.string().min(1).describe("Page id from search_docs or list_docs, or the page URL."),section:qe.string().optional().describe('A heading on the page, e.g. "Column totals" or a member name.')},annotations:ws},async i=>Ss(e.get(i.id,i.section))),n.registerTool("get_api",{title:"Look up an exported symbol",description:"The API reference of one exported type, component, class or function by its exact name (`DataGridProps`, `PivotGridLayout`), or one member of it (`DataGridProps.columns`). A bare member name lists the symbols that have it. Use this to check a prop or option exists before writing it.",inputSchema:{name:qe.string().min(1).describe("`Symbol` or `Symbol.member`."),product:zy},annotations:ws},async i=>Ss(e.api(i.name,i.product))),n.registerTool("list_docs",{title:"Table of contents",description:"The products, their npm packages (free or paid) and versions, and either the guide pages in reading order or the exported API symbols of each package.",inputSchema:{product:zy,kind:qe.enum(["guide","api"]).optional().describe("`guide` (default) or `api`."),package:qe.string().optional().describe("With kind `api`: one npm package, e.g. `@kanunilabs/datagrid-react`.")},annotations:ws},async i=>Ss(e.list(i.product,i.kind??"guide",i.package))),n.registerTool("get_changes",{title:"Changes between versions",description:"Release notes of a product between two versions, starting with what an upgrading app must check or change. Without versions: every release.",inputSchema:{product:qe.enum(["datagrid","pivotgrid"]).describe("`datagrid` or `pivotgrid`."),from:qe.string().optional().describe('The version the app is on now (excluded), e.g. "1.5.0".'),to:qe.string().optional().describe("The version to upgrade to (included). Default: the newest."),upgrade_only:qe.boolean().optional().describe("Only the notes an upgrading app must read.")},annotations:ws},async i=>Ss(e.changes(i.product,i.from,i.to,i.upgrade_only??!1))),n}var wn=process.argv.slice(2);if(wn.includes("--version")||wn.includes("-v"))process.stdout.write(`${Py}
|
|
107
107
|
`);else if(wn.includes("--help")||wn.includes("-h"))process.stdout.write(["kanunilabs-mcp \u2014 KanuniLabs DataGrid and PivotGrid docs for AI coding assistants (MCP, stdio).","","Register it with your assistant, for example:"," claude mcp add kanunilabs -- npx -y @kanunilabs/mcp","","Copy the agent skill into this project (default .claude/skills/kanunilabs-grids):"," npx -y @kanunilabs/mcp install-skill [dir] [--force]","","Setup for other assistants: https://kanunilabs.com/docs/datagrid/ai-assistants",""].join(`
|
|
108
108
|
`));else if(wn[0]==="install-skill"){let t=wn.slice(1).find(e=>!e.startsWith("-"));try{let e=ox(new URL("../skill/kanunilabs-grids/SKILL.md",import.meta.url),t,{force:wn.includes("--force")});process.stdout.write(`${e}
|
|
109
109
|
`)}catch(e){process.stderr.write(`kanunilabs-mcp: ${e.message}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanunilabs/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "MCP server that gives AI coding assistants the KanuniLabs DataGrid and PivotGrid documentation and API reference. Runs locally over stdio; the docs ship inside the package, nothing is fetched.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "KanuniLabs <hello@kanunilabs.com> (https://www.kanunilabs.com)",
|