@wix/evalforge-types 0.78.0 → 0.80.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 +117 -22
- package/build/index.js.map +4 -4
- package/build/index.mjs +108 -22
- package/build/index.mjs.map +4 -4
- package/build/types/agent/adapter.d.ts +5 -3
- package/build/types/agent/agent-config.d.ts +118 -0
- package/build/types/agent/index.d.ts +2 -0
- package/build/types/evaluation/eval-run.d.ts +3 -0
- package/build/types/target/agent.d.ts +3 -0
- package/package.json +2 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { SkillWithLatestVersion } from '../target/skill.js';
|
|
2
2
|
import type { TestScenario, TriggerPromptImage } from '../scenario/test-scenario.js';
|
|
3
|
-
import type { ModelConfig } from '../common/models.js';
|
|
4
3
|
import type { LLMTrace } from '../evaluation/metrics.js';
|
|
5
4
|
import type { ConversationMessage } from '../evaluation/conversation.js';
|
|
6
5
|
import type { MCPEntity } from '../common/mcp.js';
|
|
@@ -47,8 +46,11 @@ export interface AgentExecutionContext {
|
|
|
47
46
|
scenario: TestScenario;
|
|
48
47
|
/** Working directory for the execution */
|
|
49
48
|
cwd: string;
|
|
50
|
-
/**
|
|
51
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Unified agent config bag — model params + agent-specific settings.
|
|
51
|
+
* Adapters parse this with their typed Zod schema (e.g. ClaudeCodeConfigSchema).
|
|
52
|
+
*/
|
|
53
|
+
config?: Record<string, unknown>;
|
|
52
54
|
/** AI Gateway base URL for LLM calls */
|
|
53
55
|
aiGatewayUrl?: string;
|
|
54
56
|
/** Custom headers for AI Gateway requests */
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const BaseAgentConfigSchema: z.ZodObject<{
|
|
3
|
+
model: z.ZodOptional<z.ZodEnum<{
|
|
4
|
+
[x: string]: string;
|
|
5
|
+
}>>;
|
|
6
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type BaseAgentConfig = z.infer<typeof BaseAgentConfigSchema>;
|
|
12
|
+
export declare const EffortLevelSchema: z.ZodEnum<{
|
|
13
|
+
low: "low";
|
|
14
|
+
medium: "medium";
|
|
15
|
+
high: "high";
|
|
16
|
+
max: "max";
|
|
17
|
+
}>;
|
|
18
|
+
export type EffortLevel = z.infer<typeof EffortLevelSchema>;
|
|
19
|
+
export declare const ClaudeCodeConfigSchema: z.ZodObject<{
|
|
20
|
+
model: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
[x: string]: string;
|
|
22
|
+
}>>;
|
|
23
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
maxThinkingTokens: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
|
+
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
low: "low";
|
|
32
|
+
medium: "medium";
|
|
33
|
+
high: "high";
|
|
34
|
+
max: "max";
|
|
35
|
+
}>>;
|
|
36
|
+
maxBudgetUsd: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type ClaudeCodeConfig = z.infer<typeof ClaudeCodeConfigSchema>;
|
|
39
|
+
/** Permission values: allow or deny. */
|
|
40
|
+
export declare const PermissionValueSchema: z.ZodEnum<{
|
|
41
|
+
allow: "allow";
|
|
42
|
+
deny: "deny";
|
|
43
|
+
}>;
|
|
44
|
+
export type PermissionValue = z.infer<typeof PermissionValueSchema>;
|
|
45
|
+
/**
|
|
46
|
+
* OpenCode permission object — mixed format matching the CLI's config schema.
|
|
47
|
+
*
|
|
48
|
+
* Category keys (`bash`, `edit`, `external_directory`) accept nested glob-pattern
|
|
49
|
+
* maps: `{ "git *": "allow", "*": "deny" }`.
|
|
50
|
+
*
|
|
51
|
+
* Tool-level keys (`task`, `skill`, `todowrite`, etc.) and the catch-all `*`
|
|
52
|
+
* accept a flat `"allow"` or `"deny"` string.
|
|
53
|
+
*
|
|
54
|
+
* @example { "*": "allow", task: "deny", bash: { "git *": "allow", "*": "deny" } }
|
|
55
|
+
*/
|
|
56
|
+
export declare const OpenCodePermissionSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
|
|
57
|
+
allow: "allow";
|
|
58
|
+
deny: "deny";
|
|
59
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
60
|
+
allow: "allow";
|
|
61
|
+
deny: "deny";
|
|
62
|
+
}>>]>>;
|
|
63
|
+
export type OpenCodePermission = z.infer<typeof OpenCodePermissionSchema>;
|
|
64
|
+
export declare const ThinkingVariantSchema: z.ZodEnum<{
|
|
65
|
+
low: "low";
|
|
66
|
+
high: "high";
|
|
67
|
+
none: "none";
|
|
68
|
+
}>;
|
|
69
|
+
export type ThinkingVariant = z.infer<typeof ThinkingVariantSchema>;
|
|
70
|
+
export declare const OpenCodeConfigSchema: z.ZodObject<{
|
|
71
|
+
model: z.ZodOptional<z.ZodEnum<{
|
|
72
|
+
[x: string]: string;
|
|
73
|
+
}>>;
|
|
74
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
permission: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
|
|
78
|
+
allow: "allow";
|
|
79
|
+
deny: "deny";
|
|
80
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
81
|
+
allow: "allow";
|
|
82
|
+
deny: "deny";
|
|
83
|
+
}>>]>>>;
|
|
84
|
+
thinkingVariant: z.ZodOptional<z.ZodEnum<{
|
|
85
|
+
low: "low";
|
|
86
|
+
high: "high";
|
|
87
|
+
none: "none";
|
|
88
|
+
}>>;
|
|
89
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
export type OpenCodeConfig = z.infer<typeof OpenCodeConfigSchema>;
|
|
92
|
+
export declare const ReasoningEffortSchema: z.ZodEnum<{
|
|
93
|
+
low: "low";
|
|
94
|
+
medium: "medium";
|
|
95
|
+
high: "high";
|
|
96
|
+
}>;
|
|
97
|
+
export type ReasoningEffort = z.infer<typeof ReasoningEffortSchema>;
|
|
98
|
+
export declare const SimpleAgentConfigSchema: z.ZodObject<{
|
|
99
|
+
model: z.ZodOptional<z.ZodEnum<{
|
|
100
|
+
[x: string]: string;
|
|
101
|
+
}>>;
|
|
102
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
thinkingBudgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
stopSequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
110
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
111
|
+
low: "low";
|
|
112
|
+
medium: "medium";
|
|
113
|
+
high: "high";
|
|
114
|
+
}>>;
|
|
115
|
+
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
presencePenalty: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
export type SimpleAgentConfig = z.infer<typeof SimpleAgentConfigSchema>;
|
|
@@ -7,3 +7,5 @@
|
|
|
7
7
|
* agent types (Claude Code, Cursor, Aider, etc.) through a unified interface.
|
|
8
8
|
*/
|
|
9
9
|
export type { TraceContext, AgentExecutionContext, AgentTokenUsage, AgentExecutionResult, AgentAdapter } from './adapter.js';
|
|
10
|
+
export { BaseAgentConfigSchema, ClaudeCodeConfigSchema, EffortLevelSchema, OpenCodeConfigSchema, OpenCodePermissionSchema, PermissionValueSchema, ThinkingVariantSchema, SimpleAgentConfigSchema, ReasoningEffortSchema } from './agent-config.js';
|
|
11
|
+
export type { BaseAgentConfig, ClaudeCodeConfig, EffortLevel, OpenCodeConfig, OpenCodePermission, PermissionValue, ThinkingVariant, SimpleAgentConfig, ReasoningEffort } from './agent-config.js';
|
|
@@ -476,6 +476,7 @@ export declare const EvalRunSchema: z.ZodObject<{
|
|
|
476
476
|
maxTokens: z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodOptional<z.ZodNumber>>;
|
|
477
477
|
maxTurns: z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodOptional<z.ZodNumber>>;
|
|
478
478
|
}, z.core.$strip>>;
|
|
479
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
479
480
|
}, z.core.$strip>>;
|
|
480
481
|
comparisonGroupId: z.ZodOptional<z.ZodString>;
|
|
481
482
|
comparisonLabel: z.ZodOptional<z.ZodString>;
|
|
@@ -500,6 +501,7 @@ export declare const EvalRunSchema: z.ZodObject<{
|
|
|
500
501
|
recommendation: z.ZodOptional<z.ZodString>;
|
|
501
502
|
}, z.core.$strip>>;
|
|
502
503
|
}, z.core.$strip>>;
|
|
504
|
+
folderIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
503
505
|
}, z.core.$strip>;
|
|
504
506
|
export type EvalRun = z.infer<typeof EvalRunSchema>;
|
|
505
507
|
/**
|
|
@@ -597,6 +599,7 @@ export declare const CreateEvalRunInputSchema: z.ZodObject<{
|
|
|
597
599
|
recommendation: z.ZodOptional<z.ZodString>;
|
|
598
600
|
}, z.core.$strip>>;
|
|
599
601
|
}, z.core.$strip>>;
|
|
602
|
+
folderIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
600
603
|
scenarioIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
601
604
|
}, z.core.$strip>;
|
|
602
605
|
export type CreateEvalRunInput = z.infer<typeof CreateEvalRunInputSchema>;
|
|
@@ -64,6 +64,7 @@ export declare const AgentSchema: z.ZodObject<{
|
|
|
64
64
|
maxTurns: z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodOptional<z.ZodNumber>>;
|
|
65
65
|
}, z.core.$strip>>;
|
|
66
66
|
systemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
67
68
|
}, z.core.$strip>;
|
|
68
69
|
export type Agent = z.infer<typeof AgentSchema>;
|
|
69
70
|
/**
|
|
@@ -73,6 +74,7 @@ export declare const CreateAgentInputSchema: z.ZodObject<{
|
|
|
73
74
|
name: z.ZodString;
|
|
74
75
|
description: z.ZodString;
|
|
75
76
|
projectId: z.ZodString;
|
|
77
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
76
78
|
agentType: z.ZodDefault<z.ZodEnum<{
|
|
77
79
|
cli: "cli";
|
|
78
80
|
sdk: "sdk";
|
|
@@ -111,5 +113,6 @@ export declare const UpdateAgentInputSchema: z.ZodObject<{
|
|
|
111
113
|
maxTurns: z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodOptional<z.ZodNumber>>;
|
|
112
114
|
}, z.core.$strip>>>;
|
|
113
115
|
systemPrompt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
116
|
+
config: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
114
117
|
}, z.core.$strip>;
|
|
115
118
|
export type UpdateAgentInput = z.infer<typeof UpdateAgentInputSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/evalforge-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.0",
|
|
4
4
|
"description": "Unified types for EvalForge agent evaluation system",
|
|
5
5
|
"files": [
|
|
6
6
|
"build"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"artifactId": "evalforge-types"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
"falconPackageHash": "
|
|
49
|
+
"falconPackageHash": "452d1ba099976f8e1e856ec921eb1d85176eef11b534eb75af2577f9"
|
|
50
50
|
}
|