@wix/evalforge-types 0.41.0 → 0.43.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 +48 -5
- package/build/index.js.map +2 -2
- package/build/index.mjs +42 -5
- package/build/index.mjs.map +3 -3
- package/build/types/agent/adapter.d.ts +20 -7
- package/build/types/common/models.d.ts +4 -0
- package/build/types/index.d.ts +1 -1
- package/build/types/target/agent.d.ts +45 -8
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -20,6 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
AGENT_TYPE_LABELS: () => AGENT_TYPE_LABELS,
|
|
24
|
+
ALL_AVAILABLE_MODEL_IDS: () => ALL_AVAILABLE_MODEL_IDS,
|
|
23
25
|
AVAILABLE_MODEL_IDS: () => AVAILABLE_MODEL_IDS,
|
|
24
26
|
AVAILABLE_OPENAI_MODEL_IDS: () => AVAILABLE_OPENAI_MODEL_IDS,
|
|
25
27
|
AVAILABLE_RUN_COMMANDS: () => AVAILABLE_RUN_COMMANDS,
|
|
@@ -27,7 +29,10 @@ __export(index_exports, {
|
|
|
27
29
|
AgentRunCommand: () => AgentRunCommand,
|
|
28
30
|
AgentRunCommandSchema: () => AgentRunCommandSchema,
|
|
29
31
|
AgentSchema: () => AgentSchema,
|
|
32
|
+
AgentType: () => AgentType,
|
|
33
|
+
AgentTypeSchema: () => AgentTypeSchema,
|
|
30
34
|
AllowedCommands: () => AllowedCommands,
|
|
35
|
+
AnyModelSchema: () => AnyModelSchema,
|
|
31
36
|
ApiCallSchema: () => ApiCallSchema,
|
|
32
37
|
AssertionConfigSchema: () => AssertionConfigSchema,
|
|
33
38
|
AssertionParameterSchema: () => AssertionParameterSchema,
|
|
@@ -61,6 +66,7 @@ __export(index_exports, {
|
|
|
61
66
|
CreateTestScenarioInputSchema: () => CreateTestScenarioInputSchema,
|
|
62
67
|
CreateTestSuiteInputSchema: () => CreateTestSuiteInputSchema,
|
|
63
68
|
CustomAssertionSchema: () => CustomAssertionSchema,
|
|
69
|
+
DEFAULT_EVALUATOR_SYSTEM_PROMPT: () => DEFAULT_EVALUATOR_SYSTEM_PROMPT,
|
|
64
70
|
DEFAULT_JUDGE_MODEL: () => DEFAULT_JUDGE_MODEL,
|
|
65
71
|
DiffContentSchema: () => DiffContentSchema,
|
|
66
72
|
DiffLineSchema: () => DiffLineSchema,
|
|
@@ -1125,9 +1131,16 @@ var AVAILABLE_OPENAI_MODEL_IDS = Object.values(
|
|
|
1125
1131
|
var OpenAIModelSchema = import_zod4.z.enum(
|
|
1126
1132
|
AVAILABLE_OPENAI_MODEL_IDS
|
|
1127
1133
|
);
|
|
1134
|
+
var ALL_AVAILABLE_MODEL_IDS = [
|
|
1135
|
+
...AVAILABLE_MODEL_IDS,
|
|
1136
|
+
...AVAILABLE_OPENAI_MODEL_IDS
|
|
1137
|
+
];
|
|
1138
|
+
var AnyModelSchema = import_zod4.z.enum(
|
|
1139
|
+
ALL_AVAILABLE_MODEL_IDS
|
|
1140
|
+
);
|
|
1128
1141
|
var nullToUndefined = (val) => val === null ? void 0 : val;
|
|
1129
1142
|
var ModelConfigSchema = import_zod4.z.object({
|
|
1130
|
-
model:
|
|
1143
|
+
model: AnyModelSchema,
|
|
1131
1144
|
temperature: import_zod4.z.preprocess(
|
|
1132
1145
|
nullToUndefined,
|
|
1133
1146
|
import_zod4.z.number().min(0).max(1).optional()
|
|
@@ -1170,6 +1183,24 @@ var TargetSchema = TenantEntitySchema.extend({
|
|
|
1170
1183
|
|
|
1171
1184
|
// src/target/agent.ts
|
|
1172
1185
|
var import_zod6 = require("zod");
|
|
1186
|
+
var DEFAULT_EVALUATOR_SYSTEM_PROMPT = `IMPORTANT: This is an automated evaluation run. Follow these guidelines:
|
|
1187
|
+
1. Execute the requested changes immediately without asking for confirmation.
|
|
1188
|
+
2. Do NOT ask "would you like me to proceed?" or similar questions.
|
|
1189
|
+
3. Do NOT use the Task tool to delegate simple operations - do them directly yourself.
|
|
1190
|
+
4. Keep your approach simple and direct - avoid excessive planning.
|
|
1191
|
+
5. Make targeted edits using Read and Edit tools rather than exploring the entire codebase.
|
|
1192
|
+
6. If you encounter an error, fix it directly rather than starting over.
|
|
1193
|
+
7. Your project root is the current working directory. Always create and modify source code files relative to the project root, NOT inside .claude/skills/ directories.
|
|
1194
|
+
8. Before finishing, run the project's package manager install command (e.g. \`npm install\`, \`yarn install\`, or \`pnpm install\` depending on the lockfile present) to ensure all dependencies are installed and the project is ready to build.`;
|
|
1195
|
+
var AgentType = {
|
|
1196
|
+
CLI: "cli",
|
|
1197
|
+
SDK: "sdk"
|
|
1198
|
+
};
|
|
1199
|
+
var AgentTypeSchema = import_zod6.z.enum([AgentType.CLI, AgentType.SDK]);
|
|
1200
|
+
var AGENT_TYPE_LABELS = {
|
|
1201
|
+
[AgentType.CLI]: "CLI Agent",
|
|
1202
|
+
[AgentType.SDK]: "Simple Agent"
|
|
1203
|
+
};
|
|
1173
1204
|
var AgentRunCommand = /* @__PURE__ */ ((AgentRunCommand2) => {
|
|
1174
1205
|
AgentRunCommand2["CLAUDE"] = "claude";
|
|
1175
1206
|
return AgentRunCommand2;
|
|
@@ -1180,10 +1211,15 @@ var RUN_COMMAND_LABELS = {
|
|
|
1180
1211
|
};
|
|
1181
1212
|
var AgentRunCommandSchema = import_zod6.z.nativeEnum(AgentRunCommand);
|
|
1182
1213
|
var AgentSchema = TargetSchema.extend({
|
|
1183
|
-
/**
|
|
1184
|
-
|
|
1214
|
+
/** Agent type: 'cli' for external CLI tools, 'sdk' for in-process SDK agents */
|
|
1215
|
+
agentType: AgentTypeSchema.default(AgentType.CLI),
|
|
1216
|
+
/** Command to run the agent (required for CLI agents, absent for SDK agents) */
|
|
1217
|
+
runCommand: AgentRunCommandSchema.optional(),
|
|
1185
1218
|
/** Optional model configuration override */
|
|
1186
|
-
modelConfig: ModelConfigSchema.optional()
|
|
1219
|
+
modelConfig: ModelConfigSchema.optional(),
|
|
1220
|
+
systemPrompt: import_zod6.z.string().nullish().describe(
|
|
1221
|
+
"Override for eval runs. undefined=default instructions, null=raw agent, string=append to claude_code preset. See https://docs.anthropic.com/en/docs/claude-code/sdk/modifying-system-prompts"
|
|
1222
|
+
)
|
|
1187
1223
|
});
|
|
1188
1224
|
var CreateAgentInputSchema = AgentSchema.omit({
|
|
1189
1225
|
id: true,
|
|
@@ -1192,7 +1228,8 @@ var CreateAgentInputSchema = AgentSchema.omit({
|
|
|
1192
1228
|
deleted: true
|
|
1193
1229
|
});
|
|
1194
1230
|
var UpdateAgentInputSchema = CreateAgentInputSchema.partial().extend({
|
|
1195
|
-
modelConfig: ModelConfigSchema.optional().nullable()
|
|
1231
|
+
modelConfig: ModelConfigSchema.optional().nullable(),
|
|
1232
|
+
systemPrompt: import_zod6.z.string().optional().nullable()
|
|
1196
1233
|
});
|
|
1197
1234
|
|
|
1198
1235
|
// src/target/skill.ts
|
|
@@ -2358,6 +2395,8 @@ function getSystemAssertion(id) {
|
|
|
2358
2395
|
}
|
|
2359
2396
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2360
2397
|
0 && (module.exports = {
|
|
2398
|
+
AGENT_TYPE_LABELS,
|
|
2399
|
+
ALL_AVAILABLE_MODEL_IDS,
|
|
2361
2400
|
AVAILABLE_MODEL_IDS,
|
|
2362
2401
|
AVAILABLE_OPENAI_MODEL_IDS,
|
|
2363
2402
|
AVAILABLE_RUN_COMMANDS,
|
|
@@ -2365,7 +2404,10 @@ function getSystemAssertion(id) {
|
|
|
2365
2404
|
AgentRunCommand,
|
|
2366
2405
|
AgentRunCommandSchema,
|
|
2367
2406
|
AgentSchema,
|
|
2407
|
+
AgentType,
|
|
2408
|
+
AgentTypeSchema,
|
|
2368
2409
|
AllowedCommands,
|
|
2410
|
+
AnyModelSchema,
|
|
2369
2411
|
ApiCallSchema,
|
|
2370
2412
|
AssertionConfigSchema,
|
|
2371
2413
|
AssertionParameterSchema,
|
|
@@ -2399,6 +2441,7 @@ function getSystemAssertion(id) {
|
|
|
2399
2441
|
CreateTestScenarioInputSchema,
|
|
2400
2442
|
CreateTestSuiteInputSchema,
|
|
2401
2443
|
CustomAssertionSchema,
|
|
2444
|
+
DEFAULT_EVALUATOR_SYSTEM_PROMPT,
|
|
2402
2445
|
DEFAULT_JUDGE_MODEL,
|
|
2403
2446
|
DiffContentSchema,
|
|
2404
2447
|
DiffLineSchema,
|