vent-hq 0.9.3 → 0.9.4
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/chunk-XYDL7GY6.mjs +10 -0
- package/dist/index.mjs +62 -883
- package/dist/package-ZDKB63DZ.mjs +50 -0
- package/package.json +1 -2
package/dist/index.mjs
CHANGED
|
@@ -1,65 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
__toESM
|
|
6
|
-
} from "./chunk-U4M3XDTH.mjs";
|
|
7
|
-
|
|
8
|
-
// ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
9
|
-
var require_src = __commonJS({
|
|
10
|
-
"../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
|
|
11
|
-
"use strict";
|
|
12
|
-
var ESC = "\x1B";
|
|
13
|
-
var CSI = `${ESC}[`;
|
|
14
|
-
var beep = "\x07";
|
|
15
|
-
var cursor = {
|
|
16
|
-
to(x3, y2) {
|
|
17
|
-
if (!y2) return `${CSI}${x3 + 1}G`;
|
|
18
|
-
return `${CSI}${y2 + 1};${x3 + 1}H`;
|
|
19
|
-
},
|
|
20
|
-
move(x3, y2) {
|
|
21
|
-
let ret = "";
|
|
22
|
-
if (x3 < 0) ret += `${CSI}${-x3}D`;
|
|
23
|
-
else if (x3 > 0) ret += `${CSI}${x3}C`;
|
|
24
|
-
if (y2 < 0) ret += `${CSI}${-y2}A`;
|
|
25
|
-
else if (y2 > 0) ret += `${CSI}${y2}B`;
|
|
26
|
-
return ret;
|
|
27
|
-
},
|
|
28
|
-
up: (count = 1) => `${CSI}${count}A`,
|
|
29
|
-
down: (count = 1) => `${CSI}${count}B`,
|
|
30
|
-
forward: (count = 1) => `${CSI}${count}C`,
|
|
31
|
-
backward: (count = 1) => `${CSI}${count}D`,
|
|
32
|
-
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
33
|
-
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
34
|
-
left: `${CSI}G`,
|
|
35
|
-
hide: `${CSI}?25l`,
|
|
36
|
-
show: `${CSI}?25h`,
|
|
37
|
-
save: `${ESC}7`,
|
|
38
|
-
restore: `${ESC}8`
|
|
39
|
-
};
|
|
40
|
-
var scroll = {
|
|
41
|
-
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
42
|
-
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
43
|
-
};
|
|
44
|
-
var erase = {
|
|
45
|
-
screen: `${CSI}2J`,
|
|
46
|
-
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
47
|
-
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
48
|
-
line: `${CSI}2K`,
|
|
49
|
-
lineEnd: `${CSI}K`,
|
|
50
|
-
lineStart: `${CSI}1K`,
|
|
51
|
-
lines(count) {
|
|
52
|
-
let clear = "";
|
|
53
|
-
for (let i = 0; i < count; i++)
|
|
54
|
-
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
55
|
-
if (count)
|
|
56
|
-
clear += cursor.left;
|
|
57
|
-
return clear;
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
module.exports = { cursor, scroll, erase, beep };
|
|
61
|
-
}
|
|
62
|
-
});
|
|
3
|
+
__export
|
|
4
|
+
} from "./chunk-XYDL7GY6.mjs";
|
|
63
5
|
|
|
64
6
|
// src/index.ts
|
|
65
7
|
import { parseArgs } from "node:util";
|
|
@@ -276,7 +218,7 @@ __export(external_exports, {
|
|
|
276
218
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
277
219
|
var util;
|
|
278
220
|
(function(util2) {
|
|
279
|
-
util2.assertEqual = (
|
|
221
|
+
util2.assertEqual = (_) => {
|
|
280
222
|
};
|
|
281
223
|
function assertIs(_arg) {
|
|
282
224
|
}
|
|
@@ -293,10 +235,10 @@ var util;
|
|
|
293
235
|
return obj;
|
|
294
236
|
};
|
|
295
237
|
util2.getValidEnumValues = (obj) => {
|
|
296
|
-
const validKeys = util2.objectKeys(obj).filter((
|
|
238
|
+
const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
|
|
297
239
|
const filtered = {};
|
|
298
|
-
for (const
|
|
299
|
-
filtered[
|
|
240
|
+
for (const k of validKeys) {
|
|
241
|
+
filtered[k] = obj[k];
|
|
300
242
|
}
|
|
301
243
|
return util2.objectValues(filtered);
|
|
302
244
|
};
|
|
@@ -326,7 +268,7 @@ var util;
|
|
|
326
268
|
return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
|
|
327
269
|
}
|
|
328
270
|
util2.joinValues = joinValues;
|
|
329
|
-
util2.jsonStringifyReplacer = (
|
|
271
|
+
util2.jsonStringifyReplacer = (_, value) => {
|
|
330
272
|
if (typeof value === "bigint") {
|
|
331
273
|
return value.toString();
|
|
332
274
|
}
|
|
@@ -366,8 +308,8 @@ var ZodParsedType = util.arrayToEnum([
|
|
|
366
308
|
"set"
|
|
367
309
|
]);
|
|
368
310
|
var getParsedType = (data) => {
|
|
369
|
-
const
|
|
370
|
-
switch (
|
|
311
|
+
const t = typeof data;
|
|
312
|
+
switch (t) {
|
|
371
313
|
case "undefined":
|
|
372
314
|
return ZodParsedType.undefined;
|
|
373
315
|
case "string":
|
|
@@ -679,7 +621,7 @@ function addIssueToContext(ctx, issueData) {
|
|
|
679
621
|
// then global override map
|
|
680
622
|
overrideMap === en_default ? void 0 : en_default
|
|
681
623
|
// then global default map
|
|
682
|
-
].filter((
|
|
624
|
+
].filter((x) => !!x)
|
|
683
625
|
});
|
|
684
626
|
ctx.common.issues.push(issue);
|
|
685
627
|
}
|
|
@@ -742,10 +684,10 @@ var INVALID = Object.freeze({
|
|
|
742
684
|
});
|
|
743
685
|
var DIRTY = (value) => ({ status: "dirty", value });
|
|
744
686
|
var OK = (value) => ({ status: "valid", value });
|
|
745
|
-
var isAborted = (
|
|
746
|
-
var isDirty = (
|
|
747
|
-
var isValid = (
|
|
748
|
-
var isAsync = (
|
|
687
|
+
var isAborted = (x) => x.status === "aborted";
|
|
688
|
+
var isDirty = (x) => x.status === "dirty";
|
|
689
|
+
var isValid = (x) => x.status === "valid";
|
|
690
|
+
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
749
691
|
|
|
750
692
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
751
693
|
var errorUtil;
|
|
@@ -3193,7 +3135,7 @@ var ZodTuple = class _ZodTuple extends ZodType {
|
|
|
3193
3135
|
if (!schema)
|
|
3194
3136
|
return null;
|
|
3195
3137
|
return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
|
|
3196
|
-
}).filter((
|
|
3138
|
+
}).filter((x) => !!x);
|
|
3197
3139
|
if (ctx.common.async) {
|
|
3198
3140
|
return Promise.all(items).then((results) => {
|
|
3199
3141
|
return ParseStatus.mergeArray(status, results);
|
|
@@ -3446,7 +3388,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
|
|
|
3446
3388
|
return makeIssue({
|
|
3447
3389
|
data: args,
|
|
3448
3390
|
path: ctx.path,
|
|
3449
|
-
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((
|
|
3391
|
+
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
|
|
3450
3392
|
issueData: {
|
|
3451
3393
|
code: ZodIssueCode.invalid_arguments,
|
|
3452
3394
|
argumentsError: error
|
|
@@ -3457,7 +3399,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
|
|
|
3457
3399
|
return makeIssue({
|
|
3458
3400
|
data: returns,
|
|
3459
3401
|
path: ctx.path,
|
|
3460
|
-
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((
|
|
3402
|
+
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
|
|
3461
3403
|
issueData: {
|
|
3462
3404
|
code: ZodIssueCode.invalid_return_type,
|
|
3463
3405
|
returnTypeError: error
|
|
@@ -3467,29 +3409,29 @@ var ZodFunction = class _ZodFunction extends ZodType {
|
|
|
3467
3409
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
3468
3410
|
const fn = ctx.data;
|
|
3469
3411
|
if (this._def.returns instanceof ZodPromise) {
|
|
3470
|
-
const
|
|
3412
|
+
const me = this;
|
|
3471
3413
|
return OK(async function(...args) {
|
|
3472
3414
|
const error = new ZodError([]);
|
|
3473
|
-
const parsedArgs = await
|
|
3415
|
+
const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
|
|
3474
3416
|
error.addIssue(makeArgsIssue(args, e));
|
|
3475
3417
|
throw error;
|
|
3476
3418
|
});
|
|
3477
3419
|
const result = await Reflect.apply(fn, this, parsedArgs);
|
|
3478
|
-
const parsedReturns = await
|
|
3420
|
+
const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
3479
3421
|
error.addIssue(makeReturnsIssue(result, e));
|
|
3480
3422
|
throw error;
|
|
3481
3423
|
});
|
|
3482
3424
|
return parsedReturns;
|
|
3483
3425
|
});
|
|
3484
3426
|
} else {
|
|
3485
|
-
const
|
|
3427
|
+
const me = this;
|
|
3486
3428
|
return OK(function(...args) {
|
|
3487
|
-
const parsedArgs =
|
|
3429
|
+
const parsedArgs = me._def.args.safeParse(args, params);
|
|
3488
3430
|
if (!parsedArgs.success) {
|
|
3489
3431
|
throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
3490
3432
|
}
|
|
3491
3433
|
const result = Reflect.apply(fn, this, parsedArgs.data);
|
|
3492
|
-
const parsedReturns =
|
|
3434
|
+
const parsedReturns = me._def.returns.safeParse(result, params);
|
|
3493
3435
|
if (!parsedReturns.success) {
|
|
3494
3436
|
throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
|
3495
3437
|
}
|
|
@@ -4613,26 +4555,26 @@ function formatConversationResult(raw, options = {}) {
|
|
|
4613
4555
|
}
|
|
4614
4556
|
function formatTranscript(turns, options) {
|
|
4615
4557
|
if (!turns) return [];
|
|
4616
|
-
return turns.map((
|
|
4558
|
+
return turns.map((t) => {
|
|
4617
4559
|
const turn = {
|
|
4618
|
-
role:
|
|
4619
|
-
text:
|
|
4560
|
+
role: t.role,
|
|
4561
|
+
text: t.text
|
|
4620
4562
|
};
|
|
4621
|
-
if (
|
|
4622
|
-
if (
|
|
4623
|
-
if (
|
|
4624
|
-
if (
|
|
4625
|
-
if (
|
|
4563
|
+
if (t.ttfb_ms != null) turn.ttfb_ms = t.ttfb_ms;
|
|
4564
|
+
if (t.ttfw_ms != null) turn.ttfw_ms = t.ttfw_ms;
|
|
4565
|
+
if (t.audio_duration_ms != null) turn.audio_duration_ms = t.audio_duration_ms;
|
|
4566
|
+
if (t.interrupted != null) turn.interrupted = t.interrupted;
|
|
4567
|
+
if (t.is_interruption != null) turn.is_interruption = t.is_interruption;
|
|
4626
4568
|
if (options.verbose) {
|
|
4627
4569
|
const debug2 = compactUnknownRecord({
|
|
4628
|
-
timestamp_ms:
|
|
4629
|
-
caller_decision_mode:
|
|
4630
|
-
silence_pad_ms:
|
|
4631
|
-
stt_confidence:
|
|
4632
|
-
harness_tts_ms:
|
|
4633
|
-
harness_stt_ms:
|
|
4634
|
-
component_latency:
|
|
4635
|
-
platform_transcript:
|
|
4570
|
+
timestamp_ms: t.timestamp_ms,
|
|
4571
|
+
caller_decision_mode: t.caller_decision_mode,
|
|
4572
|
+
silence_pad_ms: t.silence_pad_ms,
|
|
4573
|
+
stt_confidence: t.stt_confidence,
|
|
4574
|
+
harness_tts_ms: t.tts_ms,
|
|
4575
|
+
harness_stt_ms: t.stt_ms,
|
|
4576
|
+
component_latency: t.component_latency,
|
|
4577
|
+
platform_transcript: t.platform_transcript
|
|
4636
4578
|
});
|
|
4637
4579
|
if (debug2 && Object.keys(debug2).length > 0) {
|
|
4638
4580
|
turn.debug = debug2;
|
|
@@ -4715,7 +4657,7 @@ function formatEmotion(prosody) {
|
|
|
4715
4657
|
}
|
|
4716
4658
|
function formatComponentLatency(cl) {
|
|
4717
4659
|
if (!cl) return null;
|
|
4718
|
-
const speechDurations = cl.per_turn.map((
|
|
4660
|
+
const speechDurations = cl.per_turn.map((t) => t.speech_duration_ms).filter((v) => v != null);
|
|
4719
4661
|
const meanSpeech = speechDurations.length > 0 ? Math.round(speechDurations.reduce((a, b) => a + b, 0) / speechDurations.length) : void 0;
|
|
4720
4662
|
return {
|
|
4721
4663
|
mean_stt_ms: cl.mean_stt_ms,
|
|
@@ -4945,12 +4887,12 @@ function printSummary(callResults, runComplete, runId, options = {}) {
|
|
|
4945
4887
|
stdoutSync(JSON.stringify(summaryData, null, 2) + "\n");
|
|
4946
4888
|
return;
|
|
4947
4889
|
}
|
|
4948
|
-
const failures = allCalls.filter((
|
|
4890
|
+
const failures = allCalls.filter((t) => t.status && t.status !== "completed" && t.status !== "pass");
|
|
4949
4891
|
if (failures.length > 0) {
|
|
4950
4892
|
stdoutSync("\n" + bold("Failed calls:") + "\n");
|
|
4951
|
-
for (const
|
|
4952
|
-
const duration =
|
|
4953
|
-
const parts = [red("\u2718"), bold(
|
|
4893
|
+
for (const t of failures) {
|
|
4894
|
+
const duration = t.duration_ms != null ? (t.duration_ms / 1e3).toFixed(1) + "s" : "\u2014";
|
|
4895
|
+
const parts = [red("\u2718"), bold(t.name ?? "call"), dim(duration)];
|
|
4954
4896
|
stdoutSync(" " + parts.join(" ") + "\n");
|
|
4955
4897
|
}
|
|
4956
4898
|
}
|
|
@@ -6042,704 +5984,6 @@ function detectGitHubToken() {
|
|
|
6042
5984
|
// src/lib/setup.ts
|
|
6043
5985
|
import * as fs5 from "node:fs/promises";
|
|
6044
5986
|
import * as path3 from "node:path";
|
|
6045
|
-
import { existsSync } from "node:fs";
|
|
6046
|
-
import { execSync as execSync2 } from "node:child_process";
|
|
6047
|
-
import { homedir as homedir2 } from "node:os";
|
|
6048
|
-
|
|
6049
|
-
// ../../node_modules/.pnpm/@clack+core@1.1.0/node_modules/@clack/core/dist/index.mjs
|
|
6050
|
-
var import_sisteransi = __toESM(require_src(), 1);
|
|
6051
|
-
import { styleText as D } from "node:util";
|
|
6052
|
-
import { stdout as R, stdin as q } from "node:process";
|
|
6053
|
-
import * as k from "node:readline";
|
|
6054
|
-
import ot from "node:readline";
|
|
6055
|
-
import { ReadStream as J } from "node:tty";
|
|
6056
|
-
function x(t2, e, s) {
|
|
6057
|
-
if (!s.some((u) => !u.disabled)) return t2;
|
|
6058
|
-
const i = t2 + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
|
|
6059
|
-
return s[n].disabled ? x(n, e < 0 ? -1 : 1, s) : n;
|
|
6060
|
-
}
|
|
6061
|
-
var at = (t2) => t2 === 161 || t2 === 164 || t2 === 167 || t2 === 168 || t2 === 170 || t2 === 173 || t2 === 174 || t2 >= 176 && t2 <= 180 || t2 >= 182 && t2 <= 186 || t2 >= 188 && t2 <= 191 || t2 === 198 || t2 === 208 || t2 === 215 || t2 === 216 || t2 >= 222 && t2 <= 225 || t2 === 230 || t2 >= 232 && t2 <= 234 || t2 === 236 || t2 === 237 || t2 === 240 || t2 === 242 || t2 === 243 || t2 >= 247 && t2 <= 250 || t2 === 252 || t2 === 254 || t2 === 257 || t2 === 273 || t2 === 275 || t2 === 283 || t2 === 294 || t2 === 295 || t2 === 299 || t2 >= 305 && t2 <= 307 || t2 === 312 || t2 >= 319 && t2 <= 322 || t2 === 324 || t2 >= 328 && t2 <= 331 || t2 === 333 || t2 === 338 || t2 === 339 || t2 === 358 || t2 === 359 || t2 === 363 || t2 === 462 || t2 === 464 || t2 === 466 || t2 === 468 || t2 === 470 || t2 === 472 || t2 === 474 || t2 === 476 || t2 === 593 || t2 === 609 || t2 === 708 || t2 === 711 || t2 >= 713 && t2 <= 715 || t2 === 717 || t2 === 720 || t2 >= 728 && t2 <= 731 || t2 === 733 || t2 === 735 || t2 >= 768 && t2 <= 879 || t2 >= 913 && t2 <= 929 || t2 >= 931 && t2 <= 937 || t2 >= 945 && t2 <= 961 || t2 >= 963 && t2 <= 969 || t2 === 1025 || t2 >= 1040 && t2 <= 1103 || t2 === 1105 || t2 === 8208 || t2 >= 8211 && t2 <= 8214 || t2 === 8216 || t2 === 8217 || t2 === 8220 || t2 === 8221 || t2 >= 8224 && t2 <= 8226 || t2 >= 8228 && t2 <= 8231 || t2 === 8240 || t2 === 8242 || t2 === 8243 || t2 === 8245 || t2 === 8251 || t2 === 8254 || t2 === 8308 || t2 === 8319 || t2 >= 8321 && t2 <= 8324 || t2 === 8364 || t2 === 8451 || t2 === 8453 || t2 === 8457 || t2 === 8467 || t2 === 8470 || t2 === 8481 || t2 === 8482 || t2 === 8486 || t2 === 8491 || t2 === 8531 || t2 === 8532 || t2 >= 8539 && t2 <= 8542 || t2 >= 8544 && t2 <= 8555 || t2 >= 8560 && t2 <= 8569 || t2 === 8585 || t2 >= 8592 && t2 <= 8601 || t2 === 8632 || t2 === 8633 || t2 === 8658 || t2 === 8660 || t2 === 8679 || t2 === 8704 || t2 === 8706 || t2 === 8707 || t2 === 8711 || t2 === 8712 || t2 === 8715 || t2 === 8719 || t2 === 8721 || t2 === 8725 || t2 === 8730 || t2 >= 8733 && t2 <= 8736 || t2 === 8739 || t2 === 8741 || t2 >= 8743 && t2 <= 8748 || t2 === 8750 || t2 >= 8756 && t2 <= 8759 || t2 === 8764 || t2 === 8765 || t2 === 8776 || t2 === 8780 || t2 === 8786 || t2 === 8800 || t2 === 8801 || t2 >= 8804 && t2 <= 8807 || t2 === 8810 || t2 === 8811 || t2 === 8814 || t2 === 8815 || t2 === 8834 || t2 === 8835 || t2 === 8838 || t2 === 8839 || t2 === 8853 || t2 === 8857 || t2 === 8869 || t2 === 8895 || t2 === 8978 || t2 >= 9312 && t2 <= 9449 || t2 >= 9451 && t2 <= 9547 || t2 >= 9552 && t2 <= 9587 || t2 >= 9600 && t2 <= 9615 || t2 >= 9618 && t2 <= 9621 || t2 === 9632 || t2 === 9633 || t2 >= 9635 && t2 <= 9641 || t2 === 9650 || t2 === 9651 || t2 === 9654 || t2 === 9655 || t2 === 9660 || t2 === 9661 || t2 === 9664 || t2 === 9665 || t2 >= 9670 && t2 <= 9672 || t2 === 9675 || t2 >= 9678 && t2 <= 9681 || t2 >= 9698 && t2 <= 9701 || t2 === 9711 || t2 === 9733 || t2 === 9734 || t2 === 9737 || t2 === 9742 || t2 === 9743 || t2 === 9756 || t2 === 9758 || t2 === 9792 || t2 === 9794 || t2 === 9824 || t2 === 9825 || t2 >= 9827 && t2 <= 9829 || t2 >= 9831 && t2 <= 9834 || t2 === 9836 || t2 === 9837 || t2 === 9839 || t2 === 9886 || t2 === 9887 || t2 === 9919 || t2 >= 9926 && t2 <= 9933 || t2 >= 9935 && t2 <= 9939 || t2 >= 9941 && t2 <= 9953 || t2 === 9955 || t2 === 9960 || t2 === 9961 || t2 >= 9963 && t2 <= 9969 || t2 === 9972 || t2 >= 9974 && t2 <= 9977 || t2 === 9979 || t2 === 9980 || t2 === 9982 || t2 === 9983 || t2 === 10045 || t2 >= 10102 && t2 <= 10111 || t2 >= 11094 && t2 <= 11097 || t2 >= 12872 && t2 <= 12879 || t2 >= 57344 && t2 <= 63743 || t2 >= 65024 && t2 <= 65039 || t2 === 65533 || t2 >= 127232 && t2 <= 127242 || t2 >= 127248 && t2 <= 127277 || t2 >= 127280 && t2 <= 127337 || t2 >= 127344 && t2 <= 127373 || t2 === 127375 || t2 === 127376 || t2 >= 127387 && t2 <= 127404 || t2 >= 917760 && t2 <= 917999 || t2 >= 983040 && t2 <= 1048573 || t2 >= 1048576 && t2 <= 1114109;
|
|
6062
|
-
var lt = (t2) => t2 === 12288 || t2 >= 65281 && t2 <= 65376 || t2 >= 65504 && t2 <= 65510;
|
|
6063
|
-
var ht = (t2) => t2 >= 4352 && t2 <= 4447 || t2 === 8986 || t2 === 8987 || t2 === 9001 || t2 === 9002 || t2 >= 9193 && t2 <= 9196 || t2 === 9200 || t2 === 9203 || t2 === 9725 || t2 === 9726 || t2 === 9748 || t2 === 9749 || t2 >= 9800 && t2 <= 9811 || t2 === 9855 || t2 === 9875 || t2 === 9889 || t2 === 9898 || t2 === 9899 || t2 === 9917 || t2 === 9918 || t2 === 9924 || t2 === 9925 || t2 === 9934 || t2 === 9940 || t2 === 9962 || t2 === 9970 || t2 === 9971 || t2 === 9973 || t2 === 9978 || t2 === 9981 || t2 === 9989 || t2 === 9994 || t2 === 9995 || t2 === 10024 || t2 === 10060 || t2 === 10062 || t2 >= 10067 && t2 <= 10069 || t2 === 10071 || t2 >= 10133 && t2 <= 10135 || t2 === 10160 || t2 === 10175 || t2 === 11035 || t2 === 11036 || t2 === 11088 || t2 === 11093 || t2 >= 11904 && t2 <= 11929 || t2 >= 11931 && t2 <= 12019 || t2 >= 12032 && t2 <= 12245 || t2 >= 12272 && t2 <= 12287 || t2 >= 12289 && t2 <= 12350 || t2 >= 12353 && t2 <= 12438 || t2 >= 12441 && t2 <= 12543 || t2 >= 12549 && t2 <= 12591 || t2 >= 12593 && t2 <= 12686 || t2 >= 12688 && t2 <= 12771 || t2 >= 12783 && t2 <= 12830 || t2 >= 12832 && t2 <= 12871 || t2 >= 12880 && t2 <= 19903 || t2 >= 19968 && t2 <= 42124 || t2 >= 42128 && t2 <= 42182 || t2 >= 43360 && t2 <= 43388 || t2 >= 44032 && t2 <= 55203 || t2 >= 63744 && t2 <= 64255 || t2 >= 65040 && t2 <= 65049 || t2 >= 65072 && t2 <= 65106 || t2 >= 65108 && t2 <= 65126 || t2 >= 65128 && t2 <= 65131 || t2 >= 94176 && t2 <= 94180 || t2 === 94192 || t2 === 94193 || t2 >= 94208 && t2 <= 100343 || t2 >= 100352 && t2 <= 101589 || t2 >= 101632 && t2 <= 101640 || t2 >= 110576 && t2 <= 110579 || t2 >= 110581 && t2 <= 110587 || t2 === 110589 || t2 === 110590 || t2 >= 110592 && t2 <= 110882 || t2 === 110898 || t2 >= 110928 && t2 <= 110930 || t2 === 110933 || t2 >= 110948 && t2 <= 110951 || t2 >= 110960 && t2 <= 111355 || t2 === 126980 || t2 === 127183 || t2 === 127374 || t2 >= 127377 && t2 <= 127386 || t2 >= 127488 && t2 <= 127490 || t2 >= 127504 && t2 <= 127547 || t2 >= 127552 && t2 <= 127560 || t2 === 127568 || t2 === 127569 || t2 >= 127584 && t2 <= 127589 || t2 >= 127744 && t2 <= 127776 || t2 >= 127789 && t2 <= 127797 || t2 >= 127799 && t2 <= 127868 || t2 >= 127870 && t2 <= 127891 || t2 >= 127904 && t2 <= 127946 || t2 >= 127951 && t2 <= 127955 || t2 >= 127968 && t2 <= 127984 || t2 === 127988 || t2 >= 127992 && t2 <= 128062 || t2 === 128064 || t2 >= 128066 && t2 <= 128252 || t2 >= 128255 && t2 <= 128317 || t2 >= 128331 && t2 <= 128334 || t2 >= 128336 && t2 <= 128359 || t2 === 128378 || t2 === 128405 || t2 === 128406 || t2 === 128420 || t2 >= 128507 && t2 <= 128591 || t2 >= 128640 && t2 <= 128709 || t2 === 128716 || t2 >= 128720 && t2 <= 128722 || t2 >= 128725 && t2 <= 128727 || t2 >= 128732 && t2 <= 128735 || t2 === 128747 || t2 === 128748 || t2 >= 128756 && t2 <= 128764 || t2 >= 128992 && t2 <= 129003 || t2 === 129008 || t2 >= 129292 && t2 <= 129338 || t2 >= 129340 && t2 <= 129349 || t2 >= 129351 && t2 <= 129535 || t2 >= 129648 && t2 <= 129660 || t2 >= 129664 && t2 <= 129672 || t2 >= 129680 && t2 <= 129725 || t2 >= 129727 && t2 <= 129733 || t2 >= 129742 && t2 <= 129755 || t2 >= 129760 && t2 <= 129768 || t2 >= 129776 && t2 <= 129784 || t2 >= 131072 && t2 <= 196605 || t2 >= 196608 && t2 <= 262141;
|
|
6064
|
-
var O = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
|
|
6065
|
-
var y = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
6066
|
-
var L = /\t{1,1000}/y;
|
|
6067
|
-
var P = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
|
|
6068
|
-
var M = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
6069
|
-
var ct = new RegExp("\\p{M}+", "gu");
|
|
6070
|
-
var ft = { limit: 1 / 0, ellipsis: "" };
|
|
6071
|
-
var X = (t2, e = {}, s = {}) => {
|
|
6072
|
-
const i = e.limit ?? 1 / 0, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? X(r, ft, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V2 = s.wideWidth ?? 2;
|
|
6073
|
-
let h2 = 0, o = 0, p = t2.length, v = 0, F = false, d = p, b = Math.max(0, i - n), C = 0, w = 0, c = 0, f = 0;
|
|
6074
|
-
t: for (; ; ) {
|
|
6075
|
-
if (w > C || o >= p && o > h2) {
|
|
6076
|
-
const ut = t2.slice(C, w) || t2.slice(h2, o);
|
|
6077
|
-
v = 0;
|
|
6078
|
-
for (const Y of ut.replaceAll(ct, "")) {
|
|
6079
|
-
const $ = Y.codePointAt(0) || 0;
|
|
6080
|
-
if (lt($) ? f = m : ht($) ? f = V2 : E !== A && at($) ? f = E : f = A, c + f > b && (d = Math.min(d, Math.max(C, h2) + v)), c + f > i) {
|
|
6081
|
-
F = true;
|
|
6082
|
-
break t;
|
|
6083
|
-
}
|
|
6084
|
-
v += Y.length, c += f;
|
|
6085
|
-
}
|
|
6086
|
-
C = w = 0;
|
|
6087
|
-
}
|
|
6088
|
-
if (o >= p) break;
|
|
6089
|
-
if (M.lastIndex = o, M.test(t2)) {
|
|
6090
|
-
if (v = M.lastIndex - o, f = v * A, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / A))), c + f > i) {
|
|
6091
|
-
F = true;
|
|
6092
|
-
break;
|
|
6093
|
-
}
|
|
6094
|
-
c += f, C = h2, w = o, o = h2 = M.lastIndex;
|
|
6095
|
-
continue;
|
|
6096
|
-
}
|
|
6097
|
-
if (O.lastIndex = o, O.test(t2)) {
|
|
6098
|
-
if (c + u > b && (d = Math.min(d, o)), c + u > i) {
|
|
6099
|
-
F = true;
|
|
6100
|
-
break;
|
|
6101
|
-
}
|
|
6102
|
-
c += u, C = h2, w = o, o = h2 = O.lastIndex;
|
|
6103
|
-
continue;
|
|
6104
|
-
}
|
|
6105
|
-
if (y.lastIndex = o, y.test(t2)) {
|
|
6106
|
-
if (v = y.lastIndex - o, f = v * a, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / a))), c + f > i) {
|
|
6107
|
-
F = true;
|
|
6108
|
-
break;
|
|
6109
|
-
}
|
|
6110
|
-
c += f, C = h2, w = o, o = h2 = y.lastIndex;
|
|
6111
|
-
continue;
|
|
6112
|
-
}
|
|
6113
|
-
if (L.lastIndex = o, L.test(t2)) {
|
|
6114
|
-
if (v = L.lastIndex - o, f = v * l, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / l))), c + f > i) {
|
|
6115
|
-
F = true;
|
|
6116
|
-
break;
|
|
6117
|
-
}
|
|
6118
|
-
c += f, C = h2, w = o, o = h2 = L.lastIndex;
|
|
6119
|
-
continue;
|
|
6120
|
-
}
|
|
6121
|
-
if (P.lastIndex = o, P.test(t2)) {
|
|
6122
|
-
if (c + g > b && (d = Math.min(d, o)), c + g > i) {
|
|
6123
|
-
F = true;
|
|
6124
|
-
break;
|
|
6125
|
-
}
|
|
6126
|
-
c += g, C = h2, w = o, o = h2 = P.lastIndex;
|
|
6127
|
-
continue;
|
|
6128
|
-
}
|
|
6129
|
-
o += 1;
|
|
6130
|
-
}
|
|
6131
|
-
return { width: F ? b : c, index: F ? d : p, truncated: F, ellipsed: F && i >= n };
|
|
6132
|
-
};
|
|
6133
|
-
var pt = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
|
|
6134
|
-
var S = (t2, e = {}) => X(t2, pt, e).width;
|
|
6135
|
-
var T = "\x1B";
|
|
6136
|
-
var Z = "\x9B";
|
|
6137
|
-
var Ft = 39;
|
|
6138
|
-
var j = "\x07";
|
|
6139
|
-
var Q = "[";
|
|
6140
|
-
var dt = "]";
|
|
6141
|
-
var tt = "m";
|
|
6142
|
-
var U = `${dt}8;;`;
|
|
6143
|
-
var et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y");
|
|
6144
|
-
var mt = (t2) => {
|
|
6145
|
-
if (t2 >= 30 && t2 <= 37 || t2 >= 90 && t2 <= 97) return 39;
|
|
6146
|
-
if (t2 >= 40 && t2 <= 47 || t2 >= 100 && t2 <= 107) return 49;
|
|
6147
|
-
if (t2 === 1 || t2 === 2) return 22;
|
|
6148
|
-
if (t2 === 3) return 23;
|
|
6149
|
-
if (t2 === 4) return 24;
|
|
6150
|
-
if (t2 === 7) return 27;
|
|
6151
|
-
if (t2 === 8) return 28;
|
|
6152
|
-
if (t2 === 9) return 29;
|
|
6153
|
-
if (t2 === 0) return 0;
|
|
6154
|
-
};
|
|
6155
|
-
var st = (t2) => `${T}${Q}${t2}${tt}`;
|
|
6156
|
-
var it = (t2) => `${T}${U}${t2}${j}`;
|
|
6157
|
-
var gt = (t2) => t2.map((e) => S(e));
|
|
6158
|
-
var G = (t2, e, s) => {
|
|
6159
|
-
const i = e[Symbol.iterator]();
|
|
6160
|
-
let r = false, n = false, u = t2.at(-1), a = u === void 0 ? 0 : S(u), l = i.next(), E = i.next(), g = 0;
|
|
6161
|
-
for (; !l.done; ) {
|
|
6162
|
-
const m = l.value, A = S(m);
|
|
6163
|
-
a + A <= s ? t2[t2.length - 1] += m : (t2.push(m), a = 0), (m === T || m === Z) && (r = true, n = e.startsWith(U, g + 1)), r ? n ? m === j && (r = false, n = false) : m === tt && (r = false) : (a += A, a === s && !E.done && (t2.push(""), a = 0)), l = E, E = i.next(), g += m.length;
|
|
6164
|
-
}
|
|
6165
|
-
u = t2.at(-1), !a && u !== void 0 && u.length > 0 && t2.length > 1 && (t2[t2.length - 2] += t2.pop());
|
|
6166
|
-
};
|
|
6167
|
-
var vt = (t2) => {
|
|
6168
|
-
const e = t2.split(" ");
|
|
6169
|
-
let s = e.length;
|
|
6170
|
-
for (; s > 0 && !(S(e[s - 1]) > 0); ) s--;
|
|
6171
|
-
return s === e.length ? t2 : e.slice(0, s).join(" ") + e.slice(s).join("");
|
|
6172
|
-
};
|
|
6173
|
-
var Et = (t2, e, s = {}) => {
|
|
6174
|
-
if (s.trim !== false && t2.trim() === "") return "";
|
|
6175
|
-
let i = "", r, n;
|
|
6176
|
-
const u = t2.split(" "), a = gt(u);
|
|
6177
|
-
let l = [""];
|
|
6178
|
-
for (const [h2, o] of u.entries()) {
|
|
6179
|
-
s.trim !== false && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
|
|
6180
|
-
let p = S(l.at(-1) ?? "");
|
|
6181
|
-
if (h2 !== 0 && (p >= e && (s.wordWrap === false || s.trim === false) && (l.push(""), p = 0), (p > 0 || s.trim === false) && (l[l.length - 1] += " ", p++)), s.hard && a[h2] > e) {
|
|
6182
|
-
const v = e - p, F = 1 + Math.floor((a[h2] - v - 1) / e);
|
|
6183
|
-
Math.floor((a[h2] - 1) / e) < F && l.push(""), G(l, o, e);
|
|
6184
|
-
continue;
|
|
6185
|
-
}
|
|
6186
|
-
if (p + a[h2] > e && p > 0 && a[h2] > 0) {
|
|
6187
|
-
if (s.wordWrap === false && p < e) {
|
|
6188
|
-
G(l, o, e);
|
|
6189
|
-
continue;
|
|
6190
|
-
}
|
|
6191
|
-
l.push("");
|
|
6192
|
-
}
|
|
6193
|
-
if (p + a[h2] > e && s.wordWrap === false) {
|
|
6194
|
-
G(l, o, e);
|
|
6195
|
-
continue;
|
|
6196
|
-
}
|
|
6197
|
-
l[l.length - 1] += o;
|
|
6198
|
-
}
|
|
6199
|
-
s.trim !== false && (l = l.map((h2) => vt(h2)));
|
|
6200
|
-
const E = l.join(`
|
|
6201
|
-
`), g = E[Symbol.iterator]();
|
|
6202
|
-
let m = g.next(), A = g.next(), V2 = 0;
|
|
6203
|
-
for (; !m.done; ) {
|
|
6204
|
-
const h2 = m.value, o = A.value;
|
|
6205
|
-
if (i += h2, h2 === T || h2 === Z) {
|
|
6206
|
-
et.lastIndex = V2 + 1;
|
|
6207
|
-
const F = et.exec(E)?.groups;
|
|
6208
|
-
if (F?.code !== void 0) {
|
|
6209
|
-
const d = Number.parseFloat(F.code);
|
|
6210
|
-
r = d === Ft ? void 0 : d;
|
|
6211
|
-
} else F?.uri !== void 0 && (n = F.uri.length === 0 ? void 0 : F.uri);
|
|
6212
|
-
}
|
|
6213
|
-
const p = r ? mt(r) : void 0;
|
|
6214
|
-
o === `
|
|
6215
|
-
` ? (n && (i += it("")), r && p && (i += st(p))) : h2 === `
|
|
6216
|
-
` && (r && p && (i += st(r)), n && (i += it(n))), V2 += h2.length, m = A, A = g.next();
|
|
6217
|
-
}
|
|
6218
|
-
return i;
|
|
6219
|
-
};
|
|
6220
|
-
function K(t2, e, s) {
|
|
6221
|
-
return String(t2).normalize().replaceAll(`\r
|
|
6222
|
-
`, `
|
|
6223
|
-
`).split(`
|
|
6224
|
-
`).map((i) => Et(i, e, s)).join(`
|
|
6225
|
-
`);
|
|
6226
|
-
}
|
|
6227
|
-
var At = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
6228
|
-
var _ = { actions: new Set(At), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true };
|
|
6229
|
-
function H(t2, e) {
|
|
6230
|
-
if (typeof t2 == "string") return _.aliases.get(t2) === e;
|
|
6231
|
-
for (const s of t2) if (s !== void 0 && H(s, e)) return true;
|
|
6232
|
-
return false;
|
|
6233
|
-
}
|
|
6234
|
-
function _t(t2, e) {
|
|
6235
|
-
if (t2 === e) return;
|
|
6236
|
-
const s = t2.split(`
|
|
6237
|
-
`), i = e.split(`
|
|
6238
|
-
`), r = Math.max(s.length, i.length), n = [];
|
|
6239
|
-
for (let u = 0; u < r; u++) s[u] !== i[u] && n.push(u);
|
|
6240
|
-
return { lines: n, numLinesBefore: s.length, numLinesAfter: i.length, numLines: r };
|
|
6241
|
-
}
|
|
6242
|
-
var bt = globalThis.process.platform.startsWith("win");
|
|
6243
|
-
var z = Symbol("clack:cancel");
|
|
6244
|
-
function Ct(t2) {
|
|
6245
|
-
return t2 === z;
|
|
6246
|
-
}
|
|
6247
|
-
function W(t2, e) {
|
|
6248
|
-
const s = t2;
|
|
6249
|
-
s.isTTY && s.setRawMode(e);
|
|
6250
|
-
}
|
|
6251
|
-
var rt = (t2) => "columns" in t2 && typeof t2.columns == "number" ? t2.columns : 80;
|
|
6252
|
-
var nt = (t2) => "rows" in t2 && typeof t2.rows == "number" ? t2.rows : 20;
|
|
6253
|
-
function Bt(t2, e, s, i = s) {
|
|
6254
|
-
const r = rt(t2 ?? R);
|
|
6255
|
-
return K(e, r - s.length, { hard: true, trim: false }).split(`
|
|
6256
|
-
`).map((n, u) => `${u === 0 ? i : s}${n}`).join(`
|
|
6257
|
-
`);
|
|
6258
|
-
}
|
|
6259
|
-
var B = class {
|
|
6260
|
-
input;
|
|
6261
|
-
output;
|
|
6262
|
-
_abortSignal;
|
|
6263
|
-
rl;
|
|
6264
|
-
opts;
|
|
6265
|
-
_render;
|
|
6266
|
-
_track = false;
|
|
6267
|
-
_prevFrame = "";
|
|
6268
|
-
_subscribers = /* @__PURE__ */ new Map();
|
|
6269
|
-
_cursor = 0;
|
|
6270
|
-
state = "initial";
|
|
6271
|
-
error = "";
|
|
6272
|
-
value;
|
|
6273
|
-
userInput = "";
|
|
6274
|
-
constructor(e, s = true) {
|
|
6275
|
-
const { input: i = q, output: r = R, render: n, signal: u, ...a } = e;
|
|
6276
|
-
this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = s, this._abortSignal = u, this.input = i, this.output = r;
|
|
6277
|
-
}
|
|
6278
|
-
unsubscribe() {
|
|
6279
|
-
this._subscribers.clear();
|
|
6280
|
-
}
|
|
6281
|
-
setSubscriber(e, s) {
|
|
6282
|
-
const i = this._subscribers.get(e) ?? [];
|
|
6283
|
-
i.push(s), this._subscribers.set(e, i);
|
|
6284
|
-
}
|
|
6285
|
-
on(e, s) {
|
|
6286
|
-
this.setSubscriber(e, { cb: s });
|
|
6287
|
-
}
|
|
6288
|
-
once(e, s) {
|
|
6289
|
-
this.setSubscriber(e, { cb: s, once: true });
|
|
6290
|
-
}
|
|
6291
|
-
emit(e, ...s) {
|
|
6292
|
-
const i = this._subscribers.get(e) ?? [], r = [];
|
|
6293
|
-
for (const n of i) n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
|
|
6294
|
-
for (const n of r) n();
|
|
6295
|
-
}
|
|
6296
|
-
prompt() {
|
|
6297
|
-
return new Promise((e) => {
|
|
6298
|
-
if (this._abortSignal) {
|
|
6299
|
-
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(z);
|
|
6300
|
-
this._abortSignal.addEventListener("abort", () => {
|
|
6301
|
-
this.state = "cancel", this.close();
|
|
6302
|
-
}, { once: true });
|
|
6303
|
-
}
|
|
6304
|
-
this.rl = ot.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), W(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
6305
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(this.value);
|
|
6306
|
-
}), this.once("cancel", () => {
|
|
6307
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(z);
|
|
6308
|
-
});
|
|
6309
|
-
});
|
|
6310
|
-
}
|
|
6311
|
-
_isActionKey(e, s) {
|
|
6312
|
-
return e === " ";
|
|
6313
|
-
}
|
|
6314
|
-
_setValue(e) {
|
|
6315
|
-
this.value = e, this.emit("value", this.value);
|
|
6316
|
-
}
|
|
6317
|
-
_setUserInput(e, s) {
|
|
6318
|
-
this.userInput = e ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
|
|
6319
|
-
}
|
|
6320
|
-
_clearUserInput() {
|
|
6321
|
-
this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
|
|
6322
|
-
}
|
|
6323
|
-
onKeypress(e, s) {
|
|
6324
|
-
if (this._track && s.name !== "return" && (s.name && this._isActionKey(e, s) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && _.aliases.has(s.name) && this.emit("cursor", _.aliases.get(s.name)), _.actions.has(s.name) && this.emit("cursor", s.name)), e && (e.toLowerCase() === "y" || e.toLowerCase() === "n") && this.emit("confirm", e.toLowerCase() === "y"), this.emit("key", e?.toLowerCase(), s), s?.name === "return") {
|
|
6325
|
-
if (this.opts.validate) {
|
|
6326
|
-
const i = this.opts.validate(this.value);
|
|
6327
|
-
i && (this.error = i instanceof Error ? i.message : i, this.state = "error", this.rl?.write(this.userInput));
|
|
6328
|
-
}
|
|
6329
|
-
this.state !== "error" && (this.state = "submit");
|
|
6330
|
-
}
|
|
6331
|
-
H([e, s?.name, s?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
6332
|
-
}
|
|
6333
|
-
close() {
|
|
6334
|
-
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
6335
|
-
`), W(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
6336
|
-
}
|
|
6337
|
-
restoreCursor() {
|
|
6338
|
-
const e = K(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
|
|
6339
|
-
`).length - 1;
|
|
6340
|
-
this.output.write(import_sisteransi.cursor.move(-999, e * -1));
|
|
6341
|
-
}
|
|
6342
|
-
render() {
|
|
6343
|
-
const e = K(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
|
|
6344
|
-
if (e !== this._prevFrame) {
|
|
6345
|
-
if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
|
|
6346
|
-
else {
|
|
6347
|
-
const s = _t(this._prevFrame, e), i = nt(this.output);
|
|
6348
|
-
if (this.restoreCursor(), s) {
|
|
6349
|
-
const r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i);
|
|
6350
|
-
let u = s.lines.find((a) => a >= r);
|
|
6351
|
-
if (u === void 0) {
|
|
6352
|
-
this._prevFrame = e;
|
|
6353
|
-
return;
|
|
6354
|
-
}
|
|
6355
|
-
if (s.lines.length === 1) {
|
|
6356
|
-
this.output.write(import_sisteransi.cursor.move(0, u - n)), this.output.write(import_sisteransi.erase.lines(1));
|
|
6357
|
-
const a = e.split(`
|
|
6358
|
-
`);
|
|
6359
|
-
this.output.write(a[u]), this._prevFrame = e, this.output.write(import_sisteransi.cursor.move(0, a.length - u - 1));
|
|
6360
|
-
return;
|
|
6361
|
-
} else if (s.lines.length > 1) {
|
|
6362
|
-
if (r < n) u = r;
|
|
6363
|
-
else {
|
|
6364
|
-
const l = u - n;
|
|
6365
|
-
l > 0 && this.output.write(import_sisteransi.cursor.move(0, l));
|
|
6366
|
-
}
|
|
6367
|
-
this.output.write(import_sisteransi.erase.down());
|
|
6368
|
-
const a = e.split(`
|
|
6369
|
-
`).slice(u);
|
|
6370
|
-
this.output.write(a.join(`
|
|
6371
|
-
`)), this._prevFrame = e;
|
|
6372
|
-
return;
|
|
6373
|
-
}
|
|
6374
|
-
}
|
|
6375
|
-
this.output.write(import_sisteransi.erase.down());
|
|
6376
|
-
}
|
|
6377
|
-
this.output.write(e), this.state === "initial" && (this.state = "active"), this._prevFrame = e;
|
|
6378
|
-
}
|
|
6379
|
-
}
|
|
6380
|
-
};
|
|
6381
|
-
var Lt = class extends B {
|
|
6382
|
-
options;
|
|
6383
|
-
cursor = 0;
|
|
6384
|
-
get _value() {
|
|
6385
|
-
return this.options[this.cursor].value;
|
|
6386
|
-
}
|
|
6387
|
-
get _enabledOptions() {
|
|
6388
|
-
return this.options.filter((e) => e.disabled !== true);
|
|
6389
|
-
}
|
|
6390
|
-
toggleAll() {
|
|
6391
|
-
const e = this._enabledOptions, s = this.value !== void 0 && this.value.length === e.length;
|
|
6392
|
-
this.value = s ? [] : e.map((i) => i.value);
|
|
6393
|
-
}
|
|
6394
|
-
toggleInvert() {
|
|
6395
|
-
const e = this.value;
|
|
6396
|
-
if (!e) return;
|
|
6397
|
-
const s = this._enabledOptions.filter((i) => !e.includes(i.value));
|
|
6398
|
-
this.value = s.map((i) => i.value);
|
|
6399
|
-
}
|
|
6400
|
-
toggleValue() {
|
|
6401
|
-
this.value === void 0 && (this.value = []);
|
|
6402
|
-
const e = this.value.includes(this._value);
|
|
6403
|
-
this.value = e ? this.value.filter((s) => s !== this._value) : [...this.value, this._value];
|
|
6404
|
-
}
|
|
6405
|
-
constructor(e) {
|
|
6406
|
-
super(e, false), this.options = e.options, this.value = [...e.initialValues ?? []];
|
|
6407
|
-
const s = Math.max(this.options.findIndex(({ value: i }) => i === e.cursorAt), 0);
|
|
6408
|
-
this.cursor = this.options[s].disabled ? x(s, 1, this.options) : s, this.on("key", (i) => {
|
|
6409
|
-
i === "a" && this.toggleAll(), i === "i" && this.toggleInvert();
|
|
6410
|
-
}), this.on("cursor", (i) => {
|
|
6411
|
-
switch (i) {
|
|
6412
|
-
case "left":
|
|
6413
|
-
case "up":
|
|
6414
|
-
this.cursor = x(this.cursor, -1, this.options);
|
|
6415
|
-
break;
|
|
6416
|
-
case "down":
|
|
6417
|
-
case "right":
|
|
6418
|
-
this.cursor = x(this.cursor, 1, this.options);
|
|
6419
|
-
break;
|
|
6420
|
-
case "space":
|
|
6421
|
-
this.toggleValue();
|
|
6422
|
-
break;
|
|
6423
|
-
}
|
|
6424
|
-
});
|
|
6425
|
-
}
|
|
6426
|
-
};
|
|
6427
|
-
|
|
6428
|
-
// ../../node_modules/.pnpm/@clack+prompts@1.1.0/node_modules/@clack/prompts/dist/index.mjs
|
|
6429
|
-
var import_sisteransi2 = __toESM(require_src(), 1);
|
|
6430
|
-
import { styleText as t, stripVTControlCharacters as ue } from "node:util";
|
|
6431
|
-
import N2 from "node:process";
|
|
6432
|
-
import { readdirSync as $t2, existsSync as dt2, lstatSync as xe } from "node:fs";
|
|
6433
|
-
import { dirname as _e, join as ht2 } from "node:path";
|
|
6434
|
-
function pt2() {
|
|
6435
|
-
return N2.platform !== "win32" ? N2.env.TERM !== "linux" : !!N2.env.CI || !!N2.env.WT_SESSION || !!N2.env.TERMINUS_SUBLIME || N2.env.ConEmuTask === "{cmd::Cmder}" || N2.env.TERM_PROGRAM === "Terminus-Sublime" || N2.env.TERM_PROGRAM === "vscode" || N2.env.TERM === "xterm-256color" || N2.env.TERM === "alacritty" || N2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
6436
|
-
}
|
|
6437
|
-
var ee = pt2();
|
|
6438
|
-
var I2 = (e, r) => ee ? e : r;
|
|
6439
|
-
var Re = I2("\u25C6", "*");
|
|
6440
|
-
var $e = I2("\u25A0", "x");
|
|
6441
|
-
var de = I2("\u25B2", "x");
|
|
6442
|
-
var V = I2("\u25C7", "o");
|
|
6443
|
-
var he = I2("\u250C", "T");
|
|
6444
|
-
var h = I2("\u2502", "|");
|
|
6445
|
-
var x2 = I2("\u2514", "\u2014");
|
|
6446
|
-
var Oe = I2("\u2510", "T");
|
|
6447
|
-
var Pe = I2("\u2518", "\u2014");
|
|
6448
|
-
var z2 = I2("\u25CF", ">");
|
|
6449
|
-
var H2 = I2("\u25CB", " ");
|
|
6450
|
-
var te = I2("\u25FB", "[\u2022]");
|
|
6451
|
-
var U2 = I2("\u25FC", "[+]");
|
|
6452
|
-
var q2 = I2("\u25FB", "[ ]");
|
|
6453
|
-
var Ne = I2("\u25AA", "\u2022");
|
|
6454
|
-
var se = I2("\u2500", "-");
|
|
6455
|
-
var pe = I2("\u256E", "+");
|
|
6456
|
-
var We = I2("\u251C", "+");
|
|
6457
|
-
var me = I2("\u256F", "+");
|
|
6458
|
-
var ge = I2("\u2570", "+");
|
|
6459
|
-
var Ge = I2("\u256D", "+");
|
|
6460
|
-
var fe = I2("\u25CF", "\u2022");
|
|
6461
|
-
var Fe = I2("\u25C6", "*");
|
|
6462
|
-
var ye = I2("\u25B2", "!");
|
|
6463
|
-
var Ee = I2("\u25A0", "x");
|
|
6464
|
-
var W2 = (e) => {
|
|
6465
|
-
switch (e) {
|
|
6466
|
-
case "initial":
|
|
6467
|
-
case "active":
|
|
6468
|
-
return t("cyan", Re);
|
|
6469
|
-
case "cancel":
|
|
6470
|
-
return t("red", $e);
|
|
6471
|
-
case "error":
|
|
6472
|
-
return t("yellow", de);
|
|
6473
|
-
case "submit":
|
|
6474
|
-
return t("green", V);
|
|
6475
|
-
}
|
|
6476
|
-
};
|
|
6477
|
-
var ve = (e) => {
|
|
6478
|
-
switch (e) {
|
|
6479
|
-
case "initial":
|
|
6480
|
-
case "active":
|
|
6481
|
-
return t("cyan", h);
|
|
6482
|
-
case "cancel":
|
|
6483
|
-
return t("red", h);
|
|
6484
|
-
case "error":
|
|
6485
|
-
return t("yellow", h);
|
|
6486
|
-
case "submit":
|
|
6487
|
-
return t("green", h);
|
|
6488
|
-
}
|
|
6489
|
-
};
|
|
6490
|
-
var mt2 = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109;
|
|
6491
|
-
var gt2 = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
|
|
6492
|
-
var ft2 = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
|
|
6493
|
-
var we = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
|
|
6494
|
-
var re = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
6495
|
-
var ie = /\t{1,1000}/y;
|
|
6496
|
-
var Ae = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
|
|
6497
|
-
var ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
6498
|
-
var Ft2 = new RegExp("\\p{M}+", "gu");
|
|
6499
|
-
var yt2 = { limit: 1 / 0, ellipsis: "" };
|
|
6500
|
-
var Le = (e, r = {}, s = {}) => {
|
|
6501
|
-
const i = r.limit ?? 1 / 0, a = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (a ? Le(a, yt2, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, n = s.tabWidth ?? 8, c = s.ambiguousWidth ?? 1, p = s.emojiWidth ?? 2, f = s.fullWidthWidth ?? 2, g = s.regularWidth ?? 1, E = s.wideWidth ?? 2;
|
|
6502
|
-
let $ = 0, m = 0, d = e.length, F = 0, y2 = false, v = d, C = Math.max(0, i - o), A = 0, b = 0, w = 0, S2 = 0;
|
|
6503
|
-
e: for (; ; ) {
|
|
6504
|
-
if (b > A || m >= d && m > $) {
|
|
6505
|
-
const T2 = e.slice(A, b) || e.slice($, m);
|
|
6506
|
-
F = 0;
|
|
6507
|
-
for (const M2 of T2.replaceAll(Ft2, "")) {
|
|
6508
|
-
const O2 = M2.codePointAt(0) || 0;
|
|
6509
|
-
if (gt2(O2) ? S2 = f : ft2(O2) ? S2 = E : c !== g && mt2(O2) ? S2 = c : S2 = g, w + S2 > C && (v = Math.min(v, Math.max(A, $) + F)), w + S2 > i) {
|
|
6510
|
-
y2 = true;
|
|
6511
|
-
break e;
|
|
6512
|
-
}
|
|
6513
|
-
F += M2.length, w += S2;
|
|
6514
|
-
}
|
|
6515
|
-
A = b = 0;
|
|
6516
|
-
}
|
|
6517
|
-
if (m >= d) break;
|
|
6518
|
-
if (ne.lastIndex = m, ne.test(e)) {
|
|
6519
|
-
if (F = ne.lastIndex - m, S2 = F * g, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / g))), w + S2 > i) {
|
|
6520
|
-
y2 = true;
|
|
6521
|
-
break;
|
|
6522
|
-
}
|
|
6523
|
-
w += S2, A = $, b = m, m = $ = ne.lastIndex;
|
|
6524
|
-
continue;
|
|
6525
|
-
}
|
|
6526
|
-
if (we.lastIndex = m, we.test(e)) {
|
|
6527
|
-
if (w + u > C && (v = Math.min(v, m)), w + u > i) {
|
|
6528
|
-
y2 = true;
|
|
6529
|
-
break;
|
|
6530
|
-
}
|
|
6531
|
-
w += u, A = $, b = m, m = $ = we.lastIndex;
|
|
6532
|
-
continue;
|
|
6533
|
-
}
|
|
6534
|
-
if (re.lastIndex = m, re.test(e)) {
|
|
6535
|
-
if (F = re.lastIndex - m, S2 = F * l, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / l))), w + S2 > i) {
|
|
6536
|
-
y2 = true;
|
|
6537
|
-
break;
|
|
6538
|
-
}
|
|
6539
|
-
w += S2, A = $, b = m, m = $ = re.lastIndex;
|
|
6540
|
-
continue;
|
|
6541
|
-
}
|
|
6542
|
-
if (ie.lastIndex = m, ie.test(e)) {
|
|
6543
|
-
if (F = ie.lastIndex - m, S2 = F * n, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / n))), w + S2 > i) {
|
|
6544
|
-
y2 = true;
|
|
6545
|
-
break;
|
|
6546
|
-
}
|
|
6547
|
-
w += S2, A = $, b = m, m = $ = ie.lastIndex;
|
|
6548
|
-
continue;
|
|
6549
|
-
}
|
|
6550
|
-
if (Ae.lastIndex = m, Ae.test(e)) {
|
|
6551
|
-
if (w + p > C && (v = Math.min(v, m)), w + p > i) {
|
|
6552
|
-
y2 = true;
|
|
6553
|
-
break;
|
|
6554
|
-
}
|
|
6555
|
-
w += p, A = $, b = m, m = $ = Ae.lastIndex;
|
|
6556
|
-
continue;
|
|
6557
|
-
}
|
|
6558
|
-
m += 1;
|
|
6559
|
-
}
|
|
6560
|
-
return { width: y2 ? C : w, index: y2 ? v : d, truncated: y2, ellipsed: y2 && i >= o };
|
|
6561
|
-
};
|
|
6562
|
-
var Et2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
|
|
6563
|
-
var D2 = (e, r = {}) => Le(e, Et2, r).width;
|
|
6564
|
-
var ae = "\x1B";
|
|
6565
|
-
var je = "\x9B";
|
|
6566
|
-
var vt2 = 39;
|
|
6567
|
-
var Ce = "\x07";
|
|
6568
|
-
var ke = "[";
|
|
6569
|
-
var wt = "]";
|
|
6570
|
-
var Ve = "m";
|
|
6571
|
-
var Se = `${wt}8;;`;
|
|
6572
|
-
var He = new RegExp(`(?:\\${ke}(?<code>\\d+)m|\\${Se}(?<uri>.*)${Ce})`, "y");
|
|
6573
|
-
var At2 = (e) => {
|
|
6574
|
-
if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
|
|
6575
|
-
if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
|
|
6576
|
-
if (e === 1 || e === 2) return 22;
|
|
6577
|
-
if (e === 3) return 23;
|
|
6578
|
-
if (e === 4) return 24;
|
|
6579
|
-
if (e === 7) return 27;
|
|
6580
|
-
if (e === 8) return 28;
|
|
6581
|
-
if (e === 9) return 29;
|
|
6582
|
-
if (e === 0) return 0;
|
|
6583
|
-
};
|
|
6584
|
-
var Ue = (e) => `${ae}${ke}${e}${Ve}`;
|
|
6585
|
-
var Ke = (e) => `${ae}${Se}${e}${Ce}`;
|
|
6586
|
-
var Ct2 = (e) => e.map((r) => D2(r));
|
|
6587
|
-
var Ie = (e, r, s) => {
|
|
6588
|
-
const i = r[Symbol.iterator]();
|
|
6589
|
-
let a = false, o = false, u = e.at(-1), l = u === void 0 ? 0 : D2(u), n = i.next(), c = i.next(), p = 0;
|
|
6590
|
-
for (; !n.done; ) {
|
|
6591
|
-
const f = n.value, g = D2(f);
|
|
6592
|
-
l + g <= s ? e[e.length - 1] += f : (e.push(f), l = 0), (f === ae || f === je) && (a = true, o = r.startsWith(Se, p + 1)), a ? o ? f === Ce && (a = false, o = false) : f === Ve && (a = false) : (l += g, l === s && !c.done && (e.push(""), l = 0)), n = c, c = i.next(), p += f.length;
|
|
6593
|
-
}
|
|
6594
|
-
u = e.at(-1), !l && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
|
|
6595
|
-
};
|
|
6596
|
-
var St = (e) => {
|
|
6597
|
-
const r = e.split(" ");
|
|
6598
|
-
let s = r.length;
|
|
6599
|
-
for (; s > 0 && !(D2(r[s - 1]) > 0); ) s--;
|
|
6600
|
-
return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
|
|
6601
|
-
};
|
|
6602
|
-
var It2 = (e, r, s = {}) => {
|
|
6603
|
-
if (s.trim !== false && e.trim() === "") return "";
|
|
6604
|
-
let i = "", a, o;
|
|
6605
|
-
const u = e.split(" "), l = Ct2(u);
|
|
6606
|
-
let n = [""];
|
|
6607
|
-
for (const [$, m] of u.entries()) {
|
|
6608
|
-
s.trim !== false && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
|
|
6609
|
-
let d = D2(n.at(-1) ?? "");
|
|
6610
|
-
if ($ !== 0 && (d >= r && (s.wordWrap === false || s.trim === false) && (n.push(""), d = 0), (d > 0 || s.trim === false) && (n[n.length - 1] += " ", d++)), s.hard && l[$] > r) {
|
|
6611
|
-
const F = r - d, y2 = 1 + Math.floor((l[$] - F - 1) / r);
|
|
6612
|
-
Math.floor((l[$] - 1) / r) < y2 && n.push(""), Ie(n, m, r);
|
|
6613
|
-
continue;
|
|
6614
|
-
}
|
|
6615
|
-
if (d + l[$] > r && d > 0 && l[$] > 0) {
|
|
6616
|
-
if (s.wordWrap === false && d < r) {
|
|
6617
|
-
Ie(n, m, r);
|
|
6618
|
-
continue;
|
|
6619
|
-
}
|
|
6620
|
-
n.push("");
|
|
6621
|
-
}
|
|
6622
|
-
if (d + l[$] > r && s.wordWrap === false) {
|
|
6623
|
-
Ie(n, m, r);
|
|
6624
|
-
continue;
|
|
6625
|
-
}
|
|
6626
|
-
n[n.length - 1] += m;
|
|
6627
|
-
}
|
|
6628
|
-
s.trim !== false && (n = n.map(($) => St($)));
|
|
6629
|
-
const c = n.join(`
|
|
6630
|
-
`), p = c[Symbol.iterator]();
|
|
6631
|
-
let f = p.next(), g = p.next(), E = 0;
|
|
6632
|
-
for (; !f.done; ) {
|
|
6633
|
-
const $ = f.value, m = g.value;
|
|
6634
|
-
if (i += $, $ === ae || $ === je) {
|
|
6635
|
-
He.lastIndex = E + 1;
|
|
6636
|
-
const y2 = He.exec(c)?.groups;
|
|
6637
|
-
if (y2?.code !== void 0) {
|
|
6638
|
-
const v = Number.parseFloat(y2.code);
|
|
6639
|
-
a = v === vt2 ? void 0 : v;
|
|
6640
|
-
} else y2?.uri !== void 0 && (o = y2.uri.length === 0 ? void 0 : y2.uri);
|
|
6641
|
-
}
|
|
6642
|
-
const d = a ? At2(a) : void 0;
|
|
6643
|
-
m === `
|
|
6644
|
-
` ? (o && (i += Ke("")), a && d && (i += Ue(d))) : $ === `
|
|
6645
|
-
` && (a && d && (i += Ue(a)), o && (i += Ke(o))), E += $.length, f = g, g = p.next();
|
|
6646
|
-
}
|
|
6647
|
-
return i;
|
|
6648
|
-
};
|
|
6649
|
-
function J2(e, r, s) {
|
|
6650
|
-
return String(e).normalize().replaceAll(`\r
|
|
6651
|
-
`, `
|
|
6652
|
-
`).split(`
|
|
6653
|
-
`).map((i) => It2(i, r, s)).join(`
|
|
6654
|
-
`);
|
|
6655
|
-
}
|
|
6656
|
-
var bt2 = (e, r, s, i, a) => {
|
|
6657
|
-
let o = r, u = 0;
|
|
6658
|
-
for (let l = s; l < i; l++) {
|
|
6659
|
-
const n = e[l];
|
|
6660
|
-
if (o = o - n.length, u++, o <= a) break;
|
|
6661
|
-
}
|
|
6662
|
-
return { lineCount: o, removals: u };
|
|
6663
|
-
};
|
|
6664
|
-
var X2 = ({ cursor: e, options: r, style: s, output: i = process.stdout, maxItems: a = Number.POSITIVE_INFINITY, columnPadding: o = 0, rowPadding: u = 4 }) => {
|
|
6665
|
-
const l = rt(i) - o, n = nt(i), c = t("dim", "..."), p = Math.max(n - u, 0), f = Math.max(Math.min(a, p), 5);
|
|
6666
|
-
let g = 0;
|
|
6667
|
-
e >= f - 3 && (g = Math.max(Math.min(e - f + 3, r.length - f), 0));
|
|
6668
|
-
let E = f < r.length && g > 0, $ = f < r.length && g + f < r.length;
|
|
6669
|
-
const m = Math.min(g + f, r.length), d = [];
|
|
6670
|
-
let F = 0;
|
|
6671
|
-
E && F++, $ && F++;
|
|
6672
|
-
const y2 = g + (E ? 1 : 0), v = m - ($ ? 1 : 0);
|
|
6673
|
-
for (let A = y2; A < v; A++) {
|
|
6674
|
-
const b = J2(s(r[A], A === e), l, { hard: true, trim: false }).split(`
|
|
6675
|
-
`);
|
|
6676
|
-
d.push(b), F += b.length;
|
|
6677
|
-
}
|
|
6678
|
-
if (F > p) {
|
|
6679
|
-
let A = 0, b = 0, w = F;
|
|
6680
|
-
const S2 = e - y2, T2 = (M2, O2) => bt2(d, w, M2, O2, p);
|
|
6681
|
-
E ? ({ lineCount: w, removals: A } = T2(0, S2), w > p && ({ lineCount: w, removals: b } = T2(S2 + 1, d.length))) : ({ lineCount: w, removals: b } = T2(S2 + 1, d.length), w > p && ({ lineCount: w, removals: A } = T2(0, S2))), A > 0 && (E = true, d.splice(0, A)), b > 0 && ($ = true, d.splice(d.length - b, b));
|
|
6682
|
-
}
|
|
6683
|
-
const C = [];
|
|
6684
|
-
E && C.push(c);
|
|
6685
|
-
for (const A of d) for (const b of A) C.push(b);
|
|
6686
|
-
return $ && C.push(c), C;
|
|
6687
|
-
};
|
|
6688
|
-
var Q2 = (e, r) => e.split(`
|
|
6689
|
-
`).map((s) => r(s)).join(`
|
|
6690
|
-
`);
|
|
6691
|
-
var Lt2 = (e) => {
|
|
6692
|
-
const r = (i, a) => {
|
|
6693
|
-
const o = i.label ?? String(i.value);
|
|
6694
|
-
return a === "disabled" ? `${t("gray", q2)} ${Q2(o, (u) => t(["strikethrough", "gray"], u))}${i.hint ? ` ${t("dim", `(${i.hint ?? "disabled"})`)}` : ""}` : a === "active" ? `${t("cyan", te)} ${o}${i.hint ? ` ${t("dim", `(${i.hint})`)}` : ""}` : a === "selected" ? `${t("green", U2)} ${Q2(o, (u) => t("dim", u))}${i.hint ? ` ${t("dim", `(${i.hint})`)}` : ""}` : a === "cancelled" ? `${Q2(o, (u) => t(["strikethrough", "dim"], u))}` : a === "active-selected" ? `${t("green", U2)} ${o}${i.hint ? ` ${t("dim", `(${i.hint})`)}` : ""}` : a === "submitted" ? `${Q2(o, (u) => t("dim", u))}` : `${t("dim", q2)} ${Q2(o, (u) => t("dim", u))}`;
|
|
6695
|
-
}, s = e.required ?? true;
|
|
6696
|
-
return new Lt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: s, cursorAt: e.cursorAt, validate(i) {
|
|
6697
|
-
if (s && (i === void 0 || i.length === 0)) return `Please select at least one option.
|
|
6698
|
-
${t("reset", t("dim", `Press ${t(["gray", "bgWhite", "inverse"], " space ")} to select, ${t("gray", t("bgWhite", t("inverse", " enter ")))} to submit`))}`;
|
|
6699
|
-
}, render() {
|
|
6700
|
-
const i = Bt(e.output, e.message, `${ve(this.state)} `, `${W2(this.state)} `), a = `${t("gray", h)}
|
|
6701
|
-
${i}
|
|
6702
|
-
`, o = this.value ?? [], u = (l, n) => {
|
|
6703
|
-
if (l.disabled) return r(l, "disabled");
|
|
6704
|
-
const c = o.includes(l.value);
|
|
6705
|
-
return n && c ? r(l, "active-selected") : c ? r(l, "selected") : r(l, n ? "active" : "inactive");
|
|
6706
|
-
};
|
|
6707
|
-
switch (this.state) {
|
|
6708
|
-
case "submit": {
|
|
6709
|
-
const l = this.options.filter(({ value: c }) => o.includes(c)).map((c) => r(c, "submitted")).join(t("dim", ", ")) || t("dim", "none"), n = Bt(e.output, l, `${t("gray", h)} `);
|
|
6710
|
-
return `${a}${n}`;
|
|
6711
|
-
}
|
|
6712
|
-
case "cancel": {
|
|
6713
|
-
const l = this.options.filter(({ value: c }) => o.includes(c)).map((c) => r(c, "cancelled")).join(t("dim", ", "));
|
|
6714
|
-
if (l.trim() === "") return `${a}${t("gray", h)}`;
|
|
6715
|
-
const n = Bt(e.output, l, `${t("gray", h)} `);
|
|
6716
|
-
return `${a}${n}
|
|
6717
|
-
${t("gray", h)}`;
|
|
6718
|
-
}
|
|
6719
|
-
case "error": {
|
|
6720
|
-
const l = `${t("yellow", h)} `, n = this.error.split(`
|
|
6721
|
-
`).map((f, g) => g === 0 ? `${t("yellow", x2)} ${t("yellow", f)}` : ` ${f}`).join(`
|
|
6722
|
-
`), c = a.split(`
|
|
6723
|
-
`).length, p = n.split(`
|
|
6724
|
-
`).length + 1;
|
|
6725
|
-
return `${a}${l}${X2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: l.length, rowPadding: c + p, style: u }).join(`
|
|
6726
|
-
${l}`)}
|
|
6727
|
-
${n}
|
|
6728
|
-
`;
|
|
6729
|
-
}
|
|
6730
|
-
default: {
|
|
6731
|
-
const l = `${t("cyan", h)} `, n = a.split(`
|
|
6732
|
-
`).length;
|
|
6733
|
-
return `${a}${l}${X2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: l.length, rowPadding: n + 2, style: u }).join(`
|
|
6734
|
-
${l}`)}
|
|
6735
|
-
${t("cyan", x2)}
|
|
6736
|
-
`;
|
|
6737
|
-
}
|
|
6738
|
-
}
|
|
6739
|
-
} }).prompt();
|
|
6740
|
-
};
|
|
6741
|
-
var ze = { light: I2("\u2500", "-"), heavy: I2("\u2501", "="), block: I2("\u2588", "#") };
|
|
6742
|
-
var Qe = `${t("gray", h)} `;
|
|
6743
5987
|
|
|
6744
5988
|
// src/skills/claude-code.md
|
|
6745
5989
|
var claude_code_default = '---\nname: vent\ndescription: Voice agent calls \u2014 run calls against your voice agent, get pass/fail results with latency and latency metrics\nallowed-tools: Bash(npx vent-hq *)\n---\n\n# Vent \u2014 Voice Agent Calls\n\nCall voice agents from the terminal. Calls run in the cloud \u2014 results stream back.\n\n## When to Call (read this first)\n\n- After modifying voice agent code (system prompt, tools, handlers): ALWAYS run calls\n- After changing audio config: run calls\n- Before marking a task complete that touches agent behavior: run calls\n- Do NOT skip call verification \u2014 voice agents are non-deterministic, small changes can break flows\n\n## Setup (if no Vent access token)\n\nIf `~/.vent/credentials` does not exist and `VENT_ACCESS_TOKEN` is not set:\n\n```bash\nnpx vent-hq init\n```\n\nOne command. No email, no browser, no human interaction needed. You get 10 free runs instantly.\n\n## Commands\n\n| Command | Purpose |\n|---------|---------|\n| `npx vent-hq init` | First-time setup (creates account + installs skills) |\n| `npx vent-hq agent start -f .vent/suite.<adapter>.json` | Start one shared local agent session (required for `start_command`) |\n| `npx vent-hq agent stop <session-id>` | Close a shared local agent session |\n| `npx vent-hq run -f .vent/suite.<adapter>.json` | Run a call from suite file (auto-selects if only one call) |\n| `npx vent-hq run -f .vent/suite.<adapter>.json --verbose` | Include debug fields in the result JSON |\n| `npx vent-hq run -f .vent/suite.<adapter>.json --call <name>` | Run a specific named call |\n| `npx vent-hq stop <run-id>` | Cancel a queued or running call |\n| `npx vent-hq status <run-id>` | Check results of a previous run |\n| `npx vent-hq status <run-id> --verbose` | Re-print a run with debug fields included |\n\n## When To Use `--verbose`\n\nDefault output is enough for most work. It already includes:\n- transcript\n- latency\n- transcript quality (`wer` / `cer`)\n- audio analysis\n- tool calls\n- summary cost / recording / transfers\n\nUse `--verbose` only when you need debugging detail that is not in the default result:\n- per-turn debug fields: timestamps, caller decision mode, silence pad, STT confidence, platform transcript\n- raw signal analysis: `debug.signal_quality`\n- harness timings: `debug.harness_overhead`\n- raw prosody payload and warnings\n- raw provider warnings\n- per-turn component latency arrays\n- raw observed tool-call timeline\n- provider-specific metadata in `debug.provider_metadata`\n\nTrigger `--verbose` when:\n- transcript accuracy looks wrong and you need to inspect `platform_transcript`\n- latency is bad and you need per-turn/component breakdowns\n- interruptions/barge-in behavior looks wrong\n- tool-call execution looks inconsistent or missing\n- the provider returned warnings/errors or you need provider-native artifacts\n\nSkip `--verbose` when:\n- you only need pass/fail, transcript, latency, tool calls, recording, or summary\n- you are doing quick iteration on prompt wording and the normal result already explains the failure\n\n## Normalization Contract\n\nVent always returns one normalized result shape on `stdout` across adapters. Treat these as the stable categories:\n- `transcript`\n- `latency`\n- `transcript_quality`\n- `audio_analysis`\n- `tool_calls`\n- `component_latency`\n- `call_metadata`\n- `warnings`\n- `audio_actions`\n- `emotion`\n\nSource-of-truth policy:\n- Vent computes transcript, latency, and audio-quality metrics itself.\n- Hosted adapters choose the best source per category, usually provider post-call data for tool calls, call metadata, transfers, provider transcripts, and recordings.\n- Realtime provider events are fallback or enrichment only when post-call data is missing, delayed, weaker for that category, or provider-specific.\n- `LiveKit` helper events are the provider-native path for rich in-agent observability.\n- `websocket`/custom agents are realtime-native but still map into the same normalized categories.\n- Keep adapter-specific details in `call_metadata.provider_metadata` or `debug.provider_metadata`, not in new top-level fields.\n\n\n## Critical Rules\n\n1. **5-minute timeout** \u2014 Set `timeout: 300000` on each Bash call. Individual calls can still take up to 5 minutes.\n2. **If a call gets backgrounded** \u2014 Wait for it to complete before proceeding. Never end your response without the result.\n3. **This skill is self-contained** \u2014 The full config schema is below. Do NOT re-read this file.\n4. **Always analyze results** \u2014 The run command outputs complete JSON with full transcript, latency, and tool calls. Use `--verbose` only when the default result is not enough to explain the failure. Analyze this output directly.\n\n## Workflow\n\n### First time: create the call suite\n\n1. Read the voice agent\'s codebase \u2014 understand its system prompt, tools, intents, and domain.\n2. Read the **Full Config Schema** section below for all available fields.\n3. Create the suite file in `.vent/` using the naming convention: `.vent/suite.<adapter>.json` (e.g., `.vent/suite.vapi.json`, `.vent/suite.websocket.json`, `.vent/suite.retell.json`). This prevents confusion when multiple adapters are tested in the same project.\n - Name calls after specific flows (e.g., `"reschedule-appointment"`, not `"call-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\n### Multiple suite files\n\nIf `.vent/` contains more than one suite file, **always check which adapter each suite uses before running**. Read the `connection.adapter` field in each file. Never run a suite intended for a different adapter \u2014 results will be meaningless or fail. When reporting results, always state which suite file produced them (e.g., "Results from `.vent/suite.vapi.json`:").\n\n### Run calls\n\n1. If the suite uses `start_command`, start the shared local session first:\n ```bash\n npx vent-hq agent start -f .vent/suite.<adapter>.json\n ```\n\n2. Run calls:\n ```bash\n # suite with one call (auto-selects)\n npx vent-hq run -f .vent/suite.<adapter>.json\n\n # suite with multiple calls \u2014 pick one by name\n npx vent-hq run -f .vent/suite.<adapter>.json --call happy-path\n\n # local start_command \u2014 add --session\n npx vent-hq run -f .vent/suite.<adapter>.json --call happy-path --session <session-id>\n ```\n\n3. To run multiple calls from the same suite, run each as a separate command:\n ```bash\n npx vent-hq run -f .vent/suite.vapi.json --call happy-path\n npx vent-hq run -f .vent/suite.vapi.json --call edge-case\n ```\n\n4. Analyze each result, identify failures, correlate with the codebase, and fix.\n\n5. **Compare with previous run** \u2014 Vent saves full result JSON to `.vent/runs/` after every run. Read the second-most-recent JSON in `.vent/runs/` and compare it against the current run:\n - Status flips: pass\u2192fail (obvious regression)\n - Latency: TTFW p50/p95 increased >20%\n - Tool calls: success count dropped\n - Cost: cost_usd increased >30%\n - Transcripts: agent responses diverged significantly\n Report what regressed and correlate with the code diff (`git diff` between the two runs\' git SHAs). If no previous run exists, skip \u2014 this is the baseline.\n\n### After modifying voice agent code\n\nRe-run the existing suite \u2014 no need to recreate it.\n\n## Connection\n\n- **BYO agent runtime**: your agent owns its own provider credentials. Use `start_command` for a local agent or `agent_url` for a hosted custom endpoint.\n- **Platform-direct runtime**: use adapter `vapi | retell | elevenlabs | bland | livekit`. This is the only mode where Vent itself needs provider credentials and saved platform connections apply.\n\n## WebSocket Protocol (BYO agents)\n\nWhen using `adapter: "websocket"`, Vent communicates with the agent over a single WebSocket connection:\n\n- **Binary frames** \u2192 PCM audio (16-bit mono, configurable sample rate)\n- **Text frames** \u2192 optional JSON events the agent can send for better test accuracy:\n\n| Event | Format | Purpose |\n|-------|--------|---------|\n| `speech-update` | `{"type":"speech-update","status":"started"\\|"stopped"}` | Enables platform-assisted turn detection (more accurate than VAD alone) |\n| `tool_call` | `{"type":"tool_call","name":"...","arguments":{...},"result":...,"successful":bool,"duration_ms":number}` | Reports tool calls for observability |\n| `vent:timing` | `{"type":"vent:timing","stt_ms":number,"llm_ms":number,"tts_ms":number}` | Reports component latency breakdown per turn |\n| `vent:session` | `{"type":"vent:session","platform":"custom","provider_call_id":"...","provider_session_id":"..."}` | Reports stable provider/session identifiers |\n| `vent:call-metadata` | `{"type":"vent:call-metadata","call_metadata":{...}}` | Reports post-call metadata such as cost, recordings, variables, and provider-specific artifacts |\n| `vent:transcript` | `{"type":"vent:transcript","role":"caller"\\|"agent","text":"...","turn_index":0}` | Reports platform/native transcript text for caller or agent |\n| `vent:transfer` | `{"type":"vent:transfer","destination":"...","status":"attempted"\\|"completed"}` | Reports transfer attempts and outcomes |\n| `vent:debug-url` | `{"type":"vent:debug-url","label":"log","url":"https://..."}` | Reports provider debug/deep-link URLs |\n| `vent:warning` | `{"type":"vent:warning","message":"...","code":"..."}` | Reports provider/runtime warnings worth preserving in run metadata |\n\nVent sends `{"type":"end-call"}` to the agent when the test is done.\n\nAll text frames are optional \u2014 audio-only agents work fine with VAD-based turn detection.\n\n## Full Config Schema\n\n- ALL calls MUST reference the agent\'s real context (system prompt, tools, knowledge base) from the codebase.\n\n<vent_run>\n{\n "connection": { ... },\n "calls": {\n "happy-path": { ... },\n "edge-case": { ... }\n }\n}\n</vent_run>\n\nOne suite file per platform/adapter. `connection` is declared once, `calls` is a named map of call specs. Each key becomes the call name. Run one call at a time with `--call <name>`.\n\n<config_connection>\n{\n "connection": {\n "adapter": "required -- websocket | livekit | vapi | retell | elevenlabs | bland",\n "start_command": "shell command to start agent (relay only, required for local)",\n "health_endpoint": "health check path after start_command (default: /health, relay only, required for local)",\n "agent_url": "hosted custom agent URL (wss:// or https://). Use for BYO hosted agents.",\n "agent_port": "local agent port (default: 3001, required for local)",\n "platform": "optional authoring convenience for platform-direct adapters only. The CLI resolves this locally, creates/updates a saved platform connection, and strips raw provider secrets before submit. Do not use for websocket start_command or agent_url runs."\n }\n}\n\n<credential_resolution>\nIMPORTANT: How to handle platform credentials (API keys, secrets, agent IDs):\n\nThere are two product modes:\n- `BYO agent runtime`: your agent owns its own provider credentials. This covers both `start_command` (local) and `agent_url` (hosted custom endpoint).\n- `Platform-direct runtime`: Vent talks to `vapi`, `retell`, `elevenlabs`, `bland`, or `livekit` directly. This is the only mode that uses saved platform connections.\n\n1. For `start_command` and `agent_url` runs, do NOT put Deepgram / ElevenLabs / OpenAI / other provider keys into Vent config unless the Vent adapter itself needs them. Those credentials belong to the user\'s local or hosted agent runtime.\n2. For platform-direct adapters (`vapi`, `retell`, `elevenlabs`, `bland`, `livekit`), the CLI auto-resolves credentials from `.env.local`, `.env`, and the current shell env. If those env vars already exist, you can omit credential fields from the config JSON entirely.\n3. If you include credential fields in the config, put the ACTUAL VALUE, NOT the env var name. WRONG: `"vapi_api_key": "VAPI_API_KEY"`. RIGHT: `"vapi_api_key": "sk-abc123..."` or omit the field.\n4. The CLI uses the resolved provider config to create or update a saved platform connection server-side, then submits only `platform_connection_id`. Users should not manually author `platform_connection_id`.\n5. To check whether credentials are already available, inspect `.env.local`, `.env`, and any relevant shell env visible to the CLI process.\n\nAuto-resolved env vars per platform:\n| Platform | Config field | Env var (auto-resolved from `.env.local`, `.env`, or shell env) |\n|----------|-------------|-----------------------------------|\n| Vapi | vapi_api_key | VAPI_API_KEY |\n| Vapi | vapi_assistant_id | VAPI_ASSISTANT_ID |\n| Bland | bland_api_key | BLAND_API_KEY |\n| Bland | bland_pathway_id | BLAND_PATHWAY_ID |\n| LiveKit | livekit_api_key | LIVEKIT_API_KEY |\n| LiveKit | livekit_api_secret | LIVEKIT_API_SECRET |\n| LiveKit | livekit_url | LIVEKIT_URL |\n| Retell | retell_api_key | RETELL_API_KEY |\n| Retell | retell_agent_id | RETELL_AGENT_ID |\n| ElevenLabs | elevenlabs_api_key | ELEVENLABS_API_KEY |\n| ElevenLabs | elevenlabs_agent_id | ELEVENLABS_AGENT_ID |\n\nThe CLI strips raw platform secrets before `/runs/submit`. Platform-direct runs go through a saved `platform_connection_id` automatically. BYO agent runs (`start_command` and `agent_url`) do not.\n</credential_resolution>\n\n<config_adapter_rules>\nWebSocket (local agent via relay):\n{\n "connection": {\n "adapter": "websocket",\n "start_command": "npm run start",\n "health_endpoint": "/health",\n "agent_port": 3001\n }\n}\n\nWebSocket (hosted custom agent):\n{\n "connection": {\n "adapter": "websocket",\n "agent_url": "https://my-agent.fly.dev"\n }\n}\n\nRetell:\n{\n "connection": {\n "adapter": "retell",\n "platform": { "provider": "retell" }\n }\n}\nCredentials auto-resolve from `.env.local`, `.env`, or shell env: RETELL_API_KEY, RETELL_AGENT_ID. Only add retell_api_key/retell_agent_id to the JSON if those env vars are not already available.\n\nBland:\n{\n "connection": {\n "adapter": "bland",\n "platform": { "provider": "bland" }\n }\n}\nCredentials auto-resolve from `.env.local`, `.env`, or shell env: BLAND_API_KEY, BLAND_PATHWAY_ID. Only add bland_api_key/bland_pathway_id to the JSON if those env vars are not already available.\nNote: All agent config (voice, model, tools, etc.) is set on the pathway itself, not in Vent config.\n\nVapi:\n{\n "connection": {\n "adapter": "vapi",\n "platform": { "provider": "vapi" }\n }\n}\nCredentials auto-resolve from `.env.local`, `.env`, or shell env: VAPI_API_KEY, VAPI_ASSISTANT_ID. Only add vapi_api_key/vapi_assistant_id to the JSON if those env vars are not already available.\nmax_concurrency for Vapi: Starter=10, Growth=50, Enterprise=100+. Ask the user which tier they\'re on. If unknown, default to 10.\nAll assistant config (voice, model, transcriber, interruption settings, etc.) is set on the Vapi assistant itself, not in Vent config.\n\nElevenLabs:\n{\n "connection": {\n "adapter": "elevenlabs",\n "platform": { "provider": "elevenlabs" }\n }\n}\nCredentials auto-resolve from `.env.local`, `.env`, or shell env: ELEVENLABS_API_KEY, ELEVENLABS_AGENT_ID. Only add elevenlabs_api_key/elevenlabs_agent_id to the JSON if those env vars are not already available.\n\nLiveKit:\n{\n "connection": {\n "adapter": "livekit",\n "platform": {\n "provider": "livekit",\n "livekit_agent_name": "my-agent",\n "max_concurrency": 5\n }\n }\n}\nCredentials auto-resolve from `.env.local`, `.env`, or shell env: LIVEKIT_API_KEY, LIVEKIT_API_SECRET, LIVEKIT_URL. Only add these to the JSON if those env vars are not already available.\nlivekit_agent_name is optional -- only needed if the agent registers with an explicit agent_name in WorkerOptions. Omit for automatic dispatch.\nThe livekit adapter requires the LiveKit Agents SDK. It depends on Agents SDK signals (lk.agent.state, lk.transcription) for readiness detection, turn timing, and component latency. Custom LiveKit participants not using the Agents SDK should use the websocket adapter with a relay instead.\nmax_concurrency: Free/Build=5, Ship=20, Scale=50+. Ask the user which tier they\'re on. If unknown, default to 5.\n</config_adapter_rules>\n</config_connection>\n\n\n<call_config>\n<tool_call_capture>\nvapi/retell/elevenlabs/bland: automatic via platform API (no user code needed).\nWebSocket/WebRTC: user\'s agent must emit tool calls:\n WebSocket \u2014 JSON text frame: {"type":"tool_call","name":"...","arguments":{},"result":{},"successful":true,"duration_ms":150}\n WebRTC/LiveKit \u2014 publishData() or sendText() on topic "vent:tool-calls". Same JSON.\n</tool_call_capture>\n\n<component_timing>\nPlatform adapters (vapi/retell/elevenlabs/bland/livekit) get STT/LLM/TTS breakdown automatically.\nWebSocket agents can opt in by sending a JSON text frame after each agent turn:\n {"type":"vent:timing","stt_ms":120,"llm_ms":450,"tts_ms":80}\nAll fields optional. Send one per agent response. Without this, component_latency is omitted from results.\nWhen modifying a WebSocket agent\'s code, add this text frame after TTS completes to enable component latency reporting.\n</component_timing>\n\n<metadata_capture>\nWebSocket and LiveKit/WebRTC agents can also emit richer observability metadata:\n {"type":"vent:session","platform":"custom","provider_call_id":"call_123","provider_session_id":"session_abc"}\n {"type":"vent:call-metadata","call_metadata":{"recording_url":"https://...","cost_usd":0.12,"provider_debug_urls":{"log":"https://..."}}}\n {"type":"vent:debug-url","label":"trace","url":"https://..."}\n {"type":"vent:session-report","report":{"room_name":"room-123","events":[...],"metrics":[...]}}\n {"type":"vent:metrics","event":"metrics_collected","metric_type":"eou","metrics":{"speechId":"speech_123","endOfUtteranceDelayMs":420}}\n {"type":"vent:function-tools-executed","event":"function_tools_executed","hasAgentHandoff":true,"tool_calls":[{"name":"lookup_customer","arguments":{"id":"123"}}]}\n {"type":"vent:conversation-item","event":"conversation_item_added","item":{"type":"agent_handoff","newAgentId":"billing-agent"}}\n {"type":"vent:session-usage","usage":{"llm":{"promptTokens":123,"completionTokens":45}}}\nTransport:\n WebSocket \u2014 send JSON text frames with these payloads. WebSocket agents may also emit {"type":"vent:transcript","role":"caller","text":"I need to reschedule","turn_index":0} when they have native transcript text.\n WebRTC/LiveKit \u2014 publishData() or sendText() on the matching "vent:*" topic, e.g. topic "vent:call-metadata" with the JSON body above.\nFor LiveKit, transcript and timing stay authoritative from native room signals (`lk.transcription`, `lk.agent.state`). Do not emit `vent:transcript` from LiveKit agents.\nFor LiveKit Node agents, prefer the first-party helper instead of manual forwarding:\n```ts\nimport { instrumentLiveKitAgent } from "@vent-hq/livekit";\n\nconst vent = instrumentLiveKitAgent({\n ctx,\n session,\n});\n```\nThis helper must run inside the LiveKit agent runtime with the existing Agents SDK `session` and `ctx` objects. It is the Vent integration layer on top of the Agents SDK, not a replacement for it.\nInstall it with `npm install @vent-hq/livekit` after the package is published to the `vent-hq` npm org. Until then, use the workspace package from this repo.\nThis automatically publishes only the in-agent-only LiveKit signals: `metrics_collected`, `function_tools_executed`, `conversation_item_added`, and a session report on close/shutdown.\nDo not use it to mirror room-visible signals like transcript, agent state timing, or room/session ID \u2014 Vent already gets those from LiveKit itself.\nFor LiveKit inside-agent forwarding, prefer sending the raw LiveKit event payloads on:\n `vent:metrics`\n `vent:function-tools-executed`\n `vent:conversation-item`\n `vent:session-usage`\nUse these metadata events when the agent runtime already knows native IDs, recordings, warnings, debug links, session reports, metrics events, or handoff artifacts. This gives custom and LiveKit agents parity with hosted adapters without needing a LiveKit Cloud connector.\n</metadata_capture>\n\n<config_call>\nEach call in the `calls` map. The key is the call name (e.g. `"reschedule-appointment"`, not `"call-1"`).\n{\n "caller_prompt": "required \u2014 caller persona and behavior (name -> goal -> emotion -> conditional behavior)",\n "max_turns": "required \u2014 default 6",\n "silence_threshold_ms": "optional \u2014 end-of-turn threshold ms (default 800, 200-10000). 800-1200 FAQ, 2000-3000 tool calls, 3000-5000 complex reasoning.",\n "persona": "optional \u2014 caller behavior controls",\n {\n "pace": "slow | normal | fast",\n "clarity": "clear | vague | rambling",\n "disfluencies": "true | false",\n "cooperation": "cooperative | reluctant | hostile",\n "emotion": "neutral | cheerful | confused | frustrated | skeptical | rushed",\n "interruption_style": "optional preplanned interrupt tendency: low | high. If set, Vent may pre-plan a caller cut-in before the agent turn starts. It does NOT make a mid-turn interrupt LLM call.",\n "memory": "reliable | unreliable",\n "intent_clarity": "clear | indirect | vague",\n "confirmation_style": "explicit | vague"\n },\n "audio_actions": "optional \u2014 per-turn audio stress calls",\n [\n { "action": "interrupt", "at_turn": "N", "prompt": "what caller says" },\n { "action": "inject_noise", "at_turn": "N", "noise_type": "babble | white | pink", "snr_db": "0-40" },\n { "action": "split_sentence", "at_turn": "N", "split": { "part_a": "...", "part_b": "...", "pause_ms": "500-5000" } },\n { "action": "noise_on_caller", "at_turn": "N" }\n ],\n "prosody": "optional \u2014 Hume emotion analysis (default false)",\n "caller_audio": "optional \u2014 omit for clean audio",\n {\n "noise": { "type": "babble | white | pink", "snr_db": "0-40" },\n "speed": "0.5-2.0 (1.0 = normal)",\n "speakerphone": "true | false",\n "mic_distance": "close | normal | far",\n "clarity": "0.0-1.0 (1.0 = perfect)",\n "accent": "american | british | australian | filipino | spanish_mexican | spanish_peninsular | spanish_colombian | spanish_argentine | german | french | italian | dutch | japanese",\n "packet_loss": "0.0-0.3",\n "jitter_ms": "0-100"\n },\n "language": "optional \u2014 ISO 639-1: en, es, fr, de, it, nl, ja"\n}\n\nInterruption rules:\n- `audio_actions: [{ "action": "interrupt", ... }]` is the deterministic per-turn interrupt test. Prefer this for evaluation.\n- `persona.interruption_style` is only a preplanned caller tendency. If used, Vent decides before the agent response starts whether this turn may cut in.\n- Vent no longer pauses mid-turn to ask a second LLM whether to interrupt.\n- For production-faithful testing, prefer explicit `audio_actions.interrupt` over persona interruption.\n\n<examples_call>\n<simple_suite_example>\n{\n "connection": {\n "adapter": "vapi",\n "platform": { "provider": "vapi" }\n },\n "calls": {\n "reschedule-appointment": {\n "caller_prompt": "You are Maria, calling to reschedule her dentist appointment from Thursday to next Tuesday. She\'s in a hurry and wants this done quickly.",\n "max_turns": 8\n },\n "cancel-appointment": {\n "caller_prompt": "You are Tom, calling to cancel his appointment for Friday. He\'s calm and just wants confirmation.",\n "max_turns": 6\n }\n }\n}\n</simple_suite_example>\n\n<advanced_call_example>\nA call entry with advanced options (persona, audio actions, prosody):\n{\n "noisy-interruption-booking": {\n "caller_prompt": "You are James, an impatient customer calling from a loud coffee shop to book a plumber for tomorrow morning. You interrupt the agent mid-sentence when they start listing availability \u2014 you just want the earliest slot.",\n "max_turns": 12,\n "persona": { "pace": "fast", "cooperation": "reluctant", "emotion": "rushed", "interruption_style": "high" },\n "audio_actions": [\n { "action": "interrupt", "at_turn": 3, "prompt": "Just give me the earliest one!" },\n { "action": "inject_noise", "at_turn": 1, "noise_type": "babble", "snr_db": 15 }\n ],\n "caller_audio": { "noise": { "type": "babble", "snr_db": 20 }, "speed": 1.3 },\n "prosody": true\n }\n}\n</advanced_call_example>\n\n</examples_call>\n</config_call>\n\n<output_conversation_test>\n{\n "name": "sarah-hotel-booking",\n "status": "completed",\n "caller_prompt": "You are Sarah, calling to book...",\n "duration_ms": 45200,\n "error": null,\n "transcript": [\n { "role": "caller", "text": "Hi, I\'d like to book..." },\n { "role": "agent", "text": "Sure! What date?", "ttfb_ms": 650, "ttfw_ms": 780, "audio_duration_ms": 2400 },\n { "role": "agent", "text": "Let me check avail\u2014", "ttfb_ms": 540, "ttfw_ms": 620, "audio_duration_ms": 1400, "interrupted": true },\n { "role": "caller", "text": "Just the earliest slot please", "audio_duration_ms": 900, "is_interruption": true },\n { "role": "agent", "text": "Sure, the earliest is 9 AM tomorrow.", "ttfb_ms": 220, "ttfw_ms": 260, "audio_duration_ms": 2100 }\n ],\n "latency": {\n "response_time_ms": 890, "response_time_source": "ttfw",\n "p50_response_time_ms": 850, "p90_response_time_ms": 1100, "p95_response_time_ms": 1400, "p99_response_time_ms": 1550,\n "first_response_time_ms": 1950,\n "mean_ttfw_ms": 890, "p50_ttfw_ms": 850, "p95_ttfw_ms": 1400, "p99_ttfw_ms": 1550,\n "first_turn_ttfw_ms": 1950, "total_silence_ms": 4200, "mean_turn_gap_ms": 380,\n "drift_slope_ms_per_turn": -45.2, "mean_silence_pad_ms": 128, "mouth_to_ear_est_ms": 1020\n },\n "transcript_quality": {\n "wer": 0.04,\n "hallucination_events": [\n { "error_count": 5, "reference_text": "triple five one two", "hypothesis_text": "five five five nine two" }\n ],\n "repetition_score": 0.05,\n "reprompt_count": 0,\n "filler_word_rate": 0.8,\n "words_per_minute": 148\n },\n "audio_analysis": {\n "caller_talk_time_ms": 12400,\n "agent_talk_time_ms": 28500,\n "agent_speech_ratio": 0.72,\n "talk_ratio_vad": 0.69,\n "interruption_rate": 0.25,\n "interruption_count": 1,\n "agent_overtalk_after_barge_in_ms": 280,\n "agent_interrupting_user_rate": 0.0,\n "agent_interrupting_user_count": 0,\n "missed_response_windows": 0,\n "longest_monologue_ms": 5800,\n "silence_gaps_over_2s": 1,\n "total_internal_silence_ms": 2400,\n "mean_agent_speech_segment_ms": 3450\n },\n "tool_calls": {\n "total": 2, "successful": 2, "failed": 0, "mean_latency_ms": 340,\n "names": ["check_availability", "book_appointment"],\n "observed": [{ "name": "check_availability", "arguments": { "date": "2026-03-12" }, "result": { "slots": ["09:00", "10:00"] }, "successful": true, "latency_ms": 280, "turn_index": 3 }]\n },\n "component_latency": {\n "mean_stt_ms": 120, "mean_llm_ms": 450, "mean_tts_ms": 80,\n "p95_stt_ms": 180, "p95_llm_ms": 620, "p95_tts_ms": 110,\n "mean_speech_duration_ms": 2100,\n "bottleneck": "llm"\n },\n "call_metadata": {\n "platform": "vapi",\n "cost_usd": 0.08,\n "recording_url": "https://example.com/recording",\n "ended_reason": "customer_ended_call",\n "transfers": []\n },\n "warnings": [],\n "audio_actions": [],\n "emotion": {\n "naturalness": 0.72, "mean_calmness": 0.65, "mean_confidence": 0.58, "peak_frustration": 0.08, "emotion_trajectory": "stable"\n }\n}\n\nAlways present: name, status, caller_prompt, duration_ms, error, transcript, tool_calls, warnings, audio_actions. Nullable when analysis didn\'t run: latency, transcript_quality, audio_analysis, component_latency, call_metadata, emotion (requires prosody: true), debug (requires --verbose).\n\n### Result presentation\n\nWhen you report a conversation result to the user, always include:\n\n1. **Summary** \u2014 the overall verdict and the 1-3 most important findings.\n2. **Transcript summary** \u2014 a short narrative of what happened in the call.\n3. **Recording URL** \u2014 include `call_metadata.recording_url` when present; explicitly say when it is unavailable.\n4. **Next steps** \u2014 concrete fixes, follow-up tests, or why no change is needed.\n\nUse metrics to support the summary, not as the whole answer. Do not dump raw numbers without interpretation.\n\nWhen `call_metadata.transfer_attempted` is present, explicitly say whether the transfer only appeared attempted or was mechanically verified as completed (`call_metadata.transfer_completed`). Use `call_metadata.transfers[]` to report transfer type, destination, status, and sources.\n\n### Judging guidance\n\nUse the transcript, metrics, test scenario, and relevant agent instructions/system prompt to judge:\n\n| Dimension | What to check |\n|--------|----------------|\n| **Hallucination detection** | Check whether the agent stated anything not grounded in its instructions, tools, or the conversation itself. Treat `transcript_quality.hallucination_events` only as a speech-recognition warning signal, not proof of agent hallucination. |\n| **Instruction following** | Compare the agent\'s behavior against its system prompt and the test\'s expected constraints. |\n| **Context retention** | Check whether the agent forgot or contradicted information established earlier in the call. |\n| **Semantic accuracy** | Check whether the agent correctly understood the caller\'s intent and responded to the real request. |\n| **Goal completion** | Decide whether the agent achieved what the test scenario was designed to verify. |\n| **Transfer correctness** | For transfer scenarios, judge whether transfer was appropriate, whether it completed, whether it went to the expected destination, and whether enough context was passed during the handoff. |\n\n### Interruption evaluation\n\nWhen the transcript contains `interrupted: true` / `is_interruption: true` turns, evaluate these metrics by reading the transcript:\n\n| Metric | How to evaluate | Target |\n|--------|----------------|--------|\n| **Recovery rate** | For each interrupted turn: does the post-interrupt agent response acknowledge or address the interruption? (e.g., "Sure, the earliest is 9 AM" after being cut off mid-availability-list) | >90% |\n| **Context retention** | After the interruption, does the agent remember pre-interrupt conversation state? (e.g., still knows the caller\'s name, booking details, etc.) | >95% |\n| **Agent overtalk after barge-in** | Use `audio_analysis.agent_overtalk_after_barge_in_ms` when available. Lower is better because it measures how long the agent kept speaking after the caller cut in. | <500ms acceptable |\n| **Agent interrupting user rate** | Use `audio_analysis.agent_interrupting_user_rate` and the transcript to see whether the agent starts speaking before the caller finished. | 0 ideal |\n\nReport these alongside standard metrics when interruption calls run. Flag any turn where the agent ignores the interruption, repeats itself from scratch, or loses context.\n</output_conversation_test>\n</call_config>\n\n\n## Output\n\n- **Exit codes**: 0=pass, 1=fail, 2=error\n- The `run` command outputs **complete results as pretty-printed JSON** \u2014 including full transcript, latency metrics, tool calls, and audio analysis for every call. Do NOT run a separate `vent status` command \u2014 all data is already in the output.\n\n## Vent Access Token\n\nRun `npx vent-hq login` or set `VENT_ACCESS_TOKEN` env var.\nVent provides DEEPGRAM_API_KEY and ANTHROPIC_API_KEY automatically.\n';
|
|
@@ -6768,91 +6012,26 @@ var SUITE_SCAFFOLD = JSON.stringify(
|
|
|
6768
6012
|
null,
|
|
6769
6013
|
2
|
|
6770
6014
|
);
|
|
6771
|
-
function
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
return false;
|
|
6777
|
-
}
|
|
6015
|
+
async function installClaudeCode(cwd) {
|
|
6016
|
+
const dir = path3.join(cwd, ".claude", "skills", "vent");
|
|
6017
|
+
await fs5.mkdir(dir, { recursive: true });
|
|
6018
|
+
await fs5.writeFile(path3.join(dir, "SKILL.md"), claude_code_default);
|
|
6019
|
+
printSuccess("Claude Code: .claude/skills/vent/SKILL.md", { force: true });
|
|
6778
6020
|
}
|
|
6779
|
-
function
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
if (/codex/i.test(askpass)) return "codex";
|
|
6789
|
-
if (process.env.CURSOR_CLI) return "cursor";
|
|
6790
|
-
return null;
|
|
6021
|
+
async function installCursor(cwd) {
|
|
6022
|
+
const dir = path3.join(cwd, ".cursor", "rules");
|
|
6023
|
+
await fs5.mkdir(dir, { recursive: true });
|
|
6024
|
+
await fs5.writeFile(path3.join(dir, "vent.mdc"), cursor_default);
|
|
6025
|
+
printSuccess("Cursor: .cursor/rules/vent.mdc", { force: true });
|
|
6026
|
+
}
|
|
6027
|
+
async function installCodex(cwd) {
|
|
6028
|
+
await fs5.writeFile(path3.join(cwd, "AGENTS.md"), codex_default);
|
|
6029
|
+
printSuccess("Codex: AGENTS.md", { force: true });
|
|
6791
6030
|
}
|
|
6792
|
-
var home = homedir2();
|
|
6793
|
-
var allEditors = [
|
|
6794
|
-
{
|
|
6795
|
-
id: "claude-code",
|
|
6796
|
-
name: "Claude Code",
|
|
6797
|
-
detect: () => existsSync(path3.join(home, ".claude")) || findBinary("claude"),
|
|
6798
|
-
install: async (cwd) => {
|
|
6799
|
-
const dir = path3.join(cwd, ".claude", "skills", "vent");
|
|
6800
|
-
await fs5.mkdir(dir, { recursive: true });
|
|
6801
|
-
await fs5.writeFile(path3.join(dir, "SKILL.md"), claude_code_default);
|
|
6802
|
-
printSuccess("Claude Code: .claude/skills/vent/SKILL.md", { force: true });
|
|
6803
|
-
}
|
|
6804
|
-
},
|
|
6805
|
-
{
|
|
6806
|
-
id: "cursor",
|
|
6807
|
-
name: "Cursor",
|
|
6808
|
-
detect: () => existsSync(path3.join(home, ".cursor")),
|
|
6809
|
-
install: async (cwd) => {
|
|
6810
|
-
const dir = path3.join(cwd, ".cursor", "rules");
|
|
6811
|
-
await fs5.mkdir(dir, { recursive: true });
|
|
6812
|
-
await fs5.writeFile(path3.join(dir, "vent.mdc"), cursor_default);
|
|
6813
|
-
printSuccess("Cursor: .cursor/rules/vent.mdc", { force: true });
|
|
6814
|
-
}
|
|
6815
|
-
},
|
|
6816
|
-
{
|
|
6817
|
-
id: "codex",
|
|
6818
|
-
name: "Codex",
|
|
6819
|
-
detect: () => existsSync(path3.join(home, ".codex")) || findBinary("codex"),
|
|
6820
|
-
install: async (cwd) => {
|
|
6821
|
-
await fs5.writeFile(path3.join(cwd, "AGENTS.md"), codex_default);
|
|
6822
|
-
printSuccess("Codex: AGENTS.md", { force: true });
|
|
6823
|
-
}
|
|
6824
|
-
}
|
|
6825
|
-
];
|
|
6826
6031
|
async function installSkillsAndScaffold(cwd) {
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
const result = await Lt2({
|
|
6831
|
-
message: "Which coding agent do you use?",
|
|
6832
|
-
options: allEditors.map((e) => ({
|
|
6833
|
-
value: e.id,
|
|
6834
|
-
label: e.name,
|
|
6835
|
-
hint: detectedIds.includes(e.id) ? void 0 : "not detected"
|
|
6836
|
-
})),
|
|
6837
|
-
initialValues: detectedIds
|
|
6838
|
-
});
|
|
6839
|
-
if (Ct(result)) {
|
|
6840
|
-
printInfo("Cancelled.", { force: true });
|
|
6841
|
-
return;
|
|
6842
|
-
}
|
|
6843
|
-
selected = result;
|
|
6844
|
-
} else {
|
|
6845
|
-
const activeId = detectActiveEditor();
|
|
6846
|
-
if (activeId) {
|
|
6847
|
-
selected = [activeId];
|
|
6848
|
-
} else {
|
|
6849
|
-
selected = detectedIds.length > 0 ? detectedIds : allEditors.map((e) => e.id);
|
|
6850
|
-
}
|
|
6851
|
-
}
|
|
6852
|
-
for (const id of selected) {
|
|
6853
|
-
const editor = allEditors.find((e) => e.id === id);
|
|
6854
|
-
if (editor) await editor.install(cwd);
|
|
6855
|
-
}
|
|
6032
|
+
await installClaudeCode(cwd);
|
|
6033
|
+
await installCursor(cwd);
|
|
6034
|
+
await installCodex(cwd);
|
|
6856
6035
|
const suitePath = path3.join(cwd, ".vent", "suite.json");
|
|
6857
6036
|
let suiteExists = false;
|
|
6858
6037
|
try {
|
|
@@ -7024,7 +6203,7 @@ async function main() {
|
|
|
7024
6203
|
return 0;
|
|
7025
6204
|
}
|
|
7026
6205
|
if (command === "--version" || command === "-v") {
|
|
7027
|
-
const pkg = await import("./package-
|
|
6206
|
+
const pkg = await import("./package-ZDKB63DZ.mjs");
|
|
7028
6207
|
console.log(`vent-hq ${pkg.default.version}`);
|
|
7029
6208
|
return 0;
|
|
7030
6209
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import "./chunk-XYDL7GY6.mjs";
|
|
3
|
+
|
|
4
|
+
// package.json
|
|
5
|
+
var package_default = {
|
|
6
|
+
name: "vent-hq",
|
|
7
|
+
version: "0.9.4",
|
|
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://venthq.dev",
|
|
38
|
+
dependencies: {
|
|
39
|
+
ws: "^8.18.0"
|
|
40
|
+
},
|
|
41
|
+
devDependencies: {
|
|
42
|
+
"@types/ws": "catalog:",
|
|
43
|
+
"@vent/relay-client": "workspace:*",
|
|
44
|
+
"@vent/shared": "workspace:*",
|
|
45
|
+
esbuild: "catalog:"
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
package_default as default
|
|
50
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vent-hq",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vent CLI — CI/CD for voice AI agents",
|
|
6
6
|
"bin": {
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://venthq.dev",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@clack/prompts": "^1.1.0",
|
|
36
35
|
"ws": "^8.18.0"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|