Files
UHD_Media_Tool/deno.json
T
rootandClaude Opus 5.5 c437c6bff6 feat(browser): vision automation loop with screenshots, coordinate actions and bounded challenge solving
- browser.screenshot returns the page as an image content block (≤1280px wide, JPEG quality
  configurable) for vision-capable upstreams; non-vision upstreams get a redacted text snapshot.
  Login pages / password fields are marked sensitive and withheld unless a
  browser.sensitive_screenshot grant exists and allowSensitive is passed.
- browser.click_at / type_at / scroll / wait act in screenshot pixels; the server converts via
  viewport/DPR, requires automation control and an allowlisted host, and writes a thumbnail
  evidence file (DATA_DIR/tmp/evidence) referenced from agent_run_event.
- browser.solve_challenge runs a bounded child agent_run (vision caps only, maxSteps ≤ 12,
  budget), judges success from page facts, stops immediately on 2FA / SMS / device confirmation,
  and otherwise moves the session to waiting with evidence and a takeover link.
- PiAgentRuntime passes modelImage outputs as pi-ai image content when model.input has image;
  the ledger never stores image data; coordinate actions use per-invocation idempotency keys.
- Tests: image codec, runtime image content, E14 e2e (login solved, 2FA stop, step limit,
  sensitive withheld). Real camofox 1.17.0 check on example.com recorded in the runbook.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 01:27:48 +08:00

98 lines
4.5 KiB
JSON

{
"version": "0.2.2",
"workspace": [
"./packages/adapters",
"./packages/agent",
"./packages/contracts",
"./packages/db",
"./packages/domain",
"./packages/mapping",
"./packages/tasks",
"./packages/testkit",
"./apps/server",
"./apps/web"
],
"nodeModulesDir": "auto",
"imports": {
"@biomejs/biome": "npm:@biomejs/[email protected]",
"@earendil-works/pi-agent-core": "npm:@earendil-works/[email protected]",
"@earendil-works/pi-agent-core/": "npm:/@earendil-works/[email protected]/",
"@earendil-works/pi-ai": "npm:@earendil-works/[email protected]",
"@earendil-works/pi-ai/": "npm:/@earendil-works/[email protected]/",
"@hono/swagger-ui": "npm:@hono/[email protected]",
"@hono/zod-openapi": "npm:@hono/[email protected]",
"@modelcontextprotocol/sdk": "npm:@modelcontextprotocol/[email protected]",
"@modelcontextprotocol/sdk/": "npm:/@modelcontextprotocol/[email protected]/",
"@simplewebauthn/server": "npm:@simplewebauthn/[email protected]",
"@types/node": "npm:@types/[email protected]",
"@types/nunjucks": "npm:@types/[email protected]",
"@types/pg": "npm:@types/[email protected]",
"@xmldom/xmldom": "npm:@xmldom/[email protected]",
"cheerio": "npm:[email protected]",
"fast-xml-parser": "npm:[email protected]",
"hash-wasm": "npm:[email protected]",
"hono": "npm:[email protected]",
"hono/": "npm:/[email protected]/",
"jpeg-js": "npm:[email protected]",
"kysely": "npm:[email protected]",
"kysely/": "npm:/[email protected]/",
"nunjucks": "npm:[email protected]",
"openworkflow": "npm:[email protected]",
"openworkflow/": "npm:/[email protected]/",
"pg": "npm:[email protected]",
"pino": "npm:[email protected]",
"pino-pretty": "npm:[email protected]",
"playwright-core": "npm:[email protected]",
"postgres": "npm:[email protected]",
"typebox": "npm:[email protected]",
"typescript": "npm:[email protected]",
"vitest": "npm:[email protected]",
"vitest/": "npm:/[email protected]/",
"xpath": "npm:[email protected]",
"yaml": "npm:[email protected]",
"zod": "npm:[email protected]"
},
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"verbatimModuleSyntax": true
},
"tasks": {
"dev": {
"description": "同时起 server(4380)与 web(5180)",
"dependencies": ["dev:server", "dev:web"]
},
"dev:server": "cd apps/server && deno task dev",
"dev:web": "cd apps/web && deno task dev",
"db:up": "docker compose -f docker-compose.dev.yml up -d --wait",
"db:migrate": "deno run -A --env-file=.env packages/db/scripts/migrate.ts latest",
"db:reset": "deno run -A --env-file=.env packages/db/scripts/migrate.ts reset",
"gen:types": "deno run -A --env-file=.env packages/db/scripts/gen-types.ts",
"types": "mkdir -p types && deno types > types/deno.d.ts",
"typecheck": "deno task types && deno task typecheck:tsc && deno task typecheck:deno",
"typecheck:tsc": "deno task --members -j 1 typecheck",
"typecheck:deno": "deno check apps/server/src/main.ts packages/contracts/src/index.ts packages/db/src/index.ts packages/db/scripts/migrate.ts packages/db/scripts/gen-types.ts packages/db/migrations/*.ts packages/domain/src/index.ts packages/mapping/src/index.ts packages/tasks/src/index.ts packages/agent/src/index.ts packages/adapters/src/index.ts packages/testkit/src/index.ts",
"lint": "deno run -A npm:@biomejs/biome check .",
"fmt": "deno run -A npm:@biomejs/biome check --write .",
"test": "deno task --members -j 1 test",
"test:web:smoke": {
"description": "前端全页面冒烟(Playwright):需要已启动的后端 + web 与已初始化的管理员,见 README",
"command": "deno run -A apps/web/scripts/smoke.mjs"
},
"check:tokens": "cd apps/web && deno task check:tokens",
"check:copy": {
"description": "文案标点检查(规范见 docs/design/glossary.md「标点」);--fix 自动修正,--strict 有违规即失败",
"command": "deno run -A scripts/check-copy-punctuation.mjs --strict"
},
"build": "cd apps/web && deno task build && cd ../server && deno task compile",
"check:binary": {
"description": "编译产物自检:空环境跑 dist/umt-server --role preflight,确认完整模块图可加载(防 deno compile 漏嵌 npm 模块)",
"command": "sh scripts/check-compiled-binary.sh"
},
"ci": "deno task typecheck && deno task lint && deno task test && deno task check:tokens && deno task check:copy && deno task build && deno task check:binary",
"gen:tokens": "cd apps/web && deno task gen:tokens"
}
}