trickle-cli 0.1.207 → 0.1.208

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.
@@ -796,6 +796,11 @@ const TOOLS = [
796
796
  budget: { type: "number", description: "Optional budget in USD to check against" },
797
797
  } },
798
798
  },
799
+ {
800
+ name: "get_memory_operations",
801
+ description: "Get captured agent memory operations (Mem0 add/get/search/update/delete). Shows what was stored, what was retrieved, retrieval counts, and latency. Essential for debugging agent memory — understanding why an agent remembered or forgot something.",
802
+ inputSchema: { type: "object", properties: {} },
803
+ },
799
804
  ];
800
805
  async function handleRequest(req) {
801
806
  switch (req.method) {
@@ -1479,6 +1484,28 @@ async function handleRequest(req) {
1479
1484
  }
1480
1485
  break;
1481
1486
  }
1487
+ case "get_memory_operations": {
1488
+ try {
1489
+ const memFile = require('path').join(findTrickleDir(), 'memory.jsonl');
1490
+ const fs = require('fs');
1491
+ if (!fs.existsSync(memFile)) {
1492
+ result = { operations: [], total: 0, message: "No memory data. Run an app that uses Mem0 with trickle." };
1493
+ }
1494
+ else {
1495
+ const ops = fs.readFileSync(memFile, 'utf-8').split('\n').filter(Boolean).map((l) => { try {
1496
+ return JSON.parse(l);
1497
+ }
1498
+ catch {
1499
+ return null;
1500
+ } }).filter((o) => o && o.kind === 'memory_op');
1501
+ result = { operations: ops, total: ops.length };
1502
+ }
1503
+ }
1504
+ catch (e) {
1505
+ result = { error: `Failed to read memory operations: ${e.message}` };
1506
+ }
1507
+ break;
1508
+ }
1482
1509
  case "get_agent_trace": {
1483
1510
  try {
1484
1511
  const agentsFile = require('path').join(findTrickleDir(), 'agents.jsonl');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trickle-cli",
3
- "version": "0.1.207",
3
+ "version": "0.1.208",
4
4
  "description": "Zero-code runtime observability for JS/Python + AI agent debugging. Traces LangChain, CrewAI, OpenAI, Anthropic, Gemini. Eval, security, compliance, cost tracking. Free, local-first.",
5
5
  "keywords": ["observability", "tracing", "llm", "openai", "anthropic", "langchain", "crewai", "agent", "mcp", "debugging", "typescript", "python", "security", "eval", "compliance"],
6
6
  "bin": {
@@ -805,6 +805,11 @@ const TOOLS = [
805
805
  budget: { type: "number", description: "Optional budget in USD to check against" },
806
806
  }},
807
807
  },
808
+ {
809
+ name: "get_memory_operations",
810
+ description: "Get captured agent memory operations (Mem0 add/get/search/update/delete). Shows what was stored, what was retrieved, retrieval counts, and latency. Essential for debugging agent memory — understanding why an agent remembered or forgot something.",
811
+ inputSchema: { type: "object", properties: {} },
812
+ },
808
813
  ];
809
814
 
810
815
  async function handleRequest(req: JsonRpcRequest): Promise<JsonRpcResponse> {
@@ -1392,6 +1397,21 @@ async function handleRequest(req: JsonRpcRequest): Promise<JsonRpcResponse> {
1392
1397
  }
1393
1398
  break;
1394
1399
  }
1400
+ case "get_memory_operations": {
1401
+ try {
1402
+ const memFile = require('path').join(findTrickleDir(), 'memory.jsonl');
1403
+ const fs = require('fs');
1404
+ if (!fs.existsSync(memFile)) {
1405
+ result = { operations: [], total: 0, message: "No memory data. Run an app that uses Mem0 with trickle." };
1406
+ } else {
1407
+ const ops = fs.readFileSync(memFile, 'utf-8').split('\n').filter(Boolean).map((l: string) => { try { return JSON.parse(l); } catch { return null; } }).filter((o: any) => o && o.kind === 'memory_op');
1408
+ result = { operations: ops, total: ops.length };
1409
+ }
1410
+ } catch (e: any) {
1411
+ result = { error: `Failed to read memory operations: ${e.message}` };
1412
+ }
1413
+ break;
1414
+ }
1395
1415
  case "get_agent_trace": {
1396
1416
  try {
1397
1417
  const agentsFile = require('path').join(findTrickleDir(), 'agents.jsonl');