@lightdash/cli 0.3421.0 → 0.3422.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/README.md +3 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/handlers/download.test.js +25 -0
- package/package.json +3 -3
|
@@ -259,6 +259,31 @@ describe('readAiAgentFiles', () => {
|
|
|
259
259
|
await fs_1.promises.writeFile(path.join(tmpDir, 'ai-agents', 'invalid.yml'), 'contentType: ai_agnet\nslug: invalid-agent\n');
|
|
260
260
|
await expect(readAiAgentFiles(tmpDir)).rejects.toThrow('Invalid contentType in AI agent file');
|
|
261
261
|
});
|
|
262
|
+
it('reads evaluation suites nested in an AI agent file', async () => {
|
|
263
|
+
await fs_1.promises.writeFile(path.join(tmpDir, 'ai-agents', 'revenue-agent.yml'), [
|
|
264
|
+
'contentType: ai_agent',
|
|
265
|
+
'version: 1',
|
|
266
|
+
'slug: revenue-agent',
|
|
267
|
+
'evaluations:',
|
|
268
|
+
' - title: Core regression suite',
|
|
269
|
+
' prompts:',
|
|
270
|
+
' - prompt: What was revenue last month?',
|
|
271
|
+
' expectedResponse: Uses the certified revenue metric.',
|
|
272
|
+
'',
|
|
273
|
+
].join('\n'));
|
|
274
|
+
const agents = await readAiAgentFiles(tmpDir);
|
|
275
|
+
expect(agents[0].evaluations).toEqual([
|
|
276
|
+
{
|
|
277
|
+
title: 'Core regression suite',
|
|
278
|
+
prompts: [
|
|
279
|
+
{
|
|
280
|
+
prompt: 'What was revenue last month?',
|
|
281
|
+
expectedResponse: 'Uses the certified revenue metric.',
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
},
|
|
285
|
+
]);
|
|
286
|
+
});
|
|
262
287
|
});
|
|
263
288
|
describe('shouldDownloadAiAgents', () => {
|
|
264
289
|
it('does not download AI agents by default', () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightdash/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3422.0",
|
|
4
4
|
"description": "Lightdash CLI tool",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"unique-names-generator": "4.7.1",
|
|
42
42
|
"uuid": "11.1.1",
|
|
43
43
|
"yaml": "2.8.3",
|
|
44
|
-
"@lightdash/common": "0.
|
|
45
|
-
"@lightdash/warehouses": "0.
|
|
44
|
+
"@lightdash/common": "0.3422.0",
|
|
45
|
+
"@lightdash/warehouses": "0.3422.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/inquirer": "8.2.4",
|