@swmansion/argent 0.35.1-next.94 → 0.35.1-next.95
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/cli-cmds.mjs +15 -9
- package/dist/installer.mjs +1 -1
- package/dist/mcp-server.mjs +1 -1
- package/dist/tool-args.generated.d.ts +4 -0
- package/dist/tool-server.cjs +83 -44
- package/package.json +2 -2
- package/skills/argent-create-e2e/SKILL.md +1 -1
package/dist/cli-cmds.mjs
CHANGED
|
@@ -39147,7 +39147,7 @@ function isCi(env = process.env) {
|
|
|
39147
39147
|
var SESSION_ID2 = randomUUID5();
|
|
39148
39148
|
function readCliVersion() {
|
|
39149
39149
|
if (true) {
|
|
39150
|
-
return "0.35.1-next.
|
|
39150
|
+
return "0.35.1-next.95";
|
|
39151
39151
|
}
|
|
39152
39152
|
return "0.0.0";
|
|
39153
39153
|
}
|
|
@@ -40438,14 +40438,15 @@ Subcommands:
|
|
|
40438
40438
|
path and an optional warning and suite per entry,
|
|
40439
40439
|
plus name, legacy and shadowedBy when no dir is
|
|
40440
40440
|
given
|
|
40441
|
-
check <test|test.yaml> [--json]
|
|
40441
|
+
check <test|test.yaml> [--var NAME=value ...] [--json]
|
|
40442
40442
|
Check an e2e test without a device and without
|
|
40443
40443
|
running a step: parse it, apply the checks \`run\`
|
|
40444
40444
|
makes before the first step, and check tool names,
|
|
40445
|
-
tool arguments
|
|
40446
|
-
fragments and e2e-execute tests
|
|
40447
|
-
|
|
40448
|
-
|
|
40445
|
+
tool arguments, script files and var references,
|
|
40446
|
+
also in the run: fragments and e2e-execute tests
|
|
40447
|
+
its steps reach. --var sets the vars \`run\` would
|
|
40448
|
+
get. Reports every step that does not parse; a
|
|
40449
|
+
file with such a step gets no other check.
|
|
40449
40450
|
Prints each problem on stderr and exits 1 when it
|
|
40450
40451
|
finds one.
|
|
40451
40452
|
--json prints { "ok", "e2eTests": [...] } instead,
|
|
@@ -40493,6 +40494,7 @@ Examples:
|
|
|
40493
40494
|
argent e2e run login --var PASSWORD='{{secret:ALICE_PASSWORD}}'
|
|
40494
40495
|
argent e2e run login --secrets-file /tmp/run-42.env
|
|
40495
40496
|
argent e2e check checkout
|
|
40497
|
+
argent e2e check checkout --var API_URL=https://staging.example.com
|
|
40496
40498
|
`);
|
|
40497
40499
|
}
|
|
40498
40500
|
var RUN_OPTIONS = {
|
|
@@ -40513,7 +40515,8 @@ var LIST_OPTIONS = {
|
|
|
40513
40515
|
recursive: { kind: "boolean", alias: "r" }
|
|
40514
40516
|
};
|
|
40515
40517
|
var CHECK_OPTIONS = {
|
|
40516
|
-
json: { kind: "boolean" }
|
|
40518
|
+
json: { kind: "boolean" },
|
|
40519
|
+
var: { kind: "value", repeatable: true }
|
|
40517
40520
|
};
|
|
40518
40521
|
function parseRunArgs(argv) {
|
|
40519
40522
|
let parsed;
|
|
@@ -41427,6 +41430,7 @@ async function e2eCheck(argv, options) {
|
|
|
41427
41430
|
}
|
|
41428
41431
|
let ref;
|
|
41429
41432
|
let json2;
|
|
41433
|
+
let vars;
|
|
41430
41434
|
try {
|
|
41431
41435
|
const parsed = parseCommandArgs(argv, CHECK_OPTIONS);
|
|
41432
41436
|
if (parsed.positionals.length > 1) {
|
|
@@ -41441,8 +41445,9 @@ async function e2eCheck(argv, options) {
|
|
|
41441
41445
|
}
|
|
41442
41446
|
ref = parsed.positionals[0];
|
|
41443
41447
|
json2 = parsed.options.json === true;
|
|
41448
|
+
if (parsed.options.var !== void 0) vars = parseVarFlags(parsed.options.var);
|
|
41444
41449
|
} catch (err) {
|
|
41445
|
-
if (!(err instanceof UsageError)) throw err;
|
|
41450
|
+
if (!(err instanceof UsageError) && !(err instanceof FlagParseException)) throw err;
|
|
41446
41451
|
console.error(
|
|
41447
41452
|
argv.some((tok) => tok === "--json" || tok.startsWith("--json=")) ? JSON.stringify(errorRecord(err.message)) : `Error: ${err.message}
|
|
41448
41453
|
Run \`argent e2e --help\`.`
|
|
@@ -41488,7 +41493,8 @@ Run \`argent e2e --help\`.`
|
|
|
41488
41493
|
try {
|
|
41489
41494
|
const resp = await client2.callTool(CHECK_TOOL_ID, {
|
|
41490
41495
|
e2e_test_path: target.path,
|
|
41491
|
-
project_root: projectRoot
|
|
41496
|
+
project_root: projectRoot,
|
|
41497
|
+
...vars !== void 0 && { vars }
|
|
41492
41498
|
});
|
|
41493
41499
|
const found = resp.data.problems;
|
|
41494
41500
|
problems = found.map((problem) => ({ file: suppliedPath, ...problem }));
|
package/dist/installer.mjs
CHANGED
|
@@ -17177,7 +17177,7 @@ function isCi(env = process.env) {
|
|
|
17177
17177
|
var SESSION_ID = randomUUID4();
|
|
17178
17178
|
function readCliVersion() {
|
|
17179
17179
|
if (true) {
|
|
17180
|
-
return "0.35.1-next.
|
|
17180
|
+
return "0.35.1-next.95";
|
|
17181
17181
|
}
|
|
17182
17182
|
return "0.0.0";
|
|
17183
17183
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -38588,7 +38588,7 @@ async function startMcpServer(options) {
|
|
|
38588
38588
|
const autoDescribeOn = autoDescribeEnabled();
|
|
38589
38589
|
const whatsNewOn = whatsNewEnabled();
|
|
38590
38590
|
const installedVersion = getInstalledVersion();
|
|
38591
|
-
const highlightsVersion = true ? "0.35.1-next.
|
|
38591
|
+
const highlightsVersion = true ? "0.35.1-next.95" : installedVersion;
|
|
38592
38592
|
const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
|
|
38593
38593
|
const trees = createTreeMemory();
|
|
38594
38594
|
const screenshots = createScreenshotMemory();
|
|
@@ -340,6 +340,10 @@ export interface ArgentToolArgs {
|
|
|
340
340
|
e2e_test_file?: string;
|
|
341
341
|
/** Absolute path to an e2e test .yaml on the client. */
|
|
342
342
|
e2e_test_path?: string;
|
|
343
|
+
/** The vars the run would set, as e2e-execute takes them. */
|
|
344
|
+
vars?: {
|
|
345
|
+
[key: string]: string;
|
|
346
|
+
};
|
|
343
347
|
};
|
|
344
348
|
"e2e-execute": {
|
|
345
349
|
/** Saved e2e test name in `<project_root>/.argent/e2e/` (or `.argent/flows/`). */
|
package/dist/tool-server.cjs
CHANGED
|
@@ -73425,7 +73425,7 @@ function isCi(env = process.env) {
|
|
|
73425
73425
|
var SESSION_ID = (0, import_node_crypto4.randomUUID)();
|
|
73426
73426
|
function readCliVersion() {
|
|
73427
73427
|
if (true) {
|
|
73428
|
-
return "0.35.1-next.
|
|
73428
|
+
return "0.35.1-next.95";
|
|
73429
73429
|
}
|
|
73430
73430
|
return "0.0.0";
|
|
73431
73431
|
}
|
|
@@ -80031,11 +80031,7 @@ function resolveStepReferences(step, output2, vars) {
|
|
|
80031
80031
|
let value = field2.value;
|
|
80032
80032
|
if (holdsVarMarker(field2.value)) {
|
|
80033
80033
|
const secret = field2.secretOk ? void 0 : secretVarNames(field2.value, vars)[0];
|
|
80034
|
-
if (secret !== void 0)
|
|
80035
|
-
throw new VarReferenceError(
|
|
80036
|
-
`\`${field2.where}\` takes {{var:${secret}}}, whose value is a {{secret:...}} placeholder. A secret resolves only in text a step types, a tool's arguments and a script's env; here it would be compared as literal text that is never on screen`
|
|
80037
|
-
);
|
|
80038
|
-
}
|
|
80034
|
+
if (secret !== void 0) throw new VarReferenceError(secretVarReason(field2.where, secret));
|
|
80039
80035
|
value = field2.typed ? resolveVarValue(field2.value, vars) : resolveVarText(field2.value, vars);
|
|
80040
80036
|
}
|
|
80041
80037
|
if (typeof value === "string" && holdsOutputMarker(value)) {
|
|
@@ -80053,6 +80049,17 @@ function resolveStepReferences(step, output2, vars) {
|
|
|
80053
80049
|
}
|
|
80054
80050
|
return copy;
|
|
80055
80051
|
}
|
|
80052
|
+
function secretVarReason(where, name) {
|
|
80053
|
+
return `\`${where}\` takes {{var:${name}}}, whose value is a {{secret:...}} placeholder. A secret resolves only in text a step types, a tool's arguments and a script's env; here it would be compared as literal text that is never on screen`;
|
|
80054
|
+
}
|
|
80055
|
+
function secretVarProblem(step, vars) {
|
|
80056
|
+
for (const field2 of outputReferenceFields(step)) {
|
|
80057
|
+
if (!field2.set || field2.secretOk) continue;
|
|
80058
|
+
const secret = secretVarNames(field2.value, vars)[0];
|
|
80059
|
+
if (secret !== void 0) return secretVarReason(field2.where, secret);
|
|
80060
|
+
}
|
|
80061
|
+
return void 0;
|
|
80062
|
+
}
|
|
80056
80063
|
function stepReferenceProblem(step) {
|
|
80057
80064
|
for (const field2 of outputReferenceFields(step)) {
|
|
80058
80065
|
if (!holdsReferenceMarker(field2.value)) continue;
|
|
@@ -173827,6 +173834,21 @@ async function unrunnableScriptRefusal(flow, flowName) {
|
|
|
173827
173834
|
message: `E2E test "${flowName}" was not run. ${reason2}`
|
|
173828
173835
|
};
|
|
173829
173836
|
}
|
|
173837
|
+
function unsetVarRefusal(flow, flowName, vars) {
|
|
173838
|
+
const problem = unsetVarProblem([...flow.steps, ...flow.shutdown ?? []], vars);
|
|
173839
|
+
if (!problem) return void 0;
|
|
173840
|
+
return {
|
|
173841
|
+
code: FAILURE_CODES.FLOW_FILE_INVALID,
|
|
173842
|
+
message: `E2E test "${flowName}" was not run. ${problem}`
|
|
173843
|
+
};
|
|
173844
|
+
}
|
|
173845
|
+
function fragmentUnsetVarProblem(fragment, target, vars) {
|
|
173846
|
+
return unsetVarProblem(
|
|
173847
|
+
[...fragment.steps, ...fragment.shutdown ?? []],
|
|
173848
|
+
vars,
|
|
173849
|
+
`Fragment "${escapeInline(target)}" step`
|
|
173850
|
+
);
|
|
173851
|
+
}
|
|
173830
173852
|
function chromiumPinnable(app, platform) {
|
|
173831
173853
|
if (typeof app === "string") return platform === "chromium";
|
|
173832
173854
|
return chromiumLaunchSpec(app) !== null;
|
|
@@ -173867,15 +173889,25 @@ function toolArgsRefusal(tool, def, stepArgs) {
|
|
|
173867
173889
|
if (issues.length === 0) return void 0;
|
|
173868
173890
|
return `Invalid params for tool "${toolId}": ${describeParamIssues({ issues }, args)}`;
|
|
173869
173891
|
}
|
|
173870
|
-
async function stepProblem(walk, step, flowDir) {
|
|
173892
|
+
async function stepProblem(walk, step, flowDir, vars) {
|
|
173871
173893
|
if (step.kind === "script") {
|
|
173872
173894
|
const located = await locateScript(flowDir, step.path);
|
|
173873
173895
|
return "refused" in located ? located.refused.reason : void 0;
|
|
173874
173896
|
}
|
|
173875
|
-
if (step.kind !== "tool") return
|
|
173897
|
+
if (step.kind !== "tool") return vars && secretVarProblem(step, scopeVars(vars));
|
|
173876
173898
|
const def = walk.schemas(step.name);
|
|
173877
173899
|
return def ? toolArgsRefusal(step.name, def, step.args) : `Tool "${step.name}" not found`;
|
|
173878
173900
|
}
|
|
173901
|
+
function scopeVars(scope) {
|
|
173902
|
+
return mergeScriptEnv(scope.fileVars, scope.runVars);
|
|
173903
|
+
}
|
|
173904
|
+
function nestedRunVars(args) {
|
|
173905
|
+
const { vars } = args;
|
|
173906
|
+
if (vars === void 0) return {};
|
|
173907
|
+
if (typeof vars !== "object" || vars === null || Array.isArray(vars)) return void 0;
|
|
173908
|
+
if (!Object.values(vars).every((value) => typeof value === "string")) return void 0;
|
|
173909
|
+
return mergeScriptEnv(vars);
|
|
173910
|
+
}
|
|
173879
173911
|
function report(walk, at, message, code) {
|
|
173880
173912
|
walk.problems.push({
|
|
173881
173913
|
...at !== void 0 && { at },
|
|
@@ -173910,13 +173942,15 @@ function childFloor(floor, visit3, stack) {
|
|
|
173910
173942
|
function isNewRefusal(floor, refusal) {
|
|
173911
173943
|
return floor === void 0 || refusal.tooDeep === true || refusal.cycleAt !== void 0 && refusal.cycleAt < floor;
|
|
173912
173944
|
}
|
|
173913
|
-
async function checkTest(walk, flow, flowName, stack, edge, floor) {
|
|
173945
|
+
async function checkTest(walk, flow, flowName, stack, runVars, edge, floor) {
|
|
173946
|
+
const vars = runVars && { fileVars: mergeScriptEnv(flow.vars), runVars };
|
|
173914
173947
|
if (floor !== void 0) {
|
|
173915
|
-
return followReferences(walk, flow, stack, flowName, edge?.prefix ?? [], floor);
|
|
173948
|
+
return followReferences(walk, flow, stack, flowName, edge?.prefix ?? [], vars, floor);
|
|
173916
173949
|
}
|
|
173917
173950
|
const refusals = [
|
|
173918
173951
|
retiredArgRefusal(walk.schemas, flow, flowName),
|
|
173919
173952
|
await unrunnableScriptRefusal(flow, flowName),
|
|
173953
|
+
vars && unsetVarRefusal(flow, flowName, scopeVars(vars)),
|
|
173920
173954
|
flow.executionPrerequisite ? await leadingLaunchRefusal(
|
|
173921
173955
|
flow,
|
|
173922
173956
|
stack,
|
|
@@ -173928,24 +173962,27 @@ async function checkTest(walk, flow, flowName, stack, edge, floor) {
|
|
|
173928
173962
|
for (const refusal of refusals) {
|
|
173929
173963
|
if (refusal) report(walk, edge?.at, refusal.message, edge ? void 0 : refusal.code);
|
|
173930
173964
|
}
|
|
173931
|
-
await followReferences(walk, flow, stack, flowName, edge?.prefix ?? [], void 0);
|
|
173965
|
+
await followReferences(walk, flow, stack, flowName, edge?.prefix ?? [], vars, void 0);
|
|
173932
173966
|
}
|
|
173933
|
-
async function followReferences(walk, flow, stack, rootDisplay, prefix, floor) {
|
|
173967
|
+
async function followReferences(walk, flow, stack, rootDisplay, prefix, vars, floor) {
|
|
173934
173968
|
const flowDir = path70.dirname(stack[stack.length - 1].canonical);
|
|
173935
173969
|
for (const { step, at } of walkFlow(flow, "", prefix)) {
|
|
173936
173970
|
if (floor === void 0) {
|
|
173937
|
-
const problem = await stepProblem(walk, step, flowDir);
|
|
173971
|
+
const problem = await stepProblem(walk, step, flowDir, vars);
|
|
173938
173972
|
if (problem !== void 0) report(walk, at, problem);
|
|
173939
173973
|
}
|
|
173940
173974
|
if (step.kind === "run") {
|
|
173941
|
-
await followRun(walk, step.flow, stack, rootDisplay, at, floor);
|
|
173975
|
+
await followRun(walk, step.flow, stack, rootDisplay, at, vars, floor);
|
|
173942
173976
|
} else if (step.kind === "tool" && canonicalToolId(step.name) === "e2e-execute") {
|
|
173943
173977
|
const target = nestedFlowTarget(step.args);
|
|
173944
|
-
if (target)
|
|
173978
|
+
if (target) {
|
|
173979
|
+
const runVars = nestedRunVars(step.args);
|
|
173980
|
+
await followNested(walk, step.name, target, stack, at, runVars, floor);
|
|
173981
|
+
}
|
|
173945
173982
|
}
|
|
173946
173983
|
}
|
|
173947
173984
|
}
|
|
173948
|
-
async function followRun(walk, target, stack, rootDisplay, at, floor) {
|
|
173985
|
+
async function followRun(walk, target, stack, rootDisplay, at, vars, floor) {
|
|
173949
173986
|
const guarded = await guardRunHop(walk.project, stack, rootDisplay, target);
|
|
173950
173987
|
if ("refusal" in guarded) {
|
|
173951
173988
|
if (isNewRefusal(floor, guarded)) report(walk, at, guarded.refusal);
|
|
@@ -173969,8 +174006,12 @@ async function followRun(walk, target, stack, rootDisplay, at, floor) {
|
|
|
173969
174006
|
return;
|
|
173970
174007
|
}
|
|
173971
174008
|
if (fragment === void 0) return;
|
|
174009
|
+
const fragmentVars = vars && {
|
|
174010
|
+
fileVars: mergeScriptEnv(fragment.vars, vars.fileVars),
|
|
174011
|
+
runVars: vars.runVars
|
|
174012
|
+
};
|
|
173972
174013
|
if (inner === void 0) {
|
|
173973
|
-
const refusal = await fragmentLoadRefusal(walk.schemas, fragment, target);
|
|
174014
|
+
const refusal = await fragmentLoadRefusal(walk.schemas, fragment, target) ?? (fragmentVars && fragmentUnsetVarProblem(fragment, target, scopeVars(fragmentVars)));
|
|
173974
174015
|
if (refusal !== void 0) report(walk, at, refusal);
|
|
173975
174016
|
}
|
|
173976
174017
|
await followReferences(
|
|
@@ -173979,10 +174020,11 @@ async function followRun(walk, target, stack, rootDisplay, at, floor) {
|
|
|
173979
174020
|
[...stack, { canonical: hop.canonical, display }],
|
|
173980
174021
|
rootDisplay,
|
|
173981
174022
|
prefix,
|
|
174023
|
+
fragmentVars,
|
|
173982
174024
|
inner
|
|
173983
174025
|
);
|
|
173984
174026
|
}
|
|
173985
|
-
async function followNested(walk, toolName, target, stack, at, floor) {
|
|
174027
|
+
async function followNested(walk, toolName, target, stack, at, runVars, floor) {
|
|
173986
174028
|
const nested = await readNestedTest(walk.project, target, toolName);
|
|
173987
174029
|
if ("refusal" in nested) {
|
|
173988
174030
|
if (floor === void 0) report(walk, at, nested.refusal);
|
|
@@ -174006,7 +174048,7 @@ async function followNested(walk, toolName, target, stack, at, floor) {
|
|
|
174006
174048
|
return;
|
|
174007
174049
|
}
|
|
174008
174050
|
if (flow === void 0) return;
|
|
174009
|
-
await checkTest(walk, flow, nested.flowName, [...stack, entry], { at, prefix }, inner);
|
|
174051
|
+
await checkTest(walk, flow, nested.flowName, [...stack, entry], runVars, { at, prefix }, inner);
|
|
174010
174052
|
}
|
|
174011
174053
|
async function readNestedTest(project, target, toolName) {
|
|
174012
174054
|
if (project.mode === "client" && target.kind === "name") {
|
|
@@ -174065,10 +174107,10 @@ function parseForCheck(text) {
|
|
|
174065
174107
|
return parsing;
|
|
174066
174108
|
}
|
|
174067
174109
|
async function checkFlow(input2) {
|
|
174068
|
-
const { flow, flowName, canonical, schemas, project } = input2;
|
|
174110
|
+
const { flow, flowName, canonical, schemas, project, vars } = input2;
|
|
174069
174111
|
const walk = { schemas, project, reached: /* @__PURE__ */ new Map(), problems: [] };
|
|
174070
174112
|
reach(walk, "test", canonical, 1);
|
|
174071
|
-
await checkTest(walk, flow, flowName, [{ canonical, display: flowName }]);
|
|
174113
|
+
await checkTest(walk, flow, flowName, [{ canonical, display: flowName }], mergeScriptEnv(vars));
|
|
174072
174114
|
return walk.problems;
|
|
174073
174115
|
}
|
|
174074
174116
|
|
|
@@ -177126,18 +177168,8 @@ Over a link (\`argent link\` / \`ARGENT_TOOLS_URL\`), the client uploads the tes
|
|
|
177126
177168
|
if (unrunnableScript) throw preflightFailure(unrunnableScript);
|
|
177127
177169
|
const runVars = mergeScriptEnv(params.vars);
|
|
177128
177170
|
resolveScriptEnv(runVars, params.project_root, ctx?.clientSecrets);
|
|
177129
|
-
const unsetVar =
|
|
177130
|
-
|
|
177131
|
-
mergeScriptEnv(flow.vars, runVars)
|
|
177132
|
-
);
|
|
177133
|
-
if (unsetVar) {
|
|
177134
|
-
throw new FailureError(`E2E test "${flowName}" was not run. ${unsetVar}`, {
|
|
177135
|
-
error_code: FAILURE_CODES.FLOW_FILE_INVALID,
|
|
177136
|
-
failure_stage: "flow_run_validate",
|
|
177137
|
-
failure_area: "tool_server",
|
|
177138
|
-
error_kind: "validation"
|
|
177139
|
-
});
|
|
177140
|
-
}
|
|
177171
|
+
const unsetVar = unsetVarRefusal(flow, flowName, mergeScriptEnv(flow.vars, runVars));
|
|
177172
|
+
if (unsetVar) throw preflightFailure(unsetVar);
|
|
177141
177173
|
const enclosing = ctx?.flowStack ?? [];
|
|
177142
177174
|
const nesting = nestedRunRefusal(enclosing, rootEntry);
|
|
177143
177175
|
if (nesting !== void 0) throw nestingFailure(nesting.refusal);
|
|
@@ -177509,7 +177541,7 @@ function pushReport(state3, report2) {
|
|
|
177509
177541
|
state3.reports.push(report2);
|
|
177510
177542
|
state3.onStepReport?.(report2);
|
|
177511
177543
|
}
|
|
177512
|
-
function
|
|
177544
|
+
function scopeVars2(state3, scope) {
|
|
177513
177545
|
return mergeScriptEnv(scope.fileVars, state3.runVars);
|
|
177514
177546
|
}
|
|
177515
177547
|
function scopeFlow(scope) {
|
|
@@ -177612,7 +177644,7 @@ async function execSteps(state3, steps, scope) {
|
|
|
177612
177644
|
if (typesSecret(step)) state3.secret.typed = true;
|
|
177613
177645
|
let leaf;
|
|
177614
177646
|
try {
|
|
177615
|
-
leaf = resolveStepReferences(step, state3.output.doc,
|
|
177647
|
+
leaf = resolveStepReferences(step, state3.output.doc, scopeVars2(state3, scope));
|
|
177616
177648
|
if (typesSecret(leaf)) state3.secret.typed = true;
|
|
177617
177649
|
} catch (err) {
|
|
177618
177650
|
if (!(err instanceof StepReferenceError)) throw err;
|
|
@@ -177756,7 +177788,7 @@ async function execWhenStep(state3, authored, scope) {
|
|
|
177756
177788
|
const inner = childScope(scope);
|
|
177757
177789
|
let step;
|
|
177758
177790
|
try {
|
|
177759
|
-
step = resolveStepReferences(authored, state3.output.doc,
|
|
177791
|
+
step = resolveStepReferences(authored, state3.output.doc, scopeVars2(state3, scope));
|
|
177760
177792
|
} catch (err) {
|
|
177761
177793
|
if (!(err instanceof StepReferenceError)) throw err;
|
|
177762
177794
|
pushReport(state3, { ...unresolved, status: "error", reason: escapeInline(err.message) });
|
|
@@ -177850,10 +177882,10 @@ async function execRunStep(state3, step, scope) {
|
|
|
177850
177882
|
}
|
|
177851
177883
|
}
|
|
177852
177884
|
const fileVars = mergeScriptEnv(fragment.vars, scope.fileVars);
|
|
177853
|
-
const unsetVar =
|
|
177854
|
-
|
|
177855
|
-
|
|
177856
|
-
|
|
177885
|
+
const unsetVar = fragmentUnsetVarProblem(
|
|
177886
|
+
fragment,
|
|
177887
|
+
target,
|
|
177888
|
+
mergeScriptEnv(fileVars, state3.runVars)
|
|
177857
177889
|
);
|
|
177858
177890
|
if (unsetVar) return fail(unsetVar);
|
|
177859
177891
|
pushReport(state3, {
|
|
@@ -177884,7 +177916,7 @@ async function runScriptStep(state3, step, scope) {
|
|
|
177884
177916
|
step,
|
|
177885
177917
|
projectRoot: state3.projectRoot,
|
|
177886
177918
|
device: state3.device,
|
|
177887
|
-
vars:
|
|
177919
|
+
vars: scopeVars2(state3, scope),
|
|
177888
177920
|
output: state3.output.doc,
|
|
177889
177921
|
...state3.ctx?.clientSecrets ? { clientSecrets: state3.ctx.clientSecrets } : {},
|
|
177890
177922
|
logBudget: state3.scriptLogBudget,
|
|
@@ -178257,8 +178289,13 @@ var zodSchema79 = external_exports.object({
|
|
|
178257
178289
|
e2e_test_file: external_exports.string().optional().describe(
|
|
178258
178290
|
"Path to the e2e test .yaml as readable by the tool-server. Internal: the argent client derives it from project_root and name automatically; leave unset."
|
|
178259
178291
|
),
|
|
178260
|
-
e2e_test_path: external_exports.string().optional().describe("Absolute path to an e2e test .yaml on the client.")
|
|
178292
|
+
e2e_test_path: external_exports.string().optional().describe("Absolute path to an e2e test .yaml on the client."),
|
|
178293
|
+
vars: external_exports.record(external_exports.string(), external_exports.string()).optional().describe("The vars the run would set, as e2e-execute takes them.")
|
|
178261
178294
|
}).superRefine((params, ctx) => {
|
|
178295
|
+
const varsProblem = params.vars === void 0 ? void 0 : flowVarsProblem(params.vars);
|
|
178296
|
+
if (varsProblem) {
|
|
178297
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: varsProblem, path: ["vars"] });
|
|
178298
|
+
}
|
|
178262
178299
|
if (params.name === void 0 === (params.e2e_test_path === void 0)) {
|
|
178263
178300
|
ctx.addIssue({
|
|
178264
178301
|
code: external_exports.ZodIssueCode.custom,
|
|
@@ -178280,7 +178317,8 @@ function createCheckFlowTool(registry2) {
|
|
|
178280
178317
|
description: `Check an e2e test without a device and without running a step.
|
|
178281
178318
|
Returns { problems }: each problem that makes e2e-execute refuse the e2e test before its first step, and
|
|
178282
178319
|
each step that fails when it runs for a reason a device does not change, in this e2e test and in the
|
|
178283
|
-
run: fragments and nested e2e tests its steps reach.
|
|
178320
|
+
run: fragments and nested e2e tests its steps reach. Pass vars to check with the vars a run would set.
|
|
178321
|
+
Each problem holds at?, code? and message.
|
|
178284
178322
|
at lists the steps from the e2e test to the problem, each { step, run?, e2e?, when? }.
|
|
178285
178323
|
Pass exactly one e2e test source: name (under project_root) or e2e_test_path.`,
|
|
178286
178324
|
zodSchema: zodSchema79,
|
|
@@ -178318,7 +178356,8 @@ Pass exactly one e2e test source: name (under project_root) or e2e_test_path.`,
|
|
|
178318
178356
|
flowName: root.flowName,
|
|
178319
178357
|
canonical,
|
|
178320
178358
|
schemas: callableSchemas(registry2),
|
|
178321
|
-
project: root.project
|
|
178359
|
+
project: root.project,
|
|
178360
|
+
vars: params.vars
|
|
178322
178361
|
});
|
|
178323
178362
|
return { problems };
|
|
178324
178363
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.35.1-next.
|
|
3
|
+
"version": "0.35.1-next.95",
|
|
4
4
|
"mcpName": "io.github.software-mansion/argent",
|
|
5
5
|
"description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"vitest": "^5.0.5",
|
|
99
99
|
"yaml": "^2.9.1"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "c7dc48cecc703a224b39398b011ce8c2fbc07972"
|
|
102
102
|
}
|
|
@@ -13,7 +13,7 @@ For a saved QA test case, ticket, or acceptance criterion, load `argent-qa-e2e`
|
|
|
13
13
|
|
|
14
14
|
- Before creating or changing an e2e test, read [Live authoring](references/live-authoring.md) completely.
|
|
15
15
|
- When polishing, composing, or manually reviewing YAML, read [E2E YAML](references/e2e-yaml.md). For Vega, read its platform limits before recording remote or keyboard tools.
|
|
16
|
-
- After you edit the YAML by hand, run `argent e2e check <file
|
|
16
|
+
- After you edit the YAML by hand, run `argent e2e check <file>`, with the `--var` options the run gets. It finds the problems that make `argent e2e run` refuse the test before the first step, without a device.
|
|
17
17
|
- E2E tests run on physical iPhones (an iOS `list-devices` entry with kind `"device"`), but replay never auto-binds one, even when no simulator is booted: pass the phone's udid as `device` (CLI `--device`), and only a `connected` phone can run. `pinch`/`rotate` steps need the app drawn in portrait. On hardware the runner tree is the `describe` tree: same ids and roles, no UIView hierarchy. See `argent-ios-device-interact` for the hardware contract.
|
|
18
18
|
- On capture warnings, raw coordinates, unavailable trees, mistimed transitions, overlays, or replay failures, read [Reliability and recovery](references/reliability-and-recovery.md).
|
|
19
19
|
|