mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-11 09:58:28 +00:00
Fix: mcp change the naming to add from ingest
This commit is contained in:
parent
dec82742fa
commit
b987a7cf3c
@ -1,4 +1,4 @@
|
|||||||
VERSION=0.1.3
|
VERSION=0.1.6
|
||||||
|
|
||||||
# POSTGRES
|
# POSTGRES
|
||||||
POSTGRES_USER=docker
|
POSTGRES_USER=docker
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@redplanethq/core-mcp",
|
"name": "@redplanethq/core-mcp",
|
||||||
"version": "0.1.0",
|
"version": "0.1.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@ -31,8 +31,8 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|||||||
inputSchema: zodToJsonSchema(SearchKGSchema),
|
inputSchema: zodToJsonSchema(SearchKGSchema),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ingest_memory",
|
name: "add_memory",
|
||||||
description: "Ingest data into the memory graph pipeline",
|
description: "Add data into the memory graph pipeline",
|
||||||
inputSchema: zodToJsonSchema(IngestKGSchema),
|
inputSchema: zodToJsonSchema(IngestKGSchema),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -51,7 +51,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|||||||
const result = await searchKnowledgeGraph(args);
|
const result = await searchKnowledgeGraph(args);
|
||||||
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
||||||
}
|
}
|
||||||
case "ingest_memory": {
|
case "add_memory": {
|
||||||
const args = IngestKGSchema.parse(request.params.arguments);
|
const args = IngestKGSchema.parse(request.params.arguments);
|
||||||
const result = await ingestKnowledgeGraph(args);
|
const result = await ingestKnowledgeGraph(args);
|
||||||
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
||||||
|
|||||||
@ -12,10 +12,10 @@ export async function searchKnowledgeGraph(args: SearchKG) {
|
|||||||
|
|
||||||
export async function ingestKnowledgeGraph(args: IngestKG) {
|
export async function ingestKnowledgeGraph(args: IngestKG) {
|
||||||
const response = await axiosInstance.post(`/ingest`, {
|
const response = await axiosInstance.post(`/ingest`, {
|
||||||
data: args.data,
|
episodeBody: args.message,
|
||||||
source: process.env.SOURCE,
|
source: process.env.SOURCE,
|
||||||
referenceTime: args.referenceTime,
|
referenceTime: args.referenceTime,
|
||||||
sessionId: args.sessionId ? args.sessionId : undefined,
|
sessionId: undefined,
|
||||||
});
|
});
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,9 +8,8 @@ export const SearchKGSchema = z.object({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const IngestKGSchema = z.object({
|
export const IngestKGSchema = z.object({
|
||||||
data: z.string().describe("The data to ingest in text format"),
|
message: z.string().describe("The data to ingest in text format"),
|
||||||
referenceTime: z.string().describe("The reference time in ISO format"),
|
referenceTime: z.string().describe("The reference time in ISO format"),
|
||||||
sessionId: z.string().optional().describe("The session id of the conversation"),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export type SearchKG = z.infer<typeof SearchKGSchema>;
|
export type SearchKG = z.infer<typeof SearchKGSchema>;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "core",
|
"name": "core",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"apps/*",
|
"apps/*",
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user