@wenathlan/saddle 1.8.2 → 1.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/README.md +9 -9
  2. package/browser/playwright.js +22 -0
  3. package/docs/.gitkeep +0 -0
  4. package/docs/gapmatrix.md +3 -3
  5. package/docs/libraryapi.md +1 -0
  6. package/docs/logs/.gitkeep +0 -0
  7. package/docs/packageaudit185.md +23 -0
  8. package/docs/plans/00.index.md +50 -0
  9. package/docs/plans/01.architecture.md +86 -0
  10. package/docs/plans/02.research.computer.use.md +58 -0
  11. package/docs/plans/03.research.captcha.bypass.md +68 -0
  12. package/docs/plans/04.research.sandbox.ai.md +52 -0
  13. package/docs/plans/05.capture.platform.md +57 -0
  14. package/docs/plans/06.dependencies.md +97 -0
  15. package/docs/plans/07.captcha.test.page.md +41 -0
  16. package/docs/plans/08.production.infra.md +70 -0
  17. package/docs/plans/09.database.schema.md +121 -0
  18. package/docs/plans/10.cloudinary.storage.md +57 -0
  19. package/docs/plans/11.movement.logs.json.md +72 -0
  20. package/docs/plans/12.research.atlas.agent.browser.md +79 -0
  21. package/docs/plans/13.research.anti.detection.md +898 -0
  22. package/docs/plans/14.research.proxy.md +1495 -0
  23. package/docs/plans/15.research.retry.rate.limit.md +1958 -0
  24. package/docs/plans/16.research.crawling.md +1417 -0
  25. package/docs/plans/17.research.caching.md +1610 -0
  26. package/docs/plans/18.research.content.extraction.md +1952 -0
  27. package/docs/plans/19.research.errors.events.md +1523 -0
  28. package/docs/plans/20.research.zod.validation.md +1350 -0
  29. package/docs/plans/21.research.batch.concurrency.md +1888 -0
  30. package/docs/plans/22.research.universal.runtime.md +944 -0
  31. package/docs/plans/23.research.ai.integration.md +1465 -0
  32. package/docs/plans/24.research.memory.persistence.md +1979 -0
  33. package/docs/plans/25.research.server.api.md +342 -0
  34. package/docs/plans/26.research.compilation.md +249 -0
  35. package/docs/plans/27.research.html.parsing.md +251 -0
  36. package/docs/plans/28.action.plan.md +50 -0
  37. package/docs/plans/29.api.reference.md +174 -0
  38. package/docs/plans/30.architecture.plan.md +94 -0
  39. package/docs/plans/31.auditoria.dados.md +163 -0
  40. package/docs/plans/32.bots.automacao.computacional.md +214 -0
  41. package/docs/plans/33.bots.codigo.revisao.md +220 -0
  42. package/docs/plans/34.bots.seguranca.cicd.md +366 -0
  43. package/docs/plans/35.comparativo.concorrencia.md +464 -0
  44. package/docs/plans/36.computational.memory.md +340 -0
  45. package/docs/plans/37.deploystrategy.md +394 -0
  46. package/docs/plans/38.flow.md +155 -0
  47. package/docs/plans/39.multi.platform.bot.md +252 -0
  48. package/docs/plans/40.npm.publish.md +250 -0
  49. package/docs/plans/41.o.que.falta.md +407 -0
  50. package/docs/plans/42.pesquisa.concorrencia.md +721 -0
  51. package/docs/plans/43.plan.universal.architecture.md +496 -0
  52. package/docs/plans/44.reference.md +100 -0
  53. package/docs/plans/45.robotarchitecture.md +237 -0
  54. package/docs/plans/46.scdnintegration.md +284 -0
  55. package/docs/plans/47.multiforge.readme.md +129 -0
  56. package/docs/plans/48.theory.v4.repo.os.md +152 -0
  57. package/docs/plans/49.third.party.infra.md +12 -0
  58. package/docs/plans/50.file.as.compute.md +39 -0
  59. package/docs/plans/51.architecture.virtual.processor.md +80 -0
  60. package/docs/plans/52.manifesto.v8.md +11 -0
  61. package/docs/plans/58.cdn.list.md +23 -0
  62. package/docs/plans/59.sql.frameworks.md +33 -0
  63. package/docs/plans/60.sql.thirdparty.md +26 -0
  64. package/docs/plans/61.objective.multiforge.md +63 -0
  65. package/docs/plans/62.huggingface.upload.md +26 -0
  66. package/docs/plans/63.kaggle.upload.md +24 -0
  67. package/docs/plans/64.npm.storage.md +30 -0
  68. package/docs/plans/65.rclone.terabox.md +32 -0
  69. package/docs/plans/66.buckets.and.models.todo.md +14 -0
  70. package/docs/plans/67.database.todo.md +13 -0
  71. package/docs/plans/68.deploy.packages.todo.md +12 -0
  72. package/docs/plans/69.report.human.operator.md +133 -0
  73. package/docs/plans/70.report.brain2qwerty.ems.md +135 -0
  74. package/docs/plans/71.report.hd.infinito.vram.md +155 -0
  75. package/docs/plans/72.plan.hd.infinito.node.md +146 -0
  76. package/docs/plans/73.plan.scifi.repos.md +125 -0
  77. package/docs/plans/74.000.manifesto.v8.flat.2..md +11 -0
  78. package/docs/plans/README.md +489 -0
  79. package/docs/plans/aggregate_platforms.mjs +146 -0
  80. package/docs/plans/examplesession.json +36 -0
  81. package/docs/plans/missing-facts.md +192 -0
  82. package/docs/plans/models.md +64 -0
  83. package/docs/plans/organize.cjs +270 -0
  84. package/docs/plans/platforms.md +2887 -0
  85. package/docs/plans/sites.md +31322 -0
  86. package/docs/platformpipelineaudit.md +18 -0
  87. package/docs/platformpipelines.md +13 -0
  88. package/docs/registryresearch.md +4 -0
  89. package/docs/release.md +4 -4
  90. package/docs/release182notes.md +2 -0
  91. package/docs/release184notes.md +7 -0
  92. package/docs/release185notes.md +7 -0
  93. package/docs/sources/farm.py +117 -0
  94. package/docs/sources/html/saddle1.html +132 -0
  95. package/docs/sources/html/saddle2.html +157 -0
  96. package/docs/sources/html/saddle3.html +119 -0
  97. package/docs/sources/html/saddle4.html +144 -0
  98. package/docs/sources/html/saddle5.html +72 -0
  99. package/docs/sources/html/saddle6.html +171 -0
  100. package/docs/sources/html/saddle7.html +236 -0
  101. package/docs/sources/saddle.ts +74 -0
  102. package/docs/sources/schema.prisma +88 -0
  103. package/docs/sources/script.sh +64 -0
  104. package/docs/sources/workflows.yml +458 -0
  105. package/docs/talks1/_body.txt +14 -0
  106. package/docs/talks1/_index.md +15 -0
  107. package/docs/talks1/_screenshot.png +0 -0
  108. package/docs/talks1/assistant-01.md +5 -0
  109. package/docs/talks1/assistant-02.md +5 -0
  110. package/docs/talks1/assistant-03.md +531 -0
  111. package/docs/talks1/assistant-04.md +26 -0
  112. package/docs/talks1/assistant-05.md +774 -0
  113. package/docs/talks1/assistant-06.md +1718 -0
  114. package/docs/talks1/scrape-share.cjs +185 -0
  115. package/docs/talks1/scrape-share.ts +183 -0
  116. package/docs/talks1/user-01.md +3 -0
  117. package/docs/talks1/user-02.md +3 -0
  118. package/docs/talks1/user-03.md +88 -0
  119. package/docs/talks1/user-04.md +3 -0
  120. package/docs/talks1/user-05.md +3 -0
  121. package/docs/talks1/user-06.md +88 -0
  122. package/docs/talks1/user-07.md +88 -0
  123. package/docs/talks2/_body.txt +14 -0
  124. package/docs/talks2/_index.md +16 -0
  125. package/docs/talks2/_screenshot.png +0 -0
  126. package/docs/talks2/assistant-01.md +5 -0
  127. package/docs/talks2/assistant-02.md +5 -0
  128. package/docs/talks2/assistant-03.md +424 -0
  129. package/docs/talks2/assistant-04.md +598 -0
  130. package/docs/talks2/assistant-05.md +1280 -0
  131. package/docs/talks2/assistant-06.md +1227 -0
  132. package/docs/talks2/assistant-07.md +1252 -0
  133. package/docs/talks2/user-01.md +3 -0
  134. package/docs/talks2/user-02.md +3 -0
  135. package/docs/talks2/user-03.md +88 -0
  136. package/docs/talks2/user-04.md +88 -0
  137. package/docs/talks2/user-05.md +88 -0
  138. package/docs/talks2/user-06.md +88 -0
  139. package/docs/talks2/user-07.md +3 -0
  140. package/docs/talks3/_body.txt +467 -0
  141. package/docs/talks3/_index.md +10 -0
  142. package/docs/talks3/_screenshot.png +0 -0
  143. package/docs/talks3/assistant-01.md +417 -0
  144. package/docs/talks3/assistant-02.md +417 -0
  145. package/docs/talks3/assistant-03.md +29 -0
  146. package/docs/talks3/assistant-04.md +727 -0
  147. package/docs/talks3/user-01.md +88 -0
  148. package/docs/talks3/user-02.md +88 -0
  149. package/docs/talks3/user-03.md +3 -0
  150. package/docs/talks3/user-04.md +3 -0
  151. package/docs/talks4/_body.txt +14 -0
  152. package/docs/talks4/_index.md +12 -0
  153. package/docs/talks4/_screenshot.png +0 -0
  154. package/docs/talks4/assistant-01.md +5 -0
  155. package/docs/talks4/assistant-02.md +5 -0
  156. package/docs/talks4/assistant-03.md +35 -0
  157. package/docs/talks4/assistant-04.md +512 -0
  158. package/docs/talks4/assistant-05.md +599 -0
  159. package/docs/talks4/user-01.md +3 -0
  160. package/docs/talks4/user-02.md +3 -0
  161. package/docs/talks4/user-03.md +88 -0
  162. package/docs/talks4/user-04.md +88 -0
  163. package/docs/talks4/user-05.md +7 -0
  164. package/docs/talks5/_body.txt +14 -0
  165. package/docs/talks5/_index.md +13 -0
  166. package/docs/talks5/_screenshot.png +0 -0
  167. package/docs/talks5/assistant-01.md +5 -0
  168. package/docs/talks5/assistant-02.md +5 -0
  169. package/docs/talks5/assistant-03.md +690 -0
  170. package/docs/talks5/assistant-04.md +758 -0
  171. package/docs/talks5/assistant-05.md +974 -0
  172. package/docs/talks5/user-01.md +3 -0
  173. package/docs/talks5/user-02.md +3 -0
  174. package/docs/talks5/user-03.md +105 -0
  175. package/docs/talks5/user-04.md +105 -0
  176. package/docs/talks5/user-05.md +63 -0
  177. package/docs/talks5/user-06.md +105 -0
  178. package/docs/talks6/_body.txt +14 -0
  179. package/docs/talks6/_index.md +9 -0
  180. package/docs/talks6/_screenshot.png +0 -0
  181. package/docs/talks6/assistant-01.md +5 -0
  182. package/docs/talks6/assistant-02.md +5 -0
  183. package/docs/talks6/assistant-03.md +1499 -0
  184. package/docs/talks6/user-01.md +3 -0
  185. package/docs/talks6/user-02.md +3 -0
  186. package/docs/talks6/user-03.md +88 -0
  187. package/docs/talks6/user-04.md +88 -0
  188. package/docs/talks7/_body.txt +14 -0
  189. package/docs/talks7/_index.md +10 -0
  190. package/docs/talks7/_screenshot.png +0 -0
  191. package/docs/talks7/assistant-01.md +5 -0
  192. package/docs/talks7/assistant-02.md +5 -0
  193. package/docs/talks7/assistant-03.md +523 -0
  194. package/docs/talks7/assistant-04.md +617 -0
  195. package/docs/talks7/user-01.md +3 -0
  196. package/docs/talks7/user-02.md +3 -0
  197. package/docs/talks7/user-03.md +105 -0
  198. package/docs/talks7/user-04.md +67 -0
  199. package/docs/talks8/conversa1.txt +1322 -0
  200. package/docs/talks8/conversa2.txt +237 -0
  201. package/docs/talks9/Beyond the Obvious_ 50 Plataformas Auto-Hospedadas de Forja de C/303/263digo para Al/303/251m de Gitea e GitLab.md" +174 -0
  202. package/docs/talks9/De NPM a Multi-Linguagem_ Uma Arquitetura T/303/251cnica para a Execu/303/247/303/243o Integrada de C/303/263digo no Ecossistema Node.js.md" +59 -0
  203. package/docs/talks9/De NPM a VMs Virtuais_ Uma An/303/241lise Arquitet/303/264nica para a Realiza/303/247/303/243o do Ciclo de Vida do Projeto SADDLE.md" +91 -0
  204. package/docs/talks9/Mapeamento da Engrenagem Computacional_ Uma Arquitetura para Execu/303/247/303/243o Isolada e Persist/303/252ncia em Ambientes Distribu/303/255dos.md" +116 -0
  205. package/docs/talks9/O Cen/303/241rio Pr/303/241tico do SADDLE_ Uma An/303/241lise de Viabilidade e Modelo de Ciclo de Vida Integrado.md" +128 -0
  206. package/docs/talks9/README (2).md +489 -0
  207. package/docs/talks9/README.md +198 -0
  208. package/docs/talks9/Viabilidade do Saddle_ Uma An/303/241lise T/303/251cnica da Transforma/303/247/303/243o de Armazenamento Remoto em Mem/303/263ria Computacional.md" +80 -0
  209. package/docs/talks9/conversa.txt +544 -0
  210. package/docs/talks9/other (2).md +39 -0
  211. package/docs/talks9/other.md +57 -0
  212. package/docs/talks9/outro.txt +24 -0
  213. package/extension/README.md +3 -3
  214. package/extension/serviceworker.js +63 -4
  215. package/extension/worker.js +3 -1
  216. package/package.json +12 -2
  217. package/packager/manifest.js +1 -1
  218. package/scrape/agent.ts +122 -0
  219. package/scrape/batch.ts +79 -0
  220. package/scrape/biome.json +76 -0
  221. package/scrape/browser.ts +222 -0
  222. package/scrape/cache.ts +84 -0
  223. package/scrape/chunking.ts +193 -0
  224. package/scrape/cli.ts +105 -0
  225. package/scrape/crawler.ts +115 -0
  226. package/scrape/dev-server.ts +94 -0
  227. package/scrape/errors.ts +132 -0
  228. package/scrape/events.ts +26 -0
  229. package/scrape/extract.ts +165 -0
  230. package/scrape/fetch.ts +105 -0
  231. package/scrape/formats.ts +85 -0
  232. package/scrape/headers.ts +71 -0
  233. package/scrape/index.ts +92 -0
  234. package/scrape/jsdom.d.ts +6 -0
  235. package/scrape/llms-txt.ts +84 -0
  236. package/scrape/middleware.ts +90 -0
  237. package/scrape/package-lock.json +9397 -0
  238. package/scrape/package.json +1420 -0
  239. package/scrape/pool.ts +95 -0
  240. package/scrape/port.ts +18 -0
  241. package/scrape/proxy.ts +103 -0
  242. package/scrape/rate-limiter.ts +95 -0
  243. package/scrape/renderer.ts +194 -0
  244. package/scrape/retry.ts +64 -0
  245. package/scrape/robots.ts +137 -0
  246. package/scrape/scrape.ts +123 -0
  247. package/scrape/serialize.ts +310 -0
  248. package/scrape/server.ts +137 -0
  249. package/scrape/session.ts +109 -0
  250. package/scrape/sitemap.ts +131 -0
  251. package/scrape/tokens.ts +45 -0
  252. package/scrape/tsconfig.json +28 -0
  253. package/scrape/types.ts +214 -0
  254. package/scrape/utils.ts +77 -0
  255. package/scrape/vite.config.ts +55 -0
  256. package/scrape/vitest.config.ts +17 -0
  257. package/workflow/templates.js +4 -4
@@ -0,0 +1,41 @@
1
+ # 07 Captcha Test Page
2
+
3
+ ## Goal
4
+
5
+ Have a controlled target to validate the UKA computer use against strong captchas. Open it in brave (via the capture platform) and record the result.
6
+
7
+ ## Target options
8
+
9
+ ### A. Local page (`tests/examples/hcaptchatest.html`) — recommended to start
10
+ - Static html with the hcaptcha widget using the public test sitekey.
11
+ - Buttons to trigger the challenge, show the resolved token and status.
12
+ - Validates detection + solver + log without heavy external network.
13
+
14
+ ### B. Real strong sites — advanced tests
15
+ - hcaptcha demo: `https://accounts.hcaptcha.com/demo`
16
+ - cloudflare turnstile: `https://challenges.cloudflare.com/turnstile`
17
+ - google recaptcha: `https://www.google.com/recaptcha/api2/demo`
18
+
19
+ ## Test pipeline (script in `tests/scripts/`)
20
+
21
+ 1. `launchbrave()` — opens real brave via playwright/cdp.
22
+ 2. `navigate(url)` — goes to the test page.
23
+ 3. `detectcaptcha(page)` — scans dom/frames for hcaptcha / turnstile / recaptcha.
24
+ 4. `solve(page)` — uses vlm solver (hcaptcha challenger) or token api (nopecha/2captcha).
25
+ 5. `record(page)` — saves screenshot, token and movement log to `tests/output/`.
26
+ 6. `assert(passed)` — verifies the challenge was passed.
27
+
28
+ ## Evidence in `tests/output/`
29
+ - `hcaptcha-<ts>.json` — token + metadata.
30
+ - `hcaptcha-<ts>.png` — screenshot of challenge and post-solve.
31
+ - `hcaptcha-<ts>-trace.json` — movement log (replay).
32
+ - `hcaptcha-<ts>.mp4` — replay video (via `ffmpeg-static`).
33
+
34
+ ## Success criteria
35
+ - Auto detects captcha type.
36
+ - Solves hcaptcha (checkbox) with vlm/llm.
37
+ - Passes cloudflare turnstile in at least 1 of 3 attempts (with sticky proxy).
38
+ - Generates reproducible json log (seed).
39
+
40
+ ## Ethical note
41
+ For research and supervised automation only. Respect tos and rate limits.
@@ -0,0 +1,70 @@
1
+ # 08 Production Infra
2
+
3
+ ## Goal
4
+
5
+ The `web/` folder is the production site. It is deployed to vercel or netlify and works as the sandbox backend: it receives agent data via https requests (post/get), writes to the db and saves assets to cloudinary.
6
+
7
+ ## Why deploy (user decision)
8
+ - The database is created in the deploy (vercel/netlify + turso/mysql), not local.
9
+ - The agent/sandbox talks to the site via https, no own infra needed.
10
+ - Cloudinary holds heavy data (replay videos, screenshots, big logs).
11
+
12
+ ## Structure of `web/` (root based, no src)
13
+
14
+ ```
15
+ web/
16
+ ├── index.js # entrypoint (open node server, not platform functions)
17
+ ├── server.js # api routes (hono or express)
18
+ ├── capture.js # browser movement capture (virtual mouse, arrow)
19
+ ├── recorder.js # json event stream
20
+ ├── replay.js # deterministic replay by seed
21
+ ├── humancursor.js # bezier + jitter + overshoot (cdp)
22
+ ├── trajectory.js # path generator
23
+ ├── fingerprint.js # stealth patches
24
+ ├── db.js # drizzle + mysql2 + prisma loader
25
+ ├── storage.js # cloudinary upload
26
+ ├── auth.js # api key / oidc (VERCEL_OIDC_TOKEN)
27
+ ├── vercel.json # vercel build/deploy config
28
+ ├── netlify.toml # netlify deploy config (alt)
29
+ ├── drizzle.config.js # drizzle -> mysql2
30
+ ├── schema.prisma # prisma schema (alt/sync)
31
+ ├── index.html # capture ui
32
+ └── hcaptchatest.html # captcha test page (mirror of tests/examples)
33
+ ```
34
+
35
+ ## Backend rules (skill arch)
36
+ - No vercel functions. No netlify functions. Use an open node server (hono/express).
37
+ - Realtime uses socket (`socket.io`), not platform locked pub/sub.
38
+ - Db uses prisma schema, drizzle orm, mysql2 driver.
39
+ - No localhost. Host parametrized (`host`). Ports randomized then locked.
40
+ - Files lowercase. No underscore. No hyphen.
41
+
42
+ ## Agent requests to deployed site
43
+
44
+ ```
45
+ agent (sandbox) deployed site (web/)
46
+ ───────────────── ──────────────────────
47
+ post /sessions ───────────► create session in db
48
+ post /sessions/:id/events ───────────► append json log (drizzle/mysql2)
49
+ post /captcha/result ───────────► save evidence + cloudinary
50
+ get /sessions/:id ───────────► read session + replay url
51
+ get /sessions/:id/replay ───────────► return video (cloudinary)
52
+ ```
53
+
54
+ ## Environment variables (production)
55
+ - `DATABASE_URL` (mysql2 / turso).
56
+ - `CLOUDINARY_URL` / `CLOUDINARY_CLOUD_NAME` / `CLOUDINARY_API_KEY` / `CLOUDINARY_API_SECRET`.
57
+ - `UKA_API_KEY` (agent auth).
58
+ - `VERCEL_OIDC_TOKEN` (auto on vercel) or `VERCEL_TOKEN` + `VERCEL_TEAM_ID` + `VERCEL_PROJECT_ID`.
59
+ - `HOST` and `PORT` (parametrized, randomized then locked).
60
+
61
+ ## Deploy
62
+ - Vercel: `vercel --prod`.
63
+ - Netlify: `netlify deploy --prod` (static + open server build, not netlify functions).
64
+ - The db is provisioned in the deploy (turso/mysql), not local sqlite.
65
+
66
+ ## Database (decision)
67
+ - Drizzle orm primary + mysql2 driver.
68
+ - Prisma schema present as alt/sync.
69
+ - Schema detailed in `09-database-schema.md`.
70
+ - Cloudinary detailed in `10-cloudinary-storage.md`.
@@ -0,0 +1,121 @@
1
+ # 09 Database Schema
2
+
3
+ ## Decision
4
+ - Primary orm: drizzle orm.
5
+ - Driver: `mysql2` (skill arch: data uses mysql2). Turso/libsql is an accepted alternative.
6
+ - Prisma schema included as alt/sync (`schema.prisma`).
7
+ - The db is created in the deploy (mysql/turso), not local.
8
+
9
+ ## Tables (drizzle, root file `web/db.js` or `schema.js`)
10
+
11
+ ```js
12
+ import { sql } from "drizzle-orm";
13
+ import { mysqlTable, text, int, float, boolean, index, timestamp } from "drizzle-orm/mysql-core";
14
+
15
+ // session of computer use (one agent / one execution)
16
+ export const sessions = mysqlTable("sessions", {
17
+ id: text("id").primaryKey(),
18
+ agentName: text("agent_name"),
19
+ browser: text("browser").default("brave"),
20
+ originUrl: text("origin_url"),
21
+ status: text("status").default("running"),
22
+ seed: text("seed"),
23
+ createdAt: timestamp("created_at").defaultNow(),
24
+ finishedAt: timestamp("finished_at"),
25
+ }, (t) => [index("idx_sessions_status").on(t.status)]);
26
+
27
+ // captured movement events (virtual mouse, click, scroll, etc)
28
+ export const events = mysqlTable("events", {
29
+ id: int("id").autoincrement().primaryKey(),
30
+ sessionId: text("session_id").references(() => sessions.id, { onDelete: "cascade" }),
31
+ t: float("t"),
32
+ type: text("type"),
33
+ x: float("x"),
34
+ y: float("y"),
35
+ data: text("data"),
36
+ createdAt: timestamp("created_at").defaultNow(),
37
+ }, (t) => [index("idx_events_session").on(t.sessionId)]);
38
+
39
+ // captcha results (tests)
40
+ export const captchaResults = mysqlTable("captcha_results", {
41
+ id: int("id").autoincrement().primaryKey(),
42
+ sessionId: text("session_id").references(() => sessions.id, { onDelete: "cascade" }),
43
+ kind: text("kind"),
44
+ sitekey: text("sitekey"),
45
+ token: text("token"),
46
+ passed: boolean("passed").default(false),
47
+ solver: text("solver"),
48
+ evidenceUrl: text("evidence_url"),
49
+ createdAt: timestamp("created_at").defaultNow(),
50
+ });
51
+
52
+ // heavy assets (replay videos, screenshots) — pointer to cloudinary
53
+ export const assets = mysqlTable("assets", {
54
+ id: int("id").autoincrement().primaryKey(),
55
+ sessionId: text("session_id").references(() => sessions.id, { onDelete: "cascade" }),
56
+ kind: text("kind"),
57
+ cloudinaryId: text("cloudinary_id"),
58
+ url: text("url"),
59
+ bytes: int("bytes"),
60
+ createdAt: timestamp("created_at").defaultNow(),
61
+ });
62
+ ```
63
+
64
+ ## Prisma (`schema.prisma`) — equivalent
65
+
66
+ ```prisma
67
+ model Session {
68
+ id String @id
69
+ agentName String?
70
+ browser String @default("brave")
71
+ originUrl String?
72
+ status String @default("running")
73
+ seed String?
74
+ createdAt DateTime @default(now())
75
+ finishedAt DateTime?
76
+ events Event[]
77
+ captchaResults CaptchaResult[]
78
+ assets Asset[]
79
+ }
80
+
81
+ model Event {
82
+ id Int @id @default(autoincrement())
83
+ session Session @relation(fields: [sessionId], references: [id], onDelete: Cascade)
84
+ sessionId String
85
+ t Float
86
+ type String
87
+ x Float?
88
+ y Float?
89
+ data String?
90
+ createdAt DateTime @default(now())
91
+ }
92
+
93
+ model CaptchaResult {
94
+ id Int @id @default(autoincrement())
95
+ session Session @relation(fields: [sessionId], references: [id], onDelete: Cascade)
96
+ sessionId String
97
+ kind String
98
+ sitekey String?
99
+ token String?
100
+ passed Boolean @default(false)
101
+ solver String?
102
+ evidenceUrl String?
103
+ createdAt DateTime @default(now())
104
+ }
105
+
106
+ model Asset {
107
+ id Int @id @default(autoincrement())
108
+ session Session @relation(fields: [sessionId], references: [id], onDelete: Cascade)
109
+ sessionId String
110
+ kind String
111
+ cloudinaryId String
112
+ url String
113
+ bytes Int
114
+ createdAt DateTime @default(now())
115
+ }
116
+ ```
117
+
118
+ ## Migrations
119
+ - Drizzle: `drizzle-kit generate` + `drizzle-kit migrate` (mysql) in the deploy.
120
+ - Prisma: `prisma migrate deploy` (mysql) as alt.
121
+ - The db is created in the deploy pipeline (vercel/netlify), not local sqlite.
@@ -0,0 +1,57 @@
1
+ # 10 Cloudinary Storage
2
+
3
+ ## Why cloudinary
4
+ The production site (`web/`) receives agent data via https. Heavy data (replay videos, screenshots, big json logs) is sent to cloudinary instead of the db, keeping the db light (only pointers/urls).
5
+
6
+ ## What goes to cloudinary
7
+ - Replay videos (`.mp4`/`.webm`) generated via `ffmpeg-static` from logs.
8
+ - Captcha challenge screenshots (before/after).
9
+ - Big json logs (long trajectories) as a complementary asset.
10
+ - Training assets (click masks, challenge images).
11
+
12
+ ## Flow
13
+
14
+ ```
15
+ agent/sandbox ──post /captcha/result──► backend (web/)
16
+
17
+ ├─ write metadata to db (drizzle/mysql2)
18
+ └─ upload file ──► cloudinary
19
+
20
+ └─ save asset { url, cloudinaryId } in db
21
+ ```
22
+
23
+ ## Config (`web/storage.js`)
24
+
25
+ ```js
26
+ import { v2 as cloudinary } from "cloudinary";
27
+
28
+ cloudinary.config({
29
+ cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
30
+ api_key: process.env.CLOUDINARY_API_KEY,
31
+ api_secret: process.env.CLOUDINARY_API_SECRET,
32
+ });
33
+
34
+ /**
35
+ * Uploads a local file to cloudinary under uka/<folder>.
36
+ * @param {string} filePath local path
37
+ * @param {string} folder sub folder
38
+ * @returns {Promise<object>} upload result with url and public id
39
+ */
40
+ export async function uploadAsset(filePath, folder) {
41
+ return cloudinary.uploader.upload(filePath, {
42
+ resource_type: "auto",
43
+ folder: `uka/${folder}`,
44
+ });
45
+ }
46
+ ```
47
+
48
+ ## Variables
49
+ - `CLOUDINARY_CLOUD_NAME`
50
+ - `CLOUDINARY_API_KEY`
51
+ - `CLOUDINARY_API_SECRET`
52
+ - `CLOUDINARY_URL` (condensed form, optional)
53
+
54
+ ## Good practices
55
+ - Use `folder: "uka/<sessionId>"` for organization.
56
+ - Save only the `url` + `cloudinaryId` in the db (see `09-database-schema.md`, `assets` table).
57
+ - Compress videos before upload to respect plan limits.
@@ -0,0 +1,72 @@
1
+ # 11 Movement Logs Json
2
+
3
+ ## Location
4
+ - Directory: `docs/logs/`
5
+ - File: `<sessionId>.json` (example: `docs/logs/examplesession.json`).
6
+
7
+ ## File structure
8
+
9
+ ```json
10
+ {
11
+ "version": 1,
12
+ "session": {
13
+ "id": "sess_01J9XEXAMPLE0001",
14
+ "agentName": "UKA-capture",
15
+ "browser": "brave",
16
+ "originUrl": "https://accounts.hcaptcha.com/demo",
17
+ "seed": "session-42",
18
+ "personality": "careful",
19
+ "viewport": { "width": 1280, "height": 800 },
20
+ "startedAt": "2026-07-16T12:00:00.000Z",
21
+ "finishedAt": "2026-07-16T12:03:21.000Z",
22
+ "status": "passed"
23
+ },
24
+ "events": [
25
+ { "t": 0.0, "type": "move", "x": 640, "y": 60, "tx": 640, "ty": 60 },
26
+ { "t": 12.4, "type": "move", "x": 700, "y": 420, "tx": 700, "ty": 420 },
27
+ { "t": 220.1, "type": "click", "x": 711, "y": 433, "button": "left", "target": "#checkbox" },
28
+ { "t": 540.0, "type": "scroll", "dx": 0, "dy": -120, "angle": 0 },
29
+ { "t": 900.5, "type": "drag", "x0": 100, "y0": 100, "x1": 300, "y1": 300 },
30
+ { "t": 1200.0, "type": "key", "key": "Enter", "target": "#submit" }
31
+ ],
32
+ "captcha": {
33
+ "kind": "hcaptcha",
34
+ "sitekey": "a9b5fb07-92ff-493f-86fe-352a2803b3df",
35
+ "passed": true,
36
+ "solver": "vlm",
37
+ "evidenceUrl": "https://res.cloudinary.com/uka/sess_01J9XEXAMPLE0001/hcaptcha.png"
38
+ },
39
+ "metrics": {
40
+ "eventCount": 1284,
41
+ "durationMs": 201000,
42
+ "avgMouseSpeed": 2.3,
43
+ "clickCount": 7
44
+ }
45
+ }
46
+ ```
47
+
48
+ ## Event fields (`events[]`)
49
+
50
+ | Field | Type | Description |
51
+ |-------|------|-------------|
52
+ | `t` | number | relative time in ms since start |
53
+ | `type` | string | `move` \| `click` \| `drag` \| `scroll` \| `key` |
54
+ | `x`,`y` | number | viewport coordinates (end of action) |
55
+ | `tx`,`ty` | number | target coordinates (element) when applicable |
56
+ | `button` | string | `left` \| `right` (click) |
57
+ | `x0,y0,x1,y1` | number | start/end points (drag) |
58
+ | `dx,dy` | number | delta (scroll) |
59
+ | `angle` | number | rotation/scroll angle |
60
+ | `key` | string | key (key event) |
61
+ | `target` | string | selector/role/target (optional) |
62
+
63
+ ## Conventions
64
+ - Coordinates in css pixels of the viewport.
65
+ - `t` in ms relative (deterministic by `seed`).
66
+ - Long move trajectories may be compacted (collapse runs) before save.
67
+ - Every log is reproducible from `seed` + `events`.
68
+
69
+ ## Usage
70
+ - `replay.js` rereads the json and redispatches events in brave (configurable speed).
71
+ - `d3` plots the mouse trail from `events[]` for audit/debug.
72
+ - Evidence (screenshot/mp4) referenced via `captcha.evidenceUrl` (cloudinary).
@@ -0,0 +1,79 @@
1
+ # 12 research atlas agent browser
2
+
3
+ date: 2026-07-16
4
+ status: research-complete
5
+ classification: computer use / agent browser / captcha bypass / sandbox
6
+
7
+ ## summary
8
+
9
+ atlas is a real browser with 30 modes whose primary job is to bypass hcaptcha so the uka agent can act, and to serve the agent and the sandbox. it ships with our own database on vercel and netlify. this document surveys public repositories with the same classification so we can mirror proven patterns and avoid dead ends.
10
+
11
+ ## axis used for comparison
12
+
13
+ - computer use / agent browser
14
+ - stealth (fingerprint, tls, behavior)
15
+ - captcha bypass (hcaptcha / recaptcha / turnstile)
16
+ - sandbox (microvm, isolation)
17
+ - own backend + database
18
+
19
+ ## a agent browsers and computer use
20
+
21
+ | repository | stars | language | stealth | captcha | notes |
22
+ |---|---|---|---|---|---|
23
+ | vercel-labs/agent-browser | ~38k | rust | plugin (stealth) | plugin (captcha) | fast native cli, mcp, serverless vercel sandbox, plugin system for captcha/stealth/vault |
24
+ | jcpsimmons/agent-browser | low | rust | on by default | - | fork of vercel-labs/agent-browser with stealth enabled by default |
25
+ | AshtonVaughan/agentbrowser | low | typescript | webgl/canvas/audio noise | 2captcha / hcaptcha / turnstile | visible svg cursor via cdp, traces to jsonl, audit trail, verify pipeline |
26
+ | gokul2507/Agent-Browser | low | typescript | - | - | dual engine lightpanda + chromium, 60 mcp tools, rest api, js/python sdks, web dashboard |
27
+ | ykshah1309/stealth-agent-browser-mcp | low | typescript | rebrowser-playwright | capsolver / 2captcha | stealth chromium mcp, hybrid aom + set-of-mark vision, human mouse (ghost-cursor) |
28
+ | AVANT-ICONIC/Talox | low | typescript | 19-layer js stack | challenge detect | local browser runtime, humanmouse (bezier + fitts), single json contract, overlay |
29
+ | clark-labs-inc/clark-browser | ~116 | python / c++ | patched chromium source | - | stealth chromium built from ungoogled-chromium fork, fingerprint fixes in browser source |
30
+ | shayuc137/agentcloak | low | typescript | cloakbrowser 57 patches | - | stealth browser toolkit, cli + mcp, remotebridge to real chrome |
31
+ | runagent-dev/runagent-superbrowser | low | typescript / python | persistent profiles | 2captcha / nopecha / human | browser your agent won't get blocked on, human handoff via live-view url |
32
+ | VirixLabs/humanbrowser | low | typescript | patchright / camoufox | included (many types) | cloud chromium, residential proxy pool, a2a 1.0 + mcp endpoints |
33
+ | browser-use/browser-use | high | python | cloud option | cloud option | leading open-source browser agent, 1000+ integrations, cloud for stealth |
34
+ | yoloshii/better-browser-use | low | python | tiered (cloak / patchright / camoufox) | capsolver / 2captcha | aria snapshots, 3 stealth tiers, humanization, webmcp |
35
+ | andyless/human-browser-use | low | python | stealth js | - | human behavior extension for browser-use (bezier mouse, lognormal typing) |
36
+ | Huzy85/fantoma | low | python | camoufox / patchright | detect + solve | accessibility-api browser agent, zero pointer telemetry, 25 real sites |
37
+ | cyberranger93/mcp-browser | low | typescript | fingerprint spoof | - | stealth browser mcp, origin allowlist, network trace |
38
+
39
+ ## b captcha bypass and hcaptcha solvers
40
+
41
+ | repository | language | captcha types | method |
42
+ |---|---|---|---|
43
+ | QIN2DIM/hcaptcha-challenger | python | hcaptcha (binary/area/drag) | multimodal llm, onnx models (resnet / yolo v8 / vit) |
44
+ | interfluve-wav/auto-captcha-solver | python | hcaptcha, recaptcha v2/v3, turnstile | nopecha token api, mcp server, cli |
45
+ | multibot-solver/hcaptcha-click-solver | python | hcaptcha (checkbox/grid/canvas/drag) | multibot api classification + exact mouse path replay |
46
+ | ScremerMemer/hCaptcha-Solver | python | hcaptcha | camoufox hsw token + groq vision + multibot mouse generation |
47
+ | rishugren03/computer-agent | python | recaptcha v2 | patchright + deepseek/gemini vision, bezier mouse |
48
+ | clawdbrunner/captcha-solver | python | 30+ types | cloakbrowser prevention + 2captcha/capsolver fallback |
49
+
50
+ ## c sandbox for ai (microvm isolation)
51
+
52
+ | repository | tech | notes |
53
+ |---|---|---|
54
+ | vercel/sandbox | firecracker microvm | ephemeral compute primitive, @vercel/sandbox sdk, credential brokering |
55
+ | vercel-labs/ai-sdk-computer-use | vercel sandbox + next.js | claude computer use inside sandbox with chrome, novnc streaming |
56
+ | vercel-labs/sandcastle | vercel sandbox | web linux desktop, neon postgres + drizzle orm, @vercel/sandbox |
57
+ | firecracker-microvm/firecracker | firecracker (rust) | microvm tech behind vercel sandbox and aws lambda |
58
+ | mattbucci/agent-sandbox | firecracker (kvm) | one vm per agent, xfce desktop + chromium, per-vm domain filtering, novnc |
59
+ | vercel-labs/agent-browser | vercel sandbox | agent-browser + chrome inside ephemeral microvm, no external server |
60
+
61
+ ## how atlas differentiates
62
+
63
+ atlas sits at the intersection of the three groups above with two rare-together differentiators:
64
+
65
+ 1. real browser across 30 modes. most competitors are a cli (vercel-labs/agent-browser), a python library (browser-use), or a patched chromium (clark-browser). atlas is a library that works with/without across computer, browser, cli, binary, headless and the other modes in 01-architecture.
66
+ 2. own backend + database. unlike cloud-only tools (humanbrowser, browser-use cloud), uka deploys its own site to vercel/netlify with drizzle + mysql2 + prisma and cloudinary, and talks to it over https post/get. movement logs and captcha evidence persist in our db, not a third party.
67
+
68
+ captcha bypass in atlas follows the proven pattern from the survey: stealth (fingerprint + behavior) as primary layer, hcaptcha solving (vlm or token api) as fallback for the ~1-5 percent of sessions that still get flagged, exactly the p1/p2/p3 layering used by stealth-agent-browser-mcp.
69
+
70
+ ## positioning of uka / atlas
71
+
72
+ atlas sits at the intersection of the three groups above with two rare-together differentiators:
73
+
74
+ 1. real browser across 30 modes. most competitors are a cli (vercel-labs/agent-browser), a python library (browser-use), or a patched chromium (clark-browser). atlas is a library that works with/without across computer, browser, cli, binary, headless and the other modes in 01-architecture.
75
+ 2. own backend + database. unlike cloud-only tools (humanbrowser, browser-use cloud), uka deploys its own site to vercel/netlify with drizzle + mysql2 + prisma and cloudinary, and talks to it over https post/get. movement logs and captcha evidence persist in our db, not a third party.
76
+
77
+ ## references
78
+
79
+ github repositories listed above, accessed 2026-07-16. prior research in 02-research-computer-use.md, 03-research-captcha-bypass.md, 04-research-sandbox-ai.md.