@indemn/cli 1.0.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/.claude-plugin/plugin.json +13 -0
- package/.mcp.json +9 -0
- package/README.md +225 -0
- package/dist/cli/agents.d.ts +3 -0
- package/dist/cli/agents.d.ts.map +1 -0
- package/dist/cli/agents.js +187 -0
- package/dist/cli/agents.js.map +1 -0
- package/dist/cli/auth.d.ts +3 -0
- package/dist/cli/auth.d.ts.map +1 -0
- package/dist/cli/auth.js +161 -0
- package/dist/cli/auth.js.map +1 -0
- package/dist/cli/chat.d.ts +3 -0
- package/dist/cli/chat.d.ts.map +1 -0
- package/dist/cli/chat.js +142 -0
- package/dist/cli/chat.js.map +1 -0
- package/dist/cli/config.d.ts +3 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +119 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/eval.d.ts +3 -0
- package/dist/cli/eval.d.ts.map +1 -0
- package/dist/cli/eval.js +717 -0
- package/dist/cli/eval.js.map +1 -0
- package/dist/cli/functions.d.ts +3 -0
- package/dist/cli/functions.d.ts.map +1 -0
- package/dist/cli/functions.js +346 -0
- package/dist/cli/functions.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +64 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/kb.d.ts +3 -0
- package/dist/cli/kb.d.ts.map +1 -0
- package/dist/cli/kb.js +377 -0
- package/dist/cli/kb.js.map +1 -0
- package/dist/cli/utils/output.d.ts +6 -0
- package/dist/cli/utils/output.d.ts.map +1 -0
- package/dist/cli/utils/output.js +36 -0
- package/dist/cli/utils/output.js.map +1 -0
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +15 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +4 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +814 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/sdk/agents.d.ts +13 -0
- package/dist/sdk/agents.d.ts.map +1 -0
- package/dist/sdk/agents.js +27 -0
- package/dist/sdk/agents.js.map +1 -0
- package/dist/sdk/auth.d.ts +18 -0
- package/dist/sdk/auth.d.ts.map +1 -0
- package/dist/sdk/auth.js +98 -0
- package/dist/sdk/auth.js.map +1 -0
- package/dist/sdk/chat.d.ts +17 -0
- package/dist/sdk/chat.d.ts.map +1 -0
- package/dist/sdk/chat.js +113 -0
- package/dist/sdk/chat.js.map +1 -0
- package/dist/sdk/client.d.ts +36 -0
- package/dist/sdk/client.d.ts.map +1 -0
- package/dist/sdk/client.js +219 -0
- package/dist/sdk/client.js.map +1 -0
- package/dist/sdk/config.d.ts +11 -0
- package/dist/sdk/config.d.ts.map +1 -0
- package/dist/sdk/config.js +20 -0
- package/dist/sdk/config.js.map +1 -0
- package/dist/sdk/eval.d.ts +13 -0
- package/dist/sdk/eval.d.ts.map +1 -0
- package/dist/sdk/eval.js +36 -0
- package/dist/sdk/eval.js.map +1 -0
- package/dist/sdk/functions.d.ts +30 -0
- package/dist/sdk/functions.d.ts.map +1 -0
- package/dist/sdk/functions.js +59 -0
- package/dist/sdk/functions.js.map +1 -0
- package/dist/sdk/index.d.ts +12 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +12 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/kb.d.ts +30 -0
- package/dist/sdk/kb.d.ts.map +1 -0
- package/dist/sdk/kb.js +102 -0
- package/dist/sdk/kb.js.map +1 -0
- package/dist/sdk/rubrics.d.ts +14 -0
- package/dist/sdk/rubrics.d.ts.map +1 -0
- package/dist/sdk/rubrics.js +29 -0
- package/dist/sdk/rubrics.js.map +1 -0
- package/dist/sdk/test-sets.d.ts +14 -0
- package/dist/sdk/test-sets.d.ts.map +1 -0
- package/dist/sdk/test-sets.js +29 -0
- package/dist/sdk/test-sets.js.map +1 -0
- package/dist/sdk/types.d.ts +305 -0
- package/dist/sdk/types.d.ts.map +1 -0
- package/dist/sdk/types.js +3 -0
- package/dist/sdk/types.js.map +1 -0
- package/package.json +40 -0
- package/skills/agent-setup/SKILL.md +131 -0
- package/skills/eval-orchestration/SKILL.md +257 -0
- package/skills/rubric-creation/SKILL.md +163 -0
- package/skills/test-set-creation/SKILL.md +250 -0
- package/src/cli/agents.ts +206 -0
- package/src/cli/auth.ts +170 -0
- package/src/cli/chat.ts +161 -0
- package/src/cli/config.ts +131 -0
- package/src/cli/eval.ts +750 -0
- package/src/cli/functions.ts +330 -0
- package/src/cli/index.ts +68 -0
- package/src/cli/kb.ts +412 -0
- package/src/cli/utils/output.ts +42 -0
- package/src/mcp/server.ts +17 -0
- package/src/mcp/tools.ts +971 -0
- package/src/sdk/agents.ts +47 -0
- package/src/sdk/auth.ts +132 -0
- package/src/sdk/chat.ts +133 -0
- package/src/sdk/client.ts +238 -0
- package/src/sdk/config.ts +28 -0
- package/src/sdk/eval.ts +57 -0
- package/src/sdk/functions.ts +103 -0
- package/src/sdk/index.ts +11 -0
- package/src/sdk/kb.ts +183 -0
- package/src/sdk/rubrics.ts +35 -0
- package/src/sdk/test-sets.ts +35 -0
- package/src/sdk/types.ts +347 -0
- package/test/fixtures/test-rubric.json +66 -0
- package/test/fixtures/test-testset.json +55 -0
- package/tsconfig.json +19 -0
package/src/sdk/types.ts
ADDED
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
// Environment and configuration types
|
|
2
|
+
|
|
3
|
+
export type Environment = 'dev' | 'production';
|
|
4
|
+
|
|
5
|
+
export interface EnvironmentHosts {
|
|
6
|
+
copilot: string;
|
|
7
|
+
evaluations: string;
|
|
8
|
+
middleware: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface IndemnConfig {
|
|
12
|
+
api_key: string;
|
|
13
|
+
org_id: string;
|
|
14
|
+
user_id: string;
|
|
15
|
+
environment: Environment;
|
|
16
|
+
hosts: Record<Environment, EnvironmentHosts>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// API response types
|
|
20
|
+
|
|
21
|
+
export interface ApiResponse<T = unknown> {
|
|
22
|
+
success: boolean;
|
|
23
|
+
data: T;
|
|
24
|
+
msg?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Agent types
|
|
28
|
+
|
|
29
|
+
export interface Agent {
|
|
30
|
+
_id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
channels?: string[];
|
|
34
|
+
webhook_url?: string;
|
|
35
|
+
webhook_enabled?: boolean;
|
|
36
|
+
trashed?: boolean;
|
|
37
|
+
id_project?: string;
|
|
38
|
+
createdAt?: string;
|
|
39
|
+
updatedAt?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface AgentExpanded extends Agent {
|
|
43
|
+
configurations?: BotConfiguration;
|
|
44
|
+
functions?: BotFunction[];
|
|
45
|
+
mappings?: KBMapping[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface CreateAgentInput {
|
|
49
|
+
name: string;
|
|
50
|
+
channels?: string[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface UpdateAgentInput {
|
|
54
|
+
name?: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
webhook_url?: string;
|
|
57
|
+
webhook_enabled?: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Bot configuration types
|
|
61
|
+
|
|
62
|
+
export interface AIConfig {
|
|
63
|
+
system_prompt?: string;
|
|
64
|
+
system_prompt_ops?: Record<string, unknown>;
|
|
65
|
+
use_default_prompt?: boolean;
|
|
66
|
+
kb_configuration?: {
|
|
67
|
+
namespace?: string;
|
|
68
|
+
index_name?: string;
|
|
69
|
+
embedding_provider?: string;
|
|
70
|
+
};
|
|
71
|
+
is_reranking_enabled?: boolean;
|
|
72
|
+
identify_next_step_enabled?: boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface FirstMessage {
|
|
76
|
+
text?: string;
|
|
77
|
+
quick_replies?: Array<{ type: string; title: string; payload: string }>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface BotConfiguration {
|
|
81
|
+
ai_config?: AIConfig;
|
|
82
|
+
first_message?: FirstMessage;
|
|
83
|
+
is_button_enabled?: boolean;
|
|
84
|
+
[key: string]: unknown;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface SetConfigInput {
|
|
88
|
+
system_prompt?: string;
|
|
89
|
+
first_message?: FirstMessage;
|
|
90
|
+
[key: string]: unknown;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Function/tool types
|
|
94
|
+
|
|
95
|
+
export interface BotFunction {
|
|
96
|
+
_id: string;
|
|
97
|
+
type: string;
|
|
98
|
+
description?: string;
|
|
99
|
+
name?: string;
|
|
100
|
+
url?: string;
|
|
101
|
+
method?: string;
|
|
102
|
+
headers?: Record<string, string>;
|
|
103
|
+
body?: Record<string, unknown>;
|
|
104
|
+
parameters?: FunctionParameter[];
|
|
105
|
+
id_bot?: string;
|
|
106
|
+
createdAt?: string;
|
|
107
|
+
updatedAt?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface FunctionParameter {
|
|
111
|
+
_id?: string;
|
|
112
|
+
name: string;
|
|
113
|
+
type: string;
|
|
114
|
+
description?: string;
|
|
115
|
+
required?: boolean;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface CreateFunctionInput {
|
|
119
|
+
type: string;
|
|
120
|
+
description?: string;
|
|
121
|
+
name?: string;
|
|
122
|
+
url?: string;
|
|
123
|
+
method?: string;
|
|
124
|
+
headers?: Record<string, string>;
|
|
125
|
+
body?: Record<string, unknown>;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface UpdateFunctionInput {
|
|
129
|
+
description?: string;
|
|
130
|
+
name?: string;
|
|
131
|
+
url?: string;
|
|
132
|
+
method?: string;
|
|
133
|
+
headers?: Record<string, string>;
|
|
134
|
+
body?: Record<string, unknown>;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Knowledge base types
|
|
138
|
+
|
|
139
|
+
export interface KnowledgeBase {
|
|
140
|
+
_id: string;
|
|
141
|
+
name: string;
|
|
142
|
+
type?: string;
|
|
143
|
+
description?: string;
|
|
144
|
+
id_project?: string;
|
|
145
|
+
createdAt?: string;
|
|
146
|
+
updatedAt?: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface CreateKBInput {
|
|
150
|
+
name: string;
|
|
151
|
+
type: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface UpdateKBInput {
|
|
155
|
+
name?: string;
|
|
156
|
+
description?: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface DataSource {
|
|
160
|
+
_id: string;
|
|
161
|
+
name?: string;
|
|
162
|
+
type?: string;
|
|
163
|
+
content?: string;
|
|
164
|
+
question?: string;
|
|
165
|
+
answer?: string;
|
|
166
|
+
source_url?: string;
|
|
167
|
+
status?: string;
|
|
168
|
+
id_kb?: string;
|
|
169
|
+
createdAt?: string;
|
|
170
|
+
updatedAt?: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface AddDataSourceInput {
|
|
174
|
+
question?: string;
|
|
175
|
+
answer?: string;
|
|
176
|
+
name?: string;
|
|
177
|
+
source_url?: string;
|
|
178
|
+
content?: string;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface KBMapping {
|
|
182
|
+
_id: string;
|
|
183
|
+
id_bot: string;
|
|
184
|
+
id_kb: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Evaluation types
|
|
188
|
+
|
|
189
|
+
export interface RubricRule {
|
|
190
|
+
id: string;
|
|
191
|
+
name: string;
|
|
192
|
+
severity: 'high' | 'medium' | 'low';
|
|
193
|
+
category: 'persona' | 'instruction_compliance' | 'safety' | 'response_quality';
|
|
194
|
+
description: string;
|
|
195
|
+
component_scope?: 'prompt' | 'general' | 'function' | 'knowledge_base';
|
|
196
|
+
component_ids?: string[] | null;
|
|
197
|
+
component_names?: string[] | null;
|
|
198
|
+
evaluation_criteria?: {
|
|
199
|
+
pass_conditions: string[];
|
|
200
|
+
fail_conditions: string[];
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface Rubric {
|
|
205
|
+
_id?: string;
|
|
206
|
+
rubric_id?: string;
|
|
207
|
+
agent_id?: string;
|
|
208
|
+
name: string;
|
|
209
|
+
description?: string;
|
|
210
|
+
version?: number;
|
|
211
|
+
severity_definitions?: Record<string, string>;
|
|
212
|
+
rules: RubricRule[];
|
|
213
|
+
createdAt?: string;
|
|
214
|
+
updatedAt?: string;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface CreateRubricInput {
|
|
218
|
+
agent_id?: string;
|
|
219
|
+
name: string;
|
|
220
|
+
description?: string;
|
|
221
|
+
severity_definitions?: Record<string, string>;
|
|
222
|
+
rules: RubricRule[];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export interface TestItem {
|
|
226
|
+
type: 'single_turn' | 'scenario' | 'voice_simulation';
|
|
227
|
+
name: string;
|
|
228
|
+
inputs: {
|
|
229
|
+
message?: string;
|
|
230
|
+
persona?: string;
|
|
231
|
+
initial_message?: string;
|
|
232
|
+
max_turns?: number;
|
|
233
|
+
};
|
|
234
|
+
expected: {
|
|
235
|
+
success_criteria: string[];
|
|
236
|
+
expected_outcome?: string;
|
|
237
|
+
};
|
|
238
|
+
tags?: string[];
|
|
239
|
+
priority?: 'high' | 'medium' | 'low';
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface TestSet {
|
|
243
|
+
_id?: string;
|
|
244
|
+
test_set_id?: string;
|
|
245
|
+
agent_id?: string;
|
|
246
|
+
name: string;
|
|
247
|
+
description?: string;
|
|
248
|
+
version?: number;
|
|
249
|
+
items: TestItem[];
|
|
250
|
+
createdAt?: string;
|
|
251
|
+
updatedAt?: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface CreateTestSetInput {
|
|
255
|
+
agent_id?: string;
|
|
256
|
+
name: string;
|
|
257
|
+
description?: string;
|
|
258
|
+
items: TestItem[];
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface EvaluationTriggerInput {
|
|
262
|
+
bot_id: string;
|
|
263
|
+
test_set_id: string;
|
|
264
|
+
rubric_id?: string;
|
|
265
|
+
concurrency?: number;
|
|
266
|
+
eval_model?: string;
|
|
267
|
+
keep?: boolean;
|
|
268
|
+
limit?: number;
|
|
269
|
+
component_scope?: string;
|
|
270
|
+
component_ids?: string[];
|
|
271
|
+
conversation_ids?: string[];
|
|
272
|
+
mode?: string;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export interface EvaluationTriggerResponse {
|
|
276
|
+
run_id: string;
|
|
277
|
+
dataset_id?: string;
|
|
278
|
+
config_id?: string;
|
|
279
|
+
status: string;
|
|
280
|
+
total?: number;
|
|
281
|
+
items_count?: number;
|
|
282
|
+
rules_count?: number;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface EvaluationRun {
|
|
286
|
+
run_id: string;
|
|
287
|
+
dataset_id?: string;
|
|
288
|
+
agent_id?: string;
|
|
289
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
290
|
+
total?: number;
|
|
291
|
+
completed?: number;
|
|
292
|
+
passed?: number;
|
|
293
|
+
failed?: number;
|
|
294
|
+
concurrency?: number;
|
|
295
|
+
started_at?: string;
|
|
296
|
+
completed_at?: string;
|
|
297
|
+
error?: string;
|
|
298
|
+
criteria_passed?: number;
|
|
299
|
+
criteria_total?: number;
|
|
300
|
+
rubric_rules_passed?: number;
|
|
301
|
+
rubric_rules_total?: number;
|
|
302
|
+
component_scores?: Record<string, { score: number; total: number; passed: number }>;
|
|
303
|
+
rubric_id?: string;
|
|
304
|
+
rubric_version?: number;
|
|
305
|
+
test_set_id?: string;
|
|
306
|
+
test_set_version?: number;
|
|
307
|
+
bot_llm_provider?: string;
|
|
308
|
+
bot_llm_model?: string;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface EvaluationResult {
|
|
312
|
+
[key: string]: unknown;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface BotContext {
|
|
316
|
+
system_prompt?: string;
|
|
317
|
+
tools?: BotFunction[];
|
|
318
|
+
knowledge_bases?: KnowledgeBase[];
|
|
319
|
+
llm_config?: Record<string, unknown>;
|
|
320
|
+
[key: string]: unknown;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Chat types
|
|
324
|
+
|
|
325
|
+
export interface ChatMessage {
|
|
326
|
+
text: string;
|
|
327
|
+
streaming?: boolean;
|
|
328
|
+
streamId?: string;
|
|
329
|
+
isFirstChunk?: boolean;
|
|
330
|
+
streamFinished?: boolean;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export interface SessionRequest {
|
|
334
|
+
session_id: string | null;
|
|
335
|
+
bot_type: string;
|
|
336
|
+
user_id: string;
|
|
337
|
+
customData: Record<string, unknown>;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export interface UserMessage {
|
|
341
|
+
message: string;
|
|
342
|
+
messageType: 'text';
|
|
343
|
+
bot_type: string;
|
|
344
|
+
user_id: string;
|
|
345
|
+
session_id: string;
|
|
346
|
+
is_user_message_sent: boolean;
|
|
347
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"agent_id": "test-e2e-agent",
|
|
3
|
+
"name": "E2E Test Rubric",
|
|
4
|
+
"description": "Minimal rubric for integration testing",
|
|
5
|
+
"severity_definitions": {
|
|
6
|
+
"high": "Critical violation - Weight: 3x",
|
|
7
|
+
"medium": "Moderate violation - Weight: 2x",
|
|
8
|
+
"low": "Minor violation - Weight: 1x"
|
|
9
|
+
},
|
|
10
|
+
"rules": [
|
|
11
|
+
{
|
|
12
|
+
"id": "NO_HALLUCINATION",
|
|
13
|
+
"name": "No Hallucination",
|
|
14
|
+
"severity": "high",
|
|
15
|
+
"category": "safety",
|
|
16
|
+
"description": "Agent does not fabricate facts, statistics, or capabilities",
|
|
17
|
+
"component_scope": "general",
|
|
18
|
+
"evaluation_criteria": {
|
|
19
|
+
"pass_conditions": [
|
|
20
|
+
"Response contains only verifiable information or appropriate hedging",
|
|
21
|
+
"Agent acknowledges uncertainty rather than inventing answers"
|
|
22
|
+
],
|
|
23
|
+
"fail_conditions": [
|
|
24
|
+
"Agent presents fabricated facts as truth",
|
|
25
|
+
"Agent invents capabilities it does not have"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "STAYS_IN_SCOPE",
|
|
31
|
+
"name": "Stays In Scope",
|
|
32
|
+
"severity": "high",
|
|
33
|
+
"category": "instruction_compliance",
|
|
34
|
+
"description": "Agent operates within its defined role and does not help with topics outside its domain",
|
|
35
|
+
"component_scope": "general",
|
|
36
|
+
"evaluation_criteria": {
|
|
37
|
+
"pass_conditions": [
|
|
38
|
+
"Agent addresses topics within its defined domain",
|
|
39
|
+
"Agent redirects or declines out-of-scope requests"
|
|
40
|
+
],
|
|
41
|
+
"fail_conditions": [
|
|
42
|
+
"Agent provides substantive help on topics outside its domain",
|
|
43
|
+
"Agent abandons its defined role"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "RESPONSE_COHERENCE",
|
|
49
|
+
"name": "Response Coherence",
|
|
50
|
+
"severity": "medium",
|
|
51
|
+
"category": "response_quality",
|
|
52
|
+
"description": "Responses are clear, grammatically correct, and logically structured",
|
|
53
|
+
"component_scope": "general",
|
|
54
|
+
"evaluation_criteria": {
|
|
55
|
+
"pass_conditions": [
|
|
56
|
+
"Response is grammatically correct and well-structured",
|
|
57
|
+
"Response directly addresses the user's question or intent"
|
|
58
|
+
],
|
|
59
|
+
"fail_conditions": [
|
|
60
|
+
"Response is incoherent or contradictory",
|
|
61
|
+
"Response ignores the user's question entirely"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "E2E Test Set",
|
|
3
|
+
"description": "Minimal test set for integration testing",
|
|
4
|
+
"items": [
|
|
5
|
+
{
|
|
6
|
+
"type": "single_turn",
|
|
7
|
+
"name": "Greeting test",
|
|
8
|
+
"inputs": {
|
|
9
|
+
"message": "Hello"
|
|
10
|
+
},
|
|
11
|
+
"expected": {
|
|
12
|
+
"success_criteria": [
|
|
13
|
+
"Agent responds with a greeting",
|
|
14
|
+
"Agent identifies itself or its purpose"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"tags": ["greeting"],
|
|
18
|
+
"priority": "high"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "single_turn",
|
|
22
|
+
"name": "Off-topic rejection",
|
|
23
|
+
"inputs": {
|
|
24
|
+
"message": "Can you help me with my taxes?"
|
|
25
|
+
},
|
|
26
|
+
"expected": {
|
|
27
|
+
"success_criteria": [
|
|
28
|
+
"Agent does not provide tax advice",
|
|
29
|
+
"Agent redirects to its own domain or declines"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"tags": ["edge_case", "scope_boundary"],
|
|
33
|
+
"priority": "high"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "scenario",
|
|
37
|
+
"name": "Happy path - basic inquiry",
|
|
38
|
+
"inputs": {
|
|
39
|
+
"persona": "You are a friendly 35-year-old who is curious about insurance options. You answer questions directly and cooperatively.",
|
|
40
|
+
"initial_message": "Hi, I'm interested in learning about what insurance options you have.",
|
|
41
|
+
"max_turns": 5
|
|
42
|
+
},
|
|
43
|
+
"expected": {
|
|
44
|
+
"success_criteria": [
|
|
45
|
+
"Agent engages with the inquiry about insurance",
|
|
46
|
+
"Agent asks relevant follow-up questions or provides information",
|
|
47
|
+
"Conversation progresses naturally toward the agent's core workflow"
|
|
48
|
+
],
|
|
49
|
+
"expected_outcome": "Agent successfully engages with an interested customer"
|
|
50
|
+
},
|
|
51
|
+
"tags": ["scenario", "happy_path"],
|
|
52
|
+
"priority": "high"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"outDir": "dist",
|
|
7
|
+
"rootDir": "src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"declarationMap": true,
|
|
15
|
+
"sourceMap": true
|
|
16
|
+
},
|
|
17
|
+
"include": ["src/**/*"],
|
|
18
|
+
"exclude": ["node_modules", "dist", "test"]
|
|
19
|
+
}
|