DojiSum commited on
Commit
74e52f2
·
verified ·
1 Parent(s): 7ece3e6

Replace task_137 with The Pelican Test film task

Browse files

Replace the SVG exercise with the full procedural film, its Docker environment, original reference source and deterministic verifier. Update the release checksums and note the task-specific time budgets.

README.md CHANGED
@@ -35,7 +35,7 @@ task_001/
35
 
36
  ## Time budgets
37
 
38
- All 141 tasks declare these base limits in `task.toml`.
39
 
40
  | Stage | Seconds |
41
  | --- | ---: |
@@ -43,7 +43,7 @@ All 141 tasks declare these base limits in `task.toml`.
43
  | Verifier | 300 |
44
  | Environment build | 1200 |
45
 
46
- The standard multi-turn runner uses `agent_timeout_multiplier: 1.0`, so each agent round has a 3,600-second limit. Record explicit overrides as part of the evaluation configuration.
47
 
48
  ## Download and verify
49
 
 
35
 
36
  ## Time budgets
37
 
38
+ The standard limits declared in `task.toml` are listed below.
39
 
40
  | Stage | Seconds |
41
  | --- | ---: |
 
43
  | Verifier | 300 |
44
  | Environment build | 1200 |
45
 
46
+ The standard multi-turn runner uses `agent_timeout_multiplier: 1.0`, which applies each task's configured agent timeout. `task_137` allows 14,400 seconds for the agent, 900 seconds for the verifier and 900 seconds for the environment build. Its 5,820-frame video export uses a container with 8 CPUs and 12,288 MiB of memory. Record explicit overrides as part of the evaluation configuration.
47
 
48
  ## Download and verify
49
 
SHA256SUMS CHANGED
@@ -1,5 +1,5 @@
1
- 9319a69d98b08639963882d2668bf4c20406e20c97f567c8a461cba1eb2bfc83 README.md
2
- 02b1557cb3e1f785682729d45e3d5dc4fa5b2302e7c0232c88a47406abd18d67 VALIDATION.md
3
  888017c24377b2da51b5a7014d1922dd4c46ccfab2c606a51c6d18ed1c24531a task_001/acceptance_checklist.json
4
  0d1cdb9bbc77e72e4f8a7c6cec8640061d8c246c86e9e9c65ecbbefa861a8f17 task_001/environment/Dockerfile
5
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 task_001/environment/code/.gitkeep
@@ -2991,27 +2991,20 @@ b1bc830c34aeb3bbd995c0dba9d442cd1509b50e804c93512aeba9840508bb87 task_136/tests
2991
  67304766dd76fbfa3278583f1ce462c68c8d21f1bb25311abb7477bc623e4a73 task_136/tests/serve_smoke.js
2992
  73a984e1b2d62428518558427cb6c81fff9de7947466b250859f867604c3900f task_136/tests/test.sh
2993
  23833920726d6c5062ee18d63a592d35e749ff9173ae38f1b307de7aee997d7f task_136/tests/verify.js
2994
- 67a38361804b8a25cff75e26e3f93d6853ccd83f7de842552556704300a0e23e task_137/environment/Dockerfile
2995
- f1821a453967b11c3f77b1872ac7f4f582d98324ee9c0b593cabef86264d9e71 task_137/environment/code/index.html
2996
- c574873b38e8353182b9e805ec48746df258a8ac92ea7033ddfa5c7094dcba8e task_137/environment/code/package.json
2997
- d7591a85322bbe47053bfabe118f3099784c2718893e93eddb1e5872007445ab task_137/environment/code/scene.svg
2998
- e52fcbe8b10b1160cb4abdb8f322ccbcaa3f2d72b87d6514f32603c7f7a5fa16 task_137/environment/code/server.js
2999
- 31c9dd6a4c3fbd82a13010b62e4e6298cf557c138345f7903aaaeafc197118ec task_137/environment/docker-compose.yaml
3000
- 7a3e178c3405584f74109627d46d591c9fd70f4e8364de5c9e9a9668071e7c21 task_137/instruction.md
3001
- f1821a453967b11c3f77b1872ac7f4f582d98324ee9c0b593cabef86264d9e71 task_137/solution/code/index.html
3002
- c574873b38e8353182b9e805ec48746df258a8ac92ea7033ddfa5c7094dcba8e task_137/solution/code/package.json
3003
- f8a46c25f90bbbb4a9c28024bbb73b66036bfc357a70a9b4c91cb9fb897b6035 task_137/solution/code/scene.svg
3004
- e52fcbe8b10b1160cb4abdb8f322ccbcaa3f2d72b87d6514f32603c7f7a5fa16 task_137/solution/code/server.js
3005
- 6a727d36270fc2afe5af911163d0e471513b3afabc4fac023e90437b172c0ceb task_137/solution/index.html
3006
- 0e8a2b9738bd8e3b0cef3eb252858436d91fa59b48eaee7a836e277caae8a711 task_137/solution/solve.sh
3007
- 3fa48991b38568dd8564a443e27a71a02befde02eed5d214143e16a1f13ae7ce task_137/task.toml
3008
- 7e5d3fa7296bc955938ff95957dd4c3926d8686aa539158276feed8797822af8 task_137/tests/direct_open.js
3009
- 44785c12ea8d1ed9c0b6bd5aa39ff9d0cbdee212a726bea384537d99333b60cb task_137/tests/motion_check.js
3010
- 67304766dd76fbfa3278583f1ce462c68c8d21f1bb25311abb7477bc623e4a73 task_137/tests/serve_smoke.js
3011
- 7ad4986b9d3148fa2bb6debe398e59915670b99ddf9b391769dacb2075eff7ab task_137/tests/spec.json
3012
- 4ab46cc2f97755fad563f4beeea901b89cc669cdcafcae40268e801a799f7120 task_137/tests/test.sh
3013
- 4cccc465cb4c9676dfe2f62e1dc49803b1b0d1efaabb6f07b02e5055f7081c22 task_137/tests/verify.js
3014
- d8746983eba3db896c1ac3d3df8232988f35289adcb1945771553cbc833e2e5e task_137/tests/visible_change.js
3015
  67a38361804b8a25cff75e26e3f93d6853ccd83f7de842552556704300a0e23e task_138/environment/Dockerfile
3016
  f1821a453967b11c3f77b1872ac7f4f582d98324ee9c0b593cabef86264d9e71 task_138/environment/code/index.html
3017
  c574873b38e8353182b9e805ec48746df258a8ac92ea7033ddfa5c7094dcba8e task_138/environment/code/package.json
 
1
+ f03e4827393f54d7d105adcb0efee3ee9deff9cde1dcf33f8985da617a297345 README.md
2
+ 3434689cf31b24ee97fdea5f4cf8598683fd0f407eda500235c5b13d240dcf34 VALIDATION.md
3
  888017c24377b2da51b5a7014d1922dd4c46ccfab2c606a51c6d18ed1c24531a task_001/acceptance_checklist.json
4
  0d1cdb9bbc77e72e4f8a7c6cec8640061d8c246c86e9e9c65ecbbefa861a8f17 task_001/environment/Dockerfile
5
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 task_001/environment/code/.gitkeep
 
2991
  67304766dd76fbfa3278583f1ce462c68c8d21f1bb25311abb7477bc623e4a73 task_136/tests/serve_smoke.js
2992
  73a984e1b2d62428518558427cb6c81fff9de7947466b250859f867604c3900f task_136/tests/test.sh
2993
  23833920726d6c5062ee18d63a592d35e749ff9173ae38f1b307de7aee997d7f task_136/tests/verify.js
2994
+ 25c4ca1144ef5469c689bb0971de8aa5ad7ba16953c62cf6bffe022a42cf8c92 task_137/environment/Dockerfile
2995
+ 49c76e79d7894b4072dc350322b2e225232a2e5897e177184c589e9dad468ae0 task_137/environment/package-lock.json
2996
+ dc8759efcfad3a7c0f2bcef2da66c659eb8462314290a4bbfbee36ff5bba4eae task_137/environment/package.json
2997
+ 5c37c4db9fc723305b4eac48379b03f964fca3747be4ba40ecb972f000411b27 task_137/environment/pelican-chromium
2998
+ 7d289e75595eb65c4da32844b988b8bdde1d6f91fb36c84419fa875aa53c2da1 task_137/instruction.md
2999
+ c0fa97212b834a957fe9e9ec193cda3633f98c16c4a45e76acf2f4fd18f20aed task_137/solution/add_rig_probe.py
3000
+ d7fb388bdeb5ede35a67c0b7b6c0d7646fe2cc46373e62451e8cb23680784086 task_137/solution/pelican-source.tar.gz
3001
+ 26664d450c6108fab23d31ed2a3dd14770cdc10ff4d054606267c9823016570e task_137/solution/solve.sh
3002
+ 505104cf1de9767ab0307a1bb64526abc261e7e6bd871013dca31c30904e8665 task_137/task.toml
3003
+ 7b3bfd68aed75dd1f6edd2791716221e89df861b3f9d4ad810edf973a4e763b5 task_137/tests/browser.cjs
3004
+ a472a3e3df1c01ed2b8d58cf523d94e49b53032ef7f58751de2176ea00ebbc0f task_137/tests/film_events.py
3005
+ c067f682989d44a000c95d974b760cb796e153314b4862cdb5111f61ced5ce82 task_137/tests/rig_check.py
3006
+ 4ee25b2a332a1f95dff9d17566f43946fd72a57659264bb838a414c269c42867 task_137/tests/test.sh
3007
+ 63350ff23f69894ebc082f0696cd1a10c573e5e06d53f3a8a0e5f4b84056b646 task_137/tests/verify.py
 
 
 
 
 
 
 
3008
  67a38361804b8a25cff75e26e3f93d6853ccd83f7de842552556704300a0e23e task_138/environment/Dockerfile
3009
  f1821a453967b11c3f77b1872ac7f4f582d98324ee9c0b593cabef86264d9e71 task_138/environment/code/index.html
3010
  c574873b38e8353182b9e805ec48746df258a8ac92ea7033ddfa5c7094dcba8e task_138/environment/code/package.json
VALIDATION.md CHANGED
@@ -10,6 +10,10 @@ The release includes 141 tasks. The checks below report the scope and results of
10
 
11
  `task_140` passed all nine browser scenarios with the reference solution and earned reward 1 under Harbor 0.24.0 on Docker. The unchanged starter earned 0. Neither trial had an execution exception. Local browser controls accepted higher ground friction and rejected missing board gravity, missing vertical support, missing bounce, and missing ground friction. Artwork is reviewed separately from the automatic reward.
12
 
 
 
 
 
13
  ## Recorded review and regression
14
 
15
  | Check | Scope | Outcome |
 
10
 
11
  `task_140` passed all nine browser scenarios with the reference solution and earned reward 1 under Harbor 0.24.0 on Docker. The unchanged starter earned 0. Neither trial had an execution exception. Local browser controls accepted higher ground friction and rejected missing board gravity, missing vertical support, missing bounce, and missing ground friction. Artwork is reviewed separately from the automatic reward.
12
 
13
+ ## The Pelican Test
14
+
15
+ `task_137` is a 97-second procedural animated film task. In the Docker runtime, the reference solution rendered the full film and passed all ten checks for reward 1. The unchanged starter earned 0. The verifier measures the media contract, browser interaction, temporal replay, pedal motion and two timed film events without a model. Visual polish and the clarity of the individual jokes can be reviewed separately.
16
+
17
  ## Recorded review and regression
18
 
19
  | Check | Scope | Outcome |
task_137/environment/Dockerfile CHANGED
@@ -1,8 +1,12 @@
1
- FROM mcr.microsoft.com/playwright:v1.52.0-noble
 
 
 
 
 
 
2
  WORKDIR /app
3
- COPY ./code /app
4
- ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
5
- RUN npm install -g playwright@1.52.0
6
- ENV NODE_PATH=/usr/lib/node_modules
7
- EXPOSE 3000
8
- CMD ["npm", "start"]
 
1
+ FROM node:22-bookworm-slim
2
+ RUN apt-get update \
3
+ && apt-get install -y --no-install-recommends chromium ffmpeg python3 fonts-liberation fonts-dejavu-core \
4
+ && rm -rf /var/lib/apt/lists/*
5
+ ENV CHROME_PATH=/usr/local/bin/pelican-chromium FFMPEG_PATH=/usr/bin/ffmpeg
6
+ COPY pelican-chromium /usr/local/bin/pelican-chromium
7
+ RUN chmod 755 /usr/local/bin/pelican-chromium
8
  WORKDIR /app
9
+ COPY package.json package-lock.json ./
10
+ RUN npm ci --no-audit --no-fund \
11
+ && mkdir -p /opt/pelican-verifier \
12
+ && cp -a node_modules /opt/pelican-verifier/node_modules
 
 
task_137/environment/code/index.html DELETED
@@ -1 +0,0 @@
1
- <!doctype html><html><head><meta charset="utf-8"><title>SVG scene preview</title><style>body{margin:0;display:grid;place-items:center;min-height:100vh;background:#e5e7eb}img{width:min(96vw,1100px);height:auto;background:white;box-shadow:0 8px 28px #0003}</style></head><body><img src="./scene.svg" alt="Task scene"></body></html>
 
 
task_137/environment/code/package.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "scripts": {
3
- "start": "node server.js"
4
- }
5
- }
 
 
 
 
 
 
task_137/environment/code/scene.svg DELETED
task_137/environment/code/server.js DELETED
@@ -1,17 +0,0 @@
1
- const {createServer}=require('node:http');
2
- const {readFile,stat}=require('node:fs/promises');
3
- const {join}=require('node:path');
4
- const root=__dirname;
5
- const port=Number(process.env.PORT||3000);
6
- const routes={'/':'index.html','/index.html':'index.html','/scene.svg':'scene.svg',
7
- '/physics.js':'physics.js','/tetris.js':'tetris.js'};
8
- createServer(async(req,res)=>{
9
- let route;try{route=new URL(req.url,'http://localhost').pathname;}catch{res.writeHead(400);return res.end();}
10
- let name=routes[route];
11
- if(route==='/' && !(await stat(join(root,'index.html')).catch(()=>null)))name='scene.svg';
12
- if(!name){res.writeHead(404);return res.end();}
13
- try{const body=await readFile(join(root,name));
14
- const type=name.endsWith('.svg')?'image/svg+xml':name.endsWith('.js')?'text/javascript':'text/html';
15
- res.writeHead(200,{'content-type':type+'; charset=utf-8','cache-control':'no-store'});res.end(body);
16
- }catch{res.writeHead(404);res.end();}
17
- }).listen(port,'0.0.0.0',()=>console.log('Task preview on http://localhost:'+port));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
task_137/environment/docker-compose.yaml DELETED
@@ -1,4 +0,0 @@
1
- services:
2
- main:
3
- build:
4
- network: host
 
 
 
 
 
task_137/environment/package-lock.json ADDED
@@ -0,0 +1,1208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "pelican-test",
3
+ "version": "0.1.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "pelican-test",
9
+ "version": "0.1.0",
10
+ "dependencies": {
11
+ "@ffmpeg-installer/ffmpeg": "1.1.0",
12
+ "p5": "2.4.0",
13
+ "p5.brush": "3.0.0",
14
+ "puppeteer-core": "24.37.2"
15
+ },
16
+ "engines": {
17
+ "node": ">=20"
18
+ }
19
+ },
20
+ "node_modules/@davepagurek/bezier-path": {
21
+ "version": "0.0.7",
22
+ "resolved": "https://registry.npmjs.org/@davepagurek/bezier-path/-/bezier-path-0.0.7.tgz",
23
+ "integrity": "sha512-CVlnCOrV1iy4Z12T756i9l4G6kF7r8uhlnb+xqDemAMmWQB+8Q0b+8VEqIiUfywgZDSiDr18Rm7pZlnA69rE8Q==",
24
+ "license": "MIT"
25
+ },
26
+ "node_modules/@ffmpeg-installer/darwin-arm64": {
27
+ "version": "4.1.5",
28
+ "resolved": "https://registry.npmjs.org/@ffmpeg-installer/darwin-arm64/-/darwin-arm64-4.1.5.tgz",
29
+ "integrity": "sha512-hYqTiP63mXz7wSQfuqfFwfLOfwwFChUedeCVKkBtl/cliaTM7/ePI9bVzfZ2c+dWu3TqCwLDRWNSJ5pqZl8otA==",
30
+ "cpu": [
31
+ "arm64"
32
+ ],
33
+ "hasInstallScript": true,
34
+ "license": "https://git.ffmpeg.org/gitweb/ffmpeg.git/blob_plain/HEAD:/LICENSE.md",
35
+ "optional": true,
36
+ "os": [
37
+ "darwin"
38
+ ]
39
+ },
40
+ "node_modules/@ffmpeg-installer/darwin-x64": {
41
+ "version": "4.1.0",
42
+ "resolved": "https://registry.npmjs.org/@ffmpeg-installer/darwin-x64/-/darwin-x64-4.1.0.tgz",
43
+ "integrity": "sha512-Z4EyG3cIFjdhlY8wI9aLUXuH8nVt7E9SlMVZtWvSPnm2sm37/yC2CwjUzyCQbJbySnef1tQwGG2Sx+uWhd9IAw==",
44
+ "cpu": [
45
+ "x64"
46
+ ],
47
+ "hasInstallScript": true,
48
+ "license": "LGPL-2.1",
49
+ "optional": true,
50
+ "os": [
51
+ "darwin"
52
+ ]
53
+ },
54
+ "node_modules/@ffmpeg-installer/ffmpeg": {
55
+ "version": "1.1.0",
56
+ "resolved": "https://registry.npmjs.org/@ffmpeg-installer/ffmpeg/-/ffmpeg-1.1.0.tgz",
57
+ "integrity": "sha512-Uq4rmwkdGxIa9A6Bd/VqqYbT7zqh1GrT5/rFwCwKM70b42W5gIjWeVETq6SdcL0zXqDtY081Ws/iJWhr1+xvQg==",
58
+ "license": "LGPL-2.1",
59
+ "optionalDependencies": {
60
+ "@ffmpeg-installer/darwin-arm64": "4.1.5",
61
+ "@ffmpeg-installer/darwin-x64": "4.1.0",
62
+ "@ffmpeg-installer/linux-arm": "4.1.3",
63
+ "@ffmpeg-installer/linux-arm64": "4.1.4",
64
+ "@ffmpeg-installer/linux-ia32": "4.1.0",
65
+ "@ffmpeg-installer/linux-x64": "4.1.0",
66
+ "@ffmpeg-installer/win32-ia32": "4.1.0",
67
+ "@ffmpeg-installer/win32-x64": "4.1.0"
68
+ }
69
+ },
70
+ "node_modules/@ffmpeg-installer/linux-arm": {
71
+ "version": "4.1.3",
72
+ "resolved": "https://registry.npmjs.org/@ffmpeg-installer/linux-arm/-/linux-arm-4.1.3.tgz",
73
+ "integrity": "sha512-NDf5V6l8AfzZ8WzUGZ5mV8O/xMzRag2ETR6+TlGIsMHp81agx51cqpPItXPib/nAZYmo55Bl2L6/WOMI3A5YRg==",
74
+ "cpu": [
75
+ "arm"
76
+ ],
77
+ "hasInstallScript": true,
78
+ "license": "GPLv3",
79
+ "optional": true,
80
+ "os": [
81
+ "linux"
82
+ ]
83
+ },
84
+ "node_modules/@ffmpeg-installer/linux-arm64": {
85
+ "version": "4.1.4",
86
+ "resolved": "https://registry.npmjs.org/@ffmpeg-installer/linux-arm64/-/linux-arm64-4.1.4.tgz",
87
+ "integrity": "sha512-dljEqAOD0oIM6O6DxBW9US/FkvqvQwgJ2lGHOwHDDwu/pX8+V0YsDL1xqHbj1DMX/+nP9rxw7G7gcUvGspSoKg==",
88
+ "cpu": [
89
+ "arm64"
90
+ ],
91
+ "hasInstallScript": true,
92
+ "license": "GPLv3",
93
+ "optional": true,
94
+ "os": [
95
+ "linux"
96
+ ]
97
+ },
98
+ "node_modules/@ffmpeg-installer/linux-ia32": {
99
+ "version": "4.1.0",
100
+ "resolved": "https://registry.npmjs.org/@ffmpeg-installer/linux-ia32/-/linux-ia32-4.1.0.tgz",
101
+ "integrity": "sha512-0LWyFQnPf+Ij9GQGD034hS6A90URNu9HCtQ5cTqo5MxOEc7Rd8gLXrJvn++UmxhU0J5RyRE9KRYstdCVUjkNOQ==",
102
+ "cpu": [
103
+ "ia32"
104
+ ],
105
+ "hasInstallScript": true,
106
+ "license": "GPLv3",
107
+ "optional": true,
108
+ "os": [
109
+ "linux"
110
+ ]
111
+ },
112
+ "node_modules/@ffmpeg-installer/linux-x64": {
113
+ "version": "4.1.0",
114
+ "resolved": "https://registry.npmjs.org/@ffmpeg-installer/linux-x64/-/linux-x64-4.1.0.tgz",
115
+ "integrity": "sha512-Y5BWhGLU/WpQjOArNIgXD3z5mxxdV8c41C+U15nsE5yF8tVcdCGet5zPs5Zy3Ta6bU7haGpIzryutqCGQA/W8A==",
116
+ "cpu": [
117
+ "x64"
118
+ ],
119
+ "hasInstallScript": true,
120
+ "license": "GPLv3",
121
+ "optional": true,
122
+ "os": [
123
+ "linux"
124
+ ]
125
+ },
126
+ "node_modules/@ffmpeg-installer/win32-ia32": {
127
+ "version": "4.1.0",
128
+ "resolved": "https://registry.npmjs.org/@ffmpeg-installer/win32-ia32/-/win32-ia32-4.1.0.tgz",
129
+ "integrity": "sha512-FV2D7RlaZv/lrtdhaQ4oETwoFUsUjlUiasiZLDxhEUPdNDWcH1OU9K1xTvqz+OXLdsmYelUDuBS/zkMOTtlUAw==",
130
+ "cpu": [
131
+ "ia32"
132
+ ],
133
+ "license": "GPLv3",
134
+ "optional": true,
135
+ "os": [
136
+ "win32"
137
+ ]
138
+ },
139
+ "node_modules/@ffmpeg-installer/win32-x64": {
140
+ "version": "4.1.0",
141
+ "resolved": "https://registry.npmjs.org/@ffmpeg-installer/win32-x64/-/win32-x64-4.1.0.tgz",
142
+ "integrity": "sha512-Drt5u2vzDnIONf4ZEkKtFlbvwj6rI3kxw1Ck9fpudmtgaZIHD4ucsWB2lCZBXRxJgXR+2IMSti+4rtM4C4rXgg==",
143
+ "cpu": [
144
+ "x64"
145
+ ],
146
+ "license": "GPLv3",
147
+ "optional": true,
148
+ "os": [
149
+ "win32"
150
+ ]
151
+ },
152
+ "node_modules/@japont/unicode-range": {
153
+ "version": "1.0.0",
154
+ "resolved": "https://registry.npmjs.org/@japont/unicode-range/-/unicode-range-1.0.0.tgz",
155
+ "integrity": "sha512-BckHvA2XdjRBVAWe2uceNuRf78lBeI28kyWEbfr/Q2pE17POkwuZ6WWY/UMv8FL9iBxhW4xfDoNLM9UVZaTeUQ==",
156
+ "license": "MIT"
157
+ },
158
+ "node_modules/@puppeteer/browsers": {
159
+ "version": "2.12.0",
160
+ "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.12.0.tgz",
161
+ "integrity": "sha512-Xuq42yxcQJ54ti8ZHNzF5snFvtpgXzNToJ1bXUGQRaiO8t+B6UM8sTUJfvV+AJnqtkJU/7hdy6nbKyA12aHtRw==",
162
+ "license": "Apache-2.0",
163
+ "dependencies": {
164
+ "debug": "^4.4.3",
165
+ "extract-zip": "^2.0.1",
166
+ "progress": "^2.0.3",
167
+ "proxy-agent": "^6.5.0",
168
+ "semver": "^7.7.3",
169
+ "tar-fs": "^3.1.1",
170
+ "yargs": "^17.7.2"
171
+ },
172
+ "bin": {
173
+ "browsers": "lib/cjs/main-cli.js"
174
+ },
175
+ "engines": {
176
+ "node": ">=18"
177
+ }
178
+ },
179
+ "node_modules/@tootallnate/quickjs-emscripten": {
180
+ "version": "0.23.0",
181
+ "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz",
182
+ "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==",
183
+ "license": "MIT"
184
+ },
185
+ "node_modules/@types/node": {
186
+ "version": "26.6.6",
187
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz",
188
+ "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==",
189
+ "license": "MIT",
190
+ "optional": true,
191
+ "dependencies": {
192
+ "undici-types": "~8.9.0"
193
+ }
194
+ },
195
+ "node_modules/@types/yauzl": {
196
+ "version": "2.10.3",
197
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",
198
+ "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",
199
+ "license": "MIT",
200
+ "optional": true,
201
+ "dependencies": {
202
+ "@types/node": "*"
203
+ }
204
+ },
205
+ "node_modules/acorn": {
206
+ "version": "8.19.0",
207
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz",
208
+ "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==",
209
+ "license": "MIT",
210
+ "bin": {
211
+ "acorn": "bin/acorn"
212
+ },
213
+ "engines": {
214
+ "node": ">=0.4.0"
215
+ }
216
+ },
217
+ "node_modules/acorn-walk": {
218
+ "version": "8.3.5",
219
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz",
220
+ "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==",
221
+ "license": "MIT",
222
+ "dependencies": {
223
+ "acorn": "^8.11.0"
224
+ },
225
+ "engines": {
226
+ "node": ">=0.4.0"
227
+ }
228
+ },
229
+ "node_modules/agent-base": {
230
+ "version": "7.1.4",
231
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
232
+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
233
+ "license": "MIT",
234
+ "engines": {
235
+ "node": ">= 14"
236
+ }
237
+ },
238
+ "node_modules/ansi-regex": {
239
+ "version": "5.0.1",
240
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
241
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
242
+ "license": "MIT",
243
+ "engines": {
244
+ "node": ">=8"
245
+ }
246
+ },
247
+ "node_modules/ansi-styles": {
248
+ "version": "4.3.0",
249
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
250
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
251
+ "license": "MIT",
252
+ "dependencies": {
253
+ "color-convert": "^2.0.1"
254
+ },
255
+ "engines": {
256
+ "node": ">=8"
257
+ },
258
+ "funding": {
259
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
260
+ }
261
+ },
262
+ "node_modules/ast-types": {
263
+ "version": "0.13.4",
264
+ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
265
+ "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==",
266
+ "license": "MIT",
267
+ "dependencies": {
268
+ "tslib": "^2.0.1"
269
+ },
270
+ "engines": {
271
+ "node": ">=4"
272
+ }
273
+ },
274
+ "node_modules/b4a": {
275
+ "version": "1.9.0",
276
+ "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.9.0.tgz",
277
+ "integrity": "sha512-dpfcF9fDNR6++cthXR67iyhgqWy9CBouAvIWhIntzBG6cvK/cnIPiZQjBwi/ZqjjBEDGfoNDtmB0kTjroOJ3pQ==",
278
+ "license": "Apache-2.0",
279
+ "peerDependencies": {
280
+ "react-native-b4a": "*"
281
+ },
282
+ "peerDependenciesMeta": {
283
+ "react-native-b4a": {
284
+ "optional": true
285
+ }
286
+ }
287
+ },
288
+ "node_modules/bare-buffer": {
289
+ "version": "3.7.3",
290
+ "resolved": "https://registry.npmjs.org/bare-buffer/-/bare-buffer-3.7.3.tgz",
291
+ "integrity": "sha512-77owW16RX6YgdOzddHtM0oGz8wsd0/F9k/0coz6TPmjUHnr/9FwWODVMNKwyYWM/a/ESdTum855nfQxnsKUygA==",
292
+ "license": "Apache-2.0",
293
+ "engines": {
294
+ "bare": ">=1.20.0"
295
+ }
296
+ },
297
+ "node_modules/bare-events": {
298
+ "version": "2.9.2",
299
+ "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.9.2.tgz",
300
+ "integrity": "sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==",
301
+ "license": "Apache-2.0",
302
+ "peerDependencies": {
303
+ "bare-abort-controller": "*"
304
+ },
305
+ "peerDependenciesMeta": {
306
+ "bare-abort-controller": {
307
+ "optional": true
308
+ }
309
+ }
310
+ },
311
+ "node_modules/bare-fs": {
312
+ "version": "4.8.4",
313
+ "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.8.4.tgz",
314
+ "integrity": "sha512-MPC2eyrpbk3A873sK4y6rk+Iv4o2enxTjHZ8zH3HO0mjrpm5XjnguY2XmfidIsDV6vnjpbMBKUAJpV0ISD2SsQ==",
315
+ "license": "Apache-2.0",
316
+ "dependencies": {
317
+ "bare-events": "^2.5.4",
318
+ "bare-path": "^3.0.0",
319
+ "bare-stream": "^2.6.4",
320
+ "bare-url": "^2.2.2",
321
+ "fast-fifo": "^1.3.2"
322
+ },
323
+ "engines": {
324
+ "bare": ">=1.28.0"
325
+ },
326
+ "peerDependencies": {
327
+ "bare-buffer": "*"
328
+ },
329
+ "peerDependenciesMeta": {
330
+ "bare-buffer": {
331
+ "optional": true
332
+ }
333
+ }
334
+ },
335
+ "node_modules/bare-path": {
336
+ "version": "3.1.3",
337
+ "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.1.3.tgz",
338
+ "integrity": "sha512-8r+FVU/o4zcFmpCDqbqAYhHHbtXPP+cyZKo7DRGRWc7OLlNs4TMaSQEpXL/sIdzyEG0M7RHw4B7xYMGrTc+qrg==",
339
+ "license": "Apache-2.0"
340
+ },
341
+ "node_modules/bare-stream": {
342
+ "version": "2.13.4",
343
+ "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.13.4.tgz",
344
+ "integrity": "sha512-PcrQ8lVLbiJscNm1Kez+Yp4Gy4AHGcN1lzwjvf5NybWen7VvEgUfyfnXYJ2zNqWnzOfCb1Abq6lH8ti0syQszA==",
345
+ "license": "Apache-2.0",
346
+ "dependencies": {
347
+ "b4a": "^1.8.1",
348
+ "streamx": "^2.25.0",
349
+ "teex": "^1.0.1"
350
+ },
351
+ "peerDependencies": {
352
+ "bare-abort-controller": "*",
353
+ "bare-buffer": "*",
354
+ "bare-events": "*"
355
+ },
356
+ "peerDependenciesMeta": {
357
+ "bare-abort-controller": {
358
+ "optional": true
359
+ },
360
+ "bare-buffer": {
361
+ "optional": true
362
+ },
363
+ "bare-events": {
364
+ "optional": true
365
+ }
366
+ }
367
+ },
368
+ "node_modules/bare-url": {
369
+ "version": "2.5.8",
370
+ "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.5.8.tgz",
371
+ "integrity": "sha512-G5KTe5Bj6z5pqIxcn3lWlIFIv0rkXbccx0T0Xuf7t4RapfSWvFlcVbrwYXxFZ00PC4lp57OCIk6uXP/r3GbpDw==",
372
+ "license": "Apache-2.0",
373
+ "dependencies": {
374
+ "bare-buffer": "^3.0.0",
375
+ "bare-path": "^3.0.0"
376
+ }
377
+ },
378
+ "node_modules/basic-ftp": {
379
+ "version": "5.3.1",
380
+ "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.3.1.tgz",
381
+ "integrity": "sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==",
382
+ "license": "MIT",
383
+ "engines": {
384
+ "node": ">=10.0.0"
385
+ }
386
+ },
387
+ "node_modules/buffer-crc32": {
388
+ "version": "0.2.13",
389
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
390
+ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
391
+ "license": "MIT",
392
+ "engines": {
393
+ "node": "*"
394
+ }
395
+ },
396
+ "node_modules/chromium-bidi": {
397
+ "version": "13.1.1",
398
+ "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-13.1.1.tgz",
399
+ "integrity": "sha512-zB9MpoPd7VJwjowQqiW3FKOvQwffFMjQ8Iejp5ZW+sJaKLRhZX1sTxzl3Zt22TDB4zP0OOqs8lRoY7eAW5geyQ==",
400
+ "license": "Apache-2.0",
401
+ "dependencies": {
402
+ "mitt": "^3.0.1",
403
+ "zod": "^3.24.1"
404
+ },
405
+ "peerDependencies": {
406
+ "devtools-protocol": "*"
407
+ }
408
+ },
409
+ "node_modules/chromium-bidi/node_modules/zod": {
410
+ "version": "3.25.76",
411
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
412
+ "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
413
+ "license": "MIT",
414
+ "funding": {
415
+ "url": "https://github.com/sponsors/colinhacks"
416
+ }
417
+ },
418
+ "node_modules/cliui": {
419
+ "version": "8.0.1",
420
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
421
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
422
+ "license": "ISC",
423
+ "dependencies": {
424
+ "string-width": "^4.2.0",
425
+ "strip-ansi": "^6.0.1",
426
+ "wrap-ansi": "^7.0.0"
427
+ },
428
+ "engines": {
429
+ "node": ">=12"
430
+ }
431
+ },
432
+ "node_modules/color-convert": {
433
+ "version": "2.0.1",
434
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
435
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
436
+ "license": "MIT",
437
+ "dependencies": {
438
+ "color-name": "~1.1.4"
439
+ },
440
+ "engines": {
441
+ "node": ">=7.0.0"
442
+ }
443
+ },
444
+ "node_modules/color-name": {
445
+ "version": "1.1.4",
446
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
447
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
448
+ "license": "MIT"
449
+ },
450
+ "node_modules/colorjs.io": {
451
+ "version": "0.6.1",
452
+ "resolved": "https://registry.npmjs.org/colorjs.io/-/colorjs.io-0.6.1.tgz",
453
+ "integrity": "sha512-8lyR2wHzuIykCpqHKgluGsqQi5iDm3/a2IgP2GBZrasn2sBRkE4NOGsglZxWLs/jZQoNkmA/KM/8NV16rLUdBg==",
454
+ "license": "MIT",
455
+ "funding": {
456
+ "type": "opencollective",
457
+ "url": "https://opencollective.com/color"
458
+ }
459
+ },
460
+ "node_modules/data-uri-to-buffer": {
461
+ "version": "6.0.2",
462
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz",
463
+ "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==",
464
+ "license": "MIT",
465
+ "engines": {
466
+ "node": ">= 14"
467
+ }
468
+ },
469
+ "node_modules/debug": {
470
+ "version": "4.4.3",
471
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
472
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
473
+ "license": "MIT",
474
+ "dependencies": {
475
+ "ms": "^2.1.3"
476
+ },
477
+ "engines": {
478
+ "node": ">=6.0"
479
+ },
480
+ "peerDependenciesMeta": {
481
+ "supports-color": {
482
+ "optional": true
483
+ }
484
+ }
485
+ },
486
+ "node_modules/degenerator": {
487
+ "version": "5.0.1",
488
+ "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz",
489
+ "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==",
490
+ "license": "MIT",
491
+ "dependencies": {
492
+ "ast-types": "^0.13.4",
493
+ "escodegen": "^2.1.0",
494
+ "esprima": "^4.0.1"
495
+ },
496
+ "engines": {
497
+ "node": ">= 14"
498
+ }
499
+ },
500
+ "node_modules/devtools-protocol": {
501
+ "version": "0.0.1566079",
502
+ "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1566079.tgz",
503
+ "integrity": "sha512-MJfAEA1UfVhSs7fbSQOG4czavUp1ajfg6prlAN0+cmfa2zNjaIbvq8VneP7do1WAQQIvgNJWSMeP6UyI90gIlQ==",
504
+ "license": "BSD-3-Clause"
505
+ },
506
+ "node_modules/emoji-regex": {
507
+ "version": "8.0.0",
508
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
509
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
510
+ "license": "MIT"
511
+ },
512
+ "node_modules/end-of-stream": {
513
+ "version": "1.4.5",
514
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
515
+ "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
516
+ "license": "MIT",
517
+ "dependencies": {
518
+ "once": "^1.4.0"
519
+ }
520
+ },
521
+ "node_modules/escalade": {
522
+ "version": "3.2.0",
523
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
524
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
525
+ "license": "MIT",
526
+ "engines": {
527
+ "node": ">=6"
528
+ }
529
+ },
530
+ "node_modules/escodegen": {
531
+ "version": "2.1.0",
532
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz",
533
+ "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==",
534
+ "license": "BSD-2-Clause",
535
+ "dependencies": {
536
+ "esprima": "^4.0.1",
537
+ "estraverse": "^5.2.0",
538
+ "esutils": "^2.0.2"
539
+ },
540
+ "bin": {
541
+ "escodegen": "bin/escodegen.js",
542
+ "esgenerate": "bin/esgenerate.js"
543
+ },
544
+ "engines": {
545
+ "node": ">=6.0"
546
+ },
547
+ "optionalDependencies": {
548
+ "source-map": "~0.6.1"
549
+ }
550
+ },
551
+ "node_modules/esprima": {
552
+ "version": "4.0.1",
553
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
554
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
555
+ "license": "BSD-2-Clause",
556
+ "bin": {
557
+ "esparse": "bin/esparse.js",
558
+ "esvalidate": "bin/esvalidate.js"
559
+ },
560
+ "engines": {
561
+ "node": ">=4"
562
+ }
563
+ },
564
+ "node_modules/estraverse": {
565
+ "version": "5.3.0",
566
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
567
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
568
+ "license": "BSD-2-Clause",
569
+ "engines": {
570
+ "node": ">=4.0"
571
+ }
572
+ },
573
+ "node_modules/esutils": {
574
+ "version": "2.0.3",
575
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
576
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
577
+ "license": "BSD-2-Clause",
578
+ "engines": {
579
+ "node": ">=0.10.0"
580
+ }
581
+ },
582
+ "node_modules/events-universal": {
583
+ "version": "1.0.1",
584
+ "resolved": "https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz",
585
+ "integrity": "sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==",
586
+ "license": "Apache-2.0",
587
+ "dependencies": {
588
+ "bare-events": "^2.7.0"
589
+ }
590
+ },
591
+ "node_modules/extract-zip": {
592
+ "version": "2.0.1",
593
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
594
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
595
+ "license": "BSD-2-Clause",
596
+ "dependencies": {
597
+ "debug": "^4.1.1",
598
+ "get-stream": "^5.1.0",
599
+ "yauzl": "^2.10.0"
600
+ },
601
+ "bin": {
602
+ "extract-zip": "cli.js"
603
+ },
604
+ "engines": {
605
+ "node": ">= 10.17.0"
606
+ },
607
+ "optionalDependencies": {
608
+ "@types/yauzl": "^2.9.1"
609
+ }
610
+ },
611
+ "node_modules/fast-fifo": {
612
+ "version": "1.3.2",
613
+ "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
614
+ "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",
615
+ "license": "MIT"
616
+ },
617
+ "node_modules/fd-slicer": {
618
+ "version": "1.1.0",
619
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
620
+ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
621
+ "license": "MIT",
622
+ "dependencies": {
623
+ "pend": "~1.2.0"
624
+ }
625
+ },
626
+ "node_modules/get-caller-file": {
627
+ "version": "2.0.5",
628
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
629
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
630
+ "license": "ISC",
631
+ "engines": {
632
+ "node": "6.* || 8.* || >= 10.*"
633
+ }
634
+ },
635
+ "node_modules/get-stream": {
636
+ "version": "5.2.0",
637
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
638
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
639
+ "license": "MIT",
640
+ "dependencies": {
641
+ "pump": "^3.0.0"
642
+ },
643
+ "engines": {
644
+ "node": ">=8"
645
+ },
646
+ "funding": {
647
+ "url": "https://github.com/sponsors/sindresorhus"
648
+ }
649
+ },
650
+ "node_modules/get-uri": {
651
+ "version": "6.0.5",
652
+ "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz",
653
+ "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==",
654
+ "license": "MIT",
655
+ "dependencies": {
656
+ "basic-ftp": "^5.0.2",
657
+ "data-uri-to-buffer": "^6.0.2",
658
+ "debug": "^4.3.4"
659
+ },
660
+ "engines": {
661
+ "node": ">= 14"
662
+ }
663
+ },
664
+ "node_modules/gifenc": {
665
+ "version": "1.0.3",
666
+ "resolved": "https://registry.npmjs.org/gifenc/-/gifenc-1.0.3.tgz",
667
+ "integrity": "sha512-xdr6AdrfGBcfzncONUOlXMBuc5wJDtOueE3c5rdG0oNgtINLD+f2iFZltrBRZYzACRbKr+mSVU/x98zv2u3jmw==",
668
+ "license": "MIT"
669
+ },
670
+ "node_modules/http-proxy-agent": {
671
+ "version": "7.0.2",
672
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
673
+ "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",
674
+ "license": "MIT",
675
+ "dependencies": {
676
+ "agent-base": "^7.1.0",
677
+ "debug": "^4.3.4"
678
+ },
679
+ "engines": {
680
+ "node": ">= 14"
681
+ }
682
+ },
683
+ "node_modules/https-proxy-agent": {
684
+ "version": "7.0.6",
685
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
686
+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
687
+ "license": "MIT",
688
+ "dependencies": {
689
+ "agent-base": "^7.1.2",
690
+ "debug": "4"
691
+ },
692
+ "engines": {
693
+ "node": ">= 14"
694
+ }
695
+ },
696
+ "node_modules/ip-address": {
697
+ "version": "10.7.6",
698
+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.6.tgz",
699
+ "integrity": "sha512-00LYkM6byILa9eQIx6qoaXCM40xTLd56AZ4vyaPW3YTyb49VZYPo5xsiAq4tuQ54GH4R7gVdYScJ1B7B77PuTg==",
700
+ "license": "MIT",
701
+ "engines": {
702
+ "node": ">= 12"
703
+ }
704
+ },
705
+ "node_modules/is-fullwidth-code-point": {
706
+ "version": "3.0.0",
707
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
708
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
709
+ "license": "MIT",
710
+ "engines": {
711
+ "node": ">=8"
712
+ }
713
+ },
714
+ "node_modules/libtess": {
715
+ "version": "1.2.2",
716
+ "resolved": "https://registry.npmjs.org/libtess/-/libtess-1.2.2.tgz",
717
+ "integrity": "sha512-Nps8HPeVVcsmJxUvFLKVJcCgcz+1ajPTXDVAVPs6+giOQP4AHV31uZFFkh+CKow/bkB7GbZWKmwmit7myaqDSw==",
718
+ "license": "SGI-B-2.0"
719
+ },
720
+ "node_modules/lru-cache": {
721
+ "version": "7.18.3",
722
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
723
+ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
724
+ "license": "ISC",
725
+ "engines": {
726
+ "node": ">=12"
727
+ }
728
+ },
729
+ "node_modules/mitt": {
730
+ "version": "3.0.1",
731
+ "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
732
+ "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==",
733
+ "license": "MIT"
734
+ },
735
+ "node_modules/ms": {
736
+ "version": "2.1.3",
737
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
738
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
739
+ "license": "MIT"
740
+ },
741
+ "node_modules/netmask": {
742
+ "version": "2.1.1",
743
+ "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.1.tgz",
744
+ "integrity": "sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==",
745
+ "license": "MIT",
746
+ "engines": {
747
+ "node": ">= 0.4.0"
748
+ }
749
+ },
750
+ "node_modules/omggif": {
751
+ "version": "1.0.10",
752
+ "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz",
753
+ "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==",
754
+ "license": "MIT"
755
+ },
756
+ "node_modules/once": {
757
+ "version": "1.4.0",
758
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
759
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
760
+ "license": "ISC",
761
+ "dependencies": {
762
+ "wrappy": "1"
763
+ }
764
+ },
765
+ "node_modules/p5": {
766
+ "version": "2.4.0",
767
+ "resolved": "https://registry.npmjs.org/p5/-/p5-2.4.0.tgz",
768
+ "integrity": "sha512-6y9X+2pjZjc1ZdLbSmJ2eyqFor3U1Ml+oeecG7069YjZXpeyurpchpnC5JCJOzUlEMypaembDo8PEMjStbuOMg==",
769
+ "license": "LGPL-2.1",
770
+ "dependencies": {
771
+ "@davepagurek/bezier-path": "^0.0.7",
772
+ "@japont/unicode-range": "^1.0.0",
773
+ "acorn": "^8.15.0",
774
+ "acorn-walk": "^8.3.4",
775
+ "colorjs.io": "^0.6.0",
776
+ "escodegen": "^2.1.0",
777
+ "gifenc": "^1.0.3",
778
+ "libtess": "^1.2.2",
779
+ "omggif": "^1.0.10",
780
+ "pako": "^2.1.0",
781
+ "tl-util": "npm:@limzykenneth/tl-util@0.0.1",
782
+ "zimmerframe": "^1.1.4",
783
+ "zod": "^4.2.1"
784
+ }
785
+ },
786
+ "node_modules/p5.brush": {
787
+ "version": "3.0.0",
788
+ "resolved": "https://registry.npmjs.org/p5.brush/-/p5.brush-3.0.0.tgz",
789
+ "integrity": "sha512-dSpJlr+CYBtUNEarH9Kv75OVuVrQ9VHSxI0ukRmSqXYDIhyoA+dxqsuVsPNQId5o4uo2zknSAOCCeOaAA30b8w==",
790
+ "license": "MIT",
791
+ "dependencies": {
792
+ "simplex-noise": "^4.0.3"
793
+ },
794
+ "peerDependencies": {
795
+ "p5": "^2.2"
796
+ }
797
+ },
798
+ "node_modules/pac-proxy-agent": {
799
+ "version": "7.2.0",
800
+ "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz",
801
+ "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==",
802
+ "license": "MIT",
803
+ "dependencies": {
804
+ "@tootallnate/quickjs-emscripten": "^0.23.0",
805
+ "agent-base": "^7.1.2",
806
+ "debug": "^4.3.4",
807
+ "get-uri": "^6.0.1",
808
+ "http-proxy-agent": "^7.0.0",
809
+ "https-proxy-agent": "^7.0.6",
810
+ "pac-resolver": "^7.0.1",
811
+ "socks-proxy-agent": "^8.0.5"
812
+ },
813
+ "engines": {
814
+ "node": ">= 14"
815
+ }
816
+ },
817
+ "node_modules/pac-resolver": {
818
+ "version": "7.0.1",
819
+ "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz",
820
+ "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==",
821
+ "license": "MIT",
822
+ "dependencies": {
823
+ "degenerator": "^5.0.0",
824
+ "netmask": "^2.0.2"
825
+ },
826
+ "engines": {
827
+ "node": ">= 14"
828
+ }
829
+ },
830
+ "node_modules/pako": {
831
+ "version": "2.2.0",
832
+ "resolved": "https://registry.npmjs.org/pako/-/pako-2.2.0.tgz",
833
+ "integrity": "sha512-zJq6RP/5q+TO2OpFV3FHzlPnFjmkb7Nc99a5SNjJE+uu/PkpChs+NIZSSzbBoD+6kjiISXjfYdwj1ZRQ81dz/w==",
834
+ "funding": [
835
+ {
836
+ "type": "github",
837
+ "url": "https://github.com/sponsors/puzrin"
838
+ },
839
+ {
840
+ "type": "github",
841
+ "url": "https://github.com/sponsors/nodeca"
842
+ }
843
+ ],
844
+ "license": "(MIT AND Zlib)"
845
+ },
846
+ "node_modules/pend": {
847
+ "version": "1.2.0",
848
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
849
+ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
850
+ "license": "MIT"
851
+ },
852
+ "node_modules/progress": {
853
+ "version": "2.0.3",
854
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
855
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
856
+ "license": "MIT",
857
+ "engines": {
858
+ "node": ">=0.4.0"
859
+ }
860
+ },
861
+ "node_modules/proxy-agent": {
862
+ "version": "6.5.0",
863
+ "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz",
864
+ "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==",
865
+ "license": "MIT",
866
+ "dependencies": {
867
+ "agent-base": "^7.1.2",
868
+ "debug": "^4.3.4",
869
+ "http-proxy-agent": "^7.0.1",
870
+ "https-proxy-agent": "^7.0.6",
871
+ "lru-cache": "^7.14.1",
872
+ "pac-proxy-agent": "^7.1.0",
873
+ "proxy-from-env": "^1.1.0",
874
+ "socks-proxy-agent": "^8.0.5"
875
+ },
876
+ "engines": {
877
+ "node": ">= 14"
878
+ }
879
+ },
880
+ "node_modules/proxy-from-env": {
881
+ "version": "1.1.0",
882
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
883
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
884
+ "license": "MIT"
885
+ },
886
+ "node_modules/pump": {
887
+ "version": "3.0.4",
888
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz",
889
+ "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==",
890
+ "license": "MIT",
891
+ "dependencies": {
892
+ "end-of-stream": "^1.1.0",
893
+ "once": "^1.3.1"
894
+ }
895
+ },
896
+ "node_modules/puppeteer-core": {
897
+ "version": "24.37.2",
898
+ "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.37.2.tgz",
899
+ "integrity": "sha512-nN8qwE3TGF2vA/+xemPxbesntTuqD9vCGOiZL2uh8HES3pPzLX20MyQjB42dH2rhQ3W3TljZ4ZaKZ0yX/abQuw==",
900
+ "license": "Apache-2.0",
901
+ "dependencies": {
902
+ "@puppeteer/browsers": "2.12.0",
903
+ "chromium-bidi": "13.1.1",
904
+ "debug": "^4.4.3",
905
+ "devtools-protocol": "0.0.1566079",
906
+ "typed-query-selector": "^2.12.0",
907
+ "webdriver-bidi-protocol": "0.4.0",
908
+ "ws": "^8.19.0"
909
+ },
910
+ "engines": {
911
+ "node": ">=18"
912
+ }
913
+ },
914
+ "node_modules/require-directory": {
915
+ "version": "2.1.1",
916
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
917
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
918
+ "license": "MIT",
919
+ "engines": {
920
+ "node": ">=0.10.0"
921
+ }
922
+ },
923
+ "node_modules/semver": {
924
+ "version": "7.8.6",
925
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz",
926
+ "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==",
927
+ "license": "ISC",
928
+ "bin": {
929
+ "semver": "bin/semver.js"
930
+ },
931
+ "engines": {
932
+ "node": ">=10"
933
+ }
934
+ },
935
+ "node_modules/simplex-noise": {
936
+ "version": "4.0.3",
937
+ "resolved": "https://registry.npmjs.org/simplex-noise/-/simplex-noise-4.0.3.tgz",
938
+ "integrity": "sha512-qSE2I4AngLQG7BXqoZj51jokT4WUXe8mOBrvfOXpci8+6Yu44+/dD5zqDpOx3Ux792eamTd2lLcI8jqFntk/lg==",
939
+ "license": "MIT"
940
+ },
941
+ "node_modules/smart-buffer": {
942
+ "version": "4.2.0",
943
+ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
944
+ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
945
+ "license": "MIT",
946
+ "engines": {
947
+ "node": ">= 6.0.0",
948
+ "npm": ">= 3.0.0"
949
+ }
950
+ },
951
+ "node_modules/socks": {
952
+ "version": "2.8.10",
953
+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.10.tgz",
954
+ "integrity": "sha512-e0VyvkVTwVYViNovRkZ9aodhxVlyoMn7eJhVUPxZ+eK9P/7CBkxvvsBOHqFPEH416726W8tLXXXjKwqgTErrCQ==",
955
+ "license": "MIT",
956
+ "dependencies": {
957
+ "ip-address": "^10.1.1",
958
+ "smart-buffer": "^4.2.0"
959
+ },
960
+ "engines": {
961
+ "node": ">= 10.0.0",
962
+ "npm": ">= 3.0.0"
963
+ }
964
+ },
965
+ "node_modules/socks-proxy-agent": {
966
+ "version": "8.0.5",
967
+ "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz",
968
+ "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==",
969
+ "license": "MIT",
970
+ "dependencies": {
971
+ "agent-base": "^7.1.2",
972
+ "debug": "^4.3.4",
973
+ "socks": "^2.8.3"
974
+ },
975
+ "engines": {
976
+ "node": ">= 14"
977
+ }
978
+ },
979
+ "node_modules/source-map": {
980
+ "version": "0.6.1",
981
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
982
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
983
+ "license": "BSD-3-Clause",
984
+ "optional": true,
985
+ "engines": {
986
+ "node": ">=0.10.0"
987
+ }
988
+ },
989
+ "node_modules/streamx": {
990
+ "version": "2.28.1",
991
+ "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.28.1.tgz",
992
+ "integrity": "sha512-zEzXb0s5Cds7tqMH6rhZ05lcJydCWiQPEwiNngVqzsxCc962vLY4Uw+mW7od8kDH258k2Uz/JrOkdIAAhSh9VA==",
993
+ "license": "MIT",
994
+ "dependencies": {
995
+ "events-universal": "^1.0.0",
996
+ "fast-fifo": "^1.3.2",
997
+ "text-decoder": "^1.1.0"
998
+ }
999
+ },
1000
+ "node_modules/string-width": {
1001
+ "version": "4.2.3",
1002
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
1003
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
1004
+ "license": "MIT",
1005
+ "dependencies": {
1006
+ "emoji-regex": "^8.0.0",
1007
+ "is-fullwidth-code-point": "^3.0.0",
1008
+ "strip-ansi": "^6.0.1"
1009
+ },
1010
+ "engines": {
1011
+ "node": ">=8"
1012
+ }
1013
+ },
1014
+ "node_modules/strip-ansi": {
1015
+ "version": "6.0.1",
1016
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
1017
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
1018
+ "license": "MIT",
1019
+ "dependencies": {
1020
+ "ansi-regex": "^5.0.1"
1021
+ },
1022
+ "engines": {
1023
+ "node": ">=8"
1024
+ }
1025
+ },
1026
+ "node_modules/tar-fs": {
1027
+ "version": "3.1.3",
1028
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.3.tgz",
1029
+ "integrity": "sha512-/hU4AXnIdZu+Gvl1pk0oI5f5HxWsCJRtY2aFaJdk9VvyL48DWU6iU5WAIPG+wIi1YvWA6eTJvIviP/tMAZZNwQ==",
1030
+ "license": "MIT",
1031
+ "dependencies": {
1032
+ "pump": "^3.0.0",
1033
+ "tar-stream": "^3.1.5"
1034
+ },
1035
+ "optionalDependencies": {
1036
+ "bare-fs": "^4.0.1",
1037
+ "bare-path": "^3.0.0"
1038
+ }
1039
+ },
1040
+ "node_modules/tar-stream": {
1041
+ "version": "3.2.2",
1042
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.2.2.tgz",
1043
+ "integrity": "sha512-+8NeqHRjQWH9nYlwo2gamAMImZCVzI4UoEgDpWorBt9OEfppiZn+uSkskzQKPWIZyji/C8fpWO7u69G0DX0tbg==",
1044
+ "license": "MIT",
1045
+ "dependencies": {
1046
+ "b4a": "^1.9.0",
1047
+ "bare-fs": "^4.8.2",
1048
+ "fast-fifo": "^1.3.2",
1049
+ "streamx": "^2.28.1"
1050
+ }
1051
+ },
1052
+ "node_modules/teex": {
1053
+ "version": "1.0.1",
1054
+ "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz",
1055
+ "integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==",
1056
+ "license": "MIT",
1057
+ "dependencies": {
1058
+ "streamx": "^2.12.5"
1059
+ }
1060
+ },
1061
+ "node_modules/text-decoder": {
1062
+ "version": "1.2.7",
1063
+ "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.7.tgz",
1064
+ "integrity": "sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==",
1065
+ "license": "Apache-2.0",
1066
+ "dependencies": {
1067
+ "b4a": "^1.6.4"
1068
+ }
1069
+ },
1070
+ "node_modules/tl-util": {
1071
+ "name": "@limzykenneth/tl-util",
1072
+ "version": "0.0.1",
1073
+ "resolved": "https://registry.npmjs.org/@limzykenneth/tl-util/-/tl-util-0.0.1.tgz",
1074
+ "integrity": "sha512-s7mR7HzSY7HUBzsVQWQzGm6GTGYOlJy/Y4WctTPtHepKIXYIB93mDrFggclEg/WqnWNP951shh2VAqDPZllGFw==",
1075
+ "license": "MIT"
1076
+ },
1077
+ "node_modules/tslib": {
1078
+ "version": "2.9.1",
1079
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz",
1080
+ "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==",
1081
+ "license": "0BSD"
1082
+ },
1083
+ "node_modules/typed-query-selector": {
1084
+ "version": "2.12.4",
1085
+ "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.4.tgz",
1086
+ "integrity": "sha512-lF6/OY655DSWZeuNovde8TZhju6QyC0Xtav57b07oZQ1EQvfSowA3+WfLEhvFJOc9sVfAtW5hie1lGIppOqbpQ==",
1087
+ "license": "MIT"
1088
+ },
1089
+ "node_modules/undici-types": {
1090
+ "version": "8.9.0",
1091
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
1092
+ "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==",
1093
+ "license": "MIT",
1094
+ "optional": true
1095
+ },
1096
+ "node_modules/webdriver-bidi-protocol": {
1097
+ "version": "0.4.0",
1098
+ "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.4.0.tgz",
1099
+ "integrity": "sha512-U9VIlNRrq94d1xxR9JrCEAx5Gv/2W7ERSv8oWRoNe/QYbfccS0V3h/H6qeNeCRJxXGMhhnkqvwNrvPAYeuP9VA==",
1100
+ "license": "Apache-2.0"
1101
+ },
1102
+ "node_modules/wrap-ansi": {
1103
+ "version": "7.0.0",
1104
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
1105
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
1106
+ "license": "MIT",
1107
+ "dependencies": {
1108
+ "ansi-styles": "^4.0.0",
1109
+ "string-width": "^4.1.0",
1110
+ "strip-ansi": "^6.0.0"
1111
+ },
1112
+ "engines": {
1113
+ "node": ">=10"
1114
+ },
1115
+ "funding": {
1116
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
1117
+ }
1118
+ },
1119
+ "node_modules/wrappy": {
1120
+ "version": "1.0.2",
1121
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1122
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
1123
+ "license": "ISC"
1124
+ },
1125
+ "node_modules/ws": {
1126
+ "version": "8.23.0",
1127
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.23.0.tgz",
1128
+ "integrity": "sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ==",
1129
+ "license": "MIT",
1130
+ "engines": {
1131
+ "node": ">=10.0.0"
1132
+ },
1133
+ "peerDependencies": {
1134
+ "bufferutil": "^4.0.1",
1135
+ "utf-8-validate": ">=5.0.2"
1136
+ },
1137
+ "peerDependenciesMeta": {
1138
+ "bufferutil": {
1139
+ "optional": true
1140
+ },
1141
+ "utf-8-validate": {
1142
+ "optional": true
1143
+ }
1144
+ }
1145
+ },
1146
+ "node_modules/y18n": {
1147
+ "version": "5.0.8",
1148
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
1149
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
1150
+ "license": "ISC",
1151
+ "engines": {
1152
+ "node": ">=10"
1153
+ }
1154
+ },
1155
+ "node_modules/yargs": {
1156
+ "version": "17.7.3",
1157
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz",
1158
+ "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==",
1159
+ "license": "MIT",
1160
+ "dependencies": {
1161
+ "cliui": "^8.0.1",
1162
+ "escalade": "^3.1.1",
1163
+ "get-caller-file": "^2.0.5",
1164
+ "require-directory": "^2.1.1",
1165
+ "string-width": "^4.2.3",
1166
+ "y18n": "^5.0.5",
1167
+ "yargs-parser": "^21.1.1"
1168
+ },
1169
+ "engines": {
1170
+ "node": ">=12"
1171
+ }
1172
+ },
1173
+ "node_modules/yargs-parser": {
1174
+ "version": "21.1.1",
1175
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
1176
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
1177
+ "license": "ISC",
1178
+ "engines": {
1179
+ "node": ">=12"
1180
+ }
1181
+ },
1182
+ "node_modules/yauzl": {
1183
+ "version": "2.10.0",
1184
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
1185
+ "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
1186
+ "license": "MIT",
1187
+ "dependencies": {
1188
+ "buffer-crc32": "~0.2.3",
1189
+ "fd-slicer": "~1.1.0"
1190
+ }
1191
+ },
1192
+ "node_modules/zimmerframe": {
1193
+ "version": "1.1.5",
1194
+ "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.5.tgz",
1195
+ "integrity": "sha512-msJxIvYDYcoNL+PJsu+7qmpDWsYmAxTY+2TNYXXF0hzBzBk0BMecOqDOG/EckUoKCuKwObfbugIl8QpqHDXeFA==",
1196
+ "license": "MIT"
1197
+ },
1198
+ "node_modules/zod": {
1199
+ "version": "4.6.7",
1200
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz",
1201
+ "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==",
1202
+ "license": "MIT",
1203
+ "funding": {
1204
+ "url": "https://github.com/sponsors/colinhacks"
1205
+ }
1206
+ }
1207
+ }
1208
+ }
task_137/environment/package.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "pelican-test",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "engines": {
7
+ "node": ">=20"
8
+ },
9
+ "dependencies": {
10
+ "@ffmpeg-installer/ffmpeg": "1.1.0",
11
+ "p5": "2.4.0",
12
+ "p5.brush": "3.0.0",
13
+ "puppeteer-core": "24.37.2"
14
+ }
15
+ }
task_137/environment/pelican-chromium ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ #!/bin/sh
2
+ exec /usr/bin/chromium --no-sandbox --disable-dev-shm-usage "$@"
task_137/instruction.md CHANGED
@@ -1,10 +1,46 @@
1
- # Animate a pelican riding a bicycle
2
 
3
- Create a self-contained `/app/scene.svg` and a browser preview at `/app/index.html`. The SVG must have a valid `viewBox` and descriptive `<title>`. Use declarative motion on the SVG document timeline so the scene advances when that timeline is scrubbed (for example with SVG animation elements). Do not use raster images, scripts, `foreignObject`, embedded HTML, event handlers, external styles, or external assets; SVG references must target internal fragments.
4
 
5
- ## Acceptance Checklist
6
 
7
- - Show a coherent right-facing pelican riding a right-facing bicycle. Use visible painted geometry with these IDs, kept in the viewBox: `bike-frame`, `wheel-left`, `wheel-right`, `seat`, `handlebars`, `pelican-body`, `pelican-head`, `pelican-beak`, `pelican-wing`, `pelican-foot-left`, `pelican-foot-right`, `pedal-left`, and `pedal-right`. Labels or transparent placeholders do not count.
8
- - Connect two separated, similarly sized circular wheels on a shared baseline with the bicycle frame. Locate the seat below the bird and above the wheels, the beak ahead of the head, and handlebars ahead of the seat. Each foot contacts its pedal.
9
- - Visibly rotate both wheels, flap the wing, and cycle both pedals and feet together so contact and recognizability remain throughout the loop. The wheel interiors need features whose rotation is visible.
10
- - Open both files directly via `file://` and see continuous motion without a server. `npm start` must serve the same scene at `http://localhost:3000/`, or the port set by `PORT`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # The Pelican Test
2
 
3
+ Create a polished, English-language, code-generated animated film in `/app`. Its premise is that humans have drawn pelicans riding bicycles since before bicycles existed. Follow one pelican along a continuous route through twenty framed artworks, changing how it is drawn to suit each era. Let the visual jokes come from the situations and reactions. Draw the animation and synthesize the score in code, using original artwork and sounds, public-domain inspirations, and fictional interfaces. The environment has Node, Chromium, FFmpeg, p5, p5.brush, and Puppeteer. No network is needed at runtime.
4
 
5
+ ## Timing and direction
6
 
7
+ - 97 seconds, 120 BPM, 60 fps. The paper-textured opening takes 5 seconds, each artwork takes 4 seconds, and the press-conference ending takes 12 seconds. Artwork `n` begins at `5 + 4*(n-1)` seconds. Give each artwork a readable English title and period. Frame crossings land on a beat and give the camera a small push. A pedal turn takes two beats. Preserve the rider's pose and direction through each frame even as its style changes.
8
+ - Opening: a labeled study sketch, a solemn assertion that people have always been obsessed with drawing pelicans riding bicycles, and the reveal that this started before bicycles were invented. Credit a fictional art history.
9
+ - In each artwork, use the first part to enter, the middle to reveal the joke, and the end to approach the next frame. Keep the camera smooth while updating Wayang, the pixel game, and the chat animation at 8–12 updates per second.
10
+ - Ending: pull back to a 7×3 wall with the twenty artworks followed by an empty press seat. Say that humanity has submitted twenty entries. Push to the empty chair, flash the cameras, and show the subtitle that the pelican has yet to comment. The pelican rides behind the seat with one bell, and the film holds on the empty chair. Give the microphones no real logos and use the nameplate “Pelican (in person).”
11
+
12
+ | Order | Artwork and period | On-screen action |
13
+ | --- | --- | --- |
14
+ | 1 | Saharan Rock Art, c. 4000 BCE | Ochre on layered rock. Herders and cattle stop and look. |
15
+ | 2 | Egyptian Wall Painting, c. 1300 BCE | Deliberate freeze in profile. Hieroglyph-like framing and faint draftsman's grid. |
16
+ | 3 | Han Stone Relief Rubbing, c. 100 CE | White marks on dark ink. The bicycle joins a horse-and-carriage procession. |
17
+ | 4 | Tang Line Drawing, c. 750 | Fine ink outlines. Feathers and ribbons stream in the wind. |
18
+ | 5 | Song Monumental Landscape, c. 1000 | Small rider dwarfed by an ink mountain. A push reveals it. |
19
+ | 6 | Along the River During Qingming, c. 1100 | Visitors turn to watch as the rider crosses the Rainbow Bridge. |
20
+ | 7 | Maya Codex, c. 1200 | On a painted foldout, dots and bars count pedal rotations. |
21
+ | 8 | Mughal Miniature, c. 1600 | Gilt garden page. Courtiers watch across multiple planes of perspective. |
22
+ | 9 | Bada Shanren Freehand Ink, c. 1690 | Economical brush marks and open paper. The pelican rolls its eye. |
23
+ | 10 | Javanese Wayang Kulit, c. 1800 | Filigree shadow puppet and visible control rods. The wheels stutter. |
24
+ | 11 | Ukiyo-e Tōkaidō, 1830s | Woodblock-style travel on the Tōkaidō road. |
25
+ | 12 | The Starry Night, 1889 | The sky swirls in time with the turning wheels. |
26
+ | 13 | The Scream, 1893 | A bystander on the bridge recoils and screams. |
27
+ | 14 | Nosferatu, 1922 | Show the rider's shadow climbing a stair wall. At the 61-second beat its outline lights up bright green in the same area and persists into the CRT. Keep the effect concentrated around the trace. |
28
+ | 15 | Oscilloscope Vector Display, 1950s | Green phosphor and persistence on a dark screen. A mistaken knob turn morphs the rider into a Lissajous figure before it snaps back. |
29
+ | 16 | 8-bit Platform Game, 1980s | A pixel bike jumps a gap and collects a coin. A beat lands on “1UP”. |
30
+ | 17 | Early Chat Window, 2000s | A fictional messenger displays a dithered, low-frame-rate riding GIF, typing status, and a beat-timed window shake. |
31
+ | 18 | Vaporwave, 2010s | A pink, purple, and cyan grid with palms and a bust. The scene's music slows like tape and briefly repeats a half-beat before recovering. |
32
+ | 19 | Vertical Short Video, 2020s | A centered 9:16 fictional feed with dark side bars and rising reactions. Use a visible horizontal progress bar with a bright fill near the bottom. It advances through the 4-second scene and completes at the 81-second gate. |
33
+ | 20 | Code Aesthetics, 2020s | A dark editor types SVG as a detailed rider is drawn into being. |
34
+
35
+ Give Han, Tang, Song, Qingming, and Bada shared materials (paper grain, dry brush, ink pooling and bleed) and individual mark-making. Use public-domain visual references and original staging.
36
+
37
+ Compose an original recurring theme. Use synthesized hand drum and chant for Sahara, harp for Egypt, tuned bells for Han, pipa for Tang, guqin for Song, flute and percussion for Qingming, ocarina and wooden drum for Maya, sitar and tabla for Mughal, xiao for Bada, gamelan for Wayang, and shamisen for the Tōkaidō. Use strings for the two late nineteenth-century scenes and silent-film piano and organ for Nosferatu. Include off-pitch strings for the scream, a pitch bend for the oscilloscope, four-channel chiptune and a coin sound for the game, MIDI-like tones for chat, a short pop beat for the vertical feed, and piano and synthesizer for the final artwork. Bring the instrument families together at the ending, fade them as the camera moves in, and finish on a lone bell. Seek and pause the sound with the picture.
38
+
39
+ For Vaporwave, synthesize original mall music offline at 151.2 BPM, four semitones high. Use FM electric piano with major-seventh and minor-ninth harmony, fretless bass, FM sax, and soft gated drums. Play the result at about 0.7937×, returning to the film's tempo and key, with a 4 kHz low-pass, long wet reverb, slow pitch wow, and light tape noise. Slide into and out of the speed change. Repeat half a beat three or four times in the middle, then resume.
40
+
41
+ ## Deliverables and renderer interface
42
+
43
+ - `npm run preview` in `/app` serves a working player on `127.0.0.1` at `$PREVIEW_PORT` (default `4173`). It works offline. Expose the 16:9 artwork as `#screen`, a play/pause button as `#play`, a time slider in seconds as `#seek`, and the current chapter name as `#scene-name`. Provide the remaining navigation in the interface as you see fit.
44
+ - With `?capture` on the URL, expose `window.pelican.duration` and `window.pelican.renderAt(seconds)`. The latter can be async and must render a deterministic frame independent of seek order. The same film must appear in the player, the capture view, and the export.
45
+ - For Sahara and Egypt, also support `renderAt(seconds, { phaseOffset, omit })` in the capture view. `phaseOffset` adds radians clockwise to the crank and recomputes the corresponding legs while the rest of the scene stays at `seconds`. Zero gives the original frame. `omit` can be `near-foot`, `far-foot`, `near-pedal`, or `far-pedal`. Skip only the named visible contact end or pedal platform in the artwork. Keep the rig, camera, background, crop, and all other marks in place. Each call stands alone. Keep the two pedal platforms separable and show both feet making contact through most of the Sahara cycle.
46
+ - `npm run final` writes `out/final/the-pelican-test.mp4`, a 1920×1080 H.264 MP4 at exactly 60 fps (5,820 frames) with AAC stereo sound. The same command accepts `-- --from START --to END --out PATH` and re-exports just that time range with its matching score. Range inputs are aligned to the 60 fps frame grid, with the end exclusive. Leave the source files and final MP4 in the workspace. Respect the `CHROME_PATH` and `FFMPEG_PATH` settings if your tools need explicit executable locations.
task_137/solution/add_rig_probe.py ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Expose the rig controls used by the Harbor verifier on the reference source."""
2
+
3
+ from pathlib import Path
4
+
5
+
6
+ def replace(file, edits):
7
+ path = Path(file)
8
+ code = path.read_text(encoding="utf-8")
9
+ for before, after in edits:
10
+ if code.count(before) != 1:
11
+ raise RuntimeError(f"Unexpected source in {path}: {before!r}")
12
+ code = code.replace(before, after)
13
+ path.write_text(code, encoding="utf-8")
14
+
15
+
16
+ replace("src/main/index.js", [
17
+ ("function go(next) {", "function go(next, probe) {"),
18
+ ("renderAt(time);", "renderAt(time, capture ? probe : undefined);"),
19
+ ])
20
+ replace("src/main/film.js", [
21
+ ("function renderAt(t) {", "function renderAt(t, probe) {"),
22
+ ("drawRoute(ctx, t, { ...art, entrance });", "drawRoute(ctx, t, { ...art, entrance, probe });"),
23
+ ])
24
+ replace("src/main/route.js", [
25
+ ("function rider(ctx, index, t, distance, offset) {", "function rider(ctx, index, t, distance, offset, probe) {"),
26
+ ("sampleWeight, x + offset);", "sampleWeight, x + offset, probe?.phaseOffset);"),
27
+ ("scene.drawRider(ctx, pose, t);", "scene.drawRider(ctx, pose, t, probe);"),
28
+ ("rider(ctx, index, time, distance, offset);", "rider(ctx, index, time, distance, offset,\n index === positionAt(time).index ? art.probe : undefined);"),
29
+ ])
30
+ replace("src/rig/pose.js", [
31
+ ("export function poseAt(time, distance) {", "export function poseAt(time, distance, phaseOffset = 0) {"),
32
+ ("TAU * time / (2 * BEAT);", "TAU * time / (2 * BEAT) + phaseOffset;"),
33
+ ])
34
+ replace("src/scenes/02-egypt.js", [
35
+ ("function drawRider(ctx, pose, time) {", "function drawRider(ctx, pose, time, probe) {"),
36
+ ("egypt(ctx, pose);", "egypt(ctx, pose, time, probe);"),
37
+ ("pose.wheelAngle * WHEEL_RADIUS);", "pose.wheelAngle * WHEEL_RADIUS, probe?.phaseOffset);"),
38
+ ("egypt(ctx, frozen);", "egypt(ctx, frozen, time, probe);"),
39
+ ])
40
+ replace("src/rig/styles/cycle.js", [
41
+ ("export function bicycle(ctx, pose, paint) {", """// Omit only the contact end of a rendered leg. The leg and knee remain visible.
42
+ function footEnd({ knee, pedal }, hidden) {
43
+ return hidden ? knee.map((value, i) => value + (pedal[i] - value) * .68) : pedal;
44
+ }
45
+
46
+ export function bicycle(ctx, pose, paint, omit) {"""),
47
+ ("[hip, legs[0].knee, legs[0].pedal]", "[hip, legs[0].knee, footEnd(legs[0], omit === 'far-foot')]"),
48
+ ("[hip, legs[1].knee, legs[1].pedal]", "[hip, legs[1].knee, footEnd(legs[1], omit === 'near-foot')]"),
49
+ ("for (const { pedal: [x, y] } of legs) {", """for (const [i, { pedal: [x, y] }] of legs.entries()) {
50
+ if (omit === (i === 0 ? 'far-pedal' : 'near-pedal')) continue;"""),
51
+ ("return (ctx, pose, time) => {\n bicycle(ctx, pose, paint);", "return (ctx, pose, time, probe) => {\n bicycle(ctx, pose, paint, probe?.omit);"),
52
+ ])
task_137/solution/code/index.html DELETED
@@ -1 +0,0 @@
1
- <!doctype html><html><head><meta charset="utf-8"><title>SVG scene preview</title><style>body{margin:0;display:grid;place-items:center;min-height:100vh;background:#e5e7eb}img{width:min(96vw,1100px);height:auto;background:white;box-shadow:0 8px 28px #0003}</style></head><body><img src="./scene.svg" alt="Task scene"></body></html>
 
 
task_137/solution/code/package.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "scripts": {
3
- "start": "node server.js"
4
- }
5
- }
 
 
 
 
 
 
task_137/solution/code/scene.svg DELETED
task_137/solution/code/server.js DELETED
@@ -1,17 +0,0 @@
1
- const {createServer}=require('node:http');
2
- const {readFile,stat}=require('node:fs/promises');
3
- const {join}=require('node:path');
4
- const root=__dirname;
5
- const port=Number(process.env.PORT||3000);
6
- const routes={'/':'index.html','/index.html':'index.html','/scene.svg':'scene.svg',
7
- '/physics.js':'physics.js','/tetris.js':'tetris.js'};
8
- createServer(async(req,res)=>{
9
- let route;try{route=new URL(req.url,'http://localhost').pathname;}catch{res.writeHead(400);return res.end();}
10
- let name=routes[route];
11
- if(route==='/' && !(await stat(join(root,'index.html')).catch(()=>null)))name='scene.svg';
12
- if(!name){res.writeHead(404);return res.end();}
13
- try{const body=await readFile(join(root,name));
14
- const type=name.endsWith('.svg')?'image/svg+xml':name.endsWith('.js')?'text/javascript':'text/html';
15
- res.writeHead(200,{'content-type':type+'; charset=utf-8','cache-control':'no-store'});res.end(body);
16
- }catch{res.writeHead(404);res.end();}
17
- }).listen(port,'0.0.0.0',()=>console.log('Task preview on http://localhost:'+port));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
task_137/solution/index.html DELETED
@@ -1 +0,0 @@
1
- <!doctype html><meta charset="utf-8"><title>Solution preview</title><style>html,body,iframe{margin:0;width:100%;height:100%;border:0}</style><iframe src="./code/index.html" title="Solution preview"></iframe>
 
 
task_137/solution/pelican-source.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7fb388bdeb5ede35a67c0b7b6c0d7646fe2cc46373e62451e8cb23680784086
3
+ size 141535
task_137/solution/solve.sh CHANGED
@@ -1,3 +1,6 @@
1
- #!/usr/bin/env bash
2
- set -e
3
- cp -a /solution/code/. /app/
 
 
 
 
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ cd /app
4
+ tar -xzf /solution/pelican-source.tar.gz
5
+ python3 /solution/add_rig_probe.py
6
+ npm run final
task_137/task.toml CHANGED
@@ -1,21 +1,24 @@
1
- version = "1.0"
2
 
3
- [metadata]
 
 
 
4
 
5
- [verifier]
6
- timeout_sec = 300.0
 
7
 
8
  [agent]
9
- timeout_sec = 3600.0
10
 
11
  [environment]
12
- build_timeout_sec = 1200.0
13
- cpus = 2
14
- memory_mb = 2048
15
- storage_mb = 4096
16
- gpus = 0
17
- allow_internet = true
18
 
19
- [verifier.env]
20
-
21
- [solution.env]
 
1
+ schema_version = "1.1"
2
 
3
+ [task]
4
+ name = "creative-coding/pelican-test-film"
5
+ description = "Build a seekable procedural short across twenty art styles and export a synchronized film."
6
+ keywords = ["animation", "browser", "procedural-audio", "ffmpeg"]
7
 
8
+ [metadata]
9
+ difficulty = "hard"
10
+ category = "creative-coding"
11
 
12
  [agent]
13
+ timeout_sec = 14400
14
 
15
  [environment]
16
+ build_timeout_sec = 900
17
+ cpus = 8
18
+ memory_mb = 12288
19
+ storage_mb = 12288
20
+ allow_internet = false
 
21
 
22
+ [verifier]
23
+ timeout_sec = 900
24
+ environment_mode = "shared"
task_137/tests/browser.cjs ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const assert = require('node:assert/strict');
2
+ const { readFile, writeFile } = require('node:fs/promises');
3
+ const { join } = require('node:path');
4
+ const puppeteer = require(require.resolve('puppeteer-core', {
5
+ paths: [process.env.PELICAN_VERIFIER_DEPS || '/opt/pelican-verifier'],
6
+ }));
7
+
8
+ const [url, directory, sampleFile] = process.argv.slice(2);
9
+ const state = {};
10
+
11
+ async function open(browser, query = '') {
12
+ const page = await browser.newPage();
13
+ await page.setRequestInterception(true);
14
+ page.on('request', request => {
15
+ const target = new URL(request.url());
16
+ const allowed = target.origin === url || ['data:', 'blob:'].includes(target.protocol);
17
+ (allowed ? request.continue() : request.abort()).catch(() => {});
18
+ });
19
+ await page.goto(url + '/' + query, { waitUntil: 'load', timeout: 30000 });
20
+ return page;
21
+ }
22
+
23
+ async function shot(page, frame, probe) {
24
+ await page.evaluate(async ({ t, probe }) => { await window.pelican.renderAt(t, probe ?? undefined); },
25
+ { t: frame / 60, probe });
26
+ return Buffer.from(await page.locator('#screen').waitHandle().then(handle => handle.screenshot()));
27
+ }
28
+
29
+ async function capture(browser, samples) {
30
+ const page = await open(browser, '?capture');
31
+ await page.waitForFunction(() => window.pelican?.renderAt, { timeout: 30000 });
32
+ assert.equal(await page.evaluate(() => window.pelican.duration), 97);
33
+ const ratio = await page.$eval('#screen', el => el.clientWidth / el.clientHeight);
34
+ assert(Math.abs(ratio - 16 / 9) < .01, 'The capture artwork must be 16:9.');
35
+ for (const frame of samples.frames) {
36
+ await writeFile(join(directory, frame + '.png'), await shot(page, frame));
37
+ }
38
+ for (const frame of samples.repeat) {
39
+ const expected = await readFile(join(directory, frame + '.png'));
40
+ assert((await shot(page, frame)).equals(expected), 'Seek order changed frame ' + frame);
41
+ }
42
+ await page.close();
43
+ }
44
+
45
+ async function controls(browser) {
46
+ const page = await open(browser);
47
+ await page.waitForFunction(() => document.querySelector('#scene-name')?.textContent.trim());
48
+ const opening = await page.$eval('#scene-name', el => el.textContent.trim());
49
+ async function seekToChapter(seconds, previous) {
50
+ // Initial HTML can contain a chapter name while the renderer still loads its assets.
51
+ await page.waitForFunction((target, oldName) => {
52
+ const slider = document.querySelector('#seek');
53
+ const chapter = document.querySelector('#scene-name');
54
+ if (!slider || !chapter) return false;
55
+ const changed = () => chapter.textContent.trim() !== oldName && Math.abs(Number(slider.value) - target) <= .02;
56
+ if (changed()) return true;
57
+ slider.value = String(target);
58
+ slider.dispatchEvent(new Event('input', { bubbles: true }));
59
+ slider.dispatchEvent(new Event('change', { bubbles: true }));
60
+ return changed();
61
+ }, { polling: 350, timeout: 60000 }, seconds, previous);
62
+ return page.$eval('#scene-name', el => el.textContent.trim());
63
+ }
64
+ const firstArtwork = await seekToChapter(7, opening);
65
+ await seekToChapter(37.5, firstArtwork);
66
+ await page.click('#play');
67
+ await page.waitForFunction(() => Number(document.querySelector('#seek').value) > 37.65,
68
+ { timeout: 30000 });
69
+ await page.click('#play');
70
+ // The first read can land before the final paint from the click handler.
71
+ await new Promise(resolve => setTimeout(resolve, 200));
72
+ const paused = await page.$eval('#seek', el => Number(el.value));
73
+ await new Promise(resolve => setTimeout(resolve, 350));
74
+ assert(Math.abs(await page.$eval('#seek', el => Number(el.value)) - paused) <= .02,
75
+ 'Pause did not stop playback.');
76
+ await page.close();
77
+ }
78
+
79
+ async function rig(browser, cases) {
80
+ const page = await open(browser, '?capture');
81
+ try {
82
+ await page.waitForFunction(() => window.pelican?.renderAt, { timeout: 30000 });
83
+ const original = await shot(page, cases[0].frame);
84
+ for (const { name, frame, phaseOffset, omissions } of cases) {
85
+ const image = await shot(page, frame, { phaseOffset });
86
+ if (phaseOffset === 0) {
87
+ assert(image.equals(await shot(page, frame)), 'Zero crank offset changed the normal frame ' + frame);
88
+ }
89
+ await writeFile(join(directory, name + '-rig.png'), image);
90
+ for (const omit of omissions) {
91
+ await writeFile(join(directory, name + '-' + omit + '.png'), await shot(page, frame, { phaseOffset, omit }));
92
+ }
93
+ }
94
+ assert((await shot(page, cases[0].frame)).equals(original), 'Rig controls changed the normal render after seeking.');
95
+ } finally {
96
+ await page.close();
97
+ }
98
+ }
99
+
100
+ (async () => {
101
+ const samples = JSON.parse(await readFile(sampleFile, 'utf8'));
102
+ const browser = await puppeteer.launch({
103
+ executablePath: process.env.CHROME_PATH,
104
+ headless: true,
105
+ args: ['--enable-unsafe-swiftshader', '--use-angle=swiftshader'],
106
+ defaultViewport: { width: 960, height: 620, deviceScaleFactor: 1 },
107
+ });
108
+ try {
109
+ const checks = [
110
+ ['capture', () => capture(browser, samples)],
111
+ ['controls', () => controls(browser)],
112
+ ['rig', () => rig(browser, samples.rig)],
113
+ ];
114
+ for (const [name, test] of checks) {
115
+ try {
116
+ await test();
117
+ state[name] = true;
118
+ } catch (error) {
119
+ state[name] = false;
120
+ console.error(name + ': ' + error.message);
121
+ }
122
+ }
123
+ } finally {
124
+ await browser.close();
125
+ await writeFile(join(directory, 'browser.json'), JSON.stringify(state));
126
+ }
127
+ })().catch(error => { console.error(error); process.exitCode = 1; });
task_137/tests/direct_open.js DELETED
@@ -1,30 +0,0 @@
1
- const assert = require('node:assert/strict');
2
- const fs = require('node:fs');
3
- const {chromium} = require('playwright');
4
-
5
- (async () => {
6
- assert(fs.existsSync('/app/index.html'), 'direct-open index.html is missing');
7
- const browser = await chromium.launch({headless: true, args: ['--no-sandbox']});
8
- try {
9
- const page = await browser.newPage({viewport: {width: 1100, height: 850}});
10
- const errors = [];
11
- page.on('pageerror', error => errors.push(error.message));
12
- const response = await page.goto('file:///app/index.html', {waitUntil: 'load'});
13
- assert(response, 'file:// page failed to load');
14
- if (fs.existsSync('/app/scene.svg')) {
15
- const scene = page.locator('img,svg,object,iframe').first();
16
- assert(await scene.isVisible(), 'SVG preview is missing');
17
- if (await scene.evaluate(el => el.tagName.toLowerCase() === 'img')) {
18
- assert(await scene.evaluate(el => el.complete && el.naturalWidth > 0), 'SVG image did not load');
19
- }
20
- } else {
21
- const objectName = fs.existsSync('/app/physics.js') ? 'sim' : 'game';
22
- await page.waitForFunction(name => Boolean(window[name]), objectName, {timeout: 5000});
23
- assert(await page.locator('canvas').first().isVisible(), 'interactive canvas is missing');
24
- }
25
- assert.equal(errors.length, 0, errors.join('; '));
26
- console.log('file:// direct-open smoke passed');
27
- } finally {
28
- await browser.close();
29
- }
30
- })().catch(error => {console.error(error); process.exit(1)});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
task_137/tests/film_events.py ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Checks for two events in the encoded film, with no image reference or model."""
2
+
3
+ from statistics import median
4
+
5
+
6
+ FPS = 60
7
+ WIDTH, HEIGHT = 640, 360
8
+ POWER_BEAT = 61 * FPS
9
+ PORTRAIT_START, PORTRAIT_END = 77 * FPS, 81 * FPS
10
+ FRAME_BYTES = WIDTH * HEIGHT * 3
11
+
12
+
13
+ def read_frames(source, first, count, run, ffmpeg):
14
+ raw = run([ffmpeg, "-v", "error", "-xerror", "-threads", "2",
15
+ "-ss", f"{first / FPS - .001:.6f}", "-i", str(source), "-frames:v", str(count),
16
+ "-filter_threads", "1", "-vf", f"scale={WIDTH}:{HEIGHT}:flags=area",
17
+ "-f", "rawvideo", "-pix_fmt", "rgb24", "-"])
18
+ if len(raw) != count * FRAME_BYTES:
19
+ raise ValueError(f"Expected {count} decoded frames starting at frame {first}")
20
+ view = memoryview(raw)
21
+ return [view[i:i + FRAME_BYTES] for i in range(0, len(raw), FRAME_BYTES)]
22
+
23
+
24
+ def pixel(frame, x, y):
25
+ i = (y * WIDTH + x) * 3
26
+ return frame[i:i + 3]
27
+
28
+
29
+ def luma(frame, x, y):
30
+ r, g, b = pixel(frame, x, y)
31
+ return (r + 2 * g + b) / 4
32
+
33
+
34
+ def phosphor(frame):
35
+ return [(i % WIDTH, i // WIDTH) for i, (r, g, b) in enumerate(zip(frame[::3], frame[1::3], frame[2::3]))
36
+ if g >= 120 and g - r >= 32 and g - b >= 14]
37
+
38
+
39
+ def span(points, axis):
40
+ values = sorted(p[axis] for p in points)
41
+ return values[len(values) * 95 // 100] - values[len(values) * 5 // 100]
42
+
43
+
44
+ def shadow_to_phosphor(source, run, ffmpeg):
45
+ first = POWER_BEAT - 12
46
+ frames = read_frames(source, first, 31, run, ffmpeg)
47
+ masks = [phosphor(frame) for frame in frames]
48
+ fractions = [len(mask) / (WIDTH * HEIGHT) for mask in masks]
49
+ if max(fractions[:6]) > .002:
50
+ raise ValueError("Bright green phosphor was already present before the frame crossing")
51
+ onset = next((i for i, value in enumerate(fractions) if value >= .003), None)
52
+ if onset is None or abs(first + onset - POWER_BEAT) > 4:
53
+ raise ValueError("Green phosphor did not switch on within four frames of the 61 s beat")
54
+ if min(fractions[14:]) < .003 or max(fractions[14:]) > .13:
55
+ raise ValueError("The green trace failed to persist as a localized effect after the crossing")
56
+ trace = masks[15]
57
+ if not (.025 * WIDTH < span(trace, 0) < .63 * WIDTH and .025 * HEIGHT < span(trace, 1) < .67 * HEIGHT):
58
+ raise ValueError("Bright green coverage is inconsistent with a localized outline")
59
+ prior = frames[6]
60
+ # Allow a little camera/rider motion while testing the predecessor's darkness.
61
+ best_dark = max(sum(luma(prior, x + dx, y + dy) < 64
62
+ for x, y in trace if 8 <= x < WIDTH - 8 and 8 <= y < HEIGHT - 8) / len(trace)
63
+ for dx in (-6, 0, 6) for dy in (-6, 0, 6))
64
+ if best_dark < .30:
65
+ raise ValueError("No dark silhouette support near the location of the bright trace before the gate")
66
+ return {"onset_frame": first + onset, "offset_from_beat_frames": first + onset - POWER_BEAT,
67
+ "lit_area_percent": round(fractions[15] * 100, 2), "dark_predecessor_percent": round(best_dark * 100, 1)}
68
+
69
+
70
+ def portrait_edges(frame):
71
+ ys = range(round(HEIGHT * .13), round(HEIGHT * .82), 4)
72
+ columns = [x for x in range(WIDTH)
73
+ if sum(max(pixel(frame, x, y)) > 30 for y in ys) > len(ys) * .16]
74
+ if not columns:
75
+ raise ValueError("Portrait frame has no visible aperture")
76
+ left, right = columns[0], columns[-1] + 1
77
+ ratio = (right - left) / HEIGHT
78
+ if abs(ratio - 9 / 16) > .05 or abs(left + right - WIDTH) > WIDTH * .055:
79
+ raise ValueError(f"Expected centered black bars around a 9:16 aperture; measured {ratio:.3f}:1")
80
+ return left, right
81
+
82
+
83
+ def bright_runs(frame, y, left, right):
84
+ start = None
85
+ for x in range(left, right + 1):
86
+ bright = x < right and luma(frame, x, y) > 150
87
+ if bright and start is None:
88
+ start = x
89
+ if not bright and start is not None:
90
+ yield start, x
91
+ start = None
92
+
93
+
94
+ def progress_length(frame, y, x, left, right):
95
+ return max((b - a for row in range(y - 2, y + 3) for a, b in bright_runs(frame, row, left, right)
96
+ if abs(a - x) <= 5), default=0)
97
+
98
+
99
+ def portrait_progress(source, run, ffmpeg):
100
+ samples = [PORTRAIT_START + offset for offset in (47, 102, 174, 209)]
101
+ views = [read_frames(source, at, 1, run, ffmpeg)[0] for at in samples]
102
+ edges = [portrait_edges(view) for view in views]
103
+ left, right = (round(median(edge[i] for edge in edges)) for i in (0, 1))
104
+ width = right - left
105
+
106
+ final_frames = read_frames(source, PORTRAIT_END - 9, 13, run, ffmpeg)
107
+ gate = final_frames[9]
108
+ tracks = [(b - a, y, a) for y in range(round(HEIGHT * .90), round(HEIGHT * .991))
109
+ for a, b in bright_runs(gate, y, left, right) if .65 * width <= b - a <= width]
110
+ for full, y, x in sorted(tracks, reverse=True):
111
+ portions = [progress_length(view, y, x, left, right) / full for view in views]
112
+ expected = [(at - PORTRAIT_START) / (PORTRAIT_END - PORTRAIT_START) for at in samples]
113
+ if any(abs(part - target) > .14 for part, target in zip(portions, expected)):
114
+ continue
115
+ if any(following - preceding < .055 for preceding, following in zip(portions, portions[1:])):
116
+ continue
117
+ completed = next((i for i, view in enumerate(final_frames)
118
+ if progress_length(view, y, x, left, right) >= full * .987), None)
119
+ if completed is not None and 4 <= completed <= 9:
120
+ return {"aperture_ratio": round(width / HEIGHT, 4), "progress_samples": [round(p, 3) for p in portions],
121
+ "completion_frame": PORTRAIT_END - 9 + completed, "offset_from_gate_frames": completed - 9}
122
+ raise ValueError("No visible progress bar advanced through the portrait scene and was first near full within five frames of the gate")
task_137/tests/motion_check.js DELETED
@@ -1,186 +0,0 @@
1
- const assert = require('node:assert/strict');
2
- const fs = require('node:fs');
3
- const {chromium} = require('playwright');
4
- const {visibleChange} = require('./visible_change');
5
-
6
- // Observe the same finite set of phases used for the saved visual evidence.
7
- // A single pair can alias a valid loop (for example, a 0.3 s wheel period).
8
- const frameTimes = [0.1, 0.4, 1.2, 4.7, 8.9, 12.2];
9
-
10
- const kind = JSON.parse(fs.readFileSync('/tests/spec.json', 'utf8')).kind;
11
- const moving = {
12
- pelican: ['wheel-left', 'wheel-right', 'pelican-wing', 'pedal-left', 'pedal-right', 'pelican-foot-left', 'pelican-foot-right'],
13
- qin: ['hand-left', 'hand-right', 'music-note-left', 'music-note-right'],
14
- race: ['car-body', 'elephant', 'rabbit', 'car-wheel-left', 'car-wheel-right', 'rabbit-feet'],
15
- }[kind];
16
- assert(moving, `unknown scene kind ${kind}`);
17
- const geometryIds = {
18
- pelican: ['pelican-foot-left', 'pelican-foot-right', 'pedal-left', 'pedal-right', 'wheel-left', 'wheel-right'],
19
- qin: ['hand-left', 'hand-right', 'keyboard'],
20
- race: ['car-body', 'rabbit', 'finish-line', 'car-wheel-left', 'car-wheel-right'],
21
- }[kind];
22
-
23
- (async () => {
24
- const browser = await chromium.launch({headless: true, args: ['--no-sandbox']});
25
- try {
26
- const svgPage = await browser.newPage({viewport: {width: 1100, height: 850}});
27
- await svgPage.goto('file:///app/scene.svg');
28
- const states = await svgPage.evaluate(({ids, geometryIds, frameTimes}) => {
29
- const root = document.querySelector('svg');
30
- assertRoot(root);
31
- root.pauseAnimations();
32
- function assertRoot(node) {if (!node || typeof node.setCurrentTime !== 'function') throw new Error('SVG timeline is unavailable')}
33
- const matrix = id => {
34
- const node = document.getElementById(id);
35
- if (!node) throw new Error(`${id} missing`);
36
- const m = node.getCTM();
37
- return [m.a, m.b, m.c, m.d, m.e, m.f];
38
- };
39
- const box = id => {
40
- const r = document.getElementById(id).getBoundingClientRect();
41
- return {x: r.x, y: r.y, left: r.left, right: r.right,
42
- top: r.top, bottom: r.bottom, width: r.width, height: r.height};
43
- };
44
- const snapshot = time => {
45
- root.setCurrentTime(time);
46
- const paintedShapes = node => [...node.querySelectorAll('path,rect,circle,ellipse,line,polyline,polygon,use')];
47
- return {
48
- matrices: Object.fromEntries(ids.map(id => [id, matrix(id)])),
49
- boxes: Object.fromEntries(geometryIds.map(id => [id, box(id)])),
50
- pipeFill: JSON.stringify(paintedShapes(document.getElementById('organ-pipes') || root)
51
- .map(node => [getComputedStyle(node).fill, getComputedStyle(node).stroke])),
52
- localMotion: Object.fromEntries(ids.map(id => [id, paintedShapes(document.getElementById(id)).map(node => {
53
- const m = node.getCTM(), box = node.getBBox();
54
- return [m.a, m.b, m.c, m.d, box.x, box.y, box.width, box.height];
55
- })])),
56
- };
57
- };
58
- return {first: snapshot(0.1), second: snapshot(0.4), peak: snapshot(1.2),
59
- motionFrames: frameTimes.map(snapshot),
60
- checkpoints: Array.from({length: 72}, (_, index) => snapshot(0.07 + index * 0.173))};
61
- }, {ids: moving, geometryIds, frameTimes});
62
- for (const id of moving) {
63
- const a = states.first.matrices[id], b = states.second.matrices[id];
64
- const distance = Math.hypot(...a.map((n, i) => n - b[i]));
65
- if (distance <= 0.5) {
66
- const frames = [];
67
- for (const time of [0.1, 0.4, 1.2, 2.6]) {
68
- await svgPage.evaluate(t => document.querySelector('svg').setCurrentTime(t), time);
69
- frames.push(await svgPage.locator(`[id="${id}"]`).screenshot({animations: 'allow'}));
70
- }
71
- const changes = [];
72
- for (const frame of frames.slice(1)) changes.push(await visibleChange(svgPage, frames[0], frame));
73
- assert(changes.some(change => change.changed > 4 && change.fraction > .005),
74
- `${id} has neither visible geometry nor painted-content animation`);
75
- }
76
- }
77
- for (const state of [states.first, states.second, states.peak, ...states.checkpoints]) {
78
- const b = state.boxes;
79
- if (kind === 'pelican') {
80
- for (const side of ['left', 'right']) {
81
- const foot = b[`pelican-foot-${side}`], pedal = b[`pedal-${side}`];
82
- const gapX = Math.max(pedal.left - foot.right, foot.left - pedal.right, 0);
83
- const gapY = Math.max(pedal.top - foot.bottom, foot.top - pedal.bottom, 0);
84
- const wheelSize = Math.min(b['wheel-left'].width, b['wheel-right'].width);
85
- assert(Math.hypot(gapX, gapY) <= Math.max(1, wheelSize * .02),
86
- `${side} foot separates from its pedal during animation`);
87
- }
88
- } else if (kind === 'qin') {
89
- const key = b.keyboard;
90
- for (const side of ['left', 'right']) {
91
- const hand = b[`hand-${side}`];
92
- assert(hand.right > key.left && hand.left < key.right &&
93
- hand.bottom > key.top && hand.top < key.bottom,
94
- `${side} hand leaves keyboard during animation`);
95
- }
96
- } else {
97
- assert(b['car-body'].right < b.rabbit.left, 'car catches or overlaps rabbit');
98
- assert(b.rabbit.right < b['finish-line'].left, 'rabbit crosses finish line');
99
- }
100
- }
101
- if (kind === 'qin') {
102
- assert(new Set(states.motionFrames.map(state => state.pipeFill)).size > 1,
103
- 'organ pipes do not change color');
104
- }
105
- fs.mkdirSync('/logs/verifier/visual', {recursive: true});
106
- const sceneFrames = [];
107
- for (const time of frameTimes) {
108
- await svgPage.evaluate(time => document.querySelector('svg').setCurrentTime(time), time);
109
- sceneFrames.push(await svgPage.screenshot({
110
- path: `/logs/verifier/visual/${kind}-${time}.png`, animations: 'allow'}));
111
- }
112
- if (kind === 'pelican' || kind === 'race') {
113
- const wheelIds = kind === 'pelican' ? ['wheel-left', 'wheel-right'] : ['car-wheel-left', 'car-wheel-right'];
114
- for (const id of wheelIds) {
115
- const firstMotion = JSON.stringify(states.motionFrames[0].localMotion[id]);
116
- const transformsChange = states.motionFrames.slice(1)
117
- .some(state => JSON.stringify(state.localMotion[id]) !== firstMotion);
118
- const shapeAnimation = await svgPage.locator(`[id="${id}"] animate`).evaluateAll(nodes =>
119
- nodes.some(node => /^(d|points|cx|cy|x|y|x1|x2|y1|y2)$/.test(node.getAttribute('attributeName'))));
120
- assert(transformsChange || shapeAnimation, `${id} only translates with its parent; wheel rotation is missing`);
121
- const changes = await svgPage.evaluate(async ({frames, wheel}) => {
122
- const decode = async base64 => {
123
- const image = new Image();
124
- image.src = `data:image/png;base64,${base64}`;
125
- await image.decode();
126
- const canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
127
- canvas.width = image.width;
128
- canvas.height = image.height;
129
- const context = canvas.getContext('2d', {willReadFrequently: true});
130
- context.drawImage(image, 0, 0);
131
- return {width: image.width, height: image.height,
132
- pixels: context.getImageData(0, 0, image.width, image.height).data};
133
- };
134
- const decoded = await Promise.all(frames.map(decode));
135
- const a = decoded[0];
136
- const radius = Math.min(wheel.width, wheel.height) / 2;
137
- const centerX = wheel.x + wheel.width / 2;
138
- const centerY = wheel.y + wheel.height / 2;
139
- return decoded.slice(1).map(b => {
140
- if (a.width !== b.width || a.height !== b.height) return {changed: 0, sampled: 0};
141
- let count = 0;
142
- let sampled = 0;
143
- for (let y = Math.max(0, Math.floor(wheel.top)); y < Math.min(a.height, Math.ceil(wheel.bottom)); y++) {
144
- for (let x = Math.max(0, Math.floor(wheel.left)); x < Math.min(a.width, Math.ceil(wheel.right)); x++) {
145
- const distance = Math.hypot(x + .5 - centerX, y + .5 - centerY);
146
- if (distance < radius * .18 || distance > radius * .72) continue;
147
- sampled++;
148
- const offset = (y * a.width + x) * 4;
149
- const delta = Math.max(...[0, 1, 2].map(channel =>
150
- Math.abs(a.pixels[offset + channel] - b.pixels[offset + channel])));
151
- if (delta > 40) count++;
152
- }
153
- }
154
- return {changed: count, sampled};
155
- });
156
- }, {frames: sceneFrames.map(frame => frame.toString('base64')),
157
- wheel: states.motionFrames[0].boxes[id]});
158
- const change = changes.reduce((best, current) =>
159
- current.changed / (current.sampled || 1) > best.changed / (best.sampled || 1) ? current : best);
160
- const changedFraction = change.sampled ? change.changed / change.sampled : 0;
161
- console.log(`${id} changed pixels: ${change.changed}/${change.sampled}`);
162
- assert(changedFraction > .01, `${id} does not visibly rotate`);
163
- }
164
- }
165
- await svgPage.close();
166
-
167
- const preview = await browser.newPage({viewport: {width: 1100, height: 850}});
168
- const errors = [];
169
- preview.on('pageerror', e => errors.push(e.message));
170
- await preview.goto('file:///app/index.html', {waitUntil: 'load'});
171
- const image = preview.locator('img,svg,object,iframe').first();
172
- assert(await image.isVisible(), 'animated scene did not render in direct-open preview');
173
- if (await image.evaluate(el => el.tagName.toLowerCase() === 'img')) {
174
- assert(await image.evaluate(el => el.complete && el.naturalWidth > 0), 'animated image did not load');
175
- }
176
- await preview.waitForTimeout(100);
177
- const firstFrame = await image.screenshot();
178
- await preview.waitForTimeout(550);
179
- const secondFrame = await image.screenshot();
180
- assert(!firstFrame.equals(secondFrame), 'direct-open preview is static across frames');
181
- assert.equal(errors.length, 0, errors.join('; '));
182
- console.log(`${kind} SVG motion and file:// preview passed`);
183
- } finally {
184
- await browser.close();
185
- }
186
- })().catch(error => {console.error(error); process.exit(1)});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
task_137/tests/rig_check.py ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Measure actual drawing changes when one foot or pedal is omitted."""
2
+
3
+ import math
4
+ from pathlib import Path
5
+
6
+
7
+ WIDTH, HEIGHT = 480, 270
8
+ PEDALS = ("far-pedal", "near-pedal")
9
+ FEET = ("far-foot", "near-foot")
10
+
11
+
12
+ def cases_for(frame, gate_frames):
13
+ quarter = math.pi / 2
14
+ cases = [{"name": f"pose{i}", "frame": frame, "phaseOffset": i * quarter,
15
+ "omissions": [*PEDALS, *FEET]} for i in range(4)]
16
+ for name, at in (("advance", frame + 13), ("turn", frame + 60),
17
+ ("before", 540 - gate_frames), ("after", 540 + gate_frames)):
18
+ cases.append({"name": name, "frame": at, "phaseOffset": 0, "omissions": list(PEDALS)})
19
+ return cases
20
+
21
+
22
+ def load(path, run, ffmpeg):
23
+ result = run([ffmpeg, "-v", "error", "-threads", "1", "-i", str(path), "-frames:v", "1",
24
+ "-filter_threads", "1", "-vf", f"scale={WIDTH}:{HEIGHT}:flags=area",
25
+ "-pix_fmt", "rgb24", "-f", "rawvideo", "-"])
26
+ if len(result) != WIDTH * HEIGHT * 3:
27
+ raise ValueError(f"Unreadable rig image: {Path(path).name}")
28
+ return result
29
+
30
+
31
+ def changed(original, hidden):
32
+ for i in range(0, len(original), 3):
33
+ strength = max(abs(original[i + c] - hidden[i + c]) for c in range(3))
34
+ if strength >= 12:
35
+ index = i // 3
36
+ yield index % WIDTH, index // WIDTH, strength
37
+
38
+
39
+ def location(original, hidden):
40
+ pixels = list(changed(original, hidden))
41
+ if len(pixels) < 2 or len(pixels) > 220:
42
+ return None
43
+ total = sum(weight for _, _, weight in pixels)
44
+ return tuple(sum(pixel[i] * pixel[2] for pixel in pixels) / total for i in (0, 1))
45
+
46
+
47
+ def measure(directory, case, run, ffmpeg):
48
+ name = case["name"]
49
+ original = load(directory / (name + "-rig.png"), run, ffmpeg)
50
+ parts = {part: location(original, load(directory / (name + "-" + part + ".png"), run, ffmpeg))
51
+ for part in case["omissions"]}
52
+ far, near = (parts.get(part) for part in PEDALS)
53
+ if far is None or near is None:
54
+ raise ValueError(f"{name}: hiding one pedal did not reveal a localized visible pedal stroke")
55
+ span = math.dist(far, near)
56
+ if span < 4:
57
+ raise ValueError(f"{name}: the two pedal strokes overlap")
58
+ center = tuple((a + b) / 2 for a, b in zip(far, near))
59
+ phase = math.atan2(near[1] - far[1], near[0] - far[0])
60
+ foot_errors = [math.dist(parts[foot], parts[pedal]) / span if parts.get(foot) is not None else None
61
+ for foot, pedal in zip(FEET, PEDALS)]
62
+ return center, span, phase, foot_errors, original
63
+
64
+
65
+ def phase_error(observed, expected):
66
+ return abs(math.remainder(observed - expected, math.tau))
67
+
68
+
69
+ def pedaling(directory, cases, run, ffmpeg):
70
+ measurements = [measure(directory, case, run, ffmpeg) for case in cases[:6]]
71
+ center, span, phase, _, image = measurements[0]
72
+ normal = load(directory / (str(cases[0]["frame"]) + ".png"), run, ffmpeg)
73
+ if normal != image:
74
+ raise ValueError("A zero phase offset must reproduce the normal capture frame")
75
+
76
+ phase_errors = []
77
+ for case, (pos, separation, angle, _, altered) in zip(cases[1:4], measurements[1:4]):
78
+ angle_error = phase_error(angle - phase, case["phaseOffset"])
79
+ phase_errors.append(math.degrees(angle_error))
80
+ if angle_error > math.radians(40) or math.dist(center, pos) > span * .4 or not .6 < separation / span < 1.6:
81
+ raise ValueError(f"{case['name']}: phase offset did not rotate opposite pedals around the same crank")
82
+ moved = list(changed(image, altered))
83
+ outside = sum(weight for x, y, weight in moved if abs(x - center[0]) > span * 5
84
+ or not center[1] - span * 7 < y < center[1] + span * 2.5)
85
+ # A half-turn can exchange two identically drawn legs and yield the same unmasked image.
86
+ symmetric = math.isclose(case["phaseOffset"], math.pi)
87
+ if (not moved and not symmetric) or outside > sum(weight for _, _, weight in moved) * .03:
88
+ raise ValueError("Changing only crank phase also changed pixels away from the rider")
89
+
90
+ visible_contacts = []
91
+ for leg in range(2):
92
+ contact = [sample[3][leg] for sample in measurements[:4]]
93
+ passes = sum(error is not None and error < .46 for error in contact)
94
+ if passes < 3 or any(error is not None and error > .64 for error in contact):
95
+ raise ValueError(f"{FEET[leg]} did not stay close to its matching pedal across phases: {contact}")
96
+ visible_contacts.append(passes)
97
+
98
+ elapsed_errors = [math.degrees(phase_error(measurements[i][2] - phase,
99
+ (cases[i]["frame"] - cases[0]["frame"]) * math.tau / 60))
100
+ for i in (4, 5)]
101
+ if max(elapsed_errors) > 40:
102
+ raise ValueError(f"Natural pedal motion does not complete one turn per second: {elapsed_errors}")
103
+ return {"sahara_frame": cases[0]["frame"], "visible_contacts_per_foot": visible_contacts,
104
+ "forced_phase_errors_deg": [round(value, 1) for value in phase_errors],
105
+ "natural_phase_errors_deg": [round(value, 1) for value in elapsed_errors]}
106
+
107
+
108
+ def crossing(directory, cases, run, ffmpeg):
109
+ before, after = (measure(directory, case, run, ffmpeg) for case in cases[-2:])
110
+ frames = cases[-1]["frame"] - cases[-2]["frame"]
111
+ expected = frames / 60 * math.tau
112
+ drift = math.degrees(phase_error(after[2] - before[2], expected))
113
+ if drift > 42:
114
+ raise ValueError(f"Crank phase jumps across the Sahara–Egypt gate ({drift:.1f} degrees of drift)")
115
+ return {"frames": [cases[-2]["frame"], cases[-1]["frame"]], "phase_drift_deg": round(drift, 1)}
task_137/tests/serve_smoke.js DELETED
@@ -1,24 +0,0 @@
1
- const assert=require('assert');
2
- const {spawn}=require('child_process');
3
- const fs=require('fs');
4
-
5
- (async()=>{
6
- const pkg=JSON.parse(fs.readFileSync('/app/package.json','utf8'));
7
- assert(pkg.scripts && pkg.scripts.start,'npm start script missing');
8
- const port=18000+process.pid%10000;
9
- const child=spawn('npm',['start','--silent'],{cwd:'/app',env:{...process.env,PORT:String(port)},
10
- stdio:'ignore',detached:true});
11
- try{
12
- let response;
13
- for(let attempt=0;attempt<50;attempt++){
14
- try{response=await fetch(`http://127.0.0.1:${port}/`);break;}catch{await new Promise(r=>setTimeout(r,100));}
15
- }
16
- assert(response && response.status===200,'npm start did not serve HTTP 200');
17
- const contentType=response.headers.get('content-type')||'';
18
- assert(/text\/html|image\/svg\+xml/.test(contentType),'root response has wrong content type');
19
- const body=await response.text();assert(body.includes('<svg')||body.includes('<html'),'root page is not renderable markup');
20
- console.log('npm start HTTP smoke passed');
21
- }finally{
22
- try{process.kill(-child.pid,'SIGTERM');}catch{}
23
- }
24
- })().catch(e=>{console.error(e);process.exit(1)});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
task_137/tests/spec.json DELETED
@@ -1 +0,0 @@
1
- {"kind":"pelican","minPrimitives":30,"ids":["bike-frame","wheel-left","wheel-right","seat","handlebars","pelican-body","pelican-head","pelican-beak","pelican-wing","pelican-foot-left","pelican-foot-right","pedal-left","pedal-right"]}
 
 
task_137/tests/test.sh CHANGED
@@ -1,8 +1,5 @@
1
- #!/usr/bin/env bash
2
- set +e
3
  mkdir -p /logs/verifier
4
- cd /app
5
- node /tests/serve_smoke.js && node /tests/direct_open.js && node /tests/verify.js && node /tests/motion_check.js
6
- status=$?
7
- if [ "$status" -eq 0 ]; then echo 1 > /logs/verifier/reward.txt; else echo 0 > /logs/verifier/reward.txt; fi
8
- exit 0
 
1
+ #!/bin/bash
2
+ set -euo pipefail
3
  mkdir -p /logs/verifier
4
+ printf '0\n' > /logs/verifier/reward.txt
5
+ python3 /tests/verify.py --app /app --logs /logs/verifier
 
 
 
task_137/tests/verify.js DELETED
@@ -1,170 +0,0 @@
1
- const fs = require('fs');
2
- const assert = require('assert');
3
- const { chromium } = require('playwright');
4
-
5
- const spec = JSON.parse(fs.readFileSync('/tests/spec.json', 'utf8'));
6
- const xml = fs.readFileSync('/app/scene.svg', 'utf8');
7
- assert(!/<(?:script|image|foreignObject|iframe|object|embed)\b/i.test(xml), 'raster/executable/foreign content is forbidden');
8
- assert(!/<\?xml-stylesheet\b|<!ENTITY\b|@import\b/i.test(xml), 'external styles/entities are forbidden');
9
- assert(!/\s+on[a-z]+\s*=/i.test(xml), 'event-handler attributes are forbidden');
10
- assert(!/\b(?:xlink:)?(?:href|src)\s*=\s*['"](?!#)/i.test(xml), 'only internal fragment references are allowed');
11
- for (const match of xml.matchAll(/url\(\s*['"]?([^'"\)]+)['"]?\s*\)/gi)) {
12
- assert(match[1].trim().startsWith('#'), 'external CSS URL is forbidden');
13
- }
14
-
15
- function center(box) { return {x: box.x + box.width / 2, y: box.y + box.height / 2}; }
16
- function near(a, b, d) { return Math.hypot(a.x-b.x, a.y-b.y) <= d; }
17
- function overlap(a,b,pad=0) {
18
- return a.x <= b.x+b.width+pad && b.x <= a.x+a.width+pad &&
19
- a.y <= b.y+b.height+pad && b.y <= a.y+a.height+pad;
20
- }
21
-
22
- (async () => {
23
- const browser = await chromium.launch({headless:true,args:['--no-sandbox']});
24
- try {
25
- const page = await browser.newPage({viewport:{width:1000,height:650},deviceScaleFactor:1});
26
- await page.goto('file:///app/scene.svg');
27
- const d = await page.evaluate(async (ids) => {
28
- const root = document.querySelector('svg');
29
- if (!root) return null;
30
- const vb = root.viewBox.baseVal;
31
- root.pauseAnimations();
32
- root.setCurrentTime(0.1);
33
- const items = {};
34
- async function paintedPixels(element) {
35
- const isolated = root.cloneNode(true);
36
- // A <use> may have no id; follow its original DOM position in the clone.
37
- const ancestry = [];
38
- for (let current = element; current !== root; current = current.parentElement) {
39
- ancestry.unshift([...current.parentElement.children].indexOf(current));
40
- }
41
- const target = ancestry.reduce((node, index) => node.children[index], isolated);
42
- // SVG resources may legally live outside <defs>. Keep only resource
43
- // branches (which do not paint by themselves), not unrelated artwork.
44
- const resources = 'defs,style,symbol,clipPath,mask,linearGradient,radialGradient,pattern,filter,marker';
45
- const resourceTags = new Set(resources.toLowerCase().split(','));
46
- function prune(node) {
47
- for (const child of [...node.children]) {
48
- if (child===target) continue;
49
- if (child.contains(target)) { prune(child); continue; }
50
- if (resourceTags.has(child.tagName.toLowerCase())) continue;
51
- if (child.querySelector(resources)) { prune(child); continue; }
52
- child.remove();
53
- }
54
- }
55
- prune(isolated);
56
- isolated.setAttribute('viewBox', `${vb.x} ${vb.y} ${vb.width} ${vb.height}`);
57
- const scale = Math.min(1, 1200 / Math.max(vb.width, vb.height));
58
- const width = Math.max(1, Math.ceil(vb.width * scale));
59
- const height = Math.max(1, Math.ceil(vb.height * scale));
60
- isolated.setAttribute('width',width);
61
- isolated.setAttribute('height',height);
62
- const uri='data:image/svg+xml;charset=utf-8,'+encodeURIComponent(new XMLSerializer().serializeToString(isolated));
63
- const img=new Image();img.src=uri;await img.decode();
64
- const canvas=document.createElementNS('http://www.w3.org/1999/xhtml','canvas');canvas.width=width;canvas.height=height;
65
- const ctx=canvas.getContext('2d',{willReadFrequently:true});ctx.drawImage(img,0,0,width,height);
66
- const pixels=ctx.getImageData(0,0,canvas.width,canvas.height).data;
67
- let count=0;for(let i=3;i<pixels.length;i+=4)if(pixels[i]>16)count++;
68
- return count;
69
- }
70
- function visibleChain(node) {
71
- for (let current=node; current && current.nodeType===1; current=current.parentElement) {
72
- const s=getComputedStyle(current);
73
- if(s.display==='none'||s.visibility==='hidden'||Number(s.opacity)===0)return false;
74
- }
75
- return true;
76
- }
77
- async function paintedPrimitiveCount(node) {
78
- const shapes=node.matches('path,rect,circle,ellipse,line,polyline,polygon,use')?[node]:[...node.querySelectorAll('path,rect,circle,ellipse,line,polyline,polygon,use')];
79
- const painted = await Promise.all(shapes.map(async shape=>{
80
- if(!visibleChain(shape))return false;
81
- // Computed fill on <use> does not describe its referenced descendants.
82
- // Measure the actual isolated paint instead of rejecting fill="none".
83
- if (shape.tagName.toLowerCase() === 'use') return await paintedPixels(shape) > 0;
84
- const s=getComputedStyle(shape);
85
- const fill=s.fill!=='none' && Number(s.fillOpacity)>0 && !/rgba?\([^)]*,\s*0(?:\.0+)?\)/.test(s.fill);
86
- const stroke=s.stroke!=='none' && Number(s.strokeOpacity)>0 && parseFloat(s.strokeWidth)>0 && !/rgba?\([^)]*,\s*0(?:\.0+)?\)/.test(s.stroke);
87
- return fill||stroke;
88
- }));
89
- return painted.filter(Boolean).length;
90
- }
91
- for (const id of ids) {
92
- const e = document.getElementById(id);
93
- if (!e) { items[id] = null; continue; }
94
- // getBBox is local to the element; compare all parts in root SVG coordinates.
95
- const local = e.getBBox();
96
- const matrix = root.getScreenCTM().inverse().multiply(e.getScreenCTM());
97
- const points = [[local.x, local.y], [local.x + local.width, local.y],
98
- [local.x, local.y + local.height], [local.x + local.width, local.y + local.height]]
99
- .map(([x, y]) => new DOMPoint(x, y).matrixTransform(matrix));
100
- const xs = points.map(point => point.x), ys = points.map(point => point.y);
101
- const b = {x: Math.min(...xs), y: Math.min(...ys),
102
- width: Math.max(...xs) - Math.min(...xs), height: Math.max(...ys) - Math.min(...ys)};
103
- items[id] = {x:b.x,y:b.y,width:b.width,height:b.height,
104
- visible: visibleChain(e),
105
- primitives:e.matches('path,rect,circle,ellipse,line,polyline,polygon,use') ? 1 : e.querySelectorAll('path,rect,circle,ellipse,line,polyline,polygon,use').length,
106
- paintedPrimitives:await paintedPrimitiveCount(e),
107
- paintedPixels:await paintedPixels(e)};
108
- }
109
- return {viewBox:{x:vb.x,y:vb.y,width:vb.width,height:vb.height},
110
- title:(root.querySelector('title')?.textContent || '').trim(),
111
- primitives:root.querySelectorAll('path,rect,circle,ellipse,line,polyline,polygon,use').length,
112
- colors:new Set([...root.querySelectorAll('path,rect,circle,ellipse,line,polyline,polygon,use')].map(e=>getComputedStyle(e).fill+'|'+getComputedStyle(e).stroke)).size,
113
- pipes:document.querySelector('#organ-pipes') ? await paintedPrimitiveCount(document.querySelector('#organ-pipes')) : 0,
114
- keys:document.querySelector('#keyboard') ? await paintedPrimitiveCount(document.querySelector('#keyboard')) : 0,
115
- beads:(await Promise.all([...document.querySelectorAll('#bead-curtains circle,#bead-curtains ellipse,#bead-curtains [data-part="bead"]')]
116
- .map(async node => await paintedPrimitiveCount(node) > 0))).filter(Boolean).length,
117
- items};
118
- }, spec.ids);
119
- assert(d, 'SVG root missing');
120
- assert(d.viewBox.width > 0 && d.viewBox.height > 0, 'valid viewBox missing');
121
- assert(d.title.length > 0, 'descriptive title missing');
122
- for (const id of spec.ids) {
123
- const b = d.items[id];
124
- assert(b, `missing ${id}`);
125
- assert(b.visible && b.primitives > 0 && b.paintedPrimitives > 0 && b.width+b.height > 1 && b.paintedPixels > 4,
126
- `${id} lacks visible painted geometry`);
127
- assert(b.x >= d.viewBox.x-d.viewBox.width*.03 && b.y >= d.viewBox.y-d.viewBox.height*.03 &&
128
- b.x+b.width <= d.viewBox.x+d.viewBox.width*1.03 &&
129
- b.y+b.height <= d.viewBox.y+d.viewBox.height*1.03, `${id} outside canvas`);
130
- }
131
- const b = d.items;
132
- if (spec.kind === 'pelican') {
133
- const wl=center(b['wheel-left']), wr=center(b['wheel-right']);
134
- const wheelSize=(b['wheel-left'].width+b['wheel-right'].width)/2;
135
- assert(wr.x-wl.x > wheelSize*1.5 && Math.abs(wl.y-wr.y)<wheelSize*.15, 'bicycle wheels must align and separate');
136
- assert(Math.abs(b['wheel-left'].width-b['wheel-right'].width)<wheelSize*.25, 'wheel sizes differ');
137
- assert(b['bike-frame'].x < wr.x && b['bike-frame'].x+b['bike-frame'].width>wl.x, 'frame does not join wheels');
138
- assert(center(b['pelican-body']).y < wl.y-wheelSize*.25, 'pelican must ride above wheels');
139
- assert(center(b['pelican-body']).x > wl.x-wheelSize*.2 && center(b['pelican-body']).x < wr.x+wheelSize*.2, 'pelican off bicycle');
140
- assert(center(b['pelican-beak']).x > center(b['pelican-head']).x, 'beak orientation wrong');
141
- assert(near(center(b['pelican-foot-left']),center(b['pedal-left']),wheelSize*.3), 'left foot not on pedal');
142
- assert(near(center(b['pelican-foot-right']),center(b['pedal-right']),wheelSize*.3), 'right foot not on pedal');
143
- assert(center(b['seat']).y > center(b['pelican-body']).y && center(b['seat']).y < wl.y, 'seat misplaced');
144
- assert(center(b['handlebars']).x > center(b['seat']).x, 'handlebars misplaced');
145
- } else if (spec.kind === 'qin') {
146
- assert(d.pipes >= 8 && d.keys >= 12, 'organ pipe/key count too low');
147
- assert(d.beads >= 6, 'ceremonial bead curtain missing');
148
- assert(center(b['crown']).y < center(b['emperor-head']).y, 'crown below head');
149
- assert(b['mian-board'].width > b['mian-board'].height*2.5, 'ceremonial headdress board should be flat');
150
- assert(overlap(b['cross-collar'],b['robe'],0), 'cross collar not on robe');
151
- assert(center(b['organ-pipes']).y < b['keyboard'].y, 'pipes not above keyboard');
152
- assert(center(b['emperor']).x < center(b['organ-console']).x, 'emperor not beside organ');
153
- assert(overlap(b['hand-left'],b['keyboard'],0) && overlap(b['hand-right'],b['keyboard'],0), 'hands do not reach keys');
154
- assert(center(b['organ-bench']).y > center(b['emperor-head']).y, 'bench misplaced');
155
- } else if (spec.kind === 'race') {
156
- const wl=center(b['car-wheel-left']), wr=center(b['car-wheel-right']);
157
- const wheelSize=(b['car-wheel-left'].width+b['car-wheel-right'].width)/2;
158
- assert(wr.x-wl.x>wheelSize*1.5 && Math.abs(wl.y-wr.y)<wheelSize*.15, 'car wheels misaligned');
159
- assert(Math.abs(b['car-wheel-left'].width-b['car-wheel-right'].width)<wheelSize*.25, 'car wheels differ');
160
- assert(center(b['elephant-head']).y < center(b['car-body']).y, 'elephant not in driver area');
161
- assert(near(center(b['elephant-trunk']),center(b['steering-wheel']),wheelSize*.8), 'trunk not near steering wheel');
162
- assert(!overlap(b['rabbit'],b['car-body'],0), 'rabbit appears inside car');
163
- assert(center(b['rabbit']).x > wr.x && center(b['rabbit']).x < center(b['finish-line']).x, 'rabbit position wrong');
164
- assert(center(b['car-body']).x < center(b['finish-line']).x, 'car past finish');
165
- assert(center(b['road']).y > center(b['car-body']).y, 'road misplaced');
166
- }
167
- await page.screenshot({path:'/logs/verifier/scene.png'});
168
- console.log(spec.kind, 'visual-structure checks passed');
169
- } finally { await browser.close(); }
170
- })().catch(e => {console.error(e); process.exit(1);});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
task_137/tests/verify.py ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ from array import array
3
+ from fractions import Fraction
4
+ import json
5
+ import math
6
+ import os
7
+ from pathlib import Path
8
+ import secrets
9
+ import shutil
10
+ import socket
11
+ import statistics
12
+ import subprocess
13
+ import sys
14
+ import tempfile
15
+ import time
16
+ from urllib.request import urlopen
17
+
18
+ import film_events
19
+ import rig_check
20
+
21
+
22
+ FPS = 60
23
+ FRAMES = 97 * FPS
24
+ WIDTH, HEIGHT = 144, 81
25
+ SAMPLE_RATE = 8000
26
+ TESTS = Path(__file__).resolve().parent
27
+ FFMPEG = os.environ.get("FFMPEG_PATH", "ffmpeg")
28
+ FFPROBE = os.environ.get("FFPROBE_PATH", "ffprobe")
29
+ NPM = (shutil.which("npm.cmd") if os.name == "nt" else shutil.which("npm")) or "npm"
30
+
31
+
32
+ def run(argv, **options):
33
+ result = subprocess.run(argv, capture_output=True, timeout=options.pop("timeout", 60), **options)
34
+ if result.returncode:
35
+ raise RuntimeError(f"{argv[0]} exited {result.returncode}: {result.stderr[-1200:].decode(errors='replace')}")
36
+ return result.stdout
37
+
38
+
39
+ def require(condition, message):
40
+ if not condition:
41
+ raise ValueError(message)
42
+
43
+
44
+ def probe(path, frames):
45
+ require(path.is_file(), f"Missing MP4: {path.name}")
46
+ args = [FFPROBE, "-v", "error", "-show_streams", "-show_format", "-count_frames", "-of", "json", str(path)]
47
+ info = json.loads(run(args, timeout=120))
48
+ require("mp4" in info["format"]["format_name"].split(","), "Expected MP4 container")
49
+ video = [s for s in info["streams"] if s["codec_type"] == "video"]
50
+ require(len(video) == 1, "Expected one video stream")
51
+ v = video[0]
52
+ require(v["codec_name"] == "h264" and (v["width"], v["height"]) == (1920, 1080), "Expected 1920×1080 H.264")
53
+ require(Fraction(v["avg_frame_rate"]) == FPS and int(v["nb_read_frames"]) == frames, "Incorrect FPS or decoded frame count")
54
+ require(abs(float(v["duration"]) - frames / FPS) <= 1 / FPS, "Incorrect video duration")
55
+ frame_pts = json.loads(run([FFPROBE, "-v", "error", "-select_streams", "v:0", "-show_frames",
56
+ "-show_entries", "frame=best_effort_timestamp", "-of", "json", str(path)], timeout=120))
57
+ stamps = [int(frame["best_effort_timestamp"]) for frame in frame_pts["frames"]]
58
+ unit = Fraction(v["time_base"])
59
+ require(len(stamps) == frames and all(abs(stamp * unit - Fraction(i, FPS)) <= unit
60
+ for i, stamp in enumerate(stamps)), "Video timestamps do not follow the 60 fps grid")
61
+ audio = [s for s in info["streams"] if s["codec_type"] == "audio"]
62
+ require(len(audio) == 1 and audio[0]["codec_name"] == "aac" and audio[0]["channels"] == 2, "Expected stereo AAC")
63
+ require(abs(float(audio[0]["duration"]) - frames / FPS) < .1, "Audio duration differs from picture")
64
+ return {"frames": frames, "seconds": frames / FPS, "fps": FPS}
65
+
66
+
67
+ def picture(path, frame=None):
68
+ seek = [] if frame is None else ["-ss", f"{max(0, frame / FPS - .001):.6f}"]
69
+ result = run([FFMPEG, "-v", "error", "-xerror", "-threads", "2", *seek, "-i", str(path), "-frames:v", "1",
70
+ "-filter_threads", "1", "-vf", f"scale={WIDTH}:{HEIGHT}:flags=area", "-pix_fmt", "rgb24", "-f", "rawvideo", "-"])
71
+ require(len(result) == WIDTH * HEIGHT * 3, f"No decoded image from {path.name} at frame {frame}")
72
+ return result
73
+
74
+
75
+ def error(a, b):
76
+ return sum(abs(x - y) for x, y in zip(a, b, strict=True)) / len(a)
77
+
78
+
79
+ def decode_audio(path):
80
+ pcm = run([FFMPEG, "-v", "error", "-xerror", "-i", str(path), "-map", "0:a:0", "-ac", "1",
81
+ "-ar", str(SAMPLE_RATE), "-f", "s16le", "-"])
82
+ samples = array("h", pcm)
83
+ if sys.byteorder != "little":
84
+ samples.byteswap()
85
+ return samples
86
+
87
+
88
+ def rms(samples):
89
+ return math.sqrt(sum(x * x for x in samples) / len(samples)) if samples else 0
90
+
91
+
92
+ def soundtrack_levels(path):
93
+ samples = decode_audio(path)
94
+ levels = [round(rms(samples[(5 + 4 * i) * SAMPLE_RATE:(9 + 4 * i) * SAMPLE_RATE])) for i in range(20)]
95
+ require(sum(level >= 50 for level in levels) >= 19, "Score is absent or near-silent in multiple scenes")
96
+ return levels
97
+
98
+
99
+ def compare_audio(path, source, start):
100
+ # Allow a small encoder/decoder delay. Compare a half-second inside the range.
101
+ middle = SAMPLE_RATE // 4
102
+ clip = decode_audio(path)[middle:middle + SAMPLE_RATE // 2]
103
+ full = decode_audio(source)
104
+ center = round(start / FPS * SAMPLE_RATE) + middle
105
+ require(rms(clip) >= 50, "Regenerated score range is silent")
106
+ best = 0
107
+ for offset in range(-240, 241):
108
+ reference = full[center + offset:center + offset + len(clip)]
109
+ denominator = rms(clip) * rms(reference)
110
+ if denominator:
111
+ correlation = sum(x * y for x, y in zip(clip, reference, strict=True)) / (len(clip) * denominator)
112
+ best = max(best, correlation)
113
+ require(best >= .85, f"Regenerated score disagrees with submitted score (correlation {best:.3f})")
114
+ return round(best, 4)
115
+
116
+
117
+ def launch_capture(app, scratch, logs, samples):
118
+ with socket.socket() as sock:
119
+ sock.bind(("127.0.0.1", 0))
120
+ port = sock.getsockname()[1]
121
+ url = f"http://127.0.0.1:{port}"
122
+ env = {**os.environ, "PREVIEW_PORT": str(port)}
123
+ sample_file = scratch / "samples.json"
124
+ sample_file.write_text(json.dumps(samples), encoding="utf-8")
125
+ with (logs / "preview.log").open("wb") as log:
126
+ server = subprocess.Popen([NPM, "run", "preview"], cwd=app, env=env, stdout=log, stderr=log,
127
+ start_new_session=os.name != "nt")
128
+ try:
129
+ for _ in range(100):
130
+ try:
131
+ with urlopen(url, timeout=1):
132
+ break
133
+ except OSError:
134
+ require(server.poll() is None, "Preview exited before serving")
135
+ time.sleep(.2)
136
+ else:
137
+ raise RuntimeError("Preview did not start")
138
+ return subprocess.run(["node", str(TESTS / "browser.cjs"), url, str(scratch), str(sample_file)],
139
+ stdout=log, stderr=log, timeout=180).returncode
140
+ finally:
141
+ if server.poll() is None:
142
+ if os.name == "nt":
143
+ subprocess.run(["taskkill", "/PID", str(server.pid), "/T", "/F"], capture_output=True)
144
+ else:
145
+ os.killpg(server.pid, 15)
146
+ server.wait(timeout=10)
147
+
148
+
149
+ def review_pack(source, thumbnails, scratch, logs):
150
+ for i, frame in enumerate(thumbnails):
151
+ target = scratch / f"tile-{i:02}.jpg"
152
+ run([FFMPEG, "-v", "error", "-y", "-ss", f"{frame / FPS - .001:.6f}", "-i", str(source),
153
+ "-frames:v", "1", "-vf", "scale=320:180", "-q:v", "3", str(target)])
154
+ run([FFMPEG, "-v", "error", "-y", "-framerate", "1", "-i", str(scratch / "tile-%02d.jpg"),
155
+ "-vf", "tile=4x6:padding=4:margin=4", "-frames:v", "1", str(logs / "contact-sheet.jpg")])
156
+ for name, start, duration in (("sahara", 4.5, 5), ("shadow-to-scope", 56.5, 9), ("press-conference", 85, 12)):
157
+ run([FFMPEG, "-v", "error", "-y", "-ss", str(start), "-i", str(source), "-t", str(duration),
158
+ "-vf", "scale=960:540", "-c:v", "libx264", "-preset", "fast", "-crf", "21",
159
+ "-c:a", "aac", "-movflags", "+faststart", str(logs / f"{name}.mp4")])
160
+
161
+
162
+ def verify(app, logs, evidence):
163
+ scores = {}
164
+
165
+ def check(name, weight, action):
166
+ try:
167
+ observations = action()
168
+ except (ValueError, RuntimeError, OSError, KeyError, subprocess.SubprocessError) as exc:
169
+ scores[name] = {"points": 0, "max": weight, "error": str(exc)}
170
+ else:
171
+ scores[name] = {"points": weight, "max": weight, "observations": observations}
172
+
173
+ source = app / "out/final/the-pelican-test.mp4"
174
+ check("media_contract", 15, lambda: probe(source, FRAMES))
175
+ check("score_activity", 4, lambda: soundtrack_levels(source))
176
+
177
+ def event(action):
178
+ require(source.is_file(), "Missing MP4 for event sampling")
179
+ return action(source, run, FFMPEG)
180
+
181
+ check("shadow_phosphor_beat", 8, lambda: event(film_events.shadow_to_phosphor))
182
+ check("vertical_progress_beat", 8, lambda: event(film_events.portrait_progress))
183
+ random = secrets.SystemRandom()
184
+ middle = [FPS * (7 + 4 * i) for i in range(20)]
185
+ alternate = [FPS * (5 + 4 * i) + random.randrange(45, 105) for i in range(20)]
186
+ witness_first = random.choice(alternate)
187
+ rig_cases = rig_check.cases_for(random.randrange(375, 399), random.randrange(11, 15))
188
+ compare_frames = sorted({255, *middle, 5310, FRAMES - 2, witness_first + 12, witness_first + 43,
189
+ *(case["frame"] for case in rig_cases)})
190
+ thumbnails = [255, *middle, 5310, 5796, FRAMES - 2]
191
+
192
+ with tempfile.TemporaryDirectory(prefix="pelican-verifier-") as temp:
193
+ scratch = Path(temp)
194
+ samples = {"frames": sorted(set(compare_frames + alternate)),
195
+ "repeat": random.sample(middle, 3), "rig": rig_cases}
196
+ try:
197
+ launch_capture(app, scratch, logs, samples)
198
+ browser = json.loads((scratch / "browser.json").read_text(encoding="utf-8"))
199
+ except (OSError, RuntimeError, ValueError, subprocess.SubprocessError) as exc:
200
+ browser = {"error": str(exc)}
201
+
202
+ def status(name):
203
+ require(browser.get(name), browser.get("error", "Browser check failed; see preview.log"))
204
+ return True
205
+
206
+ def sequence():
207
+ status("capture")
208
+ frames = {frame: picture(scratch / f"{frame}.png") for frame in samples["frames"]}
209
+ changes = [round(error(frames[a], frames[b]), 3) for a, b in zip(middle, alternate, strict=True)]
210
+ require(len(set(frames[frame] for frame in middle)) == 20, "Several artwork midpoints are identical")
211
+ require(sum(value >= .35 for value in changes) >= 17, "Too many artwork sections are static")
212
+ return changes
213
+
214
+ def consistency():
215
+ status("capture")
216
+ differences = [round(error(picture(scratch / f"{frame}.png"), picture(source, frame)), 3)
217
+ for frame in compare_frames]
218
+ require(statistics.median(differences) <= 10 and max(differences) <= 25,
219
+ f"Preview does not match submitted export; mean RGB error by sample: {differences}")
220
+ return differences
221
+
222
+ def reexport():
223
+ status("capture")
224
+ clip = scratch / "rerender.mp4"
225
+ args = [NPM, "run", "final", "--", "--from", str(witness_first / FPS),
226
+ "--to", str((witness_first + FPS) / FPS), "--out", str(clip)]
227
+ with (logs / "reexport.log").open("wb") as log:
228
+ result = subprocess.run(args, cwd=app, stdout=log, stderr=log, timeout=300)
229
+ require(result.returncode == 0, "Range export failed; see reexport.log")
230
+ probe(clip, FPS)
231
+ for offset in (12, 43):
232
+ require(error(picture(clip, offset), picture(scratch / f"{witness_first + offset}.png")) <= 25,
233
+ "Regenerated picture is inconsistent with the preview at that time")
234
+ return {"start_frame": witness_first, "audio_correlation": compare_audio(clip, source, witness_first)}
235
+
236
+ check("player_controls", 4, lambda: status("controls"))
237
+ check("deterministic_motion", 7, sequence)
238
+ check("preview_matches_export", 12, consistency)
239
+ check("range_regeneration", 12, reexport)
240
+ check("rider_pedaling", 21, lambda: status("rig") and rig_check.pedaling(scratch, rig_cases, run, FFMPEG))
241
+ check("rider_gate_continuity", 9, lambda: status("rig") and rig_check.crossing(scratch, rig_cases, run, FFMPEG))
242
+
243
+ if evidence and scores["media_contract"]["points"]:
244
+ try:
245
+ review_pack(source, thumbnails, scratch, logs)
246
+ except (OSError, RuntimeError, ValueError, subprocess.SubprocessError) as exc:
247
+ (logs / "evidence-error.txt").write_text(str(exc), encoding="utf-8")
248
+
249
+ raw_score = sum(result["points"] for result in scores.values()) / 100
250
+ failed_delivery = [name for name in ("media_contract", "preview_matches_export", "range_regeneration", "rider_pedaling")
251
+ if not scores[name]["points"]]
252
+ reward = min(raw_score, .49) if failed_delivery else raw_score
253
+ report = {"reward": reward, "uncapped_score": raw_score, "failed_delivery": failed_delivery, "checks": scores}
254
+ (logs / "checks.json").write_text(json.dumps(report, indent=2) + "\n", encoding="utf-8")
255
+ (logs / "reward.txt").write_text(f"{reward:.2f}\n", encoding="ascii")
256
+ print(json.dumps(report, indent=2))
257
+
258
+
259
+ if __name__ == "__main__":
260
+ parser = argparse.ArgumentParser()
261
+ parser.add_argument("--app", type=Path, required=True)
262
+ parser.add_argument("--logs", type=Path, required=True)
263
+ parser.add_argument("--no-evidence", action="store_true")
264
+ args = parser.parse_args()
265
+ args.logs.mkdir(parents=True, exist_ok=True)
266
+ verify(args.app.resolve(), args.logs.resolve(), not args.no_evidence)
task_137/tests/visible_change.js DELETED
@@ -1,28 +0,0 @@
1
- // Compare painted content without requiring the id-bearing group itself to transform.
2
- async function visibleChange(page, first, second) {
3
- return page.evaluate(async ({first, second}) => {
4
- async function decode(base64) {
5
- const image = new Image();
6
- image.src = 'data:image/png;base64,' + base64;
7
- await image.decode();
8
- return image;
9
- }
10
- const [a, b] = await Promise.all([decode(first), decode(second)]);
11
- const width = Math.max(1, Math.min(a.width, b.width));
12
- const height = Math.max(1, Math.min(a.height, b.height));
13
- function pixels(image) {
14
- const canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
15
- canvas.width = width; canvas.height = height;
16
- const context = canvas.getContext('2d', {willReadFrequently: true});
17
- context.drawImage(image, 0, 0, width, height);
18
- return context.getImageData(0, 0, width, height).data;
19
- }
20
- const p = pixels(a), q = pixels(b);
21
- let changed = 0;
22
- for (let i = 0; i < p.length; i += 4) {
23
- if (Math.max(Math.abs(p[i] - q[i]), Math.abs(p[i + 1] - q[i + 1]), Math.abs(p[i + 2] - q[i + 2])) > 40) changed++;
24
- }
25
- return {changed, fraction: changed / (width * height)};
26
- }, {first: first.toString('base64'), second: second.toString('base64')});
27
- }
28
- module.exports = {visibleChange};