@zibby/core 0.1.0 → 0.1.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zibby/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.5",
4
4
  "description": "Core test automation engine with multi-agent and multi-MCP support",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -75,18 +75,26 @@ export class CursorAgentStrategy extends AgentStrategy {
75
75
  '/Applications/Cursor.app/Contents/Resources/app/bin/cursor'
76
76
  ];
77
77
 
78
- let cursorBin = 'agent';
78
+ let cursorBin = null;
79
79
  for (const bin of possibleBins) {
80
- if (bin === 'agent') {
81
- cursorBin = bin;
82
- break;
83
- }
84
- if (existsSync(bin)) {
80
+ try {
81
+ if (bin.startsWith('/')) {
82
+ accessSync(bin, constants.X_OK);
83
+ } else {
84
+ execSync(`which ${bin} 2>/dev/null`, { stdio: 'ignore', timeout: 2000 });
85
+ }
85
86
  cursorBin = bin;
87
+ logger.debug(`[Agent] Using binary: ${bin}`);
86
88
  break;
89
+ } catch {
90
+ continue;
87
91
  }
88
92
  }
89
93
 
94
+ if (!cursorBin) {
95
+ throw new Error('Cursor Agent CLI not found. Install it or add it to PATH.');
96
+ }
97
+
90
98
  // File-based structured output: agent writes JSON to this file
91
99
  let resultFilePath = null;
92
100
  if (schema) {
@@ -6,7 +6,6 @@
6
6
  */
7
7
 
8
8
  import { WorkflowAgent, WorkflowGraph } from '@zibby/core';
9
- import { memoryMiddleware } from '@zibby/memory';
10
9
  import {
11
10
  preflightNode,
12
11
  executeLiveNode,
@@ -14,10 +13,16 @@ import {
14
13
  } from './nodes/index.js';
15
14
  import { BrowserTestResultHandler } from './result-handler.js';
16
15
 
16
+ let memoryMiddleware = null;
17
+ try {
18
+ const mem = await import('@zibby/memory');
19
+ memoryMiddleware = mem.memoryMiddleware;
20
+ } catch { /* @zibby/memory not installed */ }
21
+
17
22
  export class BrowserTestAutomationAgent extends WorkflowAgent {
18
23
  buildGraph() {
19
24
  const graph = new WorkflowGraph({
20
- middleware: [memoryMiddleware()].filter(Boolean),
25
+ middleware: [memoryMiddleware?.()].filter(Boolean),
21
26
  });
22
27
 
23
28
  graph.addNode('preflight', preflightNode);