@vostride/agent-qa-dashboard 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-CmNQ5PbF.d.cts → index-BL7OautO.d.cts} +7 -1
- package/dist/{index-CmNQ5PbF.d.ts → index-BL7OautO.d.ts} +7 -1
- package/dist/index.cjs +69 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +42 -5
- package/dist/index.js.map +1 -1
- package/dist/server/index.cjs +36 -32
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +9 -2
- package/dist/server/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Server, IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import { RunAttributes, RunArtifactKind, RunArtifactStageInput, RunArtifactPayload, RunArtifactFinalizeInput, LogEntry, ResolvedWorkspacePaths, ModelConfig, SecretStore, SecretRedactor, HookDefinition, ConsoleLogEntry, NetworkLogEntry, StepAnnotation, StepPhaseEvent, StepResult, buildAnalyticsEvent, captureAnalytics, resolveAnalyticsStandardProperties } from '@vostride/agent-qa-core';
|
|
2
|
+
import { RunAttributes, RunArtifactKind, RunArtifactStageInput, RunArtifactPayload, RunArtifactFinalizeInput, LogEntry, ResolvedWorkspacePaths, ModelConfig, ResolvedAppiumExecutable, SecretStore, SecretRedactor, HookDefinition, ConsoleLogEntry, NetworkLogEntry, StepAnnotation, StepPhaseEvent, StepResult, buildAnalyticsEvent, captureAnalytics, resolveAnalyticsStandardProperties } from '@vostride/agent-qa-core';
|
|
3
3
|
import { LocalMcpEndpointConfig, LocalMcpTransport } from '@vostride/agent-qa-mcp';
|
|
4
4
|
import { Document } from 'yaml';
|
|
5
5
|
import { EventEmitter } from 'node:events';
|
|
@@ -447,6 +447,7 @@ declare class DashboardDatabase {
|
|
|
447
447
|
flakyScore: number;
|
|
448
448
|
}[];
|
|
449
449
|
getAccessibilitySummary(runId: string): {
|
|
450
|
+
enabled: boolean | null;
|
|
450
451
|
total: number;
|
|
451
452
|
bySeverity: Record<string, number>;
|
|
452
453
|
byRule: {
|
|
@@ -455,8 +456,11 @@ declare class DashboardDatabase {
|
|
|
455
456
|
ruleId: string;
|
|
456
457
|
}[];
|
|
457
458
|
stepsWithViolations: number;
|
|
459
|
+
scannedSteps: number;
|
|
460
|
+
unscannedSteps: number;
|
|
458
461
|
totalSteps: number;
|
|
459
462
|
};
|
|
463
|
+
private getRunAccessibilityEnabled;
|
|
460
464
|
getStep(stepId: string): StepRow | undefined;
|
|
461
465
|
insertReasoningTrace(trace: {
|
|
462
466
|
stepId: string;
|
|
@@ -548,11 +552,13 @@ declare class AppiumManager {
|
|
|
548
552
|
private anonymousRefCount;
|
|
549
553
|
private leases;
|
|
550
554
|
private logLevel;
|
|
555
|
+
private appiumResolver;
|
|
551
556
|
constructor(opts?: {
|
|
552
557
|
port?: number;
|
|
553
558
|
startupTimeoutMs?: number;
|
|
554
559
|
pollIntervalMs?: number;
|
|
555
560
|
logLevel?: 'normal' | 'debug';
|
|
561
|
+
appiumResolver?: () => ResolvedAppiumExecutable;
|
|
556
562
|
});
|
|
557
563
|
acquire(): Promise<void>;
|
|
558
564
|
release(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Server, IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import { RunAttributes, RunArtifactKind, RunArtifactStageInput, RunArtifactPayload, RunArtifactFinalizeInput, LogEntry, ResolvedWorkspacePaths, ModelConfig, SecretStore, SecretRedactor, HookDefinition, ConsoleLogEntry, NetworkLogEntry, StepAnnotation, StepPhaseEvent, StepResult, buildAnalyticsEvent, captureAnalytics, resolveAnalyticsStandardProperties } from '@vostride/agent-qa-core';
|
|
2
|
+
import { RunAttributes, RunArtifactKind, RunArtifactStageInput, RunArtifactPayload, RunArtifactFinalizeInput, LogEntry, ResolvedWorkspacePaths, ModelConfig, ResolvedAppiumExecutable, SecretStore, SecretRedactor, HookDefinition, ConsoleLogEntry, NetworkLogEntry, StepAnnotation, StepPhaseEvent, StepResult, buildAnalyticsEvent, captureAnalytics, resolveAnalyticsStandardProperties } from '@vostride/agent-qa-core';
|
|
3
3
|
import { LocalMcpEndpointConfig, LocalMcpTransport } from '@vostride/agent-qa-mcp';
|
|
4
4
|
import { Document } from 'yaml';
|
|
5
5
|
import { EventEmitter } from 'node:events';
|
|
@@ -447,6 +447,7 @@ declare class DashboardDatabase {
|
|
|
447
447
|
flakyScore: number;
|
|
448
448
|
}[];
|
|
449
449
|
getAccessibilitySummary(runId: string): {
|
|
450
|
+
enabled: boolean | null;
|
|
450
451
|
total: number;
|
|
451
452
|
bySeverity: Record<string, number>;
|
|
452
453
|
byRule: {
|
|
@@ -455,8 +456,11 @@ declare class DashboardDatabase {
|
|
|
455
456
|
ruleId: string;
|
|
456
457
|
}[];
|
|
457
458
|
stepsWithViolations: number;
|
|
459
|
+
scannedSteps: number;
|
|
460
|
+
unscannedSteps: number;
|
|
458
461
|
totalSteps: number;
|
|
459
462
|
};
|
|
463
|
+
private getRunAccessibilityEnabled;
|
|
460
464
|
getStep(stepId: string): StepRow | undefined;
|
|
461
465
|
insertReasoningTrace(trace: {
|
|
462
466
|
stepId: string;
|
|
@@ -548,11 +552,13 @@ declare class AppiumManager {
|
|
|
548
552
|
private anonymousRefCount;
|
|
549
553
|
private leases;
|
|
550
554
|
private logLevel;
|
|
555
|
+
private appiumResolver;
|
|
551
556
|
constructor(opts?: {
|
|
552
557
|
port?: number;
|
|
553
558
|
startupTimeoutMs?: number;
|
|
554
559
|
pollIntervalMs?: number;
|
|
555
560
|
logLevel?: 'normal' | 'debug';
|
|
561
|
+
appiumResolver?: () => ResolvedAppiumExecutable;
|
|
556
562
|
});
|
|
557
563
|
acquire(): Promise<void>;
|
|
558
564
|
release(): void;
|
package/dist/index.cjs
CHANGED
|
@@ -1204,10 +1204,14 @@ var DashboardDatabase = class {
|
|
|
1204
1204
|
const steps = this.getSteps(runId);
|
|
1205
1205
|
const allViolations = [];
|
|
1206
1206
|
let stepsWithViolations = 0;
|
|
1207
|
+
let scannedSteps = 0;
|
|
1207
1208
|
for (const step of steps) {
|
|
1208
|
-
if (
|
|
1209
|
-
|
|
1210
|
-
|
|
1209
|
+
if (Array.isArray(step.accessibilityViolations)) {
|
|
1210
|
+
scannedSteps++;
|
|
1211
|
+
if (step.accessibilityViolations.length > 0) {
|
|
1212
|
+
stepsWithViolations++;
|
|
1213
|
+
allViolations.push(...step.accessibilityViolations);
|
|
1214
|
+
}
|
|
1211
1215
|
}
|
|
1212
1216
|
}
|
|
1213
1217
|
const bySeverity = { critical: 0, serious: 0, moderate: 0, minor: 0 };
|
|
@@ -1218,13 +1222,39 @@ var DashboardDatabase = class {
|
|
|
1218
1222
|
byRule[v.ruleId].count++;
|
|
1219
1223
|
}
|
|
1220
1224
|
return {
|
|
1225
|
+
enabled: this.getRunAccessibilityEnabled(runId),
|
|
1221
1226
|
total: allViolations.length,
|
|
1222
1227
|
bySeverity,
|
|
1223
1228
|
byRule: Object.entries(byRule).map(([ruleId, data]) => ({ ruleId, ...data })).sort((a, b) => b.count - a.count),
|
|
1224
1229
|
stepsWithViolations,
|
|
1230
|
+
scannedSteps,
|
|
1231
|
+
unscannedSteps: Math.max(0, steps.length - scannedSteps),
|
|
1225
1232
|
totalSteps: steps.length
|
|
1226
1233
|
};
|
|
1227
1234
|
}
|
|
1235
|
+
getRunAccessibilityEnabled(runId) {
|
|
1236
|
+
const artifact = this.getRunArtifact(runId);
|
|
1237
|
+
const payload = artifact?.payload;
|
|
1238
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return null;
|
|
1239
|
+
const config = payload.config;
|
|
1240
|
+
if (!config || typeof config !== "object" || Array.isArray(config)) return null;
|
|
1241
|
+
const configRecord = config;
|
|
1242
|
+
const candidates = [configRecord.effectiveConfig, configRecord.parsedConfig];
|
|
1243
|
+
let sawConfig = false;
|
|
1244
|
+
let sawAccessibility = false;
|
|
1245
|
+
for (const candidate of candidates) {
|
|
1246
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) continue;
|
|
1247
|
+
sawConfig = true;
|
|
1248
|
+
const services = candidate.services;
|
|
1249
|
+
if (!services || typeof services !== "object" || Array.isArray(services)) continue;
|
|
1250
|
+
const accessibility = services.accessibility;
|
|
1251
|
+
if (!accessibility || typeof accessibility !== "object" || Array.isArray(accessibility)) continue;
|
|
1252
|
+
sawAccessibility = true;
|
|
1253
|
+
const enabled = accessibility.enabled;
|
|
1254
|
+
if (typeof enabled === "boolean") return enabled;
|
|
1255
|
+
}
|
|
1256
|
+
return sawConfig || sawAccessibility ? false : null;
|
|
1257
|
+
}
|
|
1228
1258
|
getStep(stepId) {
|
|
1229
1259
|
const row = this.db.prepare("SELECT * FROM steps WHERE id = ?").get(stepId);
|
|
1230
1260
|
return row ? this.mapStepRow(row) : void 0;
|
|
@@ -8304,6 +8334,7 @@ var ConfigManager = class {
|
|
|
8304
8334
|
// src/execution/appium-manager.ts
|
|
8305
8335
|
var import_node_http = require("http");
|
|
8306
8336
|
var import_node_child_process2 = require("child_process");
|
|
8337
|
+
var import_agent_qa_core11 = require("@vostride/agent-qa-core");
|
|
8307
8338
|
var import_tree_kill2 = __toESM(require("tree-kill"), 1);
|
|
8308
8339
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
8309
8340
|
var APPIUM_PREFIX = import_picocolors.default.magenta("[appium]");
|
|
@@ -8318,11 +8349,13 @@ var AppiumManager = class {
|
|
|
8318
8349
|
anonymousRefCount = 0;
|
|
8319
8350
|
leases = /* @__PURE__ */ new Map();
|
|
8320
8351
|
logLevel;
|
|
8352
|
+
appiumResolver;
|
|
8321
8353
|
constructor(opts) {
|
|
8322
8354
|
this.port = opts?.port ?? 4723;
|
|
8323
8355
|
this.startupTimeoutMs = opts?.startupTimeoutMs ?? 3e4;
|
|
8324
8356
|
this.pollIntervalMs = opts?.pollIntervalMs ?? 500;
|
|
8325
8357
|
this.logLevel = opts?.logLevel ?? "normal";
|
|
8358
|
+
this.appiumResolver = opts?.appiumResolver ?? import_agent_qa_core11.resolveAppiumExecutable;
|
|
8326
8359
|
}
|
|
8327
8360
|
async acquire() {
|
|
8328
8361
|
await this.ensureRunning();
|
|
@@ -8417,14 +8450,15 @@ var AppiumManager = class {
|
|
|
8417
8450
|
});
|
|
8418
8451
|
}
|
|
8419
8452
|
async startAndWait() {
|
|
8420
|
-
const
|
|
8453
|
+
const appium = this.appiumResolver();
|
|
8454
|
+
const child = (0, import_node_child_process2.spawn)(appium.command, ["-p", String(this.port), "--relaxed-security", "--log-no-colors"], {
|
|
8421
8455
|
stdio: ["ignore", "pipe", "pipe"]
|
|
8422
8456
|
});
|
|
8423
8457
|
this.process = child;
|
|
8424
8458
|
this.managed = true;
|
|
8425
8459
|
child.on("error", (err) => {
|
|
8426
8460
|
if (err.code === "ENOENT") {
|
|
8427
|
-
console.error(`${APPIUM_PREFIX} Appium not found.
|
|
8461
|
+
console.error(`${APPIUM_PREFIX} Appium not found. ${(0, import_agent_qa_core11.formatAppiumInstallGuidance)()}`);
|
|
8428
8462
|
} else {
|
|
8429
8463
|
console.error(`${APPIUM_PREFIX} Error: ${err.message}`);
|
|
8430
8464
|
}
|
|
@@ -8520,13 +8554,13 @@ var import_node_crypto4 = require("crypto");
|
|
|
8520
8554
|
|
|
8521
8555
|
// src/live-editor/live-session.ts
|
|
8522
8556
|
var import_node_crypto3 = require("crypto");
|
|
8523
|
-
var
|
|
8557
|
+
var import_agent_qa_core13 = require("@vostride/agent-qa-core");
|
|
8524
8558
|
|
|
8525
8559
|
// src/live-editor/mobile-bootstrap.ts
|
|
8526
8560
|
var import_promises10 = require("fs/promises");
|
|
8527
8561
|
var import_node_path12 = require("path");
|
|
8528
8562
|
var import_yaml8 = require("yaml");
|
|
8529
|
-
var
|
|
8563
|
+
var import_agent_qa_core12 = require("@vostride/agent-qa-core");
|
|
8530
8564
|
async function loadLocalBindings(configPath) {
|
|
8531
8565
|
const filePath = (0, import_node_path12.join)((0, import_node_path12.dirname)(configPath), "agent-qa.local.yaml");
|
|
8532
8566
|
try {
|
|
@@ -8544,8 +8578,8 @@ async function loadLocalBindings(configPath) {
|
|
|
8544
8578
|
}
|
|
8545
8579
|
}
|
|
8546
8580
|
function asMobileSetupError(err, category, message, input) {
|
|
8547
|
-
if (err instanceof
|
|
8548
|
-
return new
|
|
8581
|
+
if (err instanceof import_agent_qa_core12.MobileSetupError) return err;
|
|
8582
|
+
return new import_agent_qa_core12.MobileSetupError({
|
|
8549
8583
|
category,
|
|
8550
8584
|
message: `${message}: ${err instanceof Error ? err.message : String(err)}`,
|
|
8551
8585
|
platform: input.platform,
|
|
@@ -8555,7 +8589,7 @@ function asMobileSetupError(err, category, message, input) {
|
|
|
8555
8589
|
}
|
|
8556
8590
|
async function prepareMobileLiveSession(input) {
|
|
8557
8591
|
if (!input.targetName) {
|
|
8558
|
-
throw new
|
|
8592
|
+
throw new import_agent_qa_core12.MobileSetupError({
|
|
8559
8593
|
category: "device-resolution",
|
|
8560
8594
|
message: `No targetName provided for ${input.platform} live session`,
|
|
8561
8595
|
platform: input.platform
|
|
@@ -8571,7 +8605,7 @@ async function prepareMobileLiveSession(input) {
|
|
|
8571
8605
|
const configuredAppState = config.use?.mobile?.appState;
|
|
8572
8606
|
let resolved;
|
|
8573
8607
|
try {
|
|
8574
|
-
resolved = (0,
|
|
8608
|
+
resolved = (0, import_agent_qa_core12.resolveMobileRunConfig)({
|
|
8575
8609
|
config,
|
|
8576
8610
|
targetName: input.targetName,
|
|
8577
8611
|
platform: input.platform,
|
|
@@ -8587,7 +8621,7 @@ async function prepareMobileLiveSession(input) {
|
|
|
8587
8621
|
try {
|
|
8588
8622
|
await input.appiumManager.acquireLease({ runId: input.sessionId, platform: input.platform });
|
|
8589
8623
|
} catch (err) {
|
|
8590
|
-
throw new
|
|
8624
|
+
throw new import_agent_qa_core12.MobileSetupError({
|
|
8591
8625
|
category: "appium-startup",
|
|
8592
8626
|
message: `Failed to acquire Appium for ${input.platform} live session: ${err instanceof Error ? err.message : String(err)}`,
|
|
8593
8627
|
platform: input.platform,
|
|
@@ -8703,9 +8737,9 @@ function classifyAdapterSetupError(err) {
|
|
|
8703
8737
|
return "device-readiness";
|
|
8704
8738
|
}
|
|
8705
8739
|
function wrapAdapterSetupError(err, platform, config) {
|
|
8706
|
-
if (err instanceof
|
|
8740
|
+
if (err instanceof import_agent_qa_core13.MobileSetupError) return err;
|
|
8707
8741
|
const appId = platform === "android" ? config.appPackage : config.bundleId;
|
|
8708
|
-
return new
|
|
8742
|
+
return new import_agent_qa_core13.MobileSetupError({
|
|
8709
8743
|
category: classifyAdapterSetupError(err),
|
|
8710
8744
|
message: `Failed to create ${platform} adapter session: ${err instanceof Error ? err.message : String(err)}`,
|
|
8711
8745
|
platform,
|
|
@@ -8785,10 +8819,10 @@ var LiveSession = class {
|
|
|
8785
8819
|
this.pendingMessages.push(message);
|
|
8786
8820
|
}
|
|
8787
8821
|
redact(value) {
|
|
8788
|
-
return (0,
|
|
8822
|
+
return (0, import_agent_qa_core13.redactSecretValue)(value, this.secretRedactor);
|
|
8789
8823
|
}
|
|
8790
8824
|
resolveSecrets(value) {
|
|
8791
|
-
return (0,
|
|
8825
|
+
return (0, import_agent_qa_core13.resolveSecretTemplatesInValue)(value, this.secretStore);
|
|
8792
8826
|
}
|
|
8793
8827
|
emitHookStart(hookDef, phase, owner = { scope: "suite" }) {
|
|
8794
8828
|
const hook = {
|
|
@@ -8875,7 +8909,7 @@ var LiveSession = class {
|
|
|
8875
8909
|
}
|
|
8876
8910
|
continue;
|
|
8877
8911
|
}
|
|
8878
|
-
const result = await (0,
|
|
8912
|
+
const result = await (0, import_agent_qa_core13.runHooks)([hookDef], {
|
|
8879
8913
|
envVars: this.getHookEnvVars(),
|
|
8880
8914
|
secretStore: this.secretStore,
|
|
8881
8915
|
secretRedactor: this.secretRedactor
|
|
@@ -8985,7 +9019,7 @@ var LiveSession = class {
|
|
|
8985
9019
|
adapter = new IOSPlatformAdapter();
|
|
8986
9020
|
}
|
|
8987
9021
|
} catch (err) {
|
|
8988
|
-
throw new
|
|
9022
|
+
throw new import_agent_qa_core13.MobileSetupError({
|
|
8989
9023
|
category: "adapter-load",
|
|
8990
9024
|
message: `Failed to load ${platformLabel} adapter (@vostride/agent-qa-${platform}). Is the package installed? ${err instanceof Error ? err.message : String(err)}`,
|
|
8991
9025
|
platform,
|
|
@@ -9007,7 +9041,7 @@ var LiveSession = class {
|
|
|
9007
9041
|
} catch {
|
|
9008
9042
|
}
|
|
9009
9043
|
this.releaseMobileAppiumLease("setup-failed");
|
|
9010
|
-
if (err instanceof
|
|
9044
|
+
if (err instanceof import_agent_qa_core13.MobileSetupError) {
|
|
9011
9045
|
throw new Error(mobileSetupMessage(err));
|
|
9012
9046
|
}
|
|
9013
9047
|
throw err;
|
|
@@ -9016,7 +9050,7 @@ var LiveSession = class {
|
|
|
9016
9050
|
async initialize(config) {
|
|
9017
9051
|
this.platform = config.platform;
|
|
9018
9052
|
this._modelName = config.llmConfig.model ?? "unknown";
|
|
9019
|
-
this.variableStore = new
|
|
9053
|
+
this.variableStore = new import_agent_qa_core13.VariableStore();
|
|
9020
9054
|
this.secretStore = config.secretStore;
|
|
9021
9055
|
this.secretRedactor = config.secretRedactor;
|
|
9022
9056
|
if (config.envVars) {
|
|
@@ -9060,10 +9094,10 @@ var LiveSession = class {
|
|
|
9060
9094
|
...config.llmConfig,
|
|
9061
9095
|
...config.authFetch ? { fetch: config.authFetch } : {}
|
|
9062
9096
|
};
|
|
9063
|
-
this.model = await (0,
|
|
9064
|
-
const providerOptions = (0,
|
|
9065
|
-
this.planner = new
|
|
9066
|
-
this.verifier = new
|
|
9097
|
+
this.model = await (0, import_agent_qa_core13.createModel)(modelConfig);
|
|
9098
|
+
const providerOptions = (0, import_agent_qa_core13.getProviderOptions)(modelConfig);
|
|
9099
|
+
this.planner = new import_agent_qa_core13.LLMPlanner(this.model, config.platform, providerOptions, void 0, config.agentRules);
|
|
9100
|
+
this.verifier = new import_agent_qa_core13.LLMVerifier(this.model, providerOptions);
|
|
9067
9101
|
this.status = "idle";
|
|
9068
9102
|
this.createdAt = Date.now();
|
|
9069
9103
|
this.readyForInteraction = true;
|
|
@@ -9073,7 +9107,7 @@ var LiveSession = class {
|
|
|
9073
9107
|
let instruction = stepInstruction;
|
|
9074
9108
|
let hasTemplateVars = false;
|
|
9075
9109
|
const executionLogs = [];
|
|
9076
|
-
const inlineHookCalls = (0,
|
|
9110
|
+
const inlineHookCalls = (0, import_agent_qa_core13.parseHookInline)(stepInstruction);
|
|
9077
9111
|
if (inlineHookCalls.length > 0) {
|
|
9078
9112
|
let inlineHookFailed = false;
|
|
9079
9113
|
for (const call of inlineHookCalls) {
|
|
@@ -9088,7 +9122,7 @@ var LiveSession = class {
|
|
|
9088
9122
|
}
|
|
9089
9123
|
const startedAt = performance.now();
|
|
9090
9124
|
try {
|
|
9091
|
-
const result = await (0,
|
|
9125
|
+
const result = await (0, import_agent_qa_core13.runHookInSandbox)(hookDef, {
|
|
9092
9126
|
envVars: this.getHookEnvVars(),
|
|
9093
9127
|
secretStore: this.secretStore,
|
|
9094
9128
|
secretRedactor: this.secretRedactor
|
|
@@ -9134,7 +9168,7 @@ var LiveSession = class {
|
|
|
9134
9168
|
break;
|
|
9135
9169
|
}
|
|
9136
9170
|
}
|
|
9137
|
-
instruction = (0,
|
|
9171
|
+
instruction = (0, import_agent_qa_core13.stripHookInline)(stepInstruction);
|
|
9138
9172
|
hasTemplateVars = true;
|
|
9139
9173
|
if (inlineHookFailed) {
|
|
9140
9174
|
return {
|
|
@@ -9145,7 +9179,7 @@ var LiveSession = class {
|
|
|
9145
9179
|
};
|
|
9146
9180
|
}
|
|
9147
9181
|
}
|
|
9148
|
-
instruction = (0,
|
|
9182
|
+
instruction = (0, import_agent_qa_core13.interpolateVariables)(instruction, this.variableStore);
|
|
9149
9183
|
hasTemplateVars = hasTemplateVars || originalStepName !== instruction;
|
|
9150
9184
|
const runJSMatches = parseRunJSInline(instruction);
|
|
9151
9185
|
if (runJSMatches.length > 0) {
|
|
@@ -9272,7 +9306,7 @@ var LiveSession = class {
|
|
|
9272
9306
|
this.stepsExecuted++;
|
|
9273
9307
|
return result2;
|
|
9274
9308
|
}
|
|
9275
|
-
const unresolvedTemplates = (0,
|
|
9309
|
+
const unresolvedTemplates = (0, import_agent_qa_core13.findUnresolvedTemplates)(prepared.instruction);
|
|
9276
9310
|
if (unresolvedTemplates.length > 0) {
|
|
9277
9311
|
const errorLines = unresolvedTemplates.map((template) => ` - ${template.pattern}: ${template.message}`);
|
|
9278
9312
|
const error = `Unresolved template variable(s):
|
|
@@ -9314,7 +9348,7 @@ ${errorLines.join("\n")}`;
|
|
|
9314
9348
|
healingConfig: { maxAttempts: 3 },
|
|
9315
9349
|
variables: this.redact(variables)
|
|
9316
9350
|
};
|
|
9317
|
-
let result = await (0,
|
|
9351
|
+
let result = await (0, import_agent_qa_core13.executeStep)(prepared.instruction, loopConfig, stepContext);
|
|
9318
9352
|
result.originalStepName = prepared.originalStepName;
|
|
9319
9353
|
result.variableSnapshot = this.variableStore.snapshot();
|
|
9320
9354
|
result.executionLogs = this.redact(prepared.executionLogs);
|
|
@@ -9669,7 +9703,7 @@ var SessionManager = class {
|
|
|
9669
9703
|
};
|
|
9670
9704
|
|
|
9671
9705
|
// src/live-editor/ws-handler.ts
|
|
9672
|
-
var
|
|
9706
|
+
var import_agent_qa_core14 = require("@vostride/agent-qa-core");
|
|
9673
9707
|
function send(ws, msg) {
|
|
9674
9708
|
if (ws.readyState === ws.OPEN) {
|
|
9675
9709
|
ws.send(JSON.stringify(msg));
|
|
@@ -9837,7 +9871,7 @@ function createSessionHandler(session, onTerminate, onTokenUsage, testFileManage
|
|
|
9837
9871
|
console.error(`[ws-handler] execute-test: read failed for path=${msg.path}`, readErr);
|
|
9838
9872
|
throw new Error(`Cannot read test file "${msg.path}": ${readErr?.message ?? String(readErr)}`);
|
|
9839
9873
|
}
|
|
9840
|
-
const parsed = (0,
|
|
9874
|
+
const parsed = (0, import_agent_qa_core14.parseTestFile)(raw, msg.path);
|
|
9841
9875
|
if (parsed.errors.length > 0) {
|
|
9842
9876
|
console.error(`[ws-handler] execute-test: parse errors for ${msg.path}`, parsed.errors);
|
|
9843
9877
|
throw new Error(`Parse error in ${msg.path}: ${parsed.errors[0].message}`);
|
|
@@ -10017,7 +10051,7 @@ function createSessionHandler(session, onTerminate, onTokenUsage, testFileManage
|
|
|
10017
10051
|
}
|
|
10018
10052
|
|
|
10019
10053
|
// src/server/server.ts
|
|
10020
|
-
var
|
|
10054
|
+
var import_agent_qa_core15 = require("@vostride/agent-qa-core");
|
|
10021
10055
|
var import_agent_qa_mcp = require("@vostride/agent-qa-mcp");
|
|
10022
10056
|
var MIME_TYPES = {
|
|
10023
10057
|
".html": "text/html; charset=utf-8",
|
|
@@ -10436,8 +10470,8 @@ async function startServer(opts) {
|
|
|
10436
10470
|
const captureMcpLifecycle = async (properties) => {
|
|
10437
10471
|
if (isAnalyticsPrivacyEnabled(config)) return;
|
|
10438
10472
|
try {
|
|
10439
|
-
const standardProperties = await (0,
|
|
10440
|
-
await (0,
|
|
10473
|
+
const standardProperties = await (0, import_agent_qa_core15.resolveAnalyticsStandardProperties)({ surface: "dashboard-server" });
|
|
10474
|
+
await (0, import_agent_qa_core15.captureAnalytics)((0, import_agent_qa_core15.buildAnalyticsEvent)({
|
|
10441
10475
|
name: "agent-qa.mcp.server.lifecycle",
|
|
10442
10476
|
properties: {
|
|
10443
10477
|
...standardProperties,
|