@wix/evalforge-evaluator 0.184.0 → 0.185.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.
- package/build/index.js +218 -215
- package/build/index.js.map +4 -4
- package/build/index.mjs +133 -129
- package/build/index.mjs.map +4 -4
- package/build/types/run-scenario/agents/claude-code/write-mcp.d.ts +1 -7
- package/build/types/run-scenario/agents/claude-code/write-rules.d.ts +1 -7
- package/build/types/run-scenario/agents/claude-code/write-skills.d.ts +9 -6
- package/build/types/run-scenario/agents/claude-code/write-sub-agents.d.ts +5 -4
- package/build/types/run-scenario/agents/opencode/write-skills.d.ts +8 -5
- package/build/types/run-scenario/agents/opencode/write-sub-agents.d.ts +3 -3
- package/package.json +2 -2
- package/build/types/run-scenario/agents/shared/resolve-capability-content.d.ts +0 -42
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { MCPEntity } from '@wix/evalforge-types';
|
|
2
|
-
import { type FetchGitHubFileFn } from '../shared/resolve-capability-content.js';
|
|
3
|
-
export type { FetchGitHubFileFn };
|
|
4
2
|
/**
|
|
5
3
|
* Write .mcp.json at the project root (cwd) for Claude Code to discover MCPs.
|
|
6
4
|
*
|
|
@@ -11,12 +9,8 @@ export type { FetchGitHubFileFn };
|
|
|
11
9
|
* Any `{{placeholder}}` values in the config are resolved before writing
|
|
12
10
|
* (e.g. `{{wix-auth-token}}` → token from ~/.wix/auth/api-key.json).
|
|
13
11
|
*
|
|
14
|
-
* For MCPs with a GitHub source, the latest config is live-fetched.
|
|
15
|
-
* For inline MCPs, the stored config is used directly.
|
|
16
|
-
*
|
|
17
12
|
* @see https://code.claude.com/docs/en/mcp#mcp-installation-scopes
|
|
18
13
|
* @param cwd - Working directory (project root for Claude Code)
|
|
19
14
|
* @param mcps - MCP entities whose config is merged into mcpServers
|
|
20
|
-
* @param fetchFn - Optional GitHub fetcher (injectable for tests)
|
|
21
15
|
*/
|
|
22
|
-
export declare function writeMcpToFilesystem(cwd: string, mcps: MCPEntity[]
|
|
16
|
+
export declare function writeMcpToFilesystem(cwd: string, mcps: MCPEntity[]): Promise<void>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { Rule } from '@wix/evalforge-types';
|
|
2
|
-
import { type FetchGitHubFileFn } from '../shared/resolve-capability-content.js';
|
|
3
|
-
export type { FetchGitHubFileFn };
|
|
4
2
|
/**
|
|
5
3
|
* Write rule content to the filesystem based on each rule's `ruleType`.
|
|
6
4
|
*
|
|
@@ -10,11 +8,7 @@ export type { FetchGitHubFileFn };
|
|
|
10
8
|
* - `cursor-rule` -> `{cwd}/.cursor/rules/{name}.md` (one file per rule)
|
|
11
9
|
* - `generic` -> `{cwd}/{rule.directory}` (defaults to `.opencode/rules`)
|
|
12
10
|
*
|
|
13
|
-
* For rules with a GitHub source, the latest content is live-fetched.
|
|
14
|
-
* For inline rules, the stored content is used directly.
|
|
15
|
-
*
|
|
16
11
|
* @param cwd - Working directory (project root for Claude Code)
|
|
17
12
|
* @param rules - Rule entities to write
|
|
18
|
-
* @param fetchFn - Optional GitHub fetcher (injectable for tests)
|
|
19
13
|
*/
|
|
20
|
-
export declare function writeRulesToFilesystem(cwd: string, rules: Rule[]
|
|
14
|
+
export declare function writeRulesToFilesystem(cwd: string, rules: Rule[]): Promise<void>;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import type { SkillWithLatestVersion } from '@wix/evalforge-types';
|
|
2
|
-
import { type FetchGitHubFolderFn } from '../shared/resolve-capability-content.js';
|
|
1
|
+
import type { GitHubSource, SkillFile, SkillWithLatestVersion } from '@wix/evalforge-types';
|
|
3
2
|
import { writeFilesToDirectory } from '../../utils/write-files.js';
|
|
4
|
-
export type
|
|
3
|
+
export type FetchGitHubFolderFn = (source: GitHubSource, options?: {
|
|
4
|
+
userAgent?: string;
|
|
5
|
+
}) => Promise<SkillFile[]>;
|
|
5
6
|
/**
|
|
6
7
|
* Write all skills to the filesystem so Claude Agent SDK can discover them.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
|
+
* Content resolution:
|
|
10
|
+
* 1. Pinned (version has `files`): writes all files from the stored snapshot
|
|
11
|
+
* 2. Live (skill has `source`, no pinned files): fetches from GitHub at runtime
|
|
9
12
|
*
|
|
10
13
|
* @param cwd - Working directory where .claude/skills/ will be created
|
|
11
14
|
* @param skills - All skills to write
|
|
12
|
-
* @param fetchFn -
|
|
15
|
+
* @param fetchFn - Function to fetch files from GitHub (defaults to fetchGitHubFolder)
|
|
13
16
|
*/
|
|
14
17
|
export declare function writeSkillsToFilesystem(cwd: string, skills: SkillWithLatestVersion[], fetchFn?: FetchGitHubFolderFn): Promise<void>;
|
|
15
18
|
export declare function writeSkillToFilesystem(cwd: string, skill: SkillWithLatestVersion, fetchFn?: FetchGitHubFolderFn): Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { SubAgent } from '@wix/evalforge-types';
|
|
2
|
-
import { type
|
|
3
|
-
|
|
1
|
+
import type { SubAgent, GitHubSource } from '@wix/evalforge-types';
|
|
2
|
+
import { type FetchGitHubFolderOptions } from '@wix/evalforge-github-client';
|
|
3
|
+
/** Signature for the single-file GitHub fetch function (injectable for tests). */
|
|
4
|
+
export type FetchGitHubFileFn = (source: GitHubSource, options?: FetchGitHubFolderOptions) => Promise<string>;
|
|
4
5
|
/**
|
|
5
6
|
* Write sub-agent markdown files to .claude/agents/ for Claude Code to discover.
|
|
6
7
|
*
|
|
@@ -10,6 +11,6 @@ export type { FetchGitHubFileFn };
|
|
|
10
11
|
* @see https://code.claude.com/docs/en/sub-agents#write-subagent-files
|
|
11
12
|
* @param cwd - Working directory (project root for Claude Code)
|
|
12
13
|
* @param subAgents - Sub-agent entities to write
|
|
13
|
-
* @param fetchFn - Optional
|
|
14
|
+
* @param fetchFn - Optional fetch function for testing (defaults to fetchGitHubFile)
|
|
14
15
|
*/
|
|
15
16
|
export declare function writeSubAgentsToFilesystem(cwd: string, subAgents: SubAgent[], fetchFn?: FetchGitHubFileFn): Promise<void>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import type { SkillWithLatestVersion } from '@wix/evalforge-types';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { GitHubSource, SkillFile, SkillWithLatestVersion } from '@wix/evalforge-types';
|
|
2
|
+
export type FetchGitHubFolderFn = (source: GitHubSource, options?: {
|
|
3
|
+
userAgent?: string;
|
|
4
|
+
}) => Promise<SkillFile[]>;
|
|
4
5
|
/**
|
|
5
6
|
* Write all skills to .opencode/skills/ so OpenCode can discover them.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
*
|
|
8
|
+
* Content resolution:
|
|
9
|
+
* 1. Pinned (version has `files`): writes all files from the stored snapshot
|
|
10
|
+
* 2. Live (skill has `source`, no pinned files): fetches from GitHub at runtime
|
|
8
11
|
*/
|
|
9
12
|
export declare function writeSkillsToFilesystem(cwd: string, skills: SkillWithLatestVersion[], fetchFn?: FetchGitHubFolderFn): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SubAgent } from '@wix/evalforge-types';
|
|
2
|
-
import { type
|
|
3
|
-
export type
|
|
1
|
+
import type { SubAgent, GitHubSource } from '@wix/evalforge-types';
|
|
2
|
+
import { type FetchGitHubFolderOptions } from '@wix/evalforge-github-client';
|
|
3
|
+
export type FetchGitHubFileFn = (source: GitHubSource, options?: FetchGitHubFolderOptions) => Promise<string>;
|
|
4
4
|
/**
|
|
5
5
|
* Write sub-agent markdown files to .opencode/agents/ for OpenCode to discover.
|
|
6
6
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/evalforge-evaluator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.185.0",
|
|
4
4
|
"description": "EvalForge Evaluator",
|
|
5
5
|
"bin": "./build/index.js",
|
|
6
6
|
"files": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"artifactId": "evalforge-evaluator"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"falconPackageHash": "
|
|
74
|
+
"falconPackageHash": "dfd02ba6f45353d47a0775bfef57afbcedc9143ad4fc740d84c839f2"
|
|
75
75
|
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Capability content fetcher.
|
|
3
|
-
*
|
|
4
|
-
* Single place that resolves the runtime content of a capability for an eval
|
|
5
|
-
* run, choosing between two sources:
|
|
6
|
-
* 1. DB snapshot — the stored version content already loaded onto the entity
|
|
7
|
-
* (skill version files, sub-agent markdown, rule text, MCP config).
|
|
8
|
-
* 2. Live GitHub — when the entity has a `source` and no usable snapshot,
|
|
9
|
-
* the latest content is fetched from GitHub at run time.
|
|
10
|
-
*
|
|
11
|
-
* Shared by every agent runner (claude-code, opencode) and every capability
|
|
12
|
-
* type so the GitHub-vs-DB decision lives in exactly one place.
|
|
13
|
-
*/
|
|
14
|
-
import { type FetchGitHubFolderOptions } from '@wix/evalforge-github-client';
|
|
15
|
-
import type { GitHubSource, SkillFile, SkillWithLatestVersion, SubAgent, Rule, MCPEntity } from '@wix/evalforge-types';
|
|
16
|
-
/** Fetches a single file from GitHub and returns its UTF-8 content. */
|
|
17
|
-
export type FetchGitHubFileFn = (source: GitHubSource, options?: FetchGitHubFolderOptions) => Promise<string>;
|
|
18
|
-
/** Fetches a directory snapshot from GitHub and returns its files. */
|
|
19
|
-
export type FetchGitHubFolderFn = (source: GitHubSource, options?: {
|
|
20
|
-
userAgent?: string;
|
|
21
|
-
}) => Promise<SkillFile[]>;
|
|
22
|
-
/**
|
|
23
|
-
* Resolve the files for a skill: the stored version snapshot when present,
|
|
24
|
-
* otherwise a live folder fetch from GitHub. Throws when neither is available.
|
|
25
|
-
*/
|
|
26
|
-
export declare function resolveSkillFiles(skill: SkillWithLatestVersion, fetchFn?: FetchGitHubFolderFn): Promise<SkillFile[]>;
|
|
27
|
-
/**
|
|
28
|
-
* Resolve a sub-agent's markdown: live-fetch when a source is set, else the
|
|
29
|
-
* inline `subAgentMd`.
|
|
30
|
-
*/
|
|
31
|
-
export declare function resolveSubAgentMd(agent: SubAgent, fetchFn?: FetchGitHubFileFn): Promise<string>;
|
|
32
|
-
/**
|
|
33
|
-
* Resolve a rule's text content: live-fetch when a source is set, else the
|
|
34
|
-
* inline `content`.
|
|
35
|
-
*/
|
|
36
|
-
export declare function resolveRuleText(rule: Rule, fetchFn?: FetchGitHubFileFn): Promise<string>;
|
|
37
|
-
/**
|
|
38
|
-
* Resolve an MCP's keyed server config: live-fetch and parse the JSON config
|
|
39
|
-
* file when a source is set (unwrapping a top-level `mcpServers` key when
|
|
40
|
-
* present), else the inline `config`.
|
|
41
|
-
*/
|
|
42
|
-
export declare function resolveMcpConfig(mcp: MCPEntity, fetchFn?: FetchGitHubFileFn): Promise<Record<string, unknown>>;
|