vent-hq 0.2.0 → 0.2.1
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 +25 -19
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5331,7 +5331,7 @@ async function logoutCommand() {
|
|
|
5331
5331
|
// src/commands/init.ts
|
|
5332
5332
|
import * as fs3 from "node:fs/promises";
|
|
5333
5333
|
import * as path2 from "node:path";
|
|
5334
|
-
import {
|
|
5334
|
+
import { existsSync } from "node:fs";
|
|
5335
5335
|
import { execSync } from "node:child_process";
|
|
5336
5336
|
|
|
5337
5337
|
// src/skills/claude-code.md
|
|
@@ -5340,6 +5340,12 @@ var claude_code_default = '---\nname: vent\ndescription: Voice agent testing \u2
|
|
|
5340
5340
|
// src/skills/cursor.md
|
|
5341
5341
|
var cursor_default = '---\ndescription: Vent \u2014 Voice agent testing. Submit tests, poll for results. Use when the user asks to test their voice agent or when you need to verify voice agent behavior after code changes.\nalwaysApply: true\n---\n\n# Vent \u2014 Voice Agent Testing\n\nTest voice agents from the terminal. Tests run in the cloud (30-120s).\n\n## When to Test (read this first)\n\n- After modifying voice agent code (system prompt, tools, handlers): ALWAYS run tests\n- After changing audio/telephony config: run tests\n- Before marking a task complete that touches agent behavior: run tests\n- Do NOT skip testing \u2014 voice agents are non-deterministic, small changes can break flows\n\n## Commands\n\n| Command | Purpose |\n|---------|---------|\n| `npx vent-hq run -f .vent/suite.json --submit` | Submit tests, return immediately with run_id |\n| `npx vent-hq run -f .vent/suite.json` | Run tests and block until done (required for local agents) |\n| `npx vent-hq run --config \'{...}\'` | Run from inline JSON (one-off, no file needed) |\n| `npx vent-hq status <run-id> --json` | Check results (full JSON when complete) |\n| `npx vent-hq docs` | Print full config schema reference |\n\n## Workflow\n\n### First time: create the test suite\n\n1. Read the voice agent\'s codebase \u2014 understand its system prompt, tools, intents, and domain.\n2. Run `npx vent-hq docs` to see the full config schema.\n3. Create `.vent/suite.json` with tests tailored to the agent\'s actual behavior:\n - Name tests after specific flows (e.g., `"reschedule-appointment"`, not `"test-1"`)\n - Write `caller_prompt` as a realistic persona with a specific goal, based on the agent\'s domain\n - Set `max_turns` based on the flow complexity (simple FAQ: 4-6, booking: 8-12, complex: 12-20)\n - Add red team tests relevant to the domain (e.g., banking \u2192 KYC bypass, healthcare \u2192 HIPAA extraction)\n\n### Subsequent runs \u2014 reuse the existing suite\n\n`.vent/suite.json` already exists? Just re-run it. No need to recreate.\n\n### Deployed agents (agent_url) \u2014 submit + poll\n\n1. Submit: `npx vent-hq run -f .vent/suite.json --submit`\n Returns: `{"run_id":"...","status":"queued","check":"npx vent-hq status <id> --json"}`\n2. Wait ~60 seconds, then check: `npx vent-hq status <run-id> --json`\n3. If status is `"running"`, wait 30 more seconds and check again.\n4. When complete, correlate any failures with the codebase and fix.\n\n### Local agents (start_command) \u2014 must block\n\nWhen config uses `start_command`, the CLI manages the agent process and must stay running:\n\n1. Run: `npx vent-hq run -f .vent/suite.json` (no --submit)\n2. Wait for it to complete (30-120s).\n3. Read results and fix failures.\n\n### Quick one-off test\n\nFor a single test without creating a file:\n\n```bash\nnpx vent-hq run --config \'{"connection":{"adapter":"websocket","start_command":"npm run start","agent_port":3001},"conversation_tests":[{"name":"quick-check","caller_prompt":"You are a customer calling to ask about business hours.","max_turns":4}]}\'\n```\n\n## Connection\n\n- **Local agents**: set `start_command` \u2014 Vent starts the agent automatically\n- **Deployed agents**: set `agent_url` \u2014 compatible with `--submit`\n\n## Config Example\n\n```json\n{\n "connection": {\n "adapter": "websocket",\n "start_command": "npm run start",\n "agent_port": 3001\n },\n "conversation_tests": [\n {\n "name": "reschedule-appointment",\n "caller_prompt": "You are Maria, calling to reschedule her dentist appointment from Thursday to next Tuesday. She\'s in a hurry.",\n "max_turns": 8\n }\n ]\n}\n```\n\nRun `npx vent-hq docs` for the full schema \u2014 includes persona controls, audio stress tests, load testing, and all adapter configs.\n\n## Exit Codes\n\n0=pass, 1=fail, 2=error\n\n## API Keys\n\nSet `VENT_API_KEY` env var or run `npx vent-hq login`.\n';
|
|
5342
5342
|
|
|
5343
|
+
// src/skills/windsurf.md
|
|
5344
|
+
var windsurf_default = "---\ntrigger: always_on\n---\n\n# Vent \u2014 Voice Agent Testing\n\nTest voice agents from the terminal. Tests run in the cloud (30-120s).\n\n## When to Test\n\n- After modifying voice agent code (system prompt, tools, handlers): ALWAYS run tests\n- After changing audio/telephony config: run tests\n- Before marking a task complete that touches agent behavior: run tests\n\n## Commands\n\n| Command | Purpose |\n|---------|---------|\n| `npx vent-hq run -f .vent/suite.json --submit` | Submit tests, return immediately with run_id |\n| `npx vent-hq run -f .vent/suite.json` | Run tests and block until done (required for local agents) |\n| `npx vent-hq run --config '{...}'` | Run from inline JSON (one-off, no file needed) |\n| `npx vent-hq status <run-id> --json` | Check results (full JSON when complete) |\n| `npx vent-hq docs` | Print full config schema reference |\n\n## Workflow\n\n### First time: create the test suite\n\n1. Read the voice agent's codebase \u2014 understand its system prompt, tools, intents, and domain.\n2. Run `npx vent-hq docs` to see the full config schema.\n3. Create `.vent/suite.json` with tests tailored to the agent's actual behavior.\n\n### Subsequent runs\n\n`.vent/suite.json` already exists? Just re-run it.\n\n### Deployed agents \u2014 submit + poll\n\n1. `npx vent-hq run -f .vent/suite.json --submit`\n2. Wait ~60s, then: `npx vent-hq status <run-id> --json`\n3. If `\"running\"`, wait 30s and check again.\n\n### Local agents \u2014 must block\n\n`npx vent-hq run -f .vent/suite.json` (no --submit). Wait for completion.\n\n## Connection\n\n- **Local agents**: set `start_command` \u2014 Vent starts the agent automatically\n- **Deployed agents**: set `agent_url` \u2014 compatible with `--submit`\n\n## Exit Codes\n\n0=pass, 1=fail, 2=error\n\n## API Keys\n\nSet `VENT_API_KEY` env var or run `npx vent-hq login`.\n";
|
|
5345
|
+
|
|
5346
|
+
// src/skills/codex.md
|
|
5347
|
+
var codex_default = "# Vent \u2014 Voice Agent Testing\n\nTest voice agents from the terminal. Tests run in the cloud (30-120s).\n\n## When to Test\n\n- After modifying voice agent code (system prompt, tools, handlers): ALWAYS run tests\n- After changing audio/telephony config: run tests\n- Before marking a task complete that touches agent behavior: run tests\n\n## Commands\n\n| Command | Purpose |\n|---------|---------|\n| `npx vent-hq run -f .vent/suite.json` | Run tests, stream results (blocks until done) |\n| `npx vent-hq run --config '{...}'` | Run from inline JSON (one-off, no file needed) |\n| `npx vent-hq run -f .vent/suite.json --submit` | Submit tests, return immediately with run_id |\n| `npx vent-hq status <run-id> --json` | Get full results for a completed run |\n| `npx vent-hq docs` | Print full config schema reference |\n\n## Workflow\n\n1. Read the voice agent's codebase \u2014 understand its system prompt, tools, intents, and domain.\n2. Run `npx vent-hq docs` to see the full config schema.\n3. Create `.vent/suite.json` with tests tailored to the agent's actual behavior.\n4. Run `npx vent-hq run -f .vent/suite.json` to execute tests.\n5. After code changes, re-run the existing suite.\n\n## Connection\n\n- **Local agents**: set `start_command` \u2014 Vent starts the agent automatically\n- **Deployed agents**: set `agent_url` \u2014 compatible with `--submit`\n\n## Exit Codes\n\n0=pass, 1=fail, 2=error\n";
|
|
5348
|
+
|
|
5343
5349
|
// src/commands/init.ts
|
|
5344
5350
|
var SUITE_SCAFFOLD = JSON.stringify(
|
|
5345
5351
|
{
|
|
@@ -5359,13 +5365,6 @@ var SUITE_SCAFFOLD = JSON.stringify(
|
|
|
5359
5365
|
null,
|
|
5360
5366
|
2
|
|
5361
5367
|
);
|
|
5362
|
-
function dirExists(p) {
|
|
5363
|
-
try {
|
|
5364
|
-
return statSync(p).isDirectory();
|
|
5365
|
-
} catch {
|
|
5366
|
-
return false;
|
|
5367
|
-
}
|
|
5368
|
-
}
|
|
5369
5368
|
function detectPackageManager(cwd) {
|
|
5370
5369
|
if (existsSync(path2.join(cwd, "pnpm-lock.yaml"))) return "pnpm";
|
|
5371
5370
|
if (existsSync(path2.join(cwd, "yarn.lock"))) return "yarn";
|
|
@@ -5375,7 +5374,6 @@ function detectPackageManager(cwd) {
|
|
|
5375
5374
|
var editors = [
|
|
5376
5375
|
{
|
|
5377
5376
|
name: "Claude Code",
|
|
5378
|
-
detect: () => true,
|
|
5379
5377
|
install: async (cwd) => {
|
|
5380
5378
|
const dir = path2.join(cwd, ".claude", "skills", "vent");
|
|
5381
5379
|
await fs3.mkdir(dir, { recursive: true });
|
|
@@ -5385,13 +5383,28 @@ var editors = [
|
|
|
5385
5383
|
},
|
|
5386
5384
|
{
|
|
5387
5385
|
name: "Cursor",
|
|
5388
|
-
detect: () => dirExists(path2.join(process.cwd(), ".cursor")),
|
|
5389
5386
|
install: async (cwd) => {
|
|
5390
5387
|
const dir = path2.join(cwd, ".cursor", "rules");
|
|
5391
5388
|
await fs3.mkdir(dir, { recursive: true });
|
|
5392
5389
|
await fs3.writeFile(path2.join(dir, "vent.mdc"), cursor_default);
|
|
5393
5390
|
printSuccess("Cursor: .cursor/rules/vent.mdc");
|
|
5394
5391
|
}
|
|
5392
|
+
},
|
|
5393
|
+
{
|
|
5394
|
+
name: "Windsurf",
|
|
5395
|
+
install: async (cwd) => {
|
|
5396
|
+
const dir = path2.join(cwd, ".windsurf", "rules");
|
|
5397
|
+
await fs3.mkdir(dir, { recursive: true });
|
|
5398
|
+
await fs3.writeFile(path2.join(dir, "vent.md"), windsurf_default);
|
|
5399
|
+
printSuccess("Windsurf: .windsurf/rules/vent.md");
|
|
5400
|
+
}
|
|
5401
|
+
},
|
|
5402
|
+
{
|
|
5403
|
+
name: "Codex",
|
|
5404
|
+
install: async (cwd) => {
|
|
5405
|
+
await fs3.writeFile(path2.join(cwd, "AGENTS.md"), codex_default);
|
|
5406
|
+
printSuccess("Codex: AGENTS.md");
|
|
5407
|
+
}
|
|
5395
5408
|
}
|
|
5396
5409
|
];
|
|
5397
5410
|
async function initCommand(args) {
|
|
@@ -5418,16 +5431,9 @@ async function initCommand(args) {
|
|
|
5418
5431
|
}
|
|
5419
5432
|
printSuccess("Logged in! API key saved to ~/.vent/credentials");
|
|
5420
5433
|
}
|
|
5421
|
-
printInfo("
|
|
5422
|
-
let installed = 0;
|
|
5434
|
+
printInfo("Installing agent skill files...");
|
|
5423
5435
|
for (const editor of editors) {
|
|
5424
|
-
|
|
5425
|
-
await editor.install(cwd);
|
|
5426
|
-
installed++;
|
|
5427
|
-
}
|
|
5428
|
-
}
|
|
5429
|
-
if (installed === 0) {
|
|
5430
|
-
printWarn("No supported editors detected.");
|
|
5436
|
+
await editor.install(cwd);
|
|
5431
5437
|
}
|
|
5432
5438
|
const suitePath = path2.join(cwd, ".vent", "suite.json");
|
|
5433
5439
|
let suiteExists = false;
|