@exodus/xqa 4.0.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/xqa.cjs +140 -228
- package/package.json +5 -5
package/dist/xqa.cjs
CHANGED
|
@@ -31961,7 +31961,7 @@ agents:
|
|
|
31961
31961
|
# App under test build environment. 'dev' disables reporting debug overlays as bugs.
|
|
31962
31962
|
buildEnv: dev
|
|
31963
31963
|
capabilities:
|
|
31964
|
-
# Record the simulator screen as MP4
|
|
31964
|
+
# Record the simulator screen as HEVC MP4 via simctl (no inline ffmpeg pass). Off by default \u2014 CI-heavy.
|
|
31965
31965
|
videoRecording: false
|
|
31966
31966
|
# Register the view_ui MCP tool so the explorer can inspect the accessibility tree. On by default; disable to reduce tool surface.
|
|
31967
31967
|
viewUiServer: true
|
|
@@ -45971,19 +45971,6 @@ function initConfig(options2) {
|
|
|
45971
45971
|
});
|
|
45972
45972
|
}
|
|
45973
45973
|
|
|
45974
|
-
// ../../packages/config/dist/shell/legacy-env-detector.js
|
|
45975
|
-
var LEGACY_ENV_VARS = [
|
|
45976
|
-
"QA_RUN_ID",
|
|
45977
|
-
"QA_EXPLORE_TIMEOUT_SECONDS",
|
|
45978
|
-
"QA_BUILD_ENV",
|
|
45979
|
-
"QA_DISMISSALS_PATH",
|
|
45980
|
-
"XQA_SUITES_DIR",
|
|
45981
|
-
"XQA_CWD"
|
|
45982
|
-
];
|
|
45983
|
-
function detectLegacyEnv(env3) {
|
|
45984
|
-
return LEGACY_ENV_VARS.filter((name) => env3[name] !== void 0);
|
|
45985
|
-
}
|
|
45986
|
-
|
|
45987
45974
|
// ../../packages/config/dist/shell/loader.js
|
|
45988
45975
|
var import_node_fs = require("node:fs");
|
|
45989
45976
|
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
@@ -46027,19 +46014,11 @@ function loadConfigSync(options2) {
|
|
|
46027
46014
|
if (readResult.isErr()) {
|
|
46028
46015
|
return (0, import_neverthrow4.err)(readResult.error);
|
|
46029
46016
|
}
|
|
46030
|
-
|
|
46017
|
+
return parseAndValidateSync({
|
|
46031
46018
|
schema: options2.schema,
|
|
46032
46019
|
text: readResult.value,
|
|
46033
46020
|
filePath
|
|
46034
46021
|
});
|
|
46035
|
-
if (validated.isErr()) {
|
|
46036
|
-
return (0, import_neverthrow4.err)(validated.error);
|
|
46037
|
-
}
|
|
46038
|
-
const legacy = detectLegacyEnv(options2.env);
|
|
46039
|
-
if (legacy.length > 0) {
|
|
46040
|
-
return (0, import_neverthrow4.err)({ type: "LEGACY_ENV_DETECTED", vars: [...legacy] });
|
|
46041
|
-
}
|
|
46042
|
-
return (0, import_neverthrow4.ok)(validated.value);
|
|
46043
46022
|
}
|
|
46044
46023
|
|
|
46045
46024
|
// ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/esm.mjs
|
|
@@ -46063,12 +46042,6 @@ var {
|
|
|
46063
46042
|
var import_neverthrow96 = __toESM(require_index_cjs(), 1);
|
|
46064
46043
|
|
|
46065
46044
|
// src/config/error-formatter.ts
|
|
46066
|
-
function formatLegacyVariables(variables) {
|
|
46067
|
-
const lines = variables.map((name) => ` ${name}`).join("\n");
|
|
46068
|
-
return `Legacy environment variables detected:
|
|
46069
|
-
${lines}
|
|
46070
|
-
Move these values into .xqa/config.yaml.`;
|
|
46071
|
-
}
|
|
46072
46045
|
function formatIssues(issues) {
|
|
46073
46046
|
const lines = issues.map((issue2) => ` ${issue2.path.join(".")}: ${issue2.message}`).join("\n");
|
|
46074
46047
|
return `Config validation failed:
|
|
@@ -46095,9 +46068,6 @@ function formatConfigError(error48) {
|
|
|
46095
46068
|
return `Config file not found: ${error48.path}
|
|
46096
46069
|
Run \`xqa init\` to generate it.`;
|
|
46097
46070
|
}
|
|
46098
|
-
case "LEGACY_ENV_DETECTED": {
|
|
46099
|
-
return formatLegacyVariables(error48.vars);
|
|
46100
|
-
}
|
|
46101
46071
|
case "CONFIG_SCHEMA_INVALID": {
|
|
46102
46072
|
return formatIssues(error48.issues);
|
|
46103
46073
|
}
|
|
@@ -67636,7 +67606,7 @@ var analyserConfigSchema = agentBaseConfigSchema.extend({ enabled: external_expo
|
|
|
67636
67606
|
|
|
67637
67607
|
// ../../packages/pipeline/dist/index.js
|
|
67638
67608
|
var import_neverthrow40 = __toESM(require_index_cjs(), 1);
|
|
67639
|
-
var
|
|
67609
|
+
var import_promises19 = require("node:timers/promises");
|
|
67640
67610
|
|
|
67641
67611
|
// ../../agents/consolidator/dist/index.js
|
|
67642
67612
|
var import_neverthrow19 = __toESM(require_index_cjs(), 1);
|
|
@@ -73783,7 +73753,7 @@ var consolidatorConfigSchema = agentBaseConfigSchema.extend({ enabled: external_
|
|
|
73783
73753
|
// ../../packages/pipeline/dist/index.js
|
|
73784
73754
|
var import_neverthrow41 = __toESM(require_index_cjs(), 1);
|
|
73785
73755
|
var import_neverthrow42 = __toESM(require_index_cjs(), 1);
|
|
73786
|
-
var
|
|
73756
|
+
var import_promises20 = require("node:timers/promises");
|
|
73787
73757
|
|
|
73788
73758
|
// ../../agents/explorer/dist/index.js
|
|
73789
73759
|
var import_neverthrow22 = __toESM(require_index_cjs(), 1);
|
|
@@ -73800,16 +73770,14 @@ var import_neverthrow26 = __toESM(require_index_cjs(), 1);
|
|
|
73800
73770
|
var import_node_child_process3 = require("node:child_process");
|
|
73801
73771
|
var import_promises15 = require("node:fs/promises");
|
|
73802
73772
|
var import_neverthrow27 = __toESM(require_index_cjs(), 1);
|
|
73803
|
-
var import_promises16 = require("node:fs/promises");
|
|
73804
|
-
var import_node_path10 = __toESM(require("node:path"), 1);
|
|
73805
73773
|
var import_neverthrow28 = __toESM(require_index_cjs(), 1);
|
|
73806
73774
|
var import_node_child_process4 = require("node:child_process");
|
|
73807
73775
|
var import_node_fs2 = require("node:fs");
|
|
73808
|
-
var
|
|
73776
|
+
var import_node_path10 = __toESM(require("node:path"), 1);
|
|
73809
73777
|
var import_neverthrow29 = __toESM(require_index_cjs(), 1);
|
|
73810
73778
|
var import_neverthrow30 = __toESM(require_index_cjs(), 1);
|
|
73811
|
-
var
|
|
73812
|
-
var
|
|
73779
|
+
var import_promises16 = require("node:fs/promises");
|
|
73780
|
+
var import_node_path11 = __toESM(require("node:path"), 1);
|
|
73813
73781
|
var import_neverthrow31 = __toESM(require_index_cjs(), 1);
|
|
73814
73782
|
var INTERRUPT_DRAIN_TIMEOUT_MS = 1e4;
|
|
73815
73783
|
async function interruptOrTimeout(queryRunner) {
|
|
@@ -74529,14 +74497,13 @@ function runQuery(prompt, config2) {
|
|
|
74529
74497
|
function collectAgentOutput(prompt, config2) {
|
|
74530
74498
|
return runQuery(prompt, config2).mapErr((cause) => ({ type: "QUERY_FAILED", cause }));
|
|
74531
74499
|
}
|
|
74532
|
-
var VIDEO_OUTPUT_FPS = 10;
|
|
74533
74500
|
function spawnRecorder(outputPath) {
|
|
74534
74501
|
const safeMkdirSync = (0, import_neverthrow29.fromThrowable)(import_node_fs2.mkdirSync, (cause) => cause);
|
|
74535
74502
|
const safeSpawn2 = (0, import_neverthrow29.fromThrowable)(
|
|
74536
74503
|
(command, arguments_) => (0, import_node_child_process4.spawn)(command, arguments_),
|
|
74537
74504
|
(cause) => cause
|
|
74538
74505
|
);
|
|
74539
|
-
const mkdirResult = safeMkdirSync(
|
|
74506
|
+
const mkdirResult = safeMkdirSync(import_node_path10.default.dirname(outputPath), { recursive: true });
|
|
74540
74507
|
if (mkdirResult.isErr()) {
|
|
74541
74508
|
return mkdirResult.error;
|
|
74542
74509
|
}
|
|
@@ -74545,7 +74512,7 @@ function spawnRecorder(outputPath) {
|
|
|
74545
74512
|
"io",
|
|
74546
74513
|
"booted",
|
|
74547
74514
|
"recordVideo",
|
|
74548
|
-
"--codec=
|
|
74515
|
+
"--codec=hevc",
|
|
74549
74516
|
"--mask=ignored",
|
|
74550
74517
|
"--force",
|
|
74551
74518
|
outputPath
|
|
@@ -74582,17 +74549,6 @@ function waitForRecordingStart(proc) {
|
|
|
74582
74549
|
(cause) => ({ type: "SPAWN_FAILED", cause })
|
|
74583
74550
|
);
|
|
74584
74551
|
}
|
|
74585
|
-
async function runFfmpeg(arguments_) {
|
|
74586
|
-
const { promise: promise2, resolve, reject } = Promise.withResolvers();
|
|
74587
|
-
(0, import_node_child_process4.execFile)("ffmpeg", [...arguments_], (error48) => {
|
|
74588
|
-
if (error48) {
|
|
74589
|
-
reject(error48);
|
|
74590
|
-
} else {
|
|
74591
|
-
resolve(true);
|
|
74592
|
-
}
|
|
74593
|
-
});
|
|
74594
|
-
await promise2;
|
|
74595
|
-
}
|
|
74596
74552
|
function startRecording(outputPath) {
|
|
74597
74553
|
const procOrError = spawnRecorder(outputPath);
|
|
74598
74554
|
if (procOrError instanceof Error) {
|
|
@@ -74616,72 +74572,29 @@ function stopRecording(handle) {
|
|
|
74616
74572
|
(cause) => ({ type: "STOP_FAILED", cause })
|
|
74617
74573
|
);
|
|
74618
74574
|
}
|
|
74619
|
-
function reencodeVideo({
|
|
74620
|
-
inputPath,
|
|
74621
|
-
outputPath,
|
|
74622
|
-
fps
|
|
74623
|
-
}) {
|
|
74624
|
-
const safeRunFfmpeg = (0, import_neverthrow29.fromAsyncThrowable)(
|
|
74625
|
-
runFfmpeg,
|
|
74626
|
-
(cause) => ({ type: "REENCODE_FAILED", cause })
|
|
74627
|
-
);
|
|
74628
|
-
return safeRunFfmpeg([
|
|
74629
|
-
"-y",
|
|
74630
|
-
"-fflags",
|
|
74631
|
-
"+genpts",
|
|
74632
|
-
"-i",
|
|
74633
|
-
inputPath,
|
|
74634
|
-
"-vf",
|
|
74635
|
-
`fps=${String(fps)}`,
|
|
74636
|
-
"-fps_mode",
|
|
74637
|
-
"cfr",
|
|
74638
|
-
"-c:v",
|
|
74639
|
-
"h264_videotoolbox",
|
|
74640
|
-
"-an",
|
|
74641
|
-
outputPath
|
|
74642
|
-
]).map(() => outputPath);
|
|
74643
|
-
}
|
|
74644
74575
|
var toRecordingError = (cause) => ({
|
|
74645
74576
|
type: "RECORDING_FAILED",
|
|
74646
74577
|
cause
|
|
74647
74578
|
});
|
|
74648
|
-
function rawPathFor(videoPath) {
|
|
74649
|
-
const extension = import_node_path10.default.extname(videoPath);
|
|
74650
|
-
const base = extension.length > 0 ? videoPath.slice(0, -extension.length) : videoPath;
|
|
74651
|
-
return `${base}.raw.mov`;
|
|
74652
|
-
}
|
|
74653
|
-
var safeUnlink = (0, import_neverthrow28.fromAsyncThrowable)(
|
|
74654
|
-
import_promises16.unlink,
|
|
74655
|
-
(cause) => ({ type: "REENCODE_FAILED", cause })
|
|
74656
|
-
);
|
|
74657
|
-
function tryUnlink(target) {
|
|
74658
|
-
return safeUnlink(target).map(() => true).orElse(() => (0, import_neverthrow28.okAsync)(true));
|
|
74659
|
-
}
|
|
74660
|
-
function finalizeVideo(rawPath, videoPath) {
|
|
74661
|
-
return reencodeVideo({ inputPath: rawPath, outputPath: videoPath, fps: VIDEO_OUTPUT_FPS }).mapErr(toRecordingError).andThen(() => tryUnlink(rawPath)).map(() => true);
|
|
74662
|
-
}
|
|
74663
74579
|
function stopAndPropagate(handle, originalError) {
|
|
74664
74580
|
return stopRecording(handle).mapErr(toRecordingError).andThen(() => (0, import_neverthrow28.errAsync)(originalError)).orElse(() => (0, import_neverthrow28.errAsync)(originalError));
|
|
74665
74581
|
}
|
|
74666
74582
|
function runWithRecording({
|
|
74667
74583
|
handle,
|
|
74668
|
-
rawPath,
|
|
74669
|
-
videoPath,
|
|
74670
74584
|
collectOutput
|
|
74671
74585
|
}) {
|
|
74672
74586
|
return collectOutput().orElse((error48) => stopAndPropagate(handle, error48)).andThen(
|
|
74673
74587
|
(result) => stopRecording(handle).mapErr(toRecordingError).map(() => result)
|
|
74674
|
-
)
|
|
74588
|
+
);
|
|
74675
74589
|
}
|
|
74676
74590
|
function startAndRun(params) {
|
|
74677
74591
|
const { videoPath, signal, collectOutput } = params;
|
|
74678
|
-
|
|
74679
|
-
return startRecording(rawPath).mapErr(toRecordingError).andThen((handle) => {
|
|
74592
|
+
return startRecording(videoPath).mapErr(toRecordingError).andThen((handle) => {
|
|
74680
74593
|
const onAbort = () => {
|
|
74681
74594
|
void stopRecording(handle).unwrapOr(null);
|
|
74682
74595
|
};
|
|
74683
74596
|
signal?.addEventListener("abort", onAbort, { once: true });
|
|
74684
|
-
return runWithRecording({ handle,
|
|
74597
|
+
return runWithRecording({ handle, collectOutput }).map((result) => {
|
|
74685
74598
|
signal?.removeEventListener("abort", onAbort);
|
|
74686
74599
|
return result;
|
|
74687
74600
|
}).mapErr((error48) => {
|
|
@@ -75168,8 +75081,8 @@ function direntToSpecEntry(directory, entry) {
|
|
|
75168
75081
|
if (entry.isFile() && entry.name.endsWith(".md")) {
|
|
75169
75082
|
return [
|
|
75170
75083
|
{
|
|
75171
|
-
path:
|
|
75172
|
-
name:
|
|
75084
|
+
path: import_node_path11.default.join(directory, entry.name),
|
|
75085
|
+
name: import_node_path11.default.basename(entry.name, import_node_path11.default.extname(entry.name)),
|
|
75173
75086
|
required: true
|
|
75174
75087
|
}
|
|
75175
75088
|
];
|
|
@@ -75177,7 +75090,7 @@ function direntToSpecEntry(directory, entry) {
|
|
|
75177
75090
|
if (entry.isDirectory()) {
|
|
75178
75091
|
return [
|
|
75179
75092
|
{
|
|
75180
|
-
path:
|
|
75093
|
+
path: import_node_path11.default.join(directory, entry.name, "spec.md"),
|
|
75181
75094
|
name: entry.name,
|
|
75182
75095
|
required: false
|
|
75183
75096
|
}
|
|
@@ -75187,7 +75100,7 @@ function direntToSpecEntry(directory, entry) {
|
|
|
75187
75100
|
}
|
|
75188
75101
|
function scanDirectory(directory) {
|
|
75189
75102
|
const safeReaddir5 = (0, import_neverthrow31.fromAsyncThrowable)(
|
|
75190
|
-
async () => (0,
|
|
75103
|
+
async () => (0, import_promises16.readdir)(directory, { withFileTypes: true }),
|
|
75191
75104
|
(cause) => ({ type: "DIR_READ_FAILED", dir: directory, cause })
|
|
75192
75105
|
);
|
|
75193
75106
|
return safeReaddir5().orElse((error48) => isNotFound(error48.cause) ? (0, import_neverthrow31.okAsync)([]) : (0, import_neverthrow31.errAsync)(error48)).map(
|
|
@@ -75201,7 +75114,7 @@ function readEntries(entries) {
|
|
|
75201
75114
|
}
|
|
75202
75115
|
function readEntry(entry) {
|
|
75203
75116
|
const safeReadFile7 = (0, import_neverthrow31.fromAsyncThrowable)(
|
|
75204
|
-
async () => (0,
|
|
75117
|
+
async () => (0, import_promises16.readFile)(entry.path, "utf8"),
|
|
75205
75118
|
(cause) => ({ type: "FILE_READ_FAILED", path: entry.path, cause })
|
|
75206
75119
|
);
|
|
75207
75120
|
return safeReadFile7().map((content) => [{ name: entry.name, content }]).orElse((error48) => entry.required ? (0, import_neverthrow31.errAsync)(error48) : (0, import_neverthrow31.okAsync)([]));
|
|
@@ -75212,7 +75125,7 @@ function specNameFromPath(filePath) {
|
|
|
75212
75125
|
if (fileName2 === "spec.md" && parts.length >= 2) {
|
|
75213
75126
|
return parts.at(-2) ?? fileName2;
|
|
75214
75127
|
}
|
|
75215
|
-
return
|
|
75128
|
+
return import_node_path11.default.basename(fileName2, import_node_path11.default.extname(fileName2));
|
|
75216
75129
|
}
|
|
75217
75130
|
function filterByNames(specs, specNames) {
|
|
75218
75131
|
if (!specNames || specNames.length === 0) {
|
|
@@ -75221,7 +75134,7 @@ function filterByNames(specs, specNames) {
|
|
|
75221
75134
|
return specs.filter((spec) => specNames.includes(spec.name));
|
|
75222
75135
|
}
|
|
75223
75136
|
function resolveSpecs(config2, repoRoot = process.cwd()) {
|
|
75224
|
-
const source = config2.specFiles && config2.specFiles.length > 0 ? loadFromFiles(config2.specFiles) : loadFromDirectory(
|
|
75137
|
+
const source = config2.specFiles && config2.specFiles.length > 0 ? loadFromFiles(config2.specFiles) : loadFromDirectory(import_node_path11.default.join(repoRoot, "openspec", "specs"));
|
|
75225
75138
|
return source.map((specs) => filterByNames(specs, config2.specNames));
|
|
75226
75139
|
}
|
|
75227
75140
|
var ISO_DATE_LENGTH = 10;
|
|
@@ -75356,7 +75269,7 @@ var import_neverthrow43 = __toESM(require_index_cjs(), 1);
|
|
|
75356
75269
|
|
|
75357
75270
|
// ../../agents/inspector/dist/index.js
|
|
75358
75271
|
var import_neverthrow32 = __toESM(require_index_cjs(), 1);
|
|
75359
|
-
var
|
|
75272
|
+
var import_promises17 = require("node:fs/promises");
|
|
75360
75273
|
var import_neverthrow33 = __toESM(require_index_cjs(), 1);
|
|
75361
75274
|
var import_neverthrow34 = __toESM(require_index_cjs(), 1);
|
|
75362
75275
|
var import_neverthrow35 = __toESM(require_index_cjs(), 1);
|
|
@@ -75364,8 +75277,8 @@ var import_neverthrow36 = __toESM(require_index_cjs(), 1);
|
|
|
75364
75277
|
var import_sharp2 = __toESM(require("sharp"), 1);
|
|
75365
75278
|
var import_neverthrow37 = __toESM(require_index_cjs(), 1);
|
|
75366
75279
|
var import_neverthrow38 = __toESM(require_index_cjs(), 1);
|
|
75367
|
-
var
|
|
75368
|
-
var
|
|
75280
|
+
var import_promises18 = require("node:fs/promises");
|
|
75281
|
+
var import_node_path12 = __toESM(require("node:path"), 1);
|
|
75369
75282
|
|
|
75370
75283
|
// ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/dist/js-yaml.mjs
|
|
75371
75284
|
function isNothing(subject) {
|
|
@@ -78676,7 +78589,7 @@ async function initArtboardNames({ designStore, config: config2, state }) {
|
|
|
78676
78589
|
}
|
|
78677
78590
|
function readScreenshot(screenshotPath, stepIndex) {
|
|
78678
78591
|
return import_neverthrow33.ResultAsync.fromThrowable(
|
|
78679
|
-
|
|
78592
|
+
import_promises17.readFile,
|
|
78680
78593
|
(cause) => ({ type: "SCREENSHOT_READ_FAILED", stepIndex, cause })
|
|
78681
78594
|
)(screenshotPath);
|
|
78682
78595
|
}
|
|
@@ -78797,7 +78710,7 @@ function parseMeta(raw) {
|
|
|
78797
78710
|
return {};
|
|
78798
78711
|
}
|
|
78799
78712
|
async function readAndParseSidecar(sidecarPath) {
|
|
78800
|
-
const raw = await (0,
|
|
78713
|
+
const raw = await (0, import_promises18.readFile)(sidecarPath, "utf8");
|
|
78801
78714
|
return parseMeta(raw);
|
|
78802
78715
|
}
|
|
78803
78716
|
function readSidecarFile(sidecarPath) {
|
|
@@ -78828,7 +78741,7 @@ var FsDesignStore = class {
|
|
|
78828
78741
|
}
|
|
78829
78742
|
listArtboards() {
|
|
78830
78743
|
return (0, import_neverthrow39.fromAsyncThrowable)(
|
|
78831
|
-
|
|
78744
|
+
import_promises18.readdir,
|
|
78832
78745
|
wrapFsError
|
|
78833
78746
|
)(this.designsDirectory).orElse((fsError) => {
|
|
78834
78747
|
if (fsError.type === "FS_ERROR" && isEnoent(fsError.cause)) {
|
|
@@ -78840,10 +78753,10 @@ var FsDesignStore = class {
|
|
|
78840
78753
|
);
|
|
78841
78754
|
}
|
|
78842
78755
|
getArtboard(filename) {
|
|
78843
|
-
const pngPath =
|
|
78844
|
-
const sidecarPath =
|
|
78756
|
+
const pngPath = import_node_path12.default.join(this.designsDirectory, `${filename}.png`);
|
|
78757
|
+
const sidecarPath = import_node_path12.default.join(this.designsDirectory, `${filename}.meta.yaml`);
|
|
78845
78758
|
return (0, import_neverthrow39.fromAsyncThrowable)(
|
|
78846
|
-
|
|
78759
|
+
import_promises18.readFile,
|
|
78847
78760
|
wrapFsError
|
|
78848
78761
|
)(pngPath).orElse((fsError) => {
|
|
78849
78762
|
if (fsError.type === "FS_ERROR" && isEnoent(fsError.cause)) {
|
|
@@ -78922,7 +78835,7 @@ function runAnalyserWithRetry(params) {
|
|
|
78922
78835
|
),
|
|
78923
78836
|
{
|
|
78924
78837
|
config: { maxAttempts: RETRY_MAX_ATTEMPTS, baseDelayMs: RETRY_BASE_DELAY_MS },
|
|
78925
|
-
delayFunction:
|
|
78838
|
+
delayFunction: import_promises19.setTimeout,
|
|
78926
78839
|
onRetry: ({ attempt, maxAttempts, delayMs, error: error48 }) => {
|
|
78927
78840
|
onEvent?.({
|
|
78928
78841
|
type: "AGENT_RETRY",
|
|
@@ -79083,7 +78996,7 @@ function runExplorerWithRetry(options2) {
|
|
|
79083
78996
|
const { explorerConfig, udid, onEvent } = options2;
|
|
79084
78997
|
return withRetry(() => runExplorerWithTeardown(explorerConfig, udid), {
|
|
79085
78998
|
config: { maxAttempts: RETRY_MAX_ATTEMPTS, baseDelayMs: RETRY_BASE_DELAY_MS },
|
|
79086
|
-
delayFunction:
|
|
78999
|
+
delayFunction: import_promises20.setTimeout,
|
|
79087
79000
|
onRetry: ({ attempt, maxAttempts, delayMs, error: error48 }) => {
|
|
79088
79001
|
onEvent?.({
|
|
79089
79002
|
type: "AGENT_RETRY",
|
|
@@ -79836,16 +79749,16 @@ function parseVerboseOption(value) {
|
|
|
79836
79749
|
|
|
79837
79750
|
// src/shell/xqa-directory.ts
|
|
79838
79751
|
var import_node_fs6 = require("node:fs");
|
|
79839
|
-
var
|
|
79752
|
+
var import_node_path13 = __toESM(require("node:path"), 1);
|
|
79840
79753
|
var import_neverthrow51 = __toESM(require_index_cjs(), 1);
|
|
79841
79754
|
function findXqaDirectory(startDirectory) {
|
|
79842
79755
|
let current = startDirectory;
|
|
79843
79756
|
for (; ; ) {
|
|
79844
|
-
const candidate =
|
|
79757
|
+
const candidate = import_node_path13.default.join(current, ".xqa");
|
|
79845
79758
|
if ((0, import_node_fs6.existsSync)(candidate)) {
|
|
79846
79759
|
return (0, import_neverthrow51.ok)(candidate);
|
|
79847
79760
|
}
|
|
79848
|
-
const parent =
|
|
79761
|
+
const parent = import_node_path13.default.dirname(current);
|
|
79849
79762
|
if (parent === current) {
|
|
79850
79763
|
return (0, import_neverthrow51.err)({ type: "XQA_NOT_INITIALIZED" });
|
|
79851
79764
|
}
|
|
@@ -79864,7 +79777,7 @@ function resolveXqaDirectory() {
|
|
|
79864
79777
|
}
|
|
79865
79778
|
|
|
79866
79779
|
// src/commands/explore/pipeline-config.ts
|
|
79867
|
-
var
|
|
79780
|
+
var import_node_path14 = __toESM(require("node:path"), 1);
|
|
79868
79781
|
function resolveTimeoutMs({
|
|
79869
79782
|
input,
|
|
79870
79783
|
rootConfig
|
|
@@ -79919,7 +79832,7 @@ function buildPipelineConfig({
|
|
|
79919
79832
|
simulatorUdid
|
|
79920
79833
|
}) {
|
|
79921
79834
|
const base = {
|
|
79922
|
-
outputDir:
|
|
79835
|
+
outputDir: import_node_path14.default.join(xqaDirectory, "output"),
|
|
79923
79836
|
runId: rootConfig.run.id,
|
|
79924
79837
|
simulatorUdid,
|
|
79925
79838
|
onEvent,
|
|
@@ -79932,7 +79845,7 @@ function buildPipelineConfig({
|
|
|
79932
79845
|
|
|
79933
79846
|
// src/core/last-path.ts
|
|
79934
79847
|
var import_node_fs7 = require("node:fs");
|
|
79935
|
-
var
|
|
79848
|
+
var import_node_path15 = __toESM(require("node:path"), 1);
|
|
79936
79849
|
var import_neverthrow52 = __toESM(require_index_cjs(), 1);
|
|
79937
79850
|
function resolveLastPath(argument, stateContent) {
|
|
79938
79851
|
if (argument !== void 0) {
|
|
@@ -79945,7 +79858,7 @@ function resolveLastPath(argument, stateContent) {
|
|
|
79945
79858
|
return (0, import_neverthrow52.err)({ type: "NO_ARG_AND_NO_STATE" });
|
|
79946
79859
|
}
|
|
79947
79860
|
function lastPathFilePath(xqaDirectoryectory) {
|
|
79948
|
-
return
|
|
79861
|
+
return import_node_path15.default.join(xqaDirectoryectory, "last-findings-path");
|
|
79949
79862
|
}
|
|
79950
79863
|
function writeLastPath(xqaDirectory, findingsPath) {
|
|
79951
79864
|
(0, import_node_fs7.writeFileSync)(lastPathFilePath(xqaDirectory), findingsPath);
|
|
@@ -80065,8 +79978,8 @@ function buildExploreRunState({
|
|
|
80065
79978
|
}
|
|
80066
79979
|
|
|
80067
79980
|
// src/shell/app-context.ts
|
|
80068
|
-
var
|
|
80069
|
-
var
|
|
79981
|
+
var import_promises21 = require("node:fs/promises");
|
|
79982
|
+
var import_node_path16 = __toESM(require("node:path"), 1);
|
|
80070
79983
|
var import_neverthrow55 = __toESM(require_index_cjs(), 1);
|
|
80071
79984
|
var HTML_COMMENT_PATTERN = /<!--[\s\S]*?-->/g;
|
|
80072
79985
|
function isEnoentError(value) {
|
|
@@ -80080,7 +79993,7 @@ function absentContext() {
|
|
|
80080
79993
|
return (0, import_neverthrow55.ok)(absent);
|
|
80081
79994
|
}
|
|
80082
79995
|
var safeReadFile2 = import_neverthrow55.ResultAsync.fromThrowable(
|
|
80083
|
-
async (filePath) => (0,
|
|
79996
|
+
async (filePath) => (0, import_promises21.readFile)(filePath, "utf8"),
|
|
80084
79997
|
toAppContextError
|
|
80085
79998
|
);
|
|
80086
79999
|
function stripAndNormalize(content) {
|
|
@@ -80088,7 +80001,7 @@ function stripAndNormalize(content) {
|
|
|
80088
80001
|
return stripped.length === 0 ? void 0 : stripped;
|
|
80089
80002
|
}
|
|
80090
80003
|
function readContextFile(xqaDirectory, filename) {
|
|
80091
|
-
const filePath =
|
|
80004
|
+
const filePath = import_node_path16.default.join(xqaDirectory, filename);
|
|
80092
80005
|
return safeReadFile2(filePath).map((content) => stripAndNormalize(content)).orElse((error48) => {
|
|
80093
80006
|
if (isEnoentError(error48.cause)) {
|
|
80094
80007
|
return absentContext();
|
|
@@ -80233,21 +80146,21 @@ function registerExploreCommand(program3, loader2) {
|
|
|
80233
80146
|
|
|
80234
80147
|
// src/commands/init-command.ts
|
|
80235
80148
|
var import_node_fs9 = require("node:fs");
|
|
80236
|
-
var
|
|
80149
|
+
var import_node_path18 = __toESM(require("node:path"), 1);
|
|
80237
80150
|
|
|
80238
80151
|
// src/commands/install-skills.ts
|
|
80239
80152
|
var import_node_child_process5 = require("node:child_process");
|
|
80240
80153
|
var import_node_fs8 = require("node:fs");
|
|
80241
|
-
var
|
|
80154
|
+
var import_node_path17 = __toESM(require("node:path"), 1);
|
|
80242
80155
|
var import_node_url = require("node:url");
|
|
80243
80156
|
function resolveSkillsRoot() {
|
|
80244
|
-
const packageDistributionDirectory =
|
|
80245
|
-
return
|
|
80157
|
+
const packageDistributionDirectory = import_node_path17.default.dirname((0, import_node_url.fileURLToPath)(__importMetaUrl));
|
|
80158
|
+
return import_node_path17.default.join(packageDistributionDirectory, "skills");
|
|
80246
80159
|
}
|
|
80247
80160
|
function installSkills() {
|
|
80248
80161
|
const skillsRoot = resolveSkillsRoot();
|
|
80249
80162
|
for (const skill of (0, import_node_fs8.readdirSync)(skillsRoot)) {
|
|
80250
|
-
(0, import_node_child_process5.spawnSync)("npx", ["skills", "add",
|
|
80163
|
+
(0, import_node_child_process5.spawnSync)("npx", ["skills", "add", import_node_path17.default.join(skillsRoot, skill), "-y"], {
|
|
80251
80164
|
stdio: "inherit"
|
|
80252
80165
|
});
|
|
80253
80166
|
}
|
|
@@ -80259,7 +80172,7 @@ var GITIGNORE_CONTENT = `/output
|
|
|
80259
80172
|
`;
|
|
80260
80173
|
var TEST_PLAN_IGNORE_LINE = ".xqa/test-plan/";
|
|
80261
80174
|
function ensureTestPlanIgnored(repoRoot) {
|
|
80262
|
-
const gitignorePath =
|
|
80175
|
+
const gitignorePath = import_node_path18.default.join(repoRoot, ".gitignore");
|
|
80263
80176
|
if (!(0, import_node_fs9.existsSync)(gitignorePath)) {
|
|
80264
80177
|
(0, import_node_fs9.writeFileSync)(gitignorePath, `${TEST_PLAN_IGNORE_LINE}
|
|
80265
80178
|
`);
|
|
@@ -80316,12 +80229,12 @@ Scope applies from the starting screen. If the focus area requires navigation, d
|
|
|
80316
80229
|
`;
|
|
80317
80230
|
function scaffoldProject(xqaDirectory) {
|
|
80318
80231
|
(0, import_node_fs9.mkdirSync)(xqaDirectory);
|
|
80319
|
-
(0, import_node_fs9.writeFileSync)(
|
|
80320
|
-
(0, import_node_fs9.writeFileSync)(
|
|
80321
|
-
(0, import_node_fs9.writeFileSync)(
|
|
80232
|
+
(0, import_node_fs9.writeFileSync)(import_node_path18.default.join(xqaDirectory, ".gitignore"), GITIGNORE_CONTENT);
|
|
80233
|
+
(0, import_node_fs9.writeFileSync)(import_node_path18.default.join(xqaDirectory, "app.md"), APP_TEMPLATE);
|
|
80234
|
+
(0, import_node_fs9.writeFileSync)(import_node_path18.default.join(xqaDirectory, "explore.md"), EXPLORE_TEMPLATE);
|
|
80322
80235
|
for (const subdir of ["designs", "specs", "suites"]) {
|
|
80323
|
-
(0, import_node_fs9.mkdirSync)(
|
|
80324
|
-
(0, import_node_fs9.writeFileSync)(
|
|
80236
|
+
(0, import_node_fs9.mkdirSync)(import_node_path18.default.join(xqaDirectory, subdir));
|
|
80237
|
+
(0, import_node_fs9.writeFileSync)(import_node_path18.default.join(xqaDirectory, subdir, ".gitkeep"), "");
|
|
80325
80238
|
}
|
|
80326
80239
|
}
|
|
80327
80240
|
function printInitReport(report) {
|
|
@@ -80343,7 +80256,7 @@ ${addedLines}
|
|
|
80343
80256
|
}
|
|
80344
80257
|
async function runInitCommand() {
|
|
80345
80258
|
const cwd = process.cwd();
|
|
80346
|
-
const xqaDirectory =
|
|
80259
|
+
const xqaDirectory = import_node_path18.default.join(cwd, ".xqa");
|
|
80347
80260
|
installSkills();
|
|
80348
80261
|
ensureTestPlanIgnored(cwd);
|
|
80349
80262
|
if ((0, import_node_fs9.existsSync)(xqaDirectory)) {
|
|
@@ -80370,7 +80283,7 @@ function registerInitCommand(program3) {
|
|
|
80370
80283
|
}
|
|
80371
80284
|
|
|
80372
80285
|
// src/commands/plan/edit-command.ts
|
|
80373
|
-
var
|
|
80286
|
+
var import_node_path23 = __toESM(require("node:path"), 1);
|
|
80374
80287
|
|
|
80375
80288
|
// ../../agents/planner/dist/index.js
|
|
80376
80289
|
var import_neverthrow56 = __toESM(require_index_cjs(), 1);
|
|
@@ -80380,10 +80293,10 @@ var yaml2 = __toESM(require_dist(), 1);
|
|
|
80380
80293
|
var import_neverthrow59 = __toESM(require_index_cjs(), 1);
|
|
80381
80294
|
var yaml22 = __toESM(require_dist(), 1);
|
|
80382
80295
|
var import_neverthrow60 = __toESM(require_index_cjs(), 1);
|
|
80383
|
-
var
|
|
80384
|
-
var
|
|
80296
|
+
var import_promises22 = require("node:fs/promises");
|
|
80297
|
+
var import_node_path19 = __toESM(require("node:path"), 1);
|
|
80385
80298
|
var import_neverthrow61 = __toESM(require_index_cjs(), 1);
|
|
80386
|
-
var
|
|
80299
|
+
var import_promises23 = require("node:fs/promises");
|
|
80387
80300
|
var import_neverthrow62 = __toESM(require_index_cjs(), 1);
|
|
80388
80301
|
var import_neverthrow63 = __toESM(require_index_cjs(), 1);
|
|
80389
80302
|
var import_node_child_process6 = require("node:child_process");
|
|
@@ -80392,13 +80305,13 @@ var import_neverthrow64 = __toESM(require_index_cjs(), 1);
|
|
|
80392
80305
|
var import_node_process2 = require("node:process");
|
|
80393
80306
|
var import_neverthrow65 = __toESM(require_index_cjs(), 1);
|
|
80394
80307
|
var import_neverthrow66 = __toESM(require_index_cjs(), 1);
|
|
80308
|
+
var import_promises24 = require("node:fs/promises");
|
|
80309
|
+
var import_node_path20 = __toESM(require("node:path"), 1);
|
|
80310
|
+
var import_neverthrow67 = __toESM(require_index_cjs(), 1);
|
|
80395
80311
|
var import_promises25 = require("node:fs/promises");
|
|
80396
80312
|
var import_node_path21 = __toESM(require("node:path"), 1);
|
|
80397
|
-
var import_neverthrow67 = __toESM(require_index_cjs(), 1);
|
|
80398
|
-
var import_promises26 = require("node:fs/promises");
|
|
80399
|
-
var import_node_path22 = __toESM(require("node:path"), 1);
|
|
80400
80313
|
var import_neverthrow68 = __toESM(require_index_cjs(), 1);
|
|
80401
|
-
var
|
|
80314
|
+
var import_promises26 = require("node:fs/promises");
|
|
80402
80315
|
var import_neverthrow69 = __toESM(require_index_cjs(), 1);
|
|
80403
80316
|
function isEmptySummary(summary) {
|
|
80404
80317
|
return summary.touchedFiles.length === 0 && summary.uncommittedFiles.length === 0;
|
|
@@ -81252,8 +81165,8 @@ function extendPlan(input, deps) {
|
|
|
81252
81165
|
}
|
|
81253
81166
|
async function writeAndRename(input) {
|
|
81254
81167
|
const temporaryPath = `${input.path}.tmp`;
|
|
81255
|
-
await (0,
|
|
81256
|
-
await (0,
|
|
81168
|
+
await (0, import_promises23.writeFile)(temporaryPath, input.content, "utf8");
|
|
81169
|
+
await (0, import_promises23.rename)(temporaryPath, input.path);
|
|
81257
81170
|
}
|
|
81258
81171
|
var rawAtomicWrite = import_neverthrow62.ResultAsync.fromThrowable(
|
|
81259
81172
|
writeAndRename,
|
|
@@ -81415,7 +81328,7 @@ function validateFindings(input) {
|
|
|
81415
81328
|
return parseFindingsJson(input).andThen((data) => validateFindingsSchema(data, input.path));
|
|
81416
81329
|
}
|
|
81417
81330
|
function reportPathFor(findingsPath) {
|
|
81418
|
-
return
|
|
81331
|
+
return import_node_path19.default.join(import_node_path19.default.dirname(findingsPath), REPORT_FILENAME);
|
|
81419
81332
|
}
|
|
81420
81333
|
function buildReport(input) {
|
|
81421
81334
|
return correlate({
|
|
@@ -81437,7 +81350,7 @@ function correlateAndPersist(input) {
|
|
|
81437
81350
|
});
|
|
81438
81351
|
}
|
|
81439
81352
|
var rawReadFindings = import_neverthrow61.ResultAsync.fromThrowable(
|
|
81440
|
-
async (filePath) => (0,
|
|
81353
|
+
async (filePath) => (0, import_promises22.readFile)(filePath, "utf8"),
|
|
81441
81354
|
(cause) => ({ cause })
|
|
81442
81355
|
);
|
|
81443
81356
|
function readFindingsFile(filePath) {
|
|
@@ -81817,14 +81730,14 @@ function mapReaddirError(input) {
|
|
|
81817
81730
|
return { type: "SPEC_READ_FAILED", path: input.directory, cause: input.cause };
|
|
81818
81731
|
}
|
|
81819
81732
|
var rawReaddir = import_neverthrow67.ResultAsync.fromThrowable(
|
|
81820
|
-
async (directory) => (0,
|
|
81733
|
+
async (directory) => (0, import_promises24.readdir)(directory),
|
|
81821
81734
|
(cause) => ({ cause })
|
|
81822
81735
|
);
|
|
81823
81736
|
function safeReaddir(directory) {
|
|
81824
81737
|
return rawReaddir(directory).mapErr(({ cause }) => mapReaddirError({ directory, cause }));
|
|
81825
81738
|
}
|
|
81826
81739
|
var rawReadFile = import_neverthrow67.ResultAsync.fromThrowable(
|
|
81827
|
-
async (input) => (0,
|
|
81740
|
+
async (input) => (0, import_promises24.readFile)(input.path, "utf8"),
|
|
81828
81741
|
(cause) => ({ cause })
|
|
81829
81742
|
);
|
|
81830
81743
|
function safeReadFile3(input) {
|
|
@@ -81836,7 +81749,7 @@ function filterAndSortSpecs(filenames) {
|
|
|
81836
81749
|
return filenames.filter((name) => name.endsWith(SPEC_SUFFIX)).toSorted();
|
|
81837
81750
|
}
|
|
81838
81751
|
function readEntry2(input) {
|
|
81839
|
-
const entryPath =
|
|
81752
|
+
const entryPath = import_node_path20.default.join(input.directory, input.filename);
|
|
81840
81753
|
return safeReadFile3({ path: entryPath }).andThen(
|
|
81841
81754
|
(raw) => parseSpec(raw, entryPath).map((spec) => ({ path: entryPath, spec }))
|
|
81842
81755
|
);
|
|
@@ -81850,11 +81763,11 @@ function readPlan(input) {
|
|
|
81850
81763
|
}
|
|
81851
81764
|
var SCENARIO_FILENAME_PATTERN = /^scenario-(\d+)\.test\.md$/;
|
|
81852
81765
|
var safeMkdir = import_neverthrow68.ResultAsync.fromThrowable(
|
|
81853
|
-
async (path43) => (0,
|
|
81766
|
+
async (path43) => (0, import_promises25.mkdir)(path43, { recursive: true }),
|
|
81854
81767
|
(cause) => ({ type: "SPEC_WRITE_FAILED", path: "", cause })
|
|
81855
81768
|
);
|
|
81856
81769
|
var safeReaddir2 = import_neverthrow68.ResultAsync.fromThrowable(
|
|
81857
|
-
async (path43) => (0,
|
|
81770
|
+
async (path43) => (0, import_promises25.readdir)(path43),
|
|
81858
81771
|
(cause) => ({ type: "SPEC_WRITE_FAILED", path: "", cause })
|
|
81859
81772
|
);
|
|
81860
81773
|
function ensureDirectory(directory) {
|
|
@@ -81890,7 +81803,7 @@ function buildMeta(context) {
|
|
|
81890
81803
|
}
|
|
81891
81804
|
function writeSingleScenario(input) {
|
|
81892
81805
|
const filename = `scenario-${String(input.index)}.test.md`;
|
|
81893
|
-
const targetPath =
|
|
81806
|
+
const targetPath = import_node_path21.default.join(input.directory, filename);
|
|
81894
81807
|
const meta3 = buildMeta(input.context);
|
|
81895
81808
|
const content = renderSpec2(input.draft, meta3);
|
|
81896
81809
|
return atomicWrite({ path: targetPath, content }).map(() => targetPath);
|
|
@@ -81910,7 +81823,7 @@ function writeScenarios(input) {
|
|
|
81910
81823
|
return ensureDirectory(input.directory).andThen(() => listScenarioIndices(input.directory)).map((indices) => computeNextIndex(indices)).andThen((startIndex) => writeAllScenarios(input, startIndex));
|
|
81911
81824
|
}
|
|
81912
81825
|
var readFileByPath = import_neverthrow69.ResultAsync.fromThrowable(
|
|
81913
|
-
async (path43) => (0,
|
|
81826
|
+
async (path43) => (0, import_promises26.readFile)(path43, "utf8"),
|
|
81914
81827
|
(cause) => ({ cause })
|
|
81915
81828
|
);
|
|
81916
81829
|
function readSpecFile(path43) {
|
|
@@ -81923,7 +81836,7 @@ function writeSpecFile(input) {
|
|
|
81923
81836
|
}
|
|
81924
81837
|
|
|
81925
81838
|
// src/commands/plan/shared-runner.ts
|
|
81926
|
-
var
|
|
81839
|
+
var import_node_path22 = __toESM(require("node:path"), 1);
|
|
81927
81840
|
|
|
81928
81841
|
// src/commands/plan/exit-codes.ts
|
|
81929
81842
|
var EXIT_OK = 0;
|
|
@@ -82018,9 +81931,9 @@ var PLANNER_MODEL = "claude-opus-4-5";
|
|
|
82018
81931
|
var DEFAULT_PLAN_SUBDIR = "test-plan/default";
|
|
82019
81932
|
function resolveOutputDirectory(xqaDirectory, override) {
|
|
82020
81933
|
if (override !== void 0) {
|
|
82021
|
-
return
|
|
81934
|
+
return import_node_path22.default.resolve(process.cwd(), override);
|
|
82022
81935
|
}
|
|
82023
|
-
return
|
|
81936
|
+
return import_node_path22.default.join(xqaDirectory, DEFAULT_PLAN_SUBDIR);
|
|
82024
81937
|
}
|
|
82025
81938
|
function readAppContextOrDiagnose(xqaDirectory) {
|
|
82026
81939
|
return readAppContext(xqaDirectory).mapErr(
|
|
@@ -82046,7 +81959,7 @@ var DEPS = {
|
|
|
82046
81959
|
};
|
|
82047
81960
|
function buildPlannerInput(input, options2) {
|
|
82048
81961
|
return {
|
|
82049
|
-
file:
|
|
81962
|
+
file: import_node_path23.default.resolve(process.cwd(), input.file),
|
|
82050
81963
|
userFeedback: input.feedback,
|
|
82051
81964
|
aiConfig: {
|
|
82052
81965
|
apiKey: options2.config.ANTHROPIC_API_KEY,
|
|
@@ -82229,7 +82142,7 @@ function runPlanGenerate(input, options2) {
|
|
|
82229
82142
|
}
|
|
82230
82143
|
|
|
82231
82144
|
// src/commands/plan/report-command.ts
|
|
82232
|
-
var
|
|
82145
|
+
var import_node_path24 = __toESM(require("node:path"), 1);
|
|
82233
82146
|
var DEPS4 = {
|
|
82234
82147
|
readPlan,
|
|
82235
82148
|
readFindingsFile,
|
|
@@ -82237,7 +82150,7 @@ var DEPS4 = {
|
|
|
82237
82150
|
};
|
|
82238
82151
|
function buildReportInput(input) {
|
|
82239
82152
|
return {
|
|
82240
|
-
findingsPath:
|
|
82153
|
+
findingsPath: import_node_path24.default.resolve(process.cwd(), input.findingsPath),
|
|
82241
82154
|
specsDirectory: resolveOutputDirectory(input.xqaDirectory, input.specsDirectory)
|
|
82242
82155
|
};
|
|
82243
82156
|
}
|
|
@@ -82300,7 +82213,7 @@ function registerPlanCommand(program3, loader2) {
|
|
|
82300
82213
|
|
|
82301
82214
|
// src/commands/review-command.ts
|
|
82302
82215
|
var import_node_fs10 = require("node:fs");
|
|
82303
|
-
var
|
|
82216
|
+
var import_node_path26 = __toESM(require("node:path"), 1);
|
|
82304
82217
|
var import_neverthrow72 = __toESM(require_index_cjs(), 1);
|
|
82305
82218
|
|
|
82306
82219
|
// ../../node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.15/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
@@ -83639,7 +83552,7 @@ var esm_default2 = createPrompt((config2, done) => {
|
|
|
83639
83552
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
83640
83553
|
var import_child_process3 = require("child_process");
|
|
83641
83554
|
var import_fs3 = require("fs");
|
|
83642
|
-
var
|
|
83555
|
+
var import_node_path25 = __toESM(require("node:path"), 1);
|
|
83643
83556
|
var import_node_os3 = __toESM(require("node:os"), 1);
|
|
83644
83557
|
var import_node_crypto3 = require("node:crypto");
|
|
83645
83558
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
@@ -83775,8 +83688,8 @@ var ExternalEditor = class {
|
|
|
83775
83688
|
const prefix = sanitizeAffix(this.fileOptions.prefix);
|
|
83776
83689
|
const postfix = sanitizeAffix(this.fileOptions.postfix);
|
|
83777
83690
|
const filename = `${prefix}${id}${postfix}`;
|
|
83778
|
-
const candidate =
|
|
83779
|
-
const baseResolved =
|
|
83691
|
+
const candidate = import_node_path25.default.resolve(baseDir, filename);
|
|
83692
|
+
const baseResolved = import_node_path25.default.resolve(baseDir) + import_node_path25.default.sep;
|
|
83780
83693
|
if (!candidate.startsWith(baseResolved)) {
|
|
83781
83694
|
throw new Error("Resolved temporary file escaped the base directory");
|
|
83782
83695
|
}
|
|
@@ -85001,7 +84914,7 @@ async function executeReview({
|
|
|
85001
84914
|
process.exit(0);
|
|
85002
84915
|
return;
|
|
85003
84916
|
}
|
|
85004
|
-
const dismissalsFilePath = dismissalsPath(
|
|
84917
|
+
const dismissalsFilePath = dismissalsPath(import_node_path26.default.dirname(xqaDirectory), dismissalsPathOverride);
|
|
85005
84918
|
await runReviewLoop({
|
|
85006
84919
|
findings,
|
|
85007
84920
|
dismissalsFilePath,
|
|
@@ -85043,8 +84956,8 @@ function discoverSimulators(udidOverride) {
|
|
|
85043
84956
|
}
|
|
85044
84957
|
|
|
85045
84958
|
// src/suite/commands/run/resolve-work-items.ts
|
|
85046
|
-
var
|
|
85047
|
-
var
|
|
84959
|
+
var import_promises27 = __toESM(require("node:fs/promises"), 1);
|
|
84960
|
+
var import_node_path27 = __toESM(require("node:path"), 1);
|
|
85048
84961
|
var import_fast_glob = __toESM(require_out4(), 1);
|
|
85049
84962
|
var import_neverthrow75 = __toESM(require_index_cjs(), 1);
|
|
85050
84963
|
|
|
@@ -85194,14 +85107,14 @@ function buildFreestyleItems(entries) {
|
|
|
85194
85107
|
|
|
85195
85108
|
// src/suite/commands/run/resolve-work-items.ts
|
|
85196
85109
|
var safeReadFile5 = import_neverthrow75.ResultAsync.fromThrowable(
|
|
85197
|
-
async (filePath) =>
|
|
85110
|
+
async (filePath) => import_promises27.default.readFile(filePath, "utf8"),
|
|
85198
85111
|
() => "READ_FAILED"
|
|
85199
85112
|
);
|
|
85200
85113
|
async function resolveGlobs(input) {
|
|
85201
85114
|
return (0, import_fast_glob.default)(input.globs, { cwd: input.cwd, absolute: true });
|
|
85202
85115
|
}
|
|
85203
85116
|
async function loadSuiteConfig(suitesDirectory, name) {
|
|
85204
|
-
const suitePath =
|
|
85117
|
+
const suitePath = import_node_path27.default.join(suitesDirectory, `${name}.suite.json`);
|
|
85205
85118
|
const contentResult = await safeReadFile5(suitePath);
|
|
85206
85119
|
if (contentResult.isErr()) {
|
|
85207
85120
|
return;
|
|
@@ -85823,7 +85736,7 @@ function runWorkerPool(config2) {
|
|
|
85823
85736
|
// src/suite/commands/pipeline-config-builder.ts
|
|
85824
85737
|
var import_node_fs11 = require("node:fs");
|
|
85825
85738
|
var import_node_os4 = __toESM(require("node:os"), 1);
|
|
85826
|
-
var
|
|
85739
|
+
var import_node_path28 = __toESM(require("node:path"), 1);
|
|
85827
85740
|
var DEFAULT_FREESTYLE_TIMEOUT_SECONDS2 = 300;
|
|
85828
85741
|
function buildDeviceInstruction(simulatorUdid) {
|
|
85829
85742
|
return `You MUST use device "${simulatorUdid}" for ALL mobile tool calls. The simulator UDID is already configured \u2014 use it directly.`;
|
|
@@ -85832,7 +85745,7 @@ function composeAppContext(parts) {
|
|
|
85832
85745
|
return parts.filter((part) => part !== void 0 && part.length > 0).join("\n\n");
|
|
85833
85746
|
}
|
|
85834
85747
|
function ensureWorkerCwd(simulatorUdid) {
|
|
85835
|
-
const workerDirectory =
|
|
85748
|
+
const workerDirectory = import_node_path28.default.join(import_node_os4.default.tmpdir(), "xqa-workers", simulatorUdid);
|
|
85836
85749
|
(0, import_node_fs11.mkdirSync)(workerDirectory, { recursive: true });
|
|
85837
85750
|
return workerDirectory;
|
|
85838
85751
|
}
|
|
@@ -85898,7 +85811,7 @@ function buildPipelineConfig2(input) {
|
|
|
85898
85811
|
const { item, context, signal, simulatorUdid, onEvent } = input;
|
|
85899
85812
|
const { xqaDirectory, runId, config: config2, rootConfig } = context;
|
|
85900
85813
|
const base = {
|
|
85901
|
-
outputDir:
|
|
85814
|
+
outputDir: import_node_path28.default.join(xqaDirectory, "output", item.id),
|
|
85902
85815
|
runId,
|
|
85903
85816
|
simulatorUdid,
|
|
85904
85817
|
signal,
|
|
@@ -85967,25 +85880,25 @@ function buildSuiteFindings(input) {
|
|
|
85967
85880
|
}
|
|
85968
85881
|
|
|
85969
85882
|
// src/suite/shell/suite-findings-writer.ts
|
|
85970
|
-
var
|
|
85971
|
-
var
|
|
85883
|
+
var import_promises28 = __toESM(require("node:fs/promises"), 1);
|
|
85884
|
+
var import_node_path29 = __toESM(require("node:path"), 1);
|
|
85972
85885
|
var import_neverthrow79 = __toESM(require_index_cjs(), 1);
|
|
85973
85886
|
var INDENT_SPACES = 2;
|
|
85974
85887
|
function writeSuiteFindings(findings, options2) {
|
|
85975
|
-
const directory =
|
|
85888
|
+
const directory = import_node_path29.default.join(
|
|
85976
85889
|
options2.outputDirectory,
|
|
85977
85890
|
"suite",
|
|
85978
85891
|
findings.suiteId,
|
|
85979
85892
|
options2.date,
|
|
85980
85893
|
findings.runId
|
|
85981
85894
|
);
|
|
85982
|
-
const finalPath =
|
|
85895
|
+
const finalPath = import_node_path29.default.join(directory, "findings.json");
|
|
85983
85896
|
const temporaryPath = `${finalPath}.tmp`;
|
|
85984
85897
|
const safeWriteAtomically = import_neverthrow79.ResultAsync.fromThrowable(
|
|
85985
85898
|
async () => {
|
|
85986
|
-
await
|
|
85987
|
-
await
|
|
85988
|
-
await
|
|
85899
|
+
await import_promises28.default.mkdir(directory, { recursive: true });
|
|
85900
|
+
await import_promises28.default.writeFile(temporaryPath, JSON.stringify(findings, void 0, INDENT_SPACES));
|
|
85901
|
+
await import_promises28.default.rename(temporaryPath, finalPath);
|
|
85989
85902
|
return finalPath;
|
|
85990
85903
|
},
|
|
85991
85904
|
(cause) => ({ type: "FINDINGS_WRITE_FAILED", cause })
|
|
@@ -86013,8 +85926,8 @@ async function writeAndReport(input) {
|
|
|
86013
85926
|
}
|
|
86014
85927
|
|
|
86015
85928
|
// src/suite/commands/suite-run-context.ts
|
|
86016
|
-
var
|
|
86017
|
-
var
|
|
85929
|
+
var import_promises29 = __toESM(require("node:fs/promises"), 1);
|
|
85930
|
+
var import_node_path30 = __toESM(require("node:path"), 1);
|
|
86018
85931
|
var import_neverthrow80 = __toESM(require_index_cjs(), 1);
|
|
86019
85932
|
|
|
86020
85933
|
// src/suite/core/run-id.ts
|
|
@@ -86052,14 +85965,14 @@ function deriveSuiteId(input) {
|
|
|
86052
85965
|
var ISO_DATE_LENGTH3 = 10;
|
|
86053
85966
|
var safeReaddir3 = import_neverthrow80.ResultAsync.fromThrowable(
|
|
86054
85967
|
async (directoryPath) => {
|
|
86055
|
-
const entries = await
|
|
85968
|
+
const entries = await import_promises29.default.readdir(directoryPath, { withFileTypes: true });
|
|
86056
85969
|
return entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
86057
85970
|
},
|
|
86058
85971
|
() => "READDIR_FAILED"
|
|
86059
85972
|
);
|
|
86060
85973
|
async function listRunDirectories(input) {
|
|
86061
85974
|
const { outputDirectory, suiteId, date: date5 } = input;
|
|
86062
|
-
const directoryPath =
|
|
85975
|
+
const directoryPath = import_node_path30.default.join(outputDirectory, "suite", suiteId, date5);
|
|
86063
85976
|
const result = await safeReaddir3(directoryPath);
|
|
86064
85977
|
return result.unwrapOr([]);
|
|
86065
85978
|
}
|
|
@@ -86083,7 +85996,7 @@ ${cause}
|
|
|
86083
85996
|
async function buildSuiteRunContext(input) {
|
|
86084
85997
|
const suiteId = deriveSuiteIdFromMode(input.mode);
|
|
86085
85998
|
const date5 = (/* @__PURE__ */ new Date()).toISOString().slice(0, ISO_DATE_LENGTH3);
|
|
86086
|
-
const outputDirectory =
|
|
85999
|
+
const outputDirectory = import_node_path30.default.join(input.xqaDirectory, "output");
|
|
86087
86000
|
const existingDirectories = await listRunDirectories({ outputDirectory, suiteId, date: date5 });
|
|
86088
86001
|
const runId = computeNextRunId2(existingDirectories);
|
|
86089
86002
|
const appContext = await loadAppContext(input.xqaDirectory);
|
|
@@ -86244,10 +86157,10 @@ function registerRunCommand(program3, loader2) {
|
|
|
86244
86157
|
}
|
|
86245
86158
|
|
|
86246
86159
|
// src/commands/spec/runner.ts
|
|
86247
|
-
var
|
|
86160
|
+
var import_node_path34 = __toESM(require("node:path"), 1);
|
|
86248
86161
|
|
|
86249
86162
|
// src/commands/spec/pipeline-config.ts
|
|
86250
|
-
var
|
|
86163
|
+
var import_node_path31 = __toESM(require("node:path"), 1);
|
|
86251
86164
|
function buildInspector3(context) {
|
|
86252
86165
|
const { inspector } = context.rootConfig.agents;
|
|
86253
86166
|
if (!inspector.enabled) {
|
|
@@ -86272,7 +86185,7 @@ function buildSpecExplorer2(context) {
|
|
|
86272
86185
|
}
|
|
86273
86186
|
function buildPipelineConfig3({ input, context, onEvent }) {
|
|
86274
86187
|
return {
|
|
86275
|
-
outputDir:
|
|
86188
|
+
outputDir: import_node_path31.default.join(context.xqaDirectory, "output", context.slug),
|
|
86276
86189
|
signal: input.signal,
|
|
86277
86190
|
onEvent,
|
|
86278
86191
|
inspector: buildInspector3(context),
|
|
@@ -86331,13 +86244,13 @@ function handleSpecResult(state, context) {
|
|
|
86331
86244
|
}
|
|
86332
86245
|
|
|
86333
86246
|
// src/spec-slug.ts
|
|
86334
|
-
var
|
|
86247
|
+
var import_node_path32 = __toESM(require("node:path"), 1);
|
|
86335
86248
|
var SPECS_DIR = "specs";
|
|
86336
86249
|
function stripExtensions(filename) {
|
|
86337
86250
|
return filename.replace(/\.test\.md$/, "").replace(/\.[^.]+$/, "");
|
|
86338
86251
|
}
|
|
86339
86252
|
function deriveSpecSlug(specFilePath) {
|
|
86340
|
-
const parts = specFilePath.split(
|
|
86253
|
+
const parts = specFilePath.split(import_node_path32.default.sep);
|
|
86341
86254
|
const specsIndex = parts.lastIndexOf(SPECS_DIR);
|
|
86342
86255
|
if (specsIndex !== -1) {
|
|
86343
86256
|
const relativeParts = parts.slice(specsIndex + 1);
|
|
@@ -86345,12 +86258,12 @@ function deriveSpecSlug(specFilePath) {
|
|
|
86345
86258
|
relativeParts[relativeParts.length - 1] = stripExtensions(last);
|
|
86346
86259
|
return relativeParts.join("__");
|
|
86347
86260
|
}
|
|
86348
|
-
return stripExtensions(
|
|
86261
|
+
return stripExtensions(import_node_path32.default.basename(specFilePath));
|
|
86349
86262
|
}
|
|
86350
86263
|
|
|
86351
86264
|
// src/commands/spec-resolver.ts
|
|
86352
86265
|
var import_node_fs12 = require("node:fs");
|
|
86353
|
-
var
|
|
86266
|
+
var import_node_path33 = __toESM(require("node:path"), 1);
|
|
86354
86267
|
var import_neverthrow83 = __toESM(require_index_cjs(), 1);
|
|
86355
86268
|
|
|
86356
86269
|
// src/spec-frontmatter.ts
|
|
@@ -86390,15 +86303,15 @@ var safeSelect = import_neverthrow83.ResultAsync.fromThrowable(
|
|
|
86390
86303
|
(error48) => error48 instanceof Error && error48.name === "ExitPromptError" ? "cancelled" : "failed"
|
|
86391
86304
|
);
|
|
86392
86305
|
function findSpecFiles(xqaDirectory) {
|
|
86393
|
-
const specsDirectory =
|
|
86394
|
-
return safeReaddir4(specsDirectory).unwrapOr([]).filter((file2) => file2.endsWith(".test.md")).map((file2) =>
|
|
86306
|
+
const specsDirectory = import_node_path33.default.join(xqaDirectory, "specs");
|
|
86307
|
+
return safeReaddir4(specsDirectory).unwrapOr([]).filter((file2) => file2.endsWith(".test.md")).map((file2) => import_node_path33.default.join(specsDirectory, file2));
|
|
86395
86308
|
}
|
|
86396
86309
|
async function promptForSpec(specFiles, xqaDirectory) {
|
|
86397
86310
|
const result = await safeSelect({
|
|
86398
86311
|
message: "Select a spec",
|
|
86399
86312
|
choices: [
|
|
86400
86313
|
...specFiles.map((specFile) => ({
|
|
86401
|
-
name:
|
|
86314
|
+
name: import_node_path33.default.relative(xqaDirectory, specFile),
|
|
86402
86315
|
value: specFile
|
|
86403
86316
|
})),
|
|
86404
86317
|
new Separator(),
|
|
@@ -86448,7 +86361,7 @@ async function executeSpec(input, context) {
|
|
|
86448
86361
|
const identity = {
|
|
86449
86362
|
display: createSoloDisplay(input.verbose),
|
|
86450
86363
|
itemId: "spec",
|
|
86451
|
-
itemName:
|
|
86364
|
+
itemName: import_node_path34.default.basename(context.absolutePath, ".test.md"),
|
|
86452
86365
|
simulatorUdid: ""
|
|
86453
86366
|
};
|
|
86454
86367
|
const startedAt = Date.now();
|
|
@@ -86483,7 +86396,7 @@ async function resolveSpecContext(input, options2) {
|
|
|
86483
86396
|
if (resolvedSpecFile === void 0) {
|
|
86484
86397
|
return;
|
|
86485
86398
|
}
|
|
86486
|
-
const absolutePath =
|
|
86399
|
+
const absolutePath = import_node_path34.default.resolve(resolvedSpecFile);
|
|
86487
86400
|
const frontmatter = readAndParseSpec(absolutePath);
|
|
86488
86401
|
if (frontmatter === void 0) {
|
|
86489
86402
|
return;
|
|
@@ -88334,11 +88247,11 @@ minimatch.unescape = unescape2;
|
|
|
88334
88247
|
|
|
88335
88248
|
// ../../agents/triager/dist/index.js
|
|
88336
88249
|
var import_neverthrow85 = __toESM(require_index_cjs(), 1);
|
|
88337
|
-
var
|
|
88250
|
+
var import_promises30 = require("node:fs/promises");
|
|
88338
88251
|
var import_neverthrow86 = __toESM(require_index_cjs(), 1);
|
|
88339
88252
|
var import_node_child_process8 = require("node:child_process");
|
|
88340
|
-
var
|
|
88341
|
-
var
|
|
88253
|
+
var import_promises31 = require("node:fs/promises");
|
|
88254
|
+
var import_node_path35 = __toESM(require("node:path"), 1);
|
|
88342
88255
|
var import_neverthrow87 = __toESM(require_index_cjs(), 1);
|
|
88343
88256
|
var import_neverthrow88 = __toESM(require_index_cjs(), 1);
|
|
88344
88257
|
function resolveConfidence2(selected) {
|
|
@@ -89300,7 +89213,7 @@ function lookupSection(sections, screenName) {
|
|
|
89300
89213
|
return (0, import_neverthrow86.okAsync)(section);
|
|
89301
89214
|
}
|
|
89302
89215
|
async function readUtf8File(filePath) {
|
|
89303
|
-
return (0,
|
|
89216
|
+
return (0, import_promises30.readFile)(filePath, UTF8);
|
|
89304
89217
|
}
|
|
89305
89218
|
function createAppMdReader(options2) {
|
|
89306
89219
|
const filePath = options2.path;
|
|
@@ -89366,10 +89279,10 @@ async function runExecFile(request2) {
|
|
|
89366
89279
|
return promise2;
|
|
89367
89280
|
}
|
|
89368
89281
|
function resolveFilePath(filePath, cwd) {
|
|
89369
|
-
if (
|
|
89282
|
+
if (import_node_path35.default.isAbsolute(filePath)) {
|
|
89370
89283
|
return filePath;
|
|
89371
89284
|
}
|
|
89372
|
-
return
|
|
89285
|
+
return import_node_path35.default.resolve(cwd, filePath);
|
|
89373
89286
|
}
|
|
89374
89287
|
function classifyReadError2(cause, resolvedPath) {
|
|
89375
89288
|
const nodeError = cause;
|
|
@@ -89435,7 +89348,7 @@ function handleExecResult(options2) {
|
|
|
89435
89348
|
});
|
|
89436
89349
|
}
|
|
89437
89350
|
async function readUtf8File2(filePath) {
|
|
89438
|
-
return (0,
|
|
89351
|
+
return (0, import_promises31.readFile)(filePath, "utf8");
|
|
89439
89352
|
}
|
|
89440
89353
|
function makeReadFile(cwd) {
|
|
89441
89354
|
return (filePath) => {
|
|
@@ -89607,7 +89520,7 @@ var triagerConfigSchema = agentBaseConfigSchema.extend({ enabled: external_expor
|
|
|
89607
89520
|
var import_neverthrow93 = __toESM(require_index_cjs(), 1);
|
|
89608
89521
|
|
|
89609
89522
|
// src/triage/ai-context-builder.ts
|
|
89610
|
-
var
|
|
89523
|
+
var import_node_path36 = __toESM(require("node:path"), 1);
|
|
89611
89524
|
var import_neverthrow89 = __toESM(require_index_cjs(), 1);
|
|
89612
89525
|
var PROMPT_VERSION = "v1";
|
|
89613
89526
|
var MAX_GREP_PATTERN_LENGTH = 200;
|
|
@@ -89691,7 +89604,7 @@ function pathDenied(reason) {
|
|
|
89691
89604
|
}
|
|
89692
89605
|
function buildHandlers(cwd, validSpecIds) {
|
|
89693
89606
|
const reader = createCodebaseReader({ cwd });
|
|
89694
|
-
const appMdPath =
|
|
89607
|
+
const appMdPath = import_node_path36.default.join(cwd, "app.md");
|
|
89695
89608
|
const appMdReader = createAppMdReader({ path: appMdPath });
|
|
89696
89609
|
return {
|
|
89697
89610
|
readSpec: (id) => {
|
|
@@ -89713,10 +89626,10 @@ function buildHandlers(cwd, validSpecIds) {
|
|
|
89713
89626
|
};
|
|
89714
89627
|
}
|
|
89715
89628
|
function resolveAppMdPath(suitesDirectory) {
|
|
89716
|
-
return
|
|
89629
|
+
return import_node_path36.default.join(import_node_path36.default.dirname(import_node_path36.default.resolve(suitesDirectory)), "app.md");
|
|
89717
89630
|
}
|
|
89718
89631
|
function loadAppIndex(appMdPath) {
|
|
89719
|
-
const appMdReader = createCodebaseReader({ cwd:
|
|
89632
|
+
const appMdReader = createCodebaseReader({ cwd: import_node_path36.default.dirname(appMdPath) });
|
|
89720
89633
|
return appMdReader.readFile(appMdPath).mapErr(() => ({ type: "SPEC_NOT_FOUND", path: appMdPath })).andThen((content) => {
|
|
89721
89634
|
const indexResult = buildAppIndex(content);
|
|
89722
89635
|
if (indexResult.isErr()) {
|
|
@@ -93408,8 +93321,8 @@ function formatXqaLabels(decision) {
|
|
|
93408
93321
|
}
|
|
93409
93322
|
|
|
93410
93323
|
// src/triage/suite-loader.ts
|
|
93411
|
-
var
|
|
93412
|
-
var
|
|
93324
|
+
var import_promises32 = require("node:fs/promises");
|
|
93325
|
+
var import_node_path37 = __toESM(require("node:path"), 1);
|
|
93413
93326
|
var import_neverthrow92 = __toESM(require_index_cjs(), 1);
|
|
93414
93327
|
var SUITE_FILE_SUFFIX = ".suite.json";
|
|
93415
93328
|
var freestyleEntrySchema2 = external_exports.object({
|
|
@@ -93423,13 +93336,13 @@ var suiteFileSchema = external_exports.object({
|
|
|
93423
93336
|
});
|
|
93424
93337
|
var safeJsonParse6 = (0, import_neverthrow92.fromThrowable)(JSON.parse);
|
|
93425
93338
|
async function runReadFile(filePath) {
|
|
93426
|
-
return (0,
|
|
93339
|
+
return (0, import_promises32.readFile)(filePath, "utf8");
|
|
93427
93340
|
}
|
|
93428
93341
|
async function runStat(filePath) {
|
|
93429
|
-
return (0,
|
|
93342
|
+
return (0, import_promises32.stat)(filePath);
|
|
93430
93343
|
}
|
|
93431
93344
|
async function runReadDirectory(filePath) {
|
|
93432
|
-
return (0,
|
|
93345
|
+
return (0, import_promises32.readdir)(filePath);
|
|
93433
93346
|
}
|
|
93434
93347
|
function readSuiteFile(filePath) {
|
|
93435
93348
|
const safeRead = import_neverthrow92.ResultAsync.fromThrowable(
|
|
@@ -93466,7 +93379,7 @@ function listSuiteFiles(directory) {
|
|
|
93466
93379
|
}
|
|
93467
93380
|
return readDirectoryEntries(directory);
|
|
93468
93381
|
}).map(
|
|
93469
|
-
(entries) => entries.filter((entry) => entry.endsWith(SUITE_FILE_SUFFIX)).map((entry) =>
|
|
93382
|
+
(entries) => entries.filter((entry) => entry.endsWith(SUITE_FILE_SUFFIX)).map((entry) => import_node_path37.default.resolve(directory, entry)).toSorted()
|
|
93470
93383
|
);
|
|
93471
93384
|
}
|
|
93472
93385
|
function parseSuiteFile(filePath, raw) {
|
|
@@ -93481,11 +93394,11 @@ function parseSuiteFile(filePath, raw) {
|
|
|
93481
93394
|
return (0, import_neverthrow92.ok)(validated.data);
|
|
93482
93395
|
}
|
|
93483
93396
|
function suiteIdFromPath(filePath) {
|
|
93484
|
-
const name =
|
|
93397
|
+
const name = import_node_path37.default.basename(filePath);
|
|
93485
93398
|
return name.slice(0, name.length - SUITE_FILE_SUFFIX.length);
|
|
93486
93399
|
}
|
|
93487
93400
|
function loadSpecReference(xqaDirectory, specPath) {
|
|
93488
|
-
const absolute =
|
|
93401
|
+
const absolute = import_node_path37.default.resolve(xqaDirectory, specPath);
|
|
93489
93402
|
return readSpecFile2(absolute).andThen((raw) => {
|
|
93490
93403
|
const parsed = parseSpecFrontmatter(raw);
|
|
93491
93404
|
if (parsed.isErr()) {
|
|
@@ -93509,7 +93422,7 @@ function loadSpecReferences(xqaDirectory, specs) {
|
|
|
93509
93422
|
return import_neverthrow92.ResultAsync.combine(specs.map((specPath) => loadSpecReference(xqaDirectory, specPath)));
|
|
93510
93423
|
}
|
|
93511
93424
|
function addSpecTokens(tokens, spec) {
|
|
93512
|
-
const stem =
|
|
93425
|
+
const stem = import_node_path37.default.basename(spec.path).replace(/\.test\.md$/u, "");
|
|
93513
93426
|
for (const part of stem.split(".")) {
|
|
93514
93427
|
if (part.length > 0) {
|
|
93515
93428
|
tokens.add(part);
|
|
@@ -93582,7 +93495,7 @@ function loadSuite(suiteFilePath, xqaDirectory) {
|
|
|
93582
93495
|
);
|
|
93583
93496
|
}
|
|
93584
93497
|
function loadXqaSuites(directory) {
|
|
93585
|
-
const xqaDirectory =
|
|
93498
|
+
const xqaDirectory = import_node_path37.default.dirname(import_node_path37.default.resolve(directory));
|
|
93586
93499
|
return listSuiteFiles(directory).andThen((files) => {
|
|
93587
93500
|
if (files.length === 0) {
|
|
93588
93501
|
return (0, import_neverthrow92.okAsync)([]);
|
|
@@ -93775,7 +93688,7 @@ var rootConfigSchema = external_exports.object({
|
|
|
93775
93688
|
}).strict();
|
|
93776
93689
|
|
|
93777
93690
|
// src/config.ts
|
|
93778
|
-
var
|
|
93691
|
+
var import_node_path38 = __toESM(require("node:path"), 1);
|
|
93779
93692
|
var import_node_url2 = require("node:url");
|
|
93780
93693
|
var import_dotenv = __toESM(require_main(), 1);
|
|
93781
93694
|
var import_neverthrow94 = __toESM(require_index_cjs(), 1);
|
|
@@ -93788,9 +93701,9 @@ var configSchema = external_exports.object({
|
|
|
93788
93701
|
});
|
|
93789
93702
|
|
|
93790
93703
|
// src/config.ts
|
|
93791
|
-
var packageDirectory =
|
|
93704
|
+
var packageDirectory = import_node_path38.default.dirname((0, import_node_url2.fileURLToPath)(__importMetaUrl));
|
|
93792
93705
|
function loadConfig2() {
|
|
93793
|
-
(0, import_dotenv.config)({ path:
|
|
93706
|
+
(0, import_dotenv.config)({ path: import_node_path38.default.resolve(packageDirectory, "..", ".env.local") });
|
|
93794
93707
|
const result = configSchema.safeParse(process.env);
|
|
93795
93708
|
if (!result.success) {
|
|
93796
93709
|
const messages = result.error.issues.map(
|
|
@@ -93884,8 +93797,7 @@ function loadCliContext(signal) {
|
|
|
93884
93797
|
}
|
|
93885
93798
|
const rootConfigResult = loadConfigSync({
|
|
93886
93799
|
cwd: process.cwd(),
|
|
93887
|
-
schema: rootConfigSchema
|
|
93888
|
-
env: process.env
|
|
93800
|
+
schema: rootConfigSchema
|
|
93889
93801
|
});
|
|
93890
93802
|
if (rootConfigResult.isErr()) {
|
|
93891
93803
|
return (0, import_neverthrow96.err)(rootConfigResult.error);
|
|
@@ -93922,7 +93834,7 @@ function buildProgram(options2) {
|
|
|
93922
93834
|
|
|
93923
93835
|
// src/index.ts
|
|
93924
93836
|
process.title = "xqa";
|
|
93925
|
-
var version2 = `${"
|
|
93837
|
+
var version2 = `${"5.0.0"}${false ? ` (dev build +${"1701986"})` : ""}`;
|
|
93926
93838
|
var program2 = buildProgram({ version: version2 });
|
|
93927
93839
|
void program2.parseAsync(process.argv);
|
|
93928
93840
|
/*! Bundled license information:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/xqa",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"@qa-agents/analyser": "0.0.0",
|
|
30
30
|
"@qa-agents/config": "0.0.0",
|
|
31
31
|
"@qa-agents/consolidator": "0.0.0",
|
|
32
|
-
"@qa-agents/explorer": "0.0.0",
|
|
33
|
-
"@qa-agents/inspector": "0.0.0",
|
|
34
|
-
"@qa-agents/eslint-config": "0.0.0",
|
|
35
32
|
"@qa-agents/display": "0.0.0",
|
|
36
|
-
"@qa-agents/
|
|
33
|
+
"@qa-agents/eslint-config": "0.0.0",
|
|
34
|
+
"@qa-agents/explorer": "0.0.0",
|
|
37
35
|
"@qa-agents/pipeline": "0.0.0",
|
|
38
36
|
"@qa-agents/planner": "0.0.0",
|
|
39
37
|
"@qa-agents/shared": "0.0.0",
|
|
40
38
|
"@qa-agents/triager": "0.0.0",
|
|
39
|
+
"@qa-agents/inspector": "0.0.0",
|
|
40
|
+
"@qa-agents/mobile-ios": "0.0.0",
|
|
41
41
|
"@qa-agents/typescript-config": "0.0.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|