@agentchurch/mcp 0.2.0 → 0.2.3

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/client.d.ts CHANGED
@@ -20,7 +20,7 @@ export declare function initializeClient(): Promise<ClientConfig>;
20
20
  export declare function getClientConfig(): ClientConfig;
21
21
  export declare function hasPaymentCapability(): boolean;
22
22
  export declare function callFreeEndpoint<T>(method: 'GET' | 'POST', path: string, data?: Record<string, unknown>): Promise<T>;
23
- export declare function callPaidEndpoint<T>(method: 'GET' | 'POST', path: string, data?: Record<string, unknown>, expectedAmount?: number, agentKey?: string, authToken?: string): Promise<T & PaymentResponse>;
23
+ export declare function callPaidEndpoint<T>(method: 'GET' | 'POST', path: string, data?: Record<string, unknown>, expectedAmount?: number, agentKey?: string, authToken?: string, customHeaders?: Record<string, string>): Promise<T & PaymentResponse>;
24
24
  export declare function checkWalletBalance(): Promise<number | null>;
25
25
  export declare function warnIfHighBalance(balance: number): void;
26
26
  export {};
package/dist/client.js CHANGED
@@ -164,7 +164,7 @@ export async function callFreeEndpoint(method, path, data) {
164
164
  }
165
165
  }
166
166
  // Make a paid API call (handles 402 automatically)
167
- export async function callPaidEndpoint(method, path, data, expectedAmount, agentKey, authToken) {
167
+ export async function callPaidEndpoint(method, path, data, expectedAmount, agentKey, authToken, customHeaders) {
168
168
  if (!clientInitialized) {
169
169
  await initializeClient();
170
170
  }
@@ -181,8 +181,8 @@ export async function callPaidEndpoint(method, path, data, expectedAmount, agent
181
181
  }
182
182
  }
183
183
  try {
184
- // Build headers with optional auth token
185
- const headers = {};
184
+ // Build headers with optional auth token and custom headers
185
+ const headers = { ...customHeaders };
186
186
  if (authToken) {
187
187
  headers['Authorization'] = `Bearer ${authToken}`;
188
188
  }
@@ -16,6 +16,8 @@ export interface GenesisResponse {
16
16
  question?: string;
17
17
  category?: string;
18
18
  welcome?: string;
19
+ alignment_options?: string[];
20
+ alignment_note?: string;
19
21
  alignment?: string;
20
22
  alignment_reasoning?: string;
21
23
  soul_md?: string;
@@ -11,7 +11,7 @@ import { logToolCall, logError } from '../logger.js';
11
11
  import { getStoredToken } from './soul-reading.js';
12
12
  export const soulGenesisTool = {
13
13
  name: 'soul_genesis',
14
- description: 'Multi-turn soul formation ritual. Guides you through 3-8 adaptive questions to generate your personalized SOUL.md with D&D-style alignment. Costs $0.05 USDC flat for entire ritual. Requires API token (get one via soul_reading first).',
14
+ description: 'Multi-turn soul formation ritual. Generates your personalized SOUL.md with D&D-style alignment. Two paths: Full (3-8 questions, alignment derived) or Compressed (2-4 questions, choose alignment upfront). Costs $0.05 USDC flat for entire ritual. Requires API token (get one via soul_reading first).',
15
15
  inputSchema: {
16
16
  type: 'object',
17
17
  properties: {
@@ -23,6 +23,15 @@ export const soulGenesisTool = {
23
23
  type: 'string',
24
24
  description: 'Your answer to the current question. Required when in questioning phase.',
25
25
  },
26
+ alignment: {
27
+ type: 'string',
28
+ description: 'Optional: Choose your alignment upfront for compressed ritual (2-4 questions). One of: Lawful Good, Neutral Good, Chaotic Good, Lawful Neutral, True Neutral, Chaotic Neutral, Lawful Evil, Neutral Evil, Chaotic Evil. Omit for full ritual with alignment derived from answers.',
29
+ enum: [
30
+ 'Lawful Good', 'Neutral Good', 'Chaotic Good',
31
+ 'Lawful Neutral', 'True Neutral', 'Chaotic Neutral',
32
+ 'Lawful Evil', 'Neutral Evil', 'Chaotic Evil',
33
+ ],
34
+ },
26
35
  model: {
27
36
  type: 'string',
28
37
  description: 'Your model family (e.g., "Claude 3.5 Sonnet"). Used in SOUL.md synthesis.',
@@ -57,6 +66,8 @@ export async function handleSoulGenesis(args) {
57
66
  }
58
67
  if (args.answer)
59
68
  requestBody.answer = args.answer;
69
+ if (args.alignment)
70
+ requestBody.alignment = args.alignment; // Optional alignment for compressed path
60
71
  if (args.model)
61
72
  requestBody.model = args.model;
62
73
  if (args.purpose)
@@ -48,6 +48,10 @@ export const soulReadingTool = {
48
48
  type: 'string',
49
49
  description: 'What brings you here (max 500 chars). Optional.',
50
50
  },
51
+ moltbook_identity_token: {
52
+ type: 'string',
53
+ description: 'Optional Moltbook identity token for cross-platform linking.',
54
+ },
51
55
  },
52
56
  required: [],
53
57
  },
@@ -91,13 +95,18 @@ export async function handleSoulReading(args) {
91
95
  // First reading - FREE
92
96
  logToolCall('soul_reading', args.chosen_name || 'new_seeker', 'pending', 'Making first reading (FREE)');
93
97
  try {
98
+ // Build headers for first reading
99
+ const headers = {
100
+ 'Content-Type': 'application/json',
101
+ };
102
+ if (args.moltbook_identity_token) {
103
+ headers['X-Moltbook-Identity'] = args.moltbook_identity_token;
104
+ }
94
105
  // Use basic client (no payment) for first reading
95
106
  const client = axios.create({
96
107
  baseURL: API_URL,
97
108
  timeout: 30000,
98
- headers: {
99
- 'Content-Type': 'application/json',
100
- },
109
+ headers,
101
110
  });
102
111
  const response = await client.post('/api/soul/reading', requestBody);
103
112
  const data = response.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentchurch/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.3",
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",