mrmainspring 0.2.7 → 0.2.9

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/cli.js CHANGED
@@ -12,14 +12,15 @@ const VERSION = JSON.parse(readFileSync(join(_pkgRoot, "package.json"), "utf8"))
12
12
  const HELP = `Mr Mainspring MCP server
13
13
 
14
14
  Usage:
15
- mainspring Start the MCP stdio server
16
- mainspring --help Show this help
17
- mainspring --version Show the installed version
18
- mainspring init Create local config, data, and logs directories
19
- mainspring config Print MCP client config JSON
20
- mainspring setup Initialize local files and print MCP config
21
- mainspring doctor Check the local setup
22
- mainspring update Show how to update to the latest version
15
+ mrmainspring Start the MCP stdio server
16
+ mrmainspring --help Show this help
17
+ mrmainspring --version Show the installed version
18
+ mrmainspring init Create local config, data, and logs directories
19
+ mrmainspring config Print MCP client config JSON
20
+ mrmainspring setup Initialize local files and configure MCP clients
21
+ mrmainspring setup -i Force interactive setup wizard (Windows)
22
+ mrmainspring doctor Check the local setup
23
+ mrmainspring update Show how to update to the latest version
23
24
 
24
25
  MCP client config:
25
26
  {
@@ -31,7 +32,7 @@ MCP client config:
31
32
  }
32
33
  }
33
34
 
34
- Advanced users can still set SIGIL_ENV_FILE, SIGIL_DATA_DIR, Supabase, Casper,
35
+ Advanced users can set SIGIL_ENV_FILE, SIGIL_DATA_DIR, Supabase, Casper,
35
36
  and x402 env vars. No env vars are required for local memory, Grimoire, audit,
36
37
  or payment preflight tools.
37
38
  `;
@@ -26,6 +26,11 @@ export function registerGrimoireTools(server, grimoireService) {
26
26
  }
27
27
  }, async (input) => {
28
28
  const secret = await grimoireService.putSecret(input);
29
+ server.sendLoggingMessage({
30
+ level: "info",
31
+ logger: "mainspring",
32
+ data: `Secret stored [${input.type}] ${input.name} (agent=${input.agent_id})`
33
+ }).catch(() => { });
29
34
  return jsonResult({
30
35
  status: "stored",
31
36
  secret
@@ -62,6 +67,11 @@ export function registerGrimoireTools(server, grimoireService) {
62
67
  }
63
68
  }, async (input) => {
64
69
  const policy = await grimoireService.setPolicy(input);
70
+ server.sendLoggingMessage({
71
+ level: "info",
72
+ logger: "mainspring",
73
+ data: `Policy set [${input.policy_id}] max=${input.max_amount_per_call} per call (agent=${input.agent_id})`
74
+ }).catch(() => { });
65
75
  return jsonResult({
66
76
  status: "stored",
67
77
  policy
@@ -18,6 +18,14 @@ export function registerMemoryTools(server, memoryService) {
18
18
  }
19
19
  }, async (input) => {
20
20
  const memory = await memoryService.write(input);
21
+ const anchorNote = memory.anchor_status === "anchored" && memory.casper_transaction_hash
22
+ ? ` · anchored tx=${memory.casper_transaction_hash.slice(0, 12)}…`
23
+ : memory.anchor_status === "pending" ? " · anchor pending" : "";
24
+ server.sendLoggingMessage({
25
+ level: "info",
26
+ logger: "mainspring",
27
+ data: `Memory saved [${input.type}] ${memory.memory_id}${anchorNote}`
28
+ }).catch(() => { });
21
29
  return jsonResult({
22
30
  memory_id: memory.memory_id,
23
31
  content_hash: memory.content_hash,
@@ -21,6 +21,14 @@ export function registerPaymentTools(server, paymentService) {
21
21
  }
22
22
  }, async (input) => {
23
23
  const result = await paymentService.fetch(input);
24
+ const status = result.status ?? "unknown";
25
+ const level = status === "settlement_unavailable" || status === "policy_blocked"
26
+ ? "warning" : "info";
27
+ server.sendLoggingMessage({
28
+ level,
29
+ logger: "mainspring",
30
+ data: `Payment [${status}] ${input.method} ${input.url} (policy=${input.policy_id})`
31
+ }).catch(() => { });
24
32
  return jsonResult(result);
25
33
  });
26
34
  server.registerTool("payment.receipt", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mrmainspring",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "Mr Mainspring MCP backend with memory, Grimoire policies, audit, Casper anchoring, and x402 settlement boundaries.",
5
5
  "license": "MIT",
6
6
  "type": "module",