trickle-cli 0.1.207 → 0.1.209

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/index.js CHANGED
@@ -269,10 +269,13 @@ program
269
269
  .command("test [command...]")
270
270
  .description("Run tests with observability (default) or generate test files (--generate)")
271
271
  .option("--generate", "Generate test file from observed routes instead of running tests")
272
+ .option("--unit", "Generate function-level unit tests instead of API route tests (with --generate)")
272
273
  .option("--json", "Structured JSON output for agent consumption")
273
274
  .option("-o, --out <path>", "Write tests to a file (with --generate)")
274
- .option("--framework <name>", "Test framework: vitest or jest (with --generate)")
275
+ .option("--framework <name>", "Test framework: vitest, jest, or pytest (with --generate)")
275
276
  .option("--base-url <url>", "Base URL for API requests (with --generate)")
277
+ .option("--function <name>", "Filter by function name (with --generate --unit)")
278
+ .option("--module <name>", "Filter by module name (with --generate --unit)")
276
279
  .action(async (commandParts, opts) => {
277
280
  if (opts.generate) {
278
281
  await (0, test_gen_1.testGenCommand)(opts);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trickle-cli",
3
- "version": "0.1.207",
3
+ "version": "0.1.209",
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');