@aaronsb/kg-cli 0.6.6 → 0.7.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/api/client.d.ts +127 -1
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +147 -0
- package/dist/api/client.js.map +1 -1
- package/dist/cli/batch.d.ts +8 -0
- package/dist/cli/batch.d.ts.map +1 -0
- package/dist/cli/batch.js +225 -0
- package/dist/cli/batch.js.map +1 -0
- package/dist/cli/commands.d.ts.map +1 -1
- package/dist/cli/commands.js +8 -0
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/concept.d.ts +9 -0
- package/dist/cli/concept.d.ts.map +1 -0
- package/dist/cli/concept.js +336 -0
- package/dist/cli/concept.js.map +1 -0
- package/dist/cli/edge.d.ts +9 -0
- package/dist/cli/edge.d.ts.map +1 -0
- package/dist/cli/edge.js +364 -0
- package/dist/cli/edge.js.map +1 -0
- package/dist/cli/jobs.js +111 -3
- package/dist/cli/jobs.js.map +1 -1
- package/dist/cli/storage.d.ts +10 -0
- package/dist/cli/storage.d.ts.map +1 -0
- package/dist/cli/storage.js +260 -0
- package/dist/cli/storage.js.map +1 -0
- package/dist/cli/vocabulary/index.d.ts.map +1 -1
- package/dist/cli/vocabulary/index.js +1 -0
- package/dist/cli/vocabulary/index.js.map +1 -1
- package/dist/cli/vocabulary/similarity.d.ts +1 -0
- package/dist/cli/vocabulary/similarity.d.ts.map +1 -1
- package/dist/cli/vocabulary/similarity.js +60 -9
- package/dist/cli/vocabulary/similarity.js.map +1 -1
- package/dist/lib/interactive.d.ts +84 -0
- package/dist/lib/interactive.d.ts.map +1 -0
- package/dist/lib/interactive.js +296 -0
- package/dist/lib/interactive.js.map +1 -0
- package/dist/lib/validation.d.ts +106 -0
- package/dist/lib/validation.d.ts.map +1 -0
- package/dist/lib/validation.js +354 -0
- package/dist/lib/validation.js.map +1 -0
- package/dist/mcp/formatters/concept.d.ts +24 -0
- package/dist/mcp/formatters/concept.d.ts.map +1 -0
- package/dist/mcp/formatters/concept.js +243 -0
- package/dist/mcp/formatters/concept.js.map +1 -0
- package/dist/mcp/formatters/document.d.ts +25 -0
- package/dist/mcp/formatters/document.d.ts.map +1 -0
- package/dist/mcp/formatters/document.js +178 -0
- package/dist/mcp/formatters/document.js.map +1 -0
- package/dist/mcp/formatters/epistemic.d.ts +16 -0
- package/dist/mcp/formatters/epistemic.d.ts.map +1 -0
- package/dist/mcp/formatters/epistemic.js +269 -0
- package/dist/mcp/formatters/epistemic.js.map +1 -0
- package/dist/mcp/formatters/graph.d.ts +63 -0
- package/dist/mcp/formatters/graph.d.ts.map +1 -0
- package/dist/mcp/formatters/graph.js +220 -0
- package/dist/mcp/formatters/graph.js.map +1 -0
- package/dist/mcp/formatters/index.d.ts +18 -0
- package/dist/mcp/formatters/index.d.ts.map +1 -0
- package/dist/mcp/formatters/index.js +63 -0
- package/dist/mcp/formatters/index.js.map +1 -0
- package/dist/mcp/formatters/ingest.d.ts +16 -0
- package/dist/mcp/formatters/ingest.d.ts.map +1 -0
- package/dist/mcp/formatters/ingest.js +169 -0
- package/dist/mcp/formatters/ingest.js.map +1 -0
- package/dist/mcp/formatters/job.d.ts +13 -0
- package/dist/mcp/formatters/job.d.ts.map +1 -0
- package/dist/mcp/formatters/job.js +204 -0
- package/dist/mcp/formatters/job.js.map +1 -0
- package/dist/mcp/formatters/source.d.ts +19 -0
- package/dist/mcp/formatters/source.d.ts.map +1 -0
- package/dist/mcp/formatters/source.js +182 -0
- package/dist/mcp/formatters/source.js.map +1 -0
- package/dist/mcp/formatters/system.d.ts +10 -0
- package/dist/mcp/formatters/system.d.ts.map +1 -0
- package/dist/mcp/formatters/system.js +152 -0
- package/dist/mcp/formatters/system.js.map +1 -0
- package/dist/mcp/formatters/utils.d.ts +17 -0
- package/dist/mcp/formatters/utils.d.ts.map +1 -0
- package/dist/mcp/formatters/utils.js +55 -0
- package/dist/mcp/formatters/utils.js.map +1 -0
- package/dist/mcp/graph-operations.d.ts +242 -0
- package/dist/mcp/graph-operations.d.ts.map +1 -0
- package/dist/mcp/graph-operations.js +532 -0
- package/dist/mcp/graph-operations.js.map +1 -0
- package/dist/mcp-server.js +460 -32
- package/dist/mcp-server.js.map +1 -1
- package/dist/types/index.d.ts +153 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/version.d.ts +3 -3
- package/dist/version.js +3 -3
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/dist/mcp/formatters.d.ts +0 -100
- package/dist/mcp/formatters.d.ts.map +0 -1
- package/dist/mcp/formatters.js +0 -1411
- package/dist/mcp/formatters.js.map +0 -1
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Graph CRUD formatters (ADR-089 Phase 3a)
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.formatGraphConceptResult = formatGraphConceptResult;
|
|
7
|
+
exports.formatGraphEdgeResult = formatGraphEdgeResult;
|
|
8
|
+
exports.formatGraphConceptList = formatGraphConceptList;
|
|
9
|
+
exports.formatGraphEdgeList = formatGraphEdgeList;
|
|
10
|
+
exports.formatGraphBatchResult = formatGraphBatchResult;
|
|
11
|
+
exports.formatGraphQueueResult = formatGraphQueueResult;
|
|
12
|
+
/**
|
|
13
|
+
* Format a created/updated concept for MCP output
|
|
14
|
+
*/
|
|
15
|
+
function formatGraphConceptResult(result, action) {
|
|
16
|
+
let output = `# ${action === 'create' ? 'Created' : action === 'edit' ? 'Updated' : 'Deleted'} Concept\n\n`;
|
|
17
|
+
if (action === 'delete') {
|
|
18
|
+
output += `Concept deleted successfully.\n`;
|
|
19
|
+
return output;
|
|
20
|
+
}
|
|
21
|
+
output += `**Label:** ${result.label}\n`;
|
|
22
|
+
output += `**ID:** ${result.concept_id}\n`;
|
|
23
|
+
output += `**Ontology:** ${result.ontology || 'N/A'}\n`;
|
|
24
|
+
if (result.description) {
|
|
25
|
+
output += `**Description:** ${result.description}\n`;
|
|
26
|
+
}
|
|
27
|
+
if (result.search_terms && result.search_terms.length > 0) {
|
|
28
|
+
output += `**Search Terms:** ${result.search_terms.join(', ')}\n`;
|
|
29
|
+
}
|
|
30
|
+
output += `**Creation Method:** ${result.creation_method || 'mcp'}\n`;
|
|
31
|
+
output += `**Has Embedding:** ${result.has_embedding ? 'Yes' : 'Pending'}\n`;
|
|
32
|
+
if (result.matched_existing) {
|
|
33
|
+
output += `\n⚠️ **Matched Existing Concept** - no new concept created\n`;
|
|
34
|
+
}
|
|
35
|
+
return output;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Format a created/updated edge for MCP output
|
|
39
|
+
*/
|
|
40
|
+
function formatGraphEdgeResult(result, action) {
|
|
41
|
+
let output = `# ${action === 'create' ? 'Created' : action === 'edit' ? 'Updated' : 'Deleted'} Edge\n\n`;
|
|
42
|
+
if (action === 'delete') {
|
|
43
|
+
output += `Edge deleted successfully.\n`;
|
|
44
|
+
return output;
|
|
45
|
+
}
|
|
46
|
+
output += `**Relationship:** ${result.from_label || result.from_concept_id} → [${result.relationship_type}] → ${result.to_label || result.to_concept_id}\n\n`;
|
|
47
|
+
output += `**From Concept:** ${result.from_concept_id}\n`;
|
|
48
|
+
output += `**To Concept:** ${result.to_concept_id}\n`;
|
|
49
|
+
output += `**Type:** ${result.relationship_type}\n`;
|
|
50
|
+
output += `**Category:** ${result.category}\n`;
|
|
51
|
+
output += `**Confidence:** ${(result.confidence * 100).toFixed(0)}%\n`;
|
|
52
|
+
output += `**Source:** ${result.source}\n`;
|
|
53
|
+
if (result.created_at) {
|
|
54
|
+
output += `**Created:** ${result.created_at}\n`;
|
|
55
|
+
}
|
|
56
|
+
return output;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Format concept list for MCP output
|
|
60
|
+
*/
|
|
61
|
+
function formatGraphConceptList(result) {
|
|
62
|
+
let output = `# Concepts\n\n`;
|
|
63
|
+
output += `Showing ${result.concepts.length} of ${result.total} concepts\n\n`;
|
|
64
|
+
if (result.concepts.length === 0) {
|
|
65
|
+
output += 'No concepts found matching the filters.\n';
|
|
66
|
+
return output;
|
|
67
|
+
}
|
|
68
|
+
result.concepts.forEach((concept, i) => {
|
|
69
|
+
output += `${i + 1}. **${concept.label}**\n`;
|
|
70
|
+
output += ` - ID: ${concept.concept_id}\n`;
|
|
71
|
+
if (concept.ontology) {
|
|
72
|
+
output += ` - Ontology: ${concept.ontology}\n`;
|
|
73
|
+
}
|
|
74
|
+
if (concept.description) {
|
|
75
|
+
const truncated = concept.description.length > 80
|
|
76
|
+
? concept.description.substring(0, 80) + '...'
|
|
77
|
+
: concept.description;
|
|
78
|
+
output += ` - Description: ${truncated}\n`;
|
|
79
|
+
}
|
|
80
|
+
output += ` - Method: ${concept.creation_method || 'unknown'}\n`;
|
|
81
|
+
output += ` - Embedding: ${concept.has_embedding ? '✓' : '⏳'}\n`;
|
|
82
|
+
output += '\n';
|
|
83
|
+
});
|
|
84
|
+
if (result.total > result.offset + result.concepts.length) {
|
|
85
|
+
output += `Use offset=${result.offset + result.limit} to see more.\n`;
|
|
86
|
+
}
|
|
87
|
+
return output;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Format edge list for MCP output
|
|
91
|
+
*/
|
|
92
|
+
function formatGraphEdgeList(result) {
|
|
93
|
+
let output = `# Edges\n\n`;
|
|
94
|
+
output += `Showing ${result.edges.length} of ${result.total} edges\n\n`;
|
|
95
|
+
if (result.edges.length === 0) {
|
|
96
|
+
output += 'No edges found matching the filters.\n';
|
|
97
|
+
return output;
|
|
98
|
+
}
|
|
99
|
+
result.edges.forEach((edge, i) => {
|
|
100
|
+
output += `${i + 1}. **${edge.relationship_type}**\n`;
|
|
101
|
+
output += ` - From: ${edge.from_concept_id}\n`;
|
|
102
|
+
output += ` - To: ${edge.to_concept_id}\n`;
|
|
103
|
+
output += ` - Category: ${edge.category}\n`;
|
|
104
|
+
output += ` - Confidence: ${(edge.confidence * 100).toFixed(0)}%\n`;
|
|
105
|
+
output += ` - Source: ${edge.source}\n`;
|
|
106
|
+
output += '\n';
|
|
107
|
+
});
|
|
108
|
+
if (result.total > result.offset + result.edges.length) {
|
|
109
|
+
output += `Use offset=${result.offset + result.limit} to see more.\n`;
|
|
110
|
+
}
|
|
111
|
+
return output;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Format batch create response for MCP output
|
|
115
|
+
*/
|
|
116
|
+
function formatGraphBatchResult(result) {
|
|
117
|
+
let output = `# Batch Create Results\n\n`;
|
|
118
|
+
output += `## Summary\n\n`;
|
|
119
|
+
output += `- **Concepts Created:** ${result.concepts_created}\n`;
|
|
120
|
+
output += `- **Concepts Matched:** ${result.concepts_matched}\n`;
|
|
121
|
+
output += `- **Edges Created:** ${result.edges_created}\n`;
|
|
122
|
+
if (result.errors && result.errors.length > 0) {
|
|
123
|
+
output += `- **Errors:** ${result.errors.length}\n`;
|
|
124
|
+
}
|
|
125
|
+
if (result.concept_results && result.concept_results.length > 0) {
|
|
126
|
+
output += `\n## Concept Results\n\n`;
|
|
127
|
+
result.concept_results.forEach((item, i) => {
|
|
128
|
+
const statusIcon = item.status === 'created' ? '✓' : item.status === 'matched' ? '⊘' : '✗';
|
|
129
|
+
output += `${i + 1}. ${statusIcon} **${item.label}** - ${item.status}`;
|
|
130
|
+
if (item.id) {
|
|
131
|
+
output += ` (${item.id})`;
|
|
132
|
+
}
|
|
133
|
+
if (item.error) {
|
|
134
|
+
output += ` - ${item.error}`;
|
|
135
|
+
}
|
|
136
|
+
output += '\n';
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
if (result.edge_results && result.edge_results.length > 0) {
|
|
140
|
+
output += `\n## Edge Results\n\n`;
|
|
141
|
+
result.edge_results.forEach((item, i) => {
|
|
142
|
+
const statusIcon = item.status === 'created' ? '✓' : item.status === 'error' ? '✗' : '⊘';
|
|
143
|
+
output += `${i + 1}. ${statusIcon} **${item.label}** - ${item.status}`;
|
|
144
|
+
if (item.id) {
|
|
145
|
+
output += ` (${item.id})`;
|
|
146
|
+
}
|
|
147
|
+
if (item.error) {
|
|
148
|
+
output += ` - ${item.error}`;
|
|
149
|
+
}
|
|
150
|
+
output += '\n';
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
if (result.errors && result.errors.length > 0) {
|
|
154
|
+
output += `\n## Errors\n\n`;
|
|
155
|
+
result.errors.forEach((error, i) => {
|
|
156
|
+
output += `${i + 1}. ${error}\n`;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
return output;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Format queue execution results for MCP output
|
|
163
|
+
*/
|
|
164
|
+
function formatGraphQueueResult(queueResult, totalOperations) {
|
|
165
|
+
const { results, stopIndex, successCount, errorCount } = queueResult;
|
|
166
|
+
let output = `# Queue Results\n\n`;
|
|
167
|
+
output += `**Executed:** ${results.length} of ${totalOperations} operations\n`;
|
|
168
|
+
output += `**Success:** ${successCount} | **Errors:** ${errorCount}\n`;
|
|
169
|
+
if (stopIndex >= 0) {
|
|
170
|
+
output += `**Stopped at:** operation ${stopIndex + 1} (error)\n`;
|
|
171
|
+
}
|
|
172
|
+
output += '\n## Operations\n\n';
|
|
173
|
+
results.forEach((r) => {
|
|
174
|
+
const icon = r.status === 'ok' ? '✓' : '✗';
|
|
175
|
+
output += `${r.index}. ${icon} **${r.op} ${r.entity}**`;
|
|
176
|
+
if (r.status === 'ok') {
|
|
177
|
+
if (r.label)
|
|
178
|
+
output += ` - ${r.label}`;
|
|
179
|
+
if (r.id)
|
|
180
|
+
output += ` (${r.id})`;
|
|
181
|
+
if (r.relationship)
|
|
182
|
+
output += ` - ${r.relationship}`;
|
|
183
|
+
if (r.count !== undefined)
|
|
184
|
+
output += ` - ${r.count}/${r.total} results`;
|
|
185
|
+
if (r.matched_existing)
|
|
186
|
+
output += ' ⚠️ matched existing';
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
output += ` - ${r.error}`;
|
|
190
|
+
}
|
|
191
|
+
output += '\n';
|
|
192
|
+
});
|
|
193
|
+
// Include list results inline for convenience
|
|
194
|
+
const listResults = results.filter((r) => r.status === 'ok' && r.op === 'list');
|
|
195
|
+
if (listResults.length > 0) {
|
|
196
|
+
output += '\n## List Results\n\n';
|
|
197
|
+
listResults.forEach((r) => {
|
|
198
|
+
output += `### Operation ${r.index}: ${r.entity} list\n\n`;
|
|
199
|
+
if (r.entity === 'concept' && r.concepts) {
|
|
200
|
+
r.concepts.slice(0, 10).forEach((c, i) => {
|
|
201
|
+
output += `${i + 1}. ${c.label} (${c.id})\n`;
|
|
202
|
+
});
|
|
203
|
+
if (r.concepts.length > 10) {
|
|
204
|
+
output += `... and ${r.concepts.length - 10} more\n`;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
else if (r.entity === 'edge' && r.edges) {
|
|
208
|
+
r.edges.slice(0, 10).forEach((e, i) => {
|
|
209
|
+
output += `${i + 1}. ${e.from} -[${e.type}]-> ${e.to}\n`;
|
|
210
|
+
});
|
|
211
|
+
if (r.edges.length > 10) {
|
|
212
|
+
output += `... and ${r.edges.length - 10} more\n`;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
output += '\n';
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
return output;
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../src/mcp/formatters/graph.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAKH,4DA4BC;AAKD,sDAqBC;AAKD,wDA+BC;AAKD,kDAwBC;AAKD,wDAkDC;AAkCD,wDAuDC;AA1QD;;GAEG;AACH,SAAgB,wBAAwB,CAAC,MAAW,EAAE,MAAc;IAClE,IAAI,MAAM,GAAG,KAAK,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,SAA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
|
|
3
|
+
*
|
|
4
|
+
* Formats API responses as markdown-style text for AI agents.
|
|
5
|
+
* Optimized for token efficiency - minimal Unicode, plain structure.
|
|
6
|
+
*
|
|
7
|
+
* Split by domain for maintainability (refactored from monolithic formatters.ts)
|
|
8
|
+
*/
|
|
9
|
+
export { formatGroundingStrength, formatGroundingWithConfidence } from './utils.js';
|
|
10
|
+
export { formatSearchResults, formatConceptDetails, formatConnectionPaths, formatRelatedConcepts, } from './concept.js';
|
|
11
|
+
export { formatJobList, formatJobStatus } from './job.js';
|
|
12
|
+
export { formatInspectFileResult, formatIngestFileResult, formatIngestDirectoryResult, } from './ingest.js';
|
|
13
|
+
export { formatDatabaseStats, formatDatabaseInfo, formatDatabaseHealth, formatSystemStatus, formatApiHealth, formatMcpAllowedPaths, } from './system.js';
|
|
14
|
+
export { formatEpistemicStatusList, formatEpistemicStatusDetails, formatEpistemicStatusMeasurement, } from './epistemic.js';
|
|
15
|
+
export { formatSourceSearchResults, formatPolarityAxisResults } from './source.js';
|
|
16
|
+
export { formatDocumentSearchResults, formatDocumentList, formatDocumentContent, formatDocumentConcepts, formatDocumentConceptsDetailed, } from './document.js';
|
|
17
|
+
export { formatGraphConceptResult, formatGraphEdgeResult, formatGraphConceptList, formatGraphEdgeList, formatGraphBatchResult, formatGraphQueueResult, } from './graph.js';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp/formatters/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAGpF,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG1D,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAGnF,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP Server Markdown Formatters
|
|
4
|
+
*
|
|
5
|
+
* Formats API responses as markdown-style text for AI agents.
|
|
6
|
+
* Optimized for token efficiency - minimal Unicode, plain structure.
|
|
7
|
+
*
|
|
8
|
+
* Split by domain for maintainability (refactored from monolithic formatters.ts)
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.formatGraphQueueResult = exports.formatGraphBatchResult = exports.formatGraphEdgeList = exports.formatGraphConceptList = exports.formatGraphEdgeResult = exports.formatGraphConceptResult = exports.formatDocumentConceptsDetailed = exports.formatDocumentConcepts = exports.formatDocumentContent = exports.formatDocumentList = exports.formatDocumentSearchResults = exports.formatPolarityAxisResults = exports.formatSourceSearchResults = exports.formatEpistemicStatusMeasurement = exports.formatEpistemicStatusDetails = exports.formatEpistemicStatusList = exports.formatMcpAllowedPaths = exports.formatApiHealth = exports.formatSystemStatus = exports.formatDatabaseHealth = exports.formatDatabaseInfo = exports.formatDatabaseStats = exports.formatIngestDirectoryResult = exports.formatIngestFileResult = exports.formatInspectFileResult = exports.formatJobStatus = exports.formatJobList = exports.formatRelatedConcepts = exports.formatConnectionPaths = exports.formatConceptDetails = exports.formatSearchResults = exports.formatGroundingWithConfidence = exports.formatGroundingStrength = void 0;
|
|
12
|
+
// Shared utilities
|
|
13
|
+
var utils_js_1 = require("./utils.js");
|
|
14
|
+
Object.defineProperty(exports, "formatGroundingStrength", { enumerable: true, get: function () { return utils_js_1.formatGroundingStrength; } });
|
|
15
|
+
Object.defineProperty(exports, "formatGroundingWithConfidence", { enumerable: true, get: function () { return utils_js_1.formatGroundingWithConfidence; } });
|
|
16
|
+
// Concept and search formatters
|
|
17
|
+
var concept_js_1 = require("./concept.js");
|
|
18
|
+
Object.defineProperty(exports, "formatSearchResults", { enumerable: true, get: function () { return concept_js_1.formatSearchResults; } });
|
|
19
|
+
Object.defineProperty(exports, "formatConceptDetails", { enumerable: true, get: function () { return concept_js_1.formatConceptDetails; } });
|
|
20
|
+
Object.defineProperty(exports, "formatConnectionPaths", { enumerable: true, get: function () { return concept_js_1.formatConnectionPaths; } });
|
|
21
|
+
Object.defineProperty(exports, "formatRelatedConcepts", { enumerable: true, get: function () { return concept_js_1.formatRelatedConcepts; } });
|
|
22
|
+
// Job formatters
|
|
23
|
+
var job_js_1 = require("./job.js");
|
|
24
|
+
Object.defineProperty(exports, "formatJobList", { enumerable: true, get: function () { return job_js_1.formatJobList; } });
|
|
25
|
+
Object.defineProperty(exports, "formatJobStatus", { enumerable: true, get: function () { return job_js_1.formatJobStatus; } });
|
|
26
|
+
// Ingest formatters
|
|
27
|
+
var ingest_js_1 = require("./ingest.js");
|
|
28
|
+
Object.defineProperty(exports, "formatInspectFileResult", { enumerable: true, get: function () { return ingest_js_1.formatInspectFileResult; } });
|
|
29
|
+
Object.defineProperty(exports, "formatIngestFileResult", { enumerable: true, get: function () { return ingest_js_1.formatIngestFileResult; } });
|
|
30
|
+
Object.defineProperty(exports, "formatIngestDirectoryResult", { enumerable: true, get: function () { return ingest_js_1.formatIngestDirectoryResult; } });
|
|
31
|
+
// System and database formatters
|
|
32
|
+
var system_js_1 = require("./system.js");
|
|
33
|
+
Object.defineProperty(exports, "formatDatabaseStats", { enumerable: true, get: function () { return system_js_1.formatDatabaseStats; } });
|
|
34
|
+
Object.defineProperty(exports, "formatDatabaseInfo", { enumerable: true, get: function () { return system_js_1.formatDatabaseInfo; } });
|
|
35
|
+
Object.defineProperty(exports, "formatDatabaseHealth", { enumerable: true, get: function () { return system_js_1.formatDatabaseHealth; } });
|
|
36
|
+
Object.defineProperty(exports, "formatSystemStatus", { enumerable: true, get: function () { return system_js_1.formatSystemStatus; } });
|
|
37
|
+
Object.defineProperty(exports, "formatApiHealth", { enumerable: true, get: function () { return system_js_1.formatApiHealth; } });
|
|
38
|
+
Object.defineProperty(exports, "formatMcpAllowedPaths", { enumerable: true, get: function () { return system_js_1.formatMcpAllowedPaths; } });
|
|
39
|
+
// Epistemic status formatters (ADR-065)
|
|
40
|
+
var epistemic_js_1 = require("./epistemic.js");
|
|
41
|
+
Object.defineProperty(exports, "formatEpistemicStatusList", { enumerable: true, get: function () { return epistemic_js_1.formatEpistemicStatusList; } });
|
|
42
|
+
Object.defineProperty(exports, "formatEpistemicStatusDetails", { enumerable: true, get: function () { return epistemic_js_1.formatEpistemicStatusDetails; } });
|
|
43
|
+
Object.defineProperty(exports, "formatEpistemicStatusMeasurement", { enumerable: true, get: function () { return epistemic_js_1.formatEpistemicStatusMeasurement; } });
|
|
44
|
+
// Source and polarity formatters
|
|
45
|
+
var source_js_1 = require("./source.js");
|
|
46
|
+
Object.defineProperty(exports, "formatSourceSearchResults", { enumerable: true, get: function () { return source_js_1.formatSourceSearchResults; } });
|
|
47
|
+
Object.defineProperty(exports, "formatPolarityAxisResults", { enumerable: true, get: function () { return source_js_1.formatPolarityAxisResults; } });
|
|
48
|
+
// Document formatters (ADR-084)
|
|
49
|
+
var document_js_1 = require("./document.js");
|
|
50
|
+
Object.defineProperty(exports, "formatDocumentSearchResults", { enumerable: true, get: function () { return document_js_1.formatDocumentSearchResults; } });
|
|
51
|
+
Object.defineProperty(exports, "formatDocumentList", { enumerable: true, get: function () { return document_js_1.formatDocumentList; } });
|
|
52
|
+
Object.defineProperty(exports, "formatDocumentContent", { enumerable: true, get: function () { return document_js_1.formatDocumentContent; } });
|
|
53
|
+
Object.defineProperty(exports, "formatDocumentConcepts", { enumerable: true, get: function () { return document_js_1.formatDocumentConcepts; } });
|
|
54
|
+
Object.defineProperty(exports, "formatDocumentConceptsDetailed", { enumerable: true, get: function () { return document_js_1.formatDocumentConceptsDetailed; } });
|
|
55
|
+
// Graph CRUD formatters (ADR-089)
|
|
56
|
+
var graph_js_1 = require("./graph.js");
|
|
57
|
+
Object.defineProperty(exports, "formatGraphConceptResult", { enumerable: true, get: function () { return graph_js_1.formatGraphConceptResult; } });
|
|
58
|
+
Object.defineProperty(exports, "formatGraphEdgeResult", { enumerable: true, get: function () { return graph_js_1.formatGraphEdgeResult; } });
|
|
59
|
+
Object.defineProperty(exports, "formatGraphConceptList", { enumerable: true, get: function () { return graph_js_1.formatGraphConceptList; } });
|
|
60
|
+
Object.defineProperty(exports, "formatGraphEdgeList", { enumerable: true, get: function () { return graph_js_1.formatGraphEdgeList; } });
|
|
61
|
+
Object.defineProperty(exports, "formatGraphBatchResult", { enumerable: true, get: function () { return graph_js_1.formatGraphBatchResult; } });
|
|
62
|
+
Object.defineProperty(exports, "formatGraphQueueResult", { enumerable: true, get: function () { return graph_js_1.formatGraphQueueResult; } });
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/formatters/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,mBAAmB;AACnB,uCAAoF;AAA3E,mHAAA,uBAAuB,OAAA;AAAE,yHAAA,6BAA6B,OAAA;AAE/D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*/
|
|
7
|
+
export declare function formatInspectFileResult(result: any): string;
|
|
8
|
+
/**
|
|
9
|
+
* Format ingest-file result as markdown
|
|
10
|
+
*/
|
|
11
|
+
export declare function formatIngestFileResult(result: any): string;
|
|
12
|
+
/**
|
|
13
|
+
* Format ingest-directory result as markdown
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatIngestDirectoryResult(result: any): string;
|
|
16
|
+
//# sourceMappingURL=ingest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../../../src/mcp/formatters/ingest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAmC3D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAkE1D;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAwD/D"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Ingest formatters
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.formatInspectFileResult = formatInspectFileResult;
|
|
7
|
+
exports.formatIngestFileResult = formatIngestFileResult;
|
|
8
|
+
exports.formatIngestDirectoryResult = formatIngestDirectoryResult;
|
|
9
|
+
/**
|
|
10
|
+
* Format inspect-file result as markdown
|
|
11
|
+
*/
|
|
12
|
+
function formatInspectFileResult(result) {
|
|
13
|
+
let output = `# File Inspection: ${result.path}\n\n`;
|
|
14
|
+
// Validation status
|
|
15
|
+
if (result.validation.allowed) {
|
|
16
|
+
output += `Status: ✓ ALLOWED\n\n`;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
output += `Status: ✗ DENIED\n`;
|
|
20
|
+
output += `Reason: ${result.validation.reason}\n`;
|
|
21
|
+
if (result.validation.hint) {
|
|
22
|
+
output += `Hint: ${result.validation.hint}\n`;
|
|
23
|
+
}
|
|
24
|
+
output += '\n';
|
|
25
|
+
}
|
|
26
|
+
// File existence
|
|
27
|
+
if (result.exists) {
|
|
28
|
+
output += `## File Metadata\n\n`;
|
|
29
|
+
if (result.metadata) {
|
|
30
|
+
const m = result.metadata;
|
|
31
|
+
output += `Type: ${m.type}\n`;
|
|
32
|
+
output += `Size: ${m.size_mb.toFixed(2)} MB (${m.size_bytes.toLocaleString()} bytes)\n`;
|
|
33
|
+
output += `MIME Type: ${m.mime_type}\n`;
|
|
34
|
+
output += `Modified: ${new Date(m.modified).toLocaleString()}\n`;
|
|
35
|
+
output += `Image: ${m.is_image ? 'Yes' : 'No'}\n`;
|
|
36
|
+
output += `Permissions: ${m.permissions.readable ? 'readable' : ''}${m.permissions.readable && m.permissions.writable ? ', ' : ''}${m.permissions.writable ? 'writable' : ''}\n`;
|
|
37
|
+
}
|
|
38
|
+
if (result.error) {
|
|
39
|
+
output += `\nError: ${result.error}\n`;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
output += `File does not exist\n`;
|
|
44
|
+
}
|
|
45
|
+
return output;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Format ingest-file result as markdown
|
|
49
|
+
*/
|
|
50
|
+
function formatIngestFileResult(result) {
|
|
51
|
+
// Handle batch ingestion
|
|
52
|
+
if (result.batch) {
|
|
53
|
+
let output = `# Batch File Ingestion\n\n`;
|
|
54
|
+
output += `Ontology: ${result.ontology}\n`;
|
|
55
|
+
output += `Total Files: ${result.total_files}\n`;
|
|
56
|
+
output += `Successful: ${result.successful}\n`;
|
|
57
|
+
output += `Failed: ${result.failed}\n\n`;
|
|
58
|
+
if (result.results && result.results.length > 0) {
|
|
59
|
+
output += `## Submitted Files\n\n`;
|
|
60
|
+
result.results.forEach((r, idx) => {
|
|
61
|
+
const filename = r.file.split('/').pop();
|
|
62
|
+
const typeLabel = r.type === 'image' ? '🖼️' : '📄';
|
|
63
|
+
if (r.status === 'submitted' && r.job_id) {
|
|
64
|
+
output += `${idx + 1}. ✓ ${typeLabel} ${filename}\n`;
|
|
65
|
+
output += ` Job ID: ${r.job_id}\n`;
|
|
66
|
+
}
|
|
67
|
+
else if (r.status === 'duplicate') {
|
|
68
|
+
output += `${idx + 1}. ⊘ ${typeLabel} ${filename} (already ingested)\n`;
|
|
69
|
+
}
|
|
70
|
+
else if (r.status === 'not_implemented') {
|
|
71
|
+
output += `${idx + 1}. ⏸ ${filename} (${r.type} - not implemented yet)\n`;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
if (result.errors && result.errors.length > 0) {
|
|
76
|
+
output += `\n## Errors\n\n`;
|
|
77
|
+
result.errors.forEach((e, idx) => {
|
|
78
|
+
const filename = e.file.split('/').pop();
|
|
79
|
+
output += `${idx + 1}. ✗ ${filename}\n`;
|
|
80
|
+
output += ` ${e.error}\n`;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return output;
|
|
84
|
+
}
|
|
85
|
+
// Handle single file ingestion
|
|
86
|
+
const typeIcon = result.type === 'image' ? '🖼️' : '📄';
|
|
87
|
+
let output = `# File Ingestion: ${typeIcon} ${result.file}\n\n`;
|
|
88
|
+
if (result.status === 'not_implemented') {
|
|
89
|
+
output += `Status: Not Implemented\n`;
|
|
90
|
+
output += `Type: ${result.type}\n`;
|
|
91
|
+
output += `Message: ${result.message}\n`;
|
|
92
|
+
if (result.next_phase) {
|
|
93
|
+
output += `\nNext Phase: ${result.next_phase}\n`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else if (result.status === 'submitted') {
|
|
97
|
+
output += `Status: ✓ Submitted Successfully\n\n`;
|
|
98
|
+
output += `## Job Details\n\n`;
|
|
99
|
+
output += `Job ID: ${result.job_id}\n`;
|
|
100
|
+
output += `Ontology: ${result.ontology}\n`;
|
|
101
|
+
output += `Type: ${result.type === 'image' ? '🖼️ Image' : '📄 Text'}\n`;
|
|
102
|
+
output += `Size: ${(result.size_bytes / 1024).toFixed(2)} KB\n\n`;
|
|
103
|
+
output += `Track progress: Use job tool with action "status" and job_id "${result.job_id}"\n`;
|
|
104
|
+
}
|
|
105
|
+
else if (result.status === 'duplicate') {
|
|
106
|
+
output += `Status: Duplicate Detected\n\n`;
|
|
107
|
+
output += `This file has already been ingested.\n`;
|
|
108
|
+
if (result.duplicate_job_id) {
|
|
109
|
+
output += `Existing Job ID: ${result.duplicate_job_id}\n`;
|
|
110
|
+
}
|
|
111
|
+
output += `\nTo force re-ingestion, set force=true\n`;
|
|
112
|
+
}
|
|
113
|
+
return output;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Format ingest-directory result as markdown
|
|
117
|
+
*/
|
|
118
|
+
function formatIngestDirectoryResult(result) {
|
|
119
|
+
let output = `# Directory Ingestion: ${result.directory}\n\n`;
|
|
120
|
+
if (result.status === 'not_implemented') {
|
|
121
|
+
output += `Status: Not Implemented (Preview Mode)\n`;
|
|
122
|
+
output += `Ontology: ${result.ontology}\n\n`;
|
|
123
|
+
output += `## Scan Results\n\n`;
|
|
124
|
+
output += `Files Found: ${result.files_found}\n`;
|
|
125
|
+
output += `Files Skipped: ${result.files_skipped} (blocked by security patterns)\n\n`;
|
|
126
|
+
if (result.files && result.files.length > 0) {
|
|
127
|
+
const pagination = result.pagination;
|
|
128
|
+
const startNum = pagination ? pagination.offset + 1 : 1;
|
|
129
|
+
const endNum = pagination ? pagination.offset + result.files.length : result.files.length;
|
|
130
|
+
output += `## Files (showing ${startNum}-${endNum} of ${result.files_found})\n\n`;
|
|
131
|
+
result.files.forEach((file, idx) => {
|
|
132
|
+
const basename = file.split('/').pop();
|
|
133
|
+
const fileNum = pagination ? pagination.offset + idx + 1 : idx + 1;
|
|
134
|
+
output += `${fileNum}. ${basename}\n`;
|
|
135
|
+
});
|
|
136
|
+
// Pagination navigation
|
|
137
|
+
if (pagination && (pagination.offset > 0 || pagination.has_more)) {
|
|
138
|
+
output += `\n## Navigation\n\n`;
|
|
139
|
+
if (pagination.offset > 0) {
|
|
140
|
+
const prevOffset = Math.max(0, pagination.offset - pagination.limit);
|
|
141
|
+
output += `Previous: Use offset=${prevOffset}, limit=${pagination.limit}\n`;
|
|
142
|
+
}
|
|
143
|
+
if (pagination.has_more) {
|
|
144
|
+
const nextOffset = pagination.offset + pagination.limit;
|
|
145
|
+
output += `Next: Use offset=${nextOffset}, limit=${pagination.limit}\n`;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (result.next_phase) {
|
|
150
|
+
output += `\n${result.next_phase}\n`;
|
|
151
|
+
}
|
|
152
|
+
output += `\nFor now, use ingest-file on individual files from the list above.\n`;
|
|
153
|
+
}
|
|
154
|
+
else if (result.status === 'submitted') {
|
|
155
|
+
output += `Status: ✓ Batch Submission Started\n\n`;
|
|
156
|
+
output += `## Summary\n\n`;
|
|
157
|
+
output += `Ontology: ${result.ontology}\n`;
|
|
158
|
+
output += `Files Queued: ${result.files_queued}\n`;
|
|
159
|
+
output += `Files Skipped: ${result.files_skipped}\n\n`;
|
|
160
|
+
if (result.job_ids && result.job_ids.length > 0) {
|
|
161
|
+
output += `## Job IDs\n\n`;
|
|
162
|
+
result.job_ids.forEach((id, idx) => {
|
|
163
|
+
output += `${idx + 1}. ${id}\n`;
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return output;
|
|
168
|
+
}
|
|
169
|
+
//# sourceMappingURL=ingest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ingest.js","sourceRoot":"","sources":["../../../src/mcp/formatters/ingest.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAKH,0DAmCC;AAKD,wDAkEC;AAKD,kEAwDC;AA1KD;;GAEG;AACH,SAAgB,uBAAuB,CAAC,MAAW;IACjD,IAAI,MAAM,GAAG,sBAA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,CAAC,KAAK,EAAE,IAAI,CAAC;YAClC,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Job formatters
|
|
3
|
+
*/
|
|
4
|
+
import type { JobStatus } from '../../types/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Format job list as markdown (token-efficient summary view)
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatJobList(jobs: JobStatus[]): string;
|
|
9
|
+
/**
|
|
10
|
+
* Format job status as markdown (token-efficient)
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatJobStatus(job: JobStatus): string;
|
|
13
|
+
//# sourceMappingURL=job.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job.d.ts","sourceRoot":"","sources":["../../../src/mcp/formatters/job.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,CAwGvD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAiHtD"}
|