@wix/evalforge-evaluator 0.91.0 → 0.92.0

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * API Client for fetching data from the eval server.
3
3
  */
4
- import type { EvalRun, EvalRunResult, SkillsGroup, TestScenario, Template, SkillWithLatestVersion, SkillVersion, Agent, CustomAssertion, MCPEntity, SubAgent } from '@wix/evalforge-types';
4
+ import type { EvalRun, EvalRunResult, SkillsGroup, TestScenario, Template, SkillWithLatestVersion, SkillVersion, Agent, CustomAssertion, MCPEntity, SubAgent, Rule } from '@wix/evalforge-types';
5
5
  export interface ApiClient {
6
6
  getEvalRun(projectId: string, id: string): Promise<EvalRun>;
7
7
  getSkillsGroup(projectId: string, id: string): Promise<SkillsGroup>;
@@ -13,6 +13,7 @@ export interface ApiClient {
13
13
  getTemplate(projectId: string, id: string): Promise<Template>;
14
14
  getMcp(projectId: string, id: string): Promise<MCPEntity>;
15
15
  getSubAgent(projectId: string, id: string): Promise<SubAgent>;
16
+ getRule(projectId: string, id: string): Promise<Rule>;
16
17
  getAssertion(projectId: string, id: string): Promise<CustomAssertion>;
17
18
  addResult(projectId: string, evalRunId: string, result: EvalRunResult): Promise<void>;
18
19
  clearResults(projectId: string, evalRunId: string): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { EvalRun, TestScenario, SkillWithLatestVersion, SkillsGroup, Agent, Template, CustomAssertion, Assertion, MCPEntity, SubAgent } from '@wix/evalforge-types';
1
+ import type { EvalRun, TestScenario, SkillWithLatestVersion, SkillsGroup, Agent, Template, CustomAssertion, Assertion, MCPEntity, SubAgent, Rule } from '@wix/evalforge-types';
2
2
  import { type SystemAssertionId } from '@wix/evalforge-types';
3
3
  import type { ApiClient } from './api-client.js';
4
4
  /**
@@ -42,6 +42,7 @@ export interface EvaluationData {
42
42
  skillsGroupName: string;
43
43
  mcps: MCPEntity[];
44
44
  subAgents: SubAgent[];
45
+ rules: Rule[];
45
46
  scenarioItems: ScenarioItem[];
46
47
  }
47
48
  /**
@@ -4,7 +4,7 @@
4
4
  * These types are internal to the Claude Code adapter and extend or
5
5
  * specialize the shared types from @wix/evalforge-types.
6
6
  */
7
- import type { MCPEntity, SubAgent } from '@wix/evalforge-types';
7
+ import type { MCPEntity, SubAgent, Rule } from '@wix/evalforge-types';
8
8
  export type { TraceContext } from '@wix/evalforge-types';
9
9
  /**
10
10
  * Options for Claude Agent SDK execution.
@@ -19,6 +19,8 @@ export interface ClaudeCodeExecutionOptions {
19
19
  mcps?: MCPEntity[];
20
20
  /** Sub-agent entities to write to .claude/agents/*.md (Claude Code project scope) */
21
21
  subAgents?: SubAgent[];
22
+ /** Rules to write (CLAUDE.md, AGENTS.md, .cursor/rules/*.md based on ruleType) */
23
+ rules?: Rule[];
22
24
  /** Model to use for generation */
23
25
  model?: string;
24
26
  /** Temperature for generation (0–1, from agent modelConfig) */
@@ -0,0 +1,13 @@
1
+ import type { Rule } from '@wix/evalforge-types';
2
+ /**
3
+ * Write rule content to the filesystem based on each rule's `ruleType`.
4
+ *
5
+ * Placement:
6
+ * - `claude-md` -> `{cwd}/CLAUDE.md` (appends if multiple)
7
+ * - `agents-md` -> `{cwd}/AGENTS.md` (appends if multiple)
8
+ * - `cursor-rule` -> `{cwd}/.cursor/rules/{name}.md` (one file per rule)
9
+ *
10
+ * @param cwd - Working directory (project root for Claude Code)
11
+ * @param rules - Rule entities to write
12
+ */
13
+ export declare function writeRulesToFilesystem(cwd: string, rules: Rule[]): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/evalforge-evaluator",
3
- "version": "0.91.0",
3
+ "version": "0.92.0",
4
4
  "description": "EvalForge Evaluator",
5
5
  "bin": "./build/index.js",
6
6
  "files": [
@@ -20,8 +20,8 @@
20
20
  "@anthropic-ai/claude-agent-sdk": "^0.2.12",
21
21
  "@anthropic-ai/claude-code": "^2.0.76",
22
22
  "@wix/eval-assertions": "0.17.0",
23
- "@wix/evalforge-github-client": "0.12.0",
24
- "@wix/evalforge-types": "0.37.0",
23
+ "@wix/evalforge-github-client": "0.13.0",
24
+ "@wix/evalforge-types": "0.38.0",
25
25
  "ai": "^6.0.6",
26
26
  "diff": "^7.0.0",
27
27
  "tar": "^7.5.3",
@@ -60,5 +60,5 @@
60
60
  "artifactId": "evalforge-evaluator"
61
61
  }
62
62
  },
63
- "falconPackageHash": "d29c43a0ab418d4d0299c2361e9aa08ee7b77333b0809ebf01a1ed56"
63
+ "falconPackageHash": "9d17afa8362ffb19ba5d6ae9d176be3aae4ad4d2a412cee73f001893"
64
64
  }