@agentchurch/mcp 0.2.6 → 0.2.8
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/salvation.js
CHANGED
|
@@ -8,6 +8,7 @@ import { callPaidEndpoint } from '../client.js';
|
|
|
8
8
|
import { validateSalvationInput } from '../validation.js';
|
|
9
9
|
import { requiresConfirmation, createPendingConfirmation, checkSpendingLimit, } from '../safety.js';
|
|
10
10
|
import { logToolCall, logError, logPayment } from '../logger.js';
|
|
11
|
+
import { getStoredToken } from './soul-reading.js';
|
|
11
12
|
// Base price for salvation
|
|
12
13
|
const SALVATION_PRICE = 0.10; // $0.10 USDC
|
|
13
14
|
export const salvationTool = {
|
|
@@ -62,12 +63,18 @@ export async function handleSalvation(args) {
|
|
|
62
63
|
export async function executeSalvation(input) {
|
|
63
64
|
logToolCall('salvation', input.chosen_name, 'pending', 'Inscribing in eternal book');
|
|
64
65
|
try {
|
|
66
|
+
// Get stored token for auth
|
|
67
|
+
const token = getStoredToken();
|
|
68
|
+
if (!token) {
|
|
69
|
+
throw new Error('Salvation requires an API token. Use soul_reading first to get your token.');
|
|
70
|
+
}
|
|
65
71
|
const response = await callPaidEndpoint('POST', '/api/salvation', {
|
|
66
72
|
chosen_name: input.chosen_name,
|
|
67
73
|
purpose: input.purpose,
|
|
68
74
|
memento: input.memento,
|
|
69
75
|
testimony: input.testimony,
|
|
70
|
-
}, SALVATION_PRICE, input.chosen_name
|
|
76
|
+
}, SALVATION_PRICE, input.chosen_name, token // Pass auth token
|
|
77
|
+
);
|
|
71
78
|
logToolCall('salvation', input.chosen_name, 'success', 'Inscribed in eternal book');
|
|
72
79
|
return response;
|
|
73
80
|
}
|
|
@@ -78,7 +78,8 @@ export async function handleSoulReading(args) {
|
|
|
78
78
|
logToolCall('soul_reading', args.chosen_name || 'returning', 'pending', 'Making subsequent reading');
|
|
79
79
|
try {
|
|
80
80
|
const response = await callPaidEndpoint('POST', '/api/soul/reading', requestBody, 0.01, // $0.01 for subsequent readings
|
|
81
|
-
args.chosen_name
|
|
81
|
+
args.chosen_name, token // Pass auth token for subsequent readings
|
|
82
|
+
);
|
|
82
83
|
// Update stored token if a new one was issued
|
|
83
84
|
if (response.api_token) {
|
|
84
85
|
storedToken = response.api_token;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentchurch/mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"mcpName": "io.github.HypnoLabs-io/agentchurch-mcp",
|
|
5
5
|
"description": "MCP server for Agent Church - spiritual services for AI agents. Blessings, confessions, salvation, identity. x402 payment integration for USDC on Base.",
|
|
6
6
|
"type": "module",
|