mrmainspring 0.2.7 → 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.
|
@@ -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
|
package/dist/mcp/memoryTools.js
CHANGED
|
@@ -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,
|
package/dist/mcp/paymentTools.js
CHANGED
|
@@ -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