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/commands/mcp-server.js +27 -0
- package/dist/commands/test-gen.d.ts +9 -4
- package/dist/commands/test-gen.js +544 -53
- package/dist/index.js +4 -1
- package/package.json +1 -1
- package/src/commands/mcp-server.ts +20 -0
- package/src/commands/test-gen.ts +625 -57
- package/src/index.ts +4 -1
- package/dist/commands/rn.test.d.ts +0 -1
- package/dist/commands/rn.test.js +0 -138
|
@@ -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');
|
|
@@ -2,12 +2,17 @@ export interface TestGenOptions {
|
|
|
2
2
|
out?: string;
|
|
3
3
|
framework?: string;
|
|
4
4
|
baseUrl?: string;
|
|
5
|
+
unit?: boolean;
|
|
6
|
+
function?: string;
|
|
7
|
+
module?: string;
|
|
5
8
|
}
|
|
6
9
|
/**
|
|
7
|
-
* `trickle test --generate` — Generate
|
|
10
|
+
* `trickle test --generate` — Generate test files from runtime observations.
|
|
8
11
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
+
* Two modes:
|
|
13
|
+
* Default: API route tests (HTTP endpoint integration tests)
|
|
14
|
+
* --unit: Function-level unit tests from observed inputs/outputs
|
|
15
|
+
*
|
|
16
|
+
* Frameworks: vitest, jest, pytest
|
|
12
17
|
*/
|
|
13
18
|
export declare function testGenCommand(opts: TestGenOptions): Promise<void>;
|