nimai-mcp 0.4.3 → 0.4.5
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/contract.d.ts.map +1 -1
- package/dist/contract.js +13 -5
- package/dist/contract.js.map +1 -1
- package/dist/tools/spec-review.d.ts.map +1 -1
- package/dist/tools/spec-review.js +9 -5
- package/dist/tools/spec-review.js.map +1 -1
- package/package.json +11 -10
- package/LICENSE +0 -21
package/dist/contract.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAIzD,eAAO,MAAM,cAAc;;;;;;;;;EAGzB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;EAE7B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;EAExB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAIH,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,oDAAoD;IACpD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7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AAE,MAAM,CAAC;IACb,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAID,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEnB,CAAC"}
|
package/dist/contract.js
CHANGED
|
@@ -39,9 +39,12 @@ exports.TOOL_DESCRIPTORS = {
|
|
|
39
39
|
name: 'nimai_spec',
|
|
40
40
|
description: 'Returns a populated FORGE Self-Spec Agent prompt (Prompt 1) plus extracted repo context. ' +
|
|
41
41
|
'The host model uses this bundle to fill a draft spec — no LLM call is made inside this tool. ' +
|
|
42
|
+
'IMPORTANT: repoPath must be the specific project directory you are writing the spec for — not a parent directory, home directory, or workspace root. ' +
|
|
42
43
|
'Also returns existing_specs: paths of nimai-managed spec files already in the repo. ' +
|
|
43
44
|
'If existing_specs is empty, you MUST call nimai_new immediately as the next action (no asking, no narration), then fill it using the returned prompt. ' +
|
|
44
|
-
'If existing_specs is non-empty,
|
|
45
|
+
'If existing_specs is non-empty, inspect each path: if one is clearly for this same feature/request, fill it. ' +
|
|
46
|
+
'If none are relevant (different project, different domain, different feature), treat as greenfield — call nimai_new and fill the new file instead. ' +
|
|
47
|
+
'Never update an existing spec file that belongs to a different feature or project. ' +
|
|
45
48
|
'After filling: call nimai_validate. ' +
|
|
46
49
|
'After nimai_validate passes, tell the user to open a fresh reviewer session and ask it to call nimai_spec_review. The builder must not perform the review in the same session. ' +
|
|
47
50
|
'Scope boundary: this tool produces spec prompts/contracts only. ' +
|
|
@@ -61,10 +64,15 @@ exports.TOOL_DESCRIPTORS = {
|
|
|
61
64
|
description: 'Lints a spec file for unresolved placeholder fields (___), [NEEDS HUMAN INPUT] flags, ' +
|
|
62
65
|
'missing required sections, and pre-checked acceptance criteria. Returns structured issues and a pass/fail result. ' +
|
|
63
66
|
'Run this after filling a spec and again after every fix. ' +
|
|
64
|
-
'If passed: true, output
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
'
|
|
67
|
+
'If passed: true, output the following to the user as a clearly separated block — ' +
|
|
68
|
+
'use a blank line before and after, and format the instruction as a distinct visual section:\n\n' +
|
|
69
|
+
'✅ Spec passed validation.\n\n' +
|
|
70
|
+
'--- REVIEWER HANDOFF ---\n' +
|
|
71
|
+
'Open a fresh reviewer session and give it this instruction:\n\n' +
|
|
72
|
+
' Please call nimai_spec_review({ specPath: \'<ACTUAL PATH>\' })\n' +
|
|
73
|
+
' and evaluate the result.\n\n' +
|
|
74
|
+
'------------------------\n\n' +
|
|
75
|
+
'Replace <ACTUAL PATH> with the exact specPath that was validated. Do not use a placeholder. ' +
|
|
68
76
|
'The builder must not call nimai_spec_review itself.',
|
|
69
77
|
inputSchema: exports.ForgeValidateInput,
|
|
70
78
|
},
|
package/dist/contract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,6BAAwB;AAGxB,iFAAiF;AAEpE,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IACrE,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8CAA8C,CAAC;CACpF,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;CACzE,CAAC,CAAC;AAEU,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CA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WAAW,EACT,0DAA0D;YAC1D,6EAA6E;YAC7E,yDAAyD;YACzD,yDAAyD;YACzD,+GAA+G;YAC/G,kFAAkF;YAClF,uEAAuE;YACvE,sFAAsF;YACtF,wEAAwE;YACxE,qKAAqK;YACrK,wEAAwE;QAC1E,WAAW,EAAE,4BAAoB;KAClC;CACO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-review.d.ts","sourceRoot":"","sources":["../../src/tools/spec-review.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wBAAsB,cAAc,CAClC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,GAC1C,OAAO,CAAC,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"spec-review.d.ts","sourceRoot":"","sources":["../../src/tools/spec-review.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wBAAsB,cAAc,CAClC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,GAC1C,OAAO,CAAC,qBAAqB,CAAC,CAyBhC"}
|
|
@@ -47,11 +47,15 @@ async function toolSpecReview(input) {
|
|
|
47
47
|
throw new Error(`Cannot read spec at "${specPath}": ${err.message}`);
|
|
48
48
|
}
|
|
49
49
|
const specReviewerPrompt = (0, nimai_core_1.buildPrompt15)(specContent);
|
|
50
|
-
const reviewer_instructions = `Open a fresh reviewer session with nimai-mcp configured.\n` +
|
|
51
|
-
`
|
|
52
|
-
|
|
53
|
-
`
|
|
54
|
-
`
|
|
50
|
+
const reviewer_instructions = `Open a fresh reviewer session with nimai-mcp configured.\n\n` +
|
|
51
|
+
`Give it this instruction:\n\n` +
|
|
52
|
+
`---\n\n` +
|
|
53
|
+
`Please call nimai_spec_review({ specPath: '${specPath}' }) and evaluate the result.\n\n` +
|
|
54
|
+
`The spec content is already embedded in the returned specReviewerPrompt — use that prompt to evaluate the spec. Do not read the spec file separately.\n\n` +
|
|
55
|
+
`Return a verdict JSON block at the end of your response:\n` +
|
|
56
|
+
`{"passed": true/false, "schema_version": "2", "issues": [...]}\n\n` +
|
|
57
|
+
`---\n\n` +
|
|
58
|
+
`If the reviewer session does not have nimai-mcp available, paste the following prompt directly:\n\n\`\`\`\n${specReviewerPrompt}\n\`\`\``;
|
|
55
59
|
return { specReviewerPrompt, reviewer_instructions };
|
|
56
60
|
}
|
|
57
61
|
//# sourceMappingURL=spec-review.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-review.js","sourceRoot":"","sources":["../../src/tools/spec-review.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,
|
|
1
|
+
{"version":3,"file":"spec-review.js","sourceRoot":"","sources":["../../src/tools/spec-review.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wCA2BC;AAjCD,uCAAyB;AACzB,2CAA6B;AAC7B,2CAA2C;AAIpC,KAAK,UAAU,cAAc,CAClC,KAA2C;IAE3C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,WAAmB,CAAC;IACxB,IAAI,CAAC;QACH,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,wBAAwB,QAAQ,MAAO,GAA6B,CAAC,OAAO,EAAE,CAC/E,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,GAAG,IAAA,0BAAa,EAAC,WAAW,CAAC,CAAC;IAEtD,MAAM,qBAAqB,GACzB,8DAA8D;QAC9D,+BAA+B;QAC/B,SAAS;QACT,8CAA8C,QAAQ,mCAAmC;QACzF,2JAA2J;QAC3J,4DAA4D;QAC5D,oEAAoE;QACpE,SAAS;QACT,8GAA8G,kBAAkB,UAAU,CAAC;IAE7I,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,CAAC;AACvD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nimai-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "Nimai MCP server — exposes nimai_spec, nimai_review, nimai_validate, nimai_new, nimai_spec_review as tools. No internal LLM calls.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nimai",
|
|
@@ -28,20 +28,21 @@
|
|
|
28
28
|
"bin": {
|
|
29
29
|
"nimai-mcp": "dist/index.js"
|
|
30
30
|
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc",
|
|
33
|
+
"prepublishOnly": "tsc",
|
|
34
|
+
"test": "vitest run",
|
|
35
|
+
"dev": "tsc --watch",
|
|
36
|
+
"clean": "rm -rf dist"
|
|
37
|
+
},
|
|
31
38
|
"devDependencies": {
|
|
32
39
|
"@types/node": "^22.0.0",
|
|
33
40
|
"typescript": "^5.4.5",
|
|
34
41
|
"vitest": "^1.6.0"
|
|
35
42
|
},
|
|
36
43
|
"dependencies": {
|
|
44
|
+
"nimai-core": "workspace:*",
|
|
37
45
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
38
|
-
"zod": "^3.23.8"
|
|
39
|
-
"nimai-core": "0.4.3"
|
|
40
|
-
},
|
|
41
|
-
"scripts": {
|
|
42
|
-
"build": "tsc",
|
|
43
|
-
"test": "vitest run",
|
|
44
|
-
"dev": "tsc --watch",
|
|
45
|
-
"clean": "rm -rf dist"
|
|
46
|
+
"zod": "^3.23.8"
|
|
46
47
|
}
|
|
47
|
-
}
|
|
48
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Balagopalaji
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|