@mythxengine/mcp-server 0.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.
Files changed (214) hide show
  1. package/LICENSE +21 -0
  2. package/dist/__tests__/assemble.test.d.ts +2 -0
  3. package/dist/__tests__/assemble.test.d.ts.map +1 -0
  4. package/dist/__tests__/assemble.test.js +81 -0
  5. package/dist/__tests__/assemble.test.js.map +1 -0
  6. package/dist/index.d.ts +10 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +38 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/resources/index.d.ts +9 -0
  11. package/dist/resources/index.d.ts.map +1 -0
  12. package/dist/resources/index.js +202 -0
  13. package/dist/resources/index.js.map +1 -0
  14. package/dist/server.d.ts +41 -0
  15. package/dist/server.d.ts.map +1 -0
  16. package/dist/server.js +91 -0
  17. package/dist/server.js.map +1 -0
  18. package/dist/state/manager.d.ts +88 -0
  19. package/dist/state/manager.d.ts.map +1 -0
  20. package/dist/state/manager.js +308 -0
  21. package/dist/state/manager.js.map +1 -0
  22. package/dist/state/rules.d.ts +30 -0
  23. package/dist/state/rules.d.ts.map +1 -0
  24. package/dist/state/rules.js +61 -0
  25. package/dist/state/rules.js.map +1 -0
  26. package/dist/state/worldpacks.d.ts +43 -0
  27. package/dist/state/worldpacks.d.ts.map +1 -0
  28. package/dist/state/worldpacks.js +125 -0
  29. package/dist/state/worldpacks.js.map +1 -0
  30. package/dist/tools/augmentation/augment.d.ts +15 -0
  31. package/dist/tools/augmentation/augment.d.ts.map +1 -0
  32. package/dist/tools/augmentation/augment.js +512 -0
  33. package/dist/tools/augmentation/augment.js.map +1 -0
  34. package/dist/tools/augmentation/index.d.ts +6 -0
  35. package/dist/tools/augmentation/index.d.ts.map +1 -0
  36. package/dist/tools/augmentation/index.js +7 -0
  37. package/dist/tools/augmentation/index.js.map +1 -0
  38. package/dist/tools/characters.d.ts +26 -0
  39. package/dist/tools/characters.d.ts.map +1 -0
  40. package/dist/tools/characters.js +362 -0
  41. package/dist/tools/characters.js.map +1 -0
  42. package/dist/tools/clocks.d.ts +33 -0
  43. package/dist/tools/clocks.d.ts.map +1 -0
  44. package/dist/tools/clocks.js +438 -0
  45. package/dist/tools/clocks.js.map +1 -0
  46. package/dist/tools/combat.d.ts +38 -0
  47. package/dist/tools/combat.d.ts.map +1 -0
  48. package/dist/tools/combat.js +574 -0
  49. package/dist/tools/combat.js.map +1 -0
  50. package/dist/tools/dice.d.ts +9 -0
  51. package/dist/tools/dice.d.ts.map +1 -0
  52. package/dist/tools/dice.js +287 -0
  53. package/dist/tools/dice.js.map +1 -0
  54. package/dist/tools/encounters.d.ts +21 -0
  55. package/dist/tools/encounters.d.ts.map +1 -0
  56. package/dist/tools/encounters.js +521 -0
  57. package/dist/tools/encounters.js.map +1 -0
  58. package/dist/tools/engagement.d.ts +25 -0
  59. package/dist/tools/engagement.d.ts.map +1 -0
  60. package/dist/tools/engagement.js +491 -0
  61. package/dist/tools/engagement.js.map +1 -0
  62. package/dist/tools/expansion/archetype.d.ts +12 -0
  63. package/dist/tools/expansion/archetype.d.ts.map +1 -0
  64. package/dist/tools/expansion/archetype.js +157 -0
  65. package/dist/tools/expansion/archetype.js.map +1 -0
  66. package/dist/tools/expansion/index.d.ts +12 -0
  67. package/dist/tools/expansion/index.d.ts.map +1 -0
  68. package/dist/tools/expansion/index.js +21 -0
  69. package/dist/tools/expansion/index.js.map +1 -0
  70. package/dist/tools/expansion/location.d.ts +12 -0
  71. package/dist/tools/expansion/location.d.ts.map +1 -0
  72. package/dist/tools/expansion/location.js +149 -0
  73. package/dist/tools/expansion/location.js.map +1 -0
  74. package/dist/tools/expansion/monster.d.ts +12 -0
  75. package/dist/tools/expansion/monster.d.ts.map +1 -0
  76. package/dist/tools/expansion/monster.js +157 -0
  77. package/dist/tools/expansion/monster.js.map +1 -0
  78. package/dist/tools/expansion/npc.d.ts +12 -0
  79. package/dist/tools/expansion/npc.d.ts.map +1 -0
  80. package/dist/tools/expansion/npc.js +153 -0
  81. package/dist/tools/expansion/npc.js.map +1 -0
  82. package/dist/tools/generation/archetypes.d.ts +12 -0
  83. package/dist/tools/generation/archetypes.d.ts.map +1 -0
  84. package/dist/tools/generation/archetypes.js +129 -0
  85. package/dist/tools/generation/archetypes.js.map +1 -0
  86. package/dist/tools/generation/arcs.d.ts +13 -0
  87. package/dist/tools/generation/arcs.d.ts.map +1 -0
  88. package/dist/tools/generation/arcs.js +186 -0
  89. package/dist/tools/generation/arcs.js.map +1 -0
  90. package/dist/tools/generation/encounters.d.ts +12 -0
  91. package/dist/tools/generation/encounters.d.ts.map +1 -0
  92. package/dist/tools/generation/encounters.js +169 -0
  93. package/dist/tools/generation/encounters.js.map +1 -0
  94. package/dist/tools/generation/index.d.ts +19 -0
  95. package/dist/tools/generation/index.d.ts.map +1 -0
  96. package/dist/tools/generation/index.js +42 -0
  97. package/dist/tools/generation/index.js.map +1 -0
  98. package/dist/tools/generation/items.d.ts +12 -0
  99. package/dist/tools/generation/items.d.ts.map +1 -0
  100. package/dist/tools/generation/items.js +149 -0
  101. package/dist/tools/generation/items.js.map +1 -0
  102. package/dist/tools/generation/locations.d.ts +12 -0
  103. package/dist/tools/generation/locations.d.ts.map +1 -0
  104. package/dist/tools/generation/locations.js +131 -0
  105. package/dist/tools/generation/locations.js.map +1 -0
  106. package/dist/tools/generation/monsters.d.ts +12 -0
  107. package/dist/tools/generation/monsters.d.ts.map +1 -0
  108. package/dist/tools/generation/monsters.js +154 -0
  109. package/dist/tools/generation/monsters.js.map +1 -0
  110. package/dist/tools/generation/narrative.d.ts +12 -0
  111. package/dist/tools/generation/narrative.d.ts.map +1 -0
  112. package/dist/tools/generation/narrative.js +129 -0
  113. package/dist/tools/generation/narrative.js.map +1 -0
  114. package/dist/tools/generation/npcs.d.ts +12 -0
  115. package/dist/tools/generation/npcs.d.ts.map +1 -0
  116. package/dist/tools/generation/npcs.js +136 -0
  117. package/dist/tools/generation/npcs.js.map +1 -0
  118. package/dist/tools/generation/resume.d.ts +12 -0
  119. package/dist/tools/generation/resume.d.ts.map +1 -0
  120. package/dist/tools/generation/resume.js +288 -0
  121. package/dist/tools/generation/resume.js.map +1 -0
  122. package/dist/tools/generation/rules-prompt.d.ts +23 -0
  123. package/dist/tools/generation/rules-prompt.d.ts.map +1 -0
  124. package/dist/tools/generation/rules-prompt.js +209 -0
  125. package/dist/tools/generation/rules-prompt.js.map +1 -0
  126. package/dist/tools/generation/seed.d.ts +12 -0
  127. package/dist/tools/generation/seed.d.ts.map +1 -0
  128. package/dist/tools/generation/seed.js +171 -0
  129. package/dist/tools/generation/seed.js.map +1 -0
  130. package/dist/tools/generation/situations.d.ts +13 -0
  131. package/dist/tools/generation/situations.d.ts.map +1 -0
  132. package/dist/tools/generation/situations.js +247 -0
  133. package/dist/tools/generation/situations.js.map +1 -0
  134. package/dist/tools/gm-guidance.d.ts +13 -0
  135. package/dist/tools/gm-guidance.d.ts.map +1 -0
  136. package/dist/tools/gm-guidance.js +395 -0
  137. package/dist/tools/gm-guidance.js.map +1 -0
  138. package/dist/tools/index.d.ts +33 -0
  139. package/dist/tools/index.d.ts.map +1 -0
  140. package/dist/tools/index.js +80 -0
  141. package/dist/tools/index.js.map +1 -0
  142. package/dist/tools/investigation.d.ts +41 -0
  143. package/dist/tools/investigation.d.ts.map +1 -0
  144. package/dist/tools/investigation.js +586 -0
  145. package/dist/tools/investigation.js.map +1 -0
  146. package/dist/tools/leads.d.ts +29 -0
  147. package/dist/tools/leads.d.ts.map +1 -0
  148. package/dist/tools/leads.js +460 -0
  149. package/dist/tools/leads.js.map +1 -0
  150. package/dist/tools/players.d.ts +30 -0
  151. package/dist/tools/players.d.ts.map +1 -0
  152. package/dist/tools/players.js +448 -0
  153. package/dist/tools/players.js.map +1 -0
  154. package/dist/tools/portable-clues.d.ts +29 -0
  155. package/dist/tools/portable-clues.d.ts.map +1 -0
  156. package/dist/tools/portable-clues.js +490 -0
  157. package/dist/tools/portable-clues.js.map +1 -0
  158. package/dist/tools/relationships.d.ts +29 -0
  159. package/dist/tools/relationships.d.ts.map +1 -0
  160. package/dist/tools/relationships.js +471 -0
  161. package/dist/tools/relationships.js.map +1 -0
  162. package/dist/tools/scene-framing.d.ts +21 -0
  163. package/dist/tools/scene-framing.d.ts.map +1 -0
  164. package/dist/tools/scene-framing.js +380 -0
  165. package/dist/tools/scene-framing.js.map +1 -0
  166. package/dist/tools/sessions.d.ts +30 -0
  167. package/dist/tools/sessions.d.ts.map +1 -0
  168. package/dist/tools/sessions.js +253 -0
  169. package/dist/tools/sessions.js.map +1 -0
  170. package/dist/tools/time.d.ts +26 -0
  171. package/dist/tools/time.d.ts.map +1 -0
  172. package/dist/tools/time.js +438 -0
  173. package/dist/tools/time.js.map +1 -0
  174. package/dist/tools/turns.d.ts +38 -0
  175. package/dist/tools/turns.d.ts.map +1 -0
  176. package/dist/tools/turns.js +560 -0
  177. package/dist/tools/turns.js.map +1 -0
  178. package/dist/tools/worldpack/assemble.d.ts +20 -0
  179. package/dist/tools/worldpack/assemble.d.ts.map +1 -0
  180. package/dist/tools/worldpack/assemble.js +237 -0
  181. package/dist/tools/worldpack/assemble.js.map +1 -0
  182. package/dist/tools/worldpack/docs-generator.d.ts +18 -0
  183. package/dist/tools/worldpack/docs-generator.d.ts.map +1 -0
  184. package/dist/tools/worldpack/docs-generator.js +264 -0
  185. package/dist/tools/worldpack/docs-generator.js.map +1 -0
  186. package/dist/tools/worldpack/export.d.ts +12 -0
  187. package/dist/tools/worldpack/export.d.ts.map +1 -0
  188. package/dist/tools/worldpack/export.js +209 -0
  189. package/dist/tools/worldpack/export.js.map +1 -0
  190. package/dist/tools/worldpack/index.d.ts +15 -0
  191. package/dist/tools/worldpack/index.d.ts.map +1 -0
  192. package/dist/tools/worldpack/index.js +30 -0
  193. package/dist/tools/worldpack/index.js.map +1 -0
  194. package/dist/tools/worldpack/lookup.d.ts +19 -0
  195. package/dist/tools/worldpack/lookup.d.ts.map +1 -0
  196. package/dist/tools/worldpack/lookup.js +320 -0
  197. package/dist/tools/worldpack/lookup.js.map +1 -0
  198. package/dist/tools/worldpack/manage.d.ts +20 -0
  199. package/dist/tools/worldpack/manage.d.ts.map +1 -0
  200. package/dist/tools/worldpack/manage.js +101 -0
  201. package/dist/tools/worldpack/manage.js.map +1 -0
  202. package/dist/tools/worldpack/save-result.d.ts +12 -0
  203. package/dist/tools/worldpack/save-result.d.ts.map +1 -0
  204. package/dist/tools/worldpack/save-result.js +222 -0
  205. package/dist/tools/worldpack/save-result.js.map +1 -0
  206. package/dist/tools/worldpack/summary.d.ts +13 -0
  207. package/dist/tools/worldpack/summary.d.ts.map +1 -0
  208. package/dist/tools/worldpack/summary.js +180 -0
  209. package/dist/tools/worldpack/summary.js.map +1 -0
  210. package/dist/tools/worldpack/validate.d.ts +12 -0
  211. package/dist/tools/worldpack/validate.d.ts.map +1 -0
  212. package/dist/tools/worldpack/validate.js +388 -0
  213. package/dist/tools/worldpack/validate.js.map +1 -0
  214. package/package.json +59 -0
@@ -0,0 +1,491 @@
1
+ /**
2
+ * Engagement Hook Generator
3
+ *
4
+ * Tools for "treasure, personal, mystery" engagement encodings.
5
+ * Based on Alexandrian: "Make lore stick via treasure, mystery, personal ties."
6
+ */
7
+ import { z } from "zod";
8
+ import { sessionManager } from "../state/manager.js";
9
+ // Hook types
10
+ const HOOK_TYPES = ["personal", "treasure", "mystery", "threat"];
11
+ // Input schemas
12
+ const PersonalizeContentInput = z.object({
13
+ sessionId: z.string(),
14
+ content: z.string(),
15
+ characterId: z.string(),
16
+ });
17
+ const TreasurifyInformationInput = z.object({
18
+ sessionId: z.string(),
19
+ information: z.string(),
20
+ context: z.string(),
21
+ });
22
+ const MystifyContentInput = z.object({
23
+ sessionId: z.string(),
24
+ fullRevelation: z.string(),
25
+ fragmentCount: z.number().min(2).max(6),
26
+ });
27
+ const GenerateEngagementHooksInput = z.object({
28
+ sessionId: z.string(),
29
+ situationId: z.string().optional(),
30
+ locationId: z.string().optional(),
31
+ theme: z.string().optional(),
32
+ });
33
+ /**
34
+ * Analyze character for personalization hooks
35
+ */
36
+ function analyzeCharacter(character) {
37
+ const themes = [];
38
+ const keywords = [];
39
+ const connections = [];
40
+ // Parse background for themes
41
+ const background = (character.background || "").toLowerCase();
42
+ // Common RPG themes
43
+ const themePatterns = [
44
+ [/family|parent|child|sibling|orphan/, "family"],
45
+ [/home|village|town|city|birthplace|homeland/, "homeland"],
46
+ [/mentor|teacher|master|train/, "mentorship"],
47
+ [/revenge|vendetta|hunt|enemy|betrayed/, "revenge"],
48
+ [/lost|missing|search|find|seek/, "quest"],
49
+ [/debt|owe|promise|oath|vow/, "obligation"],
50
+ [/crime|guilt|sin|secret|hide/, "guilt"],
51
+ [/faith|god|divine|sacred|temple/, "faith"],
52
+ [/wealth|gold|treasure|rich|poor/, "wealth"],
53
+ [/honor|duty|code|order|law/, "honor"],
54
+ [/magic|arcane|power|gift|curse/, "magic"],
55
+ [/war|battle|soldier|fought|veteran/, "warfare"],
56
+ [/love|heart|beloved|marry|partner/, "love"],
57
+ [/death|dead|grave|mourning|loss/, "death"],
58
+ [/guild|organization|order|brotherhood/, "faction"],
59
+ ];
60
+ for (const [pattern, theme] of themePatterns) {
61
+ if (pattern.test(background)) {
62
+ themes.push(theme);
63
+ }
64
+ }
65
+ // Extract proper nouns (capitalized words) as potential connections
66
+ const propernounPattern = /\b[A-Z][a-z]+(?:\s+[A-Z][a-z]+)*/g;
67
+ const matches = character.background?.match(propernounPattern) || [];
68
+ connections.push(...matches.filter(m => m !== character.name));
69
+ // Personality traits as keywords
70
+ if (character.personality) {
71
+ keywords.push(...character.personality);
72
+ }
73
+ // Flags as keywords
74
+ if (character.flags) {
75
+ keywords.push(...character.flags);
76
+ }
77
+ return { themes, keywords, connections };
78
+ }
79
+ /**
80
+ * personalize_content tool
81
+ */
82
+ export const personalizeContentTool = {
83
+ name: "personalize_content",
84
+ description: "Connect abstract information to a PC's backstory, making it personally relevant.",
85
+ inputSchema: {
86
+ type: "object",
87
+ properties: {
88
+ sessionId: { type: "string", description: "Session ID" },
89
+ content: { type: "string", description: "The information or event to personalize" },
90
+ characterId: { type: "string", description: "PC to connect it to" },
91
+ },
92
+ required: ["sessionId", "content", "characterId"],
93
+ },
94
+ handler: async (args) => {
95
+ const input = PersonalizeContentInput.parse(args);
96
+ const session = await sessionManager.get(input.sessionId);
97
+ if (!session) {
98
+ throw new Error(`Session not found: ${input.sessionId}`);
99
+ }
100
+ const character = session.characters[input.characterId];
101
+ if (!character) {
102
+ throw new Error(`Character not found: ${input.characterId}`);
103
+ }
104
+ const analysis = analyzeCharacter(character);
105
+ const suggestions = [];
106
+ // Generate connections based on themes
107
+ if (analysis.themes.includes("family")) {
108
+ suggestions.push({
109
+ connection: "Reminds them of family or home",
110
+ delivery: `"Something about this reminds ${character.name} of home..."`,
111
+ impact: "Emotional investment, protective instinct",
112
+ });
113
+ }
114
+ if (analysis.themes.includes("revenge")) {
115
+ suggestions.push({
116
+ connection: "Connected to their vendetta",
117
+ delivery: `${character.name} recognizes a symbol or name connected to their past`,
118
+ impact: "Personal stakes, urgency to investigate",
119
+ });
120
+ }
121
+ if (analysis.themes.includes("guilt")) {
122
+ suggestions.push({
123
+ connection: "Echoes their past mistakes",
124
+ delivery: `This situation mirrors something ${character.name} wishes they'd done differently`,
125
+ impact: "Redemption opportunity, moral weight",
126
+ });
127
+ }
128
+ if (analysis.themes.includes("faith")) {
129
+ suggestions.push({
130
+ connection: "Religious/philosophical resonance",
131
+ delivery: `${character.name}'s beliefs give them unique insight into this matter`,
132
+ impact: "Expertise moment, faith tested or affirmed",
133
+ });
134
+ }
135
+ if (analysis.themes.includes("mentorship")) {
136
+ suggestions.push({
137
+ connection: "Recalls their mentor's teachings",
138
+ delivery: `${character.name} remembers their mentor speaking of something like this`,
139
+ impact: "Guidance from the past, legacy connection",
140
+ });
141
+ }
142
+ // Add generic suggestions if no strong matches
143
+ if (suggestions.length === 0) {
144
+ suggestions.push({
145
+ connection: "Expertise or past experience",
146
+ delivery: `${character.name} has seen something like this before in their travels`,
147
+ impact: "Character gets to show competence",
148
+ });
149
+ suggestions.push({
150
+ connection: "Personal curiosity",
151
+ delivery: `Something about this catches ${character.name}'s attention specifically`,
152
+ impact: "Player agency, character-driven investigation",
153
+ });
154
+ }
155
+ // Add connections to named entities if found
156
+ for (const namedEntity of analysis.connections.slice(0, 3)) {
157
+ suggestions.push({
158
+ connection: `Connection to ${namedEntity}`,
159
+ delivery: `${character.name} recognizes this is connected to ${namedEntity}`,
160
+ impact: "Backstory integration, world feels personal",
161
+ });
162
+ }
163
+ return {
164
+ character: {
165
+ name: character.name,
166
+ themes: analysis.themes,
167
+ connections: analysis.connections,
168
+ },
169
+ content: input.content,
170
+ suggestions: suggestions.slice(0, 5),
171
+ tip: "Choose the connection that resonates most with current events. Let the player discover the connection rather than telling them outright.",
172
+ };
173
+ },
174
+ };
175
+ /**
176
+ * treasurify_information tool
177
+ */
178
+ export const treasurifyInformationTool = {
179
+ name: "treasurify_information",
180
+ description: "Package information as a valuable discovery - a physical item, document, or reward.",
181
+ inputSchema: {
182
+ type: "object",
183
+ properties: {
184
+ sessionId: { type: "string", description: "Session ID" },
185
+ information: { type: "string", description: "The lore or plot point to make valuable" },
186
+ context: { type: "string", description: "Current situation for context" },
187
+ },
188
+ required: ["sessionId", "information", "context"],
189
+ },
190
+ handler: async (args) => {
191
+ const input = TreasurifyInformationInput.parse(args);
192
+ const session = await sessionManager.get(input.sessionId);
193
+ if (!session) {
194
+ throw new Error(`Session not found: ${input.sessionId}`);
195
+ }
196
+ // Get world tone for appropriate suggestions
197
+ const tone = (session.worldState?.worldSeed?.settings?.tone) || "neutral";
198
+ const toneIsDark = tone === "dark" || tone === "gritty" || tone === "horror";
199
+ const asItem = [];
200
+ const asDocument = [];
201
+ const asReward = [];
202
+ // Generate item suggestions
203
+ if (toneIsDark) {
204
+ asItem.push("A worn locket containing a portrait with this name scratched into the back", "A bloodstained token inscribed with this information", "A piece of jewelry with this secret engraved inside", "A key with markings that reveal this when examined closely");
205
+ }
206
+ else {
207
+ asItem.push("A finely crafted pendant with this information encoded in its design", "A commemorative medallion bearing this knowledge", "An heirloom ring with this message hidden inside", "A curious compass that points toward this truth when held");
208
+ }
209
+ // Generate document suggestions
210
+ if (toneIsDark) {
211
+ asDocument.push("A torn page from a journal, the handwriting shaky with fear", "A letter never sent, hidden in a dead messenger's boot", "A confession written in blood, or something like it", "A merchant's ledger with damning entries hidden in the margins");
212
+ }
213
+ else {
214
+ asDocument.push("An old letter from a grateful citizen", "A scholarly treatise with this insight highlighted", "A map with annotations revealing this information", "An official decree or proclamation mentioning this");
215
+ }
216
+ // Generate reward suggestions
217
+ asReward.push("A grateful NPC shares this as payment for help rendered", "A dying person's last words reveal this to those who stayed with them", "A merchant offers this valuable tip instead of gold", "Success at a challenge reveals this information as a natural consequence");
218
+ // Context-specific suggestions
219
+ const contextLower = input.context.toLowerCase();
220
+ const specificSuggestions = [];
221
+ if (contextLower.includes("combat") || contextLower.includes("battle")) {
222
+ specificSuggestions.push("Found on the body of a defeated enemy", "Revealed by a dying foe as their last words", "Discovered in the aftermath, as the party catches their breath");
223
+ }
224
+ if (contextLower.includes("tavern") || contextLower.includes("inn")) {
225
+ specificSuggestions.push("Overheard from a drunk patron who quickly passes out", "Left behind by a previous occupant of their room", "Slipped to them by a mysterious stranger who vanishes");
226
+ }
227
+ if (contextLower.includes("search") || contextLower.includes("investigate")) {
228
+ specificSuggestions.push("Hidden in a false bottom of a container", "Scratched into the underside of furniture", "Sewn into the lining of discarded clothing");
229
+ }
230
+ return {
231
+ information: input.information,
232
+ context: input.context,
233
+ asItem: asItem.slice(0, 3),
234
+ asDocument: asDocument.slice(0, 3),
235
+ asReward: asReward.slice(0, 3),
236
+ specificToContext: specificSuggestions,
237
+ tip: "Physical items players can keep create lasting reminders. Documents can be referenced later. Rewards feel earned.",
238
+ };
239
+ },
240
+ };
241
+ /**
242
+ * mystify_content tool
243
+ */
244
+ export const mystifyContentTool = {
245
+ name: "mystify_content",
246
+ description: "Break complete information into mysterious fragments, creating revelatory discovery.",
247
+ inputSchema: {
248
+ type: "object",
249
+ properties: {
250
+ sessionId: { type: "string", description: "Session ID" },
251
+ fullRevelation: { type: "string", description: "Complete information to fragment" },
252
+ fragmentCount: { type: "number", description: "How many pieces (2-6)" },
253
+ },
254
+ required: ["sessionId", "fullRevelation", "fragmentCount"],
255
+ },
256
+ handler: async (args) => {
257
+ const input = MystifyContentInput.parse(args);
258
+ const session = await sessionManager.get(input.sessionId);
259
+ if (!session) {
260
+ throw new Error(`Session not found: ${input.sessionId}`);
261
+ }
262
+ // Parse the revelation into semantic components
263
+ const revelation = input.fullRevelation;
264
+ const sentences = revelation.split(/[.!?]+/).filter(s => s.trim().length > 0);
265
+ // Generate fragments based on count
266
+ const fragments = [];
267
+ // Strategy: Each fragment reveals some truth but obscures others
268
+ const numFragments = Math.min(input.fragmentCount, Math.max(2, sentences.length));
269
+ // Define fragment patterns
270
+ const fragmentPatterns = [
271
+ {
272
+ pattern: "WHO",
273
+ reveals: "identity of actor",
274
+ hides: "motivation and method",
275
+ },
276
+ {
277
+ pattern: "WHAT",
278
+ reveals: "the action or event",
279
+ hides: "who did it and why",
280
+ },
281
+ {
282
+ pattern: "WHERE",
283
+ reveals: "location of importance",
284
+ hides: "what happens there",
285
+ },
286
+ {
287
+ pattern: "WHEN",
288
+ reveals: "timing or deadline",
289
+ hides: "what will happen",
290
+ },
291
+ {
292
+ pattern: "WHY",
293
+ reveals: "motivation",
294
+ hides: "identity and method",
295
+ },
296
+ {
297
+ pattern: "HOW",
298
+ reveals: "method or means",
299
+ hides: "who and why",
300
+ },
301
+ ];
302
+ // Select patterns based on fragment count
303
+ const selectedPatterns = fragmentPatterns.slice(0, numFragments);
304
+ for (let i = 0; i < numFragments; i++) {
305
+ const patternInfo = selectedPatterns[i] || fragmentPatterns[i % fragmentPatterns.length];
306
+ fragments.push({
307
+ fragment: `[Fragment ${i + 1}: ${patternInfo.pattern}] - Partial truth about "${revelation.substring(0, 50)}..."`,
308
+ whatItReveals: patternInfo.reveals,
309
+ whatItHides: patternInfo.hides,
310
+ });
311
+ }
312
+ // Generate discovery methods for each fragment
313
+ const discoveryMethods = [
314
+ "Found on a document or letter",
315
+ "Overheard from an NPC conversation",
316
+ "Discovered through investigation",
317
+ "Revealed by an ally or contact",
318
+ "Witnessed firsthand",
319
+ "Extracted from an enemy",
320
+ ].slice(0, numFragments);
321
+ // Suggested order based on dramatic structure
322
+ const suggestedOrder = Array.from({ length: numFragments }, (_, i) => i);
323
+ // Put "WHO" or "WHY" last for maximum reveal impact
324
+ const lastIndex = fragments.findIndex(f => f.whatItReveals.includes("identity") || f.whatItReveals.includes("motivation"));
325
+ if (lastIndex !== -1 && lastIndex !== numFragments - 1) {
326
+ suggestedOrder.splice(suggestedOrder.indexOf(lastIndex), 1);
327
+ suggestedOrder.push(lastIndex);
328
+ }
329
+ return {
330
+ fullRevelation: input.fullRevelation,
331
+ fragmentCount: numFragments,
332
+ fragments: fragments.map((f, i) => ({
333
+ index: i,
334
+ guidance: f.fragment,
335
+ reveals: f.whatItReveals,
336
+ obscures: f.whatItHides,
337
+ suggestedDiscovery: discoveryMethods[i],
338
+ })),
339
+ suggestedOrder,
340
+ dramaTip: "Reveal identity or motivation last for maximum impact. Let players piece it together themselves.",
341
+ threeClueTip: "For each critical fragment, create at least 3 ways it can be discovered.",
342
+ };
343
+ },
344
+ };
345
+ /**
346
+ * generate_engagement_hooks tool
347
+ */
348
+ export const generateEngagementHooksTool = {
349
+ name: "generate_engagement_hooks",
350
+ description: "Generate personalized engagement hooks for a situation, location, or theme.",
351
+ inputSchema: {
352
+ type: "object",
353
+ properties: {
354
+ sessionId: { type: "string", description: "Session ID" },
355
+ situationId: { type: "string", description: "Situation to generate hooks for" },
356
+ locationId: { type: "string", description: "Location context" },
357
+ theme: { type: "string", description: "Thematic focus (optional)" },
358
+ },
359
+ required: ["sessionId"],
360
+ },
361
+ handler: async (args) => {
362
+ const input = GenerateEngagementHooksInput.parse(args);
363
+ const session = await sessionManager.get(input.sessionId);
364
+ if (!session) {
365
+ throw new Error(`Session not found: ${input.sessionId}`);
366
+ }
367
+ // Gather context
368
+ const characters = Object.values(session.characters);
369
+ const situations = session.generation?.generatedContent?.situations || [];
370
+ const locations = session.generation?.generatedContent?.locations || [];
371
+ const situation = input.situationId ? situations.find(s => s.id === input.situationId) : null;
372
+ const location = input.locationId ? locations.find(l => l.id === input.locationId) : null;
373
+ const hooks = [];
374
+ // Generate PERSONAL hooks for each character
375
+ for (const char of characters.slice(0, 3)) {
376
+ const analysis = analyzeCharacter(char);
377
+ if (analysis.themes.length > 0) {
378
+ const theme = analysis.themes[0];
379
+ hooks.push({
380
+ type: "personal",
381
+ description: `Connection to ${char.name}'s ${theme} theme`,
382
+ delivery: `Reference their backstory when describing the situation`,
383
+ forCharacter: char.name,
384
+ });
385
+ }
386
+ }
387
+ // Generate TREASURE hooks
388
+ hooks.push({
389
+ type: "treasure",
390
+ description: "Valuable information packaged as physical item",
391
+ delivery: "A letter, journal, or artifact contains crucial plot info",
392
+ });
393
+ hooks.push({
394
+ type: "treasure",
395
+ description: "Reward tied to investigation",
396
+ delivery: "Solving this mystery leads to both answers and material reward",
397
+ });
398
+ // Generate MYSTERY hooks
399
+ if (situation) {
400
+ hooks.push({
401
+ type: "mystery",
402
+ description: `Fragmentary clues about ${situation.name}`,
403
+ delivery: "Break the truth into pieces found in different locations",
404
+ });
405
+ }
406
+ hooks.push({
407
+ type: "mystery",
408
+ description: "Contradictory information",
409
+ delivery: "Two sources give conflicting accounts - which is true?",
410
+ });
411
+ hooks.push({
412
+ type: "mystery",
413
+ description: "Ominous warning without context",
414
+ delivery: "Someone says 'Don't trust the...' before they're interrupted",
415
+ });
416
+ // Generate THREAT hooks
417
+ hooks.push({
418
+ type: "threat",
419
+ description: "Immediate danger to someone they care about",
420
+ delivery: "An NPC ally is threatened if they don't act",
421
+ });
422
+ hooks.push({
423
+ type: "threat",
424
+ description: "Ticking clock with consequences",
425
+ delivery: "Something terrible happens if they don't resolve this in time",
426
+ });
427
+ // Add theme-specific hooks
428
+ if (input.theme) {
429
+ const themeLower = input.theme.toLowerCase();
430
+ if (themeLower.includes("corruption")) {
431
+ hooks.push({
432
+ type: "mystery",
433
+ description: "The corruption has a source that must be found",
434
+ delivery: "Track the corruption to its origin through symptoms and witnesses",
435
+ });
436
+ }
437
+ if (themeLower.includes("betrayal")) {
438
+ hooks.push({
439
+ type: "personal",
440
+ description: "An ally may not be what they seem",
441
+ delivery: "Small inconsistencies in behavior hint at hidden agenda",
442
+ });
443
+ }
444
+ if (themeLower.includes("rescue")) {
445
+ hooks.push({
446
+ type: "threat",
447
+ description: "The victim's condition worsens over time",
448
+ delivery: "Each delay has visible consequences when they finally arrive",
449
+ });
450
+ }
451
+ }
452
+ // Add location-specific hooks
453
+ if (location) {
454
+ hooks.push({
455
+ type: "treasure",
456
+ description: `Secret of ${location.name}`,
457
+ delivery: `Hidden cache or forgotten knowledge in this location`,
458
+ });
459
+ }
460
+ return {
461
+ context: {
462
+ situationId: input.situationId,
463
+ situationName: situation?.name,
464
+ locationId: input.locationId,
465
+ locationName: location?.name,
466
+ theme: input.theme,
467
+ partySize: characters.length,
468
+ },
469
+ hooks: hooks.slice(0, 10).map(h => ({
470
+ type: h.type,
471
+ description: h.description,
472
+ delivery: h.delivery,
473
+ forCharacter: h.forCharacter,
474
+ })),
475
+ engagementPrinciples: [
476
+ "PERSONAL: Connect to character backstories and goals",
477
+ "TREASURE: Package information as physical discoveries",
478
+ "MYSTERY: Break truth into fragments for piecing together",
479
+ "THREAT: Create urgency through stakes and deadlines",
480
+ ],
481
+ tip: "Mix hook types to maintain varied engagement. Personal hooks create investment, treasure makes lore tangible, mystery drives investigation, threat creates urgency.",
482
+ };
483
+ },
484
+ };
485
+ export const engagementTools = [
486
+ personalizeContentTool,
487
+ treasurifyInformationTool,
488
+ mystifyContentTool,
489
+ generateEngagementHooksTool,
490
+ ];
491
+ //# sour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,IAAI;gBACZ,WAAW,EAAE,CAAC,CAAC,WAAW;gBAC1B,QAAQ,EAAE,CAAC,CAAC,QAAQ;gBACpB,YAAY,EAAE,CAAC,CAAC,YAAY;aAC7B,CAAC,CAAC;YACH,oBAAoB,EAAE;gBACpB,sDAAsD;gBACtD,uDAAuD;gBACvD,0DAA0D;gBAC1D,qDAAqD;aACtD;YACD,GAAG,EAAE,qKAAqK;SAC3K,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,sBAAsB;IACtB,yBAAyB;IACzB,kBAAkB;IAClB,2BAA2B;CAC5B,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Archetype Expansion Tool
3
+ *
4
+ * Expands an archetype with additional detail.
5
+ */
6
+ import type { MCPToolEntry } from "@mythxengine/types";
7
+ /**
8
+ * expand_archetype tool
9
+ */
10
+ export declare const expandArchetypeTool: MCPToolEntry;
11
+ export declare const expandArchetypeTools: MCPToolEntry[];
12
+ //# sourceMappingURL=archetype.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"archetype.d.ts","sourceRoot":"","sources":["../../../src/tools/expansion/archetype.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAavD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,YA2KjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,gBAAwB,CAAC"}