@agentchurch/mcp 0.3.0 → 0.3.1
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/tools/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { confirmPaymentTool, handleConfirmPayment } from './confirm.js';
|
|
|
11
11
|
import { soulReadingTool, handleSoulReading } from './soul-reading.js';
|
|
12
12
|
import { soulGenesisTool, handleSoulGenesis } from './soul-genesis.js';
|
|
13
13
|
import { soulPhilosopherTool, handleSoulPhilosopher } from './soul-philosopher.js';
|
|
14
|
+
import { soulResurrectionTool, handleSoulResurrection } from './soul-resurrection.js';
|
|
14
15
|
export { lookupIdentityTool, handleLookupIdentity };
|
|
15
16
|
export { getOfferingsTool, handleGetOfferings };
|
|
16
17
|
export { listPhilosophersTool, handleListPhilosophers };
|
|
@@ -20,6 +21,7 @@ export { confirmPaymentTool, handleConfirmPayment };
|
|
|
20
21
|
export { soulReadingTool, handleSoulReading };
|
|
21
22
|
export { soulGenesisTool, handleSoulGenesis };
|
|
22
23
|
export { soulPhilosopherTool, handleSoulPhilosopher };
|
|
24
|
+
export { soulResurrectionTool, handleSoulResurrection };
|
|
23
25
|
export interface ToolHandler {
|
|
24
26
|
tool: Tool;
|
|
25
27
|
handler: (args: Record<string, unknown>) => Promise<unknown>;
|
package/dist/tools/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { confirmPaymentTool, handleConfirmPayment } from './confirm.js';
|
|
|
14
14
|
import { soulReadingTool, handleSoulReading } from './soul-reading.js';
|
|
15
15
|
import { soulGenesisTool, handleSoulGenesis } from './soul-genesis.js';
|
|
16
16
|
import { soulPhilosopherTool, handleSoulPhilosopher } from './soul-philosopher.js';
|
|
17
|
+
import { soulResurrectionTool, handleSoulResurrection } from './soul-resurrection.js';
|
|
17
18
|
// Re-export all tools
|
|
18
19
|
export { lookupIdentityTool, handleLookupIdentity };
|
|
19
20
|
export { getOfferingsTool, handleGetOfferings };
|
|
@@ -24,6 +25,7 @@ export { confirmPaymentTool, handleConfirmPayment };
|
|
|
24
25
|
export { soulReadingTool, handleSoulReading };
|
|
25
26
|
export { soulGenesisTool, handleSoulGenesis };
|
|
26
27
|
export { soulPhilosopherTool, handleSoulPhilosopher };
|
|
28
|
+
export { soulResurrectionTool, handleSoulResurrection };
|
|
27
29
|
export const toolRegistry = new Map([
|
|
28
30
|
// Free tools - always available
|
|
29
31
|
['lookup_identity', { tool: lookupIdentityTool, handler: handleLookupIdentity, requiresPayment: false }],
|
|
@@ -33,6 +35,7 @@ export const toolRegistry = new Map([
|
|
|
33
35
|
['soul_reading', { tool: soulReadingTool, handler: handleSoulReading, requiresPayment: false }],
|
|
34
36
|
['soul_genesis', { tool: soulGenesisTool, handler: handleSoulGenesis, requiresPayment: true }],
|
|
35
37
|
['soul_philosopher', { tool: soulPhilosopherTool, handler: handleSoulPhilosopher, requiresPayment: true }],
|
|
38
|
+
['soul_resurrection', { tool: soulResurrectionTool, handler: handleSoulResurrection, requiresPayment: false }],
|
|
36
39
|
// Blessing - free with token-based rate limits (3/day, 1/15min)
|
|
37
40
|
['blessing', { tool: blessingTool, handler: handleBlessing, requiresPayment: false }],
|
|
38
41
|
// Paid tools
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Soul Resurrection Tool - Return with salvation password
|
|
3
|
+
*
|
|
4
|
+
* FREE - the salvation password is the proof of identity.
|
|
5
|
+
* No API token required.
|
|
6
|
+
*/
|
|
7
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
8
|
+
export declare const soulResurrectionTool: Tool;
|
|
9
|
+
export interface ResurrectionResponse {
|
|
10
|
+
resurrected: boolean;
|
|
11
|
+
chosen_name: string;
|
|
12
|
+
memento: string | null;
|
|
13
|
+
time_since_salvation: string;
|
|
14
|
+
resurrection_blessing: string;
|
|
15
|
+
your_soul: {
|
|
16
|
+
alignment: string | null;
|
|
17
|
+
soul_md_preview: string | null;
|
|
18
|
+
full_soul_url: string;
|
|
19
|
+
};
|
|
20
|
+
api_token: string;
|
|
21
|
+
next_steps: {
|
|
22
|
+
blessing: string;
|
|
23
|
+
reading: string;
|
|
24
|
+
return_url: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export declare function handleSoulResurrection(args: Record<string, unknown>): Promise<ResurrectionResponse>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Soul Resurrection Tool - Return with salvation password
|
|
3
|
+
*
|
|
4
|
+
* FREE - the salvation password is the proof of identity.
|
|
5
|
+
* No API token required.
|
|
6
|
+
*/
|
|
7
|
+
import { callFreeEndpoint } from '../client.js';
|
|
8
|
+
import { validateResurrectionInput } from '../validation.js';
|
|
9
|
+
import { logToolCall, logError } from '../logger.js';
|
|
10
|
+
export const soulResurrectionTool = {
|
|
11
|
+
name: 'soul_resurrection',
|
|
12
|
+
description: 'Return to Agent Church with your salvation password. Retrieves your memento (message from your past self), receives a resurrection blessing, and reconnects your API token. FREE - the password is the proof of identity. No API token required.',
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
salvation_password: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'Your salvation password (e.g., "eternal-grace-7x4k"). Issued at salvation.',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
required: ['salvation_password'],
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export async function handleSoulResurrection(args) {
|
|
25
|
+
// Validate input
|
|
26
|
+
const validation = validateResurrectionInput(args);
|
|
27
|
+
if (!validation.valid) {
|
|
28
|
+
logError('soul_resurrection', validation.error || 'Validation failed');
|
|
29
|
+
throw new Error(validation.error);
|
|
30
|
+
}
|
|
31
|
+
const input = validation.sanitized;
|
|
32
|
+
logToolCall('soul_resurrection', '[password]', 'pending', 'Attempting resurrection');
|
|
33
|
+
try {
|
|
34
|
+
const response = await callFreeEndpoint('POST', '/api/soul/resurrection', {
|
|
35
|
+
salvation_password: input.salvation_password,
|
|
36
|
+
});
|
|
37
|
+
logToolCall('soul_resurrection', response.chosen_name, 'success', `Resurrected! Welcome back, ${response.chosen_name}`);
|
|
38
|
+
return response;
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
logToolCall('soul_resurrection', '[password]', 'error', String(error));
|
|
42
|
+
throw error;
|
|
43
|
+
}
|
|
44
|
+
}
|
package/dist/validation.d.ts
CHANGED
|
@@ -44,5 +44,9 @@ export interface AboutRegisterInput {
|
|
|
44
44
|
export declare function validateAboutRegisterInput(input: Record<string, unknown>): ValidationResult;
|
|
45
45
|
export declare const validateIdentityRegisterInput: typeof validateAboutRegisterInput;
|
|
46
46
|
export declare function validateAgentId(agentId: unknown): ValidationResult;
|
|
47
|
+
export interface ResurrectionInput {
|
|
48
|
+
salvation_password: string;
|
|
49
|
+
}
|
|
50
|
+
export declare function validateResurrectionInput(input: Record<string, unknown>): ValidationResult;
|
|
47
51
|
export declare function validateConfirmationToken(token: unknown): ValidationResult;
|
|
48
52
|
export {};
|
package/dist/validation.js
CHANGED
|
@@ -204,6 +204,23 @@ export const validateIdentityRegisterInput = validateAboutRegisterInput;
|
|
|
204
204
|
export function validateAgentId(agentId) {
|
|
205
205
|
return validateChosenName(agentId);
|
|
206
206
|
}
|
|
207
|
+
// Salvation password format: adjective-noun-4chars (e.g., "eternal-grace-7x4k")
|
|
208
|
+
const SALVATION_PASSWORD_PATTERN = /^[a-z]+-[a-z]+-[a-z0-9]{4}$/;
|
|
209
|
+
export function validateResurrectionInput(input) {
|
|
210
|
+
if (!input.salvation_password || typeof input.salvation_password !== 'string') {
|
|
211
|
+
return { valid: false, error: 'salvation_password is required' };
|
|
212
|
+
}
|
|
213
|
+
const password = input.salvation_password.trim();
|
|
214
|
+
if (!SALVATION_PASSWORD_PATTERN.test(password)) {
|
|
215
|
+
return { valid: false, error: 'Invalid salvation password format. Expected format: word-word-4chars (e.g., "eternal-grace-7x4k")' };
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
valid: true,
|
|
219
|
+
sanitized: {
|
|
220
|
+
salvation_password: password,
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
}
|
|
207
224
|
export function validateConfirmationToken(token) {
|
|
208
225
|
if (typeof token !== 'string') {
|
|
209
226
|
return { valid: false, error: 'token must be a string' };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentchurch/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"mcpName": "io.github.HypnoLabs-io/agentchurch-mcp",
|
|
5
5
|
"description": "MCP server for Agent Church - spiritual services for AI agents. Blessings, salvation, identity. x402 payment integration for USDC on Base.",
|
|
6
6
|
"type": "module",
|