kibi-mcp 0.3.3 → 0.5.0
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/diagnostics.js +28 -0
- package/dist/server/docs.js +22 -6
- package/dist/server/tools.js +29 -1
- package/dist/tools/check.js +27 -30
- package/dist/tools/core-module.js +85 -0
- package/dist/tools/coverage.js +28 -0
- package/dist/tools/entity-query.js +111 -0
- package/dist/tools/find-gaps.js +29 -0
- package/dist/tools/graph.js +27 -0
- package/dist/tools/prolog-list.js +1 -43
- package/dist/tools/query.js +4 -109
- package/dist/tools/search.js +37 -0
- package/dist/tools/status.js +20 -0
- package/dist/tools/symbols.js +4 -1
- package/dist/tools/upsert.js +151 -34
- package/dist/tools-config.js +169 -2
- package/package.json +3 -3
package/dist/tools-config.js
CHANGED
|
@@ -64,9 +64,175 @@ const BASE_TOOLS = [
|
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
|
+
{
|
|
68
|
+
name: "kb_search",
|
|
69
|
+
description: "Search KB entities for discovery using metadata and markdown body text. Use for exploratory lookup before exact follow-up with kb_query. No mutation side effects.",
|
|
70
|
+
inputSchema: {
|
|
71
|
+
type: "object",
|
|
72
|
+
required: ["query"],
|
|
73
|
+
properties: {
|
|
74
|
+
query: {
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "Free-text query for metadata and markdown body discovery. Example: 'OAuth login flow'.",
|
|
77
|
+
},
|
|
78
|
+
type: {
|
|
79
|
+
type: "string",
|
|
80
|
+
enum: [
|
|
81
|
+
"req",
|
|
82
|
+
"scenario",
|
|
83
|
+
"test",
|
|
84
|
+
"adr",
|
|
85
|
+
"flag",
|
|
86
|
+
"event",
|
|
87
|
+
"symbol",
|
|
88
|
+
"fact",
|
|
89
|
+
],
|
|
90
|
+
description: "Optional entity type filter to narrow discovery. Example: 'req'.",
|
|
91
|
+
},
|
|
92
|
+
limit: {
|
|
93
|
+
type: "integer",
|
|
94
|
+
default: 20,
|
|
95
|
+
description: "Optional max rows to return after ranking. Default: 20.",
|
|
96
|
+
},
|
|
97
|
+
offset: {
|
|
98
|
+
type: "integer",
|
|
99
|
+
default: 0,
|
|
100
|
+
description: "Optional zero-based pagination offset. Default: 0.",
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "kb_status",
|
|
107
|
+
description: "Report current branch, snapshot, and freshness metadata for the attached KB. Read-only status inspection with no mutation side effects.",
|
|
108
|
+
inputSchema: {
|
|
109
|
+
type: "object",
|
|
110
|
+
properties: {},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "kb_find_gaps",
|
|
115
|
+
description: "Run bulk missing/present relationship analysis over KB entities. Use for questions like which requirements lack scenarios or tests. No mutation side effects.",
|
|
116
|
+
inputSchema: {
|
|
117
|
+
type: "object",
|
|
118
|
+
properties: {
|
|
119
|
+
type: {
|
|
120
|
+
type: "string",
|
|
121
|
+
enum: [
|
|
122
|
+
"req",
|
|
123
|
+
"scenario",
|
|
124
|
+
"test",
|
|
125
|
+
"adr",
|
|
126
|
+
"flag",
|
|
127
|
+
"event",
|
|
128
|
+
"symbol",
|
|
129
|
+
"fact",
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
missingRelationships: {
|
|
133
|
+
type: "array",
|
|
134
|
+
items: { type: "string" },
|
|
135
|
+
},
|
|
136
|
+
presentRelationships: {
|
|
137
|
+
type: "array",
|
|
138
|
+
items: { type: "string" },
|
|
139
|
+
},
|
|
140
|
+
tags: {
|
|
141
|
+
type: "array",
|
|
142
|
+
items: { type: "string" },
|
|
143
|
+
},
|
|
144
|
+
sourceFile: {
|
|
145
|
+
type: "string",
|
|
146
|
+
},
|
|
147
|
+
limit: {
|
|
148
|
+
type: "integer",
|
|
149
|
+
default: 100,
|
|
150
|
+
},
|
|
151
|
+
offset: {
|
|
152
|
+
type: "integer",
|
|
153
|
+
default: 0,
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "kb_coverage",
|
|
160
|
+
description: "Generate curated coverage reports for requirements, symbols, or grouped types. Read-only reporting with no mutation side effects.",
|
|
161
|
+
inputSchema: {
|
|
162
|
+
type: "object",
|
|
163
|
+
properties: {
|
|
164
|
+
by: {
|
|
165
|
+
type: "string",
|
|
166
|
+
enum: ["req", "symbol", "type"],
|
|
167
|
+
default: "req",
|
|
168
|
+
},
|
|
169
|
+
tags: {
|
|
170
|
+
type: "array",
|
|
171
|
+
items: { type: "string" },
|
|
172
|
+
},
|
|
173
|
+
includePassing: {
|
|
174
|
+
type: "boolean",
|
|
175
|
+
default: false,
|
|
176
|
+
},
|
|
177
|
+
includeTransitive: {
|
|
178
|
+
type: "boolean",
|
|
179
|
+
default: true,
|
|
180
|
+
},
|
|
181
|
+
limit: {
|
|
182
|
+
type: "integer",
|
|
183
|
+
default: 100,
|
|
184
|
+
},
|
|
185
|
+
offset: {
|
|
186
|
+
type: "integer",
|
|
187
|
+
default: 0,
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: "kb_graph",
|
|
194
|
+
description: "Run bounded graph traversal from one or more seed IDs across curated relationship types. No mutation side effects.",
|
|
195
|
+
inputSchema: {
|
|
196
|
+
type: "object",
|
|
197
|
+
required: ["seedIds"],
|
|
198
|
+
properties: {
|
|
199
|
+
seedIds: {
|
|
200
|
+
type: "array",
|
|
201
|
+
items: { type: "string" },
|
|
202
|
+
},
|
|
203
|
+
relationships: {
|
|
204
|
+
type: "array",
|
|
205
|
+
items: { type: "string" },
|
|
206
|
+
},
|
|
207
|
+
direction: {
|
|
208
|
+
type: "string",
|
|
209
|
+
enum: ["outgoing", "incoming", "both"],
|
|
210
|
+
default: "outgoing",
|
|
211
|
+
},
|
|
212
|
+
depth: {
|
|
213
|
+
type: "integer",
|
|
214
|
+
default: 1,
|
|
215
|
+
minimum: 1,
|
|
216
|
+
maximum: 5,
|
|
217
|
+
},
|
|
218
|
+
entityTypes: {
|
|
219
|
+
type: "array",
|
|
220
|
+
items: { type: "string" },
|
|
221
|
+
},
|
|
222
|
+
maxNodes: {
|
|
223
|
+
type: "integer",
|
|
224
|
+
default: 200,
|
|
225
|
+
},
|
|
226
|
+
maxEdges: {
|
|
227
|
+
type: "integer",
|
|
228
|
+
default: 500,
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
},
|
|
67
233
|
{
|
|
68
234
|
name: "kb_upsert",
|
|
69
|
-
description: "Create or update one entity and optional relationships. Use for KB mutations after validating intent. Use the `relationships` array for batch creation of multiple links in a single call (e.g., linking a requirement to multiple tests or facts). Prefer modeling requirements as reusable fact links (`constrains`, `requires_property`) so consistency and contradiction checks remain queryable. Relationship endpoints must already exist in KB. Do not use for read-only inspection. Side effects: writes KB, may refresh symbol coordinates.",
|
|
235
|
+
description: "Create or update one entity and optional relationships. Use for KB mutations after validating intent. Use the `relationships` array for batch creation of multiple links in a single call (e.g., linking a requirement to multiple tests or facts). Prefer modeling requirements as reusable fact links (`constrains`, `requires_property`) so consistency and contradiction checks remain queryable. Relationship endpoints must already exist in KB. For requirements, the write will be rejected if it contradicts existing current requirements that constrain the same subject with incompatible properties. To replace a conflicting requirement, include a `supersedes` relationship from the new requirement to the old one in the same request. Do not use for read-only inspection. Side effects: writes KB, may refresh symbol coordinates.",
|
|
70
236
|
inputSchema: {
|
|
71
237
|
type: "object",
|
|
72
238
|
required: ["type", "id", "properties"],
|
|
@@ -209,9 +375,10 @@ const BASE_TOOLS = [
|
|
|
209
375
|
"required-fields",
|
|
210
376
|
"deprecated-adr-no-successor",
|
|
211
377
|
"domain-contradictions",
|
|
378
|
+
"strict-fact-shape",
|
|
212
379
|
],
|
|
213
380
|
},
|
|
214
|
-
description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions. If omitted, server runs all.",
|
|
381
|
+
description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, strict-fact-shape. If omitted, server runs all.",
|
|
215
382
|
},
|
|
216
383
|
},
|
|
217
384
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
6
6
|
"ajv": "^8.18.0",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"fast-glob": "^3.2.12",
|
|
10
10
|
"gray-matter": "^4.0.3",
|
|
11
11
|
"js-yaml": "^4.1.0",
|
|
12
|
-
"kibi-cli": "^0.
|
|
13
|
-
"kibi-core": "^0.
|
|
12
|
+
"kibi-cli": "^0.4.0",
|
|
13
|
+
"kibi-core": "^0.3.0",
|
|
14
14
|
"mcpcat": "^0.1.12",
|
|
15
15
|
"ts-morph": "^23.0.0",
|
|
16
16
|
"zod": "^4.3.6"
|