vent-hq 0.4.1 → 0.4.2

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/dist/index.mjs CHANGED
@@ -373,23 +373,23 @@ var bold = (s) => isTTY ? `\x1B[1m${s}\x1B[0m` : s;
373
373
  var dim = (s) => isTTY ? `\x1B[2m${s}\x1B[0m` : s;
374
374
  var green = (s) => isTTY ? `\x1B[32m${s}\x1B[0m` : s;
375
375
  var red = (s) => isTTY ? `\x1B[31m${s}\x1B[0m` : s;
376
- var yellow = (s) => isTTY ? `\x1B[33m${s}\x1B[0m` : s;
377
376
  var blue = (s) => isTTY ? `\x1B[34m${s}\x1B[0m` : s;
378
377
  function printEvent(event, jsonMode) {
379
378
  if (jsonMode) {
380
379
  process.stdout.write(JSON.stringify(event) + "\n");
381
380
  return;
382
381
  }
382
+ const meta = event.metadata_json ?? {};
383
383
  switch (event.event_type) {
384
384
  case "test_completed":
385
- printTestResult(event.data);
385
+ printTestResult(meta);
386
386
  break;
387
387
  case "run_complete":
388
- printRunComplete(event.data);
388
+ printRunComplete(meta);
389
389
  break;
390
390
  case "test_started":
391
391
  if (isTTY) {
392
- const name = event.data.test_name ?? "test";
392
+ const name = meta.test_name ?? "test";
393
393
  process.stderr.write(dim(` \u25B8 ${name}\u2026`) + "\n");
394
394
  }
395
395
  break;
@@ -399,31 +399,28 @@ function printEvent(event, jsonMode) {
399
399
  }
400
400
  }
401
401
  }
402
- function printTestResult(data) {
403
- const result = data.result;
404
- if (!result) {
405
- const testName = data.test_name ?? "test";
406
- process.stdout.write(yellow("\u26A0") + ` ${bold(testName)} ${dim("no result data")}
407
- `);
408
- return;
409
- }
410
- const status = result.status === "completed" ? green("\u2714") : red("\u2718");
411
- const name = result.name ?? "test";
412
- const duration = result.duration_ms != null ? (result.duration_ms / 1e3).toFixed(1) + "s" : "\u2014";
413
- const parts = [status, bold(name), dim(duration)];
414
- if (result.behavior?.intent_accuracy) {
402
+ function printTestResult(meta) {
403
+ const result = meta.result;
404
+ const testName = result?.name ?? meta.test_name ?? "test";
405
+ const testStatus = result?.status ?? meta.status;
406
+ const durationMs = result?.duration_ms ?? meta.duration_ms;
407
+ const statusIcon = testStatus === "completed" || testStatus === "pass" ? green("\u2714") : red("\u2718");
408
+ const duration = durationMs != null ? (durationMs / 1e3).toFixed(1) + "s" : "\u2014";
409
+ const parts = [statusIcon, bold(testName), dim(duration)];
410
+ if (result?.behavior?.intent_accuracy) {
415
411
  parts.push(`intent: ${result.behavior.intent_accuracy.score}`);
416
412
  }
417
- if (result.latency?.p50_ttfw_ms != null) {
413
+ if (result?.latency?.p50_ttfw_ms != null) {
418
414
  parts.push(`p50: ${result.latency.p50_ttfw_ms}ms`);
419
415
  }
420
416
  process.stdout.write(parts.join(" ") + "\n");
421
417
  }
422
- function printRunComplete(data) {
423
- const status = data.status;
424
- const total = data.total_tests;
425
- const passed = data.passed_tests;
426
- const failed = data.failed_tests;
418
+ function printRunComplete(meta) {
419
+ const status = meta.status;
420
+ const agg = meta.aggregate;
421
+ const total = meta.total_tests ?? agg?.conversation_tests?.total;
422
+ const passed = meta.passed_tests ?? agg?.conversation_tests?.passed;
423
+ const failed = meta.failed_tests ?? agg?.conversation_tests?.failed;
427
424
  process.stdout.write("\n");
428
425
  if (status === "pass") {
429
426
  process.stdout.write(green(bold("Run passed")) + "\n");
@@ -441,27 +438,31 @@ function printRunComplete(data) {
441
438
  function printSummary(testResults, runComplete, runId, jsonMode) {
442
439
  if (jsonMode) {
443
440
  const failedTests = testResults.filter((e) => {
444
- const r = e.data.result;
445
- return r && r.status !== "completed";
441
+ const meta = e.metadata_json ?? {};
442
+ const r = meta.result;
443
+ const status = r?.status ?? meta.status;
444
+ return status && status !== "completed" && status !== "pass";
446
445
  }).map((e) => {
447
- const r = e.data.result;
446
+ const meta = e.metadata_json ?? {};
447
+ const r = meta.result;
448
448
  return {
449
- name: r.name,
450
- status: r.status,
451
- duration_ms: r.duration_ms,
452
- intent_accuracy: r.behavior?.intent_accuracy?.score,
453
- p50_ttfw_ms: r.latency?.p50_ttfw_ms
449
+ name: r?.name ?? meta.test_name ?? "test",
450
+ status: r?.status ?? meta.status,
451
+ duration_ms: r?.duration_ms ?? meta.duration_ms,
452
+ intent_accuracy: r?.behavior?.intent_accuracy?.score,
453
+ p50_ttfw_ms: r?.latency?.p50_ttfw_ms
454
454
  };
455
455
  });
456
+ const agg = runComplete.aggregate;
456
457
  process.stdout.write(
457
458
  JSON.stringify({
458
459
  event_type: "summary",
459
460
  data: {
460
461
  run_id: runId,
461
462
  status: runComplete.status,
462
- total: runComplete.total_tests,
463
- passed: runComplete.passed_tests,
464
- failed: runComplete.failed_tests,
463
+ total: runComplete.total_tests ?? agg?.conversation_tests?.total,
464
+ passed: runComplete.passed_tests ?? agg?.conversation_tests?.passed,
465
+ failed: runComplete.failed_tests ?? agg?.conversation_tests?.failed,
465
466
  failed_tests: failedTests,
466
467
  check: `npx vent-hq status ${runId} --json`
467
468
  }
@@ -470,17 +471,21 @@ function printSummary(testResults, runComplete, runId, jsonMode) {
470
471
  return;
471
472
  }
472
473
  const failures = testResults.filter((e) => {
473
- const r = e.data.result;
474
- return r && r.status !== "completed";
474
+ const meta = e.metadata_json ?? {};
475
+ const r = meta.result;
476
+ const status = r?.status ?? meta.status;
477
+ return status && status !== "completed" && status !== "pass";
475
478
  });
476
479
  if (failures.length > 0) {
477
480
  process.stdout.write("\n" + bold("Failed tests:") + "\n");
478
481
  for (const event of failures) {
479
- const r = event.data.result;
480
- const name = r.name ?? "test";
481
- const duration = (r.duration_ms / 1e3).toFixed(1) + "s";
482
+ const meta = event.metadata_json ?? {};
483
+ const r = meta.result;
484
+ const name = r?.name ?? meta.test_name ?? "test";
485
+ const durationMs = r?.duration_ms ?? meta.duration_ms;
486
+ const duration = durationMs != null ? (durationMs / 1e3).toFixed(1) + "s" : "\u2014";
482
487
  const parts = [red("\u2718"), bold(name), dim(duration)];
483
- if (r.behavior?.intent_accuracy) {
488
+ if (r?.behavior?.intent_accuracy) {
484
489
  parts.push(`intent: ${r.behavior.intent_accuracy.score}`);
485
490
  }
486
491
  process.stdout.write(" " + parts.join(" ") + "\n");
@@ -612,8 +617,9 @@ async function runCommand(args) {
612
617
  testResults.push(event);
613
618
  }
614
619
  if (event.event_type === "run_complete") {
615
- runCompleteData = event.data;
616
- const status = event.data.status;
620
+ const meta = event.metadata_json ?? {};
621
+ runCompleteData = meta;
622
+ const status = meta.status;
617
623
  exitCode = status === "pass" ? 0 : 1;
618
624
  }
619
625
  }
@@ -5277,7 +5283,8 @@ async function streamStatus(runId, apiKey, json) {
5277
5283
  for await (const event of streamRunEvents(runId, apiKey)) {
5278
5284
  printEvent(event, json);
5279
5285
  if (event.event_type === "run_complete") {
5280
- const status = event.data.status;
5286
+ const meta = event.metadata_json ?? {};
5287
+ const status = meta.status;
5281
5288
  exitCode = status === "pass" ? 0 : 1;
5282
5289
  }
5283
5290
  }
@@ -6260,7 +6267,7 @@ async function main() {
6260
6267
  process.exit(0);
6261
6268
  }
6262
6269
  if (command === "--version" || command === "-v") {
6263
- const pkg = await import("./package-ULGS3YE5.mjs");
6270
+ const pkg = await import("./package-3V3224B6.mjs");
6264
6271
  process.stdout.write(`vent-hq ${pkg.default.version}
6265
6272
  `);
6266
6273
  process.exit(0);
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+ import "./chunk-U4M3XDTH.mjs";
3
+
4
+ // package.json
5
+ var package_default = {
6
+ name: "vent-hq",
7
+ version: "0.4.2",
8
+ type: "module",
9
+ description: "Vent CLI \u2014 CI/CD for voice AI agents",
10
+ bin: {
11
+ "vent-hq": "dist/index.mjs"
12
+ },
13
+ files: [
14
+ "dist"
15
+ ],
16
+ scripts: {
17
+ build: "node scripts/bundle.mjs",
18
+ clean: "rm -rf dist"
19
+ },
20
+ keywords: [
21
+ "vent",
22
+ "cli",
23
+ "voice",
24
+ "agent",
25
+ "testing",
26
+ "ci-cd"
27
+ ],
28
+ license: "MIT",
29
+ publishConfig: {
30
+ access: "public"
31
+ },
32
+ repository: {
33
+ type: "git",
34
+ url: "https://github.com/vent-hq/vent",
35
+ directory: "packages/cli"
36
+ },
37
+ homepage: "https://ventmcp.dev",
38
+ dependencies: {
39
+ "@clack/prompts": "^1.1.0",
40
+ ws: "^8.18.0"
41
+ },
42
+ devDependencies: {
43
+ "@types/ws": "^8.5.0",
44
+ "@vent/relay-client": "workspace:*",
45
+ "@vent/shared": "workspace:*",
46
+ esbuild: "^0.24.0"
47
+ }
48
+ };
49
+ export {
50
+ package_default as default
51
+ };
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+ import "./chunk-U4M3XDTH.mjs";
3
+
4
+ // package.json
5
+ var package_default = {
6
+ name: "vent-hq",
7
+ version: "0.4.1",
8
+ type: "module",
9
+ description: "Vent CLI \u2014 CI/CD for voice AI agents",
10
+ bin: {
11
+ "vent-hq": "dist/index.mjs"
12
+ },
13
+ files: [
14
+ "dist"
15
+ ],
16
+ scripts: {
17
+ build: "node scripts/bundle.mjs",
18
+ clean: "rm -rf dist"
19
+ },
20
+ keywords: [
21
+ "vent",
22
+ "cli",
23
+ "voice",
24
+ "agent",
25
+ "testing",
26
+ "ci-cd"
27
+ ],
28
+ license: "MIT",
29
+ publishConfig: {
30
+ access: "public"
31
+ },
32
+ repository: {
33
+ type: "git",
34
+ url: "https://github.com/vent-hq/vent",
35
+ directory: "packages/cli"
36
+ },
37
+ homepage: "https://ventmcp.dev",
38
+ dependencies: {
39
+ "@clack/prompts": "^1.1.0",
40
+ ws: "^8.18.0"
41
+ },
42
+ devDependencies: {
43
+ "@types/ws": "^8.5.0",
44
+ "@vent/relay-client": "workspace:*",
45
+ "@vent/shared": "workspace:*",
46
+ esbuild: "^0.24.0"
47
+ }
48
+ };
49
+ export {
50
+ package_default as default
51
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vent-hq",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "description": "Vent CLI — CI/CD for voice AI agents",
6
6
  "bin": {