@zibby/skills 0.1.0 → 0.1.3
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/package.json +2 -2
- package/src/memory.js +24 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zibby/skills",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Built-in skill definitions for Zibby test automation framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
49
49
|
"@zibby/mcp-jira": "*",
|
|
50
|
-
"@zibby/mcp-browser": "
|
|
50
|
+
"@zibby/mcp-browser": "^0.1.5",
|
|
51
51
|
"@zibby/mcp-memory": "*"
|
|
52
52
|
}
|
|
53
53
|
}
|
package/src/memory.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* The AI agent can query test history, selector stability, page model,
|
|
6
6
|
* and navigation patterns from previous runs.
|
|
7
7
|
*
|
|
8
|
-
* Activated when
|
|
9
|
-
*
|
|
8
|
+
* Activated when SKILLS.MEMORY is included in node's skills array.
|
|
9
|
+
* Throws clear errors if dolt or database not set up.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { createRequire } from 'module';
|
|
@@ -33,13 +33,23 @@ export const memorySkill = {
|
|
|
33
33
|
description: 'Zibby Memory MCP Server (test history, selectors, page model)',
|
|
34
34
|
|
|
35
35
|
resolve() {
|
|
36
|
-
if (!process.env.ZIBBY_MEMORY) return null;
|
|
37
|
-
|
|
38
36
|
const bin = resolveMemoryBin();
|
|
39
|
-
if (!bin)
|
|
37
|
+
if (!bin) {
|
|
38
|
+
throw new Error(
|
|
39
|
+
'❌ Memory MCP server not found\n\n' +
|
|
40
|
+
' Install @zibby/memory:\n' +
|
|
41
|
+
' npm install @zibby/memory'
|
|
42
|
+
);
|
|
43
|
+
}
|
|
40
44
|
|
|
41
45
|
const dbPath = join(process.cwd(), '.zibby', 'memory');
|
|
42
|
-
if (!existsSync(join(dbPath, '.dolt')))
|
|
46
|
+
if (!existsSync(join(dbPath, '.dolt'))) {
|
|
47
|
+
throw new Error(
|
|
48
|
+
'❌ Memory database not initialized\n\n' +
|
|
49
|
+
' Run:\n' +
|
|
50
|
+
' zibby memory init'
|
|
51
|
+
);
|
|
52
|
+
}
|
|
43
53
|
|
|
44
54
|
try {
|
|
45
55
|
const raw = execFileSync('dolt', ['sql', '-q', 'SELECT COUNT(*) AS cnt FROM test_runs', '-r', 'json'], {
|
|
@@ -50,8 +60,14 @@ export const memorySkill = {
|
|
|
50
60
|
console.log('[memory] Database empty — memory tools activate after first completed run');
|
|
51
61
|
return null;
|
|
52
62
|
}
|
|
53
|
-
} catch {
|
|
54
|
-
|
|
63
|
+
} catch (err) {
|
|
64
|
+
throw new Error(
|
|
65
|
+
'❌ Dolt not found or memory database error\n\n' +
|
|
66
|
+
' Install Dolt:\n' +
|
|
67
|
+
' https://docs.dolthub.com/introduction/installation\n\n' +
|
|
68
|
+
` Error: ${err.message}`,
|
|
69
|
+
{ cause: err }
|
|
70
|
+
);
|
|
55
71
|
}
|
|
56
72
|
|
|
57
73
|
return {
|