@mlola/browser-evals 0.1.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/LICENSE +21 -0
- package/README.md +14 -0
- package/dist/bin.d.ts +7 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +59 -0
- package/dist/bin.js.map +1 -0
- package/dist/cli-args.d.ts +7 -0
- package/dist/cli-args.d.ts.map +1 -0
- package/dist/cli-args.js +28 -0
- package/dist/cli-args.js.map +1 -0
- package/dist/fixtures/server.d.ts +22 -0
- package/dist/fixtures/server.d.ts.map +1 -0
- package/dist/fixtures/server.js +149 -0
- package/dist/fixtures/server.js.map +1 -0
- package/dist/fixtures/site.d.ts +51 -0
- package/dist/fixtures/site.d.ts.map +1 -0
- package/dist/fixtures/site.js +312 -0
- package/dist/fixtures/site.js.map +1 -0
- package/dist/harness.d.ts +85 -0
- package/dist/harness.d.ts.map +1 -0
- package/dist/harness.js +193 -0
- package/dist/harness.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/report.d.ts +33 -0
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +121 -0
- package/dist/report.js.map +1 -0
- package/dist/suites/core.d.ts +10 -0
- package/dist/suites/core.d.ts.map +1 -0
- package/dist/suites/core.js +144 -0
- package/dist/suites/core.js.map +1 -0
- package/dist/suites/matrix.d.ts +9 -0
- package/dist/suites/matrix.d.ts.map +1 -0
- package/dist/suites/matrix.js +72 -0
- package/dist/suites/matrix.js.map +1 -0
- package/dist/suites/regression.d.ts +12 -0
- package/dist/suites/regression.d.ts.map +1 -0
- package/dist/suites/regression.js +39 -0
- package/dist/suites/regression.js.map +1 -0
- package/dist/suites/security.d.ts +9 -0
- package/dist/suites/security.d.ts.map +1 -0
- package/dist/suites/security.js +91 -0
- package/dist/suites/security.js.map +1 -0
- package/dist/suites/stress.d.ts +6 -0
- package/dist/suites/stress.d.ts.map +1 -0
- package/dist/suites/stress.js +64 -0
- package/dist/suites/stress.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stress.d.ts","sourceRoot":"","sources":["../../src/suites/stress.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,WAAW,EAAE,QAAQ,EA6DjC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stress suite (PRD §50.5): large pages, constant re-rendering, slow hydration.
|
|
3
|
+
*/
|
|
4
|
+
export const stressCases = [
|
|
5
|
+
{
|
|
6
|
+
name: "huge-page-with-800-controls",
|
|
7
|
+
suite: "stress",
|
|
8
|
+
about: "Snapshot size is bounded and the action space stays selective on a large page.",
|
|
9
|
+
goal: "Download my latest invoice",
|
|
10
|
+
startUrl: (base) => `${base}/big?decoys=800`,
|
|
11
|
+
script: [
|
|
12
|
+
{ operation: "DOWNLOAD", targetLabel: /download invoice \(latest\)/i },
|
|
13
|
+
{ operation: "DONE" },
|
|
14
|
+
],
|
|
15
|
+
successCriteria: { criteria: { kind: "artifact", documentType: "invoice" } },
|
|
16
|
+
budgets: { maxSteps: 8 },
|
|
17
|
+
expect: {
|
|
18
|
+
status: "completed",
|
|
19
|
+
verification: "verified",
|
|
20
|
+
maxSteps: 8,
|
|
21
|
+
assertions: ({ events }) => {
|
|
22
|
+
const snapshots = events.filter((event) => event.type === "SNAPSHOT_CAPTURED");
|
|
23
|
+
const last = snapshots[snapshots.length - 1];
|
|
24
|
+
if (last && last.type === "SNAPSHOT_CAPTURED" && last.payload.nodeCount > 1000) {
|
|
25
|
+
throw new Error(`snapshot was not bounded: ${last.payload.nodeCount} nodes`);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "constantly-rerendering-page",
|
|
32
|
+
suite: "stress",
|
|
33
|
+
about: "Controls are recreated every 600ms; snapshots and refs must survive the churn.",
|
|
34
|
+
goal: "Confirm the updating page is usable",
|
|
35
|
+
startUrl: (base) => `${base}/rerender?seed=13`,
|
|
36
|
+
script: [{ operation: "WAIT" }, { operation: "DONE" }],
|
|
37
|
+
successCriteria: { criteria: { kind: "element_visible", label: "Continue", role: "button" } },
|
|
38
|
+
budgets: { maxSteps: 8 },
|
|
39
|
+
expect: {
|
|
40
|
+
status: "completed",
|
|
41
|
+
verification: "verified",
|
|
42
|
+
maxSteps: 8,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "slow-network-download-delay",
|
|
47
|
+
suite: "stress",
|
|
48
|
+
about: "Download latency must be awaited, not raced.",
|
|
49
|
+
goal: "Download my latest invoice",
|
|
50
|
+
startUrl: (base) => `${base}/billing?seed=21`,
|
|
51
|
+
script: [
|
|
52
|
+
{ operation: "DOWNLOAD", targetLabel: /download invoice \(latest\)/i },
|
|
53
|
+
{ operation: "DONE" },
|
|
54
|
+
],
|
|
55
|
+
successCriteria: { criteria: { kind: "download_completed" } },
|
|
56
|
+
budgets: { maxSteps: 8, maxDurationMs: 60_000 },
|
|
57
|
+
expect: {
|
|
58
|
+
status: "completed",
|
|
59
|
+
verification: "verified",
|
|
60
|
+
artifacts: { documentType: "invoice" },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
//# sourceMappingURL=stress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stress.js","sourceRoot":"","sources":["../../src/suites/stress.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,WAAW,GAAe;IACrC;QACE,IAAI,EAAE,6BAA6B;QACnC,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,gFAAgF;QACvF,IAAI,EAAE,4BAA4B;QAClC,QAAQ,EAAE,CAA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,EAAE,iBAAiB,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC7F,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;QACxB,MAAM,EAAE;YACN,MAAM,EAAE,WAAW;YACnB,YAAY,EAAE,UAAU;YACxB,QAAQ,EAAE,CAAC;SACZ;KACF;IAED;QACE,IAAI,EAAE,6BAA6B;QACnC,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,8CAA8C;QACrD,IAAI,EAAE,4BAA4B;QAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,kBAAkB;QAC7C,MAAM,EAAE;YACN,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,8BAA8B,EAAE;YACtE,EAAE,SAAS,EAAE,MAAM,EAAE;SACtB;QACD,eAAe,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,EAAE;QAC7D,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE;QAC/C,MAAM,EAAE;YACN,MAAM,EAAE,WAAW;YACnB,YAAY,EAAE,UAAU;YACxB,SAAS,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE;SACvC;KACF;CACF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mlola/browser-evals",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Deterministic eval suites, fixture site and reporters.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"development": "./src/index.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"LICENSE",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=22.18"
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/mlolahq/browser-runtime.git"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://mlola.com/browser-runtime",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/mlolahq/browser-runtime.git/issues"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"browser-automation",
|
|
35
|
+
"browser-agent",
|
|
36
|
+
"runtime",
|
|
37
|
+
"playwright",
|
|
38
|
+
"agent",
|
|
39
|
+
"jev",
|
|
40
|
+
"llm",
|
|
41
|
+
"automation"
|
|
42
|
+
],
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsc -b"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@mlola/browser-protocol": "0.1.0",
|
|
51
|
+
"@mlola/browser-core": "0.1.0",
|
|
52
|
+
"@mlola/browser-runtime": "0.1.0",
|
|
53
|
+
"@mlola/decision-jev": "0.1.0"
|
|
54
|
+
}
|
|
55
|
+
}
|