vent-hq 0.8.4 → 0.8.5
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 +33 -6
- package/dist/package-2Y4HM6JG.mjs +51 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -444,7 +444,7 @@ var RelayClient = class {
|
|
|
444
444
|
async connect(timeoutMs = 3e4) {
|
|
445
445
|
const wsBase = this.config.apiUrl.replace(/^http/, "ws");
|
|
446
446
|
const controlUrl = `${wsBase}/relay/control?run_id=${this.config.runId}&token=${this.config.relayToken}`;
|
|
447
|
-
return new Promise((
|
|
447
|
+
return new Promise((resolve2, reject) => {
|
|
448
448
|
const ws = new WebSocket(controlUrl);
|
|
449
449
|
ws.binaryType = "arraybuffer";
|
|
450
450
|
let configReceived = false;
|
|
@@ -469,10 +469,10 @@ var RelayClient = class {
|
|
|
469
469
|
});
|
|
470
470
|
this.on("config_received", () => {
|
|
471
471
|
configReceived = true;
|
|
472
|
-
settle(() =>
|
|
472
|
+
settle(() => resolve2());
|
|
473
473
|
});
|
|
474
474
|
setTimeout(() => {
|
|
475
|
-
if (!configReceived && this.controlWs) settle(() =>
|
|
475
|
+
if (!configReceived && this.controlWs) settle(() => resolve2());
|
|
476
476
|
}, 3e3);
|
|
477
477
|
ws.addEventListener("error", (ev) => {
|
|
478
478
|
if (!this.controlWs) {
|
|
@@ -911,12 +911,12 @@ async function runCommand(args) {
|
|
|
911
911
|
process.exit(exitCode);
|
|
912
912
|
}
|
|
913
913
|
function findFreePort() {
|
|
914
|
-
return new Promise((
|
|
914
|
+
return new Promise((resolve2, reject) => {
|
|
915
915
|
const server = net.createServer();
|
|
916
916
|
server.listen(0, () => {
|
|
917
917
|
const addr = server.address();
|
|
918
918
|
const port = addr.port;
|
|
919
|
-
server.close(() =>
|
|
919
|
+
server.close(() => resolve2(port));
|
|
920
920
|
});
|
|
921
921
|
server.on("error", reject);
|
|
922
922
|
});
|
|
@@ -6595,6 +6595,32 @@ async function initCommand(args) {
|
|
|
6595
6595
|
return 0;
|
|
6596
6596
|
}
|
|
6597
6597
|
|
|
6598
|
+
// src/lib/dotenv.ts
|
|
6599
|
+
import { readFileSync } from "node:fs";
|
|
6600
|
+
import { resolve } from "node:path";
|
|
6601
|
+
function loadDotenv(dir = process.cwd()) {
|
|
6602
|
+
for (const file of [".env.local", ".env"]) {
|
|
6603
|
+
try {
|
|
6604
|
+
const content = readFileSync(resolve(dir, file), "utf-8");
|
|
6605
|
+
for (const line of content.split("\n")) {
|
|
6606
|
+
const trimmed = line.trim();
|
|
6607
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
6608
|
+
const eqIdx = trimmed.indexOf("=");
|
|
6609
|
+
if (eqIdx === -1) continue;
|
|
6610
|
+
const key = trimmed.slice(0, eqIdx).trim();
|
|
6611
|
+
let value = trimmed.slice(eqIdx + 1).trim();
|
|
6612
|
+
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
6613
|
+
value = value.slice(1, -1);
|
|
6614
|
+
}
|
|
6615
|
+
if (process.env[key] === void 0) {
|
|
6616
|
+
process.env[key] = value;
|
|
6617
|
+
}
|
|
6618
|
+
}
|
|
6619
|
+
} catch {
|
|
6620
|
+
}
|
|
6621
|
+
}
|
|
6622
|
+
}
|
|
6623
|
+
|
|
6598
6624
|
// src/index.ts
|
|
6599
6625
|
var USAGE = `Usage: vent-hq <command> [options]
|
|
6600
6626
|
|
|
@@ -6627,6 +6653,7 @@ Options:
|
|
|
6627
6653
|
--json Output raw JSON
|
|
6628
6654
|
--stream Stream live results instead of fetching current state`;
|
|
6629
6655
|
async function main() {
|
|
6656
|
+
loadDotenv();
|
|
6630
6657
|
const args = process.argv.slice(2);
|
|
6631
6658
|
const command = args[0];
|
|
6632
6659
|
if (!command || command === "--help" || command === "-h") {
|
|
@@ -6634,7 +6661,7 @@ async function main() {
|
|
|
6634
6661
|
return 0;
|
|
6635
6662
|
}
|
|
6636
6663
|
if (command === "--version" || command === "-v") {
|
|
6637
|
-
const pkg = await import("./package-
|
|
6664
|
+
const pkg = await import("./package-2Y4HM6JG.mjs");
|
|
6638
6665
|
console.log(`vent-hq ${pkg.default.version}`);
|
|
6639
6666
|
return 0;
|
|
6640
6667
|
}
|
|
@@ -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.8.5",
|
|
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
|
+
};
|