@zibby/core 0.1.20 → 0.1.21

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.20",
3
+ "version": "0.1.21",
4
4
  "description": "Core test automation engine with multi-agent and multi-MCP support",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -6,7 +6,7 @@ import { tmpdir, homedir } from 'os';
6
6
  import { logger } from '../../utils/logger.js';
7
7
  import { DEFAULT_MODELS, TIMEOUTS } from '../../constants.js';
8
8
  import { DEFAULT_OUTPUT_BASE, SESSION_INFO_FILE } from '../constants.js';
9
- import { getAllSkills } from '../skill-registry.js';
9
+ import { getAllSkills, getSkill } from '../skill-registry.js';
10
10
  import { StreamingParser } from '../../utils/streaming-parser.js';
11
11
  import { CursorOutputFormatter } from './utils/cursor-output-formatter.js';
12
12
  import { formatWithOpenAIProxy } from './utils/openai-proxy-formatter.js';
@@ -83,7 +83,7 @@ export class CursorAgentStrategy extends AgentStrategy {
83
83
 
84
84
  logger.debug(`[Cursor] Invoking (model: ${model}, timeout: ${timeout / 1000}s, skills: ${JSON.stringify(skills)})`);
85
85
 
86
- this._setupMcpConfig(sessionPath, workspace, config);
86
+ this._setupMcpConfig(sessionPath, workspace, config, skills);
87
87
 
88
88
  const possibleBins = [
89
89
  // Try absolute paths first (most reliable)
@@ -174,7 +174,7 @@ export class CursorAgentStrategy extends AgentStrategy {
174
174
  if (process.env.ZIBBY_LOG_CURSOR_CLI === '1') {
175
175
  console.log(` Full command: ${fullCmd}\n`);
176
176
  }
177
- } catch (err) {
177
+ } catch (_err) {
178
178
  // Ignore EPIPE errors from console.log
179
179
  }
180
180
  }
@@ -252,7 +252,7 @@ export class CursorAgentStrategy extends AgentStrategy {
252
252
  return rawOutput;
253
253
  }
254
254
 
255
- _setupMcpConfig(sessionPath, workspace, config) {
255
+ _setupMcpConfig(sessionPath, workspace, config, skills = null) {
256
256
  const cursorDir = join(homedir(), '.cursor');
257
257
  const mcpConfigPath = join(cursorDir, 'mcp.json');
258
258
 
@@ -267,8 +267,12 @@ export class CursorAgentStrategy extends AgentStrategy {
267
267
  const outputBase = config?.paths?.output || DEFAULT_OUTPUT_BASE;
268
268
  const sessionInfoPath = join(workspace || process.cwd(), outputBase, SESSION_INFO_FILE);
269
269
 
270
+ const skillsToResolve = Array.isArray(skills)
271
+ ? skills.map(id => getSkill(id)).filter(Boolean)
272
+ : [...getAllSkills()].map(([, skill]) => skill);
273
+
270
274
  const configured = new Set();
271
- for (const [, skill] of getAllSkills()) {
275
+ for (const skill of skillsToResolve) {
272
276
  if (typeof skill.resolve !== 'function') continue;
273
277
  if (configured.has(skill.serverName)) continue;
274
278
  configured.add(skill.serverName);
@@ -70,7 +70,7 @@ export async function invokeAgent(prompt, context = {}, options = {}) {
70
70
  workspace: context.state?.workspace || options.workspace,
71
71
  schema: options.schema || context.schema,
72
72
  images: options.images || context.images || [],
73
- skills: options.skills || context.skills || null,
73
+ skills: options.skills || context.skills || [],
74
74
  config,
75
75
  ...options
76
76
  };
@@ -167,7 +167,7 @@ export class Node {
167
167
  model,
168
168
  workspace: cwd,
169
169
  schema: this.isZodSchema ? this.outputSchema : null,
170
- skills: this.config.skills || null,
170
+ skills: this.config.skills || [],
171
171
  sessionPath,
172
172
  config: zibbyConfig
173
173
  };