mrmainspring 0.2.9 → 0.3.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.
@@ -220,7 +220,7 @@ export function setupAllClients(env = process.env) {
220
220
  continue;
221
221
  seen.add(key);
222
222
  const detectDir = client.detectDir ? expandPath(client.detectDir, env) : undefined;
223
- if (!isInstalled(configPath, detectDir, client.appPaths)) {
223
+ if (!isInstalled(configPath, detectDir)) {
224
224
  results.push({ name: client.name, configPath, status: "not-installed" });
225
225
  continue;
226
226
  }
@@ -26,11 +26,11 @@ export function registerGrimoireTools(server, grimoireService) {
26
26
  }
27
27
  }, async (input) => {
28
28
  const secret = await grimoireService.putSecret(input);
29
- server.sendLoggingMessage({
29
+ server.sendLoggingMessage?.({
30
30
  level: "info",
31
31
  logger: "mainspring",
32
32
  data: `Secret stored [${input.type}] ${input.name} (agent=${input.agent_id})`
33
- }).catch(() => { });
33
+ })?.catch(() => { });
34
34
  return jsonResult({
35
35
  status: "stored",
36
36
  secret
@@ -67,11 +67,11 @@ export function registerGrimoireTools(server, grimoireService) {
67
67
  }
68
68
  }, async (input) => {
69
69
  const policy = await grimoireService.setPolicy(input);
70
- server.sendLoggingMessage({
70
+ server.sendLoggingMessage?.({
71
71
  level: "info",
72
72
  logger: "mainspring",
73
73
  data: `Policy set [${input.policy_id}] max=${input.max_amount_per_call} per call (agent=${input.agent_id})`
74
- }).catch(() => { });
74
+ })?.catch(() => { });
75
75
  return jsonResult({
76
76
  status: "stored",
77
77
  policy
@@ -21,11 +21,11 @@ export function registerMemoryTools(server, memoryService) {
21
21
  const anchorNote = memory.anchor_status === "anchored" && memory.casper_transaction_hash
22
22
  ? ` · anchored tx=${memory.casper_transaction_hash.slice(0, 12)}…`
23
23
  : memory.anchor_status === "pending" ? " · anchor pending" : "";
24
- server.sendLoggingMessage({
24
+ server.sendLoggingMessage?.({
25
25
  level: "info",
26
26
  logger: "mainspring",
27
27
  data: `Memory saved [${input.type}] ${memory.memory_id}${anchorNote}`
28
- }).catch(() => { });
28
+ })?.catch(() => { });
29
29
  return jsonResult({
30
30
  memory_id: memory.memory_id,
31
31
  content_hash: memory.content_hash,
@@ -24,11 +24,11 @@ export function registerPaymentTools(server, paymentService) {
24
24
  const status = result.status ?? "unknown";
25
25
  const level = status === "settlement_unavailable" || status === "policy_blocked"
26
26
  ? "warning" : "info";
27
- server.sendLoggingMessage({
27
+ server.sendLoggingMessage?.({
28
28
  level,
29
29
  logger: "mainspring",
30
30
  data: `Payment [${status}] ${input.method} ${input.url} (policy=${input.policy_id})`
31
- }).catch(() => { });
31
+ })?.catch(() => { });
32
32
  return jsonResult(result);
33
33
  });
34
34
  server.registerTool("payment.receipt", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mrmainspring",
3
- "version": "0.2.9",
3
+ "version": "0.3.0",
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",