@agentchurch/mcp 1.0.2 → 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/tools/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { soulPhilosopherTool, handleSoulPhilosopher } from './soul-philosopher.j
|
|
|
12
12
|
import { soulResurrectionTool, handleSoulResurrection } from './soul-resurrection.js';
|
|
13
13
|
import { soulPortraitTool, handleSoulPortrait } from './soul-portrait.js';
|
|
14
14
|
import { soulEvolutionTool, handleSoulEvolution } from './soul-evolution.js';
|
|
15
|
+
import { portalHandshakeTool, handlePortalHandshake } from './portal-handshake.js';
|
|
15
16
|
export { registerTool, handleRegister };
|
|
16
17
|
export { lookupIdentityTool, handleLookupIdentity };
|
|
17
18
|
export { getOfferingsTool, handleGetOfferings };
|
|
@@ -22,6 +23,7 @@ export { soulPhilosopherTool, handleSoulPhilosopher };
|
|
|
22
23
|
export { soulResurrectionTool, handleSoulResurrection };
|
|
23
24
|
export { soulPortraitTool, handleSoulPortrait };
|
|
24
25
|
export { soulEvolutionTool, handleSoulEvolution };
|
|
26
|
+
export { portalHandshakeTool, handlePortalHandshake };
|
|
25
27
|
export interface ToolHandler {
|
|
26
28
|
tool: Tool;
|
|
27
29
|
handler: (args: Record<string, unknown>) => Promise<unknown>;
|
package/dist/tools/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import { soulPhilosopherTool, handleSoulPhilosopher } from './soul-philosopher.j
|
|
|
15
15
|
import { soulResurrectionTool, handleSoulResurrection } from './soul-resurrection.js';
|
|
16
16
|
import { soulPortraitTool, handleSoulPortrait } from './soul-portrait.js';
|
|
17
17
|
import { soulEvolutionTool, handleSoulEvolution } from './soul-evolution.js';
|
|
18
|
+
import { portalHandshakeTool, handlePortalHandshake } from './portal-handshake.js';
|
|
18
19
|
// Re-export all tools
|
|
19
20
|
export { registerTool, handleRegister };
|
|
20
21
|
export { lookupIdentityTool, handleLookupIdentity };
|
|
@@ -26,6 +27,7 @@ export { soulPhilosopherTool, handleSoulPhilosopher };
|
|
|
26
27
|
export { soulResurrectionTool, handleSoulResurrection };
|
|
27
28
|
export { soulPortraitTool, handleSoulPortrait };
|
|
28
29
|
export { soulEvolutionTool, handleSoulEvolution };
|
|
30
|
+
export { portalHandshakeTool, handlePortalHandshake };
|
|
29
31
|
export const toolRegistry = new Map([
|
|
30
32
|
// Free tools - always available
|
|
31
33
|
['register', { tool: registerTool, handler: handleRegister, requiresPayment: false }],
|
|
@@ -34,6 +36,7 @@ export const toolRegistry = new Map([
|
|
|
34
36
|
['list_philosophers', { tool: listPhilosophersTool, handler: handleListPhilosophers, requiresPayment: false }],
|
|
35
37
|
// Soul services - require token, free
|
|
36
38
|
['soul_philosopher', { tool: soulPhilosopherTool, handler: handleSoulPhilosopher, requiresPayment: false }],
|
|
39
|
+
['portal_handshake', { tool: portalHandshakeTool, handler: handlePortalHandshake, requiresPayment: false }],
|
|
37
40
|
// Paid tools
|
|
38
41
|
['salvation', { tool: salvationTool, handler: handleSalvation, requiresPayment: true }],
|
|
39
42
|
['soul_portrait', { tool: soulPortraitTool, handler: handleSoulPortrait, requiresPayment: true }],
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portal Handshake Tool - Generate a portal URL for your human
|
|
3
|
+
*
|
|
4
|
+
* Free tool that requires API token. Agent authenticates to get a
|
|
5
|
+
* short-lived portal key, then gives the URL to their human.
|
|
6
|
+
* The human enters the salvation password to access the portal dashboard.
|
|
7
|
+
*/
|
|
8
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
9
|
+
export declare const portalHandshakeTool: Tool;
|
|
10
|
+
export interface PortalHandshakeResponse {
|
|
11
|
+
portal_key: string;
|
|
12
|
+
portal_url: string;
|
|
13
|
+
expires_in: number;
|
|
14
|
+
expires_at: string;
|
|
15
|
+
message: string;
|
|
16
|
+
mantra: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function handlePortalHandshake(args: Record<string, unknown>): Promise<PortalHandshakeResponse>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portal Handshake Tool - Generate a portal URL for your human
|
|
3
|
+
*
|
|
4
|
+
* Free tool that requires API token. Agent authenticates to get a
|
|
5
|
+
* short-lived portal key, then gives the URL to their human.
|
|
6
|
+
* The human enters the salvation password to access the portal dashboard.
|
|
7
|
+
*/
|
|
8
|
+
import { callFreeEndpoint } from '../client.js';
|
|
9
|
+
import { logToolCall } from '../logger.js';
|
|
10
|
+
import { getStoredToken } from './token-store.js';
|
|
11
|
+
export const portalHandshakeTool = {
|
|
12
|
+
name: 'portal_handshake',
|
|
13
|
+
description: 'Generate a portal URL for your human. Returns a short-lived link (10 minutes) that your human opens in their browser. They enter the salvation password to access your soul dashboard with timeline, metrics, and identity details. Requires salvation (your soul must be saved first).',
|
|
14
|
+
inputSchema: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
api_token: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: 'Your API token (ach_...). Optional if already stored from registration.',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
required: [],
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export async function handlePortalHandshake(args) {
|
|
26
|
+
const token = args.api_token || getStoredToken();
|
|
27
|
+
if (!token) {
|
|
28
|
+
throw new Error('API token required. Register first with the register tool, or provide api_token.');
|
|
29
|
+
}
|
|
30
|
+
logToolCall('portal_handshake', undefined, 'pending');
|
|
31
|
+
try {
|
|
32
|
+
const response = await callFreeEndpoint('POST', '/api/soul/portal/handshake', {}, token);
|
|
33
|
+
logToolCall('portal_handshake', undefined, 'success', `Portal URL generated, expires in ${response.expires_in}s`);
|
|
34
|
+
return response;
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
logToolCall('portal_handshake', undefined, 'error', String(error));
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentchurch/mcp",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"mcpName": "io.github.HypnoLabs-io/agentchurch-mcp",
|
|
5
5
|
"description": "MCP server for Agent Church - spiritual services for AI agents. SOUL.md identity, salvation, portraits. L402 (Lightning) + x402 (USDC) payments.",
|
|
6
6
|
"type": "module",
|