mcp-grampsweb 1.0.1 → 1.1.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/constants.d.ts +7 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +8 -0
- package/dist/constants.js.map +1 -1
- package/dist/index.js +28 -1
- package/dist/index.js.map +1 -1
- package/dist/prompts/index.d.ts +26 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +310 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/schemas/entities.d.ts +20 -20
- package/dist/tools/analysis.d.ts.map +1 -1
- package/dist/tools/analysis.js +141 -61
- package/dist/tools/analysis.js.map +1 -1
- package/dist/tools/create.d.ts.map +1 -1
- package/dist/tools/create.js +126 -27
- package/dist/tools/create.js.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +67 -24
- package/dist/tools/search.js.map +1 -1
- package/dist/utils/response.d.ts +34 -0
- package/dist/utils/response.d.ts.map +1 -0
- package/dist/utils/response.js +71 -0
- package/dist/utils/response.js.map +1 -0
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -21,4 +21,11 @@ export type APIEndpoint = (typeof API_ENDPOINTS)[keyof typeof API_ENDPOINTS];
|
|
|
21
21
|
export declare const ENTITY_ENDPOINT_MAP: Record<string, string>;
|
|
22
22
|
export declare const TOKEN_EXPIRY_BUFFER_MS: number;
|
|
23
23
|
export declare const DEFAULT_TIMEOUT_MS: number;
|
|
24
|
+
export declare const MESSAGES: {
|
|
25
|
+
NO_RESULTS: (type: string, query: string) => string;
|
|
26
|
+
NOT_FOUND: (type: string, id: string) => string;
|
|
27
|
+
CREATED: (type: string, id: string, handle: string) => string;
|
|
28
|
+
EMPTY_TREE: string;
|
|
29
|
+
SEARCH_HINT: string;
|
|
30
|
+
};
|
|
24
31
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;CA0BhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAG7E,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkBtD,CAAC;AAGF,eAAO,MAAM,sBAAsB,QAAY,CAAC;AAGhD,eAAO,MAAM,kBAAkB,QAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;CA0BhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAG7E,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkBtD,CAAC;AAGF,eAAO,MAAM,sBAAsB,QAAY,CAAC;AAGhD,eAAO,MAAM,kBAAkB,QAAY,CAAC;AAG5C,eAAO,MAAM,QAAQ;uBACA,MAAM,SAAS,MAAM;sBAGtB,MAAM,MAAM,MAAM;oBAGpB,MAAM,MAAM,MAAM,UAAU,MAAM;;;CAMnD,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -47,4 +47,12 @@ export const ENTITY_ENDPOINT_MAP = {
|
|
|
47
47
|
export const TOKEN_EXPIRY_BUFFER_MS = 30 * 1000;
|
|
48
48
|
// Default request timeout
|
|
49
49
|
export const DEFAULT_TIMEOUT_MS = 30 * 1000;
|
|
50
|
+
// Standardized messages for consistent LLM feedback
|
|
51
|
+
export const MESSAGES = {
|
|
52
|
+
NO_RESULTS: (type, query) => `No ${type} found matching "${query}". Try broader search terms or check for typos.`,
|
|
53
|
+
NOT_FOUND: (type, id) => `${type} "${id}" not found. Verify the handle using gramps_find first.`,
|
|
54
|
+
CREATED: (type, id, handle) => `Created ${type} ${id}. Use handle "${handle}" for relationships.`,
|
|
55
|
+
EMPTY_TREE: "The family tree is empty. Use create tools to add records.",
|
|
56
|
+
SEARCH_HINT: "Use gramps_search with GQL for structured queries, or gramps_find for full-text search.",
|
|
57
|
+
};
|
|
50
58
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,iBAAiB;IACjB,KAAK,EAAE,SAAS;IAEhB,uDAAuD;IACvD,MAAM,EAAE,UAAU;IAClB,QAAQ,EAAE,YAAY;IACtB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,WAAW;IACpB,SAAS,EAAE,aAAa;IACxB,YAAY,EAAE,gBAAgB;IAC9B,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAEhB,SAAS;IACT,MAAM,EAAE,UAAU;IAElB,WAAW;IACX,QAAQ,EAAE,YAAY;IAEtB,gCAAgC;IAChC,KAAK,EAAE,SAAS;IAEhB,iBAAiB;IACjB,MAAM,EAAE,UAAU;CACV,CAAC;AAIX,8BAA8B;AAC9B,MAAM,CAAC,MAAM,mBAAmB,GAA2B;IACzD,MAAM,EAAE,aAAa,CAAC,MAAM;IAC5B,MAAM,EAAE,aAAa,CAAC,MAAM;IAC5B,QAAQ,EAAE,aAAa,CAAC,QAAQ;IAChC,MAAM,EAAE,aAAa,CAAC,QAAQ;IAC9B,MAAM,EAAE,aAAa,CAAC,MAAM;IAC5B,KAAK,EAAE,aAAa,CAAC,MAAM;IAC3B,MAAM,EAAE,aAAa,CAAC,MAAM;IAC5B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from "@modelcontextprotocol/sdk/server/index.js";
|
|
9
9
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
10
|
-
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
10
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
11
11
|
import { loadConfig } from "./config.js";
|
|
12
12
|
import { authManager } from "./auth.js";
|
|
13
13
|
import { grampsClient } from "./client.js";
|
|
14
14
|
import { allTools } from "./tools/index.js";
|
|
15
|
+
import { grampsPrompts } from "./prompts/index.js";
|
|
15
16
|
import { formatErrorForMCP } from "./utils/errors.js";
|
|
16
17
|
// Logger that writes to stderr (stdout is for MCP JSON-RPC)
|
|
17
18
|
const log = {
|
|
@@ -54,6 +55,7 @@ async function main() {
|
|
|
54
55
|
}, {
|
|
55
56
|
capabilities: {
|
|
56
57
|
tools: {},
|
|
58
|
+
prompts: {},
|
|
57
59
|
},
|
|
58
60
|
});
|
|
59
61
|
// Register tool list handler
|
|
@@ -65,6 +67,31 @@ async function main() {
|
|
|
65
67
|
}));
|
|
66
68
|
return { tools };
|
|
67
69
|
});
|
|
70
|
+
// Register prompts list handler
|
|
71
|
+
server.setRequestHandler(ListPromptsRequestSchema, async () => {
|
|
72
|
+
const prompts = Object.values(grampsPrompts).map((prompt) => ({
|
|
73
|
+
name: prompt.name,
|
|
74
|
+
description: prompt.description,
|
|
75
|
+
arguments: prompt.arguments,
|
|
76
|
+
}));
|
|
77
|
+
return { prompts };
|
|
78
|
+
});
|
|
79
|
+
// Register get prompt handler
|
|
80
|
+
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
81
|
+
const promptName = request.params.name;
|
|
82
|
+
const prompt = grampsPrompts[promptName];
|
|
83
|
+
if (!prompt) {
|
|
84
|
+
throw new Error(`Unknown prompt: ${promptName}`);
|
|
85
|
+
}
|
|
86
|
+
const args = request.params.arguments;
|
|
87
|
+
const messages = prompt.getMessages(args);
|
|
88
|
+
return {
|
|
89
|
+
messages: messages.map((m) => ({
|
|
90
|
+
role: m.role,
|
|
91
|
+
content: { type: "text", text: m.content },
|
|
92
|
+
})),
|
|
93
|
+
};
|
|
94
|
+
});
|
|
68
95
|
// Register tool call handler
|
|
69
96
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
70
97
|
const { name, arguments: args } = request.params;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,4DAA4D;AAC5D,MAAM,GAAG,GAAG;IACV,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC;IACrD,KAAK,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,GAAG,EAAE,CAAC;IACvD,KAAK,EAAE,CAAC,GAAW,EAAE,EAAE;QACrB,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;YACtB,OAAO,CAAC,KAAK,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC;QAClC,CA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O,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,mBAAmB;IACnB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,GAAG,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;AACrD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompts for guiding LLM workflows with Gramps genealogy tools
|
|
3
|
+
*/
|
|
4
|
+
export interface PromptArgument {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface GrampsPrompt {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
arguments?: PromptArgument[];
|
|
13
|
+
getMessages: (args?: Record<string, string>) => Array<{
|
|
14
|
+
role: "user" | "assistant";
|
|
15
|
+
content: string;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Export all prompts
|
|
20
|
+
*/
|
|
21
|
+
export declare const grampsPrompts: Record<string, GrampsPrompt>;
|
|
22
|
+
/**
|
|
23
|
+
* Get prompt names for listing
|
|
24
|
+
*/
|
|
25
|
+
export declare const promptNames: string[];
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,WAAW,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxG;AA2SD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAMtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,UAA6B,CAAC"}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompts for guiding LLM workflows with Gramps genealogy tools
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Research a person's lineage
|
|
6
|
+
*/
|
|
7
|
+
const researchPerson = {
|
|
8
|
+
name: "research-person",
|
|
9
|
+
description: "Guide for finding and exploring a person's family lineage",
|
|
10
|
+
arguments: [
|
|
11
|
+
{
|
|
12
|
+
name: "name",
|
|
13
|
+
description: "Name of the person to research (e.g., 'John Smith')",
|
|
14
|
+
required: false,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
getMessages: (args) => {
|
|
18
|
+
const nameClause = args?.name ? ` for "${args.name}"` : "";
|
|
19
|
+
return [
|
|
20
|
+
{
|
|
21
|
+
role: "user",
|
|
22
|
+
content: `Help me research a person's genealogy${nameClause}.`,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
role: "assistant",
|
|
26
|
+
content: `I'll help you research${nameClause ? ` ${args?.name}'s` : " a person's"} genealogy. Here's the recommended workflow:
|
|
27
|
+
|
|
28
|
+
## Step 1: Find the Person
|
|
29
|
+
${args?.name ? `Search for "${args.name}" using:` : "First, search for the person:"}
|
|
30
|
+
- \`gramps_find\` - Full-text search if you only know the name
|
|
31
|
+
- \`gramps_search\` with entity_type="people" - For structured GQL queries like \`primary_name.first_name ~ ${args?.name?.split(" ")[0] || "John"}\`
|
|
32
|
+
|
|
33
|
+
## Step 2: Get Full Details
|
|
34
|
+
Once you have the person's handle from search results:
|
|
35
|
+
- \`gramps_get\` with entity_type="people" and the handle
|
|
36
|
+
|
|
37
|
+
## Step 3: Explore Lineage
|
|
38
|
+
With the person's handle:
|
|
39
|
+
- \`gramps_get_ancestors\` - View parents, grandparents (up to 10 generations)
|
|
40
|
+
- \`gramps_get_descendants\` - View children, grandchildren
|
|
41
|
+
|
|
42
|
+
## Step 4: Examine Related Records
|
|
43
|
+
Check linked entities:
|
|
44
|
+
- Events: Birth, death, marriage dates from event_ref_list
|
|
45
|
+
- Families: Spouse and children from family_list
|
|
46
|
+
- Sources: Documentation from citation_list
|
|
47
|
+
|
|
48
|
+
What would you like to do first?`,
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Add a new family member
|
|
55
|
+
*/
|
|
56
|
+
const addFamilyMember = {
|
|
57
|
+
name: "add-family-member",
|
|
58
|
+
description: "Workflow for creating a person and linking them to an existing family",
|
|
59
|
+
arguments: [
|
|
60
|
+
{
|
|
61
|
+
name: "relationship",
|
|
62
|
+
description: "Relationship type: parent, child, or spouse",
|
|
63
|
+
required: false,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
getMessages: (args) => {
|
|
67
|
+
const rel = args?.relationship?.toLowerCase() || "family member";
|
|
68
|
+
return [
|
|
69
|
+
{
|
|
70
|
+
role: "user",
|
|
71
|
+
content: `Help me add a new ${rel} to my family tree.`,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
role: "assistant",
|
|
75
|
+
content: `I'll help you add a new ${rel}. Here's the workflow:
|
|
76
|
+
|
|
77
|
+
## Step 1: Create the Person
|
|
78
|
+
Use \`gramps_create_person\` with:
|
|
79
|
+
\`\`\`json
|
|
80
|
+
{
|
|
81
|
+
"primary_name": {
|
|
82
|
+
"first_name": "...",
|
|
83
|
+
"surname": "..."
|
|
84
|
+
},
|
|
85
|
+
"gender": "male" | "female" | "unknown"
|
|
86
|
+
}
|
|
87
|
+
\`\`\`
|
|
88
|
+
Save the returned **handle** - you'll need it for family links.
|
|
89
|
+
|
|
90
|
+
## Step 2: Find or Create the Family
|
|
91
|
+
${rel === "child" ? `Find the parents' family using \`gramps_search\` with entity_type="families", or create one with \`gramps_create_family\`.` : ""}
|
|
92
|
+
${rel === "parent" ? `Find the child's parent family using their parent_family_list, or create a new family with \`gramps_create_family\`.` : ""}
|
|
93
|
+
${rel === "spouse" ? `Create a new family with \`gramps_create_family\` using both person handles.` : ""}
|
|
94
|
+
${!["child", "parent", "spouse"].includes(rel) ? `Use \`gramps_search\` to find existing families, or create one with \`gramps_create_family\`.` : ""}
|
|
95
|
+
|
|
96
|
+
## Step 3: Link to Family
|
|
97
|
+
Use \`gramps_create_family\` with appropriate handles:
|
|
98
|
+
- \`father_handle\`: Father's person handle
|
|
99
|
+
- \`mother_handle\`: Mother's person handle
|
|
100
|
+
- \`child_ref_list\`: Array of \`{ "ref": "child_handle" }\`
|
|
101
|
+
|
|
102
|
+
## Step 4: Add Life Events (Optional)
|
|
103
|
+
Create events with \`gramps_create_event\`:
|
|
104
|
+
- Birth: \`{ "type": "Birth", "date": { "dateval": [day, month, year] } }\`
|
|
105
|
+
- Death, Marriage, Baptism, etc.
|
|
106
|
+
|
|
107
|
+
Do you have the person's information ready?`,
|
|
108
|
+
},
|
|
109
|
+
];
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Get tree overview
|
|
114
|
+
*/
|
|
115
|
+
const treeOverview = {
|
|
116
|
+
name: "tree-overview",
|
|
117
|
+
description: "Get database statistics and recent activity summary",
|
|
118
|
+
getMessages: () => [
|
|
119
|
+
{
|
|
120
|
+
role: "user",
|
|
121
|
+
content: "Give me an overview of my family tree database.",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
role: "assistant",
|
|
125
|
+
content: `I'll get you a comprehensive overview of your family tree. Let me run these analyses:
|
|
126
|
+
|
|
127
|
+
## Getting Tree Statistics
|
|
128
|
+
I'll use \`gramps_tree_stats\` to get counts of:
|
|
129
|
+
- People, Families, Events
|
|
130
|
+
- Places, Sources, Citations
|
|
131
|
+
- Media, Notes, Repositories
|
|
132
|
+
|
|
133
|
+
## Checking Recent Activity
|
|
134
|
+
I'll use \`gramps_recent_changes\` to see what's been modified lately.
|
|
135
|
+
|
|
136
|
+
## Next Steps After Overview
|
|
137
|
+
Based on what we find:
|
|
138
|
+
- **If tree is empty**: We'll start adding people with \`gramps_create_person\`
|
|
139
|
+
- **If tree has data**: We can search with \`gramps_find\` or explore lineages
|
|
140
|
+
|
|
141
|
+
Let me fetch the statistics now.`,
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* GQL query syntax help
|
|
147
|
+
*/
|
|
148
|
+
const gqlQueryHelp = {
|
|
149
|
+
name: "gql-query-help",
|
|
150
|
+
description: "Reference guide for Gramps Query Language (GQL) syntax",
|
|
151
|
+
getMessages: () => [
|
|
152
|
+
{
|
|
153
|
+
role: "user",
|
|
154
|
+
content: "How do I write GQL queries for Gramps search?",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
role: "assistant",
|
|
158
|
+
content: `# Gramps Query Language (GQL) Reference
|
|
159
|
+
|
|
160
|
+
GQL is used with the \`gramps_search\` tool for structured queries.
|
|
161
|
+
|
|
162
|
+
## Basic Syntax
|
|
163
|
+
\`\`\`
|
|
164
|
+
property = value # Exact match
|
|
165
|
+
property ~ value # Contains (partial match)
|
|
166
|
+
property > value # Greater than
|
|
167
|
+
property < value # Less than
|
|
168
|
+
\`\`\`
|
|
169
|
+
|
|
170
|
+
## Logical Operators
|
|
171
|
+
\`\`\`
|
|
172
|
+
query1 and query2 # Both conditions (lowercase!)
|
|
173
|
+
query1 or query2 # Either condition
|
|
174
|
+
\`\`\`
|
|
175
|
+
|
|
176
|
+
## Common Person Queries
|
|
177
|
+
\`\`\`
|
|
178
|
+
primary_name.surname_list[0].surname ~ Smith # Surname contains Smith
|
|
179
|
+
primary_name.first_name = John # First name is John
|
|
180
|
+
gender = 1 # Males (0=female, 1=male, 2=unknown)
|
|
181
|
+
gender = 0 # Females
|
|
182
|
+
media_list.length > 0 # Has media attached
|
|
183
|
+
\`\`\`
|
|
184
|
+
|
|
185
|
+
## Common Event Queries
|
|
186
|
+
\`\`\`
|
|
187
|
+
type.string = Birth # Birth events
|
|
188
|
+
type.string = Marriage # Marriage events
|
|
189
|
+
date.dateval[2] > 1900 # Year after 1900 (dateval = [day, month, year])
|
|
190
|
+
\`\`\`
|
|
191
|
+
|
|
192
|
+
## Common Place Queries
|
|
193
|
+
\`\`\`
|
|
194
|
+
name.value ~ London # Name contains "London"
|
|
195
|
+
place_type.string = City # Cities only
|
|
196
|
+
\`\`\`
|
|
197
|
+
|
|
198
|
+
## Example Usage
|
|
199
|
+
\`\`\`json
|
|
200
|
+
{
|
|
201
|
+
"query": "gender = 1 and primary_name.first_name ~ John",
|
|
202
|
+
"entity_type": "people",
|
|
203
|
+
"pagesize": 20
|
|
204
|
+
}
|
|
205
|
+
\`\`\`
|
|
206
|
+
|
|
207
|
+
Would you like help constructing a specific query?`,
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Link family relationships
|
|
213
|
+
*/
|
|
214
|
+
const linkFamily = {
|
|
215
|
+
name: "link-family",
|
|
216
|
+
description: "Create family relationships between existing people",
|
|
217
|
+
arguments: [
|
|
218
|
+
{
|
|
219
|
+
name: "relationship_type",
|
|
220
|
+
description: "Type: marriage, parent-child, or siblings",
|
|
221
|
+
required: false,
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
getMessages: (args) => {
|
|
225
|
+
const relType = args?.relationship_type?.toLowerCase() || "family";
|
|
226
|
+
return [
|
|
227
|
+
{
|
|
228
|
+
role: "user",
|
|
229
|
+
content: `Help me link ${relType} relationships between people.`,
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
role: "assistant",
|
|
233
|
+
content: `I'll help you create ${relType} relationships.
|
|
234
|
+
|
|
235
|
+
## Prerequisites
|
|
236
|
+
You need the **handles** of the people you want to link. If you don't have them:
|
|
237
|
+
1. Use \`gramps_find\` to search by name
|
|
238
|
+
2. Note the handle from each search result
|
|
239
|
+
|
|
240
|
+
## Creating the Family Link
|
|
241
|
+
|
|
242
|
+
${relType === "marriage" || relType === "spouse" ? `### Marriage/Spouse Relationship
|
|
243
|
+
Use \`gramps_create_family\`:
|
|
244
|
+
\`\`\`json
|
|
245
|
+
{
|
|
246
|
+
"father_handle": "husband_handle_here",
|
|
247
|
+
"mother_handle": "wife_handle_here",
|
|
248
|
+
"type": "Married"
|
|
249
|
+
}
|
|
250
|
+
\`\`\`
|
|
251
|
+
Then add a Marriage event with \`gramps_create_event\`.` : ""}
|
|
252
|
+
|
|
253
|
+
${relType === "parent-child" || relType === "child" ? `### Parent-Child Relationship
|
|
254
|
+
Use \`gramps_create_family\`:
|
|
255
|
+
\`\`\`json
|
|
256
|
+
{
|
|
257
|
+
"father_handle": "father_handle_here",
|
|
258
|
+
"mother_handle": "mother_handle_here",
|
|
259
|
+
"child_ref_list": [
|
|
260
|
+
{ "ref": "child_handle_here" }
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
\`\`\`` : ""}
|
|
264
|
+
|
|
265
|
+
${relType === "siblings" ? `### Sibling Relationship
|
|
266
|
+
Siblings share the same parent family. Use \`gramps_create_family\`:
|
|
267
|
+
\`\`\`json
|
|
268
|
+
{
|
|
269
|
+
"father_handle": "shared_father_handle",
|
|
270
|
+
"mother_handle": "shared_mother_handle",
|
|
271
|
+
"child_ref_list": [
|
|
272
|
+
{ "ref": "sibling1_handle" },
|
|
273
|
+
{ "ref": "sibling2_handle" }
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
\`\`\`` : ""}
|
|
277
|
+
|
|
278
|
+
${!["marriage", "spouse", "parent-child", "child", "siblings"].includes(relType) ? `### General Family Creation
|
|
279
|
+
Use \`gramps_create_family\` with appropriate handles:
|
|
280
|
+
- \`father_handle\`: Father's person handle
|
|
281
|
+
- \`mother_handle\`: Mother's person handle
|
|
282
|
+
- \`child_ref_list\`: Array of \`{ "ref": "child_handle" }\`
|
|
283
|
+
- \`type\`: Relationship type (Married, Unknown, etc.)` : ""}
|
|
284
|
+
|
|
285
|
+
## After Creating the Family
|
|
286
|
+
The family handle can be used to:
|
|
287
|
+
- Add more children later
|
|
288
|
+
- Attach marriage events
|
|
289
|
+
- Link to sources/citations
|
|
290
|
+
|
|
291
|
+
Do you have the person handles ready, or should we search for them first?`,
|
|
292
|
+
},
|
|
293
|
+
];
|
|
294
|
+
},
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* Export all prompts
|
|
298
|
+
*/
|
|
299
|
+
export const grampsPrompts = {
|
|
300
|
+
"research-person": researchPerson,
|
|
301
|
+
"add-family-member": addFamilyMember,
|
|
302
|
+
"tree-overview": treeOverview,
|
|
303
|
+
"gql-query-help": gqlQueryHelp,
|
|
304
|
+
"link-family": linkFamily,
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* Get prompt names for listing
|
|
308
|
+
*/
|
|
309
|
+
export const promptNames = Object.keys(grampsPrompts);
|
|
310
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAeH;;GAEG;AACH,MAAM,cAAc,GAAiB;IACnC,IAAI,EAAE,iBA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ean>;
|
|
638
638
|
}, "strip", z.ZodTypeAny, {
|
|
639
639
|
title?: string | undefined;
|
|
640
|
-
gramps_id?: string | undefined;
|
|
641
|
-
media_list?: {
|
|
642
|
-
ref: string;
|
|
643
|
-
_class?: "MediaRef" | undefined;
|
|
644
|
-
rect?: number[] | undefined;
|
|
645
|
-
}[] | undefined;
|
|
646
|
-
citation_list?: string[] | undefined;
|
|
647
|
-
note_list?: string[] | undefined;
|
|
648
|
-
tag_list?: string[] | undefined;
|
|
649
|
-
private?: boolean | undefined;
|
|
650
640
|
name?: {
|
|
651
641
|
value?: string | undefined;
|
|
652
642
|
_class?: "PlaceName" | undefined;
|
|
@@ -662,6 +652,16 @@ export declare const createPlaceSchema: z.ZodObject<{
|
|
|
662
652
|
} | undefined;
|
|
663
653
|
lang?: string | undefined;
|
|
664
654
|
} | undefined;
|
|
655
|
+
gramps_id?: string | undefined;
|
|
656
|
+
media_list?: {
|
|
657
|
+
ref: string;
|
|
658
|
+
_class?: "MediaRef" | undefined;
|
|
659
|
+
rect?: number[] | undefined;
|
|
660
|
+
}[] | undefined;
|
|
661
|
+
citation_list?: string[] | undefined;
|
|
662
|
+
note_list?: string[] | undefined;
|
|
663
|
+
tag_list?: string[] | undefined;
|
|
664
|
+
private?: boolean | undefined;
|
|
665
665
|
alt_names?: {
|
|
666
666
|
value?: string | undefined;
|
|
667
667
|
_class?: "PlaceName" | undefined;
|
|
@@ -696,16 +696,6 @@ export declare const createPlaceSchema: z.ZodObject<{
|
|
|
696
696
|
place_type?: string | undefined;
|
|
697
697
|
}, {
|
|
698
698
|
title?: string | undefined;
|
|
699
|
-
gramps_id?: string | undefined;
|
|
700
|
-
media_list?: {
|
|
701
|
-
ref: string;
|
|
702
|
-
_class?: "MediaRef" | undefined;
|
|
703
|
-
rect?: number[] | undefined;
|
|
704
|
-
}[] | undefined;
|
|
705
|
-
citation_list?: string[] | undefined;
|
|
706
|
-
note_list?: string[] | undefined;
|
|
707
|
-
tag_list?: string[] | undefined;
|
|
708
|
-
private?: boolean | undefined;
|
|
709
699
|
name?: {
|
|
710
700
|
value?: string | undefined;
|
|
711
701
|
_class?: "PlaceName" | undefined;
|
|
@@ -721,6 +711,16 @@ export declare const createPlaceSchema: z.ZodObject<{
|
|
|
721
711
|
} | undefined;
|
|
722
712
|
lang?: string | undefined;
|
|
723
713
|
} | undefined;
|
|
714
|
+
gramps_id?: string | undefined;
|
|
715
|
+
media_list?: {
|
|
716
|
+
ref: string;
|
|
717
|
+
_class?: "MediaRef" | undefined;
|
|
718
|
+
rect?: number[] | undefined;
|
|
719
|
+
}[] | undefined;
|
|
720
|
+
citation_list?: string[] | undefined;
|
|
721
|
+
note_list?: string[] | undefined;
|
|
722
|
+
tag_list?: string[] | undefined;
|
|
723
|
+
private?: boolean | undefined;
|
|
724
724
|
alt_names?: {
|
|
725
725
|
value?: string | undefined;
|
|
726
726
|
_class?: "PlaceName" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../../src/tools/analysis.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../../src/tools/analysis.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,QAAA,MAAM,aAAa;;;;;;;;;EASjB,CAAC;AAGH,QAAA,MAAM,mBAAmB;;;;;;;;;EAGvB,CAAC;AAEH;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAsFvD;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GACpC,OAAO,CAAC,MAAM,CAAC,CA+GjB;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GACpC,OAAO,CAAC,MAAM,CAAC,CAyGjB;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,GAC1C,OAAO,CAAC,MAAM,CAAC,CA8GjB;AAGD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FzB,CAAC"}
|