{ "name": "loop-protocol", "private": true, "version": "0.0.0", "type": "module", "packageManager": "pnpm@11.7.0", "scripts": { "dev": "vite", "test": "vitest run --exclude 'tests/e2e/**' --exclude 'tests/component/**' --exclude '.claude/worktrees/**' --exclude '.claude/tmp/**' --exclude 'tmp/**'", "typecheck": "tsc --noEmit", "typecheck:e2e": "tsc -p tests/e2e/tsconfig.json --noEmit", "typecheck:component-vrt": "tsc -p tests/component/tsconfig.json --noEmit", "lint": "eslint .", "lint:md": "markdownlint-cli2", "lint:prose": "textlint --config .textlintrc 'docs/**/*.md' 'README.md' '.github/**/*.md' 'CLAUDE.md' 'AGENTS.md' 'SECURITY.md'", "lint:docs": "pnpm run lint:md && pnpm run lint:prose && pnpm run validate:roadmap-refs", "validate:roadmap-refs": "node scripts/validate-roadmap-refs.mjs", "build": "tsc && vite build", "preview": "vite preview", "test:e2e": "VITE_E2E_MODE=true pnpm build && playwright test", "test:e2e:ci": "playwright test", "test:e2e:ui": "playwright test --ui", "test:e2e:debug": "playwright test --debug", "test:e2e:headed": "playwright test --headed", "dist:e2e-boundary": "node scripts/check-dist-e2e-boundary.mjs", "test:e2e:preview-namespace": ": \"${VITE_LOOP_STORAGE_NAMESPACE:?missing VITE_LOOP_STORAGE_NAMESPACE}\" && : \"${LOOP_EXPECTED_STORAGE_KEY:?missing LOOP_EXPECTED_STORAGE_KEY}\" && : \"${VITE_BASE_PATH:?missing VITE_BASE_PATH}\" && node -e 'const ns=process.env.VITE_LOOP_STORAGE_NAMESPACE;const expectedKey=process.env.LOOP_EXPECTED_STORAGE_KEY;const basePath=process.env.VITE_BASE_PATH;const repo=process.env.GITHUB_REPOSITORY?process.env.GITHUB_REPOSITORY.split(\"/\")[1]:null;function fail(m){console.error(\"test:e2e:preview-namespace guard: \"+m);process.exit(1)};if(!/^pr-[0-9]+$/.test(ns))fail(\"invalid VITE_LOOP_STORAGE_NAMESPACE: \"+ns);if(expectedKey!==`loop-protocol.preview.${ns}.mvp.save`)fail(\"invalid LOOP_EXPECTED_STORAGE_KEY: \"+expectedKey);if(!basePath.startsWith(\"/\")||!basePath.endsWith(\"/\"))fail(\"invalid VITE_BASE_PATH (must start and end with /): \"+basePath);if(basePath.includes(\"//\"))fail(\"invalid VITE_BASE_PATH (double slash): \"+basePath);const segs=basePath.split(\"/\").filter((s)=>s.length>0);if(segs.length!==2)fail(\"invalid VITE_BASE_PATH (must be //pr-N/): \"+basePath);if(segs.some((s)=>s===\".\"||s===\"..\"))fail(\"invalid VITE_BASE_PATH segment: \"+basePath);if(!/^pr-[0-9]+$/.test(segs[1]))fail(\"invalid VITE_BASE_PATH namespace segment: \"+basePath);if(segs[1]!==ns)fail(\"VITE_BASE_PATH namespace segment (\"+segs[1]+\") must equal VITE_LOOP_STORAGE_NAMESPACE (\"+ns+\")\");if(repo&&segs[0]!==repo)fail(\"VITE_BASE_PATH repo segment (\"+segs[0]+\") must equal GITHUB_REPOSITORY repo name (\"+repo+\")\");console.error(\"test:e2e:preview-namespace guard: ok (\"+ns+\", \"+basePath+\")\")' && rm -rf dist && VITE_E2E_MODE=false pnpm build && pnpm dist:e2e-boundary --mode production --dist dist && LOOP_E2E_PREVIEW_NAMESPACE_LANE=true playwright test tests/e2e/m4-preview-namespace.spec.ts", "test:vrt": "VITE_E2E_MODE=true pnpm build && LOOP_VRT_LANE=true playwright test tests/e2e/visual-overlay.spec.ts", "test:vrt:e2e": "LOOP_VRT_LANE=true playwright test tests/e2e/visual-overlay.spec.ts", "test:vrt:update:e2e": "VITE_E2E_MODE=true pnpm build && LOOP_VRT_LANE=true playwright test tests/e2e/visual-overlay.spec.ts --update-snapshots=all", "test:vrt:component": "vitest run --config vitest.visual.config.ts", "test:vrt:update:component": "vitest run --config vitest.visual.config.ts --update", "test:vrt:evidence:triple-run": "rm -rf tests/component/.vrt-evidence && for i in 1 2 3; do VITE_VRT_EVIDENCE_CAPTURE=true VITE_VRT_EVIDENCE_RUN_ID=$i pnpm exec vitest run --config vitest.visual.config.ts tests/component/combat-hud-running.vrt.test.ts || exit 1; done && node -e \"const {createHash}=require('node:crypto');const fs=require('node:fs');const hashes=[1,2,3].map((i)=>createHash('sha256').update(fs.readFileSync('tests/component/.vrt-evidence/run-'+i+'/combat-hud-running-actual.png')).digest('hex'));console.log('actual_sha256_run_1='+hashes[0]);console.log('actual_sha256_run_2='+hashes[1]);console.log('actual_sha256_run_3='+hashes[2]);if(new Set(hashes).size!==1){console.error('MISMATCH: triple-run actual PNG sha256 differs across fresh processes');process.exit(1)}console.log('triple_run_stability=ok (3/3 identical sha256, fresh browser process each run)')\"", "playwright:install": "playwright install", "playwright:install:ci": "playwright install --with-deps chromium" }, "devDependencies": { "@eslint/js": "^10.0.1", "@playwright/test": "^1.60.0", "@vitest/browser-playwright": "4.1.6", "@types/node": "^24.0.0", "ajv": "^8", "ajv-formats": "^3", "eslint": "^10.3.0", "jsdom": "^29.1.1", "markdownlint-cli2": "^0.17.2", "prek": "npm:@j178/prek@0.5.2", "textlint": "^14.4.2", "textlint-rule-preset-japanese": "^10.0.4", "textlint-rule-prh": "^6.0.0", "typescript": "~6.0.2", "typescript-eslint": "^8.59.3", "vite": "^8.0.12", "vitest": "^4.1.6", "yaml": "^2.8.1" } }