@wenathlan/devthink 2.0.15 → 2.0.20

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 (444) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/{dist/bridge.d.ts → bridge.d.ts} +1 -1
  3. package/bridge.d.ts.map +1 -0
  4. package/bridge.js +1877 -0
  5. package/bun.d.ts.map +1 -0
  6. package/bun.js +52329 -0
  7. package/caps/background.json +712 -0
  8. package/caps/cli.json +360 -0
  9. package/caps/library.json +3611 -0
  10. package/caps/mcp.json +126 -0
  11. package/caps/pagebridge.json +377 -0
  12. package/caps/popup.json +51 -0
  13. package/caps/sidepanel.json +522 -0
  14. package/checksums.txt +142 -0
  15. package/cli.d.ts.map +1 -0
  16. package/{dist/cli.js → cli.js} +2 -2
  17. package/companion.d.ts.map +1 -0
  18. package/companion.js +389 -0
  19. package/crossbrowser.d.ts.map +1 -0
  20. package/crossbrowser.js +1191 -0
  21. package/dashdone.d.ts.map +1 -0
  22. package/dashdone.js +368 -0
  23. package/deno.d.ts.map +1 -0
  24. package/deno.js +52325 -0
  25. package/devthink.umd.js +52346 -0
  26. package/fixtures/bun.ts +7 -0
  27. package/fixtures/cjs.js +6 -0
  28. package/fixtures/deno.ts +6 -0
  29. package/fixtures/example-org-pagestate.json +22 -0
  30. package/fixtures/importers/automa-workflow.json +18 -0
  31. package/fixtures/importers/selenium-side.json +20 -0
  32. package/fixtures/importers/tabular-plan.csv +7 -0
  33. package/fixtures/importers/uivision-macro.json +10 -0
  34. package/fixtures/importers/v1-plan.json +13 -0
  35. package/fixtures/mcp-client.mjs +14 -0
  36. package/fixtures/pages/checkout.html +192 -0
  37. package/fixtures/pages/dashboard.html +110 -0
  38. package/fixtures/pages/feed.html +113 -0
  39. package/fixtures/pages/product-grid.html +150 -0
  40. package/fixtures/plans/form-inventory-plan.json +11 -0
  41. package/fixtures/plans/release-notes-plan.json +11 -0
  42. package/fixtures/recipes/agentscompete.json +11 -0
  43. package/fixtures/recipes/agentsforms.json +11 -0
  44. package/fixtures/recipes/agentsmonitor.json +11 -0
  45. package/fixtures/recipes/agentsreview.json +29 -0
  46. package/fixtures/recipes/agentswarm.json +11 -0
  47. package/fixtures/recipes/fillcalendar.json +12 -0
  48. package/fixtures/recipes/fillcheckout.json +13 -0
  49. package/fixtures/recipes/filldependentdropdowns.json +12 -0
  50. package/fixtures/recipes/fillfromcsv.json +13 -0
  51. package/fixtures/recipes/fillloginform.json +12 -0
  52. package/fixtures/recipes/fillmultistepwizard.json +13 -0
  53. package/fixtures/recipes/fillregistration.json +12 -0
  54. package/fixtures/recipes/fillsearchfilters.json +12 -0
  55. package/fixtures/recipes/filltypeahead.json +11 -0
  56. package/fixtures/recipes/monitoralerts.json +12 -0
  57. package/fixtures/recipes/monitoravailability.json +11 -0
  58. package/fixtures/recipes/monitornetworkquiet.json +12 -0
  59. package/fixtures/recipes/monitorpagechanges.json +11 -0
  60. package/fixtures/recipes/monitorpricechange.json +11 -0
  61. package/fixtures/recipes/monitorschedule.json +12 -0
  62. package/fixtures/recipes/scrapedynamicprices.json +13 -0
  63. package/fixtures/recipes/scrapeimagegallery.json +12 -0
  64. package/fixtures/recipes/scrapeinfinitefeed.json +13 -0
  65. package/fixtures/recipes/scrapenestedlists.json +12 -0
  66. package/fixtures/recipes/scrapeproductgrid.json +12 -0
  67. package/fixtures/recipes/scrapereviews.json +12 -0
  68. package/fixtures/recipes/scrapesearchresults.json +12 -0
  69. package/fixtures/recipes/scrapetablepagination.json +12 -0
  70. package/fixtures/recipes/testaccessibility.json +34 -0
  71. package/fixtures/recipes/testconsoleerrors.json +12 -0
  72. package/fixtures/recipes/testdeeplinks.json +12 -0
  73. package/fixtures/recipes/testformvalidation.json +13 -0
  74. package/fixtures/recipes/testlayoutshift.json +12 -0
  75. package/fixtures/recipes/testlinkcheck.json +12 -0
  76. package/fixtures/recipes/testloadtiming.json +12 -0
  77. package/fixtures/recipes/testvisualdiff.json +12 -0
  78. package/fixtures/workflows/changelog-digest-workflow.json +13 -0
  79. package/fixtures/workflows/form-survey-workflow.json +13 -0
  80. package/gallery.json +706 -0
  81. package/hardening.d.ts.map +1 -0
  82. package/hardening.js +188 -0
  83. package/headless.d.ts.map +1 -0
  84. package/headless.js +11522 -0
  85. package/http.d.ts.map +1 -0
  86. package/http.js +2165 -0
  87. package/index.cjs +54682 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +52310 -0
  90. package/index.neutral.js +46343 -0
  91. package/{web/manifest.json → manifest.json} +1 -1
  92. package/mcp.d.ts.map +1 -0
  93. package/mcp.js +20515 -0
  94. package/memory.d.ts.map +1 -0
  95. package/{memory.ts → memory.js} +2310 -3834
  96. package/nativehost.template.json +10 -0
  97. package/node.cjs +54686 -0
  98. package/node.d.ts.map +1 -0
  99. package/pack.d.ts.map +1 -0
  100. package/pack.js +805 -0
  101. package/package.json +83 -176
  102. package/policy.d.ts.map +1 -0
  103. package/{policy.ts → policy.js} +4679 -5073
  104. package/progress.d.ts.map +1 -0
  105. package/progress.js +645 -0
  106. package/protocol.d.ts.map +1 -0
  107. package/protocol.js +8334 -0
  108. package/schemas/audit.schema.json +226 -0
  109. package/schemas/capability.schema.json +113 -0
  110. package/schemas/envelope.schema.json +162 -0
  111. package/schemas/memory.schema.json +51 -0
  112. package/schemas/observation.schema.json +113 -0
  113. package/schemas/plan.schema.json +208 -0
  114. package/schemas/progress.schema.json +126 -0
  115. package/schemas/proposal.schema.json +68 -0
  116. package/schemas/session.schema.json +82 -0
  117. package/schemas/tool.schema.json +94 -0
  118. package/server.d.ts.map +1 -0
  119. package/server.js +28877 -0
  120. package/umd-example.html +18 -0
  121. package/umd.d.ts.map +1 -0
  122. package/accounts.ts +0 -2087
  123. package/agent.ts +0 -2331
  124. package/antigravity.ts +0 -2139
  125. package/apifreeze.ts +0 -4146
  126. package/auth.ts +0 -642
  127. package/background.ts +0 -16837
  128. package/bridge.ts +0 -2080
  129. package/build.ts +0 -54
  130. package/bun.ts +0 -26
  131. package/capture.ts +0 -1614
  132. package/checksecrets.ts +0 -72
  133. package/cjs.ts +0 -9
  134. package/cli.ts +0 -3500
  135. package/commands.ts +0 -1101
  136. package/companion.ts +0 -450
  137. package/compatibility.ts +0 -37
  138. package/config.ts +0 -3137
  139. package/constants.ts +0 -943
  140. package/core.ts +0 -1473
  141. package/crossbrowser.ts +0 -1359
  142. package/dashdone.ts +0 -605
  143. package/data.ts +0 -943
  144. package/database.ts +0 -133
  145. package/debug.ts +0 -850
  146. package/deno.ts +0 -27
  147. package/devthink.ts +0 -707
  148. package/dist/accounts.d.ts +0 -409
  149. package/dist/agent.d.ts +0 -837
  150. package/dist/antigravity.d.ts +0 -380
  151. package/dist/apifreeze.d.ts +0 -113
  152. package/dist/auth.d.ts +0 -224
  153. package/dist/capture.d.ts +0 -595
  154. package/dist/cjs.d.ts +0 -6
  155. package/dist/commands.d.ts +0 -310
  156. package/dist/compatibility.d.ts +0 -17
  157. package/dist/config.d.ts +0 -1853
  158. package/dist/constants.d.ts +0 -637
  159. package/dist/core.d.ts +0 -361
  160. package/dist/data.d.ts +0 -330
  161. package/dist/database.d.ts +0 -24
  162. package/dist/debug.d.ts +0 -270
  163. package/dist/engine.d.ts +0 -74
  164. package/dist/environments.d.ts +0 -244
  165. package/dist/evidence.d.ts +0 -277
  166. package/dist/export.d.ts +0 -311
  167. package/dist/fingerprint.d.ts +0 -594
  168. package/dist/flow.d.ts +0 -300
  169. package/dist/gates.d.ts +0 -103
  170. package/dist/identity.d.ts +0 -51
  171. package/dist/ids.d.ts +0 -7
  172. package/dist/llm.d.ts +0 -652
  173. package/dist/models.d.ts +0 -1807
  174. package/dist/net.d.ts +0 -325
  175. package/dist/neutral.d.ts +0 -41
  176. package/dist/oauth.d.ts +0 -703
  177. package/dist/page.d.ts +0 -1166
  178. package/dist/perf.d.ts +0 -481
  179. package/dist/plan.d.ts +0 -134
  180. package/dist/project.d.ts +0 -395
  181. package/dist/providers.d.ts +0 -37
  182. package/dist/quota.d.ts +0 -453
  183. package/dist/recovery.d.ts +0 -621
  184. package/dist/request.d.ts +0 -1492
  185. package/dist/run.d.ts +0 -779
  186. package/dist/runtime.d.ts +0 -212
  187. package/dist/search.d.ts +0 -375
  188. package/dist/security.d.ts +0 -534
  189. package/dist/serve.d.ts +0 -136
  190. package/dist/session.d.ts +0 -296
  191. package/dist/storage.d.ts +0 -53
  192. package/dist/streaming.d.ts +0 -1119
  193. package/dist/swarm.d.ts +0 -328
  194. package/dist/tools.d.ts +0 -170
  195. package/dist/types.d.ts +0 -8357
  196. package/dist/utils.d.ts +0 -82
  197. package/dist/version.d.ts +0 -7
  198. package/dist/versionregistry.d.ts +0 -406
  199. package/dist/views.d.ts +0 -579
  200. package/dist/workbenchsession.d.ts +0 -69
  201. package/dist/workflow.d.ts +0 -649
  202. package/docs/readme.md +0 -92
  203. package/docs/schemas/antigravity.json +0 -192
  204. package/engine.ts +0 -1524
  205. package/environments.ts +0 -1005
  206. package/evidence.ts +0 -643
  207. package/export.ts +0 -889
  208. package/fingerprint.ts +0 -1458
  209. package/flow.ts +0 -1190
  210. package/gates.ts +0 -307
  211. package/gateway.ts +0 -34
  212. package/hardening.ts +0 -191
  213. package/headless.ts +0 -369
  214. package/http.ts +0 -2110
  215. package/identity.ts +0 -246
  216. package/ids.ts +0 -26
  217. package/index.ts +0 -369
  218. package/llm.ts +0 -2682
  219. package/mcp.ts +0 -1835
  220. package/models.ts +0 -3805
  221. package/modes.ts +0 -43
  222. package/net.ts +0 -1214
  223. package/neutral.ts +0 -362
  224. package/node.ts +0 -26
  225. package/oauth.ts +0 -2216
  226. package/offscreen.ts +0 -170
  227. package/pack.ts +0 -956
  228. package/page.ts +0 -7824
  229. package/pagebridge.ts +0 -1116
  230. package/perf.ts +0 -957
  231. package/plan.ts +0 -672
  232. package/plugin.ts +0 -76
  233. package/prisma.config.ts +0 -27
  234. package/progress.ts +0 -1308
  235. package/project.ts +0 -1291
  236. package/protocol.ts +0 -4187
  237. package/providers.ts +0 -246
  238. package/quota.ts +0 -1887
  239. package/recovery.ts +0 -2433
  240. package/request.ts +0 -4482
  241. package/run.ts +0 -2135
  242. package/runtime.ts +0 -526
  243. package/search.ts +0 -1760
  244. package/security.ts +0 -1673
  245. package/serve.ts +0 -419
  246. package/server.ts +0 -5538
  247. package/session.ts +0 -1162
  248. package/storage.ts +0 -182
  249. package/streaming.ts +0 -4101
  250. package/swarm.ts +0 -884
  251. package/sync.ts +0 -56
  252. package/tests/agentcert.test.ts +0 -128
  253. package/tests/agentfleet.test.ts +0 -214
  254. package/tests/agentreview.test.ts +0 -241
  255. package/tests/agentstream.test.ts +0 -335
  256. package/tests/agentwork.test.ts +0 -356
  257. package/tests/apifreeze.test.ts +0 -290
  258. package/tests/apimap.test.ts +0 -112
  259. package/tests/approvalgate.test.ts +0 -175
  260. package/tests/artifactmanifest.test.ts +0 -204
  261. package/tests/attentionfeed.test.ts +0 -163
  262. package/tests/backgroundruns.test.ts +0 -100
  263. package/tests/batchscheduling.test.ts +0 -131
  264. package/tests/blackboard.test.ts +0 -238
  265. package/tests/bridge.test.ts +0 -1088
  266. package/tests/browsercoverage.test.ts +0 -134
  267. package/tests/browserpolyfills.test.ts +0 -124
  268. package/tests/build.mjs +0 -1260
  269. package/tests/clientauth.test.ts +0 -223
  270. package/tests/clitools.test.ts +0 -578
  271. package/tests/confirmgates.test.ts +0 -190
  272. package/tests/containerpack.test.ts +0 -143
  273. package/tests/controlflow.test.ts +0 -2120
  274. package/tests/coordination.test.ts +0 -345
  275. package/tests/copyscreen.test.ts +0 -139
  276. package/tests/core.test.ts +0 -417
  277. package/tests/costcert.test.ts +0 -95
  278. package/tests/crossbrowser.test.ts +0 -115
  279. package/tests/cspaudit.test.ts +0 -79
  280. package/tests/dashdone.test.ts +0 -615
  281. package/tests/datagrid.test.ts +0 -137
  282. package/tests/doccheck.test.ts +0 -107
  283. package/tests/dombatch.test.ts +0 -109
  284. package/tests/emulation.test.ts +0 -282
  285. package/tests/environments.test.ts +0 -259
  286. package/tests/evidenceviews.test.ts +0 -88
  287. package/tests/exporttools.test.ts +0 -185
  288. package/tests/firefoxprep.test.ts +0 -134
  289. package/tests/flowlibrary.test.ts +0 -242
  290. package/tests/flowrun.test.ts +0 -303
  291. package/tests/forensics.test.ts +0 -439
  292. package/tests/gateway.test.ts +0 -939
  293. package/tests/headlesslib.test.ts +0 -171
  294. package/tests/httpstream.test.ts +0 -277
  295. package/tests/immutablelog.test.ts +0 -157
  296. package/tests/inboundguard.test.ts +0 -177
  297. package/tests/lazyload.test.ts +0 -72
  298. package/tests/librarymodes.test.ts +0 -623
  299. package/tests/llm.test.ts +0 -696
  300. package/tests/manifest.test.ts +0 -226
  301. package/tests/maskinputs.test.ts +0 -150
  302. package/tests/matrixverify.test.ts +0 -111
  303. package/tests/mavenpack.test.ts +0 -75
  304. package/tests/mcpserver.test.ts +0 -704
  305. package/tests/memory.test.ts +0 -4155
  306. package/tests/memorycare.test.ts +0 -230
  307. package/tests/migrateplan.test.ts +0 -349
  308. package/tests/minimization.test.ts +0 -414
  309. package/tests/modelroute.test.ts +0 -112
  310. package/tests/multiagent.test.ts +0 -440
  311. package/tests/nativebridge.test.ts +0 -807
  312. package/tests/navigation.test.ts +0 -284
  313. package/tests/nugetpack.test.ts +0 -83
  314. package/tests/orchestration.test.ts +0 -449
  315. package/tests/originpolicy.test.ts +0 -405
  316. package/tests/outputcompare.test.ts +0 -97
  317. package/tests/package.test.ts +0 -91
  318. package/tests/pagebridge.test.ts +0 -5909
  319. package/tests/pentest.test.ts +0 -75
  320. package/tests/perfrecords.test.ts +0 -257
  321. package/tests/permdiff.test.ts +0 -85
  322. package/tests/phishguard.test.ts +0 -128
  323. package/tests/pickerviews.test.ts +0 -155
  324. package/tests/pipelines.test.ts +0 -381
  325. package/tests/planlint.test.ts +0 -240
  326. package/tests/planreview.test.ts +0 -383
  327. package/tests/platformtargets.test.ts +0 -56
  328. package/tests/policy.test.ts +0 -8284
  329. package/tests/portability.test.ts +0 -96
  330. package/tests/progress.test.ts +0 -1036
  331. package/tests/promptlibrary.test.ts +0 -116
  332. package/tests/protocol.test.ts +0 -4793
  333. package/tests/publishingpipeline.test.ts +0 -314
  334. package/tests/quickactions.test.ts +0 -164
  335. package/tests/readiness.test.ts +0 -78
  336. package/tests/recipes.test.ts +0 -163
  337. package/tests/redactshots.test.ts +0 -216
  338. package/tests/registernvidiakeys.ts +0 -51
  339. package/tests/relayserve.test.ts +0 -304
  340. package/tests/releasenotes.test.ts +0 -276
  341. package/tests/resilience.test.ts +0 -467
  342. package/tests/resourceaware.test.ts +0 -187
  343. package/tests/runbudget.test.ts +0 -125
  344. package/tests/runhistory.test.ts +0 -299
  345. package/tests/runreplay.test.ts +0 -113
  346. package/tests/runresume.test.ts +0 -184
  347. package/tests/runstate.test.ts +0 -288
  348. package/tests/runtimeadapters.test.ts +0 -251
  349. package/tests/safariskeleton.test.ts +0 -115
  350. package/tests/sandboxframe.test.ts +0 -196
  351. package/tests/sbom.test.ts +0 -105
  352. package/tests/secretvault.test.ts +0 -188
  353. package/tests/selcache.test.ts +0 -111
  354. package/tests/sessioninterface.test.ts +0 -791
  355. package/tests/sessions.test.ts +0 -591
  356. package/tests/siteprefs.test.ts +0 -228
  357. package/tests/snapshotdelta.test.ts +0 -165
  358. package/tests/statusviews.test.ts +0 -237
  359. package/tests/stepmeter.test.ts +0 -200
  360. package/tests/streamparse.test.ts +0 -163
  361. package/tests/stylepruning.test.ts +0 -90
  362. package/tests/surfaces.test.ts +0 -282
  363. package/tests/sweep.test.ts +0 -78
  364. package/tests/syncbridge.test.ts +0 -164
  365. package/tests/taskqueue.test.ts +0 -206
  366. package/tests/toolcalls.test.ts +0 -336
  367. package/tests/toolcatalog.test.ts +0 -201
  368. package/tests/torture-agent.test.ts +0 -706
  369. package/tests/torture-auth.test.ts +0 -461
  370. package/tests/torture-commands.test.ts +0 -895
  371. package/tests/torture-data.test.ts +0 -923
  372. package/tests/torture-environments.test.ts +0 -285
  373. package/tests/torture-export.test.ts +0 -263
  374. package/tests/torture-http.test.ts +0 -1379
  375. package/tests/torture-llm.test.ts +0 -808
  376. package/tests/torture-memory.test.ts +0 -1084
  377. package/tests/torture-plan.test.ts +0 -829
  378. package/tests/torture-run.test.ts +0 -626
  379. package/tests/torture-session.test.ts +0 -928
  380. package/tests/torture-swarm.test.ts +0 -1245
  381. package/tests/torture-tools.test.ts +0 -964
  382. package/tests/torture-workflow.test.ts +0 -2354
  383. package/tests/tourviews.test.ts +0 -52
  384. package/tests/transparency.test.ts +0 -147
  385. package/tests/trigger.test.ts +0 -941
  386. package/tests/v1sunset.test.ts +0 -428
  387. package/tests/virtlist.test.ts +0 -94
  388. package/tests/vision.test.ts +0 -540
  389. package/tests/vsixpack.test.ts +0 -145
  390. package/tests/webapi.test.ts +0 -523
  391. package/tests/workflow.test.ts +0 -1785
  392. package/tests/workfloweditor.test.ts +0 -759
  393. package/tests/xpipack.test.ts +0 -128
  394. package/tools.ts +0 -734
  395. package/types.ts +0 -9908
  396. package/umd.ts +0 -9
  397. package/utils.ts +0 -249
  398. package/version.ts +0 -8
  399. package/versionregistry.ts +0 -1310
  400. package/views.ts +0 -2153
  401. package/vitest.config.ts +0 -12
  402. package/web/App.tsx +0 -78
  403. package/web/README.md +0 -47
  404. package/web/capacitor.config.ts +0 -46
  405. package/web/const.ts +0 -19
  406. package/web/control.shell.tsx +0 -66
  407. package/web/dashboardpage.ts +0 -554
  408. package/web/db.ts +0 -493
  409. package/web/design.html +0 -541
  410. package/web/gatewayview/Gateway.tsx +0 -345
  411. package/web/gatewayview/config.ts +0 -1042
  412. package/web/gatewayview/definition.ts +0 -174
  413. package/web/icons.ts +0 -15
  414. package/web/optionspage.ts +0 -691
  415. package/web/popup.ts +0 -1651
  416. package/web/schema.prisma +0 -176
  417. package/web/sidepanel.ts +0 -7941
  418. package/web/sitemanifest.json +0 -13
  419. package/web/terminal-ui.tsx +0 -622
  420. package/web/transparencypage.ts +0 -541
  421. package/web/vite.config.ts +0 -39
  422. package/web/workspace.ts +0 -23
  423. package/workbenchmemory.ts +0 -104
  424. package/workbenchsession.ts +0 -304
  425. package/workflow.ts +0 -4495
  426. /package/{dist/bun.d.ts → bun.d.ts} +0 -0
  427. /package/{dist/cli.d.ts → cli.d.ts} +0 -0
  428. /package/{dist/companion.d.ts → companion.d.ts} +0 -0
  429. /package/{dist/crossbrowser.d.ts → crossbrowser.d.ts} +0 -0
  430. /package/{dist/dashdone.d.ts → dashdone.d.ts} +0 -0
  431. /package/{dist/deno.d.ts → deno.d.ts} +0 -0
  432. /package/{dist/hardening.d.ts → hardening.d.ts} +0 -0
  433. /package/{dist/headless.d.ts → headless.d.ts} +0 -0
  434. /package/{dist/http.d.ts → http.d.ts} +0 -0
  435. /package/{dist/index.d.ts → index.d.ts} +0 -0
  436. /package/{dist/mcp.d.ts → mcp.d.ts} +0 -0
  437. /package/{dist/memory.d.ts → memory.d.ts} +0 -0
  438. /package/{dist/node.d.ts → node.d.ts} +0 -0
  439. /package/{dist/pack.d.ts → pack.d.ts} +0 -0
  440. /package/{dist/policy.d.ts → policy.d.ts} +0 -0
  441. /package/{dist/progress.d.ts → progress.d.ts} +0 -0
  442. /package/{dist/protocol.d.ts → protocol.d.ts} +0 -0
  443. /package/{dist/server.d.ts → server.d.ts} +0 -0
  444. /package/{dist/umd.d.ts → umd.d.ts} +0 -0
package/dist/capture.d.ts DELETED
@@ -1,595 +0,0 @@
1
- /**
2
- * The capture module of the 1.1.90 consolidation: every correlated variation of the media capture, vision and redaction logic interned in this one file, so the module family carries one surface without duplicate variations.
3
- * The correlation is the capture pipeline of a run: capture holds the base geometry (the capture options with their formats and export targets, the stitch tiling with seam blending and fixed header skip, the element crop with the viewport fallback, the region container steps, the contact sheet grid, the annotation plan and the capture naming rule with the before and after state pairing); media holds the media capture part two (the derived pdf composition with reviewed paper sizes and pagination break points, the recording records with their frame intervals and clean stops, the image filter matching with url deduplication, the lapse frame ordering, the conversion and thumbnail geometry and the raw media, asset and stream normalization); vision holds the teaching to see (the ocr recognition with its word boxes merged into lines and paragraphs, the region, pdf and frame ocr passes, the vision descriptions, the crop geometry that reuses the capture rectangle rules, the redaction masks, the grounding and the dom pairing beside every screenshot); and redactshots holds the capture masking (the sensitive regions derived from the field shapes the recognizer masks or drawn by the user, covering viewport, element and stitched captures alike so the stored bytes never carry them).
4
- * No paper size, fps, region count, retention, model choice or cache window is ever hardcoded anywhere in the family: every geometry and bound stays the user's or the reviewed step's choice, recognition payloads stay opaque reviewed text, and no capture path ever bypasses the review.
5
- */
6
- import type { captureexport, captureformat, capturenaming, captureoptions, regionrect, sheetlayout, shotpair, shotrecord, stitchplan } from "./types.js";
7
- /**
8
- * Media capture logics for the 1.1.40 family.
9
- * Every correlated rule for the capture options defaults, the stitch tiling and seam blending, the fixed header skip, the pixel ratio scaling, the element crop and viewport fallback, the region container steps, the contact sheet grid, the annotation plan, the capture naming rule and the before and after state pairing lives in this file.
10
- */
11
- /** Formats every capture kind may produce; the policy grammar refuses anything outside this set. */
12
- export declare const captureformats: captureformat[];
13
- /** Export targets a reviewed capture may route to; disk writes stay inside the reviewed download flow. */
14
- export declare const capturetargets: captureexport[];
15
- /** The capture kinds of the 1.1.40 family, listed among the available capabilities of every proposal request. */
16
- export declare const capturekinds: string[];
17
- /** Normalizes reviewed capture options with png, pixel ratio one and the memory export target as defaults. */
18
- export declare function captureoptionsof(value: unknown): captureoptions;
19
- /** Builds one shotrecord for a visible viewport capture with the reviewed geometry and byte size. */
20
- export declare function capturevisible(input: {
21
- runid: string;
22
- stepid: string;
23
- options: captureoptions;
24
- viewport: {
25
- width: number;
26
- height: number;
27
- };
28
- dataurl: string;
29
- at: number;
30
- id: string;
31
- name?: string;
32
- target?: string;
33
- }): shotrecord;
34
- /** Builds one shotrecord for a stitched full page capture from the tile plan geometry. */
35
- export declare function capturestitched(input: {
36
- runid: string;
37
- stepid: string;
38
- options: captureoptions;
39
- plan: stitchplan;
40
- dataurl: string;
41
- at: number;
42
- id: string;
43
- name?: string;
44
- }): shotrecord;
45
- /** Builds one shotrecord for an element capture cropped to the pixel ratio scaled element bounds. */
46
- export declare function captureelement(input: {
47
- runid: string;
48
- stepid: string;
49
- options: captureoptions;
50
- rect: regionrect;
51
- dataurl: string;
52
- at: number;
53
- id: string;
54
- name?: string;
55
- target?: string;
56
- }): shotrecord;
57
- /** Builds one shotrecord for a region capture of one reviewed rectangle or scrollable container. */
58
- export declare function captureregion(input: {
59
- runid: string;
60
- stepid: string;
61
- options: captureoptions;
62
- rect: regionrect;
63
- dataurl: string;
64
- at: number;
65
- id: string;
66
- name?: string;
67
- target?: string;
68
- }): shotrecord;
69
- /** Links a before and an after shot into one shotpair with the action context and the dom snapshot id of the same moment; a missing after shot skips the pair. */
70
- export declare function pairstates(before: shotrecord | undefined, after: shotrecord | undefined, action: {
71
- kind: string;
72
- target?: string;
73
- domsnapshotid?: string;
74
- }, at: number, id: string): {
75
- pair?: shotpair;
76
- skipped?: "before" | "after";
77
- reason: string;
78
- };
79
- /** Applies the capture policy around one action: beforeafter pairs wrap the action, every other mode leaves the pair to the manual capture kinds. */
80
- export declare function capturestates(input: {
81
- policy: string;
82
- before?: shotrecord | undefined;
83
- after?: shotrecord | undefined;
84
- actionkind: string;
85
- target?: string | undefined;
86
- domsnapshotid?: string | undefined;
87
- at: number;
88
- id: string;
89
- }): {
90
- pair?: shotpair;
91
- skipped?: "before" | "after";
92
- reason: string;
93
- };
94
- /** Builds the viewport tiling of one full page capture: a tile grid of scroll offsets with overlap rows; the last tile clamps to the page end. */
95
- export declare function buildstitchplan(input: {
96
- scrollwidth: number;
97
- scrollheight: number;
98
- viewportwidth: number;
99
- viewportheight: number;
100
- overlap?: number;
101
- }): stitchplan;
102
- /** Linear cross fade weights across one overlap band: the first row keeps the existing content, the last row adopts the new tile. */
103
- export declare function seamweights(overlap: number): number[];
104
- /** Blends one overlap band of equal length row arrays with the linear seam weights so tile seams never hard cut. */
105
- export declare function blendrows(upper: number[], lower: number[]): number[];
106
- /** True when a tile band repeats the first tile band, so the stitcher skips it and fixed headers never repeat across tiles. */
107
- export declare function fixedheadermatch(band: number[], firstband: number[]): boolean;
108
- /** Scales one css pixel rectangle by the reviewed pixel ratio; ratios of one, two and three scale every edge. */
109
- export declare function scaledrect(rect: regionrect, pixelratio: number): regionrect;
110
- /** Clamps one rectangle to the visible part of the viewport, never returning negative geometry. */
111
- export declare function croprect(rect: regionrect, viewport: {
112
- width: number;
113
- height: number;
114
- }): regionrect;
115
- /** True when an element rectangle crosses any viewport edge and the capture falls back to tiled capture. */
116
- export declare function crossesviewport(rect: regionrect, viewport: {
117
- width: number;
118
- height: number;
119
- }): boolean;
120
- /** Scroll tops that walk a scrollable container in reviewed steps; every step clamps so the last window ends at the container end. */
121
- export declare function regionsteps(containerheight: number, viewportstep: number): number[];
122
- /** One placed cell of a contact sheet grid with its caption stamped from the reviewed label style. */
123
- export interface sheetcell {
124
- index: number;
125
- column: number;
126
- row: number;
127
- selector: string;
128
- label: string;
129
- caption: string;
130
- }
131
- /** Places the element captures of a contact sheet on a labeled grid; the cell count stays a user choice with no code ceiling. */
132
- export declare function buildsheet(cells: Array<{
133
- selector: string;
134
- label?: string;
135
- }>, layout: sheetlayout): {
136
- columns: number;
137
- rows: number;
138
- cells: sheetcell[];
139
- };
140
- /** Builds one capture filename from the reviewed naming rule segments; the sequence counter keeps every name unique inside a run. */
141
- export declare function buildname(rule: capturenaming, parts: {
142
- run: string;
143
- step: string;
144
- sequence: number;
145
- kind: string;
146
- }, extension: string): string;
147
- /** One annotation plan for a captured image: the step number marker, the optional target outline and the footer with capture time and page url. */
148
- export interface annotationplan {
149
- marker: {
150
- x: number;
151
- y: number;
152
- number: number;
153
- };
154
- outline?: regionrect;
155
- footer: string;
156
- }
157
- /** Plans the annotations of one capture: the step number marker position, the expanded target rect outline and the footer text with capture time and url. */
158
- export declare function annotationplanof(input: {
159
- step: number;
160
- width: number;
161
- height: number;
162
- rect?: regionrect;
163
- url: string;
164
- at: number;
165
- }): annotationplan;
166
- import type { assetrecord, convertdirective, imagefilter, imagedescriptor, mediadatum, pdfoptions, recordingoptions, recordingrecord, streamrecord, thumbdirective } from "./types.js";
167
- /**
168
- * Media capture part two logics for the 1.1.41 family.
169
- * Every correlated rule for the derived pdf composition with reviewed paper sizes, margins and pagination break points, the recording records with their frame intervals and clean stops, the image filter matching with url deduplication and counter names, the lapse frame ordering, the conversion and thumbnail geometry and the raw media, asset and stream normalization lives in this file.
170
- */
171
- /** The media capture part two kinds, listed among the available capabilities of every proposal request. */
172
- export declare const mediakinds: string[];
173
- /** Normalizes reviewed pdf options with paper defaults; unknown fields stay ignored. */
174
- export declare function pdfoptionsof(value: unknown): pdfoptions;
175
- /** Resolves the pdf page size in points after the landscape swap. */
176
- export declare function pdfpagesize(options: pdfoptions): {
177
- width: number;
178
- height: number;
179
- };
180
- /** Wraps one text block into page lines for the reviewed geometry: word wrap at the average glyph width of the Helvetica body font. */
181
- export declare function pdftextlayout(text: string, options: pdfoptions): string[];
182
- /** Splits the scroll height into report page segments at reviewed break point offsets; absent break points walk the height in viewport steps. */
183
- export declare function pdfsegments(scrollheight: number, viewportheight: number, breaks: number[]): Array<{
184
- top: number;
185
- height: number;
186
- }>;
187
- /** Composes one derived pdf document from the page text blocks with the reviewed paper size, margins, scale and landscape orientation; the byte size is the latin one document length. */
188
- export declare function buildpdf(pages: string[], options: pdfoptions): {
189
- document: string;
190
- bytes: number;
191
- pages: number;
192
- pagewidth: number;
193
- pageheight: number;
194
- };
195
- /** Normalizes reviewed recording options with the tab scope as the default. */
196
- export declare function recordingoptionsof(value: unknown): recordingoptions;
197
- /** Opens one recording record of user activity with the reviewed options applied. */
198
- export declare function newrecording(input: {
199
- id: string;
200
- runid: string;
201
- stepid: string;
202
- tabid: number;
203
- kind: "screen" | "audio";
204
- options: recordingoptions;
205
- at: number;
206
- }): recordingrecord;
207
- /** Closes one recording cleanly at the given time and stamps the duration. */
208
- export declare function finishrecording(record: recordingrecord, endat: number): recordingrecord;
209
- /** Frame shoot interval in milliseconds of the reviewed fps; the fps itself carries no code ceiling. */
210
- export declare function frameinterval(fps: number): number;
211
- /** Normalizes a reviewed image filter; unknown fields stay ignored. */
212
- export declare function imagefilterof(value: unknown): imagefilter;
213
- /** True when one observed image passes the reviewed filter: minimum dimensions and the format list; absent bounds never refuse. */
214
- export declare function imagematches(image: imagedescriptor, filter: imagefilter): boolean;
215
- /** Deduplicates observed images by url before any download starts; the first observation of a url wins. */
216
- export declare function dedupeimages(images: imagedescriptor[]): imagedescriptor[];
217
- /** Stamps consistent image batch filenames from the reviewed naming rule with a per batch image counter. */
218
- export declare function imagenames(rule: capturenaming, run: string, step: string, count: number, extension: string): string[];
219
- /** Normalizes a reviewed lapse plan; an absent format keeps png. */
220
- export declare function lapseplanof(value: unknown): {
221
- interval: number;
222
- duration: number;
223
- format: captureformat;
224
- } | undefined;
225
- /** Ordered lapse frame timestamps starting at zero and stepping the reviewed interval inside the reviewed duration. */
226
- export declare function lapseframes(plan: {
227
- interval: number;
228
- duration: number;
229
- }): number[];
230
- /** Normalizes a reviewed conversion directive; an absent payload leaves the step without a directive. */
231
- export declare function convertdirectiveof(value: unknown): convertdirective | undefined;
232
- /** Normalizes a reviewed thumbnail directive; an absent payload leaves the step without a directive. */
233
- export declare function thumbdirectiveof(value: unknown): thumbdirective | undefined;
234
- /** Nine argument draw geometry of one thumbnail: cover crops to the square and fits inside, contain letterboxes the whole source. */
235
- export declare function thumbgeometry(source: {
236
- width: number;
237
- height: number;
238
- }, directive: thumbdirective): {
239
- sx: number;
240
- sy: number;
241
- sw: number;
242
- sh: number;
243
- dx: number;
244
- dy: number;
245
- dw: number;
246
- dh: number;
247
- width: number;
248
- height: number;
249
- };
250
- /** Normalizes raw embedded media element entries into mediadatum records with duration, dimensions, codecs and track lists. */
251
- export declare function mediaentries(raw: Array<Record<string, unknown>>): mediadatum[];
252
- /** Normalizes raw page asset entries into favicon or logo asset shapes with their byte sizes and declared sizes. */
253
- export declare function assetentries(raw: Array<Record<string, unknown>>): Array<{
254
- kind: assetrecord["kind"];
255
- url: string;
256
- bytes: number;
257
- sizes?: string;
258
- }>;
259
- /** Normalizes raw stream probe entries into stream summaries with track counts, labels, live states and track details. */
260
- export declare function streamsummaries(raw: Array<Record<string, unknown>>): Array<Omit<streamrecord, "id" | "runid" | "stepid" | "at">>;
261
- import type { framereference, groundingresult, ocrline, ocrregion, ocrresult, ocrword, redactionmask, screenshotpair, streamcursor, visioncacheentry, visiondescription } from "./types.js";
262
- /**
263
- * Vision and ocr logic of the 1.1.77 family.
264
- * Every correlated rule for teaching the agent to see lives in this one module: the imageocr recognition that reads the words with their boxes and confidences off a captured image and merges the word boxes into lines and paragraphs; the regionocr recognition of one reviewed ocrregion of a screenshot with its bounds clamped into the viewport and its word boxes offset to absolute coordinates; the pdfocr pass that rasterizes one scanned pdf page at a time through a rasterize seam with the streamcursor checkpointing after every page; the frameocr read that refuses a playing video, seeks a paused video to its reviewed position and captures the frame; the visionshot description that carries the reviewed prompt with the image to the configured vision model and returns a visiondescription with labeled regions; the cropshot geometry that crops a screenshot to element bounds scaled with device pixel ratio awareness; the redactshot masking that applies a redactionmask before any sharing, fills the masked regions and proposes masks for the common sensitive regions by field type; the groundshot grounding that scores candidate elements by text and geometry match and returns ranked selectors; the pairshot pairing that captures a dom snapshot beside every screenshot, aligns the pair by capture time and viewport size and answers queries by searching text in both image and dom; the ocrtext normalization into searchable text; the visioncost counting of the model calls per run for the costshare ledger; and the visioncache that stores recognition results by image hash so a repeated read serves without a model call.
265
- * The module extends the reviewed families instead of duplicating them: the crop and scale geometry composes the capture rectangle rules of the 1.1.40 family, the sensitive field shapes come from the maskinputs recognizer the redactshots family already uses, the streamcursor checkpoint grammar comes from the pipeline family of the 1.1.75 release, and the image hash rides the same bodyhashof shape identity the web api cache of the 1.1.76 family keys its entries with.
266
- * Every impure move stays behind an injected seam — the ocr read, the vision model send, the pdf rasterize, the video state read, the frame grab and the mask fill resolve through functions the executor wires — while every recognition result, description text and labeled region stays opaque reviewed text; no recognition payload enters any audit summary built from these results, and every retention, budget and model choice stays the user's with no code default — an absent value never hides a hardcoded ceiling, and no vision path ever bypasses a review.
267
- */
268
- /** Ocr read seam: one captured image with its optional region resolves to the recognized words with their boxes and confidences; the extension executor wires the configured vision model provider, tests wire plain fixtures. */
269
- export type ocrread = (image: string, region?: ocrregion) => Promise<ocrword[]>;
270
- /** The vision kinds of the 1.1.77 family, listed among the available capabilities of every proposal request. */
271
- export declare const visionkinds: string[];
272
- /** Vision model seam: one reviewed vision request with its image and prompt resolves to the description text and its labeled regions; the extension executor wires the configured model endpoint, tests wire plain fixtures. */
273
- export type visionsend = (request: {
274
- imageid: string;
275
- image: string;
276
- prompt: string;
277
- }) => Promise<{
278
- text: string;
279
- regions: Array<{
280
- label: string;
281
- box: ocrregion;
282
- }>;
283
- }>;
284
- /** Pdf rasterize seam: one stored pdf document with its one based page number resolves to the rasterized page image; the extension executor wires the renderer backend, tests wire plain fixtures. */
285
- export type pdfrasterize = (documentid: string, page: number) => Promise<string>;
286
- /** Video state seam: one video selector resolves to its paused flag with the playback position and duration in milliseconds; the executor wires the page bridge, tests wire plain fixtures. */
287
- export type videostateread = (selector: string) => Promise<{
288
- paused: boolean;
289
- positionms: number;
290
- durationms: number;
291
- }>;
292
- /** Frame grab seam: one video selector at one reviewed position resolves to the captured frame image with its size; the executor wires the page bridge capture, tests wire plain fixtures. */
293
- export type framegrab = (selector: string, positionms: number) => Promise<{
294
- image: string;
295
- width: number;
296
- height: number;
297
- }>;
298
- /** Mask fill seam: one image with the regions to cover resolves to the image with the opaque rectangles drawn; the executor wires the capture canvas, tests wire plain fixtures. */
299
- export type maskfill = (image: string, regions: ocrregion[]) => Promise<string>;
300
- /** Normalizes recognition output into searchable text: whitespace runs fold into single spaces, the ends trim, and the folded text feeds the pairshot queries and the observation vision block. */
301
- export declare function ocrtext(value: string): string;
302
- /**
303
- * Merges the recognized word boxes into lines: two words join one line when their boxes share more than half of the shorter box's height, the line text joins the words left to right, the line box covers its words and the line confidence reports the lowest word confidence so a shaky word drags its line down instead of hiding inside an average — pure geometry with no configurable bound.
304
- */
305
- export declare function mergelines(words: ocrword[]): ocrline[];
306
- /**
307
- * Merges the recognized lines into paragraphs: two consecutive lines join one paragraph while the vertical gap between them stays inside the shorter line's height, and the paragraph text joins its line texts with single spaces — pure geometry again, so the paragraph breaks answer the page's own spacing.
308
- */
309
- export declare function mergeparagraphs(lines: ocrline[]): string[];
310
- /**
311
- * Runs the recognition of one captured image through the ocr read seam: the seam returns the words with their boxes and confidences, the words merge into lines and paragraphs by their own geometry, and the result carries the full normalized text beside the word level evidence.
312
- */
313
- export declare function imageocr(input: {
314
- record: {
315
- runid: string;
316
- stepid: string;
317
- imageid: string;
318
- };
319
- image: string;
320
- read: ocrread;
321
- id?: string;
322
- now: number;
323
- }): Promise<ocrresult>;
324
- /**
325
- * Runs the recognition of one reviewed ocrregion of a screenshot: the region clamps into the viewport so a region drawn past the edges reads only the visible part, a region fully outside the surface refuses loudly instead of reading wrong pixels, the read rides the region through the ocr seam, and the recognized boxes offset by the region origin so every word box lands in absolute screenshot coordinates.
326
- */
327
- export declare function regionocr(input: {
328
- record: {
329
- runid: string;
330
- stepid: string;
331
- imageid: string;
332
- };
333
- image: string;
334
- region: ocrregion;
335
- viewport: {
336
- width: number;
337
- height: number;
338
- };
339
- read: ocrread;
340
- id?: string;
341
- now: number;
342
- }): Promise<ocrresult>;
343
- /**
344
- * Reads one scanned pdf one page at a time through the rasterize and ocr seams: every page rasterizes, reads and lands its own ocrresult while the streamcursor checkpoints after each page, a cursor of another document refuses loudly because the pass continues exactly the document it came from, and the already read pages skip on a resume so nothing reads twice.
345
- */
346
- export declare function pdfocr(input: {
347
- record: {
348
- runid: string;
349
- stepid: string;
350
- documentid: string;
351
- };
352
- pages: number;
353
- rasterize: pdfrasterize;
354
- read: ocrread;
355
- cursor?: streamcursor;
356
- checkpoint?: (cursor: streamcursor) => void;
357
- now: number;
358
- clock?: () => number;
359
- }): Promise<{
360
- results: ocrresult[];
361
- cursor: streamcursor;
362
- pagesread: number;
363
- skipped: number;
364
- }>;
365
- /**
366
- * Reads one video frame through the video state and frame grab seams: a playing video refuses loudly because the frame of a moving picture answers no question, a paused video seeks to its reviewed position in milliseconds and captures the frame, and the read rides the captured image through the ocr seam while the framereference records the position the run read.
367
- */
368
- export declare function frameocr(input: {
369
- record: {
370
- runid: string;
371
- stepid: string;
372
- };
373
- frame: framereference;
374
- state: videostateread;
375
- grab: framegrab;
376
- read: ocrread;
377
- now: number;
378
- }): Promise<{
379
- frame: framereference;
380
- result: ocrresult;
381
- image: string;
382
- }>;
383
- /**
384
- * Sends one screenshot with its reviewed prompt to the configured vision model through the vision send seam: an empty prompt refuses loudly because the model answers exactly what the review asked, the seam returns the description text with its labeled regions, and the description carries the prompt it answered so the audit reads both sides.
385
- */
386
- export declare function visionshot(input: {
387
- record: {
388
- runid: string;
389
- stepid: string;
390
- imageid: string;
391
- };
392
- image: string;
393
- prompt: string;
394
- send: visionsend;
395
- id?: string;
396
- now: number;
397
- }): Promise<visiondescription>;
398
- /**
399
- * Computes the crop geometry of one element shot: the element bounds in css pixels scale by the device pixel ratio so the crop lands in image pixels, the scaled crop clamps into the captured image because an element past the edges crops only the visible part, and a bounds rectangle fully outside the image refuses loudly instead of cropping wrong pixels.
400
- */
401
- export declare function cropshot(input: {
402
- image: {
403
- width: number;
404
- height: number;
405
- };
406
- bounds: ocrregion;
407
- pixelratio: number;
408
- }): {
409
- cssbounds: ocrregion;
410
- crop: ocrregion;
411
- width: number;
412
- height: number;
413
- ratio: number;
414
- };
415
- /**
416
- * Applies one redaction mask to a capture before any sharing through the mask fill seam: every region clamps into the capture so a mask past the edges covers only the real part, a mask whose every region falls outside the capture refuses loudly because a share that claims redaction while covering nothing leaks, the fill seam draws the opaque rectangles, and the returned summary records the mask in the audit trail with its reason.
417
- */
418
- export declare function redactshot(input: {
419
- image: string;
420
- width: number;
421
- height: number;
422
- mask: redactionmask;
423
- fill: maskfill;
424
- }): Promise<{
425
- image: string;
426
- regions: number;
427
- reason: string;
428
- summary: string;
429
- }>;
430
- /**
431
- * Proposes redaction masks for the common sensitive regions by field type: every field whose name carries a sensitive field shape the maskinputs recognizer masks contributes one mask with its own reason, so the sidepanel offers exactly the masks the field types imply and the user edits them before any share.
432
- */
433
- export declare function proposeredactionmasks(input: {
434
- runid: string;
435
- captureid: string;
436
- fields: Array<{
437
- name: string;
438
- rect: ocrregion;
439
- }>;
440
- now: number;
441
- }): redactionmask[];
442
- /**
443
- * Grounds the labeled regions of one vision description into ranked page selectors: every candidate element scores by its text match with the label (the shared significant words over the label's words) and its geometry match with the region box (the intersection over union after the image pixel ratio converts the box into css pixels), the two halves average, and the matches rank by score so the top selector grounds the label; a candidate that shares neither words nor geometry never joins the ranking.
444
- */
445
- export declare function groundshot(input: {
446
- description: visiondescription;
447
- elements: Array<{
448
- selector: string;
449
- text: string;
450
- rect: ocrregion;
451
- }>;
452
- pixelratio: number;
453
- record: {
454
- runid: string;
455
- stepid: string;
456
- };
457
- id?: string;
458
- now: number;
459
- }): groundingresult;
460
- /**
461
- * Pairs one screenshot with the dom snapshot captured beside it: only snapshots of the same viewport size align, the nearest capture time wins because the pair answers one moment of the page, and an image with no same viewport snapshot stays unpaired and names its refusal instead of pairing wrong pixels with wrong dom.
462
- */
463
- export declare function pairshot(input: {
464
- runid: string;
465
- stepid: string;
466
- image: {
467
- id: string;
468
- capturetime: number;
469
- viewport: {
470
- width: number;
471
- height: number;
472
- };
473
- };
474
- snapshots: Array<{
475
- id: string;
476
- capturetime: number;
477
- viewport: {
478
- width: number;
479
- height: number;
480
- };
481
- }>;
482
- id?: string;
483
- now: number;
484
- }): {
485
- pair?: screenshotpair;
486
- skipped?: "snapshot";
487
- reason: string;
488
- };
489
- /**
490
- * Answers one query by searching the text of both sides of a pair: the normalized ocr text of the image and the dom text both fold their whitespace and lowercase before the needle search, every matching side reports an excerpt around its hit, and the summary names exactly which sides matched so a visual claim answers its page side.
491
- */
492
- export declare function pairquery(input: {
493
- query: string;
494
- ocrtextvalue: string;
495
- domtext: string;
496
- }): {
497
- matches: Array<{
498
- source: "image" | "dom";
499
- excerpt: string;
500
- }>;
501
- summary: string;
502
- };
503
- /**
504
- * Counts the vision calls of one run for the costshare ledger: every call records whether it rode the configured model endpoint, only the model calls count units because the local passes spend nothing, and the description names the split so the ledger entry reads exactly what the vision family spent.
505
- */
506
- export declare function visioncost(input: {
507
- runid: string;
508
- calls: Array<{
509
- kind: string;
510
- model: boolean;
511
- at: number;
512
- }>;
513
- }): {
514
- calls: number;
515
- modelcalls: number;
516
- units: number;
517
- description: string;
518
- };
519
- /** Reads the hash of one image payload for the visioncache keys: the same bodyhashof shape identity the web api cache keys its entries with, never the pixel values. */
520
- export declare function imagehashof(image: string): string;
521
- /**
522
- * Stores one recognition or description in the visioncache by its image hash: a newer entry of the same hash replaces the older one, and the cache never grows a duplicate because one image hash answers one recognition.
523
- */
524
- export declare function visioncacheput(input: {
525
- entries: visioncacheentry[];
526
- entry: visioncacheentry;
527
- }): visioncacheentry[];
528
- /**
529
- * Serves one visioncache hit by the image hash and kind: entries older than the user retention window drop first because the expiry ties to the user choice with no code default, a live entry of the same hash and kind serves with its hit counter bumped so the repeated read never calls the model again, and the pass reports exactly what it expired.
530
- */
531
- export declare function visioncacheserve(input: {
532
- entries: visioncacheentry[];
533
- hash: string;
534
- kind: "ocr" | "vision";
535
- now: number;
536
- retention?: number;
537
- }): {
538
- entry?: visioncacheentry;
539
- entries: visioncacheentry[];
540
- expired: number;
541
- };
542
- import type { capturesurface, redactregion, toolstep } from "./types.js";
543
- /**
544
- * Redactshots logic of the 1.1.62 family.
545
- * The capture masking rules live here: sensitive regions of the capture surface — derived from the field shapes the recognizer masks or drawn by the user — cover viewport, element and stitched captures alike, so the stored bytes never carry the sensitive regions while the record keeps the redaction evidence and the reason.
546
- * The regions scope to one origin and one page template, and no geometry, region count or shape list is ever hardcoded: every region stays the user's knowledge, mirroring the maskinputs posture.
547
- */
548
- /** Builds one redact region with its geometry in css pixels, its plain language reason and its source; the geometry stays finite and positive so the capture seam draws a real rectangle. */
549
- export declare function regionof(input: {
550
- origin: string;
551
- template: string;
552
- x: number;
553
- y: number;
554
- width: number;
555
- height: number;
556
- reason: string;
557
- source: "fieldshape" | "userdrawn";
558
- now: number;
559
- id?: string;
560
- }): redactregion;
561
- /** Reads whether one region keeps finite, positive geometry the capture seam can draw. */
562
- export declare function regionvalid(region: redactregion): boolean;
563
- /** Reads the regions of one origin and page template: the regions bind to the page they were drawn on and never leak onto another origin or template. */
564
- export declare function regionsfor(regions: redactregion[], origin: string, template: string): redactregion[];
565
- /** Derives redact regions from the sensitive field shapes of one form layout: every field whose name matches a masked shape contributes its rectangle, so the capture masks exactly what the recognizer would mask. */
566
- export declare function fieldshaperegions(input: {
567
- origin: string;
568
- template: string;
569
- fields: Array<{
570
- name: string;
571
- rect: {
572
- x: number;
573
- y: number;
574
- width: number;
575
- height: number;
576
- };
577
- }>;
578
- now: number;
579
- }): redactregion[];
580
- /** Merges drawn regions into the stored set: a region of the same origin, template and geometry keeps its first record while a new geometry joins the list. */
581
- export declare function mergeregions(existing: redactregion[], added: redactregion[]): redactregion[];
582
- /** Maps one capture kind to its redactshots surface: viewport captures, element captures and stitched captures all carry the same region grammar. */
583
- export declare function capturesurfaceof(kind: string): capturesurface;
584
- /** Reads the template name of one capture step: the reviewed option template the user named, or the step kind itself as the page template baseline. */
585
- export declare function templateof(step: Pick<toolstep, "kind" | "options">): string;
586
- /** Applies the redact regions to one stored capture record: the record keeps the redaction evidence — the flag and the region count — while the capture seam draws the opaque rectangles before the bytes reach storage, across every capture kind. */
587
- export declare function redactedshot<T extends {
588
- kind: string;
589
- }>(record: T, regions: redactregion[]): T & {
590
- redacted?: boolean;
591
- redactedregions?: number;
592
- };
593
- /** Builds the redaction evidence summary the audit trail records: the surface, the region count and the reason of every region. */
594
- export declare function redactionsummary(regions: redactregion[]): string;
595
- //# sourceMappingURL=capture.d.ts.map
package/dist/cjs.d.ts DELETED
@@ -1,6 +0,0 @@
1
- /**
2
- * Cjs entry of the 1.1.81 family.
3
- * The shared core for require based consumers: the build emits this entry as dist/index.cjs with every named export of the esm core behind one stable getter object, and the entry stamps its own mode so the library reports the bundle it runs from.
4
- */
5
- export * from "./index.js";
6
- //# sourceMappingURL=cjs.d.ts.map